tower-studio 0.2.39 → 0.2.41
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +31 -31
- package/.next/standalone/.next/server/app/_not-found/page.js +3 -3
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +3 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +70 -70
- package/.next/standalone/.next/server/app/missions/page.js +6 -6
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +31 -31
- package/.next/standalone/.next/server/app/onboarding/page.js +3 -3
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +31 -31
- package/.next/standalone/.next/server/app/page.js +3 -3
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +48 -48
- package/.next/standalone/.next/server/app/settings/page.js +5 -5
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +106 -106
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +5 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +87 -87
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +74 -74
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +79 -79
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +31 -31
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +71 -71
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +5 -5
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +82 -82
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +49 -49
- package/.next/standalone/.next/server/app/workspaces/page.js +3 -3
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0.721uk._.js +16 -9
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +2 -2
- package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_assets_[projectId]_[filename]_route_actions_08y.jen.js +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0lioghc._.js → [root-of-the-server]__0-~q463._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.z8.oi._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00llstz._.js → [root-of-the-server]__02jy80j._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0dy~osn._.js → [root-of-the-server]__032d9pl._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08u6wg.._.js → [root-of-the-server]__037x-0a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__08xus7y._.js → [root-of-the-server]__04jduyo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04u7b2g._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05nz.tg._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ai09na._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00mjz~7._.js → [root-of-the-server]__0az764e._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__12ohpl.._.js → [root-of-the-server]__0b3m.jm._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_3ce_3._.js → [root-of-the-server]__0c7z.~a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fp8qv9._.js +28 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0d2japj._.js → [root-of-the-server]__0giry~0._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j05vlm._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__01n7exm._.js → [root-of-the-server]__0kexk71._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0qif839._.js → [root-of-the-server]__0kuo6q5._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~foo~5._.js → [root-of-the-server]__0np.553._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0q8.khe._.js → [root-of-the-server]__0r-6wmj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0omyrab._.js → [root-of-the-server]__0u_-4~7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xswbi9._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0tys9pv._.js → [root-of-the-server]__0z20rmt._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +3 -0
- package/.next/standalone/.next/server/chunks/{_0lb0q5p._.js → _06.mxka._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{src_0bkvm8c._.js → src_02ruq-1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_02llcit._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_12xey8u._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0f88ua~._.js → [root-of-the-server]__0.2h0ux._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07_o.al._.js → [root-of-the-server]__0.infp2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__04rp1ck._.js → [root-of-the-server]__0.u-t.1._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0k-mx8r._.js → [root-of-the-server]__02j1enz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0guqcva._.js → [root-of-the-server]__038u_kv._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_1zewr._.js → [root-of-the-server]__0391jsv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0_i7zpd._.js → [root-of-the-server]__03fujv7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-tolks._.js → [root-of-the-server]__058rbx5._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08w4.zf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lozqxc._.js → [root-of-the-server]__094t44p._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02ur64h._.js → [root-of-the-server]__09t~p.u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m7ydqb._.js → [root-of-the-server]__09z_ddd._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0p0te97._.js → [root-of-the-server]__0ce3fpq._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__062b.yt._.js → [root-of-the-server]__0da~mv~._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dn90me._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0qqbb31._.js → [root-of-the-server]__0dux7x.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gtqd5o._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0th-t1a._.js → [root-of-the-server]__0h589~0._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00~jawi._.js → [root-of-the-server]__0l6bt9t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m80~su._.js → [root-of-the-server]__0mmypbn._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mpjat-._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09s~cme._.js → [root-of-the-server]__0mq0f94._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nwisa8._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0scj6ed._.js → [root-of-the-server]__0odeai5._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0siyg1p._.js → [root-of-the-server]__0oq-j16._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0na8eiv._.js → [root-of-the-server]__0pmjob9._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0lz4wdp._.js → [root-of-the-server]__0pvaj~l._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0wofia_._.js → [root-of-the-server]__0rckee~._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0e-k-gl._.js → [root-of-the-server]__0w--i~y._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0k1ivnj._.js → [root-of-the-server]__0zkpwjj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0t6f4lq._.js → [root-of-the-server]__10s67lq._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__093tt4a._.js → [root-of-the-server]__12w35bx._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0e-zyn2._.js → _0-_yznx._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_00t6138._.js → _03lt1_x._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_03v~rg0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0l3l_d6._.js → _04bt0.3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_06nlsbw._.js → _04mn9go._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0cxhub8._.js → _04~zqvy._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0gb8a9_._.js → _0_6ss3p._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0_9i_x2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_z-t6g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0b.qjaj._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0t0oltj._.js → _0dzx554._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0mdqhxi._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_02encue._.js → _0mm~wxj._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_07fnvnm._.js → _0n4bq0m._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0n54odq._.js → _0n5do.z._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ng0eku._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0n1l7yo._.js → _0p6p_68._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0clhm~f._.js → _0py1s-f._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0r-flc_._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rkdyad._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0mzwe90._.js → _0rrzd20._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0k9b94s._.js → _0t863nl._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_00kwrmr._.js → _0tsu0gq._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0_hnt09._.js → _0tvm5af._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0mpce0d._.js → _0u7c6bz._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0hu0tyg._.js → _0u_uywm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0v66l8c._.js → _0z6ji0d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0muaopo._.js → _12ca88g._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_01xtio2._.js → src_lib_02~3_5t._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_03p6skw._.js → src_lib_04d~c.c._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_05mu4f0._.js → src_lib_08wv1le._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_06nbc41._.js → src_lib_0_9avpk._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sms4xl._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_11w~.ge._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +301 -301
- package/.next/standalone/.next/static/chunks/0-x5eie9u3i_2.js +1 -0
- package/.next/standalone/.next/static/chunks/00w9dd4fooyic.js +1 -0
- package/.next/standalone/.next/static/chunks/{112wpv9rqw4dp.js → 02o~o8tgt860j.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0h73q-9fyea0t.js → 03sdutmq6~3v-.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0e9ykduz3_0e1.js → 04zy.uc7eru64.js} +1 -1
- package/.next/standalone/.next/static/chunks/{01ijm9dpmm34q.js → 05zm_-7x0fubq.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0t_3wwd~mmc.1.js → 05~2gwcex7hv0.js} +1 -1
- package/.next/standalone/.next/static/chunks/062.w.nsp3886.js +1 -0
- package/.next/standalone/.next/static/chunks/06lla3jtd~xb4.js +1 -0
- package/.next/standalone/.next/static/chunks/{0dha37i1oc6z~.js → 06s-d8my6b9t7.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0u.3xek3m2ud..js → 0ad0ou7l2.r6e.js} +1 -1
- package/.next/standalone/.next/static/chunks/{11.r6a56ss7qu.js → 0babmd83h6ejs.js} +1 -1
- package/.next/standalone/.next/static/chunks/0c8c6pcmlzgmi.js +1 -0
- package/.next/standalone/.next/static/chunks/0c~~56wny5m2u.js +1 -0
- package/.next/standalone/.next/static/chunks/{0h4k3cicu7g-w.js → 0ev98toavtr6..js} +1 -1
- package/.next/standalone/.next/static/chunks/{0u.b0t7fueh-x.js → 0fz47g1x5o2xj.js} +1 -1
- package/.next/standalone/.next/static/chunks/0i2soupf1735z.js +1 -0
- package/.next/standalone/.next/static/chunks/{050agjgyp545k.js → 0l25d0nc5ygyd.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0_-2es-r~03mg.js → 0lnsj7fwkprxe.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0a._hcvzq4ko7.js → 0oz8sw6j078vm.js} +2 -2
- package/.next/standalone/.next/static/chunks/0tfmi08mzcieh.js +1 -0
- package/.next/standalone/.next/static/chunks/{023v9juzhzc~d.js → 0umi7ddtiv8sw.js} +1 -1
- package/.next/standalone/.next/static/chunks/0w33dj~dfamnr.css +1 -0
- package/.next/standalone/.next/static/chunks/0y3a2-c-i9t~t.js +1 -0
- package/.next/standalone/.next/static/chunks/10qltt-r5q91p.js +1 -0
- package/.next/standalone/.next/static/chunks/{0p5rare_o5zb1.js → 1195ux3t_r-rb.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0w14di5d0vw6-.js → 11sqt~58g35be.js} +1 -1
- package/.next/standalone/.next/static/chunks/12rj7-g8lxjew.js +1 -0
- package/.next/standalone/package.json +1 -1
- package/bin/tower.mjs +10 -1
- package/dist/mcp-server.cjs +266 -145
- package/package.json +1 -1
- package/scripts/migrations/0004-relocate-misplaced-assets.ts +172 -0
- package/.next/standalone/.next/server/chunks/[externals]__0k7u3dx._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.a1443._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00~-bvt._.js +0 -28
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0965p6t._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qijr4h._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rc0ntp._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.~z1-.._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0i0o7w5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgd-1s._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qnzkj3._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qp5cw1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xte.35._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0-qd2ss._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_05jv_cy._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_07c-9da._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0gxccup._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0m.34j8._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0w9~m7o._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_06okbb2._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0741dos._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0cbuy0_._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0e27xy7._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0n5-vk5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0rk2hla._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0t5xz2y._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0u5_gf2._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0v6s6se._.js +0 -3
- package/.next/standalone/.next/static/chunks/0.euy5rie4v3d.js +0 -1
- package/.next/standalone/.next/static/chunks/01.nidb8sf6bh.js +0 -1
- package/.next/standalone/.next/static/chunks/02jsekc779t5~.js +0 -1
- package/.next/standalone/.next/static/chunks/0fy6w5d_zyro0.js +0 -1
- package/.next/standalone/.next/static/chunks/0g-gbdkcssn.g.js +0 -1
- package/.next/standalone/.next/static/chunks/0h7~fn.p-fxz_.js +0 -1
- package/.next/standalone/.next/static/chunks/0j2n.h0~von8h.js +0 -1
- package/.next/standalone/.next/static/chunks/0k.hp06ufx4yp.js +0 -1
- package/.next/standalone/.next/static/chunks/0lk-i0jm2ubea.css +0 -1
- package/.next/standalone/.next/static/chunks/0q~4dhw.phxg3.js +0 -1
- package/.next/standalone/.next/static/chunks/0z2blg_osfipv.js +0 -1
- package/.next/standalone/.next/static/chunks/134c60acdsr_g.js +0 -1
- /package/.next/standalone/.next/static/{JutVIyokVf-YrN6j2WEwG → zSKVtiYaR_yWxx7AopTMR}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{JutVIyokVf-YrN6j2WEwG → zSKVtiYaR_yWxx7AopTMR}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{JutVIyokVf-YrN6j2WEwG → zSKVtiYaR_yWxx7AopTMR}/_ssgManifest.js +0 -0
|
@@ -46,11 +46,16 @@ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resour
|
|
|
46
46
|
`)).catch(e=>{this.pendingControlResponses.delete(t),n(e)})})}initializationResult(){return this.initialization}async supportedCommands(){return(await this.initialization).commands}async supportedModels(){return(await this.initialization).models}async supportedAgents(){return(await this.initialization).agents}async reconnectMcpServer(e){await this.request({subtype:"mcp_reconnect",serverName:e})}async toggleMcpServer(e,t){await this.request({subtype:"mcp_toggle",serverName:e,enabled:t})}async enableChannel(e){await this.request({subtype:"channel_enable",serverName:e})}async mcpAuthenticate(e){return(await this.request({subtype:"mcp_authenticate",serverName:e})).response}async mcpClearAuth(e){return(await this.request({subtype:"mcp_clear_auth",serverName:e})).response}async mcpSubmitOAuthCallbackUrl(e,t){return(await this.request({subtype:"mcp_oauth_callback_url",serverName:e,callbackUrl:t})).response}async claudeAuthenticate(e){return(await this.request({subtype:"claude_authenticate",loginWithClaudeAi:e})).response}async claudeOAuthCallback(e,t){return(await this.request({subtype:"claude_oauth_callback",authorizationCode:e,state:t})).response}async claudeOAuthWaitForCompletion(){return(await this.request({subtype:"claude_oauth_wait_for_completion"})).response}async mcpServerStatus(){return(await this.request({subtype:"mcp_status"})).response.mcpServers}async getContextUsage(){return(await this.request({subtype:"get_context_usage"})).response}async reloadPlugins(){return(await this.request({subtype:"reload_plugins"})).response}async setMcpServers(e){let t={},r={};for(let[n,i]of Object.entries(e))"sdk"===i.type&&"instance"in i?t[n]=i.instance:r[n]=i;let n=new Set(this.sdkMcpServerInstances.keys()),i=new Set(Object.keys(t));for(let e of n)i.has(e)||await this.disconnectSdkMcpServer(e);for(let[e,r]of Object.entries(t))n.has(e)||this.connectSdkMcpServer(e,r);let a={};for(let e of Object.keys(t))a[e]={type:"sdk",name:e};return(await this.request({subtype:"mcp_set_servers",servers:{...r,...a}})).response}async accountInfo(){return(await this.initialization).account}async streamInput(e){aB("[Query.streamInput] Starting to process input stream");try{let t=0;for await(let r of e){if(t++,aB(`[Query.streamInput] Processing message ${t}: ${r.type}`),this.abortController?.signal.aborted)break;await Promise.resolve(this.transport.write(aX(r)+`
|
|
47
47
|
`))}aB(`[Query.streamInput] Finished processing ${t} messages from input stream`),t>0&&this.hasBidirectionalNeeds()&&(aB("[Query.streamInput] Has bidirectional needs, waiting for first result"),await this.waitForFirstResult()),aB("[Query] Calling transport.endInput() to close stdin to CLI process"),this.transport.endInput()}catch(e){if(!(e instanceof tF))throw e}}waitForFirstResult(){return this.firstResultReceived?(aB("[Query.waitForFirstResult] Result already received, returning immediately"),Promise.resolve()):new Promise(e=>{this.abortController?.signal.aborted?e():(this.abortController?.signal.addEventListener("abort",()=>e(),{once:!0}),this.firstResultReceivedResolve=e)})}handleHookCallbacks(e,t,r,n){let i=this.hookCallbacks.get(e);if(!i)throw Error(`No hook callback found for ID: ${e}`);return i(t,r,{signal:n})}connectSdkMcpServer(e,t){let r=new a2(t=>this.sendMcpServerMessageToCli(e,t));this.sdkMcpTransports.set(e,r),this.sdkMcpServerInstances.set(e,t),t.connect(r).catch(n=>{this.sdkMcpTransports.get(e)===r&&this.sdkMcpTransports.delete(e),this.sdkMcpServerInstances.get(e)===t&&this.sdkMcpServerInstances.delete(e),aB(`[Query.connectSdkMcpServer] Failed to connect MCP server '${e}': ${n}`,{level:"error"})})}async disconnectSdkMcpServer(e){let t=this.sdkMcpTransports.get(e);t&&(await t.close(),this.sdkMcpTransports.delete(e)),this.sdkMcpServerInstances.delete(e)}sendMcpServerMessageToCli(e,t){if("id"in t&&null!==t.id&&void 0!==t.id){let r=`${e}:${t.id}`,n=this.pendingMcpResponses.get(r);if(n){n.resolve(t),this.pendingMcpResponses.delete(r);return}}let r={type:"control_request",request_id:(0,u.randomUUID)(),request:{subtype:"mcp_message",server_name:e,message:t}};Promise.resolve(this.transport.write(aX(r)+`
|
|
48
48
|
`)).catch(e=>{aB(`[Query.sendMcpServerMessageToCli] Transport write failed: ${e}`,{level:"error"})})}handleMcpControlRequest(e,t,r){let n="id"in t.message?t.message.id:null,i=`${e}:${n}`;return new Promise((e,n)=>{let a=()=>{this.pendingMcpResponses.delete(i)};if(this.pendingMcpResponses.set(i,{resolve:t=>{a(),e(t)},reject:e=>{a(),n(e)}}),r.onmessage)r.onmessage(t.message);else{a(),n(Error("No message handler registered"));return}})}}class a5{send;sendTimeoutMs;onError;maxPendingEntries;maxPendingBytes;pending=[];pendingEntries=0;pendingBytes=0;flushPromise=null;constructor(e,t=6e4,r,n=500,i=1048576){this.send=e,this.sendTimeoutMs=t,this.onError=r,this.maxPendingEntries=n,this.maxPendingBytes=i}enqueue(e,t){let r=aX(t).length;this.pending.push({filePath:e,entries:t,bytes:r}),this.pendingEntries+=t.length,this.pendingBytes+=r,(this.pendingEntries>this.maxPendingEntries||this.pendingBytes>this.maxPendingBytes)&&(this.flushPromise=this.drain(),this.flushPromise.catch(()=>{}))}async flush(){let e=this.drain();this.flushPromise=e,await e,this.flushPromise===e&&(this.flushPromise=null)}async drain(){let e=this.flushPromise,t=this.pending.splice(0);this.pendingEntries=0,this.pendingBytes=0,e&&await e,0!==t.length&&await this.doFlush(t)}async doFlush(e){let t=new Map;for(let r of e){let e=t.get(r.filePath);e?e.push(...r.entries):t.set(r.filePath,r.entries.slice())}for(let[e,r]of t)try{await tZ(this.send(e,r),this.sendTimeoutMs,`SessionStore.append() timed out after ${this.sendTimeoutMs}ms for ${e}`)}catch(t){aB(`[TranscriptMirrorBatcher] flush failed for ${e}: ${t}`,{level:"error"});try{this.onError?.(e,ah(t))}catch(e){aB(`[TranscriptMirrorBatcher] onError callback threw: ${e}`,{level:"error"})}}}}E(ej(),1);var a3=E(ej(),1),a8=(0,_.promisify)(l.execFile);async function a7(e){try{let{stdout:t}=await a8("git",["worktree","list","--porcelain"],{cwd:e,timeout:5e3});if(!t)return[];return t.split(`
|
|
49
|
-
`).filter(e=>e.startsWith("worktree ")).map(e=>e.slice(9).normalize("NFC"))}catch{return[]}}var se=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function st(e){return"string"!=typeof e?null:se.test(e)?e:null}
|
|
50
|
-
`)||await (0,v.once)(r,"drain");r.end(),await (0,v.once)(r,"finish")}catch(e){throw r.destroy(),e}}function sn(e){let t=e.replace(/[^a-zA-Z0-9]/g,"-");return t.length<=200?t:`${t.slice(0,200)}-${Math.abs(function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}(e)).toString(36)}`}function si(){return(0,m.join)(r_(),"projects")}async function sa(e){try{return(await (0,c.realpath)(e)).normalize("NFC")}catch{return e.normalize("NFC")}}async function ss(e){let t=(0,m.join)(si(),sn(e)),r=[];try{await (0,c.readdir)(t),r.push(t)}catch{}let n=sn(e);if(n.length<=200)return r;let i=n.slice(0,200)+"-",a=si();try{for(let e of(await (0,c.readdir)(a,{withFileTypes:!0}))){if(!e.isDirectory()||!e.name.startsWith(i))continue;let n=(0,m.join)(a,e.name);n!==t&&r.push(n)}}catch{}return r}async function so(e,t){let r=`${e}.jsonl`;async function n(e,t){let n=(0,m.join)(e,r);try{let e=await (0,c.stat)(n);if(e.size>0)return{filePath:n,projectPath:t,fileSize:e.size}}catch{}}if(t){let e,r=await sa(t);for(let e of(await ss(r))){let t=await n(e,r);if(t)return t}try{e=await a7(r)}catch{e=[]}for(let t of e)if(t!==r)for(let e of(await ss(t))){let r=await n(e,t);if(r)return r}return}let i=si(),a;try{a=await (0,c.readdir)(i)}catch{return}for(let e of a){let t=await n((0,m.join)(i,e),void 0);if(t)return t}}function sl(e){try{let t=JSON.parse(e);if("system"!==t.type||"compact_boundary"!==t.subtype)return null;return{hasPreservedSegment:!!t.compactMetadata?.preservedSegment}}catch{return null}}function su(e,t,r,n){let i=n-r;if(!(i<=0)){if(e.len+i>e.buf.length){let t=Buffer.allocUnsafe(Math.min(Math.max(2*e.buf.length,e.len+i),e.cap));e.buf.copy(t,0,0,e.len),e.buf=t}t.copy(e.buf,e.len,r,n),e.len+=i}}function sd(e,t,r,n){return n-r>=t.length&&0===e.compare(t,0,t.length,r,r+t.length)}var sc=Buffer.from('{"type":"attribution-snapshot"'),sp=Buffer.from('{"type":"system"'),sf=Buffer.from([10]);async function sm(e,t){let r=sM??=Buffer.from('"compact_boundary"'),n={out:{buf:Buffer.allocUnsafe(Math.min(t,8388608)),len:0,cap:t+1},boundaryStartOffset:0,hasPreservedSegment:!1,lastSnapSrc:null,lastSnapLen:0,lastSnapBuf:void 0,bufFileOff:0,carryLen:0,carryBuf:void 0,straddleSnapCarryLen:0,straddleSnapTailEnd:0},i=Buffer.allocUnsafe(1048576),a=await (0,c.open)(e,"r");try{let e=0;for(;e<t;){var s,o,l,u,d;let{bytesRead:c}=await a.read(i,0,Math.min(1048576,t-e),e);if(0===c)break;e+=c;let p=function(e,t,r){if(e.straddleSnapCarryLen=0,e.straddleSnapTailEnd=0,0===e.carryLen)return 0;let n=e.carryBuf,i=t.indexOf(10);if(-1===i||i>=r)return 0;let a=i+1;if(sd(n,sc,0,e.carryLen))e.straddleSnapCarryLen=e.carryLen,e.straddleSnapTailEnd=a,e.lastSnapSrc=null;else{if(e.carryLen<sc.length)return 0;if(sd(n,sp,0,e.carryLen)){let r=sl(n.toString("utf-8",0,e.carryLen)+t.toString("utf-8",0,i));r?.hasPreservedSegment?e.hasPreservedSegment=!0:r&&(e.out.len=0,e.boundaryStartOffset=e.bufFileOff,e.hasPreservedSegment=!1,e.lastSnapSrc=null)}su(e.out,n,0,e.carryLen),su(e.out,t,0,a)}return e.bufFileOff+=e.carryLen+a,e.carryLen=0,a}(n,i,c),f;if(n.carryLen>0){let e=n.carryLen+(c-p);f=Buffer.allocUnsafe(e),n.carryBuf.copy(f,0,0,n.carryLen),i.copy(f,n.carryLen,p,c)}else f=i.subarray(p,c);let m=function(e,t,r){let n=t.indexOf(r),i=0,a=0,s=-1,o=-1,l=t.indexOf(10);for(;-1!==l;){let u=l+1;if(-1!==n&&n<a&&(n=t.indexOf(r,a)),sd(t,sc,a,u))su(e.out,t,i,a),s=a,o=u,i=u;else if(n>=a&&n<Math.min(a+256,u)){let o=sl(t.toString("utf-8",a,l));o?.hasPreservedSegment?e.hasPreservedSegment=!0:o&&(e.out.len=0,e.boundaryStartOffset=e.bufFileOff+a,e.hasPreservedSegment=!1,e.lastSnapSrc=null,s=-1,e.straddleSnapCarryLen=0,i=a),n=t.indexOf(r,n+r.length)}a=u,l=t.indexOf(10,a)}return su(e.out,t,i,a),{lastSnapStart:s,lastSnapEnd:o,trailStart:a}}(n,f,r);s=f,o=m.lastSnapStart,l=m.lastSnapEnd,-1!==o?(n.lastSnapLen=l-o,(void 0===n.lastSnapBuf||n.lastSnapLen>n.lastSnapBuf.length)&&(n.lastSnapBuf=Buffer.allocUnsafe(n.lastSnapLen)),s.copy(n.lastSnapBuf,0,o,l),n.lastSnapSrc=n.lastSnapBuf):n.straddleSnapCarryLen>0&&(n.lastSnapLen=n.straddleSnapCarryLen+n.straddleSnapTailEnd,(void 0===n.lastSnapBuf||n.lastSnapLen>n.lastSnapBuf.length)&&(n.lastSnapBuf=Buffer.allocUnsafe(n.lastSnapLen)),n.carryBuf.copy(n.lastSnapBuf,0,0,n.straddleSnapCarryLen),i.copy(n.lastSnapBuf,n.straddleSnapCarryLen,0,n.straddleSnapTailEnd),n.lastSnapSrc=n.lastSnapBuf),u=f,d=m.trailStart,n.carryLen=u.length-d,n.carryLen>0&&((void 0===n.carryBuf||n.carryLen>n.carryBuf.length)&&(n.carryBuf=Buffer.allocUnsafe(n.carryLen)),u.copy(n.carryBuf,0,d,u.length)),n.bufFileOff+=m.trailStart}if(n.carryLen>0){let e=n.carryBuf;sd(e,sc,0,n.carryLen)?(n.lastSnapSrc=e,n.lastSnapLen=n.carryLen):su(n.out,e,0,n.carryLen)}n.lastSnapSrc&&(n.out.len>0&&10!==n.out.buf[n.out.len-1]&&su(n.out,sf,0,1),su(n.out,n.lastSnapSrc,0,n.lastSnapLen))}finally{await a.close()}return{boundaryStartOffset:n.boundaryStartOffset,postBoundaryBuf:n.out.buf.subarray(0,n.out.len),hasPreservedSegment:n.hasPreservedSegment}}async function sh(e,t){try{if(t>5242880&&!tV(process.env.CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP))return(await sm(e,t)).postBoundaryBuf;return await (0,c.readFile)(e)}catch{return null}}function sg(e){if("assistant"!==e.type)return;let t=e.message;if("object"!=typeof t||null===t)return;let r=t.id;return"string"==typeof r?r:void 0}function sv(e){return{type:e.type,uuid:e.uuid,session_id:e.sessionId,message:e.message,parent_tool_use_id:null,timestamp:e.timestamp}}function sy(e,t){var r;let n,i=function(e){let t=new Map;for(let r of e)t.set(r.uuid,r);for(let e of t.values()){if("system"!==e.type||"compact_boundary"!==e.subtype)continue;let r=e.compactMetadata?.preservedSegment;if(!r)continue;let n=t.get(r.headUuid);for(let[e,i]of(n&&t.set(r.headUuid,{...n,parentUuid:r.anchorUuid}),t))i.parentUuid===r.anchorUuid&&e!==r.headUuid&&t.set(e,{...i,parentUuid:r.tailUuid})}let r=new Map;for(let t=0;t<e.length;t++)r.set(e[t].uuid,t);let n=new Set;for(let e of t.values())e.parentUuid&&n.add(e.parentUuid);let i=[...t.values()].filter(e=>!n.has(e.uuid)),a=[];for(let e of i){let r=e,n=new Set;for(;r&&!n.has(r.uuid);){if(n.add(r.uuid),"user"===r.type||"assistant"===r.type){a.push(r);break}r=r.parentUuid?t.get(r.parentUuid):void 0}}if(0===a.length)return[];let s=a.filter(e=>!e.isSidechain&&!e.teamName&&!e.isMeta),o=(s.length>0?s:a).reduce((e,t)=>(r.get(t.uuid)??-1)>(r.get(e.uuid)??-1)?t:e),l=[],u=new Set,d=t.get(o.uuid);for(;d&&!u.has(d.uuid);)u.add(d.uuid),l.push(d),d=d.parentUuid?t.get(d.parentUuid):void 0;return l.reverse(),function(e,t,r){let n=t.filter(e=>"assistant"===e.type);if(0===n.length)return t;let i=new Map;for(let e of n){let t=sg(e);t&&i.set(t,e)}let a=new Map,s=new Map;for(let t of e.values()){let e=sg(t);if(e){let r=a.get(e);r?r.push(t):a.set(e,[t])}else if(function(e){if("user"!==e.type||!e.parentUuid)return!1;let t=e.message;if("object"!=typeof t||null===t)return!1;let r=t.content;return!!Array.isArray(r)&&r.some(e=>"object"==typeof e&&null!==e&&"tool_result"===e.type)}(t)){let e=t.parentUuid,r=s.get(e);r?r.push(t):s.set(e,[t])}}let o=new Set,l=new Map,u=0;for(let e of n){let t=sg(e);if(!t||o.has(t))continue;o.add(t);let n=a.get(t)??[e],d=n.filter(e=>!r.has(e.uuid)),c=[];for(let e of n){let t=s.get(e.uuid);if(t)for(let e of t)r.has(e.uuid)||c.push(e)}if(0===d.length&&0===c.length)continue;let p=(e,t)=>(e.timestamp??"").localeCompare(t.timestamp??"");d.sort(p),c.sort(p);let f=i.get(t),m=[...d,...c];for(let e of m)r.add(e.uuid);u+=m.length,l.set(f.uuid,m)}if(0===u)return t;let d=[];for(let e of t){d.push(e);let t=l.get(e.uuid);t&&d.push(...t)}return d}(t,l,u)}(e),a=t?.includeSystemMessages??!1;return r=i.filter(e=>(function(e,t){if("user"===e.type||"assistant"===e.type);else if("system"!==e.type||!t)return!1;return!e.isMeta&&!e.isSidechain&&!e.teamName})(e,a)).map(sv),n=t?.offset??0,t?.limit!==void 0&&t.limit>0?r.slice(n,n+t.limit):n>0?r.slice(n):r}async function s_(e,t){if(!st(e))return[];let r=await so(e,t?.dir);if(!r)return[];let n=await sh(r.filePath,r.fileSize);return n?sy(function(e){let t=[],r=e.length,n=0;for(;n<r;){let i=e.indexOf(10,n);-1===i&&(i=r);let a=n;for(;a<i&&e[a]<=32;)a++;if(n=i+1,a>=i)continue;let s=e.toString("utf-8",a,i);try{let e=aY(s),r=e.type;("user"===r||"assistant"===r||"progress"===r||"system"===r||"attachment"===r)&&"string"==typeof e.uuid&&t.push(e)}catch{}}return t}(n),t):[]}var sb="user:profile";[...new Set(["org:create_api_key",sb,sb,"user:inference","user:sessions:claude_code","user:mcp_servers","user:file_upload"])];var s$={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.com/cai/oauth/authorize",CLAUDE_AI_ORIGIN:"https://claude.ai",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"},sw=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];(sL=sF||(sF={})).assertEqual=e=>{},sL.assertIs=function(e){},sL.assertNever=function(e){throw Error()},sL.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},sL.getValidEnumValues=e=>{let t=sL.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return sL.objectValues(r)},sL.objectValues=e=>sL.objectKeys(e).map(function(t){return e[t]}),sL.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},sL.find=(e,t)=>{for(let r of e)if(t(r))return r},sL.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,sL.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},sL.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(sq||(sq={})).mergeShapes=(e,t)=>({...e,...t});var sk=sF.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sx=e=>{switch(typeof e){case"undefined":return sk.undefined;case"string":return sk.string;case"number":return Number.isNaN(e)?sk.nan:sk.number;case"boolean":return sk.boolean;case"function":return sk.function;case"bigint":return sk.bigint;case"symbol":return sk.symbol;case"object":if(Array.isArray(e))return sk.array;if(null===e)return sk.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return sk.promise;if("u">typeof Map&&e instanceof Map)return sk.map;if("u">typeof Set&&e instanceof Set)return sk.set;if("u">typeof Date&&e instanceof Date)return sk.date;return sk.object;default:return sk.unknown}},sS=sF.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sI extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n!==i.path.length-1?e[r]=e[r]||{_errors:[]}:(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))),e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof sI))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,sF.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}sI.create=e=>new sI(e);var sP=(e,t)=>{let r;switch(e.code){case sS.invalid_type:r=e.received===sk.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case sS.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,sF.jsonStringifyReplacer)}`;break;case sS.unrecognized_keys:r=`Unrecognized key(s) in object: ${sF.joinValues(e.keys,", ")}`;break;case sS.invalid_union:r="Invalid input";break;case sS.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${sF.joinValues(e.options)}`;break;case sS.invalid_enum_value:r=`Invalid enum value. Expected ${sF.joinValues(e.options)}, received '${e.received}'`;break;case sS.invalid_arguments:r="Invalid function arguments";break;case sS.invalid_return_type:r="Invalid function return type";break;case sS.invalid_date:r="Invalid date";break;case sS.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:sF.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case sS.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case sS.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case sS.custom:r="Invalid input";break;case sS.invalid_intersection_types:r="Intersection results could not be merged";break;case sS.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case sS.not_finite:r="Number must be finite";break;default:r=t.defaultError,sF.assertNever(e)}return{message:r}},sO=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function sE(e,t){let r=sO({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,sP,void 0].filter(e=>!!e)});e.common.issues.push(r)}class sj{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return sN;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return sj.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return sN;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&("u">typeof i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}var sN=Object.freeze({status:"aborted"}),sT=e=>({status:"dirty",value:e}),sC=e=>({status:"valid",value:e}),sz=e=>"u">typeof Promise&&e instanceof Promise;(sZ=sV||(sV={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},sZ.toString=e=>"string"==typeof e?e:e?.message;class sA{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}var sR=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new sI(e.common.issues);return this._error=t,this._error}}};function sU(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:typeof i.data>"u"?{message:a??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??r??i.defaultError}},description:i}}class sD{get description(){return this._def.description}_getType(e){return sx(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:sx(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new sj,ctx:{common:e.parent.common,data:e.data,parsedType:sx(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(sz(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sx(e)},n=this._parseSync({data:e,path:r.path,parent:r});return sR(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sx(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sx(e)},n=this._parse({data:e,path:r.path,parent:r});return sR(r,await (sz(n)?n:Promise.resolve(n)))}refine(e,t){return this._refinement((r,n)=>{let i=e(r),a=()=>n.addIssue({code:sS.custom,..."string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(r):t});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new oO({schema:this,typeName:r.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return oE.create(this,this._def)}nullable(){return oj.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oc.create(this)}promise(){return oP.create(this,this._def)}or(e){return of.create([this,e],this._def)}and(e){return og.create(this,e,this._def)}transform(e){return new oO({...sU(this._def),schema:this,typeName:r.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new oN({...sU(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:r.ZodDefault})}brand(){return new oz({typeName:r.ZodBranded,type:this,...sU(this._def)})}catch(e){return new oT({...sU(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:r.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return oA.create(this,e)}readonly(){return oR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var sM,sL,sZ,sF,sq,sV,sB,sW=/^c[^\s-]{8,}$/i,sK=/^[0-9a-z]+$/,sG=/^[0-9A-HJKMNP-TV-Z]{26}$/i,sJ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,sH=/^[a-z0-9_-]{21}$/i,sX=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,sY=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,sQ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,s0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,s1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,s4=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,s6=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,s2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,s9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,s5="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",s3=RegExp(`^${s5}$`);function s8(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class s7 extends sD{_parse(e){var t,r,n,i;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==sk.string){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.string,received:t.parsedType}),sN}let a=new sj,s;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(sE(s=this._getOrReturnCtx(e,s),{code:sS.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if("max"===o.kind)e.data.length>o.value&&(sE(s=this._getOrReturnCtx(e,s),{code:sS.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if("length"===o.kind){let t=e.data.length>o.value,r=e.data.length<o.value;(t||r)&&((s=this._getOrReturnCtx(e,s),t)?sE(s,{code:sS.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):r&&sE(s,{code:sS.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if("email"===o.kind)sQ.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"email",code:sS.invalid_string,message:o.message}),a.dirty());else if("emoji"===o.kind)sB||(sB=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),sB.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:sS.invalid_string,message:o.message}),a.dirty());else if("uuid"===o.kind)sJ.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:sS.invalid_string,message:o.message}),a.dirty());else if("nanoid"===o.kind)sH.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:sS.invalid_string,message:o.message}),a.dirty());else if("cuid"===o.kind)sW.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:sS.invalid_string,message:o.message}),a.dirty());else if("cuid2"===o.kind)sK.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:sS.invalid_string,message:o.message}),a.dirty());else if("ulid"===o.kind)sG.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:sS.invalid_string,message:o.message}),a.dirty());else if("url"===o.kind)try{new URL(e.data)}catch{sE(s=this._getOrReturnCtx(e,s),{validation:"url",code:sS.invalid_string,message:o.message}),a.dirty()}else"regex"===o.kind?(o.regex.lastIndex=0,o.regex.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"regex",code:sS.invalid_string,message:o.message}),a.dirty())):"trim"===o.kind?e.data=e.data.trim():"includes"===o.kind?e.data.includes(o.value,o.position)||(sE(s=this._getOrReturnCtx(e,s),{code:sS.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):"toLowerCase"===o.kind?e.data=e.data.toLowerCase():"toUpperCase"===o.kind?e.data=e.data.toUpperCase():"startsWith"===o.kind?e.data.startsWith(o.value)||(sE(s=this._getOrReturnCtx(e,s),{code:sS.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):"endsWith"===o.kind?e.data.endsWith(o.value)||(sE(s=this._getOrReturnCtx(e,s),{code:sS.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):"datetime"===o.kind?(function(e){let t=`${s5}T${s8(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(o).test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{code:sS.invalid_string,validation:"datetime",message:o.message}),a.dirty()):"date"===o.kind?s3.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{code:sS.invalid_string,validation:"date",message:o.message}),a.dirty()):"time"===o.kind?RegExp(`^${s8(o)}$`).test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{code:sS.invalid_string,validation:"time",message:o.message}),a.dirty()):"duration"===o.kind?sY.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"duration",code:sS.invalid_string,message:o.message}),a.dirty()):"ip"===o.kind?(t=e.data,("v4"===(r=o.version)||!r)&&s0.test(t)||("v6"===r||!r)&&s4.test(t)||(sE(s=this._getOrReturnCtx(e,s),{validation:"ip",code:sS.invalid_string,message:o.message}),a.dirty())):"jwt"===o.kind?!function(e,t){if(!sX.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,o.alg)&&(sE(s=this._getOrReturnCtx(e,s),{validation:"jwt",code:sS.invalid_string,message:o.message}),a.dirty()):"cidr"===o.kind?(n=e.data,("v4"===(i=o.version)||!i)&&s1.test(n)||("v6"===i||!i)&&s6.test(n)||(sE(s=this._getOrReturnCtx(e,s),{validation:"cidr",code:sS.invalid_string,message:o.message}),a.dirty())):"base64"===o.kind?s2.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"base64",code:sS.invalid_string,message:o.message}),a.dirty()):"base64url"===o.kind?s9.test(e.data)||(sE(s=this._getOrReturnCtx(e,s),{validation:"base64url",code:sS.invalid_string,message:o.message}),a.dirty()):sF.assertNever(o);return{status:a.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:sS.invalid_string,...sV.errToObj(r)})}_addCheck(e){return new s7({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...sV.errToObj(e)})}url(e){return this._addCheck({kind:"url",...sV.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...sV.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...sV.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...sV.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...sV.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...sV.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...sV.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...sV.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...sV.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...sV.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...sV.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...sV.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...sV.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...sV.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...sV.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...sV.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...sV.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...sV.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...sV.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...sV.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...sV.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...sV.errToObj(t)})}nonempty(e){return this.min(1,sV.errToObj(e))}trim(){return new s7({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new s7({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new s7({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}s7.create=e=>new s7({checks:[],typeName:r.ZodString,coerce:e?.coerce??!1,...sU(e)});class oe extends sD{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==sk.number){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.number,received:t.parsedType}),sN}let t,r=new sj;for(let n of this._def.checks)"int"===n.kind?sF.isInteger(e.data)||(sE(t=this._getOrReturnCtx(e,t),{code:sS.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(sE(t=this._getOrReturnCtx(e,t),{code:sS.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(sE(t=this._getOrReturnCtx(e,t),{code:sS.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,n.value)&&(sE(t=this._getOrReturnCtx(e,t),{code:sS.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(sE(t=this._getOrReturnCtx(e,t),{code:sS.not_finite,message:n.message}),r.dirty()):sF.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,sV.toString(t))}gt(e,t){return this.setLimit("min",e,!1,sV.toString(t))}lte(e,t){return this.setLimit("max",e,!0,sV.toString(t))}lt(e,t){return this.setLimit("max",e,!1,sV.toString(t))}setLimit(e,t,r,n){return new oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:sV.toString(n)}]})}_addCheck(e){return new oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:sV.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:sV.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:sV.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:sV.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:sV.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:sV.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:sV.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:sV.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:sV.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&sF.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}oe.create=e=>new oe({checks:[],typeName:r.ZodNumber,coerce:e?.coerce||!1,...sU(e)});class ot extends sD{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==sk.bigint)return this._getInvalidInput(e);let t,r=new sj;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(sE(t=this._getOrReturnCtx(e,t),{code:sS.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(sE(t=this._getOrReturnCtx(e,t),{code:sS.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(sE(t=this._getOrReturnCtx(e,t),{code:sS.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):sF.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.bigint,received:t.parsedType}),sN}gte(e,t){return this.setLimit("min",e,!0,sV.toString(t))}gt(e,t){return this.setLimit("min",e,!1,sV.toString(t))}lte(e,t){return this.setLimit("max",e,!0,sV.toString(t))}lt(e,t){return this.setLimit("max",e,!1,sV.toString(t))}setLimit(e,t,r,n){return new ot({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:sV.toString(n)}]})}_addCheck(e){return new ot({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:sV.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:sV.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:sV.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:sV.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:sV.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ot.create=e=>new ot({checks:[],typeName:r.ZodBigInt,coerce:e?.coerce??!1,...sU(e)});class or extends sD{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==sk.boolean){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.boolean,received:t.parsedType}),sN}return sC(e.data)}}or.create=e=>new or({typeName:r.ZodBoolean,coerce:e?.coerce||!1,...sU(e)});class on extends sD{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==sk.date){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.date,received:t.parsedType}),sN}if(Number.isNaN(e.data.getTime()))return sE(this._getOrReturnCtx(e),{code:sS.invalid_date}),sN;let t=new sj,r;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(sE(r=this._getOrReturnCtx(e,r),{code:sS.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(sE(r=this._getOrReturnCtx(e,r),{code:sS.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):sF.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new on({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:sV.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:sV.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}on.create=e=>new on({checks:[],coerce:e?.coerce||!1,typeName:r.ZodDate,...sU(e)});class oi extends sD{_parse(e){if(this._getType(e)!==sk.symbol){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.symbol,received:t.parsedType}),sN}return sC(e.data)}}oi.create=e=>new oi({typeName:r.ZodSymbol,...sU(e)});class oa extends sD{_parse(e){if(this._getType(e)!==sk.undefined){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.undefined,received:t.parsedType}),sN}return sC(e.data)}}oa.create=e=>new oa({typeName:r.ZodUndefined,...sU(e)});class os extends sD{_parse(e){if(this._getType(e)!==sk.null){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.null,received:t.parsedType}),sN}return sC(e.data)}}os.create=e=>new os({typeName:r.ZodNull,...sU(e)});class oo extends sD{constructor(){super(...arguments),this._any=!0}_parse(e){return sC(e.data)}}oo.create=e=>new oo({typeName:r.ZodAny,...sU(e)});class ol extends sD{constructor(){super(...arguments),this._unknown=!0}_parse(e){return sC(e.data)}}ol.create=e=>new ol({typeName:r.ZodUnknown,...sU(e)});class ou extends sD{_parse(e){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.never,received:t.parsedType}),sN}}ou.create=e=>new ou({typeName:r.ZodNever,...sU(e)});class od extends sD{_parse(e){if(this._getType(e)!==sk.undefined){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.void,received:t.parsedType}),sN}return sC(e.data)}}od.create=e=>new od({typeName:r.ZodVoid,...sU(e)});class oc extends sD{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==sk.array)return sE(t,{code:sS.invalid_type,expected:sk.array,received:t.parsedType}),sN;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(sE(t,{code:e?sS.too_big:sS.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(sE(t,{code:sS.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(sE(t,{code:sS.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new sA(t,e,t.path,r)))).then(e=>sj.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new sA(t,e,t.path,r)));return sj.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new oc({...this._def,minLength:{value:e,message:sV.toString(t)}})}max(e,t){return new oc({...this._def,maxLength:{value:e,message:sV.toString(t)}})}length(e,t){return new oc({...this._def,exactLength:{value:e,message:sV.toString(t)}})}nonempty(e){return this.min(1,e)}}oc.create=(e,t)=>new oc({type:e,minLength:null,maxLength:null,exactLength:null,typeName:r.ZodArray,...sU(t)});class op extends sD{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=sF.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==sk.object){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.object,received:t.parsedType}),sN}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ou&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new sA(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ou){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(sE(r,{code:sS.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new sA(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>sj.mergeObjectSync(t,e)):sj.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return sV.errToObj,new op({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:sV.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new op({...this._def,unknownKeys:"strip"})}passthrough(){return new op({...this._def,unknownKeys:"passthrough"})}extend(e){return new op({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new op({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:r.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new op({...this._def,catchall:e})}pick(e){let t={};for(let r of sF.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new op({...this._def,shape:()=>t})}omit(e){let t={};for(let r of sF.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new op({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof op){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=oE.create(e(i))}return new op({...t._def,shape:()=>r})}if(t instanceof oc)return new oc({...t._def,type:e(t.element)});if(t instanceof oE)return oE.create(e(t.unwrap()));if(t instanceof oj)return oj.create(e(t.unwrap()));if(t instanceof ov)return ov.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of sF.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new op({...this._def,shape:()=>t})}required(e){let t={};for(let r of sF.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof oE;)e=e._def.innerType;t[r]=e}return new op({...this._def,shape:()=>t})}keyof(){return ox(sF.objectKeys(this.shape))}}op.create=(e,t)=>new op({shape:()=>e,unknownKeys:"strip",catchall:ou.create(),typeName:r.ZodObject,...sU(t)}),op.strictCreate=(e,t)=>new op({shape:()=>e,unknownKeys:"strict",catchall:ou.create(),typeName:r.ZodObject,...sU(t)}),op.lazycreate=(e,t)=>new op({shape:e,unknownKeys:"strip",catchall:ou.create(),typeName:r.ZodObject,...sU(t)});class of extends sD{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new sI(e.ctx.common.issues));return sE(t,{code:sS.invalid_union,unionErrors:r}),sN});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new sI(e));return sE(t,{code:sS.invalid_union,unionErrors:i}),sN}}get options(){return this._def.options}}of.create=(e,t)=>new of({options:e,typeName:r.ZodUnion,...sU(t)});var om=e=>{if(e instanceof ow)return om(e.schema);if(e instanceof oO)return om(e.innerType());if(e instanceof ok)return[e.value];if(e instanceof oS)return e.options;if(e instanceof oI)return sF.objectValues(e.enum);else if(e instanceof oN)return om(e._def.innerType);else if(e instanceof oa)return[void 0];else if(e instanceof os)return[null];else if(e instanceof oE)return[void 0,...om(e.unwrap())];else if(e instanceof oj)return[null,...om(e.unwrap())];else if(e instanceof oz)return om(e.unwrap());else if(e instanceof oR)return om(e.unwrap());else if(e instanceof oT)return om(e._def.innerType);else return[]};class oh extends sD{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==sk.object)return sE(t,{code:sS.invalid_type,expected:sk.object,received:t.parsedType}),sN;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(sE(t,{code:sS.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),sN)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let i=new Map;for(let r of t){let t=om(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let n of t){if(i.has(n))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new oh({typeName:r.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...sU(n)})}}class og extends sD{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if("aborted"===e.status||"aborted"===n.status)return sN;let i=function e(t,r){let n=sx(t),i=sx(r);if(t===r)return{valid:!0,data:t};if(n===sk.object&&i===sk.object){let n=sF.objectKeys(r),i=sF.objectKeys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===sk.array&&i===sk.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}if(n===sk.date&&i===sk.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return i.valid?(("dirty"===e.status||"dirty"===n.status)&&t.dirty(),{status:t.value,value:i.data}):(sE(r,{code:sS.invalid_intersection_types}),sN)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}og.create=(e,t,n)=>new og({left:e,right:t,typeName:r.ZodIntersection,...sU(n)});class ov extends sD{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sk.array)return sE(r,{code:sS.invalid_type,expected:sk.array,received:r.parsedType}),sN;if(r.data.length<this._def.items.length)return sE(r,{code:sS.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),sN;!this._def.rest&&r.data.length>this._def.items.length&&(sE(r,{code:sS.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new sA(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>sj.mergeArray(t,e)):sj.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ov({...this._def,rest:e})}}ov.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ov({items:e,typeName:r.ZodTuple,rest:null,...sU(t)})};class oy extends sD{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sk.object)return sE(r,{code:sS.invalid_type,expected:sk.object,received:r.parsedType}),sN;let n=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new sA(r,e,r.path,e)),value:a._parse(new sA(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?sj.mergeObjectAsync(t,n):sj.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,n){return new oy(t instanceof sD?{keyType:e,valueType:t,typeName:r.ZodRecord,...sU(n)}:{keyType:s7.create(),valueType:e,typeName:r.ZodRecord,...sU(t)})}}class o_ extends sD{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sk.map)return sE(r,{code:sS.invalid_type,expected:sk.map,received:r.parsedType}),sN;let n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:n._parse(new sA(r,e,r.path,[a,"key"])),value:i._parse(new sA(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return sN;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let{key:n,value:i}=r;if("aborted"===n.status||"aborted"===i.status)return sN;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}o_.create=(e,t,n)=>new o_({valueType:t,keyType:e,typeName:r.ZodMap,...sU(n)});class ob extends sD{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sk.set)return sE(r,{code:sS.invalid_type,expected:sk.set,received:r.parsedType}),sN;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(sE(r,{code:sS.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(sE(r,{code:sS.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let n of e){if("aborted"===n.status)return sN;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>i._parse(new sA(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new ob({...this._def,minSize:{value:e,message:sV.toString(t)}})}max(e,t){return new ob({...this._def,maxSize:{value:e,message:sV.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ob.create=(e,t)=>new ob({valueType:e,minSize:null,maxSize:null,typeName:r.ZodSet,...sU(t)});class o$ extends sD{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==sk.function)return sE(t,{code:sS.invalid_type,expected:sk.function,received:t.parsedType}),sN;function r(e,r){return sO({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,sP,sP].filter(e=>!!e),issueData:{code:sS.invalid_arguments,argumentsError:r}})}function n(e,r){return sO({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,sP,sP].filter(e=>!!e),issueData:{code:sS.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof oP){let e=this;return sC(async function(...t){let s=new sI([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw s.addIssue(n(l,e)),s})})}{let e=this;return sC(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new sI([r(t,s.error)]);let o=Reflect.apply(a,this,s.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new sI([n(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new o$({...this._def,args:ov.create(e).rest(ol.create())})}returns(e){return new o$({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new o$({args:e||ov.create([]).rest(ol.create()),returns:t||ol.create(),typeName:r.ZodFunction,...sU(n)})}}class ow extends sD{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ow.create=(e,t)=>new ow({getter:e,typeName:r.ZodLazy,...sU(t)});class ok extends sD{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return sE(t,{received:t.data,code:sS.invalid_literal,expected:this._def.value}),sN}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ox(e,t){return new oS({values:e,typeName:r.ZodEnum,...sU(t)})}ok.create=(e,t)=>new ok({value:e,typeName:r.ZodLiteral,...sU(t)});class oS extends sD{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return sE(t,{expected:sF.joinValues(r),received:t.parsedType,code:sS.invalid_type}),sN}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return sE(t,{received:t.data,code:sS.invalid_enum_value,options:r}),sN}return sC(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return oS.create(e,{...this._def,...t})}exclude(e,t=this._def){return oS.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}oS.create=ox;class oI extends sD{_parse(e){let t=sF.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==sk.string&&r.parsedType!==sk.number){let e=sF.objectValues(t);return sE(r,{expected:sF.joinValues(e),received:r.parsedType,code:sS.invalid_type}),sN}if(this._cache||(this._cache=new Set(sF.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=sF.objectValues(t);return sE(r,{received:r.data,code:sS.invalid_enum_value,options:e}),sN}return sC(e.data)}get enum(){return this._def.values}}oI.create=(e,t)=>new oI({values:e,typeName:r.ZodNativeEnum,...sU(t)});class oP extends sD{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==sk.promise&&!1===t.common.async?(sE(t,{code:sS.invalid_type,expected:sk.promise,received:t.parsedType}),sN):sC((t.parsedType===sk.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}oP.create=(e,t)=>new oP({type:e,typeName:r.ZodPromise,...sU(t)});class oO extends sD{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===r.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{(sE(r,e),e.fatal)?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return sN;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?sN:"dirty"===n.status||"dirty"===t.value?sT(n.value):n});{if("aborted"===t.value)return sN;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?sN:"dirty"===n.status||"dirty"===t.value?sT(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?sN:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?sN:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?sN:Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return sN;let a=n.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}sF.assertNever(n)}}oO.create=(e,t,n)=>new oO({schema:e,typeName:r.ZodEffects,effect:t,...sU(n)}),oO.createWithPreprocess=(e,t,n)=>new oO({schema:t,effect:{type:"preprocess",transform:e},typeName:r.ZodEffects,...sU(n)});class oE extends sD{_parse(e){return this._getType(e)===sk.undefined?sC(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}oE.create=(e,t)=>new oE({innerType:e,typeName:r.ZodOptional,...sU(t)});class oj extends sD{_parse(e){return this._getType(e)===sk.null?sC(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}oj.create=(e,t)=>new oj({innerType:e,typeName:r.ZodNullable,...sU(t)});class oN extends sD{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===sk.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}oN.create=(e,t)=>new oN({innerType:e,typeName:r.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...sU(t)});class oT extends sD{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return sz(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new sI(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new sI(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}oT.create=(e,t)=>new oT({innerType:e,typeName:r.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...sU(t)});class oC extends sD{_parse(e){if(this._getType(e)!==sk.nan){let t=this._getOrReturnCtx(e);return sE(t,{code:sS.invalid_type,expected:sk.nan,received:t.parsedType}),sN}return{status:"valid",value:e.data}}}oC.create=e=>new oC({typeName:r.ZodNaN,...sU(e)}),Symbol("zod_brand");class oz extends sD{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class oA extends sD{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?sN:"dirty"===e.status?(t.dirty(),sT(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?sN:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new oA({in:e,out:t,typeName:r.ZodPipeline})}}class oR extends sD{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return sz(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}oR.create=(e,t)=>new oR({innerType:e,typeName:r.ZodReadonly,...sU(t)}),op.lazycreate,(n=r||(r={})).ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly",s7.create,oe.create,oC.create,ot.create,or.create,on.create,oi.create,oa.create,os.create,oo.create,ol.create,ou.create,od.create,oc.create,op.create,op.strictCreate,of.create,oh.create,og.create,ov.create,oy.create,o_.create,ob.create,o$.create,ow.create,ok.create,oS.create,oI.create,oP.create,oO.create,oE.create,oj.create,oO.createWithPreprocess,oA.create;var oU={};C(oU,{version:()=>uX,util:()=>oV,treeifyError:()=>lA,toJSONSchema:()=>fD,toDotPath:()=>lR,safeParseAsync:()=>lB,safeParse:()=>lq,registry:()=>cQ,regexes:()=>lW,prettifyError:()=>lU,parseAsync:()=>lZ,parse:()=>lM,locales:()=>cl,isValidJWT:()=>dg,isValidBase64URL:()=>df,isValidBase64:()=>dc,globalRegistry:()=>c0,globalConfig:()=>oF,function:()=>fR,formatError:()=>lz,flattenError:()=>lC,config:()=>oq,clone:()=>ll,_xid:()=>pa,_void:()=>pM,_uuidv7:()=>c8,_uuidv6:()=>c3,_uuidv4:()=>c5,_uuid:()=>c9,_url:()=>c7,_uppercase:()=>p5,_unknown:()=>pU,_union:()=>fl,_undefined:()=>pz,_ulid:()=>pi,_uint64:()=>pT,_uint32:()=>pI,_tuple:()=>fc,_trim:()=>fi,_transform:()=>f_,_toUpperCase:()=>fs,_toLowerCase:()=>fa,_templateLiteral:()=>fO,_symbol:()=>pC,_success:()=>fx,_stringbool:()=>fC,_stringFormat:()=>fz,_string:()=>c1,_startsWith:()=>p8,_size:()=>p0,_set:()=>fm,_safeParseAsync:()=>lV,_safeParse:()=>lF,_regex:()=>p2,_refine:()=>fT,_record:()=>fp,_readonly:()=>fP,_property:()=>fe,_promise:()=>fj,_positive:()=>pK,_pipe:()=>fI,_parseAsync:()=>lL,_parse:()=>lD,_overwrite:()=>fr,_optional:()=>fb,_number:()=>pb,_nullable:()=>f$,_null:()=>pA,_normalize:()=>fn,_nonpositive:()=>pJ,_nonoptional:()=>fk,_nonnegative:()=>pH,_never:()=>pD,_negative:()=>pG,_nativeEnum:()=>fg,_nanoid:()=>pt,_nan:()=>pF,_multipleOf:()=>pX,_minSize:()=>pQ,_minLength:()=>p4,_min:()=>pW,_mime:()=>ft,_maxSize:()=>pY,_maxLength:()=>p1,_max:()=>pV,_map:()=>ff,_lte:()=>pV,_lt:()=>pq,_lowercase:()=>p9,_literal:()=>fv,_length:()=>p6,_lazy:()=>fE,_ksuid:()=>ps,_jwt:()=>pm,_isoTime:()=>py,_isoDuration:()=>p_,_isoDateTime:()=>pg,_isoDate:()=>pv,_ipv6:()=>pl,_ipv4:()=>po,_intersection:()=>fd,_int64:()=>pN,_int32:()=>pS,_int:()=>pw,_includes:()=>p3,_guid:()=>c2,_gte:()=>pW,_gt:()=>pB,_float64:()=>px,_float32:()=>pk,_file:()=>fy,_enum:()=>fh,_endsWith:()=>p7,_emoji:()=>pe,_email:()=>c6,_e164:()=>pf,_discriminatedUnion:()=>fu,_default:()=>fw,_date:()=>pL,_custom:()=>fN,_cuid2:()=>pn,_cuid:()=>pr,_coercedString:()=>c4,_coercedNumber:()=>p$,_coercedDate:()=>pZ,_coercedBoolean:()=>pO,_coercedBigint:()=>pj,_cidrv6:()=>pd,_cidrv4:()=>pu,_catch:()=>fS,_boolean:()=>pP,_bigint:()=>pE,_base64url:()=>pp,_base64:()=>pc,_array:()=>fo,_any:()=>pR,TimePrecision:()=>ph,NEVER:()=>oD,JSONSchemaGenerator:()=>fU,JSONSchema:()=>fM,Doc:()=>uH,$output:()=>cH,$input:()=>cX,$constructor:()=>oM,$brand:()=>oL,$ZodXID:()=>de,$ZodVoid:()=>dj,$ZodUnknown:()=>dO,$ZodUnion:()=>dD,$ZodUndefined:()=>dS,$ZodUUID:()=>u4,$ZodURL:()=>u2,$ZodULID:()=>u7,$ZodType:()=>uY,$ZodTuple:()=>dF,$ZodTransform:()=>dY,$ZodTemplateLiteral:()=>cn,$ZodSymbol:()=>dx,$ZodSuccess:()=>d5,$ZodStringFormat:()=>u0,$ZodString:()=>uQ,$ZodSet:()=>dK,$ZodRegistry:()=>cY,$ZodRecord:()=>dV,$ZodRealError:()=>lT,$ZodReadonly:()=>ct,$ZodPromise:()=>ci,$ZodPrefault:()=>d6,$ZodPipe:()=>d7,$ZodOptional:()=>dQ,$ZodObject:()=>dR,$ZodNumberFormat:()=>db,$ZodNumber:()=>d_,$ZodNullable:()=>d0,$ZodNull:()=>dI,$ZodNonOptional:()=>d2,$ZodNever:()=>dE,$ZodNanoID:()=>u5,$ZodNaN:()=>d8,$ZodMap:()=>dB,$ZodLiteral:()=>dH,$ZodLazy:()=>ca,$ZodKSUID:()=>dt,$ZodJWT:()=>dv,$ZodIntersection:()=>dL,$ZodISOTime:()=>di,$ZodISODuration:()=>da,$ZodISODateTime:()=>dr,$ZodISODate:()=>dn,$ZodIPv6:()=>dl,$ZodIPv4:()=>ds,$ZodGUID:()=>u1,$ZodFunction:()=>fA,$ZodFile:()=>dX,$ZodError:()=>lN,$ZodEnum:()=>dJ,$ZodEmoji:()=>u9,$ZodEmail:()=>u6,$ZodE164:()=>dh,$ZodDiscriminatedUnion:()=>dM,$ZodDefault:()=>d1,$ZodDate:()=>dN,$ZodCustomStringFormat:()=>dy,$ZodCustom:()=>cs,$ZodCheckUpperCase:()=>uF,$ZodCheckStringFormat:()=>uM,$ZodCheckStartsWith:()=>uV,$ZodCheckSizeEquals:()=>uA,$ZodCheckRegex:()=>uL,$ZodCheckProperty:()=>uK,$ZodCheckOverwrite:()=>uJ,$ZodCheckNumberFormat:()=>uN,$ZodCheckMultipleOf:()=>uj,$ZodCheckMinSize:()=>uz,$ZodCheckMinLength:()=>uU,$ZodCheckMimeType:()=>uG,$ZodCheckMaxSize:()=>uC,$ZodCheckMaxLength:()=>uR,$ZodCheckLowerCase:()=>uZ,$ZodCheckLessThan:()=>uO,$ZodCheckLengthEquals:()=>uD,$ZodCheckIncludes:()=>uq,$ZodCheckGreaterThan:()=>uE,$ZodCheckEndsWith:()=>uB,$ZodCheckBigIntFormat:()=>uT,$ZodCheck:()=>uI,$ZodCatch:()=>d3,$ZodCUID2:()=>u8,$ZodCUID:()=>u3,$ZodCIDRv6:()=>dd,$ZodCIDRv4:()=>du,$ZodBoolean:()=>d$,$ZodBigIntFormat:()=>dk,$ZodBigInt:()=>dw,$ZodBase64URL:()=>dm,$ZodBase64:()=>dp,$ZodAsyncError:()=>oZ,$ZodArray:()=>dC,$ZodAny:()=>dP});var oD=Object.freeze({status:"aborted"});function oM(e,t,r){function n(r,n){var i;for(let a in Object.defineProperty(r,"_zod",{value:r._zod??{},enumerable:!1}),(i=r._zod).traits??(i.traits=new Set),r._zod.traits.add(e),t(r,n),s.prototype)a in r||Object.defineProperty(r,a,{value:s.prototype[a].bind(r)});r._zod.constr=s,r._zod.def=n}let i=r?.Parent??Object;class a extends i{}function s(e){var t;let i=r?.Parent?new a:this;for(let r of(n(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))r();return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var oL=Symbol("zod_brand");class oZ extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}var oF={};function oq(e){return e&&Object.assign(oF,e),oF}var oV={};function oB(e){return e}function oW(e){return e}function oK(e){}function oG(e){throw Error()}function oJ(e){}function oH(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function oX(e,t="|"){return e.map(e=>lc(e)).join(t)}function oY(e,t){return"bigint"==typeof t?t.toString():t}function oQ(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function o0(e){return null==e}function o1(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function o4(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}function o6(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function o2(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function o9(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function o5(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let r={};for(let n=0;n<t.length;n++)r[t[n]]=e[n];return r})}function o3(e=10){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(26*Math.random())];return t}function o8(e){return JSON.stringify(e)}C(oV,{unwrapMessage:()=>lk,stringifyPrimitive:()=>lc,required:()=>lb,randomString:()=>o3,propertyKeyTypes:()=>la,promiseAllObject:()=>o5,primitiveTypes:()=>ls,prefixIssues:()=>lw,pick:()=>lh,partial:()=>l_,optionalKeys:()=>lp,omit:()=>lg,numKeys:()=>ln,nullish:()=>o0,normalizeParams:()=>lu,merge:()=>ly,jsonStringifyReplacer:()=>oY,joinValues:()=>oX,issue:()=>lP,isPlainObject:()=>lr,isObject:()=>le,getSizableOrigin:()=>lS,getParsedType:()=>li,getLengthableOrigin:()=>lI,getEnumValues:()=>oH,getElementAtPath:()=>o9,floatSafeRemainder:()=>o4,finalizeIssue:()=>lx,extend:()=>lv,escapeRegex:()=>lo,esc:()=>o8,defineLazy:()=>o6,createTransparentProxy:()=>ld,clone:()=>ll,cleanRegex:()=>o1,cleanEnum:()=>lO,captureStackTrace:()=>o7,cached:()=>oQ,assignProp:()=>o2,assertNotEqual:()=>oW,assertNever:()=>oG,assertIs:()=>oK,assertEqual:()=>oB,assert:()=>oJ,allowsEval:()=>lt,aborted:()=>l$,NUMBER_FORMAT_RANGES:()=>lf,Class:()=>lE,BIGINT_FORMAT_RANGES:()=>lm});var o7=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function le(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var lt=oQ(()=>{if("u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function lr(e){if(!1===le(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==le(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function ln(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var li=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},la=new Set(["string","number","symbol"]),ls=new Set(["string","number","bigint","boolean","symbol","undefined"]);function lo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ll(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function lu(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function ld(e){let t;return new Proxy({},{get:(r,n,i)=>(t??(t=e()),Reflect.get(t,n,i)),set:(r,n,i,a)=>(t??(t=e()),Reflect.set(t,n,i,a)),has:(r,n)=>(t??(t=e()),Reflect.has(t,n)),deleteProperty:(r,n)=>(t??(t=e()),Reflect.deleteProperty(t,n)),ownKeys:r=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(r,n)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)),defineProperty:(r,n,i)=>(t??(t=e()),Reflect.defineProperty(t,n,i))})}function lc(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function lp(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}var lf={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},lm={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function lh(e,t){let r={},n=e._zod.def;for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(r[e]=n.shape[e])}return ll(e,{...e._zod.def,shape:r,checks:[]})}function lg(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return ll(e,{...e._zod.def,shape:r,checks:[]})}function lv(e,t){if(!lr(t))throw Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let r={...e._zod.def.shape,...t};return o2(this,"shape",r),r},checks:[]};return ll(e,r)}function ly(e,t){return ll(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return o2(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function l_(e,t,r){let n=t._zod.def.shape,i={...n};if(r)for(let t in r){if(!(t in n))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(let t in n)i[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return ll(t,{...t._zod.def,shape:i,checks:[]})}function lb(e,t,r){let n=t._zod.def.shape,i={...n};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(let t in n)i[t]=new e({type:"nonoptional",innerType:n[t]});return ll(t,{...t._zod.def,shape:i,checks:[]})}function l$(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function lw(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function lk(e){return"string"==typeof e?e:e?.message}function lx(e,t,r){let n={...e,path:e.path??[]};return e.message||(n.message=lk(e.inst?._zod.def?.error?.(e))??lk(t?.error?.(e))??lk(r.customError?.(e))??lk(r.localeError?.(e))??"Invalid input"),delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function lS(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function lI(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function lP(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function lO(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}class lE{constructor(...e){}}var lj=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,oY,2),enumerable:!0})},lN=oM("$ZodError",lj),lT=oM("$ZodError",lj,{Parent:Error});function lC(e,t=e=>e.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function lz(e,t){let r=t||function(e){return e.message},n={_errors:[]},i=e=>{for(let t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>i({issues:e}));else if("invalid_key"===t.code)i({issues:t.issues});else if("invalid_element"===t.code)i({issues:t.issues});else if(0===t.path.length)n._errors.push(r(t));else{let e=n,i=0;for(;i<t.path.length;){let n=t.path[i];i!==t.path.length-1?e[n]=e[n]||{_errors:[]}:(e[n]=e[n]||{_errors:[]},e[n]._errors.push(r(t))),e=e[n],i++}}};return i(e),n}function lA(e,t){let r=t||function(e){return e.message},n={errors:[]},i=(e,t=[])=>{var a,s;for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>i({issues:e},o.path));else if("invalid_key"===o.code)i({issues:o.issues},o.path);else if("invalid_element"===o.code)i({issues:o.issues},o.path);else{let e=[...t,...o.path];if(0===e.length){n.errors.push(r(o));continue}let i=n,l=0;for(;l<e.length;){let t=e[l],n=l===e.length-1;"string"==typeof t?(i.properties??(i.properties={}),(a=i.properties)[t]??(a[t]={errors:[]}),i=i.properties[t]):(i.items??(i.items=[]),(s=i.items)[t]??(s[t]={errors:[]}),i=i.items[t]),n&&i.errors.push(r(o)),l++}}};return i(e),n}function lR(e){let t=[];for(let r of e)"number"==typeof r?t.push(`[${r}]`):"symbol"==typeof r?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function lU(e){let t=[];for(let r of[...e.issues].sort((e,t)=>e.path.length-t.path.length))t.push(`✖ ${r.message}`),r.path?.length&&t.push(` → at ${lR(r.path)}`);return t.join(`
|
|
51
|
-
`)}var lD=e=>(t,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new oZ;if(s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>lx(e,a,oq())));throw o7(t,i?.callee),t}return s.value},lM=lD(lT),lL=e=>async(t,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>lx(e,a,oq())));throw o7(t,i?.callee),t}return s.value},lZ=lL(lT),lF=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new oZ;return a.issues.length?{success:!1,error:new(e??lN)(a.issues.map(e=>lx(e,i,oq())))}:{success:!0,data:a.value}},lq=lF(lT),lV=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>lx(e,i,oq())))}:{success:!0,data:a.value}},lB=lV(lT),lW={};C(lW,{xid:()=>lH,uuid7:()=>l9,uuid6:()=>l2,uuid4:()=>l6,uuid:()=>l4,uppercase:()=>uS,unicodeEmail:()=>l7,undefined:()=>uk,ulid:()=>lJ,time:()=>uh,string:()=>uv,rfc5322Email:()=>l8,number:()=>ub,null:()=>uw,nanoid:()=>lY,lowercase:()=>ux,ksuid:()=>lX,ipv6:()=>ui,ipv4:()=>un,integer:()=>u_,html5Email:()=>l3,hostname:()=>uu,guid:()=>l1,extendedDuration:()=>l0,emoji:()=>ur,email:()=>l5,e164:()=>uc,duration:()=>lQ,domain:()=>ud,datetime:()=>ug,date:()=>uf,cuid2:()=>lG,cuid:()=>lK,cidrv6:()=>us,cidrv4:()=>ua,browserEmail:()=>ue,boolean:()=>u$,bigint:()=>uy,base64url:()=>ul,base64:()=>uo,_emoji:()=>ut});var lK=/^[cC][^\s-]{8,}$/,lG=/^[0-9a-z]+$/,lJ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,lH=/^[0-9a-vA-V]{20}$/,lX=/^[A-Za-z0-9]{27}$/,lY=/^[a-zA-Z0-9_-]{21}$/,lQ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,l0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,l1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,l4=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,l6=l4(4),l2=l4(6),l9=l4(7),l5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,l3=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,l8=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,l7=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ue=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ut="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ur(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}var un=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ui=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,ua=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,us=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ul=/^[A-Za-z0-9_-]*$/,uu=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,ud=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,uc=/^\+(?:[0-9]){6,14}[0-9]$/,up="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",uf=RegExp(`^${up}$`);function um(e){return"number"==typeof e.precision?-1===e.precision?"(?:[01]\\d|2[0-3]):[0-5]\\d":0===e.precision?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function uh(e){return RegExp(`^${um(e)}$`)}function ug(e){let t=um({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return RegExp(`^${up}T(?:${n})$`)}var uv=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},uy=/^\d+n?$/,u_=/^\d+$/,ub=/^-?\d+(?:\.\d+)?/i,u$=/true|false/i,uw=/null/i,uk=/undefined/i,ux=/^[^A-Z]*$/,uS=/^[^a-z]*$/,uI=oM("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),uP={number:"number",bigint:"bigint",object:"date"},uO=oM("$ZodCheckLessThan",(e,t)=>{uI.init(e,t);let r=uP[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,n=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<n&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uE=oM("$ZodCheckGreaterThan",(e,t)=>{uI.init(e,t);let r=uP[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,n=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>n&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uj=oM("$ZodCheckMultipleOf",(e,t)=>{uI.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value!==BigInt(0):0!==o4(r.value,t.value))&&r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),uN=oM("$ZodCheckNumberFormat",(e,t)=>{uI.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,a]=lf[t.format];e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=a,r&&(n.pattern=u_)}),e._zod.check=s=>{let o=s.value;if(r){if(!Number.isInteger(o))return void s.issues.push({expected:n,format:t.format,code:"invalid_type",input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?s.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}))}o<i&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inst:e})}}),uT=oM("$ZodCheckBigIntFormat",(e,t)=>{uI.init(e,t);let[r,n]=lm[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=n}),e._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inst:e})}}),uC=oM("$ZodCheckMaxSize",(e,t)=>{uI.init(e,t),e._zod.when=e=>{let t=e.value;return!o0(t)&&void 0!==t.size},e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value;n.size<=t.maximum||r.issues.push({origin:lS(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),uz=oM("$ZodCheckMinSize",(e,t)=>{uI.init(e,t),e._zod.when=e=>{let t=e.value;return!o0(t)&&void 0!==t.size},e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value;n.size>=t.minimum||r.issues.push({origin:lS(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),uA=oM("$ZodCheckSizeEquals",(e,t)=>{uI.init(e,t),e._zod.when=e=>{let t=e.value;return!o0(t)&&void 0!==t.size},e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=r=>{let n=r.value,i=n.size;if(i===t.size)return;let a=i>t.size;r.issues.push({origin:lS(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),uR=oM("$ZodCheckMaxLength",(e,t)=>{uI.init(e,t),e._zod.when=e=>{let t=e.value;return!o0(t)&&void 0!==t.length},e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value;if(n.length<=t.maximum)return;let i=lI(n);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),uU=oM("$ZodCheckMinLength",(e,t)=>{uI.init(e,t),e._zod.when=e=>{let t=e.value;return!o0(t)&&void 0!==t.length},e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value;if(n.length>=t.minimum)return;let i=lI(n);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),uD=oM("$ZodCheckLengthEquals",(e,t)=>{uI.init(e,t),e._zod.when=e=>{let t=e.value;return!o0(t)&&void 0!==t.length},e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let n=r.value,i=n.length;if(i===t.length)return;let a=lI(n),s=i>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),uM=oM("$ZodCheckStringFormat",(e,t)=>{var r,n;(uI.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern)?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),uL=oM("$ZodCheckRegex",(e,t)=>{uM.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),uZ=oM("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ux),uM.init(e,t)}),uF=oM("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=uS),uM.init(e,t)}),uq=oM("$ZodCheckIncludes",(e,t)=>{uI.init(e,t);let r=lo(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),uV=oM("$ZodCheckStartsWith",(e,t)=>{uI.init(e,t);let r=RegExp(`^${lo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),uB=oM("$ZodCheckEndsWith",(e,t)=>{uI.init(e,t);let r=RegExp(`.*${lo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function uW(e,t,r){e.issues.length&&t.issues.push(...lw(r,e.issues))}var uK=oM("$ZodCheckProperty",(e,t)=>{uI.init(e,t),e._zod.check=e=>{let r=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(r=>uW(r,e,t.property));uW(r,e,t.property)}}),uG=oM("$ZodCheckMimeType",(e,t)=>{uI.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e})}}),uJ=oM("$ZodCheckOverwrite",(e,t)=>{uI.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class uH{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
49
|
+
`).filter(e=>e.startsWith("worktree ")).map(e=>e.slice(9).normalize("NFC"))}catch{return[]}}var se=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function st(e){return"string"!=typeof e?null:se.test(e)?e:null}function sr(e){if(!e.includes("\\"))return e;try{return JSON.parse(`"${e}"`)}catch{return e}}function sn(e,t){for(let r of[`"${t}":"`,`"${t}": "`]){let t=e.indexOf(r);if(t<0)continue;let n=t+r.length,i=n;for(;i<e.length;){if("\\"===e[i]){i+=2;continue}if('"'===e[i])return sr(e.slice(n,i));i++}}}function si(e,t){let r,n=-1;for(let i of[`"${t}":"`,`"${t}": "`]){let t=0;for(;;){let a=e.indexOf(i,t);if(a<0)break;let s=a+i.length,o=s;for(;o<e.length;){if("\\"===e[o]){o+=2;continue}if('"'===e[o]){a>n&&(r=sr(e.slice(s,o)),n=a);break}o++}t=o+1}}return r}async function sa(e,t){let r=(0,d.createWriteStream)(e,{mode:384});try{for(let e of t)r.write(JSON.stringify(e)+`
|
|
50
|
+
`)||await (0,v.once)(r,"drain");r.end(),await (0,v.once)(r,"finish")}catch(e){throw r.destroy(),e}}var ss=/^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/,so=/<command-name>(.*?)<\/command-name>/;async function sl(e){try{let t=await (0,c.open)(e,"r");try{let e=await t.stat(),r=Buffer.allocUnsafe(65536),n=await t.read(r,0,65536,0);if(0===n.bytesRead)return null;let i=r.toString("utf8",0,n.bytesRead),a=Math.max(0,e.size-65536),s=i;if(a>0){let e=await t.read(r,0,65536,a);s=r.toString("utf8",0,e.bytesRead)}return{mtime:e.mtime.getTime(),size:e.size,head:i,tail:s}}finally{await t.close()}}catch{return null}}function su(e){let t=e.replace(/[^a-zA-Z0-9]/g,"-");return t.length<=200?t:`${t.slice(0,200)}-${Math.abs(function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t}(e)).toString(36)}`}function sd(){return(0,m.join)(r_(),"projects")}async function sc(e){try{return(await (0,c.realpath)(e)).normalize("NFC")}catch{return e.normalize("NFC")}}async function sp(e){let t=(0,m.join)(sd(),su(e)),r=[];try{await (0,c.readdir)(t),r.push(t)}catch{}let n=su(e);if(n.length<=200)return r;let i=n.slice(0,200)+"-",a=sd();try{for(let e of(await (0,c.readdir)(a,{withFileTypes:!0}))){if(!e.isDirectory()||!e.name.startsWith(i))continue;let n=(0,m.join)(a,e.name);n!==t&&r.push(n)}}catch{}return r}async function sf(e,t){let r=`${e}.jsonl`;async function n(e,t){let n=(0,m.join)(e,r);try{let e=await (0,c.stat)(n);if(e.size>0)return{filePath:n,projectPath:t,fileSize:e.size}}catch{}}if(t){let e,r=await sc(t);for(let e of(await sp(r))){let t=await n(e,r);if(t)return t}try{e=await a7(r)}catch{e=[]}for(let t of e)if(t!==r)for(let e of(await sp(t))){let r=await n(e,t);if(r)return r}return}let i=sd(),a;try{a=await (0,c.readdir)(i)}catch{return}for(let e of a){let t=await n((0,m.join)(i,e),void 0);if(t)return t}}function sm(e){try{let t=JSON.parse(e);if("system"!==t.type||"compact_boundary"!==t.subtype)return null;return{hasPreservedSegment:!!t.compactMetadata?.preservedSegment}}catch{return null}}function sh(e,t,r,n){let i=n-r;if(!(i<=0)){if(e.len+i>e.buf.length){let t=Buffer.allocUnsafe(Math.min(Math.max(2*e.buf.length,e.len+i),e.cap));e.buf.copy(t,0,0,e.len),e.buf=t}t.copy(e.buf,e.len,r,n),e.len+=i}}function sg(e,t,r,n){return n-r>=t.length&&0===e.compare(t,0,t.length,r,r+t.length)}var sv=Buffer.from('{"type":"attribution-snapshot"'),sy=Buffer.from('{"type":"system"'),s_=Buffer.from([10]);async function sb(e,t){let r=s9??=Buffer.from('"compact_boundary"'),n={out:{buf:Buffer.allocUnsafe(Math.min(t,8388608)),len:0,cap:t+1},boundaryStartOffset:0,hasPreservedSegment:!1,lastSnapSrc:null,lastSnapLen:0,lastSnapBuf:void 0,bufFileOff:0,carryLen:0,carryBuf:void 0,straddleSnapCarryLen:0,straddleSnapTailEnd:0},i=Buffer.allocUnsafe(1048576),a=await (0,c.open)(e,"r");try{let e=0;for(;e<t;){var s,o,l,u,d;let{bytesRead:c}=await a.read(i,0,Math.min(1048576,t-e),e);if(0===c)break;e+=c;let p=function(e,t,r){if(e.straddleSnapCarryLen=0,e.straddleSnapTailEnd=0,0===e.carryLen)return 0;let n=e.carryBuf,i=t.indexOf(10);if(-1===i||i>=r)return 0;let a=i+1;if(sg(n,sv,0,e.carryLen))e.straddleSnapCarryLen=e.carryLen,e.straddleSnapTailEnd=a,e.lastSnapSrc=null;else{if(e.carryLen<sv.length)return 0;if(sg(n,sy,0,e.carryLen)){let r=sm(n.toString("utf-8",0,e.carryLen)+t.toString("utf-8",0,i));r?.hasPreservedSegment?e.hasPreservedSegment=!0:r&&(e.out.len=0,e.boundaryStartOffset=e.bufFileOff,e.hasPreservedSegment=!1,e.lastSnapSrc=null)}sh(e.out,n,0,e.carryLen),sh(e.out,t,0,a)}return e.bufFileOff+=e.carryLen+a,e.carryLen=0,a}(n,i,c),f;if(n.carryLen>0){let e=n.carryLen+(c-p);f=Buffer.allocUnsafe(e),n.carryBuf.copy(f,0,0,n.carryLen),i.copy(f,n.carryLen,p,c)}else f=i.subarray(p,c);let m=function(e,t,r){let n=t.indexOf(r),i=0,a=0,s=-1,o=-1,l=t.indexOf(10);for(;-1!==l;){let u=l+1;if(-1!==n&&n<a&&(n=t.indexOf(r,a)),sg(t,sv,a,u))sh(e.out,t,i,a),s=a,o=u,i=u;else if(n>=a&&n<Math.min(a+256,u)){let o=sm(t.toString("utf-8",a,l));o?.hasPreservedSegment?e.hasPreservedSegment=!0:o&&(e.out.len=0,e.boundaryStartOffset=e.bufFileOff+a,e.hasPreservedSegment=!1,e.lastSnapSrc=null,s=-1,e.straddleSnapCarryLen=0,i=a),n=t.indexOf(r,n+r.length)}a=u,l=t.indexOf(10,a)}return sh(e.out,t,i,a),{lastSnapStart:s,lastSnapEnd:o,trailStart:a}}(n,f,r);s=f,o=m.lastSnapStart,l=m.lastSnapEnd,-1!==o?(n.lastSnapLen=l-o,(void 0===n.lastSnapBuf||n.lastSnapLen>n.lastSnapBuf.length)&&(n.lastSnapBuf=Buffer.allocUnsafe(n.lastSnapLen)),s.copy(n.lastSnapBuf,0,o,l),n.lastSnapSrc=n.lastSnapBuf):n.straddleSnapCarryLen>0&&(n.lastSnapLen=n.straddleSnapCarryLen+n.straddleSnapTailEnd,(void 0===n.lastSnapBuf||n.lastSnapLen>n.lastSnapBuf.length)&&(n.lastSnapBuf=Buffer.allocUnsafe(n.lastSnapLen)),n.carryBuf.copy(n.lastSnapBuf,0,0,n.straddleSnapCarryLen),i.copy(n.lastSnapBuf,n.straddleSnapCarryLen,0,n.straddleSnapTailEnd),n.lastSnapSrc=n.lastSnapBuf),u=f,d=m.trailStart,n.carryLen=u.length-d,n.carryLen>0&&((void 0===n.carryBuf||n.carryLen>n.carryBuf.length)&&(n.carryBuf=Buffer.allocUnsafe(n.carryLen)),u.copy(n.carryBuf,0,d,u.length)),n.bufFileOff+=m.trailStart}if(n.carryLen>0){let e=n.carryBuf;sg(e,sv,0,n.carryLen)?(n.lastSnapSrc=e,n.lastSnapLen=n.carryLen):sh(n.out,e,0,n.carryLen)}n.lastSnapSrc&&(n.out.len>0&&10!==n.out.buf[n.out.len-1]&&sh(n.out,s_,0,1),sh(n.out,n.lastSnapSrc,0,n.lastSnapLen))}finally{await a.close()}return{boundaryStartOffset:n.boundaryStartOffset,postBoundaryBuf:n.out.buf.subarray(0,n.out.len),hasPreservedSegment:n.hasPreservedSegment}}async function s$(e,t){try{if(t>5242880&&!tV(process.env.CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP))return(await sb(e,t)).postBoundaryBuf;return await (0,c.readFile)(e)}catch{return null}}function sw(e){if("assistant"!==e.type)return;let t=e.message;if("object"!=typeof t||null===t)return;let r=t.id;return"string"==typeof r?r:void 0}function sk(e){return{type:e.type,uuid:e.uuid,session_id:e.sessionId,message:e.message,parent_tool_use_id:null,timestamp:e.timestamp}}function sx(e,t){var r;let n,i=function(e){let t=new Map;for(let r of e)t.set(r.uuid,r);for(let e of t.values()){if("system"!==e.type||"compact_boundary"!==e.subtype)continue;let r=e.compactMetadata?.preservedSegment;if(!r)continue;let n=t.get(r.headUuid);for(let[e,i]of(n&&t.set(r.headUuid,{...n,parentUuid:r.anchorUuid}),t))i.parentUuid===r.anchorUuid&&e!==r.headUuid&&t.set(e,{...i,parentUuid:r.tailUuid})}let r=new Map;for(let t=0;t<e.length;t++)r.set(e[t].uuid,t);let n=new Set;for(let e of t.values())e.parentUuid&&n.add(e.parentUuid);let i=[...t.values()].filter(e=>!n.has(e.uuid)),a=[];for(let e of i){let r=e,n=new Set;for(;r&&!n.has(r.uuid);){if(n.add(r.uuid),"user"===r.type||"assistant"===r.type){a.push(r);break}r=r.parentUuid?t.get(r.parentUuid):void 0}}if(0===a.length)return[];let s=a.filter(e=>!e.isSidechain&&!e.teamName&&!e.isMeta),o=(s.length>0?s:a).reduce((e,t)=>(r.get(t.uuid)??-1)>(r.get(e.uuid)??-1)?t:e),l=[],u=new Set,d=t.get(o.uuid);for(;d&&!u.has(d.uuid);)u.add(d.uuid),l.push(d),d=d.parentUuid?t.get(d.parentUuid):void 0;return l.reverse(),function(e,t,r){let n=t.filter(e=>"assistant"===e.type);if(0===n.length)return t;let i=new Map;for(let e of n){let t=sw(e);t&&i.set(t,e)}let a=new Map,s=new Map;for(let t of e.values()){let e=sw(t);if(e){let r=a.get(e);r?r.push(t):a.set(e,[t])}else if(function(e){if("user"!==e.type||!e.parentUuid)return!1;let t=e.message;if("object"!=typeof t||null===t)return!1;let r=t.content;return!!Array.isArray(r)&&r.some(e=>"object"==typeof e&&null!==e&&"tool_result"===e.type)}(t)){let e=t.parentUuid,r=s.get(e);r?r.push(t):s.set(e,[t])}}let o=new Set,l=new Map,u=0;for(let e of n){let t=sw(e);if(!t||o.has(t))continue;o.add(t);let n=a.get(t)??[e],d=n.filter(e=>!r.has(e.uuid)),c=[];for(let e of n){let t=s.get(e.uuid);if(t)for(let e of t)r.has(e.uuid)||c.push(e)}if(0===d.length&&0===c.length)continue;let p=(e,t)=>(e.timestamp??"").localeCompare(t.timestamp??"");d.sort(p),c.sort(p);let f=i.get(t),m=[...d,...c];for(let e of m)r.add(e.uuid);u+=m.length,l.set(f.uuid,m)}if(0===u)return t;let d=[];for(let e of t){d.push(e);let t=l.get(e.uuid);t&&d.push(...t)}return d}(t,l,u)}(e),a=t?.includeSystemMessages??!1;return r=i.filter(e=>(function(e,t){if("user"===e.type||"assistant"===e.type);else if("system"!==e.type||!t)return!1;return!e.isMeta&&!e.isSidechain&&!e.teamName})(e,a)).map(sk),n=t?.offset??0,t?.limit!==void 0&&t.limit>0?r.slice(n,n+t.limit):n>0?r.slice(n):r}async function sS(e,t){if(!st(e))return[];let r=await sf(e,t?.dir);if(!r)return[];let n=await s$(r.filePath,r.fileSize);return n?sx(function(e){let t=[],r=e.length,n=0;for(;n<r;){let i=e.indexOf(10,n);-1===i&&(i=r);let a=n;for(;a<i&&e[a]<=32;)a++;if(n=i+1,a>=i)continue;let s=e.toString("utf-8",a,i);try{let e=aY(s),r=e.type;("user"===r||"assistant"===r||"progress"===r||"system"===r||"attachment"===r)&&"string"==typeof e.uuid&&t.push(e)}catch{}}return t}(n),t):[]}function sI(e,t,r){let{head:n,tail:i,mtime:a,size:s}=t,o=n.indexOf(`
|
|
51
|
+
`),l=o>=0?n.slice(0,o):n;if(l.includes('"isSidechain":true')||l.includes('"isSidechain": true'))return null;let u=si(i,"customTitle")||si(n,"customTitle")||si(i,"aiTitle")||si(n,"aiTitle")||void 0,d=function(e){let t=0,r={commandFallback:""};for(;t<e.length;){let n=e.indexOf(`
|
|
52
|
+
`,t),i=n>=0?e.slice(t,n):e.slice(t);if(t=n>=0?n+1:e.length,!(!i.includes('"type":"user"')&&!i.includes('"type": "user"')||i.includes('"tool_result"')||i.includes('"isMeta":true')||i.includes('"isMeta": true')||i.includes('"isCompactSummary":true')||i.includes('"isCompactSummary": true')))try{let e=JSON.parse(i),t=function(e,t){if("user"!==e.type||!0===e.isMeta||!0===e.isCompactSummary)return;let r=e.message;if(!r)return;let n=r.content,i=[];if("string"==typeof n)i.push(n);else if(Array.isArray(n)){for(let e of n)if(e&&"object"==typeof e){if("tool_result"===e.type)return;"text"===e.type&&"string"==typeof e.text&&i.push(e.text)}}for(let e of i){let r=e.replaceAll(`
|
|
53
|
+
`," ").trim();if(!r)continue;let n=so.exec(r);if(n){t.commandFallback||(t.commandFallback=n[1]);continue}let i=/<bash-input>([\s\S]*?)<\/bash-input>/.exec(r);if(i)return`! ${i[1].trim()}`;if(!ss.test(r))return r.length>200&&(r=r.slice(0,200).trim()+"…"),r}}(e,r);if(void 0!==t)return t}catch{continue}}return r.commandFallback}(n)||void 0,c=sn(n,"timestamp"),p;if(c){let e=Date.parse(c);Number.isNaN(e)||(p=e)}let f=u||si(i,"lastPrompt")||si(i,"summary")||d;if(!f)return null;let m=si(i,"gitBranch")||sn(n,"gitBranch")||void 0,h=sn(n,"cwd")||r||void 0,g=i.split(`
|
|
54
|
+
`).findLast(e=>e.includes('"type":"tag"')&&e.includes('"tag":"'));return{sessionId:e,summary:f,lastModified:a,fileSize:s,customTitle:u,firstPrompt:d,gitBranch:m,cwd:h,tag:g&&si(g,"tag")||void 0,createdAt:p}}async function sP(e,t,r){let n;try{n=await (0,c.readdir)(e)}catch{return[]}return(await Promise.all(n.map(async n=>{if(!n.endsWith(".jsonl"))return null;let i=st(n.slice(0,-6));if(!i)return null;let a=(0,m.join)(e,n);if(!t)return{sessionId:i,filePath:a,mtime:0,projectPath:r};try{let e=await (0,c.stat)(a);return{sessionId:i,filePath:a,mtime:e.mtime.getTime(),projectPath:r}}catch{return null}}))).filter(e=>null!==e)}async function sO(e){let t=await sl(e.filePath);if(!t)return null;let r=sI(e.sessionId,t,e.projectPath);return r?(e.mtime&&(r.lastModified=e.mtime),r):null}function sE(e,t){return t.mtime!==e.mtime?t.mtime-e.mtime:t.sessionId<e.sessionId?-1:+(t.sessionId>e.sessionId)}async function sj(e,t,r){e.sort(sE);let n=[],i=t&&t>0?t:1/0,a=0,s=new Set;for(let t=0;t<e.length&&n.length<i;){let o=Math.min(t+32,e.length),l=e.slice(t,o),u=await Promise.all(l.map(sO));for(let e=0;e<u.length&&n.length<i;e++){t++;let i=u[e];if(i&&!s.has(i.sessionId)){if(s.add(i.sessionId),a<r){a++;continue}n.push(i)}}}return n}async function sN(e){let t=await Promise.all(e.map(sO)),r=new Map;for(let e of t){if(!e)continue;let t=r.get(e.sessionId);(!t||e.lastModified>t.lastModified)&&r.set(e.sessionId,e)}let n=[...r.values()];return n.sort((e,t)=>t.lastModified!==e.lastModified?t.lastModified-e.lastModified:t.sessionId<e.sessionId?-1:+(t.sessionId>e.sessionId)),n}async function sT(e,t,r){let n,i=await sc(e),a;if(t)try{a=await a7(i)}catch{a=[]}else a=[];if(a.length<=1){let e=[];for(let t of(await sp(i)))e.push(...await sP(t,r,i));return e}let s=sd(),o=(process.platform,a.map(e=>{let t=su(e);return{path:e,prefix:t}}));o.sort((e,t)=>t.prefix.length-e.prefix.length);try{n=await (0,c.readdir)(s,{withFileTypes:!0})}catch{let e=[];for(let t of(await sp(i)))e.push(...await sP(t,r,i));return e}let l=[],u=new Set;for(let e of(await sp(i))){let t=(0,m.basename)(e);u.add(t),l.push(...await sP(e,r,i))}for(let e of n){if(!e.isDirectory())continue;let t=e.name;if(!u.has(t)){for(let{path:n,prefix:i}of o)if(t===i||i.length>=200&&t.startsWith(i+"-")){u.add(t),l.push(...await sP((0,m.join)(s,e.name),r,n));break}}}return l}async function sC(e){let t=sd(),r;try{r=await (0,c.readdir)(t,{withFileTypes:!0})}catch{return[]}return(await Promise.all(r.filter(e=>e.isDirectory()).map(r=>sP((0,m.join)(t,r.name),e)))).flat()}async function sz(e){let{dir:t,limit:r,offset:n,includeWorktrees:i}=e??{},a=n??0,s=void 0!==r&&r>0||a>0,o=t?await sT(t,i??!0,s):await sC(s);return s?sj(o,r,a):sN(o)}async function sA(e,t,r={}){if(!st(e))throw Error(`Invalid sessionId: ${e}`);if(!t.trim())throw Error("title must be non-empty");let n=aX({type:"custom-title",customTitle:t.trim(),sessionId:e})+`
|
|
55
|
+
`;await sD(e,n,r)}async function sR(e,t={}){if(!st(e))throw Error(`Invalid sessionId: ${e}`);for(let r of(await sU(t))){let t=(0,m.join)(r,`${e}.jsonl`),n;try{({size:n}=await (0,c.stat)(t))}catch(t){let e=av(t);if("ENOENT"===e||"ENOTDIR"===e)continue;throw t}if(0!==n){await (0,c.rm)(t,{force:!0}),await (0,c.rm)((0,m.join)(r,e),{recursive:!0,force:!0});return}}throw Error(t.dir?`Session ${e} not found in project directory for ${t.dir}`:`Session ${e} not found in any project directory`)}async function sU(e){if(e.dir){let t=await sc(e.dir),r=await sp(t),n;try{n=await a7(t)}catch{n=[]}for(let e of n)e!==t&&r.push(...await sp(e));return r}let t=sd();try{return(await (0,c.readdir)(t,{withFileTypes:!0})).filter(e=>e.isDirectory()||e.isSymbolicLink()).map(e=>(0,m.join)(t,e.name))}catch{return[]}}async function sD(e,t,r){let n=`${e}.jsonl`;if(r.dir){let i,a=await sc(r.dir);for(let e of(await sp(a)))if(await sM((0,m.join)(e,n),t))return;try{i=await a7(a)}catch{i=[]}for(let e of i)if(e!==a){for(let r of(await sp(e)))if(await sM((0,m.join)(r,n),t))return}throw Error(`Session ${e} not found in project directory for ${r.dir}`)}let i=sd(),a;try{a=await (0,c.readdir)(i)}catch{throw Error(`Session ${e} not found (no projects directory)`)}for(let e of a)if(await sM((0,m.join)(i,e,n),t))return;throw Error(`Session ${e} not found in any project directory`)}async function sM(e,t){let r;try{r=await (0,c.open)(e,d.constants.O_WRONLY|d.constants.O_APPEND)}catch(t){let e=av(t);if("ENOENT"===e||"ENOTDIR"===e)return!1;throw t}try{let{size:e}=await r.stat();if(0===e)return!1;return await r.write(t,void 0,"utf8"),!0}finally{await r.close()}}var sL="user:profile";[...new Set(["org:create_api_key",sL,sL,"user:inference","user:sessions:claude_code","user:mcp_servers","user:file_upload"])];var sZ={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.com/cai/oauth/authorize",CLAUDE_AI_ORIGIN:"https://claude.ai",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"},sF=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];(s5=s8||(s8={})).assertEqual=e=>{},s5.assertIs=function(e){},s5.assertNever=function(e){throw Error()},s5.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},s5.getValidEnumValues=e=>{let t=s5.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return s5.objectValues(r)},s5.objectValues=e=>s5.objectKeys(e).map(function(t){return e[t]}),s5.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},s5.find=(e,t)=>{for(let r of e)if(t(r))return r},s5.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,s5.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},s5.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(s7||(s7={})).mergeShapes=(e,t)=>({...e,...t});var sq=s8.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),sV=e=>{switch(typeof e){case"undefined":return sq.undefined;case"string":return sq.string;case"number":return Number.isNaN(e)?sq.nan:sq.number;case"boolean":return sq.boolean;case"function":return sq.function;case"bigint":return sq.bigint;case"symbol":return sq.symbol;case"object":if(Array.isArray(e))return sq.array;if(null===e)return sq.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return sq.promise;if("u">typeof Map&&e instanceof Map)return sq.map;if("u">typeof Set&&e instanceof Set)return sq.set;if("u">typeof Date&&e instanceof Date)return sq.date;return sq.object;default:return sq.unknown}},sB=s8.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class sW extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n!==i.path.length-1?e[r]=e[r]||{_errors:[]}:(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))),e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof sW))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,s8.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}sW.create=e=>new sW(e);var sK=(e,t)=>{let r;switch(e.code){case sB.invalid_type:r=e.received===sq.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case sB.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,s8.jsonStringifyReplacer)}`;break;case sB.unrecognized_keys:r=`Unrecognized key(s) in object: ${s8.joinValues(e.keys,", ")}`;break;case sB.invalid_union:r="Invalid input";break;case sB.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${s8.joinValues(e.options)}`;break;case sB.invalid_enum_value:r=`Invalid enum value. Expected ${s8.joinValues(e.options)}, received '${e.received}'`;break;case sB.invalid_arguments:r="Invalid function arguments";break;case sB.invalid_return_type:r="Invalid function return type";break;case sB.invalid_date:r="Invalid date";break;case sB.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:s8.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case sB.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case sB.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case sB.custom:r="Invalid input";break;case sB.invalid_intersection_types:r="Intersection results could not be merged";break;case sB.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case sB.not_finite:r="Number must be finite";break;default:r=t.defaultError,s8.assertNever(e)}return{message:r}},sG=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function sJ(e,t){let r=sG({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,sK,void 0].filter(e=>!!e)});e.common.issues.push(r)}class sH{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return sX;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return sH.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return sX;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&("u">typeof i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}var sX=Object.freeze({status:"aborted"}),sY=e=>({status:"dirty",value:e}),sQ=e=>({status:"valid",value:e}),s0=e=>"u">typeof Promise&&e instanceof Promise;(s3=oe||(oe={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},s3.toString=e=>"string"==typeof e?e:e?.message;class s1{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}var s4=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new sW(e.common.issues);return this._error=t,this._error}}};function s6(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:typeof i.data>"u"?{message:a??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??r??i.defaultError}},description:i}}class s2{get description(){return this._def.description}_getType(e){return sV(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:sV(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new sH,ctx:{common:e.parent.common,data:e.data,parsedType:sV(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(s0(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sV(e)},n=this._parseSync({data:e,path:r.path,parent:r});return s4(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sV(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:sV(e)},n=this._parse({data:e,path:r.path,parent:r});return s4(r,await (s0(n)?n:Promise.resolve(n)))}refine(e,t){return this._refinement((r,n)=>{let i=e(r),a=()=>n.addIssue({code:sB.custom,..."string"==typeof t||typeof t>"u"?{message:t}:"function"==typeof t?t(r):t});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new oG({schema:this,typeName:r.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return oJ.create(this,this._def)}nullable(){return oH.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oN.create(this)}promise(){return oK.create(this,this._def)}or(e){return oC.create([this,e],this._def)}and(e){return oR.create(this,e,this._def)}transform(e){return new oG({...s6(this._def),schema:this,typeName:r.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new oX({...s6(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:r.ZodDefault})}brand(){return new o0({typeName:r.ZodBranded,type:this,...s6(this._def)})}catch(e){return new oY({...s6(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:r.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return o1.create(this,e)}readonly(){return o4.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var s9,s5,s3,s8,s7,oe,ot,or=/^c[^\s-]{8,}$/i,on=/^[0-9a-z]+$/,oi=/^[0-9A-HJKMNP-TV-Z]{26}$/i,oa=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,os=/^[a-z0-9_-]{21}$/i,oo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ol=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ou=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,od=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oc=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,op=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,of=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,om=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,oh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,og="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ov=RegExp(`^${og}$`);function oy(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class o_ extends s2{_parse(e){var t,r,n,i;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==sq.string){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.string,received:t.parsedType}),sX}let a=new sH,s;for(let o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(sJ(s=this._getOrReturnCtx(e,s),{code:sB.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if("max"===o.kind)e.data.length>o.value&&(sJ(s=this._getOrReturnCtx(e,s),{code:sB.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if("length"===o.kind){let t=e.data.length>o.value,r=e.data.length<o.value;(t||r)&&((s=this._getOrReturnCtx(e,s),t)?sJ(s,{code:sB.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):r&&sJ(s,{code:sB.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if("email"===o.kind)ou.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"email",code:sB.invalid_string,message:o.message}),a.dirty());else if("emoji"===o.kind)ot||(ot=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ot.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:sB.invalid_string,message:o.message}),a.dirty());else if("uuid"===o.kind)oa.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:sB.invalid_string,message:o.message}),a.dirty());else if("nanoid"===o.kind)os.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:sB.invalid_string,message:o.message}),a.dirty());else if("cuid"===o.kind)or.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:sB.invalid_string,message:o.message}),a.dirty());else if("cuid2"===o.kind)on.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:sB.invalid_string,message:o.message}),a.dirty());else if("ulid"===o.kind)oi.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:sB.invalid_string,message:o.message}),a.dirty());else if("url"===o.kind)try{new URL(e.data)}catch{sJ(s=this._getOrReturnCtx(e,s),{validation:"url",code:sB.invalid_string,message:o.message}),a.dirty()}else"regex"===o.kind?(o.regex.lastIndex=0,o.regex.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"regex",code:sB.invalid_string,message:o.message}),a.dirty())):"trim"===o.kind?e.data=e.data.trim():"includes"===o.kind?e.data.includes(o.value,o.position)||(sJ(s=this._getOrReturnCtx(e,s),{code:sB.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):"toLowerCase"===o.kind?e.data=e.data.toLowerCase():"toUpperCase"===o.kind?e.data=e.data.toUpperCase():"startsWith"===o.kind?e.data.startsWith(o.value)||(sJ(s=this._getOrReturnCtx(e,s),{code:sB.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):"endsWith"===o.kind?e.data.endsWith(o.value)||(sJ(s=this._getOrReturnCtx(e,s),{code:sB.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):"datetime"===o.kind?(function(e){let t=`${og}T${oy(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(o).test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{code:sB.invalid_string,validation:"datetime",message:o.message}),a.dirty()):"date"===o.kind?ov.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{code:sB.invalid_string,validation:"date",message:o.message}),a.dirty()):"time"===o.kind?RegExp(`^${oy(o)}$`).test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{code:sB.invalid_string,validation:"time",message:o.message}),a.dirty()):"duration"===o.kind?ol.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"duration",code:sB.invalid_string,message:o.message}),a.dirty()):"ip"===o.kind?(t=e.data,("v4"===(r=o.version)||!r)&&od.test(t)||("v6"===r||!r)&&op.test(t)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"ip",code:sB.invalid_string,message:o.message}),a.dirty())):"jwt"===o.kind?!function(e,t){if(!oo.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,o.alg)&&(sJ(s=this._getOrReturnCtx(e,s),{validation:"jwt",code:sB.invalid_string,message:o.message}),a.dirty()):"cidr"===o.kind?(n=e.data,("v4"===(i=o.version)||!i)&&oc.test(n)||("v6"===i||!i)&&of.test(n)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"cidr",code:sB.invalid_string,message:o.message}),a.dirty())):"base64"===o.kind?om.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"base64",code:sB.invalid_string,message:o.message}),a.dirty()):"base64url"===o.kind?oh.test(e.data)||(sJ(s=this._getOrReturnCtx(e,s),{validation:"base64url",code:sB.invalid_string,message:o.message}),a.dirty()):s8.assertNever(o);return{status:a.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:sB.invalid_string,...oe.errToObj(r)})}_addCheck(e){return new o_({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...oe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...oe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...oe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...oe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...oe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...oe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...oe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...oe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...oe.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...oe.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...oe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...oe.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...oe.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...oe.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...oe.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...oe.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...oe.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...oe.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...oe.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...oe.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...oe.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...oe.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...oe.errToObj(t)})}nonempty(e){return this.min(1,oe.errToObj(e))}trim(){return new o_({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new o_({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new o_({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}o_.create=e=>new o_({checks:[],typeName:r.ZodString,coerce:e?.coerce??!1,...s6(e)});class ob extends s2{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==sq.number){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.number,received:t.parsedType}),sX}let t,r=new sH;for(let n of this._def.checks)"int"===n.kind?s8.isInteger(e.data)||(sJ(t=this._getOrReturnCtx(e,t),{code:sB.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(sJ(t=this._getOrReturnCtx(e,t),{code:sB.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(sJ(t=this._getOrReturnCtx(e,t),{code:sB.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,n.value)&&(sJ(t=this._getOrReturnCtx(e,t),{code:sB.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(sJ(t=this._getOrReturnCtx(e,t),{code:sB.not_finite,message:n.message}),r.dirty()):s8.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,oe.toString(t))}gt(e,t){return this.setLimit("min",e,!1,oe.toString(t))}lte(e,t){return this.setLimit("max",e,!0,oe.toString(t))}lt(e,t){return this.setLimit("max",e,!1,oe.toString(t))}setLimit(e,t,r,n){return new ob({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:oe.toString(n)}]})}_addCheck(e){return new ob({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:oe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:oe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:oe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:oe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:oe.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:oe.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:oe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:oe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:oe.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&s8.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}ob.create=e=>new ob({checks:[],typeName:r.ZodNumber,coerce:e?.coerce||!1,...s6(e)});class o$ extends s2{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==sq.bigint)return this._getInvalidInput(e);let t,r=new sH;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(sJ(t=this._getOrReturnCtx(e,t),{code:sB.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(sJ(t=this._getOrReturnCtx(e,t),{code:sB.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(sJ(t=this._getOrReturnCtx(e,t),{code:sB.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):s8.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.bigint,received:t.parsedType}),sX}gte(e,t){return this.setLimit("min",e,!0,oe.toString(t))}gt(e,t){return this.setLimit("min",e,!1,oe.toString(t))}lte(e,t){return this.setLimit("max",e,!0,oe.toString(t))}lt(e,t){return this.setLimit("max",e,!1,oe.toString(t))}setLimit(e,t,r,n){return new o$({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:oe.toString(n)}]})}_addCheck(e){return new o$({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:oe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:oe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:oe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:oe.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:oe.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}o$.create=e=>new o$({checks:[],typeName:r.ZodBigInt,coerce:e?.coerce??!1,...s6(e)});class ow extends s2{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==sq.boolean){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.boolean,received:t.parsedType}),sX}return sQ(e.data)}}ow.create=e=>new ow({typeName:r.ZodBoolean,coerce:e?.coerce||!1,...s6(e)});class ok extends s2{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==sq.date){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.date,received:t.parsedType}),sX}if(Number.isNaN(e.data.getTime()))return sJ(this._getOrReturnCtx(e),{code:sB.invalid_date}),sX;let t=new sH,r;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(sJ(r=this._getOrReturnCtx(e,r),{code:sB.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(sJ(r=this._getOrReturnCtx(e,r),{code:sB.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):s8.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ok({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:oe.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:oe.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ok.create=e=>new ok({checks:[],coerce:e?.coerce||!1,typeName:r.ZodDate,...s6(e)});class ox extends s2{_parse(e){if(this._getType(e)!==sq.symbol){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.symbol,received:t.parsedType}),sX}return sQ(e.data)}}ox.create=e=>new ox({typeName:r.ZodSymbol,...s6(e)});class oS extends s2{_parse(e){if(this._getType(e)!==sq.undefined){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.undefined,received:t.parsedType}),sX}return sQ(e.data)}}oS.create=e=>new oS({typeName:r.ZodUndefined,...s6(e)});class oI extends s2{_parse(e){if(this._getType(e)!==sq.null){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.null,received:t.parsedType}),sX}return sQ(e.data)}}oI.create=e=>new oI({typeName:r.ZodNull,...s6(e)});class oP extends s2{constructor(){super(...arguments),this._any=!0}_parse(e){return sQ(e.data)}}oP.create=e=>new oP({typeName:r.ZodAny,...s6(e)});class oO extends s2{constructor(){super(...arguments),this._unknown=!0}_parse(e){return sQ(e.data)}}oO.create=e=>new oO({typeName:r.ZodUnknown,...s6(e)});class oE extends s2{_parse(e){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.never,received:t.parsedType}),sX}}oE.create=e=>new oE({typeName:r.ZodNever,...s6(e)});class oj extends s2{_parse(e){if(this._getType(e)!==sq.undefined){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.void,received:t.parsedType}),sX}return sQ(e.data)}}oj.create=e=>new oj({typeName:r.ZodVoid,...s6(e)});class oN extends s2{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==sq.array)return sJ(t,{code:sB.invalid_type,expected:sq.array,received:t.parsedType}),sX;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(sJ(t,{code:e?sB.too_big:sB.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(sJ(t,{code:sB.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(sJ(t,{code:sB.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new s1(t,e,t.path,r)))).then(e=>sH.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new s1(t,e,t.path,r)));return sH.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new oN({...this._def,minLength:{value:e,message:oe.toString(t)}})}max(e,t){return new oN({...this._def,maxLength:{value:e,message:oe.toString(t)}})}length(e,t){return new oN({...this._def,exactLength:{value:e,message:oe.toString(t)}})}nonempty(e){return this.min(1,e)}}oN.create=(e,t)=>new oN({type:e,minLength:null,maxLength:null,exactLength:null,typeName:r.ZodArray,...s6(t)});class oT extends s2{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=s8.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==sq.object){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.object,received:t.parsedType}),sX}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof oE&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new s1(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof oE){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(sJ(r,{code:sB.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new s1(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>sH.mergeObjectSync(t,e)):sH.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return oe.errToObj,new oT({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:oe.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new oT({...this._def,unknownKeys:"strip"})}passthrough(){return new oT({...this._def,unknownKeys:"passthrough"})}extend(e){return new oT({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new oT({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:r.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new oT({...this._def,catchall:e})}pick(e){let t={};for(let r of s8.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new oT({...this._def,shape:()=>t})}omit(e){let t={};for(let r of s8.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new oT({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof oT){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=oJ.create(e(i))}return new oT({...t._def,shape:()=>r})}if(t instanceof oN)return new oN({...t._def,type:e(t.element)});if(t instanceof oJ)return oJ.create(e(t.unwrap()));if(t instanceof oH)return oH.create(e(t.unwrap()));if(t instanceof oU)return oU.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of s8.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new oT({...this._def,shape:()=>t})}required(e){let t={};for(let r of s8.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof oJ;)e=e._def.innerType;t[r]=e}return new oT({...this._def,shape:()=>t})}keyof(){return oV(s8.objectKeys(this.shape))}}oT.create=(e,t)=>new oT({shape:()=>e,unknownKeys:"strip",catchall:oE.create(),typeName:r.ZodObject,...s6(t)}),oT.strictCreate=(e,t)=>new oT({shape:()=>e,unknownKeys:"strict",catchall:oE.create(),typeName:r.ZodObject,...s6(t)}),oT.lazycreate=(e,t)=>new oT({shape:e,unknownKeys:"strip",catchall:oE.create(),typeName:r.ZodObject,...s6(t)});class oC extends s2{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new sW(e.ctx.common.issues));return sJ(t,{code:sB.invalid_union,unionErrors:r}),sX});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new sW(e));return sJ(t,{code:sB.invalid_union,unionErrors:i}),sX}}get options(){return this._def.options}}oC.create=(e,t)=>new oC({options:e,typeName:r.ZodUnion,...s6(t)});var oz=e=>{if(e instanceof oF)return oz(e.schema);if(e instanceof oG)return oz(e.innerType());if(e instanceof oq)return[e.value];if(e instanceof oB)return e.options;if(e instanceof oW)return s8.objectValues(e.enum);else if(e instanceof oX)return oz(e._def.innerType);else if(e instanceof oS)return[void 0];else if(e instanceof oI)return[null];else if(e instanceof oJ)return[void 0,...oz(e.unwrap())];else if(e instanceof oH)return[null,...oz(e.unwrap())];else if(e instanceof o0)return oz(e.unwrap());else if(e instanceof o4)return oz(e.unwrap());else if(e instanceof oY)return oz(e._def.innerType);else return[]};class oA extends s2{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==sq.object)return sJ(t,{code:sB.invalid_type,expected:sq.object,received:t.parsedType}),sX;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(sJ(t,{code:sB.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),sX)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let i=new Map;for(let r of t){let t=oz(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let n of t){if(i.has(n))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new oA({typeName:r.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...s6(n)})}}class oR extends s2{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if("aborted"===e.status||"aborted"===n.status)return sX;let i=function e(t,r){let n=sV(t),i=sV(r);if(t===r)return{valid:!0,data:t};if(n===sq.object&&i===sq.object){let n=s8.objectKeys(r),i=s8.objectKeys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===sq.array&&i===sq.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}if(n===sq.date&&i===sq.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return i.valid?(("dirty"===e.status||"dirty"===n.status)&&t.dirty(),{status:t.value,value:i.data}):(sJ(r,{code:sB.invalid_intersection_types}),sX)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}oR.create=(e,t,n)=>new oR({left:e,right:t,typeName:r.ZodIntersection,...s6(n)});class oU extends s2{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sq.array)return sJ(r,{code:sB.invalid_type,expected:sq.array,received:r.parsedType}),sX;if(r.data.length<this._def.items.length)return sJ(r,{code:sB.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),sX;!this._def.rest&&r.data.length>this._def.items.length&&(sJ(r,{code:sB.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new s1(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>sH.mergeArray(t,e)):sH.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new oU({...this._def,rest:e})}}oU.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new oU({items:e,typeName:r.ZodTuple,rest:null,...s6(t)})};class oD extends s2{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sq.object)return sJ(r,{code:sB.invalid_type,expected:sq.object,received:r.parsedType}),sX;let n=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new s1(r,e,r.path,e)),value:a._parse(new s1(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?sH.mergeObjectAsync(t,n):sH.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,n){return new oD(t instanceof s2?{keyType:e,valueType:t,typeName:r.ZodRecord,...s6(n)}:{keyType:o_.create(),valueType:e,typeName:r.ZodRecord,...s6(t)})}}class oM extends s2{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sq.map)return sJ(r,{code:sB.invalid_type,expected:sq.map,received:r.parsedType}),sX;let n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:n._parse(new s1(r,e,r.path,[a,"key"])),value:i._parse(new s1(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return sX;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let{key:n,value:i}=r;if("aborted"===n.status||"aborted"===i.status)return sX;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}oM.create=(e,t,n)=>new oM({valueType:t,keyType:e,typeName:r.ZodMap,...s6(n)});class oL extends s2{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==sq.set)return sJ(r,{code:sB.invalid_type,expected:sq.set,received:r.parsedType}),sX;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(sJ(r,{code:sB.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(sJ(r,{code:sB.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let n of e){if("aborted"===n.status)return sX;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>i._parse(new s1(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new oL({...this._def,minSize:{value:e,message:oe.toString(t)}})}max(e,t){return new oL({...this._def,maxSize:{value:e,message:oe.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}oL.create=(e,t)=>new oL({valueType:e,minSize:null,maxSize:null,typeName:r.ZodSet,...s6(t)});class oZ extends s2{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==sq.function)return sJ(t,{code:sB.invalid_type,expected:sq.function,received:t.parsedType}),sX;function r(e,r){return sG({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,sK,sK].filter(e=>!!e),issueData:{code:sB.invalid_arguments,argumentsError:r}})}function n(e,r){return sG({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,sK,sK].filter(e=>!!e),issueData:{code:sB.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof oK){let e=this;return sQ(async function(...t){let s=new sW([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw s.addIssue(n(l,e)),s})})}{let e=this;return sQ(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new sW([r(t,s.error)]);let o=Reflect.apply(a,this,s.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new sW([n(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new oZ({...this._def,args:oU.create(e).rest(oO.create())})}returns(e){return new oZ({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new oZ({args:e||oU.create([]).rest(oO.create()),returns:t||oO.create(),typeName:r.ZodFunction,...s6(n)})}}class oF extends s2{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}oF.create=(e,t)=>new oF({getter:e,typeName:r.ZodLazy,...s6(t)});class oq extends s2{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return sJ(t,{received:t.data,code:sB.invalid_literal,expected:this._def.value}),sX}return{status:"valid",value:e.data}}get value(){return this._def.value}}function oV(e,t){return new oB({values:e,typeName:r.ZodEnum,...s6(t)})}oq.create=(e,t)=>new oq({value:e,typeName:r.ZodLiteral,...s6(t)});class oB extends s2{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return sJ(t,{expected:s8.joinValues(r),received:t.parsedType,code:sB.invalid_type}),sX}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return sJ(t,{received:t.data,code:sB.invalid_enum_value,options:r}),sX}return sQ(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return oB.create(e,{...this._def,...t})}exclude(e,t=this._def){return oB.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}oB.create=oV;class oW extends s2{_parse(e){let t=s8.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==sq.string&&r.parsedType!==sq.number){let e=s8.objectValues(t);return sJ(r,{expected:s8.joinValues(e),received:r.parsedType,code:sB.invalid_type}),sX}if(this._cache||(this._cache=new Set(s8.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=s8.objectValues(t);return sJ(r,{received:r.data,code:sB.invalid_enum_value,options:e}),sX}return sQ(e.data)}get enum(){return this._def.values}}oW.create=(e,t)=>new oW({values:e,typeName:r.ZodNativeEnum,...s6(t)});class oK extends s2{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==sq.promise&&!1===t.common.async?(sJ(t,{code:sB.invalid_type,expected:sq.promise,received:t.parsedType}),sX):sQ((t.parsedType===sq.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}oK.create=(e,t)=>new oK({type:e,typeName:r.ZodPromise,...s6(t)});class oG extends s2{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===r.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{(sJ(r,e),e.fatal)?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return sX;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?sX:"dirty"===n.status||"dirty"===t.value?sY(n.value):n});{if("aborted"===t.value)return sX;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?sX:"dirty"===n.status||"dirty"===t.value?sY(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?sX:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?sX:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?sX:Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return sX;let a=n.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}s8.assertNever(n)}}oG.create=(e,t,n)=>new oG({schema:e,typeName:r.ZodEffects,effect:t,...s6(n)}),oG.createWithPreprocess=(e,t,n)=>new oG({schema:t,effect:{type:"preprocess",transform:e},typeName:r.ZodEffects,...s6(n)});class oJ extends s2{_parse(e){return this._getType(e)===sq.undefined?sQ(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}oJ.create=(e,t)=>new oJ({innerType:e,typeName:r.ZodOptional,...s6(t)});class oH extends s2{_parse(e){return this._getType(e)===sq.null?sQ(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}oH.create=(e,t)=>new oH({innerType:e,typeName:r.ZodNullable,...s6(t)});class oX extends s2{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===sq.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}oX.create=(e,t)=>new oX({innerType:e,typeName:r.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...s6(t)});class oY extends s2{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return s0(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new sW(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new sW(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}oY.create=(e,t)=>new oY({innerType:e,typeName:r.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...s6(t)});class oQ extends s2{_parse(e){if(this._getType(e)!==sq.nan){let t=this._getOrReturnCtx(e);return sJ(t,{code:sB.invalid_type,expected:sq.nan,received:t.parsedType}),sX}return{status:"valid",value:e.data}}}oQ.create=e=>new oQ({typeName:r.ZodNaN,...s6(e)}),Symbol("zod_brand");class o0 extends s2{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class o1 extends s2{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?sX:"dirty"===e.status?(t.dirty(),sY(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?sX:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new o1({in:e,out:t,typeName:r.ZodPipeline})}}class o4 extends s2{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return s0(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}o4.create=(e,t)=>new o4({innerType:e,typeName:r.ZodReadonly,...s6(t)}),oT.lazycreate,(n=r||(r={})).ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly",o_.create,ob.create,oQ.create,o$.create,ow.create,ok.create,ox.create,oS.create,oI.create,oP.create,oO.create,oE.create,oj.create,oN.create,oT.create,oT.strictCreate,oC.create,oA.create,oR.create,oU.create,oD.create,oM.create,oL.create,oZ.create,oF.create,oq.create,oB.create,oW.create,oK.create,oG.create,oJ.create,oH.create,oG.createWithPreprocess,o1.create;var o6={};C(o6,{version:()=>dl,util:()=>le,treeifyError:()=>l1,toJSONSchema:()=>f2,toDotPath:()=>l4,safeParseAsync:()=>ut,safeParse:()=>l7,registry:()=>pu,regexes:()=>ur,prettifyError:()=>l6,parseAsync:()=>l3,parse:()=>l9,locales:()=>cO,isValidJWT:()=>dR,isValidBase64URL:()=>dC,isValidBase64:()=>dN,globalRegistry:()=>pd,globalConfig:()=>o8,function:()=>f4,formatError:()=>l0,flattenError:()=>lQ,config:()=>o7,clone:()=>lO,_xid:()=>pS,_void:()=>p9,_uuidv7:()=>py,_uuidv6:()=>pv,_uuidv4:()=>pg,_uuid:()=>ph,_url:()=>p_,_uppercase:()=>fg,_unknown:()=>p6,_union:()=>fO,_undefined:()=>p0,_ulid:()=>px,_uint64:()=>pY,_uint32:()=>pW,_tuple:()=>fN,_trim:()=>fx,_transform:()=>fM,_toUpperCase:()=>fI,_toLowerCase:()=>fS,_templateLiteral:()=>fG,_symbol:()=>pQ,_success:()=>fV,_stringbool:()=>fQ,_stringFormat:()=>f0,_string:()=>pc,_startsWith:()=>fy,_size:()=>fd,_set:()=>fz,_safeParseAsync:()=>ue,_safeParse:()=>l8,_regex:()=>fm,_refine:()=>fY,_record:()=>fT,_readonly:()=>fK,_property:()=>fb,_promise:()=>fH,_positive:()=>fn,_pipe:()=>fW,_parseAsync:()=>l5,_parse:()=>l2,_overwrite:()=>fw,_optional:()=>fL,_number:()=>pL,_nullable:()=>fZ,_null:()=>p1,_normalize:()=>fk,_nonpositive:()=>fa,_nonoptional:()=>fq,_nonnegative:()=>fs,_never:()=>p2,_negative:()=>fi,_nativeEnum:()=>fR,_nanoid:()=>p$,_nan:()=>p8,_multipleOf:()=>fo,_minSize:()=>fu,_minLength:()=>fp,_min:()=>fr,_mime:()=>f$,_maxSize:()=>fl,_maxLength:()=>fc,_max:()=>fe,_map:()=>fC,_lte:()=>fe,_lt:()=>p7,_lowercase:()=>fh,_literal:()=>fU,_length:()=>ff,_lazy:()=>fJ,_ksuid:()=>pI,_jwt:()=>pz,_isoTime:()=>pD,_isoDuration:()=>pM,_isoDateTime:()=>pR,_isoDate:()=>pU,_ipv6:()=>pO,_ipv4:()=>pP,_intersection:()=>fj,_int64:()=>pX,_int32:()=>pB,_int:()=>pF,_includes:()=>fv,_guid:()=>pm,_gte:()=>fr,_gt:()=>ft,_float64:()=>pV,_float32:()=>pq,_file:()=>fD,_enum:()=>fA,_endsWith:()=>f_,_emoji:()=>pb,_email:()=>pf,_e164:()=>pC,_discriminatedUnion:()=>fE,_default:()=>fF,_date:()=>p5,_custom:()=>fX,_cuid2:()=>pk,_cuid:()=>pw,_coercedString:()=>pp,_coercedNumber:()=>pZ,_coercedDate:()=>p3,_coercedBoolean:()=>pG,_coercedBigint:()=>pH,_cidrv6:()=>pj,_cidrv4:()=>pE,_catch:()=>fB,_boolean:()=>pK,_bigint:()=>pJ,_base64url:()=>pT,_base64:()=>pN,_array:()=>fP,_any:()=>p4,TimePrecision:()=>pA,NEVER:()=>o2,JSONSchemaGenerator:()=>f6,JSONSchema:()=>f9,Doc:()=>ds,$output:()=>ps,$input:()=>po,$constructor:()=>o9,$brand:()=>o5,$ZodXID:()=>d$,$ZodVoid:()=>dH,$ZodUnknown:()=>dG,$ZodUnion:()=>d2,$ZodUndefined:()=>dB,$ZodUUID:()=>df,$ZodURL:()=>dh,$ZodULID:()=>db,$ZodType:()=>du,$ZodTuple:()=>d8,$ZodTransform:()=>cl,$ZodTemplateLiteral:()=>ck,$ZodSymbol:()=>dV,$ZodSuccess:()=>cg,$ZodStringFormat:()=>dc,$ZodString:()=>dd,$ZodSet:()=>cn,$ZodRegistry:()=>pl,$ZodRecord:()=>ce,$ZodRealError:()=>lY,$ZodReadonly:()=>c$,$ZodPromise:()=>cx,$ZodPrefault:()=>cf,$ZodPipe:()=>c_,$ZodOptional:()=>cu,$ZodObject:()=>d4,$ZodNumberFormat:()=>dL,$ZodNumber:()=>dM,$ZodNullable:()=>cd,$ZodNull:()=>dW,$ZodNonOptional:()=>cm,$ZodNever:()=>dJ,$ZodNanoID:()=>dv,$ZodNaN:()=>cy,$ZodMap:()=>ct,$ZodLiteral:()=>cs,$ZodLazy:()=>cS,$ZodKSUID:()=>dw,$ZodJWT:()=>dU,$ZodIntersection:()=>d5,$ZodISOTime:()=>dS,$ZodISODuration:()=>dI,$ZodISODateTime:()=>dk,$ZodISODate:()=>dx,$ZodIPv6:()=>dO,$ZodIPv4:()=>dP,$ZodGUID:()=>dp,$ZodFunction:()=>f1,$ZodFile:()=>co,$ZodError:()=>lX,$ZodEnum:()=>ca,$ZodEmoji:()=>dg,$ZodEmail:()=>dm,$ZodE164:()=>dA,$ZodDiscriminatedUnion:()=>d9,$ZodDefault:()=>cc,$ZodDate:()=>dX,$ZodCustomStringFormat:()=>dD,$ZodCustom:()=>cI,$ZodCheckUpperCase:()=>u8,$ZodCheckStringFormat:()=>u9,$ZodCheckStartsWith:()=>de,$ZodCheckSizeEquals:()=>u1,$ZodCheckRegex:()=>u5,$ZodCheckProperty:()=>dn,$ZodCheckOverwrite:()=>da,$ZodCheckNumberFormat:()=>uX,$ZodCheckMultipleOf:()=>uH,$ZodCheckMinSize:()=>u0,$ZodCheckMinLength:()=>u6,$ZodCheckMimeType:()=>di,$ZodCheckMaxSize:()=>uQ,$ZodCheckMaxLength:()=>u4,$ZodCheckLowerCase:()=>u3,$ZodCheckLessThan:()=>uG,$ZodCheckLengthEquals:()=>u2,$ZodCheckIncludes:()=>u7,$ZodCheckGreaterThan:()=>uJ,$ZodCheckEndsWith:()=>dt,$ZodCheckBigIntFormat:()=>uY,$ZodCheck:()=>uW,$ZodCatch:()=>cv,$ZodCUID2:()=>d_,$ZodCUID:()=>dy,$ZodCIDRv6:()=>dj,$ZodCIDRv4:()=>dE,$ZodBoolean:()=>dZ,$ZodBigIntFormat:()=>dq,$ZodBigInt:()=>dF,$ZodBase64URL:()=>dz,$ZodBase64:()=>dT,$ZodAsyncError:()=>o3,$ZodArray:()=>dQ,$ZodAny:()=>dK});var o2=Object.freeze({status:"aborted"});function o9(e,t,r){function n(r,n){var i;for(let a in Object.defineProperty(r,"_zod",{value:r._zod??{},enumerable:!1}),(i=r._zod).traits??(i.traits=new Set),r._zod.traits.add(e),t(r,n),s.prototype)a in r||Object.defineProperty(r,a,{value:s.prototype[a].bind(r)});r._zod.constr=s,r._zod.def=n}let i=r?.Parent??Object;class a extends i{}function s(e){var t;let i=r?.Parent?new a:this;for(let r of(n(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))r();return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var o5=Symbol("zod_brand");class o3 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}var o8={};function o7(e){return e&&Object.assign(o8,e),o8}var le={};function lt(e){return e}function lr(e){return e}function ln(e){}function li(e){throw Error()}function la(e){}function ls(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function lo(e,t="|"){return e.map(e=>lN(e)).join(t)}function ll(e,t){return"bigint"==typeof t?t.toString():t}function lu(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ld(e){return null==e}function lc(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function lp(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}function lf(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function lm(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function lh(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function lg(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let r={};for(let n=0;n<t.length;n++)r[t[n]]=e[n];return r})}function lv(e=10){let t="";for(let r=0;r<e;r++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(26*Math.random())];return t}function ly(e){return JSON.stringify(e)}C(le,{unwrapMessage:()=>lq,stringifyPrimitive:()=>lN,required:()=>lL,randomString:()=>lv,propertyKeyTypes:()=>lS,promiseAllObject:()=>lg,primitiveTypes:()=>lI,prefixIssues:()=>lF,pick:()=>lA,partial:()=>lM,optionalKeys:()=>lT,omit:()=>lR,numKeys:()=>lk,nullish:()=>ld,normalizeParams:()=>lE,merge:()=>lD,jsonStringifyReplacer:()=>ll,joinValues:()=>lo,issue:()=>lK,isPlainObject:()=>lw,isObject:()=>lb,getSizableOrigin:()=>lB,getParsedType:()=>lx,getLengthableOrigin:()=>lW,getEnumValues:()=>ls,getElementAtPath:()=>lh,floatSafeRemainder:()=>lp,finalizeIssue:()=>lV,extend:()=>lU,escapeRegex:()=>lP,esc:()=>ly,defineLazy:()=>lf,createTransparentProxy:()=>lj,clone:()=>lO,cleanRegex:()=>lc,cleanEnum:()=>lG,captureStackTrace:()=>l_,cached:()=>lu,assignProp:()=>lm,assertNotEqual:()=>lr,assertNever:()=>li,assertIs:()=>ln,assertEqual:()=>lt,assert:()=>la,allowsEval:()=>l$,aborted:()=>lZ,NUMBER_FORMAT_RANGES:()=>lC,Class:()=>lJ,BIGINT_FORMAT_RANGES:()=>lz});var l_=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function lb(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var l$=lu(()=>{if("u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function lw(e){if(!1===lb(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==lb(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function lk(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var lx=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},lS=new Set(["string","number","symbol"]),lI=new Set(["string","number","bigint","boolean","symbol","undefined"]);function lP(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lO(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function lE(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function lj(e){let t;return new Proxy({},{get:(r,n,i)=>(t??(t=e()),Reflect.get(t,n,i)),set:(r,n,i,a)=>(t??(t=e()),Reflect.set(t,n,i,a)),has:(r,n)=>(t??(t=e()),Reflect.has(t,n)),deleteProperty:(r,n)=>(t??(t=e()),Reflect.deleteProperty(t,n)),ownKeys:r=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(r,n)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)),defineProperty:(r,n,i)=>(t??(t=e()),Reflect.defineProperty(t,n,i))})}function lN(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function lT(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}var lC={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},lz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function lA(e,t){let r={},n=e._zod.def;for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(r[e]=n.shape[e])}return lO(e,{...e._zod.def,shape:r,checks:[]})}function lR(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return lO(e,{...e._zod.def,shape:r,checks:[]})}function lU(e,t){if(!lw(t))throw Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let r={...e._zod.def.shape,...t};return lm(this,"shape",r),r},checks:[]};return lO(e,r)}function lD(e,t){return lO(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return lm(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function lM(e,t,r){let n=t._zod.def.shape,i={...n};if(r)for(let t in r){if(!(t in n))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(let t in n)i[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return lO(t,{...t._zod.def,shape:i,checks:[]})}function lL(e,t,r){let n=t._zod.def.shape,i={...n};if(r)for(let t in r){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);r[t]&&(i[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(let t in n)i[t]=new e({type:"nonoptional",innerType:n[t]});return lO(t,{...t._zod.def,shape:i,checks:[]})}function lZ(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function lF(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function lq(e){return"string"==typeof e?e:e?.message}function lV(e,t,r){let n={...e,path:e.path??[]};return e.message||(n.message=lq(e.inst?._zod.def?.error?.(e))??lq(t?.error?.(e))??lq(r.customError?.(e))??lq(r.localeError?.(e))??"Invalid input"),delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function lB(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function lW(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function lK(...e){let[t,r,n]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:n}:{...t}}function lG(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}class lJ{constructor(...e){}}var lH=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,ll,2),enumerable:!0})},lX=o9("$ZodError",lH),lY=o9("$ZodError",lH,{Parent:Error});function lQ(e,t=e=>e.message){let r={},n=[];for(let i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}function l0(e,t){let r=t||function(e){return e.message},n={_errors:[]},i=e=>{for(let t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>i({issues:e}));else if("invalid_key"===t.code)i({issues:t.issues});else if("invalid_element"===t.code)i({issues:t.issues});else if(0===t.path.length)n._errors.push(r(t));else{let e=n,i=0;for(;i<t.path.length;){let n=t.path[i];i!==t.path.length-1?e[n]=e[n]||{_errors:[]}:(e[n]=e[n]||{_errors:[]},e[n]._errors.push(r(t))),e=e[n],i++}}};return i(e),n}function l1(e,t){let r=t||function(e){return e.message},n={errors:[]},i=(e,t=[])=>{var a,s;for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>i({issues:e},o.path));else if("invalid_key"===o.code)i({issues:o.issues},o.path);else if("invalid_element"===o.code)i({issues:o.issues},o.path);else{let e=[...t,...o.path];if(0===e.length){n.errors.push(r(o));continue}let i=n,l=0;for(;l<e.length;){let t=e[l],n=l===e.length-1;"string"==typeof t?(i.properties??(i.properties={}),(a=i.properties)[t]??(a[t]={errors:[]}),i=i.properties[t]):(i.items??(i.items=[]),(s=i.items)[t]??(s[t]={errors:[]}),i=i.items[t]),n&&i.errors.push(r(o)),l++}}};return i(e),n}function l4(e){let t=[];for(let r of e)"number"==typeof r?t.push(`[${r}]`):"symbol"==typeof r?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function l6(e){let t=[];for(let r of[...e.issues].sort((e,t)=>e.path.length-t.path.length))t.push(`✖ ${r.message}`),r.path?.length&&t.push(` → at ${l4(r.path)}`);return t.join(`
|
|
56
|
+
`)}var l2=e=>(t,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new o3;if(s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>lV(e,a,o7())));throw l_(t,i?.callee),t}return s.value},l9=l2(lY),l5=e=>async(t,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>lV(e,a,o7())));throw l_(t,i?.callee),t}return s.value},l3=l5(lY),l8=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new o3;return a.issues.length?{success:!1,error:new(e??lX)(a.issues.map(e=>lV(e,i,o7())))}:{success:!0,data:a.value}},l7=l8(lY),ue=e=>async(t,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>lV(e,i,o7())))}:{success:!0,data:a.value}},ut=ue(lY),ur={};C(ur,{xid:()=>us,uuid7:()=>uh,uuid6:()=>um,uuid4:()=>uf,uuid:()=>up,uppercase:()=>uB,unicodeEmail:()=>u_,undefined:()=>uq,ulid:()=>ua,time:()=>uA,string:()=>uU,rfc5322Email:()=>uy,number:()=>uL,null:()=>uF,nanoid:()=>ul,lowercase:()=>uV,ksuid:()=>uo,ipv6:()=>ux,ipv4:()=>uk,integer:()=>uM,html5Email:()=>uv,hostname:()=>uE,guid:()=>uc,extendedDuration:()=>ud,emoji:()=>uw,email:()=>ug,e164:()=>uN,duration:()=>uu,domain:()=>uj,datetime:()=>uR,date:()=>uC,cuid2:()=>ui,cuid:()=>un,cidrv6:()=>uI,cidrv4:()=>uS,browserEmail:()=>ub,boolean:()=>uZ,bigint:()=>uD,base64url:()=>uO,base64:()=>uP,_emoji:()=>u$});var un=/^[cC][^\s-]{8,}$/,ui=/^[0-9a-z]+$/,ua=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,us=/^[0-9a-vA-V]{20}$/,uo=/^[A-Za-z0-9]{27}$/,ul=/^[a-zA-Z0-9_-]{21}$/,uu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ud=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uc=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,up=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,uf=up(4),um=up(6),uh=up(7),ug=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,uv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,uy=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,u_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ub=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,u$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function uw(){return RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}var uk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ux=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,uS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,uI=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uP=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uO=/^[A-Za-z0-9_-]*$/,uE=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,uj=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,uN=/^\+(?:[0-9]){6,14}[0-9]$/,uT="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",uC=RegExp(`^${uT}$`);function uz(e){return"number"==typeof e.precision?-1===e.precision?"(?:[01]\\d|2[0-3]):[0-5]\\d":0===e.precision?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function uA(e){return RegExp(`^${uz(e)}$`)}function uR(e){let t=uz({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return RegExp(`^${uT}T(?:${n})$`)}var uU=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t}$`)},uD=/^\d+n?$/,uM=/^\d+$/,uL=/^-?\d+(?:\.\d+)?/i,uZ=/true|false/i,uF=/null/i,uq=/undefined/i,uV=/^[^A-Z]*$/,uB=/^[^a-z]*$/,uW=o9("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),uK={number:"number",bigint:"bigint",object:"date"},uG=o9("$ZodCheckLessThan",(e,t)=>{uW.init(e,t);let r=uK[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,n=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<n&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uJ=o9("$ZodCheckGreaterThan",(e,t)=>{uW.init(e,t);let r=uK[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,n=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>n&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uH=o9("$ZodCheckMultipleOf",(e,t)=>{uW.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value!==BigInt(0):0!==lp(r.value,t.value))&&r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),uX=o9("$ZodCheckNumberFormat",(e,t)=>{uW.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,a]=lC[t.format];e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=a,r&&(n.pattern=uM)}),e._zod.check=s=>{let o=s.value;if(r){if(!Number.isInteger(o))return void s.issues.push({expected:n,format:t.format,code:"invalid_type",input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?s.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}))}o<i&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inst:e})}}),uY=o9("$ZodCheckBigIntFormat",(e,t)=>{uW.init(e,t);let[r,n]=lz[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=r,i.maximum=n}),e._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inst:e})}}),uQ=o9("$ZodCheckMaxSize",(e,t)=>{uW.init(e,t),e._zod.when=e=>{let t=e.value;return!ld(t)&&void 0!==t.size},e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value;n.size<=t.maximum||r.issues.push({origin:lB(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),u0=o9("$ZodCheckMinSize",(e,t)=>{uW.init(e,t),e._zod.when=e=>{let t=e.value;return!ld(t)&&void 0!==t.size},e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value;n.size>=t.minimum||r.issues.push({origin:lB(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),u1=o9("$ZodCheckSizeEquals",(e,t)=>{uW.init(e,t),e._zod.when=e=>{let t=e.value;return!ld(t)&&void 0!==t.size},e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=r=>{let n=r.value,i=n.size;if(i===t.size)return;let a=i>t.size;r.issues.push({origin:lB(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),u4=o9("$ZodCheckMaxLength",(e,t)=>{uW.init(e,t),e._zod.when=e=>{let t=e.value;return!ld(t)&&void 0!==t.length},e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let n=r.value;if(n.length<=t.maximum)return;let i=lW(n);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),u6=o9("$ZodCheckMinLength",(e,t)=>{uW.init(e,t),e._zod.when=e=>{let t=e.value;return!ld(t)&&void 0!==t.length},e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let n=r.value;if(n.length>=t.minimum)return;let i=lW(n);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),u2=o9("$ZodCheckLengthEquals",(e,t)=>{uW.init(e,t),e._zod.when=e=>{let t=e.value;return!ld(t)&&void 0!==t.length},e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let n=r.value,i=n.length;if(i===t.length)return;let a=lW(n),s=i>t.length;r.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),u9=o9("$ZodCheckStringFormat",(e,t)=>{var r,n;(uW.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern)?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),u5=o9("$ZodCheckRegex",(e,t)=>{u9.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),u3=o9("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=uV),u9.init(e,t)}),u8=o9("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=uB),u9.init(e,t)}),u7=o9("$ZodCheckIncludes",(e,t)=>{uW.init(e,t);let r=lP(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),de=o9("$ZodCheckStartsWith",(e,t)=>{uW.init(e,t);let r=RegExp(`^${lP(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),dt=o9("$ZodCheckEndsWith",(e,t)=>{uW.init(e,t);let r=RegExp(`.*${lP(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function dr(e,t,r){e.issues.length&&t.issues.push(...lF(r,e.issues))}var dn=o9("$ZodCheckProperty",(e,t)=>{uW.init(e,t),e._zod.check=e=>{let r=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(r=>dr(r,e,t.property));dr(r,e,t.property)}}),di=o9("$ZodCheckMimeType",(e,t)=>{uW.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e})}}),da=o9("$ZodCheckOverwrite",(e,t)=>{uW.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class ds{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
52
57
|
`).filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join(`
|
|
53
|
-
`))}}var
|
|
58
|
+
`))}}var dl={major:4,minor:0,patch:0},du=o9("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dl;let n=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&n.unshift(e),n))for(let r of t._zod.onattach)r(e);if(0===n.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let n=lZ(e),i;for(let a of t){if(a._zod.when){if(!a._zod.when(e))continue}else if(n)continue;let t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&r?.async===!1)throw new o3;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(n||(n=lZ(e,t)))});else{if(e.issues.length===t)continue;n||(n=lZ(e,t))}}return i?i.then(()=>e):e};e._zod.run=(r,i)=>{let a=e._zod.parse(r,i);if(a instanceof Promise){if(!1===i.async)throw new o3;return a.then(e=>t(e,n,i))}return t(a,n,i)}}e["~standard"]={validate:t=>{try{let r=l7(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return ut(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),dd=o9("$ZodString",(e,t)=>{du.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??uU(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),dc=o9("$ZodStringFormat",(e,t)=>{u9.init(e,t),dd.init(e,t)}),dp=o9("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=uc),dc.init(e,t)}),df=o9("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=up(e))}else t.pattern??(t.pattern=up());dc.init(e,t)}),dm=o9("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ug),dc.init(e,t)}),dh=o9("$ZodURL",(e,t)=>{dc.init(e,t),e._zod.check=r=>{try{let n=r.value,i=new URL(n),a=i.href;t.hostname&&(t.hostname.lastIndex=0,!t.hostname.test(i.hostname))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:uE.source,input:r.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))&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),!n.endsWith("/")&&a.endsWith("/")?r.value=a.slice(0,-1):r.value=a;return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),dg=o9("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=uw()),dc.init(e,t)}),dv=o9("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ul),dc.init(e,t)}),dy=o9("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=un),dc.init(e,t)}),d_=o9("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ui),dc.init(e,t)}),db=o9("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ua),dc.init(e,t)}),d$=o9("$ZodXID",(e,t)=>{t.pattern??(t.pattern=us),dc.init(e,t)}),dw=o9("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=uo),dc.init(e,t)}),dk=o9("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=uR(t)),dc.init(e,t)}),dx=o9("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=uC),dc.init(e,t)}),dS=o9("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=uA(t)),dc.init(e,t)}),dI=o9("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=uu),dc.init(e,t)}),dP=o9("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=uk),dc.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),dO=o9("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ux),dc.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),dE=o9("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=uS),dc.init(e,t)}),dj=o9("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=uI),dc.init(e,t),e._zod.check=r=>{let[n,i]=r.value.split("/");try{if(!i)throw Error();let e=Number(i);if(`${e}`!==i||e<0||e>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function dN(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var dT=o9("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=uP),dc.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{dN(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function dC(e){if(!uO.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return dN(t.padEnd(4*Math.ceil(t.length/4),"="))}var dz=o9("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=uO),dc.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{dC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),dA=o9("$ZodE164",(e,t)=>{t.pattern??(t.pattern=uN),dc.init(e,t)});function dR(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}var dU=o9("$ZodJWT",(e,t)=>{dc.init(e,t),e._zod.check=r=>{dR(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),dD=o9("$ZodCustomStringFormat",(e,t)=>{dc.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),dM=o9("$ZodNumber",(e,t)=>{du.init(e,t),e._zod.pattern=e._zod.bag.pattern??uL,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let a="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),r}}),dL=o9("$ZodNumber",(e,t)=>{uX.init(e,t),dM.init(e,t)}),dZ=o9("$ZodBoolean",(e,t)=>{du.init(e,t),e._zod.pattern=uZ,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),dF=o9("$ZodBigInt",(e,t)=>{du.init(e,t),e._zod.pattern=uD,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(e){}return"bigint"==typeof r.value||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),dq=o9("$ZodBigInt",(e,t)=>{uY.init(e,t),dF.init(e,t)}),dV=o9("$ZodSymbol",(e,t)=>{du.init(e,t),e._zod.parse=(t,r)=>{let n=t.value;return"symbol"==typeof n||t.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),t}}),dB=o9("$ZodUndefined",(e,t)=>{du.init(e,t),e._zod.pattern=uq,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,r)=>{let n=t.value;return typeof n>"u"||t.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),t}}),dW=o9("$ZodNull",(e,t)=>{du.init(e,t),e._zod.pattern=uF,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let n=t.value;return null===n||t.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),t}}),dK=o9("$ZodAny",(e,t)=>{du.init(e,t),e._zod.parse=e=>e}),dG=o9("$ZodUnknown",(e,t)=>{du.init(e,t),e._zod.parse=e=>e}),dJ=o9("$ZodNever",(e,t)=>{du.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),dH=o9("$ZodVoid",(e,t)=>{du.init(e,t),e._zod.parse=(t,r)=>{let n=t.value;return typeof n>"u"||t.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),t}}),dX=o9("$ZodDate",(e,t)=>{du.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(e){}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:e}),r}});function dY(e,t,r){e.issues.length&&t.issues.push(...lF(r,e.issues)),t.value[r]=e.value}var dQ=o9("$ZodArray",(e,t)=>{du.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let s=i[e],o=t.element._zod.run({value:s,issues:[]},n);o instanceof Promise?a.push(o.then(t=>dY(t,r,e))):dY(o,r,e)}return a.length?Promise.all(a).then(()=>r):r}});function d0(e,t,r){e.issues.length&&t.issues.push(...lF(r,e.issues)),t.value[r]=e.value}function d1(e,t,r,n){e.issues.length?void 0===n[r]?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...lF(r,e.issues)):void 0===e.value?r in n&&(t.value[r]=void 0):t.value[r]=e.value}var d4=o9("$ZodObject",(e,t)=>{du.init(e,t);let r=lu(()=>{let e=Object.keys(t.shape);for(let r of e)if(!(t.shape[r]instanceof du))throw Error(`Invalid element at key "${r}": expected a Zod schema`);let r=lT(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}});lf(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let n=e[t]._zod;if(n.values)for(let e of(r[t]??(r[t]=new Set),n.values))r[t].add(e)}return r});let n,i=!o8.jitless,a=i&&l$.value,s=t.catchall,o;e._zod.parse=(l,u)=>{o??(o=r.value);let d=l.value;if(!lb(d))return l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l;let c=[];if(i&&a&&u?.async===!1&&!0!==u.jitless)n||(n=(e=>{let t=new ds(["shape","payload","ctx"]),n=r.value,i=e=>{let t=ly(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let a=Object.create(null),s=0;for(let e of n.keys)a[e]=`key_${s++}`;for(let e of(t.write("const newResult = {}"),n.keys))if(n.optionalKeys.has(e)){let r=a[e];t.write(`const ${r} = ${i(e)};`);let n=ly(e);t.write(`
|
|
54
59
|
if (${r}.issues.length) {
|
|
55
60
|
if (input[${n}] === undefined) {
|
|
56
61
|
if (${n} in input) {
|
|
@@ -72,14 +77,16 @@ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resour
|
|
|
72
77
|
`)}else{let r=a[e];t.write(`const ${r} = ${i(e)};`),t.write(`
|
|
73
78
|
if (${r}.issues.length) payload.issues = payload.issues.concat(${r}.issues.map(iss => ({
|
|
74
79
|
...iss,
|
|
75
|
-
path: iss.path ? [${
|
|
76
|
-
})));`),t.write(`newResult[${o8(e)}] = ${r}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");let o=t.compile();return(t,r)=>o(e,t,r)})(t.shape)),l=n(l,u);else{l.value={};let e=o.shape;for(let t of o.keys){let r=e[t],n=r._zod.run({value:d[t],issues:[]},u),i="optional"===r._zod.optin&&"optional"===r._zod.optout;n instanceof Promise?c.push(n.then(e=>i?dA(e,l,t,d):dz(e,l,t))):i?dA(n,l,t,d):dz(n,l,t)}}if(!s)return c.length?Promise.all(c).then(()=>l):l;let p=[],f=o.keySet,m=s._zod,h=m.def.type;for(let e of Object.keys(d)){if(f.has(e))continue;if("never"===h){p.push(e);continue}let t=m.run({value:d[e],issues:[]},u);t instanceof Promise?c.push(t.then(t=>dz(t,l,e))):dz(t,l,e)}return(p.length&&l.issues.push({code:"unrecognized_keys",keys:p,input:d,inst:e}),c.length)?Promise.all(c).then(()=>l):l}});function dU(e,t,r,n){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>lx(e,n,oq())))}),t}var dD=oM("$ZodUnion",(e,t)=>{uY.init(e,t),o6(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),o6(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),o6(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),o6(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>o1(e.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},n);if(t instanceof Promise)a.push(t),i=!0;else{if(0===t.issues.length)return t;a.push(t)}}return i?Promise.all(a).then(t=>dU(t,r,e,n)):dU(a,r,e,n)}}),dM=oM("$ZodDiscriminatedUnion",(e,t)=>{dD.init(e,t);let r=e._zod.parse;o6(e._zod,"propValues",()=>{let e={};for(let r of t.options){let n=r._zod.propValues;if(!n||0===Object.keys(n).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(n))for(let n of(e[t]||(e[t]=new Set),r))e[t].add(n)}return e});let n=oQ(()=>{let e=t.options,r=new Map;for(let n of e){let e=n._zod.propValues[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,n)}}return r});e._zod.parse=(i,a)=>{let s=i.value;if(!le(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let o=n.value.get(s?.[t.discriminator]);return o?o._zod.run(i,a):t.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),i)}}),dL=oM("$ZodIntersection",(e,t)=>{uY.init(e,t),e._zod.parse=(e,r)=>{let n=e.value,i=t.left._zod.run({value:n,issues:[]},r),a=t.right._zod.run({value:n,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,r])=>dZ(e,t,r)):dZ(e,i,a)}});function dZ(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),l$(e))return e;let n=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(lr(t)&&lr(r)){let n=Object.keys(r),i=Object.keys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};a[n]=i.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}var dF=oM("$ZodTuple",(e,t)=>{uY.init(e,t);let r=t.items,n=r.length-[...r].reverse().findIndex(e=>"optional"!==e._zod.optin);e._zod.parse=(i,a)=>{let s=i.value;if(!Array.isArray(s))return i.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let o=[];if(!t.rest){let t=s.length>r.length,a=s.length<n-1;if(t||a)return i.issues.push({input:s,inst:e,origin:"array",...t?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),i}let l=-1;for(let e of r){if(++l>=s.length&&l>=n)continue;let t=e._zod.run({value:s[l],issues:[]},a);t instanceof Promise?o.push(t.then(e=>dq(e,i,l))):dq(t,i,l)}if(t.rest)for(let e of s.slice(r.length)){l++;let r=t.rest._zod.run({value:e,issues:[]},a);r instanceof Promise?o.push(r.then(e=>dq(e,i,l))):dq(r,i,l)}return o.length?Promise.all(o).then(()=>i):i}});function dq(e,t,r){e.issues.length&&t.issues.push(...lw(r,e.issues)),t.value[r]=e.value}var dV=oM("$ZodRecord",(e,t)=>{uY.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!lr(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let a=[];if(t.keyType._zod.values){let s,o=t.keyType._zod.values;for(let e of(r.value={},o))if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){let s=t.valueType._zod.run({value:i[e],issues:[]},n);s instanceof Promise?a.push(s.then(t=>{t.issues.length&&r.issues.push(...lw(e,t.issues)),r.value[e]=t.value})):(s.issues.length&&r.issues.push(...lw(e,s.issues)),r.value[e]=s.value)}for(let e in i)o.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:s})}else for(let s of(r.value={},Reflect.ownKeys(i))){if("__proto__"===s)continue;let o=t.keyType._zod.run({value:s,issues:[]},n);if(o instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(o.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:o.issues.map(e=>lx(e,n,oq())),input:s,path:[s],inst:e}),r.value[o.value]=o.value;continue}let l=t.valueType._zod.run({value:i[s],issues:[]},n);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&r.issues.push(...lw(s,e.issues)),r.value[o.value]=e.value})):(l.issues.length&&r.issues.push(...lw(s,l.issues)),r.value[o.value]=l.value)}return a.length?Promise.all(a).then(()=>r):r}}),dB=oM("$ZodMap",(e,t)=>{uY.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let a=[];for(let[s,o]of(r.value=new Map,i)){let l=t.keyType._zod.run({value:s,issues:[]},n),u=t.valueType._zod.run({value:o,issues:[]},n);l instanceof Promise||u instanceof Promise?a.push(Promise.all([l,u]).then(([t,a])=>{dW(t,a,r,s,i,e,n)})):dW(l,u,r,s,i,e,n)}return a.length?Promise.all(a).then(()=>r):r}});function dW(e,t,r,n,i,a,s){e.issues.length&&(la.has(typeof n)?r.issues.push(...lw(n,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:a,issues:e.issues.map(e=>lx(e,s,oq()))})),t.issues.length&&(la.has(typeof n)?r.issues.push(...lw(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:t.issues.map(e=>lx(e,s,oq()))})),r.value.set(e.value,t.value)}var dK=oM("$ZodSet",(e,t)=>{uY.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];for(let e of(r.value=new Set,i)){let i=t.valueType._zod.run({value:e,issues:[]},n);i instanceof Promise?a.push(i.then(e=>dG(e,r))):dG(i,r)}return a.length?Promise.all(a).then(()=>r):r}});function dG(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var dJ=oM("$ZodEnum",(e,t)=>{uY.init(e,t);let r=oH(t.entries);e._zod.values=new Set(r),e._zod.pattern=RegExp(`^(${r.filter(e=>la.has(typeof e)).map(e=>"string"==typeof e?lo(e):e.toString()).join("|")})$`),e._zod.parse=(t,n)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:"invalid_value",values:r,input:i,inst:e}),t}}),dH=oM("$ZodLiteral",(e,t)=>{uY.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?lo(e):e?e.toString():String(e)).join("|")})$`),e._zod.parse=(r,n)=>{let i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),dX=oM("$ZodFile",(e,t)=>{uY.init(e,t),e._zod.parse=(t,r)=>{let n=t.value;return n instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),t}}),dY=oM("$ZodTransform",(e,t)=>{uY.init(e,t),e._zod.parse=(e,r)=>{let n=t.transform(e.value,e);if(r.async)return(n instanceof Promise?n:Promise.resolve(n)).then(t=>(e.value=t,e));if(n instanceof Promise)throw new oZ;return e.value=n,e}}),dQ=oM("$ZodOptional",(e,t)=>{uY.init(e,t),e._zod.optin="optional",e._zod.optout="optional",o6(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),o6(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${o1(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>"optional"===t.innerType._zod.optin?t.innerType._zod.run(e,r):void 0===e.value?e:t.innerType._zod.run(e,r)}),d0=oM("$ZodNullable",(e,t)=>{uY.init(e,t),o6(e._zod,"optin",()=>t.innerType._zod.optin),o6(e._zod,"optout",()=>t.innerType._zod.optout),o6(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${o1(e.source)}|null)$`):void 0}),o6(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),d1=oM("$ZodDefault",(e,t)=>{uY.init(e,t),e._zod.optin="optional",o6(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>d4(e,t)):d4(n,t)}});function d4(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var d6=oM("$ZodPrefault",(e,t)=>{uY.init(e,t),e._zod.optin="optional",o6(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),d2=oM("$ZodNonOptional",(e,t)=>{uY.init(e,t),o6(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(t=>d9(t,e)):d9(i,e)}});function d9(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var d5=oM("$ZodSuccess",(e,t)=>{uY.init(e,t),e._zod.parse=(e,r)=>{let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===n.issues.length,e)}}),d3=oM("$ZodCatch",(e,t)=>{uY.init(e,t),e._zod.optin="optional",o6(e._zod,"optout",()=>t.innerType._zod.optout),o6(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(n=>(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>lx(e,r,oq()))},input:e.value}),e.issues=[]),e)):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>lx(e,r,oq()))},input:e.value}),e.issues=[]),e)}}),d8=oM("$ZodNaN",(e,t)=>{uY.init(e,t),e._zod.parse=(t,r)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),d7=oM("$ZodPipe",(e,t)=>{uY.init(e,t),o6(e._zod,"values",()=>t.in._zod.values),o6(e._zod,"optin",()=>t.in._zod.optin),o6(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(e,r)=>{let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>ce(e,t,r)):ce(n,t,r)}});function ce(e,t,r){return l$(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var ct=oM("$ZodReadonly",(e,t)=>{uY.init(e,t),o6(e._zod,"propValues",()=>t.innerType._zod.propValues),o6(e._zod,"values",()=>t.innerType._zod.values),o6(e._zod,"optin",()=>t.innerType._zod.optin),o6(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,r)=>{let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(cr):cr(n)}});function cr(e){return e.value=Object.freeze(e.value),e}var cn=oM("$ZodTemplateLiteral",(e,t)=>{uY.init(e,t);let r=[];for(let e of t.parts)if(e instanceof uY){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let n=+!!t.startsWith("^"),i=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(n,i))}else if(null===e||ls.has(typeof e))r.push(lo(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${r.join("")}$`),e._zod.parse=(t,r)=>("string"!=typeof t.value?t.issues.push({input:t.value,inst:e,expected:"template_literal",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(t.value)||t.issues.push({input:t.value,inst:e,code:"invalid_format",format:"template_literal",pattern:e._zod.pattern.source})),t)}),ci=oM("$ZodPromise",(e,t)=>{uY.init(e,t),e._zod.parse=(e,r)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},r))}),ca=oM("$ZodLazy",(e,t)=>{uY.init(e,t),o6(e._zod,"innerType",()=>t.getter()),o6(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),o6(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),o6(e._zod,"optin",()=>e._zod.innerType._zod.optin),o6(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),cs=oM("$ZodCustom",(e,t)=>{uI.init(e,t),uY.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(t=>co(t,r,n,e));co(i,r,n,e)}});function co(e,t,r,n){if(!e){let e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(lP(e))}}var cl={};function cu(){let e,t;return{localeError:(e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}},t={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},r=>{switch(r.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${r.expected}، ولكن تم إدخال ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`مدخلات غير مقبولة: يفترض إدخال ${lc(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()} ${n.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()} ${n.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if("ends_with"===r.format)return`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`;if("includes"===r.format)return`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`;if("regex"===r.format)return`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`;return`${t[r.format]??r.format} غير مقبول`;case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${oX(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`}})}}function cd(){let e,t;return{localeError:(e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Yanlış dəyər: g\xf6zlənilən ${r.expected}, daxil olan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Yanlış dəyər: g\xf6zlənilən ${lc(r.values[0])}`;return`Yanlış se\xe7im: aşağıdakılardan biri olmalıdır: ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`;if("ends_with"===r.format)return`Yanlış mətn: "${r.suffix}" ilə bitməlidir`;if("includes"===r.format)return`Yanlış mətn: "${r.includes}" daxil olmalıdır`;if("regex"===r.format)return`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${t[r.format]??r.format}`;case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə b\xf6l\xfcnə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan a\xe7ar${r.keys.length>1?"lar":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış a\xe7ar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`}})}}function cc(e,t,r,n){let i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:1===a?t:a>=2&&a<=4?r:n}function cp(){let e,t;return{localeError:(e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}},t={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},r=>{switch(r.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${r.expected}, атрымана ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":if(Array.isArray(e))return"масіў";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Няправільны ўвод: чакалася ${lc(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=cc(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${n.verb} ${t}${r.maximum.toString()} ${e}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=cc(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${n.verb} ${t}${r.minimum.toString()} ${e}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Няправільны радок: павінен пачынацца з "${r.prefix}"`;if("ends_with"===r.format)return`Няправільны радок: павінен заканчвацца на "${r.suffix}"`;if("includes"===r.format)return`Няправільны радок: павінен змяшчаць "${r.includes}"`;if("regex"===r.format)return`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`;return`Няправільны ${t[r.format]??r.format}`;case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`}})}}function cf(){let e,t;return{localeError:(e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}},t={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r=>{switch(r.code){case"invalid_type":return`Tipus inv\xe0lid: s'esperava ${r.expected}, s'ha rebut ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Valor inv\xe0lid: s'esperava ${lc(r.values[0])}`;return`Opci\xf3 inv\xe0lida: s'esperava una de ${oX(r.values," o ")}`;case"too_big":{let t=r.inclusive?"com a màxim":"menys de",n=e[r.origin]??null;if(n)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xe9s ${t} ${r.maximum.toString()} ${n.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"com a mínim":"més de",n=e[r.origin]??null;if(n)return`Massa petit: s'esperava que ${r.origin} contingu\xe9s ${t} ${r.minimum.toString()} ${n.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Format inv\xe0lid: ha de comen\xe7ar amb "${r.prefix}"`;if("ends_with"===r.format)return`Format inv\xe0lid: ha d'acabar amb "${r.suffix}"`;if("includes"===r.format)return`Format inv\xe0lid: ha d'incloure "${r.includes}"`;if("regex"===r.format)return`Format inv\xe0lid: ha de coincidir amb el patr\xf3 ${r.pattern}`;return`Format inv\xe0lid per a ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe0lid: ha de ser m\xfaltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Clau inv\xe0lida a ${r.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element inv\xe0lid a ${r.origin}`}})}}function cm(){let e,t;return{localeError:(e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}},t={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},r=>{switch(r.code){case"invalid_type":return`Neplatn\xfd vstup: oček\xe1v\xe1no ${r.expected}, obdrženo ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":if(Array.isArray(e))return"pole";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Neplatn\xfd vstup: oček\xe1v\xe1no ${lc(r.values[0])}`;return`Neplatn\xe1 možnost: oček\xe1v\xe1na jedna z hodnot ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.maximum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.minimum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neplatn\xfd řetězec: mus\xed zač\xednat na "${r.prefix}"`;if("ends_with"===r.format)return`Neplatn\xfd řetězec: mus\xed končit na "${r.suffix}"`;if("includes"===r.format)return`Neplatn\xfd řetězec: mus\xed obsahovat "${r.includes}"`;if("regex"===r.format)return`Neplatn\xfd řetězec: mus\xed odpov\xeddat vzoru ${r.pattern}`;return`Neplatn\xfd form\xe1t ${t[r.format]??r.format}`;case"not_multiple_of":return`Neplatn\xe9 č\xedslo: mus\xed b\xfdt n\xe1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xe1m\xe9 kl\xedče: ${oX(r.keys,", ")}`;case"invalid_key":return`Neplatn\xfd kl\xedč v ${r.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatn\xe1 hodnota v ${r.origin}`}})}}function ch(){let e,t;return{localeError:(e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}},t={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r=>{switch(r.code){case"invalid_type":return`Ung\xfcltige Eingabe: erwartet ${r.expected}, erhalten ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":if(Array.isArray(e))return"Array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ung\xfcltige Eingabe: erwartet ${lc(r.values[0])}`;return`Ung\xfcltige Option: erwartet eine von ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ${n.unit??"Elemente"} hat`;return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ist`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ${n.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ist`}case"invalid_format":if("starts_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.suffix}" enden`;if("includes"===r.format)return`Ung\xfcltiger String: muss "${r.includes}" enthalten`;if("regex"===r.format)return`Ung\xfcltiger String: muss dem Muster ${r.pattern} entsprechen`;return`Ung\xfcltig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ung\xfcltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Ung\xfcltiger Schl\xfcssel in ${r.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ung\xfcltiger Wert in ${r.origin}`}})}}function cg(){let e,t;return{localeError:(e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${lc(r.values[0])}`;return`Invalid option: expected one of ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`}})}}function cv(){let e,t;return{localeError:(e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}},t={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r=>{switch(r.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${r.expected}, riceviĝis ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":if(Array.isArray(e))return"tabelo";if(null===e)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Nevalida enigo: atendiĝis ${lc(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()} ${n.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${t}${r.minimum.toString()} ${n.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`;if("ends_with"===r.format)return`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`;if("includes"===r.format)return`Nevalida karaktraro: devas inkluzivi "${r.includes}"`;if("regex"===r.format)return`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`;return`Nevalida ${t[r.format]??r.format}`;case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`}})}}function cy(){let e,t;return{localeError:(e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r=>{switch(r.code){case"invalid_type":return`Entrada inv\xe1lida: se esperaba ${r.expected}, recibido ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"arreglo";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: se esperaba ${lc(r.values[0])}`;return`Opci\xf3n inv\xe1lida: se esperaba una de ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Demasiado grande: se esperaba que ${r.origin??"valor"} tuviera ${t}${r.maximum.toString()} ${n.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${r.origin??"valor"} fuera ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Demasiado peque\xf1o: se esperaba que ${r.origin} tuviera ${t}${r.minimum.toString()} ${n.unit}`;return`Demasiado peque\xf1o: se esperaba que ${r.origin} fuera ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cadena inv\xe1lida: debe comenzar con "${r.prefix}"`;if("ends_with"===r.format)return`Cadena inv\xe1lida: debe terminar en "${r.suffix}"`;if("includes"===r.format)return`Cadena inv\xe1lida: debe incluir "${r.includes}"`;if("regex"===r.format)return`Cadena inv\xe1lida: debe coincidir con el patr\xf3n ${r.pattern}`;return`Inv\xe1lido ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe1lido: debe ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Llave inv\xe1lida en ${r.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido en ${r.origin}`}})}}function c_(){let e,t;return{localeError:(e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}},t={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},r=>{switch(r.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${r.expected} میبود، ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"آرایه";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} دریافت شد`;case"invalid_value":if(1===r.values.length)return`ورودی نامعتبر: میبایست ${lc(r.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${oX(r.values,"|")} میبود`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} باشد`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} باشد`}case"invalid_format":if("starts_with"===r.format)return`رشته نامعتبر: باید با "${r.prefix}" شروع شود`;if("ends_with"===r.format)return`رشته نامعتبر: باید با "${r.suffix}" تمام شود`;if("includes"===r.format)return`رشته نامعتبر: باید شامل "${r.includes}" باشد`;if("regex"===r.format)return`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`;return`${t[r.format]??r.format} نامعتبر`;case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${oX(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`}})}}function cb(){let e,t;return{localeError:(e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}},t={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r=>{switch(r.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${r.expected}, oli ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Virheellinen sy\xf6te: t\xe4ytyy olla ${lc(r.values[0])}`;return`Virheellinen valinta: t\xe4ytyy olla yksi seuraavista: ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Liian suuri: ${n.subject} t\xe4ytyy olla ${t}${r.maximum.toString()} ${n.unit}`.trim();return`Liian suuri: arvon t\xe4ytyy olla ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Liian pieni: ${n.subject} t\xe4ytyy olla ${t}${r.minimum.toString()} ${n.unit}`.trim();return`Liian pieni: arvon t\xe4ytyy olla ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy alkaa "${r.prefix}"`;if("ends_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy loppua "${r.suffix}"`;if("includes"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy sis\xe4lt\xe4\xe4 "${r.includes}"`;if("regex"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy vastata s\xe4\xe4nn\xf6llist\xe4 lauseketta ${r.pattern}`;return`Virheellinen ${t[r.format]??r.format}`;case"not_multiple_of":return`Virheellinen luku: t\xe4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${oX(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}})}}function c$(){let e,t;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r=>{switch(r.code){case"invalid_type":return`Entr\xe9e invalide : ${r.expected} attendu, ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":if(Array.isArray(e))return"tableau";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} re\xe7u`;case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : ${lc(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${oX(r.values,"|")} attendue`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Trop grand : ${r.origin??"valeur"} doit ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"élément(s)"}`;return`Trop grand : ${r.origin??"valeur"} doit \xeatre ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Trop petit : ${r.origin} doit ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : ${r.origin} doit \xeatre ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au mod\xe8le ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${oX(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}}function cw(){let e,t;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r=>{switch(r.code){case"invalid_type":return`Entr\xe9e invalide : attendu ${r.expected}, re\xe7u ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : attendu ${lc(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"≤":"<",n=e[r.origin]??null;if(n)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${t}${r.maximum.toString()} ${n.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"≥":">",n=e[r.origin]??null;if(n)return`Trop petit : attendu que ${r.origin} ait ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : attendu que ${r.origin} soit ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au motif ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${oX(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}}function ck(){let e,t;return{localeError:(e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}},t={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"},r=>{switch(r.code){case"invalid_type":return`קלט לא תקין: צריך ${r.expected}, התקבל ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`קלט לא תקין: צריך ${lc(r.values[0])}`;return`קלט לא תקין: צריך אחת מהאפשרויות ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`גדול מדי: ${r.origin??"value"} צריך להיות ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`גדול מדי: ${r.origin??"value"} צריך להיות ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`קטן מדי: ${r.origin} צריך להיות ${t}${r.minimum.toString()} ${n.unit}`;return`קטן מדי: ${r.origin} צריך להיות ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`מחרוזת לא תקינה: חייבת להתחיל ב"${r.prefix}"`;if("ends_with"===r.format)return`מחרוזת לא תקינה: חייבת להסתיים ב "${r.suffix}"`;if("includes"===r.format)return`מחרוזת לא תקינה: חייבת לכלול "${r.includes}"`;if("regex"===r.format)return`מחרוזת לא תקינה: חייבת להתאים לתבנית ${r.pattern}`;return`${t[r.format]??r.format} לא תקין`;case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${r.divisor}`;case"unrecognized_keys":return`מפתח${r.keys.length>1?"ות":""} לא מזוה${r.keys.length>1?"ים":"ה"}: ${oX(r.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${r.origin}`;case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r.origin}`}})}}function cx(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}},t={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},r=>{switch(r.code){case"invalid_type":return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${r.expected}, a kapott \xe9rt\xe9k ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":if(Array.isArray(e))return"tömb";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${lc(r.values[0])}`;return`\xc9rv\xe9nytelen opci\xf3: valamelyik \xe9rt\xe9k v\xe1rt ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`T\xfal nagy: ${r.origin??"érték"} m\xe9rete t\xfal nagy ${t}${r.maximum.toString()} ${n.unit??"elem"}`;return`T\xfal nagy: a bemeneti \xe9rt\xe9k ${r.origin??"érték"} t\xfal nagy: ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} m\xe9rete t\xfal kicsi ${t}${r.minimum.toString()} ${n.unit}`;return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} t\xfal kicsi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.prefix}" \xe9rt\xe9kkel kell kezdődnie`;if("ends_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.suffix}" \xe9rt\xe9kkel kell v\xe9gződnie`;if("includes"===r.format)return`\xc9rv\xe9nytelen string: "${r.includes}" \xe9rt\xe9ket kell tartalmaznia`;if("regex"===r.format)return`\xc9rv\xe9nytelen string: ${r.pattern} mint\xe1nak kell megfelelnie`;return`\xc9rv\xe9nytelen ${t[r.format]??r.format}`;case"not_multiple_of":return`\xc9rv\xe9nytelen sz\xe1m: ${r.divisor} t\xf6bbsz\xf6r\xf6s\xe9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`\xc9rv\xe9nytelen kulcs ${r.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`\xc9rv\xe9nytelen \xe9rt\xe9k: ${r.origin}`}})}}function cS(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}},t={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Input tidak valid: diharapkan ${r.expected}, diterima ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input tidak valid: diharapkan ${lc(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak valid: harus dimulai dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak valid: harus berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak valid: harus menyertakan "${r.includes}"`;if("regex"===r.format)return`String tidak valid: harus sesuai pola ${r.pattern}`;return`${t[r.format]??r.format} tidak valid`;case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`}})}}function cI(){let e,t;return{localeError:(e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}},t={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Input non valido: atteso ${r.expected}, ricevuto ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":if(Array.isArray(e))return"vettore";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input non valido: atteso ${lc(r.values[0])}`;return`Opzione non valida: atteso uno tra ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Troppo grande: ${r.origin??"valore"} deve avere ${t}${r.maximum.toString()} ${n.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Troppo piccolo: ${r.origin} deve avere ${t}${r.minimum.toString()} ${n.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Stringa non valida: deve iniziare con "${r.prefix}"`;if("ends_with"===r.format)return`Stringa non valida: deve terminare con "${r.suffix}"`;if("includes"===r.format)return`Stringa non valida: deve includere "${r.includes}"`;if("regex"===r.format)return`Stringa non valida: deve corrispondere al pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`}})}}function cP(){let e,t;return{localeError:(e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}},t={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},r=>{switch(r.code){case"invalid_type":return`無効な入力: ${r.expected}が期待されましたが、${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":if(Array.isArray(e))return"配列";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}が入力されました`;case"invalid_value":if(1===r.values.length)return`無効な入力: ${lc(r.values[0])}が期待されました`;return`無効な選択: ${oX(r.values,"、")}のいずれかである必要があります`;case"too_big":{let t=r.inclusive?"以下である":"より小さい",n=e[r.origin]??null;if(n)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${n.unit??"要素"}${t}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${t}必要があります`}case"too_small":{let t=r.inclusive?"以上である":"より大きい",n=e[r.origin]??null;if(n)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${n.unit}${t}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${t}必要があります`}case"invalid_format":if("starts_with"===r.format)return`無効な文字列: "${r.prefix}"で始まる必要があります`;if("ends_with"===r.format)return`無効な文字列: "${r.suffix}"で終わる必要があります`;if("includes"===r.format)return`無効な文字列: "${r.includes}"を含む必要があります`;if("regex"===r.format)return`無効な文字列: パターン${r.pattern}に一致する必要があります`;return`無効な${t[r.format]??r.format}`;case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${oX(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`}})}}function cO(){let e,t;return{localeError:(e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}},t={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},r=>{switch(r.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r.expected} ប៉ុន្តែទទួលបាន ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":if(Array.isArray(e))return"អារេ (Array)";if(null===e)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${lc(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()} ${n.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()} ${n.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${r.prefix}"`;if("ends_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${r.suffix}"`;if("includes"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${r.includes}"`;if("regex"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${r.pattern}`;return`មិនត្រឹមត្រូវ៖ ${t[r.format]??r.format}`;case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${oX(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`}})}}function cE(){let e,t;return{localeError:(e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}},t={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},r=>{switch(r.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${r.expected}, 받은 타입은 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}입니다`;case"invalid_value":if(1===r.values.length)return`잘못된 입력: 값은 ${lc(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${oX(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let t=r.inclusive?"이하":"미만",n="미만"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${t}${n}`}case"too_small":{let t=r.inclusive?"이상":"초과",n="이상"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${t}${n}`}case"invalid_format":if("starts_with"===r.format)return`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`;if("ends_with"===r.format)return`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`;if("includes"===r.format)return`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`;if("regex"===r.format)return`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${t[r.format]??r.format}`;case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${oX(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`}})}}function cj(){let e,t;return{localeError:(e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}},t={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},r=>{switch(r.code){case"invalid_type":return`Грешен внес: се очекува ${r.expected}, примено ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"број";case"object":if(Array.isArray(e))return"низа";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${lc(r.values[0])}`;return`Грешана опција: се очекува една ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${t}${r.maximum.toString()} ${n.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Премногу мал: се очекува ${r.origin} да има ${t}${r.minimum.toString()} ${n.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неважечка низа: мора да започнува со "${r.prefix}"`;if("ends_with"===r.format)return`Неважечка низа: мора да завршува со "${r.suffix}"`;if("includes"===r.format)return`Неважечка низа: мора да вклучува "${r.includes}"`;if("regex"===r.format)return`Неважечка низа: мора да одгоара на патернот ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`}})}}function cN(){let e,t;return{localeError:(e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}},t={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Input tidak sah: dijangka ${r.expected}, diterima ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input tidak sah: dijangka ${lc(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: dijangka ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak sah: mesti bermula dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak sah: mesti berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak sah: mesti mengandungi "${r.includes}"`;if("regex"===r.format)return`String tidak sah: mesti sepadan dengan corak ${r.pattern}`;return`${t[r.format]??r.format} tidak sah`;case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${oX(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`}})}}function cT(){let e,t;return{localeError:(e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}},t={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r=>{switch(r.code){case"invalid_type":return`Ongeldige invoer: verwacht ${r.expected}, ontving ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ongeldige invoer: verwacht ${lc(r.values[0])}`;return`Ongeldige optie: verwacht \xe9\xe9n van ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Te lang: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} ${n.unit??"elementen"} bevat`;return`Te lang: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} is`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Te kort: verwacht dat ${r.origin} ${t}${r.minimum.toString()} ${n.unit} bevat`;return`Te kort: verwacht dat ${r.origin} ${t}${r.minimum.toString()} is`}case"invalid_format":if("starts_with"===r.format)return`Ongeldige tekst: moet met "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ongeldige tekst: moet op "${r.suffix}" eindigen`;if("includes"===r.format)return`Ongeldige tekst: moet "${r.includes}" bevatten`;if("regex"===r.format)return`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`;return`Ongeldig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`}})}}function cC(){let e,t;return{localeError:(e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}},t={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Ugyldig input: forventet ${r.expected}, fikk ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":if(Array.isArray(e))return"liste";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ugyldig verdi: forventet ${lc(r.values[0])}`;return`Ugyldig valg: forventet en av ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()} ${n.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()} ${n.unit}`;return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: m\xe5 starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: m\xe5 ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: m\xe5 inneholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: m\xe5 matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldig tall: m\xe5 v\xe6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8kkel i ${r.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`}})}}function cz(){let e,t;return{localeError:(e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}},t={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},r=>{switch(r.code){case"invalid_type":return`F\xe2sit giren: umulan ${r.expected}, alınan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":if(Array.isArray(e))return"saf";if(null===e)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`F\xe2sit giren: umulan ${lc(r.values[0])}`;return`F\xe2sit tercih: m\xfbteberler ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} ${n.unit??"elements"} sahip olmalıydı.`;return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} olmalıydı.`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} ${n.unit} sahip olmalıydı.`;return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} olmalıydı.`}case"invalid_format":if("starts_with"===r.format)return`F\xe2sit metin: "${r.prefix}" ile başlamalı.`;if("ends_with"===r.format)return`F\xe2sit metin: "${r.suffix}" ile bitmeli.`;if("includes"===r.format)return`F\xe2sit metin: "${r.includes}" ihtiv\xe2 etmeli.`;if("regex"===r.format)return`F\xe2sit metin: ${r.pattern} nakşına uymalı.`;return`F\xe2sit ${t[r.format]??r.format}`;case"not_multiple_of":return`F\xe2sit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7in tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} i\xe7in tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}})}}function cA(){let e,t;return{localeError:(e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}},t={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},r=>{switch(r.code){case"invalid_type":return`ناسم ورودي: باید ${r.expected} وای, مګر ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"ارې";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} ترلاسه شو`;case"invalid_value":if(1===r.values.length)return`ناسم ورودي: باید ${lc(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${oX(r.values,"|")} څخه وای`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} وي`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} وي`}case"invalid_format":if("starts_with"===r.format)return`ناسم متن: باید د "${r.prefix}" سره پیل شي`;if("ends_with"===r.format)return`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`;if("includes"===r.format)return`ناسم متن: باید "${r.includes}" ولري`;if("regex"===r.format)return`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`;return`${t[r.format]??r.format} ناسم دی`;case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${oX(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`}})}}function cR(){let e,t;return{localeError:(e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}},t={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},r=>{switch(r.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${r.expected}, otrzymano ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":if(Array.isArray(e))return"tablica";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Nieprawidłowe dane wejściowe: oczekiwano ${lc(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.maximum.toString()} ${n.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.minimum.toString()} ${n.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zaczynać się od "${r.prefix}"`;if("ends_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi kończyć się na "${r.suffix}"`;if("includes"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zawierać "${r.includes}"`;if("regex"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi odpowiadać wzorcowi ${r.pattern}`;return`Nieprawidłow(y/a/e) ${t[r.format]??r.format}`;case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`}})}}function cU(){let e,t;return{localeError:(e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}},t={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r=>{switch(r.code){case"invalid_type":return`Tipo inv\xe1lido: esperado ${r.expected}, recebido ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"array";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: esperado ${lc(r.values[0])}`;return`Op\xe7\xe3o inv\xe1lida: esperada uma das ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${t}${r.maximum.toString()} ${n.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Muito pequeno: esperado que ${r.origin} tivesse ${t}${r.minimum.toString()} ${n.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Texto inv\xe1lido: deve come\xe7ar com "${r.prefix}"`;if("ends_with"===r.format)return`Texto inv\xe1lido: deve terminar com "${r.suffix}"`;if("includes"===r.format)return`Texto inv\xe1lido: deve incluir "${r.includes}"`;if("regex"===r.format)return`Texto inv\xe1lido: deve corresponder ao padr\xe3o ${r.pattern}`;return`${t[r.format]??r.format} inv\xe1lido`;case"not_multiple_of":return`N\xfamero inv\xe1lido: deve ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Chave inv\xe1lida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido em ${r.origin}`;default:return"Campo inválido"}})}}function cD(e,t,r,n){let i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:1===a?t:a>=2&&a<=4?r:n}function cM(){let e,t;return{localeError:(e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}},t={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},r=>{switch(r.code){case"invalid_type":return`Неверный ввод: ожидалось ${r.expected}, получено ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"массив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Неверный ввод: ожидалось ${lc(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=cD(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${t}${r.maximum.toString()} ${e}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=cD(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${t}${r.minimum.toString()} ${e}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неверная строка: должна начинаться с "${r.prefix}"`;if("ends_with"===r.format)return`Неверная строка: должна заканчиваться на "${r.suffix}"`;if("includes"===r.format)return`Неверная строка: должна содержать "${r.includes}"`;if("regex"===r.format)return`Неверная строка: должна соответствовать шаблону ${r.pattern}`;return`Неверный ${t[r.format]??r.format}`;case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`}})}}function cL(){let e,t;return{localeError:(e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}},t={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},r=>{switch(r.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${r.expected}, prejeto ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"število";case"object":if(Array.isArray(e))return"tabela";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Neveljaven vnos: pričakovano ${lc(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${t}${r.maximum.toString()} ${n.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${t}${r.minimum.toString()} ${n.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neveljaven niz: mora se začeti z "${r.prefix}"`;if("ends_with"===r.format)return`Neveljaven niz: mora se končati z "${r.suffix}"`;if("includes"===r.format)return`Neveljaven niz: mora vsebovati "${r.includes}"`;if("regex"===r.format)return`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`;return`Neveljaven ${t[r.format]??r.format}`;case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`}})}}function cZ(){let e,t;return{localeError:(e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}},t={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r=>{switch(r.code){case"invalid_type":return`Ogiltig inmatning: f\xf6rv\xe4ntat ${r.expected}, fick ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":if(Array.isArray(e))return"lista";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ogiltig inmatning: f\xf6rv\xe4ntat ${lc(r.values[0])}`;return`Ogiltigt val: f\xf6rv\xe4ntade en av ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`F\xf6r stor(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`F\xf6r stor(t): f\xf6rv\xe4ntat ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()} ${n.unit}`;return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste b\xf6rja med "${r.prefix}"`;if("ends_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste sluta med "${r.suffix}"`;if("includes"===r.format)return`Ogiltig str\xe4ng: m\xe5ste inneh\xe5lla "${r.includes}"`;if("regex"===r.format)return`Ogiltig str\xe4ng: m\xe5ste matcha m\xf6nstret "${r.pattern}"`;return`Ogiltig(t) ${t[r.format]??r.format}`;case"not_multiple_of":return`Ogiltigt tal: m\xe5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${oX(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xe4rde i ${r.origin??"värdet"}`}})}}function cF(){let e,t;return{localeError:(e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}},t={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r.expected}, பெறப்பட்டது ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":if(Array.isArray(e))return"அணி";if(null===e)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${lc(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${oX(r.values,"|")} இல் ஒன்று`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ${n.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":if("starts_with"===r.format)return`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`;if("ends_with"===r.format)return`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`;if("includes"===r.format)return`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`;if("regex"===r.format)return`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${t[r.format]??r.format}`;case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`}})}}function cq(){let e,t;return{localeError:(e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}},t={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},r=>{switch(r.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r.expected} แต่ได้รับ ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":if(Array.isArray(e))return"อาร์เรย์ (Array)";if(null===e)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`ค่าไม่ถูกต้อง: ควรเป็น ${lc(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"ไม่เกิน":"น้อยกว่า",n=e[r.origin]??null;if(n)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()} ${n.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"อย่างน้อย":"มากกว่า",n=e[r.origin]??null;if(n)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()} ${n.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`;if("ends_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`;if("includes"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`;if("regex"===r.format)return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`;return`รูปแบบไม่ถูกต้อง: ${t[r.format]??r.format}`;case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${oX(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}})}}function cV(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}},t={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},r=>{switch(r.code){case"invalid_type":return`Ge\xe7ersiz değer: beklenen ${r.expected}, alınan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ge\xe7ersiz değer: beklenen ${lc(r.values[0])}`;return`Ge\xe7ersiz se\xe7enek: aşağıdakilerden biri olmalı: ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()} ${n.unit??"öğe"}`;return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ge\xe7ersiz metin: "${r.prefix}" ile başlamalı`;if("ends_with"===r.format)return`Ge\xe7ersiz metin: "${r.suffix}" ile bitmeli`;if("includes"===r.format)return`Ge\xe7ersiz metin: "${r.includes}" i\xe7ermeli`;if("regex"===r.format)return`Ge\xe7ersiz metin: ${r.pattern} desenine uymalı`;return`Ge\xe7ersiz ${t[r.format]??r.format}`;case"not_multiple_of":return`Ge\xe7ersiz sayı: ${r.divisor} ile tam b\xf6l\xfcnebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7inde ge\xe7ersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${r.origin} i\xe7inde ge\xe7ersiz değer`}})}}function cB(){let e,t;return{localeError:(e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}},t={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},r=>{switch(r.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${r.expected}, отримано ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Неправильні вхідні дані: очікується ${lc(r.values[0])}`;return`Неправильна опція: очікується одне з ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Занадто велике: очікується, що ${r.origin??"значення"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"елементів"}`;return`Занадто велике: очікується, що ${r.origin??"значення"} буде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Занадто мале: очікується, що ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неправильний рядок: повинен починатися з "${r.prefix}"`;if("ends_with"===r.format)return`Неправильний рядок: повинен закінчуватися на "${r.suffix}"`;if("includes"===r.format)return`Неправильний рядок: повинен містити "${r.includes}"`;if("regex"===r.format)return`Неправильний рядок: повинен відповідати шаблону ${r.pattern}`;return`Неправильний ${t[r.format]??r.format}`;case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${oX(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`}})}}function cW(){let e,t;return{localeError:(e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}},t={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},r=>{switch(r.code){case"invalid_type":return`غلط ان پٹ: ${r.expected} متوقع تھا، ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":if(Array.isArray(e))return"آرے";if(null===e)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} موصول ہوا`;case"invalid_value":if(1===r.values.length)return`غلط ان پٹ: ${lc(r.values[0])} متوقع تھا`;return`غلط آپشن: ${oX(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${t}${r.maximum.toString()} ${n.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${t}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`بہت چھوٹا: ${r.origin} کے ${t}${r.minimum.toString()} ${n.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${t}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":if("starts_with"===r.format)return`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`;if("ends_with"===r.format)return`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`;if("includes"===r.format)return`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`;if("regex"===r.format)return`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`;return`غلط ${t[r.format]??r.format}`;case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${oX(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`}})}}function cK(){let e,t;return{localeError:(e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}},t={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},r=>{switch(r.code){case"invalid_type":return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${r.expected}, nhận được ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"số";case"object":if(Array.isArray(e))return"mảng";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${lc(r.values[0])}`;return`T\xf9y chọn kh\xf4ng hợp lệ: mong đợi một trong c\xe1c gi\xe1 trị ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"phần tử"}`;return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bắt đầu bằng "${r.prefix}"`;if("ends_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải kết th\xfac bằng "${r.suffix}"`;if("includes"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bao gồm "${r.includes}"`;if("regex"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải khớp với mẫu ${r.pattern}`;return`${t[r.format]??r.format} kh\xf4ng hợp lệ`;case"not_multiple_of":return`Số kh\xf4ng hợp lệ: phải l\xe0 bội số của ${r.divisor}`;case"unrecognized_keys":return`Kh\xf3a kh\xf4ng được nhận dạng: ${oX(r.keys,", ")}`;case"invalid_key":return`Kh\xf3a kh\xf4ng hợp lệ trong ${r.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Gi\xe1 trị kh\xf4ng hợp lệ trong ${r.origin}`}})}}function cG(){let e,t;return{localeError:(e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}},t={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},r=>{switch(r.code){case"invalid_type":return`无效输入:期望 ${r.expected},实际接收 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":if(Array.isArray(e))return"数组";if(null===e)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`无效输入:期望 ${lc(r.values[0])}`;return`无效选项:期望以下之一 ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()} ${n.unit??"个元素"}`;return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`无效字符串:必须以 "${r.prefix}" 开头`;if("ends_with"===r.format)return`无效字符串:必须以 "${r.suffix}" 结尾`;if("includes"===r.format)return`无效字符串:必须包含 "${r.includes}"`;if("regex"===r.format)return`无效字符串:必须满足正则表达式 ${r.pattern}`;return`无效${t[r.format]??r.format}`;case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${oX(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`}})}}function cJ(){let e,t;return{localeError:(e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}},t={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},r=>{switch(r.code){case"invalid_type":return`無效的輸入值:預期為 ${r.expected},但收到 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`無效的輸入值:預期為 ${lc(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${oX(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()} ${n.unit??"個元素"}`;return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()} ${n.unit}`;return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`無效的字串:必須以 "${r.prefix}" 開頭`;if("ends_with"===r.format)return`無效的字串:必須以 "${r.suffix}" 結尾`;if("includes"===r.format)return`無效的字串:必須包含 "${r.includes}"`;if("regex"===r.format)return`無效的字串:必須符合格式 ${r.pattern}`;return`無效的 ${t[r.format]??r.format}`;case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${oX(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`}})}}C(cl,{zhTW:()=>cJ,zhCN:()=>cG,vi:()=>cK,ur:()=>cW,ua:()=>cB,tr:()=>cV,th:()=>cq,ta:()=>cF,sv:()=>cZ,sl:()=>cL,ru:()=>cM,pt:()=>cU,ps:()=>cA,pl:()=>cR,ota:()=>cz,no:()=>cC,nl:()=>cT,ms:()=>cN,mk:()=>cj,ko:()=>cE,kh:()=>cO,ja:()=>cP,it:()=>cI,id:()=>cS,hu:()=>cx,he:()=>ck,frCA:()=>cw,fr:()=>c$,fi:()=>cb,fa:()=>c_,es:()=>cy,eo:()=>cv,en:()=>cg,de:()=>ch,cs:()=>cm,ca:()=>cf,be:()=>cp,az:()=>cd,ar:()=>cu});var cH=Symbol("ZodOutput"),cX=Symbol("ZodInput");class cY{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&"object"==typeof r&&"id"in r){if(this._idmap.has(r.id))throw Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}remove(e){return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};return delete r.id,{...r,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function cQ(){return new cY}var c0=cQ();function c1(e,t){return new e({type:"string",...lu(t)})}function c4(e,t){return new e({type:"string",coerce:!0,...lu(t)})}function c6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...lu(t)})}function c2(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...lu(t)})}function c9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...lu(t)})}function c5(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...lu(t)})}function c3(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...lu(t)})}function c8(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...lu(t)})}function c7(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...lu(t)})}function pe(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...lu(t)})}function pt(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...lu(t)})}function pr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...lu(t)})}function pn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...lu(t)})}function pi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...lu(t)})}function pa(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...lu(t)})}function ps(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...lu(t)})}function po(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...lu(t)})}function pl(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...lu(t)})}function pu(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...lu(t)})}function pd(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...lu(t)})}function pc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...lu(t)})}function pp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...lu(t)})}function pf(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...lu(t)})}function pm(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...lu(t)})}var ph={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function pg(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...lu(t)})}function pv(e,t){return new e({type:"string",format:"date",check:"string_format",...lu(t)})}function py(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...lu(t)})}function p_(e,t){return new e({type:"string",format:"duration",check:"string_format",...lu(t)})}function pb(e,t){return new e({type:"number",checks:[],...lu(t)})}function p$(e,t){return new e({type:"number",coerce:!0,checks:[],...lu(t)})}function pw(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...lu(t)})}function pk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...lu(t)})}function px(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...lu(t)})}function pS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...lu(t)})}function pI(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...lu(t)})}function pP(e,t){return new e({type:"boolean",...lu(t)})}function pO(e,t){return new e({type:"boolean",coerce:!0,...lu(t)})}function pE(e,t){return new e({type:"bigint",...lu(t)})}function pj(e,t){return new e({type:"bigint",coerce:!0,...lu(t)})}function pN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...lu(t)})}function pT(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...lu(t)})}function pC(e,t){return new e({type:"symbol",...lu(t)})}function pz(e,t){return new e({type:"undefined",...lu(t)})}function pA(e,t){return new e({type:"null",...lu(t)})}function pR(e){return new e({type:"any"})}function pU(e){return new e({type:"unknown"})}function pD(e,t){return new e({type:"never",...lu(t)})}function pM(e,t){return new e({type:"void",...lu(t)})}function pL(e,t){return new e({type:"date",...lu(t)})}function pZ(e,t){return new e({type:"date",coerce:!0,...lu(t)})}function pF(e,t){return new e({type:"nan",...lu(t)})}function pq(e,t){return new uO({check:"less_than",...lu(t),value:e,inclusive:!1})}function pV(e,t){return new uO({check:"less_than",...lu(t),value:e,inclusive:!0})}function pB(e,t){return new uE({check:"greater_than",...lu(t),value:e,inclusive:!1})}function pW(e,t){return new uE({check:"greater_than",...lu(t),value:e,inclusive:!0})}function pK(e){return pB(0,e)}function pG(e){return pq(0,e)}function pJ(e){return pV(0,e)}function pH(e){return pW(0,e)}function pX(e,t){return new uj({check:"multiple_of",...lu(t),value:e})}function pY(e,t){return new uC({check:"max_size",...lu(t),maximum:e})}function pQ(e,t){return new uz({check:"min_size",...lu(t),minimum:e})}function p0(e,t){return new uA({check:"size_equals",...lu(t),size:e})}function p1(e,t){return new uR({check:"max_length",...lu(t),maximum:e})}function p4(e,t){return new uU({check:"min_length",...lu(t),minimum:e})}function p6(e,t){return new uD({check:"length_equals",...lu(t),length:e})}function p2(e,t){return new uL({check:"string_format",format:"regex",...lu(t),pattern:e})}function p9(e){return new uZ({check:"string_format",format:"lowercase",...lu(e)})}function p5(e){return new uF({check:"string_format",format:"uppercase",...lu(e)})}function p3(e,t){return new uq({check:"string_format",format:"includes",...lu(t),includes:e})}function p8(e,t){return new uV({check:"string_format",format:"starts_with",...lu(t),prefix:e})}function p7(e,t){return new uB({check:"string_format",format:"ends_with",...lu(t),suffix:e})}function fe(e,t,r){return new uK({check:"property",property:e,schema:t,...lu(r)})}function ft(e,t){return new uG({check:"mime_type",mime:e,...lu(t)})}function fr(e){return new uJ({check:"overwrite",tx:e})}function fn(e){return fr(t=>t.normalize(e))}function fi(){return fr(e=>e.trim())}function fa(){return fr(e=>e.toLowerCase())}function fs(){return fr(e=>e.toUpperCase())}function fo(e,t,r){return new e({type:"array",element:t,...lu(r)})}function fl(e,t,r){return new e({type:"union",options:t,...lu(r)})}function fu(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...lu(n)})}function fd(e,t,r){return new e({type:"intersection",left:t,right:r})}function fc(e,t,r,n){let i=r instanceof uY;return new e({type:"tuple",items:t,rest:i?r:null,...lu(i?n:r)})}function fp(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...lu(n)})}function ff(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...lu(n)})}function fm(e,t,r){return new e({type:"set",valueType:t,...lu(r)})}function fh(e,t,r){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...lu(r)})}function fg(e,t,r){return new e({type:"enum",entries:t,...lu(r)})}function fv(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...lu(r)})}function fy(e,t){return new e({type:"file",...lu(t)})}function f_(e,t){return new e({type:"transform",transform:t})}function fb(e,t){return new e({type:"optional",innerType:t})}function f$(e,t){return new e({type:"nullable",innerType:t})}function fw(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():r}})}function fk(e,t,r){return new e({type:"nonoptional",innerType:t,...lu(r)})}function fx(e,t){return new e({type:"success",innerType:t})}function fS(e,t,r){return new e({type:"catch",innerType:t,catchValue:"function"==typeof r?r:()=>r})}function fI(e,t,r){return new e({type:"pipe",in:t,out:r})}function fP(e,t){return new e({type:"readonly",innerType:t})}function fO(e,t,r){return new e({type:"template_literal",parts:t,...lu(r)})}function fE(e,t){return new e({type:"lazy",getter:t})}function fj(e,t){return new e({type:"promise",innerType:t})}function fN(e,t,r){let n=lu(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function fT(e,t,r){return new e({type:"custom",check:"custom",fn:t,...lu(r)})}function fC(e,t){let r=lu(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];"sensitive"!==r.case&&(n=n.map(e=>"string"==typeof e?e.toLowerCase():e),i=i.map(e=>"string"==typeof e?e.toLowerCase():e));let a=new Set(n),s=new Set(i),o=e.Pipe??d7,l=e.Boolean??d$,u=e.String??uQ,d=new(e.Transform??dY)({type:"transform",transform:(e,t)=>{let n=e;return"sensitive"!==r.case&&(n=n.toLowerCase()),!!a.has(n)||!s.has(n)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:t.value,inst:d}),{})},error:r.error}),c=new o({type:"pipe",in:new u({type:"string",error:r.error}),out:d,error:r.error});return new o({type:"pipe",in:c,out:new l({type:"boolean",error:r.error}),error:r.error})}function fz(e,t,r,n={}){let i=lu(n),a={...lu(n),check:"string_format",type:"string",format:t,fn:"function"==typeof r?r:e=>r.test(e),...i};return r instanceof RegExp&&(a.pattern=r),new e(a)}class fA{constructor(e){this._def=e,this.def=e}implement(e){if("function"!=typeof e)throw Error("implement() must be called with a function");let t=(...r)=>{let n=this._def.input?lM(this._def.input,r,void 0,{callee:t}):r;if(!Array.isArray(n))throw Error("Invalid arguments schema: not an array or tuple schema.");let i=e(...n);return this._def.output?lM(this._def.output,i,void 0,{callee:t}):i};return t}implementAsync(e){if("function"!=typeof e)throw Error("implement() must be called with a function");let t=async(...r)=>{let n=this._def.input?await lZ(this._def.input,r,void 0,{callee:t}):r;if(!Array.isArray(n))throw Error("Invalid arguments schema: not an array or tuple schema.");let i=await e(...n);return this._def.output?lZ(this._def.output,i,void 0,{callee:t}):i};return t}input(...e){let t=this.constructor;return new t(Array.isArray(e[0])?{type:"function",input:new dF({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}:{type:"function",input:e[0],output:this._def.output})}output(e){return new this.constructor({type:"function",input:this._def.input,output:e})}}function fR(e){return new fA({type:"function",input:Array.isArray(e?.input)?fc(dF,e?.input):e?.input??fo(dC,pU(dO)),output:e?.output??pU(dO)})}class fU{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??c0,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var r;let n=e._zod.def,i=this.seen.get(e);if(i)return i.count++,t.schemaPath.includes(e)&&(i.cycle=t.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...t,schemaPath:[...t.schemaPath,e],path:t.path},i=e._zod.parent;if(i)a.ref=i,this.process(i,r),this.seen.get(i).isParent=!0;else{let t=a.schema;switch(n.type){case"string":{t.type="string";let{minimum:r,maximum:n,format:i,patterns:s,contentEncoding:o}=e._zod.bag;if("number"==typeof r&&(t.minLength=r),"number"==typeof n&&(t.maxLength=n),i&&(t.format=({guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""})[i]??i,""===t.format)&&delete t.format,o&&(t.contentEncoding=o),s&&s.size>0){let e=[...s];1===e.length?t.pattern=e[0].source:e.length>1&&(a.schema.allOf=[...e.map(e=>({..."draft-7"===this.target?{type:"string"}:{},pattern:e.source}))])}break}case"number":{let{minimum:r,maximum:n,format:i,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:o}=e._zod.bag;"string"==typeof i&&i.includes("int")?t.type="integer":t.type="number","number"==typeof o&&(t.exclusiveMinimum=o),"number"==typeof r&&(t.minimum=r,"number"==typeof o)&&(o>=r?delete t.minimum:delete t.exclusiveMinimum),"number"==typeof s&&(t.exclusiveMaximum=s),"number"==typeof n&&(t.maximum=n,"number"==typeof s)&&(s<=n?delete t.maximum:delete t.exclusiveMaximum),"number"==typeof a&&(t.multipleOf=a);break}case"boolean":case"success":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema");break;case"null":t.type="null";break;case"any":case"unknown":break;case"undefined":case"never":t.not={};break;case"void":if("throw"===this.unrepresentable)throw Error("Void cannot be represented in JSON Schema");break;case"date":if("throw"===this.unrepresentable)throw Error("Date cannot be represented in JSON Schema");break;case"array":{let{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(t.minItems=i),"number"==typeof a&&(t.maxItems=a),t.type="array",t.items=this.process(n.element,{...r,path:[...r.path,"items"]});break}case"object":{t.type="object",t.properties={};let e=n.shape;for(let n in e)t.properties[n]=this.process(e[n],{...r,path:[...r.path,"properties",n]});let i=new Set([...new Set(Object.keys(e))].filter(e=>{let t=n.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout}));i.size>0&&(t.required=Array.from(i)),n.catchall?._zod.def.type==="never"?t.additionalProperties=!1:n.catchall?n.catchall&&(t.additionalProperties=this.process(n.catchall,{...r,path:[...r.path,"additionalProperties"]})):"output"===this.io&&(t.additionalProperties=!1);break}case"union":t.anyOf=n.options.map((e,t)=>this.process(e,{...r,path:[...r.path,"anyOf",t]}));break;case"intersection":{let e=this.process(n.left,{...r,path:[...r.path,"allOf",0]}),i=this.process(n.right,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length;t.allOf=[...a(e)?e.allOf:[e],...a(i)?i.allOf:[i]];break}case"tuple":{t.type="array";let i=n.items.map((e,t)=>this.process(e,{...r,path:[...r.path,"prefixItems",t]}));if("draft-2020-12"===this.target?t.prefixItems=i:t.items=i,n.rest){let e=this.process(n.rest,{...r,path:[...r.path,"items"]});"draft-2020-12"===this.target?t.items=e:t.additionalItems=e}n.rest&&(t.items=this.process(n.rest,{...r,path:[...r.path,"items"]}));let{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(t.minItems=a),"number"==typeof s&&(t.maxItems=s);break}case"record":t.type="object",t.propertyNames=this.process(n.keyType,{...r,path:[...r.path,"propertyNames"]}),t.additionalProperties=this.process(n.valueType,{...r,path:[...r.path,"additionalProperties"]});break;case"map":if("throw"===this.unrepresentable)throw Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw Error("Set cannot be represented in JSON Schema");break;case"enum":{let e=oH(n.entries);e.every(e=>"number"==typeof e)&&(t.type="number"),e.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=e;break}case"literal":{let e=[];for(let t of n.values)if(void 0===t){if("throw"===this.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof t)if("throw"===this.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else e.push(Number(t));else e.push(t);if(0===e.length);else if(1===e.length){let r=e[0];t.type=null===r?"null":typeof r,t.const=r}else e.every(e=>"number"==typeof e)&&(t.type="number"),e.every(e=>"string"==typeof e)&&(t.type="string"),e.every(e=>"boolean"==typeof e)&&(t.type="string"),e.every(e=>null===e)&&(t.type="null"),t.enum=e;break}case"file":{let r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:n,maximum:i,mime:a}=e._zod.bag;void 0!==n&&(r.minLength=n),void 0!==i&&(r.maxLength=i),a?1===a.length?(r.contentMediaType=a[0],Object.assign(t,r)):t.anyOf=a.map(e=>({...r,contentMediaType:e})):Object.assign(t,r);break}case"transform":if("throw"===this.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema");break;case"nullable":t.anyOf=[this.process(n.innerType,r),{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(n.innerType,r),a.ref=n.innerType;break;case"default":this.process(n.innerType,r),a.ref=n.innerType,t.default=JSON.parse(JSON.stringify(n.defaultValue));break;case"prefault":this.process(n.innerType,r),a.ref=n.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break;case"catch":{let e;this.process(n.innerType,r),a.ref=n.innerType;try{e=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{let r=e._zod.pattern;if(!r)throw Error("Pattern not found in template literal");t.type="string",t.pattern=r.source;break}case"pipe":{let e="input"===this.io?"transform"===n.in._zod.def.type?n.out:n.in:n.out;this.process(e,r),a.ref=e;break}case"readonly":this.process(n.innerType,r),a.ref=n.innerType,t.readOnly=!0;break;case"lazy":{let t=e._zod.innerType;this.process(t,r),a.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")}}}let o=this.metadataRegistry.get(e);return o&&Object.assign(a.schema,o),"input"===this.io&&function e(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":return!1;case"array":return e(i.element,n);case"object":for(let t in i.shape)if(e(i.shape[t],n))return!0;return!1;case"union":for(let t of i.options)if(e(t,n))return!0;return!1;case"intersection":return e(i.left,n)||e(i.right,n);case"tuple":for(let t of i.items)if(e(t,n))return!0;if(i.rest&&e(i.rest,n))return!0;return!1;case"record":case"map":return e(i.keyType,n)||e(i.valueType,n);case"set":return e(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return e(i.innerType,n);case"lazy":return e(i.getter(),n);case"transform":return!0;case"pipe":return e(i.in,n)||e(i.out,n)}throw Error(`Unknown schema type: ${i.type}`)}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===this.io&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,t){let r={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},n=this.seen.get(e);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=e=>{let t="draft-2020-12"===this.target?"$defs":"definitions";if(r.external){let n=r.external.registry.get(e[0])?.id;if(n)return{ref:r.external.uri(n)};let i=e[1].defId??e[1].schema.id??`schema${this.counter++}`;return e[1].defId=i,{defId:i,ref:`${r.external.uri("__shared")}#/${t}/${i}`}}if(e[1]===n)return{ref:"#"};let i=`#/${t}/`,a=e[1].schema.id??`__schema${this.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:r,defId:n}=i(e);t.def={...t.schema},n&&(t.defId=n);let a=t.schema;for(let e in a)delete a[e];a.$ref=r};for(let t of this.seen.entries()){let n=t[1];if(e===t[0]){a(t);continue}if(r.external){let n=r.external.registry.get(t[0])?.id;if(e!==t[0]&&n){a(t);continue}}if(this.metadataRegistry.get(t[0])?.id){a(t);continue}if(n.cycle){if("throw"===r.cycles)throw Error(`Cycle detected: #/${n.cycle?.join("/")}/<root>
|
|
80
|
+
path: iss.path ? [${ly(e)}, ...iss.path] : [${ly(e)}]
|
|
81
|
+
})));`),t.write(`newResult[${ly(e)}] = ${r}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");let o=t.compile();return(t,r)=>o(e,t,r)})(t.shape)),l=n(l,u);else{l.value={};let e=o.shape;for(let t of o.keys){let r=e[t],n=r._zod.run({value:d[t],issues:[]},u),i="optional"===r._zod.optin&&"optional"===r._zod.optout;n instanceof Promise?c.push(n.then(e=>i?d1(e,l,t,d):d0(e,l,t))):i?d1(n,l,t,d):d0(n,l,t)}}if(!s)return c.length?Promise.all(c).then(()=>l):l;let p=[],f=o.keySet,m=s._zod,h=m.def.type;for(let e of Object.keys(d)){if(f.has(e))continue;if("never"===h){p.push(e);continue}let t=m.run({value:d[e],issues:[]},u);t instanceof Promise?c.push(t.then(t=>d0(t,l,e))):d0(t,l,e)}return(p.length&&l.issues.push({code:"unrecognized_keys",keys:p,input:d,inst:e}),c.length)?Promise.all(c).then(()=>l):l}});function d6(e,t,r,n){for(let r of e)if(0===r.issues.length)return t.value=r.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(e=>e.issues.map(e=>lV(e,n,o7())))}),t}var d2=o9("$ZodUnion",(e,t)=>{du.init(e,t),lf(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),lf(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),lf(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),lf(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>lc(e.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},n);if(t instanceof Promise)a.push(t),i=!0;else{if(0===t.issues.length)return t;a.push(t)}}return i?Promise.all(a).then(t=>d6(t,r,e,n)):d6(a,r,e,n)}}),d9=o9("$ZodDiscriminatedUnion",(e,t)=>{d2.init(e,t);let r=e._zod.parse;lf(e._zod,"propValues",()=>{let e={};for(let r of t.options){let n=r._zod.propValues;if(!n||0===Object.keys(n).length)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let[t,r]of Object.entries(n))for(let n of(e[t]||(e[t]=new Set),r))e[t].add(n)}return e});let n=lu(()=>{let e=t.options,r=new Map;for(let n of e){let e=n._zod.propValues[t.discriminator];if(!e||0===e.size)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let t of e){if(r.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);r.set(t,n)}}return r});e._zod.parse=(i,a)=>{let s=i.value;if(!lb(s))return i.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),i;let o=n.value.get(s?.[t.discriminator]);return o?o._zod.run(i,a):t.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),i)}}),d5=o9("$ZodIntersection",(e,t)=>{du.init(e,t),e._zod.parse=(e,r)=>{let n=e.value,i=t.left._zod.run({value:n,issues:[]},r),a=t.right._zod.run({value:n,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,r])=>d3(e,t,r)):d3(e,i,a)}});function d3(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),lZ(e))return e;let n=function e(t,r){if(t===r||t instanceof Date&&r instanceof Date&&+t==+r)return{valid:!0,data:t};if(lw(t)&&lw(r)){let n=Object.keys(r),i=Object.keys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};a[n]=i.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}(t.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}var d8=o9("$ZodTuple",(e,t)=>{du.init(e,t);let r=t.items,n=r.length-[...r].reverse().findIndex(e=>"optional"!==e._zod.optin);e._zod.parse=(i,a)=>{let s=i.value;if(!Array.isArray(s))return i.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let o=[];if(!t.rest){let t=s.length>r.length,a=s.length<n-1;if(t||a)return i.issues.push({input:s,inst:e,origin:"array",...t?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),i}let l=-1;for(let e of r){if(++l>=s.length&&l>=n)continue;let t=e._zod.run({value:s[l],issues:[]},a);t instanceof Promise?o.push(t.then(e=>d7(e,i,l))):d7(t,i,l)}if(t.rest)for(let e of s.slice(r.length)){l++;let r=t.rest._zod.run({value:e,issues:[]},a);r instanceof Promise?o.push(r.then(e=>d7(e,i,l))):d7(r,i,l)}return o.length?Promise.all(o).then(()=>i):i}});function d7(e,t,r){e.issues.length&&t.issues.push(...lF(r,e.issues)),t.value[r]=e.value}var ce=o9("$ZodRecord",(e,t)=>{du.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!lw(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;let a=[];if(t.keyType._zod.values){let s,o=t.keyType._zod.values;for(let e of(r.value={},o))if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){let s=t.valueType._zod.run({value:i[e],issues:[]},n);s instanceof Promise?a.push(s.then(t=>{t.issues.length&&r.issues.push(...lF(e,t.issues)),r.value[e]=t.value})):(s.issues.length&&r.issues.push(...lF(e,s.issues)),r.value[e]=s.value)}for(let e in i)o.has(e)||(s=s??[]).push(e);s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:s})}else for(let s of(r.value={},Reflect.ownKeys(i))){if("__proto__"===s)continue;let o=t.keyType._zod.run({value:s,issues:[]},n);if(o instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(o.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:o.issues.map(e=>lV(e,n,o7())),input:s,path:[s],inst:e}),r.value[o.value]=o.value;continue}let l=t.valueType._zod.run({value:i[s],issues:[]},n);l instanceof Promise?a.push(l.then(e=>{e.issues.length&&r.issues.push(...lF(s,e.issues)),r.value[o.value]=e.value})):(l.issues.length&&r.issues.push(...lF(s,l.issues)),r.value[o.value]=l.value)}return a.length?Promise.all(a).then(()=>r):r}}),ct=o9("$ZodMap",(e,t)=>{du.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),r;let a=[];for(let[s,o]of(r.value=new Map,i)){let l=t.keyType._zod.run({value:s,issues:[]},n),u=t.valueType._zod.run({value:o,issues:[]},n);l instanceof Promise||u instanceof Promise?a.push(Promise.all([l,u]).then(([t,a])=>{cr(t,a,r,s,i,e,n)})):cr(l,u,r,s,i,e,n)}return a.length?Promise.all(a).then(()=>r):r}});function cr(e,t,r,n,i,a,s){e.issues.length&&(lS.has(typeof n)?r.issues.push(...lF(n,e.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:a,issues:e.issues.map(e=>lV(e,s,o7()))})),t.issues.length&&(lS.has(typeof n)?r.issues.push(...lF(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:t.issues.map(e=>lV(e,s,o7()))})),r.value.set(e.value,t.value)}var cn=o9("$ZodSet",(e,t)=>{du.init(e,t),e._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];for(let e of(r.value=new Set,i)){let i=t.valueType._zod.run({value:e,issues:[]},n);i instanceof Promise?a.push(i.then(e=>ci(e,r))):ci(i,r)}return a.length?Promise.all(a).then(()=>r):r}});function ci(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var ca=o9("$ZodEnum",(e,t)=>{du.init(e,t);let r=ls(t.entries);e._zod.values=new Set(r),e._zod.pattern=RegExp(`^(${r.filter(e=>lS.has(typeof e)).map(e=>"string"==typeof e?lP(e):e.toString()).join("|")})$`),e._zod.parse=(t,n)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:"invalid_value",values:r,input:i,inst:e}),t}}),cs=o9("$ZodLiteral",(e,t)=>{du.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>"string"==typeof e?lP(e):e?e.toString():String(e)).join("|")})$`),e._zod.parse=(r,n)=>{let i=r.value;return e._zod.values.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),co=o9("$ZodFile",(e,t)=>{du.init(e,t),e._zod.parse=(t,r)=>{let n=t.value;return n instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),t}}),cl=o9("$ZodTransform",(e,t)=>{du.init(e,t),e._zod.parse=(e,r)=>{let n=t.transform(e.value,e);if(r.async)return(n instanceof Promise?n:Promise.resolve(n)).then(t=>(e.value=t,e));if(n instanceof Promise)throw new o3;return e.value=n,e}}),cu=o9("$ZodOptional",(e,t)=>{du.init(e,t),e._zod.optin="optional",e._zod.optout="optional",lf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),lf(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${lc(e.source)})?$`):void 0}),e._zod.parse=(e,r)=>"optional"===t.innerType._zod.optin?t.innerType._zod.run(e,r):void 0===e.value?e:t.innerType._zod.run(e,r)}),cd=o9("$ZodNullable",(e,t)=>{du.init(e,t),lf(e._zod,"optin",()=>t.innerType._zod.optin),lf(e._zod,"optout",()=>t.innerType._zod.optout),lf(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${lc(e.source)}|null)$`):void 0}),lf(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,r)=>null===e.value?e:t.innerType._zod.run(e,r)}),cc=o9("$ZodDefault",(e,t)=>{du.init(e,t),e._zod.optin="optional",lf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{if(void 0===e.value)return e.value=t.defaultValue,e;let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(e=>cp(e,t)):cp(n,t)}});function cp(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var cf=o9("$ZodPrefault",(e,t)=>{du.init(e,t),e._zod.optin="optional",lf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,r))}),cm=o9("$ZodNonOptional",(e,t)=>{du.init(e,t),lf(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(r,n)=>{let i=t.innerType._zod.run(r,n);return i instanceof Promise?i.then(t=>ch(t,e)):ch(i,e)}});function ch(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var cg=o9("$ZodSuccess",(e,t)=>{du.init(e,t),e._zod.parse=(e,r)=>{let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===n.issues.length,e)}}),cv=o9("$ZodCatch",(e,t)=>{du.init(e,t),e._zod.optin="optional",lf(e._zod,"optout",()=>t.innerType._zod.optout),lf(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,r)=>{let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(n=>(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>lV(e,r,o7()))},input:e.value}),e.issues=[]),e)):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>lV(e,r,o7()))},input:e.value}),e.issues=[]),e)}}),cy=o9("$ZodNaN",(e,t)=>{du.init(e,t),e._zod.parse=(t,r)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),c_=o9("$ZodPipe",(e,t)=>{du.init(e,t),lf(e._zod,"values",()=>t.in._zod.values),lf(e._zod,"optin",()=>t.in._zod.optin),lf(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(e,r)=>{let n=t.in._zod.run(e,r);return n instanceof Promise?n.then(e=>cb(e,t,r)):cb(n,t,r)}});function cb(e,t,r){return lZ(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}var c$=o9("$ZodReadonly",(e,t)=>{du.init(e,t),lf(e._zod,"propValues",()=>t.innerType._zod.propValues),lf(e._zod,"values",()=>t.innerType._zod.values),lf(e._zod,"optin",()=>t.innerType._zod.optin),lf(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,r)=>{let n=t.innerType._zod.run(e,r);return n instanceof Promise?n.then(cw):cw(n)}});function cw(e){return e.value=Object.freeze(e.value),e}var ck=o9("$ZodTemplateLiteral",(e,t)=>{du.init(e,t);let r=[];for(let e of t.parts)if(e instanceof du){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let n=+!!t.startsWith("^"),i=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(n,i))}else if(null===e||lI.has(typeof e))r.push(lP(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${r.join("")}$`),e._zod.parse=(t,r)=>("string"!=typeof t.value?t.issues.push({input:t.value,inst:e,expected:"template_literal",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(t.value)||t.issues.push({input:t.value,inst:e,code:"invalid_format",format:"template_literal",pattern:e._zod.pattern.source})),t)}),cx=o9("$ZodPromise",(e,t)=>{du.init(e,t),e._zod.parse=(e,r)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},r))}),cS=o9("$ZodLazy",(e,t)=>{du.init(e,t),lf(e._zod,"innerType",()=>t.getter()),lf(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),lf(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),lf(e._zod,"optin",()=>e._zod.innerType._zod.optin),lf(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(t,r)=>e._zod.innerType._zod.run(t,r)}),cI=o9("$ZodCustom",(e,t)=>{uW.init(e,t),du.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=r=>{let n=r.value,i=t.fn(n);if(i instanceof Promise)return i.then(t=>cP(t,r,n,e));cP(i,r,n,e)}});function cP(e,t,r,n){if(!e){let e={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(lK(e))}}var cO={};function cE(){let e,t;return{localeError:(e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}},t={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},r=>{switch(r.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${r.expected}، ولكن تم إدخال ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`مدخلات غير مقبولة: يفترض إدخال ${lN(r.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return` أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()} ${n.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${r.origin??"القيمة"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()} ${n.unit}`;return`أصغر من اللازم: يفترض لـ ${r.origin} أن يكون ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`نَص غير مقبول: يجب أن يبدأ بـ "${r.prefix}"`;if("ends_with"===r.format)return`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`;if("includes"===r.format)return`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`;if("regex"===r.format)return`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`;return`${t[r.format]??r.format} غير مقبول`;case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${r.divisor}`;case"unrecognized_keys":return`معرف${r.keys.length>1?"ات":""} غريب${r.keys.length>1?"ة":""}: ${lo(r.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${r.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${r.origin}`}})}}function cj(){let e,t;return{localeError:(e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Yanlış dəyər: g\xf6zlənilən ${r.expected}, daxil olan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Yanlış dəyər: g\xf6zlənilən ${lN(r.values[0])}`;return`Yanlış se\xe7im: aşağıdakılardan biri olmalıdır: ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`\xc7ox b\xf6y\xfck: g\xf6zlənilən ${r.origin??"dəyər"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ox ki\xe7ik: g\xf6zlənilən ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`;if("ends_with"===r.format)return`Yanlış mətn: "${r.suffix}" ilə bitməlidir`;if("includes"===r.format)return`Yanlış mətn: "${r.includes}" daxil olmalıdır`;if("regex"===r.format)return`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${t[r.format]??r.format}`;case"not_multiple_of":return`Yanlış ədəd: ${r.divisor} ilə b\xf6l\xfcnə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan a\xe7ar${r.keys.length>1?"lar":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilində yanlış a\xe7ar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${r.origin} daxilində yanlış dəyər`}})}}function cN(e,t,r,n){let i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:1===a?t:a>=2&&a<=4?r:n}function cT(){let e,t;return{localeError:(e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}},t={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},r=>{switch(r.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${r.expected}, атрымана ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":if(Array.isArray(e))return"масіў";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Няправільны ўвод: чакалася ${lN(r.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=cN(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна ${n.verb} ${t}${r.maximum.toString()} ${e}`}return`Занадта вялікі: чакалася, што ${r.origin??"значэнне"} павінна быць ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=cN(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Занадта малы: чакалася, што ${r.origin} павінна ${n.verb} ${t}${r.minimum.toString()} ${e}`}return`Занадта малы: чакалася, што ${r.origin} павінна быць ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Няправільны радок: павінен пачынацца з "${r.prefix}"`;if("ends_with"===r.format)return`Няправільны радок: павінен заканчвацца на "${r.suffix}"`;if("includes"===r.format)return`Няправільны радок: павінен змяшчаць "${r.includes}"`;if("regex"===r.format)return`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`;return`Няправільны ${t[r.format]??r.format}`;case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${r.keys.length>1?"ключы":"ключ"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${r.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${r.origin}`}})}}function cC(){let e,t;return{localeError:(e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}},t={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r=>{switch(r.code){case"invalid_type":return`Tipus inv\xe0lid: s'esperava ${r.expected}, s'ha rebut ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Valor inv\xe0lid: s'esperava ${lN(r.values[0])}`;return`Opci\xf3 inv\xe0lida: s'esperava una de ${lo(r.values," o ")}`;case"too_big":{let t=r.inclusive?"com a màxim":"menys de",n=e[r.origin]??null;if(n)return`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xe9s ${t} ${r.maximum.toString()} ${n.unit??"elements"}`;return`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"com a mínim":"més de",n=e[r.origin]??null;if(n)return`Massa petit: s'esperava que ${r.origin} contingu\xe9s ${t} ${r.minimum.toString()} ${n.unit}`;return`Massa petit: s'esperava que ${r.origin} fos ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Format inv\xe0lid: ha de comen\xe7ar amb "${r.prefix}"`;if("ends_with"===r.format)return`Format inv\xe0lid: ha d'acabar amb "${r.suffix}"`;if("includes"===r.format)return`Format inv\xe0lid: ha d'incloure "${r.includes}"`;if("regex"===r.format)return`Format inv\xe0lid: ha de coincidir amb el patr\xf3 ${r.pattern}`;return`Format inv\xe0lid per a ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe0lid: ha de ser m\xfaltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Clau inv\xe0lida a ${r.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element inv\xe0lid a ${r.origin}`}})}}function cz(){let e,t;return{localeError:(e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}},t={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},r=>{switch(r.code){case"invalid_type":return`Neplatn\xfd vstup: oček\xe1v\xe1no ${r.expected}, obdrženo ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":if(Array.isArray(e))return"pole";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Neplatn\xfd vstup: oček\xe1v\xe1no ${lN(r.values[0])}`;return`Neplatn\xe1 možnost: oček\xe1v\xe1na jedna z hodnot ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.maximum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš velk\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed m\xedt ${t}${r.minimum.toString()} ${n.unit??"prvků"}`;return`Hodnota je př\xedliš mal\xe1: ${r.origin??"hodnota"} mus\xed b\xfdt ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neplatn\xfd řetězec: mus\xed zač\xednat na "${r.prefix}"`;if("ends_with"===r.format)return`Neplatn\xfd řetězec: mus\xed končit na "${r.suffix}"`;if("includes"===r.format)return`Neplatn\xfd řetězec: mus\xed obsahovat "${r.includes}"`;if("regex"===r.format)return`Neplatn\xfd řetězec: mus\xed odpov\xeddat vzoru ${r.pattern}`;return`Neplatn\xfd form\xe1t ${t[r.format]??r.format}`;case"not_multiple_of":return`Neplatn\xe9 č\xedslo: mus\xed b\xfdt n\xe1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xe1m\xe9 kl\xedče: ${lo(r.keys,", ")}`;case"invalid_key":return`Neplatn\xfd kl\xedč v ${r.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatn\xe1 hodnota v ${r.origin}`}})}}function cA(){let e,t;return{localeError:(e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}},t={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r=>{switch(r.code){case"invalid_type":return`Ung\xfcltige Eingabe: erwartet ${r.expected}, erhalten ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":if(Array.isArray(e))return"Array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ung\xfcltige Eingabe: erwartet ${lN(r.values[0])}`;return`Ung\xfcltige Option: erwartet eine von ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ${n.unit??"Elemente"} hat`;return`Zu gro\xdf: erwartet, dass ${r.origin??"Wert"} ${t}${r.maximum.toString()} ist`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ${n.unit} hat`;return`Zu klein: erwartet, dass ${r.origin} ${t}${r.minimum.toString()} ist`}case"invalid_format":if("starts_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ung\xfcltiger String: muss mit "${r.suffix}" enden`;if("includes"===r.format)return`Ung\xfcltiger String: muss "${r.includes}" enthalten`;if("regex"===r.format)return`Ung\xfcltiger String: muss dem Muster ${r.pattern} entsprechen`;return`Ung\xfcltig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ung\xfcltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Ung\xfcltiger Schl\xfcssel in ${r.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ung\xfcltiger Wert in ${r.origin}`}})}}function cR(){let e,t;return{localeError:(e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${lN(r.values[0])}`;return`Invalid option: expected one of ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Too big: expected ${r.origin??"value"} to have ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`Too big: expected ${r.origin??"value"} to be ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Too small: expected ${r.origin} to have ${t}${r.minimum.toString()} ${n.unit}`;return`Too small: expected ${r.origin} to be ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Invalid string: must start with "${r.prefix}"`;if("ends_with"===r.format)return`Invalid string: must end with "${r.suffix}"`;if("includes"===r.format)return`Invalid string: must include "${r.includes}"`;if("regex"===r.format)return`Invalid string: must match pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`}})}}function cU(){let e,t;return{localeError:(e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}},t={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r=>{switch(r.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${r.expected}, riceviĝis ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":if(Array.isArray(e))return"tabelo";if(null===e)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Nevalida enigo: atendiĝis ${lN(r.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()} ${n.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Tro malgranda: atendiĝis ke ${r.origin} havu ${t}${r.minimum.toString()} ${n.unit}`;return`Tro malgranda: atendiĝis ke ${r.origin} estu ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`;if("ends_with"===r.format)return`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`;if("includes"===r.format)return`Nevalida karaktraro: devas inkluzivi "${r.includes}"`;if("regex"===r.format)return`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`;return`Nevalida ${t[r.format]??r.format}`;case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`}})}}function cD(){let e,t;return{localeError:(e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r=>{switch(r.code){case"invalid_type":return`Entrada inv\xe1lida: se esperaba ${r.expected}, recibido ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"arreglo";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: se esperaba ${lN(r.values[0])}`;return`Opci\xf3n inv\xe1lida: se esperaba una de ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Demasiado grande: se esperaba que ${r.origin??"valor"} tuviera ${t}${r.maximum.toString()} ${n.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${r.origin??"valor"} fuera ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Demasiado peque\xf1o: se esperaba que ${r.origin} tuviera ${t}${r.minimum.toString()} ${n.unit}`;return`Demasiado peque\xf1o: se esperaba que ${r.origin} fuera ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cadena inv\xe1lida: debe comenzar con "${r.prefix}"`;if("ends_with"===r.format)return`Cadena inv\xe1lida: debe terminar en "${r.suffix}"`;if("includes"===r.format)return`Cadena inv\xe1lida: debe incluir "${r.includes}"`;if("regex"===r.format)return`Cadena inv\xe1lida: debe coincidir con el patr\xf3n ${r.pattern}`;return`Inv\xe1lido ${t[r.format]??r.format}`;case"not_multiple_of":return`N\xfamero inv\xe1lido: debe ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Llave inv\xe1lida en ${r.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido en ${r.origin}`}})}}function cM(){let e,t;return{localeError:(e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}},t={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},r=>{switch(r.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${r.expected} میبود، ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"آرایه";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} دریافت شد`;case"invalid_value":if(1===r.values.length)return`ورودی نامعتبر: میبایست ${lN(r.values[0])} میبود`;return`گزینه نامعتبر: میبایست یکی از ${lo(r.values,"|")} میبود`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${r.origin??"مقدار"} باید ${t}${r.maximum.toString()} باشد`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} باشد`;return`خیلی کوچک: ${r.origin} باید ${t}${r.minimum.toString()} باشد`}case"invalid_format":if("starts_with"===r.format)return`رشته نامعتبر: باید با "${r.prefix}" شروع شود`;if("ends_with"===r.format)return`رشته نامعتبر: باید با "${r.suffix}" تمام شود`;if("includes"===r.format)return`رشته نامعتبر: باید شامل "${r.includes}" باشد`;if("regex"===r.format)return`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`;return`${t[r.format]??r.format} نامعتبر`;case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${r.divisor} باشد`;case"unrecognized_keys":return`کلید${r.keys.length>1?"های":""} ناشناس: ${lo(r.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${r.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${r.origin}`}})}}function cL(){let e,t;return{localeError:(e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}},t={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r=>{switch(r.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${r.expected}, oli ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Virheellinen sy\xf6te: t\xe4ytyy olla ${lN(r.values[0])}`;return`Virheellinen valinta: t\xe4ytyy olla yksi seuraavista: ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Liian suuri: ${n.subject} t\xe4ytyy olla ${t}${r.maximum.toString()} ${n.unit}`.trim();return`Liian suuri: arvon t\xe4ytyy olla ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Liian pieni: ${n.subject} t\xe4ytyy olla ${t}${r.minimum.toString()} ${n.unit}`.trim();return`Liian pieni: arvon t\xe4ytyy olla ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy alkaa "${r.prefix}"`;if("ends_with"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy loppua "${r.suffix}"`;if("includes"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy sis\xe4lt\xe4\xe4 "${r.includes}"`;if("regex"===r.format)return`Virheellinen sy\xf6te: t\xe4ytyy vastata s\xe4\xe4nn\xf6llist\xe4 lauseketta ${r.pattern}`;return`Virheellinen ${t[r.format]??r.format}`;case"not_multiple_of":return`Virheellinen luku: t\xe4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${lo(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}})}}function cZ(){let e,t;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r=>{switch(r.code){case"invalid_type":return`Entr\xe9e invalide : ${r.expected} attendu, ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":if(Array.isArray(e))return"tableau";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} re\xe7u`;case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : ${lN(r.values[0])} attendu`;return`Option invalide : une valeur parmi ${lo(r.values,"|")} attendue`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Trop grand : ${r.origin??"valeur"} doit ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"élément(s)"}`;return`Trop grand : ${r.origin??"valeur"} doit \xeatre ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Trop petit : ${r.origin} doit ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : ${r.origin} doit \xeatre ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au mod\xe8le ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${lo(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}}function cF(){let e,t;return{localeError:(e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}},t={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r=>{switch(r.code){case"invalid_type":return`Entr\xe9e invalide : attendu ${r.expected}, re\xe7u ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entr\xe9e invalide : attendu ${lN(r.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"≤":"<",n=e[r.origin]??null;if(n)return`Trop grand : attendu que ${r.origin??"la valeur"} ait ${t}${r.maximum.toString()} ${n.unit}`;return`Trop grand : attendu que ${r.origin??"la valeur"} soit ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"≥":">",n=e[r.origin]??null;if(n)return`Trop petit : attendu que ${r.origin} ait ${t}${r.minimum.toString()} ${n.unit}`;return`Trop petit : attendu que ${r.origin} soit ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Cha\xeene invalide : doit commencer par "${r.prefix}"`;if("ends_with"===r.format)return`Cha\xeene invalide : doit se terminer par "${r.suffix}"`;if("includes"===r.format)return`Cha\xeene invalide : doit inclure "${r.includes}"`;if("regex"===r.format)return`Cha\xeene invalide : doit correspondre au motif ${r.pattern}`;return`${t[r.format]??r.format} invalide`;case"not_multiple_of":return`Nombre invalide : doit \xeatre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xe9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${lo(r.keys,", ")}`;case"invalid_key":return`Cl\xe9 invalide dans ${r.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`}})}}function cq(){let e,t;return{localeError:(e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}},t={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"},r=>{switch(r.code){case"invalid_type":return`קלט לא תקין: צריך ${r.expected}, התקבל ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`קלט לא תקין: צריך ${lN(r.values[0])}`;return`קלט לא תקין: צריך אחת מהאפשרויות ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`גדול מדי: ${r.origin??"value"} צריך להיות ${t}${r.maximum.toString()} ${n.unit??"elements"}`;return`גדול מדי: ${r.origin??"value"} צריך להיות ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`קטן מדי: ${r.origin} צריך להיות ${t}${r.minimum.toString()} ${n.unit}`;return`קטן מדי: ${r.origin} צריך להיות ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`מחרוזת לא תקינה: חייבת להתחיל ב"${r.prefix}"`;if("ends_with"===r.format)return`מחרוזת לא תקינה: חייבת להסתיים ב "${r.suffix}"`;if("includes"===r.format)return`מחרוזת לא תקינה: חייבת לכלול "${r.includes}"`;if("regex"===r.format)return`מחרוזת לא תקינה: חייבת להתאים לתבנית ${r.pattern}`;return`${t[r.format]??r.format} לא תקין`;case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${r.divisor}`;case"unrecognized_keys":return`מפתח${r.keys.length>1?"ות":""} לא מזוה${r.keys.length>1?"ים":"ה"}: ${lo(r.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${r.origin}`;case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r.origin}`}})}}function cV(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}},t={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},r=>{switch(r.code){case"invalid_type":return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${r.expected}, a kapott \xe9rt\xe9k ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":if(Array.isArray(e))return"tömb";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`\xc9rv\xe9nytelen bemenet: a v\xe1rt \xe9rt\xe9k ${lN(r.values[0])}`;return`\xc9rv\xe9nytelen opci\xf3: valamelyik \xe9rt\xe9k v\xe1rt ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`T\xfal nagy: ${r.origin??"érték"} m\xe9rete t\xfal nagy ${t}${r.maximum.toString()} ${n.unit??"elem"}`;return`T\xfal nagy: a bemeneti \xe9rt\xe9k ${r.origin??"érték"} t\xfal nagy: ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} m\xe9rete t\xfal kicsi ${t}${r.minimum.toString()} ${n.unit}`;return`T\xfal kicsi: a bemeneti \xe9rt\xe9k ${r.origin} t\xfal kicsi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.prefix}" \xe9rt\xe9kkel kell kezdődnie`;if("ends_with"===r.format)return`\xc9rv\xe9nytelen string: "${r.suffix}" \xe9rt\xe9kkel kell v\xe9gződnie`;if("includes"===r.format)return`\xc9rv\xe9nytelen string: "${r.includes}" \xe9rt\xe9ket kell tartalmaznia`;if("regex"===r.format)return`\xc9rv\xe9nytelen string: ${r.pattern} mint\xe1nak kell megfelelnie`;return`\xc9rv\xe9nytelen ${t[r.format]??r.format}`;case"not_multiple_of":return`\xc9rv\xe9nytelen sz\xe1m: ${r.divisor} t\xf6bbsz\xf6r\xf6s\xe9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`\xc9rv\xe9nytelen kulcs ${r.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`\xc9rv\xe9nytelen \xe9rt\xe9k: ${r.origin}`}})}}function cB(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}},t={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Input tidak valid: diharapkan ${r.expected}, diterima ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input tidak valid: diharapkan ${lN(r.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: diharapkan ${r.origin} memiliki ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: diharapkan ${r.origin} menjadi ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak valid: harus dimulai dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak valid: harus berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak valid: harus menyertakan "${r.includes}"`;if("regex"===r.format)return`String tidak valid: harus sesuai pola ${r.pattern}`;return`${t[r.format]??r.format} tidak valid`;case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`}})}}function cW(){let e,t;return{localeError:(e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}},t={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Input non valido: atteso ${r.expected}, ricevuto ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":if(Array.isArray(e))return"vettore";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input non valido: atteso ${lN(r.values[0])}`;return`Opzione non valida: atteso uno tra ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Troppo grande: ${r.origin??"valore"} deve avere ${t}${r.maximum.toString()} ${n.unit??"elementi"}`;return`Troppo grande: ${r.origin??"valore"} deve essere ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Troppo piccolo: ${r.origin} deve avere ${t}${r.minimum.toString()} ${n.unit}`;return`Troppo piccolo: ${r.origin} deve essere ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Stringa non valida: deve iniziare con "${r.prefix}"`;if("ends_with"===r.format)return`Stringa non valida: deve terminare con "${r.suffix}"`;if("includes"===r.format)return`Stringa non valida: deve includere "${r.includes}"`;if("regex"===r.format)return`Stringa non valida: deve corrispondere al pattern ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`}})}}function cK(){let e,t;return{localeError:(e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}},t={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},r=>{switch(r.code){case"invalid_type":return`無効な入力: ${r.expected}が期待されましたが、${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":if(Array.isArray(e))return"配列";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}が入力されました`;case"invalid_value":if(1===r.values.length)return`無効な入力: ${lN(r.values[0])}が期待されました`;return`無効な選択: ${lo(r.values,"、")}のいずれかである必要があります`;case"too_big":{let t=r.inclusive?"以下である":"より小さい",n=e[r.origin]??null;if(n)return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${n.unit??"要素"}${t}必要があります`;return`大きすぎる値: ${r.origin??"値"}は${r.maximum.toString()}${t}必要があります`}case"too_small":{let t=r.inclusive?"以上である":"より大きい",n=e[r.origin]??null;if(n)return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${n.unit}${t}必要があります`;return`小さすぎる値: ${r.origin}は${r.minimum.toString()}${t}必要があります`}case"invalid_format":if("starts_with"===r.format)return`無効な文字列: "${r.prefix}"で始まる必要があります`;if("ends_with"===r.format)return`無効な文字列: "${r.suffix}"で終わる必要があります`;if("includes"===r.format)return`無効な文字列: "${r.includes}"を含む必要があります`;if("regex"===r.format)return`無効な文字列: パターン${r.pattern}に一致する必要があります`;return`無効な${t[r.format]??r.format}`;case"not_multiple_of":return`無効な数値: ${r.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${r.keys.length>1?"群":""}: ${lo(r.keys,"、")}`;case"invalid_key":return`${r.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${r.origin}内の無効な値`}})}}function cG(){let e,t;return{localeError:(e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}},t={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},r=>{switch(r.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r.expected} ប៉ុន្តែទទួលបាន ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":if(Array.isArray(e))return"អារេ (Array)";if(null===e)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${lN(r.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()} ${n.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${r.origin??"តម្លៃ"} ${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()} ${n.unit}`;return`តូចពេក៖ ត្រូវការ ${r.origin} ${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${r.prefix}"`;if("ends_with"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${r.suffix}"`;if("includes"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${r.includes}"`;if("regex"===r.format)return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${r.pattern}`;return`មិនត្រឹមត្រូវ៖ ${t[r.format]??r.format}`;case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${r.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${lo(r.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${r.origin}`}})}}function cJ(){let e,t;return{localeError:(e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}},t={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},r=>{switch(r.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${r.expected}, 받은 타입은 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}입니다`;case"invalid_value":if(1===r.values.length)return`잘못된 입력: 값은 ${lN(r.values[0])} 이어야 합니다`;return`잘못된 옵션: ${lo(r.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let t=r.inclusive?"이하":"미만",n="미만"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 큽니다: ${r.maximum.toString()} ${t}${n}`}case"too_small":{let t=r.inclusive?"이상":"초과",n="이상"===t?"이어야 합니다":"여야 합니다",i=e[r.origin]??null,a=i?.unit??"요소";if(i)return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()}${a} ${t}${n}`;return`${r.origin??"값"}이 너무 작습니다: ${r.minimum.toString()} ${t}${n}`}case"invalid_format":if("starts_with"===r.format)return`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`;if("ends_with"===r.format)return`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`;if("includes"===r.format)return`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`;if("regex"===r.format)return`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${t[r.format]??r.format}`;case"not_multiple_of":return`잘못된 숫자: ${r.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${lo(r.keys,", ")}`;case"invalid_key":return`잘못된 키: ${r.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${r.origin}`}})}}function cH(){let e,t;return{localeError:(e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}},t={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},r=>{switch(r.code){case"invalid_type":return`Грешен внес: се очекува ${r.expected}, примено ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"број";case"object":if(Array.isArray(e))return"низа";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Invalid input: expected ${lN(r.values[0])}`;return`Грешана опција: се очекува една ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Премногу голем: се очекува ${r.origin??"вредноста"} да има ${t}${r.maximum.toString()} ${n.unit??"елементи"}`;return`Премногу голем: се очекува ${r.origin??"вредноста"} да биде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Премногу мал: се очекува ${r.origin} да има ${t}${r.minimum.toString()} ${n.unit}`;return`Премногу мал: се очекува ${r.origin} да биде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неважечка низа: мора да започнува со "${r.prefix}"`;if("ends_with"===r.format)return`Неважечка низа: мора да завршува со "${r.suffix}"`;if("includes"===r.format)return`Неважечка низа: мора да вклучува "${r.includes}"`;if("regex"===r.format)return`Неважечка низа: мора да одгоара на патернот ${r.pattern}`;return`Invalid ${t[r.format]??r.format}`;case"not_multiple_of":return`Грешен број: мора да биде делив со ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${r.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${r.origin}`}})}}function cX(){let e,t;return{localeError:(e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}},t={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Input tidak sah: dijangka ${r.expected}, diterima ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Input tidak sah: dijangka ${lN(r.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Terlalu besar: dijangka ${r.origin??"nilai"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"elemen"}`;return`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Terlalu kecil: dijangka ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Terlalu kecil: dijangka ${r.origin} adalah ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`String tidak sah: mesti bermula dengan "${r.prefix}"`;if("ends_with"===r.format)return`String tidak sah: mesti berakhir dengan "${r.suffix}"`;if("includes"===r.format)return`String tidak sah: mesti mengandungi "${r.includes}"`;if("regex"===r.format)return`String tidak sah: mesti sepadan dengan corak ${r.pattern}`;return`${t[r.format]??r.format} tidak sah`;case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${lo(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`}})}}function cY(){let e,t;return{localeError:(e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}},t={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r=>{switch(r.code){case"invalid_type":return`Ongeldige invoer: verwacht ${r.expected}, ontving ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ongeldige invoer: verwacht ${lN(r.values[0])}`;return`Ongeldige optie: verwacht \xe9\xe9n van ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Te lang: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} ${n.unit??"elementen"} bevat`;return`Te lang: verwacht dat ${r.origin??"waarde"} ${t}${r.maximum.toString()} is`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Te kort: verwacht dat ${r.origin} ${t}${r.minimum.toString()} ${n.unit} bevat`;return`Te kort: verwacht dat ${r.origin} ${t}${r.minimum.toString()} is`}case"invalid_format":if("starts_with"===r.format)return`Ongeldige tekst: moet met "${r.prefix}" beginnen`;if("ends_with"===r.format)return`Ongeldige tekst: moet op "${r.suffix}" eindigen`;if("includes"===r.format)return`Ongeldige tekst: moet "${r.includes}" bevatten`;if("regex"===r.format)return`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`;return`Ongeldig: ${t[r.format]??r.format}`;case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`}})}}function cQ(){let e,t;return{localeError:(e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}},t={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`Ugyldig input: forventet ${r.expected}, fikk ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":if(Array.isArray(e))return"liste";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ugyldig verdi: forventet ${lN(r.values[0])}`;return`Ugyldig valg: forventet en av ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()} ${n.unit??"elementer"}`;return`For stor(t): forventet ${r.origin??"value"} til \xe5 ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()} ${n.unit}`;return`For lite(n): forventet ${r.origin} til \xe5 ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ugyldig streng: m\xe5 starte med "${r.prefix}"`;if("ends_with"===r.format)return`Ugyldig streng: m\xe5 ende med "${r.suffix}"`;if("includes"===r.format)return`Ugyldig streng: m\xe5 inneholde "${r.includes}"`;if("regex"===r.format)return`Ugyldig streng: m\xe5 matche m\xf8nsteret ${r.pattern}`;return`Ugyldig ${t[r.format]??r.format}`;case"not_multiple_of":return`Ugyldig tall: m\xe5 v\xe6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xf8kkel i ${r.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`}})}}function c0(){let e,t;return{localeError:(e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}},t={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},r=>{switch(r.code){case"invalid_type":return`F\xe2sit giren: umulan ${r.expected}, alınan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":if(Array.isArray(e))return"saf";if(null===e)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`F\xe2sit giren: umulan ${lN(r.values[0])}`;return`F\xe2sit tercih: m\xfbteberler ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} ${n.unit??"elements"} sahip olmalıydı.`;return`Fazla b\xfcy\xfck: ${r.origin??"value"}, ${t}${r.maximum.toString()} olmalıydı.`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} ${n.unit} sahip olmalıydı.`;return`Fazla k\xfc\xe7\xfck: ${r.origin}, ${t}${r.minimum.toString()} olmalıydı.`}case"invalid_format":if("starts_with"===r.format)return`F\xe2sit metin: "${r.prefix}" ile başlamalı.`;if("ends_with"===r.format)return`F\xe2sit metin: "${r.suffix}" ile bitmeli.`;if("includes"===r.format)return`F\xe2sit metin: "${r.includes}" ihtiv\xe2 etmeli.`;if("regex"===r.format)return`F\xe2sit metin: ${r.pattern} nakşına uymalı.`;return`F\xe2sit ${t[r.format]??r.format}`;case"not_multiple_of":return`F\xe2sit sayı: ${r.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7in tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${r.origin} i\xe7in tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}})}}function c1(){let e,t;return{localeError:(e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}},t={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},r=>{switch(r.code){case"invalid_type":return`ناسم ورودي: باید ${r.expected} وای, مګر ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":if(Array.isArray(e))return"ارې";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} ترلاسه شو`;case"invalid_value":if(1===r.values.length)return`ناسم ورودي: باید ${lN(r.values[0])} وای`;return`ناسم انتخاب: باید یو له ${lo(r.values,"|")} څخه وای`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} ${n.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${r.origin??"ارزښت"} باید ${t}${r.maximum.toString()} وي`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} ${n.unit} ولري`;return`ډیر کوچنی: ${r.origin} باید ${t}${r.minimum.toString()} وي`}case"invalid_format":if("starts_with"===r.format)return`ناسم متن: باید د "${r.prefix}" سره پیل شي`;if("ends_with"===r.format)return`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`;if("includes"===r.format)return`ناسم متن: باید "${r.includes}" ولري`;if("regex"===r.format)return`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`;return`${t[r.format]??r.format} ناسم دی`;case"not_multiple_of":return`ناسم عدد: باید د ${r.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${r.keys.length>1?"کلیډونه":"کلیډ"}: ${lo(r.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${r.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${r.origin} کې`}})}}function c4(){let e,t;return{localeError:(e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}},t={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},r=>{switch(r.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${r.expected}, otrzymano ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":if(Array.isArray(e))return"tablica";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Nieprawidłowe dane wejściowe: oczekiwano ${lN(r.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Za duża wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.maximum.toString()} ${n.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Za mała wartość: oczekiwano, że ${r.origin??"wartość"} będzie mieć ${t}${r.minimum.toString()} ${n.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${r.origin??"wartość"} będzie wynosić ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zaczynać się od "${r.prefix}"`;if("ends_with"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi kończyć się na "${r.suffix}"`;if("includes"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi zawierać "${r.includes}"`;if("regex"===r.format)return`Nieprawidłowy ciąg znak\xf3w: musi odpowiadać wzorcowi ${r.pattern}`;return`Nieprawidłow(y/a/e) ${t[r.format]??r.format}`;case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${r.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${r.origin}`}})}}function c6(){let e,t;return{localeError:(e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}},t={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r=>{switch(r.code){case"invalid_type":return`Tipo inv\xe1lido: esperado ${r.expected}, recebido ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":if(Array.isArray(e))return"array";if(null===e)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Entrada inv\xe1lida: esperado ${lN(r.values[0])}`;return`Op\xe7\xe3o inv\xe1lida: esperada uma das ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Muito grande: esperado que ${r.origin??"valor"} tivesse ${t}${r.maximum.toString()} ${n.unit??"elementos"}`;return`Muito grande: esperado que ${r.origin??"valor"} fosse ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Muito pequeno: esperado que ${r.origin} tivesse ${t}${r.minimum.toString()} ${n.unit}`;return`Muito pequeno: esperado que ${r.origin} fosse ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Texto inv\xe1lido: deve come\xe7ar com "${r.prefix}"`;if("ends_with"===r.format)return`Texto inv\xe1lido: deve terminar com "${r.suffix}"`;if("includes"===r.format)return`Texto inv\xe1lido: deve incluir "${r.includes}"`;if("regex"===r.format)return`Texto inv\xe1lido: deve corresponder ao padr\xe3o ${r.pattern}`;return`${t[r.format]??r.format} inv\xe1lido`;case"not_multiple_of":return`N\xfamero inv\xe1lido: deve ser m\xfaltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Chave inv\xe1lida em ${r.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inv\xe1lido em ${r.origin}`;default:return"Campo inválido"}})}}function c2(e,t,r,n){let i=Math.abs(e),a=i%10,s=i%100;return s>=11&&s<=19?n:1===a?t:a>=2&&a<=4?r:n}function c9(){let e,t;return{localeError:(e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}},t={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},r=>{switch(r.code){case"invalid_type":return`Неверный ввод: ожидалось ${r.expected}, получено ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"массив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Неверный ввод: ожидалось ${lN(r.values[0])}`;return`Неверный вариант: ожидалось одно из ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n){let e=c2(Number(r.maximum),n.unit.one,n.unit.few,n.unit.many);return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет иметь ${t}${r.maximum.toString()} ${e}`}return`Слишком большое значение: ожидалось, что ${r.origin??"значение"} будет ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n){let e=c2(Number(r.minimum),n.unit.one,n.unit.few,n.unit.many);return`Слишком маленькое значение: ожидалось, что ${r.origin} будет иметь ${t}${r.minimum.toString()} ${e}`}return`Слишком маленькое значение: ожидалось, что ${r.origin} будет ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неверная строка: должна начинаться с "${r.prefix}"`;if("ends_with"===r.format)return`Неверная строка: должна заканчиваться на "${r.suffix}"`;if("includes"===r.format)return`Неверная строка: должна содержать "${r.includes}"`;if("regex"===r.format)return`Неверная строка: должна соответствовать шаблону ${r.pattern}`;return`Неверный ${t[r.format]??r.format}`;case"not_multiple_of":return`Неверное число: должно быть кратным ${r.divisor}`;case"unrecognized_keys":return`Нераспознанн${r.keys.length>1?"ые":"ый"} ключ${r.keys.length>1?"и":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${r.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${r.origin}`}})}}function c5(){let e,t;return{localeError:(e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}},t={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},r=>{switch(r.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${r.expected}, prejeto ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"število";case"object":if(Array.isArray(e))return"tabela";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Neveljaven vnos: pričakovano ${lN(r.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} imelo ${t}${r.maximum.toString()} ${n.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${r.origin??"vrednost"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Premajhno: pričakovano, da bo ${r.origin} imelo ${t}${r.minimum.toString()} ${n.unit}`;return`Premajhno: pričakovano, da bo ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Neveljaven niz: mora se začeti z "${r.prefix}"`;if("ends_with"===r.format)return`Neveljaven niz: mora se končati z "${r.suffix}"`;if("includes"===r.format)return`Neveljaven niz: mora vsebovati "${r.includes}"`;if("regex"===r.format)return`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`;return`Neveljaven ${t[r.format]??r.format}`;case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i ključi":" ključ"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${r.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`}})}}function c3(){let e,t;return{localeError:(e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}},t={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r=>{switch(r.code){case"invalid_type":return`Ogiltig inmatning: f\xf6rv\xe4ntat ${r.expected}, fick ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":if(Array.isArray(e))return"lista";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ogiltig inmatning: f\xf6rv\xe4ntat ${lN(r.values[0])}`;return`Ogiltigt val: f\xf6rv\xe4ntade en av ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`F\xf6r stor(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()} ${n.unit??"element"}`;return`F\xf6r stor(t): f\xf6rv\xe4ntat ${r.origin??"värdet"} att ha ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()} ${n.unit}`;return`F\xf6r lite(t): f\xf6rv\xe4ntade ${r.origin??"värdet"} att ha ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste b\xf6rja med "${r.prefix}"`;if("ends_with"===r.format)return`Ogiltig str\xe4ng: m\xe5ste sluta med "${r.suffix}"`;if("includes"===r.format)return`Ogiltig str\xe4ng: m\xe5ste inneh\xe5lla "${r.includes}"`;if("regex"===r.format)return`Ogiltig str\xe4ng: m\xe5ste matcha m\xf6nstret "${r.pattern}"`;return`Ogiltig(t) ${t[r.format]??r.format}`;case"not_multiple_of":return`Ogiltigt tal: m\xe5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${lo(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xe4rde i ${r.origin??"värdet"}`}})}}function c8(){let e,t;return{localeError:(e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}},t={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},r=>{switch(r.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r.expected}, பெறப்பட்டது ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":if(Array.isArray(e))return"அணி";if(null===e)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${lN(r.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${lo(r.values,"|")} இல் ஒன்று`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ${n.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${r.origin??"மதிப்பு"} ${t}${r.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ${n.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${r.origin} ${t}${r.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":if("starts_with"===r.format)return`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`;if("ends_with"===r.format)return`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`;if("includes"===r.format)return`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`;if("regex"===r.format)return`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${t[r.format]??r.format}`;case"not_multiple_of":return`தவறான எண்: ${r.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${r.keys.length>1?"கள்":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`${r.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${r.origin} இல் தவறான மதிப்பு`}})}}function c7(){let e,t;return{localeError:(e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}},t={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},r=>{switch(r.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r.expected} แต่ได้รับ ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":if(Array.isArray(e))return"อาร์เรย์ (Array)";if(null===e)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`ค่าไม่ถูกต้อง: ควรเป็น ${lN(r.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"ไม่เกิน":"น้อยกว่า",n=e[r.origin]??null;if(n)return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()} ${n.unit??"รายการ"}`;return`เกินกำหนด: ${r.origin??"ค่า"} ควรมี${t} ${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?"อย่างน้อย":"มากกว่า",n=e[r.origin]??null;if(n)return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()} ${n.unit}`;return`น้อยกว่ากำหนด: ${r.origin} ควรมี${t} ${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`;if("ends_with"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`;if("includes"===r.format)return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`;if("regex"===r.format)return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`;return`รูปแบบไม่ถูกต้อง: ${t[r.format]??r.format}`;case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${r.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${lo(r.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${r.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${r.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}})}}function pe(){let e,t;return{localeError:(e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}},t={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},r=>{switch(r.code){case"invalid_type":return`Ge\xe7ersiz değer: beklenen ${r.expected}, alınan ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Ge\xe7ersiz değer: beklenen ${lN(r.values[0])}`;return`Ge\xe7ersiz se\xe7enek: aşağıdakilerden biri olmalı: ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()} ${n.unit??"öğe"}`;return`\xc7ok b\xfcy\xfck: beklenen ${r.origin??"değer"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`\xc7ok k\xfc\xe7\xfck: beklenen ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Ge\xe7ersiz metin: "${r.prefix}" ile başlamalı`;if("ends_with"===r.format)return`Ge\xe7ersiz metin: "${r.suffix}" ile bitmeli`;if("includes"===r.format)return`Ge\xe7ersiz metin: "${r.includes}" i\xe7ermeli`;if("regex"===r.format)return`Ge\xe7ersiz metin: ${r.pattern} desenine uymalı`;return`Ge\xe7ersiz ${t[r.format]??r.format}`;case"not_multiple_of":return`Ge\xe7ersiz sayı: ${r.divisor} ile tam b\xf6l\xfcnebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xe7inde ge\xe7ersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${r.origin} i\xe7inde ge\xe7ersiz değer`}})}}function pt(){let e,t;return{localeError:(e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}},t={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},r=>{switch(r.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${r.expected}, отримано ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":if(Array.isArray(e))return"масив";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Неправильні вхідні дані: очікується ${lN(r.values[0])}`;return`Неправильна опція: очікується одне з ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Занадто велике: очікується, що ${r.origin??"значення"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"елементів"}`;return`Занадто велике: очікується, що ${r.origin??"значення"} буде ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Занадто мале: очікується, що ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Занадто мале: очікується, що ${r.origin} буде ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Неправильний рядок: повинен починатися з "${r.prefix}"`;if("ends_with"===r.format)return`Неправильний рядок: повинен закінчуватися на "${r.suffix}"`;if("includes"===r.format)return`Неправильний рядок: повинен містити "${r.includes}"`;if("regex"===r.format)return`Неправильний рядок: повинен відповідати шаблону ${r.pattern}`;return`Неправильний ${t[r.format]??r.format}`;case"not_multiple_of":return`Неправильне число: повинно бути кратним ${r.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${r.keys.length>1?"і":""}: ${lo(r.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${r.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${r.origin}`}})}}function pr(){let e,t;return{localeError:(e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}},t={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},r=>{switch(r.code){case"invalid_type":return`غلط ان پٹ: ${r.expected} متوقع تھا، ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":if(Array.isArray(e))return"آرے";if(null===e)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)} موصول ہوا`;case"invalid_value":if(1===r.values.length)return`غلط ان پٹ: ${lN(r.values[0])} متوقع تھا`;return`غلط آپشن: ${lo(r.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`بہت بڑا: ${r.origin??"ویلیو"} کے ${t}${r.maximum.toString()} ${n.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${r.origin??"ویلیو"} کا ${t}${r.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`بہت چھوٹا: ${r.origin} کے ${t}${r.minimum.toString()} ${n.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${r.origin} کا ${t}${r.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":if("starts_with"===r.format)return`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`;if("ends_with"===r.format)return`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`;if("includes"===r.format)return`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`;if("regex"===r.format)return`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`;return`غلط ${t[r.format]??r.format}`;case"not_multiple_of":return`غلط نمبر: ${r.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${r.keys.length>1?"ز":""}: ${lo(r.keys,"، ")}`;case"invalid_key":return`${r.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${r.origin} میں غلط ویلیو`}})}}function pn(){let e,t;return{localeError:(e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}},t={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},r=>{switch(r.code){case"invalid_type":return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${r.expected}, nhận được ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"số";case"object":if(Array.isArray(e))return"mảng";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`Đầu v\xe0o kh\xf4ng hợp lệ: mong đợi ${lN(r.values[0])}`;return`T\xf9y chọn kh\xf4ng hợp lệ: mong đợi một trong c\xe1c gi\xe1 trị ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${n.verb} ${t}${r.maximum.toString()} ${n.unit??"phần tử"}`;return`Qu\xe1 lớn: mong đợi ${r.origin??"giá trị"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${n.verb} ${t}${r.minimum.toString()} ${n.unit}`;return`Qu\xe1 nhỏ: mong đợi ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bắt đầu bằng "${r.prefix}"`;if("ends_with"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải kết th\xfac bằng "${r.suffix}"`;if("includes"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải bao gồm "${r.includes}"`;if("regex"===r.format)return`Chuỗi kh\xf4ng hợp lệ: phải khớp với mẫu ${r.pattern}`;return`${t[r.format]??r.format} kh\xf4ng hợp lệ`;case"not_multiple_of":return`Số kh\xf4ng hợp lệ: phải l\xe0 bội số của ${r.divisor}`;case"unrecognized_keys":return`Kh\xf3a kh\xf4ng được nhận dạng: ${lo(r.keys,", ")}`;case"invalid_key":return`Kh\xf3a kh\xf4ng hợp lệ trong ${r.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Gi\xe1 trị kh\xf4ng hợp lệ trong ${r.origin}`}})}}function pi(){let e,t;return{localeError:(e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}},t={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},r=>{switch(r.code){case"invalid_type":return`无效输入:期望 ${r.expected},实际接收 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":if(Array.isArray(e))return"数组";if(null===e)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`无效输入:期望 ${lN(r.values[0])}`;return`无效选项:期望以下之一 ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()} ${n.unit??"个元素"}`;return`数值过大:期望 ${r.origin??"值"} ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()} ${n.unit}`;return`数值过小:期望 ${r.origin} ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`无效字符串:必须以 "${r.prefix}" 开头`;if("ends_with"===r.format)return`无效字符串:必须以 "${r.suffix}" 结尾`;if("includes"===r.format)return`无效字符串:必须包含 "${r.includes}"`;if("regex"===r.format)return`无效字符串:必须满足正则表达式 ${r.pattern}`;return`无效${t[r.format]??r.format}`;case"not_multiple_of":return`无效数字:必须是 ${r.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${lo(r.keys,", ")}`;case"invalid_key":return`${r.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${r.origin} 中包含无效值(value)`}})}}function pa(){let e,t;return{localeError:(e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}},t={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},r=>{switch(r.code){case"invalid_type":return`無效的輸入值:預期為 ${r.expected},但收到 ${(e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}return t})(r.input)}`;case"invalid_value":if(1===r.values.length)return`無效的輸入值:預期為 ${lN(r.values[0])}`;return`無效的選項:預期為以下其中之一 ${lo(r.values,"|")}`;case"too_big":{let t=r.inclusive?"<=":"<",n=e[r.origin]??null;if(n)return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()} ${n.unit??"個元素"}`;return`數值過大:預期 ${r.origin??"值"} 應為 ${t}${r.maximum.toString()}`}case"too_small":{let t=r.inclusive?">=":">",n=e[r.origin]??null;if(n)return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()} ${n.unit}`;return`數值過小:預期 ${r.origin} 應為 ${t}${r.minimum.toString()}`}case"invalid_format":if("starts_with"===r.format)return`無效的字串:必須以 "${r.prefix}" 開頭`;if("ends_with"===r.format)return`無效的字串:必須以 "${r.suffix}" 結尾`;if("includes"===r.format)return`無效的字串:必須包含 "${r.includes}"`;if("regex"===r.format)return`無效的字串:必須符合格式 ${r.pattern}`;return`無效的 ${t[r.format]??r.format}`;case"not_multiple_of":return`無效的數字:必須為 ${r.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${r.keys.length>1?"們":""}:${lo(r.keys,"、")}`;case"invalid_key":return`${r.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${r.origin} 中有無效的值`}})}}C(cO,{zhTW:()=>pa,zhCN:()=>pi,vi:()=>pn,ur:()=>pr,ua:()=>pt,tr:()=>pe,th:()=>c7,ta:()=>c8,sv:()=>c3,sl:()=>c5,ru:()=>c9,pt:()=>c6,ps:()=>c1,pl:()=>c4,ota:()=>c0,no:()=>cQ,nl:()=>cY,ms:()=>cX,mk:()=>cH,ko:()=>cJ,kh:()=>cG,ja:()=>cK,it:()=>cW,id:()=>cB,hu:()=>cV,he:()=>cq,frCA:()=>cF,fr:()=>cZ,fi:()=>cL,fa:()=>cM,es:()=>cD,eo:()=>cU,en:()=>cR,de:()=>cA,cs:()=>cz,ca:()=>cC,be:()=>cT,az:()=>cj,ar:()=>cE});var ps=Symbol("ZodOutput"),po=Symbol("ZodInput");class pl{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&"object"==typeof r&&"id"in r){if(this._idmap.has(r.id))throw Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}remove(e){return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};return delete r.id,{...r,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function pu(){return new pl}var pd=pu();function pc(e,t){return new e({type:"string",...lE(t)})}function pp(e,t){return new e({type:"string",coerce:!0,...lE(t)})}function pf(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...lE(t)})}function pm(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...lE(t)})}function ph(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...lE(t)})}function pg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...lE(t)})}function pv(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...lE(t)})}function py(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...lE(t)})}function p_(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...lE(t)})}function pb(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...lE(t)})}function p$(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...lE(t)})}function pw(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...lE(t)})}function pk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...lE(t)})}function px(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...lE(t)})}function pS(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...lE(t)})}function pI(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...lE(t)})}function pP(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...lE(t)})}function pO(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...lE(t)})}function pE(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...lE(t)})}function pj(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...lE(t)})}function pN(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...lE(t)})}function pT(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...lE(t)})}function pC(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...lE(t)})}function pz(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...lE(t)})}var pA={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function pR(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...lE(t)})}function pU(e,t){return new e({type:"string",format:"date",check:"string_format",...lE(t)})}function pD(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...lE(t)})}function pM(e,t){return new e({type:"string",format:"duration",check:"string_format",...lE(t)})}function pL(e,t){return new e({type:"number",checks:[],...lE(t)})}function pZ(e,t){return new e({type:"number",coerce:!0,checks:[],...lE(t)})}function pF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...lE(t)})}function pq(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...lE(t)})}function pV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...lE(t)})}function pB(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...lE(t)})}function pW(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...lE(t)})}function pK(e,t){return new e({type:"boolean",...lE(t)})}function pG(e,t){return new e({type:"boolean",coerce:!0,...lE(t)})}function pJ(e,t){return new e({type:"bigint",...lE(t)})}function pH(e,t){return new e({type:"bigint",coerce:!0,...lE(t)})}function pX(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...lE(t)})}function pY(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...lE(t)})}function pQ(e,t){return new e({type:"symbol",...lE(t)})}function p0(e,t){return new e({type:"undefined",...lE(t)})}function p1(e,t){return new e({type:"null",...lE(t)})}function p4(e){return new e({type:"any"})}function p6(e){return new e({type:"unknown"})}function p2(e,t){return new e({type:"never",...lE(t)})}function p9(e,t){return new e({type:"void",...lE(t)})}function p5(e,t){return new e({type:"date",...lE(t)})}function p3(e,t){return new e({type:"date",coerce:!0,...lE(t)})}function p8(e,t){return new e({type:"nan",...lE(t)})}function p7(e,t){return new uG({check:"less_than",...lE(t),value:e,inclusive:!1})}function fe(e,t){return new uG({check:"less_than",...lE(t),value:e,inclusive:!0})}function ft(e,t){return new uJ({check:"greater_than",...lE(t),value:e,inclusive:!1})}function fr(e,t){return new uJ({check:"greater_than",...lE(t),value:e,inclusive:!0})}function fn(e){return ft(0,e)}function fi(e){return p7(0,e)}function fa(e){return fe(0,e)}function fs(e){return fr(0,e)}function fo(e,t){return new uH({check:"multiple_of",...lE(t),value:e})}function fl(e,t){return new uQ({check:"max_size",...lE(t),maximum:e})}function fu(e,t){return new u0({check:"min_size",...lE(t),minimum:e})}function fd(e,t){return new u1({check:"size_equals",...lE(t),size:e})}function fc(e,t){return new u4({check:"max_length",...lE(t),maximum:e})}function fp(e,t){return new u6({check:"min_length",...lE(t),minimum:e})}function ff(e,t){return new u2({check:"length_equals",...lE(t),length:e})}function fm(e,t){return new u5({check:"string_format",format:"regex",...lE(t),pattern:e})}function fh(e){return new u3({check:"string_format",format:"lowercase",...lE(e)})}function fg(e){return new u8({check:"string_format",format:"uppercase",...lE(e)})}function fv(e,t){return new u7({check:"string_format",format:"includes",...lE(t),includes:e})}function fy(e,t){return new de({check:"string_format",format:"starts_with",...lE(t),prefix:e})}function f_(e,t){return new dt({check:"string_format",format:"ends_with",...lE(t),suffix:e})}function fb(e,t,r){return new dn({check:"property",property:e,schema:t,...lE(r)})}function f$(e,t){return new di({check:"mime_type",mime:e,...lE(t)})}function fw(e){return new da({check:"overwrite",tx:e})}function fk(e){return fw(t=>t.normalize(e))}function fx(){return fw(e=>e.trim())}function fS(){return fw(e=>e.toLowerCase())}function fI(){return fw(e=>e.toUpperCase())}function fP(e,t,r){return new e({type:"array",element:t,...lE(r)})}function fO(e,t,r){return new e({type:"union",options:t,...lE(r)})}function fE(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...lE(n)})}function fj(e,t,r){return new e({type:"intersection",left:t,right:r})}function fN(e,t,r,n){let i=r instanceof du;return new e({type:"tuple",items:t,rest:i?r:null,...lE(i?n:r)})}function fT(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...lE(n)})}function fC(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...lE(n)})}function fz(e,t,r){return new e({type:"set",valueType:t,...lE(r)})}function fA(e,t,r){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...lE(r)})}function fR(e,t,r){return new e({type:"enum",entries:t,...lE(r)})}function fU(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...lE(r)})}function fD(e,t){return new e({type:"file",...lE(t)})}function fM(e,t){return new e({type:"transform",transform:t})}function fL(e,t){return new e({type:"optional",innerType:t})}function fZ(e,t){return new e({type:"nullable",innerType:t})}function fF(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof r?r():r}})}function fq(e,t,r){return new e({type:"nonoptional",innerType:t,...lE(r)})}function fV(e,t){return new e({type:"success",innerType:t})}function fB(e,t,r){return new e({type:"catch",innerType:t,catchValue:"function"==typeof r?r:()=>r})}function fW(e,t,r){return new e({type:"pipe",in:t,out:r})}function fK(e,t){return new e({type:"readonly",innerType:t})}function fG(e,t,r){return new e({type:"template_literal",parts:t,...lE(r)})}function fJ(e,t){return new e({type:"lazy",getter:t})}function fH(e,t){return new e({type:"promise",innerType:t})}function fX(e,t,r){let n=lE(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function fY(e,t,r){return new e({type:"custom",check:"custom",fn:t,...lE(r)})}function fQ(e,t){let r=lE(t),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];"sensitive"!==r.case&&(n=n.map(e=>"string"==typeof e?e.toLowerCase():e),i=i.map(e=>"string"==typeof e?e.toLowerCase():e));let a=new Set(n),s=new Set(i),o=e.Pipe??c_,l=e.Boolean??dZ,u=e.String??dd,d=new(e.Transform??cl)({type:"transform",transform:(e,t)=>{let n=e;return"sensitive"!==r.case&&(n=n.toLowerCase()),!!a.has(n)||!s.has(n)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...s],input:t.value,inst:d}),{})},error:r.error}),c=new o({type:"pipe",in:new u({type:"string",error:r.error}),out:d,error:r.error});return new o({type:"pipe",in:c,out:new l({type:"boolean",error:r.error}),error:r.error})}function f0(e,t,r,n={}){let i=lE(n),a={...lE(n),check:"string_format",type:"string",format:t,fn:"function"==typeof r?r:e=>r.test(e),...i};return r instanceof RegExp&&(a.pattern=r),new e(a)}class f1{constructor(e){this._def=e,this.def=e}implement(e){if("function"!=typeof e)throw Error("implement() must be called with a function");let t=(...r)=>{let n=this._def.input?l9(this._def.input,r,void 0,{callee:t}):r;if(!Array.isArray(n))throw Error("Invalid arguments schema: not an array or tuple schema.");let i=e(...n);return this._def.output?l9(this._def.output,i,void 0,{callee:t}):i};return t}implementAsync(e){if("function"!=typeof e)throw Error("implement() must be called with a function");let t=async(...r)=>{let n=this._def.input?await l3(this._def.input,r,void 0,{callee:t}):r;if(!Array.isArray(n))throw Error("Invalid arguments schema: not an array or tuple schema.");let i=await e(...n);return this._def.output?l3(this._def.output,i,void 0,{callee:t}):i};return t}input(...e){let t=this.constructor;return new t(Array.isArray(e[0])?{type:"function",input:new d8({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}:{type:"function",input:e[0],output:this._def.output})}output(e){return new this.constructor({type:"function",input:this._def.input,output:e})}}function f4(e){return new f1({type:"function",input:Array.isArray(e?.input)?fN(d8,e?.input):e?.input??fP(dQ,p6(dG)),output:e?.output??p6(dG)})}class f6{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??pd,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var r;let n=e._zod.def,i=this.seen.get(e);if(i)return i.count++,t.schemaPath.includes(e)&&(i.cycle=t.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...t,schemaPath:[...t.schemaPath,e],path:t.path},i=e._zod.parent;if(i)a.ref=i,this.process(i,r),this.seen.get(i).isParent=!0;else{let t=a.schema;switch(n.type){case"string":{t.type="string";let{minimum:r,maximum:n,format:i,patterns:s,contentEncoding:o}=e._zod.bag;if("number"==typeof r&&(t.minLength=r),"number"==typeof n&&(t.maxLength=n),i&&(t.format=({guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""})[i]??i,""===t.format)&&delete t.format,o&&(t.contentEncoding=o),s&&s.size>0){let e=[...s];1===e.length?t.pattern=e[0].source:e.length>1&&(a.schema.allOf=[...e.map(e=>({..."draft-7"===this.target?{type:"string"}:{},pattern:e.source}))])}break}case"number":{let{minimum:r,maximum:n,format:i,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:o}=e._zod.bag;"string"==typeof i&&i.includes("int")?t.type="integer":t.type="number","number"==typeof o&&(t.exclusiveMinimum=o),"number"==typeof r&&(t.minimum=r,"number"==typeof o)&&(o>=r?delete t.minimum:delete t.exclusiveMinimum),"number"==typeof s&&(t.exclusiveMaximum=s),"number"==typeof n&&(t.maximum=n,"number"==typeof s)&&(s<=n?delete t.maximum:delete t.exclusiveMaximum),"number"==typeof a&&(t.multipleOf=a);break}case"boolean":case"success":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw Error("Symbols cannot be represented in JSON Schema");break;case"null":t.type="null";break;case"any":case"unknown":break;case"undefined":case"never":t.not={};break;case"void":if("throw"===this.unrepresentable)throw Error("Void cannot be represented in JSON Schema");break;case"date":if("throw"===this.unrepresentable)throw Error("Date cannot be represented in JSON Schema");break;case"array":{let{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(t.minItems=i),"number"==typeof a&&(t.maxItems=a),t.type="array",t.items=this.process(n.element,{...r,path:[...r.path,"items"]});break}case"object":{t.type="object",t.properties={};let e=n.shape;for(let n in e)t.properties[n]=this.process(e[n],{...r,path:[...r.path,"properties",n]});let i=new Set([...new Set(Object.keys(e))].filter(e=>{let t=n.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout}));i.size>0&&(t.required=Array.from(i)),n.catchall?._zod.def.type==="never"?t.additionalProperties=!1:n.catchall?n.catchall&&(t.additionalProperties=this.process(n.catchall,{...r,path:[...r.path,"additionalProperties"]})):"output"===this.io&&(t.additionalProperties=!1);break}case"union":t.anyOf=n.options.map((e,t)=>this.process(e,{...r,path:[...r.path,"anyOf",t]}));break;case"intersection":{let e=this.process(n.left,{...r,path:[...r.path,"allOf",0]}),i=this.process(n.right,{...r,path:[...r.path,"allOf",1]}),a=e=>"allOf"in e&&1===Object.keys(e).length;t.allOf=[...a(e)?e.allOf:[e],...a(i)?i.allOf:[i]];break}case"tuple":{t.type="array";let i=n.items.map((e,t)=>this.process(e,{...r,path:[...r.path,"prefixItems",t]}));if("draft-2020-12"===this.target?t.prefixItems=i:t.items=i,n.rest){let e=this.process(n.rest,{...r,path:[...r.path,"items"]});"draft-2020-12"===this.target?t.items=e:t.additionalItems=e}n.rest&&(t.items=this.process(n.rest,{...r,path:[...r.path,"items"]}));let{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(t.minItems=a),"number"==typeof s&&(t.maxItems=s);break}case"record":t.type="object",t.propertyNames=this.process(n.keyType,{...r,path:[...r.path,"propertyNames"]}),t.additionalProperties=this.process(n.valueType,{...r,path:[...r.path,"additionalProperties"]});break;case"map":if("throw"===this.unrepresentable)throw Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw Error("Set cannot be represented in JSON Schema");break;case"enum":{let e=ls(n.entries);e.every(e=>"number"==typeof e)&&(t.type="number"),e.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=e;break}case"literal":{let e=[];for(let t of n.values)if(void 0===t){if("throw"===this.unrepresentable)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof t)if("throw"===this.unrepresentable)throw Error("BigInt literals cannot be represented in JSON Schema");else e.push(Number(t));else e.push(t);if(0===e.length);else if(1===e.length){let r=e[0];t.type=null===r?"null":typeof r,t.const=r}else e.every(e=>"number"==typeof e)&&(t.type="number"),e.every(e=>"string"==typeof e)&&(t.type="string"),e.every(e=>"boolean"==typeof e)&&(t.type="string"),e.every(e=>null===e)&&(t.type="null"),t.enum=e;break}case"file":{let r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:n,maximum:i,mime:a}=e._zod.bag;void 0!==n&&(r.minLength=n),void 0!==i&&(r.maxLength=i),a?1===a.length?(r.contentMediaType=a[0],Object.assign(t,r)):t.anyOf=a.map(e=>({...r,contentMediaType:e})):Object.assign(t,r);break}case"transform":if("throw"===this.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema");break;case"nullable":t.anyOf=[this.process(n.innerType,r),{type:"null"}];break;case"nonoptional":case"promise":case"optional":this.process(n.innerType,r),a.ref=n.innerType;break;case"default":this.process(n.innerType,r),a.ref=n.innerType,t.default=JSON.parse(JSON.stringify(n.defaultValue));break;case"prefault":this.process(n.innerType,r),a.ref=n.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break;case"catch":{let e;this.process(n.innerType,r),a.ref=n.innerType;try{e=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{let r=e._zod.pattern;if(!r)throw Error("Pattern not found in template literal");t.type="string",t.pattern=r.source;break}case"pipe":{let e="input"===this.io?"transform"===n.in._zod.def.type?n.out:n.in:n.out;this.process(e,r),a.ref=e;break}case"readonly":this.process(n.innerType,r),a.ref=n.innerType,t.readOnly=!0;break;case"lazy":{let t=e._zod.innerType;this.process(t,r),a.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")}}}let o=this.metadataRegistry.get(e);return o&&Object.assign(a.schema,o),"input"===this.io&&function e(t,r){let n=r??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let i=t._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":return!1;case"array":return e(i.element,n);case"object":for(let t in i.shape)if(e(i.shape[t],n))return!0;return!1;case"union":for(let t of i.options)if(e(t,n))return!0;return!1;case"intersection":return e(i.left,n)||e(i.right,n);case"tuple":for(let t of i.items)if(e(t,n))return!0;if(i.rest&&e(i.rest,n))return!0;return!1;case"record":case"map":return e(i.keyType,n)||e(i.valueType,n);case"set":return e(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return e(i.innerType,n);case"lazy":return e(i.getter(),n);case"transform":return!0;case"pipe":return e(i.in,n)||e(i.out,n)}throw Error(`Unknown schema type: ${i.type}`)}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===this.io&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,t){let r={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},n=this.seen.get(e);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=e=>{let t="draft-2020-12"===this.target?"$defs":"definitions";if(r.external){let n=r.external.registry.get(e[0])?.id;if(n)return{ref:r.external.uri(n)};let i=e[1].defId??e[1].schema.id??`schema${this.counter++}`;return e[1].defId=i,{defId:i,ref:`${r.external.uri("__shared")}#/${t}/${i}`}}if(e[1]===n)return{ref:"#"};let i=`#/${t}/`,a=e[1].schema.id??`__schema${this.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:r,defId:n}=i(e);t.def={...t.schema},n&&(t.defId=n);let a=t.schema;for(let e in a)delete a[e];a.$ref=r};for(let t of this.seen.entries()){let n=t[1];if(e===t[0]){a(t);continue}if(r.external){let n=r.external.registry.get(t[0])?.id;if(e!==t[0]&&n){a(t);continue}}if(this.metadataRegistry.get(t[0])?.id){a(t);continue}if(n.cycle){if("throw"===r.cycles)throw Error(`Cycle detected: #/${n.cycle?.join("/")}/<root>
|
|
77
82
|
|
|
78
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);"ref"===r.cycles&&a(t);continue}if(n.count>1&&"ref"===r.reused){a(t);continue}}let s=(e,t)=>{let r=this.seen.get(e),n=r.def??r.schema,i={...n};if(null===r.ref)return;let a=r.ref;if(r.ref=null,a){s(a,t);let e=this.seen.get(a).schema;e.$ref&&"draft-7"===t.target?(n.allOf=n.allOf??[],n.allOf.push(e)):(Object.assign(n,e),Object.assign(n,i))}r.isParent||this.override({zodSchema:e,jsonSchema:n,path:r.path??[]})};for(let e of[...this.seen.entries()].reverse())s(e[0],{target:this.target});let o={};"draft-2020-12"===this.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?o.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(o,n.def);let l=r.external?.defs??{};for(let e of this.seen.entries()){let t=e[1];t.def&&t.defId&&(l[t.defId]=t.def)}!r.external&&Object.keys(l).length>0&&("draft-2020-12"===this.target?o.$defs=l:o.definitions=l);try{return JSON.parse(JSON.stringify(o))}catch(e){throw Error("Error converting schema to JSON.")}}}function fD(e,t){if(e instanceof cY){let r=new fU(t),n={};for(let t of e._idmap.entries()){let[e,n]=t;r.process(n)}let i={},a={registry:e,uri:t?.uri||(e=>e),defs:n};for(let n of e._idmap.entries()){let[e,s]=n;i[e]=r.emit(s,{...t,external:a})}return Object.keys(n).length>0&&(i.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:n}),{schemas:i}}let r=new fU(t);return r.process(e),r.emit(e,t)}var fM={},fL=oM("ZodMiniType",(e,t)=>{if(!e._zod)throw Error("Uninitialized schema in ZodMiniType.");uY.init(e,t),e.def=t,e.parse=(t,r)=>lM(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>lq(e,t,r),e.parseAsync=async(t,r)=>lZ(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>lB(e,t,r),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,r)=>ll(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e)});oM("ZodMiniObject",(e,t)=>{dR.init(e,t),fL.init(e,t),oV.defineLazy(e,"shape",()=>t.shape)});var fZ={};C(fZ,{xid:()=>m$,void:()=>hs,uuidv7:()=>mo,uuidv6:()=>ms,uuidv4:()=>ma,uuid:()=>mi,url:()=>mu,uppercase:()=>p5,unknown:()=>hr,union:()=>hv,undefined:()=>m5,ulid:()=>m_,uint64:()=>m4,uint32:()=>mJ,tuple:()=>hk,trim:()=>fi,treeifyError:()=>lA,transform:()=>hM,toUpperCase:()=>fs,toLowerCase:()=>fa,toJSONSchema:()=>fD,templateLiteral:()=>h8,symbol:()=>m2,superRefine:()=>go,success:()=>hY,stringbool:()=>gu,stringFormat:()=>mZ,string:()=>f3,strictObject:()=>hm,startsWith:()=>p8,size:()=>p0,setErrorMap:()=>gf,set:()=>hj,safeParseAsync:()=>f6,safeParse:()=>f4,registry:()=>cQ,regexes:()=>lW,regex:()=>p2,refine:()=>gs,record:()=>hS,readonly:()=>h5,property:()=>fe,promise:()=>gr,prettifyError:()=>lU,preprocess:()=>gc,prefault:()=>hG,positive:()=>pK,pipe:()=>h2,partialRecord:()=>hI,parseAsync:()=>f1,parse:()=>f0,overwrite:()=>fr,optional:()=>hZ,object:()=>hf,number:()=>mq,nullish:()=>hV,nullable:()=>hq,null:()=>m8,normalize:()=>fn,nonpositive:()=>pJ,nonoptional:()=>hH,nonnegative:()=>pH,never:()=>hi,negative:()=>pG,nativeEnum:()=>hC,nanoid:()=>mf,nan:()=>h4,multipleOf:()=>pX,minSize:()=>pQ,minLength:()=>p4,mime:()=>ft,maxSize:()=>pY,maxLength:()=>p1,map:()=>hO,lte:()=>pV,lt:()=>pq,lowercase:()=>p9,looseObject:()=>hh,locales:()=>cl,literal:()=>hA,length:()=>p6,lazy:()=>ge,ksuid:()=>mk,keyof:()=>hc,jwt:()=>mM,json:()=>gd,iso:()=>fF,ipv6:()=>mP,ipv4:()=>mS,intersection:()=>h$,int64:()=>m1,int32:()=>mG,int:()=>mB,instanceof:()=>gl,includes:()=>p3,guid:()=>mr,gte:()=>pW,gt:()=>pB,globalRegistry:()=>c0,getErrorMap:()=>gm,function:()=>fR,formatError:()=>lz,float64:()=>mK,float32:()=>mW,flattenError:()=>lC,file:()=>hU,enum:()=>hT,endsWith:()=>p7,emoji:()=>mc,email:()=>me,e164:()=>mU,discriminatedUnion:()=>h_,date:()=>hl,custom:()=>ga,cuid2:()=>mv,cuid:()=>mh,core:()=>oU,config:()=>oq,coerce:()=>gh,clone:()=>ll,cidrv6:()=>mN,cidrv4:()=>mE,check:()=>gi,catch:()=>h0,boolean:()=>mX,bigint:()=>mQ,base64url:()=>mA,base64:()=>mC,array:()=>hd,any:()=>he,_default:()=>hW,_ZodString:()=>f9,ZodXID:()=>mb,ZodVoid:()=>ha,ZodUnknown:()=>ht,ZodUnion:()=>hg,ZodUndefined:()=>m9,ZodUUID:()=>mn,ZodURL:()=>ml,ZodULID:()=>my,ZodType:()=>f2,ZodTuple:()=>hw,ZodTransform:()=>hD,ZodTemplateLiteral:()=>h3,ZodSymbol:()=>m6,ZodSuccess:()=>hX,ZodStringFormat:()=>f8,ZodString:()=>f5,ZodSet:()=>hE,ZodRecord:()=>hx,ZodRealError:()=>fQ,ZodReadonly:()=>h9,ZodPromise:()=>gt,ZodPrefault:()=>hK,ZodPipe:()=>h6,ZodOptional:()=>hL,ZodObject:()=>hp,ZodNumberFormat:()=>mV,ZodNumber:()=>mF,ZodNullable:()=>hF,ZodNull:()=>m3,ZodNonOptional:()=>hJ,ZodNever:()=>hn,ZodNanoID:()=>mp,ZodNaN:()=>h1,ZodMap:()=>hP,ZodLiteral:()=>hz,ZodLazy:()=>h7,ZodKSUID:()=>mw,ZodJWT:()=>mD,ZodIssueCode:()=>gp,ZodIntersection:()=>hb,ZodISOTime:()=>fK,ZodISODuration:()=>fJ,ZodISODateTime:()=>fq,ZodISODate:()=>fB,ZodIPv6:()=>mI,ZodIPv4:()=>mx,ZodGUID:()=>mt,ZodFile:()=>hR,ZodError:()=>fY,ZodEnum:()=>hN,ZodEmoji:()=>md,ZodEmail:()=>f7,ZodE164:()=>mR,ZodDiscriminatedUnion:()=>hy,ZodDefault:()=>hB,ZodDate:()=>ho,ZodCustomStringFormat:()=>mL,ZodCustom:()=>gn,ZodCatch:()=>hQ,ZodCUID2:()=>mg,ZodCUID:()=>mm,ZodCIDRv6:()=>mj,ZodCIDRv4:()=>mO,ZodBoolean:()=>mH,ZodBigIntFormat:()=>m0,ZodBigInt:()=>mY,ZodBase64URL:()=>mz,ZodBase64:()=>mT,ZodArray:()=>hu,ZodAny:()=>m7,TimePrecision:()=>ph,NEVER:()=>oD,$output:()=>cH,$input:()=>cX,$brand:()=>oL});var fF={};C(fF,{time:()=>fG,duration:()=>fH,datetime:()=>fV,date:()=>fW,ZodISOTime:()=>fK,ZodISODuration:()=>fJ,ZodISODateTime:()=>fq,ZodISODate:()=>fB});var fq=oM("ZodISODateTime",(e,t)=>{dr.init(e,t),f8.init(e,t)});function fV(e){return pg(fq,e)}var fB=oM("ZodISODate",(e,t)=>{dn.init(e,t),f8.init(e,t)});function fW(e){return pv(fB,e)}var fK=oM("ZodISOTime",(e,t)=>{di.init(e,t),f8.init(e,t)});function fG(e){return py(fK,e)}var fJ=oM("ZodISODuration",(e,t)=>{da.init(e,t),f8.init(e,t)});function fH(e){return p_(fJ,e)}var fX=(e,t)=>{lN.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>lz(e,t)},flatten:{value:t=>lC(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})},fY=oM("ZodError",fX),fQ=oM("ZodError",fX,{Parent:Error}),f0=lD(fQ),f1=lL(fQ),f4=lF(fQ),f6=lV(fQ),f2=oM("ZodType",(e,t)=>(uY.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,r)=>ll(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e),e.parse=(t,r)=>f0(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>f4(e,t,r),e.parseAsync=async(t,r)=>f1(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>f6(e,t,r),e.spa=e.safeParseAsync,e.refine=(t,r)=>e.check(gs(t,r)),e.superRefine=t=>e.check(go(t)),e.overwrite=t=>e.check(fr(t)),e.optional=()=>hZ(e),e.nullable=()=>hq(e),e.nullish=()=>hZ(hq(e)),e.nonoptional=t=>hH(e,t),e.array=()=>hd(e),e.or=t=>hv([e,t]),e.and=t=>h$(e,t),e.transform=t=>h2(e,hM(t)),e.default=t=>hW(e,t),e.prefault=t=>hG(e,t),e.catch=t=>h0(e,t),e.pipe=t=>h2(e,t),e.readonly=()=>h5(e),e.describe=t=>{let r=e.clone();return c0.add(r,{description:t}),r},Object.defineProperty(e,"description",{get:()=>c0.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return c0.get(e);let r=e.clone();return c0.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),f9=oM("_ZodString",(e,t)=>{uQ.init(e,t),f2.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...t)=>e.check(p2(...t)),e.includes=(...t)=>e.check(p3(...t)),e.startsWith=(...t)=>e.check(p8(...t)),e.endsWith=(...t)=>e.check(p7(...t)),e.min=(...t)=>e.check(p4(...t)),e.max=(...t)=>e.check(p1(...t)),e.length=(...t)=>e.check(p6(...t)),e.nonempty=(...t)=>e.check(p4(1,...t)),e.lowercase=t=>e.check(p9(t)),e.uppercase=t=>e.check(p5(t)),e.trim=()=>e.check(fi()),e.normalize=(...t)=>e.check(fn(...t)),e.toLowerCase=()=>e.check(fa()),e.toUpperCase=()=>e.check(fs())}),f5=oM("ZodString",(e,t)=>{uQ.init(e,t),f9.init(e,t),e.email=t=>e.check(c6(f7,t)),e.url=t=>e.check(c7(ml,t)),e.jwt=t=>e.check(pm(mD,t)),e.emoji=t=>e.check(pe(md,t)),e.guid=t=>e.check(c2(mt,t)),e.uuid=t=>e.check(c9(mn,t)),e.uuidv4=t=>e.check(c5(mn,t)),e.uuidv6=t=>e.check(c3(mn,t)),e.uuidv7=t=>e.check(c8(mn,t)),e.nanoid=t=>e.check(pt(mp,t)),e.guid=t=>e.check(c2(mt,t)),e.cuid=t=>e.check(pr(mm,t)),e.cuid2=t=>e.check(pn(mg,t)),e.ulid=t=>e.check(pi(my,t)),e.base64=t=>e.check(pc(mT,t)),e.base64url=t=>e.check(pp(mz,t)),e.xid=t=>e.check(pa(mb,t)),e.ksuid=t=>e.check(ps(mw,t)),e.ipv4=t=>e.check(po(mx,t)),e.ipv6=t=>e.check(pl(mI,t)),e.cidrv4=t=>e.check(pu(mO,t)),e.cidrv6=t=>e.check(pd(mj,t)),e.e164=t=>e.check(pf(mR,t)),e.datetime=t=>e.check(fV(t)),e.date=t=>e.check(fW(t)),e.time=t=>e.check(fG(t)),e.duration=t=>e.check(fH(t))});function f3(e){return c1(f5,e)}var f8=oM("ZodStringFormat",(e,t)=>{u0.init(e,t),f9.init(e,t)}),f7=oM("ZodEmail",(e,t)=>{u6.init(e,t),f8.init(e,t)});function me(e){return c6(f7,e)}var mt=oM("ZodGUID",(e,t)=>{u1.init(e,t),f8.init(e,t)});function mr(e){return c2(mt,e)}var mn=oM("ZodUUID",(e,t)=>{u4.init(e,t),f8.init(e,t)});function mi(e){return c9(mn,e)}function ma(e){return c5(mn,e)}function ms(e){return c3(mn,e)}function mo(e){return c8(mn,e)}var ml=oM("ZodURL",(e,t)=>{u2.init(e,t),f8.init(e,t)});function mu(e){return c7(ml,e)}var md=oM("ZodEmoji",(e,t)=>{u9.init(e,t),f8.init(e,t)});function mc(e){return pe(md,e)}var mp=oM("ZodNanoID",(e,t)=>{u5.init(e,t),f8.init(e,t)});function mf(e){return pt(mp,e)}var mm=oM("ZodCUID",(e,t)=>{u3.init(e,t),f8.init(e,t)});function mh(e){return pr(mm,e)}var mg=oM("ZodCUID2",(e,t)=>{u8.init(e,t),f8.init(e,t)});function mv(e){return pn(mg,e)}var my=oM("ZodULID",(e,t)=>{u7.init(e,t),f8.init(e,t)});function m_(e){return pi(my,e)}var mb=oM("ZodXID",(e,t)=>{de.init(e,t),f8.init(e,t)});function m$(e){return pa(mb,e)}var mw=oM("ZodKSUID",(e,t)=>{dt.init(e,t),f8.init(e,t)});function mk(e){return ps(mw,e)}var mx=oM("ZodIPv4",(e,t)=>{ds.init(e,t),f8.init(e,t)});function mS(e){return po(mx,e)}var mI=oM("ZodIPv6",(e,t)=>{dl.init(e,t),f8.init(e,t)});function mP(e){return pl(mI,e)}var mO=oM("ZodCIDRv4",(e,t)=>{du.init(e,t),f8.init(e,t)});function mE(e){return pu(mO,e)}var mj=oM("ZodCIDRv6",(e,t)=>{dd.init(e,t),f8.init(e,t)});function mN(e){return pd(mj,e)}var mT=oM("ZodBase64",(e,t)=>{dp.init(e,t),f8.init(e,t)});function mC(e){return pc(mT,e)}var mz=oM("ZodBase64URL",(e,t)=>{dm.init(e,t),f8.init(e,t)});function mA(e){return pp(mz,e)}var mR=oM("ZodE164",(e,t)=>{dh.init(e,t),f8.init(e,t)});function mU(e){return pf(mR,e)}var mD=oM("ZodJWT",(e,t)=>{dv.init(e,t),f8.init(e,t)});function mM(e){return pm(mD,e)}var mL=oM("ZodCustomStringFormat",(e,t)=>{dy.init(e,t),f8.init(e,t)});function mZ(e,t,r={}){return fz(mL,e,t,r)}var mF=oM("ZodNumber",(e,t)=>{d_.init(e,t),f2.init(e,t),e.gt=(t,r)=>e.check(pB(t,r)),e.gte=(t,r)=>e.check(pW(t,r)),e.min=(t,r)=>e.check(pW(t,r)),e.lt=(t,r)=>e.check(pq(t,r)),e.lte=(t,r)=>e.check(pV(t,r)),e.max=(t,r)=>e.check(pV(t,r)),e.int=t=>e.check(mB(t)),e.safe=t=>e.check(mB(t)),e.positive=t=>e.check(pB(0,t)),e.nonnegative=t=>e.check(pW(0,t)),e.negative=t=>e.check(pq(0,t)),e.nonpositive=t=>e.check(pV(0,t)),e.multipleOf=(t,r)=>e.check(pX(t,r)),e.step=(t,r)=>e.check(pX(t,r)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function mq(e){return pb(mF,e)}var mV=oM("ZodNumberFormat",(e,t)=>{db.init(e,t),mF.init(e,t)});function mB(e){return pw(mV,e)}function mW(e){return pk(mV,e)}function mK(e){return px(mV,e)}function mG(e){return pS(mV,e)}function mJ(e){return pI(mV,e)}var mH=oM("ZodBoolean",(e,t)=>{d$.init(e,t),f2.init(e,t)});function mX(e){return pP(mH,e)}var mY=oM("ZodBigInt",(e,t)=>{dw.init(e,t),f2.init(e,t),e.gte=(t,r)=>e.check(pW(t,r)),e.min=(t,r)=>e.check(pW(t,r)),e.gt=(t,r)=>e.check(pB(t,r)),e.gte=(t,r)=>e.check(pW(t,r)),e.min=(t,r)=>e.check(pW(t,r)),e.lt=(t,r)=>e.check(pq(t,r)),e.lte=(t,r)=>e.check(pV(t,r)),e.max=(t,r)=>e.check(pV(t,r)),e.positive=t=>e.check(pB(BigInt(0),t)),e.negative=t=>e.check(pq(BigInt(0),t)),e.nonpositive=t=>e.check(pV(BigInt(0),t)),e.nonnegative=t=>e.check(pW(BigInt(0),t)),e.multipleOf=(t,r)=>e.check(pX(t,r));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function mQ(e){return pE(mY,e)}var m0=oM("ZodBigIntFormat",(e,t)=>{dk.init(e,t),mY.init(e,t)});function m1(e){return pN(m0,e)}function m4(e){return pT(m0,e)}var m6=oM("ZodSymbol",(e,t)=>{dx.init(e,t),f2.init(e,t)});function m2(e){return pC(m6,e)}var m9=oM("ZodUndefined",(e,t)=>{dS.init(e,t),f2.init(e,t)});function m5(e){return pz(m9,e)}var m3=oM("ZodNull",(e,t)=>{dI.init(e,t),f2.init(e,t)});function m8(e){return pA(m3,e)}var m7=oM("ZodAny",(e,t)=>{dP.init(e,t),f2.init(e,t)});function he(){return pR(m7)}var ht=oM("ZodUnknown",(e,t)=>{dO.init(e,t),f2.init(e,t)});function hr(){return pU(ht)}var hn=oM("ZodNever",(e,t)=>{dE.init(e,t),f2.init(e,t)});function hi(e){return pD(hn,e)}var ha=oM("ZodVoid",(e,t)=>{dj.init(e,t),f2.init(e,t)});function hs(e){return pM(ha,e)}var ho=oM("ZodDate",(e,t)=>{dN.init(e,t),f2.init(e,t),e.min=(t,r)=>e.check(pW(t,r)),e.max=(t,r)=>e.check(pV(t,r));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function hl(e){return pL(ho,e)}var hu=oM("ZodArray",(e,t)=>{dC.init(e,t),f2.init(e,t),e.element=t.element,e.min=(t,r)=>e.check(p4(t,r)),e.nonempty=t=>e.check(p4(1,t)),e.max=(t,r)=>e.check(p1(t,r)),e.length=(t,r)=>e.check(p6(t,r)),e.unwrap=()=>e.element});function hd(e,t){return fo(hu,e,t)}function hc(e){return hA(Object.keys(e._zod.def.shape))}var hp=oM("ZodObject",(e,t)=>{dR.init(e,t),f2.init(e,t),oV.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>hT(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:hr()}),e.loose=()=>e.clone({...e._zod.def,catchall:hr()}),e.strict=()=>e.clone({...e._zod.def,catchall:hi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>oV.extend(e,t),e.merge=t=>oV.merge(e,t),e.pick=t=>oV.pick(e,t),e.omit=t=>oV.omit(e,t),e.partial=(...t)=>oV.partial(hL,e,t[0]),e.required=(...t)=>oV.required(hJ,e,t[0])});function hf(e,t){return new hp({type:"object",get shape(){return oV.assignProp(this,"shape",{...e}),this.shape},...oV.normalizeParams(t)})}function hm(e,t){return new hp({type:"object",get shape(){return oV.assignProp(this,"shape",{...e}),this.shape},catchall:hi(),...oV.normalizeParams(t)})}function hh(e,t){return new hp({type:"object",get shape(){return oV.assignProp(this,"shape",{...e}),this.shape},catchall:hr(),...oV.normalizeParams(t)})}var hg=oM("ZodUnion",(e,t)=>{dD.init(e,t),f2.init(e,t),e.options=t.options});function hv(e,t){return new hg({type:"union",options:e,...oV.normalizeParams(t)})}var hy=oM("ZodDiscriminatedUnion",(e,t)=>{hg.init(e,t),dM.init(e,t)});function h_(e,t,r){return new hy({type:"union",options:t,discriminator:e,...oV.normalizeParams(r)})}var hb=oM("ZodIntersection",(e,t)=>{dL.init(e,t),f2.init(e,t)});function h$(e,t){return new hb({type:"intersection",left:e,right:t})}var hw=oM("ZodTuple",(e,t)=>{dF.init(e,t),f2.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function hk(e,t,r){let n=t instanceof uY,i=n?r:t;return new hw({type:"tuple",items:e,rest:n?t:null,...oV.normalizeParams(i)})}var hx=oM("ZodRecord",(e,t)=>{dV.init(e,t),f2.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function hS(e,t,r){return new hx({type:"record",keyType:e,valueType:t,...oV.normalizeParams(r)})}function hI(e,t,r){return new hx({type:"record",keyType:hv([e,hi()]),valueType:t,...oV.normalizeParams(r)})}var hP=oM("ZodMap",(e,t)=>{dB.init(e,t),f2.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function hO(e,t,r){return new hP({type:"map",keyType:e,valueType:t,...oV.normalizeParams(r)})}var hE=oM("ZodSet",(e,t)=>{dK.init(e,t),f2.init(e,t),e.min=(...t)=>e.check(pQ(...t)),e.nonempty=t=>e.check(pQ(1,t)),e.max=(...t)=>e.check(pY(...t)),e.size=(...t)=>e.check(p0(...t))});function hj(e,t){return new hE({type:"set",valueType:e,...oV.normalizeParams(t)})}var hN=oM("ZodEnum",(e,t)=>{dJ.init(e,t),f2.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new hN({...t,checks:[],...oV.normalizeParams(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new hN({...t,checks:[],...oV.normalizeParams(n),entries:i})}});function hT(e,t){return new hN({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...oV.normalizeParams(t)})}function hC(e,t){return new hN({type:"enum",entries:e,...oV.normalizeParams(t)})}var hz=oM("ZodLiteral",(e,t)=>{dH.init(e,t),f2.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function hA(e,t){return new hz({type:"literal",values:Array.isArray(e)?e:[e],...oV.normalizeParams(t)})}var hR=oM("ZodFile",(e,t)=>{dX.init(e,t),f2.init(e,t),e.min=(t,r)=>e.check(pQ(t,r)),e.max=(t,r)=>e.check(pY(t,r)),e.mime=(t,r)=>e.check(ft(Array.isArray(t)?t:[t],r))});function hU(e){return fy(hR,e)}var hD=oM("ZodTransform",(e,t)=>{dY.init(e,t),f2.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=n=>{"string"==typeof n?r.issues.push(oV.issue(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!0),r.issues.push(oV.issue(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r)):(r.value=i,r)}});function hM(e){return new hD({type:"transform",transform:e})}var hL=oM("ZodOptional",(e,t)=>{dQ.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hZ(e){return new hL({type:"optional",innerType:e})}var hF=oM("ZodNullable",(e,t)=>{d0.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hq(e){return new hF({type:"nullable",innerType:e})}function hV(e){return hZ(hq(e))}var hB=oM("ZodDefault",(e,t)=>{d1.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function hW(e,t){return new hB({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}var hK=oM("ZodPrefault",(e,t)=>{d6.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hG(e,t){return new hK({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}var hJ=oM("ZodNonOptional",(e,t)=>{d2.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hH(e,t){return new hJ({type:"nonoptional",innerType:e,...oV.normalizeParams(t)})}var hX=oM("ZodSuccess",(e,t)=>{d5.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hY(e){return new hX({type:"success",innerType:e})}var hQ=oM("ZodCatch",(e,t)=>{d3.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function h0(e,t){return new hQ({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}var h1=oM("ZodNaN",(e,t)=>{d8.init(e,t),f2.init(e,t)});function h4(e){return pF(h1,e)}var h6=oM("ZodPipe",(e,t)=>{d7.init(e,t),f2.init(e,t),e.in=t.in,e.out=t.out});function h2(e,t){return new h6({type:"pipe",in:e,out:t})}var h9=oM("ZodReadonly",(e,t)=>{ct.init(e,t),f2.init(e,t)});function h5(e){return new h9({type:"readonly",innerType:e})}var h3=oM("ZodTemplateLiteral",(e,t)=>{cn.init(e,t),f2.init(e,t)});function h8(e,t){return new h3({type:"template_literal",parts:e,...oV.normalizeParams(t)})}var h7=oM("ZodLazy",(e,t)=>{ca.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.getter()});function ge(e){return new h7({type:"lazy",getter:e})}var gt=oM("ZodPromise",(e,t)=>{ci.init(e,t),f2.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gr(e){return new gt({type:"promise",innerType:e})}var gn=oM("ZodCustom",(e,t)=>{cs.init(e,t),f2.init(e,t)});function gi(e,t){let r=new uI({check:"custom",...oV.normalizeParams(t)});return r._zod.check=e,r}function ga(e,t){return fN(gn,e??(()=>!0),t)}function gs(e,t={}){return fT(gn,e,t)}function go(e,t){let r=gi(t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(oV.issue(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(oV.issue(e)))},e(t.value,t)),t);return r}function gl(e,t={error:`Input not instance of ${e.name}`}){let r=new gn({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...oV.normalizeParams(t)});return r._zod.bag.Class=e,r}var gu=(...e)=>fC({Pipe:h6,Boolean:mH,String:f5,Transform:hD},...e);function gd(e){let t=ge(()=>hv([f3(e),mq(),mX(),m8(),hd(t),hS(f3(),t)]));return t}function gc(e,t){return h2(hM(e),t)}var gp={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function gf(e){oq({customError:e})}function gm(){return oq().customError}var gh={};function gg(e){return c4(f5,e)}function gv(e){return p$(mF,e)}function gy(e){return pO(mH,e)}function g_(e){return pj(mY,e)}function gb(e){return pZ(ho,e)}C(gh,{string:()=>gg,number:()=>gv,date:()=>gb,boolean:()=>gy,bigint:()=>g_}),oq(cg());var g$=ga(e=>null!==e&&("object"==typeof e||"function"==typeof e)),gw=hv([f3(),mq().int()]),gk=f3(),gx=(hh({ttl:mq().optional(),pollInterval:mq().optional()}),hf({ttl:mq().optional()})),gS=hf({taskId:f3()}),gI=hh({progressToken:gw.optional(),"io.modelcontextprotocol/related-task":gS.optional()}),gP=hf({_meta:gI.optional()}),gO=gP.extend({task:gx.optional()}),gE=hf({method:f3(),params:gP.loose().optional()}),gj=hf({_meta:gI.optional()}),gN=hf({method:f3(),params:gj.loose().optional()}),gT=hh({_meta:gI.optional()}),gC=hv([f3(),mq().int()]),gz=hf({jsonrpc:hA("2.0"),id:gC,...gE.shape}).strict(),gA=hf({jsonrpc:hA("2.0"),...gN.shape}).strict(),gR=hf({jsonrpc:hA("2.0"),id:gC,result:gT}).strict();(i=s||(s={}))[i.ConnectionClosed=-32e3]="ConnectionClosed",i[i.RequestTimeout=-32001]="RequestTimeout",i[i.ParseError=-32700]="ParseError",i[i.InvalidRequest=-32600]="InvalidRequest",i[i.MethodNotFound=-32601]="MethodNotFound",i[i.InvalidParams=-32602]="InvalidParams",i[i.InternalError=-32603]="InternalError",i[i.UrlElicitationRequired=-32042]="UrlElicitationRequired";var gU=hf({jsonrpc:hA("2.0"),id:gC.optional(),error:hf({code:mq().int(),message:f3(),data:hr().optional()})}).strict();hv([gz,gA,gR,gU]),hv([gR,gU]);var gD=gT.strict(),gM=gj.extend({requestId:gC.optional(),reason:f3().optional()}),gL=gN.extend({method:hA("notifications/cancelled"),params:gM}),gZ=hf({src:f3(),mimeType:f3().optional(),sizes:hd(f3()).optional(),theme:hT(["light","dark"]).optional()}),gF=hf({icons:hd(gZ).optional()}),gq=hf({name:f3(),title:f3().optional()}),gV=gq.extend({...gq.shape,...gF.shape,version:f3(),websiteUrl:f3().optional(),description:f3().optional()}),gB=h$(hf({applyDefaults:mX().optional()}),hS(f3(),hr())),gW=gc(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,h$(hf({form:gB.optional(),url:g$.optional()}),hS(f3(),hr()).optional())),gK=hh({list:g$.optional(),cancel:g$.optional(),requests:hh({sampling:hh({createMessage:g$.optional()}).optional(),elicitation:hh({create:g$.optional()}).optional()}).optional()}),gG=hh({list:g$.optional(),cancel:g$.optional(),requests:hh({tools:hh({call:g$.optional()}).optional()}).optional()}),gJ=hf({experimental:hS(f3(),g$).optional(),sampling:hf({context:g$.optional(),tools:g$.optional()}).optional(),elicitation:gW.optional(),roots:hf({listChanged:mX().optional()}).optional(),tasks:gK.optional(),extensions:hS(f3(),g$).optional()}),gH=gP.extend({protocolVersion:f3(),capabilities:gJ,clientInfo:gV}),gX=gE.extend({method:hA("initialize"),params:gH}),gY=hf({experimental:hS(f3(),g$).optional(),logging:g$.optional(),completions:g$.optional(),prompts:hf({listChanged:mX().optional()}).optional(),resources:hf({subscribe:mX().optional(),listChanged:mX().optional()}).optional(),tools:hf({listChanged:mX().optional()}).optional(),tasks:gG.optional(),extensions:hS(f3(),g$).optional()}),gQ=gT.extend({protocolVersion:f3(),capabilities:gY,serverInfo:gV,instructions:f3().optional()}),g0=gN.extend({method:hA("notifications/initialized"),params:gj.optional()}),g1=gE.extend({method:hA("ping"),params:gP.optional()}),g4=hf({progress:mq(),total:hZ(mq()),message:hZ(f3())}),g6=hf({...gj.shape,...g4.shape,progressToken:gw}),g2=gN.extend({method:hA("notifications/progress"),params:g6}),g9=gP.extend({cursor:gk.optional()}),g5=gE.extend({params:g9.optional()}),g3=gT.extend({nextCursor:gk.optional()}),g8=hT(["working","input_required","completed","failed","cancelled"]),g7=hf({taskId:f3(),status:g8,ttl:hv([mq(),m8()]),createdAt:f3(),lastUpdatedAt:f3(),pollInterval:hZ(mq()),statusMessage:hZ(f3())}),ve=gT.extend({task:g7}),vt=gj.merge(g7),vr=gN.extend({method:hA("notifications/tasks/status"),params:vt}),vn=gE.extend({method:hA("tasks/get"),params:gP.extend({taskId:f3()})}),vi=gT.merge(g7),va=gE.extend({method:hA("tasks/result"),params:gP.extend({taskId:f3()})}),vs=(gT.loose(),g5.extend({method:hA("tasks/list")})),vo=g3.extend({tasks:hd(g7)}),vl=gE.extend({method:hA("tasks/cancel"),params:gP.extend({taskId:f3()})}),vu=(gT.merge(g7),hf({uri:f3(),mimeType:hZ(f3()),_meta:hS(f3(),hr()).optional()})),vd=vu.extend({text:f3()}),vc=f3().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),vp=vu.extend({blob:vc}),vf=hT(["user","assistant"]),vm=hf({audience:hd(vf).optional(),priority:mq().min(0).max(1).optional(),lastModified:fF.datetime({offset:!0}).optional()}),vh=hf({...gq.shape,...gF.shape,uri:f3(),description:hZ(f3()),mimeType:hZ(f3()),size:hZ(mq()),annotations:vm.optional(),_meta:hZ(hh({}))}),vg=hf({...gq.shape,...gF.shape,uriTemplate:f3(),description:hZ(f3()),mimeType:hZ(f3()),annotations:vm.optional(),_meta:hZ(hh({}))}),vv=g5.extend({method:hA("resources/list")}),vy=g3.extend({resources:hd(vh)}),v_=g5.extend({method:hA("resources/templates/list")}),vb=g3.extend({resourceTemplates:hd(vg)}),v$=gP.extend({uri:f3()}),vw=gE.extend({method:hA("resources/read"),params:v$}),vk=gT.extend({contents:hd(hv([vd,vp]))}),vx=gN.extend({method:hA("notifications/resources/list_changed"),params:gj.optional()}),vS=gE.extend({method:hA("resources/subscribe"),params:v$}),vI=gE.extend({method:hA("resources/unsubscribe"),params:v$}),vP=gj.extend({uri:f3()}),vO=gN.extend({method:hA("notifications/resources/updated"),params:vP}),vE=hf({name:f3(),description:hZ(f3()),required:hZ(mX())}),vj=hf({...gq.shape,...gF.shape,description:hZ(f3()),arguments:hZ(hd(vE)),_meta:hZ(hh({}))}),vN=g5.extend({method:hA("prompts/list")}),vT=g3.extend({prompts:hd(vj)}),vC=gP.extend({name:f3(),arguments:hS(f3(),f3()).optional()}),vz=gE.extend({method:hA("prompts/get"),params:vC}),vA=hf({type:hA("text"),text:f3(),annotations:vm.optional(),_meta:hS(f3(),hr()).optional()}),vR=hf({type:hA("image"),data:vc,mimeType:f3(),annotations:vm.optional(),_meta:hS(f3(),hr()).optional()}),vU=hf({type:hA("audio"),data:vc,mimeType:f3(),annotations:vm.optional(),_meta:hS(f3(),hr()).optional()}),vD=hf({type:hA("tool_use"),name:f3(),id:f3(),input:hS(f3(),hr()),_meta:hS(f3(),hr()).optional()}),vM=hf({type:hA("resource"),resource:hv([vd,vp]),annotations:vm.optional(),_meta:hS(f3(),hr()).optional()}),vL=hv([vA,vR,vU,vh.extend({type:hA("resource_link")}),vM]),vZ=hf({role:vf,content:vL}),vF=gT.extend({description:f3().optional(),messages:hd(vZ)}),vq=gN.extend({method:hA("notifications/prompts/list_changed"),params:gj.optional()}),vV=hf({title:f3().optional(),readOnlyHint:mX().optional(),destructiveHint:mX().optional(),idempotentHint:mX().optional(),openWorldHint:mX().optional()}),vB=hf({taskSupport:hT(["required","optional","forbidden"]).optional()}),vW=hf({...gq.shape,...gF.shape,description:f3().optional(),inputSchema:hf({type:hA("object"),properties:hS(f3(),g$).optional(),required:hd(f3()).optional()}).catchall(hr()),outputSchema:hf({type:hA("object"),properties:hS(f3(),g$).optional(),required:hd(f3()).optional()}).catchall(hr()).optional(),annotations:vV.optional(),execution:vB.optional(),_meta:hS(f3(),hr()).optional()}),vK=g5.extend({method:hA("tools/list")}),vG=g3.extend({tools:hd(vW)}),vJ=gT.extend({content:hd(vL).default([]),structuredContent:hS(f3(),hr()).optional(),isError:mX().optional()}),vH=(vJ.or(gT.extend({toolResult:hr()})),gO.extend({name:f3(),arguments:hS(f3(),hr()).optional()})),vX=gE.extend({method:hA("tools/call"),params:vH}),vY=gN.extend({method:hA("notifications/tools/list_changed"),params:gj.optional()}),vQ=(hf({autoRefresh:mX().default(!0),debounceMs:mq().int().nonnegative().default(300)}),hT(["debug","info","notice","warning","error","critical","alert","emergency"])),v0=gP.extend({level:vQ}),v1=gE.extend({method:hA("logging/setLevel"),params:v0}),v4=gj.extend({level:vQ,logger:f3().optional(),data:hr()}),v6=gN.extend({method:hA("notifications/message"),params:v4}),v2=hf({name:f3().optional()}),v9=hf({hints:hd(v2).optional(),costPriority:mq().min(0).max(1).optional(),speedPriority:mq().min(0).max(1).optional(),intelligencePriority:mq().min(0).max(1).optional()}),v5=hf({mode:hT(["auto","required","none"]).optional()}),v3=hf({type:hA("tool_result"),toolUseId:f3().describe("The unique identifier for the corresponding tool call."),content:hd(vL).default([]),structuredContent:hf({}).loose().optional(),isError:mX().optional(),_meta:hS(f3(),hr()).optional()}),v8=h_("type",[vA,vR,vU]),v7=h_("type",[vA,vR,vU,vD,v3]),ye=hf({role:vf,content:hv([v7,hd(v7)]),_meta:hS(f3(),hr()).optional()}),yt=gO.extend({messages:hd(ye),modelPreferences:v9.optional(),systemPrompt:f3().optional(),includeContext:hT(["none","thisServer","allServers"]).optional(),temperature:mq().optional(),maxTokens:mq().int(),stopSequences:hd(f3()).optional(),metadata:g$.optional(),tools:hd(vW).optional(),toolChoice:v5.optional()}),yr=gE.extend({method:hA("sampling/createMessage"),params:yt}),yn=gT.extend({model:f3(),stopReason:hZ(hT(["endTurn","stopSequence","maxTokens"]).or(f3())),role:vf,content:v8}),yi=gT.extend({model:f3(),stopReason:hZ(hT(["endTurn","stopSequence","maxTokens","toolUse"]).or(f3())),role:vf,content:hv([v7,hd(v7)])}),ya=hf({type:hA("boolean"),title:f3().optional(),description:f3().optional(),default:mX().optional()}),ys=hf({type:hA("string"),title:f3().optional(),description:f3().optional(),minLength:mq().optional(),maxLength:mq().optional(),format:hT(["email","uri","date","date-time"]).optional(),default:f3().optional()}),yo=hf({type:hT(["number","integer"]),title:f3().optional(),description:f3().optional(),minimum:mq().optional(),maximum:mq().optional(),default:mq().optional()}),yl=hf({type:hA("string"),title:f3().optional(),description:f3().optional(),enum:hd(f3()),default:f3().optional()}),yu=hf({type:hA("string"),title:f3().optional(),description:f3().optional(),oneOf:hd(hf({const:f3(),title:f3()})),default:f3().optional()}),yd=hf({type:hA("string"),title:f3().optional(),description:f3().optional(),enum:hd(f3()),enumNames:hd(f3()).optional(),default:f3().optional()}),yc=hv([yl,yu]),yp=hv([hf({type:hA("array"),title:f3().optional(),description:f3().optional(),minItems:mq().optional(),maxItems:mq().optional(),items:hf({type:hA("string"),enum:hd(f3())}),default:hd(f3()).optional()}),hf({type:hA("array"),title:f3().optional(),description:f3().optional(),minItems:mq().optional(),maxItems:mq().optional(),items:hf({anyOf:hd(hf({const:f3(),title:f3()}))}),default:hd(f3()).optional()})]),yf=hv([yd,yc,yp]),ym=hv([yf,ya,ys,yo]),yh=hv([gO.extend({mode:hA("form").optional(),message:f3(),requestedSchema:hf({type:hA("object"),properties:hS(f3(),ym),required:hd(f3()).optional()})}),gO.extend({mode:hA("url"),message:f3(),elicitationId:f3(),url:f3().url()})]),yg=gE.extend({method:hA("elicitation/create"),params:yh}),yv=gj.extend({elicitationId:f3()}),yy=gN.extend({method:hA("notifications/elicitation/complete"),params:yv}),y_=gT.extend({action:hT(["accept","decline","cancel"]),content:gc(e=>null===e?void 0:e,hS(f3(),hv([f3(),mq(),mX(),hd(f3())])).optional())}),yb=hf({type:hA("ref/resource"),uri:f3()}),y$=hf({type:hA("ref/prompt"),name:f3()}),yw=gP.extend({ref:hv([y$,yb]),argument:hf({name:f3(),value:f3()}),context:hf({arguments:hS(f3(),f3()).optional()}).optional()}),yk=gE.extend({method:hA("completion/complete"),params:yw}),yx=gT.extend({completion:hh({values:hd(f3()).max(100),total:hZ(mq().int()),hasMore:hZ(mX())})}),yS=hf({uri:f3().startsWith("file://"),name:f3().optional(),_meta:hS(f3(),hr()).optional()}),yI=gE.extend({method:hA("roots/list"),params:gP.optional()}),yP=gT.extend({roots:hd(yS)}),yO=gN.extend({method:hA("notifications/roots/list_changed"),params:gj.optional()});hv([g1,gX,yk,v1,vz,vN,vv,v_,vw,vS,vI,vX,vK,vn,va,vs,vl]),hv([gL,g2,g0,yO,vr]),hv([gD,yn,yi,y_,yP,vi,vo,ve]),hv([g1,yr,yg,yI,vn,va,vs,vl]),hv([gL,g2,v6,vO,vx,vY,vq,vr,yy]),hv([gD,gQ,yx,vF,vT,vy,vb,vk,vJ,vG,vi,vo,ve]);class yE extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,t,r){return e===s.UrlElicitationRequired&&r&&r.elicitations?new yj(r.elicitations,t):new yE(e,t,r)}}class yj extends yE{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(s.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}var yN=Symbol("Let zodToJsonSchema decide on which parser to use");function yT(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function yC(e,t,r,n,i){e[t]=r,yT(e,t,n,i)}var yz=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function yA(e){if("openAi"!==e.target)return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?yz(t,e.currentPath):t.join("/")}}function yR(e,t){return y2(e.type._def,t)}var yU=void 0,yD=/^[cC][^\s-]{8,}$/,yM=/^[0-9a-z]+$/,yL=/^[0-9A-HJKMNP-TV-Z]{26}$/,yZ=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,yF=()=>(void 0===yU&&(yU=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),yU),yq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yV=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yB=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yW=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,yK=/^[a-zA-Z0-9_-]{21}$/,yG=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function yJ(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":yC(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":yC(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":yY(r,"email",n.message,t);break;case"format:idn-email":yY(r,"idn-email",n.message,t);break;case"pattern:zod":yQ(r,yZ,n.message,t)}break;case"url":yY(r,"uri",n.message,t);break;case"uuid":yY(r,"uuid",n.message,t);break;case"regex":yQ(r,n.regex,n.message,t);break;case"cuid":yQ(r,yD,n.message,t);break;case"cuid2":yQ(r,yM,n.message,t);break;case"startsWith":yQ(r,RegExp(`^${yH(n.value,t)}`),n.message,t);break;case"endsWith":yQ(r,RegExp(`${yH(n.value,t)}$`),n.message,t);break;case"datetime":yY(r,"date-time",n.message,t);break;case"date":yY(r,"date",n.message,t);break;case"time":yY(r,"time",n.message,t);break;case"duration":yY(r,"duration",n.message,t);break;case"length":yC(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,n.value):n.value,n.message,t),yC(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":yQ(r,RegExp(yH(n.value,t)),n.message,t);break;case"ip":"v6"!==n.version&&yY(r,"ipv4",n.message,t),"v4"!==n.version&&yY(r,"ipv6",n.message,t);break;case"base64url":yQ(r,yW,n.message,t);break;case"jwt":yQ(r,yG,n.message,t);break;case"cidr":"v6"!==n.version&&yQ(r,yq,n.message,t),"v4"!==n.version&&yQ(r,yV,n.message,t);break;case"emoji":yQ(r,yF(),n.message,t);break;case"ulid":yQ(r,yL,n.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":yY(r,"binary",n.message,t);break;case"contentEncoding:base64":yC(r,"contentEncoding","base64",n.message,t);break;case"pattern:zod":yQ(r,yB,n.message,t)}break;case"nanoid":yQ(r,yK,n.message,t)}return r}function yH(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let r=0;r<e.length;r++)yX.has(e[r])||(t+="\\"),t+=e[r];return t}(e):e}var yX=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function yY(e,t,r,n){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length))&&delete e.errorMessage,e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):yC(e,"format",t,r,n)}function yQ(e,t,r,n){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length))&&delete e.errorMessage,e.allOf.push({pattern:y0(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):yC(e,"pattern",y0(t,n),r,n)}function y0(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,i="",a=!1,s=!1,o=!1;for(let e=0;e<n.length;e++){if(a){i+=n[e],a=!1;continue}if(r.i){if(s){if(n[e].match(/[a-z]/)){o?(i+=n[e],i+=`${n[e-2]}-${n[e]}`.toUpperCase(),o=!1):"-"===n[e+1]&&n[e+2]?.match(/[a-z]/)?(i+=n[e],o=!0):i+=`${n[e]}${n[e].toUpperCase()}`;continue}}else if(n[e].match(/[a-z]/)){i+=`[${n[e]}${n[e].toUpperCase()}]`;continue}}if(r.m){if("^"===n[e]){i+=`(^|(?<=[\r
|
|
83
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);"ref"===r.cycles&&a(t);continue}if(n.count>1&&"ref"===r.reused){a(t);continue}}let s=(e,t)=>{let r=this.seen.get(e),n=r.def??r.schema,i={...n};if(null===r.ref)return;let a=r.ref;if(r.ref=null,a){s(a,t);let e=this.seen.get(a).schema;e.$ref&&"draft-7"===t.target?(n.allOf=n.allOf??[],n.allOf.push(e)):(Object.assign(n,e),Object.assign(n,i))}r.isParent||this.override({zodSchema:e,jsonSchema:n,path:r.path??[]})};for(let e of[...this.seen.entries()].reverse())s(e[0],{target:this.target});let o={};"draft-2020-12"===this.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?o.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(o,n.def);let l=r.external?.defs??{};for(let e of this.seen.entries()){let t=e[1];t.def&&t.defId&&(l[t.defId]=t.def)}!r.external&&Object.keys(l).length>0&&("draft-2020-12"===this.target?o.$defs=l:o.definitions=l);try{return JSON.parse(JSON.stringify(o))}catch(e){throw Error("Error converting schema to JSON.")}}}function f2(e,t){if(e instanceof pl){let r=new f6(t),n={};for(let t of e._idmap.entries()){let[e,n]=t;r.process(n)}let i={},a={registry:e,uri:t?.uri||(e=>e),defs:n};for(let n of e._idmap.entries()){let[e,s]=n;i[e]=r.emit(s,{...t,external:a})}return Object.keys(n).length>0&&(i.__shared={["draft-2020-12"===r.target?"$defs":"definitions"]:n}),{schemas:i}}let r=new f6(t);return r.process(e),r.emit(e,t)}var f9={},f5=o9("ZodMiniType",(e,t)=>{if(!e._zod)throw Error("Uninitialized schema in ZodMiniType.");du.init(e,t),e.def=t,e.parse=(t,r)=>l9(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>l7(e,t,r),e.parseAsync=async(t,r)=>l3(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>ut(e,t,r),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,r)=>lO(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e)});o9("ZodMiniObject",(e,t)=>{d4.init(e,t),f5.init(e,t),le.defineLazy(e,"shape",()=>t.shape)});var f3={};C(f3,{xid:()=>mZ,void:()=>hI,uuidv7:()=>mP,uuidv6:()=>mI,uuidv4:()=>mS,uuid:()=>mx,url:()=>mE,uppercase:()=>fg,unknown:()=>hw,union:()=>hU,undefined:()=>hg,ulid:()=>mM,uint64:()=>hp,uint32:()=>ha,tuple:()=>hq,trim:()=>fx,treeifyError:()=>l1,transform:()=>h9,toUpperCase:()=>fI,toLowerCase:()=>fS,toJSONSchema:()=>f2,templateLiteral:()=>gy,symbol:()=>hm,superRefine:()=>gP,success:()=>gl,stringbool:()=>gE,stringFormat:()=>m3,string:()=>mv,strictObject:()=>hz,startsWith:()=>fy,size:()=>fd,setErrorMap:()=>gC,set:()=>hH,safeParseAsync:()=>mf,safeParse:()=>mp,registry:()=>pu,regexes:()=>ur,regex:()=>fm,refine:()=>gI,record:()=>hB,readonly:()=>gg,property:()=>fb,promise:()=>gw,prettifyError:()=>l6,preprocess:()=>gN,prefault:()=>gi,positive:()=>fn,pipe:()=>gm,partialRecord:()=>hW,parseAsync:()=>mc,parse:()=>md,overwrite:()=>fw,optional:()=>h3,object:()=>hC,number:()=>m7,nullish:()=>ge,nullable:()=>h7,null:()=>hy,normalize:()=>fk,nonpositive:()=>fa,nonoptional:()=>gs,nonnegative:()=>fs,never:()=>hx,negative:()=>fi,nativeEnum:()=>hQ,nanoid:()=>mC,nan:()=>gp,multipleOf:()=>fo,minSize:()=>fu,minLength:()=>fp,mime:()=>f$,maxSize:()=>fl,maxLength:()=>fc,map:()=>hG,lte:()=>fe,lt:()=>p7,lowercase:()=>fh,looseObject:()=>hA,locales:()=>cO,literal:()=>h1,length:()=>ff,lazy:()=>gb,ksuid:()=>mq,keyof:()=>hN,jwt:()=>m9,json:()=>gj,iso:()=>f8,ipv6:()=>mK,ipv4:()=>mB,intersection:()=>hZ,int64:()=>hc,int32:()=>hi,int:()=>ht,instanceof:()=>gO,includes:()=>fv,guid:()=>mw,gte:()=>fr,gt:()=>ft,globalRegistry:()=>pd,getErrorMap:()=>gz,function:()=>f4,formatError:()=>l0,float64:()=>hn,float32:()=>hr,flattenError:()=>lQ,file:()=>h6,enum:()=>hY,endsWith:()=>f_,emoji:()=>mN,email:()=>mb,e164:()=>m6,discriminatedUnion:()=>hM,date:()=>hO,custom:()=>gS,cuid2:()=>mU,cuid:()=>mA,core:()=>o6,config:()=>o7,coerce:()=>gA,clone:()=>lO,cidrv6:()=>mX,cidrv4:()=>mJ,check:()=>gx,catch:()=>gd,boolean:()=>ho,bigint:()=>hu,base64url:()=>m1,base64:()=>mQ,array:()=>hj,any:()=>hb,_default:()=>gr,_ZodString:()=>mh,ZodXID:()=>mL,ZodVoid:()=>hS,ZodUnknown:()=>h$,ZodUnion:()=>hR,ZodUndefined:()=>hh,ZodUUID:()=>mk,ZodURL:()=>mO,ZodULID:()=>mD,ZodType:()=>mm,ZodTuple:()=>hF,ZodTransform:()=>h2,ZodTemplateLiteral:()=>gv,ZodSymbol:()=>hf,ZodSuccess:()=>go,ZodStringFormat:()=>my,ZodString:()=>mg,ZodSet:()=>hJ,ZodRecord:()=>hV,ZodRealError:()=>mu,ZodReadonly:()=>gh,ZodPromise:()=>g$,ZodPrefault:()=>gn,ZodPipe:()=>gf,ZodOptional:()=>h5,ZodObject:()=>hT,ZodNumberFormat:()=>he,ZodNumber:()=>m8,ZodNullable:()=>h8,ZodNull:()=>hv,ZodNonOptional:()=>ga,ZodNever:()=>hk,ZodNanoID:()=>mT,ZodNaN:()=>gc,ZodMap:()=>hK,ZodLiteral:()=>h0,ZodLazy:()=>g_,ZodKSUID:()=>mF,ZodJWT:()=>m2,ZodIssueCode:()=>gT,ZodIntersection:()=>hL,ZodISOTime:()=>mn,ZodISODuration:()=>ma,ZodISODateTime:()=>f7,ZodISODate:()=>mt,ZodIPv6:()=>mW,ZodIPv4:()=>mV,ZodGUID:()=>m$,ZodFile:()=>h4,ZodError:()=>ml,ZodEnum:()=>hX,ZodEmoji:()=>mj,ZodEmail:()=>m_,ZodE164:()=>m4,ZodDiscriminatedUnion:()=>hD,ZodDefault:()=>gt,ZodDate:()=>hP,ZodCustomStringFormat:()=>m5,ZodCustom:()=>gk,ZodCatch:()=>gu,ZodCUID2:()=>mR,ZodCUID:()=>mz,ZodCIDRv6:()=>mH,ZodCIDRv4:()=>mG,ZodBoolean:()=>hs,ZodBigIntFormat:()=>hd,ZodBigInt:()=>hl,ZodBase64URL:()=>m0,ZodBase64:()=>mY,ZodArray:()=>hE,ZodAny:()=>h_,TimePrecision:()=>pA,NEVER:()=>o2,$output:()=>ps,$input:()=>po,$brand:()=>o5});var f8={};C(f8,{time:()=>mi,duration:()=>ms,datetime:()=>me,date:()=>mr,ZodISOTime:()=>mn,ZodISODuration:()=>ma,ZodISODateTime:()=>f7,ZodISODate:()=>mt});var f7=o9("ZodISODateTime",(e,t)=>{dk.init(e,t),my.init(e,t)});function me(e){return pR(f7,e)}var mt=o9("ZodISODate",(e,t)=>{dx.init(e,t),my.init(e,t)});function mr(e){return pU(mt,e)}var mn=o9("ZodISOTime",(e,t)=>{dS.init(e,t),my.init(e,t)});function mi(e){return pD(mn,e)}var ma=o9("ZodISODuration",(e,t)=>{dI.init(e,t),my.init(e,t)});function ms(e){return pM(ma,e)}var mo=(e,t)=>{lX.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>l0(e,t)},flatten:{value:t=>lQ(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})},ml=o9("ZodError",mo),mu=o9("ZodError",mo,{Parent:Error}),md=l2(mu),mc=l5(mu),mp=l8(mu),mf=ue(mu),mm=o9("ZodType",(e,t)=>(du.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,r)=>lO(e,t,r),e.brand=()=>e,e.register=(t,r)=>(t.add(e,r),e),e.parse=(t,r)=>md(e,t,r,{callee:e.parse}),e.safeParse=(t,r)=>mp(e,t,r),e.parseAsync=async(t,r)=>mc(e,t,r,{callee:e.parseAsync}),e.safeParseAsync=async(t,r)=>mf(e,t,r),e.spa=e.safeParseAsync,e.refine=(t,r)=>e.check(gI(t,r)),e.superRefine=t=>e.check(gP(t)),e.overwrite=t=>e.check(fw(t)),e.optional=()=>h3(e),e.nullable=()=>h7(e),e.nullish=()=>h3(h7(e)),e.nonoptional=t=>gs(e,t),e.array=()=>hj(e),e.or=t=>hU([e,t]),e.and=t=>hZ(e,t),e.transform=t=>gm(e,h9(t)),e.default=t=>gr(e,t),e.prefault=t=>gi(e,t),e.catch=t=>gd(e,t),e.pipe=t=>gm(e,t),e.readonly=()=>gg(e),e.describe=t=>{let r=e.clone();return pd.add(r,{description:t}),r},Object.defineProperty(e,"description",{get:()=>pd.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return pd.get(e);let r=e.clone();return pd.add(r,t[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),mh=o9("_ZodString",(e,t)=>{dd.init(e,t),mm.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...t)=>e.check(fm(...t)),e.includes=(...t)=>e.check(fv(...t)),e.startsWith=(...t)=>e.check(fy(...t)),e.endsWith=(...t)=>e.check(f_(...t)),e.min=(...t)=>e.check(fp(...t)),e.max=(...t)=>e.check(fc(...t)),e.length=(...t)=>e.check(ff(...t)),e.nonempty=(...t)=>e.check(fp(1,...t)),e.lowercase=t=>e.check(fh(t)),e.uppercase=t=>e.check(fg(t)),e.trim=()=>e.check(fx()),e.normalize=(...t)=>e.check(fk(...t)),e.toLowerCase=()=>e.check(fS()),e.toUpperCase=()=>e.check(fI())}),mg=o9("ZodString",(e,t)=>{dd.init(e,t),mh.init(e,t),e.email=t=>e.check(pf(m_,t)),e.url=t=>e.check(p_(mO,t)),e.jwt=t=>e.check(pz(m2,t)),e.emoji=t=>e.check(pb(mj,t)),e.guid=t=>e.check(pm(m$,t)),e.uuid=t=>e.check(ph(mk,t)),e.uuidv4=t=>e.check(pg(mk,t)),e.uuidv6=t=>e.check(pv(mk,t)),e.uuidv7=t=>e.check(py(mk,t)),e.nanoid=t=>e.check(p$(mT,t)),e.guid=t=>e.check(pm(m$,t)),e.cuid=t=>e.check(pw(mz,t)),e.cuid2=t=>e.check(pk(mR,t)),e.ulid=t=>e.check(px(mD,t)),e.base64=t=>e.check(pN(mY,t)),e.base64url=t=>e.check(pT(m0,t)),e.xid=t=>e.check(pS(mL,t)),e.ksuid=t=>e.check(pI(mF,t)),e.ipv4=t=>e.check(pP(mV,t)),e.ipv6=t=>e.check(pO(mW,t)),e.cidrv4=t=>e.check(pE(mG,t)),e.cidrv6=t=>e.check(pj(mH,t)),e.e164=t=>e.check(pC(m4,t)),e.datetime=t=>e.check(me(t)),e.date=t=>e.check(mr(t)),e.time=t=>e.check(mi(t)),e.duration=t=>e.check(ms(t))});function mv(e){return pc(mg,e)}var my=o9("ZodStringFormat",(e,t)=>{dc.init(e,t),mh.init(e,t)}),m_=o9("ZodEmail",(e,t)=>{dm.init(e,t),my.init(e,t)});function mb(e){return pf(m_,e)}var m$=o9("ZodGUID",(e,t)=>{dp.init(e,t),my.init(e,t)});function mw(e){return pm(m$,e)}var mk=o9("ZodUUID",(e,t)=>{df.init(e,t),my.init(e,t)});function mx(e){return ph(mk,e)}function mS(e){return pg(mk,e)}function mI(e){return pv(mk,e)}function mP(e){return py(mk,e)}var mO=o9("ZodURL",(e,t)=>{dh.init(e,t),my.init(e,t)});function mE(e){return p_(mO,e)}var mj=o9("ZodEmoji",(e,t)=>{dg.init(e,t),my.init(e,t)});function mN(e){return pb(mj,e)}var mT=o9("ZodNanoID",(e,t)=>{dv.init(e,t),my.init(e,t)});function mC(e){return p$(mT,e)}var mz=o9("ZodCUID",(e,t)=>{dy.init(e,t),my.init(e,t)});function mA(e){return pw(mz,e)}var mR=o9("ZodCUID2",(e,t)=>{d_.init(e,t),my.init(e,t)});function mU(e){return pk(mR,e)}var mD=o9("ZodULID",(e,t)=>{db.init(e,t),my.init(e,t)});function mM(e){return px(mD,e)}var mL=o9("ZodXID",(e,t)=>{d$.init(e,t),my.init(e,t)});function mZ(e){return pS(mL,e)}var mF=o9("ZodKSUID",(e,t)=>{dw.init(e,t),my.init(e,t)});function mq(e){return pI(mF,e)}var mV=o9("ZodIPv4",(e,t)=>{dP.init(e,t),my.init(e,t)});function mB(e){return pP(mV,e)}var mW=o9("ZodIPv6",(e,t)=>{dO.init(e,t),my.init(e,t)});function mK(e){return pO(mW,e)}var mG=o9("ZodCIDRv4",(e,t)=>{dE.init(e,t),my.init(e,t)});function mJ(e){return pE(mG,e)}var mH=o9("ZodCIDRv6",(e,t)=>{dj.init(e,t),my.init(e,t)});function mX(e){return pj(mH,e)}var mY=o9("ZodBase64",(e,t)=>{dT.init(e,t),my.init(e,t)});function mQ(e){return pN(mY,e)}var m0=o9("ZodBase64URL",(e,t)=>{dz.init(e,t),my.init(e,t)});function m1(e){return pT(m0,e)}var m4=o9("ZodE164",(e,t)=>{dA.init(e,t),my.init(e,t)});function m6(e){return pC(m4,e)}var m2=o9("ZodJWT",(e,t)=>{dU.init(e,t),my.init(e,t)});function m9(e){return pz(m2,e)}var m5=o9("ZodCustomStringFormat",(e,t)=>{dD.init(e,t),my.init(e,t)});function m3(e,t,r={}){return f0(m5,e,t,r)}var m8=o9("ZodNumber",(e,t)=>{dM.init(e,t),mm.init(e,t),e.gt=(t,r)=>e.check(ft(t,r)),e.gte=(t,r)=>e.check(fr(t,r)),e.min=(t,r)=>e.check(fr(t,r)),e.lt=(t,r)=>e.check(p7(t,r)),e.lte=(t,r)=>e.check(fe(t,r)),e.max=(t,r)=>e.check(fe(t,r)),e.int=t=>e.check(ht(t)),e.safe=t=>e.check(ht(t)),e.positive=t=>e.check(ft(0,t)),e.nonnegative=t=>e.check(fr(0,t)),e.negative=t=>e.check(p7(0,t)),e.nonpositive=t=>e.check(fe(0,t)),e.multipleOf=(t,r)=>e.check(fo(t,r)),e.step=(t,r)=>e.check(fo(t,r)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??-1/0,r.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(r.maximum??1/0,r.exclusiveMaximum??1/0)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function m7(e){return pL(m8,e)}var he=o9("ZodNumberFormat",(e,t)=>{dL.init(e,t),m8.init(e,t)});function ht(e){return pF(he,e)}function hr(e){return pq(he,e)}function hn(e){return pV(he,e)}function hi(e){return pB(he,e)}function ha(e){return pW(he,e)}var hs=o9("ZodBoolean",(e,t)=>{dZ.init(e,t),mm.init(e,t)});function ho(e){return pK(hs,e)}var hl=o9("ZodBigInt",(e,t)=>{dF.init(e,t),mm.init(e,t),e.gte=(t,r)=>e.check(fr(t,r)),e.min=(t,r)=>e.check(fr(t,r)),e.gt=(t,r)=>e.check(ft(t,r)),e.gte=(t,r)=>e.check(fr(t,r)),e.min=(t,r)=>e.check(fr(t,r)),e.lt=(t,r)=>e.check(p7(t,r)),e.lte=(t,r)=>e.check(fe(t,r)),e.max=(t,r)=>e.check(fe(t,r)),e.positive=t=>e.check(ft(BigInt(0),t)),e.negative=t=>e.check(p7(BigInt(0),t)),e.nonpositive=t=>e.check(fe(BigInt(0),t)),e.nonnegative=t=>e.check(fr(BigInt(0),t)),e.multipleOf=(t,r)=>e.check(fo(t,r));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function hu(e){return pJ(hl,e)}var hd=o9("ZodBigIntFormat",(e,t)=>{dq.init(e,t),hl.init(e,t)});function hc(e){return pX(hd,e)}function hp(e){return pY(hd,e)}var hf=o9("ZodSymbol",(e,t)=>{dV.init(e,t),mm.init(e,t)});function hm(e){return pQ(hf,e)}var hh=o9("ZodUndefined",(e,t)=>{dB.init(e,t),mm.init(e,t)});function hg(e){return p0(hh,e)}var hv=o9("ZodNull",(e,t)=>{dW.init(e,t),mm.init(e,t)});function hy(e){return p1(hv,e)}var h_=o9("ZodAny",(e,t)=>{dK.init(e,t),mm.init(e,t)});function hb(){return p4(h_)}var h$=o9("ZodUnknown",(e,t)=>{dG.init(e,t),mm.init(e,t)});function hw(){return p6(h$)}var hk=o9("ZodNever",(e,t)=>{dJ.init(e,t),mm.init(e,t)});function hx(e){return p2(hk,e)}var hS=o9("ZodVoid",(e,t)=>{dH.init(e,t),mm.init(e,t)});function hI(e){return p9(hS,e)}var hP=o9("ZodDate",(e,t)=>{dX.init(e,t),mm.init(e,t),e.min=(t,r)=>e.check(fr(t,r)),e.max=(t,r)=>e.check(fe(t,r));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function hO(e){return p5(hP,e)}var hE=o9("ZodArray",(e,t)=>{dQ.init(e,t),mm.init(e,t),e.element=t.element,e.min=(t,r)=>e.check(fp(t,r)),e.nonempty=t=>e.check(fp(1,t)),e.max=(t,r)=>e.check(fc(t,r)),e.length=(t,r)=>e.check(ff(t,r)),e.unwrap=()=>e.element});function hj(e,t){return fP(hE,e,t)}function hN(e){return h1(Object.keys(e._zod.def.shape))}var hT=o9("ZodObject",(e,t)=>{d4.init(e,t),mm.init(e,t),le.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>hY(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:hw()}),e.loose=()=>e.clone({...e._zod.def,catchall:hw()}),e.strict=()=>e.clone({...e._zod.def,catchall:hx()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>le.extend(e,t),e.merge=t=>le.merge(e,t),e.pick=t=>le.pick(e,t),e.omit=t=>le.omit(e,t),e.partial=(...t)=>le.partial(h5,e,t[0]),e.required=(...t)=>le.required(ga,e,t[0])});function hC(e,t){return new hT({type:"object",get shape(){return le.assignProp(this,"shape",{...e}),this.shape},...le.normalizeParams(t)})}function hz(e,t){return new hT({type:"object",get shape(){return le.assignProp(this,"shape",{...e}),this.shape},catchall:hx(),...le.normalizeParams(t)})}function hA(e,t){return new hT({type:"object",get shape(){return le.assignProp(this,"shape",{...e}),this.shape},catchall:hw(),...le.normalizeParams(t)})}var hR=o9("ZodUnion",(e,t)=>{d2.init(e,t),mm.init(e,t),e.options=t.options});function hU(e,t){return new hR({type:"union",options:e,...le.normalizeParams(t)})}var hD=o9("ZodDiscriminatedUnion",(e,t)=>{hR.init(e,t),d9.init(e,t)});function hM(e,t,r){return new hD({type:"union",options:t,discriminator:e,...le.normalizeParams(r)})}var hL=o9("ZodIntersection",(e,t)=>{d5.init(e,t),mm.init(e,t)});function hZ(e,t){return new hL({type:"intersection",left:e,right:t})}var hF=o9("ZodTuple",(e,t)=>{d8.init(e,t),mm.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function hq(e,t,r){let n=t instanceof du,i=n?r:t;return new hF({type:"tuple",items:e,rest:n?t:null,...le.normalizeParams(i)})}var hV=o9("ZodRecord",(e,t)=>{ce.init(e,t),mm.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function hB(e,t,r){return new hV({type:"record",keyType:e,valueType:t,...le.normalizeParams(r)})}function hW(e,t,r){return new hV({type:"record",keyType:hU([e,hx()]),valueType:t,...le.normalizeParams(r)})}var hK=o9("ZodMap",(e,t)=>{ct.init(e,t),mm.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function hG(e,t,r){return new hK({type:"map",keyType:e,valueType:t,...le.normalizeParams(r)})}var hJ=o9("ZodSet",(e,t)=>{cn.init(e,t),mm.init(e,t),e.min=(...t)=>e.check(fu(...t)),e.nonempty=t=>e.check(fu(1,t)),e.max=(...t)=>e.check(fl(...t)),e.size=(...t)=>e.check(fd(...t))});function hH(e,t){return new hJ({type:"set",valueType:e,...le.normalizeParams(t)})}var hX=o9("ZodEnum",(e,t)=>{ca.init(e,t),mm.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(e,n)=>{let i={};for(let n of e)if(r.has(n))i[n]=t.entries[n];else throw Error(`Key ${n} not found in enum`);return new hX({...t,checks:[],...le.normalizeParams(n),entries:i})},e.exclude=(e,n)=>{let i={...t.entries};for(let t of e)if(r.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new hX({...t,checks:[],...le.normalizeParams(n),entries:i})}});function hY(e,t){return new hX({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...le.normalizeParams(t)})}function hQ(e,t){return new hX({type:"enum",entries:e,...le.normalizeParams(t)})}var h0=o9("ZodLiteral",(e,t)=>{cs.init(e,t),mm.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function h1(e,t){return new h0({type:"literal",values:Array.isArray(e)?e:[e],...le.normalizeParams(t)})}var h4=o9("ZodFile",(e,t)=>{co.init(e,t),mm.init(e,t),e.min=(t,r)=>e.check(fu(t,r)),e.max=(t,r)=>e.check(fl(t,r)),e.mime=(t,r)=>e.check(f$(Array.isArray(t)?t:[t],r))});function h6(e){return fD(h4,e)}var h2=o9("ZodTransform",(e,t)=>{cl.init(e,t),mm.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=n=>{"string"==typeof n?r.issues.push(le.issue(n,r.value,t)):(n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=e),n.continue??(n.continue=!0),r.issues.push(le.issue(n)))};let i=t.transform(r.value,r);return i instanceof Promise?i.then(e=>(r.value=e,r)):(r.value=i,r)}});function h9(e){return new h2({type:"transform",transform:e})}var h5=o9("ZodOptional",(e,t)=>{cu.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType});function h3(e){return new h5({type:"optional",innerType:e})}var h8=o9("ZodNullable",(e,t)=>{cd.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType});function h7(e){return new h8({type:"nullable",innerType:e})}function ge(e){return h3(h7(e))}var gt=o9("ZodDefault",(e,t)=>{cc.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function gr(e,t){return new gt({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}var gn=o9("ZodPrefault",(e,t)=>{cf.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gi(e,t){return new gn({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}var ga=o9("ZodNonOptional",(e,t)=>{cm.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gs(e,t){return new ga({type:"nonoptional",innerType:e,...le.normalizeParams(t)})}var go=o9("ZodSuccess",(e,t)=>{cg.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gl(e){return new go({type:"success",innerType:e})}var gu=o9("ZodCatch",(e,t)=>{cv.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gd(e,t){return new gu({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}var gc=o9("ZodNaN",(e,t)=>{cy.init(e,t),mm.init(e,t)});function gp(e){return p8(gc,e)}var gf=o9("ZodPipe",(e,t)=>{c_.init(e,t),mm.init(e,t),e.in=t.in,e.out=t.out});function gm(e,t){return new gf({type:"pipe",in:e,out:t})}var gh=o9("ZodReadonly",(e,t)=>{c$.init(e,t),mm.init(e,t)});function gg(e){return new gh({type:"readonly",innerType:e})}var gv=o9("ZodTemplateLiteral",(e,t)=>{ck.init(e,t),mm.init(e,t)});function gy(e,t){return new gv({type:"template_literal",parts:e,...le.normalizeParams(t)})}var g_=o9("ZodLazy",(e,t)=>{cS.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.getter()});function gb(e){return new g_({type:"lazy",getter:e})}var g$=o9("ZodPromise",(e,t)=>{cx.init(e,t),mm.init(e,t),e.unwrap=()=>e._zod.def.innerType});function gw(e){return new g$({type:"promise",innerType:e})}var gk=o9("ZodCustom",(e,t)=>{cI.init(e,t),mm.init(e,t)});function gx(e,t){let r=new uW({check:"custom",...le.normalizeParams(t)});return r._zod.check=e,r}function gS(e,t){return fX(gk,e??(()=>!0),t)}function gI(e,t={}){return fY(gk,e,t)}function gP(e,t){let r=gx(t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(le.issue(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(le.issue(e)))},e(t.value,t)),t);return r}function gO(e,t={error:`Input not instance of ${e.name}`}){let r=new gk({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...le.normalizeParams(t)});return r._zod.bag.Class=e,r}var gE=(...e)=>fQ({Pipe:gf,Boolean:hs,String:mg,Transform:h2},...e);function gj(e){let t=gb(()=>hU([mv(e),m7(),ho(),hy(),hj(t),hB(mv(),t)]));return t}function gN(e,t){return gm(h9(e),t)}var gT={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function gC(e){o7({customError:e})}function gz(){return o7().customError}var gA={};function gR(e){return pp(mg,e)}function gU(e){return pZ(m8,e)}function gD(e){return pG(hs,e)}function gM(e){return pH(hl,e)}function gL(e){return p3(hP,e)}C(gA,{string:()=>gR,number:()=>gU,date:()=>gL,boolean:()=>gD,bigint:()=>gM}),o7(cR());var gZ=gS(e=>null!==e&&("object"==typeof e||"function"==typeof e)),gF=hU([mv(),m7().int()]),gq=mv(),gV=(hA({ttl:m7().optional(),pollInterval:m7().optional()}),hC({ttl:m7().optional()})),gB=hC({taskId:mv()}),gW=hA({progressToken:gF.optional(),"io.modelcontextprotocol/related-task":gB.optional()}),gK=hC({_meta:gW.optional()}),gG=gK.extend({task:gV.optional()}),gJ=hC({method:mv(),params:gK.loose().optional()}),gH=hC({_meta:gW.optional()}),gX=hC({method:mv(),params:gH.loose().optional()}),gY=hA({_meta:gW.optional()}),gQ=hU([mv(),m7().int()]),g0=hC({jsonrpc:h1("2.0"),id:gQ,...gJ.shape}).strict(),g1=hC({jsonrpc:h1("2.0"),...gX.shape}).strict(),g4=hC({jsonrpc:h1("2.0"),id:gQ,result:gY}).strict();(i=s||(s={}))[i.ConnectionClosed=-32e3]="ConnectionClosed",i[i.RequestTimeout=-32001]="RequestTimeout",i[i.ParseError=-32700]="ParseError",i[i.InvalidRequest=-32600]="InvalidRequest",i[i.MethodNotFound=-32601]="MethodNotFound",i[i.InvalidParams=-32602]="InvalidParams",i[i.InternalError=-32603]="InternalError",i[i.UrlElicitationRequired=-32042]="UrlElicitationRequired";var g6=hC({jsonrpc:h1("2.0"),id:gQ.optional(),error:hC({code:m7().int(),message:mv(),data:hw().optional()})}).strict();hU([g0,g1,g4,g6]),hU([g4,g6]);var g2=gY.strict(),g9=gH.extend({requestId:gQ.optional(),reason:mv().optional()}),g5=gX.extend({method:h1("notifications/cancelled"),params:g9}),g3=hC({src:mv(),mimeType:mv().optional(),sizes:hj(mv()).optional(),theme:hY(["light","dark"]).optional()}),g8=hC({icons:hj(g3).optional()}),g7=hC({name:mv(),title:mv().optional()}),ve=g7.extend({...g7.shape,...g8.shape,version:mv(),websiteUrl:mv().optional(),description:mv().optional()}),vt=hZ(hC({applyDefaults:ho().optional()}),hB(mv(),hw())),vr=gN(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,hZ(hC({form:vt.optional(),url:gZ.optional()}),hB(mv(),hw()).optional())),vn=hA({list:gZ.optional(),cancel:gZ.optional(),requests:hA({sampling:hA({createMessage:gZ.optional()}).optional(),elicitation:hA({create:gZ.optional()}).optional()}).optional()}),vi=hA({list:gZ.optional(),cancel:gZ.optional(),requests:hA({tools:hA({call:gZ.optional()}).optional()}).optional()}),va=hC({experimental:hB(mv(),gZ).optional(),sampling:hC({context:gZ.optional(),tools:gZ.optional()}).optional(),elicitation:vr.optional(),roots:hC({listChanged:ho().optional()}).optional(),tasks:vn.optional(),extensions:hB(mv(),gZ).optional()}),vs=gK.extend({protocolVersion:mv(),capabilities:va,clientInfo:ve}),vo=gJ.extend({method:h1("initialize"),params:vs}),vl=hC({experimental:hB(mv(),gZ).optional(),logging:gZ.optional(),completions:gZ.optional(),prompts:hC({listChanged:ho().optional()}).optional(),resources:hC({subscribe:ho().optional(),listChanged:ho().optional()}).optional(),tools:hC({listChanged:ho().optional()}).optional(),tasks:vi.optional(),extensions:hB(mv(),gZ).optional()}),vu=gY.extend({protocolVersion:mv(),capabilities:vl,serverInfo:ve,instructions:mv().optional()}),vd=gX.extend({method:h1("notifications/initialized"),params:gH.optional()}),vc=gJ.extend({method:h1("ping"),params:gK.optional()}),vp=hC({progress:m7(),total:h3(m7()),message:h3(mv())}),vf=hC({...gH.shape,...vp.shape,progressToken:gF}),vm=gX.extend({method:h1("notifications/progress"),params:vf}),vh=gK.extend({cursor:gq.optional()}),vg=gJ.extend({params:vh.optional()}),vv=gY.extend({nextCursor:gq.optional()}),vy=hY(["working","input_required","completed","failed","cancelled"]),v_=hC({taskId:mv(),status:vy,ttl:hU([m7(),hy()]),createdAt:mv(),lastUpdatedAt:mv(),pollInterval:h3(m7()),statusMessage:h3(mv())}),vb=gY.extend({task:v_}),v$=gH.merge(v_),vw=gX.extend({method:h1("notifications/tasks/status"),params:v$}),vk=gJ.extend({method:h1("tasks/get"),params:gK.extend({taskId:mv()})}),vx=gY.merge(v_),vS=gJ.extend({method:h1("tasks/result"),params:gK.extend({taskId:mv()})}),vI=(gY.loose(),vg.extend({method:h1("tasks/list")})),vP=vv.extend({tasks:hj(v_)}),vO=gJ.extend({method:h1("tasks/cancel"),params:gK.extend({taskId:mv()})}),vE=(gY.merge(v_),hC({uri:mv(),mimeType:h3(mv()),_meta:hB(mv(),hw()).optional()})),vj=vE.extend({text:mv()}),vN=mv().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),vT=vE.extend({blob:vN}),vC=hY(["user","assistant"]),vz=hC({audience:hj(vC).optional(),priority:m7().min(0).max(1).optional(),lastModified:f8.datetime({offset:!0}).optional()}),vA=hC({...g7.shape,...g8.shape,uri:mv(),description:h3(mv()),mimeType:h3(mv()),size:h3(m7()),annotations:vz.optional(),_meta:h3(hA({}))}),vR=hC({...g7.shape,...g8.shape,uriTemplate:mv(),description:h3(mv()),mimeType:h3(mv()),annotations:vz.optional(),_meta:h3(hA({}))}),vU=vg.extend({method:h1("resources/list")}),vD=vv.extend({resources:hj(vA)}),vM=vg.extend({method:h1("resources/templates/list")}),vL=vv.extend({resourceTemplates:hj(vR)}),vZ=gK.extend({uri:mv()}),vF=gJ.extend({method:h1("resources/read"),params:vZ}),vq=gY.extend({contents:hj(hU([vj,vT]))}),vV=gX.extend({method:h1("notifications/resources/list_changed"),params:gH.optional()}),vB=gJ.extend({method:h1("resources/subscribe"),params:vZ}),vW=gJ.extend({method:h1("resources/unsubscribe"),params:vZ}),vK=gH.extend({uri:mv()}),vG=gX.extend({method:h1("notifications/resources/updated"),params:vK}),vJ=hC({name:mv(),description:h3(mv()),required:h3(ho())}),vH=hC({...g7.shape,...g8.shape,description:h3(mv()),arguments:h3(hj(vJ)),_meta:h3(hA({}))}),vX=vg.extend({method:h1("prompts/list")}),vY=vv.extend({prompts:hj(vH)}),vQ=gK.extend({name:mv(),arguments:hB(mv(),mv()).optional()}),v0=gJ.extend({method:h1("prompts/get"),params:vQ}),v1=hC({type:h1("text"),text:mv(),annotations:vz.optional(),_meta:hB(mv(),hw()).optional()}),v4=hC({type:h1("image"),data:vN,mimeType:mv(),annotations:vz.optional(),_meta:hB(mv(),hw()).optional()}),v6=hC({type:h1("audio"),data:vN,mimeType:mv(),annotations:vz.optional(),_meta:hB(mv(),hw()).optional()}),v2=hC({type:h1("tool_use"),name:mv(),id:mv(),input:hB(mv(),hw()),_meta:hB(mv(),hw()).optional()}),v9=hC({type:h1("resource"),resource:hU([vj,vT]),annotations:vz.optional(),_meta:hB(mv(),hw()).optional()}),v5=hU([v1,v4,v6,vA.extend({type:h1("resource_link")}),v9]),v3=hC({role:vC,content:v5}),v8=gY.extend({description:mv().optional(),messages:hj(v3)}),v7=gX.extend({method:h1("notifications/prompts/list_changed"),params:gH.optional()}),ye=hC({title:mv().optional(),readOnlyHint:ho().optional(),destructiveHint:ho().optional(),idempotentHint:ho().optional(),openWorldHint:ho().optional()}),yt=hC({taskSupport:hY(["required","optional","forbidden"]).optional()}),yr=hC({...g7.shape,...g8.shape,description:mv().optional(),inputSchema:hC({type:h1("object"),properties:hB(mv(),gZ).optional(),required:hj(mv()).optional()}).catchall(hw()),outputSchema:hC({type:h1("object"),properties:hB(mv(),gZ).optional(),required:hj(mv()).optional()}).catchall(hw()).optional(),annotations:ye.optional(),execution:yt.optional(),_meta:hB(mv(),hw()).optional()}),yn=vg.extend({method:h1("tools/list")}),yi=vv.extend({tools:hj(yr)}),ya=gY.extend({content:hj(v5).default([]),structuredContent:hB(mv(),hw()).optional(),isError:ho().optional()}),ys=(ya.or(gY.extend({toolResult:hw()})),gG.extend({name:mv(),arguments:hB(mv(),hw()).optional()})),yo=gJ.extend({method:h1("tools/call"),params:ys}),yl=gX.extend({method:h1("notifications/tools/list_changed"),params:gH.optional()}),yu=(hC({autoRefresh:ho().default(!0),debounceMs:m7().int().nonnegative().default(300)}),hY(["debug","info","notice","warning","error","critical","alert","emergency"])),yd=gK.extend({level:yu}),yc=gJ.extend({method:h1("logging/setLevel"),params:yd}),yp=gH.extend({level:yu,logger:mv().optional(),data:hw()}),yf=gX.extend({method:h1("notifications/message"),params:yp}),ym=hC({name:mv().optional()}),yh=hC({hints:hj(ym).optional(),costPriority:m7().min(0).max(1).optional(),speedPriority:m7().min(0).max(1).optional(),intelligencePriority:m7().min(0).max(1).optional()}),yg=hC({mode:hY(["auto","required","none"]).optional()}),yv=hC({type:h1("tool_result"),toolUseId:mv().describe("The unique identifier for the corresponding tool call."),content:hj(v5).default([]),structuredContent:hC({}).loose().optional(),isError:ho().optional(),_meta:hB(mv(),hw()).optional()}),yy=hM("type",[v1,v4,v6]),y_=hM("type",[v1,v4,v6,v2,yv]),yb=hC({role:vC,content:hU([y_,hj(y_)]),_meta:hB(mv(),hw()).optional()}),y$=gG.extend({messages:hj(yb),modelPreferences:yh.optional(),systemPrompt:mv().optional(),includeContext:hY(["none","thisServer","allServers"]).optional(),temperature:m7().optional(),maxTokens:m7().int(),stopSequences:hj(mv()).optional(),metadata:gZ.optional(),tools:hj(yr).optional(),toolChoice:yg.optional()}),yw=gJ.extend({method:h1("sampling/createMessage"),params:y$}),yk=gY.extend({model:mv(),stopReason:h3(hY(["endTurn","stopSequence","maxTokens"]).or(mv())),role:vC,content:yy}),yx=gY.extend({model:mv(),stopReason:h3(hY(["endTurn","stopSequence","maxTokens","toolUse"]).or(mv())),role:vC,content:hU([y_,hj(y_)])}),yS=hC({type:h1("boolean"),title:mv().optional(),description:mv().optional(),default:ho().optional()}),yI=hC({type:h1("string"),title:mv().optional(),description:mv().optional(),minLength:m7().optional(),maxLength:m7().optional(),format:hY(["email","uri","date","date-time"]).optional(),default:mv().optional()}),yP=hC({type:hY(["number","integer"]),title:mv().optional(),description:mv().optional(),minimum:m7().optional(),maximum:m7().optional(),default:m7().optional()}),yO=hC({type:h1("string"),title:mv().optional(),description:mv().optional(),enum:hj(mv()),default:mv().optional()}),yE=hC({type:h1("string"),title:mv().optional(),description:mv().optional(),oneOf:hj(hC({const:mv(),title:mv()})),default:mv().optional()}),yj=hC({type:h1("string"),title:mv().optional(),description:mv().optional(),enum:hj(mv()),enumNames:hj(mv()).optional(),default:mv().optional()}),yN=hU([yO,yE]),yT=hU([hC({type:h1("array"),title:mv().optional(),description:mv().optional(),minItems:m7().optional(),maxItems:m7().optional(),items:hC({type:h1("string"),enum:hj(mv())}),default:hj(mv()).optional()}),hC({type:h1("array"),title:mv().optional(),description:mv().optional(),minItems:m7().optional(),maxItems:m7().optional(),items:hC({anyOf:hj(hC({const:mv(),title:mv()}))}),default:hj(mv()).optional()})]),yC=hU([yj,yN,yT]),yz=hU([yC,yS,yI,yP]),yA=hU([gG.extend({mode:h1("form").optional(),message:mv(),requestedSchema:hC({type:h1("object"),properties:hB(mv(),yz),required:hj(mv()).optional()})}),gG.extend({mode:h1("url"),message:mv(),elicitationId:mv(),url:mv().url()})]),yR=gJ.extend({method:h1("elicitation/create"),params:yA}),yU=gH.extend({elicitationId:mv()}),yD=gX.extend({method:h1("notifications/elicitation/complete"),params:yU}),yM=gY.extend({action:hY(["accept","decline","cancel"]),content:gN(e=>null===e?void 0:e,hB(mv(),hU([mv(),m7(),ho(),hj(mv())])).optional())}),yL=hC({type:h1("ref/resource"),uri:mv()}),yZ=hC({type:h1("ref/prompt"),name:mv()}),yF=gK.extend({ref:hU([yZ,yL]),argument:hC({name:mv(),value:mv()}),context:hC({arguments:hB(mv(),mv()).optional()}).optional()}),yq=gJ.extend({method:h1("completion/complete"),params:yF}),yV=gY.extend({completion:hA({values:hj(mv()).max(100),total:h3(m7().int()),hasMore:h3(ho())})}),yB=hC({uri:mv().startsWith("file://"),name:mv().optional(),_meta:hB(mv(),hw()).optional()}),yW=gJ.extend({method:h1("roots/list"),params:gK.optional()}),yK=gY.extend({roots:hj(yB)}),yG=gX.extend({method:h1("notifications/roots/list_changed"),params:gH.optional()});hU([vc,vo,yq,yc,v0,vX,vU,vM,vF,vB,vW,yo,yn,vk,vS,vI,vO]),hU([g5,vm,vd,yG,vw]),hU([g2,yk,yx,yM,yK,vx,vP,vb]),hU([vc,yw,yR,yW,vk,vS,vI,vO]),hU([g5,vm,yf,vG,vV,yl,v7,vw,yD]),hU([g2,vu,yV,v8,vY,vD,vL,vq,ya,yi,vx,vP,vb]);class yJ extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,t,r){return e===s.UrlElicitationRequired&&r&&r.elicitations?new yH(r.elicitations,t):new yJ(e,t,r)}}class yH extends yJ{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(s.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}var yX=Symbol("Let zodToJsonSchema decide on which parser to use");function yY(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function yQ(e,t,r,n,i){e[t]=r,yY(e,t,n,i)}var y0=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function y1(e){if("openAi"!==e.target)return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?y0(t,e.currentPath):t.join("/")}}function y4(e,t){return _m(e.type._def,t)}var y6=void 0,y2=/^[cC][^\s-]{8,}$/,y9=/^[0-9a-z]+$/,y5=/^[0-9A-HJKMNP-TV-Z]{26}$/,y3=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,y8=()=>(void 0===y6&&(y6=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),y6),y7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_e=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_r=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,_n=/^[a-zA-Z0-9_-]{21}$/,_i=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function _a(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":yQ(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":yQ(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":_l(r,"email",n.message,t);break;case"format:idn-email":_l(r,"idn-email",n.message,t);break;case"pattern:zod":_u(r,y3,n.message,t)}break;case"url":_l(r,"uri",n.message,t);break;case"uuid":_l(r,"uuid",n.message,t);break;case"regex":_u(r,n.regex,n.message,t);break;case"cuid":_u(r,y2,n.message,t);break;case"cuid2":_u(r,y9,n.message,t);break;case"startsWith":_u(r,RegExp(`^${_s(n.value,t)}`),n.message,t);break;case"endsWith":_u(r,RegExp(`${_s(n.value,t)}$`),n.message,t);break;case"datetime":_l(r,"date-time",n.message,t);break;case"date":_l(r,"date",n.message,t);break;case"time":_l(r,"time",n.message,t);break;case"duration":_l(r,"duration",n.message,t);break;case"length":yQ(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,n.value):n.value,n.message,t),yQ(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":_u(r,RegExp(_s(n.value,t)),n.message,t);break;case"ip":"v6"!==n.version&&_l(r,"ipv4",n.message,t),"v4"!==n.version&&_l(r,"ipv6",n.message,t);break;case"base64url":_u(r,_r,n.message,t);break;case"jwt":_u(r,_i,n.message,t);break;case"cidr":"v6"!==n.version&&_u(r,y7,n.message,t),"v4"!==n.version&&_u(r,_e,n.message,t);break;case"emoji":_u(r,y8(),n.message,t);break;case"ulid":_u(r,y5,n.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":_l(r,"binary",n.message,t);break;case"contentEncoding:base64":yQ(r,"contentEncoding","base64",n.message,t);break;case"pattern:zod":_u(r,_t,n.message,t)}break;case"nanoid":_u(r,_n,n.message,t)}return r}function _s(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let r=0;r<e.length;r++)_o.has(e[r])||(t+="\\"),t+=e[r];return t}(e):e}var _o=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function _l(e,t,r,n){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length))&&delete e.errorMessage,e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):yQ(e,"format",t,r,n)}function _u(e,t,r,n){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length))&&delete e.errorMessage,e.allOf.push({pattern:_d(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):yQ(e,"pattern",_d(t,n),r,n)}function _d(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,i="",a=!1,s=!1,o=!1;for(let e=0;e<n.length;e++){if(a){i+=n[e],a=!1;continue}if(r.i){if(s){if(n[e].match(/[a-z]/)){o?(i+=n[e],i+=`${n[e-2]}-${n[e]}`.toUpperCase(),o=!1):"-"===n[e+1]&&n[e+2]?.match(/[a-z]/)?(i+=n[e],o=!0):i+=`${n[e]}${n[e].toUpperCase()}`;continue}}else if(n[e].match(/[a-z]/)){i+=`[${n[e]}${n[e].toUpperCase()}]`;continue}}if(r.m){if("^"===n[e]){i+=`(^|(?<=[\r
|
|
79
84
|
]))`;continue}else if("$"===n[e]){i+=`($|(?=[\r
|
|
80
85
|
]))`;continue}}if(r.s&&"."===n[e]){i+=s?`${n[e]}\r
|
|
81
86
|
`:`[${n[e]}\r
|
|
82
|
-
]`;continue}(i+=n[e],"\\"===n[e])?a=!0:s&&"]"===n[e]?s=!1:s||"["!==n[e]||(s=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function y1(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===r.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((r,n)=>({...r,[n]:y2(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??yA(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:y2(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===r.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=yJ(e.keyType._def,t);return{...n,propertyNames:i}}if(e.keyType?._def.typeName===r.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===r.ZodBranded&&e.keyType._def.type._def.typeName===r.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=yR(e.keyType._def,t);return{...n,propertyNames:i}}return n}var y4={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},y6=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,r)=>y2(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return r.length?{anyOf:r}:void 0};function y2(e,t,n=!1){let i=t.seen.get(e);if(t.override){let r=t.override?.(e,t,i,n);if(r!==yN)return r}if(i&&!n){let e=y9(i,t);if(void 0!==e)return e}let a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);let s=((e,t,n)=>{switch(t){case r.ZodString:return yJ(e,n);case r.ZodNumber:let i={type:"number"};if(!e.checks)return i;for(let t of e.checks)switch(t.kind){case"int":i.type="integer",yT(i,"type",t.message,n);break;case"min":"jsonSchema7"===n.target?t.inclusive?yC(i,"minimum",t.value,t.message,n):yC(i,"exclusiveMinimum",t.value,t.message,n):(t.inclusive||(i.exclusiveMinimum=!0),yC(i,"minimum",t.value,t.message,n));break;case"max":"jsonSchema7"===n.target?t.inclusive?yC(i,"maximum",t.value,t.message,n):yC(i,"exclusiveMaximum",t.value,t.message,n):(t.inclusive||(i.exclusiveMaximum=!0),yC(i,"maximum",t.value,t.message,n));break;case"multipleOf":yC(i,"multipleOf",t.value,t.message,n)}return i;case r.ZodObject:return function(e,t){let r="openAi"===t.target,n={type:"object",properties:{}},i=[],a=e.shape();for(let e in a){let s=a[e];if(void 0===s||void 0===s._def)continue;let o=function(e){try{return e.isOptional()}catch{return!0}}(s);o&&r&&("ZodOptional"===s._def.typeName&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),o=!1);let l=y2(s._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==l&&(n.properties[e]=l,o||i.push(e))}i.length&&(n.required=i);let s=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return y2(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==s&&(n.additionalProperties=s),n}(e,n);case r.ZodBigInt:let a={type:"integer",format:"int64"};if(!e.checks)return a;for(let t of e.checks)switch(t.kind){case"min":"jsonSchema7"===n.target?t.inclusive?yC(a,"minimum",t.value,t.message,n):yC(a,"exclusiveMinimum",t.value,t.message,n):(t.inclusive||(a.exclusiveMinimum=!0),yC(a,"minimum",t.value,t.message,n));break;case"max":"jsonSchema7"===n.target?t.inclusive?yC(a,"maximum",t.value,t.message,n):yC(a,"exclusiveMaximum",t.value,t.message,n):(t.inclusive||(a.exclusiveMaximum=!0),yC(a,"maximum",t.value,t.message,n));break;case"multipleOf":yC(a,"multipleOf",t.value,t.message,n)}return a;case r.ZodBoolean:return{type:"boolean"};case r.ZodDate:return function e(t,r,n){let i=n??r.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,i)=>e(t,r,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":var a=t,s=r;let o={type:"integer",format:"unix-time"};if("openApi3"===s.target)return o;for(let e of a.checks)switch(e.kind){case"min":yC(o,"minimum",e.value,e.message,s);break;case"max":yC(o,"maximum",e.value,e.message,s)}return o}}(e,n);case r.ZodUndefined:return{not:yA(n)};case r.ZodNull:return"openApi3"===n.target?{enum:["null"],nullable:!0}:{type:"null"};case r.ZodArray:let s;return s={type:"array"},e.type?._def&&e.type?._def?.typeName!==r.ZodAny&&(s.items=y2(e.type._def,{...n,currentPath:[...n.currentPath,"items"]})),e.minLength&&yC(s,"minItems",e.minLength.value,e.minLength.message,n),e.maxLength&&yC(s,"maxItems",e.maxLength.value,e.maxLength.message,n),e.exactLength&&(yC(s,"minItems",e.exactLength.value,e.exactLength.message,n),yC(s,"maxItems",e.exactLength.value,e.exactLength.message,n)),s;case r.ZodUnion:case r.ZodDiscriminatedUnion:if("openApi3"===n.target)return y6(e,n);let o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every(e=>e._def.typeName in y4&&(!e._def.checks||!e._def.checks.length))){let e=o.reduce((e,t)=>{let r=y4[t._def.typeName];return r&&!e.includes(r)?[...e,r]:e},[]);return{type:e.length>1?e:e[0]}}if(o.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){let e=o.reduce((e,t)=>{let r=typeof t._def.value;switch(r){case"string":case"number":case"boolean":return[...e,r];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===o.length){let t=e.filter((e,t,r)=>r.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:o.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(o.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:o.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return y6(e,n);case r.ZodIntersection:let l,u,d;return l=[y2(e.left._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),y2(e.right._def,{...n,currentPath:[...n.currentPath,"allOf","1"]})].filter(e=>!!e),u="jsonSchema2019-09"===n.target?{unevaluatedProperties:!1}:void 0,d=[],l.forEach(e=>{if((!("type"in e)||"string"!==e.type)&&"allOf"in e)d.push(...e.allOf),void 0===e.unevaluatedProperties&&(u=void 0);else{let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){let{additionalProperties:r,...n}=e;t=n}else u=void 0;d.push(t)}}),d.length?{allOf:d,...u}:void 0;case r.ZodTuple:return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,t)=>y2(e._def,{...n,currentPath:[...n.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:y2(e.rest._def,{...n,currentPath:[...n.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,t)=>y2(e._def,{...n,currentPath:[...n.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])};case r.ZodRecord:return y1(e,n);case r.ZodLiteral:let c;return"bigint"!=(c=typeof e.value)&&"number"!==c&&"boolean"!==c&&"string"!==c?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===n.target?{type:"bigint"===c?"integer":c,enum:[e.value]}:{type:"bigint"===c?"integer":c,const:e.value};case r.ZodEnum:return{type:"string",enum:Array.from(e.values)};case r.ZodNativeEnum:let p,f,m;return p=e.values,{type:1===(m=Array.from(new Set((f=Object.keys(e.values).filter(e=>"number"!=typeof p[p[e]]).map(e=>p[e])).map(e=>typeof e)))).length?"string"===m[0]?"string":"number":["string","number"],enum:f};case r.ZodNullable:if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===n.target?{type:y4[e.innerType._def.typeName],nullable:!0}:{type:[y4[e.innerType._def.typeName],"null"]};if("openApi3"===n.target){let t=y2(e.innerType._def,{...n,currentPath:[...n.currentPath]});return t&&"$ref"in t?{allOf:[t],nullable:!0}:t&&{...t,nullable:!0}}let h=y2(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","0"]});return h&&{anyOf:[h,{type:"null"}]};case r.ZodOptional:if(n.currentPath.toString()===n.propertyPath?.toString())return y2(e.innerType._def,n);let g=y2(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","1"]});return g?{anyOf:[{not:yA(n)},g]}:yA(n);case r.ZodMap:return"record"===n.mapStrategy?y1(e,n):{type:"array",maxItems:125,items:{type:"array",items:[y2(e.keyType._def,{...n,currentPath:[...n.currentPath,"items","items","0"]})||yA(n),y2(e.valueType._def,{...n,currentPath:[...n.currentPath,"items","items","1"]})||yA(n)],minItems:2,maxItems:2}};case r.ZodSet:let v;return v={type:"array",uniqueItems:!0,items:y2(e.valueType._def,{...n,currentPath:[...n.currentPath,"items"]})},e.minSize&&yC(v,"minItems",e.minSize.value,e.minSize.message,n),e.maxSize&&yC(v,"maxItems",e.maxSize.value,e.maxSize.message,n),v;case r.ZodLazy:return()=>e.getter()._def;case r.ZodPromise:return y2(e.type._def,n);case r.ZodNaN:case r.ZodNever:return"openAi"===n.target?void 0:{not:yA({...n,currentPath:[...n.currentPath,"not"]})};case r.ZodEffects:return"input"===n.effectStrategy?y2(e.schema._def,n):yA(n);case r.ZodAny:case r.ZodUnknown:return yA(n);case r.ZodDefault:return{...y2(e.innerType._def,n),default:e.defaultValue()};case r.ZodBranded:return yR(e,n);case r.ZodReadonly:case r.ZodCatch:return y2(e.innerType._def,n);case r.ZodPipeline:if("input"===n.pipeStrategy)return y2(e.in._def,n);if("output"===n.pipeStrategy)return y2(e.out._def,n);let y=y2(e.in._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),_=y2(e.out._def,{...n,currentPath:[...n.currentPath,"allOf",y?"1":"0"]});return{allOf:[y,_].filter(e=>void 0!==e)};case r.ZodFunction:case r.ZodVoid:case r.ZodSymbol:default:return}})(e,e.typeName,t),o="function"==typeof s?y2(s(),t):s;if(o&&y5(e,t,o),t.postProcess){let r=t.postProcess(o,e,t);return a.jsonSchema=o,r}return a.jsonSchema=o,o}var y9=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:yz(t.currentPath,e.path)};case"none":case"seen":if(e.path.length<t.currentPath.length&&e.path.every((e,r)=>t.currentPath[r]===e))return console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),yA(t);return"seen"===t.$refStrategy?yA(t):void 0}},y5=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription)&&(r.markdownDescription=e.description),r);E(tA(),1),E(tD(),1),Symbol.for("mcp.completable"),(o||(o={})).Completable="McpCompletable";a=()=>fZ.object({session_id:fZ.string(),ws_url:fZ.string(),work_dir:fZ.string().optional(),session_key:fZ.string().optional()}),()=>t??=a();async function y3(e,t){try{await (0,c.copyFile)(e,t)}catch(e){if(!ay(e))throw e}}async function y8(e,t){if(!e)return;let r=e;try{let t=aY(e);t?.claudeAiOauth?.refreshToken&&(delete t.claudeAiOauth.refreshToken,r=aX(t))}catch{}await (0,c.writeFile)(t,r,{mode:384})}async function y7(e,t,r,n,i=6e4){if(!st(t))return;let a=sn((0,m.resolve)(r??".")),s=await tZ(e.load({projectKey:a,sessionId:t}),i,`SessionStore.load() timed out after ${i}ms for session ${t}`);if(!s||0===s.length)return;let o=(0,m.join)((0,f.tmpdir)(),`claude-resume-${(0,u.randomUUID)()}`);try{let r,p=(0,m.join)(o,"projects",a);await (0,c.mkdir)(p,{recursive:!0});let h=(0,m.join)(p,`${t}.jsonl`);await sr(h,s);let g=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,v=g??(0,m.join)((0,f.homedir)(),".claude"),y;try{y=await (0,c.readFile)((0,m.join)(v,".credentials.json"),"utf-8")}catch(e){if(!ay(e))throw e}if(g||(n??process.env).ANTHROPIC_API_KEY||(n??process.env).CLAUDE_CODE_OAUTH_TOKEN||(y=await (r=function(e=""){let t=r_(),r=process.env.CLAUDE_CONFIG_DIR?`-${(0,u.createHash)("sha256").update(t).digest("hex").substring(0,8)}`:"";return`Claude Code${function(){let e=s$,t=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(t){let r=t.replace(/\/$/,"");if(!sw.includes(r))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");e={...e,BASE_API_URL:r,CONSOLE_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_ORIGIN:r,TOKEN_URL:`${r}/v1/oauth/token`,API_KEY_URL:`${r}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${r}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${r}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let r=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;return r&&(e={...e,CLIENT_ID:r}),e}().OAUTH_FILE_SUFFIX}${e}${r}`}("-credentials"),new Promise(e=>{(0,l.execFile)("security",["find-generic-password","-a",function(){try{return process.env.USER||(0,f.userInfo)().username}catch{return"claude-code-user"}}(),"-w","-s",r],{encoding:"utf-8",timeout:5e3},(t,r)=>e(t?void 0:r.trim()||void 0))}))??y),await y8(y,(0,m.join)(o,".credentials.json")),await y3((0,m.join)(g??(0,f.homedir)(),".claude.json"),(0,m.join)(o,".claude.json")),e.listSubkeys){let r=(0,m.join)(p,t);for(let n of(await tZ(e.listSubkeys({projectKey:a,sessionId:t}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${t}`))){let s=(0,m.resolve)(r,n+".jsonl");if(!n||(0,m.isAbsolute)(n)||n.split(/[\\/]/).includes("..")||!s.startsWith(r+m.sep)){aB(`[SessionStore] skipping unsafe subpath from listSubkeys: ${n}`,{level:"warn"});continue}let o=await tZ(e.load({projectKey:a,sessionId:t,subpath:n}),i,`SessionStore.load() timed out after ${i}ms for session ${t} subpath ${n}`);if(!o||0===o.length)continue;let l=[],u=[];for(let e of o){var d;(d=e,"object"==typeof d&&null!==d&&"type"in d&&"agent_metadata"===d.type)?l.push(e):u.push(e)}if(u.length>0&&(await (0,c.mkdir)((0,m.dirname)(s),{recursive:!0}),await sr(s,u)),l.length>0){let e=l.at(-1),t=(0,m.resolve)(r,n+".meta.json");await (0,c.mkdir)((0,m.dirname)(t),{recursive:!0});let{type:i,...a}=e;await (0,c.writeFile)(t,aX(a),{mode:384})}}}return o}catch(e){throw await _n(o),e}}function _e(e,t,r,n){let i,{systemPrompt:a,settings:s,settingSources:o,sandbox:l,...u}=e??{},d,c,h;void 0===a?d="":"string"==typeof a||Array.isArray(a)?d=a:"preset"===a.type&&(c=a.append,h=a.excludeDynamicSections);let v=u.pathToClaudeCodeExecutable;if(!v){let e=(0,g.fileURLToPath)(b.url),t=(0,p.createRequire)(e),r=function(e,t=process.platform,r=process.arch){let n="win32"===t?".exe":"";for(let i of("linux"===t?[`@anthropic-ai/claude-agent-sdk-linux-${r}-musl`,`@anthropic-ai/claude-agent-sdk-linux-${r}`]:[`@anthropic-ai/claude-agent-sdk-${t}-${r}`]).map(e=>`${e}/claude${n}`))try{return e(i)}catch{}return null}(e=>t.resolve(e));if(r)v=r;else try{v=t.resolve("./cli.js")}catch{throw Error(`Native CLI binary for ${process.platform}-${process.arch} not found. Reinstall @anthropic-ai/claude-agent-sdk without --omit=optional, or set options.pathToClaudeCodeExecutable.`)}}process.env.CLAUDE_AGENT_SDK_VERSION="0.2.114";let{abortController:y=tM(),additionalDirectories:_=[],agent:$,agents:w,allowedTools:k=[],betas:x,canUseTool:S,continue:I,cwd:P,debug:O,debugFile:E,disallowedTools:j=[],tools:N,env:T,executable:C=tq()?"bun":"node",executableArgs:z=[],extraArgs:A={},fallbackModel:R,enableFileCheckpointing:U,toolConfig:D,forkSession:M,hooks:L,includeHookEvents:Z,includePartialMessages:F,onElicitation:q,persistSession:V,sessionStore:B,thinking:W,effort:K,maxThinkingTokens:G,maxTurns:J,maxBudgetUsd:H,taskBudget:X,mcpServers:Y,model:Q,outputFormat:ee,permissionMode:et="default",allowDangerouslySkipPermissions:er=!1,permissionPromptToolName:en,plugins:ei,getOAuthToken:ea,workload:es,resume:eo,resumeSessionAt:el,sessionId:eu,stderr:ed,strictMcpConfig:ec}=u;if(B&&!1===V)throw Error("sessionStore cannot be used with persistSession: false -- the storage adapter requires local writes to mirror from. Use CLAUDE_CONFIG_DIR=/tmp for ephemeral local writes with external mirroring.");if(B&&I&&!eo&&!B.listSessions)throw Error("Options.continue with sessionStore requires store.listSessions to be implemented");if(B&&U)throw Error("enableFileCheckpointing is not yet supported with sessionStore (backup blobs are not mirrored, so rewindFiles() fails after a store-backed resume).");B&&u.spawnClaudeCodeProcess&&aB("sessionStore with custom spawnClaudeCodeProcess: ensure the subprocess CLAUDE_CONFIG_DIR matches the parent (same path, same separators) or transcript_mirror frames will be dropped.",{level:"warn"});let ep=ee?.type==="json_schema"?ee.schema:void 0,ef=T?{...T}:{...process.env};ef.CLAUDE_CODE_ENTRYPOINT||(ef.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),U&&(ef.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),ea&&(ef.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),D?.askUserQuestion?.previewFormat&&(ef.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=D.askUserQuestion.previewFormat);let em={};if(a3.propagation.inject(a3.context.active(),em),"traceparent"in em)for(let e of["TRACEPARENT","TRACESTATE"])e in(T??{})||delete ef[e];for(let[e,t]of Object.entries(em)){let r=e.toUpperCase();r in(T??{})||(ef[r]=t)}let eh={},eg=new Map;if(Y)for(let[e,t]of Object.entries(Y))"sdk"===t.type&&t.instance?eg.set(e,t.instance):eh[e]=t;if(W)switch(W.type){case"adaptive":i={type:"adaptive",display:W.display};break;case"enabled":i={type:"enabled",budgetTokens:W.budgetTokens,display:W.display};break;case"disabled":i={type:"disabled"}}else void 0!==G&&(i=0===G?{type:"disabled"}:{type:"enabled",budgetTokens:G});r&&(ef.CLAUDE_CONFIG_DIR=r);let ev=new a4({abortController:y,additionalDirectories:_,agent:$,betas:x,cwd:P,debug:O,debugFile:E,executable:C,executableArgs:z,extraArgs:es?{...A,workload:es}:A,pathToClaudeCodeExecutable:v,env:ef,forkSession:M,stderr:ed,thinkingConfig:i,effort:K,maxTurns:J,maxBudgetUsd:H,taskBudget:X,model:Q,fallbackModel:R,jsonSchema:ep,permissionMode:et,allowDangerouslySkipPermissions:er,permissionPromptToolName:en,continueConversation:B?void 0:I,resume:eo,resumeSessionAt:el,sessionId:eu,settings:"object"==typeof s?aX(s):s,settingSources:o,allowedTools:k,disallowedTools:j,tools:N,mcpServers:eh,strictMcpConfig:ec,canUseTool:!!S,hooks:!!L,includeHookEvents:Z,includePartialMessages:F,persistSession:V,sessionMirror:!!B,plugins:ei,sandbox:l,spawnClaudeCodeProcess:u.spawnClaudeCodeProcess,deferSpawn:n}),ey=new a9(ev,t,S,L,y,eg,ep,{systemPrompt:d,appendSystemPrompt:c,appendSubagentSystemPrompt:u.appendSubagentSystemPrompt,excludeDynamicSections:h,agents:w,title:u.title,promptSuggestions:u.promptSuggestions,agentProgressSummaries:u.agentProgressSummaries},q,ea);if(B){let e=()=>(0,m.join)(ef.CLAUDE_CONFIG_DIR??(0,m.join)((0,f.homedir)(),".claude"),"projects"),t=new a5(async(t,r)=>{let n=_s(t,e());n?await B.append(n,r):aB(`[SessionStore] dropping mirror frame: filePath ${t} is not under ${e()} -- subprocess CLAUDE_CONFIG_DIR likely differs from parent (custom spawnClaudeCodeProcess / container?)`,{level:"warn"})},void 0,(t,r)=>{let n=_s(t,e());n&&ey.reportMirrorError(n,r.message)});ey.setTranscriptMirrorBatcher(t)}return{queryInstance:ey,transport:ev,abortController:y,processEnv:ef}}function _t(e,t,r,n){"string"==typeof r?t.write(aX({type:"user",session_id:"",message:{role:"user",content:[{type:"text",text:r}]},parent_tool_use_id:null})+`
|
|
83
|
-
`):e.streamInput(r).catch(e=>n.abort(e))}var
|
|
87
|
+
]`;continue}(i+=n[e],"\\"===n[e])?a=!0:s&&"]"===n[e]?s=!1:s||"["!==n[e]||(s=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function _c(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===r.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((r,n)=>({...r,[n]:_m(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??y1(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:_m(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===r.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=_a(e.keyType._def,t);return{...n,propertyNames:i}}if(e.keyType?._def.typeName===r.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===r.ZodBranded&&e.keyType._def.type._def.typeName===r.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=y4(e.keyType._def,t);return{...n,propertyNames:i}}return n}var _p={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},_f=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,r)=>_m(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return r.length?{anyOf:r}:void 0};function _m(e,t,n=!1){let i=t.seen.get(e);if(t.override){let r=t.override?.(e,t,i,n);if(r!==yX)return r}if(i&&!n){let e=_h(i,t);if(void 0!==e)return e}let a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);let s=((e,t,n)=>{switch(t){case r.ZodString:return _a(e,n);case r.ZodNumber:let i={type:"number"};if(!e.checks)return i;for(let t of e.checks)switch(t.kind){case"int":i.type="integer",yY(i,"type",t.message,n);break;case"min":"jsonSchema7"===n.target?t.inclusive?yQ(i,"minimum",t.value,t.message,n):yQ(i,"exclusiveMinimum",t.value,t.message,n):(t.inclusive||(i.exclusiveMinimum=!0),yQ(i,"minimum",t.value,t.message,n));break;case"max":"jsonSchema7"===n.target?t.inclusive?yQ(i,"maximum",t.value,t.message,n):yQ(i,"exclusiveMaximum",t.value,t.message,n):(t.inclusive||(i.exclusiveMaximum=!0),yQ(i,"maximum",t.value,t.message,n));break;case"multipleOf":yQ(i,"multipleOf",t.value,t.message,n)}return i;case r.ZodObject:return function(e,t){let r="openAi"===t.target,n={type:"object",properties:{}},i=[],a=e.shape();for(let e in a){let s=a[e];if(void 0===s||void 0===s._def)continue;let o=function(e){try{return e.isOptional()}catch{return!0}}(s);o&&r&&("ZodOptional"===s._def.typeName&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),o=!1);let l=_m(s._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==l&&(n.properties[e]=l,o||i.push(e))}i.length&&(n.required=i);let s=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return _m(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==s&&(n.additionalProperties=s),n}(e,n);case r.ZodBigInt:let a={type:"integer",format:"int64"};if(!e.checks)return a;for(let t of e.checks)switch(t.kind){case"min":"jsonSchema7"===n.target?t.inclusive?yQ(a,"minimum",t.value,t.message,n):yQ(a,"exclusiveMinimum",t.value,t.message,n):(t.inclusive||(a.exclusiveMinimum=!0),yQ(a,"minimum",t.value,t.message,n));break;case"max":"jsonSchema7"===n.target?t.inclusive?yQ(a,"maximum",t.value,t.message,n):yQ(a,"exclusiveMaximum",t.value,t.message,n):(t.inclusive||(a.exclusiveMaximum=!0),yQ(a,"maximum",t.value,t.message,n));break;case"multipleOf":yQ(a,"multipleOf",t.value,t.message,n)}return a;case r.ZodBoolean:return{type:"boolean"};case r.ZodDate:return function e(t,r,n){let i=n??r.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,i)=>e(t,r,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":var a=t,s=r;let o={type:"integer",format:"unix-time"};if("openApi3"===s.target)return o;for(let e of a.checks)switch(e.kind){case"min":yQ(o,"minimum",e.value,e.message,s);break;case"max":yQ(o,"maximum",e.value,e.message,s)}return o}}(e,n);case r.ZodUndefined:return{not:y1(n)};case r.ZodNull:return"openApi3"===n.target?{enum:["null"],nullable:!0}:{type:"null"};case r.ZodArray:let s;return s={type:"array"},e.type?._def&&e.type?._def?.typeName!==r.ZodAny&&(s.items=_m(e.type._def,{...n,currentPath:[...n.currentPath,"items"]})),e.minLength&&yQ(s,"minItems",e.minLength.value,e.minLength.message,n),e.maxLength&&yQ(s,"maxItems",e.maxLength.value,e.maxLength.message,n),e.exactLength&&(yQ(s,"minItems",e.exactLength.value,e.exactLength.message,n),yQ(s,"maxItems",e.exactLength.value,e.exactLength.message,n)),s;case r.ZodUnion:case r.ZodDiscriminatedUnion:if("openApi3"===n.target)return _f(e,n);let o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every(e=>e._def.typeName in _p&&(!e._def.checks||!e._def.checks.length))){let e=o.reduce((e,t)=>{let r=_p[t._def.typeName];return r&&!e.includes(r)?[...e,r]:e},[]);return{type:e.length>1?e:e[0]}}if(o.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){let e=o.reduce((e,t)=>{let r=typeof t._def.value;switch(r){case"string":case"number":case"boolean":return[...e,r];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===o.length){let t=e.filter((e,t,r)=>r.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:o.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(o.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:o.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return _f(e,n);case r.ZodIntersection:let l,u,d;return l=[_m(e.left._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),_m(e.right._def,{...n,currentPath:[...n.currentPath,"allOf","1"]})].filter(e=>!!e),u="jsonSchema2019-09"===n.target?{unevaluatedProperties:!1}:void 0,d=[],l.forEach(e=>{if((!("type"in e)||"string"!==e.type)&&"allOf"in e)d.push(...e.allOf),void 0===e.unevaluatedProperties&&(u=void 0);else{let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){let{additionalProperties:r,...n}=e;t=n}else u=void 0;d.push(t)}}),d.length?{allOf:d,...u}:void 0;case r.ZodTuple:return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,t)=>_m(e._def,{...n,currentPath:[...n.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:_m(e.rest._def,{...n,currentPath:[...n.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,t)=>_m(e._def,{...n,currentPath:[...n.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])};case r.ZodRecord:return _c(e,n);case r.ZodLiteral:let c;return"bigint"!=(c=typeof e.value)&&"number"!==c&&"boolean"!==c&&"string"!==c?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===n.target?{type:"bigint"===c?"integer":c,enum:[e.value]}:{type:"bigint"===c?"integer":c,const:e.value};case r.ZodEnum:return{type:"string",enum:Array.from(e.values)};case r.ZodNativeEnum:let p,f,m;return p=e.values,{type:1===(m=Array.from(new Set((f=Object.keys(e.values).filter(e=>"number"!=typeof p[p[e]]).map(e=>p[e])).map(e=>typeof e)))).length?"string"===m[0]?"string":"number":["string","number"],enum:f};case r.ZodNullable:if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===n.target?{type:_p[e.innerType._def.typeName],nullable:!0}:{type:[_p[e.innerType._def.typeName],"null"]};if("openApi3"===n.target){let t=_m(e.innerType._def,{...n,currentPath:[...n.currentPath]});return t&&"$ref"in t?{allOf:[t],nullable:!0}:t&&{...t,nullable:!0}}let h=_m(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","0"]});return h&&{anyOf:[h,{type:"null"}]};case r.ZodOptional:if(n.currentPath.toString()===n.propertyPath?.toString())return _m(e.innerType._def,n);let g=_m(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","1"]});return g?{anyOf:[{not:y1(n)},g]}:y1(n);case r.ZodMap:return"record"===n.mapStrategy?_c(e,n):{type:"array",maxItems:125,items:{type:"array",items:[_m(e.keyType._def,{...n,currentPath:[...n.currentPath,"items","items","0"]})||y1(n),_m(e.valueType._def,{...n,currentPath:[...n.currentPath,"items","items","1"]})||y1(n)],minItems:2,maxItems:2}};case r.ZodSet:let v;return v={type:"array",uniqueItems:!0,items:_m(e.valueType._def,{...n,currentPath:[...n.currentPath,"items"]})},e.minSize&&yQ(v,"minItems",e.minSize.value,e.minSize.message,n),e.maxSize&&yQ(v,"maxItems",e.maxSize.value,e.maxSize.message,n),v;case r.ZodLazy:return()=>e.getter()._def;case r.ZodPromise:return _m(e.type._def,n);case r.ZodNaN:case r.ZodNever:return"openAi"===n.target?void 0:{not:y1({...n,currentPath:[...n.currentPath,"not"]})};case r.ZodEffects:return"input"===n.effectStrategy?_m(e.schema._def,n):y1(n);case r.ZodAny:case r.ZodUnknown:return y1(n);case r.ZodDefault:return{..._m(e.innerType._def,n),default:e.defaultValue()};case r.ZodBranded:return y4(e,n);case r.ZodReadonly:case r.ZodCatch:return _m(e.innerType._def,n);case r.ZodPipeline:if("input"===n.pipeStrategy)return _m(e.in._def,n);if("output"===n.pipeStrategy)return _m(e.out._def,n);let y=_m(e.in._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),_=_m(e.out._def,{...n,currentPath:[...n.currentPath,"allOf",y?"1":"0"]});return{allOf:[y,_].filter(e=>void 0!==e)};case r.ZodFunction:case r.ZodVoid:case r.ZodSymbol:default:return}})(e,e.typeName,t),o="function"==typeof s?_m(s(),t):s;if(o&&_g(e,t,o),t.postProcess){let r=t.postProcess(o,e,t);return a.jsonSchema=o,r}return a.jsonSchema=o,o}var _h=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:y0(t.currentPath,e.path)};case"none":case"seen":if(e.path.length<t.currentPath.length&&e.path.every((e,r)=>t.currentPath[r]===e))return console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),y1(t);return"seen"===t.$refStrategy?y1(t):void 0}},_g=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription)&&(r.markdownDescription=e.description),r);E(tA(),1),E(tD(),1),Symbol.for("mcp.completable"),(o||(o={})).Completable="McpCompletable";a=()=>f3.object({session_id:f3.string(),ws_url:f3.string(),work_dir:f3.string().optional(),session_key:f3.string().optional()}),()=>t??=a();async function _v(e,t){try{await (0,c.copyFile)(e,t)}catch(e){if(!ay(e))throw e}}async function _y(e,t){if(!e)return;let r=e;try{let t=aY(e);t?.claudeAiOauth?.refreshToken&&(delete t.claudeAiOauth.refreshToken,r=aX(t))}catch{}await (0,c.writeFile)(t,r,{mode:384})}async function __(e,t,r,n,i=6e4){if(!st(t))return;let a=su((0,m.resolve)(r??".")),s=await tZ(e.load({projectKey:a,sessionId:t}),i,`SessionStore.load() timed out after ${i}ms for session ${t}`);if(!s||0===s.length)return;let o=(0,m.join)((0,f.tmpdir)(),`claude-resume-${(0,u.randomUUID)()}`);try{let r,p=(0,m.join)(o,"projects",a);await (0,c.mkdir)(p,{recursive:!0});let h=(0,m.join)(p,`${t}.jsonl`);await sa(h,s);let g=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,v=g??(0,m.join)((0,f.homedir)(),".claude"),y;try{y=await (0,c.readFile)((0,m.join)(v,".credentials.json"),"utf-8")}catch(e){if(!ay(e))throw e}if(g||(n??process.env).ANTHROPIC_API_KEY||(n??process.env).CLAUDE_CODE_OAUTH_TOKEN||(y=await (r=function(e=""){let t=r_(),r=process.env.CLAUDE_CONFIG_DIR?`-${(0,u.createHash)("sha256").update(t).digest("hex").substring(0,8)}`:"";return`Claude Code${function(){let e=sZ,t=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(t){let r=t.replace(/\/$/,"");if(!sF.includes(r))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");e={...e,BASE_API_URL:r,CONSOLE_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_ORIGIN:r,TOKEN_URL:`${r}/v1/oauth/token`,API_KEY_URL:`${r}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${r}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${r}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let r=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;return r&&(e={...e,CLIENT_ID:r}),e}().OAUTH_FILE_SUFFIX}${e}${r}`}("-credentials"),new Promise(e=>{(0,l.execFile)("security",["find-generic-password","-a",function(){try{return process.env.USER||(0,f.userInfo)().username}catch{return"claude-code-user"}}(),"-w","-s",r],{encoding:"utf-8",timeout:5e3},(t,r)=>e(t?void 0:r.trim()||void 0))}))??y),await _y(y,(0,m.join)(o,".credentials.json")),await _v((0,m.join)(g??(0,f.homedir)(),".claude.json"),(0,m.join)(o,".claude.json")),e.listSubkeys){let r=(0,m.join)(p,t);for(let n of(await tZ(e.listSubkeys({projectKey:a,sessionId:t}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${t}`))){let s=(0,m.resolve)(r,n+".jsonl");if(!n||(0,m.isAbsolute)(n)||n.split(/[\\/]/).includes("..")||!s.startsWith(r+m.sep)){aB(`[SessionStore] skipping unsafe subpath from listSubkeys: ${n}`,{level:"warn"});continue}let o=await tZ(e.load({projectKey:a,sessionId:t,subpath:n}),i,`SessionStore.load() timed out after ${i}ms for session ${t} subpath ${n}`);if(!o||0===o.length)continue;let l=[],u=[];for(let e of o){var d;(d=e,"object"==typeof d&&null!==d&&"type"in d&&"agent_metadata"===d.type)?l.push(e):u.push(e)}if(u.length>0&&(await (0,c.mkdir)((0,m.dirname)(s),{recursive:!0}),await sa(s,u)),l.length>0){let e=l.at(-1),t=(0,m.resolve)(r,n+".meta.json");await (0,c.mkdir)((0,m.dirname)(t),{recursive:!0});let{type:i,...a}=e;await (0,c.writeFile)(t,aX(a),{mode:384})}}}return o}catch(e){throw await _k(o),e}}function _b(e,t,r,n){let i,{systemPrompt:a,settings:s,settingSources:o,sandbox:l,...u}=e??{},d,c,h;void 0===a?d="":"string"==typeof a||Array.isArray(a)?d=a:"preset"===a.type&&(c=a.append,h=a.excludeDynamicSections);let v=u.pathToClaudeCodeExecutable;if(!v){let e=(0,g.fileURLToPath)(b.url),t=(0,p.createRequire)(e),r=function(e,t=process.platform,r=process.arch){let n="win32"===t?".exe":"";for(let i of("linux"===t?[`@anthropic-ai/claude-agent-sdk-linux-${r}-musl`,`@anthropic-ai/claude-agent-sdk-linux-${r}`]:[`@anthropic-ai/claude-agent-sdk-${t}-${r}`]).map(e=>`${e}/claude${n}`))try{return e(i)}catch{}return null}(e=>t.resolve(e));if(r)v=r;else try{v=t.resolve("./cli.js")}catch{throw Error(`Native CLI binary for ${process.platform}-${process.arch} not found. Reinstall @anthropic-ai/claude-agent-sdk without --omit=optional, or set options.pathToClaudeCodeExecutable.`)}}process.env.CLAUDE_AGENT_SDK_VERSION="0.2.114";let{abortController:y=tM(),additionalDirectories:_=[],agent:$,agents:w,allowedTools:k=[],betas:x,canUseTool:S,continue:I,cwd:P,debug:O,debugFile:E,disallowedTools:j=[],tools:N,env:T,executable:C=tq()?"bun":"node",executableArgs:z=[],extraArgs:A={},fallbackModel:R,enableFileCheckpointing:U,toolConfig:D,forkSession:M,hooks:L,includeHookEvents:Z,includePartialMessages:F,onElicitation:q,persistSession:V,sessionStore:B,thinking:W,effort:K,maxThinkingTokens:G,maxTurns:J,maxBudgetUsd:H,taskBudget:X,mcpServers:Y,model:Q,outputFormat:ee,permissionMode:et="default",allowDangerouslySkipPermissions:er=!1,permissionPromptToolName:en,plugins:ei,getOAuthToken:ea,workload:es,resume:eo,resumeSessionAt:el,sessionId:eu,stderr:ed,strictMcpConfig:ec}=u;if(B&&!1===V)throw Error("sessionStore cannot be used with persistSession: false -- the storage adapter requires local writes to mirror from. Use CLAUDE_CONFIG_DIR=/tmp for ephemeral local writes with external mirroring.");if(B&&I&&!eo&&!B.listSessions)throw Error("Options.continue with sessionStore requires store.listSessions to be implemented");if(B&&U)throw Error("enableFileCheckpointing is not yet supported with sessionStore (backup blobs are not mirrored, so rewindFiles() fails after a store-backed resume).");B&&u.spawnClaudeCodeProcess&&aB("sessionStore with custom spawnClaudeCodeProcess: ensure the subprocess CLAUDE_CONFIG_DIR matches the parent (same path, same separators) or transcript_mirror frames will be dropped.",{level:"warn"});let ep=ee?.type==="json_schema"?ee.schema:void 0,ef=T?{...T}:{...process.env};ef.CLAUDE_CODE_ENTRYPOINT||(ef.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),U&&(ef.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),ea&&(ef.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),D?.askUserQuestion?.previewFormat&&(ef.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=D.askUserQuestion.previewFormat);let em={};if(a3.propagation.inject(a3.context.active(),em),"traceparent"in em)for(let e of["TRACEPARENT","TRACESTATE"])e in(T??{})||delete ef[e];for(let[e,t]of Object.entries(em)){let r=e.toUpperCase();r in(T??{})||(ef[r]=t)}let eh={},eg=new Map;if(Y)for(let[e,t]of Object.entries(Y))"sdk"===t.type&&t.instance?eg.set(e,t.instance):eh[e]=t;if(W)switch(W.type){case"adaptive":i={type:"adaptive",display:W.display};break;case"enabled":i={type:"enabled",budgetTokens:W.budgetTokens,display:W.display};break;case"disabled":i={type:"disabled"}}else void 0!==G&&(i=0===G?{type:"disabled"}:{type:"enabled",budgetTokens:G});r&&(ef.CLAUDE_CONFIG_DIR=r);let ev=new a4({abortController:y,additionalDirectories:_,agent:$,betas:x,cwd:P,debug:O,debugFile:E,executable:C,executableArgs:z,extraArgs:es?{...A,workload:es}:A,pathToClaudeCodeExecutable:v,env:ef,forkSession:M,stderr:ed,thinkingConfig:i,effort:K,maxTurns:J,maxBudgetUsd:H,taskBudget:X,model:Q,fallbackModel:R,jsonSchema:ep,permissionMode:et,allowDangerouslySkipPermissions:er,permissionPromptToolName:en,continueConversation:B?void 0:I,resume:eo,resumeSessionAt:el,sessionId:eu,settings:"object"==typeof s?aX(s):s,settingSources:o,allowedTools:k,disallowedTools:j,tools:N,mcpServers:eh,strictMcpConfig:ec,canUseTool:!!S,hooks:!!L,includeHookEvents:Z,includePartialMessages:F,persistSession:V,sessionMirror:!!B,plugins:ei,sandbox:l,spawnClaudeCodeProcess:u.spawnClaudeCodeProcess,deferSpawn:n}),ey=new a9(ev,t,S,L,y,eg,ep,{systemPrompt:d,appendSystemPrompt:c,appendSubagentSystemPrompt:u.appendSubagentSystemPrompt,excludeDynamicSections:h,agents:w,title:u.title,promptSuggestions:u.promptSuggestions,agentProgressSummaries:u.agentProgressSummaries},q,ea);if(B){let e=()=>(0,m.join)(ef.CLAUDE_CONFIG_DIR??(0,m.join)((0,f.homedir)(),".claude"),"projects"),t=new a5(async(t,r)=>{let n=_C(t,e());n?await B.append(n,r):aB(`[SessionStore] dropping mirror frame: filePath ${t} is not under ${e()} -- subprocess CLAUDE_CONFIG_DIR likely differs from parent (custom spawnClaudeCodeProcess / container?)`,{level:"warn"})},void 0,(t,r)=>{let n=_C(t,e());n&&ey.reportMirrorError(n,r.message)});ey.setTranscriptMirrorBatcher(t)}return{queryInstance:ey,transport:ev,abortController:y,processEnv:ef}}function _$(e,t,r,n){"string"==typeof r?t.write(aX({type:"user",session_id:"",message:{role:"user",content:[{type:"text",text:r}]},parent_tool_use_id:null})+`
|
|
88
|
+
`):e.streamInput(r).catch(e=>n.abort(e))}var _w=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"]);async function _k(e){for(let t=0;;t++)try{return await (0,c.rm)(e,{recursive:!0,force:!0})}catch(e){if(t>=4||!_w.has(av(e)??""))return;await function(e){return new Promise((t,r)=>{let n=setTimeout((e,t,r)=>{e?.removeEventListener("abort",t),r()},e,void 0,i,t);function i(){clearTimeout(n),t()}})}((t+1)*100)}}async function _x(e,t){return t?.sessionStore?_N(t.sessionStore,e,t):sS(e,t)}async function _S(e){return e?.sessionStore?_E(e.sessionStore,e):sz(e)}async function _I(e,t,r){return r?.sessionStore?_T(r.sessionStore,e,t,r.dir):sA(e,t,r)}async function _P(e,t){if(!st(e))throw Error(`Invalid sessionId: ${e}`);if(t?.sessionStore){if(!t.sessionStore.delete)return;let r=_O(t.dir);await t.sessionStore.delete({projectKey:r,sessionId:e});return}return sR(e,t)}function _O(e){return su((0,m.resolve)(e??"."))}async function _E(e,t){if(!e.listSessions)throw Error("sessionStore.listSessions is not implemented -- cannot list sessions. Provide a store with a listSessions() method.");let r=_O(t.dir),n=await e.listSessions(r),i=t.offset??0,a=t.limit,s=n.slice().sort((e,t)=>t.mtime-e.mtime),o;return o=void 0!==a&&a>0?s.slice(i,i+a):i>0?s.slice(i):s,(await Promise.allSettled(o.map(async r=>{var n,i;let a,s,o,l,u=await _j(e,r.sessionId,t.dir);if(!u)return null;let d=sI(r.sessionId,(n=u,i=r.mtime,s=(a=Buffer.from(n,"utf-8")).length,o=a.subarray(0,65536).toString("utf-8"),l=s>65536?a.subarray(s-65536).toString("utf-8"):o,{mtime:i,size:s,head:o,tail:l}));return d?{...d,lastModified:r.mtime}:null}))).flatMap((e,t)=>{let r=o[t];return"fulfilled"===e.status?e.value?[e.value]:[]:[{sessionId:r.sessionId,summary:"",lastModified:r.mtime}]})}async function _j(e,t,r){let n=_O(r),i=await e.load({projectKey:n,sessionId:t});return i&&0!==i.length?i.map(e=>aX(e)).join(`
|
|
89
|
+
`)+`
|
|
90
|
+
`:null}async function _N(e,t,r){if(!st(t))return[];let n=_O(r.dir),i=await e.load({projectKey:n,sessionId:t});if(!i||0===i.length)return[];var a={limit:r.limit,offset:r.offset,includeSystemMessages:r.includeSystemMessages};let s=[];for(let e of i){if("object"!=typeof e||null===e)continue;let t=e.type;("user"===t||"assistant"===t||"progress"===t||"system"===t||"attachment"===t)&&"string"==typeof e.uuid&&s.push(e)}return sx(s,a)}async function _T(e,t,r,n){if(!st(t))throw Error(`Invalid sessionId: ${t}`);if(!r.trim())throw Error("title must be non-empty");let i=_O(n);await e.append({projectKey:i,sessionId:t},[{type:"custom-title",customTitle:r.trim(),sessionId:t,uuid:(0,u.randomUUID)(),timestamp:new Date().toISOString()}])}function _C(e,t){let r=(0,m.relative)(t,e);if(r.startsWith("..")||(0,m.isAbsolute)(r))return null;let n=r.split(m.sep);if(n.length<2)return null;let i=n[0],a=n[1];if(2===n.length&&a.endsWith(".jsonl"))return{projectKey:i,sessionId:a.replace(/\.jsonl$/,"")};if(n.length>=4){let e=n.slice(2),t=e.length-1;return e[t]=e.at(-1).replace(/\.jsonl$/,""),{projectKey:i,sessionId:a,subpath:e.join("/")}}return null}e.s(["deleteSession",0,_P,"getSessionMessages",0,_x,"listSessions",0,_S,"query",0,function({prompt:e,options:t}){if((t?.resume||t?.continue)&&t?.sessionStore){let{queryInstance:r,transport:n,abortController:i,processEnv:a}=_b({...t},"string"==typeof e,void 0,!0),s=(0,m.resolve)(t.cwd??"."),o=t.sessionStore,l=t.loadTimeoutMs??6e4,u=t.resume;return(async()=>{if(u||(u=(await tZ(o.listSessions(su(s)),l,`SessionStore.listSessions() timed out after ${l}ms`)).slice().sort((e,t)=>t.mtime-e.mtime)[0]?.sessionId),u)return __(o,u,s,t.env,t.loadTimeoutMs)})().then(e=>{e&&(n.updateResume(u),n.updateEnv({CLAUDE_CONFIG_DIR:e}),a.CLAUDE_CONFIG_DIR=e,r.addCleanupCallback(()=>{n.waitForExit().catch(()=>{}).finally(()=>_k(e))})),r.isClosed()||n.spawn()}).catch(e=>{let t=ah(e);n.spawnAbort(t),r.setError(t)}),_$(r,n,e,i),r}let{queryInstance:r,transport:n,abortController:i}=_b(t,"string"==typeof e);return _$(r,n,e,i),r},"renameSession",0,_I])}];
|
|
84
91
|
|
|
85
92
|
//# sourceMappingURL=07-d_%40anthropic-ai_claude-agent-sdk_sdk_mjs_0.721uk._.js.map
|