@repdf/preview 0.3.2 → 0.5.0
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/index.mjs +381 -0
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/build-manifest.json +27 -29
- package/dist/preview/.next/cache/.previewinfo +1 -0
- package/dist/preview/.next/cache/.rscinfo +1 -0
- package/dist/preview/.next/cache/.tsbuildinfo +1 -1
- package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/preview/.next/diagnostics/build-diagnostics.json +6 -0
- package/dist/preview/.next/diagnostics/framework.json +1 -0
- package/dist/preview/.next/export-marker.json +6 -1
- package/dist/preview/.next/images-manifest.json +67 -1
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +11 -1
- package/dist/preview/.next/react-loadable-manifest.json +2 -2
- package/dist/preview/.next/required-server-files.js +334 -0
- package/dist/preview/.next/required-server-files.json +334 -1
- package/dist/preview/.next/routes-manifest.json +105 -1
- package/dist/preview/.next/server/chunks/18.js +1 -0
- package/dist/preview/.next/server/chunks/504.js +1 -0
- package/dist/preview/.next/server/chunks/539.js +4 -0
- package/dist/preview/.next/server/chunks/619.js +6 -0
- package/dist/preview/.next/server/chunks/934.js +5 -0
- package/dist/preview/.next/server/chunks/937.js +19 -0
- package/dist/preview/.next/server/chunks/985.js +1 -0
- package/dist/preview/.next/server/dynamic-css-manifest.js +1 -0
- package/dist/preview/.next/server/functions-config-manifest.json +4 -1
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_error.js +1 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/component.js +4 -4
- package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js +2 -2
- package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +1 -1
- package/dist/preview/.next/server/pages/en/404.html +1 -1
- package/dist/preview/.next/server/pages/en/500.html +1 -1
- package/dist/preview/.next/server/pages/en/test.html +1 -1
- package/dist/preview/.next/server/pages/index.js +3 -3
- package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
- package/dist/preview/.next/server/pages/test.js.nft.json +1 -1
- package/dist/preview/.next/server/pages-manifest.json +13 -1
- package/dist/preview/.next/server/webpack-api-runtime.js +1 -1
- package/dist/preview/.next/server/webpack-runtime.js +1 -1
- package/dist/preview/.next/static/chunks/440-7f86160d543d19eb.js +1 -0
- package/dist/preview/.next/static/chunks/framework-c1a985c867714b4b.js +1 -0
- package/dist/preview/.next/static/chunks/main-3c8a75f1bd6d0687.js +5 -0
- package/dist/preview/.next/static/chunks/pages/_app-6411e6a26996cdef.js +182 -0
- package/dist/preview/.next/static/chunks/pages/_error-4911830c68e733ed.js +1 -0
- package/dist/preview/.next/static/chunks/pages/index-303e0eb1a2330d43.js +55 -0
- package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-9bf0ebcb9e9f9c65.js +1 -0
- package/dist/preview/.next/static/chunks/pages/test-787280cd6c1cdb85.js +1 -0
- package/dist/preview/.next/static/chunks/webpack-6f363cd1990801ba.js +1 -0
- package/dist/preview/.next/static/css/a1c9c82f00c72350.css +1 -0
- package/dist/preview/.next/static/uQjdkl4yTW6Zpf-3uNg2P/_buildManifest.js +1 -0
- package/dist/preview/.next/trace +9 -13
- package/dist/preview/.next/trace-build +1 -0
- package/dist/preview/.next/types/routes.d.ts +58 -0
- package/dist/preview/.next/types/validator.ts +97 -0
- package/package.json +47 -49
- package/dist/index.js +0 -248
- package/dist/preview/.next/server/chunks/239.js +0 -6
- package/dist/preview/.next/server/chunks/276.js +0 -1
- package/dist/preview/.next/server/chunks/444.js +0 -4
- package/dist/preview/.next/server/chunks/478.js +0 -1
- package/dist/preview/.next/server/font-manifest.json +0 -1
- package/dist/preview/.next/static/2qhpHXmKu1a7HPYW0h8qX/_buildManifest.js +0 -1
- package/dist/preview/.next/static/chunks/64-33135d2a0b032c99.js +0 -1
- package/dist/preview/.next/static/chunks/837-9d4cc2d57e81e85c.js +0 -1
- package/dist/preview/.next/static/chunks/framework-e0f347a11a70369e.js +0 -1
- package/dist/preview/.next/static/chunks/main-32f0addb06a02100.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_app-1fae2008e3549d5a.js +0 -182
- package/dist/preview/.next/static/chunks/pages/_error-0577f827b4afb66a.js +0 -1
- package/dist/preview/.next/static/chunks/pages/index-0ad3d9cfeac8a6ab.js +0 -1
- package/dist/preview/.next/static/chunks/pages/preview/[...relTemplatePath]-e0152b67b748423c.js +0 -1
- package/dist/preview/.next/static/chunks/pages/test-1b0ec700afcdd64b.js +0 -1
- package/dist/preview/.next/static/chunks/webpack-0b5d8249fb15f5f3.js +0 -1
- package/dist/preview/.next/static/css/35ecb02d4842937d.css +0 -3
- /package/dist/{index.d.ts → index.d.mts} +0 -0
- /package/dist/preview/.next/{server/chunks/font-manifest.json → dynamic-css-manifest.json} +0 -0
- /package/dist/preview/.next/static/{2qhpHXmKu1a7HPYW0h8qX → uQjdkl4yTW6Zpf-3uNg2P}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"name":"run-typescript","duration":1418221,"timestamp":292725877253,"id":13,"parentId":1,"tags":{},"startTime":1773169553010,"traceId":"bd1966f0aafcedb6"},{"name":"run-webpack","duration":3386073,"timestamp":292727298182,"id":15,"parentId":1,"tags":{},"startTime":1773169554431,"traceId":"bd1966f0aafcedb6"},{"name":"static-check","duration":288630,"timestamp":292730692153,"id":791,"parentId":1,"tags":{},"startTime":1773169557825,"traceId":"bd1966f0aafcedb6"},{"name":"static-generation","duration":611823,"timestamp":292730989322,"id":809,"parentId":1,"tags":{},"startTime":1773169558122,"traceId":"bd1966f0aafcedb6"},{"name":"collect-build-traces","duration":5616080,"timestamp":292730981317,"id":806,"parentId":1,"tags":{},"startTime":1773169558114,"traceId":"bd1966f0aafcedb6"},{"name":"telemetry-flush","duration":14,"timestamp":292736598470,"id":819,"parentId":1,"tags":{},"startTime":1773169563731,"traceId":"bd1966f0aafcedb6"},{"name":"next-build","duration":10796580,"timestamp":292725801907,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1773169552934,"traceId":"bd1966f0aafcedb6"}]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// This file is generated automatically by Next.js
|
|
2
|
+
// Do not edit this file manually
|
|
3
|
+
|
|
4
|
+
type AppRoutes = never
|
|
5
|
+
type PageRoutes = "/" | "/preview/[...relTemplatePath]" | "/test"
|
|
6
|
+
type LayoutRoutes = never
|
|
7
|
+
type RedirectRoutes = never
|
|
8
|
+
type RewriteRoutes = never
|
|
9
|
+
type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
interface ParamMap {
|
|
13
|
+
"/": {}
|
|
14
|
+
"/preview/[...relTemplatePath]": { "relTemplatePath": string[]; }
|
|
15
|
+
"/test": {}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export type ParamsOf<Route extends Routes> = ParamMap[Route]
|
|
20
|
+
|
|
21
|
+
interface LayoutSlotMap {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap }
|
|
26
|
+
|
|
27
|
+
declare global {
|
|
28
|
+
/**
|
|
29
|
+
* Props for Next.js App Router page components
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* export default function Page(props: PageProps<'/blog/[slug]'>) {
|
|
33
|
+
* const { slug } = await props.params
|
|
34
|
+
* return <div>Blog post: {slug}</div>
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
interface PageProps<AppRoute extends AppRoutes> {
|
|
39
|
+
params: Promise<ParamMap[AppRoute]>
|
|
40
|
+
searchParams: Promise<Record<string, string | string[] | undefined>>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Props for Next.js App Router layout components
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* export default function Layout(props: LayoutProps<'/dashboard'>) {
|
|
48
|
+
* return <div>{props.children}</div>
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
type LayoutProps<LayoutRoute extends LayoutRoutes> = {
|
|
53
|
+
params: Promise<ParamMap[LayoutRoute]>
|
|
54
|
+
children: React.ReactNode
|
|
55
|
+
} & {
|
|
56
|
+
[K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// This file is generated automatically by Next.js
|
|
2
|
+
// Do not edit this file manually
|
|
3
|
+
// This file validates that all pages and layouts export the correct types
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import type { NextApiHandler } from "next/types.js"
|
|
7
|
+
|
|
8
|
+
type PagesPageConfig = {
|
|
9
|
+
default: React.ComponentType<any> | ((props: any) => React.ReactNode | Promise<React.ReactNode> | never | void)
|
|
10
|
+
getStaticProps?: (context: any) => Promise<any> | any
|
|
11
|
+
getStaticPaths?: (context: any) => Promise<any> | any
|
|
12
|
+
getServerSideProps?: (context: any) => Promise<any> | any
|
|
13
|
+
getInitialProps?: (context: any) => Promise<any> | any
|
|
14
|
+
/**
|
|
15
|
+
* Segment configuration for legacy Pages Router pages.
|
|
16
|
+
* Validated at build-time by parsePagesSegmentConfig.
|
|
17
|
+
*/
|
|
18
|
+
config?: {
|
|
19
|
+
maxDuration?: number
|
|
20
|
+
runtime?: 'edge' | 'experimental-edge' | 'nodejs' | string // necessary unless config is exported as const
|
|
21
|
+
regions?: string[]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type ApiRouteConfig = {
|
|
26
|
+
default: (req: any, res: any) => ReturnType<NextApiHandler>
|
|
27
|
+
config?: {
|
|
28
|
+
api?: {
|
|
29
|
+
bodyParser?: boolean | { sizeLimit?: string }
|
|
30
|
+
responseLimit?: string | number | boolean
|
|
31
|
+
externalResolver?: boolean
|
|
32
|
+
}
|
|
33
|
+
runtime?: 'edge' | 'experimental-edge' | 'nodejs' | string // necessary unless config is exported as const
|
|
34
|
+
maxDuration?: number
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// Validate ../../src/pages/index.tsx
|
|
44
|
+
{
|
|
45
|
+
type __IsExpected<Specific extends PagesPageConfig> = Specific
|
|
46
|
+
const handler = {} as typeof import("../../src/pages/index.js")
|
|
47
|
+
type __Check = __IsExpected<typeof handler>
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
type __Unused = __Check
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Validate ../../src/pages/preview/[...relTemplatePath].tsx
|
|
53
|
+
{
|
|
54
|
+
type __IsExpected<Specific extends PagesPageConfig> = Specific
|
|
55
|
+
const handler = {} as typeof import("../../src/pages/preview/[...relTemplatePath].js")
|
|
56
|
+
type __Check = __IsExpected<typeof handler>
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
type __Unused = __Check
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Validate ../../src/pages/test.tsx
|
|
62
|
+
{
|
|
63
|
+
type __IsExpected<Specific extends PagesPageConfig> = Specific
|
|
64
|
+
const handler = {} as typeof import("../../src/pages/test.js")
|
|
65
|
+
type __Check = __IsExpected<typeof handler>
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
type __Unused = __Check
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Validate ../../src/pages/api/component.tsx
|
|
71
|
+
{
|
|
72
|
+
type __IsExpected<Specific extends ApiRouteConfig> = Specific
|
|
73
|
+
const handler = {} as typeof import("../../src/pages/api/component.js")
|
|
74
|
+
type __Check = __IsExpected<typeof handler>
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
type __Unused = __Check
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Validate ../../src/pages/api/pdf.tsx
|
|
80
|
+
{
|
|
81
|
+
type __IsExpected<Specific extends ApiRouteConfig> = Specific
|
|
82
|
+
const handler = {} as typeof import("../../src/pages/api/pdf.js")
|
|
83
|
+
type __Check = __IsExpected<typeof handler>
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
type __Unused = __Check
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Validate ../../src/pages/api/trpc/[trpc].ts
|
|
89
|
+
{
|
|
90
|
+
type __IsExpected<Specific extends ApiRouteConfig> = Specific
|
|
91
|
+
const handler = {} as typeof import("../../src/pages/api/trpc/[trpc].js")
|
|
92
|
+
type __Check = __IsExpected<typeof handler>
|
|
93
|
+
// @ts-ignore
|
|
94
|
+
type __Unused = __Check
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repdf/preview",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.mjs",
|
|
6
6
|
"bin": {
|
|
7
|
-
"repdf": "./dist/index.
|
|
7
|
+
"repdf": "./dist/index.mjs"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
"./package.json": "./package.json",
|
|
11
11
|
".": {
|
|
12
|
-
"import": "./dist/index.
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"description": "preview app for rePDF. Not ready for production use.",
|
|
@@ -25,64 +25,62 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@react-
|
|
29
|
-
"@react-
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@trpc/
|
|
33
|
-
"@trpc/
|
|
34
|
-
"
|
|
35
|
-
"@trpc/server": "11.6.0",
|
|
36
|
-
"chokidar": "4.0.3",
|
|
28
|
+
"@tanstack/react-query": "^5.90.21",
|
|
29
|
+
"@tanstack/react-query-devtools": "^5.91.3",
|
|
30
|
+
"@trpc/client": "11.12.0",
|
|
31
|
+
"@trpc/next": "11.12.0",
|
|
32
|
+
"@trpc/react-query": "11.12.0",
|
|
33
|
+
"@trpc/server": "11.12.0",
|
|
34
|
+
"chokidar": "5.0.0",
|
|
37
35
|
"clsx": "^2.1.1",
|
|
38
|
-
"commander": "^
|
|
39
|
-
"dependency-tree": "^11.0
|
|
40
|
-
"esbuild": "0.
|
|
41
|
-
"glob": "^
|
|
42
|
-
"js-beautify": "^1.15.
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"next": "^14.2.17",
|
|
36
|
+
"commander": "^14.0.3",
|
|
37
|
+
"dependency-tree": "^11.4.0",
|
|
38
|
+
"esbuild": "0.27.3",
|
|
39
|
+
"glob": "^13.0.6",
|
|
40
|
+
"js-beautify": "^1.15.4",
|
|
41
|
+
"lucide-react": "^0.577.0",
|
|
42
|
+
"next": "^16.1.6",
|
|
46
43
|
"nuqs": "^2.8.9",
|
|
47
|
-
"ora": "^
|
|
48
|
-
"pino": "^
|
|
49
|
-
"pino-pretty": "^
|
|
50
|
-
"prism-react-renderer": "^2.4.
|
|
51
|
-
"puppeteer-core": "^24.
|
|
52
|
-
"react": "^
|
|
53
|
-
"react-dom": "^
|
|
44
|
+
"ora": "^9.3.0",
|
|
45
|
+
"pino": "^10.3.1",
|
|
46
|
+
"pino-pretty": "^13.1.3",
|
|
47
|
+
"prism-react-renderer": "^2.4.1",
|
|
48
|
+
"puppeteer-core": "^24.39.0",
|
|
49
|
+
"react": "^19.2.4",
|
|
50
|
+
"react-dom": "^19.2.4",
|
|
54
51
|
"react-hot-toast": "^2.6.0",
|
|
52
|
+
"socket.io": "^4.8.3",
|
|
53
|
+
"socket.io-client": "^4.8.3",
|
|
55
54
|
"source-map-js": "^1.2.1",
|
|
56
|
-
"stacktrace-parser": "^0.1.
|
|
57
|
-
"superjson": "^2.2.
|
|
58
|
-
"tailwind-merge": "^
|
|
59
|
-
"webpack": "^5.
|
|
60
|
-
"zod": "^3.
|
|
61
|
-
"@repdf/core": "0.
|
|
62
|
-
"@repdf/tailwind-v4": "0.
|
|
63
|
-
"@repdf/tailwind-v3": "0.
|
|
55
|
+
"stacktrace-parser": "^0.1.11",
|
|
56
|
+
"superjson": "^2.2.6",
|
|
57
|
+
"tailwind-merge": "^3.5.0",
|
|
58
|
+
"webpack": "^5.105.4",
|
|
59
|
+
"zod": "^4.3.6",
|
|
60
|
+
"@repdf/core": "0.5.0",
|
|
61
|
+
"@repdf/tailwind-v4": "0.5.0",
|
|
62
|
+
"@repdf/tailwind-v3": "0.5.0"
|
|
64
63
|
},
|
|
65
64
|
"devDependencies": {
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
65
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
66
|
+
"@arethetypeswrong/cli": "0.18.2",
|
|
67
|
+
"@biomejs/biome": "2.4.6",
|
|
68
|
+
"@changesets/cli": "2.30.0",
|
|
69
69
|
"@types/js-beautify": "^1.14.3",
|
|
70
|
-
"@types/node": "^
|
|
71
|
-
"@types/react": "^
|
|
72
|
-
"@types/react-dom": "^
|
|
73
|
-
"postcss": "^8.
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"tsx": "^4.19.2",
|
|
70
|
+
"@types/node": "^25.4.0",
|
|
71
|
+
"@types/react": "^19.2.14",
|
|
72
|
+
"@types/react-dom": "^19.2.3",
|
|
73
|
+
"postcss": "^8.5.8",
|
|
74
|
+
"tailwindcss": "^4.2.1",
|
|
75
|
+
"tsdown": "^0.21.1",
|
|
76
|
+
"tsx": "^4.21.0",
|
|
78
77
|
"typescript": "^5.9.3"
|
|
79
78
|
},
|
|
80
79
|
"scripts": {
|
|
81
80
|
"tsdown": "tsdown && node build-preview-server.js",
|
|
82
|
-
"build": "next build",
|
|
81
|
+
"build": "next build --webpack",
|
|
83
82
|
"dev": "next dev -p 3000",
|
|
84
83
|
"dev:live": "tsx src/cli/index.ts dev",
|
|
85
|
-
"dev:live:notused": "tsdown --watch",
|
|
86
84
|
"lint": "next lint",
|
|
87
85
|
"start": "next start",
|
|
88
86
|
"check-exports": "attw --pack .",
|
package/dist/index.js
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { program } from "commander";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import pino from "pino";
|
|
5
|
-
import { parse } from "node:url";
|
|
6
|
-
import path from "path";
|
|
7
|
-
import { fileURLToPath } from "url";
|
|
8
|
-
import next from "next";
|
|
9
|
-
import http from "http";
|
|
10
|
-
import http$1 from "node:http";
|
|
11
|
-
|
|
12
|
-
//#region package.json
|
|
13
|
-
var name = "@repdf/preview";
|
|
14
|
-
var version = "0.3.2";
|
|
15
|
-
var type = "module";
|
|
16
|
-
var main = "dist/index.js";
|
|
17
|
-
var bin = { "repdf": "./dist/index.js" };
|
|
18
|
-
var exports = {
|
|
19
|
-
"./package.json": "./package.json",
|
|
20
|
-
".": { "import": "./dist/index.js" }
|
|
21
|
-
};
|
|
22
|
-
var description = "preview app for rePDF. Not ready for production use.";
|
|
23
|
-
var keywords = [
|
|
24
|
-
"pdf",
|
|
25
|
-
"typescript",
|
|
26
|
-
"react"
|
|
27
|
-
];
|
|
28
|
-
var homepage = "https://repdf.dev";
|
|
29
|
-
var author = "repdf labs";
|
|
30
|
-
var files = ["dist"];
|
|
31
|
-
var license = "MIT";
|
|
32
|
-
var scripts = {
|
|
33
|
-
"tsdown": "tsdown && node build-preview-server.js",
|
|
34
|
-
"build": "next build",
|
|
35
|
-
"dev": "next dev -p 3000",
|
|
36
|
-
"dev:live": "tsx src/cli/index.ts dev",
|
|
37
|
-
"dev:live:notused": "tsdown --watch",
|
|
38
|
-
"lint": "next lint",
|
|
39
|
-
"start": "next start",
|
|
40
|
-
"check-exports": "attw --pack .",
|
|
41
|
-
"format": "biome check --write .",
|
|
42
|
-
"local-release": "bun publish --access public",
|
|
43
|
-
"clean": "rm -rf dist",
|
|
44
|
-
"typecheck": "tsc --noEmit"
|
|
45
|
-
};
|
|
46
|
-
var dependencies = {
|
|
47
|
-
"@react-email/render": "1.0.2",
|
|
48
|
-
"@react-email/tailwind": "1.0.2",
|
|
49
|
-
"@repdf/core": "workspace:*",
|
|
50
|
-
"@repdf/tailwind-v3": "workspace:*",
|
|
51
|
-
"@repdf/tailwind-v4": "workspace:*",
|
|
52
|
-
"@tanstack/react-query": "^5.90.2",
|
|
53
|
-
"@tanstack/react-query-devtools": "^5.90.2",
|
|
54
|
-
"@trpc/client": "11.6.0",
|
|
55
|
-
"@trpc/next": "11.6.0",
|
|
56
|
-
"@trpc/react-query": "11.6.0",
|
|
57
|
-
"@trpc/server": "11.6.0",
|
|
58
|
-
"chokidar": "4.0.3",
|
|
59
|
-
"clsx": "^2.1.1",
|
|
60
|
-
"commander": "^12.1.0",
|
|
61
|
-
"dependency-tree": "^11.0.1",
|
|
62
|
-
"esbuild": "0.24.0",
|
|
63
|
-
"glob": "^11.0.0",
|
|
64
|
-
"js-beautify": "^1.15.1",
|
|
65
|
-
"js-dependency-extractor": "^1.0.3",
|
|
66
|
-
"lucide-react": "^0.453.0",
|
|
67
|
-
"next": "^14.2.17",
|
|
68
|
-
"nuqs": "^2.8.9",
|
|
69
|
-
"ora": "^8.1.0",
|
|
70
|
-
"pino": "^9.4.0",
|
|
71
|
-
"pino-pretty": "^11.2.2",
|
|
72
|
-
"prism-react-renderer": "^2.4.0",
|
|
73
|
-
"puppeteer-core": "^24.37.5",
|
|
74
|
-
"react": "^18.3.1",
|
|
75
|
-
"react-dom": "^18.3.1",
|
|
76
|
-
"react-hot-toast": "^2.6.0",
|
|
77
|
-
"source-map-js": "^1.2.1",
|
|
78
|
-
"stacktrace-parser": "^0.1.10",
|
|
79
|
-
"superjson": "^2.2.1",
|
|
80
|
-
"tailwind-merge": "^2.6.0",
|
|
81
|
-
"webpack": "^5.95.0",
|
|
82
|
-
"zod": "^3.1.11"
|
|
83
|
-
};
|
|
84
|
-
var devDependencies = {
|
|
85
|
-
"@arethetypeswrong/cli": "0.16.4",
|
|
86
|
-
"@biomejs/biome": "1.9.3",
|
|
87
|
-
"@changesets/cli": "2.27.9",
|
|
88
|
-
"@types/js-beautify": "^1.14.3",
|
|
89
|
-
"@types/node": "^20.14.10",
|
|
90
|
-
"@types/react": "^18.3.12",
|
|
91
|
-
"@types/react-dom": "^18.3.1",
|
|
92
|
-
"postcss": "^8.4.39",
|
|
93
|
-
"react-email": "3.0.1",
|
|
94
|
-
"tailwindcss": "^3.4.14",
|
|
95
|
-
"tsdown": "^0.9.0",
|
|
96
|
-
"tsx": "^4.19.2",
|
|
97
|
-
"typescript": "^5.9.3"
|
|
98
|
-
};
|
|
99
|
-
var packageManager = "pnpm@9.7.1";
|
|
100
|
-
var package_default = {
|
|
101
|
-
name,
|
|
102
|
-
version,
|
|
103
|
-
type,
|
|
104
|
-
main,
|
|
105
|
-
bin,
|
|
106
|
-
exports,
|
|
107
|
-
description,
|
|
108
|
-
keywords,
|
|
109
|
-
homepage,
|
|
110
|
-
author,
|
|
111
|
-
files,
|
|
112
|
-
license,
|
|
113
|
-
scripts,
|
|
114
|
-
dependencies,
|
|
115
|
-
devDependencies,
|
|
116
|
-
packageManager
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region src/logger.ts
|
|
121
|
-
const logger = pino({
|
|
122
|
-
transport: { target: "pino-pretty" },
|
|
123
|
-
level: "info"
|
|
124
|
-
});
|
|
125
|
-
function enableDebugLogging() {
|
|
126
|
-
logger.level = "debug";
|
|
127
|
-
}
|
|
128
|
-
var logger_default = logger;
|
|
129
|
-
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region src/utils/checkPortAvailability.ts
|
|
132
|
-
function checkPortAvailability(port) {
|
|
133
|
-
return new Promise((resolve, reject) => {
|
|
134
|
-
const server = http.createServer();
|
|
135
|
-
server.once("error", (err) => {
|
|
136
|
-
if (err.code === "EADDRINUSE") resolve(false);
|
|
137
|
-
else reject(err);
|
|
138
|
-
});
|
|
139
|
-
server.once("listening", () => {
|
|
140
|
-
server.close(() => resolve(true));
|
|
141
|
-
});
|
|
142
|
-
server.listen(port);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/cli/commands/server.ts
|
|
148
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
149
|
-
const __dirname = path.dirname(__filename);
|
|
150
|
-
const isDev = !__filename.endsWith("index.js");
|
|
151
|
-
logger_default.debug({ isDev }, "cli script dev mode");
|
|
152
|
-
const cliPackageLocation = isDev ? path.resolve(__dirname, "../..") : path.resolve(__dirname, "../..");
|
|
153
|
-
const previewServerLocation = isDev ? path.resolve(__dirname, "../../..") : path.resolve(__dirname, "./preview");
|
|
154
|
-
const getEnvVariablesForPreviewApp = (relativePathToPdfsDirectory, cwd) => {
|
|
155
|
-
return {
|
|
156
|
-
RELATIVE_PATH_TO_PDF_FOLDER: relativePathToPdfsDirectory,
|
|
157
|
-
ABSOLUTE_PATH_TO_PDF_FOLDER: path.resolve(cwd, relativePathToPdfsDirectory),
|
|
158
|
-
USER_PROJECT_LOCATION: cwd
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
let previewServer;
|
|
162
|
-
const startPreviewServer = async (pdfsDirRelativePath, port) => {
|
|
163
|
-
let actualPort = port;
|
|
164
|
-
while (actualPort <= 65535) {
|
|
165
|
-
let isAvailable = false;
|
|
166
|
-
try {
|
|
167
|
-
isAvailable = await checkPortAvailability(actualPort);
|
|
168
|
-
} catch (error) {
|
|
169
|
-
throw new Error(`Failed to check port ${actualPort}: ${error.message}`);
|
|
170
|
-
}
|
|
171
|
-
if (isAvailable) break;
|
|
172
|
-
logger_default.info(`port ${actualPort} in use, trying ${actualPort + 1}`);
|
|
173
|
-
actualPort++;
|
|
174
|
-
}
|
|
175
|
-
if (actualPort > 65535) throw new Error(`No available ports found starting from ${port} (checked through 65535)`);
|
|
176
|
-
process.env = {
|
|
177
|
-
...process.env,
|
|
178
|
-
NODE_ENV: "development",
|
|
179
|
-
PORT: actualPort.toString(),
|
|
180
|
-
...getEnvVariablesForPreviewApp(
|
|
181
|
-
// If we don't do normalization here, stuff like https://github.com/resend/react-email/issues/1354 happens.
|
|
182
|
-
path.normalize(pdfsDirRelativePath),
|
|
183
|
-
process.cwd()
|
|
184
|
-
)
|
|
185
|
-
};
|
|
186
|
-
const nextApp = next({
|
|
187
|
-
dev: isDev,
|
|
188
|
-
conf: { images: { unoptimized: true } },
|
|
189
|
-
hostname: "localhost",
|
|
190
|
-
port: actualPort,
|
|
191
|
-
dir: previewServerLocation
|
|
192
|
-
});
|
|
193
|
-
logger_default.info("preparing next app");
|
|
194
|
-
await nextApp.prepare();
|
|
195
|
-
previewServer = http$1.createServer((req, res) => {
|
|
196
|
-
nextApp.getRequestHandler()(req, res, parse(req.url || "/", true));
|
|
197
|
-
});
|
|
198
|
-
const server = previewServer.listen(actualPort);
|
|
199
|
-
const url = `http://localhost:${actualPort}`;
|
|
200
|
-
const clickableUrl = `\u001B]8;;${url}\u0007${url}\u001B]8;;\u0007`;
|
|
201
|
-
console.log(clickableUrl);
|
|
202
|
-
server.on("upgrade", (req, socket, head) => {
|
|
203
|
-
logger_default.debug({ url: req.url }, "websocket upgrade");
|
|
204
|
-
const { pathname } = parse(req.url || "/", true);
|
|
205
|
-
if (pathname === "/_next/webpack-hmr") {
|
|
206
|
-
logger_default.debug("nextjs HMR websocket upgrade");
|
|
207
|
-
nextApp.getUpgradeHandler()(req, socket, head);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
return server;
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
//#endregion
|
|
214
|
-
//#region src/cli/commands/dev.ts
|
|
215
|
-
const dev = async ({ dir: relativePathToPdfFolder, port, debug }) => {
|
|
216
|
-
if (debug || process.env.DEBUG === "true" || process.env.DEBUG === "1") {
|
|
217
|
-
process.env.DEBUG = "true";
|
|
218
|
-
enableDebugLogging();
|
|
219
|
-
logger_default.debug("debug logging enabled");
|
|
220
|
-
}
|
|
221
|
-
try {
|
|
222
|
-
if (!fs.existsSync(relativePathToPdfFolder)) throw new Error(`Missing ${relativePathToPdfFolder} folder`);
|
|
223
|
-
const devServer = await startPreviewServer(relativePathToPdfFolder, parseInt(port));
|
|
224
|
-
const shutdown = async () => {
|
|
225
|
-
logger_default.info("Shutting down preview server...");
|
|
226
|
-
await devServer?.close();
|
|
227
|
-
process.exit(0);
|
|
228
|
-
};
|
|
229
|
-
process.on("SIGINT", shutdown);
|
|
230
|
-
process.on("SIGTERM", shutdown);
|
|
231
|
-
} catch (error) {
|
|
232
|
-
logger_default.error(error);
|
|
233
|
-
process.exit(1);
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
//#endregion
|
|
238
|
-
//#region src/cli/index.ts
|
|
239
|
-
const PACKAGE_NAME = "repdf";
|
|
240
|
-
program.name(PACKAGE_NAME).description("A live preview of your pdf templates").version(package_default.version);
|
|
241
|
-
program.command("dev").description("Starts the preview pdf development app").option("-d --dir <path>", "Directory containing pdf templates", "./src/pdfs").option("-p --port <port>", "Port to run dev server on", "3000").option("--debug", "Enable debug logging").action(dev);
|
|
242
|
-
if (!process.argv.slice(2).length) {
|
|
243
|
-
program.outputHelp();
|
|
244
|
-
process.exit(0);
|
|
245
|
-
}
|
|
246
|
-
program.parse();
|
|
247
|
-
|
|
248
|
-
//#endregion
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
exports.id=239,exports.ids=[239],exports.modules={6439:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Head:function(){return I},Html:function(){return y},Main:function(){return T},NextScript:function(){return S},default:function(){return x}});let r=n(997),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(void 0);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}(n(6689)),s=n(5432),o=n(6097),a=n(2097),l=function(e){return e&&e.__esModule?e:{default:e}}(n(4253)),c=n(7318),u=n(752);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}let d=new Set;function f(e,t,n){let r=(0,o.getPageFiles)(e,"/_app"),i=n?[]:(0,o.getPageFiles)(e,t);return{sharedFiles:r,pageFiles:i,allFiles:[...new Set([...r,...i])]}}function _(e,t){let{assetPrefix:n,buildManifest:i,assetQueryString:s,disableOptimizedLoading:o,crossOrigin:a}=e;return i.polyfillFiles.filter(e=>e.endsWith(".js")&&!e.endsWith(".module.js")).map(e=>(0,r.jsx)("script",{defer:!o,nonce:t.nonce,crossOrigin:t.crossOrigin||a,noModule:!0,src:`${n}/_next/${(0,u.encodeURIPath)(e)}${s}`},e))}function h({styles:e}){if(!e)return null;let t=Array.isArray(e)?e:[];if(e.props&&Array.isArray(e.props.children)){let n=e=>{var t,n;return null==e?void 0:null==(n=e.props)?void 0:null==(t=n.dangerouslySetInnerHTML)?void 0:t.__html};e.props.children.forEach(e=>{Array.isArray(e)?e.forEach(e=>n(e)&&t.push(e)):n(e)&&t.push(e)})}return(0,r.jsx)("style",{"amp-custom":"",dangerouslySetInnerHTML:{__html:t.map(e=>e.props.dangerouslySetInnerHTML.__html).join("").replace(/\/\*# sourceMappingURL=.*\*\//g,"").replace(/\/\*@ sourceURL=.*?\*\//g,"")}})}function m(e,t,n){let{dynamicImports:i,assetPrefix:s,isDevelopment:o,assetQueryString:a,disableOptimizedLoading:l,crossOrigin:c}=e;return i.map(e=>!e.endsWith(".js")||n.allFiles.includes(e)?null:(0,r.jsx)("script",{async:!o&&l,defer:!l,src:`${s}/_next/${(0,u.encodeURIPath)(e)}${a}`,nonce:t.nonce,crossOrigin:t.crossOrigin||c},e))}function E(e,t,n){var i;let{assetPrefix:s,buildManifest:o,isDevelopment:a,assetQueryString:l,disableOptimizedLoading:c,crossOrigin:p}=e;return[...n.allFiles.filter(e=>e.endsWith(".js")),...null==(i=o.lowPriorityFiles)?void 0:i.filter(e=>e.endsWith(".js"))].map(e=>(0,r.jsx)("script",{src:`${s}/_next/${(0,u.encodeURIPath)(e)}${l}`,nonce:t.nonce,async:!a&&c,defer:!c,crossOrigin:t.crossOrigin||p},e))}function g(e,t){let{scriptLoader:n,disableOptimizedLoading:s,crossOrigin:o}=e,a=function(e,t){let{assetPrefix:n,scriptLoader:s,crossOrigin:o,nextScriptWorkers:a}=e;if(!a)return null;try{let{partytownSnippet:e}=require("@builder.io/partytown/integration"),a=(Array.isArray(t.children)?t.children:[t.children]).find(e=>{var t,n;return!!e&&!!e.props&&(null==e?void 0:null==(n=e.props)?void 0:null==(t=n.dangerouslySetInnerHTML)?void 0:t.__html.length)&&"data-partytown-config"in e.props});return(0,r.jsxs)(r.Fragment,{children:[!a&&(0,r.jsx)("script",{"data-partytown-config":"",dangerouslySetInnerHTML:{__html:`
|
|
2
|
-
partytown = {
|
|
3
|
-
lib: "${n}/_next/static/~partytown/"
|
|
4
|
-
};
|
|
5
|
-
`}}),(0,r.jsx)("script",{"data-partytown":"",dangerouslySetInnerHTML:{__html:e()}}),(s.worker||[]).map((e,n)=>{let{strategy:r,src:s,children:a,dangerouslySetInnerHTML:l,...c}=e,u={};if(s)u.src=s;else if(l&&l.__html)u.dangerouslySetInnerHTML={__html:l.__html};else if(a)u.dangerouslySetInnerHTML={__html:"string"==typeof a?a:Array.isArray(a)?a.join(""):""};else throw Error("Invalid usage of next/script. Did you forget to include a src attribute or an inline script? https://nextjs.org/docs/messages/invalid-script");return(0,i.createElement)("script",{...u,...c,type:"text/partytown",key:s||n,nonce:t.nonce,"data-nscript":"worker",crossOrigin:t.crossOrigin||o})})]})}catch(e){return(0,l.default)(e)&&"MODULE_NOT_FOUND"!==e.code&&console.warn(`Warning: ${e.message}`),null}}(e,t),c=(n.beforeInteractive||[]).filter(e=>e.src).map((e,n)=>{let{strategy:r,...a}=e;return(0,i.createElement)("script",{...a,key:a.src||n,defer:a.defer??!s,nonce:t.nonce,"data-nscript":"beforeInteractive",crossOrigin:t.crossOrigin||o})});return(0,r.jsxs)(r.Fragment,{children:[a,c]})}class I extends i.default.Component{static #e=this.contextType=c.HtmlContext;getCssLinks(e){let{assetPrefix:t,assetQueryString:n,dynamicImports:i,crossOrigin:s,optimizeCss:o,optimizeFonts:a}=this.context,l=e.allFiles.filter(e=>e.endsWith(".css")),c=new Set(e.sharedFiles),p=new Set([]),d=Array.from(new Set(i.filter(e=>e.endsWith(".css"))));if(d.length){let e=new Set(l);p=new Set(d=d.filter(t=>!(e.has(t)||c.has(t)))),l.push(...d)}let f=[];return l.forEach(e=>{let i=c.has(e);o||f.push((0,r.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,u.encodeURIPath)(e)}${n}`,as:"style",crossOrigin:this.props.crossOrigin||s},`${e}-preload`));let a=p.has(e);f.push((0,r.jsx)("link",{nonce:this.props.nonce,rel:"stylesheet",href:`${t}/_next/${(0,u.encodeURIPath)(e)}${n}`,crossOrigin:this.props.crossOrigin||s,"data-n-g":a?void 0:i?"":void 0,"data-n-p":a?void 0:i?void 0:""},e))}),a&&(f=this.makeStylesheetInert(f)),0===f.length?null:f}getPreloadDynamicChunks(){let{dynamicImports:e,assetPrefix:t,assetQueryString:n,crossOrigin:i}=this.context;return e.map(e=>e.endsWith(".js")?(0,r.jsx)("link",{rel:"preload",href:`${t}/_next/${(0,u.encodeURIPath)(e)}${n}`,as:"script",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||i},e):null).filter(Boolean)}getPreloadMainLinks(e){let{assetPrefix:t,assetQueryString:n,scriptLoader:i,crossOrigin:s}=this.context,o=e.allFiles.filter(e=>e.endsWith(".js"));return[...(i.beforeInteractive||[]).map(e=>(0,r.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:e.src,as:"script",crossOrigin:this.props.crossOrigin||s},e.src)),...o.map(e=>(0,r.jsx)("link",{nonce:this.props.nonce,rel:"preload",href:`${t}/_next/${(0,u.encodeURIPath)(e)}${n}`,as:"script",crossOrigin:this.props.crossOrigin||s},e))]}getBeforeInteractiveInlineScripts(){let{scriptLoader:e}=this.context,{nonce:t,crossOrigin:n}=this.props;return(e.beforeInteractive||[]).filter(e=>!e.src&&(e.dangerouslySetInnerHTML||e.children)).map((e,r)=>{let{strategy:s,children:o,dangerouslySetInnerHTML:a,src:l,...c}=e,u="";return a&&a.__html?u=a.__html:o&&(u="string"==typeof o?o:Array.isArray(o)?o.join(""):""),(0,i.createElement)("script",{...c,dangerouslySetInnerHTML:{__html:u},key:c.id||r,nonce:t,"data-nscript":"beforeInteractive",crossOrigin:n||void 0})})}getDynamicChunks(e){return m(this.context,this.props,e)}getPreNextScripts(){return g(this.context,this.props)}getScripts(e){return E(this.context,this.props,e)}getPolyfillScripts(){return _(this.context,this.props)}makeStylesheetInert(e){return i.default.Children.map(e,e=>{var t,n;if((null==e?void 0:e.type)==="link"&&(null==e?void 0:null==(t=e.props)?void 0:t.href)&&s.OPTIMIZED_FONT_PROVIDERS.some(({url:t})=>{var n,r;return null==e?void 0:null==(r=e.props)?void 0:null==(n=r.href)?void 0:n.startsWith(t)})){let t={...e.props||{},"data-href":e.props.href,href:void 0};return i.default.cloneElement(e,t)}if(null==e?void 0:null==(n=e.props)?void 0:n.children){let t={...e.props||{},children:this.makeStylesheetInert(e.props.children)};return i.default.cloneElement(e,t)}return e}).filter(Boolean)}render(){let{styles:e,ampPath:t,inAmpMode:s,hybridAmp:o,canonicalBase:a,__NEXT_DATA__:l,dangerousAsPath:c,headTags:p,unstable_runtimeJS:d,unstable_JsPreload:_,disableOptimizedLoading:m,optimizeCss:E,optimizeFonts:g,assetPrefix:I,nextFontManifest:S}=this.context,y=!1===d,T=!1===_||!m;this.context.docComponentsRendered.Head=!0;let{head:x}=this.context,O=[],P=[];x&&(x.forEach(e=>{let t;this.context.strictNextHead&&(t=i.default.createElement("meta",{name:"next-head",content:"1"})),e&&"link"===e.type&&"preload"===e.props.rel&&"style"===e.props.as?(t&&O.push(t),O.push(e)):e&&(t&&("meta"!==e.type||!e.props.charSet)&&P.push(t),P.push(e))}),x=O.concat(P));let A=i.default.Children.toArray(this.props.children).filter(Boolean);g&&!s&&(A=this.makeStylesheetInert(A));let v=!1,j=!1;x=i.default.Children.map(x||[],e=>{if(!e)return e;let{type:t,props:n}=e;if(s){let r="";if("meta"===t&&"viewport"===n.name?r='name="viewport"':"link"===t&&"canonical"===n.rel?j=!0:"script"===t&&(n.src&&-1>n.src.indexOf("ampproject")||n.dangerouslySetInnerHTML&&(!n.type||"text/javascript"===n.type))&&(r="<script",Object.keys(n).forEach(e=>{r+=` ${e}="${n[e]}"`}),r+="/>"),r)return console.warn(`Found conflicting amp tag "${e.type}" with conflicting prop ${r} in ${l.page}. https://nextjs.org/docs/messages/conflicting-amp-tag`),null}else"link"===t&&"amphtml"===n.rel&&(v=!0);return e});let N=f(this.context.buildManifest,this.context.__NEXT_DATA__.page,s),R=function(e,t,n=""){if(!e)return{preconnect:null,preload:null};let i=e.pages["/_app"],s=e.pages[t],o=Array.from(new Set([...i??[],...s??[]]));return{preconnect:0===o.length&&(i||s)?(0,r.jsx)("link",{"data-next-font":e.pagesUsingSizeAdjust?"size-adjust":"",rel:"preconnect",href:"/",crossOrigin:"anonymous"}):null,preload:o?o.map(e=>{let t=/\.(woff|woff2|eot|ttf|otf)$/.exec(e)[1];return(0,r.jsx)("link",{rel:"preload",href:`${n}/_next/${(0,u.encodeURIPath)(e)}`,as:"font",type:`font/${t}`,crossOrigin:"anonymous","data-next-font":e.includes("-s")?"size-adjust":""},e)}):null}}(S,c,I);return(0,r.jsxs)("head",{...function(e){let{crossOrigin:t,nonce:n,...r}=e;return r}(this.props),children:[this.context.isDevelopment&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{"data-next-hide-fouc":!0,"data-ampdevmode":s?"true":void 0,dangerouslySetInnerHTML:{__html:"body{display:none}"}}),(0,r.jsx)("noscript",{"data-next-hide-fouc":!0,"data-ampdevmode":s?"true":void 0,children:(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{display:block}"}})})]}),x,this.context.strictNextHead?null:(0,r.jsx)("meta",{name:"next-head-count",content:i.default.Children.count(x||[]).toString()}),A,g&&(0,r.jsx)("meta",{name:"next-font-preconnect"}),R.preconnect,R.preload,s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{name:"viewport",content:"width=device-width,minimum-scale=1,initial-scale=1"}),!j&&(0,r.jsx)("link",{rel:"canonical",href:a+n(6813).cleanAmpPath(c)}),(0,r.jsx)("link",{rel:"preload",as:"script",href:"https://cdn.ampproject.org/v0.js"}),(0,r.jsx)(h,{styles:e}),(0,r.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}"}}),(0,r.jsx)("noscript",{children:(0,r.jsx)("style",{"amp-boilerplate":"",dangerouslySetInnerHTML:{__html:"body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}"}})}),(0,r.jsx)("script",{async:!0,src:"https://cdn.ampproject.org/v0.js"})]}),!s&&(0,r.jsxs)(r.Fragment,{children:[!v&&o&&(0,r.jsx)("link",{rel:"amphtml",href:a+(t||`${c}${c.includes("?")?"&":"?"}amp=1`)}),this.getBeforeInteractiveInlineScripts(),!E&&this.getCssLinks(N),!E&&(0,r.jsx)("noscript",{"data-n-css":this.props.nonce??""}),!y&&!T&&this.getPreloadDynamicChunks(),!y&&!T&&this.getPreloadMainLinks(N),!m&&!y&&this.getPolyfillScripts(),!m&&!y&&this.getPreNextScripts(),!m&&!y&&this.getDynamicChunks(N),!m&&!y&&this.getScripts(N),E&&this.getCssLinks(N),E&&(0,r.jsx)("noscript",{"data-n-css":this.props.nonce??""}),this.context.isDevelopment&&(0,r.jsx)("noscript",{id:"__next_css__DO_NOT_USE__"}),e||null]}),i.default.createElement(i.default.Fragment,{},...p||[])]})}}class S extends i.default.Component{static #e=this.contextType=c.HtmlContext;getDynamicChunks(e){return m(this.context,this.props,e)}getPreNextScripts(){return g(this.context,this.props)}getScripts(e){return E(this.context,this.props,e)}getPolyfillScripts(){return _(this.context,this.props)}static getInlineScriptSource(e){let{__NEXT_DATA__:t,largePageDataBytes:r}=e;try{let i=JSON.stringify(t);if(d.has(t.page))return(0,a.htmlEscapeJsonString)(i);let s=Buffer.from(i).byteLength,o=n(5369).Z;return r&&s>r&&(d.add(t.page),console.warn(`Warning: data for page "${t.page}"${t.page===e.dangerousAsPath?"":` (path "${e.dangerousAsPath}")`} is ${o(s)} which exceeds the threshold of ${o(r)}, this amount of data can reduce performance.
|
|
6
|
-
See more info here: https://nextjs.org/docs/messages/large-page-data`)),(0,a.htmlEscapeJsonString)(i)}catch(e){if((0,l.default)(e)&&-1!==e.message.indexOf("circular structure"))throw Error(`Circular structure in "getInitialProps" result of page "${t.page}". https://nextjs.org/docs/messages/circular-structure`);throw e}}render(){let{assetPrefix:e,inAmpMode:t,buildManifest:n,unstable_runtimeJS:i,docComponentsRendered:s,assetQueryString:o,disableOptimizedLoading:a,crossOrigin:l}=this.context,c=!1===i;if(s.NextScript=!0,t)return null;let p=f(this.context.buildManifest,this.context.__NEXT_DATA__.page,t);return(0,r.jsxs)(r.Fragment,{children:[!c&&n.devFiles?n.devFiles.map(t=>(0,r.jsx)("script",{src:`${e}/_next/${(0,u.encodeURIPath)(t)}${o}`,nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l},t)):null,c?null:(0,r.jsx)("script",{id:"__NEXT_DATA__",type:"application/json",nonce:this.props.nonce,crossOrigin:this.props.crossOrigin||l,dangerouslySetInnerHTML:{__html:S.getInlineScriptSource(this.context)}}),a&&!c&&this.getPolyfillScripts(),a&&!c&&this.getPreNextScripts(),a&&!c&&this.getDynamicChunks(p),a&&!c&&this.getScripts(p)]})}}function y(e){let{inAmpMode:t,docComponentsRendered:n,locale:s,scriptLoader:o,__NEXT_DATA__:a}=(0,c.useHtmlContext)();return n.Html=!0,function(e,t,n){var r,s,o,a;if(!n.children)return;let l=[],c=Array.isArray(n.children)?n.children:[n.children],u=null==(s=c.find(e=>e.type===I))?void 0:null==(r=s.props)?void 0:r.children,p=null==(a=c.find(e=>"body"===e.type))?void 0:null==(o=a.props)?void 0:o.children,d=[...Array.isArray(u)?u:[u],...Array.isArray(p)?p:[p]];i.default.Children.forEach(d,t=>{var n;if(t&&(null==(n=t.type)?void 0:n.__nextScript)){if("beforeInteractive"===t.props.strategy){e.beforeInteractive=(e.beforeInteractive||[]).concat([{...t.props}]);return}if(["lazyOnload","afterInteractive","worker"].includes(t.props.strategy)){l.push(t.props);return}}}),t.scriptLoader=l}(o,a,e),(0,r.jsx)("html",{...e,lang:e.lang||s||void 0,amp:t?"":void 0,"data-ampdevmode":void 0})}function T(){let{docComponentsRendered:e}=(0,c.useHtmlContext)();return e.Main=!0,(0,r.jsx)("next-js-internal-body-render-target",{})}class x extends i.default.Component{static getInitialProps(e){return e.defaultGetInitialProps(e)}render(){return(0,r.jsxs)(y,{children:[(0,r.jsx)(I,{}),(0,r.jsxs)("body",{children:[(0,r.jsx)(T,{}),(0,r.jsx)(S,{})]})]})}}x[s.NEXT_BUILTIN_DOCUMENT]=function(){return(0,r.jsxs)(y,{children:[(0,r.jsx)(I,{}),(0,r.jsxs)("body",{children:[(0,r.jsx)(T,{}),(0,r.jsx)(S,{})]})]})}},5432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{APP_BUILD_MANIFEST:function(){return g},APP_CLIENT_INTERNALS:function(){return Z},APP_PATHS_MANIFEST:function(){return h},APP_PATH_ROUTES_MANIFEST:function(){return m},AUTOMATIC_FONT_OPTIMIZATION_MANIFEST:function(){return b},BARREL_OPTIMIZATION_PREFIX:function(){return B},BLOCKED_PAGES:function(){return D},BUILD_ID_FILE:function(){return F},BUILD_MANIFEST:function(){return E},CLIENT_PUBLIC_FILES_PATH:function(){return U},CLIENT_REFERENCE_MANIFEST:function(){return H},CLIENT_STATIC_FILES_PATH:function(){return w},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return q},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return V},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return Q},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return K},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return J},COMPILER_INDEXES:function(){return s},COMPILER_NAMES:function(){return i},CONFIG_FILES:function(){return C},DEFAULT_RUNTIME_WEBPACK:function(){return et},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return ea},DEV_CLIENT_PAGES_MANIFEST:function(){return j},DEV_MIDDLEWARE_MANIFEST:function(){return R},EDGE_RUNTIME_WEBPACK:function(){return en},EDGE_UNSUPPORTED_NODE_APIS:function(){return ef},EXPORT_DETAIL:function(){return x},EXPORT_MARKER:function(){return T},FUNCTIONS_CONFIG_MANIFEST:function(){return I},GOOGLE_FONT_PROVIDER:function(){return es},IMAGES_MANIFEST:function(){return A},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return X},MIDDLEWARE_BUILD_MANIFEST:function(){return G},MIDDLEWARE_MANIFEST:function(){return N},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return r.default},NEXT_BUILTIN_DOCUMENT:function(){return $},NEXT_FONT_MANIFEST:function(){return y},OPTIMIZED_FONT_PROVIDERS:function(){return eo},PAGES_MANIFEST:function(){return _},PHASE_DEVELOPMENT_SERVER:function(){return p},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return f},PHASE_PRODUCTION_BUILD:function(){return c},PHASE_PRODUCTION_SERVER:function(){return u},PHASE_TEST:function(){return d},PRERENDER_MANIFEST:function(){return O},REACT_LOADABLE_MANIFEST:function(){return M},ROUTES_MANIFEST:function(){return P},RSC_MODULE_TYPES:function(){return ed},SERVER_DIRECTORY:function(){return L},SERVER_FILES_MANIFEST:function(){return v},SERVER_PROPS_ID:function(){return ei},SERVER_REFERENCE_MANIFEST:function(){return W},STATIC_PROPS_ID:function(){return er},STATIC_STATUS_PAGES:function(){return ec},STRING_LITERAL_DROP_BUNDLE:function(){return k},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return S},SYSTEM_ENTRYPOINTS:function(){return e_},TRACE_OUTPUT_VERSION:function(){return eu},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ep},UNDERSCORE_NOT_FOUND_ROUTE:function(){return o},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return a}});let r=n(5157)._(n(4254)),i={client:"client",server:"server",edgeServer:"edge-server"},s={[i.client]:0,[i.server]:1,[i.edgeServer]:2},o="/_not-found",a=""+o+"/page",l="phase-export",c="phase-production-build",u="phase-production-server",p="phase-development-server",d="phase-test",f="phase-info",_="pages-manifest.json",h="app-paths-manifest.json",m="app-path-routes-manifest.json",E="build-manifest.json",g="app-build-manifest.json",I="functions-config-manifest.json",S="subresource-integrity-manifest",y="next-font-manifest",T="export-marker.json",x="export-detail.json",O="prerender-manifest.json",P="routes-manifest.json",A="images-manifest.json",v="required-server-files.json",j="_devPagesManifest.json",N="middleware-manifest.json",R="_devMiddlewareManifest.json",M="react-loadable-manifest.json",b="font-manifest.json",L="server",C=["next.config.js","next.config.mjs"],F="BUILD_ID",D=["/_document","/_app","/_error"],U="public",w="static",k="__NEXT_DROP_CLIENT_FILE__",$="__NEXT_BUILTIN_DOCUMENT__",B="__barrel_optimize__",H="client-reference-manifest",W="server-reference-manifest",G="middleware-build-manifest",z="middleware-react-loadable-manifest",X="interception-route-rewrite-manifest",V="main",Y=""+V+"-app",Z="app-pages-internals",K="react-refresh",q="amp",J="webpack",Q="polyfills",ee=Symbol(Q),et="webpack-runtime",en="edge-runtime-webpack",er="__N_SSG",ei="__N_SSP",es="https://fonts.googleapis.com/",eo=[{url:es,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],ea={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},ec=["/500"],eu=1,ep=6e3,ed={client:"client",server:"server"},ef=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],e_=new Set([V,K,q,Y]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},752:(e,t)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return n}})},4254:e=>{"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},1476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePagePath",{enumerable:!0,get:function(){return o}});let r=n(5208),i=n(8251),s=n(9974);function o(e){let t=/^\/index(\/|$)/.test(e)&&!(0,i.isDynamicRoute)(e)?"/index"+e:"/"===e?"/index":(0,r.ensureLeadingSlash)(e);{let{posix:e}=n(5315),r=e.normalize(t);if(r!==t)throw new s.NormalizeError("Requested and resolved page mismatch: "+t+" "+r)}return t}},5369:(e,t)=>{"use strict";Object.defineProperty(t,"Z",{enumerable:!0,get:function(){return i}});let n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=(e,t)=>{let n=e;return"string"==typeof t?n=e.toLocaleString(t):!0===t&&(n=e.toLocaleString()),n};function i(e,t){if(!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);if((t=Object.assign({},t)).signed&&0===e)return" 0 B";let i=e<0,s=i?"-":t.signed?"+":"";if(i&&(e=-e),e<1)return s+r(e,t.locale)+" B";let o=Math.min(Math.floor(Math.log10(e)/3),n.length-1);return s+r(e=Number((e/Math.pow(1e3,o)).toPrecision(3)),t.locale)+" "+n[o]}},7318:(e,t,n)=>{"use strict";e.exports=n(83).vendored.contexts.HtmlContext},6097:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getPageFiles",{enumerable:!0,get:function(){return s}});let r=n(7882),i=n(1476);function s(e,t){let n=(0,r.denormalizePagePath)((0,i.normalizePagePath)(t));return e.pages[n]||(console.warn(`Could not find files for ${n} in .next/build-manifest.json`),[])}},2097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ESCAPE_REGEX:function(){return r},htmlEscapeJsonString:function(){return i}});let n={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},r=/[&><\u2028\u2029]/g;function i(e){return e.replace(r,e=>n[e])}},6813:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cleanAmpPath:function(){return s},debounce:function(){return o},isBlockedPage:function(){return i}});let r=n(5432);function i(e){return r.BLOCKED_PAGES.includes(e)}function s(e){return e.match(/\?amp=(y|yes|true|1)/)&&(e=e.replace(/\?amp=(y|yes|true|1)&?/,"?")),e.match(/&=(y|yes|true|1)/)&&(e=e.replace(/&=(y|yes|true|1)/,"")),e=e.replace(/\?$/,"")}function o(e,t,n=1/0){let r,i,s;let o=0,a=0;function l(){let c=Date.now(),u=a+t-c;u<=0||o+n>=c?(r=void 0,e.apply(s,i)):r=setTimeout(l,u)}return function(...e){i=e,s=this,a=Date.now(),void 0===r&&(o=a,r=setTimeout(l,t))}}},5239:(e,t,n)=>{e.exports=n(6439)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=276,exports.ids=[276],exports.modules={9296:(e,t)=>{function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},7882:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return i}});let n=r(8251),o=r(6731);function i(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},5208:(e,t)=>{function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},6731:(e,t)=>{function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},3409:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return i},normalizeRscURL:function(){return s}});let n=r(5208),o=r(3019);function i(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function s(e){return e.replace(/\.rsc($|\?)/,"$1")}},8251:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(8969),o=r(5611)},5611:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let n=r(8791),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},8969:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),s=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),s=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function i(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(s){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(s)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},3019:(e,t)=>{function r(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});let n="__PAGE__",o="__DEFAULT__"},9974:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return p},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return b},NormalizeError:function(){return m},PageNotFoundError:function(){return g},SP:function(){return h},ST:function(){return d},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return a},getLocationOrigin:function(){return s},getURL:function(){return u},isAbsoluteUrl:function(){return i},isResSent:function(){return l},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return _}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return r||(r=!0,t=e(...o)),t}}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=e=>o.test(e);function s(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function u(){let{href:e}=window.location,t=s();return e.substring(t.length)}function a(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function l(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&l(r))return n;if(!n)throw Error('"'+a(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let h="undefined"!=typeof performance,d=h&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class p extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class b extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function _(e){return JSON.stringify({message:e.message,stack:e.stack})}},4253:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return i}});let n=r(9296);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function i(e){return o(e)?e:Error((0,n.isPlainObject)(e)?JSON.stringify(e):e+"")}},8791:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return s},isInterceptionRouteAppPath:function(){return i}});let n=r(3409),o=["(..)(..)","(.)","(..)","(...)"];function i(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function s(e){let t,r,i;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,i]=e.split(r,2);break}if(!t||!r||!i)throw Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":i="/"===t?`/${i}`:t+"/"+i;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);i=t.split("/").slice(0,-1).concat(i).join("/");break;case"(...)":i="/"+i;break;case"(..)(..)":let s=t.split("/");if(s.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);i=s.slice(0,-2).concat(i).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:i}}},83:(e,t,r)=>{e.exports=r(2785)},5157:(e,t)=>{t._=t._interop_require_default=function(e){return e&&e.__esModule?e:{default:e}}}};
|