prismic 1.23.0 → 1.24.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/adapters-CuXozoyY.mjs +189 -0
- package/dist/{auth-NkX7Docj.mjs → auth-CsokWsVo.mjs} +2 -2
- package/dist/index.mjs +94 -94
- package/dist/{nextjs-TJI3bKFA.mjs → nextjs-D65xFGap.mjs} +51 -51
- package/dist/{nuxt-DfWyc1bJ.mjs → nuxt-YzpEi3A5.mjs} +11 -11
- package/dist/package-DCbOjRWH.mjs +1 -0
- package/dist/packageJson-B1_pkZr8.mjs +2 -0
- package/dist/request-Dx4vx1nN.mjs +30 -0
- package/dist/{segment-yGieXuDf.mjs → segment-DkMwCXor.mjs} +1 -1
- package/dist/subprocesses/refreshToken.mjs +1 -1
- package/dist/subprocesses/sendSegmentEvents.mjs +1 -1
- package/dist/subprocesses/updateVersionState.mjs +1 -1
- package/dist/sveltekit-7mpC1weE.mjs +273 -0
- package/dist/sveltekit-CpIdkani.mjs +1 -0
- package/dist/sveltekit2-C9cZPBvU.mjs +50 -0
- package/dist/{update-notifier-ChP_LYxw.mjs → update-notifier-d8fLG6jz.mjs} +1 -1
- package/package.json +7 -7
- package/dist/adapters-Bt9QKcJb.mjs +0 -191
- package/dist/package-Dyw1b366.mjs +0 -1
- package/dist/packageJson-Bxht6H4y.mjs +0 -2
- package/dist/request-DJTl_0US.mjs +0 -30
- package/dist/sveltekit-CC1sBn9O.mjs +0 -302
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./adapters-CuXozoyY.mjs";import{_ as l,l as u}from"./request-Dx4vx1nN.mjs";import{a as d,n as f,s as p}from"./packageJson-B1_pkZr8.mjs";import{relative as m}from"node:path";import{fileURLToPath as h}from"node:url";const g=r`
|
|
2
2
|
return (
|
|
3
3
|
<section
|
|
4
4
|
data-slice-type={slice.slice_type}
|
|
@@ -9,36 +9,36 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
9
9
|
<strong>You can edit this slice directly in your code editor.</strong>
|
|
10
10
|
</section>
|
|
11
11
|
)
|
|
12
|
-
`;function _({name:e,id:t,typescript:
|
|
12
|
+
`;function _({name:e,id:t,typescript:i}){let a=n(e),o=n(t),s=r`
|
|
13
13
|
import { FC } from "react";
|
|
14
14
|
import { Content } from "@prismicio/client";
|
|
15
15
|
import { SliceComponentProps } from "@prismicio/react";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Props for \`${
|
|
18
|
+
* Props for \`${a}\`.
|
|
19
19
|
*/
|
|
20
|
-
export type ${
|
|
20
|
+
export type ${a}Props = SliceComponentProps<Content.${o}Slice>;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Component for "${e}" Slices.
|
|
24
24
|
*/
|
|
25
|
-
const ${
|
|
25
|
+
const ${a}: FC<${a}Props> = ({ slice }) => {
|
|
26
26
|
${g}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export default ${
|
|
30
|
-
`,c=
|
|
29
|
+
export default ${a}
|
|
30
|
+
`,c=r`
|
|
31
31
|
/**
|
|
32
|
-
* @typedef {import("@prismicio/client").Content.${
|
|
33
|
-
* @typedef {import("@prismicio/react").SliceComponentProps<${
|
|
34
|
-
* @type {import("react").FC<${
|
|
32
|
+
* @typedef {import("@prismicio/client").Content.${o}Slice} ${a}Slice
|
|
33
|
+
* @typedef {import("@prismicio/react").SliceComponentProps<${a}Slice>} ${a}Props
|
|
34
|
+
* @type {import("react").FC<${a}Props>}
|
|
35
35
|
*/
|
|
36
|
-
const ${
|
|
36
|
+
const ${a} = ({ slice }) => {
|
|
37
37
|
${g}
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
export default ${
|
|
41
|
-
`;return
|
|
40
|
+
export default ${a};
|
|
41
|
+
`;return i?s:c}function v({model:e,routePath:t,typescript:n,appRouter:i}){return i?e.repeatable?n?r`
|
|
42
42
|
import { SliceZone } from "@prismicio/react";
|
|
43
43
|
import { createClient } from "@/prismicio";
|
|
44
44
|
import { components } from "@/slices";
|
|
@@ -50,7 +50,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
50
50
|
|
|
51
51
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
52
52
|
}
|
|
53
|
-
`:
|
|
53
|
+
`:r`
|
|
54
54
|
import { SliceZone } from "@prismicio/react";
|
|
55
55
|
import { createClient } from "@/prismicio";
|
|
56
56
|
import { components } from "@/slices";
|
|
@@ -65,7 +65,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
65
65
|
|
|
66
66
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
67
67
|
}
|
|
68
|
-
`:
|
|
68
|
+
`:r`
|
|
69
69
|
import { SliceZone } from "@prismicio/react";
|
|
70
70
|
import { createClient } from "@/prismicio";
|
|
71
71
|
import { components } from "@/slices";
|
|
@@ -76,7 +76,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
76
76
|
|
|
77
77
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
78
78
|
}
|
|
79
|
-
`:e.repeatable?n?
|
|
79
|
+
`:e.repeatable?n?r`
|
|
80
80
|
import type { InferGetStaticPropsType, GetStaticPropsContext } from "next";
|
|
81
81
|
import { SliceZone } from "@prismicio/react";
|
|
82
82
|
import { createClient } from "@/prismicio";
|
|
@@ -104,7 +104,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
104
104
|
fallback: false,
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
`:
|
|
107
|
+
`:r`
|
|
108
108
|
import { SliceZone } from "@prismicio/react";
|
|
109
109
|
import { createClient } from "@/prismicio";
|
|
110
110
|
import { components } from "@/slices";
|
|
@@ -132,7 +132,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
132
132
|
fallback: false,
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
`:n?
|
|
135
|
+
`:n?r`
|
|
136
136
|
import type { InferGetStaticPropsType, GetStaticPropsContext } from "next";
|
|
137
137
|
import { SliceZone } from "@prismicio/react";
|
|
138
138
|
import { createClient } from "@/prismicio";
|
|
@@ -148,7 +148,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
148
148
|
export default function Page({ page }: InferGetStaticPropsType<typeof getStaticProps>) {
|
|
149
149
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
150
150
|
}
|
|
151
|
-
`:
|
|
151
|
+
`:r`
|
|
152
152
|
import { SliceZone } from "@prismicio/react";
|
|
153
153
|
import { createClient } from "@/prismicio";
|
|
154
154
|
import { components } from "@/slices";
|
|
@@ -166,14 +166,14 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
166
166
|
|
|
167
167
|
return { props: { page } };
|
|
168
168
|
}
|
|
169
|
-
`}function y({typescript:e,appRouter:t,hasSrcDirectory:n}){let
|
|
169
|
+
`}function y({typescript:e,appRouter:t,hasSrcDirectory:n}){let i=`${n?`..`:`.`}/prismic.config.json`,a,o;return t&&e?(a=r`
|
|
170
170
|
import {
|
|
171
171
|
createClient as baseCreateClient,
|
|
172
172
|
type ClientConfig,
|
|
173
173
|
} from "@prismicio/client";
|
|
174
174
|
import { enableAutoPreviews } from "@prismicio/next";
|
|
175
|
-
import prismicConfig from "${
|
|
176
|
-
`,
|
|
175
|
+
import prismicConfig from "${i}";
|
|
176
|
+
`,o=r`
|
|
177
177
|
/**
|
|
178
178
|
* Creates a Prismic client for the project's repository. The client is used to
|
|
179
179
|
* query content from the Prismic API.
|
|
@@ -194,11 +194,11 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
194
194
|
|
|
195
195
|
return client;
|
|
196
196
|
};
|
|
197
|
-
`):t?(
|
|
197
|
+
`):t?(a=r`
|
|
198
198
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
199
199
|
import { enableAutoPreviews } from "@prismicio/next";
|
|
200
|
-
import prismicConfig from "${
|
|
201
|
-
`,
|
|
200
|
+
import prismicConfig from "${i}";
|
|
201
|
+
`,o=r`
|
|
202
202
|
/**
|
|
203
203
|
* Creates a Prismic client for the project's repository. The client is used to
|
|
204
204
|
* query content from the Prismic API.
|
|
@@ -219,11 +219,11 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
219
219
|
|
|
220
220
|
return client;
|
|
221
221
|
};
|
|
222
|
-
`):e?(
|
|
222
|
+
`):e?(a=r`
|
|
223
223
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
224
224
|
import { enableAutoPreviews, type CreateClientConfig } from "@prismicio/next/pages";
|
|
225
|
-
import prismicConfig from "${
|
|
226
|
-
`,
|
|
225
|
+
import prismicConfig from "${i}";
|
|
226
|
+
`,o=r`
|
|
227
227
|
/**
|
|
228
228
|
* Creates a Prismic client for the project's repository. The client is used to
|
|
229
229
|
* query content from the Prismic API.
|
|
@@ -240,11 +240,11 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
240
240
|
|
|
241
241
|
return client;
|
|
242
242
|
};
|
|
243
|
-
`):(
|
|
243
|
+
`):(a=r`
|
|
244
244
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
245
245
|
import { enableAutoPreviews } from "@prismicio/next/pages";
|
|
246
|
-
import prismicConfig from "${
|
|
247
|
-
`,
|
|
246
|
+
import prismicConfig from "${i}";
|
|
247
|
+
`,o=r`
|
|
248
248
|
/**
|
|
249
249
|
* Creates a Prismic client for the project's repository. The client is used to
|
|
250
250
|
* query content from the Prismic API.
|
|
@@ -261,8 +261,8 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
261
261
|
|
|
262
262
|
return client;
|
|
263
263
|
};
|
|
264
|
-
`),
|
|
265
|
-
${
|
|
264
|
+
`),r`
|
|
265
|
+
${a}
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* The project's Prismic repository name.
|
|
@@ -270,8 +270,8 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
270
270
|
export const repositoryName =
|
|
271
271
|
process.env.NEXT_PUBLIC_PRISMIC_ENVIRONMENT || prismicConfig.repositoryName;
|
|
272
272
|
|
|
273
|
-
${
|
|
274
|
-
`}function b({typescript:e,appRouter:t}){let n=
|
|
273
|
+
${o}
|
|
274
|
+
`}function b({typescript:e,appRouter:t}){let n=r`
|
|
275
275
|
import { SliceSimulator, SliceSimulatorParams, getSlices } from "@prismicio/next";
|
|
276
276
|
import { SliceZone } from "@prismicio/react";
|
|
277
277
|
|
|
@@ -289,7 +289,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
289
289
|
</SliceSimulator>
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
|
-
`,r
|
|
292
|
+
`,i=r`
|
|
293
293
|
import { SliceSimulator, getSlices } from "@prismicio/next";
|
|
294
294
|
import { SliceZone } from "@prismicio/react";
|
|
295
295
|
|
|
@@ -305,7 +305,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
305
305
|
</SliceSimulator>
|
|
306
306
|
);
|
|
307
307
|
}
|
|
308
|
-
`,
|
|
308
|
+
`,a=r`
|
|
309
309
|
import { SliceSimulator } from "@prismicio/next/pages";
|
|
310
310
|
import { SliceZone } from "@prismicio/react";
|
|
311
311
|
|
|
@@ -318,7 +318,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
318
318
|
/>
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
|
-
`;return t?e?n:
|
|
321
|
+
`;return t?e?n:i:a}function x({typescript:e,appRouter:t}){let n=r`
|
|
322
322
|
import { NextRequest } from "next/server";
|
|
323
323
|
import { redirectToPreviewURL } from "@prismicio/next";
|
|
324
324
|
|
|
@@ -329,7 +329,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
329
329
|
|
|
330
330
|
return await redirectToPreviewURL({ client, request });
|
|
331
331
|
}
|
|
332
|
-
`,r
|
|
332
|
+
`,i=r`
|
|
333
333
|
import { redirectToPreviewURL } from "@prismicio/next";
|
|
334
334
|
|
|
335
335
|
import { createClient } from "../../../prismicio";
|
|
@@ -339,7 +339,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
339
339
|
|
|
340
340
|
return await redirectToPreviewURL({ client, request });
|
|
341
341
|
}
|
|
342
|
-
`,
|
|
342
|
+
`,a=r`
|
|
343
343
|
import { NextApiRequest, NextApiResponse } from "next";
|
|
344
344
|
import { setPreviewData, redirectToPreviewURL } from "@prismicio/next/pages";
|
|
345
345
|
|
|
@@ -352,7 +352,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
352
352
|
|
|
353
353
|
return await redirectToPreviewURL({ req, res, client });
|
|
354
354
|
};
|
|
355
|
-
`,
|
|
355
|
+
`,o=r`
|
|
356
356
|
import { setPreviewData, redirectToPreviewURL } from "@prismicio/next/pages";
|
|
357
357
|
|
|
358
358
|
import { createClient } from "../../prismicio";
|
|
@@ -364,26 +364,26 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
364
364
|
|
|
365
365
|
return await redirectToPreviewURL({ req, res, client });
|
|
366
366
|
};
|
|
367
|
-
`;return t?e?n:
|
|
367
|
+
`;return t?e?n:i:e?a:o}function S({typescript:e,appRouter:t}){let n=r`
|
|
368
368
|
import { exitPreview } from "@prismicio/next";
|
|
369
369
|
|
|
370
370
|
export function GET() {
|
|
371
371
|
return exitPreview();
|
|
372
372
|
}
|
|
373
|
-
`,r
|
|
373
|
+
`,i=r`
|
|
374
374
|
import { NextApiRequest, NextApiResponse } from "next";
|
|
375
375
|
import { exitPreview } from "@prismicio/next/pages";
|
|
376
376
|
|
|
377
377
|
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
|
378
378
|
return exitPreview({ req, res });
|
|
379
379
|
}
|
|
380
|
-
`,
|
|
380
|
+
`,a=r`
|
|
381
381
|
import { exitPreview } from "@prismicio/next/pages";
|
|
382
382
|
|
|
383
383
|
export default function handler(req, res) {
|
|
384
384
|
return exitPreview({ req, res });
|
|
385
385
|
}
|
|
386
|
-
`;return t?n:e?
|
|
386
|
+
`;return t?n:e?i:a}function C({supportsCacheLife:e}){return r`
|
|
387
387
|
import { NextResponse } from "next/server";
|
|
388
388
|
import { revalidateTag } from "next/cache";
|
|
389
389
|
|
|
@@ -392,7 +392,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
392
392
|
|
|
393
393
|
return NextResponse.json({ revalidated: true, now: Date.now() });
|
|
394
394
|
}
|
|
395
|
-
`}var w=class extends
|
|
395
|
+
`}var w=class extends o{id=`next`;environmentEnvVarName=`NEXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/api/preview`};async setupProject(){await f({"@prismicio/client":`^${await p(`@prismicio/client`)}`,"@prismicio/react":`^${await p(`@prismicio/react`)}`,"@prismicio/next":`^${await p(`@prismicio/next`)}`});let n=await E(),r=await s(),i=await e(),a=await T(),o=await d(`next`)>=16;await t(new URL(`prismicio.${r}`,n),y({typescript:i,appRouter:a,hasSrcDirectory:await D()})),await t(new URL(a?`app/slice-simulator/page.${r}x`:`pages/slice-simulator.${r}x`,n),b({typescript:i,appRouter:a})),await t(new URL(a?`app/api/preview/route.${r}`:`pages/api/preview.${r}`,n),x({typescript:i,appRouter:a})),await t(new URL(a?`app/api/exit-preview/route.${r}`:`pages/api/exit-preview.${r}`,n),S({typescript:i,appRouter:a})),a&&await t(new URL(`app/api/revalidate/route.${r}`,n),C({supportsCacheLife:o}))}async getSetupInstructions(){if(await i(`PrismicPreview`))return;let e=await D()?`src/`:``,t=`${await s()}x`;return await T()?r`
|
|
396
396
|
Action required: add <PrismicPreview> to your root layout.
|
|
397
397
|
|
|
398
398
|
Previews do not work until you do this, and the CLI cannot edit your
|
|
@@ -413,7 +413,7 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
Run \`prismic docs view nextjs\` for details.
|
|
416
|
-
`:
|
|
416
|
+
`:r`
|
|
417
417
|
Action required: add <PrismicPreview> to your app.
|
|
418
418
|
|
|
419
419
|
Previews do not work until you do this, and the CLI cannot edit your app
|
|
@@ -434,14 +434,14 @@ import{S as e,ct as t,d as n,f as r,ft as i,s as a,st as o,t as s,u as c,v as l}
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
Run \`prismic docs view nextjs\` for details.
|
|
437
|
-
`}async createSliceIndexFile(e){let
|
|
437
|
+
`}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href),i=t.map(t=>{let r=m(h(e),h(t.directory));return`import ${n(t.model.name)} from "./${r}";`}),o=t.map(e=>`${a(e.model.id)}: ${n(e.model.name)}`),c=r`
|
|
438
438
|
// Code generated by Prismic. DO NOT EDIT.
|
|
439
439
|
|
|
440
|
-
${
|
|
440
|
+
${i.join(`
|
|
441
441
|
`)}
|
|
442
442
|
|
|
443
443
|
export const components = {
|
|
444
|
-
${
|
|
444
|
+
${o.join(`,
|
|
445
445
|
`)}
|
|
446
446
|
};
|
|
447
|
-
`;await
|
|
447
|
+
`;await l(new URL(`index.${await s()}`,e),c)}async getDefaultSliceLibrary(){return new URL(await D()?`src/slices/`:`slices/`,await c())}async createSliceComponent(t,n){let r=_({name:t.name,id:t.id,typescript:await e()});await l(new URL(`index.${await s()}x`,n),r)}async getPageFiles(t,n){let r=await E(),i=`${await s()}x`,a=await T(),o=a?`app/${n}/page`:`pages/${n||`index`}`,c=new URL(`${o}.${i}`,r);for(let e of[`js`,`jsx`,`ts`,`tsx`]){let t=new URL(`${o}.${e}`,r);await u(t)&&(c=t)}let l=await e();return[{path:c,contents:v({model:t,routePath:n,typescript:l,appRouter:a})}]}};async function T(){return u(new URL(`app/`,await E()))}async function E(){let e=await c();return await D()?new URL(`src/`,e):e}async function D(){return u(new URL(`src/`,await c()))}export{w as NextJsAdapter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,T as t,_ as n,d as r,dt as i,ot as a,st as o,t as s,u as c,x as l}from"./adapters-CuXozoyY.mjs";import{_ as u,l as d}from"./request-Dx4vx1nN.mjs";import{f,n as p,s as m}from"./packageJson-B1_pkZr8.mjs";import{t as h}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as g,rm as _}from"node:fs/promises";import{relative as v}from"node:path";import{fileURLToPath as y}from"node:url";var b,x,S,C,w;const T=a`
|
|
2
2
|
<template>
|
|
3
3
|
<section
|
|
4
4
|
:data-slice-type="slice.slice_type"
|
|
@@ -9,7 +9,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
9
9
|
<strong>You can edit this slice directly in your code editor.</strong>
|
|
10
10
|
</section>
|
|
11
11
|
</template>
|
|
12
|
-
`;function E({name:e,typescript:t}){return t?
|
|
12
|
+
`;function E({name:e,typescript:t}){return t?a(b||=h([`
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
import type { Content } from "@prismicio/client";
|
|
15
15
|
|
|
@@ -33,7 +33,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
33
33
|
<\/script>
|
|
34
34
|
|
|
35
35
|
`,`
|
|
36
|
-
`]),
|
|
36
|
+
`]),i(e),T):a(x||=h([`
|
|
37
37
|
<script setup>
|
|
38
38
|
// The array passed to \`getSliceComponentProps\` is purely optional.
|
|
39
39
|
// Consider it as a visual hint for you when templating your slice.
|
|
@@ -49,7 +49,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
49
49
|
<\/script>
|
|
50
50
|
|
|
51
51
|
`,`
|
|
52
|
-
`]),T)}function D({model:e,typescript:t}){let n=t?`setup lang="ts"`:`setup`;if(e.repeatable){let r=t?`route.params.uid as string`:`route.params.uid`;return
|
|
52
|
+
`]),T)}function D({model:e,typescript:t}){let n=t?`setup lang="ts"`:`setup`;if(e.repeatable){let r=t?`route.params.uid as string`:`route.params.uid`;return a(S||=h([`
|
|
53
53
|
<script `,`>
|
|
54
54
|
import { components } from "~/slices";
|
|
55
55
|
|
|
@@ -65,7 +65,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
65
65
|
<SliceZone :slices="page?.data.slices ?? []" :components="components" />
|
|
66
66
|
</main>
|
|
67
67
|
</template>
|
|
68
|
-
`]),n,r,e.id,r)}return
|
|
68
|
+
`]),n,r,e.id,r)}return a(C||=h([`
|
|
69
69
|
<script `,`>
|
|
70
70
|
import { components } from "~/slices";
|
|
71
71
|
|
|
@@ -80,7 +80,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
80
80
|
<SliceZone :slices="page?.data.slices ?? []" :components="components" />
|
|
81
81
|
</main>
|
|
82
82
|
</template>
|
|
83
|
-
`]),n,e.id,e.id)}function O({typescript:e}){let t=e?`setup lang="ts"`:`setup`;return
|
|
83
|
+
`]),n,e.id,e.id)}function O({typescript:e}){let t=e?`setup lang="ts"`:`setup`;return a(w||=h([`
|
|
84
84
|
<script `,`>
|
|
85
85
|
import { components } from "~/slices";
|
|
86
86
|
<\/script>
|
|
@@ -90,7 +90,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
90
90
|
<SliceZone :slices="slices" :components="components" />
|
|
91
91
|
</SliceSimulator>
|
|
92
92
|
</template>
|
|
93
|
-
`]),t)}const k=`@nuxtjs/prismic`,A=[`<template><div><NuxtRouteAnnouncer/><NuxtWelcome/></div></template>`,`<template><div><NuxtWelcome/></div></template>`];var j=class extends s{id=`nuxt`;environmentEnvVarName=`NUXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/preview`};async setupProject(){await p({"@prismicio/client":`^${await m(`@prismicio/client`)}`,[k]:`^${await m(k)}`}),await P(),await
|
|
93
|
+
`]),t)}const k=`@nuxtjs/prismic`,A=[`<template><div><NuxtRouteAnnouncer/><NuxtWelcome/></div></template>`,`<template><div><NuxtWelcome/></div></template>`];var j=class extends s{id=`nuxt`;environmentEnvVarName=`NUXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/preview`};async setupProject(){await p({"@prismicio/client":`^${await m(`@prismicio/client`)}`,[k]:`^${await m(k)}`}),await P(),await r(new URL(`slice-simulator.vue`,await N()),O({typescript:await n()})),await L(),await this.modifySliceLibraryPath()}async getSetupInstructions(){let e=[];await F()||e.push(a`
|
|
94
94
|
Action required: add "${k}" to modules in nuxt.config.
|
|
95
95
|
|
|
96
96
|
Prismic does not work until you do this. Make the change now.
|
|
@@ -100,8 +100,8 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
100
100
|
+ "${k}",
|
|
101
101
|
],
|
|
102
102
|
});
|
|
103
|
-
`);let
|
|
104
|
-
Action required: add <NuxtPage /> to ${
|
|
103
|
+
`);let t=await I();if(t!==void 0&&!t.includes(`<NuxtPage`)){let t=v(y(await l()),y(new URL(`app.vue`,await M())));e.push(a`
|
|
104
|
+
Action required: add <NuxtPage /> to ${t}.
|
|
105
105
|
|
|
106
106
|
Pages, including the slice simulator, do not render until you do
|
|
107
107
|
this. Make the change now.
|
|
@@ -114,7 +114,7 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
114
114
|
</template>
|
|
115
115
|
`)}return e.join(`
|
|
116
116
|
|
|
117
|
-
`)||void 0}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href).map(t=>{let
|
|
117
|
+
`)||void 0}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href).map(t=>{let n=v(y(e),y(t.directory));return`${o(t.model.id)}: defineAsyncComponent(() => import("./${n}/index.vue"))`}),n=a`
|
|
118
118
|
// Code generated by Prismic. DO NOT EDIT.
|
|
119
119
|
|
|
120
120
|
import { defineAsyncComponent } from "vue";
|
|
@@ -124,4 +124,4 @@ import{E as e,S as t,ct as n,d as r,f as i,ft as a,st as o,t as s,v as c,w as l}
|
|
|
124
124
|
${t.join(`,
|
|
125
125
|
`)}
|
|
126
126
|
});
|
|
127
|
-
`;await u(new URL(`index.${await
|
|
127
|
+
`;await u(new URL(`index.${await c()}`,e),n)}async getDefaultSliceLibrary(){return new URL(`slices/`,await M())}async createSliceComponent(e,t){let r=E({name:e.name,typescript:await n()});await u(new URL(`index.vue`,t),r)}async getPageFiles(e,t){return[{path:new URL(`${t||`index`}.vue`,await N()),contents:D({model:e,typescript:await n()})}]}async modifySliceLibraryPath(){let n=await l(),r=await d(new URL(`app/`,n)),i=await d(new URL(`src/`,n));if(!r&&!i)return;let a;try{a=await e()}catch{return}JSON.stringify(a.libraries)===JSON.stringify([`./slices`])&&((await this.getSlices()).length>0||await t({libraries:[r?`./app/slices`:`./src/slices`]}))}};async function M(){let e=await l(),t=new URL(`app/`,e);if(await d(t))return t;let n=new URL(`src/`,e);return await d(n)?n:e}async function N(){let e=await l();for(let t of[`app/pages/`,`src/pages/`,`pages/`]){let n=new URL(t,e);if(await d(n))return n}return new URL(`pages/`,await M())}async function P(){if(!await F())try{await f(`nuxt`,[`module`,`add`,k,`--skipInstall`],{timeout:6e4,nodeOptions:{cwd:y(await l()),stdio:[`ignore`,`pipe`,`pipe`]}})}catch{}}async function F(){let e=await l();for(let t of[`ts`,`js`,`mts`,`mjs`,`cts`,`cjs`]){let n=new URL(`nuxt.config.${t}`,e);if((await g(n,`utf8`).catch(()=>``)).includes(k))return!0}return!1}async function I(){return await g(new URL(`app.vue`,await M()),`utf8`).catch(()=>void 0)}async function L(){let e=await I();A.includes(e?.replace(/\s/g,``)??``)&&await _(new URL(`app.vue`,await M()))}export{j as NuxtAdapter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`prismic`,t=`1.24.0`;export{t as n,e as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{F as e,I as t,N as n,P as r,f as i,l as a,s as o,u as s}from"./request-Dx4vx1nN.mjs";import{createRequire as c}from"node:module";import{readFile as l,writeFile as u}from"node:fs/promises";import{basename as d,delimiter as f,dirname as p,normalize as m,resolve as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as ee}from"node:child_process";import{closeSync as te,openSync as ne,readSync as _,statSync as v}from"node:fs";import{cwd as y}from"node:process";import{pipeline as b}from"node:stream/promises";import{PassThrough as x}from"node:stream";import S from"node:readline";const re=/^(?:( )+|\t+)/,C=`space`;function w(e,t,n){return e&&t===C&&n===1}function T(e,t){let n=/* @__PURE__ */ new Map,r=0,i,a;for(let o of e.split(/\n/g)){if(!o)continue;let e=o.match(re);if(e===null)r=0,i=``;else{let o=e[0].length,s=e[1]?C:`tab`;if(w(t,s,o))continue;s!==i&&(r=0),i=s;let c=1,l=0,u=o-r;if(r=o,u===0)c=0,l=1;else{let e=Math.abs(u);if(w(t,s,e))continue;a=ie(s,e)}let d=n.get(a);n.set(a,d===void 0?[1,0]:[d[0]+c,d[1]+l])}}return n}function ie(e,t){return(e===C?`s`:`t`)+String(t)}function ae(e){return{type:e[0]===`s`?C:`tab`,amount:Number(e.slice(1))}}function oe(e){let t,n=0,r=0;for(let[i,[a,o]]of e)(a>n||a===n&&o>r)&&(n=a,r=o,t=i);return t}function se(e,t){return(e===C?` `:` `).repeat(t)}function ce(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);let t=T(e,!0);t.size===0&&(t=T(e,!1));let n=oe(t),r,i=0,a=``;return n!==void 0&&({type:r,amount:i}=ae(n),a=se(r,i)),{amount:i,type:r,indent:a}}const le=/^path$/i,E={key:`PATH`,value:``};function D(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!le.test(t))continue;let n=e[t];return n?{key:t,value:n}:E}return E}function O(e,t){let n=t.value.split(f),r=[],i=typeof e==`string`?e:g(e,{windows:!1}),a;do r.push(h(i,`node_modules`,`.bin`)),a=i,i=p(i);while(i!==a);r.push(p(process.execPath));let o=r.concat(n).join(f);return{key:t.key,value:o}}function k(e,t,n=!0){let r={...process.env,...t};if(!n)return r;let i=O(e,D(r));return r[i.key]=i.value,r}const A=e=>{let t=e.length,n=new x,r=()=>{--t===0&&n.end()};for(let t of e)b(t,n,{end:!1}).then(r).catch(r);return n},j=/([()\][%!^"`<>&|;, *?])/g,M=/^#!\s*(.+)/,N=/\.(?:com|exe)$/i,P=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,F=process.platform===`win32`,I=[`.EXE`,`.CMD`,`.BAT`,`.COM`],L=[``];function R(e,t=[],n={}){if(n.shell===!0||!F)return{command:e,args:t,options:n};let r=z(e,n),i=null;if(r!==null){let e=Buffer.alloc(150),t=null;try{t=ne(r,`r`),_(t,e,0,150,0)}catch{}finally{t!==null&&te(t)}let n=e.toString().match(M);if(n!==null){let e=n[1].trim(),t=e.indexOf(` `),r=t===-1?e:e.slice(0,t),a=t===-1?``:e.slice(t+1),o=d(r);i=o===`env`?a||null:o}}if(i!==null&&r!==null&&(t=[r,...t],e=i,r=z(e,n)),r===null||!N.test(r)){let i=r!==null&&P.test(r);e=m(e),e=e.replace(j,`^$1`),t=t.map(e=>(e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(j,`^$1`),i&&(e=e.replace(j,`^$1`)),e)),t=[`/d`,`/s`,`/c`,`"${[e,...t].join(` `)}"`],e=n.env?.comspec??`cmd.exe`,n={...n,windowsVerbatimArguments:!0}}return{command:e,args:t,options:n}}function z(e,t){let n=(t.cwd??y()).toString(),r=t.env??process.env,i=D(r).value,a=e.includes(`/`)||e.includes(`\\`)?[``]:[n,...i.split(f)],o=r.PATHEXT?r.PATHEXT.split(f):I;e.includes(`.`)&&o[0]!==``&&(o=[``,...o]);for(let t of[o,L])for(let r of a){let i=r.startsWith(`"`)&&r.endsWith(`"`)&&r.length>1?r.slice(1,-1):r,a=h(n,i,e);for(let e of t){let t=a+e;try{if(v(t).isFile())return t}catch{}}}return null}var B=class extends Error{result;output;exitCode;get signalCode(){return this.result.signalCode}constructor(e,t,n,r){let i=`The process`;n&&(i=`The command \`${r?.length?`${n} ${r.map(e=>/[ "'`()]/.test(e)?JSON.stringify(e):e).join(` `)}`:n}\``);let a=e.exitCode??1;super(e.signalCode===null?`${i} exited with a non-zero status (${a})`:`${i} was killed by the signal ${e.signalCode}`),this.result=e,this.output=t,this.exitCode=a,Object.defineProperty(this,"result",{enumerable:!1,writable:!1,configurable:!1})}};const V={timeout:void 0,persist:!1},H={windowsHide:!0};function U(e){let t=new AbortController;for(let n of e){if(n.aborted)return t.abort(),n;n.addEventListener(`abort`,()=>{t.abort(n.reason)},{signal:t.signal})}return t.signal}async function W(e){let t=``;try{for await(let n of e)t+=n.toString()}catch{}return t}var ue=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}get signalCode(){return this._process?.signalCode??null}constructor(e,t,n){this._options={...V,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(e=>{this._resolveClose=e})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return de(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=A(t),r=S.createInterface({input:n});for await(let e of r)yield e.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new B(this,void 0,this._command,this._args)}async _waitForOutput(){let e=this._process;if(!e)throw Error(`No process was started`);let[t,n]=await Promise.all([this._streamOut?W(this._streamOut):``,this._streamErr?W(this._streamErr):``]);await this._processClosed;let{stdin:r}=this._options;if(r&&typeof r!=`string`&&await r,e.removeAllListeners(),this._thrownError)throw this._thrownError;let i={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new B(this,i,this._command,this._args);return i}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=this._options,t={...H,...e.nodeOptions},n=t?.cwd??y(),r=[];this._resetState(),e.timeout!==void 0&&r.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&r.push(e.signal),e.persist===!0&&(t.detached=!0),r.length>0&&(t.signal=U(r)),t.env=k(n,t.env,e.nodePath);let i=R(this._command,this._args,t),a=ee(i.command,i.args,i.options);if(a.stderr&&(this._streamErr=a.stderr),a.stdout&&(this._streamOut=a.stdout),this._process=a,a.once(`error`,this._onError),a.once(`close`,this._onClose),a.stdin){let{stdin:t}=e;typeof t==`string`?a.stdin.end(t):t?.process?.stdout?.pipe(a.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{e.name===`AbortError`&&(!(e.cause instanceof Error)||e.cause.name!==`TimeoutError`)?this._aborted=!0:this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const G=(e,t,n)=>{let r=new ue(e,t,n);return r.spawn(),r},de=G,fe=n({name:r(t()),dependencies:r(e(t(),t())),devDependencies:r(e(t(),t())),peerDependencies:r(e(t(),t())),packageManager:r(t())});async function K(){let e=await q();return await i(e,{schema:fe})}async function q(){let e=await s(`package.json`);if(!e)throw new J;return e}var J=class extends Error{name=`MissingPackageJson`;message=`Could not find a package.json file.`};async function Y(e){let t=await q(),n=await l(t,`utf8`),r=ce(n).indent||` `,i=JSON.parse(n);e(i);let a=JSON.stringify(i,null,r)+`
|
|
2
|
+
`;await u(t,a)}async function pe(e){await Y(t=>{let n={...t.dependencies};for(let[r,i]of Object.entries(e))t.devDependencies?.[r]?t.devDependencies[r]=i:n[r]=i;t.dependencies=Object.fromEntries(Object.entries(n).sort(([e],[t])=>e.localeCompare(t)))})}async function me(e){let t=c(await q());try{let{version:n}=t(`${e}/package.json`),r=Number.parseInt(n.split(`.`)[0]);return Number.isNaN(r)?1/0:r}catch{let{dependencies:t,devDependencies:n,peerDependencies:r}=await K(),i={...r,...t,...n}[e]??``,a=/^[\^~]?(\d+)/.exec(i)?.[1];return a?Number(a):1/0}}function he(e,t){let n={...e.dependencies,...e.devDependencies},r={...t.dependencies,...t.devDependencies},i=e=>/\d+/.exec(e)?.[0];return Object.entries(r).filter(([e,t])=>{let r=e in n?i(n[e]):void 0;return r!==void 0&&r!==i(t)}).map(([e,t])=>({name:e,from:n[e],to:t}))}async function ge(e){await Y(t=>{for(let n of[`dependencies`,`devDependencies`,`peerDependencies`]){let r=t[n];if(r)for(let t of e)delete r[t]}})}async function X(e){await Y(t=>{t.name=e})}async function _e(e){let r=new URL(`${e}/latest`,`https://registry.npmjs.org/`),{version:i}=await o(r,{schema:n({version:t()})});return i}const Z={npm:[`npm`,`install`],yarn:[`yarn`,`install`],pnpm:[`pnpm`,`install`],bun:[`bun`,`install`]};async function ve(){return Z[await $()].join(` `)}async function ye(){let e=await q(),t=new URL(`.`,e),n=await $(),[r,...i]=Z[n];await G(r,i,{nodeOptions:{cwd:g(t),stdio:`inherit`},throwOnError:!0})}const Q={"bun.lock":`bun`,"bun.lockb":`bun`,"pnpm-lock.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`};async function $(){let e=await be();if(e)return e;let t=await q();for(let e in Q){let n=Q[e];if(await a(new URL(e,t)))return n}return`npm`}async function be(){try{let e=await K();if(!e.packageManager)return;let t=e.packageManager.split(`@`)[0];return t in Z?t:void 0}catch{return}}export{me as a,ye as c,X as d,G as f,ve as i,K as l,pe as n,he as o,q as r,_e as s,J as t,ge as u};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{parseEnv as e}from"node:util";import{access as t,mkdir as n,readFile as r,writeFile as i}from"node:fs/promises";import{isAbsolute as a,relative as o}from"node:path";import{fileURLToPath as s,pathToFileURL as c}from"node:url";import{existsSync as l,watch as u}from"node:fs";import{setTimeout as d}from"node:timers/promises";function f(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function p(e,t){return typeof t==`bigint`?t.toString():t}var ee=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function te(e){return new ee(e)}function ne(e){return e==null}function m(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function re(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function g(e){return re(e._zod.def)??e._zod.def.shape}function ie(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return h(this,t,e),e},enumerable:!0,configurable:!0})}function ae(e,t,n){t in e?h(e,t,n):e[t]=n}function oe(e,t,n,r){let i=g(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ie(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ae(e,a,r?r(n.value,a):n.value))}}function se(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ie(e,n,()=>t[n]):ae(e,n,r.value))}}function ce(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}const le=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){if(_(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return _(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ue(e){return v(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const de=/* @__PURE__*/ new Set([`string`,`number`,`symbol`]);function y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function b(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function fe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function pe(e,t){if(!v(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=g(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return b(e,ce(e._zod.def,{shape:me(e,t)}))}function me(e,t){let n={};return oe(n,e,Reflect.ownKeys(g(e))),se(n,t),n}function S(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function he(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function C(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function w(e){return typeof e==`string`?e:e?.message}function T(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function E(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function D(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:w(e.inst?._zod.def?.error?.(e))??w(a?.(e))??w(t?.error?.(e))??w(n.customError?.(e))??w(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}const ge=/[\uD800-\uDBFF]/;function _e(e){let t=e.length;if(!ge.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function ve(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ye(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):xe(e,n,r.value)}}function O(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function be(e,t,n){return O(e,t,n,!1)}function xe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:O(this,t,n.bind(this))},set(e){O(this,t,e)}})}function Se(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}let k,A=!1;const Ce={configurable:!0,get(){A=!0}};function j(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&k!==e._zod?k=void 0:(k=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ce);let e=A;A=!1;try{let r=n(this);return A?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),A||=e,r}catch(n){throw delete this[t],A||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function we(e,t,n,r){let i=Se(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Te;const M={value:void 0,enumerable:!1};let Ee=`captureStackTrace`in Error?Error:null;function De(e){let t=Ee;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ee=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function N(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=/* @__PURE__ */ new Set}a.prototype=i;let o=n,s=o&&/* @__PURE__ */ new WeakSet;function c(n,r){if(!n._zod){M.value=new a(r);try{Object.defineProperty(n,"_zod",M)}finally{M.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ye(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?De(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var P=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(Te=globalThis).__zod_globalConfig??(Te.__zod_globalConfig={});const F=globalThis.__zod_globalConfig;function I(e){return e&&Object.assign(F,e),F}function Oe(){let e=this._zod;return e.message??=JSON.stringify(e.def,p,2),e.message}function ke(e){this._zod.message=e}const Ae={get:Oe,set:ke,enumerable:!0,configurable:!0},L={value:void 0,enumerable:!1},je=/* @__PURE__ */ new WeakSet([Object.prototype,Error.prototype]),Me=(e,t)=>{e.name=`$ZodError`,L.value=t,Object.defineProperty(e,"issues",L),L.value=void 0,Object.defineProperty(e,"message",Ae);let n=Object.getPrototypeOf(e);je.has(n)||(je.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))};N(`$ZodError`,Me);const R=N(`$ZodError`,Me,void 0,{Parent:Error}),z=/* @__PURE__*/ (e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new P;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>D(e,o,I())));throw le(n,a?.callee??t),n}return s.value};return t})(R),Ne=/* @__PURE__*/ (e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>D(e,o,I())));throw le(n,a?.callee??t),n}return s.value};return t})(R),Pe=/* @__PURE__*/ (e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new P;return a.issues.length?Fe(e,a.issues,i):{success:!0,data:a.value}})(R);function Fe(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>D(e,n,I()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}const Ie=/* @__PURE__*/ (e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Fe(e,a.issues,i):{success:!0,data:a.value}})(R),Le=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Re=/^https?$/,ze=/^[\s\S]{0,}$/,Be=/^-?\d+(?:\.\d+)?$/,Ve=/^(?:true|false)$/i,B=/*@__PURE__*/ N(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),He=e=>{let t=e.value;return!ne(t)&&t.length!==void 0},Ue={number:`number`,bigint:`bigint`,object:`date`},We=/*@__PURE__*/ N(`$ZodCheckGreaterThan`,(e,t)=>{B.init(e,t);let n=Ue[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ue[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ge=/*@__PURE__*/ N(`$ZodCheckMinLength`,(e,t)=>{var n;B.init(e,t),(n=e._zod.def).when??(n.when=He),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?_e(r):i)>=t.minimum)return;let a=ve(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ke=/*@__PURE__*/ N(`$ZodCheckStringFormat`,(e,t)=>{var n,r;B.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),qe={major:4,minor:6,patch:6},V=/*@__PURE__*/ N(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=qe;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=S(t),a;for(let o of n){if(o._zod.def.when){if(he(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new P;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(E(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;E(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new P;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new P;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return be(this,`~standard`,Ye(this))},set"~standard"(e){O(this,`~standard`,e)}}),H=(e,t)=>e.issues.length?{issues:e.issues.map(e=>D(e,t,I()))}:{value:e.value};async function Je(e,t){let n={async:!0};return H(await e._zod.run({value:t,issues:[]},n),n)}function Ye(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return H(r,n)}catch{}return Je(e,t)},vendor:`zod`,version:1}}const U=/*@__PURE__*/ N(`$ZodString`,(e,t)=>{V.init(e,t),e._zod.pattern=t.pattern??ze,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Xe=/*@__PURE__*/ N(`$ZodStringFormat`,(e,t)=>{Ke.init(e,t),U.init(e,t)});function Ze(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Qe(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Ze(e)||2:$e(e,t)}function $e(e,t){if(!t.normalize&&t.protocol?.source===Re.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}const et=/[\t\n\r]/g;function tt(e){return e.replace(et,``)}function nt(e,t){return t.lastIndex=0,t.test(e.hostname)}function rt(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}const it=/*@__PURE__*/ N(`$ZodURL`,(e,t)=>{Xe.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Qe(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=tt(r);return}t.hostname&&!nt(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!rt(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:tt(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),at=/*@__PURE__*/ N(`$ZodNumber`,(e,t)=>{V.init(e,t),e._zod.pattern=Be,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),ot=/*@__PURE__*/ N(`$ZodBoolean`,(e,t)=>{V.init(e,t),e._zod.pattern=Ve,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),st=/*@__PURE__*/ N(`$ZodUnknown`,(e,t)=>{V.init(e,t),e._zod.parse=e=>e});function ct(e,t){let n=T(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of T(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,E(n.issues,t,e),n}}return i(n,a)}}const lt=e=>Array.isArray(e)?e.length:-1;function ut(e,t,n){e.issues.length&&t.issues.push(...C(n,e.issues)),t.value[n]=e.value}const dt=/*@__PURE__*/ N(`$ZodArray`,(e,t)=>{V.init(e,t);let n=F.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>ut(t,r,e)));else if(ut(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},ct(e,lt)});function W(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...C(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}const ft=[];function pt(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ft,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=fe(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function mt(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(S(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>W(e,n,i,t,d,f))):W(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const ht=/*@__PURE__*/ N(`$ZodObject`,(e,t)=>{V.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=te(()=>pt(t));j(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||h(n,e,/* @__PURE__ */ new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=_,o=t.catchall,s,c=F.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>W(n,t,e,r,a,o))):W(s,t,e,r,a,o)}return o?mt(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}});function gt(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>D(e,r,I())))}),t)}const _t=/*@__PURE__*/ N(`$ZodUnion`,(e,t)=>{V.init(e,t),j(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),j(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),j(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),j(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>m(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>gt(t,r,e,i)):gt(o,r,e,i)}}),vt=/*@__PURE__*/ N(`$ZodRecord`,(e,t)=>{V.init(e,t);let n=F.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!v(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=/* @__PURE__ */ new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>D(e,i,I())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...C(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Be.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>D(e,i,I())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...C(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...C(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),yt=/*@__PURE__*/ N(`$ZodEnum`,(e,t)=>{V.init(e,t);let n=f(t.entries),r=new Set(n);e._zod.values=r,j(e,`pattern`,e=>{let t=f(e.def.entries).filter(e=>de.has(typeof e));return RegExp(t.length?`^(${t.map(e=>y(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),bt=/*@__PURE__*/ N(`$ZodLiteral`,(e,t)=>{V.init(e,t);let n=new Set(t.values);e._zod.values=n,j(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?y(e):e?y(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}});function xt(e,t){return e.value=t.issues.length?void 0:t.value,e}const St=/*@__PURE__*/ N(`$ZodOptional`,(e,t)=>{V.init(e,t),j(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,j(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?/* @__PURE__ */ new Set([...t,void 0]):void 0}),j(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${m(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>xt(e,t)):xt(e,r)}return t.innerType._zod.run(e,n)}}),Ct=/*@__PURE__*/ N(`$ZodNullable`,(e,t)=>{V.init(e,t),j(e,`optin`,e=>e.def.innerType._zod.optin),j(e,`optout`,e=>e.def.innerType._zod.optout),j(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${m(t.source)}|null)$`):void 0}),j(e,`values`,e=>e.def.innerType._zod.values?/* @__PURE__ */ new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),wt=/*@__PURE__*/ N(`$ZodDefault`,(e,t)=>{V.init(e,t),e._zod.optin=`defaulted`,j(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Tt(e,t)):Tt(r,t)}});function Tt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Et=/*@__PURE__*/ N(`$ZodPipe`,(e,t)=>{V.init(e,t),j(e,`values`,e=>e.def.in._zod.values),j(e,`optin`,e=>e.def.in._zod.optin),j(e,`optout`,e=>e.def.out._zod.optout),j(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>G(e,t.in,n)):G(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>G(e,t.out,n)):G(r,t.out,n)}});function G(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Dt=/*@__PURE__*/ N(`$ZodCodec`,(e,t)=>{V.init(e,t),j(e,`values`,e=>e.def.in._zod.values),j(e,`optin`,e=>e.def.in._zod.optin),j(e,`optout`,e=>e.def.out._zod.optout),j(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>K(e,t,n)):K(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>K(e,t,n)):K(r,t,n)}}});function K(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>q(e,r,t.out,n)):q(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>q(e,r,t.in,n)):q(e,r,t.in,n)}}function q(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function J(e){return e.checks&&=[...e.checks],e}// @__NO_SIDE_EFFECTS__
|
|
2
|
+
function Ot(e,t){return new e(J({type:`string`,...x(t)}))}// @__NO_SIDE_EFFECTS__
|
|
3
|
+
function kt(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}// @__NO_SIDE_EFFECTS__
|
|
4
|
+
function At(e,t){return new e(J({type:`number`,checks:[],...x(t)}))}// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function jt(e,t){return new e(J({type:`number`,coerce:!0,checks:[],...x(t)}))}// @__NO_SIDE_EFFECTS__
|
|
6
|
+
function Mt(e,t){return new e({type:`boolean`,...x(t)})}// @__NO_SIDE_EFFECTS__
|
|
7
|
+
function Nt(e){return new e({type:`unknown`})}// @__NO_SIDE_EFFECTS__
|
|
8
|
+
function Pt(e,t){return new We({check:`greater_than`,...x(t),value:e,inclusive:!0})}// @__NO_SIDE_EFFECTS__
|
|
9
|
+
function Ft(e,t){return new Ge({check:`min_length`,...x(t),minimum:e})}// @__NO_SIDE_EFFECTS__
|
|
10
|
+
function It(e,t){let n=x(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??Dt,c=e.Boolean??ot,l=new s({type:`pipe`,in:new(e.String??U)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}const Y=/*@__PURE__*/ N(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);V.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){O(this,`with`,e)},parse(e,t){return z(this,e,t,{callee:this.parse})},parseAsync(e,t){return Ne(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return Pe(this,e,t)},safeParseAsync(e,t){return Ie(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return b(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),X=/*@__PURE__*/ N(`ZodMiniString`,(e,t)=>{U.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
11
|
+
function Lt(e){return/* @__PURE__ */ Ot(X,e)}const Rt=/*@__PURE__*/ N(`ZodMiniStringFormat`,(e,t)=>{Xe.init(e,t),X.init(e,t)}),zt=/*@__PURE__*/ N(`ZodMiniURL`,(e,t)=>{it.init(e,t),Rt.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
12
|
+
function Bt(e){return/* @__PURE__ */ kt(zt,e)}// @__NO_SIDE_EFFECTS__
|
|
13
|
+
function Vt(e){return/* @__PURE__ */ kt(zt,{protocol:Re,hostname:Le,...x(e)})}const Ht=/*@__PURE__*/ N(`ZodMiniNumber`,(e,t)=>{at.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
14
|
+
function Ut(e){return/* @__PURE__ */ At(Ht,e)}const Wt=/*@__PURE__*/ N(`ZodMiniBoolean`,(e,t)=>{ot.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
15
|
+
function Gt(e){return/* @__PURE__ */ Mt(Wt,e)}const Kt=/*@__PURE__*/ N(`ZodMiniUnknown`,(e,t)=>{st.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
16
|
+
function qt(){return/* @__PURE__ */ Nt(Kt)}const Jt=/*@__PURE__*/ N(`ZodMiniArray`,(e,t)=>{dt.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
17
|
+
function Yt(e,t){return new Jt({type:`array`,element:e,...x(t)})}const Xt=/*@__PURE__*/ N(`ZodMiniObject`,(e,t)=>{ht.init(e,t),Y.init(e,t),we(e,`shape`,e=>e._zod.def.shape,!1)});// @__NO_SIDE_EFFECTS__
|
|
18
|
+
function Zt(e,t){let n={type:`object`,shape:e??{},...x(t)};return new Xt(n)}// @__NO_SIDE_EFFECTS__
|
|
19
|
+
function Qt(e,t){return new Xt({type:`object`,shape:e,catchall:/* @__PURE__ */ qt(),...x(t)})}// @__NO_SIDE_EFFECTS__
|
|
20
|
+
function $t(e,t){return pe(e,t)}const en=/*@__PURE__*/ N(`ZodMiniUnion`,(e,t)=>{_t.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
21
|
+
function tn(e,t){return new en({type:`union`,options:e,...x(t)})}const nn=/*@__PURE__*/ N(`ZodMiniRecord`,(e,t)=>{vt.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
22
|
+
function rn(e,t,n){return!t||!t._zod?new nn({type:`record`,keyType:/* @__PURE__ */ Lt(),valueType:e,...x(t)}):new nn({type:`record`,keyType:e,valueType:t,...x(n)})}const an=/*@__PURE__*/ N(`ZodMiniEnum`,(e,t)=>{yt.init(e,t),Y.init(e,t),e.options=[...e._zod.values]});// @__NO_SIDE_EFFECTS__
|
|
23
|
+
function on(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new an({type:`enum`,entries:n,...x(t)})}const sn=/*@__PURE__*/ N(`ZodMiniLiteral`,(e,t)=>{bt.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
24
|
+
function cn(e,t){return new sn({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}const ln=/*@__PURE__*/ N(`ZodMiniOptional`,(e,t)=>{St.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
25
|
+
function un(e){return new ln({type:`optional`,innerType:e})}const dn=/*@__PURE__*/ N(`ZodMiniNullable`,(e,t)=>{Ct.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
26
|
+
function fn(e){return new dn({type:`nullable`,innerType:e})}// @__NO_SIDE_EFFECTS__
|
|
27
|
+
function pn(e){return/* @__PURE__ */ un(/* @__PURE__ */ fn(e))}const mn=/*@__PURE__*/ N(`ZodMiniDefault`,(e,t)=>{wt.init(e,t),Y.init(e,t)});// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function hn(e,t){return new mn({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ue(t)}})}const gn=/*@__PURE__*/ N(`ZodMiniPipe`,(e,t)=>{Et.init(e,t),Y.init(e,t)}),_n=/*@__PURE__*/ N(`ZodMiniCodec`,(e,t)=>{gn.init(e,t),Dt.init(e,t)}),vn=(...e)=>/* @__PURE__ */ It({Codec:_n,Boolean:Wt,String:X},...e);function yn(e){let t=new URL(e);return t.pathname.endsWith(`/`)||(t.pathname+=`/`),t}function bn(e,t){return o(s(e),s(t))}function xn(e){let t=e.pathname.lastIndexOf(`.`);if(t!==-1)return e.pathname.slice(t+1).toLowerCase()||void 0}function Sn(e,t){let n=o(s(e),s(t));return!(!n||n.startsWith(`..`)||a(n))}async function Cn(e,t={}){let{stop:n}=t,r=yn(c(process.cwd()));for(;;){let t=new URL(e,r);if(await Z(t))return t;if(n&&await Z(new URL(n,r)))return;let i=new URL(`..`,r);if(i.href===r.href)return;r=i}}async function Z(e){try{return await t(e),!0}catch{return!1}}function wn(e,t){let n=Promise.withResolvers(),r;for(let i of e)l(i)&&u(i,{recursive:!0,signal:t},()=>{clearTimeout(r),r=setTimeout(()=>n.resolve(),100)}).on(`error`,()=>{});return async e=>{await Promise.race([n.promise,d(e,void 0,{signal:t})]).catch(()=>{}),n=Promise.withResolvers()}}async function Tn(e,t){let r=new URL(`.`,e);await n(r,{recursive:!0}),await i(e,t)}async function En(e,t={}){let{schema:n}=t,i=await r(e,`utf8`),a;try{a=JSON.parse(i)}catch(t){throw SyntaxError(`${o(process.cwd(),s(e))} is not valid JSON.`,{cause:t})}return n?z(n,a):a}const Dn={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`};async function On(e){if(e.protocol===`http:`||e.protocol===`https:`){let t=await fetch(e);if(!t.ok)throw Error(`Failed to download file from "${e.toString()}" (HTTP ${t.status}).`);return await t.blob()}if(e.protocol===`file:`){let t=await r(e),n=xn(e),i=n&&Dn[n]||`application/octet-stream`;return new Blob([t],{type:i})}throw Error(`Unsupported file protocol: ${e.protocol}`)}async function kn(t){let n=await r(t,`utf8`);return e(n)}async function An(e,t,n){let a=await Z(e),o=``;a&&(o=await r(e,`utf8`));let s=RegExp(`^${t}=.*$`,`mg`),c=`${t}=${n}`;s.test(o)?o=o.replace(s,c):(o&&!o.endsWith(`
|
|
29
|
+
`)&&(o+=`
|
|
30
|
+
`),o+=`${c}\n`),await i(e,o)}async function jn(e,t){if(!await Z(e))return;let n=await r(e,`utf8`),a=RegExp(`^${t}=.*$\n?`,`mg`);n=n.replace(a,``),await i(e,n)}function Mn(e){return JSON.stringify(e,null,2)}async function Nn(e,t={}){let{credentials:n,json:r,notFoundMessage:i,unknownErrorMessage:a,schema:o,...s}=t,c=new Headers(t.headers);if(c.has(`Accept`)||c.set(`Accept`,`application/json`),c.has(`User-Agent`)||c.set(`User-Agent`,`prismic-cli`),n){let e=[];for(let t in n)e.push(`${t}=${n[t]??``}`);c.set(`Cookie`,e.join(`; `))}`json`in t&&!c.has(`Content-Type`)&&c.set(`Content-Type`,`application/json`);let l=`json`in t?JSON.stringify(r):t.body,u=await fetch(e,{...s,body:l,headers:c}),d=await u.text(),f;if(d)try{f=JSON.parse(d)}catch{f=d}if(u.ok)return o?z(o,f):f;switch(u.status){case 400:throw new $(u,f);case 401:throw new Ln(u,f);case 403:throw new In(u,f);case 404:throw new Fn(u,f,i);default:throw new Pn(u,f,a)}}var Q=class extends Error{response;body;constructor(e,t,n){super(n),this.response=e,this.body=t}get status(){return this.response.status}get statusText(){return this.response.statusText}},Pn=class extends Q{name=`UnknownRequestError`},$=class extends Q{name=`BadRequestError`},Fn=class extends Q{name=`NotFoundRequestError`;constructor(e,t,n=`The requested resource was not found.`){super(e,t,n)}},In=class extends Q{name=`ForbiddenRequestError`},Ln=class extends Q{name=`UnauthorizedRequestError`};export{fn as A,jt as B,on as C,Vt as D,$t as E,rn as F,Ft as H,Lt as I,vn as L,Ut as M,Zt as N,cn as O,un as P,tn as R,hn as S,Gt as T,z as U,Pt as V,Pe as W,Tn as _,Ln as a,bn as b,Mn as c,kn as d,En as f,wn as g,jn as h,Q as i,pn as j,Qt as k,Z as l,An as m,In as n,Pn as o,On as p,Fn as r,Nn as s,$ as t,Cn as u,yn as v,Yt as w,Ht as x,Sn as y,Bt as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./package-
|
|
1
|
+
import{n as e,t}from"./package-DCbOjRWH.mjs";import{fileURLToPath as n}from"node:url";import{spawn as r}from"node:child_process";const i=[],a=[];let o,s;function c(e){let{writeKey:t}=e;o=e.anonymousId,s=e.userId,process.on(`exit`,()=>d({writeKey:t}))}function l(n){s=n.userId,a.push({userId:n.userId,anonymousId:o,integrations:{Intercom:{user_hash:n.intercomHash}},context:{app:{name:t,version:e}},timestamp:(/* @__PURE__ */ new Date()).toISOString()})}function u(n,r={}){let{properties:a,groupId:c}=r;i.push({event:n,properties:{nodeVersion:process.versions.node,...a},context:{app:{name:t,version:e},groupId:c},userId:s,anonymousId:o,timestamp:(/* @__PURE__ */ new Date()).toISOString()})}function d(e){let{writeKey:t}=e;if(i.length!==0||a.length!==0){try{let e=Buffer.from(JSON.stringify({trackEvents:i.map(e=>({...e,userId:e.userId||s})),identifyEvents:a,writeKey:t})).toString(`base64`),o=n(new URL(`./subprocesses/sendSegmentEvents.mjs`,import.meta.url));r(process.execPath,[o,e],{detached:!0,stdio:`ignore`}).unref()}catch{}i.length=0,a.length=0}}async function f(e,t,n){let r={"Content-Type":`application/json`,Authorization:`Basic ${btoa(n+`:`)}`};await Promise.allSettled([...e.map(e=>fetch(`https://api.segment.io/v1/track`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{})),...t.map(e=>fetch(`https://api.segment.io/v1/identify`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{}))])}export{l as i,f as n,u as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../auth-
|
|
1
|
+
import{a as e}from"../auth-CsokWsVo.mjs";try{await e()}catch{}export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../segment-
|
|
1
|
+
import{n as e}from"../segment-DkMwCXor.mjs";const{trackEvents:t,identifyEvents:n,writeKey:r}=JSON.parse(Buffer.from(process.argv[2],`base64`).toString());try{await e(t,n,r)}catch{}export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../update-notifier-
|
|
1
|
+
import{n as e}from"../update-notifier-d8fLG6jz.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};
|