prismic 1.4.0 → 1.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/{builders-hKD4IrLX-BHWJUmr1.mjs → builders-hKD4IrLX-Dvmo19pp.mjs} +1 -1
- package/dist/index.mjs +63 -35
- package/dist/{nextjs-BqWYraaq.mjs → nextjs-OChXma0h.mjs} +42 -42
- package/dist/{nuxt-CCgIhEiV.mjs → nuxt-CFQ14CHY.mjs} +7 -7
- package/dist/{string-BBnEuzIe.mjs → string-BCkmn3bO.mjs} +2 -2
- package/dist/{sveltekit-BWJQOOLF.mjs → sveltekit-BCKtxAb7.mjs} +25 -25
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,
|
|
1
|
+
import{A as e,F as t,I as n,L as r,M as i,Z as a,c as o,j as s,l as c,n as l,t as u,w as d}from"./string-BCkmn3bO.mjs";import{createRequire as f}from"node:module";import{fileURLToPath as p}from"node:url";import{relative as m}from"node:path";const h=u`
|
|
2
2
|
return (
|
|
3
3
|
<section
|
|
4
4
|
data-slice-type={slice.slice_type}
|
|
@@ -9,36 +9,36 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
9
9
|
<strong>You can edit this slice directly in your code editor.</strong>
|
|
10
10
|
</section>
|
|
11
11
|
)
|
|
12
|
-
`;function g(e){let{name:t,typescript:
|
|
12
|
+
`;function g(e){let{name:t,id:n,typescript:r}=e,i=a(t),o=a(n),s=u`
|
|
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 \`${i}\`.
|
|
19
19
|
*/
|
|
20
|
-
export type ${
|
|
20
|
+
export type ${i}Props = SliceComponentProps<Content.${o}Slice>;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Component for "${t}" Slices.
|
|
24
24
|
*/
|
|
25
|
-
const ${
|
|
25
|
+
const ${i}: FC<${i}Props> = ({ slice }) => {
|
|
26
26
|
${h}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export default ${
|
|
30
|
-
`,
|
|
29
|
+
export default ${i}
|
|
30
|
+
`,c=u`
|
|
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} ${i}Slice
|
|
33
|
+
* @typedef {import("@prismicio/react").SliceComponentProps<${i}Slice>} ${i}Props
|
|
34
|
+
* @type {import("react").FC<${i}Props>}
|
|
35
35
|
*/
|
|
36
|
-
const ${
|
|
36
|
+
const ${i} = ({ slice }) => {
|
|
37
37
|
${h}
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
export default ${
|
|
41
|
-
`;return
|
|
40
|
+
export default ${i};
|
|
41
|
+
`;return r?s:c}function _(e){let{model:t,routePath:n,typescript:r,appRouter:i}=e;return i?t.repeatable?r?u`
|
|
42
42
|
import { SliceZone } from "@prismicio/react";
|
|
43
43
|
import { createClient } from "@/prismicio";
|
|
44
44
|
import { components } from "@/slices";
|
|
@@ -50,7 +50,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
50
50
|
|
|
51
51
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
52
52
|
}
|
|
53
|
-
`:
|
|
53
|
+
`:u`
|
|
54
54
|
import { SliceZone } from "@prismicio/react";
|
|
55
55
|
import { createClient } from "@/prismicio";
|
|
56
56
|
import { components } from "@/slices";
|
|
@@ -65,7 +65,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
65
65
|
|
|
66
66
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
67
67
|
}
|
|
68
|
-
`:
|
|
68
|
+
`:u`
|
|
69
69
|
import { SliceZone } from "@prismicio/react";
|
|
70
70
|
import { createClient } from "@/prismicio";
|
|
71
71
|
import { components } from "@/slices";
|
|
@@ -76,7 +76,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
76
76
|
|
|
77
77
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
78
78
|
}
|
|
79
|
-
`:t.repeatable?r?
|
|
79
|
+
`:t.repeatable?r?u`
|
|
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{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
104
104
|
fallback: false,
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
`:
|
|
107
|
+
`:u`
|
|
108
108
|
import { SliceZone } from "@prismicio/react";
|
|
109
109
|
import { createClient } from "@/prismicio";
|
|
110
110
|
import { components } from "@/slices";
|
|
@@ -132,7 +132,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
132
132
|
fallback: false,
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
`:r?
|
|
135
|
+
`:r?u`
|
|
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{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
148
148
|
export default function Page({ page }: InferGetStaticPropsType<typeof getStaticProps>) {
|
|
149
149
|
return <SliceZone slices={page.data.slices} components={components} />;
|
|
150
150
|
}
|
|
151
|
-
`:
|
|
151
|
+
`:u`
|
|
152
152
|
import { SliceZone } from "@prismicio/react";
|
|
153
153
|
import { createClient } from "@/prismicio";
|
|
154
154
|
import { components } from "@/slices";
|
|
@@ -166,14 +166,14 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
166
166
|
|
|
167
167
|
return { props: { page } };
|
|
168
168
|
}
|
|
169
|
-
`}function v(e){let{typescript:t,appRouter:n,hasSrcDirectory:r}=e,i=`${r?`..`:`.`}/prismic.config.json`,a,o;return n?t?(a=
|
|
169
|
+
`}function v(e){let{typescript:t,appRouter:n,hasSrcDirectory:r}=e,i=`${r?`..`:`.`}/prismic.config.json`,a,o;return n?t?(a=u`
|
|
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
175
|
import prismicConfig from "${i}";
|
|
176
|
-
`,o=
|
|
176
|
+
`,o=u`
|
|
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{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
194
194
|
|
|
195
195
|
return client;
|
|
196
196
|
};
|
|
197
|
-
`):(a=
|
|
197
|
+
`):(a=u`
|
|
198
198
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
199
199
|
import { enableAutoPreviews } from "@prismicio/next";
|
|
200
200
|
import prismicConfig from "${i}";
|
|
201
|
-
`,o=
|
|
201
|
+
`,o=u`
|
|
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{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
219
219
|
|
|
220
220
|
return client;
|
|
221
221
|
};
|
|
222
|
-
`):t?(a=
|
|
222
|
+
`):t?(a=u`
|
|
223
223
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
224
224
|
import { enableAutoPreviews, type CreateClientConfig } from "@prismicio/next/pages";
|
|
225
225
|
import prismicConfig from "${i}";
|
|
226
|
-
`,o=
|
|
226
|
+
`,o=u`
|
|
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{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
240
240
|
|
|
241
241
|
return client;
|
|
242
242
|
};
|
|
243
|
-
`):(a=
|
|
243
|
+
`):(a=u`
|
|
244
244
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
245
245
|
import { enableAutoPreviews } from "@prismicio/next/pages";
|
|
246
246
|
import prismicConfig from "${i}";
|
|
247
|
-
`,o=
|
|
247
|
+
`,o=u`
|
|
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,7 +261,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
261
261
|
|
|
262
262
|
return client;
|
|
263
263
|
};
|
|
264
|
-
`),t?
|
|
264
|
+
`),t?u`
|
|
265
265
|
${a}
|
|
266
266
|
|
|
267
267
|
/**
|
|
@@ -270,7 +270,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
270
270
|
export const repositoryName = prismicConfig.repositoryName;
|
|
271
271
|
|
|
272
272
|
${o}
|
|
273
|
-
`:
|
|
273
|
+
`:u`
|
|
274
274
|
${a}
|
|
275
275
|
|
|
276
276
|
/**
|
|
@@ -279,7 +279,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
279
279
|
export const repositoryName = prismicConfig.repositoryName;
|
|
280
280
|
|
|
281
281
|
${o}
|
|
282
|
-
`}function y(e){let{typescript:t,appRouter:n}=e,r=
|
|
282
|
+
`}function y(e){let{typescript:t,appRouter:n}=e,r=u`
|
|
283
283
|
import { SliceSimulator, SliceSimulatorParams, getSlices } from "@prismicio/next";
|
|
284
284
|
import { SliceZone } from "@prismicio/react";
|
|
285
285
|
|
|
@@ -297,7 +297,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
297
297
|
</SliceSimulator>
|
|
298
298
|
);
|
|
299
299
|
}
|
|
300
|
-
`,i=
|
|
300
|
+
`,i=u`
|
|
301
301
|
import { SliceSimulator, getSlices } from "@prismicio/next";
|
|
302
302
|
import { SliceZone } from "@prismicio/react";
|
|
303
303
|
|
|
@@ -313,7 +313,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
313
313
|
</SliceSimulator>
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
|
-
`,a=
|
|
316
|
+
`,a=u`
|
|
317
317
|
import { SliceSimulator } from "@prismicio/next/pages";
|
|
318
318
|
import { SliceZone } from "@prismicio/react";
|
|
319
319
|
|
|
@@ -326,7 +326,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
326
326
|
/>
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
|
-
`;return n?t?r:i:a}function b(e){let{typescript:t,appRouter:n}=e,r=
|
|
329
|
+
`;return n?t?r:i:a}function b(e){let{typescript:t,appRouter:n}=e,r=u`
|
|
330
330
|
import { NextRequest } from "next/server";
|
|
331
331
|
import { redirectToPreviewURL } from "@prismicio/next";
|
|
332
332
|
|
|
@@ -337,7 +337,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
337
337
|
|
|
338
338
|
return await redirectToPreviewURL({ client, request });
|
|
339
339
|
}
|
|
340
|
-
`,i=
|
|
340
|
+
`,i=u`
|
|
341
341
|
import { redirectToPreviewURL } from "@prismicio/next";
|
|
342
342
|
|
|
343
343
|
import { createClient } from "../../../prismicio";
|
|
@@ -347,7 +347,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
347
347
|
|
|
348
348
|
return await redirectToPreviewURL({ client, request });
|
|
349
349
|
}
|
|
350
|
-
`,a=
|
|
350
|
+
`,a=u`
|
|
351
351
|
import { NextApiRequest, NextApiResponse } from "next";
|
|
352
352
|
import { setPreviewData, redirectToPreviewURL } from "@prismicio/next/pages";
|
|
353
353
|
|
|
@@ -360,7 +360,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
360
360
|
|
|
361
361
|
return await redirectToPreviewURL({ req, res, client });
|
|
362
362
|
};
|
|
363
|
-
`,o=
|
|
363
|
+
`,o=u`
|
|
364
364
|
import { setPreviewData, redirectToPreviewURL } from "@prismicio/next/pages";
|
|
365
365
|
|
|
366
366
|
import { createClient } from "../../prismicio";
|
|
@@ -372,26 +372,26 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
372
372
|
|
|
373
373
|
return await redirectToPreviewURL({ req, res, client });
|
|
374
374
|
};
|
|
375
|
-
`;return n?t?r:i:t?a:o}function x(e){let{typescript:t,appRouter:n}=e,r=
|
|
375
|
+
`;return n?t?r:i:t?a:o}function x(e){let{typescript:t,appRouter:n}=e,r=u`
|
|
376
376
|
import { exitPreview } from "@prismicio/next";
|
|
377
377
|
|
|
378
378
|
export function GET() {
|
|
379
379
|
return exitPreview();
|
|
380
380
|
}
|
|
381
|
-
`,i=
|
|
381
|
+
`,i=u`
|
|
382
382
|
import { NextApiRequest, NextApiResponse } from "next";
|
|
383
383
|
import { exitPreview } from "@prismicio/next/pages";
|
|
384
384
|
|
|
385
385
|
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
|
386
386
|
return exitPreview({ req, res });
|
|
387
387
|
}
|
|
388
|
-
`,a=
|
|
388
|
+
`,a=u`
|
|
389
389
|
import { exitPreview } from "@prismicio/next/pages";
|
|
390
390
|
|
|
391
391
|
export default function handler(req, res) {
|
|
392
392
|
return exitPreview({ req, res });
|
|
393
393
|
}
|
|
394
|
-
`;return n?r:t?i:a}function S(e){let{supportsCacheLife:t}=e;return
|
|
394
|
+
`;return n?r:t?i:a}function S(e){let{supportsCacheLife:t}=e;return u`
|
|
395
395
|
import { NextResponse } from "next/server";
|
|
396
396
|
import { revalidateTag } from "next/cache";
|
|
397
397
|
|
|
@@ -400,7 +400,7 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
400
400
|
|
|
401
401
|
return NextResponse.json({ revalidated: true, now: Date.now() });
|
|
402
402
|
}
|
|
403
|
-
`}var C=class extends
|
|
403
|
+
`}var C=class extends l{id=`next`;async setupProject(){await e({"@prismicio/client":`^${await i(`@prismicio/client`)}`,"@prismicio/react":`^${await i(`@prismicio/react`)}`,"@prismicio/next":`^${await i(`@prismicio/next`)}`}),await O(),await D(),await E(),await T(),await w()}onProjectInitialized(){}async onSliceCreated(e,t){let i=a(e.name),s=new URL(i,r(t)),c=await N();await n(new URL(`index.${c}x`,r(s)),g({name:e.name,id:e.id,typescript:await o()}))}onSliceUpdated(){}onSliceDeleted(){}async onCustomTypeCreated(e){e.format===`page`&&await k(e)}onCustomTypeUpdated(){}onCustomTypeDeleted(){}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href),r=t.map(t=>`import ${a(t.model.name)} from "./${m(p(e),p(t.directory))}";`),i=t.map(e=>{let t=a(e.model.name);return`${e.model.id}: ${t}`}),o=u`
|
|
404
404
|
// Code generated by Prismic. DO NOT EDIT.
|
|
405
405
|
|
|
406
406
|
${r.join(`
|
|
@@ -410,4 +410,4 @@ import{A as e,C as t,F as n,I as r,P as i,X as a,c as o,j as s,k as c,l,n as u,t
|
|
|
410
410
|
${i.join(`,
|
|
411
411
|
`)}
|
|
412
412
|
};
|
|
413
|
-
`,s=`index.${await N()}`;await n(new URL(s,e),o)}async getDefaultSliceLibrary(){let e=await
|
|
413
|
+
`,s=`index.${await N()}`;await n(new URL(s,e),o)}async getDefaultSliceLibrary(){let e=await c(),t=await M();return new URL(t?`src/slices/`:`slices/`,e)}};async function w(){if(!await A())return;let e=await j(),r=await N(),i=new URL(`app/api/revalidate/route.${r}`,e);if(await t(i))return;let a=await P();await n(i,S({supportsCacheLife:Number.parseInt(a.split(`.`)[0])>=16}))}async function T(){let e=await A(),r=await j(),i=await N(),a=new URL(e?`app/api/exit-preview/route.${i}`:`pages/api/exit-preview.${i}`,r);await t(a)||await n(a,x({typescript:await o(),appRouter:e}))}async function E(){let e=await A(),r=await j(),i=await N(),a=new URL(e?`app/api/preview/route.${i}`:`pages/api/preview.${i}`,r);await t(a)||await n(a,b({typescript:await o(),appRouter:e}))}async function D(){let e=await A(),r=await j(),i=`${await N()}x`,a=new URL(e?`app/slice-simulator/page.${i}`:`pages/slice-simulator.${i}`,r);await t(a)||await n(a,y({typescript:await o(),appRouter:e}))}async function O(){let e=await N(),r=await j(),i=new URL(`prismicio.${e}`,r);await t(i)||await n(i,v({typescript:await o(),appRouter:await A(),hasSrcDirectory:await M()}))}async function k(e){let r=d(e).split(`/`).filter(Boolean).map(e=>e.startsWith(`:`)?`[${e.slice(1)}]`:e).join(`/`),i=await j(),a=`${await N()}x`,s=await A(),c=s?new URL(`app/${r}/page.${a}`,i):new URL(`pages/${r||`index`}.${a}`,i);await t(c)||await n(c,_({model:e,routePath:r,typescript:await o(),appRouter:s}))}async function A(){let e=await j();return await t(new URL(`app/`,e))}async function j(){let e=await c();return await M()?new URL(`src/`,e):e}async function M(){let e=await c();return t(new URL(`src/`,e))}async function N(){return await o()?`ts`:`js`}async function P(){let{version:e}=f(await s())(`next/package.json`);return e}export{C as NextJsAdapter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{A as e,D as t,F as n,I as r,L as i,M as a,Z as o,c as s,k as c,l,n as u,t as d,w as f}from"./string-BCkmn3bO.mjs";import{n as p,r as m,t as h}from"./builders-hKD4IrLX-Dvmo19pp.mjs";import{readFile as g,rm as _}from"node:fs/promises";import{fileURLToPath as v}from"node:url";import{relative as y}from"node:path";function b(e){let{name:t,typescript:n}=e,r=o(t);return n?d`
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import type { Content } from "@prismicio/client";
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ import{C as e,E as t,F as n,I as r,O as i,P as a,X as o,c as s,j as c,k as l,l a
|
|
|
19
19
|
<strong>You can edit this slice directly in your code editor.</strong>
|
|
20
20
|
</section>
|
|
21
21
|
</template>
|
|
22
|
-
`:
|
|
22
|
+
`:d`
|
|
23
23
|
<script setup>
|
|
24
24
|
// The array passed to \`getSliceComponentProps\` is purely optional.
|
|
25
25
|
// Consider it as a visual hint for you when templating your slice.
|
|
@@ -36,7 +36,7 @@ import{C as e,E as t,F as n,I as r,O as i,P as a,X as o,c as s,j as c,k as l,l a
|
|
|
36
36
|
<strong>You can edit this slice directly in your code editor.</strong>
|
|
37
37
|
</section>
|
|
38
38
|
</template>
|
|
39
|
-
`}function x(e){let{model:t,typescript:n}=e,r=[`setup`];if(n&&r.push(`lang="ts"`),t.repeatable){let e=n?`route.params.uid as string`:`route.params.uid`;return
|
|
39
|
+
`}function x(e){let{model:t,typescript:n}=e,r=[`setup`];if(n&&r.push(`lang="ts"`),t.repeatable){let e=n?`route.params.uid as string`:`route.params.uid`;return d`
|
|
40
40
|
<script ${r.join(` `)}>
|
|
41
41
|
import { components } from "~/slices";
|
|
42
42
|
|
|
@@ -52,7 +52,7 @@ import{C as e,E as t,F as n,I as r,O as i,P as a,X as o,c as s,j as c,k as l,l a
|
|
|
52
52
|
<SliceZone :slices="page?.data.slices ?? []" :components="components" />
|
|
53
53
|
</main>
|
|
54
54
|
</template>
|
|
55
|
-
`}return
|
|
55
|
+
`}return d`
|
|
56
56
|
<script ${r.join(` `)}>
|
|
57
57
|
import { components } from "~/slices";
|
|
58
58
|
|
|
@@ -67,7 +67,7 @@ import{C as e,E as t,F as n,I as r,O as i,P as a,X as o,c as s,j as c,k as l,l a
|
|
|
67
67
|
<SliceZone :slices="page?.data.slices ?? []" :components="components" />
|
|
68
68
|
</main>
|
|
69
69
|
</template>
|
|
70
|
-
`}function S(e){let{typescript:t}=e,n=[`setup`];return t&&n.push(`lang="ts"`),
|
|
70
|
+
`}function S(e){let{typescript:t}=e,n=[`setup`];return t&&n.push(`lang="ts"`),d`
|
|
71
71
|
<script ${n.join(` `)}>
|
|
72
72
|
import { components } from "~/slices";
|
|
73
73
|
<\/script>
|
|
@@ -77,7 +77,7 @@ import{C as e,E as t,F as n,I as r,O as i,P as a,X as o,c as s,j as c,k as l,l a
|
|
|
77
77
|
<SliceZone :slices="slices" :components="components" />
|
|
78
78
|
</SliceSimulator>
|
|
79
79
|
</template>
|
|
80
|
-
`}const C=`@nuxtjs/prismic`;var w=class extends
|
|
80
|
+
`}const C=`@nuxtjs/prismic`;var w=class extends u{id=`nuxt`;async setupProject(){await e({"@prismicio/client":`^${await a(`@prismicio/client`)}`,[C]:`^${await a(C)}`}),await E(),await O(),await k(),await A(this)}onProjectInitialized(){}async onSliceCreated(e,t){let n=o(e.name),a=new URL(n,i(t));await r(new URL(`index.vue`,i(a)),b({name:e.name,typescript:await s()}))}onSliceUpdated(){}onSliceDeleted(){}async onCustomTypeCreated(e){e.format===`page`&&await j(e)}onCustomTypeUpdated(){}onCustomTypeDeleted(){}async createSliceIndexFile(e){let t=d`
|
|
81
81
|
// Code generated by Prismic. DO NOT EDIT.
|
|
82
82
|
|
|
83
83
|
import { defineAsyncComponent } from "vue";
|
|
@@ -87,4 +87,4 @@ import{C as e,E as t,F as n,I as r,O as i,P as a,X as o,c as s,j as c,k as l,l a
|
|
|
87
87
|
${(await this.getSlices()).filter(t=>t.library.href===e.href).map(t=>{let n=y(v(e),v(t.directory));return`${t.model.id}: defineAsyncComponent(() => import("./${n}/index.vue"))`}).join(`,
|
|
88
88
|
`)}
|
|
89
89
|
});
|
|
90
|
-
`,
|
|
90
|
+
`,n=`index.${await M()}`;await r(new URL(n,e),t)}async getDefaultSliceLibrary(){let e=await T();return new URL(`slices/`,e)}};async function T(){let e=await l(),t=new URL(`app/`,e);if(await n(t))return t;let r=new URL(`src/`,e);return await n(r)?r:e}async function E(){let e=await l(),t=new URL(`nuxt.config.js`,e);if(await n(t)||(t=new URL(`nuxt.config.ts`,e)),!await n(t))return;let r=v(t),i=await p(r),a=i.exports.default.$type===`function-call`?i.exports.default.$args[0]:i.exports.default,o=!1;(a.modules||[]).find(e=>typeof e==`string`?e===C:Array.isArray(e)?(o=!!e[1],e[0]===C):!1)||(a.modules||=[],a.modules.push(C)),o||(i.imports.$prepend({from:`./prismic.config.json`,imported:`default`,local:`prismicConfig`}),a.prismic||={},a.prismic.endpoint=h.raw(`prismicConfig.repositoryName`),a.prismic.clientConfig||={},a.prismic.clientConfig.routes=h.raw(`prismicConfig.routes`)),await m(i,r)}async function D(){let e=await l(),t=new URL(`app/pages/`,e),r=new URL(`src/pages/`,e),i=new URL(`pages/`,e);return await n(t)?t:await n(r)?r:await n(i)?i:new URL(`pages/`,await T())}async function O(){let e=await s(),t=await D(),i=new URL(`slice-simulator.vue`,t);await n(i)||await r(i,S({typescript:e}))}async function k(){let e=await T(),t=new URL(`app.vue`,e);if(!await n(t))return;let i=await g(t,`utf8`);if(!i.includes(`<NuxtWelcome`))return;let a=new URL(`pages/index.vue`,e);await n(a)||await r(a,i),await _(t)}async function A(e){let r=await l(),i=await n(new URL(`app/`,r)),a=await n(new URL(`src/`,r));if(!i&&!a)return;let o;try{o=await t()}catch{return}let s=o.libraries;!s||JSON.stringify(s)!==JSON.stringify([`./slices`])||(await e.getSlices()).length>0||await c({libraries:[i?`./app/slices`:`./src/slices`]})}async function j(e){let t=f(e).split(`/`).filter(Boolean).map(e=>e.startsWith(`:`)?`[${e.slice(1)}]`:e).join(`/`),i=await D(),a=new URL(`${t||`index`}.vue`,i);await n(a)||await r(a,x({model:e,typescript:await s()}))}async function M(){return await s()?`ts`:`js`}export{w as NuxtAdapter};
|
|
@@ -165,9 +165,9 @@ type ContentRelationshipFieldWithData<
|
|
|
165
165
|
${t}
|
|
166
166
|
}
|
|
167
167
|
`,r)}return r}var yn=v(import.meta.url);function bn(e){let t=m(e);return t.length>1&&t[t.length-1]===_&&(t=t.substring(0,t.length-1)),t}const xn=/[\\/]/g;function Sn(e,t){return e.replace(xn,t)}const Cn=/^[a-z]:[\\/]$/i;function wn(e){return e===`/`||Cn.test(e)}function Tn(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:i}=t,a=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return n&&(e=ee(e)),(r||a)&&(e=bn(e)),e===`.`?``:Sn(e[e.length-1]===i?e:e+i,i)}function En(e,t){return t+e}function Dn(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:Sn(g(e,r),t.pathSeparator)+t.pathSeparator+n}}function On(e){return e}function kn(e,t,n){return t+e+n}function An(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?Dn(e,t):r?En:On}function jn(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function Mn(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}const Nn=(e,t)=>{t.push(e||`.`)},Pn=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},Fn=()=>{};function In(e,t){let{includeDirs:n,filters:r,relativePaths:i}=t;return n?i?r&&r.length?Mn(e):jn(e):r&&r.length?Pn:Nn:Fn}const Ln=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},Rn=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},zn=(e,t,n,r)=>{n.files++},Bn=(e,t)=>{t.push(e)},Vn=()=>{};function Hn(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?Vn:n&&n.length?r?Ln:Rn:r?zn:Bn}const Un=e=>e,Wn=()=>[``].slice(0,0);function Gn(e){return e.group?Wn:Un}const Kn=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},qn=()=>{};function Jn(e){return e.group?Kn:qn}const Yn=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue(),i.realpath(e,(o,s)=>{if(o)return r.dequeue(a?null:o,t);i.stat(s,(i,o)=>{if(i)return r.dequeue(a?null:i,t);if(o.isDirectory()&&Qn(e,s,t))return r.dequeue(null,t);n(o,s),r.dequeue(null,t)})})},Xn=function(e,t,n){let{queue:r,fs:i,options:{suppressErrors:a}}=t;r.enqueue();try{let r=i.realpathSync(e),a=i.statSync(r);if(a.isDirectory()&&Qn(e,r,t))return;n(a,r)}catch(e){if(!a)throw e}};function Zn(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?Xn:Yn}function Qn(e,t,n){if(n.options.useRealPaths)return $n(t,n);let r=p(e),i=1;for(;r!==n.root&&i<2;){let e=n.symlinks.get(r);e&&(e===t||e.startsWith(t)||t.startsWith(e))?i++:r=p(r)}return n.symlinks.set(e,t),i>1}function $n(e,t){return t.visited.includes(e+t.options.pathSeparator)}const er=e=>e.counts,tr=e=>e.groups,nr=e=>e.paths,rr=e=>e.paths.slice(0,e.options.maxFiles),ir=(e,t,n)=>(cr(t,n,e.counts,e.options.suppressErrors),null),ar=(e,t,n)=>(cr(t,n,e.paths,e.options.suppressErrors),null),or=(e,t,n)=>(cr(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),sr=(e,t,n)=>(cr(t,n,e.groups,e.options.suppressErrors),null);function cr(e,t,n,r){t(e&&!r?e:null,n)}function lr(e,t){let{onlyCounts:n,group:r,maxFiles:i}=e;return n?t?er:ir:r?t?tr:sr:i?t?rr:or:t?nr:ar}const ur={withFileTypes:!0},dr=(e,t,n,r,i)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:a}=e;e.visited.push(t),e.counts.directories++,a.readdir(t||`.`,ur,(t,a=[])=>{i(a,n,r),e.queue.dequeue(e.options.suppressErrors?null:t,e)})},fr=(e,t,n,r,i)=>{let{fs:a}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=a.readdirSync(t||`.`,ur)}catch(t){if(!e.options.suppressErrors)throw t}i(o,n,r)};function pr(e){return e?fr:dr}var mr=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},hr=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},gr=class{aborted=!1;abort(){this.aborted=!0}},_r=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=lr(t,this.isSynchronous),this.root=Tn(e,t),this.state={root:wn(this.root)?this.root:this.root.slice(0,-1),paths:[``].slice(0,0),groups:[],counts:new hr,options:t,queue:new mr((e,t)=>this.callbackInvoker(t,e,n)),symlinks:new Map,visited:[``].slice(0,0),controller:new gr,fs:t.fs||l},this.joinPath=An(this.root,t),this.pushDirectory=In(this.root,t),this.pushFile=Hn(t),this.getArray=Gn(t),this.groupFiles=Jn(t),this.resolveSymlink=Zn(t,this.isSynchronous),this.walkDirectory=pr(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l,useRealPaths:u,pathSeparator:d},controller:m}=this.state;if(m.aborted||l&&l.aborted||c&&r.length>c)return;let h=this.getArray(this.state.paths);for(let c=0;c<e.length;++c){let l=e[c];if(l.isFile()||l.isSymbolicLink()&&!a&&!o){let e=this.joinPath(l.name,t);this.pushFile(e,h,this.state.counts,i)}else if(l.isDirectory()){let e=kn(l.name,t,this.state.options.pathSeparator);if(s&&s(l.name,e))continue;this.pushDirectory(e,r,i),this.walkDirectory(this.state,e,e,n-1,this.walk)}else if(this.resolveSymlink&&l.isSymbolicLink()){let e=En(l.name,t);this.resolveSymlink(e,this.state,(t,r)=>{if(t.isDirectory()){if(r=Tn(r,this.state.options),s&&s(l.name,u?r:e+d))return;this.walkDirectory(this.state,r,u?r:e+d,n-1,this.walk)}else{r=u?r:e;let t=f(r),n=Tn(p(r),this.state.options);r=this.joinPath(t,n),this.pushFile(r,h,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,h)}};function vr(e,t){return new Promise((n,r)=>{yr(e,t,(e,t)=>{if(e)return r(e);n(t)})})}function yr(e,t,n){new _r(e,t,n).start()}function br(e,t){return new _r(e,t).start()}var xr=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return vr(this.root,this.options)}withCallback(e){yr(this.root,this.options,e)}sync(){return br(this.root,this.options)}};let Sr=null;try{yn.resolve(`picomatch`),Sr=yn(`picomatch`)}catch{}var Cr=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:_,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new xr(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new xr(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||Sr;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}},wr=O(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),Tr=O((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=wr();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),Er=O(((e,t)=>{let n=Tr(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:ee}=wr(),_=e=>e===l||e===a,te=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let v=t||{},ne=e.length-1,y=v.parts===!0||v.scanToEnd===!0,b=[],x=[],re=[],S=e,C=-1,w=0,ie=0,ae=!1,oe=!1,T=!1,se=!1,ce=!1,E=!1,D=!1,O=!1,k=!1,A=!1,j=0,M,N,P={value:``,depth:0,isGlob:!1},F=()=>C>=ne,le=()=>S.charCodeAt(C+1),I=()=>(M=N,S.charCodeAt(++C));for(;C<ne;){N=I();let e;if(N===a){D=P.backslashes=!0,N=I(),N===u&&(E=!0);continue}if(E===!0||N===u){for(j++;F()!==!0&&(N=I());){if(N===a){D=P.backslashes=!0,I();continue}if(N===u){j++;continue}if(E!==!0&&N===s&&(N=I())===s){if(ae=P.isBrace=!0,T=P.isGlob=!0,A=!0,y===!0)continue;break}if(E!==!0&&N===o){if(ae=P.isBrace=!0,T=P.isGlob=!0,A=!0,y===!0)continue;break}if(N===h&&(j--,j===0)){E=!1,ae=P.isBrace=!0,A=!0;break}}if(y===!0)continue;break}if(N===l){if(b.push(C),x.push(P),P={value:``,depth:0,isGlob:!1},A===!0)continue;if(M===s&&C===w+1){w+=2;continue}ie=C+1;continue}if(v.noext!==!0&&(N===p||N===i||N===r||N===m||N===c)&&le()===d){if(T=P.isGlob=!0,se=P.isExtglob=!0,A=!0,N===c&&C===w&&(k=!0),y===!0){for(;F()!==!0&&(N=I());){if(N===a){D=P.backslashes=!0,N=I();continue}if(N===g){T=P.isGlob=!0,A=!0;break}}continue}break}if(N===r){if(M===r&&(ce=P.isGlobstar=!0),T=P.isGlob=!0,A=!0,y===!0)continue;break}if(N===m){if(T=P.isGlob=!0,A=!0,y===!0)continue;break}if(N===f){for(;F()!==!0&&(e=I());){if(e===a){D=P.backslashes=!0,I();continue}if(e===ee){oe=P.isBracket=!0,T=P.isGlob=!0,A=!0;break}}if(y===!0)continue;break}if(v.nonegate!==!0&&N===c&&C===w){O=P.negated=!0,w++;continue}if(v.noparen!==!0&&N===d){if(T=P.isGlob=!0,y===!0){for(;F()!==!0&&(N=I());){if(N===d){D=P.backslashes=!0,N=I();continue}if(N===g){A=!0;break}}continue}break}if(T===!0){if(A=!0,y===!0)continue;break}}v.noext===!0&&(se=!1,T=!1);let L=S,ue=``,de=``;w>0&&(ue=S.slice(0,w),S=S.slice(w),ie-=w),L&&T===!0&&ie>0?(L=S.slice(0,ie),de=S.slice(ie)):T===!0?(L=``,de=S):L=S,L&&L!==``&&L!==`/`&&L!==S&&_(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),v.unescape===!0&&(de&&=n.removeBackslashes(de),L&&D===!0&&(L=n.removeBackslashes(L)));let R={prefix:ue,input:e,start:w,base:L,glob:de,isBrace:ae,isBracket:oe,isGlob:T,isExtglob:se,isGlobstar:ce,negated:O,negatedExtglob:k};if(v.tokens===!0&&(R.maxDepth=0,_(N)||x.push(P),R.tokens=x),v.parts===!0||v.tokens===!0){let t;for(let n=0;n<b.length;n++){let r=t?t+1:w,i=b[n],a=e.slice(r,i);v.tokens&&(n===0&&w!==0?(x[n].isPrefix=!0,x[n].value=ue):x[n].value=a,te(x[n]),R.maxDepth+=x[n].depth),(n!==0||a!==``)&&re.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);re.push(n),v.tokens&&(x[x.length-1].value=n,te(x[x.length-1]),R.maxDepth+=x[x.length-1].depth)}R.slashes=b,R.parts=re}return R}})),Dr=O(((e,t)=>{let n=wr(),r=Tr(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],ee=f.capture?``:`?:`,_=n.globChars(f.windows),te=n.extglobChars(_),{DOT_LITERAL:v,PLUS_LITERAL:ne,SLASH_LITERAL:y,ONE_CHAR:b,DOTS_SLASH:x,NO_DOT:re,NO_DOT_SLASH:S,NO_DOTS_SLASH:C,QMARK:w,QMARK_NO_DOT:ie,STAR:ae,START_ANCHOR:oe}=_,T=e=>`(${ee}(?:(?!${oe}${e.dot?x:v}).)*?)`,se=f.dot?``:re,ce=f.dot?w:ie,E=f.bash===!0?T(f):ae;f.capture&&(E=`(${E})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let D={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,D),m=e.length;let O=[],k=[],A=[],j=h,M,N=()=>D.index===m-1,P=D.peek=(t=1)=>e[D.index+t],F=D.advance=()=>e[++D.index]||``,le=()=>e.slice(D.index+1),I=(e=``,t=0)=>{D.consumed+=e,D.index+=t},L=e=>{D.output+=e.output==null?e.value:e.output,I(e.value)},ue=()=>{let e=1;for(;P()===`!`&&(P(2)!==`(`||P(3)===`?`);)F(),D.start++,e++;return e%2==0?!1:(D.negated=!0,D.start++,!0)},de=e=>{D[e]++,A.push(e)},R=e=>{D[e]--,A.pop()},z=e=>{if(j.type===`globstar`){let t=D.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||O.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(D.output=D.output.slice(0,-j.output.length),j.type=`star`,j.value=`*`,j.output=E,D.output+=j.output)}if(O.length&&e.type!==`paren`&&(O[O.length-1].inner+=e.value),(e.value||e.output)&&L(e),j&&j.type===`text`&&e.type===`text`){j.output=(j.output||j.value)+e.value,j.value+=e.value;return}e.prev=j,g.push(e),j=e},fe=(e,t)=>{let n={...te[t],conditions:1,inner:``};n.prev=j,n.parens=D.parens,n.output=D.output;let r=(f.capture?`(`:``)+n.open;de(`parens`),z({type:e,value:t,output:D.output?``:b}),z({type:`paren`,extglob:!0,value:F(),output:r}),O.push(n)},pe=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=E;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=T(f)),(i!==E||N()||/^\)+$/.test(le()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=le())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(D.negatedExtglob=!0)}z({type:`paren`,extglob:!0,value:M,output:n}),R(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?w.repeat(a.length):``):o===0?ce+(a?w.repeat(a.length):``):w.repeat(r.length):i===`.`?v.repeat(r.length):i===`*`?t?t+i+(a?E:``):E:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(D.output=e,D):(D.output=r.wrapOutput(i,D,t),D)}for(;!N();){if(M=F(),M===`\0`)continue;if(M===`\\`){let e=P();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){M+=`\\`,z({type:`text`,value:M});continue}let t=/^\\+/.exec(le()),n=0;if(t&&t[0].length>2&&(n=t[0].length,D.index+=n,n%2!=0&&(M+=`\\`)),f.unescape===!0?M=F():M+=F(),D.brackets===0){z({type:`text`,value:M});continue}}if(D.brackets>0&&(M!==`]`||j.value===`[`||j.value===`[^`)){if(f.posix!==!1&&M===`:`){let e=j.value.slice(1);if(e.includes(`[`)&&(j.posix=!0,e.includes(`:`))){let e=j.value.lastIndexOf(`[`),t=j.value.slice(0,e),n=a[j.value.slice(e+2)];if(n){j.value=t+n,D.backtrack=!0,F(),!h.output&&g.indexOf(j)===1&&(h.output=b);continue}}}(M===`[`&&P()!==`:`||M===`-`&&P()===`]`)&&(M=`\\${M}`),M===`]`&&(j.value===`[`||j.value===`[^`)&&(M=`\\${M}`),f.posix===!0&&M===`!`&&j.value===`[`&&(M=`^`),j.value+=M,L({value:M});continue}if(D.quotes===1&&M!==`"`){M=r.escapeRegex(M),j.value+=M,L({value:M});continue}if(M===`"`){D.quotes=D.quotes===1?0:1,f.keepQuotes===!0&&z({type:`text`,value:M});continue}if(M===`(`){de(`parens`),z({type:`paren`,value:M});continue}if(M===`)`){if(D.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=O[O.length-1];if(e&&D.parens===e.parens+1){pe(O.pop());continue}z({type:`paren`,value:M,output:D.parens?`)`:`\\)`}),R(`parens`);continue}if(M===`[`){if(f.nobracket===!0||!le().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));M=`\\${M}`}else de(`brackets`);z({type:`bracket`,value:M});continue}if(M===`]`){if(f.nobracket===!0||j&&j.type===`bracket`&&j.value.length===1){z({type:`text`,value:M,output:`\\${M}`});continue}if(D.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));z({type:`text`,value:M,output:`\\${M}`});continue}R(`brackets`);let e=j.value.slice(1);if(j.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(M=`/${M}`),j.value+=M,L({value:M}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(j.value);if(D.output=D.output.slice(0,-j.value.length),f.literalBrackets===!0){D.output+=t,j.value=t;continue}j.value=`(${ee}${t}|${j.value})`,D.output+=j.value;continue}if(M===`{`&&f.nobrace!==!0){de(`braces`);let e={type:`brace`,value:M,output:`(`,outputIndex:D.output.length,tokensIndex:D.tokens.length};k.push(e),z(e);continue}if(M===`}`){let e=k[k.length-1];if(f.nobrace===!0||!e){z({type:`text`,value:M,output:M});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),D.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=D.output.slice(0,e.outputIndex),r=D.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,M=t=`\\}`,D.output=n;for(let e of r)D.output+=e.output||e.value}z({type:`brace`,value:M,output:t}),R(`braces`),k.pop();continue}if(M===`|`){O.length>0&&O[O.length-1].conditions++,z({type:`text`,value:M});continue}if(M===`,`){let e=M,t=k[k.length-1];t&&A[A.length-1]===`braces`&&(t.comma=!0,e=`|`),z({type:`comma`,value:M,output:e});continue}if(M===`/`){if(j.type===`dot`&&D.index===D.start+1){D.start=D.index+1,D.consumed=``,D.output=``,g.pop(),j=h;continue}z({type:`slash`,value:M,output:y});continue}if(M===`.`){if(D.braces>0&&j.type===`dot`){j.value===`.`&&(j.output=v);let e=k[k.length-1];j.type=`dots`,j.output+=M,j.value+=M,e.dots=!0;continue}if(D.braces+D.parens===0&&j.type!==`bos`&&j.type!==`slash`){z({type:`text`,value:M,output:v});continue}z({type:`dot`,value:M,output:v});continue}if(M===`?`){if(!(j&&j.value===`(`)&&f.noextglob!==!0&&P()===`(`&&P(2)!==`?`){fe(`qmark`,M);continue}if(j&&j.type===`paren`){let e=P(),t=M;(j.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(le()))&&(t=`\\${M}`),z({type:`text`,value:M,output:t});continue}if(f.dot!==!0&&(j.type===`slash`||j.type===`bos`)){z({type:`qmark`,value:M,output:ie});continue}z({type:`qmark`,value:M,output:w});continue}if(M===`!`){if(f.noextglob!==!0&&P()===`(`&&(P(2)!==`?`||!/[!=<:]/.test(P(3)))){fe(`negate`,M);continue}if(f.nonegate!==!0&&D.index===0){ue();continue}}if(M===`+`){if(f.noextglob!==!0&&P()===`(`&&P(2)!==`?`){fe(`plus`,M);continue}if(j&&j.value===`(`||f.regex===!1){z({type:`plus`,value:M,output:ne});continue}if(j&&(j.type===`bracket`||j.type===`paren`||j.type===`brace`)||D.parens>0){z({type:`plus`,value:M});continue}z({type:`plus`,value:ne});continue}if(M===`@`){if(f.noextglob!==!0&&P()===`(`&&P(2)!==`?`){z({type:`at`,extglob:!0,value:M,output:``});continue}z({type:`text`,value:M});continue}if(M!==`*`){(M===`$`||M===`^`)&&(M=`\\${M}`);let e=o.exec(le());e&&(M+=e[0],D.index+=e[0].length),z({type:`text`,value:M});continue}if(j&&(j.type===`globstar`||j.star===!0)){j.type=`star`,j.star=!0,j.value+=M,j.output=E,D.backtrack=!0,D.globstar=!0,I(M);continue}let t=le();if(f.noextglob!==!0&&/^\([^?]/.test(t)){fe(`star`,M);continue}if(j.type===`star`){if(f.noglobstar===!0){I(M);continue}let n=j.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){z({type:`star`,value:M,output:``});continue}let o=D.braces>0&&(n.type===`comma`||n.type===`brace`),s=O.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){z({type:`star`,value:M,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[D.index+4];if(n&&n!==`/`)break;t=t.slice(3),I(`/**`,3)}if(n.type===`bos`&&N()){j.type=`globstar`,j.value+=M,j.output=T(f),D.output=j.output,D.globstar=!0,I(M);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&N()){D.output=D.output.slice(0,-(n.output+j.output).length),n.output=`(?:${n.output}`,j.type=`globstar`,j.output=T(f)+(f.strictSlashes?`)`:`|$)`),j.value+=M,D.globstar=!0,D.output+=n.output+j.output,I(M);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;D.output=D.output.slice(0,-(n.output+j.output).length),n.output=`(?:${n.output}`,j.type=`globstar`,j.output=`${T(f)}${y}|${y}${e})`,j.value+=M,D.output+=n.output+j.output,D.globstar=!0,I(M+F()),z({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){j.type=`globstar`,j.value+=M,j.output=`(?:^|${y}|${T(f)}${y})`,D.output=j.output,D.globstar=!0,I(M+F()),z({type:`slash`,value:`/`,output:``});continue}D.output=D.output.slice(0,-j.output.length),j.type=`globstar`,j.output=T(f),j.value+=M,D.output+=j.output,D.globstar=!0,I(M);continue}let n={type:`star`,value:M,output:E};if(f.bash===!0){n.output=`.*?`,(j.type===`bos`||j.type===`slash`)&&(n.output=se+n.output),z(n);continue}if(j&&(j.type===`bracket`||j.type===`paren`)&&f.regex===!0){n.output=M,z(n);continue}(D.index===D.start||j.type===`slash`||j.type===`dot`)&&(j.type===`dot`?(D.output+=S,j.output+=S):f.dot===!0?(D.output+=C,j.output+=C):(D.output+=se,j.output+=se),P()!==`*`&&(D.output+=b,j.output+=b)),z(n)}for(;D.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));D.output=r.escapeLast(D.output,`[`),R(`brackets`)}for(;D.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));D.output=r.escapeLast(D.output,`(`),R(`parens`)}for(;D.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));D.output=r.escapeLast(D.output,`{`),R(`braces`)}if(f.strictSlashes!==!0&&(j.type===`star`||j.type===`bracket`)&&z({type:`maybe_slash`,value:``,output:`${y}?`}),D.backtrack===!0){D.output=``;for(let e of D.tokens)D.output+=e.output==null?e.value:e.output,e.suffix&&(D.output+=e.suffix)}return D};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:ee}=n.globChars(a.windows),_=a.dot?m:p,te=a.dot?h:p,v=a.capture?``:`?:`,ne={negated:!1,prefix:``},y=a.bash===!0?`.*?`:g;a.capture&&(y=`(${y})`);let b=e=>e.noglobstar===!0?y:`(${v}(?:(?!${ee}${e.dot?f:l}).)*?)`,x=e=>{switch(e){case`*`:return`${_}${d}${y}`;case`.*`:return`${l}${d}${y}`;case`*.*`:return`${_}${y}${l}${d}${y}`;case`*/*`:return`${_}${y}${u}${d}${te}${y}`;case`**`:return _+b(a);case`**/*`:return`(?:${_}${b(a)}${u})?${te}${d}${y}`;case`**/*.*`:return`(?:${_}${b(a)}${u})?${te}${y}${l}${d}${y}`;case`**/.*`:return`(?:${_}${b(a)}${u})?${l}${d}${y}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=x(t[1]);return n?n+l+t[2]:void 0}}},re=x(r.removePrefix(e,ne));return re&&a.strictSlashes!==!0&&(re+=`${u}?`),re},t.exports=d})),Or=O(((e,t)=>{let n=Er(),r=Dr(),i=Tr(),a=wr(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),kr=j(O(((e,t)=>{let n=Or(),r=Tr();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}))(),1);const Ar=Array.isArray,jr=process.platform===`win32`,Mr=/^(\/?\.\.)+$/;function Nr(e,t={}){let n=e.length,r=Array(n),i=Array(n),a=!t.noglobstar;for(let a=0;a<n;a++){let n=zr(e[a]);r[a]=n;let o=n.length,s=Array(o);for(let e=0;e<o;e++)s[e]=(0,kr.default)(n[e],t);i[a]=s}return t=>{let n=t.split(`/`);if(n[0]===`..`&&Mr.test(t))return!0;for(let t=0;t<e.length;t++){let e=r[t],o=i[t],s=n.length,c=Math.min(s,e.length),l=0;for(;l<c;){let t=e[l];if(t.includes(`/`))return!0;if(!o[l](n[l]))break;if(a&&t===`**`)return!0;l++}if(l===s)return!0}return!1}}const Pr=/^[A-Z]:\/$/i,Fr=jr?e=>Pr.test(e):e=>e===`/`;function Ir(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let t=Fr(e)?e.length:e.length+1;return(e,n)=>e.slice(t,n?-1:void 0)||`.`}let r=t.slice(e.length+1);return r?(e,t)=>{if(e===`.`)return r;let n=`${r}/${e}`;return t?n.slice(0,-1):n}:(e,t)=>t&&e!==`.`?e.slice(0,-1):e}return n?t=>h.relative(e,t)||`.`:n=>h.relative(e,`${t}/${n}`)||`.`}function Lr(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return e=>`${n}/${e}`}return n=>{let r=h.relative(e,`${t}/${n}`);return n.endsWith(`/`)&&r!==``?`${r}/`:r||`.`}}const Rr={parts:!0};function zr(e){let t=kr.default.scan(e,Rr);return t.parts?.length?t.parts:[e]}const Br=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Vr=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Hr=jr?e=>e.replace(Vr,`\\$&`):e=>e.replace(Br,`\\$&`);function Ur(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=kr.default.scan(e);return n.isGlob||n.negated}function Wr(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString(`es`)}]`,...e)}const Gr=/^(\/?\.\.)+/,Kr=/\\(?=[()[\]{}!*+?@|])/g,qr=/\\/g;function Jr(e,t,n,r,i){let a=e;e.endsWith(`/`)&&(a=e.slice(0,-1)),!a.endsWith(`*`)&&t&&(a+=`/**`);let o=Hr(n);a=d.isAbsolute(a.replace(Kr,``))?h.relative(o,a):h.normalize(a);let s=Gr.exec(a),c=zr(a);if(s?.[0]){let e=(s[0].length+1)/3,t=0,i=o.split(`/`);for(;t<e&&c[t+e]===i[i.length+t-e];)a=a.slice(0,(e-t-1)*3)+a.slice((e-t)*3+c[t+e].length+1)||`.`,t++;let l=h.join(n,s[0].slice(t*3));!l.startsWith(`.`)&&r.root.length>l.length&&(r.root=l,r.depthOffset=-e+t)}if(!i&&r.depthOffset>=0){r.commonPath??=c;let e=[],t=Math.min(r.commonPath.length,c.length);for(let n=0;n<t;n++){let t=c[n];if(t===`**`&&!c[n+1]){e.pop();break}if(t!==r.commonPath[n]||Ur(t)||n===c.length-1)break;e.push(t)}r.depthOffset=e.length,r.commonPath=e,r.root=e.length>0?h.join(n,...e):n}return a}function Yr({patterns:e=[`**/*`],ignore:t=[],expandDirectories:n=!0},r,i){typeof e==`string`&&(e=[e]),typeof t==`string`&&(t=[t]);let a=[],o=[];for(let e of t)e&&(e[0]!==`!`||e[1]===`(`)&&o.push(Jr(e,n,r,i,!0));for(let t of e)t&&(t[0]!==`!`||t[1]===`(`?a.push(Jr(t,n,r,i,!1)):(t[1]!==`!`||t[2]===`(`)&&o.push(Jr(t.slice(1),n,r,i,!0)));return{match:a,ignore:o}}function Xr(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];e[n]=t(r)}return e}function Zr(e){return e?e instanceof URL?te(e).replace(qr,`/`):d.resolve(e).replace(qr,`/`):process.cwd().replace(qr,`/`)}function Qr(e,t={}){let n=process.env.TINYGLOBBY_DEBUG?{...t,debug:!0}:t,r=Zr(n.cwd);if(n.debug&&Wr(`globbing with:`,{patterns:e,options:n,cwd:r}),Array.isArray(e)&&e.length===0)return[{sync:()=>[],withPromise:async()=>[]},!1];let i={root:r,commonPath:null,depthOffset:0},a=Yr({...n,patterns:e},r,i);n.debug&&Wr(`internal processing patterns:`,a);let o={dot:n.dot,nobrace:n.braceExpansion===!1,nocase:n.caseSensitiveMatch===!1,noextglob:n.extglob===!1,noglobstar:n.globstar===!1,posix:!0},s=(0,kr.default)(a.match,{...o,ignore:a.ignore}),c=(0,kr.default)(a.ignore,o),l=Nr(a.match,o),d=Ir(r,i.root,n.absolute),f=n.absolute?d:Ir(r,i.root,!0),p={filters:[n.debug?(e,t)=>{let n=d(e,t),r=s(n);return r&&Wr(`matched ${n}`),r}:(e,t)=>s(d(e,t))],exclude:n.debug?(e,t)=>{let n=f(t,!0),r=n!==`.`&&!l(n)||c(n);return Wr(r?`skipped ${t}`:`crawling ${t}`),r}:(e,t)=>{let n=f(t,!0);return n!==`.`&&!l(n)||c(n)},fs:n.fs?{readdir:n.fs.readdir||u.readdir,readdirSync:n.fs.readdirSync||u.readdirSync,realpath:n.fs.realpath||u.realpath,realpathSync:n.fs.realpathSync||u.realpathSync,stat:n.fs.stat||u.stat,statSync:n.fs.statSync||u.statSync}:void 0,pathSeparator:`/`,relativePaths:!0,resolveSymlinks:!0,signal:n.signal};n.deep!==void 0&&(p.maxDepth=Math.round(n.deep-i.depthOffset)),n.absolute&&(p.relativePaths=!1,p.resolvePaths=!0,p.includeBasePath=!0),n.followSymbolicLinks===!1&&(p.resolveSymlinks=!1,p.excludeSymlinks=!0),n.onlyDirectories?(p.excludeFiles=!0,p.includeDirs=!0):n.onlyFiles===!1&&(p.includeDirs=!0),i.root=i.root.replace(qr,``);let m=i.root;n.debug&&Wr(`internal properties:`,i);let h=r!==m&&!n.absolute&&Lr(r,i.root);return[new Cr(p).crawl(m),h]}async function $r(e,t){if(e&&t?.patterns)throw Error(`Cannot pass patterns as both an argument and an option`);let n=Ar(e)||typeof e==`string`,r=n?t:e,[i,a]=Qr(n?e:e.patterns,r);return a?Xr(await i.withPromise(),a):i.withPromise()}Object.freeze({status:`aborted`});function q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var ei=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};const ti={};function ni(e){return e&&Object.assign(ti,e),ti}function ri(e,t){return typeof t==`bigint`?t.toString():t}function ii(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function ai(e){return e==null}function oi(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}const si=Symbol(`evaluating`);function J(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==si)return r===void 0&&(r=si,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ci(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function li(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}const ui=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function di(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fi(e){if(di(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(di(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function pi(e){return fi(e)?{...e}:Array.isArray(e)?[...e]:e}function mi(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Y(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 hi(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function gi(e,t){if(!fi(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return mi(e,li(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ci(this,`shape`,n),n}}))}function _i(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 vi(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function yi(e){return typeof e==`string`?e:e?.message}function bi(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=yi(e.inst?._zod.def?.error?.(e))??yi(t?.error?.(e))??yi(n.customError?.(e))??yi(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function xi(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}const Si=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ri,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Ci=q(`$ZodError`,Si),wi=q(`$ZodError`,Si,{Parent:Error}),Ti=(e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new ei;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>bi(e,a,ni())));throw ui(t,i?.callee),t}return o.value})(wi),Ei=(e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>bi(e,a,ni())));throw ui(t,i?.callee),t}return o.value})(wi),Di=(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 ei;return a.issues.length?{success:!1,error:new(e??Ci)(a.issues.map(e=>bi(e,i,ni())))}:{success:!0,data:a.value}})(wi),Oi=(e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>bi(e,i,ni())))}:{success:!0,data:a.value}})(wi),ki=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Ai=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ji=/^-?\d+(?:\.\d+)?$/,Mi=/^(?:true|false)$/i,Ni=q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Pi=q(`$ZodCheckMinLength`,(e,t)=>{var n;Ni.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ai(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=xi(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Fi=q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Ni.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),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=()=>{})}),Ii={major:4,minor:3,patch:6},X=q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ii;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=_i(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new ei;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=_i(e,t))});else{if(e.issues.length===t)continue;r||=_i(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(_i(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new ei;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new ei;return o.then(e=>t(e,r,a))}return t(o,r,a)}}J(e,`~standard`,()=>({validate:t=>{try{let n=Di(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Oi(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Li=q(`$ZodString`,(e,t)=>{X.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ai(e._zod.bag),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}}),Ri=q(`$ZodStringFormat`,(e,t)=>{Fi.init(e,t),Li.init(e,t)}),zi=q(`$ZodURL`,(e,t)=>{Ri.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.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&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Bi=q(`$ZodNumber`,(e,t)=>{X.init(e,t),e._zod.pattern=e._zod.bag.pattern??ji,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:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Vi=q(`$ZodBoolean`,(e,t)=>{X.init(e,t),e._zod.pattern=Mi,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}}),Hi=q(`$ZodUnknown`,(e,t)=>{X.init(e,t),e._zod.parse=e=>e});function Ui(e,t,n){e.issues.length&&t.issues.push(...vi(n,e.issues)),t.value[n]=e.value}const Wi=q(`$ZodArray`,(e,t)=>{X.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Ui(t,n,e))):Ui(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Gi(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...vi(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Ki(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=hi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function qi(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Gi(e,n,i,t,u))):Gi(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const Ji=q(`$ZodObject`,(e,t)=>{if(X.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=ii(()=>Ki(t));J(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=di,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>Gi(n,t,e,s,r))):Gi(i,t,e,s,r)}return i?qi(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Yi=q(`$ZodRecord`,(e,t)=>{X.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!fi(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...vi(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...vi(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&ji.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>bi(e,r,ni())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...vi(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...vi(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}});function Xi(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Zi=q(`$ZodOptional`,(e,t)=>{X.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,J(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),J(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${oi(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Xi(t,e.value)):Xi(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Qi=q(`$ZodNullable`,(e,t)=>{X.init(e,t),J(e._zod,`optin`,()=>t.innerType._zod.optin),J(e._zod,`optout`,()=>t.innerType._zod.optout),J(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${oi(e.source)}|null)$`):void 0}),J(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$i=q(`$ZodDefault`,(e,t)=>{X.init(e,t),e._zod.optin=`optional`,J(e._zod,`values`,()=>t.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=>ea(e,t)):ea(r,t)}});function ea(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ta=q(`$ZodPipe`,(e,t)=>{X.init(e,t),J(e._zod,`values`,()=>t.in._zod.values),J(e._zod,`optin`,()=>t.in._zod.optin),J(e._zod,`optout`,()=>t.out._zod.optout),J(e._zod,`propValues`,()=>t.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=>na(e,t.in,n)):na(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>na(e,t.out,n)):na(r,t.out,n)}});function na(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ra=q(`$ZodCodec`,(e,t)=>{X.init(e,t),J(e._zod,`values`,()=>t.in._zod.values),J(e._zod,`optin`,()=>t.in._zod.optin),J(e._zod,`optout`,()=>t.out._zod.optout),J(e._zod,`propValues`,()=>t.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=>ia(e,t,n)):ia(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ia(e,t,n)):ia(r,t,n)}}});function ia(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=>aa(e,r,t.out,n)):aa(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>aa(e,r,t.in,n)):aa(e,r,t.in,n)}}function aa(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var oa,sa=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ca(){return new sa}(oa=globalThis).__zod_globalRegistry??(oa.__zod_globalRegistry=ca()),globalThis.__zod_globalRegistry;function la(e,t){return new e({type:`string`,...Y(t)})}function ua(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Y(t)})}function da(e,t){return new e({type:`number`,checks:[],...Y(t)})}function fa(e,t){return new e({type:`boolean`,...Y(t)})}function pa(e){return new e({type:`unknown`})}function ma(e,t){return new Pi({check:`min_length`,...Y(t),minimum:e})}function ha(e,t){let n=Y(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??ra,c=e.Boolean??Vi,l=new s({type:`pipe`,in:new(e.String??Li)({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)?!1:(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}const ga=q(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);X.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>Ti(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Di(e,t,n),e.parseAsync=async(t,n)=>Ei(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Oi(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>mi(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),_a=q(`ZodMiniString`,(e,t)=>{Li.init(e,t),ga.init(e,t)});function Z(e){return la(_a,e)}const va=q(`ZodMiniStringFormat`,(e,t)=>{Ri.init(e,t),_a.init(e,t)}),ya=q(`ZodMiniURL`,(e,t)=>{zi.init(e,t),va.init(e,t)});function ba(e){return ua(ya,e)}function xa(e){return ua(ya,{protocol:/^https?$/,hostname:ki,...Y(e)})}const Sa=q(`ZodMiniNumber`,(e,t)=>{Bi.init(e,t),ga.init(e,t)});function Ca(e){return da(Sa,e)}const wa=q(`ZodMiniBoolean`,(e,t)=>{Vi.init(e,t),ga.init(e,t)});function Ta(e){return fa(wa,e)}const Ea=q(`ZodMiniUnknown`,(e,t)=>{Hi.init(e,t),ga.init(e,t)});function Da(){return pa(Ea)}const Oa=q(`ZodMiniArray`,(e,t)=>{Wi.init(e,t),ga.init(e,t)});function ka(e,t){return new Oa({type:`array`,element:e,...Y(t)})}const Aa=q(`ZodMiniObject`,(e,t)=>{Ji.init(e,t),ga.init(e,t),J(e,`shape`,()=>t.shape)});function ja(e,t){return new Aa({type:`object`,shape:e??{},...Y(t)})}function Ma(e,t){return new Aa({type:`object`,shape:e,catchall:Da(),...Y(t)})}function Na(e,t){return gi(e,t)}const Pa=q(`ZodMiniRecord`,(e,t)=>{Yi.init(e,t),ga.init(e,t)});function Fa(e,t,n){return new Pa({type:`record`,keyType:e,valueType:t,...Y(n)})}const Ia=q(`ZodMiniOptional`,(e,t)=>{Zi.init(e,t),ga.init(e,t)});function Q(e){return new Ia({type:`optional`,innerType:e})}const La=q(`ZodMiniNullable`,(e,t)=>{Qi.init(e,t),ga.init(e,t)});function Ra(e){return new La({type:`nullable`,innerType:e})}const za=q(`ZodMiniDefault`,(e,t)=>{$i.init(e,t),ga.init(e,t)});function Ba(e,t){return new za({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():pi(t)}})}const Va=q(`ZodMiniPipe`,(e,t)=>{ta.init(e,t),ga.init(e,t)}),Ha=q(`ZodMiniCodec`,(e,t)=>{Va.init(e,t),ra.init(e,t)}),Ua=(...e)=>ha({Codec:Ha,Boolean:wa,String:_a},...e);function Wa(e){let t=new URL(e);return t.pathname.endsWith(`/`)||(t.pathname+=`/`),t}function Ga(e,t){return x(o(e),o(t))}async function Ka(e,n={}){let{start:r=s(process.cwd()),stop:i}=n,a=Wa(r);for(;;){let n=new URL(e,a);try{return await t(n),n}catch{}if(typeof i==`string`){let e=new URL(i,a);try{await t(e);return}catch{}}else if(i instanceof URL&&i.href===a.href)return;let r=new URL(`..`,a);if(r.href===a.href)return;a=r}}async function qa(e){try{return await t(e),!0}catch{return!1}}async function Ja(e,t){await n(new URL(`.`,e),{recursive:!0}),await a(e,t)}async function Ya(e,t={}){let{schema:n}=t,i=await r(e,`utf8`),a=JSON.parse(i);return n?Ti(n,a):a}function Xa(e){return JSON.stringify(e,null,2)}const Za=/^(?:( )+|\t+)/,Qa=`space`;function $a(e,t,n){return e&&t===Qa&&n===1}function eo(e,t){let n=new Map,r=0,i,a;for(let o of e.split(/\n/g)){if(!o)continue;let e=o.match(Za);if(e===null)r=0,i=``;else{let o=e[0].length,s=e[1]?Qa:`tab`;if($a(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($a(t,s,e))continue;a=to(s,e)}let d=n.get(a);n.set(a,d===void 0?[1,0]:[d[0]+c,d[1]+l])}}return n}function to(e,t){return(e===Qa?`s`:`t`)+String(t)}function no(e){return{type:e[0]===`s`?Qa:`tab`,amount:Number(e.slice(1))}}function ro(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 io(e,t){return(e===Qa?` `:` `).repeat(t)}function ao(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);let t=eo(e,!0);t.size===0&&(t=eo(e,!1));let n=ro(t),r,i=0,a=``;return n!==void 0&&({type:r,amount:i}=no(n),a=io(r,i)),{amount:i,type:r,indent:a}}var oo=Object.create,so=Object.defineProperty,co=Object.getOwnPropertyDescriptor,lo=Object.getOwnPropertyNames,uo=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty,$=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),po=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=lo(t),a=0,o=i.length,s;a<o;a++)s=i[a],!fo.call(e,s)&&s!==n&&so(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=co(t,s))||r.enumerable});return e},mo=(e,t,n)=>(n=e==null?{}:oo(uo(e)),po(t||!e||!e.__esModule?so(n,`default`,{value:e,enumerable:!0}):n,e)),ho=v(import.meta.url);const go=/^path$/i,_o={key:`PATH`,value:``};function vo(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!go.test(t))continue;let n=e[t];return n?{key:t,value:n}:_o}return _o}function yo(e,t){let n=t.value.split(ne),r=e,i;do n.push(re(r,`node_modules`,`.bin`)),i=r,r=y(r);while(r!==i);return{key:t.key,value:n.join(ne)}}function bo(e,t){let n={...process.env,...t},r=yo(e,vo(n));return n[r.key]=r.value,n}const xo=e=>{let t=e.length,n=new w,r=()=>{--t===0&&n.emit(`end`)};for(let t of e)t.pipe(n,{end:!1}),t.on(`end`,r);return n};var So=$((e,t)=>{t.exports=a,a.sync=o;var n=ho(`fs`);function r(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function i(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:r(t,n)}function a(e,t,r){n.stat(e,function(n,a){r(n,n?!1:i(a,e,t))})}function o(e,t){return i(n.statSync(e),e,t)}}),Co=$((e,t)=>{t.exports=r,r.sync=i;var n=ho(`fs`);function r(e,t,r){n.stat(e,function(e,n){r(e,e?!1:a(n,t))})}function i(e,t){return a(n.statSync(e),t)}function a(e,t){return e.isFile()&&o(e,t)}function o(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}}),wo=$((e,t)=>{ho(`fs`);var n=process.platform===`win32`||global.TESTING_WINDOWS?So():Co();t.exports=r,r.sync=i;function r(e,t,i){if(typeof t==`function`&&(i=t,t={}),!i){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,i){r(e,t||{},function(e,t){e?i(e):n(t)})})}n(e,t||{},function(e,n){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,n=!1),i(e,n)})}function i(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}}),To=$((e,t)=>{let n=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,r=ho(`path`),i=n?`;`:`:`,a=wo(),o=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),s=(e,t)=>{let r=t.colon||i,a=e.match(/\//)||n&&e.match(/\\/)?[``]:[...n?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(r)],o=n?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=n?o.split(r):[``];return n&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:a,pathExt:s,pathExtExe:o}},c=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:i,pathExt:c,pathExtExe:l}=s(e,t),u=[],d=n=>new Promise((a,s)=>{if(n===i.length)return t.all&&u.length?a(u):s(o(e));let c=i[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=r.join(l,e);a(f(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,n,0))}),f=(e,n,r)=>new Promise((i,o)=>{if(r===c.length)return i(d(n+1));let s=c[r];a(e+s,{pathExt:l},(a,o)=>{if(!a&&o)if(t.all)u.push(e+s);else return i(e+s);return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};t.exports=c,c.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:i,pathExtExe:c}=s(e,t),l=[];for(let o=0;o<n.length;o++){let s=n[o],u=/^".*"$/.test(s)?s.slice(1,-1):s,d=r.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<i.length;e++){let n=f+i[e];try{if(a.sync(n,{pathExt:c}))if(t.all)l.push(n);else return n}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw o(e)}}),Eo=$((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n}),Do=$((e,t)=>{let n=ho(`path`),r=To(),i=Eo();function a(e,t){let a=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=r.sync(e.command,{path:a[i({env:a})],pathExt:t?n.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=n.resolve(s?e.options.cwd:``,l),l}function o(e){return a(e)||a(e,!0)}t.exports=o}),Oo=$((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,`$1$1\\"`),e=e.replace(/(\\*)$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i}),ko=$((e,t)=>{t.exports=/^#!(.*)/}),Ao=$((e,t)=>{let n=ko();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}}),jo=$((e,t)=>{let n=ho(`fs`),r=Ao();function i(e){let t=Buffer.alloc(150),i;try{i=n.openSync(e,`r`),n.readSync(i,t,0,150,0),n.closeSync(i)}catch{}return r(t.toString())}t.exports=i}),Mo=$((e,t)=>{let n=ho(`path`),r=Do(),i=Oo(),a=jo(),o=process.platform===`win32`,s=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function l(e){e.file=r(e);let t=e.file&&a(e.file);return t?(e.args.unshift(e.file),e.command=t,r(e)):e.file}function u(e){if(!o)return e;let t=l(e),r=!s.test(t);if(e.options.forceShell||r){let r=c.test(t);e.command=n.normalize(e.command),e.command=i.command(e.command),e.args=e.args.map(e=>i.argument(e,r)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function d(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:u(r)}t.exports=d}),No=$((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t,`spawn`);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}}),Po=mo($((e,t)=>{let n=ho(`child_process`),r=Mo(),i=No();function a(e,t,a){let o=r(e,t,a),s=n.spawn(o.command,o.args,o.options);return i.hookChildProcess(s,o),s}function o(e,t,a){let o=r(e,t,a),s=n.spawnSync(o.command,o.args,o.options);return s.error=s.error||i.verifyENOENTSync(s.status,o),s}t.exports=a,t.exports.spawn=a,t.exports.sync=o,t.exports._parse=r,t.exports._enoent=i})(),1),Fo=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const Io={timeout:void 0,persist:!1},Lo={windowsHide:!0};function Ro(e,t){return{command:b(e),args:t??[]}}function zo(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 Bo(e){let t=``;for await(let n of e)t+=n.toString();return t}var Vo=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}constructor(e,t,n){this._options={...Io,...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 Uo(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=xo(t),r=ie.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)throw new Fo(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error(`No process was started`);let[t,n]=await Promise.all([this._streamOut?Bo(this._streamOut):``,this._streamErr?Bo(this._streamErr):``]);if(await this._processClosed,this._options?.stdin&&await this._options.stdin,e.removeAllListeners(),this._thrownError)throw this._thrownError;let r={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new Fo(this,r);return r}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=C(),t=this._options,n={...Lo,...t.nodeOptions},r=[];this._resetState(),t.timeout!==void 0&&r.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&r.push(t.signal),t.persist===!0&&(n.detached=!0),r.length>0&&(n.signal=zo(r)),n.env=bo(e,n.env);let{command:i,args:a}=Ro(this._command,this._args),o=(0,Po._parse)(i,a,n),s=S(o.command,o.args,o.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once(`error`,this._onError),s.once(`close`,this._onClose),t.stdin!==void 0&&s.stdin&&t.stdin.process){let{stdout:e}=t.stdin.process;e&&e.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name===`AbortError`&&(!(e.cause instanceof Error)||e.cause.name!==`TimeoutError`)){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const Ho=(e,t,n)=>{let r=new Vo(e,t,n);return r.spawn(),r},Uo=Ho,Wo=ja({dependencies:Q(Fa(Z(),Z())),devDependencies:Q(Fa(Z(),Z())),peerDependencies:Q(Fa(Z(),Z())),packageManager:Q(Z())});async function Go(){return await Ya(await Ko(),{schema:Wo})}async function Ko(){let e=await Ka(`package.json`);if(!e)throw new qo;return e}var qo=class extends Error{name=`MissingPackageJson`;message=`Could not find a package.json file.`};async function Jo(e){let t=await Ko(),n=await r(t,`utf8`),i=ao(n).indent||` `,o=JSON.parse(n);o.dependencies=Object.fromEntries(Object.entries({...o.dependencies,...e}).sort(([e],[t])=>e.localeCompare(t))),await a(t,JSON.stringify(o,null,i)+`
|
|
168
|
-
`)}async function Yo(e,t=`latest`){let n=new URL(`${e}/${t}`,`https://registry.npmjs.org/`),{version:r}=await(await fetch(n)).json();return r}const Xo={npm:[`npm`,`install`],yarn:[`yarn`,`install`],pnpm:[`pnpm`,`install`],bun:[`bun`,`install`]};async function Zo(){let e=await Ko(),t=new URL(`.`,e),[n,...r]=Xo[await $o()];await Ho(n,r,{nodeOptions:{cwd:o(t),stdio:`inherit`},throwOnError:!0})}const Qo={"bun.lock":`bun`,"bun.lockb":`bun`,"pnpm-lock.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`};async function $o(){let e=await es();if(e)return e;let t=await Ko();for(let e in Qo){let n=Qo[e];if(await qa(new URL(e,t)))return n}return`npm`}async function es(){try{let e=await Go();if(!e.packageManager)return;let t=e.packageManager.split(`@`)[0];return t in Xo?t:void 0}catch{return}}const ts=`prismic.config.json`,ns=`slicemachine.config.json`,rs=ja({repositoryName:Z(),documentAPIEndpoint:Q(ba()),libraries:Q(ka(Z())),routes:Q(ka(ja({type:Z(),path:Z(),uid:Q(Z()),lang:Q(Z()),resolvers:Q(Fa(Z(),Z()))})))}),is=ja({repositoryName:Z(),libraries:Q(ka(Z()))});async function as(e){let t=await ds();return await a(t,Xa(e)),t}async function os(){let e=await ls();try{let t=await r(e,`utf8`);return Ti(rs,JSON.parse(t))}catch(e){throw e instanceof Ci?new ss(e.issues):new ss}}var ss=class extends Error{name=`InvalidPrismicConfig`;message=`${ts} is invalid.`;issues;constructor(e=[]){super(),this.issues=e}};async function cs(e){let t=await ls(),n={...await os(),...e};return await a(t,Xa(n)),n}async function ls(){let e=await Ka(ts,{stop:`package.json`});if(!e)throw new us;return e}var us=class extends Error{name=`MissingPrismicConfig`;message=`Could not find a ${ts} file.`};async function ds(){try{let e=await Ko();return new URL(ts,e)}catch(e){throw e instanceof qo?new fs(void 0,{cause:e}):e}}var fs=class extends Error{name=`UnknownProjectRoot`};async function ps(e){let{routes:t=[]}=await os();if(t.some(t=>t.type===e.id))return;let n=gs(e),r={type:e.id,path:n};await cs({routes:[...t,r].sort((e,t)=>e.type.localeCompare(t.type))})}async function ms(e){if(e.format===`page`){let{routes:t=[]}=await os();if(t.some(t=>t.type===e.id))return;await ps(e)}else await hs(e.id)}async function hs(e){let{routes:t=[]}=await os(),n=t.filter(t=>t.type!==e);t.length!==n.length&&await cs({routes:n})}function gs(e){let{id:t,repeatable:n}=e,r=t.replaceAll(`_`,`-`).toLowerCase();return n?t===`page`?`/:uid`:`/${r}/:uid`:t===`homepage`?`/`:`/${r}`}async function _s(){let e=await bs();try{let t=await r(e,`utf8`);return Ti(is,JSON.parse(t))}catch(e){throw e instanceof Ci?new vs(e.issues):new vs}}var vs=class extends Error{name=`InvalidLegacySliceMachineConfig`;message=`${ns} is invalid.`;issues;constructor(e=[]){super(),this.issues=e}};async function ys(){await i(await bs())}async function bs(){let e=await Ka(ns,{stop:`package.json`});if(!e)throw new xs;return e}var xs=class extends Error{name=`MissingLegacySliceMachineConfig`;message=`Could not find a ${ns} file.`};async function Ss(e,t={}){let{credentials:n,...r}=t,i=new Headers(t.headers);if(i.has(`Accept`)||i.set(`Accept`,`application/json`),i.has(`User-Agent`)||i.set(`User-Agent`,`prismic-cli`),n){let e=[];for(let t in n)e.push(`${t}=${n[t]??``}`);i.set(`Cookie`,e.join(`; `))}!i.has(`Content-Type`)&&t.body&&i.set(`Content-Type`,`application/json`),t.body instanceof FormData&&i.delete(`Content-Type`);let a=i.get(`Content-Type`)===`application/json`?JSON.stringify(t.body):t.body,o=await fetch(e,{...r,body:a,headers:i}),s=await o.clone().json().catch(()=>o.clone().text());if(o.ok)return t.schema?Ti(t.schema,s):s;throw o.status===401?new Ds(o):o.status===403?new Es(o):o.status===404?new Ts(o):new ws(o)}var Cs=class extends Error{name=`RequestError`;response;constructor(e){super(`fetch failed: ${e.url}`),this.response=e}async text(){return this.response.clone().text()}async json(){return this.response.clone().json()}get status(){return this.response.status}get statusText(){return this.response.statusText}},ws=class extends Cs{name=`UnknownRequestError`},Ts=class extends Cs{name=`NotFoundRequestError`},Es=class extends Cs{name=`ForbiddenRequestError`},Ds=class extends Cs{name=`UnauthorizedRequestError`};const Os=ja({quotas:Q(ja({sliceMachineEnabled:Ta()}))});async function ks(e){let{repo:t,token:n,host:r}=e,i=As(r);return i.searchParams.set(`repository`,t),await Ss(i,{headers:{Authorization:`Bearer ${n}`,repository:t},schema:Os})}function As(e){return new URL(`https://api.internal.${e}/repository/`)}const js=ja({email:Z(),shortId:Z(),intercomHash:Z(),repositories:ka(ja({domain:Z(),name:Q(Z()),role:Q(Z())}))});async function Ms(e){let{token:t,host:n}=e,r=Ns(n);return await Ss(new URL(`profile`,r),{credentials:{"prismic-auth":t},schema:js})}function Ns(e){return new URL(`https://user-service.${e}/`)}const Ps=`prismic.io`,Fs=Ti(ja({MODE:Z(),DEV:Ua(),PROD:Ua(),TEST:Ua(),PRISMIC_SENTRY_DSN:Ba(xa(),`https://e1886b1775bd397cd1afc60bfd2ebfc8@o146123.ingest.us.sentry.io/4510445143588864`),PRISMIC_SENTRY_ENVIRONMENT:Q(Z()),PRISMIC_SENTRY_ENABLED:Q(Ua()),PRISMIC_HOST:Q(Z()),PRISMIC_TYPE_BUILDER_ENABLED:Q(Ua())}),{...process.env,MODE:`production`,DEV:`false`,PROD:`true`,TEST:`false`}),Is=Fs.PROD?`client-q1CoIFNVeFUqxmRSCGXVqO3vK2zQ6bDa`:`client-Gx378hyvV904fpcQbJnWy7i5p4nBkMZa`,Ls=Fs.PROD?`https://amplitude.prismic.io/`:`https://amplitude.wroom.io/`,Rs=Fa(Z(),ja({value:Q(Z())}));async function zs(e,t){let n={user_id:t.userId};t.groups&&(n.groups=t.groups);let r=btoa(JSON.stringify(n)).replace(/\+/g,`-`).replace(/\//g,`_`),i=new URL(`sdk/v2/vardata?v=0`,Ls),a=await fetch(i,{headers:{Authorization:`Api-Key ${Is}`,"X-Amp-Exp-User":r}});if(!a.ok)throw Error(`Amplitude flag evaluation failed: ${a.status}`);return Ti(Rs,await a.json())[e]?.value===`on`}async function Bs(){let e;try{e=await ls()}catch(t){if(t instanceof us)e=await ds();else throw t}return new URL(`.`,e)}async function Vs(){try{return await Hs()}catch{return}}async function Hs(){try{return(await os()).repositoryName}catch(e){if(e instanceof us)try{return(await _s()).repositoryName}catch{}throw e}}async function Us(){let e=(await os()).libraries;if(!e||e.length<1)return;let t=await Bs();return e.map(e=>Wa(new URL(e.replace(/^\//,``),t)))}async function Ws(){let e=await Bs();return await qa(new URL(`tsconfig.json`,e))}async function Gs(){try{return await bs(),!0}catch{return!1}}async function Ks(e,t){if(Fs.PRISMIC_TYPE_BUILDER_ENABLED!==void 0)return Fs.PRISMIC_TYPE_BUILDER_ENABLED;let{token:n,host:r}=t,i=await Ms({token:n,host:r}),[a,o]=await Promise.all([zs(`dev-tools-types-builder-cloud`,{userId:i.shortId,groups:{Repository:[e]}}),ks({repo:e,token:n,host:r})]);return a&&o.quotas?.sliceMachineEnabled===!0}var qs=class extends Error{name=`TypeBuilderRequired`};async function Js(){let{dependencies:e,devDependencies:t,peerDependencies:n}=await Go(),r={...e,...t,...n};if(`next`in r){let{NextJsAdapter:e}=await import(`./nextjs-BqWYraaq.mjs`);return new e}if(`nuxt`in r){let{NuxtAdapter:e}=await import(`./nuxt-CCgIhEiV.mjs`);return new e}if(`@sveltejs/kit`in r){let{SvelteKitAdapter:e}=await import(`./sveltekit-BWJQOOLF.mjs`);return new e}throw new Ys}var Ys=class extends Error{message=`No supported framework found (Next.js, Nuxt, or SvelteKit required)`},Xs=class{async initProject(){let e=await this.getSliceLibraries();for(let t of e)await this.createSliceIndexFile(t);await this.setupProject(),await this.onProjectInitialized()}async getSliceLibraries(){return await Us()||[await this.getDefaultSliceLibrary()]}async getSlices(){let e=[],t=await this.getSliceLibraries();for(let n of t){let t=new URL(`*/model.json`,n),r=Array.from(await $r(o(t),{absolute:!0}),e=>s(e)),i=await Promise.all(r.map(async e=>({library:n,directory:new URL(`.`,e),model:await Ya(e)})));e.push(...i)}return e.sort((e,t)=>e.model.id.toLowerCase().localeCompare(t.model.id.toLowerCase()))}async getSlice(e){let t=(await this.getSlices()).find(t=>t.model.id===e);if(!t)throw Error(`No slice found with ID: ${e}`);return t}async createSlice(e,t){t??=await this.getDefaultSliceLibrary();let n=R(e.name),r=new URL(n,Wa(t));await Ja(new URL(`model.json`,Wa(r)),Xa(e)),await this.createSliceIndexFile(t),await this.onSliceCreated(e,t)}async updateSlice(e){let t=await this.getSlice(e.id);await Ja(new URL(`model.json`,Wa(t.directory)),Xa(e)),await this.onSliceUpdated(e)}async deleteSlice(e){let t=await this.getSlice(e);await i(t.directory,{recursive:!0}),await this.createSliceIndexFile(t.library),await this.onSliceDeleted(e)}async getCustomTypes(){let e=await Bs(),t=new URL(`customtypes/`,e),n=new URL(`*/index.json`,t),r=Array.from(await $r(o(n),{absolute:!0}),e=>s(e));return(await Promise.all(r.map(async e=>({directory:new URL(`.`,e),model:await Ya(e)})))).sort((e,t)=>e.model.id.toLowerCase().localeCompare(t.model.id.toLowerCase()))}async getCustomType(e){let t=(await this.getCustomTypes()).find(t=>t.model.id===e);if(!t)throw Error(`No custom type found with ID: ${e}`);return t}async createCustomType(e){let t=await Bs(),n=new URL(`customtypes/`,t);await Ja(new URL(`${e.id}/index.json`,n),Xa(e)),e.format===`page`&&await ps(e),await this.onCustomTypeCreated(e)}async updateCustomType(e){let t=await this.getCustomType(e.id);await Ja(new URL(`index.json`,Wa(t.directory)),Xa(e)),await ms(e),await this.onCustomTypeUpdated(e)}async deleteCustomType(e){await i((await this.getCustomType(e)).directory,{recursive:!0}),await hs(e),await this.onCustomTypeDeleted(e)}async generateTypes(){let e=await Bs(),t=new URL(`prismicio-types.d.ts`,e),n=await this.getSlices();return await Ja(t,vn({customTypeModels:(await this.getCustomTypes()).map(e=>e.model),sharedSliceModels:n.map(e=>e.model),clientIntegration:{includeContentNamespace:!0,includeCreateClientInterface:!0},cache:!0,typesProvider:`@prismicio/client`})),t}};function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zs(Object(n),!0).forEach(function(t){$s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $s(e,t,n){return t=ec(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ec(e){var t=tc(e,`string`);return typeof t==`symbol`?t:String(t)}function tc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var nc=rc({});function rc(e){return t.withOptions=t=>rc(Qs(Qs({},e),t)),t;function t(t,...n){let r=typeof t==`string`?[t]:t.raw,{alignValues:i=!1,escapeSpecialCharacters:a=Array.isArray(t),trimWhitespace:o=!0}=e,s=``;for(let e=0;e<r.length;e++){let t=r[e];if(a&&(t=t.replace(/\\\n[ \t]*/g,``).replace(/\\`/g,"`").replace(/\\\$/g,`$`).replace(/\\\{/g,`{`)),s+=t,e<n.length){let t=i?ic(n[e],s):n[e];s+=t}}let c=s.split(`
|
|
168
|
+
`)}async function Yo(e,t=`latest`){let n=new URL(`${e}/${t}`,`https://registry.npmjs.org/`),{version:r}=await(await fetch(n)).json();return r}const Xo={npm:[`npm`,`install`],yarn:[`yarn`,`install`],pnpm:[`pnpm`,`install`],bun:[`bun`,`install`]};async function Zo(){let e=await Ko(),t=new URL(`.`,e),[n,...r]=Xo[await $o()];await Ho(n,r,{nodeOptions:{cwd:o(t),stdio:`inherit`},throwOnError:!0})}const Qo={"bun.lock":`bun`,"bun.lockb":`bun`,"pnpm-lock.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`};async function $o(){let e=await es();if(e)return e;let t=await Ko();for(let e in Qo){let n=Qo[e];if(await qa(new URL(e,t)))return n}return`npm`}async function es(){try{let e=await Go();if(!e.packageManager)return;let t=e.packageManager.split(`@`)[0];return t in Xo?t:void 0}catch{return}}const ts=`prismic.config.json`,ns=`slicemachine.config.json`,rs=ja({repositoryName:Z(),documentAPIEndpoint:Q(ba()),libraries:Q(ka(Z())),routes:Q(ka(ja({type:Z(),path:Z(),uid:Q(Z()),lang:Q(Z()),resolvers:Q(Fa(Z(),Z()))})))}),is=ja({repositoryName:Z(),libraries:Q(ka(Z()))});async function as(e){let t=await ds();return await a(t,Xa(e)),t}async function os(){let e=await ls();try{let t=await r(e,`utf8`);return Ti(rs,JSON.parse(t))}catch(e){throw e instanceof Ci?new ss(e.issues):new ss}}var ss=class extends Error{name=`InvalidPrismicConfig`;message=`${ts} is invalid.`;issues;constructor(e=[]){super(),this.issues=e}};async function cs(e){let t=await ls(),n={...await os(),...e};return await a(t,Xa(n)),n}async function ls(){let e=await Ka(ts,{stop:`package.json`});if(!e)throw new us;return e}var us=class extends Error{name=`MissingPrismicConfig`;message=`Could not find a ${ts} file.`};async function ds(){try{let e=await Ko();return new URL(ts,e)}catch(e){throw e instanceof qo?new fs(void 0,{cause:e}):e}}var fs=class extends Error{name=`UnknownProjectRoot`};async function ps(e){let{routes:t=[]}=await os();if(t.some(t=>t.type===e.id))return;let n=gs(e),r={type:e.id,path:n};await cs({routes:[...t,r].sort((e,t)=>e.type.localeCompare(t.type))})}async function ms(e){if(e.format===`page`){let{routes:t=[]}=await os();if(t.some(t=>t.type===e.id))return;await ps(e)}else await hs(e.id)}async function hs(e){let{routes:t=[]}=await os(),n=t.filter(t=>t.type!==e);t.length!==n.length&&await cs({routes:n})}function gs(e){let{id:t,repeatable:n}=e,r=t.replaceAll(`_`,`-`).toLowerCase();return n?t===`page`?`/:uid`:`/${r}/:uid`:t===`homepage`?`/`:`/${r}`}async function _s(){let e=await bs();try{let t=await r(e,`utf8`);return Ti(is,JSON.parse(t))}catch(e){throw e instanceof Ci?new vs(e.issues):new vs}}var vs=class extends Error{name=`InvalidLegacySliceMachineConfig`;message=`${ns} is invalid.`;issues;constructor(e=[]){super(),this.issues=e}};async function ys(){await i(await bs())}async function bs(){let e=await Ka(ns,{stop:`package.json`});if(!e)throw new xs;return e}var xs=class extends Error{name=`MissingLegacySliceMachineConfig`;message=`Could not find a ${ns} file.`};async function Ss(e,t={}){let{credentials:n,...r}=t,i=new Headers(t.headers);if(i.has(`Accept`)||i.set(`Accept`,`application/json`),i.has(`User-Agent`)||i.set(`User-Agent`,`prismic-cli`),n){let e=[];for(let t in n)e.push(`${t}=${n[t]??``}`);i.set(`Cookie`,e.join(`; `))}!i.has(`Content-Type`)&&t.body&&i.set(`Content-Type`,`application/json`),t.body instanceof FormData&&i.delete(`Content-Type`);let a=i.get(`Content-Type`)===`application/json`?JSON.stringify(t.body):t.body,o=await fetch(e,{...r,body:a,headers:i}),s=await o.clone().json().catch(()=>o.clone().text());if(o.ok)return t.schema?Ti(t.schema,s):s;throw o.status===401?new Ds(o):o.status===403?new Es(o):o.status===404?new Ts(o):new ws(o)}var Cs=class extends Error{name=`RequestError`;response;constructor(e){super(`fetch failed: ${e.url}`),this.response=e}async text(){return this.response.clone().text()}async json(){return this.response.clone().json()}get status(){return this.response.status}get statusText(){return this.response.statusText}},ws=class extends Cs{name=`UnknownRequestError`},Ts=class extends Cs{name=`NotFoundRequestError`},Es=class extends Cs{name=`ForbiddenRequestError`},Ds=class extends Cs{name=`UnauthorizedRequestError`};const Os=ja({quotas:Q(ja({sliceMachineEnabled:Ta()}))});async function ks(e){let{repo:t,token:n,host:r}=e,i=As(r);return i.searchParams.set(`repository`,t),await Ss(i,{headers:{Authorization:`Bearer ${n}`,repository:t},schema:Os})}function As(e){return new URL(`https://api.internal.${e}/repository/`)}const js=ja({email:Z(),shortId:Z(),intercomHash:Z(),repositories:ka(ja({domain:Z(),name:Q(Z()),role:Q(Z())}))});async function Ms(e){let{token:t,host:n}=e,r=Ns(n);return await Ss(new URL(`profile`,r),{credentials:{"prismic-auth":t},schema:js})}function Ns(e){return new URL(`https://user-service.${e}/`)}const Ps=`prismic.io`,Fs=Ti(ja({MODE:Z(),DEV:Ua(),PROD:Ua(),TEST:Ua(),PRISMIC_SENTRY_DSN:Ba(xa(),`https://e1886b1775bd397cd1afc60bfd2ebfc8@o146123.ingest.us.sentry.io/4510445143588864`),PRISMIC_SENTRY_ENVIRONMENT:Q(Z()),PRISMIC_SENTRY_ENABLED:Q(Ua()),PRISMIC_HOST:Q(Z()),PRISMIC_DOCS_HOST:Q(Z()),PRISMIC_TYPE_BUILDER_ENABLED:Q(Ua())}),{...process.env,MODE:`production`,DEV:`false`,PROD:`true`,TEST:`false`}),Is=Fs.PROD?`client-q1CoIFNVeFUqxmRSCGXVqO3vK2zQ6bDa`:`client-Gx378hyvV904fpcQbJnWy7i5p4nBkMZa`,Ls=Fs.PROD?`https://amplitude.prismic.io/`:`https://amplitude.wroom.io/`,Rs=Fa(Z(),ja({value:Q(Z())}));async function zs(e,t){let n={user_id:t.userId};t.groups&&(n.groups=t.groups);let r=btoa(JSON.stringify(n)).replace(/\+/g,`-`).replace(/\//g,`_`),i=new URL(`api/sdk/v2/vardata?v=0`,Ls),a=await fetch(i,{headers:{Authorization:`Api-Key ${Is}`,"X-Amp-Exp-User":r}});if(!a.ok)throw Error(`Amplitude flag evaluation failed: ${a.status}`);return Ti(Rs,await a.json())[e]?.value===`on`}async function Bs(){let e;try{e=await ls()}catch(t){if(t instanceof us)e=await ds();else throw t}return new URL(`.`,e)}async function Vs(){try{return await Hs()}catch{return}}async function Hs(){try{return(await os()).repositoryName}catch(e){if(e instanceof us)try{return(await _s()).repositoryName}catch{}throw e}}async function Us(){let e=(await os()).libraries;if(!e||e.length<1)return;let t=await Bs();return e.map(e=>Wa(new URL(e.replace(/^\//,``),t)))}async function Ws(){let e=await Bs();return await qa(new URL(`tsconfig.json`,e))}async function Gs(){try{return await bs(),!0}catch{return!1}}async function Ks(e,t){if(Fs.PRISMIC_TYPE_BUILDER_ENABLED!==void 0)return Fs.PRISMIC_TYPE_BUILDER_ENABLED;let{token:n,host:r}=t,i=await Ms({token:n,host:r}),[a,o]=await Promise.all([zs(`dev-tools-types-builder-cloud`,{userId:i.shortId,groups:{Repository:[e]}}),ks({repo:e,token:n,host:r})]);return a&&o.quotas?.sliceMachineEnabled===!0}var qs=class extends Error{name=`TypeBuilderRequired`};async function Js(){let{dependencies:e,devDependencies:t,peerDependencies:n}=await Go(),r={...e,...t,...n};if(`next`in r){let{NextJsAdapter:e}=await import(`./nextjs-OChXma0h.mjs`);return new e}if(`nuxt`in r){let{NuxtAdapter:e}=await import(`./nuxt-CFQ14CHY.mjs`);return new e}if(`@sveltejs/kit`in r){let{SvelteKitAdapter:e}=await import(`./sveltekit-BCKtxAb7.mjs`);return new e}throw new Ys}var Ys=class extends Error{message=`No supported framework found (Next.js, Nuxt, or SvelteKit required)`},Xs=class{async initProject(){let e=await this.getSliceLibraries();for(let t of e)await this.createSliceIndexFile(t);await this.setupProject(),await this.onProjectInitialized()}async getSliceLibraries(){return await Us()||[await this.getDefaultSliceLibrary()]}async getSlices(){let e=[],t=await this.getSliceLibraries();for(let n of t){let t=new URL(`*/model.json`,n),r=Array.from(await $r(o(t),{absolute:!0}),e=>s(e)),i=await Promise.all(r.map(async e=>({library:n,directory:new URL(`.`,e),model:await Ya(e)})));e.push(...i)}return e.sort((e,t)=>e.model.id.toLowerCase().localeCompare(t.model.id.toLowerCase()))}async getSlice(e){let t=(await this.getSlices()).find(t=>t.model.id===e);if(!t)throw Error(`No slice found with ID: ${e}`);return t}async createSlice(e,t){t??=await this.getDefaultSliceLibrary();let n=R(e.name),r=new URL(n,Wa(t));await Ja(new URL(`model.json`,Wa(r)),Xa(e)),await this.createSliceIndexFile(t),await this.onSliceCreated(e,t)}async updateSlice(e){let t=await this.getSlice(e.id);await Ja(new URL(`model.json`,Wa(t.directory)),Xa(e)),await this.onSliceUpdated(e)}async deleteSlice(e){let t=await this.getSlice(e);await i(t.directory,{recursive:!0}),await this.createSliceIndexFile(t.library),await this.onSliceDeleted(e)}async getCustomTypes(){let e=await Bs(),t=new URL(`customtypes/`,e),n=new URL(`*/index.json`,t),r=Array.from(await $r(o(n),{absolute:!0}),e=>s(e));return(await Promise.all(r.map(async e=>({directory:new URL(`.`,e),model:await Ya(e)})))).sort((e,t)=>e.model.id.toLowerCase().localeCompare(t.model.id.toLowerCase()))}async getCustomType(e){let t=(await this.getCustomTypes()).find(t=>t.model.id===e);if(!t)throw Error(`No custom type found with ID: ${e}`);return t}async createCustomType(e){let t=await Bs(),n=new URL(`customtypes/`,t);await Ja(new URL(`${e.id}/index.json`,n),Xa(e)),e.format===`page`&&await ps(e),await this.onCustomTypeCreated(e)}async updateCustomType(e){let t=await this.getCustomType(e.id);await Ja(new URL(`index.json`,Wa(t.directory)),Xa(e)),await ms(e),await this.onCustomTypeUpdated(e)}async deleteCustomType(e){await i((await this.getCustomType(e)).directory,{recursive:!0}),await hs(e),await this.onCustomTypeDeleted(e)}async generateTypes(){let e=await Bs(),t=new URL(`prismicio-types.d.ts`,e),n=await this.getSlices();return await Ja(t,vn({customTypeModels:(await this.getCustomTypes()).map(e=>e.model),sharedSliceModels:n.map(e=>e.model),clientIntegration:{includeContentNamespace:!0,includeCreateClientInterface:!0},cache:!0,typesProvider:`@prismicio/client`})),t}};function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zs(Object(n),!0).forEach(function(t){$s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $s(e,t,n){return t=ec(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ec(e){var t=tc(e,`string`);return typeof t==`symbol`?t:String(t)}function tc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var nc=rc({});function rc(e){return t.withOptions=t=>rc(Qs(Qs({},e),t)),t;function t(t,...n){let r=typeof t==`string`?[t]:t.raw,{alignValues:i=!1,escapeSpecialCharacters:a=Array.isArray(t),trimWhitespace:o=!0}=e,s=``;for(let e=0;e<r.length;e++){let t=r[e];if(a&&(t=t.replace(/\\\n[ \t]*/g,``).replace(/\\`/g,"`").replace(/\\\$/g,`$`).replace(/\\\{/g,`{`)),s+=t,e<n.length){let t=i?ic(n[e],s):n[e];s+=t}}let c=s.split(`
|
|
169
169
|
`),l=null;for(let e of c){let t=e.match(/^(\s+)\S+/);if(t){let e=t[1].length;l=l?Math.min(l,e):e}}if(l!==null){let e=l;s=c.map(t=>t[0]===` `||t[0]===` `?t.slice(e):t).join(`
|
|
170
170
|
`)}return o&&(s=s.trim()),a&&(s=s.replace(/\\n/g,`
|
|
171
171
|
`).replace(/\\t/g,` `).replace(/\\r/g,`\r`).replace(/\\v/g,`\v`).replace(/\\b/g,`\b`).replace(/\\f/g,`\f`).replace(/\\0/g,`\0`).replace(/\\x([\da-fA-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g,(e,t)=>String.fromCodePoint(parseInt(t,16))).replace(/\\u([\da-fA-F]{4})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))),typeof Bun<`u`&&(s=s.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,(e,t,n)=>{let r=t??n??``;return String.fromCodePoint(parseInt(r,16))})),s}}function ic(e,t){if(typeof e!=`string`||!e.includes(`
|
|
172
172
|
`))return e;let n=t.slice(t.lastIndexOf(`
|
|
173
|
-
`)+1).match(/^(\s+)/);if(n){let t=n[1];return e.replace(/\n/g,`\n${t}`)}return e}const ac=nc.withOptions({alignValues:!0});export{
|
|
173
|
+
`)+1).match(/^(\s+)/);if(n){let t=n[1];return e.replace(/\n/g,`\n${t}`)}return e}const ac=nc.withOptions({alignValues:!0});export{N as $,Jo as A,Ta as B,fs as C,os as D,ys as E,qa as F,ja as G,Ma as H,Ja as I,Z as J,Q as K,Wa as L,Yo as M,Zo as N,_s as O,Xa as P,O as Q,Ga as R,us as S,as as T,Ra as U,Na as V,Ca as W,Ti as X,ma as Y,R as Z,Ds as _,qs as a,vs as b,Ws as c,Vs as d,j as et,Ps as f,Ts as g,Es as h,Js as i,Ko as j,cs as k,Bs as l,Ms as m,Xs as n,Gs as o,Fs as p,Fa as q,Ys as r,Ks as s,ac as t,Hs as u,ws as v,gs as w,ss as x,Ss as y,ka as z};
|