lkd-web-kit 0.7.14 → 0.7.16
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/components/EmptyState/index.cjs +5 -5
- package/dist/components/Icon.cjs +2 -2
- package/dist/components/InfinityLoadMoreButton/index.cjs +15 -8
- package/dist/components/InfinityLoadMoreButton/index.js +13 -6
- package/dist/components/{SelectInfinity → InfinitySelect}/index.cjs +17 -12
- package/dist/components/{SelectInfinity → InfinitySelect}/index.js +14 -9
- package/dist/components/MyCheckboxGroup/index.cjs +2 -2
- package/dist/components/MyDateInput/index.cjs +3 -3
- package/dist/components/MyDatePickerInput/CalendarIcon.cjs +7 -7
- package/dist/components/MyDatePickerInput/index.cjs +3 -3
- package/dist/components/MyDateTimePicker/index.cjs +3 -3
- package/dist/components/MyMonthPickerInput/index.cjs +3 -3
- package/dist/components/MyMultiSelect/index.cjs +2 -2
- package/dist/components/MyNotifications/index.cjs +2 -2
- package/dist/components/MyNumberInput/index.cjs +2 -2
- package/dist/components/MyRadioGroup/index.cjs +2 -2
- package/dist/components/MySelect/index.cjs +2 -2
- package/dist/components/MyTextInput/index.cjs +2 -2
- package/dist/components/MyTextarea/index.cjs +2 -2
- package/dist/components/MyTimeInput/index.cjs +2 -2
- package/dist/components/NavItems.cjs +4 -4
- package/dist/contexts/NavigationHistoryContext/hook.cjs +2 -2
- package/dist/contexts/NavigationHistoryContext/hook.js +2 -2
- package/dist/contexts/NavigationHistoryContext/index.cjs +3 -3
- package/dist/contexts/PageDataContext/index.cjs +2 -2
- package/dist/form/Form.cjs +2 -2
- package/dist/form/{FormButtonSubmit.cjs → FormSubmitButton.cjs} +4 -4
- package/dist/form/{FormButtonSubmit.js → FormSubmitButton.js} +2 -2
- package/dist/form/base/FormCheckbox.cjs +2 -2
- package/dist/form/base/FormCheckboxGroup.cjs +2 -2
- package/dist/form/base/FormDateInput.cjs +2 -2
- package/dist/form/base/FormDatePickerInput.cjs +2 -2
- package/dist/form/base/FormDateTimePicker.cjs +2 -2
- package/dist/form/base/FormMonthPickerInput.cjs +2 -2
- package/dist/form/base/FormMultiSelect.cjs +2 -2
- package/dist/form/base/FormNumberInput.cjs +2 -2
- package/dist/form/base/FormRadioGroup.cjs +2 -2
- package/dist/form/base/FormSelect.cjs +2 -2
- package/dist/form/base/FormSelectInfinity.cjs +3 -3
- package/dist/form/base/FormSelectInfinity.js +1 -1
- package/dist/form/base/FormTextInput.cjs +2 -2
- package/dist/form/base/FormTextarea.cjs +2 -2
- package/dist/form/base/FormTimeInput.cjs +2 -2
- package/dist/hocs/withController.cjs +3 -3
- package/dist/hocs/withModalManager.cjs +2 -2
- package/dist/index.cjs +37 -39
- package/dist/index.d.ts +8 -21
- package/dist/index.js +2 -3
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.cjs +2 -2
- package/package.json +2 -2
- package/dist/_virtual/___vite-browser-external.cjs +0 -12
- package/dist/_virtual/___vite-browser-external.js +0 -6
- package/dist/_virtual/__vite-browser-external.cjs +0 -5
- package/dist/_virtual/__vite-browser-external.js +0 -3
- package/dist/_virtual/_commonjsHelpers.cjs +0 -34
- package/dist/_virtual/_commonjsHelpers.js +0 -30
- package/dist/_virtual/_interop_require_default.cjs +0 -7
- package/dist/_virtual/_interop_require_default.js +0 -3
- package/dist/_virtual/_interop_require_wildcard.cjs +0 -7
- package/dist/_virtual/_interop_require_wildcard.js +0 -3
- package/dist/_virtual/add-base-path.cjs +0 -7
- package/dist/_virtual/add-base-path.js +0 -3
- package/dist/_virtual/add-locale.cjs +0 -7
- package/dist/_virtual/add-locale.js +0 -3
- package/dist/_virtual/add-locale2.cjs +0 -7
- package/dist/_virtual/add-locale2.js +0 -3
- package/dist/_virtual/add-path-prefix.cjs +0 -7
- package/dist/_virtual/add-path-prefix.js +0 -3
- package/dist/_virtual/add-path-suffix.cjs +0 -7
- package/dist/_virtual/add-path-suffix.js +0 -3
- package/dist/_virtual/app-paths.cjs +0 -7
- package/dist/_virtual/app-paths.js +0 -3
- package/dist/_virtual/bloom-filter.cjs +0 -7
- package/dist/_virtual/bloom-filter.js +0 -3
- package/dist/_virtual/compare-states.cjs +0 -7
- package/dist/_virtual/compare-states.js +0 -3
- package/dist/_virtual/constants.cjs +0 -7
- package/dist/_virtual/constants.js +0 -3
- package/dist/_virtual/denormalize-page-path.cjs +0 -7
- package/dist/_virtual/denormalize-page-path.js +0 -3
- package/dist/_virtual/deployment-id.cjs +0 -7
- package/dist/_virtual/deployment-id.js +0 -3
- package/dist/_virtual/detect-domain-locale.cjs +0 -7
- package/dist/_virtual/detect-domain-locale.js +0 -3
- package/dist/_virtual/detect-domain-locale2.cjs +0 -7
- package/dist/_virtual/detect-domain-locale2.js +0 -3
- package/dist/_virtual/disable-smooth-scroll.cjs +0 -7
- package/dist/_virtual/disable-smooth-scroll.js +0 -3
- package/dist/_virtual/encode-uri-path.cjs +0 -7
- package/dist/_virtual/encode-uri-path.js +0 -3
- package/dist/_virtual/ensure-leading-slash.cjs +0 -7
- package/dist/_virtual/ensure-leading-slash.js +0 -3
- package/dist/_virtual/escape-regexp.cjs +0 -7
- package/dist/_virtual/escape-regexp.js +0 -3
- package/dist/_virtual/format-next-pathname-info.cjs +0 -7
- package/dist/_virtual/format-next-pathname-info.js +0 -3
- package/dist/_virtual/format-url.cjs +0 -7
- package/dist/_virtual/format-url.js +0 -3
- package/dist/_virtual/get-asset-path-from-route.cjs +0 -7
- package/dist/_virtual/get-asset-path-from-route.js +0 -3
- package/dist/_virtual/get-cookie-parser.cjs +0 -7
- package/dist/_virtual/get-cookie-parser.js +0 -3
- package/dist/_virtual/get-dynamic-param.cjs +0 -7
- package/dist/_virtual/get-dynamic-param.js +0 -3
- package/dist/_virtual/get-next-pathname-info.cjs +0 -7
- package/dist/_virtual/get-next-pathname-info.js +0 -3
- package/dist/_virtual/get-segment-param.cjs +0 -7
- package/dist/_virtual/get-segment-param.js +0 -3
- package/dist/_virtual/has-base-path.cjs +0 -7
- package/dist/_virtual/has-base-path.js +0 -3
- package/dist/_virtual/head-manager-context.shared-runtime.cjs +0 -7
- package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
- package/dist/_virtual/html-bots.cjs +0 -7
- package/dist/_virtual/html-bots.js +0 -3
- package/dist/_virtual/index.cjs +0 -7
- package/dist/_virtual/index.js +0 -3
- package/dist/_virtual/index2.cjs +0 -7
- package/dist/_virtual/index2.js +0 -3
- package/dist/_virtual/index3.cjs +0 -7
- package/dist/_virtual/index3.js +0 -3
- package/dist/_virtual/index4.cjs +0 -7
- package/dist/_virtual/index4.js +0 -3
- package/dist/_virtual/index5.cjs +0 -7
- package/dist/_virtual/index5.js +0 -3
- package/dist/_virtual/interception-routes.cjs +0 -7
- package/dist/_virtual/interception-routes.js +0 -3
- package/dist/_virtual/interpolate-as.cjs +0 -7
- package/dist/_virtual/interpolate-as.js +0 -3
- package/dist/_virtual/invariant-error.cjs +0 -7
- package/dist/_virtual/invariant-error.js +0 -3
- package/dist/_virtual/is-api-route.cjs +0 -7
- package/dist/_virtual/is-api-route.js +0 -3
- package/dist/_virtual/is-bot.cjs +0 -7
- package/dist/_virtual/is-bot.js +0 -3
- package/dist/_virtual/is-dynamic.cjs +0 -7
- package/dist/_virtual/is-dynamic.js +0 -3
- package/dist/_virtual/is-error.cjs +0 -7
- package/dist/_virtual/is-error.js +0 -3
- package/dist/_virtual/is-local-url.cjs +0 -7
- package/dist/_virtual/is-local-url.js +0 -3
- package/dist/_virtual/is-plain-object.cjs +0 -7
- package/dist/_virtual/is-plain-object.js +0 -3
- package/dist/_virtual/mitt.cjs +0 -7
- package/dist/_virtual/mitt.js +0 -3
- package/dist/_virtual/normalize-locale-path.cjs +0 -7
- package/dist/_virtual/normalize-locale-path.js +0 -3
- package/dist/_virtual/normalize-path-sep.cjs +0 -7
- package/dist/_virtual/normalize-path-sep.js +0 -3
- package/dist/_virtual/normalize-trailing-slash.cjs +0 -7
- package/dist/_virtual/normalize-trailing-slash.js +0 -3
- package/dist/_virtual/omit.cjs +0 -7
- package/dist/_virtual/omit.js +0 -3
- package/dist/_virtual/parse-loader-tree.cjs +0 -7
- package/dist/_virtual/parse-loader-tree.js +0 -3
- package/dist/_virtual/parse-path.cjs +0 -7
- package/dist/_virtual/parse-path.js +0 -3
- package/dist/_virtual/parse-relative-url.cjs +0 -7
- package/dist/_virtual/parse-relative-url.js +0 -3
- package/dist/_virtual/parse-url.cjs +0 -7
- package/dist/_virtual/parse-url.js +0 -3
- package/dist/_virtual/path-has-prefix.cjs +0 -7
- package/dist/_virtual/path-has-prefix.js +0 -3
- package/dist/_virtual/path-match.cjs +0 -7
- package/dist/_virtual/path-match.js +0 -3
- package/dist/_virtual/prepare-destination.cjs +0 -7
- package/dist/_virtual/prepare-destination.js +0 -3
- package/dist/_virtual/querystring.cjs +0 -7
- package/dist/_virtual/querystring.js +0 -3
- package/dist/_virtual/react-is.development.cjs +0 -7
- package/dist/_virtual/react-is.development.js +0 -3
- package/dist/_virtual/react-is.production.cjs +0 -7
- package/dist/_virtual/react-is.production.js +0 -3
- package/dist/_virtual/remove-base-path.cjs +0 -7
- package/dist/_virtual/remove-base-path.js +0 -3
- package/dist/_virtual/remove-locale.cjs +0 -7
- package/dist/_virtual/remove-locale.js +0 -3
- package/dist/_virtual/remove-path-prefix.cjs +0 -7
- package/dist/_virtual/remove-path-prefix.js +0 -3
- package/dist/_virtual/remove-trailing-slash.cjs +0 -7
- package/dist/_virtual/remove-trailing-slash.js +0 -3
- package/dist/_virtual/request-idle-callback.cjs +0 -7
- package/dist/_virtual/request-idle-callback.js +0 -3
- package/dist/_virtual/resolve-href.cjs +0 -7
- package/dist/_virtual/resolve-href.js +0 -3
- package/dist/_virtual/resolve-rewrites.cjs +0 -7
- package/dist/_virtual/resolve-rewrites.js +0 -3
- package/dist/_virtual/route-loader.cjs +0 -7
- package/dist/_virtual/route-loader.js +0 -3
- package/dist/_virtual/route-match-utils.cjs +0 -7
- package/dist/_virtual/route-match-utils.js +0 -3
- package/dist/_virtual/route-matcher.cjs +0 -7
- package/dist/_virtual/route-matcher.js +0 -3
- package/dist/_virtual/route-pattern-normalizer.cjs +0 -7
- package/dist/_virtual/route-pattern-normalizer.js +0 -3
- package/dist/_virtual/route-regex.cjs +0 -7
- package/dist/_virtual/route-regex.js +0 -3
- package/dist/_virtual/router-context.shared-runtime.cjs +0 -7
- package/dist/_virtual/router-context.shared-runtime.js +0 -3
- package/dist/_virtual/router.cjs +0 -9
- package/dist/_virtual/router.js +0 -5
- package/dist/_virtual/router2.cjs +0 -7
- package/dist/_virtual/router2.js +0 -3
- package/dist/_virtual/router3.cjs +0 -7
- package/dist/_virtual/router3.js +0 -3
- package/dist/_virtual/script.cjs +0 -7
- package/dist/_virtual/script.js +0 -3
- package/dist/_virtual/segment.cjs +0 -7
- package/dist/_virtual/segment.js +0 -3
- package/dist/_virtual/set-attributes-from-props.cjs +0 -7
- package/dist/_virtual/set-attributes-from-props.js +0 -3
- package/dist/_virtual/sorted-routes.cjs +0 -7
- package/dist/_virtual/sorted-routes.js +0 -3
- package/dist/_virtual/trusted-types.cjs +0 -7
- package/dist/_virtual/trusted-types.js +0 -3
- package/dist/_virtual/utils.cjs +0 -7
- package/dist/_virtual/utils.js +0 -3
- package/dist/_virtual/warn-once.cjs +0 -7
- package/dist/_virtual/warn-once.js +0 -3
- package/dist/_virtual/with-router.cjs +0 -7
- package/dist/_virtual/with-router.js +0 -3
- package/dist/components/InfinityLoader/index.cjs +0 -68
- package/dist/components/InfinityLoader/index.js +0 -64
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +0 -20
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +0 -16
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +0 -52
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +0 -48
- package/dist/node_modules/next/dist/build/deployment-id.cjs +0 -34
- package/dist/node_modules/next/dist/build/deployment-id.js +0 -30
- package/dist/node_modules/next/dist/client/add-base-path.cjs +0 -42
- package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
- package/dist/node_modules/next/dist/client/add-locale.cjs +0 -43
- package/dist/node_modules/next/dist/client/add-locale.js +0 -39
- package/dist/node_modules/next/dist/client/detect-domain-locale.cjs +0 -40
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -36
- package/dist/node_modules/next/dist/client/has-base-path.cjs +0 -40
- package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.cjs +0 -54
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -50
- package/dist/node_modules/next/dist/client/remove-base-path.cjs +0 -49
- package/dist/node_modules/next/dist/client/remove-base-path.js +0 -45
- package/dist/node_modules/next/dist/client/remove-locale.cjs +0 -45
- package/dist/node_modules/next/dist/client/remove-locale.js +0 -41
- package/dist/node_modules/next/dist/client/request-idle-callback.cjs +0 -56
- package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
- package/dist/node_modules/next/dist/client/resolve-href.cjs +0 -132
- package/dist/node_modules/next/dist/client/resolve-href.js +0 -128
- package/dist/node_modules/next/dist/client/route-loader.cjs +0 -363
- package/dist/node_modules/next/dist/client/route-loader.js +0 -359
- package/dist/node_modules/next/dist/client/router.cjs +0 -201
- package/dist/node_modules/next/dist/client/router.js +0 -197
- package/dist/node_modules/next/dist/client/script.cjs +0 -366
- package/dist/node_modules/next/dist/client/script.js +0 -362
- package/dist/node_modules/next/dist/client/set-attributes-from-props.cjs +0 -81
- package/dist/node_modules/next/dist/client/set-attributes-from-props.js +0 -77
- package/dist/node_modules/next/dist/client/trusted-types.cjs +0 -56
- package/dist/node_modules/next/dist/client/trusted-types.js +0 -52
- package/dist/node_modules/next/dist/client/with-router.cjs +0 -54
- package/dist/node_modules/next/dist/client/with-router.js +0 -50
- package/dist/node_modules/next/dist/compiled/cookie/index.cjs +0 -22
- package/dist/node_modules/next/dist/compiled/cookie/index.js +0 -18
- package/dist/node_modules/next/dist/compiled/gzip-size/index.cjs +0 -17
- package/dist/node_modules/next/dist/compiled/gzip-size/index.js +0 -13
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.cjs +0 -16
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -12
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.cjs +0 -147
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +0 -143
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.cjs +0 -144
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +0 -140
- package/dist/node_modules/next/dist/compiled/react-is/index.cjs +0 -23
- package/dist/node_modules/next/dist/compiled/react-is/index.js +0 -19
- package/dist/node_modules/next/dist/lib/constants.cjs +0 -365
- package/dist/node_modules/next/dist/lib/constants.js +0 -361
- package/dist/node_modules/next/dist/lib/is-api-route.cjs +0 -31
- package/dist/node_modules/next/dist/lib/is-api-route.js +0 -27
- package/dist/node_modules/next/dist/lib/is-error.cjs +0 -91
- package/dist/node_modules/next/dist/lib/is-error.js +0 -87
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.cjs +0 -115
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +0 -111
- package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.cjs +0 -39
- package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.js +0 -35
- package/dist/node_modules/next/dist/shared/lib/bloom-filter.cjs +0 -101
- package/dist/node_modules/next/dist/shared/lib/bloom-filter.js +0 -97
- package/dist/node_modules/next/dist/shared/lib/encode-uri-path.cjs +0 -31
- package/dist/node_modules/next/dist/shared/lib/encode-uri-path.js +0 -27
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.cjs +0 -37
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.cjs +0 -36
- package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.cjs +0 -41
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -37
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.cjs +0 -70
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -66
- package/dist/node_modules/next/dist/shared/lib/invariant-error.cjs +0 -34
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -30
- package/dist/node_modules/next/dist/shared/lib/is-plain-object.cjs +0 -54
- package/dist/node_modules/next/dist/shared/lib/is-plain-object.js +0 -50
- package/dist/node_modules/next/dist/shared/lib/mitt.cjs +0 -58
- package/dist/node_modules/next/dist/shared/lib/mitt.js +0 -54
- package/dist/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.cjs +0 -36
- package/dist/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.cjs +0 -36
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.cjs +0 -37
- package/dist/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/router.cjs +0 -1814
- package/dist/node_modules/next/dist/shared/lib/router/router.js +0 -1810
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.cjs +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.cjs +0 -37
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.cjs +0 -37
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.cjs +0 -65
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -61
- package/dist/node_modules/next/dist/shared/lib/router/utils/compare-states.cjs +0 -50
- package/dist/node_modules/next/dist/shared/lib/router/utils/compare-states.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/disable-smooth-scroll.cjs +0 -60
- package/dist/node_modules/next/dist/shared/lib/router/utils/disable-smooth-scroll.js +0 -56
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.cjs +0 -47
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +0 -43
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.cjs +0 -103
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -99
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.cjs +0 -32
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js +0 -28
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.cjs +0 -208
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +0 -204
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.cjs +0 -71
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -67
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.cjs +0 -94
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +0 -90
- package/dist/node_modules/next/dist/shared/lib/router/utils/html-bots.cjs +0 -29
- package/dist/node_modules/next/dist/shared/lib/router/utils/html-bots.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.cjs +0 -43
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -39
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.cjs +0 -119
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -115
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.cjs +0 -71
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -67
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-bot.cjs +0 -68
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-bot.js +0 -64
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.cjs +0 -43
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -39
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.cjs +0 -44
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -40
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.cjs +0 -37
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.cjs +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.cjs +0 -51
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -47
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.cjs +0 -54
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +0 -50
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.cjs +0 -50
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.cjs +0 -37
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-match.cjs +0 -66
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-match.js +0 -62
- package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.cjs +0 -303
- package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +0 -299
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.cjs +0 -90
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -86
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.cjs +0 -56
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +0 -52
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.cjs +0 -39
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -35
- package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-rewrites.cjs +0 -140
- package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-rewrites.js +0 -136
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.cjs +0 -127
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +0 -123
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.cjs +0 -63
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -59
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.cjs +0 -272
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -268
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.cjs +0 -256
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -252
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.cjs +0 -36
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/segment.cjs +0 -103
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -99
- package/dist/node_modules/next/dist/shared/lib/utils/warn-once.cjs +0 -38
- package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js +0 -34
- package/dist/node_modules/next/dist/shared/lib/utils.cjs +0 -204
- package/dist/node_modules/next/dist/shared/lib/utils.js +0 -200
- package/dist/node_modules/next/router.cjs +0 -17
- package/dist/node_modules/next/router.js +0 -13
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { __exports as routeMatchUtils } from '../../../../../../../_virtual/route-match-utils.js';
|
|
2
|
-
import { __require as requirePathToRegexp } from '../../../../compiled/path-to-regexp/index.js';
|
|
3
|
-
import { __require as requireRoutePatternNormalizer } from '../../../../lib/route-pattern-normalizer.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Client-safe utilities for route matching that don't import server-side
|
|
7
|
-
* utilities to avoid bundling issues with Turbopack
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
var hasRequiredRouteMatchUtils;
|
|
11
|
-
|
|
12
|
-
function requireRouteMatchUtils () {
|
|
13
|
-
if (hasRequiredRouteMatchUtils) return routeMatchUtils;
|
|
14
|
-
hasRequiredRouteMatchUtils = 1;
|
|
15
|
-
(function (exports) {
|
|
16
|
-
Object.defineProperty(exports, "__esModule", {
|
|
17
|
-
value: true
|
|
18
|
-
});
|
|
19
|
-
function _export(target, all) {
|
|
20
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: all[name]
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
_export(exports, {
|
|
26
|
-
safeCompile: function() {
|
|
27
|
-
return safeCompile;
|
|
28
|
-
},
|
|
29
|
-
safePathToRegexp: function() {
|
|
30
|
-
return safePathToRegexp;
|
|
31
|
-
},
|
|
32
|
-
safeRegexpToFunction: function() {
|
|
33
|
-
return safeRegexpToFunction;
|
|
34
|
-
},
|
|
35
|
-
safeRouteMatcher: function() {
|
|
36
|
-
return safeRouteMatcher;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const _pathtoregexp = requirePathToRegexp();
|
|
40
|
-
const _routepatternnormalizer = requireRoutePatternNormalizer();
|
|
41
|
-
function safePathToRegexp(route, keys, options) {
|
|
42
|
-
if (typeof route !== 'string') {
|
|
43
|
-
return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
|
|
44
|
-
}
|
|
45
|
-
// Check if normalization is needed and cache the result
|
|
46
|
-
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
|
|
47
|
-
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
|
|
48
|
-
try {
|
|
49
|
-
return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
|
|
50
|
-
} catch (error) {
|
|
51
|
-
// Only try normalization if we haven't already normalized
|
|
52
|
-
if (!needsNormalization) {
|
|
53
|
-
try {
|
|
54
|
-
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
|
|
55
|
-
return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
|
|
56
|
-
} catch (retryError) {
|
|
57
|
-
// If that doesn't work, fall back to original error
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
throw error;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function safeCompile(route, options) {
|
|
65
|
-
// Check if normalization is needed and cache the result
|
|
66
|
-
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
|
|
67
|
-
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
|
|
68
|
-
try {
|
|
69
|
-
const compiler = (0, _pathtoregexp.compile)(routeToUse, options);
|
|
70
|
-
// If we normalized the route, wrap the compiler to strip separators from output
|
|
71
|
-
// The normalization inserts _NEXTSEP_ as a literal string in the pattern to satisfy
|
|
72
|
-
// path-to-regexp validation, but we don't want it in the final compiled URL
|
|
73
|
-
if (needsNormalization) {
|
|
74
|
-
return (params)=>{
|
|
75
|
-
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
return compiler;
|
|
79
|
-
} catch (error) {
|
|
80
|
-
// Only try normalization if we haven't already normalized
|
|
81
|
-
if (!needsNormalization) {
|
|
82
|
-
try {
|
|
83
|
-
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
|
|
84
|
-
const compiler = (0, _pathtoregexp.compile)(normalizedRoute, options);
|
|
85
|
-
// Wrap the compiler to strip separators from output
|
|
86
|
-
return (params)=>{
|
|
87
|
-
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
|
|
88
|
-
};
|
|
89
|
-
} catch (retryError) {
|
|
90
|
-
// If that doesn't work, fall back to original error
|
|
91
|
-
throw error;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
throw error;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function safeRegexpToFunction(regexp, keys) {
|
|
98
|
-
const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
|
|
99
|
-
return (pathname)=>{
|
|
100
|
-
const result = originalMatcher(pathname);
|
|
101
|
-
if (!result) return false;
|
|
102
|
-
// Clean parameters before returning
|
|
103
|
-
return {
|
|
104
|
-
...result,
|
|
105
|
-
params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function safeRouteMatcher(matcherFn) {
|
|
110
|
-
return (pathname)=>{
|
|
111
|
-
const result = matcherFn(pathname);
|
|
112
|
-
if (!result) return false;
|
|
113
|
-
// Clean parameters before returning
|
|
114
|
-
return (0, _routepatternnormalizer.stripParameterSeparators)(result);
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
} (routeMatchUtils));
|
|
120
|
-
return routeMatchUtils;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export { requireRouteMatchUtils as __require };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const routeMatcher = require('../../../../../../../_virtual/route-matcher.cjs');
|
|
6
|
-
const utils = require('../../utils.cjs');
|
|
7
|
-
const routeMatchUtils = require('./route-match-utils.cjs');
|
|
8
|
-
|
|
9
|
-
var hasRequiredRouteMatcher;
|
|
10
|
-
|
|
11
|
-
function requireRouteMatcher () {
|
|
12
|
-
if (hasRequiredRouteMatcher) return routeMatcher.__exports;
|
|
13
|
-
hasRequiredRouteMatcher = 1;
|
|
14
|
-
(function (exports) {
|
|
15
|
-
Object.defineProperty(exports, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "getRouteMatcher", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function() {
|
|
21
|
-
return getRouteMatcher;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const _utils = utils.__require();
|
|
25
|
-
const _routematchutils = routeMatchUtils.__require();
|
|
26
|
-
function getRouteMatcher({ re, groups }) {
|
|
27
|
-
const rawMatcher = (pathname)=>{
|
|
28
|
-
const routeMatch = re.exec(pathname);
|
|
29
|
-
if (!routeMatch) return false;
|
|
30
|
-
const decode = (param)=>{
|
|
31
|
-
try {
|
|
32
|
-
return decodeURIComponent(param);
|
|
33
|
-
} catch {
|
|
34
|
-
throw Object.defineProperty(new _utils.DecodeError('failed to decode param'), "__NEXT_ERROR_CODE", {
|
|
35
|
-
value: "E528",
|
|
36
|
-
enumerable: false,
|
|
37
|
-
configurable: true
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const params = {};
|
|
42
|
-
for (const [key, group] of Object.entries(groups)){
|
|
43
|
-
const match = routeMatch[group.pos];
|
|
44
|
-
if (match !== undefined) {
|
|
45
|
-
if (group.repeat) {
|
|
46
|
-
params[key] = match.split('/').map((entry)=>decode(entry));
|
|
47
|
-
} else {
|
|
48
|
-
params[key] = decode(match);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return params;
|
|
53
|
-
};
|
|
54
|
-
// Wrap with safe matcher to handle parameter cleaning
|
|
55
|
-
return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} (routeMatcher.__exports));
|
|
60
|
-
return routeMatcher.__exports;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
exports.__require = requireRouteMatcher;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { __exports as routeMatcher } from '../../../../../../../_virtual/route-matcher.js';
|
|
2
|
-
import { __require as requireUtils } from '../../utils.js';
|
|
3
|
-
import { __require as requireRouteMatchUtils } from './route-match-utils.js';
|
|
4
|
-
|
|
5
|
-
var hasRequiredRouteMatcher;
|
|
6
|
-
|
|
7
|
-
function requireRouteMatcher () {
|
|
8
|
-
if (hasRequiredRouteMatcher) return routeMatcher;
|
|
9
|
-
hasRequiredRouteMatcher = 1;
|
|
10
|
-
(function (exports) {
|
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12
|
-
value: true
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "getRouteMatcher", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function() {
|
|
17
|
-
return getRouteMatcher;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const _utils = requireUtils();
|
|
21
|
-
const _routematchutils = requireRouteMatchUtils();
|
|
22
|
-
function getRouteMatcher({ re, groups }) {
|
|
23
|
-
const rawMatcher = (pathname)=>{
|
|
24
|
-
const routeMatch = re.exec(pathname);
|
|
25
|
-
if (!routeMatch) return false;
|
|
26
|
-
const decode = (param)=>{
|
|
27
|
-
try {
|
|
28
|
-
return decodeURIComponent(param);
|
|
29
|
-
} catch {
|
|
30
|
-
throw Object.defineProperty(new _utils.DecodeError('failed to decode param'), "__NEXT_ERROR_CODE", {
|
|
31
|
-
value: "E528",
|
|
32
|
-
enumerable: false,
|
|
33
|
-
configurable: true
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const params = {};
|
|
38
|
-
for (const [key, group] of Object.entries(groups)){
|
|
39
|
-
const match = routeMatch[group.pos];
|
|
40
|
-
if (match !== undefined) {
|
|
41
|
-
if (group.repeat) {
|
|
42
|
-
params[key] = match.split('/').map((entry)=>decode(entry));
|
|
43
|
-
} else {
|
|
44
|
-
params[key] = decode(match);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return params;
|
|
49
|
-
};
|
|
50
|
-
// Wrap with safe matcher to handle parameter cleaning
|
|
51
|
-
return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} (routeMatcher));
|
|
56
|
-
return routeMatcher;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export { requireRouteMatcher as __require };
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const routeRegex = require('../../../../../../../_virtual/route-regex.cjs');
|
|
6
|
-
const constants = require('../../../../lib/constants.cjs');
|
|
7
|
-
const interceptionRoutes = require('./interception-routes.cjs');
|
|
8
|
-
const escapeRegexp = require('../../escape-regexp.cjs');
|
|
9
|
-
const removeTrailingSlash = require('./remove-trailing-slash.cjs');
|
|
10
|
-
const getDynamicParam = require('./get-dynamic-param.cjs');
|
|
11
|
-
|
|
12
|
-
var hasRequiredRouteRegex;
|
|
13
|
-
|
|
14
|
-
function requireRouteRegex () {
|
|
15
|
-
if (hasRequiredRouteRegex) return routeRegex.__exports;
|
|
16
|
-
hasRequiredRouteRegex = 1;
|
|
17
|
-
(function (exports) {
|
|
18
|
-
Object.defineProperty(exports, "__esModule", {
|
|
19
|
-
value: true
|
|
20
|
-
});
|
|
21
|
-
function _export(target, all) {
|
|
22
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: all[name]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
_export(exports, {
|
|
28
|
-
getNamedMiddlewareRegex: function() {
|
|
29
|
-
return getNamedMiddlewareRegex;
|
|
30
|
-
},
|
|
31
|
-
getNamedRouteRegex: function() {
|
|
32
|
-
return getNamedRouteRegex;
|
|
33
|
-
},
|
|
34
|
-
getRouteRegex: function() {
|
|
35
|
-
return getRouteRegex;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const _constants = constants.__require();
|
|
39
|
-
const _interceptionroutes = interceptionRoutes.__require();
|
|
40
|
-
const _escaperegexp = escapeRegexp.__require();
|
|
41
|
-
const _removetrailingslash = removeTrailingSlash.__require();
|
|
42
|
-
const _getdynamicparam = getDynamicParam.__require();
|
|
43
|
-
function getParametrizedRoute(route, includeSuffix, includePrefix) {
|
|
44
|
-
const groups = {};
|
|
45
|
-
let groupIndex = 1;
|
|
46
|
-
const segments = [];
|
|
47
|
-
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split('/')){
|
|
48
|
-
const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
|
|
49
|
-
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN) // Check for parameters
|
|
50
|
-
;
|
|
51
|
-
if (markerMatch && paramMatches && paramMatches[2]) {
|
|
52
|
-
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
|
|
53
|
-
groups[key] = {
|
|
54
|
-
pos: groupIndex++,
|
|
55
|
-
repeat,
|
|
56
|
-
optional
|
|
57
|
-
};
|
|
58
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
|
|
59
|
-
} else if (paramMatches && paramMatches[2]) {
|
|
60
|
-
const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
|
|
61
|
-
groups[key] = {
|
|
62
|
-
pos: groupIndex++,
|
|
63
|
-
repeat,
|
|
64
|
-
optional
|
|
65
|
-
};
|
|
66
|
-
if (includePrefix && paramMatches[1]) {
|
|
67
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
|
|
68
|
-
}
|
|
69
|
-
let s = repeat ? optional ? '(?:/(.+?))?' : '/(.+?)' : '/([^/]+?)';
|
|
70
|
-
// Remove the leading slash if includePrefix already added it.
|
|
71
|
-
if (includePrefix && paramMatches[1]) {
|
|
72
|
-
s = s.substring(1);
|
|
73
|
-
}
|
|
74
|
-
segments.push(s);
|
|
75
|
-
} else {
|
|
76
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
|
|
77
|
-
}
|
|
78
|
-
// If there's a suffix, add it to the segments if it's enabled.
|
|
79
|
-
if (includeSuffix && paramMatches && paramMatches[3]) {
|
|
80
|
-
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
parameterizedRoute: segments.join(''),
|
|
85
|
-
groups
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function getRouteRegex(normalizedRoute, { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = {}) {
|
|
89
|
-
const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
|
|
90
|
-
let re = parameterizedRoute;
|
|
91
|
-
if (!excludeOptionalTrailingSlash) {
|
|
92
|
-
re += '(?:/)?';
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
re: new RegExp(`^${re}$`),
|
|
96
|
-
groups: groups
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Builds a function to generate a minimal routeKey using only a-z and minimal
|
|
101
|
-
* number of characters.
|
|
102
|
-
*/ function buildGetSafeRouteKey() {
|
|
103
|
-
let i = 0;
|
|
104
|
-
return ()=>{
|
|
105
|
-
let routeKey = '';
|
|
106
|
-
let j = ++i;
|
|
107
|
-
while(j > 0){
|
|
108
|
-
routeKey += String.fromCharCode(97 + (j - 1) % 26);
|
|
109
|
-
j = Math.floor((j - 1) / 26);
|
|
110
|
-
}
|
|
111
|
-
return routeKey;
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
function getSafeKeyFromSegment({ interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys }) {
|
|
115
|
-
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
|
|
116
|
-
// replace any non-word characters since they can break
|
|
117
|
-
// the named regex
|
|
118
|
-
let cleanedKey = key.replace(/\W/g, '');
|
|
119
|
-
if (keyPrefix) {
|
|
120
|
-
cleanedKey = `${keyPrefix}${cleanedKey}`;
|
|
121
|
-
}
|
|
122
|
-
let invalidKey = false;
|
|
123
|
-
// check if the key is still invalid and fallback to using a known
|
|
124
|
-
// safe key
|
|
125
|
-
if (cleanedKey.length === 0 || cleanedKey.length > 30) {
|
|
126
|
-
invalidKey = true;
|
|
127
|
-
}
|
|
128
|
-
if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
|
|
129
|
-
invalidKey = true;
|
|
130
|
-
}
|
|
131
|
-
if (invalidKey) {
|
|
132
|
-
cleanedKey = getSafeRouteKey();
|
|
133
|
-
}
|
|
134
|
-
const duplicateKey = cleanedKey in routeKeys;
|
|
135
|
-
if (keyPrefix) {
|
|
136
|
-
routeKeys[cleanedKey] = `${keyPrefix}${key}`;
|
|
137
|
-
} else {
|
|
138
|
-
routeKeys[cleanedKey] = key;
|
|
139
|
-
}
|
|
140
|
-
// if the segment has an interception marker, make sure that's part of the regex pattern
|
|
141
|
-
// this is to ensure that the route with the interception marker doesn't incorrectly match
|
|
142
|
-
// the non-intercepted route (ie /app/(.)[username] should not match /app/[username])
|
|
143
|
-
const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : '';
|
|
144
|
-
let pattern;
|
|
145
|
-
if (duplicateKey && backreferenceDuplicateKeys) {
|
|
146
|
-
// Use a backreference to the key to ensure that the key is the same value
|
|
147
|
-
// in each of the placeholders.
|
|
148
|
-
pattern = `\\k<${cleanedKey}>`;
|
|
149
|
-
} else if (repeat) {
|
|
150
|
-
pattern = `(?<${cleanedKey}>.+?)`;
|
|
151
|
-
} else {
|
|
152
|
-
pattern = `(?<${cleanedKey}>[^/]+?)`;
|
|
153
|
-
}
|
|
154
|
-
return {
|
|
155
|
-
key,
|
|
156
|
-
pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
|
|
157
|
-
cleanedKey: cleanedKey,
|
|
158
|
-
optional,
|
|
159
|
-
repeat
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
|
|
163
|
-
names: {},
|
|
164
|
-
intercepted: {}
|
|
165
|
-
}) {
|
|
166
|
-
const getSafeRouteKey = buildGetSafeRouteKey();
|
|
167
|
-
const routeKeys = {};
|
|
168
|
-
const segments = [];
|
|
169
|
-
const inverseParts = [];
|
|
170
|
-
// Ensure we don't mutate the original reference object.
|
|
171
|
-
reference = structuredClone(reference);
|
|
172
|
-
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split('/')){
|
|
173
|
-
const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>segment.startsWith(m));
|
|
174
|
-
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN) // Check for parameters
|
|
175
|
-
;
|
|
176
|
-
const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : undefined;
|
|
177
|
-
let keyPrefix;
|
|
178
|
-
if (interceptionMarker && paramMatches?.[2]) {
|
|
179
|
-
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : undefined;
|
|
180
|
-
reference.intercepted[paramMatches[2]] = interceptionMarker;
|
|
181
|
-
} else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
|
|
182
|
-
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : undefined;
|
|
183
|
-
} else {
|
|
184
|
-
keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : undefined;
|
|
185
|
-
}
|
|
186
|
-
if (interceptionMarker && paramMatches && paramMatches[2]) {
|
|
187
|
-
// If there's an interception marker, add it to the segments.
|
|
188
|
-
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
|
|
189
|
-
getSafeRouteKey,
|
|
190
|
-
interceptionMarker,
|
|
191
|
-
segment: paramMatches[2],
|
|
192
|
-
routeKeys,
|
|
193
|
-
keyPrefix,
|
|
194
|
-
backreferenceDuplicateKeys
|
|
195
|
-
});
|
|
196
|
-
segments.push(pattern);
|
|
197
|
-
inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? '*' : '+' : ''}`);
|
|
198
|
-
reference.names[key] ??= cleanedKey;
|
|
199
|
-
} else if (paramMatches && paramMatches[2]) {
|
|
200
|
-
// If there's a prefix, add it to the segments if it's enabled.
|
|
201
|
-
if (includePrefix && paramMatches[1]) {
|
|
202
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
|
|
203
|
-
inverseParts.push(`/${paramMatches[1]}`);
|
|
204
|
-
}
|
|
205
|
-
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
|
|
206
|
-
getSafeRouteKey,
|
|
207
|
-
segment: paramMatches[2],
|
|
208
|
-
routeKeys,
|
|
209
|
-
keyPrefix,
|
|
210
|
-
backreferenceDuplicateKeys
|
|
211
|
-
});
|
|
212
|
-
// Remove the leading slash if includePrefix already added it.
|
|
213
|
-
let s = pattern;
|
|
214
|
-
if (includePrefix && paramMatches[1]) {
|
|
215
|
-
s = s.substring(1);
|
|
216
|
-
}
|
|
217
|
-
segments.push(s);
|
|
218
|
-
inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? '*' : '+' : ''}`);
|
|
219
|
-
reference.names[key] ??= cleanedKey;
|
|
220
|
-
} else {
|
|
221
|
-
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
|
|
222
|
-
inverseParts.push(`/${segment}`);
|
|
223
|
-
}
|
|
224
|
-
// If there's a suffix, add it to the segments if it's enabled.
|
|
225
|
-
if (includeSuffix && paramMatches && paramMatches[3]) {
|
|
226
|
-
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
|
|
227
|
-
inverseParts.push(paramMatches[3]);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return {
|
|
231
|
-
namedParameterizedRoute: segments.join(''),
|
|
232
|
-
routeKeys,
|
|
233
|
-
pathToRegexpPattern: inverseParts.join(''),
|
|
234
|
-
reference
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function getNamedRouteRegex(normalizedRoute, options) {
|
|
238
|
-
const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
|
|
239
|
-
let namedRegex = result.namedParameterizedRoute;
|
|
240
|
-
if (!options.excludeOptionalTrailingSlash) {
|
|
241
|
-
namedRegex += '(?:/)?';
|
|
242
|
-
}
|
|
243
|
-
return {
|
|
244
|
-
...getRouteRegex(normalizedRoute, options),
|
|
245
|
-
namedRegex: `^${namedRegex}$`,
|
|
246
|
-
routeKeys: result.routeKeys,
|
|
247
|
-
pathToRegexpPattern: result.pathToRegexpPattern,
|
|
248
|
-
reference: result.reference
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
function getNamedMiddlewareRegex(normalizedRoute, options) {
|
|
252
|
-
const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
|
|
253
|
-
const { catchAll = true } = options;
|
|
254
|
-
if (parameterizedRoute === '/') {
|
|
255
|
-
let catchAllRegex = catchAll ? '.*' : '';
|
|
256
|
-
return {
|
|
257
|
-
namedRegex: `^/${catchAllRegex}$`
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, undefined);
|
|
261
|
-
let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : '';
|
|
262
|
-
return {
|
|
263
|
-
namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
} (routeRegex.__exports));
|
|
269
|
-
return routeRegex.__exports;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
exports.__require = requireRouteRegex;
|