@ncino/web-components 9.0.0-preview.6 → 9.0.0-preview.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/assets/node_modules/.pnpm/ckeditor5@47.3.0/node_modules/ckeditor5/dist/ckeditor5.css +1 -0
- package/dist/components/input/gator/input-phone/input-phone.gator.js +1 -1
- package/dist/components/input-rich-text/ckeditor-config.js +1 -1
- package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@46.1.1 → @ckeditor_ckeditor5-alignment@47.3.0}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@46.1.1 → @ckeditor_ckeditor5-autoformat@47.3.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@46.1.1 → @ckeditor_ckeditor5-autosave@47.3.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@46.1.1 → @ckeditor_ckeditor5-basic-styles@47.3.0}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@46.1.1 → @ckeditor_ckeditor5-block-quote@47.3.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@47.3.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@46.1.1 → @ckeditor_ckeditor5-cloud-services@47.3.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@46.1.1 → @ckeditor_ckeditor5-code-block@47.3.0}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@47.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@46.1.1 → @ckeditor_ckeditor5-editor-classic@47.3.0}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-engine@47.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +3 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@46.1.1 → @ckeditor_ckeditor5-enter@47.3.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@46.1.1 → @ckeditor_ckeditor5-essentials@47.3.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@46.1.1 → @ckeditor_ckeditor5-find-and-replace@47.3.0}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@46.1.1 → @ckeditor_ckeditor5-font@47.3.0}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@46.1.1 → @ckeditor_ckeditor5-heading@47.3.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@46.1.1 → @ckeditor_ckeditor5-highlight@47.3.0}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@46.1.1 → @ckeditor_ckeditor5-horizontal-line@47.3.0}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@47.3.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@47.3.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +3 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@46.1.1 → @ckeditor_ckeditor5-icons@47.3.0}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@47.3.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@46.1.1 → @ckeditor_ckeditor5-indent@47.3.0}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@46.1.1 → @ckeditor_ckeditor5-language@47.3.0}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@47.3.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@47.3.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@46.1.1 → @ckeditor_ckeditor5-markdown-gfm@47.3.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-media-embed@46.1.1 → @ckeditor_ckeditor5-media-embed@47.3.0}/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@46.1.1 → @ckeditor_ckeditor5-mention@47.3.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@47.3.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@46.1.1 → @ckeditor_ckeditor5-paragraph@47.3.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@47.3.0/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@46.1.1 → @ckeditor_ckeditor5-remove-format@47.3.0}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@46.1.1 → @ckeditor_ckeditor5-select-all@47.3.0}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@46.1.1 → @ckeditor_ckeditor5-show-blocks@47.3.0}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@46.1.1 → @ckeditor_ckeditor5-source-editing@47.3.0}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@47.3.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@46.1.1 → @ckeditor_ckeditor5-style@47.3.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.3.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-typing@46.1.1 → @ckeditor_ckeditor5-typing@47.3.0}/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@47.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@46.1.1 → @ckeditor_ckeditor5-undo@47.3.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@46.1.1 → @ckeditor_ckeditor5-upload@47.3.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@47.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +8 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@47.3.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_expect@4.0.15/node_modules/@vitest/expect/dist/index.js +58 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@4.0.15/node_modules/@vitest/pretty-format/dist/index.js +5 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.0.15/node_modules/@vitest/runner/dist/chunk-tasks.js +2 -0
- package/dist/node_modules/.pnpm/@vitest_runner@4.0.15/node_modules/@vitest/runner/dist/index.js +4 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@4.0.15/node_modules/@vitest/snapshot/dist/index.js +21 -0
- package/dist/node_modules/.pnpm/@vitest_spy@4.0.15/node_modules/@vitest/spy/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/diff.js +42 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/display.js +2 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/error.js +2 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/helpers.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/serialize.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/source-map.js +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/timers.js +1 -0
- package/dist/node_modules/.pnpm/chai@6.2.1/node_modules/chai/index.js +2 -0
- package/dist/node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_0c91d94893276de308eb5b07cced5df8/node_modules/vitest/browser/context.js +1 -0
- package/dist/node_modules/.pnpm/vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_0c91d94893276de308eb5b07cced5df8/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +1 -0
- package/dist/node_modules/.pnpm/vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_0c91d94893276de308eb5b07cced5df8/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +8 -0
- package/dist/node_modules/.pnpm/vitest@4.0.15_@types_node@24.10.1_@vitest_browser-playwright@4.0.15_@vitest_ui@4.0.15_j_0c91d94893276de308eb5b07cced5df8/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +11 -0
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +22 -21
- package/web-types.json +1 -1
- package/dist/_virtual/___vite-browser-external.js +0 -1
- package/dist/_virtual/__vite-browser-external.js +0 -1
- package/dist/_virtual/api-request.js +0 -1
- package/dist/_virtual/constants.js +0 -1
- package/dist/_virtual/events.js +0 -1
- package/dist/_virtual/external.js +0 -1
- package/dist/_virtual/external2.js +0 -1
- package/dist/_virtual/external3.js +0 -1
- package/dist/_virtual/external_types.js +0 -1
- package/dist/_virtual/fetch.js +0 -1
- package/dist/_virtual/figma_client.js +0 -1
- package/dist/_virtual/figma_rest_api.js +0 -1
- package/dist/_virtual/helpers.js +0 -1
- package/dist/_virtual/index10.js +0 -1
- package/dist/_virtual/index11.js +0 -1
- package/dist/_virtual/index12.js +0 -1
- package/dist/_virtual/index2.js +0 -1
- package/dist/_virtual/index3.js +0 -1
- package/dist/_virtual/index4.js +0 -1
- package/dist/_virtual/index5.js +0 -1
- package/dist/_virtual/index6.js +0 -1
- package/dist/_virtual/index7.js +0 -1
- package/dist/_virtual/index8.js +0 -1
- package/dist/_virtual/index9.js +0 -1
- package/dist/_virtual/index_common.js +0 -1
- package/dist/_virtual/index_html.js +0 -1
- package/dist/_virtual/index_html2.js +0 -1
- package/dist/_virtual/index_react.js +0 -1
- package/dist/_virtual/index_react2.js +0 -1
- package/dist/_virtual/inherits_browser.js +0 -1
- package/dist/_virtual/logging.js +0 -1
- package/dist/_virtual/main.js +0 -1
- package/dist/_virtual/main2.js +0 -1
- package/dist/_virtual/mock-interceptor.js +0 -1
- package/dist/_virtual/react.production.js +0 -1
- package/dist/_virtual/string_decoder.js +0 -1
- package/dist/_virtual/template_literal.js +0 -1
- package/dist/_virtual/types.js +0 -1
- package/dist/_virtual/updates.js +0 -1
- package/dist/_virtual/util.js +0 -1
- package/dist/_virtual/utils.js +0 -1
- package/dist/assets/node_modules/.pnpm/ckeditor5@46.1.1/node_modules/ckeditor5/dist/ckeditor5.css +0 -1
- package/dist/components/accordion/gator/base/accordion.gator.figma.js +0 -10
- package/dist/components/accordion/gator/group/accordion-group.gator.figma.js +0 -3
- package/dist/components/alert/alert.gator.figma.js +0 -7
- package/dist/components/avatar/gator/avatar.gator.figma.js +0 -9
- package/dist/components/banner/gator/banner.gator.figma.js +0 -8
- package/dist/components/boolean/boolean.gator.figma.js +0 -11
- package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.figma.js +0 -3
- package/dist/components/breadcrumbs/gator/container/breadcrumbs.gator.figma.js +0 -5
- package/dist/components/button/gator/button.gator.figma.js +0 -12
- package/dist/components/button-group/gator/button-group.gator.figma.js +0 -7
- package/dist/components/icon/gator/icon.gator.figma.js +0 -7
- package/dist/components/icon/gator/icons.gator.figma.js +0 -1
- package/dist/components/text-detail/gator/text-detail.gator.figma.js +0 -30
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +0 -8
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +0 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@46.1.1/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@46.1.1/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +0 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@46.1.1/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@46.1.1/node_modules/@ckeditor/ckeditor5-link/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@46.1.1/node_modules/@ckeditor/ckeditor5-list/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@46.1.1/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@46.1.1/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@46.1.1/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@46.1.1/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +0 -8
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@46.1.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +0 -3
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +0 -3
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js +0 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js +0 -3
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/client/external.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/client/figma_client.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/common/fetch.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/common/logging.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/common/updates.js +0 -4
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/connect/external_types.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/connect/helpers.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/connect/index_common.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/html/external.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/html/index_html.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/html/template_literal.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/react/external.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/dist/react/index_react.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/package.json.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.10.1_typescript@5.9.3__playwright@1.57.0_4c7b68e67853c98910921d3bcdc3c508/node_modules/@vitest/browser/context.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +0 -58
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +0 -5
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +0 -5
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +0 -21
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +0 -42
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +0 -2
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js +0 -1
- package/dist/node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +0 -1
- package/dist/node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js +0 -1
- package/dist/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js +0 -1
- package/dist/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js +0 -1
- package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js +0 -1
- package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js +0 -1
- package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js +0 -1
- package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js +0 -1
- package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js +0 -1
- package/dist/node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js +0 -1
- package/dist/node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js +0 -1
- package/dist/node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js +0 -1
- package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +0 -2
- package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js +0 -2
- package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js +0 -2
- package/dist/node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js +0 -4
- package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js +0 -1
- package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js +0 -1
- package/dist/node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js +0 -1
- package/dist/node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +0 -1
- package/dist/node_modules/.pnpm/compare-versions@6.1.1/node_modules/compare-versions/lib/esm/compare.js +0 -1
- package/dist/node_modules/.pnpm/compare-versions@6.1.1/node_modules/compare-versions/lib/esm/compareVersions.js +0 -1
- package/dist/node_modules/.pnpm/compare-versions@6.1.1/node_modules/compare-versions/lib/esm/index.js +0 -1
- package/dist/node_modules/.pnpm/compare-versions@6.1.1/node_modules/compare-versions/lib/esm/satisfies.js +0 -1
- package/dist/node_modules/.pnpm/compare-versions@6.1.1/node_modules/compare-versions/lib/esm/utils.js +0 -1
- package/dist/node_modules/.pnpm/compare-versions@6.1.1/node_modules/compare-versions/lib/esm/validate.js +0 -1
- package/dist/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js +0 -1
- package/dist/node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js +0 -3
- package/dist/node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json.js +0 -1
- package/dist/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js +0 -1
- package/dist/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js +0 -1
- package/dist/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js +0 -1
- package/dist/node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js +0 -1
- package/dist/node_modules/.pnpm/events@3.3.0/node_modules/events/events.js +0 -1
- package/dist/node_modules/.pnpm/for-each@0.3.5/node_modules/for-each/index.js +0 -1
- package/dist/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js +0 -1
- package/dist/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js +0 -1
- package/dist/node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js +0 -1
- package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js +0 -1
- package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -1
- package/dist/node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js +0 -1
- package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js +0 -1
- package/dist/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js +0 -1
- package/dist/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js +0 -1
- package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js +0 -1
- package/dist/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js +0 -1
- package/dist/node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js +0 -1
- package/dist/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js +0 -1
- package/dist/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js +0 -1
- package/dist/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +0 -1
- package/dist/node_modules/.pnpm/is-arguments@1.2.0/node_modules/is-arguments/index.js +0 -1
- package/dist/node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js +0 -1
- package/dist/node_modules/.pnpm/is-generator-function@1.1.0/node_modules/is-generator-function/index.js +0 -1
- package/dist/node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js +0 -1
- package/dist/node_modules/.pnpm/is-typed-array@1.1.15/node_modules/is-typed-array/index.js +0 -1
- package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +0 -2
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js +0 -1
- package/dist/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js +0 -1
- package/dist/node_modules/.pnpm/possible-typed-array-names@1.1.0/node_modules/possible-typed-array-names/index.js +0 -1
- package/dist/node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react.production.js +0 -1
- package/dist/node_modules/.pnpm/react@19.2.0/node_modules/react/index.js +0 -1
- package/dist/node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +0 -1
- package/dist/node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js +0 -1
- package/dist/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js +0 -1
- package/dist/node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.js +0 -1
- package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/browser.js +0 -1
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js +0 -1
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +0 -1
- package/dist/node_modules/.pnpm/tinyspy@4.0.4/node_modules/tinyspy/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/agent.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/abort-signal.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-connect.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-pipeline.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-request.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-stream.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/api-upgrade.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/readable.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/balanced-pool.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/symbols.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/client.js +0 -26
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/compat/dispatcher-weakref.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/constants.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/connect.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/constants.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/errors.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/request.js +0 -5
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/symbols.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/core/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher-base.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/dispatcher.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js +0 -9
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/dataURL.js +0 -3
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/file.js +0 -3
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/formdata.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/global.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/symbols.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js +0 -2
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/encoding.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/filereader.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/progressevent.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/symbols.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fileapi/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/global.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/DecoratorHandler.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RedirectHandler.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/handler/RetryHandler.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/interceptor/redirectInterceptor.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/constants.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/llhttp/utils.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-agent.js +0 -5
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-client.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-errors.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-interceptor.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-pool.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-symbols.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/mock-utils.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/mock/pluralizer.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/node/fixed-queue.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-base.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool-stats.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/pool.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/proxy-agent.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/timers.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/constants.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/symbols.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js +0 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js +0 -1
- package/dist/node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js +0 -1
- package/dist/node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js +0 -1
- package/dist/node_modules/.pnpm/util@0.12.5/node_modules/util/util.js +0 -10
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.1_@vitest_browser@3.2.4_@vitest_ui@3_6e27007ba0535c26eedf5a22febb1842/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -1
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.1_@vitest_browser@3.2.4_@vitest_ui@3_6e27007ba0535c26eedf5a22febb1842/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +0 -1
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.1_@vitest_browser@3.2.4_@vitest_ui@3_6e27007ba0535c26eedf5a22febb1842/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +0 -8
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.1_@vitest_browser@3.2.4_@vitest_ui@3_6e27007ba0535c26eedf5a22febb1842/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +0 -12
- package/dist/node_modules/.pnpm/which-typed-array@1.1.19/node_modules/which-typed-array/index.js +0 -1
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@46.1.1 → @ckeditor_ckeditor5-watchdog@47.3.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/ParseError.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/PhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/format.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/isObject.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/isPossible.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/isValid.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/metadata.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/parse.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/es6/tools/semver-compare.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/metadata.min.json.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.30 → libphonenumber-js@1.12.31}/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-A242L54C.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-EZSQOHRI.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-JP7NCOJX.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-RP5RXKFU.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/client-logger/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/core-events/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/instrumenter/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@10.1.2_@testing-library_dom@10.4.1_prettier@3.6.2_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.1.4_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/test/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Plugin as P}from"../../../../../@ckeditor_ckeditor5-core@47.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{MouseObserver as F,PointerObserver as q,ModelTreeWalker as G}from"../../../../../@ckeditor_ckeditor5-engine@47.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Delete as N}from"../../../../../@ckeditor_ckeditor5-typing@47.3.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{keyCodes as k,env as C,getLocalizedArrowKeyCodeDirection as Y,compareArrays as A,logWarning as X,CKEditorError as M,isForwardArrowKeyCode as J,getRangeFromMouseEvent as Q,global as x,DomEmitterMixin as Z,toArray as L,Rect as b,ObservableMixin as B,EmitterMixin as ee}from"../../../../../@ckeditor_ckeditor5-utils@47.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconReturnArrow as te,IconDragHandle as ie}from"../../../../../@ckeditor_ckeditor5-icons@47.3.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ContextualBalloon as oe,ToolbarView as ne,BalloonPanelView as se,IconView as re,Template as R,View as le}from"../../../../../@ckeditor_ckeditor5-ui@47.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{Enter as ce}from"../../../../../@ckeditor_ckeditor5-enter@47.3.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{throttle as ae}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/throttle.js";class de extends ee(){_stack=[];add(e,t){const i=this._stack,o=i[0];this._insertDescriptor(e);const n=i[0];o!==n&&!T(o,n)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:n,writer:t})}remove(e,t){const i=this._stack,o=i[0];this._removeDescriptor(e);const n=i[0];o!==n&&!T(o,n)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:n,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(n=>n.id===e.id);if(T(e,t[i]))return;i>-1&&t.splice(i,1);let o=0;for(;t[o]&&he(t[o],e);)o++;t.splice(o,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(o=>o.id===e);i>-1&&t.splice(i,1)}}function T(s,e){return s&&e&&s.priority==e.priority&&S(s.classes)==S(e.classes)}function he(s,e){return s.priority>e.priority?!0:s.priority<e.priority?!1:S(s.classes)>S(e.classes)}function S(s){return Array.isArray(s)?s.sort().join(","):s}const ue="ck-widget",z="ck-widget_selected";function f(s){return s.is("element")?!!s.getCustomProperty("widget"):!1}function nt(s,e,t={}){if(!s.is("containerElement"))throw new M("widget-to-widget-wrong-element-type",null,{element:s});return e.setAttribute("contenteditable","false",s),e.addClass(ue,s),e.setCustomProperty("widget",!0,s),s.getFillerOffset=we,e.setCustomProperty("widgetLabel",[],s),t.label&&pe(s,t.label),t.hasSelectionHandle&&_e(s,e),K(s,e),s}function ge(s,e,t){if(e.classes&&t.addClass(L(e.classes),s),e.attributes)for(const i in e.attributes)t.setAttribute(i,e.attributes[i],s)}function fe(s,e,t){if(e.classes&&t.removeClass(L(e.classes),s),e.attributes)for(const i in e.attributes)t.removeAttribute(i,s)}function K(s,e,t=ge,i=fe){const o=new de;o.on("change:top",(l,c)=>{c.oldDescriptor&&i(s,c.oldDescriptor,c.writer),c.newDescriptor&&t(s,c.newDescriptor,c.writer)});const n=(l,c,a)=>o.add(c,a),r=(l,c,a)=>o.remove(c,a);e.setCustomProperty("addHighlight",n,s),e.setCustomProperty("removeHighlight",r,s)}function pe(s,e){s.getCustomProperty("widgetLabel").push(e)}function me(s){return s.getCustomProperty("widgetLabel").reduce((t,i)=>typeof i=="function"?t?t+". "+i():i():t?t+". "+i:i,"")}function st(s,e,t={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],s),t.withAriaRole!==!1&&e.setAttribute("role","textbox",s),s.isReadOnly||e.setAttribute("tabindex","-1",s),t.label&&e.setAttribute("aria-label",t.label,s),e.setAttribute("contenteditable",s.isReadOnly?"false":"true",s),s.on("change:isReadOnly",(i,o,n)=>{e.setAttribute("contenteditable",n?"false":"true",s),n?e.removeAttribute("tabindex",s):e.setAttribute("tabindex","-1",s)}),s.on("change:isFocused",(i,o,n)=>{n?e.addClass("ck-editor__nested-editable_focused",s):e.removeClass("ck-editor__nested-editable_focused",s)}),K(s,e),s}function rt(s,e){const t=s.getSelectedElement();if(t){const i=w(s);if(i)return e.createRange(e.createPositionAt(t,i))}return e.schema.findOptimalInsertionRange(s)}function we(){return null}function _e(s,e){const t=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(i){const o=this.toDomElement(i),n=new re;return n.set("content",ie),n.render(),o.appendChild(n.element),o});e.insert(e.createPositionAt(s,0),t),e.addClass(["ck-widget_with-selection-handle"],s)}function be(s){const e=l=>{const{width:c,paddingLeft:a,paddingRight:h}=l.ownerDocument.defaultView.getComputedStyle(l);return parseFloat(c)-(parseFloat(a)||0)-(parseFloat(h)||0)},t=s.parentElement;if(!t)return 0;let i=e(t);const o=5;let n=0,r=t;for(;isNaN(i);){if(r=r.parentElement,++n>o)return 0;i=e(r)}return i}function ye(s,e=new b(s)){const t=be(s);return t?e.width/t*100:0}const m="widget-type-around";function _(s,e,t){return!!s&&f(s)&&!t.isInline(e)}function ve(s){return s.closest(".ck-widget__type-around__button")}function Ee(s){return s.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function Se(s,e){const t=s.closest(".ck-widget");return e.mapDomToView(t)}function w(s){return s.getAttribute(m)}const j=["before","after"],Pe=new DOMParser().parseFromString(te,"image/svg+xml").firstChild,V="ck-widget__type-around_disabled";class Te extends P{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[ce,N]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,o,n)=>{t.change(r=>{for(const l of t.document.roots)n?r.removeClass(V,l):r.addClass(V,l)}),n||e.model.change(r=>{r.removeSelectionAttribute(m)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,o=i.editing.view,n=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:n}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(e,t,i,o){this.listenTo(e,t,(...n)=>{this.isEnabled&&i(...n)},o)}_insertParagraphAccordingToFakeCaretPosition(){const i=this.editor.model.document.selection,o=w(i);if(!o)return!1;const n=i.getSelectedElement();return this._insertParagraph(n,o),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,o={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(n,r,l)=>{const c=l.mapper.toViewElement(r.item);c&&_(c,r.item,t)&&(ke(l.writer,o,c),c.getCustomProperty("widgetLabel").push(()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,o=t.schema,n=e.editing.view;this._listenToIfEnabled(n.document,"arrowKey",(l,c)=>{this._handleArrowKeyPress(l,c)},{context:[f,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",(l,c)=>{c.directChange&&e.model.change(a=>{a.removeSelectionAttribute(m)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const l=i.getSelectedElement();if(l){const c=e.editing.mapper.toViewElement(l);if(_(c,l,o))return}e.model.change(c=>{c.removeSelectionAttribute(m)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(l,c,a)=>{const h=a.writer;if(this._currentFakeCaretModelElement){const p=a.mapper.toViewElement(this._currentFakeCaretModelElement);p&&(h.removeClass(j.map(r),p),this._currentFakeCaretModelElement=null)}const d=c.selection.getSelectedElement();if(!d)return;const u=a.mapper.toViewElement(d);if(!_(u,d,o))return;const g=w(c.selection);g&&(h.addClass(r(g),u),this._currentFakeCaretModelElement=d)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(l,c,a)=>{a||e.model.change(h=>{h.removeSelectionAttribute(m)})});function r(l){return`ck-widget_type-around_show-fake-caret_${l}`}}_handleArrowKeyPress(e,t){const i=this.editor,o=i.model,n=o.document.selection,r=o.schema,l=i.editing.view;if(t.shiftKey)return;const c=t.keyCode,a=J(c,i.locale.contentLanguageDirection),h=l.document.selection.getSelectedElement(),d=i.editing.mapper.toModelElement(h);let u;_(h,d,r)?u=this._handleArrowKeyPressOnSelectedWidget(a):n.isCollapsed?u=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(u=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),u&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const i=this.editor.model,o=i.document.selection,n=w(o);return i.change(r=>{if(n){if(!(n===(e?"after":"before")))return r.removeSelectionAttribute(m),!0}else return r.setSelectionAttribute(m,e?"after":"before"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,o=i.schema,n=t.plugins.get("Widget"),r=n._getObjectElementNextToSelection(e),l=t.editing.mapper.toViewElement(r);return _(l,r,o)?(i.change(c=>{n._setSelectionOverElement(r),c.setSelectionAttribute(m,e?"before":"after")}),!0):!1}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,o=i.schema,n=t.editing.mapper,r=i.document.selection,l=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter,c=n.toViewElement(l);return _(c,l,o)?(i.change(a=>{a.setSelection(l,"on"),a.setSelectionAttribute(m,e?"after":"before")}),!0):!1}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,o)=>{const n=ve(o.domTarget);if(!n)return;const r=Ee(n),l=Se(n,t.domConverter),c=e.editing.mapper.toModelElement(l);this._insertParagraph(c,r),o.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",(o,n)=>{if(o.eventPhase!="atTarget")return;const r=t.getSelectedElement(),l=e.editing.mapper.toViewElement(r),c=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:_(l,r,c)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),o.stop())},{context:f})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",(i,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=t.selection)},{priority:"high"}),C.isAndroid?this._listenToIfEnabled(t,"keydown",(i,o)=>{o.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(t,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"highest"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,o=i.schema;this._listenToIfEnabled(t.document,"delete",(n,r)=>{if(n.eventPhase!="atTarget")return;const l=w(i.document.selection);if(!l)return;const c=r.direction,a=i.document.selection.getSelectedElement(),h=l==="before",d=c=="forward";if(h===d)e.execute("delete",{selection:i.createSelection(a,"on")});else{const g=o.getNearestSelectionRange(i.createPositionAt(a,l),c);if(g)if(!g.isCollapsed)i.change(p=>{p.setSelection(g),e.execute(d?"deleteForward":"delete")});else{const p=i.createSelection(g.start);if(i.modifySelection(p,{direction:c}),!p.focus.isEqual(g.start))i.change(v=>{v.setSelection(g),e.execute(d?"deleteForward":"delete")});else{const v=Re(o,g.start.parent);i.deleteContent(i.createSelection(v,"on"),{doNotAutoparagraph:!0})}}}r.preventDefault(),n.stop()},{context:f})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(o,[n,r])=>{if(r&&!r.is("documentSelection"))return;const l=w(i);if(l)return o.stop(),t.change(c=>{const a=i.getSelectedElement(),h=t.createPositionAt(a,l),d=c.createSelection(h),u=t.insertContent(n,d);return c.setSelection(d),u})},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(o,n)=>{const[,r,l={}]=n;if(r&&!r.is("documentSelection"))return;const c=w(i);c&&(l.findOptimalPosition=c,n[3]=l)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(o,[n])=>{if(n&&!n.is("documentSelection"))return;w(i)&&o.stop()},{priority:"high"})}}function ke(s,e,t){const i=s.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(o){const n=this.toDomElement(o);return Ce(n,e),Ae(n),n});s.insert(s.createPositionAt(t,"end"),i)}function Ce(s,e){for(const t of j){const i=new R({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${t}`],title:e[t],"aria-hidden":"true"},children:[s.ownerDocument.importNode(Pe,!0)]});s.appendChild(i.render())}}function Ae(s){const e=new R({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});s.appendChild(e.render())}function Re(s,e){let t=e;for(const i of e.getAncestors({parentFirst:!0})){if(i.childCount>1||s.isLimit(i))break;t=i}return t}function We(s){const e=s.model;return(t,i)=>{const o=i.keyCode==k.arrowup,n=i.keyCode==k.arrowdown,r=i.shiftKey,l=e.document.selection;if(!o&&!n)return;const c=n,a=xe(s,l,c);if(a){if(a.isCollapsed){if(l.isCollapsed)return;if(r)return}(a.isCollapsed||ze(s,a,c))&&(e.change(h=>{const d=c?a.end:a.start;if(r){const u=e.createSelection(l.anchor);u.setFocus(d),h.setSelection(u)}else h.setSelection(d)}),t.stop(),i.preventDefault(),i.stopPropagation())}}}function xe(s,e,t){const i=s.model;if(t){const o=e.focus,n=H(i,o,"forward");if(!n)return;const r=i.createRange(o,n),l=I(i.schema,r,"backward");if(l)return i.createRange(o,l)}else{const o=e.focus,n=H(i,o,"backward");if(!n)return;const r=i.createRange(n,o),l=I(i.schema,r,"forward");if(l)return i.createRange(l,o)}}function H(s,e,t){const i=s.schema,o=s.createRangeIn(e.root),n=t=="forward"?"elementStart":"elementEnd";for(const{previousPosition:r,item:l,type:c}of o.getWalker({startPosition:e,direction:t})){if(i.isLimit(l)&&!i.isInline(l))return r;if(c==n&&i.isBlock(l))return null}return null}function I(s,e,t){const i=t=="backward"?e.end:e.start;if(s.checkChild(i,"$text"))return i;for(const{nextPosition:o}of e.getWalker({direction:t}))if(s.checkChild(o,"$text"))return o}function ze(s,e,t){const i=s.model,o=s.view.domConverter;if(t){const a=i.createSelection(e.start);i.modifySelection(a),!a.focus.isAtEnd&&!e.start.isEqual(a.focus)&&(e=i.createRange(a.focus,e.end))}const n=s.mapper.toViewRange(e),r=o.viewRangeToDom(n),l=b.getDomRangeRects(r);let c;for(const a of l){if(c===void 0){c=Math.round(a.bottom);continue}if(Math.round(a.top)>=c)return!1;c=Math.max(c,Math.round(a.bottom))}return!0}class lt extends P{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[Te,N]}init(){const e=this.editor,t=e.editing.view,i=t.document,o=e.t;this.editor.editing.downcastDispatcher.on("selection",(n,r,l)=>{const c=l.writer,a=r.selection;if(a.isCollapsed)return;const h=a.getSelectedElement();if(!h)return;const d=e.editing.mapper.toViewElement(h);f(d)&&l.consumable.consume(a,"selection")&&c.setSelection(c.createRangeOn(d),{fake:!0,label:me(d)})}),this.editor.editing.downcastDispatcher.on("selection",(n,r,l)=>{this._clearPreviouslySelectedWidgets(l.writer);const c=l.writer,a=c.document.selection;let h=null;for(const d of a.getRanges())for(const u of d){const g=u.item;f(g)&&!Oe(g,h)&&(c.addClass(z,g),this._previouslySelected.add(g),h=g)}},{priority:"low"}),t.addObserver(F),t.addObserver(q),this.listenTo(i,"mousedown",(...n)=>this._onMousedown(...n)),this.listenTo(i,"pointerdown",(...n)=>this._onPointerdown(...n)),this.listenTo(i,"arrowKey",(...n)=>{this._handleSelectionChangeOnArrowKeyPress(...n)},{context:[f,"$text"]}),this.listenTo(i,"arrowKey",(...n)=>{this._preventDefaultOnArrowKeyPress(...n)},{context:"$root"}),this.listenTo(i,"arrowKey",We(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",(n,r)=>{this._handleDelete(r.direction=="forward")&&(r.preventDefault(),n.stop())},{context:"$root"}),this.listenTo(i,"tab",(n,r)=>{this._selectNextEditable(r.shiftKey?"backward":"forward")&&(t.scrollToTheSelection(),r.preventDefault(),n.stop())},{context:n=>f(n)||n.is("editableElement"),priority:"low"}),this.listenTo(i,"keydown",(n,r)=>{r.keystroke==k.esc&&this._selectAncestorWidget()&&(r.preventDefault(),n.stop())},{context:n=>n.is("editableElement"),priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:o("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:o("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:o("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:o("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:o("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:o("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const i=t.target;i&&t.domEvent.detail>=3&&this._selectBlockContent(i)&&t.preventDefault()}_onPointerdown(e,t){if(!t.domEvent.isPrimary)return;const i=this.editor,o=i.editing.view,n=o.document;let r=t.target;if(!r)return;if(!f(r)){const c=Ie(r);if(!c)return;if(f(c))r=c;else{const a=De(o,t);if(a&&f(a))r=a;else return}}(C.isAndroid||C.isiOS)&&t.preventDefault(),n.isFocused||o.focus();const l=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(l)}_selectBlockContent(e){const t=this.editor,i=t.model,o=t.editing.mapper,n=i.schema,r=o.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),l=Fe(o.toModelElement(r),i.schema);return l?(i.change(c=>{const a=n.isLimit(l)?null:Ne(c.createPositionAfter(l),n),h=c.createPositionAt(l,0),d=a?c.createPositionAt(a,0):c.createPositionAt(l,"end");c.setSelection(c.createRange(h,d))}),!0):!1}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,o=this.editor.model,n=o.schema,r=o.document.selection,l=r.getSelectedElement(),c=Y(i,this.editor.locale.contentLanguageDirection),a=c=="down"||c=="right",h=c=="up"||c=="down";if(!t.shiftKey&&!r.isCollapsed){if(Ve(r,n)){const E=a?r.getLastPosition():r.getFirstPosition(),W=n.getNearestSelectionRange(E,a?"forward":"backward");W&&(o.change(U=>{U.setSelection(W)}),t.preventDefault(),e.stop())}return}const d=He(o,a),u=o.createSelection(d);if(o.modifySelection(u,{direction:a?"forward":"backward"}),u.isEqual(d))return;u.focus.isTouching(d.focus)&&o.modifySelection(u,{direction:a?"forward":"backward"});const g=a?d.focus.nodeBefore:d.focus.nodeAfter,p=u.focus.nodeBefore,v=u.focus.nodeAfter,y=a?p:v;if(t.shiftKey)(l&&n.isObject(l)||y&&n.isObject(y)||g&&n.isObject(g))&&(o.change(E=>{E.setSelection(u)}),t.preventDefault(),e.stop());else if(y&&n.isObject(y)){if(n.isInline(y)&&h)return;o.change(E=>{E.setSelection(y,"on")}),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,o=i.schema,n=i.document.selection.getSelectedElement();n&&o.isObject(n)&&(t.preventDefault(),e.stop())}_handleDelete(e){const i=this.editor.model.document.selection;if(!this.editor.model.canEditAt(i)||!i.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change(n=>{let r=i.anchor.parent;for(;r.isEmpty;){const l=r;r=l.parent,n.remove(l)}this._setSelectionOverElement(o)}),!0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,o=t.document.selection,n=t.createSelection(o);if(t.modifySelection(n,{direction:e?"forward":"backward"}),n.isEqual(o))return null;const r=e?n.focus.nodeBefore:n.focus.nodeAfter;return r&&i.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(z,t);this._previouslySelected.clear()}_selectNextEditable(e){const t=this.editor.editing,i=t.view,o=this.editor.model,n=i.document.selection,r=o.document.selection;let l;if(r.rangeCount>1){const a=r.isBackward?r.getFirstRange():r.getLastRange();l=t.mapper.toViewPosition(e=="forward"?a.end:a.start)}else l=e=="forward"?n.getFirstPosition():n.getLastPosition();const c=this._findNextFocusRange(l,e);return c?(o.change(a=>{a.setSelection(c)}),!0):!1}_findNextFocusRange(e,t){const i=this.editor.editing,o=i.view,n=this.editor.model,r=o.document.selection,l=r.editableElement,c=l.getPath();let a=r.getSelectedElement();a&&!f(a)&&(a=null);const h=t=="forward"?o.createRange(e,o.createPositionAt(e.root,"end")):o.createRange(o.createPositionAt(e.root,0),e);for(const{nextPosition:d}of h.getWalker({direction:t})){const u=d.parent;if(f(u)&&u!=a){const g=i.mapper.toModelElement(u);if(!n.schema.isBlock(g))continue;if(A(c,u.getPath())!="extension")return n.createRangeOn(g)}else if(u.is("editableElement")){if(u==l&&!a)continue;const g=i.mapper.toModelPosition(d),p=n.schema.getNearestSelectionRange(g,t);if(!p)continue;return u==l&&a?p:A(c,u.getPath())!="extension"?n.createRangeIn(n.schema.getLimitElement(p)):p}}return null}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,r=(o.is("$text")?o.parent:o).findAncestor(f);if(!r)return!1;const l=t.toModelElement(r);return l?(e.model.change(c=>{c.setSelection(l,"on")}),!0):!1}}function Ve(s,e){const t=s.getFirstPosition(),i=s.getLastPosition(),o=t.nodeAfter,n=i.nodeBefore;return!!o&&e.isObject(o)||!!n&&e.isObject(n)}function He(s,e){const t=s.document.selection,i=t.getSelectedElement(),o=w(t);return i&&o=="before"?s.createSelection(i,"before"):i&&o=="after"?s.createSelection(i,"after"):s.createSelection(t.getRanges(),{backward:i&&s.schema.isObject(i)?!e:t.isBackward})}function Ie(s){let e=s;for(;e;){if(e.is("editableElement")||f(e))return e;e=e.parent}return null}function De(s,e){const t=Q(e.domEvent);let i=null;if(t?i=s.domConverter.domRangeToView(t):i=s.createRange(s.createPositionAt(e.target,0)),!i)return null;const o=i.start;if(!o.parent)return null;let n=o.parent;return o.parent.is("editableElement")&&(o.isAtEnd&&o.nodeBefore?n=o.nodeBefore:o.isAtStart&&o.nodeAfter&&(n=o.nodeAfter)),n.is("$text")?n.parent:n}function Oe(s,e){return e?Array.from(s.getAncestors()).includes(e):!1}function Fe(s,e){for(const t of s.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(t,"$text"))return t;if(e.isLimit(t)&&!e.isObject(t))break}return null}function Ne(s,e){const t=new G({startPosition:s});for(const{item:i}of t){if(e.isLimit(i)||!i.is("element"))return null;if(e.checkChild(i,"$text"))return i}return null}class ct extends P{_toolbarDefinitions=new Map;_balloon;static get requires(){return[oe]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",i=>{Me(e.editing.view.document.selection)&&i.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:o,balloonClassName:n="ck-toolbar-container",positions:r}){if(!i.length){X("widget-toolbar-no-items",{toolbarId:e});return}const l=this.editor,c=l.t,a=new ne(l.locale);if(a.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new M("widget-toolbar-duplicated",this,{toolbarId:e});const h={view:a,getRelatedElement:o,balloonClassName:n,itemsConfig:i,positions:r,initialized:!1};l.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const d=o(l.editing.view.document.selection);d&&this._showToolbar(h,d)},afterBlur:()=>{this._hideToolbar(h)}}),this._toolbarDefinitions.set(e,h)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const o of this._toolbarDefinitions.values()){const n=o.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!n)this._isToolbarInBalloon(o)&&this._hideToolbar(o);else if(!this.editor.ui.focusTracker.isFocused)this._isToolbarVisible(o)&&this._hideToolbar(o);else{const r=n.getAncestors().length;r>e&&(e=r,t=n,i=o)}}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?D(this.editor,t,e.positions):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:$(this.editor,t,e.positions),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const i of this._toolbarDefinitions.values())if(this._isToolbarVisible(i)){const o=i.getRelatedElement(this.editor.editing.view.document.selection);D(this.editor,o,e.positions)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function D(s,e,t){const i=s.plugins.get("ContextualBalloon"),o=$(s,e,t);i.updatePosition(o)}function $(s,e,t){const i=s.editing.view,o=se.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:t||[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}function Me(s){const e=s.getSelectedElement();return!!(e&&f(e))}class Le extends B(){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const o=new b(t);this.activeHandlePosition=je(e),this._referenceCoordinates=Be(t,$e(this.activeHandlePosition)),this._originalWidth=o.width,this._originalHeight=o.height,this._aspectRatio=o.width/o.height;const n=i.style.width;n&&n.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(n):this._originalWidthPercents=ye(i,o)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Be(s,e){const t=new b(s),i=e.split("-"),o={x:i[1]=="right"?t.right:t.left,y:i[0]=="bottom"?t.bottom:t.top};return o.x+=s.ownerDocument.defaultView.scrollX,o.y+=s.ownerDocument.defaultView.scrollY,o}function Ke(s){return`ck-widget__resizer__handle-${s}`}function je(s){const e=["top-left","top-right","bottom-right","bottom-left"];for(const t of e)if(s.classList.contains(Ke(t)))return t}function $e(s){const e=s.split("-"),t={top:"bottom",bottom:"top",left:"right",right:"left"};return`${t[e[0]]}-${t[e[1]]}`}class Ue extends le{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",t=>t?`ck-orientation-${t}`:"")],style:{display:e.if("_isVisible","none",t=>!t)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(i,o)=>i!==null&&o!==null),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(i,o,n)=>e.unit==="px"?`${i}×${o}`:`${n}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(i,o,n)=>o<50||n<50?"above-center":i)}_dismiss(){this.unbind(),this._isVisible=!1}}class O extends B(){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(t,i)=>t&&i),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",t=>{!this.state.proposedWidth&&!this.state.proposedWidthPercents&&(this._cleanup(),t.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(t=>{t.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(t=>{t.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(o=>{const n=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(r){const l=this.toDomElement(r);return e._appendHandles(l),e._appendSizeUI(l),l});o.insert(o.createPositionAt(t,"end"),n),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new Le(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(a=>{const h=this._options.unit||"%",d=(h==="%"?t.widthPercents:t.width)+h;a.setStyle("width",d,this._options.viewElement)});const o=this._getHandleHost(),n=new b(o),r=Math.round(n.width),l=Math.round(n.height),c=new b(o);t.width=Math.round(c.width),t.height=Math.round(c.height),this.redraw(n),this.state.update({...t,handleHostWidth:r,handleHostHeight:l})}commit(){const e=this._options.unit||"%",t=(e==="%"?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!Ye(t))return;const i=t.parentElement,o=this._getHandleHost(),n=this._viewResizerWrapper,r=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let l;if(i.isSameNode(o)){const c=e||new b(o);l=[c.width+"px",c.height+"px",void 0,void 0]}else l=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];A(r,l)!=="same"&&this._options.editor.editing.view.change(c=>{c.setStyle({width:l[0],height:l[1],left:l[2],top:l[3]},n)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i=Ge(e),o=this._options.isCentered?this._options.isCentered(this):!0,n={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(n.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),o&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),l=Math.abs(t.originalHeight+n.y);return(r/t.aspectRatio>l?"width":"height")=="width"?l=r/t.aspectRatio:r=l*t.aspectRatio,{width:Math.round(r),height:Math.round(l),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)e.appendChild(new R({tag:"div",attributes:{class:`ck-widget__resizer__handle ${qe(i)}`}}).render())}_appendSizeUI(e){this._sizeView=new Ue,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function qe(s){return`ck-widget__resizer__handle-${s}`}function Ge(s){return{x:s.pageX,y:s.pageY}}function Ye(s){return s&&s.ownerDocument&&s.ownerDocument.contains(s)}class at extends P{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,t=x.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(F),this._observer=new(Z()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=ae(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[o,n]of this._resizers)o.isAttached()||(this._resizers.delete(o),n.destroy())},{priority:"lowest"}),this._observer.listenTo(x.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const o=i.getSelectedElement(),n=this.getResizerByViewElement(o)||null;n?this.select(n):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new O(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const r=i.get("WidgetToolbarRepository");t.on("begin",()=>{r.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{r.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{r.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;O.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}export{ue as WIDGET_CLASS_NAME,z as WIDGET_SELECTED_CLASS_NAME,lt as Widget,de as WidgetHighlightStack,at as WidgetResize,Le as WidgetResizeState,O as WidgetResizer,ct as WidgetToolbarRepository,Te as WidgetTypeAround,m as _WIDGET_TYPE_AROUND_SELECTION_ATTRIBUTE,Ue as _WidgetSizeView,ve as _getClosestWidgetTypeAroundDomButton,Se as _getClosestWidgetViewElement,Ee as _getWidgetTypeAroundButtonPosition,w as _getWidgetTypeAroundFakeCaretPosition,be as calculateResizeHostAncestorWidth,ye as calculateResizeHostPercentageWidth,rt as findOptimalInsertionRange,me as getLabel,_ as isTypeAroundWidget,f as isWidget,K as setHighlightHandling,pe as setLabel,nt as toWidget,st as toWidgetEditable,We as verticalWidgetNavigationHandler};
|
package/dist/node_modules/.pnpm/@vitest_expect@4.0.15/node_modules/@vitest/expect/dist/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{diff as B,printDiffOrStringify as Ot}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/diff.js";import{stringify as j}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/display.js";import{getType as ft,noop as Mt,isObject as q,assertTypes as N}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/helpers.js";import E from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";import{isMockFunction as H}from"../../../../../@vitest_spy@4.0.15/node_modules/@vitest/spy/dist/index.js";import{processError as jt}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/error.js";import{use as Ct,util as S}from"../../../../../chai@6.2.1/node_modules/chai/index.js";const D=Symbol.for("matchers-object"),P=Symbol.for("$$jest-matchers-object"),ht=Symbol.for("expect-global"),pt=Symbol.for("asymmetric-matchers-object"),fe={toSatisfy(e,t,o){const{printReceived:c,printExpected:a,matcherHint:f}=this.utils,u=t(e);return{pass:u,message:()=>u?`${f(".not.toSatisfy","received","")}
|
|
2
|
+
|
|
3
|
+
Expected value to not satisfy:
|
|
4
|
+
${o||a(t)}
|
|
5
|
+
Received:
|
|
6
|
+
${c(e)}`:`${f(".toSatisfy","received","")}
|
|
7
|
+
|
|
8
|
+
Expected value to satisfy:
|
|
9
|
+
${o||a(t)}
|
|
10
|
+
|
|
11
|
+
Received:
|
|
12
|
+
${c(e)}`}},toBeOneOf(e,t){const{equals:o,customTesters:c}=this,{printReceived:a,printExpected:f,matcherHint:u}=this.utils;let p;if(Array.isArray(t))p=t.length===0||t.some(m=>o(m,e,c));else if(t instanceof Set)p=t.size===0||t.has(e)||[...t].some(m=>o(m,e,c));else throw new TypeError(`You must provide an array or set to ${u(".toBeOneOf")}, not '${typeof t}'.`);return{pass:p,message:()=>p?`${u(".not.toBeOneOf","received","")}
|
|
13
|
+
|
|
14
|
+
Expected value to not be one of:
|
|
15
|
+
${f(t)}
|
|
16
|
+
Received:
|
|
17
|
+
${a(e)}`:`${u(".toBeOneOf","received","")}
|
|
18
|
+
|
|
19
|
+
Expected value to be one of:
|
|
20
|
+
${f(t)}
|
|
21
|
+
|
|
22
|
+
Received:
|
|
23
|
+
${a(e)}`}}},k=E.green,U=E.red,_t=E.inverse,St=E.bold,M=E.dim;function At(e,t="received",o="expected",c={}){const{comment:a="",isDirectExpectCall:f=!1,isNot:u=!1,promise:p="",secondArgument:m="",expectedColor:n=k,receivedColor:r=U,secondArgumentColor:s=k}=c;let i="",l="expect";return!f&&t!==""&&(i+=M(`${l}(`)+r(t),l=")"),p!==""&&(i+=M(`${l}.`)+p,l=""),u&&(i+=`${M(`${l}.`)}not`,l=""),e.includes(".")?l+=e:(i+=M(`${l}.`)+e,l=""),o===""?l+="()":(i+=M(`${l}(`)+n(o),m&&(i+=M(", ")+s(m)),l=")"),a!==""&&(l+=` // ${a}`),l!==""&&(i+=M(l)),i}const It="·";function dt(e){return e.replace(/\s+$/gm,t=>It.repeat(t.length))}function Bt(e){return U(dt(j(e)))}function Pt(e){return k(dt(j(e)))}function mt(){return{EXPECTED_COLOR:k,RECEIVED_COLOR:U,INVERTED_COLOR:_t,BOLD_WEIGHT:St,DIM_COLOR:M,diff:B,matcherHint:At,printReceived:Bt,printExpected:Pt,printDiffOrStringify:Ot,printWithType:Rt}}function Rt(e,t,o){const c=ft(t),a=c!=="null"&&c!=="undefined"?`${e} has type: ${c}
|
|
24
|
+
`:"",f=`${e} has value: ${o(t)}`;return a+f}function he(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${ft(e)}"`);globalThis[P].customEqualityTesters.push(...e)}function J(){return globalThis[P].customEqualityTesters}function g(e,t,o,c){return o=o||[],A(e,t,[],[],o,c?gt:kt)}function z(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&x("Function",e.asymmetricMatch)}function qt(e,t,o){const c=z(e),a=z(t);if(!(c&&a)){if(c)return e.asymmetricMatch(t,o);if(a)return t.asymmetricMatch(e,o)}}function A(e,t,o,c,a,f){let u=!0;const p=qt(e,t,a);if(p!==void 0)return p;const m={equals:g};for(let h=0;h<a.length;h++){const d=a[h].call(m,e,t,a);if(d!==void 0)return d}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;const n=Object.prototype.toString.call(e);if(n!==Object.prototype.toString.call(t))return!1;switch(n){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{const h=+e,d=+t;return h===d||Number.isNaN(h)&&Number.isNaN(d)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Temporal.Instant]":case"[object Temporal.ZonedDateTime]":case"[object Temporal.PlainDateTime]":case"[object Temporal.PlainDate]":case"[object Temporal.PlainTime]":case"[object Temporal.PlainYearMonth]":case"[object Temporal.PlainMonthDay]":return e.equals(t);case"[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return!1;if(X(e)&&X(t))return e.isEqualNode(t);let r=o.length;for(;r--;){if(o[r]===e)return c[r]===t;if(c[r]===t)return!1}if(o.push(e),c.push(t),n==="[object Array]"&&e.length!==t.length)return!1;if(e instanceof Error&&t instanceof Error)try{return Dt(e,t,o,c,a,f)}finally{o.pop(),c.pop()}const s=K(e,f);let i,l=s.length;if(K(t,f).length!==l)return!1;for(;l--;)if(i=s[l],u=f(t,i)&&A(e[i],t[i],o,c,a,f),!u)return!1;return o.pop(),c.pop(),u}function Dt(e,t,o,c,a,f){let u=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&u&&(u=A(e.cause,t.cause,o,c,a,f)),e instanceof AggregateError&&t instanceof AggregateError&&u&&(u=A(e.errors,t.errors,o,c,a,f)),u&&(u=A({...e},{...t},o,c,a,f)),u}function K(e,t){const o=[];for(const c in e)t(e,c)&&o.push(c);return o.concat(Object.getOwnPropertySymbols(e).filter(c=>Object.getOwnPropertyDescriptor(e,c).enumerable))}function kt(e,t){return gt(e,t)&&e[t]!==void 0}function gt(e,t){return Object.hasOwn(e,t)}function x(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function X(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}const yt="@@__IMMUTABLE_KEYED__@@",bt="@@__IMMUTABLE_SET__@@",Lt="@@__IMMUTABLE_LIST__@@",L="@@__IMMUTABLE_ORDERED__@@",Wt="@@__IMMUTABLE_RECORD__@@";function Ht(e){return!!(e&&e[yt]&&!e[L])}function Vt(e){return!!(e&&e[bt]&&!e[L])}function W(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Ft(e){return!!(e&&W(e)&&e[Lt])}function Yt(e){return!!(e&&W(e)&&e[yt]&&e[L])}function Ut(e){return!!(e&&W(e)&&e[bt]&&e[L])}function Jt(e){return!!(e&&W(e)&&e[Wt])}const $t=Symbol.iterator;function Z(e){return!!(e!=null&&e[$t])}function v(e,t,o=[],c=[],a=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Z(e)||!Z(t))return;if(e.constructor!==t.constructor)return!1;let f=c.length;for(;f--;)if(c[f]===e)return a[f]===t;c.push(e),a.push(t);const u=[...o.filter(n=>n!==v),p];function p(n,r){return v(n,r,[...o],[...c],[...a])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(x("Set",e)||Vt(e)){let n=!0;for(const r of e)if(!t.has(r)){let s=!1;for(const i of t)g(r,i,u)===!0&&(s=!0);if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}else if(x("Map",e)||Ht(e)){let n=!0;for(const r of e)if(!t.has(r[0])||!g(r[1],t.get(r[0]),u)){let s=!1;for(const i of t){const l=g(r[0],i[0],u);let h=!1;l===!0&&(h=g(r[1],i[1],u)),h===!0&&(s=!0)}if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}}const m=t[$t]();for(const n of e){const r=m.next();if(r.done||!g(n,r.value,u))return!1}if(!m.next().done)return!1;if(!Ft(e)&&!Yt(e)&&!Ut(e)&&!Jt(e)){const n=Object.entries(e),r=Object.entries(t);if(!g(n,r,u))return!1}return c.pop(),a.pop(),!0}function G(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.hasOwn(e,t)||G(Object.getPrototypeOf(e),t)}function Gt(e){return q(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function R(e,t,o=[]){const c=o.filter(f=>f!==R),a=(f=new WeakMap)=>(u,p)=>{if(Gt(p))return Object.keys(p).every(m=>{if(p[m]!=null&&typeof p[m]=="object"){if(f.has(p[m]))return g(u[m],p[m],c);f.set(p[m],!0)}const n=u!=null&&G(u,m)&&g(u[m],p[m],[...c,a(f)]);return f.delete(p[m]),n})};return a()(e,t)}function Q(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function tt(e,t){let o=e,c=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{o=new DataView(e),c=new DataView(t)}catch{return}}if(o.byteLength!==c.byteLength)return!1;for(let a=0;a<o.byteLength;a++)if(o.getUint8(a)!==c.getUint8(a))return!1;return!0}function Y(e,t,o=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const c=Object.keys(e),a=Object.keys(t),f=o.filter(u=>u!==Y);return g(e,t,f,!0)&&g(c,a)}function zt(e,t="#{this}",o="#{exp}"){const c=`expected ${t} to be ${o} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${c}
|
|
25
|
+
|
|
26
|
+
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
27
|
+
|
|
28
|
+
Expected: ${t}
|
|
29
|
+
Received: serializes to the same string
|
|
30
|
+
`:c}function Kt(e,t){return`${t} ${e}${t===1?"":"s"}`}function V(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var o;return(o=Object.getOwnPropertyDescriptor(e,t))===null||o===void 0?void 0:o.enumerable})]}function Xt(e,t,o){let c=0;const a=(f=new WeakMap)=>(u,p)=>{if(Array.isArray(u)){if(Array.isArray(p)&&p.length===u.length)return p.map((m,n)=>a(f)(u[n],m))}else{if(u instanceof Date)return u;if(q(u)&&q(p)){if(g(u,p,[...o,v,R]))return p;const m={};f.set(u,m),typeof u.constructor=="function"&&typeof u.constructor.name=="string"&&Object.defineProperty(m,"constructor",{enumerable:!1,value:u.constructor});for(const n of V(u))G(p,n)?m[n]=f.has(u[n])?f.get(u[n]):a(f)(u[n],p[n]):f.has(u[n])||(c+=1,q(u[n])&&(c+=V(u[n]).length),a(f)(u[n],p[n]));if(V(m).length>0)return m}}return u};return{subset:a()(e,t),stripped:c}}function Zt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}if(!Object.hasOwn(globalThis,D)){const e=new WeakMap,t=Object.create(null),o=[],c=Object.create(null);Object.defineProperty(globalThis,D,{get:()=>e}),Object.defineProperty(globalThis,P,{configurable:!0,get:()=>({state:e.get(globalThis[ht]),matchers:t,customEqualityTesters:o})}),Object.defineProperty(globalThis,pt,{get:()=>c})}function Et(e){return globalThis[D].get(e)}function pe(e,t){const o=globalThis[D],c=o.get(t)||{},a=Object.defineProperties(c,{...Object.getOwnPropertyDescriptors(c),...Object.getOwnPropertyDescriptors(e)});o.set(t,a)}class T{$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,o=!1){this.sample=t,this.inverse=o}getMatcherContext(t){return{...Et(t||globalThis[ht]),equals:g,isNot:this.inverse,customTesters:J(),utils:{...mt(),diff:B,stringify:j,iterableEquality:v,subsetEquality:R}}}}T.prototype[Symbol.for("chai/inspect")]=function(e){const t=j(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class et extends T{constructor(t,o=!1){if(!x("String",t))throw new Error("Expected is not a string");super(t,o)}asymmetricMatch(t){const o=x("String",t)&&t.includes(this.sample);return this.inverse?!o:o}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class Qt extends T{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class nt extends T{constructor(t,o=!1){super(t,o)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,o){return t?Object.hasOwn(t,o)?!0:this.hasProperty(this.getPrototype(t),o):!1}getProperties(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(o=>{var c;return(c=Object.getOwnPropertyDescriptor(t,o))===null||c===void 0?void 0:c.enumerable})]}asymmetricMatch(t,o){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let c=!0;const a=this.getProperties(this.sample);for(const p of a){var f,u;if(!this.hasProperty(t,p)){c=!1;break}const m=((f=Object.getOwnPropertyDescriptor(this.sample,p))===null||f===void 0?void 0:f.value)??this.sample[p],n=((u=Object.getOwnPropertyDescriptor(t,p))===null||u===void 0?void 0:u.value)??t[p];if(!g(m,n,o)){c=!1;break}}return this.inverse?!c:c}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class rt extends T{constructor(t,o=!1){super(t,o)}asymmetricMatch(t,o){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const c=this.sample.length===0||Array.isArray(t)&&this.sample.every(a=>t.some(f=>g(a,f,o)));return this.inverse?!c:c}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class te extends T{constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t)}fnNameFor(t){if(t.name)return t.name;const c=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return c?c[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return"Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}}class ot extends T{constructor(t,o=!1){if(!x("String",t)&&!x("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),o)}asymmetricMatch(t){const o=x("String",t)&&this.sample.test(t);return this.inverse?!o:o}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class st extends T{precision;constructor(t,o=2,c=!1){if(!x("Number",t))throw new Error("Expected is not a Number");if(!x("Number",o))throw new Error("Precision is not a Number");super(t),this.inverse=c,this.precision=o}asymmetricMatch(t){if(!x("Number",t))return!1;let o=!1;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?o=!0:o=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!o:o}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Kt("digit",this.precision)})`].join(" ")}}class it extends T{result;constructor(t,o=!1){if(!Zt(t))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(t,o)}asymmetricMatch(t){const o=this.sample["~standard"].validate(t);if(o instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=o;const c=!this.result.issues||this.result.issues.length===0;return this.inverse?!c:c}toString(){return`Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return"object"}toAsymmetricMatcher(){var t;const{utils:o}=this.getMatcherContext();return(((t=this.result)===null||t===void 0?void 0:t.issues)||[]).length>0?`${this.toString()} ${o.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}}const de=(e,t)=>{t.addMethod(e.expect,"anything",()=>new Qt),t.addMethod(e.expect,"any",o=>new te(o)),t.addMethod(e.expect,"stringContaining",o=>new et(o)),t.addMethod(e.expect,"objectContaining",o=>new nt(o)),t.addMethod(e.expect,"arrayContaining",o=>new rt(o)),t.addMethod(e.expect,"stringMatching",o=>new ot(o)),t.addMethod(e.expect,"closeTo",(o,c)=>new st(o,c)),t.addMethod(e.expect,"schemaMatching",o=>new it(o)),e.expect.not={stringContaining:o=>new et(o,!0),objectContaining:o=>new nt(o,!0),arrayContaining:o=>new rt(o,!0),stringMatching:o=>new ot(o,!0),closeTo:(o,c)=>new st(o,c,!0),schemaMatching:o=>new it(o,!0)}};function at(e,t,o){const c=e.flag(t,"negate")?"not.":"",a=`${e.flag(t,"_name")}(${o?"expected":""})`,f=e.flag(t,"promise");return`expect(actual)${f?`.${f}`:""}.${c}${a}`}function ct(e,t,o,c){const a=e;if(a&&t instanceof Promise){t=t.finally(()=>{if(!a.promises)return;const u=a.promises.indexOf(t);u!==-1&&a.promises.splice(u,1)}),a.promises||(a.promises=[]),a.promises.push(t);let f=!1;return a.onFinished??(a.onFinished=[]),a.onFinished.push(()=>{if(!f){var u;const m=(((u=globalThis.__vitest_worker__)===null||u===void 0?void 0:u.onFilterStackTrace)||(n=>n||""))(c.stack);console.warn([`Promise returned by \`${o}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
|
|
31
|
+
`,m].join(""))}}),{then(u,p){return f=!0,t.then(u,p)},catch(u){return t.catch(u)},finally(u){return t.finally(u)},[Symbol.toStringTag]:"Promise"}}return t}function lt(e,t){var o;e.result||(e.result={state:"fail"}),e.result.state="fail",(o=e.result).errors||(o.errors=[]),e.result.errors.push(jt(t))}function wt(e,t,o){return function(...c){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return o.apply(this,c);const a=e.flag(this,"vitest-test");if(!a)throw new Error("expect.soft() can only be used inside a test");try{const f=o.apply(this,c);return f&&typeof f=="object"&&typeof f.then=="function"?f.then(Mt,u=>{lt(a,u)}):f}catch(f){lt(a,f)}}}const me=(e,t)=>{const{AssertionError:o}=e,c=J();function a(n,r){const s=i=>{const l=wt(t,i,r);t.addMethod(e.Assertion.prototype,i,l),t.addMethod(globalThis[P].matchers,i,l)};Array.isArray(n)?n.forEach(i=>s(i)):s(n)}["throw","throws","Throw"].forEach(n=>{t.overwriteMethod(e.Assertion.prototype,n,r=>function(...s){const i=t.flag(this,"promise"),l=t.flag(this,"object"),h=t.flag(this,"negate");if(i==="rejects")t.flag(this,"object",()=>{throw l});else if(i==="resolves"&&typeof l!="function"){if(h)return;{const d=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new o(d,y,t.flag(this,"ssfi"))}}r.apply(this,s)})}),a("withTest",function(n){return t.flag(this,"vitest-test",n),this}),a("toEqual",function(n){const r=t.flag(this,"object"),s=g(r,n,[...c,v]);return this.assert(s,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",n,r)}),a("toStrictEqual",function(n){const r=t.flag(this,"object"),s=g(r,n,[...c,v,Q,Y,tt],!0);return this.assert(s,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",n,r)}),a("toBe",function(n){const r=this._obj,s=Object.is(r,n);let i="";return s||(g(r,n,[...c,v,Q,Y,tt],!0)?i="toStrictEqual":g(r,n,[...c,v])&&(i="toEqual")),this.assert(s,zt(i),"expected #{this} not to be #{exp} // Object.is equality",n,r)}),a("toMatchObject",function(n){const r=this._obj,s=g(r,n,[...c,v,R]),i=t.flag(this,"negate"),{subset:l,stripped:h}=Xt(r,n,c);if(s&&i||!s&&!i){const d=t.getMessage(this,[s,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",n,l,!1]),y=h===0?d:`${d}
|
|
32
|
+
(${h} matching ${h===1?"property":"properties"} omitted from actual)`;throw new o(y,{showDiff:!0,expected:n,actual:l})}}),a("toMatch",function(n){const r=this._obj;if(typeof r!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof r}`);return this.assert(typeof n=="string"?r.includes(n):r.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,r)}),a("toContain",function(n){const r=this._obj;if(typeof Node<"u"&&r instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(r.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,r)}if(typeof DOMTokenList<"u"&&r instanceof DOMTokenList){N(n,"class name",["string"]);const i=t.flag(this,"negate")?r.value.replace(n,"").trim():`${r.value} ${n}`;return this.assert(r.contains(n),`expected "${r.value}" to contain "${n}"`,`expected "${r.value}" not to contain "${n}"`,i,r.value)}return typeof r=="string"&&typeof n=="string"?this.assert(r.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,r):(r!=null&&typeof r!="string"&&t.flag(this,"object",Array.from(r)),this.contain(n))}),a("toContainEqual",function(n){const r=t.flag(this,"object"),s=Array.from(r).findIndex(i=>g(i,n,c));this.assert(s!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",n)}),a("toBeTruthy",function(){const n=t.flag(this,"object");this.assert(!!n,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,n)}),a("toBeFalsy",function(){const n=t.flag(this,"object");this.assert(!n,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,n)}),a("toBeGreaterThan",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r>n,`expected ${r} to be greater than ${n}`,`expected ${r} to be not greater than ${n}`,n,r,!1)}),a("toBeGreaterThanOrEqual",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r>=n,`expected ${r} to be greater than or equal to ${n}`,`expected ${r} to be not greater than or equal to ${n}`,n,r,!1)}),a("toBeLessThan",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r<n,`expected ${r} to be less than ${n}`,`expected ${r} to be not less than ${n}`,n,r,!1)}),a("toBeLessThanOrEqual",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r<=n,`expected ${r} to be less than or equal to ${n}`,`expected ${r} to be not less than or equal to ${n}`,n,r,!1)}),a("toBeNaN",function(){const n=t.flag(this,"object");this.assert(Number.isNaN(n),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,n)}),a("toBeUndefined",function(){const n=t.flag(this,"object");this.assert(n===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,n)}),a("toBeNull",function(){const n=t.flag(this,"object");this.assert(n===null,"expected #{this} to be null","expected #{this} not to be null",null,n)}),a("toBeNullable",function(){const n=t.flag(this,"object");this.assert(n==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,n)}),a("toBeDefined",function(){const n=t.flag(this,"object");this.assert(typeof n<"u","expected #{this} to be defined","expected #{this} to be undefined",n)}),a("toBeTypeOf",function(n){const r=typeof this._obj,s=n===r;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,r)}),a("toBeInstanceOf",function(n){return this.instanceOf(n)}),a("toHaveLength",function(n){return this.have.length(n)}),a("toHaveProperty",function(...n){Array.isArray(n[0])&&(n[0]=n[0].map($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const r=this._obj,[s,i]=n,l=()=>Object.hasOwn(r,s)?{value:r[s],exists:!0}:t.getPathInfo(r,s),{value:h,exists:d}=l(),y=d&&(n.length===1||g(i,h,c)),b=n.length===1?"":` with value ${t.objDisplay(i)}`;return this.assert(y,`expected #{this} to have property "${s}"${b}`,`expected #{this} to not have property "${s}"${b}`,i,d?h:void 0)}),a("toBeCloseTo",function(n,r=2){const s=this._obj;let i=!1,l=0,h=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-r/2,h=Math.abs(s-n),i=h<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${h}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${h}, but expected ${l}`,n,s,!1)});function f(n){if(!H(n._obj))throw new TypeError(`${t.inspect(n._obj)} is not a spy or a call to a spy!`)}function u(n){return f(n),n._obj}a(["toHaveBeenCalledTimes","toBeCalledTimes"],function(n){const r=u(this),s=r.getMockName(),i=r.mock.calls.length;return this.assert(i===n,`expected "${s}" to be called #{exp} times, but got ${i} times`,`expected "${s}" to not be called #{exp} times`,n,i,!1)}),a("toHaveBeenCalledOnce",function(){const n=u(this),r=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${r}" to be called once, but got ${s} times`,`expected "${r}" to not be called once`,1,s,!1)}),a(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),r=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let h=t.getMessage(this,[i,`expected "${r}" to be called at least once`,`expected "${r}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(h=F(n,h)),i&&l||!i&&!l)throw new o(h)});function p(n,r){return n.length===r.length&&n.every((s,i)=>g(s,r[i],[...c,v]))}a(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const r=u(this),s=r.getMockName(),i=r.mock.calls.some(d=>p(d,n)),l=t.flag(this,"negate"),h=t.getMessage(this,[i,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,n]);if(i&&l||!i&&!l)throw new o(F(r,h,n))}),a("toHaveBeenCalledExactlyOnceWith",function(...n){const r=u(this),s=r.getMockName(),i=r.mock.calls.length,h=r.mock.calls.some(b=>p(b,n))&&i===1,d=t.flag(this,"negate"),y=t.getMessage(this,[h,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(h&&d||!h&&!d)throw new o(F(r,y,n))}),a(["toHaveBeenNthCalledWith","nthCalledWith"],function(n,...r){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],h=s.mock.calls.length,d=n<=h;this.assert(l&&p(l,r),`expected ${I(n)} "${i}" call to have been called with #{exp}${d?"":`, but called only ${h} times`}`,`expected ${I(n)} "${i}" call to not have been called with #{exp}`,r,l,d)}),a(["toHaveBeenLastCalledWith","lastCalledWith"],function(...n){const r=u(this),s=r.getMockName(),i=r.mock.calls.at(-1);this.assert(i&&p(i,n),`expected last "${s}" call to have been called with #{exp}`,`expected last "${s}" call to not have been called with #{exp}`,n,i)});function m(n,r,s){const i=n.mock.invocationCallOrder,l=r.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}a(["toHaveBeenCalledBefore"],function(n,r=!0){const s=u(this);if(!H(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,r),`expected "${s.getMockName()}" to have been called before "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called before "${n.getMockName()}"`,n,s)}),a(["toHaveBeenCalledAfter"],function(n,r=!0){const s=u(this);if(!H(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,r),`expected "${s.getMockName()}" to have been called after "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called after "${n.getMockName()}"`,n,s)}),a(["toThrow","toThrowError"],function(n){if(typeof n=="string"||typeof n>"u"||n instanceof RegExp)return this.throws(n===""?/^$/:n);const r=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=r;else if(s==="resolves"&&typeof r!="function"){if(i)return;{const h=t.flag(this,"message")||"expected promise to throw an error, but it didn't",d={showDiff:!1};throw new o(h,d,t.flag(this,"ssfi"))}}else{let h=!1;try{r()}catch(d){h=!0,l=d}if(!h&&!i){const d=t.flag(this,"message")||"expected function to throw an error, but it didn't",y={showDiff:!1};throw new o(d,y,t.flag(this,"ssfi"))}}if(typeof n=="function"){const h=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${h}`,`expected error not to be instance of ${h}`,n,l)}if(n instanceof Error){const h=g(l,n,[...c,v]);return this.assert(h,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",n,l)}if(typeof n=="object"&&"asymmetricMatch"in n&&typeof n.asymmetricMatch=="function"){const h=n;return this.assert(l&&h.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",h,l)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof n}"`)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:r})=>r==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:r})=>r!=="throw"),action:"called"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(){const i=u(this),l=i.getMockName(),h=r(i);this.assert(h,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,h,!h,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,r)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===r,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,r)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===r,action:"called"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i){const l=u(this),h=l.getMockName(),d=r(l,i);this.assert(d,`expected "${h}" to be successfully ${s} ${i} times`,`expected "${h}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${d}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,r)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(r,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,r)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(r,i)),action:"return"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i){const l=u(this),h=r(l,i),d=t.flag(this,"negate");if(h&&d||!h&&!d){const y=l.getMockName(),b=t.getMessage(this,[h,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),$=s==="return"?l.mock.results:l.mock.settledResults;throw new o(ee(l,$,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,r)=>{const s=n.mock.settledResults.at(-1);return!!(s&&s.type==="fulfilled"&&g(s.value,r))},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(n,r)=>{const s=n.mock.results.at(-1);return!!(s&&s.type==="return"&&g(s.value,r))},action:"return"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i){const l=u(this),d=(s==="return"?l.mock.results:l.mock.settledResults).at(-1),y=l.getMockName();this.assert(r(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,d?.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,r,s)=>{const i=n.mock.settledResults[r-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(n,r,s)=>{const i=n.mock.results[r-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i,l){const h=u(this),d=h.getMockName(),b=(s==="return"?h.mock.results:h.mock.settledResults)[i-1],$=`${I(i)} call`;this.assert(r(h,i,l),`expected ${$} "${d}" call to ${s} #{exp}`,`expected ${$} "${d}" call to not ${s} #{exp}`,l,b?.value)})}),a("withContext",function(n){for(const r in n)t.flag(this,r,n[r]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const r=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",r);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof i?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const l=new Proxy(this,{get:(h,d,y)=>{const b=Reflect.get(h,d,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...$)=>{t.flag(this,"_name",d);const C=i.then(O=>(t.flag(this,"object",O),b.call(this,...$)),O=>{const w=new o(`promise rejected "${t.inspect(O)}" instead of resolving`,{showDiff:!1});throw w.cause=O,w.stack=r.stack.replace(r.message,w.message),w});return ct(s,C,at(t,this,!!$.length),r)}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const r=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",r);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object"),l=typeof i=="function"?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof l?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof l}'.`);const h=new Proxy(this,{get:(d,y,b)=>{const $=Reflect.get(d,y,b);return typeof $!="function"?$ instanceof e.Assertion?h:$:(...C)=>{t.flag(this,"_name",y);const O=l.then(w=>{const _=new o(`promise resolved "${t.inspect(w)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:w});throw _.stack=r.stack.replace(r.message,_.message),_},w=>(t.flag(this,"object",w),$.call(this,...C)));return ct(s,O,at(t,this,!!C.length),r)}}});return h})};function I(e){const t=e%10,o=e%100;return t===1&&o!==11?`${e}st`:t===2&&o!==12?`${e}nd`:t===3&&o!==13?`${e}rd`:`${e}th`}function F(e,t,o){return e.mock.calls.length&&(t+=E.gray(`
|
|
33
|
+
|
|
34
|
+
Received:
|
|
35
|
+
|
|
36
|
+
${e.mock.calls.map((c,a)=>{let f=E.bold(` ${I(a+1)} ${e.getMockName()} call:
|
|
37
|
+
|
|
38
|
+
`);return o?f+=B(o,c,{omitAnnotationLines:!0}):f+=j(c).split(`
|
|
39
|
+
`).map(u=>` ${u}`).join(`
|
|
40
|
+
`),f+=`
|
|
41
|
+
`,f}).join(`
|
|
42
|
+
`)}`)),t+=E.gray(`
|
|
43
|
+
|
|
44
|
+
Number of calls: ${E.bold(e.mock.calls.length)}
|
|
45
|
+
`),t}function ee(e,t,o,c){return t.length&&(o+=E.gray(`
|
|
46
|
+
|
|
47
|
+
Received:
|
|
48
|
+
|
|
49
|
+
${t.map((a,f)=>{let u=E.bold(` ${I(f+1)} ${e.getMockName()} call return:
|
|
50
|
+
|
|
51
|
+
`);return c?u+=B(c,a.value,{omitAnnotationLines:!0}):u+=j(a).split(`
|
|
52
|
+
`).map(p=>` ${p}`).join(`
|
|
53
|
+
`),u+=`
|
|
54
|
+
`,u}).join(`
|
|
55
|
+
`)}`)),o+=E.gray(`
|
|
56
|
+
|
|
57
|
+
Number of calls: ${E.bold(e.mock.calls.length)}
|
|
58
|
+
`),o}function ne(e,t){const o=e._obj,c=S.flag(e,"negate"),a=S.flag(e,"promise")||"",f=S.flag(e,"message"),u={...mt(),diff:B,stringify:j,iterableEquality:v,subsetEquality:R};let p=S.flag(e,"vitest-test");const m=p?.fullTestName??"";return p?.type!=="test"&&(p=void 0),{state:{...Et(t),task:p,currentTestName:m,customTesters:J(),isNot:c,utils:u,promise:a,equals:g,suppressedErrors:[],soft:S.flag(e,"soft"),poll:S.flag(e,"poll")},isNot:c,obj:o,customMessage:f}}class ut extends Error{constructor(t,o,c){super(t),this.actual=o,this.expected=c}}function re(e,t,o){return(c,a)=>{Object.entries(o).forEach(([f,u])=>{function p(...s){const{state:i,isNot:l,obj:h,customMessage:d}=ne(this,t),y=u.call(i,h,...s);if(y&&typeof y=="object"&&typeof y.then=="function")return y.then(({pass:_,message:vt,actual:xt,expected:Tt})=>{if(_&&l||!_&&!l){const Nt=d??vt();throw new ut(Nt,xt,Tt)}});const{pass:b,message:$,actual:C,expected:O}=y;if(b&&l||!b&&!l){const w=d??$();throw new ut(w,C,O)}}const m=wt(a,f,p);a.addMethod(globalThis[P].matchers,f,m),a.addMethod(e.Assertion.prototype,f,m);class n extends T{constructor(i=!1,...l){super(l,i)}asymmetricMatch(i){const{pass:l}=u.call(this.getMatcherContext(t),i,...this.sample);return this.inverse?!l:l}toString(){return`${this.inverse?"not.":""}${f}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(i=>j(i)).join(", ")}>`}}const r=(...s)=>new n(!1,...s);Object.defineProperty(t,f,{configurable:!0,enumerable:!0,value:r,writable:!0}),Object.defineProperty(t.not,f,{configurable:!0,enumerable:!0,value:(...s)=>new n(!0,...s),writable:!0}),Object.defineProperty(globalThis[pt],f,{configurable:!0,enumerable:!0,value:r,writable:!0})})}}const ge=(e,t)=>{t.addMethod(e.expect,"extend",(o,c)=>{Ct(re(e,o,c))})};export{pt as ASYMMETRIC_MATCHERS_OBJECT,te as Any,Qt as Anything,rt as ArrayContaining,T as AsymmetricMatcher,ht as GLOBAL_EXPECT,P as JEST_MATCHERS_OBJECT,de as JestAsymmetricMatchers,me as JestChaiExpect,ge as JestExtend,D as MATCHERS_OBJECT,nt as ObjectContaining,it as SchemaMatching,et as StringContaining,ot as StringMatching,he as addCustomEqualityTesters,tt as arrayBufferEquality,fe as customMatchers,g as equals,zt as generateToBeMessage,V as getObjectKeys,Xt as getObjectSubset,Et as getState,x as isA,z as isAsymmetric,Ht as isImmutableUnorderedKeyed,Vt as isImmutableUnorderedSet,Zt as isStandardSchema,v as iterableEquality,Kt as pluralize,pe as setState,Y as sparseArrayEquality,R as subsetEquality,Q as typeEquality};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Te from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";function v(e,t){return t.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in e)){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(e)}function de(e,t){const r=Object.keys(e),n=t===null?r:r.sort(t);if(Object.getOwnPropertySymbols)for(const o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&n.push(o);return n}function I(e,t,r,n,o,u,s=": "){let a="",m=0,f=e.next();if(!f.done){a+=t.spacingOuter;const p=r+t.indent;for(;!f.done;){if(a+=p,m++===t.maxWidth){a+="…";break}const E=u(f.value[0],t,p,n,o),_=u(f.value[1],t,p,n,o);a+=E+s+_,f=e.next(),f.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+r}return a}function D(e,t,r,n,o,u){let s="",a=0,m=e.next();if(!m.done){s+=t.spacingOuter;const f=r+t.indent;for(;!m.done;){if(s+=f,a++===t.maxWidth){s+="…";break}s+=u(m.value,t,f,n,o),m=e.next(),m.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+r}return s}function M(e,t,r,n,o,u){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;const a=f=>f instanceof DataView,m=a(e)?e.byteLength:e.length;if(m>0){s+=t.spacingOuter;const f=r+t.indent;for(let p=0;p<m;p++){if(s+=f,p===t.maxWidth){s+="…";break}(a(e)||p in e)&&(s+=u(a(e)?e.getInt8(p):e[p],t,f,n,o)),p<m-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+r}return s}function F(e,t,r,n,o,u){let s="";const a=de(e,t.compareKeys);if(a.length>0){s+=t.spacingOuter;const m=r+t.indent;for(let f=0;f<a.length;f++){const p=a[f],E=u(p,t,m,n,o),_=u(e[p],t,m,n,o);s+=`${m+E}: ${_}`,f<a.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+r}return s}const Ne=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,O=" ",Ie=(e,t,r,n,o,u)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++n>t.maxDepth?`[${s}]`:`${s+O}[${M(e.sample,t,r,n,o,u)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++n>t.maxDepth?`[${s}]`:`${s+O}{${F(e.sample,t,r,n,o,u)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+O+u(e.sample,t,r,n,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},Oe=e=>e&&e.$$typeof===Ne,Ae={serialize:Ie,test:Oe},Re=" ",ee=new Set(["DOMStringMap","NamedNodeMap"]),Me=/^(?:HTML\w*Collection|NodeList)$/;function Ce(e){return ee.has(e)||Me.test(e)}const xe=e=>e&&e.constructor&&!!e.constructor.name&&Ce(e.constructor.name);function he(e){return e.constructor.name==="NamedNodeMap"}const we=(e,t,r,n,o,u)=>{const s=e.constructor.name;return++n>t.maxDepth?`[${s}]`:(t.min?"":s+Re)+(ee.has(s)?`{${F(he(e)?[...e].reduce((a,m)=>(a[m.name]=m.value,a),{}):{...e},t,r,n,o,u)}}`:`[${M([...e],t,r,n,o,u)}]`)},Pe={serialize:we,test:xe};function te(e){return e.replaceAll("<","<").replaceAll(">",">")}function j(e,t,r,n,o,u,s){const a=n+r.indent,m=r.colors;return e.map(f=>{const p=t[f];let E=s(p,r,a,o,u);return typeof p!="string"&&(E.includes(`
|
|
2
|
+
`)&&(E=r.spacingOuter+a+E+r.spacingOuter+n),E=`{${E}}`),`${r.spacingInner+n+m.prop.open+f+m.prop.close}=${m.value.open}${E}${m.value.close}`}).join("")}function C(e,t,r,n,o,u){return e.map(s=>t.spacingOuter+r+(typeof s=="string"?re(s,t):u(s,t,r,n,o))).join("")}function ge(e,t,r,n,o,u){return t.printShadowRoot===!1?"":[`${t.spacingOuter+r}#shadow-root`,C(e,t,r+t.indent,n,o,u)].join("")}function re(e,t){const r=t.colors.content;return r.open+te(e)+r.close}function Le(e,t){const r=t.colors.comment;return`${r.open}<!--${te(e)}-->${r.close}`}function z(e,t,r,n,o){const u=n.colors.tag;return`${u.open}<${e}${t&&u.close+t+n.spacingOuter+o+u.open}${r?`>${u.close}${r}${n.spacingOuter}${o}${u.open}</${e}`:`${t&&!n.min?"":" "}/`}>${u.close}`}function B(e,t){const r=t.colors.tag;return`${r.open}<${e}${r.close} …${r.open} />${r.close}`}const De=1,ne=3,oe=8,se=11,Fe=/^(?:(?:HTML|SVG)\w*)?Element$/;function je(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function ze(e){const t=e.constructor.name,{nodeType:r,tagName:n}=e,o=typeof n=="string"&&n.includes("-")||je(e);return r===De&&(Fe.test(t)||o)||r===ne&&t==="Text"||r===oe&&t==="Comment"||r===se&&t==="DocumentFragment"}const Be=e=>e?.constructor?.name&&ze(e);function Ue(e){return e.nodeType===ne}function Ye(e){return e.nodeType===oe}function A(e){return e.nodeType===se}const ke=(e,t,r,n,o,u)=>{if(Ue(e))return re(e.data,t);if(Ye(e))return Le(e.data,t);const s=A(e)?"DocumentFragment":e.tagName.toLowerCase();return++n>t.maxDepth?B(s,t):z(s,j(A(e)?[]:Array.from(e.attributes,a=>a.name).sort(),A(e)?{}:[...e.attributes].reduce((a,m)=>(a[m.name]=m.value,a),{}),t,r+t.indent,n,o,u),(A(e)||!e.shadowRoot?"":ge(Array.prototype.slice.call(e.shadowRoot.children),t,r+t.indent,n,o,u))+C(Array.prototype.slice.call(e.childNodes||e.children),t,r+t.indent,n,o,u),t,r)},Ve={serialize:ke,test:Be},Ke="@@__IMMUTABLE_ITERABLE__@@",We="@@__IMMUTABLE_LIST__@@",qe="@@__IMMUTABLE_KEYED__@@",Je="@@__IMMUTABLE_MAP__@@",Y="@@__IMMUTABLE_ORDERED__@@",Ge="@@__IMMUTABLE_RECORD__@@",He="@@__IMMUTABLE_SEQ__@@",Xe="@@__IMMUTABLE_SET__@@",Qe="@@__IMMUTABLE_STACK__@@",d=e=>`Immutable.${e}`,x=e=>`[${e}]`,N=" ",k="…";function Ze(e,t,r,n,o,u,s){return++n>t.maxDepth?x(d(s)):`${d(s)+N}{${I(e.entries(),t,r,n,o,u)}}`}function ve(e){let t=0;return{next(){if(t<e._keys.length){const r=e._keys[t++];return{done:!1,value:[r,e.get(r)]}}return{done:!0,value:void 0}}}}function et(e,t,r,n,o,u){const s=d(e._name||"Record");return++n>t.maxDepth?x(s):`${s+N}{${I(ve(e),t,r,n,o,u)}}`}function tt(e,t,r,n,o,u){const s=d("Seq");return++n>t.maxDepth?x(s):e[qe]?`${s+N}{${e._iter||e._object?I(e.entries(),t,r,n,o,u):k}}`:`${s+N}[${e._iter||e._array||e._collection||e._iterable?D(e.values(),t,r,n,o,u):k}]`}function P(e,t,r,n,o,u,s){return++n>t.maxDepth?x(d(s)):`${d(s)+N}[${D(e.values(),t,r,n,o,u)}]`}const rt=(e,t,r,n,o,u)=>e[Je]?Ze(e,t,r,n,o,u,e[Y]?"OrderedMap":"Map"):e[We]?P(e,t,r,n,o,u,"List"):e[Xe]?P(e,t,r,n,o,u,e[Y]?"OrderedSet":"Set"):e[Qe]?P(e,t,r,n,o,u,"Stack"):e[He]?tt(e,t,r,n,o,u):et(e,t,r,n,o,u),nt=e=>e&&(e[Ke]===!0||e[Ge]===!0),ot={serialize:rt,test:nt};function ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g={exports:{}},y={};var V;function st(){if(V)return y;V=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),_=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function $(c){if(typeof c=="object"&&c!==null){var i=c.$$typeof;switch(i){case e:switch(c=c.type,c){case r:case o:case n:case m:case f:case _:return c;default:switch(c=c&&c.$$typeof,c){case s:case a:case E:case p:return c;case u:return c;default:return i}}case t:return i}}}return y.ContextConsumer=u,y.ContextProvider=s,y.Element=e,y.ForwardRef=a,y.Fragment=r,y.Lazy=E,y.Memo=p,y.Portal=t,y.Profiler=o,y.StrictMode=n,y.Suspense=m,y.SuspenseList=f,y.isContextConsumer=function(c){return $(c)===u},y.isContextProvider=function(c){return $(c)===s},y.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},y.isForwardRef=function(c){return $(c)===a},y.isFragment=function(c){return $(c)===r},y.isLazy=function(c){return $(c)===E},y.isMemo=function(c){return $(c)===p},y.isPortal=function(c){return $(c)===t},y.isProfiler=function(c){return $(c)===o},y.isStrictMode=function(c){return $(c)===n},y.isSuspense=function(c){return $(c)===m},y.isSuspenseList=function(c){return $(c)===f},y.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===o||c===n||c===m||c===f||typeof c=="object"&&c!==null&&(c.$$typeof===E||c.$$typeof===p||c.$$typeof===s||c.$$typeof===u||c.$$typeof===a||c.$$typeof===h||c.getModuleId!==void 0)},y.typeOf=$,y}var K;function ut(){return K||(K=1,g.exports=st()),g.exports}var ce=ut(),ct=ue(ce),it=v({__proto__:null,default:ct},[ce]),L={exports:{}},l={};var W;function at(){if(W)return l;W=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),$;$=Symbol.for("react.module.reference");function c(i){if(typeof i=="object"&&i!==null){var w=i.$$typeof;switch(w){case e:switch(i=i.type,i){case r:case o:case n:case f:case p:return i;default:switch(i=i&&i.$$typeof,i){case a:case s:case m:case _:case E:case u:return i;default:return w}}case t:return w}}}return l.ContextConsumer=s,l.ContextProvider=u,l.Element=e,l.ForwardRef=m,l.Fragment=r,l.Lazy=_,l.Memo=E,l.Portal=t,l.Profiler=o,l.StrictMode=n,l.Suspense=f,l.SuspenseList=p,l.isAsyncMode=function(){return!1},l.isConcurrentMode=function(){return!1},l.isContextConsumer=function(i){return c(i)===s},l.isContextProvider=function(i){return c(i)===u},l.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===e},l.isForwardRef=function(i){return c(i)===m},l.isFragment=function(i){return c(i)===r},l.isLazy=function(i){return c(i)===_},l.isMemo=function(i){return c(i)===E},l.isPortal=function(i){return c(i)===t},l.isProfiler=function(i){return c(i)===o},l.isStrictMode=function(i){return c(i)===n},l.isSuspense=function(i){return c(i)===f},l.isSuspenseList=function(i){return c(i)===p},l.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===r||i===o||i===n||i===f||i===p||i===h||typeof i=="object"&&i!==null&&(i.$$typeof===_||i.$$typeof===E||i.$$typeof===u||i.$$typeof===s||i.$$typeof===m||i.$$typeof===$||i.getModuleId!==void 0)},l.typeOf=c,l}var q;function mt(){return q||(q=1,L.exports=at()),L.exports}var ie=mt(),ft=ue(ie),lt=v({__proto__:null,default:ft},[ie]);const pt=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],T=Object.fromEntries(pt.map(e=>[e,t=>lt[e](t)||it[e](t)]));function ae(e,t=[]){if(Array.isArray(e))for(const r of e)ae(r,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function J(e){const t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(T.isFragment(e))return"React.Fragment";if(T.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(T.isContextProvider(e))return"Context.Provider";if(T.isContextConsumer(e))return"Context.Consumer";if(T.isForwardRef(e)){if(t.displayName)return t.displayName;const r=t.render.displayName||t.render.name||"";return r===""?"ForwardRef":`ForwardRef(${r})`}if(T.isMemo(e)){const r=t.displayName||t.type.displayName||t.type.name||"";return r===""?"Memo":`Memo(${r})`}}return"UNDEFINED"}function yt(e){const{props:t}=e;return Object.keys(t).filter(r=>r!=="children"&&t[r]!==void 0).sort()}const Et=(e,t,r,n,o,u)=>++n>t.maxDepth?B(J(e),t):z(J(e),j(yt(e),e.props,t,r+t.indent,n,o,u),C(ae(e.props.children),t,r+t.indent,n,o,u),t,r),$t=e=>e!=null&&T.isElement(e),St={serialize:Et,test:$t},_t=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function bt(e){const{props:t}=e;return t?Object.keys(t).filter(r=>t[r]!==void 0).sort():[]}const Tt=(e,t,r,n,o,u)=>++n>t.maxDepth?B(e.type,t):z(e.type,e.props?j(bt(e),e.props,t,r+t.indent,n,o,u):"",e.children?C(e.children,t,r+t.indent,n,o,u):"",t,r),dt=e=>e&&e.$$typeof===_t,Nt={serialize:Tt,test:dt},me=Object.prototype.toString,It=Date.prototype.toISOString,Ot=Error.prototype.toString,G=RegExp.prototype.toString;function R(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function At(e){return typeof window<"u"&&e===window}const Rt=/^Symbol\((.*)\)(.*)$/,Mt=/\n/g;class fe extends Error{constructor(t,r){super(t),this.stack=r,this.name=this.constructor.name}}function Ct(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function xt(e){return Object.is(e,-0)?"-0":String(e)}function ht(e){return`${e}n`}function H(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function X(e){return String(e).replace(Rt,"Symbol($1)")}function Q(e){return`[${Ot.call(e)}]`}function le(e,t,r,n){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";const o=typeof e;if(o==="number")return xt(e);if(o==="bigint")return ht(e);if(o==="string")return n?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return H(e,t);if(o==="symbol")return X(e);const u=me.call(e);return u==="[object WeakMap]"?"WeakMap {}":u==="[object WeakSet]"?"WeakSet {}":u==="[object Function]"||u==="[object GeneratorFunction]"?H(e,t):u==="[object Symbol]"?X(e):u==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":It.call(e):u==="[object Error]"?Q(e):u==="[object RegExp]"?r?G.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):G.call(e):e instanceof Error?Q(e):null}function pe(e,t,r,n,o,u){if(o.includes(e))return"[Circular]";o=[...o],o.push(e);const s=++n>t.maxDepth,a=t.min;if(t.callToJSON&&!s&&e.toJSON&&typeof e.toJSON=="function"&&!u)return b(e.toJSON(),t,r,n,o,!0);const m=me.call(e);return m==="[object Arguments]"?s?"[Arguments]":`${a?"":"Arguments "}[${M(e,t,r,n,o,b)}]`:Ct(m)?s?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${M(e,t,r,n,o,b)}]`:m==="[object Map]"?s?"[Map]":`Map {${I(e.entries(),t,r,n,o,b," => ")}}`:m==="[object Set]"?s?"[Set]":`Set {${D(e.values(),t,r,n,o,b)}}`:s||At(e)?`[${R(e)}]`:`${a||!t.printBasicPrototype&&R(e)==="Object"?"":`${R(e)} `}{${F(e,t,r,n,o,b)}}`}const wt={test:e=>e&&e instanceof Error,serialize(e,t,r,n,o,u){if(o.includes(e))return"[Circular]";o=[...o,e];const s=++n>t.maxDepth,{message:a,cause:m,...f}=e,p={message:a,...typeof m<"u"?{cause:m}:{},...e instanceof AggregateError?{errors:e.errors}:{},...f},E=e.name!=="Error"?e.name:R(e);return s?`[${E}]`:`${E} {${I(Object.entries(p).values(),t,r,n,o,u)}}`}};function Pt(e){return e.serialize!=null}function ye(e,t,r,n,o,u){let s;try{s=Pt(e)?e.serialize(t,r,n,o,u,b):e.print(t,a=>b(a,r,n,o,u),a=>{const m=n+r.indent;return m+a.replaceAll(Mt,`
|
|
3
|
+
${m}`)},{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(a){throw new fe(a.message,a.stack)}if(typeof s!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof s}".`);return s}function Ee(e,t){for(const r of e)try{if(r.test(t))return r}catch(n){throw new fe(n.message,n.stack)}return null}function b(e,t,r,n,o,u){const s=Ee(t.plugins,e);if(s!==null)return ye(s,e,t,r,n,o);const a=le(e,t.printFunctionName,t.escapeRegex,t.escapeString);return a!==null?a:pe(e,t,r,n,o,u)}const U={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},$e=Object.keys(U),S={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:U};function gt(e){for(const t of Object.keys(e))if(!Object.hasOwn(S,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function Lt(){return $e.reduce((e,t)=>{const r=U[t],n=r&&Te[r];if(n&&typeof n.close=="string"&&typeof n.open=="string")e[t]=n;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`);return e},Object.create(null))}function Dt(){return $e.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function Se(e){return e?.printFunctionName??S.printFunctionName}function _e(e){return e?.escapeRegex??S.escapeRegex}function be(e){return e?.escapeString??S.escapeString}function Z(e){return{callToJSON:e?.callToJSON??S.callToJSON,colors:e?.highlight?Lt():Dt(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:S.compareKeys,escapeRegex:_e(e),escapeString:be(e),indent:e?.min?"":Ft(e?.indent??S.indent),maxDepth:e?.maxDepth??S.maxDepth,maxWidth:e?.maxWidth??S.maxWidth,min:e?.min??S.min,plugins:e?.plugins??S.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:Se(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?" ":`
|
|
4
|
+
`,spacingOuter:e?.min?"":`
|
|
5
|
+
`}}function Ft(e){return Array.from({length:e+1}).join(" ")}function zt(e,t){if(t&&(gt(t),t.plugins)){const n=Ee(t.plugins,e);if(n!==null)return ye(n,e,Z(t),"",0,[])}const r=le(e,Se(t),_e(t),be(t));return r!==null?r:pe(e,Z(t),"",0,[])}const Bt={AsymmetricMatcher:Ae,DOMCollection:Pe,DOMElement:Ve,Immutable:ot,ReactElement:St,ReactTestComponent:Nt,Error:wt};export{S as DEFAULT_OPTIONS,zt as format,Bt as plugins};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{parseSingleStack as c}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/source-map.js";function u(t,n){function e(i){const s=function(...r){return n.apply(i,r)};Object.assign(s,n),s.withContext=()=>s.bind(i),s.setContext=(r,a)=>{i[r]=a},s.mergeContext=r=>{Object.assign(i,r)};for(const r of t)Object.defineProperty(s,r,{get(){return e({...i,[r]:!0})}});return s}const o=e({});return o.fn=n,o}function l(t,n){const e=n.split(`
|
|
2
|
+
`).slice(1);for(const o of e){const i=c(o);if(i&&i.file===t)return i}}function m(t){const n=[t.name];let e=t;for(;e?.suite;)e=e.suite,e?.name&&n.unshift(e.name);return e!==t.file&&n.unshift(t.file.name),n}function d(t,n=" > "){return t.filter(e=>e!==void 0).join(n)}export{u as c,d as e,l as f,m as j};
|
package/dist/node_modules/.pnpm/@vitest_runner@4.0.15/node_modules/@vitest/runner/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{isNegativeNaN as Ee,isObject as oe,toArray as ie,objectAttr as Q,assertTypes as D,createDefer as Z}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/helpers.js";import{getSafeTimers as se}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/timers.js";import{format as Ae,formatRegExp as ke,objDisplay as _e}from"../../../../../@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/display.js";import{c as ce,e as W,f as le}from"./chunk-tasks.js";class Ce extends Error{code="VITEST_PENDING";taskId;constructor(t,o,r){super(t),this.message=t,this.note=r,this.taskId=o.id}}const be=new WeakMap,ue=new WeakMap,ae=new WeakMap;function Se(e,t){be.set(e,t)}function Re(e,t){ue.set(e,t)}function Fe(e){return ue.get(e)}function xe(e,t){ae.set(e,t)}function Ie(e){return ae.get(e)}function je(e,t){const o=t.reduce((i,s)=>(i[s.prop]=s,i),{}),r={};e.forEach(i=>{const s=o[i.prop]||{...i};r[s.prop]=s});for(const i in r){var n;const s=r[i];s.deps=(n=s.deps)===null||n===void 0?void 0:n.map(c=>r[c.prop])}return Object.values(r)}function fe(e,t,o){const r=["auto","injected","scope"],n=Object.entries(e).map(([i,s])=>{const c={value:s};if(Array.isArray(s)&&s.length>=2&&oe(s[1])&&Object.keys(s[1]).some(a=>r.includes(a))){var l;Object.assign(c,s[1]);const a=s[0];c.value=c.injected?((l=o.injectValue)===null||l===void 0?void 0:l.call(o,i))??a:a}return c.scope=c.scope||"test",c.scope==="worker"&&!o.getWorkerContext&&(c.scope="file"),c.prop=i,c.isFn=typeof c.value=="function",c});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(n):t.fixtures=n,n.forEach(i=>{if(i.isFn){const c=he(i.value);if(c.length&&(i.deps=t.fixtures.filter(({prop:l})=>l!==i.prop&&c.includes(l))),i.scope!=="test"){var s;(s=i.deps)===null||s===void 0||s.forEach(l=>{if(l.isFn&&!(i.scope==="worker"&&l.scope==="worker")&&!(i.scope==="file"&&l.scope!=="test"))throw new SyntaxError(`cannot use the ${l.scope} fixture "${l.prop}" inside the ${i.scope} fixture "${i.prop}"`)})}}}),t}const X=new Map,x=new Map;function H(e,t,o){return r=>{const n=r||o;if(!n)return t({});const i=Fe(n);if(!i?.length)return t(n);const s=he(t),c=i.some(({auto:h})=>h);if(!s.length&&!c)return t(n);X.get(n)||X.set(n,new Map);const l=X.get(n);x.has(n)||x.set(n,[]);const a=x.get(n),u=i.filter(({prop:h,auto:g})=>g||s.includes(h)),p=de(u);if(!p.length)return t(n);async function d(){for(const h of p){if(l.has(h))continue;const g=await $e(e,h,n,a);n[h.prop]=g,l.set(h,g),h.scope==="test"&&a.unshift(()=>{l.delete(h)})}}return d().then(()=>t(n))}}const K=new WeakMap;function $e(e,t,o,r){var n;const i=Qe(o.task.file),s=(n=e.getWorkerContext)===null||n===void 0?void 0:n.call(e);if(!t.isFn){var c;if(i[c=t.prop]??(i[c]=t.value),s){var l;s[l=t.prop]??(s[l]=t.value)}return t.value}if(t.scope==="test")return ee(t.value,o,r);if(K.has(t))return K.get(t);let a;if(t.scope==="worker"){if(!s)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");a=s}else a=i;if(t.prop in a)return a[t.prop];x.has(a)||x.set(a,[]);const u=x.get(a),p=ee(t.value,a,u).then(d=>(a[t.prop]=d,K.delete(t),d));return K.set(t,p),p}async function ee(e,t,o){const r=Z();let n=!1;const i=e(t,async s=>{n=!0,r.resolve(s);const c=Z();o.push(async()=>{c.resolve(),await i}),await c}).catch(s=>{if(!n){r.reject(s);return}throw s});return r}function de(e,t=new Set,o=[]){return e.forEach(r=>{if(!o.includes(r)){if(!r.isFn||!r.deps){o.push(r);return}if(t.has(r))throw new Error(`Circular fixture dependency detected: ${r.prop} <- ${[...t].reverse().map(n=>n.prop).join(" <- ")}`);t.add(r),de(r.deps,t,o),o.push(r),t.clear()}}),o}function he(e){let t=Ne(e.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(t)&&(t=t.split(/__async\((?:this|null),/)[1]);const o=t.match(/[^(]*\(([^)]*)/);if(!o)return[];const r=te(o[1]);if(!r.length)return[];let n=r[0];if("__VITEST_FIXTURE_INDEX__"in e&&(n=r[e.__VITEST_FIXTURE_INDEX__],!n))return[];if(!(n[0]==="{"&&n.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${n}".`);const i=n.slice(1,-1).replace(/\s/g,""),s=te(i).map(l=>l.replace(/:.*|=.*/g,"")),c=s.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return s}function Ne(e){const t=[];let o="none";for(let r=0;r<e.length;++r)o==="singleline"?e[r]===`
|
|
2
|
+
`&&(o="none"):o==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(o="none"):o==="none"&&(e[r]==="/"&&e[r+1]==="/"?o="singleline":e[r]==="/"&&e[r+1]==="*"?(o="multiline",r+=2):t.push(e[r]));return t.join("")}function te(e){const t=[],o=[];let r=0;for(let i=0;i<e.length;i++)if(e[i]==="{"||e[i]==="[")o.push(e[i]==="{"?"}":"]");else if(e[i]===o.at(-1))o.pop();else if(!o.length&&e[i]===","){const s=e.substring(r,i).trim();s&&t.push(s),r=i+1}const n=e.substring(r).trim();return n&&t.push(n),t}function N(){return P().config.hookTimeout}const pe=Symbol.for("VITEST_CLEANUP_TIMEOUT"),me=Symbol.for("VITEST_CLEANUP_STACK_TRACE");function Pe(e,t=N()){D(e,'"beforeAll" callback',["function"]);const o=new Error("STACK_TRACE_ERROR");return R().on("beforeAll",Object.assign(F(e,t,!0,o),{[pe]:t,[me]:o}))}function Me(e,t){return D(e,'"afterAll" callback',["function"]),R().on("afterAll",F(e,t??N(),!0,new Error("STACK_TRACE_ERROR")))}function qe(e,t=N()){D(e,'"beforeEach" callback',["function"]);const o=new Error("STACK_TRACE_ERROR"),r=P();return R().on("beforeEach",Object.assign(F(H(r,e),t??N(),!0,o,z),{[pe]:t,[me]:o}))}function We(e,t){D(e,'"afterEach" callback',["function"]);const o=P();return R().on("afterEach",F(H(o,e),t??N(),!0,new Error("STACK_TRACE_ERROR"),z))}const $=Le();Y(function(e,t,o){R().test.fn.call(this,S(e),t,o)});let C,ge,Ke;function ve(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. This is a bug in Vitest. Please, open an issue with reproduction.`)}function P(){return ve(C,"the runner"),C}function R(){const e=A.currentSuite||ge;return ve(e,"the current suite"),e}function Ue(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function I(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let o={},r;if(typeof t=="number"?o={timeout:t}:typeof e=="object"&&(o=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e}else typeof t=="function"&&(r=t);return{options:o,handler:r}}function Ve(e,t=()=>{},o,r,n,i){const s=[];let c;h();const l=function(v="",f={}){var m,T,w;const M=f?.timeout??C.config.testTimeout,_=(m=A.currentSuite)===null||m===void 0?void 0:m.suite,k={id:"",name:v,fullName:W([_?.fullName??((T=A.currentSuite)===null||T===void 0||(T=T.file)===null||T===void 0?void 0:T.fullName),v]),fullTestName:W([_?.fullTestName,v]),suite:_,each:f.each,fails:f.fails,context:void 0,type:"test",file:_?.file??((w=A.currentSuite)===null||w===void 0?void 0:w.file),timeout:M,retry:f.retry??C.config.retry,repeats:f.repeats,mode:f.only?"only":f.skip?"skip":f.todo?"todo":"run",meta:f.meta??Object.create(null),annotations:[],artifacts:[]},L=f.handler;k.mode==="run"&&!L&&(k.mode="todo"),(f.concurrent||!f.sequential&&C.config.sequence.concurrent)&&(k.concurrent=!0),k.shuffle=n?.shuffle;const q=ze(k,C);Object.defineProperty(k,"context",{value:q,enumerable:!1}),Re(q,f.fixtures);const ye=Error.stackTraceLimit;Error.stackTraceLimit=15;const G=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ye,L&&Se(k,F(De(H(C,L,q),k),M,!1,G,(J,j)=>z([q],j))),C.config.includeTaskLocation){const J=G.stack,j=le(Ke,J);j&&(k.location={line:j.line,column:j.column})}return s.push(k),k},a=Y(function(v,f,m){let{options:T,handler:w}=I(f,m);typeof n=="object"&&(T=Object.assign({},n,T)),T.concurrent=this.concurrent||!this.sequential&&T?.concurrent,T.sequential=this.sequential||!this.concurrent&&T?.sequential;const M=l(S(v),{...this,...T,handler:w});M.type="test"});let u=i;const p={type:"collector",name:e,mode:o,suite:c,options:n,test:a,tasks:s,collect:y,task:l,clear:g,on:d,fixtures(){return u},scoped(v){const f=fe(v,{fixtures:u},C);f.fixtures&&(u=f.fixtures)}};function d(v,...f){Ie(c)[v].push(...f)}function h(v){var f,m,T;typeof n=="number"&&(n={timeout:n});const w=(f=A.currentSuite)===null||f===void 0?void 0:f.suite;c={id:"",type:"suite",name:e,fullName:W([w?.fullName??((m=A.currentSuite)===null||m===void 0||(m=m.file)===null||m===void 0?void 0:m.fullName),e]),fullTestName:W([w?.fullTestName,e]),suite:w,mode:o,each:r,file:w?.file??((T=A.currentSuite)===null||T===void 0?void 0:T.file),shuffle:n?.shuffle,tasks:[],meta:Object.create(null),concurrent:n?.concurrent},xe(c,Ue())}function g(){s.length=0,h()}async function y(v){if(!v)throw new TypeError("File is required to collect tasks.");t&&await He(p,()=>t(a));const f=[];for(const m of s)f.push(m.type==="collector"?await m.collect(v):m);return c.tasks=f,c}return Be(p),p}function De(e,t){return(async(...o)=>{const r=await e(...o);if(t.promises){const i=(await Promise.allSettled(t.promises)).map(s=>s.status==="rejected"?s.reason:void 0).filter(Boolean);if(i.length)throw i}return r})}function Le(){function e(t,o,r){var n;let i=this.only?"only":this.skip?"skip":this.todo?"todo":"run";const s=A.currentSuite||ge;let{options:c,handler:l}=I(o,r);i==="run"&&!l&&(i="todo");const a=c.concurrent||this.concurrent||c.sequential===!1,u=c.sequential||this.sequential||c.concurrent===!1;c={...s?.options,...c,shuffle:this.shuffle??c.shuffle??(s==null||(n=s.options)===null||n===void 0?void 0:n.shuffle)??void 0};const p=a||c.concurrent&&!u,d=u||c.sequential&&!a;return c.concurrent=p&&!d,c.sequential=d&&!p,Ve(S(t),l,i,this.each,c,s?.fixtures())}return e.each=function(t,...o){const r=this.withContext();return this.setContext("each",!0),Array.isArray(t)&&o.length&&(t=V(t,o)),(n,i,s)=>{const c=S(n),l=t.every(Array.isArray),{options:a,handler:u}=I(i,s),p=typeof i=="function";t.forEach((d,h)=>{const g=Array.isArray(d)?d:[d];p?l?r(b(c,g,h),u?()=>u(...g):void 0,a.timeout):r(b(c,g,h),u?()=>u(d):void 0,a.timeout):l?r(b(c,g,h),a,u?()=>u(...g):void 0):r(b(c,g,h),a,u?()=>u(d):void 0)}),this.setContext("each",void 0)}},e.for=function(t,...o){return Array.isArray(t)&&o.length&&(t=V(t,o)),(r,n,i)=>{const s=S(r),{options:c,handler:l}=I(n,i);t.forEach((a,u)=>{$(b(s,ie(a),u),c,l?()=>l(a):void 0)})}},e.skipIf=t=>t?$.skip:$,e.runIf=t=>t?$:$.skip,ce(["concurrent","sequential","shuffle","skip","only","todo"],e)}function Xe(e,t){const o=e;o.each=function(n,...i){const s=this.withContext();return this.setContext("each",!0),Array.isArray(n)&&i.length&&(n=V(n,i)),(c,l,a)=>{const u=S(c),p=n.every(Array.isArray),{options:d,handler:h}=I(l,a),g=typeof l=="function";n.forEach((y,v)=>{const f=Array.isArray(y)?y:[y];g?p?s(b(u,f,v),h?()=>h(...f):void 0,d.timeout):s(b(u,f,v),h?()=>h(y):void 0,d.timeout):p?s(b(u,f,v),d,h?()=>h(...f):void 0):s(b(u,f,v),d,h?()=>h(y):void 0)}),this.setContext("each",void 0)}},o.for=function(n,...i){const s=this.withContext();return Array.isArray(n)&&i.length&&(n=V(n,i)),(c,l,a)=>{const u=S(c),{options:p,handler:d}=I(l,a);n.forEach((h,g)=>{const y=d?v=>d(h,v):void 0;y&&(y.__VITEST_FIXTURE_INDEX__=1,y.toString=()=>d.toString()),s(b(u,ie(h),g),p,y)})}},o.skipIf=function(n){return n?this.skip:this},o.runIf=function(n){return n?this:this.skip},o.scoped=function(n){R().scoped(n)},o.extend=function(n){const i=fe(n,t||{},C),s=e;return Y(function(c,l,a){const p=R().fixtures(),d={...this};p&&(d.fixtures=je(d.fixtures||[],p)),s.call(d,S(c),l,a)},i)},o.beforeEach=qe,o.afterEach=We,o.beforeAll=Pe,o.afterAll=Me;const r=ce(["concurrent","sequential","skip","only","todo","fails"],o);return t&&r.mergeContext(t),r}function Y(e,t){return Xe(e,t)}function S(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function b(e,t,o){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${o}`).replace(/%\$/g,`${o+1}`).replace(/__vitest_escaped_%__/g,"%%"));const r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((a,u)=>{if(Ee(t[u])||Object.is(t[u],-0)){let p=0;e=e.replace(/%f/g,d=>(p++,p===u+1?"-%f":d))}});const n=oe(t[0]);function i(l){return l.replace(/\$([$\w.]+)/g,(a,u)=>{const p=/^\d+$/.test(u);if(!n&&!p)return`$${u}`;const d=p?Q(t,u):void 0,h=n?Q(t[0],u,d):d;return _e(h,{truncate:void 0})})}let s="",c=0;return Oe(e,ke,l=>{c<r?s+=Ae(l[0],t[c++]):s+=l[0]},l=>{s+=i(l)}),s}function Oe(e,t,o,r){let n=0;for(const i of e.matchAll(t))n<i.index&&r(e.slice(n,i.index)),o(i),n=i.index+i[0].length;n<e.length&&r(e.slice(n))}function V(e,t){const o=e.join("").trim().replace(/ /g,"").split(`
|
|
3
|
+
`).map(n=>n.split("|"))[0],r=[];for(let n=0;n<Math.floor(t.length/o.length);n++){const i={};for(let s=0;s<o.length;s++)i[o[s]]=t[n*o.length+s];r.push(i)}return r}const ne=Date.now,A={currentSuite:null};function Be(e){var t;(t=A.currentSuite)===null||t===void 0||t.tasks.push(e)}async function He(e,t){const o=A.currentSuite;A.currentSuite=e,await t(),A.currentSuite=o}function F(e,t,o=!1,r,n){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:i,clearTimeout:s}=se();return(function(...l){const a=ne(),u=P();return u._currentTaskStartTime=a,u._currentTaskTimeout=t,new Promise((p,d)=>{var h;const g=i(()=>{s(g),y()},t);(h=g.unref)===null||h===void 0||h.call(g);function y(){const m=Ge(o,t,r);n?.(l,m),d(m)}function v(m){if(u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,s(g),ne()-a>=t){y();return}p(m)}function f(m){u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,s(g),d(m)}try{const m=e(...l);typeof m=="object"&&m!=null&&typeof m.then=="function"?m.then(v,f):v(m)}catch(m){f(m)}})})}const B=new WeakMap;function z([e],t){e&&Ye(e,t)}function Ye(e,t){const o=B.get(e);o?.abort(t)}function ze(e,t){var o;const r=function(){throw new Error("done() callback is deprecated, use promise instead")};let n=B.get(r);return n||(n=new AbortController,B.set(r,n)),r.signal=n.signal,r.task=e,r.skip=(i,s)=>{if(i!==!1)throw e.result??(e.result={state:"skip"}),e.result.pending=!0,new Ce("test is skipped; abort execution",e,typeof i=="string"?i:s)},r.annotate=((i,s,c)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const l={message:i,type:typeof s=="object"||s===void 0?"notice":s},a=typeof s=="object"?s:c;return a&&(l.attachment=a,we(l.attachment)),nt(e,et(e,{type:"internal:annotation",annotation:l}).then(async({annotation:u})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Te(t);const p=await t.onTestAnnotate(e,u);return e.annotations.push(p),p}))}),r.onTestFailed=(i,s)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(F(i,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,l)=>n.abort(l)))},r.onTestFinished=(i,s)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(F(i,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,l)=>n.abort(l)))},((o=t.extendTaskContext)===null||o===void 0?void 0:o.call(t,r))||r}function Ge(e,t,o){const r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
4
|
+
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,n=new Error(r);return o?.stack&&(n.stack=o.stack.replace(n.message,o.message)),n}const Je=new WeakMap;function Qe(e){const t=Je.get(e);if(!t)throw new Error(`Cannot find file context for ${e.name}`);return t}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;se();const O=new Map,re=[],U=[];function Ze(e){if(O.size){var t;const o=Array.from(O).map(([n,i])=>[n,i[0],i[1]]),r=(t=e.onTaskUpdate)===null||t===void 0?void 0:t.call(e,o,re);r&&(U.push(r),r.then(()=>U.splice(U.indexOf(r),1),()=>{})),re.length=0,O.clear()}}async function Te(e){Ze(e),await Promise.all(U)}async function et(e,t){const o=P();if(e.result&&e.result.state!=="run")throw new Error(`Cannot record a test artifact outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const r=le(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(const i of t.attachments)we(i);if(t.type==="internal:annotation")return t;if(!o.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Te(o);const n=await o.onTestArtifactRecord(e,t);return e.artifacts.push(n),n}const E=[];for(let e=65;e<91;e++)E.push(String.fromCharCode(e));for(let e=97;e<123;e++)E.push(String.fromCharCode(e));for(let e=0;e<10;e++)E.push(e.toString(10));E.push("+","/");function tt(e){let t="";const o=e.byteLength;for(let r=0;r<o;r+=3)if(o===r+1){const n=(e[r]&252)>>2,i=(e[r]&3)<<4;t+=E[n],t+=E[i],t+="=="}else if(o===r+2){const n=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2;t+=E[n],t+=E[i],t+=E[s],t+="="}else{const n=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2|(e[r+2]&192)>>6,c=e[r+2]&63;t+=E[n],t+=E[i],t+=E[s],t+=E[c]}return t}function nt(e,t){return t=t.finally(()=>{if(!e.promises)return;const o=e.promises.indexOf(t);o!==-1&&e.promises.splice(o,1)}),e.promises||(e.promises=[]),e.promises.push(t),t}function we(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');e.body instanceof Uint8Array&&(e.body=tt(e.body))}export{Me as afterAll,We as afterEach,Pe as beforeAll,qe as beforeEach,Xe as createTaskCollector,R as getCurrentSuite,Ie as getHooks,et as recordArtifact,Se as setFn,xe as setHooks,$ as suite};
|
package/dist/node_modules/.pnpm/@vitest_snapshot@4.0.15/node_modules/@vitest/snapshot/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js","node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{__vitePreload as nt}from"../../../../../../../_virtual/preload-helper.js";import{format as st,plugins as rt}from"../../../../../@vitest_pretty-format@4.0.15/node_modules/@vitest/pretty-format/dist/index.js";import{r as H}from"../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js";var at=44,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=new Uint8Array(64),Z=new Uint8Array(128);for(let e=0;e<P.length;e++){const t=P.charCodeAt(e);it[e]=t,Z[t]=e}function w(e,t){let n=0,r=0,s=0;do{const i=e.next();s=Z[i],n|=(s&31)<<r,r+=5}while(s&32);const a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function K(e,t){return e.pos>=t?!1:e.peek()!==at}var ot=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function lt(e){const{length:t}=e,n=new ot(e),r=[];let s=0,a=0,i=0,l=0,o=0;do{const c=n.indexOf(";"),h=[];let d=!0,u=0;for(s=0;n.pos<c;){let f;s=w(n,s),s<u&&(d=!1),u=s,K(n,c)?(a=w(n,a),i=w(n,i),l=w(n,l),K(n,c)?(o=w(n,o),f=[s,a,i,l,o]):f=[s,a,i,l]):f=[s],h.push(f),n.pos++}d||ct(h),r.push(h),n.pos=c+1}while(n.pos<=t);return r}function ct(e){e.sort(ut)}function ut(e,t){return e[0]-t[0]}var M=0,ht=1,dt=2,ft=3,pt=4,$=!1;function mt(e,t,n,r){for(;n<=r;){const s=n+(r-n>>1),a=e[s][M]-t;if(a===0)return $=!0,s;a<0?n=s+1:r=s-1}return $=!1,n-1}function _t(e,t,n){for(let r=n+1;r<e.length&&e[r][M]===t;n=r++);return n}function St(e,t,n){for(let r=n-1;r>=0&&e[r][M]===t;n=r--);return n}function gt(e,t,n,r){const{lastKey:s,lastNeedle:a,lastIndex:i}=n;let l=0,o=e.length-1;if(r===s){if(t===a)return $=i!==-1&&e[i][M]===t,i;t>=a?l=i===-1?0:i:o=i}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=mt(e,t,l,o)}var vt="`line` must be greater than 0 (lines start at line 1)",wt="`column` must be greater than or equal to 0 (columns start at column 0)",U=-1,Et=1;function bt(e){var t;return(t=e)._decoded||(t._decoded=lt(e._encoded))}function yt(e,t){let{line:n,column:r,bias:s}=t;if(n--,n<0)throw new Error(vt);if(r<0)throw new Error(wt);const a=bt(e);if(n>=a.length)return O(null,null,null,null);const i=a[n],l=xt(i,e._decodedMemo,n,r,s||Et);if(l===-1)return O(null,null,null,null);const o=i[l];if(o.length===1)return O(null,null,null,null);const{names:c,resolvedSources:h}=e;return O(h[o[ht]],o[dt]+1,o[ft],o.length===5?c[o[pt]]:null)}function O(e,t,n,r){return{source:e,line:t,column:n,name:r}}function xt(e,t,n,r,s){let a=gt(e,r,t,n);return $?a=(s===U?_t:St)(e,r,a):s===U&&a++,a===-1||a===e.length?-1:a}function J(e){return e!=null}function Ot(e){return e===null||typeof e!="function"&&typeof e!="object"}function I(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function It(e){let t=-1,n=null,r=0,s=0,a=null;for(;t<=e.length;){a=e[t],t++;const i=e[t];if((i==='"'||i==="'"||i==="`")&&a!=="\\"&&(n===i?n=null:n||(n=i)),n||(i==="("&&r++,i===")"&&s++),r&&s&&r===s)return t}return null}const Q=/^\s*at .*(?:\S:\d+|\(native\))/m,$t=/^(?:eval@)?(?:\[native code\])?$/,Mt=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function Y(e){if(!e.includes(":"))return[e];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return[e];let r=n[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){const s=new URL(r);s.searchParams.delete("import"),s.searchParams.delete("browserv"),r=s.pathname+s.hash+s.search}if(r.startsWith("/@fs/")){const s=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(s?5:4)}return[r,n[2]||void 0,n[3]||void 0]}function Nt(e){let t=e.trim();if($t.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",s;for(let o=0;o<t.length;o++)if(t[o]==="@"){const c=t.slice(o+1);if(c.includes(":")&&c.length>=3){n=o,r=c,s=o>0?t.slice(0,o):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;const[a,i,l]=Y(r);return!a||!i||!l?null:{file:a,method:s||"",line:Number.parseInt(i),column:Number.parseInt(l)}}function Ct(e){let t=e.trim();if(!Q.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;const[s,a,i]=Y(r?r[1]:n);let l=r&&n||"",o=s&&["eval","<anonymous>"].includes(s)?void 0:s;return!o||!a||!i?null:(l.startsWith("async ")&&(l=l.slice(6)),o.startsWith("file://")&&(o=o.slice(7)),o=o.startsWith("node:")||o.startsWith("internal:")?o:H(o),l&&(l=l.replace(/__vite_ssr_import_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:l,file:o,line:Number.parseInt(a),column:Number.parseInt(i)})}function C(e,t={}){const{ignoreStackEntries:n=Mt}=t;return(Q.test(e)?kt(e):At(e)).map(s=>{var a;t.getUrlId&&(s.file=t.getUrlId(s.file));const i=(a=t.getSourceMap)===null||a===void 0?void 0:a.call(t,s.file);if(!i||typeof i!="object"||!i.version)return L(n,s.file)?null:s;const l=new Tt(i,s.file),o=jt(l,s);if(!o)return s;const{line:c,column:h,source:d,name:u}=o;let f=d||s.file;return f.match(/\/\w:\//)&&(f=f.slice(1)),L(n,f)?null:c!=null&&h!=null?{line:c,column:h,file:f,method:u||s.method}:s}).filter(s=>s!=null)}function L(e,t){return e.some(n=>t.match(n))}function At(e){return e.split(`
|
|
3
|
+
`).map(t=>Nt(t)).filter(J)}function kt(e){return e.split(`
|
|
4
|
+
`).map(t=>Ct(t)).filter(J)}function Ft(e,t={}){if(!e||Ot(e))return[];if("stacks"in e&&e.stacks)return e.stacks;const n=e.stack||"";let r=typeof n=="string"?C(n,t):[];if(!r.length){const s=e;s.fileName!=null&&s.lineNumber!=null&&s.columnNumber!=null&&(r=C(`${s.fileName}:${s.lineNumber}:${s.columnNumber}`,t)),s.sourceURL!=null&&s.line!=null&&s._column!=null&&(r=C(`${s.sourceURL}:${s.line}:${s.column}`,t))}return t.frameFilter&&(r=r.filter(s=>t.frameFilter(e,s)!==!1)),e.stacks=r,r}class Tt{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(t,n){this.map=t;const{mappings:r,names:s,sources:a}=t;this.version=t.version,this.names=s||[],this._encoded=r||"",this._decodedMemo=Rt(),this.url=n,this.resolvedSources=(a||[]).map(i=>H(i||"",n))}}function Rt(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function jt(e,t){const n=yt(e,t);return n.column==null?null:n}const T=/\r?\n/;function Dt(e,t,n){const r=e.split(T),s=/\r\n/.test(e)?2:1;let a=0;if(t>r.length)return e.length;for(let i=0;i<t-1;i++)a+=r[i].length+s;return a+n}function Pt(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(T),r=/\r\n/.test(e)?2:1;let s=0,a=0;for(;a<n.length;a++){const i=n[a].length+r;if(s+i>=t)break;s+=i}return a+1}async function Kt(e,t){const n=(await nt(async()=>{const{default:s}=await import("../../../../../magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js");return{default:s}},__vite__mapDeps([0,1]))).default,r=new Set(t.map(s=>s.file));await Promise.all(Array.from(r).map(async s=>{const a=t.filter(c=>c.file===s),i=await e.readSnapshotFile(s),l=new n(i);for(const c of a){const h=Dt(i,c.line,c.column);qt(i,l,h,c.snapshot)}const o=l.toString();o!==i&&await e.saveSnapshotFile(s,o)}))}const Ut=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Lt(e,t,n,r){let s=e.slice(n);const a=Ut.exec(s);if(!a)return!1;s=s.slice(a.index);let i=It(s);if(i===null)return!1;i+=n+a.index;const l=n+a.index+a[0].length,o=Bt(e,l),c=`, ${tt(r,e,n)}`;return o===i?t.appendLeft(i,c):t.overwrite(o,i,c),!0}function Bt(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){const s=e[t++];s==="{"?n++:s==="}"&&r++}return t}function tt(e,t,n){const r=Pt(t,n),a=t.split(T)[r-1].match(/^\s*/)[0]||"",i=a.includes(" ")?`${a} `:`${a} `,l=e.trim().replace(/\\/g,"\\\\").split(/\n/g),o=l.length<=1,c="`";return o?`${c}${l.join(`
|
|
5
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${c}`:`${c}
|
|
6
|
+
${l.map(h=>h?i+h:"").join(`
|
|
7
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
8
|
+
${a}${c}`}const B="toMatchInlineSnapshot",W="toThrowErrorMatchingInlineSnapshot";function Wt(e,t){const n=t-B.length;if(e.slice(n,t)===B)return{code:e.slice(n),index:n};const r=t-W.length;return e.slice(t-r,t)===W?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}const zt=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function qt(e,t,n,r){const{code:s,index:a}=Wt(e,n),i=zt.exec(s),l=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(s);if(!i||i.index!==l?.index)return Lt(e,t,a,r);const o=i[1],c=a+i.index+i[0].length,h=tt(r,e,a);if(o===")")return t.appendRight(c-1,h),!0;const u=new RegExp(`(?:^|[^\\\\])${o}`).exec(e.slice(c));if(!u)return!1;const f=c+u.index+u[0].length;return t.overwrite(c-1,f,h),!0}const Gt=/^([^\S\n]*)\S/m;function we(e){var t;const n=e.match(Gt);if(!n||!n[1])return e;const r=n[1],s=e.split(/\n/g);if(s.length<=2||s[0].trim()!==""||((t=s.at(-1))===null||t===void 0?void 0:t.trim())!=="")return e;for(let a=1;a<s.length-1;a++)if(s[a]!==""){if(s[a].indexOf(r)!==0)return e;s[a]=s[a].substring(r.length)}return s[s.length-1]="",e=s.join(`
|
|
9
|
+
`),e}async function Vt(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}function Xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A={exports:{}},z;function Ht(){if(z)return A.exports;z=1;var e=function(t,n){var r,s,a=1,i=0,l=0,o=String.alphabet;function c(h,d,u){if(u){for(r=d;u=c(h,r),u<76&&u>65;)++r;return+h.slice(d-1,r)}return u=o&&o.indexOf(h.charAt(d)),u>-1?u+76:(u=h.charCodeAt(d)||0,u<45||u>127?u:u<46?65:u<48?u-1:u<58?u+18:u<65?u-11:u<91?u+11:u<97?u-37:u<123?u+5:u-63)}if((t+="")!=(n+="")){for(;a;)if(s=c(t,i++),a=c(n,l++),s<76&&a<76&&s>66&&a>66&&(s=c(t,i,i),a=c(n,l,i=r),l=r),s!=a)return s<a?-1:1}return 0};try{A.exports=e}catch{String.naturalCompare=e}return A.exports}var Zt=Ht(),Jt=Xt(Zt);const Qt=(e,t,n,r,s,a)=>{const i=e.getMockName(),l=i==="vi.fn()"?"":` ${i}`;let o="";if(e.mock.calls.length!==0){const c=n+t.indent;o=` {${t.spacingOuter}${c}"calls": ${a(e.mock.calls,t,c,r,s)}${t.min?", ":","}${t.spacingOuter}${c}"results": ${a(e.mock.results,t,c,r,s)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${l}]${o}`},Yt=e=>e&&!!e._isMockFunction,te={serialize:Qt,test:Yt},{DOMCollection:ee,DOMElement:ne,Immutable:se,ReactElement:re,ReactTestComponent:ae,AsymmetricMatcher:ie}=rt;let k=[ae,re,ne,ee,se,ie,te];function Ee(e){k=[e].concat(k)}function oe(){return k}function le(e,t){return`${e} ${t}`}function ce(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function ue(e,t){const n=t.updateSnapshot,r=Object.create(null);let s="",a=!1;if(e!=null)try{s=e,new Function("exports",s)(r)}catch{}return(n==="all"||n==="new")&&s&&(a=!0),{data:r,dirty:a}}function he(e){return e.includes(`
|
|
10
|
+
`)?`
|
|
11
|
+
${e}
|
|
12
|
+
`:e}function q(e){return e.length>2&&e[0]===`
|
|
13
|
+
`&&e.endsWith(`
|
|
14
|
+
`)?e.slice(1,-1):e}const de=!0,fe=!1;function pe(e,t=2,n={}){return R(st(e,{escapeRegex:de,indent:t,plugins:oe(),printFunctionName:fe,...n}))}function me(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function G(e){return`\`${me(e)}\``}function R(e){return e.replace(/\r\n|\r/g,`
|
|
15
|
+
`)}async function _e(e,t,n){const r=Object.keys(t).sort(Jt).map(l=>`exports[${G(l)}] = ${G(R(t[l]))};`),s=`${e.getHeader()}
|
|
16
|
+
|
|
17
|
+
${r.join(`
|
|
18
|
+
|
|
19
|
+
`)}
|
|
20
|
+
`,a=await e.readSnapshotFile(n);a!=null&&a===s||await e.saveSnapshotFile(n,s)}function F(e=[],t=[]){const n=Array.from(e);return t.forEach((r,s)=>{const a=n[s];Array.isArray(e[s])?n[s]=F(e[s],r):I(a)?n[s]=j(e[s],r):n[s]=r}),n}function j(e,t){if(I(e)&&I(t)){const n={...e};return Object.keys(t).forEach(r=>{I(t[r])&&!t[r].$$typeof?r in e?n[r]=j(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=F(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return F(e,t);return e}class et extends Map{constructor(t,n){super(n),this.defaultFn=t}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}}class E extends et{constructor(){super(()=>0)}_total;valueOf(){return this._total=this.total()}increment(t){typeof this._total<"u"&&this._total++,this.set(t,this.get(t)+1)}total(){if(typeof this._total<"u")return this._total;let t=0;for(const n of this.values())t+=n;return t}}function V(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}class D{_counters=new E;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new et(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new E;_matched=new E;_unmatched=new E;_updated=new E;get added(){return this._added}set added(t){this._added._total=t}get matched(){return this._matched}set matched(t){this._matched._total=t}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t}get updated(){return this._updated}set updated(t){this._updated._total=t}constructor(t,n,r,s){this.testFilePath=t,this.snapshotPath=n;const{data:a,dirty:i}=ue(r,s);this._fileExists=r!=null,this._initialData={...a},this._snapshotData={...a},this._dirty=i,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=s.expand||!1,this._updateSnapshot=s.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...s.snapshotFormat},this._environment=s.snapshotEnvironment}static async create(t,n){const r=await n.snapshotEnvironment.resolvePath(t),s=await n.snapshotEnvironment.readSnapshotFile(r);return new D(t,r,s,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n)})}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(const n of this._testIdToKeys.get(t)){const r=ce(n),s=this._counters.get(r);s>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,s-1))}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t)}_inferInlineSnapshotStack(t){const n=t.findIndex(s=>s.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];const r=t.findIndex(s=>s.method.includes("__INLINE_SNAPSHOT__"));return r!==-1?t[r+2]:null}_addSnapshot(t,n,r){this._dirty=!0,r.stack?this._inlineSnapshots.push({snapshot:n,testId:r.testId,...r.stack}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n}async save(){const t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,s=!t&&!n&&!r,a={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!s?(t&&(await _e(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await Kt(this._environment,this._inlineSnapshots),r&&await Vt(this._environment,this._rawSnapshots),a.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),a.deleted=!0),a}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear())}match({testId:t,testName:n,received:r,key:s,inlineSnapshot:a,isInline:i,error:l,rawSnapshot:o}){this._counters.increment(n);const c=this._counters.get(n);s||(s=le(n,c)),this._testIdToKeys.get(t).push(s),i&&this._snapshotData[s]!==void 0||this._uncheckedKeys.delete(s);let h=o&&typeof r=="string"?r:pe(r,void 0,this._snapshotFormat);o||(h=he(h)),o&&o.content&&o.content.match(/\r\n/)&&!h.match(/\r\n/)&&(o.content=R(o.content));const d=i?a:o?o.content:this._snapshotData[s],u=o?d:d?.trim(),f=u===(o?h:h.trim()),_=d!==void 0,b=i||this._fileExists||o&&o.content!=null;f&&!i&&!o&&(this._snapshotData[s]=h);let p;if(i){var m,S;const y=Ft(l||new Error("snapshot"),{ignoreStackEntries:[]}),v=this._inferInlineSnapshotStack(y);if(!v)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
21
|
+
${JSON.stringify(y)}`);p=((m=(S=this.environment).processStackTrace)===null||m===void 0?void 0:m.call(S,v))||v,p.column--;const g=this._inlineSnapshotStacks.filter(x=>V(x,p));if(g.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(N=>!V(N,p));const x=g.find(N=>N.snapshot!==h);if(x)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:h,expected:x.snapshot})}this._inlineSnapshotStacks.push({...p,testId:t,snapshot:h})}return _&&this._updateSnapshot==="all"||(!_||!b)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?f?this.matched.increment(t):(_?this.updated.increment(t):this.added.increment(t),this._addSnapshot(s,h,{stack:p,testId:t,rawSnapshot:o})):(this._addSnapshot(s,h,{stack:p,testId:t,rawSnapshot:o}),this.added.increment(t)),{actual:"",count:c,expected:"",key:s,pass:!0}):f?(this.matched.increment(t),{actual:"",count:c,expected:"",key:s,pass:!0}):(this.unmatched.increment(t),{actual:o?h:q(h),count:c,expected:u!==void 0?o?u:q(u):void 0,key:s,pass:!1})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();const s=await this.save();return t.fileDeleted=s.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=s.deleted?0:n,t.uncheckedKeys=Array.from(r),t}}function X(e,t,n,r){const s=new Error(e);return Object.defineProperty(s,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,"diffOptions",{value:{expand:t}}),s}class be{snapshotStateMap=new Map;constructor(t={}){this.options=t}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await D.create(t,n))}async finish(t){const r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n)}clearTest(t,n){this.getSnapshotState(t).clearTest(n)}getSnapshotState(t){const n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}assert(t){const{filepath:n,name:r,testId:s=r,message:a,isInline:i=!1,properties:l,inlineSnapshot:o,error:c,errorMessage:h,rawSnapshot:d}=t;let{received:u}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");const f=this.getSnapshotState(n);if(typeof l=="object"){if(typeof u!="object"||!u)throw new Error("Received value must be an object when the matcher has properties");try{var _,b;if(((_=(b=this.options).isEqual)===null||_===void 0?void 0:_.call(b,u,l))??!1)u=j(u,l);else throw X("Snapshot properties mismatched",f.expand,u,l)}catch(g){throw g.message=h||"Snapshot mismatched",g}}const p=[r,...a?[a]:[]].join(" > "),{actual:m,expected:S,key:y,pass:v}=f.match({testId:s,testName:p,received:u,isInline:i,error:c,inlineSnapshot:o,rawSnapshot:d});if(!v)throw X(`Snapshot \`${y||"unknown"}\` mismatched`,f.expand,d?m:m?.trim(),d?S:S?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const s=this.getSnapshotState(n);t.filepath||(t.filepath=n),r.file=await s.environment.resolveRawPath(n,r.file),r.content=await s.environment.readSnapshotFile(r.file)??void 0}return this.assert(t)}clear(){this.snapshotStateMap.clear()}}export{be as SnapshotClient,D as SnapshotState,Ee as addSerializer,oe as getSerializers,we as stripSnapshotIndentation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(n){return typeof n=="function"&&"_isMockFunction"in n&&n._isMockFunction===!0}export{o as isMockFunction};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=/^[A-Za-z]:\//;function h(t=""){return t&&t.replace(/\\/g,"/").replace(a,n=>n.toUpperCase())}const u=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function g(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const p=function(...t){t=t.map(l=>h(l));let n="",e=!1;for(let l=t.length-1;l>=-1&&!e;l--){const s=l>=0?t[l]:g();!s||s.length===0||(n=`${s}/${n}`,e=c(s))}return n=d(n,!e),e&&!c(n)?`/${n}`:n.length>0?n:"."};function d(t,n){let e="",l=0,s=-1,o=0,r=null;for(let i=0;i<=t.length;++i){if(i<t.length)r=t[i];else{if(r==="/")break;r="/"}if(r==="/"){if(!(s===i-1||o===1))if(o===2){if(e.length<2||l!==2||e[e.length-1]!=="."||e[e.length-2]!=="."){if(e.length>2){const f=e.lastIndexOf("/");f===-1?(e="",l=0):(e=e.slice(0,f),l=e.length-1-e.lastIndexOf("/")),s=i,o=0;continue}else if(e.length>0){e="",l=0,s=i,o=0;continue}}n&&(e+=e.length>0?"/..":"..",l=2)}else e.length>0?e+=`/${t.slice(s+1,i)}`:e=t.slice(s+1,i),l=i-s-1;s=i,o=0}else r==="."&&o!==-1?++o:o=-1}return e}const c=function(t){return u.test(t)};export{p as r};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{format as V,plugins as jn}from"../../../../../@vitest_pretty-format@4.0.15/node_modules/@vitest/pretty-format/dist/index.js";import J from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";import{stringify as Bn}from"./display.js";import{deepClone as pn,getOwnProperties as Vn,getType as cn}from"./helpers.js";import{g as Yn}from"./chunk-_commonjsHelpers.js";const j=-1,O=1,M=0;class A{0;1;constructor(t,e){this[0]=t,this[1]=e}}function Qn(n,t){if(!n||!t||n.charAt(0)!==t.charAt(0))return 0;let e=0,r=Math.min(n.length,t.length),o=r,l=0;for(;e<o;)n.substring(l,o)===t.substring(l,o)?(e=o,l=e):r=o,o=Math.floor((r-e)/2+e);return o}function Rn(n,t){if(!n||!t||n.charAt(n.length-1)!==t.charAt(t.length-1))return 0;let e=0,r=Math.min(n.length,t.length),o=r,l=0;for(;e<o;)n.substring(n.length-o,n.length-l)===t.substring(t.length-o,t.length-l)?(e=o,l=e):r=o,o=Math.floor((r-e)/2+e);return o}function wn(n,t){const e=n.length,r=t.length;if(e===0||r===0)return 0;e>r?n=n.substring(e-r):e<r&&(t=t.substring(0,e));const o=Math.min(e,r);if(n===t)return o;let l=0,i=1;for(;;){const p=n.substring(o-i),u=t.indexOf(p);if(u===-1)return l;i+=u,(u===0||n.substring(o-i)===t.substring(0,i))&&(l=i,i++)}}function Zn(n){let t=!1;const e=[];let r=0,o=null,l=0,i=0,p=0,u=0,F=0;for(;l<n.length;)n[l][0]===M?(e[r++]=l,i=u,p=F,u=0,F=0,o=n[l][1]):(n[l][0]===O?u+=n[l][1].length:F+=n[l][1].length,o&&o.length<=Math.max(i,p)&&o.length<=Math.max(u,F)&&(n.splice(e[r-1],0,new A(j,o)),n[e[r-1]+1][0]=O,r--,r--,l=r>0?e[r-1]:-1,i=0,p=0,u=0,F=0,o=null,t=!0)),l++;for(t&&kn(n),ne(n),l=1;l<n.length;){if(n[l-1][0]===j&&n[l][0]===O){const $=n[l-1][1],b=n[l][1],D=wn($,b),c=wn(b,$);D>=c?(D>=$.length/2||D>=b.length/2)&&(n.splice(l,0,new A(M,b.substring(0,D))),n[l-1][1]=$.substring(0,$.length-D),n[l+1][1]=b.substring(D),l++):(c>=$.length/2||c>=b.length/2)&&(n.splice(l,0,new A(M,$.substring(0,c))),n[l-1][0]=O,n[l-1][1]=b.substring(0,b.length-c),n[l+1][0]=j,n[l+1][1]=$.substring(c),l++),l++}l++}}const Cn=/[^a-z0-9]/i,bn=/\s/,$n=/[\r\n]/,xn=/\n\r?\n$/,dn=/^\r?\n\r?\n/;function ne(n){let t=1;for(;t<n.length-1;){if(n[t-1][0]===M&&n[t+1][0]===M){let e=n[t-1][1],r=n[t][1],o=n[t+1][1];const l=Rn(e,r);if(l){const $=r.substring(r.length-l);e=e.substring(0,e.length-l),r=$+r.substring(0,r.length-l),o=$+o}let i=e,p=r,u=o,F=nn(e,r)+nn(r,o);for(;r.charAt(0)===o.charAt(0);){e+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);const $=nn(e,r)+nn(r,o);$>=F&&(F=$,i=e,p=r,u=o)}n[t-1][1]!==i&&(i?n[t-1][1]=i:(n.splice(t-1,1),t--),n[t][1]=p,u?n[t+1][1]=u:(n.splice(t+1,1),t--))}t++}}function kn(n){var t;n.push(new A(M,""));let e=0,r=0,o=0,l="",i="",p;for(;e<n.length;)switch(n[e][0]){case O:o++,i+=n[e][1],e++;break;case j:r++,l+=n[e][1],e++;break;case M:r+o>1?(r!==0&&o!==0&&(p=Qn(i,l),p!==0&&(e-r-o>0&&n[e-r-o-1][0]===M?n[e-r-o-1][1]+=i.substring(0,p):(n.splice(0,0,new A(M,i.substring(0,p))),e++),i=i.substring(p),l=l.substring(p)),p=Rn(i,l),p!==0&&(n[e][1]=i.substring(i.length-p)+n[e][1],i=i.substring(0,i.length-p),l=l.substring(0,l.length-p))),e-=r+o,n.splice(e,r+o),l.length&&(n.splice(e,0,new A(j,l)),e++),i.length&&(n.splice(e,0,new A(O,i)),e++),e++):e!==0&&n[e-1][0]===M?(n[e-1][1]+=n[e][1],n.splice(e,1)):e++,o=0,r=0,l="",i="";break}((t=n.at(-1))===null||t===void 0?void 0:t[1])===""&&n.pop();let u=!1;for(e=1;e<n.length-1;)n[e-1][0]===M&&n[e+1][0]===M&&(n[e][1].substring(n[e][1].length-n[e-1][1].length)===n[e-1][1]?(n[e][1]=n[e-1][1]+n[e][1].substring(0,n[e][1].length-n[e-1][1].length),n[e+1][1]=n[e-1][1]+n[e+1][1],n.splice(e-1,1),u=!0):n[e][1].substring(0,n[e+1][1].length)===n[e+1][1]&&(n[e-1][1]+=n[e+1][1],n[e][1]=n[e][1].substring(n[e+1][1].length)+n[e+1][1],n.splice(e+1,1),u=!0)),e++;u&&kn(n)}function nn(n,t){if(!n||!t)return 6;const e=n.charAt(n.length-1),r=t.charAt(0),o=e.match(Cn),l=r.match(Cn),i=o&&e.match(bn),p=l&&r.match(bn),u=i&&e.match($n),F=p&&r.match($n),$=u&&n.match(xn),b=F&&t.match(dn);return $||b?5:u||F?4:o&&!i&&p?3:i||p?2:o||l?1:0}const Nn="Compared values have no visual difference.",ee="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";var en={},yn;function te(){if(yn)return en;yn=1,Object.defineProperty(en,"__esModule",{value:!0}),en.default=D;const n="diff-sequences",t=0,e=(c,s,h,a,f)=>{let w=0;for(;c<s&&h<a&&f(c,h);)c+=1,h+=1,w+=1;return w},r=(c,s,h,a,f)=>{let w=0;for(;c<=s&&h<=a&&f(s,a);)s-=1,a-=1,w+=1;return w},o=(c,s,h,a,f,w,L)=>{let g=0,C=-c,y=w[g],m=y;w[g]+=e(y+1,s,a+y-C+1,h,f);const P=c<L?c:L;for(g+=1,C+=2;g<=P;g+=1,C+=2){if(g!==c&&m<w[g])y=w[g];else if(y=m+1,s<=y)return g-1;m=w[g],w[g]=y+e(y+1,s,a+y-C+1,h,f)}return L},l=(c,s,h,a,f,w,L)=>{let g=0,C=c,y=w[g],m=y;w[g]-=r(s,y-1,h,a+y-C-1,f);const P=c<L?c:L;for(g+=1,C-=2;g<=P;g+=1,C-=2){if(g!==c&&w[g]<m)y=w[g];else if(y=m-1,y<s)return g-1;m=w[g],w[g]=y-r(s,y-1,h,a+y-C-1,f)}return L},i=(c,s,h,a,f,w,L,g,C,y,m)=>{const P=a-s,z=h-s,E=f-a-z,R=-E-(c-1),H=-E+(c-1);let k=t;const _=c<g?c:g;for(let T=0,S=-c;T<=_;T+=1,S+=2){const W=T===0||T!==c&&k<L[T],B=W?L[T]:k,q=W?B:B+1,X=P+q-S,U=e(q+1,h,X+1,f,w),G=q+U;if(k=L[T],L[T]=G,R<=S&&S<=H){const Y=(c-1-(S+E))/2;if(Y<=y&&C[Y]-1<=G){const I=P+B-(W?S+1:S-1),N=r(s,B,a,I,w),v=B-N,d=I-N,Z=v+1,rn=d+1;m.nChangePreceding=c-1,c-1===Z+rn-s-a?(m.aEndPreceding=s,m.bEndPreceding=a):(m.aEndPreceding=Z,m.bEndPreceding=rn),m.nCommonPreceding=N,N!==0&&(m.aCommonPreceding=Z,m.bCommonPreceding=rn),m.nCommonFollowing=U,U!==0&&(m.aCommonFollowing=q+1,m.bCommonFollowing=X+1);const fn=G+1,mn=X+U+1;return m.nChangeFollowing=c-1,c-1===h+f-fn-mn?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=fn,m.bStartFollowing=mn),!0}}}return!1},p=(c,s,h,a,f,w,L,g,C,y,m)=>{const P=f-h,z=h-s,E=f-a-z,R=E-c,H=E+c;let k=t;const _=c<y?c:y;for(let T=0,S=c;T<=_;T+=1,S-=2){const W=T===0||T!==c&&C[T]<k,B=W?C[T]:k,q=W?B:B-1,X=P+q-S,U=r(s,q-1,a,X-1,w),G=q-U;if(k=C[T],C[T]=G,R<=S&&S<=H){const Y=(c+(S-E))/2;if(Y<=g&&G-1<=L[Y]){const I=X-U;if(m.nChangePreceding=c,c===G+I-s-a?(m.aEndPreceding=s,m.bEndPreceding=a):(m.aEndPreceding=G,m.bEndPreceding=I),m.nCommonPreceding=U,U!==0&&(m.aCommonPreceding=G,m.bCommonPreceding=I),m.nChangeFollowing=c-1,c===1)m.nCommonFollowing=0,m.aStartFollowing=h,m.bStartFollowing=f;else{const N=P+B-(W?S-1:S+1),v=e(B,h,N,f,w);m.nCommonFollowing=v,v!==0&&(m.aCommonFollowing=B,m.bCommonFollowing=N);const d=B+v,Z=N+v;c-1===h+f-d-Z?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=d,m.bStartFollowing=Z)}return!0}}}return!1},u=(c,s,h,a,f,w,L,g,C)=>{const y=a-s,m=f-h,P=h-s,z=f-a,K=z-P;let E=P,R=P;if(L[0]=s-1,g[0]=h,K%2===0){const H=(c||K)/2,k=(P+z)/2;for(let _=1;_<=k;_+=1)if(E=o(_,h,f,y,w,L,E),_<H)R=l(_,s,a,m,w,g,R);else if(p(_,s,h,a,f,w,L,E,g,R,C))return}else{const H=((c||K)+1)/2,k=(P+z+1)/2;let _=1;for(E=o(_,h,f,y,w,L,E),_+=1;_<=k;_+=1)if(R=l(_-1,s,a,m,w,g,R),_<H)E=o(_,h,f,y,w,L,E);else if(i(_,s,h,a,f,w,L,E,g,R,C))return}throw new Error(`${n}: no overlap aStart=${s} aEnd=${h} bStart=${a} bEnd=${f}`)},F=(c,s,h,a,f,w,L,g,C,y)=>{if(f-a<h-s){if(w=!w,w&&L.length===1){const{foundSubsequence:G,isCommon:Y}=L[0];L[1]={foundSubsequence:(I,N,v)=>{G(I,v,N)},isCommon:(I,N)=>Y(N,I)}}const X=s,U=h;s=a,h=f,a=X,f=U}const{foundSubsequence:m,isCommon:P}=L[w?1:0];u(c,s,h,a,f,P,g,C,y);const{nChangePreceding:z,aEndPreceding:K,bEndPreceding:E,nCommonPreceding:R,aCommonPreceding:H,bCommonPreceding:k,nCommonFollowing:_,aCommonFollowing:T,bCommonFollowing:S,nChangeFollowing:W,aStartFollowing:B,bStartFollowing:q}=y;s<K&&a<E&&F(z,s,K,a,E,w,L,g,C,y),R!==0&&m(R,H,k),_!==0&&m(_,T,S),B<h&&q<f&&F(W,B,h,q,f,w,L,g,C,y)},$=(c,s)=>{if(typeof s!="number")throw new TypeError(`${n}: ${c} typeof ${typeof s} is not a number`);if(!Number.isSafeInteger(s))throw new RangeError(`${n}: ${c} value ${s} is not a safe integer`);if(s<0)throw new RangeError(`${n}: ${c} value ${s} is a negative integer`)},b=(c,s)=>{const h=typeof s;if(h!=="function")throw new TypeError(`${n}: ${c} typeof ${h} is not a function`)};function D(c,s,h,a){$("aLength",c),$("bLength",s),b("isCommon",h),b("foundSubsequence",a);const f=e(0,c,0,s,h);if(f!==0&&a(f,0,0),c!==f||s!==f){const w=f,L=f,g=r(w,c-1,L,s-1,h),C=c-g,y=s-g,m=f+g;c!==m&&s!==m&&F(0,w,C,L,y,!1,[{foundSubsequence:a,isCommon:h}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),g!==0&&a(g,C,y)}}return en}var re=te(),qn=Yn(re);function oe(n,t){return n.replace(/\s+$/,e=>t(e))}function gn(n,t,e,r,o,l){return n.length!==0?e(`${r} ${oe(n,o)}`):r!==" "?e(r):t&&l.length!==0?e(`${r} ${l}`):""}function Un(n,t,{aColor:e,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return gn(n,t,e,r,o,l)}function Gn(n,t,{bColor:e,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return gn(n,t,e,r,o,l)}function zn(n,t,{commonColor:e,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return gn(n,t,e,r,o,l)}function Fn(n,t,e,r,{patchColor:o}){return o(`@@ -${n+1},${t-n} +${e+1},${r-e} @@`)}function le(n,t){const e=n.length,r=t.contextLines,o=r+r;let l=e,i=!1,p=0,u=0;for(;u!==e;){const g=u;for(;u!==e&&n[u][0]===M;)u+=1;if(g!==u)if(g===0)u>r&&(l-=u-r,i=!0);else if(u===e){const C=u-g;C>r&&(l-=C-r,i=!0)}else{const C=u-g;C>o&&(l-=C-o,p+=1)}for(;u!==e&&n[u][0]!==M;)u+=1}const F=p!==0||i;p!==0?l+=p+1:i&&(l+=1);const $=l-1,b=[];let D=0;F&&b.push("");let c=0,s=0,h=0,a=0;const f=g=>{const C=b.length;b.push(zn(g,C===0||C===$,t)),h+=1,a+=1},w=g=>{const C=b.length;b.push(Un(g,C===0||C===$,t)),h+=1},L=g=>{const C=b.length;b.push(Gn(g,C===0||C===$,t)),a+=1};for(u=0;u!==e;){let g=u;for(;u!==e&&n[u][0]===M;)u+=1;if(g!==u)if(g===0){u>r&&(g=u-r,c=g,s=g,h=c,a=s);for(let C=g;C!==u;C+=1)f(n[C][1])}else if(u===e){const C=u-g>r?g+r:u;for(let y=g;y!==C;y+=1)f(n[y][1])}else{const C=u-g;if(C>o){const y=g+r;for(let P=g;P!==y;P+=1)f(n[P][1]);b[D]=Fn(c,h,s,a,t),D=b.length,b.push("");const m=C-o;c=h+m,s=a+m,h=c,a=s;for(let P=u-r;P!==u;P+=1)f(n[P][1])}else for(let y=g;y!==u;y+=1)f(n[y][1])}for(;u!==e&&n[u][0]===j;)w(n[u][1]),u+=1;for(;u!==e&&n[u][0]===O;)L(n[u][1]),u+=1}return F&&(b[D]=Fn(c,h,s,a,t)),b.join(`
|
|
2
|
+
`)}function ce(n,t){return n.map((e,r,o)=>{const l=e[1],i=r===0||r===o.length-1;switch(e[0]){case j:return Un(l,i,t);case O:return Gn(l,i,t);default:return zn(l,i,t)}}).join(`
|
|
3
|
+
`)}const on=n=>n,Hn=5,ie=0;function se(){return{aAnnotation:"Expected",aColor:J.green,aIndicator:"-",bAnnotation:"Received",bColor:J.red,bIndicator:"+",changeColor:J.inverse,changeLineTrailingSpaceColor:on,commonColor:J.dim,commonIndicator:" ",commonLineTrailingSpaceColor:on,compareKeys:void 0,contextLines:Hn,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:J.yellow,printBasicPrototype:!1,truncateThreshold:ie,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:on}}function ue(n){return n&&typeof n=="function"?n:void 0}function he(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>=0?n:Hn}function Q(n={}){return{...se(),...n,compareKeys:ue(n.compareKeys),contextLines:he(n.contextLines)}}function x(n){return n.length===1&&n[0].length===0}function ge(n){let t=0,e=0;return n.forEach(r=>{switch(r[0]){case j:t+=1;break;case O:e+=1;break}}),{a:t,b:e}}function ae({aAnnotation:n,aColor:t,aIndicator:e,bAnnotation:r,bColor:o,bIndicator:l,includeChangeCounts:i,omitAnnotationLines:p},u){if(p)return"";let F="",$="";if(i){const c=String(u.a),s=String(u.b),h=r.length-n.length,a=" ".repeat(Math.max(0,h)),f=" ".repeat(Math.max(0,-h)),w=s.length-c.length,L=" ".repeat(Math.max(0,w)),g=" ".repeat(Math.max(0,-w));F=`${a} ${e} ${L}${c}`,$=`${f} ${l} ${g}${s}`}const b=`${e} ${n}${F}`,D=`${l} ${r}${$}`;return`${t(b)}
|
|
4
|
+
${o(D)}
|
|
5
|
+
|
|
6
|
+
`}function an(n,t,e){return ae(e,ge(n))+(e.expand?ce(n,e):le(n,e))+(t?e.truncateAnnotationColor(`
|
|
7
|
+
${e.truncateAnnotation}`):"")}function tn(n,t,e){const r=Q(e),[o,l]=In(x(n)?[]:n,x(t)?[]:t,r);return an(o,l,r)}function fe(n,t,e,r,o){if(x(n)&&x(e)&&(n=[],e=[]),x(t)&&x(r)&&(t=[],r=[]),n.length!==e.length||t.length!==r.length)return tn(n,t,o);const[l,i]=In(e,r,o);let p=0,u=0;return l.forEach(F=>{switch(F[0]){case j:F[1]=n[p],p+=1;break;case O:F[1]=t[u],u+=1;break;default:F[1]=t[u],p+=1,u+=1}}),an(l,i,Q(o))}function In(n,t,e){const r=e?.truncateThreshold??!1,o=Math.max(Math.floor(e?.truncateThreshold??0),0),l=r?Math.min(n.length,o):n.length,i=r?Math.min(t.length,o):t.length,p=l!==n.length||i!==t.length,u=(c,s)=>n[c]===t[s],F=[];let $=0,b=0;for(qn(l,i,u,(c,s,h)=>{for(;$!==s;$+=1)F.push(new A(j,n[$]));for(;b!==h;b+=1)F.push(new A(O,t[b]));for(;c!==0;c-=1,$+=1,b+=1)F.push(new A(M,t[b]))});$!==l;$+=1)F.push(new A(j,n[$]));for(;b!==i;b+=1)F.push(new A(O,t[b]));return[F,p]}function Ln(n){if(n===void 0)return"undefined";if(n===null)return"null";if(Array.isArray(n))return"array";if(typeof n=="boolean")return"boolean";if(typeof n=="function")return"function";if(typeof n=="number")return"number";if(typeof n=="string")return"string";if(typeof n=="bigint")return"bigint";if(typeof n=="object"){if(n!=null){if(n.constructor===RegExp)return"regexp";if(n.constructor===Map)return"map";if(n.constructor===Set)return"set";if(n.constructor===Date)return"date"}return"object"}else if(typeof n=="symbol")return"symbol";throw new Error(`value of unknown type: ${n}`)}function Pn(n){return n.includes(`\r
|
|
8
|
+
`)?`\r
|
|
9
|
+
`:`
|
|
10
|
+
`}function me(n,t,e){const r=e?.truncateThreshold??!1,o=Math.max(Math.floor(e?.truncateThreshold??0),0);let l=n.length,i=t.length;if(r){const c=n.includes(`
|
|
11
|
+
`),s=t.includes(`
|
|
12
|
+
`),h=Pn(n),a=Pn(t),f=c?`${n.split(h,o).join(h)}
|
|
13
|
+
`:n,w=s?`${t.split(a,o).join(a)}
|
|
14
|
+
`:t;l=f.length,i=w.length}const p=l!==n.length||i!==t.length,u=(c,s)=>n[c]===t[s];let F=0,$=0;const b=[];return qn(l,i,u,(c,s,h)=>{F!==s&&b.push(new A(j,n.slice(F,s))),$!==h&&b.push(new A(O,t.slice($,h))),F=s+c,$=h+c,b.push(new A(M,t.slice(h,$)))}),F!==l&&b.push(new A(j,n.slice(F))),$!==i&&b.push(new A(O,t.slice($))),[b,p]}function pe(n,t,e){return t.reduce((r,o)=>r+(o[0]===M?o[1]:o[0]===n&&o[1].length!==0?e(o[1]):""),"")}class An{op;line;lines;changeColor;constructor(t,e){this.op=t,this.line=[],this.lines=[],this.changeColor=e}pushSubstring(t){this.pushDiff(new A(this.op,t))}pushLine(){this.lines.push(this.line.length!==1?new A(this.op,pe(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new A(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t)}align(t){const e=t[1];if(e.includes(`
|
|
15
|
+
`)){const r=e.split(`
|
|
16
|
+
`),o=r.length-1;r.forEach((l,i)=>{i<o?(this.pushSubstring(l),this.pushLine()):l.length!==0&&this.pushSubstring(l)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}}class we{deleteBuffer;insertBuffer;lines;constructor(t,e){this.deleteBuffer=t,this.insertBuffer=e,this.lines=[]}pushDiffCommonLine(t){this.lines.push(t)}pushDiffChangeLines(t){const e=t[1].length===0;(!e||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!e||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(t){const e=t[0],r=t[1];if(r.includes(`
|
|
17
|
+
`)){const o=r.split(`
|
|
18
|
+
`),l=o.length-1;o.forEach((i,p)=>{if(p===0){const u=new A(e,i);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(u)):(this.pushDiffChangeLines(u),this.flushChangeLines())}else p<l?this.pushDiffCommonLine(new A(e,i)):i.length!==0&&this.pushDiffChangeLines(new A(e,i))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}}function Ce(n,t){const e=new An(j,t),r=new An(O,t),o=new we(e,r);return n.forEach(l=>{switch(l[0]){case j:e.align(l);break;case O:r.align(l);break;default:o.align(l)}}),o.getLines()}function be(n,t){if(t){const e=n.length-1;return n.some((r,o)=>r[0]===M&&(o!==e||r[1]!==`
|
|
19
|
+
`))}return n.some(e=>e[0]===M)}function $e(n,t,e){if(n!==t&&n.length!==0&&t.length!==0){const r=n.includes(`
|
|
20
|
+
`)||t.includes(`
|
|
21
|
+
`),[o,l]=Kn(r?`${n}
|
|
22
|
+
`:n,r?`${t}
|
|
23
|
+
`:t,!0,e);if(be(o,r)){const i=Q(e),p=Ce(o,i.changeColor);return an(p,l,i)}}return tn(n.split(`
|
|
24
|
+
`),t.split(`
|
|
25
|
+
`),e)}function Kn(n,t,e,r){const[o,l]=me(n,t,r);return Zn(o),[o,l]}function sn(n,t){const{commonColor:e}=Q(t);return e(n)}const{AsymmetricMatcher:ye,DOMCollection:Fe,DOMElement:Le,Immutable:Pe,ReactElement:Ae,ReactTestComponent:De}=jn,Wn=[De,Ae,Le,Fe,Pe,ye,jn.Error],un={maxDepth:20,plugins:Wn},Xn={callToJSON:!1,maxDepth:8,plugins:Wn};function _e(n,t,e){if(Object.is(n,t))return"";const r=Ln(n);let o=r,l=!1;if(r==="object"&&typeof n.asymmetricMatch=="function"){if(n.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof n.getExpectedType!="function")return;o=n.getExpectedType(),l=o==="string"}if(o!==Ln(t)){let a=function(L){return L.length<=h?L:`${L.slice(0,h)}...`};const{aAnnotation:i,aColor:p,aIndicator:u,bAnnotation:F,bColor:$,bIndicator:b}=Q(e),D=hn(Xn,e);let c=V(n,D),s=V(t,D);const h=1e5;c=a(c),s=a(s);const f=`${p(`${u} ${i}:`)}
|
|
26
|
+
${c}`,w=`${$(`${b} ${F}:`)}
|
|
27
|
+
${s}`;return`${f}
|
|
28
|
+
|
|
29
|
+
${w}`}if(!l)switch(r){case"string":return tn(n.split(`
|
|
30
|
+
`),t.split(`
|
|
31
|
+
`),e);case"boolean":case"number":return Me(n,t,e);case"map":return ln(Dn(n),Dn(t),e);case"set":return ln(_n(n),_n(t),e);default:return ln(n,t,e)}}function Me(n,t,e){const r=V(n,un),o=V(t,un);return r===o?"":tn(r.split(`
|
|
32
|
+
`),o.split(`
|
|
33
|
+
`),e)}function Dn(n){return new Map(Array.from(n.entries()).sort())}function _n(n){return new Set(Array.from(n.values()).sort())}function ln(n,t,e){let r,o=!1;try{const i=hn(un,e);r=Mn(n,t,i,e)}catch{o=!0}const l=sn(Nn,e);if(r===void 0||r===l){const i=hn(Xn,e);r=Mn(n,t,i,e),r!==l&&!o&&(r=`${sn(ee,e)}
|
|
34
|
+
|
|
35
|
+
${r}`)}return r}function hn(n,t){const{compareKeys:e,printBasicPrototype:r,maxDepth:o}=Q(t);return{...n,compareKeys:e,printBasicPrototype:r,maxDepth:o??n.maxDepth}}function Mn(n,t,e,r){const o={...e,indent:0},l=V(n,o),i=V(t,o);if(l===i)return sn(Nn,r);{const p=V(n,e),u=V(t,e);return fe(p.split(`
|
|
36
|
+
`),u.split(`
|
|
37
|
+
`),l.split(`
|
|
38
|
+
`),i.split(`
|
|
39
|
+
`),r)}}const En=2e4;function Tn(n){return cn(n)==="Object"&&typeof n.asymmetricMatch=="function"}function Sn(n,t){const e=cn(n),r=cn(t);return e===r&&(e==="Object"||e==="Array")}function qe(n,t,e){const{aAnnotation:r,bAnnotation:o}=Q(e);if(typeof t=="string"&&typeof n=="string"&&t.length>0&&n.length>0&&t.length<=En&&n.length<=En&&t!==n){if(t.includes(`
|
|
40
|
+
`)||n.includes(`
|
|
41
|
+
`))return $e(t,n,e);const[$]=Kn(t,n),b=$.some(h=>h[0]===M),D=Ee(r,o),c=D(r)+Oe(On($,j,b)),s=D(o)+Se(On($,O,b));return`${c}
|
|
42
|
+
${s}`}const l=pn(t,{forceWritable:!0}),i=pn(n,{forceWritable:!0}),{replacedExpected:p,replacedActual:u}=vn(i,l);return _e(p,u,e)}function vn(n,t,e=new WeakSet,r=new WeakSet){return n instanceof Error&&t instanceof Error&&typeof n.cause<"u"&&typeof t.cause>"u"?(delete n.cause,{replacedActual:n,replacedExpected:t}):Sn(n,t)?e.has(n)||r.has(t)?{replacedActual:n,replacedExpected:t}:(e.add(n),r.add(t),Vn(t).forEach(o=>{const l=t[o],i=n[o];if(Tn(l))l.asymmetricMatch(i)&&(n[o]=l);else if(Tn(i))i.asymmetricMatch(l)&&(t[o]=i);else if(Sn(i,l)){const p=vn(i,l,e,r);n[o]=p.replacedActual,t[o]=p.replacedExpected}}),{replacedActual:n,replacedExpected:t}):{replacedActual:n,replacedExpected:t}}function Ee(...n){const t=n.reduce((e,r)=>r.length>e?r.length:e,0);return e=>`${e}: ${" ".repeat(t-e.length)}`}const Te="·";function Jn(n){return n.replace(/\s+$/gm,t=>Te.repeat(t.length))}function Se(n){return J.red(Jn(Bn(n)))}function Oe(n){return J.green(Jn(Bn(n)))}function On(n,t,e){return n.reduce((r,o)=>r+(o[0]===M?o[1]:o[0]===t?e?J.inverse(o[1]):o[1]:""),"")}export{j as DIFF_DELETE,M as DIFF_EQUAL,O as DIFF_INSERT,A as Diff,_e as diff,In as diffLinesRaw,tn as diffLinesUnified,fe as diffLinesUnified2,Kn as diffStringsRaw,$e as diffStringsUnified,Ee as getLabelPrinter,qe as printDiffOrStringify,vn as replaceAsymmetricMatcher};
|
package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/display.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{format as w,plugins as W}from"../../../../../@vitest_pretty-format@4.0.15/node_modules/@vitest/pretty-format/dist/index.js";const T={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},D={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},b="…";function G(t,e){const n=T[D[e]]||T[e]||"";return n?`\x1B[${n[0]}m${String(t)}\x1B[${n[1]}m`:String(t)}function J({showHidden:t=!1,depth:e=2,colors:n=!1,customInspect:u=!0,showProxy:c=!1,maxArrayLength:i=1/0,breakLength:r=1/0,seen:s=[],truncate:a=1/0,stylize:l=String}={},f){const y={showHidden:!!t,depth:Number(e),colors:!!n,customInspect:!!u,showProxy:!!c,maxArrayLength:Number(i),breakLength:Number(r),truncate:Number(a),seen:s,inspect:f,stylize:l};return y.colors&&(y.stylize=G),y}function k(t){return t>="\uD800"&&t<="\uDBFF"}function m(t,e,n=b){t=String(t);const u=n.length,c=t.length;if(u>e&&c>u)return n;if(c>e&&c>u){let i=e-u;return i>0&&k(t[i-1])&&(i=i-1),`${t.slice(0,i)}${n}`}return t}function o(t,e,n,u=", "){n=n||e.inspect;const c=t.length;if(c===0)return"";const i=e.truncate;let r="",s="",a="";for(let l=0;l<c;l+=1){const f=l+1===t.length,y=l+2===t.length;a=`${b}(${t.length-l})`;const U=t[l];e.truncate=i-r.length-(f?0:u.length);const I=s||n(U,e)+(f?"":u),$=r.length+I.length,C=$+a.length;if(f&&$>i&&r.length+a.length<=i||!f&&!y&&C>i||(s=f?"":n(t[l+1],e)+(y?"":u),!f&&y&&C>i&&$+s.length>i))break;if(r+=I,!f&&!y&&$+s.length>=i){a=`${b}(${t.length-l-1})`;break}a=""}return`${r}${a}`}function V(t){return t.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?t:JSON.stringify(t).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function p([t,e],n){return n.truncate-=2,typeof t=="string"?t=V(t):typeof t!="number"&&(t=`[${n.inspect(t,n)}]`),n.truncate-=t.length,e=n.inspect(e,n),`${t}: ${e}`}function K(t,e){const n=Object.keys(t).slice(t.length);if(!t.length&&!n.length)return"[]";e.truncate-=4;const u=o(t,e);e.truncate-=u.length;let c="";return n.length&&(c=o(n.map(i=>[i,t[i]]),e,p)),`[ ${u}${c?`, ${c}`:""} ]`}const X=t=>typeof Buffer=="function"&&t instanceof Buffer?"Buffer":t[Symbol.toStringTag]?t[Symbol.toStringTag]:t.constructor.name;function g(t,e){const n=X(t);e.truncate-=n.length+4;const u=Object.keys(t).slice(t.length);if(!t.length&&!u.length)return`${n}[]`;let c="";for(let r=0;r<t.length;r++){const s=`${e.stylize(m(t[r],e.truncate),"number")}${r===t.length-1?"":", "}`;if(e.truncate-=s.length,t[r]!==t.length&&e.truncate<=3){c+=`${b}(${t.length-t[r]+1})`;break}c+=s}let i="";return u.length&&(i=o(u.map(r=>[r,t[r]]),e,p)),`${n}[ ${c}${i?`, ${i}`:""} ]`}function Z(t,e){const n=t.toJSON();if(n===null)return"Invalid Date";const u=n.split("T"),c=u[0];return e.stylize(`${c}T${m(u[1],e.truncate-c.length-1)}`,"date")}function j(t,e){const n=t[Symbol.toStringTag]||"Function",u=t.name;return u?e.stylize(`[${n} ${m(u,e.truncate-11)}]`,"special"):e.stylize(`[${n}]`,"special")}function q([t,e],n){return n.truncate-=4,t=n.inspect(t,n),n.truncate-=t.length,e=n.inspect(e,n),`${t} => ${e}`}function Y(t){const e=[];return t.forEach((n,u)=>{e.push([u,n])}),e}function Q(t,e){return t.size===0?"Map{}":(e.truncate-=7,`Map{ ${o(Y(t),e,q)} }`)}const v=Number.isNaN||(t=>t!==t);function M(t,e){return v(t)?e.stylize("NaN","number"):t===1/0?e.stylize("Infinity","number"):t===-1/0?e.stylize("-Infinity","number"):t===0?e.stylize(1/t===1/0?"+0":"-0","number"):e.stylize(m(String(t),e.truncate),"number")}function E(t,e){let n=m(t.toString(),e.truncate-1);return n!==b&&(n+="n"),e.stylize(n,"bigint")}function tt(t,e){const n=t.toString().split("/")[2],u=e.truncate-(2+n.length),c=t.source;return e.stylize(`/${m(c,u)}/${n}`,"regexp")}function et(t){const e=[];return t.forEach(n=>{e.push(n)}),e}function nt(t,e){return t.size===0?"Set{}":(e.truncate-=7,`Set{ ${o(et(t),e)} }`)}const L=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),rt={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},ct=16;function it(t){return rt[t]||`\\u${`0000${t.charCodeAt(0).toString(ct)}`.slice(-4)}`}function P(t,e){return L.test(t)&&(t=t.replace(L,it)),e.stylize(`'${m(t,e.truncate-2)}'`,"string")}function F(t){return"description"in Symbol.prototype?t.description?`Symbol(${t.description})`:"Symbol()":t.toString()}const ut=()=>"Promise{…}";function S(t,e){const n=Object.getOwnPropertyNames(t),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[];if(n.length===0&&u.length===0)return"{}";if(e.truncate-=4,e.seen=e.seen||[],e.seen.includes(t))return"[Circular]";e.seen.push(t);const c=o(n.map(s=>[s,t[s]]),e,p),i=o(u.map(s=>[s,t[s]]),e,p);e.seen.pop();let r="";return c&&i&&(r=", "),`{ ${c}${r}${i} }`}const N=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function st(t,e){let n="";return N&&N in t&&(n=t[N]),n=n||t.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),e.truncate-=n.length,`${n}${S(t,e)}`}function lt(t,e){return t.length===0?"Arguments[]":(e.truncate-=13,`Arguments[ ${o(t,e)} ]`)}const ft=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function ot(t,e){const n=Object.getOwnPropertyNames(t).filter(r=>ft.indexOf(r)===-1),u=t.name;e.truncate-=u.length;let c="";if(typeof t.message=="string"?c=m(t.message,e.truncate):n.unshift("message"),c=c?`: ${c}`:"",e.truncate-=c.length+5,e.seen=e.seen||[],e.seen.includes(t))return"[Circular]";e.seen.push(t);const i=o(n.map(r=>[r,t[r]]),e,p);return`${u}${c}${i?` { ${i} }`:""}`}function at([t,e],n){return n.truncate-=3,e?`${n.stylize(String(t),"yellow")}=${n.stylize(`"${e}"`,"string")}`:`${n.stylize(String(t),"yellow")}`}function z(t,e){return o(t,e,gt,`
|
|
2
|
+
`)}function gt(t,e){switch(t.nodeType){case 1:return _(t,e);case 3:return e.inspect(t.data,e);default:return e.inspect(t,e)}}function _(t,e){const n=t.getAttributeNames(),u=t.tagName.toLowerCase(),c=e.stylize(`<${u}`,"special"),i=e.stylize(">","special"),r=e.stylize(`</${u}>`,"special");e.truncate-=u.length*2+5;let s="";n.length>0&&(s+=" ",s+=o(n.map(f=>[f,t.getAttribute(f)]),e,at," ")),e.truncate-=s.length;const a=e.truncate;let l=z(t.children,e);return l&&l.length>a&&(l=`${b}(${t.children.length})`),`${c}${s}${i}${l}${r}`}const yt=typeof Symbol=="function"&&typeof Symbol.for=="function",O=yt?Symbol.for("chai/inspect"):"@@chai/inspect",A=Symbol.for("nodejs.util.inspect.custom"),B=new WeakMap,x={},H={undefined:(t,e)=>e.stylize("undefined","undefined"),null:(t,e)=>e.stylize("null","null"),boolean:(t,e)=>e.stylize(String(t),"boolean"),Boolean:(t,e)=>e.stylize(String(t),"boolean"),number:M,Number:M,bigint:E,BigInt:E,string:P,String:P,function:j,Function:j,symbol:F,Symbol:F,Array:K,Date:Z,Map:Q,Set:nt,RegExp:tt,Promise:ut,WeakSet:(t,e)=>e.stylize("WeakSet{…}","special"),WeakMap:(t,e)=>e.stylize("WeakMap{…}","special"),Arguments:lt,Int8Array:g,Uint8Array:g,Uint8ClampedArray:g,Int16Array:g,Uint16Array:g,Int32Array:g,Uint32Array:g,Float32Array:g,Float64Array:g,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:ot,HTMLCollection:z,NodeList:z},mt=(t,e,n,u)=>O in t&&typeof t[O]=="function"?t[O](e):A in t&&typeof t[A]=="function"?t[A](e.depth,e,u):"inspect"in t&&typeof t.inspect=="function"?t.inspect(e.depth,e):"constructor"in t&&B.has(t.constructor)?B.get(t.constructor)(t,e):x[n]?x[n](t,e):"",ht=Object.prototype.toString;function d(t,e={}){const n=J(e,d),{customInspect:u}=n;let c=t===null?"null":typeof t;if(c==="object"&&(c=ht.call(t).slice(8,-1)),c in H)return H[c](t,n);if(u&&t){const r=mt(t,n,c,d);if(r)return typeof r=="string"?r:d(r,n)}const i=t?Object.getPrototypeOf(t):!1;return i===Object.prototype||i===null?S(t,n):t&&typeof HTMLElement=="function"&&t instanceof HTMLElement?_(t,n):"constructor"in t?t.constructor!==Object?st(t,n):S(t,n):t===Object(t)?S(t,n):n.stylize(String(t),c)}const{AsymmetricMatcher:bt,DOMCollection:pt,DOMElement:$t,Immutable:St,ReactElement:dt,ReactTestComponent:Nt}=W,R=[Nt,dt,$t,pt,St,bt];function Ot(t,e=10,{maxLength:n,...u}={}){const c=n??1e4;let i;try{i=w(t,{maxDepth:e,escapeString:!1,plugins:R,...u})}catch{i=w(t,{callToJSON:!1,maxDepth:e,escapeString:!1,plugins:R,...u})}return i.length>=c&&e>1?Ot(t,Math.floor(Math.min(e,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...u}):i}const At=/%[sdjifoOc%]/g;function It(...t){if(typeof t[0]!="string"){const i=[];for(let r=0;r<t.length;r++)i.push(h(t[r],{depth:0,colors:!1}));return i.join(" ")}const e=t.length;let n=1;const u=t[0];let c=String(u).replace(At,i=>{if(i==="%%")return"%";if(n>=e)return i;switch(i){case"%s":{const r=t[n++];return typeof r=="bigint"?`${r.toString()}n`:typeof r=="number"&&r===0&&1/r<0?"-0":typeof r=="object"&&r!==null?typeof r.toString=="function"&&r.toString!==Object.prototype.toString?r.toString():h(r,{depth:0,colors:!1}):String(r)}case"%d":{const r=t[n++];return typeof r=="bigint"?`${r.toString()}n`:Number(r).toString()}case"%i":{const r=t[n++];return typeof r=="bigint"?`${r.toString()}n`:Number.parseInt(String(r)).toString()}case"%f":return Number.parseFloat(String(t[n++])).toString();case"%o":return h(t[n++],{showHidden:!0,showProxy:!0});case"%O":return h(t[n++]);case"%c":return n++,"";case"%j":try{return JSON.stringify(t[n++])}catch(r){const s=r.message;if(s.includes("circular structure")||s.includes("cyclic structures")||s.includes("cyclic object"))return"[Circular]";throw r}default:return i}});for(let i=t[n];n<e;i=t[++n])i===null||typeof i!="object"?c+=` ${i}`:c+=` ${h(i)}`;return c}function h(t,e={}){return e.truncate===0&&(e.truncate=Number.POSITIVE_INFINITY),d(t,e)}function Ct(t,e={}){typeof e.truncate>"u"&&(e.truncate=40);const n=h(t,e),u=Object.prototype.toString.call(t);if(e.truncate&&n.length>=e.truncate)if(u==="[object Function]"){const c=t;return c.name?`[Function: ${c.name}]`:"[Function]"}else{if(u==="[object Array]")return`[ Array(${t.length}) ]`;if(u==="[object Object]"){const c=Object.keys(t);return`{ Object (${c.length>2?`${c.splice(0,2).join(", ")}, ...`:c.join(", ")}) }`}else return n}return n}export{It as format,At as formatRegExp,h as inspect,Ct as objDisplay,Ot as stringify};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{printDiffOrStringify as n}from"./diff.js";import{stringify as o}from"./display.js";import{serializeValue as f}from"./serialize.js";import"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";function c(t,a,r=new WeakSet){if(!t||typeof t!="object")return{message:String(t)};const e=t;(e.showDiff||e.showDiff===void 0&&e.expected!==void 0&&e.actual!==void 0)&&(e.diff=n(e.actual,e.expected,{...a,...e.diffOptions})),"expected"in e&&typeof e.expected!="string"&&(e.expected=o(e.expected,10)),"actual"in e&&typeof e.actual!="string"&&(e.actual=o(e.actual,10));try{!r.has(e)&&typeof e.cause=="object"&&(r.add(e),e.cause=c(e.cause,a,r))}catch{}try{return f(e)}catch(i){return f(new Error(`Failed to fully serialize error: ${i?.message}
|
|
2
|
+
Inner error message: ${e?.message}`))}}export{c as processError,f as serializeError};
|
package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/helpers.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a(e,t,n){const o=typeof e;if(!n.includes(o))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${o}"`)}function O(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function d(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function l(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function g(e){return Object.prototype.toString.apply(e).slice(8,-1)}function y(e,t){const n=typeof t=="function"?t:o=>t.add(o);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function b(e){const t=new Set;return l(e)?[]:(y(e,t),Array.from(t))}const p={forceWritable:!1};function j(e,t=p){return s(e,new WeakMap,t)}function s(e,t,n=p){let o,r;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(r=Array.from({length:o=e.length}),t.set(e,r);o--;)r[o]=s(e[o],t,n);return r}if(Object.prototype.toString.call(e)==="[object Object]"){r=Object.create(Object.getPrototypeOf(e)),t.set(e,r);const u=b(e);for(const c of u){const i=Object.getOwnPropertyDescriptor(e,c);if(!i)continue;const f=s(e[c],t,n);n.forceWritable?Object.defineProperty(r,c,{enumerable:i.enumerable,configurable:!0,writable:!0,value:f}):"get"in i?Object.defineProperty(r,c,{...i,get(){return f}}):Object.defineProperty(r,c,{...i,value:f})}return r}return e}function w(){}function A(e,t,n=void 0){const o=t.replace(/\[(\d+)\]/g,".$1").split(".");let r=e;for(const u of o)if(r=new Object(r)[u],r===void 0)return n;return r}function P(){let e=null,t=null;const n=new Promise((o,r)=>{e=o,t=r});return n.resolve=e,n.reject=t,n}function N(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}export{a as assertTypes,s as clone,P as createDefer,j as deepClone,b as getOwnProperties,g as getType,N as isNegativeNaN,d as isObject,w as noop,A as objectAttr,O as toArray};
|
package/dist/node_modules/.pnpm/@vitest_utils@4.0.15/node_modules/@vitest/utils/dist/serialize.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const y="@@__IMMUTABLE_RECORD__@@",g="@@__IMMUTABLE_ITERABLE__@@";function m(t){return t&&(t[g]||t[y])}const p=Object.getPrototypeOf({});function c(t){return t instanceof Error?`<unserializable>: ${t.message}`:typeof t=="string"?`<unserializable>: ${t}`:"<unserializable>"}function i(t,r=new WeakMap){if(!t||typeof t=="string")return t;if(t instanceof Error&&"toJSON"in t&&typeof t.toJSON=="function"){const e=t.toJSON();return e&&e!==t&&typeof e=="object"&&(typeof t.message=="string"&&f(()=>e.message??(e.message=u(t.message))),typeof t.stack=="string"&&f(()=>e.stack??(e.stack=t.stack)),typeof t.name=="string"&&f(()=>e.name??(e.name=t.name)),t.cause!=null&&f(()=>e.cause??(e.cause=i(t.cause,r)))),i(e,r)}if(typeof t=="function")return`Function<${t.name||"anonymous"}>`;if(typeof t=="symbol")return t.toString();if(typeof t!="object")return t;if(typeof Buffer<"u"&&t instanceof Buffer)return`<Buffer(${t.length}) ...>`;if(typeof Uint8Array<"u"&&t instanceof Uint8Array)return`<Uint8Array(${t.length}) ...>`;if(m(t))return i(t.toJSON(),r);if(t instanceof Promise||t.constructor&&t.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&t instanceof Element)return t.tagName;if(typeof t.toJSON=="function")return i(t.toJSON(),r);if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);return r.set(t,e),t.forEach((o,n)=>{try{e[n]=i(o,r)}catch(s){e[n]=c(s)}}),e}else{const e=Object.create(null);r.set(t,e);let o=t;for(;o&&o!==p;)Object.getOwnPropertyNames(o).forEach(n=>{if(!(n in e))try{e[n]=i(t[n],r)}catch(s){delete e[n],e[n]=c(s)}}),o=Object.getPrototypeOf(o);return t instanceof Error&&f(()=>t.message=u(t.message)),e}}function f(t){try{return t()}catch{}}function u(t){return t.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}export{i as serializeValue};
|