math-main-components 0.0.196 → 0.0.198
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/Accordeon/Accordeon.d.ts +4 -1
- package/dist/components/Accordeon/Accordeon.stories.d.ts +13 -0
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.stories.d.ts +13 -0
- package/dist/components/{AuthButton/AuthButton.d.ts → Button2/Button2.d.ts} +2 -2
- package/dist/components/Button2/Button2.stories.d.ts +13 -0
- package/dist/components/Button2/index.d.ts +1 -0
- package/dist/components/CardButton/CardButton.d.ts +3 -3
- package/dist/components/CardButton/CardButton.stories.d.ts +13 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/components/ChooseRole/ChooseRole.d.ts +3 -4
- package/dist/components/ChooseRole/ChooseRole.stories.d.ts +13 -0
- package/dist/components/ChooseRole/index.d.ts +1 -1
- package/dist/components/CopyCode/CopyCode.d.ts +3 -4
- package/dist/components/CopyCode/CopyCode.stories.d.ts +13 -0
- package/dist/components/EmptyCard/EmptyCard.stories.d.ts +13 -0
- package/dist/components/FormButton/FormButton.d.ts +4 -4
- package/dist/components/FormButton/FormButton.stories.d.ts +13 -0
- package/dist/components/FormText/FormText.stories.d.ts +13 -0
- package/dist/components/ForwardButton/ForwardButton.stories.d.ts +13 -0
- package/dist/index.cjs.js +39 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +39 -47
- package/dist/styles/font.scss +5 -0
- package/dist/styles/material-symbols.scss +24 -0
- package/dist/styles/theme-colors.scss +164 -0
- package/dist/styles/theme-styles.scss +8 -0
- package/package.json +19 -3
- package/styles/font.scss +11 -0
- package/styles/material-symbols.scss +24 -0
- package/styles/theme-colors.scss +164 -0
- package/styles/theme-styles.scss +8 -0
- package/dist/_virtual/_interop_require_default.cjs.js +0 -3
- package/dist/_virtual/_interop_require_wildcard.cjs.js +0 -3
- package/dist/_virtual/add-base-path.js +0 -3
- package/dist/_virtual/add-locale.js +0 -3
- package/dist/_virtual/add-locale2.js +0 -3
- package/dist/_virtual/add-path-prefix.js +0 -3
- package/dist/_virtual/add-path-suffix.js +0 -3
- package/dist/_virtual/app-paths.js +0 -3
- package/dist/_virtual/app-router-context.shared-runtime.js +0 -3
- package/dist/_virtual/app-router-headers.js +0 -3
- package/dist/_virtual/bloom-filter.js +0 -3
- package/dist/_virtual/compare-states.js +0 -3
- package/dist/_virtual/denormalize-page-path.js +0 -3
- package/dist/_virtual/detect-domain-locale.js +0 -3
- package/dist/_virtual/detect-domain-locale2.js +0 -3
- package/dist/_virtual/ensure-leading-slash.js +0 -3
- package/dist/_virtual/escape-regexp.js +0 -3
- package/dist/_virtual/format-next-pathname-info.js +0 -3
- package/dist/_virtual/format-url.js +0 -3
- package/dist/_virtual/get-asset-path-from-route.js +0 -3
- package/dist/_virtual/get-cookie-parser.js +0 -3
- package/dist/_virtual/get-domain-locale.js +0 -3
- package/dist/_virtual/get-next-pathname-info.js +0 -3
- package/dist/_virtual/handle-smooth-scroll.js +0 -3
- package/dist/_virtual/has-base-path.js +0 -3
- package/dist/_virtual/head-manager-context.shared-runtime.js +0 -3
- package/dist/_virtual/head-manager.js +0 -3
- package/dist/_virtual/index.js +0 -3
- package/dist/_virtual/index2.js +0 -3
- package/dist/_virtual/index3.js +0 -3
- package/dist/_virtual/index4.js +0 -3
- package/dist/_virtual/index5.js +0 -3
- package/dist/_virtual/interception-routes.js +0 -3
- package/dist/_virtual/interpolate-as.js +0 -3
- package/dist/_virtual/is-api-route.js +0 -3
- package/dist/_virtual/is-bot.js +0 -3
- package/dist/_virtual/is-dynamic.js +0 -3
- package/dist/_virtual/is-error.js +0 -3
- package/dist/_virtual/is-local-url.js +0 -3
- package/dist/_virtual/is-plain-object.js +0 -3
- package/dist/_virtual/link.js +0 -3
- package/dist/_virtual/link2.js +0 -3
- package/dist/_virtual/mitt.js +0 -3
- package/dist/_virtual/normalize-locale-path.js +0 -3
- package/dist/_virtual/normalize-locale-path2.js +0 -3
- package/dist/_virtual/normalize-path-sep.js +0 -3
- package/dist/_virtual/normalize-trailing-slash.js +0 -3
- package/dist/_virtual/omit.js +0 -3
- package/dist/_virtual/parse-path.js +0 -3
- package/dist/_virtual/parse-relative-url.js +0 -3
- package/dist/_virtual/parse-url.js +0 -3
- package/dist/_virtual/path-has-prefix.js +0 -3
- package/dist/_virtual/path-match.js +0 -3
- package/dist/_virtual/prepare-destination.js +0 -3
- package/dist/_virtual/querystring.js +0 -3
- package/dist/_virtual/react-is.development.js +0 -3
- package/dist/_virtual/react-is.production.min.js +0 -3
- package/dist/_virtual/remove-base-path.js +0 -3
- package/dist/_virtual/remove-locale.js +0 -3
- package/dist/_virtual/remove-path-prefix.js +0 -3
- package/dist/_virtual/remove-trailing-slash.js +0 -3
- package/dist/_virtual/request-idle-callback.js +0 -3
- package/dist/_virtual/resolve-href.js +0 -3
- package/dist/_virtual/resolve-rewrites.js +0 -3
- package/dist/_virtual/route-loader.js +0 -3
- package/dist/_virtual/route-matcher.js +0 -3
- package/dist/_virtual/route-regex.js +0 -3
- package/dist/_virtual/router-context.shared-runtime.js +0 -3
- package/dist/_virtual/router-reducer-types.js +0 -3
- package/dist/_virtual/router.js +0 -3
- package/dist/_virtual/router2.js +0 -3
- package/dist/_virtual/router3.js +0 -3
- package/dist/_virtual/script.js +0 -3
- package/dist/_virtual/segment.js +0 -3
- package/dist/_virtual/sorted-routes.js +0 -3
- package/dist/_virtual/trusted-types.js +0 -3
- package/dist/_virtual/use-intersection.js +0 -3
- package/dist/_virtual/utils.js +0 -3
- package/dist/_virtual/with-router.js +0 -3
- package/dist/components/Accordeon/Accordeon.types.d.ts +0 -4
- package/dist/components/AuthButton/index.d.ts +0 -1
- package/dist/components/Dialog/Dialog.types.d.ts +0 -7
- package/dist/components/PrimaryButton/PrimaryButton.d.ts +0 -8
- package/dist/components/PrimaryButton/index.d.ts +0 -1
- package/dist/components/SvgIcon/SvgIcon.types.d.ts +0 -8
- package/dist/components/index.d.ts +0 -31
- package/dist/components/useDimensions.d.ts +0 -4
- package/dist/components/useOrientation.d.ts +0 -3
- package/dist/components/useScroll.d.ts +0 -4
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.cjs.js +0 -7
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs.js +0 -48
- package/dist/node_modules/clsx/dist/clsx.m.js +0 -3
- package/dist/node_modules/external-svg-loader/dist/svg-loader.min.js +0 -1
- package/dist/node_modules/next/dist/client/add-base-path.js +0 -38
- package/dist/node_modules/next/dist/client/add-locale.js +0 -42
- package/dist/node_modules/next/dist/client/components/app-router-headers.js +0 -78
- package/dist/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -69
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -39
- package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -51
- package/dist/node_modules/next/dist/client/has-base-path.js +0 -36
- package/dist/node_modules/next/dist/client/head-manager.js +0 -212
- package/dist/node_modules/next/dist/client/link.js +0 -431
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -40
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -50
- package/dist/node_modules/next/dist/client/remove-base-path.js +0 -45
- package/dist/node_modules/next/dist/client/remove-locale.js +0 -41
- package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -52
- package/dist/node_modules/next/dist/client/resolve-href.js +0 -99
- package/dist/node_modules/next/dist/client/route-loader.js +0 -327
- package/dist/node_modules/next/dist/client/router.js +0 -202
- package/dist/node_modules/next/dist/client/script.js +0 -353
- package/dist/node_modules/next/dist/client/trusted-types.js +0 -54
- package/dist/node_modules/next/dist/client/use-intersection.js +0 -129
- package/dist/node_modules/next/dist/client/with-router.js +0 -52
- package/dist/node_modules/next/dist/compiled/cookie/index.js +0 -18
- package/dist/node_modules/next/dist/compiled/gzip-size/index.js +0 -15
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -416
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +0 -230
- package/dist/node_modules/next/dist/compiled/react-is/cjs/react-is.production.min.js +0 -26
- package/dist/node_modules/next/dist/compiled/react-is/index.js +0 -21
- package/dist/node_modules/next/dist/lib/is-api-route.js +0 -27
- package/dist/node_modules/next/dist/lib/is-error.js +0 -53
- package/dist/node_modules/next/dist/server/api-utils/get-cookie-parser.js +0 -35
- package/dist/node_modules/next/dist/server/future/helpers/interception-routes.js +0 -97
- package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +0 -63
- package/dist/node_modules/next/dist/shared/lib/bloom-filter.js +0 -96
- 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.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -38
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/is-plain-object.js +0 -50
- package/dist/node_modules/next/dist/shared/lib/mitt.js +0 -57
- 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.js +0 -32
- 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.js +0 -1771
- 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.js +0 -33
- 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.js +0 -61
- 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/format-next-pathname-info.js +0 -43
- 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.js +0 -29
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +0 -69
- package/dist/node_modules/next/dist/shared/lib/router/utils/handle-smooth-scroll.js +0 -49
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -36
- 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.js +0 -27
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -28
- 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.js +0 -33
- 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.js +0 -43
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-url.js +0 -44
- 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.js +0 -62
- package/dist/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +0 -245
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -80
- 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.js +0 -35
- 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-matcher.js +0 -53
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -200
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -182
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -28
- package/dist/node_modules/next/dist/shared/lib/utils.js +0 -196
- package/dist/node_modules/next/link.js +0 -7
- package/dist/node_modules/next/router.js +0 -6
- package/dist/node_modules/react-toastify/dist/react-toastify.esm.mjs.js +0 -7
- package/dist/node_modules/style-inject/dist/style-inject.es.js +0 -28
- package/dist/services/prisma.service.d.ts +0 -2
- package/dist/src/components/Accordeon/Accordeon.js +0 -14
- package/dist/src/components/Accordeon/styles.module.scss.js +0 -7
- package/dist/src/components/AuthButton/styles.module.scss.js +0 -4
- package/dist/src/components/CardButton/styles.module.scss.js +0 -4
- package/dist/src/components/Checkbox/styles.module.scss.js +0 -4
- package/dist/src/components/ChooseRole/styles.module.scss.js +0 -4
- package/dist/src/components/CopyCode/styles.module.scss.js +0 -4
- package/dist/src/components/Dialog/Dialog.js +0 -14
- package/dist/src/components/Dialog/styles.module.scss.js +0 -7
- package/dist/src/components/FormButton/styles.module.scss.js +0 -4
- package/dist/src/components/FormText/styles.module.scss.js +0 -4
- package/dist/src/components/ForwardButton/styles.module.scss.js +0 -4
- package/dist/src/components/Gap/Gap.js +0 -7
- package/dist/src/components/InputMail/styles.module.scss.js +0 -4
- package/dist/src/components/InputNames/styles.module.scss.js +0 -4
- package/dist/src/components/InputNumber/styles.module.scss.js +0 -4
- package/dist/src/components/InputPassword/styles.module.scss.js +0 -4
- package/dist/src/components/InputPin/styles.module.scss.js +0 -4
- package/dist/src/components/InputText/styles.module.scss.js +0 -4
- package/dist/src/components/OptionField/styles.module.scss.js +0 -4
- package/dist/src/components/OptionFieldHorizontal/styles.module.scss.js +0 -4
- package/dist/src/components/PrimaryButton/styles.module.scss.js +0 -4
- package/dist/src/components/ProgressBar/styles.module.scss.js +0 -4
- package/dist/src/components/RadioButtons/styles.module.scss.js +0 -4
- package/dist/src/components/RedirectButton/styles.module.scss.js +0 -4
- package/dist/src/components/SearchChips/styles.module.scss.js +0 -4
- package/dist/src/components/Searchbar/styles.module.scss.js +0 -4
- package/dist/src/components/Slider/styles.module.scss.js +0 -4
- package/dist/src/components/StepBack/styles.module.scss.js +0 -4
- package/dist/src/components/SvgIcon/SvgIcon.js +0 -9
- package/dist/src/components/Table/Table.js +0 -12
- package/dist/src/components/Table/styles.module.scss.js +0 -4
- package/dist/src/components/TextWithIcon/styles.module.scss.js +0 -4
- package/dist/src/components/UsageCard/styles.module.scss.js +0 -4
- package/dist/src/index.js +0 -36
- package/dist/types/Concept.d.ts +0 -7
- package/dist/types/Content.d.ts +0 -15
- package/dist/types/CourseAnnouncement.d.ts +0 -13
- package/dist/types/CourseAnnouncementAsset.d.ts +0 -22
- package/dist/types/CourseAnnouncementAssset.d.ts +0 -21
- package/dist/types/CourseMessage.d.ts +0 -13
- package/dist/types/CourseParticipant.d.ts +0 -9
- package/dist/types/CoursePin.d.ts +0 -8
- package/dist/types/File.d.ts +0 -13
- package/dist/types/HelpData.d.ts +0 -8
- package/dist/types/News.d.ts +0 -13
- package/dist/types/OrganizationMember.d.ts +0 -12
- package/dist/types/Page.d.ts +0 -8
- package/dist/types/ProductFeature.d.ts +0 -8
- package/dist/types/ProductLimit.d.ts +0 -8
- package/dist/types/PublicUser.d.ts +0 -7
- package/dist/types/index.d.ts +0 -2
- package/dist/types/marketing/BenefitForIndividuals.d.ts +0 -9
- package/dist/types/marketing/BenefitForSchools.d.ts +0 -9
- package/dist/types/marketing/Page.d.ts +0 -8
- package/dist/types/marketing/WebsiteData.d.ts +0 -23
@@ -1,431 +0,0 @@
|
|
1
|
-
import { l as link } from '../../../../_virtual/link2.js';
|
2
|
-
import '../../../@swc/helpers/cjs/_interop_require_default.cjs.js';
|
3
|
-
import React from 'react';
|
4
|
-
import { __require as requireResolveHref } from './resolve-href.js';
|
5
|
-
import { __require as requireIsLocalUrl } from '../shared/lib/router/utils/is-local-url.js';
|
6
|
-
import { __require as requireFormatUrl } from '../shared/lib/router/utils/format-url.js';
|
7
|
-
import { __require as requireUtils } from '../shared/lib/utils.js';
|
8
|
-
import { __require as requireAddLocale } from './add-locale.js';
|
9
|
-
import { __require as requireRouterContext_sharedRuntime } from '../shared/lib/router-context.shared-runtime.js';
|
10
|
-
import { __require as requireAppRouterContext_sharedRuntime } from '../shared/lib/app-router-context.shared-runtime.js';
|
11
|
-
import { __require as requireUseIntersection } from './use-intersection.js';
|
12
|
-
import { __require as requireGetDomainLocale } from './get-domain-locale.js';
|
13
|
-
import { __require as requireAddBasePath } from './add-base-path.js';
|
14
|
-
import { __require as requireRouterReducerTypes } from './components/router-reducer/router-reducer-types.js';
|
15
|
-
import { __exports as _interop_require_default } from '../../../../_virtual/_interop_require_default.cjs.js';
|
16
|
-
|
17
|
-
(function (module, exports) {
|
18
|
-
"use client";
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
20
|
-
value: true
|
21
|
-
});
|
22
|
-
Object.defineProperty(exports, "default", {
|
23
|
-
enumerable: true,
|
24
|
-
get: function() {
|
25
|
-
return _default;
|
26
|
-
}
|
27
|
-
});
|
28
|
-
const _interop_require_default$1 = _interop_require_default;
|
29
|
-
const _react = /*#__PURE__*/ _interop_require_default$1._(React);
|
30
|
-
const _resolvehref = requireResolveHref();
|
31
|
-
const _islocalurl = requireIsLocalUrl();
|
32
|
-
const _formaturl = requireFormatUrl();
|
33
|
-
const _utils = requireUtils();
|
34
|
-
const _addlocale = requireAddLocale();
|
35
|
-
const _routercontextsharedruntime = requireRouterContext_sharedRuntime();
|
36
|
-
const _approutercontextsharedruntime = requireAppRouterContext_sharedRuntime();
|
37
|
-
const _useintersection = requireUseIntersection();
|
38
|
-
const _getdomainlocale = requireGetDomainLocale();
|
39
|
-
const _addbasepath = requireAddBasePath();
|
40
|
-
const _routerreducertypes = requireRouterReducerTypes();
|
41
|
-
const prefetched = new Set();
|
42
|
-
function prefetch(router, href, as, options, appOptions, isAppRouter) {
|
43
|
-
if (typeof window === "undefined") {
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
// app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.
|
47
|
-
if (!isAppRouter && !(0, _islocalurl.isLocalURL)(href)) {
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
// We should only dedupe requests when experimental.optimisticClientCache is
|
51
|
-
// disabled.
|
52
|
-
if (!options.bypassPrefetchedCheck) {
|
53
|
-
const locale = // Let the link's locale prop override the default router locale.
|
54
|
-
typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : undefined;
|
55
|
-
const prefetchedKey = href + "%" + as + "%" + locale;
|
56
|
-
// If we've already fetched the key, then don't prefetch it again!
|
57
|
-
if (prefetched.has(prefetchedKey)) {
|
58
|
-
return;
|
59
|
-
}
|
60
|
-
// Mark this URL as prefetched.
|
61
|
-
prefetched.add(prefetchedKey);
|
62
|
-
}
|
63
|
-
const prefetchPromise = isAppRouter ? router.prefetch(href, appOptions) : router.prefetch(href, as, options);
|
64
|
-
// Prefetch the JSON page if asked (only in the client)
|
65
|
-
// We need to handle a prefetch error here since we may be
|
66
|
-
// loading with priority which can reject but we don't
|
67
|
-
// want to force navigation since this is only a prefetch
|
68
|
-
Promise.resolve(prefetchPromise).catch((err)=>{
|
69
|
-
if (process.env.NODE_ENV !== "production") {
|
70
|
-
// rethrow to show invalid URL errors
|
71
|
-
throw err;
|
72
|
-
}
|
73
|
-
});
|
74
|
-
}
|
75
|
-
function isModifiedEvent(event) {
|
76
|
-
const eventTarget = event.currentTarget;
|
77
|
-
const target = eventTarget.getAttribute("target");
|
78
|
-
return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download
|
79
|
-
event.nativeEvent && event.nativeEvent.which === 2;
|
80
|
-
}
|
81
|
-
function linkClicked(e, router, href, as, replace, shallow, scroll, locale, isAppRouter, prefetchEnabled) {
|
82
|
-
const { nodeName } = e.currentTarget;
|
83
|
-
// anchors inside an svg have a lowercase nodeName
|
84
|
-
const isAnchorNodeName = nodeName.toUpperCase() === "A";
|
85
|
-
if (isAnchorNodeName && (isModifiedEvent(e) || // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.
|
86
|
-
!isAppRouter && !(0, _islocalurl.isLocalURL)(href))) {
|
87
|
-
// ignore click for browser’s default behavior
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
e.preventDefault();
|
91
|
-
const navigate = ()=>{
|
92
|
-
// If the router is an NextRouter instance it will have `beforePopState`
|
93
|
-
const routerScroll = scroll != null ? scroll : true;
|
94
|
-
if ("beforePopState" in router) {
|
95
|
-
router[replace ? "replace" : "push"](href, as, {
|
96
|
-
shallow,
|
97
|
-
locale,
|
98
|
-
scroll: routerScroll
|
99
|
-
});
|
100
|
-
} else {
|
101
|
-
router[replace ? "replace" : "push"](as || href, {
|
102
|
-
forceOptimisticNavigation: !prefetchEnabled,
|
103
|
-
scroll: routerScroll
|
104
|
-
});
|
105
|
-
}
|
106
|
-
};
|
107
|
-
if (isAppRouter) {
|
108
|
-
_react.default.startTransition(navigate);
|
109
|
-
} else {
|
110
|
-
navigate();
|
111
|
-
}
|
112
|
-
}
|
113
|
-
function formatStringOrUrl(urlObjOrString) {
|
114
|
-
if (typeof urlObjOrString === "string") {
|
115
|
-
return urlObjOrString;
|
116
|
-
}
|
117
|
-
return (0, _formaturl.formatUrl)(urlObjOrString);
|
118
|
-
}
|
119
|
-
/**
|
120
|
-
* React Component that enables client-side transitions between routes.
|
121
|
-
*/ const Link = /*#__PURE__*/ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
|
122
|
-
let children;
|
123
|
-
const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
|
124
|
-
children = childrenProp;
|
125
|
-
if (legacyBehavior && (typeof children === "string" || typeof children === "number")) {
|
126
|
-
children = /*#__PURE__*/ _react.default.createElement("a", null, children);
|
127
|
-
}
|
128
|
-
const pagesRouter = _react.default.useContext(_routercontextsharedruntime.RouterContext);
|
129
|
-
const appRouter = _react.default.useContext(_approutercontextsharedruntime.AppRouterContext);
|
130
|
-
const router = pagesRouter != null ? pagesRouter : appRouter;
|
131
|
-
// We're in the app directory if there is no pages router.
|
132
|
-
const isAppRouter = !pagesRouter;
|
133
|
-
const prefetchEnabled = prefetchProp !== false;
|
134
|
-
/**
|
135
|
-
* The possible states for prefetch are:
|
136
|
-
* - null: this is the default "auto" mode, where we will prefetch partially if the link is in the viewport
|
137
|
-
* - true: we will prefetch if the link is visible and prefetch the full page, not just partially
|
138
|
-
* - false: we will not prefetch if in the viewport at all
|
139
|
-
*/ const appPrefetchKind = prefetchProp === null ? _routerreducertypes.PrefetchKind.AUTO : _routerreducertypes.PrefetchKind.FULL;
|
140
|
-
if (process.env.NODE_ENV !== "production") {
|
141
|
-
function createPropError(args) {
|
142
|
-
return new Error("Failed prop type: The prop `" + args.key + "` expects a " + args.expected + " in `<Link>`, but got `" + args.actual + "` instead." + (typeof window !== "undefined" ? "\nOpen your browser's console to view the Component stack trace." : ""));
|
143
|
-
}
|
144
|
-
// TypeScript trick for type-guarding:
|
145
|
-
const requiredPropsGuard = {
|
146
|
-
href: true
|
147
|
-
};
|
148
|
-
const requiredProps = Object.keys(requiredPropsGuard);
|
149
|
-
requiredProps.forEach((key)=>{
|
150
|
-
if (key === "href") {
|
151
|
-
if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") {
|
152
|
-
throw createPropError({
|
153
|
-
key,
|
154
|
-
expected: "`string` or `object`",
|
155
|
-
actual: props[key] === null ? "null" : typeof props[key]
|
156
|
-
});
|
157
|
-
}
|
158
|
-
}
|
159
|
-
});
|
160
|
-
// TypeScript trick for type-guarding:
|
161
|
-
const optionalPropsGuard = {
|
162
|
-
as: true,
|
163
|
-
replace: true,
|
164
|
-
scroll: true,
|
165
|
-
shallow: true,
|
166
|
-
passHref: true,
|
167
|
-
prefetch: true,
|
168
|
-
locale: true,
|
169
|
-
onClick: true,
|
170
|
-
onMouseEnter: true,
|
171
|
-
onTouchStart: true,
|
172
|
-
legacyBehavior: true
|
173
|
-
};
|
174
|
-
const optionalProps = Object.keys(optionalPropsGuard);
|
175
|
-
optionalProps.forEach((key)=>{
|
176
|
-
const valType = typeof props[key];
|
177
|
-
if (key === "as") {
|
178
|
-
if (props[key] && valType !== "string" && valType !== "object") {
|
179
|
-
throw createPropError({
|
180
|
-
key,
|
181
|
-
expected: "`string` or `object`",
|
182
|
-
actual: valType
|
183
|
-
});
|
184
|
-
}
|
185
|
-
} else if (key === "locale") {
|
186
|
-
if (props[key] && valType !== "string") {
|
187
|
-
throw createPropError({
|
188
|
-
key,
|
189
|
-
expected: "`string`",
|
190
|
-
actual: valType
|
191
|
-
});
|
192
|
-
}
|
193
|
-
} else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart") {
|
194
|
-
if (props[key] && valType !== "function") {
|
195
|
-
throw createPropError({
|
196
|
-
key,
|
197
|
-
expected: "`function`",
|
198
|
-
actual: valType
|
199
|
-
});
|
200
|
-
}
|
201
|
-
} else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "prefetch" || key === "legacyBehavior") {
|
202
|
-
if (props[key] != null && valType !== "boolean") {
|
203
|
-
throw createPropError({
|
204
|
-
key,
|
205
|
-
expected: "`boolean`",
|
206
|
-
actual: valType
|
207
|
-
});
|
208
|
-
}
|
209
|
-
} else ;
|
210
|
-
});
|
211
|
-
// This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes
|
212
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
213
|
-
const hasWarned = _react.default.useRef(false);
|
214
|
-
if (props.prefetch && !hasWarned.current && !isAppRouter) {
|
215
|
-
hasWarned.current = true;
|
216
|
-
console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated");
|
217
|
-
}
|
218
|
-
}
|
219
|
-
if (process.env.NODE_ENV !== "production") {
|
220
|
-
if (isAppRouter && !asProp) {
|
221
|
-
let href;
|
222
|
-
if (typeof hrefProp === "string") {
|
223
|
-
href = hrefProp;
|
224
|
-
} else if (typeof hrefProp === "object" && typeof hrefProp.pathname === "string") {
|
225
|
-
href = hrefProp.pathname;
|
226
|
-
}
|
227
|
-
if (href) {
|
228
|
-
const hasDynamicSegment = href.split("/").some((segment)=>segment.startsWith("[") && segment.endsWith("]"));
|
229
|
-
if (hasDynamicSegment) {
|
230
|
-
throw new Error("Dynamic href `" + href + "` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href");
|
231
|
-
}
|
232
|
-
}
|
233
|
-
}
|
234
|
-
}
|
235
|
-
const { href, as } = _react.default.useMemo(()=>{
|
236
|
-
if (!pagesRouter) {
|
237
|
-
const resolvedHref = formatStringOrUrl(hrefProp);
|
238
|
-
return {
|
239
|
-
href: resolvedHref,
|
240
|
-
as: asProp ? formatStringOrUrl(asProp) : resolvedHref
|
241
|
-
};
|
242
|
-
}
|
243
|
-
const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(pagesRouter, hrefProp, true);
|
244
|
-
return {
|
245
|
-
href: resolvedHref,
|
246
|
-
as: asProp ? (0, _resolvehref.resolveHref)(pagesRouter, asProp) : resolvedAs || resolvedHref
|
247
|
-
};
|
248
|
-
}, [
|
249
|
-
pagesRouter,
|
250
|
-
hrefProp,
|
251
|
-
asProp
|
252
|
-
]);
|
253
|
-
const previousHref = _react.default.useRef(href);
|
254
|
-
const previousAs = _react.default.useRef(as);
|
255
|
-
// This will return the first child, if multiple are provided it will throw an error
|
256
|
-
let child;
|
257
|
-
if (legacyBehavior) {
|
258
|
-
if (process.env.NODE_ENV === "development") {
|
259
|
-
if (onClick) {
|
260
|
-
console.warn('"onClick" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link');
|
261
|
-
}
|
262
|
-
if (onMouseEnterProp) {
|
263
|
-
console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + hrefProp + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
|
264
|
-
}
|
265
|
-
try {
|
266
|
-
child = _react.default.Children.only(children);
|
267
|
-
} catch (err) {
|
268
|
-
if (!children) {
|
269
|
-
throw new Error("No children were passed to <Link> with `href` of `" + hrefProp + "` but one child is required https://nextjs.org/docs/messages/link-no-children");
|
270
|
-
}
|
271
|
-
throw new Error("Multiple children were passed to <Link> with `href` of `" + hrefProp + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window !== "undefined" ? " \nOpen your browser's console to view the Component stack trace." : ""));
|
272
|
-
}
|
273
|
-
} else {
|
274
|
-
child = _react.default.Children.only(children);
|
275
|
-
}
|
276
|
-
} else {
|
277
|
-
if (process.env.NODE_ENV === "development") {
|
278
|
-
if ((children == null ? void 0 : children.type) === "a") {
|
279
|
-
throw new Error("Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor");
|
280
|
-
}
|
281
|
-
}
|
282
|
-
}
|
283
|
-
const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
|
284
|
-
const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({
|
285
|
-
rootMargin: "200px"
|
286
|
-
});
|
287
|
-
const setRef = _react.default.useCallback((el)=>{
|
288
|
-
// Before the link getting observed, check if visible state need to be reset
|
289
|
-
if (previousAs.current !== as || previousHref.current !== href) {
|
290
|
-
resetVisible();
|
291
|
-
previousAs.current = as;
|
292
|
-
previousHref.current = href;
|
293
|
-
}
|
294
|
-
setIntersectionRef(el);
|
295
|
-
if (childRef) {
|
296
|
-
if (typeof childRef === "function") childRef(el);
|
297
|
-
else if (typeof childRef === "object") {
|
298
|
-
childRef.current = el;
|
299
|
-
}
|
300
|
-
}
|
301
|
-
}, [
|
302
|
-
as,
|
303
|
-
childRef,
|
304
|
-
href,
|
305
|
-
resetVisible,
|
306
|
-
setIntersectionRef
|
307
|
-
]);
|
308
|
-
// Prefetch the URL if we haven't already and it's visible.
|
309
|
-
_react.default.useEffect(()=>{
|
310
|
-
// in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.
|
311
|
-
if (process.env.NODE_ENV !== "production") {
|
312
|
-
return;
|
313
|
-
}
|
314
|
-
if (!router) {
|
315
|
-
return;
|
316
|
-
}
|
317
|
-
// If we don't need to prefetch the URL, don't do prefetch.
|
318
|
-
if (!isVisible || !prefetchEnabled) {
|
319
|
-
return;
|
320
|
-
}
|
321
|
-
// Prefetch the URL.
|
322
|
-
prefetch(router, href, as, {
|
323
|
-
locale
|
324
|
-
}, {
|
325
|
-
kind: appPrefetchKind
|
326
|
-
}, isAppRouter);
|
327
|
-
}, [
|
328
|
-
as,
|
329
|
-
href,
|
330
|
-
isVisible,
|
331
|
-
locale,
|
332
|
-
prefetchEnabled,
|
333
|
-
pagesRouter == null ? void 0 : pagesRouter.locale,
|
334
|
-
router,
|
335
|
-
isAppRouter,
|
336
|
-
appPrefetchKind
|
337
|
-
]);
|
338
|
-
const childProps = {
|
339
|
-
ref: setRef,
|
340
|
-
onClick (e) {
|
341
|
-
if (process.env.NODE_ENV !== "production") {
|
342
|
-
if (!e) {
|
343
|
-
throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');
|
344
|
-
}
|
345
|
-
}
|
346
|
-
if (!legacyBehavior && typeof onClick === "function") {
|
347
|
-
onClick(e);
|
348
|
-
}
|
349
|
-
if (legacyBehavior && child.props && typeof child.props.onClick === "function") {
|
350
|
-
child.props.onClick(e);
|
351
|
-
}
|
352
|
-
if (!router) {
|
353
|
-
return;
|
354
|
-
}
|
355
|
-
if (e.defaultPrevented) {
|
356
|
-
return;
|
357
|
-
}
|
358
|
-
linkClicked(e, router, href, as, replace, shallow, scroll, locale, isAppRouter, prefetchEnabled);
|
359
|
-
},
|
360
|
-
onMouseEnter (e) {
|
361
|
-
if (!legacyBehavior && typeof onMouseEnterProp === "function") {
|
362
|
-
onMouseEnterProp(e);
|
363
|
-
}
|
364
|
-
if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") {
|
365
|
-
child.props.onMouseEnter(e);
|
366
|
-
}
|
367
|
-
if (!router) {
|
368
|
-
return;
|
369
|
-
}
|
370
|
-
if ((!prefetchEnabled || process.env.NODE_ENV === "development") && isAppRouter) {
|
371
|
-
return;
|
372
|
-
}
|
373
|
-
prefetch(router, href, as, {
|
374
|
-
locale,
|
375
|
-
priority: true,
|
376
|
-
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
377
|
-
bypassPrefetchedCheck: true
|
378
|
-
}, {
|
379
|
-
kind: appPrefetchKind
|
380
|
-
}, isAppRouter);
|
381
|
-
},
|
382
|
-
onTouchStart (e) {
|
383
|
-
if (!legacyBehavior && typeof onTouchStartProp === "function") {
|
384
|
-
onTouchStartProp(e);
|
385
|
-
}
|
386
|
-
if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") {
|
387
|
-
child.props.onTouchStart(e);
|
388
|
-
}
|
389
|
-
if (!router) {
|
390
|
-
return;
|
391
|
-
}
|
392
|
-
if (!prefetchEnabled && isAppRouter) {
|
393
|
-
return;
|
394
|
-
}
|
395
|
-
prefetch(router, href, as, {
|
396
|
-
locale,
|
397
|
-
priority: true,
|
398
|
-
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
399
|
-
bypassPrefetchedCheck: true
|
400
|
-
}, {
|
401
|
-
kind: appPrefetchKind
|
402
|
-
}, isAppRouter);
|
403
|
-
}
|
404
|
-
};
|
405
|
-
// If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is
|
406
|
-
// defined, we specify the current 'href', so that repetition is not needed by the user.
|
407
|
-
// If the url is absolute, we can bypass the logic to prepend the domain and locale.
|
408
|
-
if ((0, _utils.isAbsoluteUrl)(as)) {
|
409
|
-
childProps.href = as;
|
410
|
-
} else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
|
411
|
-
const curLocale = typeof locale !== "undefined" ? locale : pagesRouter == null ? void 0 : pagesRouter.locale;
|
412
|
-
// we only render domain locales if we are currently on a domain locale
|
413
|
-
// so that locale links are still visitable in development/preview envs
|
414
|
-
const localeDomain = (pagesRouter == null ? void 0 : pagesRouter.isLocaleDomain) && (0, _getdomainlocale.getDomainLocale)(as, curLocale, pagesRouter == null ? void 0 : pagesRouter.locales, pagesRouter == null ? void 0 : pagesRouter.domainLocales);
|
415
|
-
childProps.href = localeDomain || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, pagesRouter == null ? void 0 : pagesRouter.defaultLocale));
|
416
|
-
}
|
417
|
-
return legacyBehavior ? /*#__PURE__*/ _react.default.cloneElement(child, childProps) : /*#__PURE__*/ _react.default.createElement("a", {
|
418
|
-
...restProps,
|
419
|
-
...childProps
|
420
|
-
}, children);
|
421
|
-
});
|
422
|
-
const _default = Link;
|
423
|
-
|
424
|
-
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
425
|
-
Object.defineProperty(exports.default, '__esModule', { value: true });
|
426
|
-
Object.assign(exports.default, exports);
|
427
|
-
module.exports = exports.default;
|
428
|
-
}
|
429
|
-
|
430
|
-
|
431
|
-
} (link, link.exports));
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { n as normalizeLocalePath } from '../../../../_virtual/normalize-locale-path.js';
|
2
|
-
import { __require as requireNormalizeLocalePath$1 } from '../shared/lib/i18n/normalize-locale-path.js';
|
3
|
-
|
4
|
-
var hasRequiredNormalizeLocalePath;
|
5
|
-
|
6
|
-
function requireNormalizeLocalePath () {
|
7
|
-
if (hasRequiredNormalizeLocalePath) return normalizeLocalePath.exports;
|
8
|
-
hasRequiredNormalizeLocalePath = 1;
|
9
|
-
(function (module, exports) {
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
11
|
-
value: true
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "normalizeLocalePath", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function() {
|
16
|
-
return normalizeLocalePath;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
const normalizeLocalePath = (pathname, locales)=>{
|
20
|
-
if (process.env.__NEXT_I18N_SUPPORT) {
|
21
|
-
return requireNormalizeLocalePath$1().normalizeLocalePath(pathname, locales);
|
22
|
-
}
|
23
|
-
return {
|
24
|
-
pathname,
|
25
|
-
detectedLocale: undefined
|
26
|
-
};
|
27
|
-
};
|
28
|
-
|
29
|
-
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
30
|
-
Object.defineProperty(exports.default, '__esModule', { value: true });
|
31
|
-
Object.assign(exports.default, exports);
|
32
|
-
module.exports = exports.default;
|
33
|
-
}
|
34
|
-
|
35
|
-
|
36
|
-
} (normalizeLocalePath, normalizeLocalePath.exports));
|
37
|
-
return normalizeLocalePath.exports;
|
38
|
-
}
|
39
|
-
|
40
|
-
export { requireNormalizeLocalePath as __require };
|
@@ -1,50 +0,0 @@
|
|
1
|
-
import { n as normalizeTrailingSlash } from '../../../../_virtual/normalize-trailing-slash.js';
|
2
|
-
import { __require as requireRemoveTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash.js';
|
3
|
-
import { __require as requireParsePath } from '../shared/lib/router/utils/parse-path.js';
|
4
|
-
|
5
|
-
var hasRequiredNormalizeTrailingSlash;
|
6
|
-
|
7
|
-
function requireNormalizeTrailingSlash () {
|
8
|
-
if (hasRequiredNormalizeTrailingSlash) return normalizeTrailingSlash.exports;
|
9
|
-
hasRequiredNormalizeTrailingSlash = 1;
|
10
|
-
(function (module, exports) {
|
11
|
-
Object.defineProperty(exports, "__esModule", {
|
12
|
-
value: true
|
13
|
-
});
|
14
|
-
Object.defineProperty(exports, "normalizePathTrailingSlash", {
|
15
|
-
enumerable: true,
|
16
|
-
get: function() {
|
17
|
-
return normalizePathTrailingSlash;
|
18
|
-
}
|
19
|
-
});
|
20
|
-
const _removetrailingslash = requireRemoveTrailingSlash();
|
21
|
-
const _parsepath = requireParsePath();
|
22
|
-
const normalizePathTrailingSlash = (path)=>{
|
23
|
-
if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) {
|
24
|
-
return path;
|
25
|
-
}
|
26
|
-
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
27
|
-
if (process.env.__NEXT_TRAILING_SLASH) {
|
28
|
-
if (/\.[^/]+\/?$/.test(pathname)) {
|
29
|
-
return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
|
30
|
-
} else if (pathname.endsWith("/")) {
|
31
|
-
return "" + pathname + query + hash;
|
32
|
-
} else {
|
33
|
-
return pathname + "/" + query + hash;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash;
|
37
|
-
};
|
38
|
-
|
39
|
-
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
40
|
-
Object.defineProperty(exports.default, '__esModule', { value: true });
|
41
|
-
Object.assign(exports.default, exports);
|
42
|
-
module.exports = exports.default;
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
} (normalizeTrailingSlash, normalizeTrailingSlash.exports));
|
47
|
-
return normalizeTrailingSlash.exports;
|
48
|
-
}
|
49
|
-
|
50
|
-
export { requireNormalizeTrailingSlash as __require };
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { r as removeBasePath } from '../../../../_virtual/remove-base-path.js';
|
2
|
-
import { __require as requireHasBasePath } from './has-base-path.js';
|
3
|
-
|
4
|
-
var hasRequiredRemoveBasePath;
|
5
|
-
|
6
|
-
function requireRemoveBasePath () {
|
7
|
-
if (hasRequiredRemoveBasePath) return removeBasePath.exports;
|
8
|
-
hasRequiredRemoveBasePath = 1;
|
9
|
-
(function (module, exports) {
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
11
|
-
value: true
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "removeBasePath", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function() {
|
16
|
-
return removeBasePath;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
const _hasbasepath = requireHasBasePath();
|
20
|
-
const basePath = process.env.__NEXT_ROUTER_BASEPATH || "";
|
21
|
-
function removeBasePath(path) {
|
22
|
-
if (process.env.__NEXT_MANUAL_CLIENT_BASE_PATH) {
|
23
|
-
if (!(0, _hasbasepath.hasBasePath)(path)) {
|
24
|
-
return path;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
// Can't trim the basePath if it has zero length!
|
28
|
-
if (basePath.length === 0) return path;
|
29
|
-
path = path.slice(basePath.length);
|
30
|
-
if (!path.startsWith("/")) path = "/" + path;
|
31
|
-
return path;
|
32
|
-
}
|
33
|
-
|
34
|
-
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
35
|
-
Object.defineProperty(exports.default, '__esModule', { value: true });
|
36
|
-
Object.assign(exports.default, exports);
|
37
|
-
module.exports = exports.default;
|
38
|
-
}
|
39
|
-
|
40
|
-
|
41
|
-
} (removeBasePath, removeBasePath.exports));
|
42
|
-
return removeBasePath.exports;
|
43
|
-
}
|
44
|
-
|
45
|
-
export { requireRemoveBasePath as __require };
|
@@ -1,41 +0,0 @@
|
|
1
|
-
import { r as removeLocale } from '../../../../_virtual/remove-locale.js';
|
2
|
-
import { __require as requireParsePath } from '../shared/lib/router/utils/parse-path.js';
|
3
|
-
|
4
|
-
var hasRequiredRemoveLocale;
|
5
|
-
|
6
|
-
function requireRemoveLocale () {
|
7
|
-
if (hasRequiredRemoveLocale) return removeLocale.exports;
|
8
|
-
hasRequiredRemoveLocale = 1;
|
9
|
-
(function (module, exports) {
|
10
|
-
Object.defineProperty(exports, "__esModule", {
|
11
|
-
value: true
|
12
|
-
});
|
13
|
-
Object.defineProperty(exports, "removeLocale", {
|
14
|
-
enumerable: true,
|
15
|
-
get: function() {
|
16
|
-
return removeLocale;
|
17
|
-
}
|
18
|
-
});
|
19
|
-
const _parsepath = requireParsePath();
|
20
|
-
function removeLocale(path, locale) {
|
21
|
-
if (process.env.__NEXT_I18N_SUPPORT) {
|
22
|
-
const { pathname } = (0, _parsepath.parsePath)(path);
|
23
|
-
const pathLower = pathname.toLowerCase();
|
24
|
-
const localeLower = locale == null ? void 0 : locale.toLowerCase();
|
25
|
-
return locale && (pathLower.startsWith("/" + localeLower + "/") || pathLower === "/" + localeLower) ? "" + (pathname.length === locale.length + 1 ? "/" : "") + path.slice(locale.length + 1) : path;
|
26
|
-
}
|
27
|
-
return path;
|
28
|
-
}
|
29
|
-
|
30
|
-
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
31
|
-
Object.defineProperty(exports.default, '__esModule', { value: true });
|
32
|
-
Object.assign(exports.default, exports);
|
33
|
-
module.exports = exports.default;
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
} (removeLocale, removeLocale.exports));
|
38
|
-
return removeLocale.exports;
|
39
|
-
}
|
40
|
-
|
41
|
-
export { requireRemoveLocale as __require };
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import { r as requestIdleCallback } from '../../../../_virtual/request-idle-callback.js';
|
2
|
-
|
3
|
-
var hasRequiredRequestIdleCallback;
|
4
|
-
|
5
|
-
function requireRequestIdleCallback () {
|
6
|
-
if (hasRequiredRequestIdleCallback) return requestIdleCallback.exports;
|
7
|
-
hasRequiredRequestIdleCallback = 1;
|
8
|
-
(function (module, exports) {
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
10
|
-
value: true
|
11
|
-
});
|
12
|
-
function _export(target, all) {
|
13
|
-
for(var name in all)Object.defineProperty(target, name, {
|
14
|
-
enumerable: true,
|
15
|
-
get: all[name]
|
16
|
-
});
|
17
|
-
}
|
18
|
-
_export(exports, {
|
19
|
-
requestIdleCallback: function() {
|
20
|
-
return requestIdleCallback;
|
21
|
-
},
|
22
|
-
cancelIdleCallback: function() {
|
23
|
-
return cancelIdleCallback;
|
24
|
-
}
|
25
|
-
});
|
26
|
-
const requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
|
27
|
-
let start = Date.now();
|
28
|
-
return self.setTimeout(function() {
|
29
|
-
cb({
|
30
|
-
didTimeout: false,
|
31
|
-
timeRemaining: function() {
|
32
|
-
return Math.max(0, 50 - (Date.now() - start));
|
33
|
-
}
|
34
|
-
});
|
35
|
-
}, 1);
|
36
|
-
};
|
37
|
-
const cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
|
38
|
-
return clearTimeout(id);
|
39
|
-
};
|
40
|
-
|
41
|
-
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
42
|
-
Object.defineProperty(exports.default, '__esModule', { value: true });
|
43
|
-
Object.assign(exports.default, exports);
|
44
|
-
module.exports = exports.default;
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
} (requestIdleCallback, requestIdleCallback.exports));
|
49
|
-
return requestIdleCallback.exports;
|
50
|
-
}
|
51
|
-
|
52
|
-
export { requireRequestIdleCallback as __require };
|