@nanoforge-dev/editor 0.0.2-beta.8c768e4 → 0.0.2-beta.d1c5eea
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/_app/immutable/assets/0.Chsihp2s.css +1 -0
- package/dist/client/_app/immutable/assets/0.Chsihp2s.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.Chsihp2s.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/BAmaB5-w.js +6 -0
- package/dist/client/_app/immutable/chunks/BAmaB5-w.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BAmaB5-w.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BpsTeBMk2.js → BFWbalF82.js} +1 -1
- package/dist/client/_app/immutable/chunks/BFWbalF82.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BFWbalF82.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BJ5-01Xz.js +1 -0
- package/dist/client/_app/immutable/chunks/BJ5-01Xz.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BJ5-01Xz.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{D8HnIxQ42.js → BLf9jss52.js} +1 -1
- package/dist/client/_app/immutable/chunks/BLf9jss52.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BLf9jss52.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BNmi28p2.js → BQ4F9eo1.js} +1 -1
- package/dist/client/_app/immutable/chunks/BQ4F9eo1.js.br +2 -0
- package/dist/client/_app/immutable/chunks/BQ4F9eo1.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BQs6hrRa.js +293 -0
- package/dist/client/_app/immutable/chunks/BQs6hrRa.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BQs6hrRa.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{Wjj5hwVF2.js → BSNB_Uck2.js} +2 -2
- package/dist/client/_app/immutable/chunks/BSNB_Uck2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BSNB_Uck2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{56adh18U.js → BWNegMLP.js} +1 -1
- package/dist/client/_app/immutable/chunks/BWNegMLP.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BWNegMLP.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DJq0R92X.js → BesjqVrk.js} +1 -1
- package/dist/client/_app/immutable/chunks/BesjqVrk.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BesjqVrk.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{NRUHq-_72.js → Bhafduqk2.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bhafduqk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bhafduqk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{Drjp27p72.js → CJxKUjL-2.js} +1 -1
- package/dist/client/_app/immutable/chunks/CJxKUjL-2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CJxKUjL-2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{VTYQK3v_2.js → CVQMNY_q2.js} +2 -2
- package/dist/client/_app/immutable/chunks/CVQMNY_q2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CVQMNY_q2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CwcsJxhS2.js → CbW3yNTi.js} +1 -1
- package/dist/client/_app/immutable/chunks/CbW3yNTi.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CbW3yNTi.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CvkNa2t_.js +3 -0
- package/dist/client/_app/immutable/chunks/CvkNa2t_.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CvkNa2t_.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/D2HMiRG4.js +1 -0
- package/dist/client/_app/immutable/chunks/D2HMiRG4.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D2HMiRG4.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CuyfOZTk2.js → D2PipAw82.js} +1 -1
- package/dist/client/_app/immutable/chunks/D2PipAw82.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D2PipAw82.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CHHvlOt72.js → D6-zOYYZ2.js} +1 -1
- package/dist/client/_app/immutable/chunks/D6-zOYYZ2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D6-zOYYZ2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{B5BlQANa2.js → DGDm8Q4w2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DGDm8Q4w2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DGDm8Q4w2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{Bfd-bGrZ2.js → DRQF0pcw2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DRQF0pcw2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DRQF0pcw2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{B41NCdmk2.js → DYPPS7OK2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DYPPS7OK2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DYPPS7OK2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{YpKUr6uE2.js → DaisyxdZ2.js} +1 -1
- package/dist/client/_app/immutable/chunks/DaisyxdZ2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DaisyxdZ2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{D8Kk1mwW.js → DtcTX-YU.js} +1 -1
- package/dist/client/_app/immutable/chunks/DtcTX-YU.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DtcTX-YU.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DbZ0P7x6.js → DuZNgOMp.js} +1 -1
- package/dist/client/_app/immutable/chunks/DuZNgOMp.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DuZNgOMp.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CNh34b3X2.js → M5EMNuDS2.js} +1 -1
- package/dist/client/_app/immutable/chunks/M5EMNuDS2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/M5EMNuDS2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{Cx3ix-dL2.js → SmrQhi1p2.js} +1 -1
- package/dist/client/_app/immutable/chunks/SmrQhi1p2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/SmrQhi1p2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{D5kSEVHd2.js → TFu7Wn2c2.js} +1 -1
- package/dist/client/_app/immutable/chunks/TFu7Wn2c2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/TFu7Wn2c2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DRG11iPc2.js → mESnenQM2.js} +1 -1
- package/dist/client/_app/immutable/chunks/mESnenQM2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/mESnenQM2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/nE3VUeYj.js +0 -0
- package/dist/client/_app/immutable/chunks/nE3VUeYj.js.br +1 -0
- package/dist/client/_app/immutable/chunks/nE3VUeYj.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CN98h0cI2.js → uIj7mV9x2.js} +1 -1
- package/dist/client/_app/immutable/chunks/uIj7mV9x2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/uIj7mV9x2.js.gz +0 -0
- package/dist/client/_app/immutable/entry/{app.CiLM39cw.js → app.CmKp5Z74.js} +2 -2
- package/dist/client/_app/immutable/entry/app.CmKp5Z74.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.CmKp5Z74.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.D78MUtxi.js +1 -0
- package/dist/client/_app/immutable/entry/start.D78MUtxi.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.D78MUtxi.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{0.CEpgzEwS.js → 0.DG-EQJuO.js} +1 -1
- package/dist/client/_app/immutable/nodes/0.DG-EQJuO.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.DG-EQJuO.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{1.Sm4J_hJ5.js → 1.3zpJchco.js} +1 -1
- package/dist/client/_app/immutable/nodes/1.3zpJchco.js.br +0 -0
- package/dist/client/_app/immutable/nodes/1.3zpJchco.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{9.C7P5VSNI.js → 11.B2wyJh5I.js} +1 -1
- package/dist/client/_app/immutable/nodes/11.B2wyJh5I.js.br +0 -0
- package/dist/client/_app/immutable/nodes/11.B2wyJh5I.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.CW0zjRC8.js +1 -0
- package/dist/client/_app/immutable/nodes/2.CW0zjRC8.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.CW0zjRC8.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.gzy1bOy3.js +6 -0
- package/dist/client/_app/immutable/nodes/3.gzy1bOy3.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.gzy1bOy3.js.gz +0 -0
- package/dist/client/_app/version.json +1 -1
- package/dist/client/_app/version.json.br +0 -0
- package/dist/client/_app/version.json.gz +0 -0
- package/dist/server/chunks/{0-BgMtbrE9.js → 0-CdkGZW74.js} +6 -6
- package/dist/server/chunks/{0-BgMtbrE9.js.map → 0-CdkGZW74.js.map} +1 -1
- package/dist/server/chunks/{1-JuWV7qB2.js → 1-Bu7UAZ5T.js} +6 -6
- package/dist/server/chunks/{1-JuWV7qB2.js.map → 1-Bu7UAZ5T.js.map} +1 -1
- package/dist/server/chunks/{5-DVrv6Zto.js → 10-_cwipoJm.js} +13 -5
- package/dist/server/chunks/10-_cwipoJm.js.map +1 -0
- package/dist/server/chunks/11-Dx5w0MJO.js +22 -0
- package/dist/server/chunks/11-Dx5w0MJO.js.map +1 -0
- package/dist/server/chunks/{2-Dkn4MH5F.js → 2-5F9qcDLt.js} +10 -10
- package/dist/server/chunks/{2-Dkn4MH5F.js.map → 2-5F9qcDLt.js.map} +1 -1
- package/dist/server/chunks/3-Cql-Dmp2.js +22 -0
- package/dist/server/chunks/3-Cql-Dmp2.js.map +1 -0
- package/dist/server/chunks/{3-CcIZ_M60.js → 4-B2tSZCU9.js} +117 -6
- package/dist/server/chunks/4-B2tSZCU9.js.map +1 -0
- package/dist/server/chunks/{8-CRPOubhA.js → 5-D3-J9iUP.js} +13 -5
- package/dist/server/chunks/5-D3-J9iUP.js.map +1 -0
- package/dist/server/chunks/{4-DyArZX6h.js → 6-DDoqG8iB.js} +13 -5
- package/dist/server/chunks/6-DDoqG8iB.js.map +1 -0
- package/dist/server/chunks/7-CjZUt-gt.js +18 -0
- package/dist/server/chunks/7-CjZUt-gt.js.map +1 -0
- package/dist/server/chunks/8-ZgtdnItY.js +91 -0
- package/dist/server/chunks/8-ZgtdnItY.js.map +1 -0
- package/dist/server/chunks/{7-CuJ7XfzT.js → 9-6rlPfdHX.js} +5 -5
- package/dist/server/chunks/{7-CuJ7XfzT.js.map → 9-6rlPfdHX.js.map} +1 -1
- package/dist/server/chunks/{_layout.svelte-CP4jFwsK.js → _layout.svelte-By6MJeec.js} +6 -6
- package/dist/server/chunks/_layout.svelte-By6MJeec.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-7KJNFri5.js → _page.svelte-COg8WlkX.js} +6 -6
- package/dist/server/chunks/_page.svelte-COg8WlkX.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-B3Zfq6_t.js → _page.svelte-Dne41AAE.js} +433 -126
- package/dist/server/chunks/_page.svelte-Dne41AAE.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-BQLzgYrr.js → _page.svelte-E1XZx_gJ.js} +7 -7
- package/dist/server/chunks/_page.svelte-E1XZx_gJ.js.map +1 -0
- package/dist/server/chunks/{_server.ts-BYvWhjnh.js → _server.ts-BwyH-SDr.js} +2 -2
- package/dist/server/chunks/{_server.ts-BYvWhjnh.js.map → _server.ts-BwyH-SDr.js.map} +1 -1
- package/dist/server/chunks/_server.ts-DJwl8--i.js +47 -0
- package/dist/server/chunks/_server.ts-DJwl8--i.js.map +1 -0
- package/dist/server/chunks/_server.ts-kFT5a-9I.js +13 -0
- package/dist/server/chunks/_server.ts-kFT5a-9I.js.map +1 -0
- package/dist/server/chunks/app-DUeJj5RD.js.map +1 -1
- package/dist/server/chunks/chunk-ByNZkrT6.js.map +1 -1
- package/dist/server/chunks/{client-BvtIF74Y.js → client-jrv3ueos.js} +4 -4
- package/dist/server/chunks/client-jrv3ueos.js.map +1 -0
- package/dist/server/chunks/decorate-CQ_JIwqD.js +11 -0
- package/dist/server/chunks/decorate-CQ_JIwqD.js.map +1 -0
- package/dist/server/chunks/{error-D23CGeyL.js → error-Cu-XIb00.js} +406 -191
- package/dist/server/chunks/error-Cu-XIb00.js.map +1 -0
- package/dist/server/chunks/{error.svelte-DZuW0iDP.js → error.svelte-BB7sWwXo.js} +3 -3
- package/dist/server/chunks/error.svelte-BB7sWwXo.js.map +1 -0
- package/dist/server/chunks/{exports-8wSs4fiF.js → exports-D0uQzbjy.js} +4 -4
- package/dist/server/chunks/{exports-8wSs4fiF.js.map → exports-D0uQzbjy.js.map} +1 -1
- package/dist/server/chunks/format-DGOlJxF5.js.map +1 -1
- package/dist/server/chunks/{hooks.server-Dox7llar.js → hooks.server-BTZM3Han.js} +6 -6
- package/dist/server/chunks/hooks.server-BTZM3Han.js.map +1 -0
- package/dist/server/chunks/{hooks.universal-DhGFdBkK.js → hooks.universal-bt2XJEN9.js} +2 -2
- package/dist/server/chunks/{hooks.universal-DhGFdBkK.js.map → hooks.universal-bt2XJEN9.js.map} +1 -1
- package/dist/server/chunks/{events-DeYJGjCt.js → index-server-BthNUqCR.js} +2640 -2635
- package/dist/server/chunks/index-server-BthNUqCR.js.map +1 -0
- package/dist/server/chunks/{internal-eM0YTBgj.js → internal-vr3mPczx.js} +2 -2
- package/dist/server/chunks/{internal-eM0YTBgj.js.map → internal-vr3mPczx.js.map} +1 -1
- package/dist/server/chunks/{internal-B77zebhK.js → internal2-BiukHRFA.js} +24 -17
- package/dist/server/chunks/internal2-BiukHRFA.js.map +1 -0
- package/dist/server/chunks/{loader-circle-zqx69BdD.js → loader-circle-C4T0os4K.js} +5 -5
- package/dist/server/chunks/loader-circle-C4T0os4K.js.map +1 -0
- package/dist/server/chunks/{logo-BfI7zmyL.js → logo-dxZl1N-5.js} +4 -4
- package/dist/server/chunks/logo-dxZl1N-5.js.map +1 -0
- package/dist/server/chunks/{project-loader-BkV0zjlj.js → project-loader-D46R4y2F.js} +4 -4
- package/dist/server/chunks/project-loader-D46R4y2F.js.map +1 -0
- package/dist/server/chunks/{request-handler-D-qbwxhh.js → request-handler-DTxrh7_f.js} +191 -117
- package/dist/server/chunks/request-handler-DTxrh7_f.js.map +1 -0
- package/dist/server/chunks/{runtime-CDHWD9vo.js → runtime-26c7QsEi.js} +9 -9
- package/dist/server/chunks/runtime-26c7QsEi.js.map +1 -0
- package/dist/server/chunks/{schemas-ENQuLVBq.js → schemas-nwfCECau.js} +490 -405
- package/dist/server/chunks/schemas-nwfCECau.js.map +1 -0
- package/dist/server/chunks/{session-CmQRz9-0.js → session-By0bbFhg.js} +2 -2
- package/dist/server/chunks/{session-CmQRz9-0.js.map → session-By0bbFhg.js.map} +1 -1
- package/dist/server/chunks/shared-server-Cha0Qlv9.js.map +1 -1
- package/dist/server/chunks/{state-q9lwVQK2.js → state-CviNrLh6.js} +3 -3
- package/dist/server/chunks/state-CviNrLh6.js.map +1 -0
- package/dist/server/index.js +374 -357
- package/dist/server/index.js.map +1 -1
- package/dist/server/manifest.js +55 -31
- package/dist/server/manifest.js.map +1 -1
- package/package.json +22 -18
- package/dist/client/_app/immutable/assets/0.CI0wrjoW.css +0 -1
- package/dist/client/_app/immutable/assets/0.CI0wrjoW.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.CI0wrjoW.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/56adh18U.js.br +0 -0
- package/dist/client/_app/immutable/chunks/56adh18U.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/9tBtThMc.js +0 -1
- package/dist/client/_app/immutable/chunks/9tBtThMc.js.br +0 -0
- package/dist/client/_app/immutable/chunks/9tBtThMc.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/B41NCdmk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/B41NCdmk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/B5BlQANa2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/B5BlQANa2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BNmi28p2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BNmi28p2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Bfd-bGrZ2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bfd-bGrZ2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BpsTeBMk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BpsTeBMk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CHHvlOt72.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CHHvlOt72.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CN98h0cI2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CN98h0cI2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CNh34b3X2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CNh34b3X2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CsVJKLJK.js +0 -1
- package/dist/client/_app/immutable/chunks/CsVJKLJK.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CsVJKLJK.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CuyfOZTk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CuyfOZTk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CwcsJxhS2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CwcsJxhS2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Cx3ix-dL2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Cx3ix-dL2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/D5kSEVHd2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D5kSEVHd2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/D8HnIxQ42.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D8HnIxQ42.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/D8Kk1mwW.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D8Kk1mwW.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DJq0R92X.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DJq0R92X.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DRG11iPc2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DRG11iPc2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DbZ0P7x6.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DbZ0P7x6.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Drjp27p72.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Drjp27p72.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DuEGqPrO.js +0 -6
- package/dist/client/_app/immutable/chunks/DuEGqPrO.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DuEGqPrO.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/H2okCofJ.js +0 -3
- package/dist/client/_app/immutable/chunks/H2okCofJ.js.br +0 -0
- package/dist/client/_app/immutable/chunks/H2okCofJ.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/NRUHq-_72.js.br +0 -0
- package/dist/client/_app/immutable/chunks/NRUHq-_72.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/UeNcXxK4.js +0 -293
- package/dist/client/_app/immutable/chunks/UeNcXxK4.js.br +0 -0
- package/dist/client/_app/immutable/chunks/UeNcXxK4.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/VTYQK3v_2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/VTYQK3v_2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Wjj5hwVF2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Wjj5hwVF2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/YpKUr6uE2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/YpKUr6uE2.js.gz +0 -0
- package/dist/client/_app/immutable/entry/app.CiLM39cw.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.CiLM39cw.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.CIrA5P2h.js +0 -1
- package/dist/client/_app/immutable/entry/start.CIrA5P2h.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.CIrA5P2h.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/0.CEpgzEwS.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.CEpgzEwS.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/1.Sm4J_hJ5.js.br +0 -0
- package/dist/client/_app/immutable/nodes/1.Sm4J_hJ5.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.BcE-uamz.js +0 -6
- package/dist/client/_app/immutable/nodes/10.BcE-uamz.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.BcE-uamz.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.BGBkNPlf.js +0 -1
- package/dist/client/_app/immutable/nodes/2.BGBkNPlf.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.BGBkNPlf.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/9.C7P5VSNI.js.br +0 -0
- package/dist/client/_app/immutable/nodes/9.C7P5VSNI.js.gz +0 -0
- package/dist/server/chunks/10-x0FGzJF7.js +0 -22
- package/dist/server/chunks/10-x0FGzJF7.js.map +0 -1
- package/dist/server/chunks/3-CcIZ_M60.js.map +0 -1
- package/dist/server/chunks/4-DyArZX6h.js.map +0 -1
- package/dist/server/chunks/5-DVrv6Zto.js.map +0 -1
- package/dist/server/chunks/6-AD0Ee23-.js +0 -65
- package/dist/server/chunks/6-AD0Ee23-.js.map +0 -1
- package/dist/server/chunks/8-CRPOubhA.js.map +0 -1
- package/dist/server/chunks/9-BhWG76gi.js +0 -22
- package/dist/server/chunks/9-BhWG76gi.js.map +0 -1
- package/dist/server/chunks/_layout.svelte-CP4jFwsK.js.map +0 -1
- package/dist/server/chunks/_page.svelte-7KJNFri5.js.map +0 -1
- package/dist/server/chunks/_page.svelte-B3Zfq6_t.js.map +0 -1
- package/dist/server/chunks/_page.svelte-BQLzgYrr.js.map +0 -1
- package/dist/server/chunks/_server.ts-B1t_0LJV.js +0 -19
- package/dist/server/chunks/_server.ts-B1t_0LJV.js.map +0 -1
- package/dist/server/chunks/client-BvtIF74Y.js.map +0 -1
- package/dist/server/chunks/error-D23CGeyL.js.map +0 -1
- package/dist/server/chunks/error.svelte-DZuW0iDP.js.map +0 -1
- package/dist/server/chunks/events-DeYJGjCt.js.map +0 -1
- package/dist/server/chunks/hooks.server-Dox7llar.js.map +0 -1
- package/dist/server/chunks/internal-B77zebhK.js.map +0 -1
- package/dist/server/chunks/loader-circle-zqx69BdD.js.map +0 -1
- package/dist/server/chunks/logo-BfI7zmyL.js.map +0 -1
- package/dist/server/chunks/project-loader-BkV0zjlj.js.map +0 -1
- package/dist/server/chunks/request-handler-D-qbwxhh.js.map +0 -1
- package/dist/server/chunks/runtime-CDHWD9vo.js.map +0 -1
- package/dist/server/chunks/schemas-ENQuLVBq.js.map +0 -1
- package/dist/server/chunks/state-q9lwVQK2.js.map +0 -1
- /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css → 3.BP_hUVIU.css} +0 -0
- /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css.br → 3.BP_hUVIU.css.br} +0 -0
- /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css.gz → 3.BP_hUVIU.css.gz} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js → CVaqCwHa2.js} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.br → CVaqCwHa2.js.br} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.gz → CVaqCwHa2.js.gz} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js → De2hgUGE2.js} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.br → De2hgUGE2.js.br} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.gz → De2hgUGE2.js.gz} +0 -0
- /package/dist/server/chunks/{chunk-D7D4PA-g.js → rolldown-runtime-D7D4PA-g.js} +0 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import{C as e,Ct as t,D as n,Dt as r,F as i,G as a,H as o,I as s,M as c,Mt as l,N as u,Nt as d,Ot as f,P as p,Q as m,S as h,St as g,T as ee,W as te,Z as ne,_ as re,_t as ie,a as _,b as ae,ct as oe,et as se,ft as ce,gt as le,ht as ue,j as v,jt as de,k as fe,kt as pe,l as me,mt as he,n as ge,nt as _e,o as y,ot as ve,p as ye,pt as be,rt as xe,s as b,tt as x,ut as S,v as Se,w as Ce,xt as we,y as Te,yt as Ee}from"./CvkNa2t_.js";import{a as De,c as Oe,i as ke,m as Ae,o as je,r as Me,t as Ne}from"./BJ5-01Xz.js";import{At as Pe,Bt as Fe,Ft as Ie,It as Le,K as Re,Lt as ze,M as Be,Mt as Ve,Nt as He,Pt as Ue,Rt as We,Tt as Ge,U as Ke,a as qe,i as Je,it as Ye,l as Xe,nt as Ze,o as Qe,pt as $e,r as et,u as tt,wt as nt,zt as rt}from"./BAmaB5-w.js";import"./xihTtKlq.js";import"./BesjqVrk.js";function it(e,t){let n=at(!1,e,t);return typeof n==`string`?n:`[${n.join(`,`)}]`}function at(e,t,n){let r=[],i=new Map,a=[];if(n)for(let e of Object.getOwnPropertyNames(n))a.push({key:e,fn:n[e]});let o=[],s=0;function c(n,l){if(n===void 0)return-1;if(Number.isNaN(n))return-3;if(n===1/0)return-4;if(n===-1/0)return-5;if(n===0&&1/n<0)return-6;if(i.has(n))return i.get(n);l??=s++,i.set(n,l);for(let{key:e,fn:t}of a){let i=t(n);if(i)return r[l]=`["${e}",${c(i)}]`,l}if(typeof n==`function`)throw new He(`Cannot stringify a function`,o,n,t);if(typeof n==`symbol`)throw new He(`Cannot stringify a Symbol primitive`,o,n,t);let u=``;if(ze(n))u=ot(n);else if(typeof n.then==`function`){if(!e)throw new He(`Cannot stringify a Promise or thenable — use stringifyAsync instead`,o,n,t);u=Promise.resolve(n).then(e=>{let t=c(e,l);t<0&&(r[l]=t)})}else{let e=Ie(n);switch(e){case`Number`:case`String`:case`Boolean`:case`BigInt`:u=`["Object",${c(n.valueOf())}]`;break;case`Date`:u=`["Date","${isNaN(n.getDate())?``:n.toISOString()}"]`;break;case`URL`:u=`["URL",${rt(n.toString())}]`;break;case`URLSearchParams`:u=`["URLSearchParams",${rt(n.toString())}]`;break;case`RegExp`:let{source:r,flags:i}=n;u=i?`["RegExp",${rt(r)},"${i}"]`:`["RegExp",${rt(r)}]`;break;case`Array`:{let e=!1;u=`[`;for(let t=0;t<n.length;t+=1)if(t>0&&(u+=`,`),Object.hasOwn(n,t))o.push(`[${t}]`),u+=c(n[t]),o.pop();else if(e)u+=-2;else{let t=Fe(n),r=t.length,i=String(n.length).length;if((n.length-r)*3>4+i+r*(i+1)){u=`[-7,`+n.length;for(let e=0;e<t.length;e++){let r=t[e];o.push(`[${r}]`),u+=`,`+r+`,`+c(n[r]),o.pop()}break}else e=!0,u+=-2}u+=`]`;break}case`Set`:u=`["Set"`;for(let e of n)u+=`,${c(e)}`;u+=`]`;break;case`Map`:u=`["Map"`;for(let[e,t]of n)o.push(`.get(${ze(e)?ot(e):`...`})`),u+=`,${c(e)},${c(t)}`,o.pop();u+=`]`;break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{let t=n;u=`["`+e+`",`+c(t.buffer),t.byteLength!==t.buffer.byteLength&&(u+=`,${t.byteOffset},${t.length}`),u+=`]`;break}case`ArrayBuffer`:u=`["ArrayBuffer","${Ve(n)}"]`;break;case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:u=`["${e}",${rt(n.toString())}]`;break;default:if(!Le(n))throw new He(`Cannot stringify arbitrary non-POJOs`,o,n,t);if(Ue(n).length>0)throw new He(`Cannot stringify POJOs with symbolic keys`,o,n,t);if(Object.getPrototypeOf(n)===null){u=`["null"`;for(let e of Object.keys(n)){if(e===`__proto__`)throw new He(`Cannot stringify objects with __proto__ keys`,o,n,t);o.push(We(e)),u+=`,${rt(e)},${c(n[e])}`,o.pop()}u+=`]`}else{u=`{`;let e=!1;for(let r of Object.keys(n)){if(r===`__proto__`)throw new He(`Cannot stringify objects with __proto__ keys`,o,n,t);e&&(u+=`,`),e=!0,o.push(We(r)),u+=`${rt(r)}:${c(n[r])}`,o.pop()}u+=`}`}}}return r[l]=u,l}let l=c(t);return l<0?`${l}`:r}function ot(e){let t=typeof e;return t===`string`?rt(e):e===void 0?`-1`:e===0&&1/e<0?`-6`:t===`bigint`?`["BigInt","${e}"]`:String(e)}var st=Ke({component:`label`,parts:[`root`]}),ct=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Re(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=S(()=>({id:this.opts.id.current,[st.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return o(this.#e)}set props(e){ve(this.#e,e)}},lt=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),ut=u(`<label><!></label>`);function dt(t,r){let a=i();g(r,!0);let s=_(r,`id`,19,()=>Be(a)),l=_(r,`ref`,15,null),u=y(r,lt),d=ct.create({id:Ye(()=>s()),ref:Ye(()=>l(),e=>l(e))}),p=S(()=>Ze(u,d.props,{for:r.for}));var m=c(),h=x(m),ee=t=>{var n=c();e(x(n),()=>r.child,()=>({props:o(p)})),v(t,n)},te=t=>{var n=ut();ye(n,()=>({...o(p),for:r.for})),e(se(n),()=>r.children??pe),f(n),v(t,n)};n(h,e=>{r.child?e(ee):e(te,-1)}),v(t,m),we()}var ft;function C(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var pt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},mt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ft=globalThis).__zod_globalConfig??(ft.__zod_globalConfig={});var ht=globalThis.__zod_globalConfig;function gt(e){return e&&Object.assign(ht,e),ht}function _t(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function vt(e,t){return typeof t==`bigint`?t.toString():t}function yt(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function bt(e){return e==null}function xt(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var St=Symbol(`evaluating`);function w(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==St)return r===void 0&&(r=St,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ct(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function wt(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Tt(e){return JSON.stringify(e)}function Et(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Dt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ot(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var kt=yt(()=>{if(ht.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function At(e){if(Ot(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ot(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function jt(e){return At(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Mt=new Set([`string`,`number`,`symbol`]);function Nt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Pt(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function T(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ft(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function It(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Pt(e,wt(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ct(this,`shape`,e),e},checks:[]}))}function Lt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Pt(e,wt(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ct(this,`shape`,r),r},checks:[]}))}function Rt(e,t){if(!At(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Pt(e,wt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ct(this,`shape`,n),n}}))}function zt(e,t){if(!At(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Pt(e,wt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ct(this,`shape`,n),n}}))}function Bt(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Pt(e,wt(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ct(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Vt(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Pt(t,wt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ct(this,`shape`,i),i},checks:[]}))}function Ht(e,t,n){return Pt(t,wt(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ct(this,`shape`,i),i}}))}function Ut(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Wt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Gt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Kt(e){return typeof e==`string`?e:e?.message}function qt(e,t,n){let r=e.message?e.message:Kt(e.inst?._zod.def?.error?.(e))??Kt(t?.error?.(e))??Kt(n.customError?.(e))??Kt(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Jt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Yt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Xt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,vt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Zt=C(`$ZodError`,Xt),Qt=C(`$ZodError`,Xt,{Parent:Error});function $t(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function en(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var tn=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new pt;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>qt(e,a,gt())));throw Dt(t,i?.callee),t}return o.value},nn=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>qt(e,a,gt())));throw Dt(t,i?.callee),t}return o.value},rn=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new pt;return a.issues.length?{success:!1,error:new(e??Zt)(a.issues.map(e=>qt(e,i,gt())))}:{success:!0,data:a.value}},an=rn(Qt),on=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>qt(e,i,gt())))}:{success:!0,data:a.value}},sn=on(Qt),cn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tn(e)(t,n,i)},ln=e=>(t,n,r)=>tn(e)(t,n,r),un=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nn(e)(t,n,i)},dn=e=>async(t,n,r)=>nn(e)(t,n,r),fn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rn(e)(t,n,i)},pn=e=>(t,n,r)=>rn(e)(t,n,r),mn=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return on(e)(t,n,i)},hn=e=>async(t,n,r)=>on(e)(t,n,r),gn=/^[cC][0-9a-z]{6,}$/,_n=/^[0-9a-z]+$/,vn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yn=/^[0-9a-vA-V]{20}$/,bn=/^[A-Za-z0-9]{27}$/,xn=/^[a-zA-Z0-9_-]{21}$/,Sn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cn=/^([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})$/,wn=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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Tn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,En=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Dn(){return new RegExp(En,`u`)}var On=/^(?:(?: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])$/,kn=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,An=/^((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])$/,jn=/^(([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])$/,Mn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nn=/^[A-Za-z0-9_-]*$/,Pn=/^https?$/,Fn=/^\+[1-9]\d{6,14}$/,In=`(?:(?:\\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])))`,Ln=RegExp(`^${In}$`);function Rn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function zn(e){return RegExp(`^${Rn(e)}$`)}function Bn(e){let t=Rn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${In}T(?:${r})$`)}var Vn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Hn=/^(?:true|false)$/i,Un=/^[^A-Z]*$/,Wn=/^[^a-z]*$/,Gn=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Kn=C(`$ZodCheckMaxLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Jt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qn=C(`$ZodCheckMinLength`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Jt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jn=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;Gn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!bt(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Jt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Yn=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Gn.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Xn=C(`$ZodCheckRegex`,(e,t)=>{Yn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zn=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Un,Yn.init(e,t)}),Qn=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Wn,Yn.init(e,t)}),$n=C(`$ZodCheckIncludes`,(e,t)=>{Gn.init(e,t);let n=Nt(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),er=C(`$ZodCheckStartsWith`,(e,t)=>{Gn.init(e,t);let n=RegExp(`^${Nt(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tr=C(`$ZodCheckEndsWith`,(e,t)=>{Gn.init(e,t);let n=RegExp(`.*${Nt(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),nr=C(`$ZodCheckOverwrite`,(e,t)=>{Gn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),rr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
+
`))}},ir={major:4,minor:4,patch:3},ar=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ir;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Ut(e),i;for(let a of t){if(a._zod.def.when){if(Wt(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new pt;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Ut(e,t))});else{if(e.issues.length===t)continue;r||=Ut(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Ut(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new pt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new pt;return o.then(e=>t(e,r,a))}return t(o,r,a)}}w(e,`~standard`,()=>({validate:t=>{try{let n=an(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return sn(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),or=C(`$ZodString`,(e,t)=>{ar.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Vn(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),E=C(`$ZodStringFormat`,(e,t)=>{Yn.init(e,t),or.init(e,t)}),sr=C(`$ZodGUID`,(e,t)=>{t.pattern??=Cn,E.init(e,t)}),cr=C(`$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(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=wn(e)}else t.pattern??=wn();E.init(e,t)}),lr=C(`$ZodEmail`,(e,t)=>{t.pattern??=Tn,E.init(e,t)}),ur=C(`$ZodURL`,(e,t)=>{E.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Pn.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),dr=C(`$ZodEmoji`,(e,t)=>{t.pattern??=Dn(),E.init(e,t)}),fr=C(`$ZodNanoID`,(e,t)=>{t.pattern??=xn,E.init(e,t)}),pr=C(`$ZodCUID`,(e,t)=>{t.pattern??=gn,E.init(e,t)}),mr=C(`$ZodCUID2`,(e,t)=>{t.pattern??=_n,E.init(e,t)}),hr=C(`$ZodULID`,(e,t)=>{t.pattern??=vn,E.init(e,t)}),gr=C(`$ZodXID`,(e,t)=>{t.pattern??=yn,E.init(e,t)}),_r=C(`$ZodKSUID`,(e,t)=>{t.pattern??=bn,E.init(e,t)}),vr=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=Bn(t),E.init(e,t)}),yr=C(`$ZodISODate`,(e,t)=>{t.pattern??=Ln,E.init(e,t)}),br=C(`$ZodISOTime`,(e,t)=>{t.pattern??=zn(t),E.init(e,t)}),xr=C(`$ZodISODuration`,(e,t)=>{t.pattern??=Sn,E.init(e,t)}),Sr=C(`$ZodIPv4`,(e,t)=>{t.pattern??=On,E.init(e,t),e._zod.bag.format=`ipv4`}),Cr=C(`$ZodIPv6`,(e,t)=>{t.pattern??=kn,E.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),wr=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=An,E.init(e,t)}),Tr=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=jn,E.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Er(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Dr=C(`$ZodBase64`,(e,t)=>{t.pattern??=Mn,E.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Er(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Or(e){if(!Nn.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Er(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var kr=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=Nn,E.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Or(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ar=C(`$ZodE164`,(e,t)=>{t.pattern??=Fn,E.init(e,t)});function jr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Mr=C(`$ZodJWT`,(e,t)=>{E.init(e,t),e._zod.check=n=>{jr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Nr=C(`$ZodBoolean`,(e,t)=>{ar.init(e,t),e._zod.pattern=Hn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Pr=C(`$ZodUnknown`,(e,t)=>{ar.init(e,t),e._zod.parse=e=>e}),Fr=C(`$ZodNever`,(e,t)=>{ar.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Ir(e,t,n){e.issues.length&&t.issues.push(...Gt(n,e.issues)),t.value[n]=e.value}var Lr=C(`$ZodArray`,(e,t)=>{ar.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Ir(t,n,e))):Ir(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Rr(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Gt(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function zr(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Ft(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Br(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Rr(e,n,i,t,u,d))):Rr(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Vr=C(`$ZodObject`,(e,t)=>{if(ar.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=yt(()=>zr(t));w(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Ot,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Rr(n,t,e,s,r,i))):Rr(a,t,e,s,r,i)}return i?Br(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Hr=C(`$ZodObjectJIT`,(e,t)=>{Vr.init(e,t);let n=e._zod.parse,r=yt(()=>zr(t)),i=e=>{let t=new rr([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Tt(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Tt(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
4
|
+
if (${n}.issues.length) {
|
|
5
|
+
if (${o} in input) {
|
|
6
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
7
|
+
...iss,
|
|
8
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
9
|
+
})));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (${n}.value === undefined) {
|
|
14
|
+
if (${o} in input) {
|
|
15
|
+
newResult[${o}] = undefined;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
newResult[${o}] = ${n}.value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
`):c?t.write(`
|
|
22
|
+
if (${n}.issues.length) {
|
|
23
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
24
|
+
...iss,
|
|
25
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (${n}.value === undefined) {
|
|
30
|
+
if (${o} in input) {
|
|
31
|
+
newResult[${o}] = undefined;
|
|
32
|
+
}
|
|
33
|
+
} else {
|
|
34
|
+
newResult[${o}] = ${n}.value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
`):t.write(`
|
|
38
|
+
const ${n}_present = ${o} in input;
|
|
39
|
+
if (${n}.issues.length) {
|
|
40
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
41
|
+
...iss,
|
|
42
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
43
|
+
})));
|
|
44
|
+
}
|
|
45
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
46
|
+
payload.issues.push({
|
|
47
|
+
code: "invalid_type",
|
|
48
|
+
expected: "nonoptional",
|
|
49
|
+
input: undefined,
|
|
50
|
+
path: [${o}]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (${n}_present) {
|
|
55
|
+
if (${n}.value === undefined) {
|
|
56
|
+
newResult[${o}] = undefined;
|
|
57
|
+
} else {
|
|
58
|
+
newResult[${o}] = ${n}.value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ot,s=!ht.jitless,c=s&&kt.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Br([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Ur(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Ut(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>qt(e,r,gt())))}),t)}var Wr=C(`$ZodUnion`,(e,t)=>{ar.init(e,t),w(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),w(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),w(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),w(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=>xt(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Ur(t,r,e,i)):Ur(o,r,e,i)}}),Gr=C(`$ZodIntersection`,(e,t)=>{ar.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>qr(e,t,n)):qr(e,i,a)}});function Kr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(At(e)&&At(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Kr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Kr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function qr(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Ut(e))return e;let o=Kr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Jr=C(`$ZodEnum`,(e,t)=>{ar.init(e,t);let n=_t(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Mt.has(typeof e)).map(e=>typeof e==`string`?Nt(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Yr=C(`$ZodTransform`,(e,t)=>{ar.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new mt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new pt;return n.value=i,n.fallback=!0,n}});function Xr(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Zr=C(`$ZodOptional`,(e,t)=>{ar.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,w(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),w(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${xt(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Xr(e,r)):Xr(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Qr=C(`$ZodExactOptional`,(e,t)=>{Zr.init(e,t),w(e._zod,`values`,()=>t.innerType._zod.values),w(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),$r=C(`$ZodNullable`,(e,t)=>{ar.init(e,t),w(e._zod,`optin`,()=>t.innerType._zod.optin),w(e._zod,`optout`,()=>t.innerType._zod.optout),w(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${xt(e.source)}|null)$`):void 0}),w(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ei=C(`$ZodDefault`,(e,t)=>{ar.init(e,t),e._zod.optin=`optional`,w(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ti(e,t)):ti(r,t)}});function ti(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ni=C(`$ZodPrefault`,(e,t)=>{ar.init(e,t),e._zod.optin=`optional`,w(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ri=C(`$ZodNonOptional`,(e,t)=>{ar.init(e,t),w(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ii(t,e)):ii(i,e)}});function ii(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ai=C(`$ZodCatch`,(e,t)=>{ar.init(e,t),e._zod.optin=`optional`,w(e._zod,`optout`,()=>t.innerType._zod.optout),w(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>qt(e,n,gt()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>qt(e,n,gt()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),oi=C(`$ZodPipe`,(e,t)=>{ar.init(e,t),w(e._zod,`values`,()=>t.in._zod.values),w(e._zod,`optin`,()=>t.in._zod.optin),w(e._zod,`optout`,()=>t.out._zod.optout),w(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>si(e,t.in,n)):si(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>si(e,t.out,n)):si(r,t.out,n)}});function si(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var ci=C(`$ZodReadonly`,(e,t)=>{ar.init(e,t),w(e._zod,`propValues`,()=>t.innerType._zod.propValues),w(e._zod,`values`,()=>t.innerType._zod.values),w(e._zod,`optin`,()=>t.innerType?._zod?.optin),w(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(li):li(r)}});function li(e){return e.value=Object.freeze(e.value),e}var ui=C(`$ZodCustom`,(e,t)=>{Gn.init(e,t),ar.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>di(t,n,r,e));di(i,n,r,e)}});function di(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Yt(e))}}var fi,pi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function mi(){return new pi}(fi=globalThis).__zod_globalRegistry??(fi.__zod_globalRegistry=mi());var hi=globalThis.__zod_globalRegistry;function gi(e,t){return new e({type:`string`,...T(t)})}function _i(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...T(t)})}function vi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...T(t)})}function yi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...T(t)})}function bi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...T(t)})}function xi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...T(t)})}function Si(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...T(t)})}function Ci(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...T(t)})}function wi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...T(t)})}function Ti(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...T(t)})}function Ei(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...T(t)})}function Di(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...T(t)})}function Oi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...T(t)})}function ki(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...T(t)})}function Ai(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...T(t)})}function ji(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...T(t)})}function Mi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...T(t)})}function Ni(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...T(t)})}function Pi(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...T(t)})}function Fi(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...T(t)})}function Ii(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...T(t)})}function Li(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...T(t)})}function Ri(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...T(t)})}function zi(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...T(t)})}function Bi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...T(t)})}function Vi(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...T(t)})}function Hi(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...T(t)})}function Ui(e,t){return new e({type:`boolean`,...T(t)})}function Wi(e){return new e({type:`unknown`})}function Gi(e,t){return new e({type:`never`,...T(t)})}function Ki(e,t){return new Kn({check:`max_length`,...T(t),maximum:e})}function qi(e,t){return new qn({check:`min_length`,...T(t),minimum:e})}function Ji(e,t){return new Jn({check:`length_equals`,...T(t),length:e})}function Yi(e,t){return new Xn({check:`string_format`,format:`regex`,...T(t),pattern:e})}function Xi(e){return new Zn({check:`string_format`,format:`lowercase`,...T(e)})}function Zi(e){return new Qn({check:`string_format`,format:`uppercase`,...T(e)})}function Qi(e,t){return new $n({check:`string_format`,format:`includes`,...T(t),includes:e})}function $i(e,t){return new er({check:`string_format`,format:`starts_with`,...T(t),prefix:e})}function ea(e,t){return new tr({check:`string_format`,format:`ends_with`,...T(t),suffix:e})}function ta(e){return new nr({check:`overwrite`,tx:e})}function na(e){return ta(t=>t.normalize(e))}function ra(){return ta(e=>e.trim())}function ia(){return ta(e=>e.toLowerCase())}function aa(){return ta(e=>e.toUpperCase())}function oa(){return ta(e=>Et(e))}function sa(e,t,n){return new e({type:`array`,element:t,...T(n)})}function ca(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...T(n)})}function la(e,t){let n=ua(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Yt(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Yt(r))}},e(t.value,t)),t);return n}function ua(e,t){let n=new Gn({check:`custom`,...T(t)});return n._zod.check=e,n}function da(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??hi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function D(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,D(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&ma(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function fa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
63
|
+
|
|
64
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function pa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ga(t,`input`,e.processors),output:ga(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ma(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ma(r.element,n);if(r.type===`set`)return ma(r.valueType,n);if(r.type===`lazy`)return ma(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return ma(r.innerType,n);if(r.type===`intersection`)return ma(r.left,n)||ma(r.right,n);if(r.type===`record`||r.type===`map`)return ma(r.keyType,n)||ma(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ma(r.in,n)||ma(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ma(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ma(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ma(e,n))return!0;return!!(r.rest&&ma(r.rest,n))}return!1}var ha=(e,t={})=>n=>{let r=da({...n,processors:t});return D(e,r),fa(r,e),pa(r,e)},ga=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=da({...i??{},target:a,io:t,processors:n});return D(e,o),fa(o,e),pa(o,e)},_a={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},va=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_a[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ya=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ba=(e,t,n,r)=>{n.type=`boolean`},xa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Sa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Ca=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},wa=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},Ta=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Ea=(e,t,n,r)=>{n.not={}},Da=(e,t,n,r)=>{},Oa=(e,t,n,r)=>{},ka=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},Aa=(e,t,n,r)=>{let i=e._zod.def,a=_t(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ja=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ma=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Na=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Pa=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Fa=(e,t,n,r)=>{n.type=`boolean`},Ia=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},La=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Ra=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},za=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Ba=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Va=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=D(a.element,t,{...r,path:[...r.path,`items`]})},Ha=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=D(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=D(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ua=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>D(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Wa=(e,t,n,r)=>{let i=e._zod.def,a=D(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=D(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ga=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>D(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?D(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Ka=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=D(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=D(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=D(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},qa=(e,t,n,r)=>{let i=e._zod.def,a=D(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ja=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ya=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Xa=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Za=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Qa=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;D(o,t,r);let s=t.seen.get(e);s.ref=o},$a=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},eo=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},to=(e,t,n,r)=>{let i=e._zod.def;D(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},no={string:va,number:ya,boolean:ba,bigint:xa,symbol:Sa,null:Ca,undefined:wa,void:Ta,never:Ea,any:Da,unknown:Oa,date:ka,enum:Aa,literal:ja,nan:Ma,template_literal:Na,file:Pa,success:Fa,custom:Ia,function:La,transform:Ra,map:za,set:Ba,array:Va,object:Ha,union:Ua,intersection:Wa,tuple:Ga,record:Ka,nullable:qa,nonoptional:Ja,default:Ya,prefault:Xa,catch:Za,pipe:Qa,readonly:$a,promise:eo,optional:to,lazy:(e,t,n,r)=>{let i=e._zod.innerType;D(i,t,r);let a=t.seen.get(e);a.ref=i}};function ro(e,t){if(`_idmap`in e){let n=e,r=da({...t,processors:no}),i={};for(let e of n._idmap.entries()){let[t,n]=e;D(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;fa(r,n),a[t]=pa(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=da({...t,processors:no});return D(e,n),fa(n,e),pa(n,e)}var io=C(`ZodISODateTime`,(e,t)=>{vr.init(e,t),O.init(e,t)});function ao(e){return zi(io,e)}var oo=C(`ZodISODate`,(e,t)=>{yr.init(e,t),O.init(e,t)});function so(e){return Bi(oo,e)}var co=C(`ZodISOTime`,(e,t)=>{br.init(e,t),O.init(e,t)});function lo(e){return Vi(co,e)}var uo=C(`ZodISODuration`,(e,t)=>{xr.init(e,t),O.init(e,t)});function fo(e){return Hi(uo,e)}var po=C(`ZodError`,(e,t)=>{Zt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>en(e,t)},flatten:{value:t=>$t(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,vt,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,vt,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),mo=tn(po),ho=nn(po),go=rn(po),_o=on(po),vo=cn(po),yo=ln(po),bo=un(po),xo=dn(po),So=fn(po),Co=pn(po),wo=mn(po),To=hn(po),Eo=new WeakMap;function Do(e,t,n){let r=Object.getPrototypeOf(e),i=Eo.get(r);if(i||(i=new Set,Eo.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Oo=C(`ZodType`,(e,t)=>(ar.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ga(e,`input`),output:ga(e,`output`)}}),e.toJSONSchema=ha(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>mo(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>go(e,t,n),e.parseAsync=async(t,n)=>ho(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>_o(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>vo(e,t,n),e.decode=(t,n)=>yo(e,t,n),e.encodeAsync=async(t,n)=>bo(e,t,n),e.decodeAsync=async(t,n)=>xo(e,t,n),e.safeEncode=(t,n)=>So(e,t,n),e.safeDecode=(t,n)=>Co(e,t,n),e.safeEncodeAsync=async(t,n)=>wo(e,t,n),e.safeDecodeAsync=async(t,n)=>To(e,t,n),Do(e,`ZodType`,{check(...e){let t=this.def;return this.clone(wt(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Pt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ps(e,t))},superRefine(e,t){return this.check(Fs(e,t))},overwrite(e){return this.check(ta(e))},optional(){return gs(this)},exactOptional(){return vs(this)},nullable(){return bs(this)},nullish(){return gs(bs(this))},nonoptional(e){return Es(this,e)},array(){return is(this)},or(e){return cs([this,e])},and(e){return us(this,e)},transform(e){return As(this,ms(e))},default(e){return Ss(this,e)},prefault(e){return ws(this,e)},catch(e){return Os(this,e)},pipe(e){return As(this,e)},readonly(){return Ms(this)},describe(e){let t=this.clone();return hi.add(t,{description:e}),t},meta(...e){if(e.length===0)return hi.get(this);let t=this.clone();return hi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return hi.get(e)?.description},configurable:!0}),e)),ko=C(`_ZodString`,(e,t)=>{or.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>va(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Do(e,`_ZodString`,{regex(...e){return this.check(Yi(...e))},includes(...e){return this.check(Qi(...e))},startsWith(...e){return this.check($i(...e))},endsWith(...e){return this.check(ea(...e))},min(...e){return this.check(qi(...e))},max(...e){return this.check(Ki(...e))},length(...e){return this.check(Ji(...e))},nonempty(...e){return this.check(qi(1,...e))},lowercase(e){return this.check(Xi(e))},uppercase(e){return this.check(Zi(e))},trim(){return this.check(ra())},normalize(...e){return this.check(na(...e))},toLowerCase(){return this.check(ia())},toUpperCase(){return this.check(aa())},slugify(){return this.check(oa())}})}),Ao=C(`ZodString`,(e,t)=>{or.init(e,t),ko.init(e,t),e.email=t=>e.check(_i(Mo,t)),e.url=t=>e.check(Ci(Fo,t)),e.jwt=t=>e.check(Ri(Xo,t)),e.emoji=t=>e.check(wi(Io,t)),e.guid=t=>e.check(vi(No,t)),e.uuid=t=>e.check(yi(Po,t)),e.uuidv4=t=>e.check(bi(Po,t)),e.uuidv6=t=>e.check(xi(Po,t)),e.uuidv7=t=>e.check(Si(Po,t)),e.nanoid=t=>e.check(Ti(Lo,t)),e.guid=t=>e.check(vi(No,t)),e.cuid=t=>e.check(Ei(Ro,t)),e.cuid2=t=>e.check(Di(zo,t)),e.ulid=t=>e.check(Oi(Bo,t)),e.base64=t=>e.check(Fi(qo,t)),e.base64url=t=>e.check(Ii(Jo,t)),e.xid=t=>e.check(ki(Vo,t)),e.ksuid=t=>e.check(Ai(Ho,t)),e.ipv4=t=>e.check(ji(Uo,t)),e.ipv6=t=>e.check(Mi(Wo,t)),e.cidrv4=t=>e.check(Ni(Go,t)),e.cidrv6=t=>e.check(Pi(Ko,t)),e.e164=t=>e.check(Li(Yo,t)),e.datetime=t=>e.check(ao(t)),e.date=t=>e.check(so(t)),e.time=t=>e.check(lo(t)),e.duration=t=>e.check(fo(t))});function jo(e){return gi(Ao,e)}var O=C(`ZodStringFormat`,(e,t)=>{E.init(e,t),ko.init(e,t)}),Mo=C(`ZodEmail`,(e,t)=>{lr.init(e,t),O.init(e,t)}),No=C(`ZodGUID`,(e,t)=>{sr.init(e,t),O.init(e,t)}),Po=C(`ZodUUID`,(e,t)=>{cr.init(e,t),O.init(e,t)}),Fo=C(`ZodURL`,(e,t)=>{ur.init(e,t),O.init(e,t)}),Io=C(`ZodEmoji`,(e,t)=>{dr.init(e,t),O.init(e,t)}),Lo=C(`ZodNanoID`,(e,t)=>{fr.init(e,t),O.init(e,t)}),Ro=C(`ZodCUID`,(e,t)=>{pr.init(e,t),O.init(e,t)}),zo=C(`ZodCUID2`,(e,t)=>{mr.init(e,t),O.init(e,t)}),Bo=C(`ZodULID`,(e,t)=>{hr.init(e,t),O.init(e,t)}),Vo=C(`ZodXID`,(e,t)=>{gr.init(e,t),O.init(e,t)}),Ho=C(`ZodKSUID`,(e,t)=>{_r.init(e,t),O.init(e,t)}),Uo=C(`ZodIPv4`,(e,t)=>{Sr.init(e,t),O.init(e,t)}),Wo=C(`ZodIPv6`,(e,t)=>{Cr.init(e,t),O.init(e,t)}),Go=C(`ZodCIDRv4`,(e,t)=>{wr.init(e,t),O.init(e,t)}),Ko=C(`ZodCIDRv6`,(e,t)=>{Tr.init(e,t),O.init(e,t)}),qo=C(`ZodBase64`,(e,t)=>{Dr.init(e,t),O.init(e,t)}),Jo=C(`ZodBase64URL`,(e,t)=>{kr.init(e,t),O.init(e,t)}),Yo=C(`ZodE164`,(e,t)=>{Ar.init(e,t),O.init(e,t)}),Xo=C(`ZodJWT`,(e,t)=>{Mr.init(e,t),O.init(e,t)}),Zo=C(`ZodBoolean`,(e,t)=>{Nr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ba(e,t,n,r)});function Qo(e){return Ui(Zo,e)}var $o=C(`ZodUnknown`,(e,t)=>{Pr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function es(){return Wi($o)}var ts=C(`ZodNever`,(e,t)=>{Fr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ea(e,t,n,r)});function ns(e){return Gi(ts,e)}var rs=C(`ZodArray`,(e,t)=>{Lr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Va(e,t,n,r),e.element=t.element,Do(e,`ZodArray`,{min(e,t){return this.check(qi(e,t))},nonempty(e){return this.check(qi(1,e))},max(e,t){return this.check(Ki(e,t))},length(e,t){return this.check(Ji(e,t))},unwrap(){return this.element}})});function is(e,t){return sa(rs,e,t)}var as=C(`ZodObject`,(e,t)=>{Hr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ha(e,t,n,r),w(e,`shape`,()=>t.shape),Do(e,`ZodObject`,{keyof(){return fs(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:es()})},loose(){return this.clone({...this._zod.def,catchall:es()})},strict(){return this.clone({...this._zod.def,catchall:ns()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Rt(this,e)},safeExtend(e){return zt(this,e)},merge(e){return Bt(this,e)},pick(e){return It(this,e)},omit(e){return Lt(this,e)},partial(...e){return Vt(hs,this,e[0])},required(...e){return Ht(Ts,this,e[0])}})});function os(e,t){return new as({type:`object`,shape:e??{},...T(t)})}var ss=C(`ZodUnion`,(e,t)=>{Wr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ua(e,t,n,r),e.options=t.options});function cs(e,t){return new ss({type:`union`,options:e,...T(t)})}var ls=C(`ZodIntersection`,(e,t)=>{Gr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r)});function us(e,t){return new ls({type:`intersection`,left:e,right:t})}var ds=C(`ZodEnum`,(e,t)=>{Jr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aa(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ds({...t,checks:[],...T(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ds({...t,checks:[],...T(r),entries:i})}});function fs(e,t){return new ds({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...T(t)})}var ps=C(`ZodTransform`,(e,t)=>{Yr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new mt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Yt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Yt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function ms(e){return new ps({type:`transform`,transform:e})}var hs=C(`ZodOptional`,(e,t)=>{Zr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gs(e){return new hs({type:`optional`,innerType:e})}var _s=C(`ZodExactOptional`,(e,t)=>{Qr.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>to(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vs(e){return new _s({type:`optional`,innerType:e})}var ys=C(`ZodNullable`,(e,t)=>{$r.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bs(e){return new ys({type:`nullable`,innerType:e})}var xs=C(`ZodDefault`,(e,t)=>{ei.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ya(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ss(e,t){return new xs({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():jt(t)}})}var Cs=C(`ZodPrefault`,(e,t)=>{ni.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ws(e,t){return new Cs({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():jt(t)}})}var Ts=C(`ZodNonOptional`,(e,t)=>{ri.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ja(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Es(e,t){return new Ts({type:`nonoptional`,innerType:e,...T(t)})}var Ds=C(`ZodCatch`,(e,t)=>{ai.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Os(e,t){return new Ds({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ks=C(`ZodPipe`,(e,t)=>{oi.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qa(e,t,n,r),e.in=t.in,e.out=t.out});function As(e,t){return new ks({type:`pipe`,in:e,out:t})}var js=C(`ZodReadonly`,(e,t)=>{ci.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$a(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ms(e){return new js({type:`readonly`,innerType:e})}var Ns=C(`ZodCustom`,(e,t)=>{ui.init(e,t),Oo.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ia(e,t,n,r)});function Ps(e,t={}){return ca(Ns,e,t)}function Fs(e,t){return la(e,t)}var Is=u(`<form><!></form>`);function Ls(n,r){g(r,!0),t(`form`,()=>r.form);var i=Is();e(se(i),()=>r.children),f(i),ae(i,e=>r.form.enhance?.(e)),ne(()=>re(i,1,Se(r.class))),v(n,i),we()}function Rs(e){return typeof e==`function`}function zs(e){return typeof e==`object`&&!!e}var Bs=[`string`,`number`,`bigint`,`boolean`];function Vs(e){return e==null||Bs.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Vs(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var Hs=Symbol(`box`),Us=Symbol(`is-writable`);function Ws(e){return zs(e)&&Hs in e}function Gs(e){return k.isBox(e)&&Us in e}function k(e){let t=oe(xe(e));return{[Hs]:!0,[Us]:!0,get current(){return o(t)},set current(e){ve(t,e,!0)}}}function Ks(e,t){let n=S(e);return t?{[Hs]:!0,[Us]:!0,get current(){return o(n)},set current(e){t(e)}}:{[Hs]:!0,get current(){return e()}}}function qs(e){return k.isBox(e)?e:Rs(e)?k.with(e):k(e)}function Js(e){return Object.entries(e).reduce((e,[t,n])=>k.isBox(n)?(k.isWritableBox(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function Ys(e){return k.isWritableBox(e)?{[Hs]:!0,get current(){return e.current}}:e}k.from=qs,k.with=Ks,k.flatten=Js,k.readonly=Ys,k.isBox=Ws,k.isWritableBox=Gs;function Xs(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Zs=/\d/,Qs=[`-`,`_`,`/`,`.`];function $s(e=``){if(!Zs.test(e))return e!==e.toLowerCase()}function ec(e){let t=[],n=``,r,i;for(let a of e){let e=Qs.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=$s(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function tc(e){return e?ec(e).map(e=>rc(e)).join(``):``}function nc(e){return ic(tc(e||``))}function rc(e){return e?e[0].toUpperCase()+e.slice(1):``}function ic(e){return e?e[0].toLowerCase()+e.slice(1):``}function ac(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[tc(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[nc(e)]=n}return Pe(e,n),t}function oc(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function sc(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var cc=sc(/[A-Z]/,e=>`-${e.toLowerCase()}`);function lc(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${cc(t)}: ${e[t]};`).join(`
|
|
65
|
+
`)}function uc(e={}){return lc(e).replace(`
|
|
66
|
+
`,` `)}uc({position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`});function dc(e){return e.length>2&&e.startsWith(`on`)&&e[2]===e[2]?.toLowerCase()}function fc(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&dc(e))t[e]=Xs(n,i);else if(a&&o)t[e]=oc(n,i);else if(e===`class`){let r=Vs(n),a=Vs(i);r&&a?t[e]=Te(n,i):r?t[e]=Te(n):a&&(t[e]=Te(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=ac(i);t[e]={...n,...r}}else if(o&&a)t[e]={...ac(n),...i};else if(o&&s){let r=ac(n),a=ac(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}}return typeof t.style==`object`&&(t.style=uc(t.style).replaceAll(`
|
|
67
|
+
`,` `)),t.hidden!==!0&&(t.hidden=void 0,delete t.hidden),t.disabled!==!0&&(t.disabled=void 0,delete t.disabled),t}function pc({id:e,ref:t,deps:n=()=>!0,onRefChange:r=()=>{},getRootNode:i=()=>typeof document<`u`?document:void 0}){let s=S(()=>n()),c=S(()=>i());m(()=>(e.current,o(s),o(c),a(()=>{let n=o(c)?.getElementById(e.current);n?t.current=n:t.current=null,r(t.current)}))),m(()=>()=>{t.current=null,r(null)})}function mc(e,t){let n=S(e);m(()=>{o(n),a(()=>t(o(n)))})}function hc(e){return Array.isArray(e)?[...e]:typeof e==`object`&&`_errors`in e&&e._errors!==void 0?[...e._errors]:[]}function gc(e,t){let n=e.split(/[[\].]/).filter(Boolean),r=t;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function _c({fieldErrorsId:e=void 0,descriptionId:t=void 0,errors:n}){let r=``;return t&&(r+=`${t} `),n.length&&e&&(r+=e),r?r.trim():void 0}function vc(e){if(`required`in e)return e.required?`true`:void 0}function yc(e){return e&&e.length?`true`:void 0}function bc(e){return e&&e.length?``:void 0}var xc=0;function Sc(e=`formsnap`){return xc++,`${e}-${xc}`}var Cc=class{#e;#t;#n;#r;#i;form;#a=S(()=>this.#e.current);get name(){return o(this.#a)}set name(e){ve(this.#a,e)}#o=S(()=>hc(gc(this.#e.current,structuredClone(this.#t.current))));get errors(){return o(this.#o)}set errors(e){ve(this.#o,e)}#s=S(()=>gc(this.#e.current,structuredClone(this.#n.current))??{});get constraints(){return o(this.#s)}set constraints(e){ve(this.#s,e)}#c=S(()=>this.#r.current?gc(this.#e.current,structuredClone(this.#r.current))===!0:!1);get tainted(){return o(this.#c)}set tainted(e){ve(this.#c,e)}#l=oe(null);get errorNode(){return o(this.#l)}set errorNode(e){ve(this.#l,e,!0)}#u=oe(null);get descriptionNode(){return o(this.#u)}set descriptionNode(e){ve(this.#u,e,!0)}#d=oe();get errorId(){return o(this.#d)}set errorId(e){ve(this.#d,e,!0)}#f=oe();get descriptionId(){return o(this.#f)}set descriptionId(e){ve(this.#f,e,!0)}constructor(e){this.#e=e.name,this.form=e.form.current,this.#t=Ae(e.form.current.errors),this.#n=Ae(e.form.current.constraints),this.#r=Ae(e.form.current.tainted),this.#i=Ae(e.form.current.form),m(()=>{this.errorNode&&this.errorNode.id&&(this.errorId=this.errorNode.id)}),m(()=>{this.descriptionNode&&this.descriptionNode.id&&(this.descriptionId=this.descriptionNode.id)})}#p=S(()=>({value:this.#i.current[this.#e.current],errors:this.errors,tainted:this.tainted,constraints:this.constraints}));get snippetProps(){return o(this.#p)}set snippetProps(e){ve(this.#p,e)}},wc=class{#e;#t;field;#n=S(()=>bc(this.field.errors));constructor(e,t){this.#e=e.ref,this.#t=e.id,this.field=t,pc({id:this.#t,ref:this.#e,onRefChange:e=>{this.field.errorNode=e}})}#r=S(()=>({errors:this.field.errors,errorProps:this.errorProps}));get snippetProps(){return o(this.#r)}set snippetProps(e){ve(this.#r,e)}#i=S(()=>({id:this.#t.current,"data-fs-error":o(this.#n),"data-fs-field-errors":``,"aria-live":`assertive`}));get fieldErrorsProps(){return o(this.#i)}set fieldErrorsProps(e){ve(this.#i,e)}#a=S(()=>({"data-fs-field-error":``,"data-fs-error":o(this.#n)}));get errorProps(){return o(this.#a)}set errorProps(e){ve(this.#a,e)}},Tc=class{#e;#t;field;constructor(e,t){this.#e=e.ref,this.#t=e.id,this.field=t,pc({id:this.#t,ref:this.#e,onRefChange:e=>{this.field.descriptionNode=e}})}#n=S(()=>({id:this.#t.current,"data-fs-error":bc(this.field.errors),"data-fs-description":``}));get props(){return o(this.#n)}set props(e){ve(this.#n,e)}},Ec=class{#e;field;labelId=k(Sc());#t=oe(xe(Sc()));get id(){return o(this.#t)}set id(e){ve(this.#t,e,!0)}constructor(e,t){this.#e=e.id,this.field=t,mc(()=>this.#e.current,e=>{this.id=e})}#n=S(()=>({id:this.id,name:this.field.name,"data-fs-error":bc(this.field.errors),"aria-describedby":_c({fieldErrorsId:this.field.errorId,descriptionId:this.field.descriptionId,errors:this.field.errors}),"aria-invalid":yc(this.field.errors),"aria-required":vc(this.field.constraints),"data-fs-control":``}));get props(){return o(this.#n)}set props(e){ve(this.#n,e)}#r=S(()=>({id:this.labelId.current,"data-fs-label":``,"data-fs-error":bc(this.field.errors),for:this.id}));get labelProps(){return o(this.#r)}set labelProps(e){ve(this.#r,e)}},Dc=class{#e;#t;control;constructor(e,t){this.#e=e.ref,this.#t=e.id,this.control=t,this.control.labelId=this.#t,pc({id:this.#t,ref:this.#e})}get props(){return this.control.labelProps}},Oc=Symbol.for(`formsnap.form-field`),kc=Symbol.for(`formsnap.form-control`);function Ac(e){return t(Oc,new Cc(e))}function jc(){return Ee(Oc)}function Mc(e){return new wc(e,jc())}function Nc(e){return new Tc(e,jc())}function Pc(e){return t(kc,new Ec(e,jc()))}function Fc(){return Ee(kc)}function Ic(e){return new Dc(e,Fc())}var Lc=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),Rc=u(`<div><!></div>`);function zc(t,r){g(r,!0);let i=_(r,`id`,19,Sc),a=_(r,`ref`,15,null),s=y(r,Lc),l=Nc({id:k.with(()=>i()),ref:k.with(()=>a(),e=>a(e))}),u=S(()=>fc(s,l.props));var d=c(),p=x(d),m=t=>{var n=c();e(x(n),()=>r.child,()=>({props:o(u)})),v(t,n)},h=t=>{var n=Rc();ye(n,()=>({...o(u)})),e(se(n),()=>r.children??pe),f(n),v(t,n)};n(p,e=>{r.child?e(m):e(h,-1)}),v(t,d),we()}function Bc(t,n){g(n,!0);let r=Ac({form:k.with(()=>n.form),name:k.with(()=>n.name)});var i=c();e(x(i),()=>n.children??pe,()=>r.snippetProps),v(t,i),we()}function Vc(t,n){g(n,!0);let r=_(n,`id`,19,Sc),i=Pc({id:k.with(()=>r())});var a=c();e(x(a),()=>n.children??pe,()=>({props:i.props})),v(t,a),we()}var Hc=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),Uc=u(`<label><!></label>`);function Wc(t,r){g(r,!0);let i=_(r,`id`,19,Sc),a=_(r,`ref`,15,null),s=y(r,Hc),l=Ic({id:k.with(()=>i()),ref:k.with(()=>a(),e=>a(e))}),u=S(()=>fc(s,l.props));var d=c(),p=x(d),m=t=>{var n=c();e(x(n),()=>r.child,()=>({props:o(u)})),v(t,n)},h=t=>{var n=Uc();ye(n,()=>({...o(u)})),e(se(n),()=>r.children??pe),f(n),v(t,n)};n(p,e=>{r.child?e(m):e(h,-1)}),v(t,d),we()}var Gc=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),Kc=u(`<div> </div>`),qc=u(`<div><!></div>`);function Jc(t,r){g(r,!0);let i=_(r,`id`,19,Sc),a=_(r,`ref`,15,null),s=y(r,Gc),l=Mc({id:k.with(()=>i()),ref:k.with(()=>a(),e=>a(e))}),u=S(()=>fc(s,l.fieldErrorsProps));var d=c(),p=x(d),m=t=>{var n=c(),i=x(n);{let t=S(()=>({props:o(u),...l.snippetProps}));e(i,()=>r.child,()=>o(t))}v(t,n)},h=t=>{var i=qc();ye(i,()=>({...o(u)}));var a=se(i),s=t=>{var n=c();e(x(n),()=>r.children,()=>l.snippetProps),v(t,n)},d=e=>{var t=c();Ce(x(t),17,()=>l.field.errors,ee,(e,t)=>{var n=Kc();ye(n,()=>({...l.errorProps}));var r=se(n,!0);f(n),ne(()=>fe(r,o(t))),v(e,n)}),v(e,t)};n(a,e=>{r.children?e(s):e(d,-1)}),f(i),v(t,i)};n(p,e=>{r.child?e(m):e(h,-1)}),v(t,d),we()}var Yc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Xc(e,t){g(t,!0);let n=_(t,`ref`,15,null),r=y(t,Yc);var i=c(),a=x(i);{let e=S(()=>$e(`text-muted-foreground text-sm`,t.class));h(a,()=>zc,(t,i)=>{i(t,b({"data-slot":`form-description`,get class(){return o(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,i),we()}u(`<div><!></div>`);var Zc=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`errorClasses`,`children`]),Qc=u(`<div> </div>`);function $c(t,r){g(r,!0);let i=_(r,`ref`,15,null),a=y(r,Zc);var s=c(),l=x(s);{let t=(t,i)=>{let a=()=>i?.().errors,o=()=>i?.().errorProps;var s=c(),l=x(s),u=t=>{var n=c();e(x(n),()=>r.children,()=>({errors:a(),errorProps:o()})),v(t,n)},d=e=>{var t=c();Ce(x(t),16,a,e=>e,(e,t)=>{var n=Qc();ye(n,e=>({...o(),class:e}),[()=>$e(r.errorClasses)]);var i=se(n,!0);f(n),ne(()=>fe(i,t)),v(e,n)}),v(e,t)};n(l,e=>{r.children?e(u):e(d,-1)}),v(t,s)},s=S(()=>$e(`text-destructive text-sm font-medium`,r.class));h(l,()=>Jc,(e,n)=>{n(e,b({get class(){return o(s)}},()=>a,{get ref(){return i()},set ref(e){i(e)},children:t,$$slots:{default:!0}}))})}v(t,s),we()}var el=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`form`,`name`,`children`]),tl=u(`<div><!></div>`);function nl(t,n){g(n,!0);let r=_(n,`ref`,15,null),i=y(n,el);var a=c(),o=x(a);{let t=(t,a)=>{let o=()=>a?.().constraints,s=()=>a?.().errors,c=()=>a?.().tainted,l=()=>a?.().value;var u=tl();ye(u,e=>({"data-slot":`form-item`,class:e,...i}),[()=>$e(`space-y-2`,n.class)]),e(se(u),()=>n.children??pe,()=>({constraints:o(),errors:s(),tainted:c(),value:l()})),f(u),me(u,e=>r(e),()=>r()),v(t,u)};h(o,()=>Bc,(e,r)=>{r(e,{get form(){return n.form},get name(){return n.name},children:t,$$slots:{default:!0}})})}v(t,a),we()}var rl=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function il(e,t){g(t,!0);let n=_(t,`ref`,15,null),r=y(t,rl);var i=c(),a=x(i);{let e=S(()=>$e(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));h(a,()=>dt,(t,i)=>{i(t,b({"data-slot":`label`,get class(){return o(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}v(e,i),we()}var al=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`children`,`class`]);function ol(t,n){g(n,!0);let r=_(n,`ref`,15,null),i=y(n,al);var a=c(),s=x(a);{let t=(t,r)=>{let i=()=>r?.().props;{let r=S(()=>$e(`data-[fs-error]:text-destructive`,n.class));il(t,b(i,{"data-slot":`form-label`,get class(){return o(r)},children:(t,r)=>{var i=c();e(x(i),()=>n.children??pe),v(t,i)},$$slots:{default:!0}}))}};h(s,()=>Wc,(e,n)=>{n(e,b(()=>i,{get ref(){return r()},set ref(e){r(e)},child:t,$$slots:{child:!0}}))})}v(t,a),we()}var sl=Vc,cl=u(`<!> <!>`,1),ll=u(`<!> <!> <!>`,1);function ul(t,i){g(i,!0);let a=Ee(`form`);var l=c(),u=x(l);{let t=S(a),l=S(()=>$e(`flex flex-col gap-2`,i.class));h(u,()=>nl,(a,u)=>{u(a,{get form(){return o(t)},get name(){return i.name},get class(){return o(l)},children:(t,a)=>{var l=ll(),u=x(l);{let t=(t,a)=>{let l=()=>a?.().props;var u=cl(),d=x(u),f=e=>{var t=c(),n=x(t);{let e=S(()=>i.classNames?.label);h(n,()=>ol,(t,n)=>{n(t,{get class(){return o(e)},children:(e,t)=>{r();var n=s();ne(()=>fe(n,i.label)),v(e,n)},$$slots:{default:!0}})})}v(e,t)};n(d,e=>{i.label&&e(f)}),e(_e(d,2),()=>i.children,()=>({props:l()})),v(t,u)};h(u,()=>sl,(e,n)=>{n(e,{children:t,$$slots:{default:!0}})})}var d=_e(u,2),f=e=>{var t=c(),n=x(t);{let e=S(()=>i.classNames?.description);h(n,()=>Xc,(t,n)=>{n(t,{get class(){return o(e)},children:(e,t)=>{r();var n=s();ne(()=>fe(n,i.description)),v(e,n)},$$slots:{default:!0}})})}v(e,t)};n(d,e=>{i.description&&e(f)}),h(_e(d,2),()=>$c,(e,t)=>{t(e,{class:`text-sm text-destructive`})}),v(t,l)},$$slots:{default:!0}})})}v(t,l),we()}var dl=u(`<!> <!>`,1);function fl(e,t){g(t,!0);let n=()=>be(u,`$form`,i),[i,a]=ce(),l=_(t,`placeholder`,3,`Select...`),{form:u}=Ee(`form`)(),d=S(()=>t.options.find(e=>e.value===n()[t.name])?.label??l());ul(e,{get name(){return t.name},get label(){return t.label},get description(){return t.description},get class(){return t.class},get classNames(){return t.classNames},children:(e,i)=>{let a=()=>i?.().props;var l=c(),f=x(l);{let e=S(()=>String(n()[t.name]??``));h(f,()=>et,(n,i)=>{i(n,{type:`single`,get value(){return o(e)},onValueChange:e=>u.update(n=>({...n,[t.name]:e})),children:(e,n)=>{var i=dl(),l=x(i);{let e=S(()=>t.classNames?.trigger);h(l,()=>Je,(n,i)=>{i(n,b(a,{get disabled(){return t.disabled},get class(){return o(e)},children:(e,t)=>{r();var n=s();ne(()=>fe(n,o(d))),v(e,n)},$$slots:{default:!0}}))})}var u=_e(l,2);{let e=S(()=>t.classNames?.content);h(u,()=>Qe,(n,r)=>{r(n,{get class(){return o(e)},children:(e,n)=>{var r=c();Ce(x(r),17,()=>t.options,e=>e.value,(e,n)=>{var r=c(),i=x(r);{let e=S(()=>t.classNames?.item);h(i,()=>qe,(t,r)=>{r(t,{get value(){return o(n).value},get label(){return o(n).label},get class(){return o(e)}})})}v(e,r)}),v(e,r)},$$slots:{default:!0}})})}v(e,i)},$$slots:{default:!0}})})}v(e,l)},$$slots:{default:!0}}),we(),a()}var pl=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`,`size`]);function ml(e,t){g(t,!0);let n=_(t,`ref`,15,null),r=_(t,`checked`,15,!1),i=_(t,`size`,3,`default`),a=y(t,pl);var s=c(),l=x(s);{let e=S(()=>$e(`focus-visible:ring-ring/50 inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,t.class));h(l,()=>tt,(t,s)=>{s(t,b({"data-slot":`switch`,get"data-size"(){return i()},get class(){return o(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get checked(){return r()},set checked(e){r(e)},children:(e,t)=>{var n=c();h(x(n),()=>Xe,(e,t)=>{t(e,{"data-slot":`switch-thumb`,class:`pointer-events-none block h-4 w-4 rounded-full bg-foreground shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`})}),v(e,n)},$$slots:{default:!0}}))})}v(e,s),we()}function hl(e,t){g(t,!0);let n=()=>be(a,`$form`,r),[r,i]=ce(),{form:a}=Ee(`form`)();ul(e,{get name(){return t.name},get label(){return t.label},get description(){return t.description},get class(){return t.class},get classNames(){return t.classNames},children:(e,r)=>{ml(e,b(()=>r?.().props,{get disabled(){return t.disabled},get checked(){return n()[t.name]},onCheckedChange:e=>a.update(n=>({...n,[t.name]:e}))}))},$$slots:{default:!0}}),we(),i()}var gl=()=>{let e=Oe;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},_l={subscribe(e){return gl().page.subscribe(e)}},vl={subscribe(e){return gl().navigating.subscribe(e)}};u(`<style>.super-debug--absolute {
|
|
68
|
+
position: absolute;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.super-debug--top-0 {
|
|
72
|
+
top: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.super-debug--inset-x-0 {
|
|
76
|
+
left: 0px;
|
|
77
|
+
right: 0px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.super-debug--hidden {
|
|
81
|
+
height: 0;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.super-debug--hidden:not(.super-debug--with-label) {
|
|
86
|
+
height: 1.5em;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.super-debug--rotated {
|
|
90
|
+
transform: rotate(180deg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.super-debug {
|
|
94
|
+
--_sd-bg-color: var(--sd-bg-color, var(--sd-vscode-bg-color, rgb(30, 41, 59)));
|
|
95
|
+
position: relative;
|
|
96
|
+
background-color: var(--_sd-bg-color);
|
|
97
|
+
border-radius: 0.5rem;
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.super-debug--pre {
|
|
102
|
+
overflow-x: auto;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.super-debug--collapse {
|
|
106
|
+
display: block;
|
|
107
|
+
width: 100%;
|
|
108
|
+
color: rgba(255, 255, 255, 0.25);
|
|
109
|
+
background-color: rgba(255, 255, 255, 0.15);
|
|
110
|
+
padding: 5px 0;
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
border-color: transparent;
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 3px 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.super-debug--collapse:focus {
|
|
119
|
+
color: #fafafa;
|
|
120
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.super-debug--collapse:is(:hover) {
|
|
124
|
+
color: rgba(255, 255, 255, 0.35);
|
|
125
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.super-debug--status {
|
|
129
|
+
display: flex;
|
|
130
|
+
padding: 1em;
|
|
131
|
+
padding-bottom: 0;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
font-family:
|
|
134
|
+
Inconsolata, Monaco, Consolas, 'Lucida Console', 'Courier New', Courier, monospace;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.super-debug--right-status {
|
|
138
|
+
display: flex;
|
|
139
|
+
gap: 0.55em;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.super-debug--copy {
|
|
143
|
+
margin: 0;
|
|
144
|
+
padding: 0;
|
|
145
|
+
padding-top: 2px;
|
|
146
|
+
background-color: transparent;
|
|
147
|
+
border: 0;
|
|
148
|
+
color: #666;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.super-debug--copy:hover {
|
|
153
|
+
background-color: transparent;
|
|
154
|
+
color: #666;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.super-debug--copy:focus {
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
color: #666;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.super-debug--label {
|
|
163
|
+
color: var(--sd-label-color, var(--sd-vscode-label-color, white));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.super-debug--promise-loading {
|
|
167
|
+
color: var(--sd-promise-loading-color, var(--sd-vscode-promise-loading-color, #999));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.super-debug--promise-rejected {
|
|
171
|
+
color: var(--sd-promise-rejected-color, var(--sd-vscode-promise-rejected-color, #ff475d));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.super-debug pre {
|
|
175
|
+
color: var(--sd-code-default, var(--sd-vscode-code-default, #999));
|
|
176
|
+
background-color: var(--_sd-bg-color);
|
|
177
|
+
font-size: 1em;
|
|
178
|
+
margin-bottom: 0;
|
|
179
|
+
padding: 1em 0 1em 1em;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.super-debug--info {
|
|
183
|
+
color: var(--sd-info, var(--sd-vscode-info, rgb(85, 85, 255)));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.super-debug--success {
|
|
187
|
+
color: var(--sd-success, var(--sd-vscode-success, #2cd212));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.super-debug--redirect {
|
|
191
|
+
color: var(--sd-redirect, var(--sd-vscode-redirect, #03cae5));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.super-debug--error {
|
|
195
|
+
color: var(--sd-error, var(--sd-vscode-error, #ff475d));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.super-debug--code .key {
|
|
199
|
+
color: var(--sd-code-key, var(--sd-vscode-code-key, #eab308));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.super-debug--code .string {
|
|
203
|
+
color: var(--sd-code-string, var(--sd-vscode-code-string, #6ec687));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.super-debug--code .date {
|
|
207
|
+
color: var(--sd-code-date, var(--sd-vscode-code-date, #f06962));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.super-debug--code .boolean {
|
|
211
|
+
color: var(--sd-code-boolean, var(--sd-vscode-code-boolean, #79b8ff));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.super-debug--code .number {
|
|
215
|
+
color: var(--sd-code-number, var(--sd-vscode-code-number, #af77e9));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.super-debug--code .bigint {
|
|
219
|
+
color: var(--sd-code-bigint, var(--sd-vscode-code-bigint, #af77e9));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.super-debug--code .null {
|
|
223
|
+
color: var(--sd-code-null, var(--sd-vscode-code-null, #238afe));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.super-debug--code .nan {
|
|
227
|
+
color: var(--sd-code-nan, var(--sd-vscode-code-nan, #af77e9));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.super-debug--code .undefined {
|
|
231
|
+
color: var(--sd-code-undefined, var(--sd-vscode-code-undefined, #238afe));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.super-debug--code .function {
|
|
235
|
+
color: var(--sd-code-function, var(--sd-vscode-code-function, #f06962));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.super-debug--code .symbol {
|
|
239
|
+
color: var(--sd-code-symbol, var(--sd-vscode-code-symbol, #4de0c5));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.super-debug--code .error {
|
|
243
|
+
color: var(--sd-code-error, var(--sd-vscode-code-error, #ff475d));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.super-debug pre::-webkit-scrollbar {
|
|
247
|
+
width: var(--sd-sb-width, var(--sd-vscode-sb-width, 1rem));
|
|
248
|
+
height: var(--sd-sb-height, var(--sd-vscode-sb-height, 1rem));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.super-debug pre::-webkit-scrollbar-track {
|
|
252
|
+
border-radius: 12px;
|
|
253
|
+
background-color: var(
|
|
254
|
+
--sd-sb-track-color,
|
|
255
|
+
var(--sd-vscode-sb-track-color, hsl(0, 0%, 40%, 0.2))
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
.super-debug:is(:focus-within, :hover) pre::-webkit-scrollbar-track {
|
|
259
|
+
border-radius: 12px;
|
|
260
|
+
background-color: var(
|
|
261
|
+
--sd-sb-track-color-focus,
|
|
262
|
+
var(--sd-vscode-sb-track-color-focus, hsl(0, 0%, 50%, 0.2))
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.super-debug pre::-webkit-scrollbar-thumb {
|
|
267
|
+
border-radius: 12px;
|
|
268
|
+
background-color: var(
|
|
269
|
+
--sd-sb-thumb-color,
|
|
270
|
+
var(--sd-vscode-sb-thumb-color, hsl(217, 50%, 50%, 0.5))
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
.super-debug:is(:focus-within, :hover) pre::-webkit-scrollbar-thumb {
|
|
274
|
+
border-radius: 12px;
|
|
275
|
+
background-color: var(
|
|
276
|
+
--sd-sb-thumb-color-focus,
|
|
277
|
+
var(--sd-vscode-sb-thumb-color-focus, hsl(217, 50%, 50%))
|
|
278
|
+
);
|
|
279
|
+
}</style>`),p(`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z"></path><path d="M4.012 16.737A2.005 2.005 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1"></path></g></svg>`),p(`<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 12v6m-3-3h6"></path><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></g></svg>`),u(`<div> </div>`),u(`<span class="super-debug--promise-rejected">Rejected:</span> <!>`,1),u(`<div class="super-debug--promise-loading">Loading data...</div>`),u(`<button type="button" class="super-debug--collapse" aria-label="Collapse"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M4.08 11.92L12 4l7.92 7.92l-1.42 1.41l-5.5-5.5V22h-2V7.83l-5.5 5.5l-1.42-1.41M12 4h10V2H2v2h10Z"></path></svg></button>`),u(`<div dir="ltr"><div><div class="super-debug--label"> </div> <div class="super-debug--right-status"><button type="button" class="super-debug--copy"><!></button> <!></div></div> <pre><code class="super-debug--code"><!></code></pre> <!></div>`),u(`<!> <!>`,1);function yl(e,t,n){if(t===`__proto__`||t===`prototype`)throw Error("Cannot set an object's `__proto__` or `prototype` property");return e[t]=n,`skip`}function bl(e,t){return t.value!==void 0&&typeof t.value!=`object`&&t.path.length<e.length}function xl(e,t,n={}){n.modifier||=e=>bl(t,e)?void 0:e.value;let r=Sl(e,t,n.modifier);if(r)return n.value===void 0||n.value(r.value)?r:void 0}function Sl(e,t,n){if(!t.length)return;if(t.includes(`__proto__`)||t.includes(`prototype`))throw Error("Cannot set an object's `__proto__` or `prototype` property");let r=[t[0]],i=e;for(;i&&r.length<t.length;){let e=r[r.length-1],a=n?n({parent:i,key:String(e),value:i[e],path:r.map(e=>String(e)),isLeaf:!1,set:t=>yl(i,e,t)}):i[e];if(a===void 0)return;i=a,r.push(t[r.length])}if(!i)return;let a=t[t.length-1];return{parent:i,key:String(a),value:i[a],path:t.map(e=>String(e)),isLeaf:!0,set:e=>yl(i,a,e)}}function Cl(e,t,n=[]){for(let r in e){let i=e[r],a=typeof i!=`object`||!i,o={parent:e,key:r,value:i,path:n.concat([r]),isLeaf:a,set:t=>yl(e,r,t)},s=t(o);if(s===`abort`)return s;if(s!==`skip`&&!a){let e=Cl(i,t,o.path);if(e===`abort`)return e}}}function wl(e,t){return e===t||e.size===t.size&&[...e].every(e=>t.has(e))}function Tl(e,t){let n=new Map;function r(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e instanceof Set&&t instanceof Set&&!wl(e,t)||e instanceof File&&t instanceof File&&e!==t}function i(e){return e instanceof Date||e instanceof Set||e instanceof File}function a(e,t){let a=t?Sl(t,e.path):void 0;function o(){return n.set(e.path.join(` `),e.path),`skip`}if(i(e.value)&&(!i(a?.value)||r(e.value,a.value)))return o();e.isLeaf&&(!a||e.value!==a.value)&&o()}Cl(e,e=>a(e,t)),Cl(t,t=>a(t,e));let o=Array.from(n.values());return o.sort((e,t)=>e.length-t.length),o}function El(e,t,n){let r=typeof n==`function`;for(let i of t){let t=Sl(e,i,({parent:e,key:t,value:n})=>((n===void 0||typeof n!=`object`)&&(e[t]={}),e[t]));if(t){if(t.key===`__proto__`||t.key===`prototype`)throw Error("Cannot set an object's `__proto__` or `prototype` property");t.parent[t.key]=r?n(i,t):n}}}function Dl(e){return e.toString().split(/[[\].]+/).filter(e=>e)}function Ol(e){return e.reduce((e,t)=>{let n=String(t);return typeof t==`number`||/^\d+$/.test(n)?e+=`[${n}]`:e?e+=`.${n}`:e+=n,e},``)}function kl(e){let t={}.toString.call(e).slice(8,-1);if(t==`Set`)return new Set([...e].map(e=>kl(e)));if(t==`Map`)return new Map([...e].map(e=>[kl(e[0]),kl(e[1])]));if(t==`Date`)return new Date(e.getTime());if(t==`RegExp`)return RegExp(e.source,e.flags);if(t==`Array`||t==`Object`){let n=t==`Object`?Object.create(Object.getPrototypeOf(e)):[];for(let t in e)n[t]=kl(e[t]);return n}return e}function Al(e){return e&&typeof e==`object`?kl(e):e}function jl(e,t){if(typeof e==`boolean`)throw new Wl(`Schema property cannot be defined as boolean.`,t)}var Ml=e=>{if(typeof e==`object`&&e){if(typeof Object.getPrototypeOf==`function`){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)===`[object Object]`}return!1},Nl=(...e)=>e.reduce((e,t)=>{if(t===void 0)return e;if(Array.isArray(t))throw TypeError(`Arguments provided to ts-deepmerge must be objects, not arrays.`);return Object.keys(t).forEach(n=>{[`__proto__`,`constructor`,`prototype`].includes(n)||(Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=Nl.options.mergeArrays?Nl.options.uniqueArrayItems?Array.from(new Set(e[n].concat(t[n]))):[...e[n],...t[n]]:t[n]:Ml(e[n])&&Ml(t[n])?e[n]=Nl(e[n],t[n]):!Ml(e[n])&&Ml(t[n])?e[n]=Nl(t[n],void 0):e[n]=t[n]===void 0?Nl.options.allowUndefinedOverrides?t[n]:e[n]:t[n])}),e},{}),Pl={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Nl.options=Pl,Nl.withOptions=(e,...t)=>{Nl.options=Object.assign(Object.assign({},Pl),e);let n=Nl(...t);return Nl.options=Pl,n};var Fl=[`unix-time`,`bigint`,`any`,`symbol`,`set`,`map`,`int64`,`stringbool`];function Il(e,t,n){jl(e,n);let r=Ll(e,n),i=e.items&&r.includes(`array`)?(Array.isArray(e.items)?e.items:[e.items]).filter(e=>typeof e!=`boolean`):void 0,a=e.additionalProperties&&typeof e.additionalProperties==`object`&&r.includes(`object`)?Object.fromEntries(Object.entries(e.additionalProperties).filter(([,e])=>typeof e!=`boolean`)):void 0,o=e.properties&&r.includes(`object`)?Object.fromEntries(Object.entries(e.properties).filter(([,e])=>typeof e!=`boolean`)):void 0,s=Rl(e)?.filter(e=>e.type!==`null`&&e.const!==null),c={types:r.filter(e=>e!==`null`),isOptional:t,isNullable:r.includes(`null`),schema:e,union:s?.length?s:void 0,array:i,properties:o,additionalProperties:a,required:e.required};return!e.allOf||!e.allOf.length?c:{...Nl.withOptions({allowUndefinedOverrides:!1},c,...e.allOf.map(e=>Il(e,!1,[]))),schema:e}}function Ll(e,t){jl(e,t);let n=e.const===null?[`null`]:[];if(e.type&&(n=Array.isArray(e.type)?e.type:[e.type]),e.anyOf&&(n=e.anyOf.flatMap(e=>Ll(e,t))),e.oneOf&&(n=e.oneOf.flatMap(e=>Ll(e,t))),n.includes(`array`)&&e.uniqueItems){let e=n.findIndex(e=>e===`array`);e!==-1&&(n[e]=`set`)}else if(e.format&&Fl.includes(e.format)){if(n.unshift(e.format),e.format==`unix-time`||e.format==`int64`){let e=n.findIndex(e=>e==`integer`);n.splice(e,1)}if(e.format==`bigint`){let e=n.findIndex(e=>e==`string`);n.splice(e,1)}if(e.format==`stringbool`){let e=n.findIndex(e=>e==`string`);e!==-1&&n.splice(e,1)}}return e.const&&e.const!==null&&typeof e.const!=`function`&&n.push(typeof e.const),Array.from(new Set(n))}function Rl(e){if(!(!e.oneOf&&!e.anyOf)){if(e.oneOf&&e.oneOf.length)return e.oneOf.filter(e=>typeof e!=`boolean`);if(e.anyOf&&e.anyOf.length)return e.anyOf.filter(e=>typeof e!=`boolean`)}}function zl(e,t=!1,n=[]){return Bl(e,t,n)}function Bl(e,t,n){if(!e)throw new Wl(`Schema was undefined`,n);let r=Il(e,t,n);if(!r)return;let i;if(`default`in e)if(r.types.includes(`object`)&&e.default&&typeof e.default==`object`&&!Array.isArray(e.default))i=e.default;else{if(r.types.length>1&&r.types.includes(`unix-time`)&&(r.types.includes(`integer`)||r.types.includes(`number`)))throw new Wl(`Cannot resolve a default value with a union that includes a date and a number/integer.`,n);let[t]=r.types;return Vl(t,e.default)}let a,o=()=>!r.union||r.union.length<2?!1:r.union.some(e=>e.enum)?!0:(a||=new Set(r.types.map(e=>[`integer`,`unix-time`].includes(e)?`number`:e)),a.size>1),s;if(!i&&r.union){let e=r.union.filter(e=>typeof e!=`boolean`&&e.default!==void 0);if(e.length==1)return Bl(e[0],t,n);if(e.length>1)throw new Wl(`Only one default value can exist in a union, or set a default value for the whole union.`,n);if(r.isNullable)return null;if(r.isOptional)return;if(o())throw new Wl(`Multi-type unions must have a default value, or exactly one of the union types must have.`,n);if(r.union.length)if(r.types[0]==`object`)s===void 0&&(s={}),s=r.union.length>1?Nl.withOptions({allowUndefinedOverrides:!0},...r.union.map(e=>Bl(e,t,n))):Bl(r.union[0],t,n);else return Bl(r.union[0],t,n)}if(!i){if(r.isNullable)return null;if(r.isOptional)return}if(r.properties)for(let[e,t]of Object.entries(r.properties)){jl(t,[...n,e]);let a;if(i&&i[e]!==void 0)try{let o=Il(t,!r.required?.includes(e),[...n,e]);if(o){let s=o.types[0];a=s===`object`&&typeof i[e]==`object`&&i[e]!==null&&!Array.isArray(i[e])?Bl({...t,default:i[e]},!r.required?.includes(e),[...n,e]):Vl(s,i[e])}else a=i[e]}catch{a=i[e]}else a=Bl(t,!r.required?.includes(e),[...n,e]);s===void 0&&(s={}),s[e]=a}else if(i)return i;if(e.enum)return e.enum[0];if(`const`in e)return e.const;if(o())throw new Wl(`Default values cannot have more than one type.`,n);if(r.types.length==0)return;let[c]=r.types;return s??Hl(c,e.enum)}function Vl(e,t){switch(e){case`set`:return Array.isArray(t)?new Set(t):t;case`map`:return Array.isArray(t)?new Map(t):t;case`Date`:case`date`:case`unix-time`:if(typeof t==`string`||typeof t==`number`)return new Date(t);break;case`bigint`:if(typeof t==`string`||typeof t==`number`)return BigInt(t);break;case`symbol`:if(typeof t==`string`||typeof t==`number`)return Symbol(t);break}return t}function Hl(e,t){switch(e){case`string`:return t&&t.length>0?t[0]:``;case`number`:case`integer`:return t&&t.length>0?t[0]:0;case`boolean`:return!1;case`array`:return[];case`object`:return{};case`null`:return null;case`Date`:case`date`:case`unix-time`:return;case`int64`:case`bigint`:return BigInt(0);case`stringbool`:return``;case`set`:return new Set;case`map`:return new Map;case`symbol`:return Symbol();case`undefined`:case`any`:return;default:throw new Wl(`Schema type or format not supported, requires explicit default value: `+e)}}var Ul=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},Wl=class e extends Ul{path;constructor(t,n){super((n&&n.length?`[${Array.isArray(n)?n.join(`.`):n}] `:``)+t),this.path=Array.isArray(n)?n.join(`.`):n,Object.setPrototypeOf(this,e.prototype)}};function Gl(e,t){let n={};function r(e){if(`_errors`in n||(n._errors=[]),!Array.isArray(n._errors))if(typeof n._errors==`string`)n._errors=[n._errors];else throw new Ul(`Form-level error was not an array.`);n._errors.push(e.message)}for(let i of e){if(!i.path||i.path.length==1&&!i.path[0]){r(i);continue}let e=!/^\d$/.test(String(i.path[i.path.length-1]))&&xl(t,i.path.filter(e=>/\D/.test(String(e))))?.value,a=Sl(n,i.path,({value:e,parent:t,key:n})=>(e===void 0&&(t[n]={}),t[n]));if(!a){r(i);continue}let{parent:o,key:s}=a;e?(s in o||(o[s]={}),`_errors`in o[s]?o[s]._errors.push(i.message):o[s]._errors=[i.message]):s in o?o[s].push(i.message):o[s]=[i.message]}return n}function Kl(e,t,n){return n?e:(Cl(t,e=>{Array.isArray(e.value)&&e.set(void 0)}),Cl(e,e=>{!Array.isArray(e.value)&&e.value!==void 0||El(t,[e.path],e.value)}),t)}function ql(e){return Jl(e,[])}function Jl(e,t){return Object.entries(e).filter(([,e])=>e!==void 0).flatMap(([n,r])=>Array.isArray(r)&&r.length>0?{path:Ol(t.concat([n])),messages:r}:Jl(e[n],t.concat([n])))}function Yl(e){e.flashMessage&&Xl(e)&&(document.cookie=`flash=; Max-Age=0; Path=${e.flashMessage.cookiePath??`/`};`)}function Xl(e){return e.flashMessage?e.syncFlashMessage:!1}var Zl=`noCustomValidity`;async function Ql(e,t){`setCustomValidity`in e&&e.setCustomValidity(``),!(Zl in e.dataset)&&eu(e,t)}function $l(e,t){for(let n of e.querySelectorAll(`input,select,textarea,button`)){if(`dataset`in n&&Zl in n.dataset||!n.name)continue;let e=Sl(t,Dl(n.name)),r=e&&typeof e.value==`object`&&`_errors`in e.value?e.value._errors:e?.value;if(eu(n,r),r)return}}function eu(e,t){if(!(`setCustomValidity`in e))return;let n=t&&t.length?t.join(`
|
|
280
|
+
`):``;e.setCustomValidity(n),n&&e.reportValidity()}var tu=(e,t=0)=>{let n=e.getBoundingClientRect();return n.top>=t&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)},nu=(e,t=1.125,n=`smooth`)=>{let r=e.getBoundingClientRect().top+window.pageYOffset-window.innerHeight/(2*t);window.scrollTo({left:0,top:r,behavior:n})},ru=[`checkbox`,`radio`,`range`,`file`];function iu(e){return{immediate:!!e&&(e instanceof HTMLSelectElement||e instanceof HTMLInputElement&&ru.includes(e.type)),multiple:!!e&&e instanceof HTMLSelectElement&&e.multiple,file:!!e&&e instanceof HTMLInputElement&&e.type==`file`}}var au;(function(e){e[e.Idle=0]=`Idle`,e[e.Submitting=1]=`Submitting`,e[e.Delayed=2]=`Delayed`,e[e.Timeout=3]=`Timeout`})(au||={});var ou=new Set;function su(e,t,n){let r=au.Idle,i,a,o=ou;function s(){c(),u(r==au.Delayed?au.Delayed:au.Submitting),i=window.setTimeout(()=>{i&&r==au.Submitting&&u(au.Delayed)},n.delayMs),a=window.setTimeout(()=>{a&&r==au.Delayed&&u(au.Timeout)},n.timeoutMs),o.add(c)}function c(){clearTimeout(i),clearTimeout(a),i=a=0,o.delete(c),u(au.Idle)}function l(){o.forEach(e=>e()),o.clear()}function u(e){r=e,t.submitting.set(r>=au.Submitting),t.delayed.set(r>=au.Delayed),t.timeout.set(r>=au.Timeout)}let d=e;function f(e){let t=e.target;n.selectErrorText&&t.select()}function p(){n.selectErrorText&&d.querySelectorAll(`input`).forEach(e=>{e.addEventListener(`invalid`,f)})}function m(){n.selectErrorText&&d.querySelectorAll(`input`).forEach(e=>e.removeEventListener(`invalid`,f))}let h=e;{p();let e=!1,t=e=>{e.clearAll?l():c(),e.cancelled||setTimeout(()=>cu(h,n),1)};return ge(()=>{m(),t({cancelled:!0})}),Ne(()=>{m(),e||t({cancelled:!1})}),{submitting(){s()},completed:t,scrollToFirstError(){setTimeout(()=>cu(h,n),1)},isSubmitting:()=>r===au.Submitting||r===au.Delayed,setProcessingEvents(t){e=t}}}}var cu=async(e,t)=>{if(t.scrollToError==`off`)return;let n=t.errorSelector;if(!n)return;await te();let r;if(r=e.querySelector(n),!r)return;r=r.querySelector(n)??r;let i=t.stickyNavbar?document.querySelector(t.stickyNavbar):null;typeof t.scrollToError==`string`?tu(r,i?.offsetHeight??0)||nu(r,void 0,t.scrollToError):r.scrollIntoView(t.scrollToError);function a(e){return typeof t.autoFocusOnError==`boolean`?t.autoFocusOnError:!/iPhone|iPad|iPod|Android/i.test(e)}if(!a(navigator.userAgent))return;let o;if(o=r,[`INPUT`,`SELECT`,`BUTTON`,`TEXTAREA`].includes(o.tagName)||(o=o.querySelector(`input:not([type="hidden"]):not(.flatpickr-input), select, textarea`)),o)try{o.focus({preventScroll:!0}),t.selectErrorText&&o.tagName==`INPUT`&&o.select()}catch{}};function lu(e,t,n){let r=Sl(e,t,({parent:e,key:t,value:n})=>(n===void 0&&(e[t]=/\D/.test(t)?{}:[]),e[t]));if(r){let e=n(r.value);r.parent[r.key]=e}return e}function uu(e,t,n){let r=e.form,i=Dl(t),a=he(r,e=>Sl(e,i)?.value);return{subscribe(...e){let t=a.subscribe(...e);return()=>t()},update(e,t){r.update(t=>lu(t,i,e),t??n)},set(e,t){r.update(t=>lu(t,i,()=>e),t??n)}}}function du(e,t){let n=`form`in e;if(!n&&t?.taint!==void 0)throw new Ul(`If options.taint is set, the whole superForm object must be used as a proxy.`);return n}function fu(e,t,n){let r=Dl(t);if(du(e,n))return uu(e,t,n);let i=he(e,e=>Sl(e,r)?.value);return{subscribe(...e){let t=i.subscribe(...e);return()=>t()},update(t){e.update(e=>lu(e,r,t))},set(t){e.update(e=>lu(e,r,()=>t))}}}function pu(e,t=[]){let n=mu(e,t);if(!n)throw new Wl(`No shape could be created for schema. If using Zod v4, import { zod4 } from "sveltekit-superforms/adapters" instead of { zod }.`,t);return n}function mu(e,t){jl(e,t);let n=Il(e,!1,t);if(n.array||n.union){let e=n.array||[],r=n.union||[];return e.concat(r).reduce((e,n)=>{let r=mu(n,t);return r&&(e={...e??{},...r}),e},e.length?{}:void 0)}if(n.properties){let e={};for(let[r,i]of Object.entries(n.properties)){let n=mu(i,[...t,r]);n&&(e[r]=n)}return e}return n.types.includes(`array`)||n.types.includes(`object`)?{}:void 0}function hu(e){let t={},n=Array.isArray(e);for(let[r,i]of Object.entries(e))!i||typeof i!=`object`||(n?t={...t,...hu(i)}:t[r]=hu(i));return t}var gu=new WeakMap,_u=new WeakMap,vu=e=>{throw e.result.error},yu={applyAction:!0,invalidateAll:!0,resetForm:!0,autoFocusOnError:`detect`,scrollToError:`smooth`,errorSelector:`[aria-invalid="true"],[data-invalid]`,selectErrorText:!1,stickyNavbar:void 0,taintedMessage:!1,onSubmit:void 0,onResult:void 0,onUpdate:void 0,onUpdated:void 0,onError:vu,dataType:`form`,validators:void 0,customValidity:!1,clearOnSubmit:`message`,delayMs:500,timeoutMs:8e3,multipleSubmits:`prevent`,SPA:void 0,validationMethod:`auto`};function bu(e){return`Duplicate form id's found: "${e}". Multiple forms will receive the same data. Use the id option to differentiate between them, or if this is intended, set the warnings.duplicateId option to false in superForm to disable this warning. More information: https://superforms.rocks/concepts/multiple-forms`}var xu=!1;try{SUPERFORMS_LEGACY&&(xu=!0)}catch{}var Su=!1;try{globalThis.STORIES&&(Su=!0)}catch{}function Cu(e,t){let n,r=t??{},i;{if((r.legacy??xu)&&(r.resetForm===void 0&&(r.resetForm=!1),r.taintedMessage===void 0&&(r.taintedMessage=!0)),Su&&r.applyAction===void 0&&(r.applyAction=!1),typeof r.SPA==`string`&&(r.invalidateAll===void 0&&(r.invalidateAll=!1),r.applyAction===void 0&&(r.applyAction=!1)),i=r.validators,r={...yu,...r},(r.SPA===!0||typeof r.SPA==`object`)&&r.validators===void 0&&console.warn(`No validators set for superForm in SPA mode. Add a validation adapter to the validators option, or set it to false to disable this warning.`),!e)throw new Ul(`No form data sent to superForm. Make sure the output from superValidate is used (usually data.form) and that it's not null or undefined. Alternatively, an object with default values for the form can also be used, but then constraints won't be available.`);l(e)===!1&&(e={id:r.id??Math.random().toString(36).slice(2,10),valid:!1,posted:!1,errors:{},data:e,shape:hu(e)}),e=e;let t=e.id=r.id??e.id,a=ue(_l)??(Su?{}:void 0);if(r.warnings?.duplicateId!==!1)if(!gu.has(a))gu.set(a,new Set([t]));else{let e=gu.get(a);e?.has(t)?console.warn(bu(t)):e?.add(t)}if(_u.has(e)||_u.set(e,e),n=_u.get(e),e=Al(n),ge(()=>{ze(),xe(),We();for(let e of Object.values(Je))e.length=0;gu.get(a)?.delete(t)}),r.dataType!==`json`){let t=(e,n)=>{if(!(!n||typeof n!=`object`)){if(Array.isArray(n))n.length>0&&t(e,n[0]);else if(!(n instanceof Date)&&!(n instanceof File)&&!(n instanceof FileList))throw new Ul(`Object found in form field "${e}". Set the dataType option to "json" and add use:enhance to use nested data structures. More information: https://superforms.rocks/concepts/nested-data`)}};for(let[n,r]of Object.entries(e.data))t(n,r)}}let a={formId:e.id,form:Al(e.data),constraints:e.constraints??{},posted:e.posted,errors:Al(e.errors),message:Al(e.message),tainted:void 0,valid:e.valid,submitting:!1,shape:e.shape},o=a,s=ie(r.id??e.id);function c(e){return Object.values(e).filter(e=>l(e)!==!1)}function l(e){return!e||typeof e!=`object`||!(`valid`in e&&`errors`in e&&typeof e.valid==`boolean`)?!1:`id`in e&&typeof e.id==`string`?e.id:!1}let u=ie(e.data),d={subscribe:u.subscribe,set:(e,t={})=>{let n=Al(e);return Ae(n,t.taint??!0),u.set(n)},update:(e,t={})=>u.update(n=>{let r=e(n);return Ae(r,t.taint??!0),r})};function f(){return r.SPA===!0||typeof r.SPA==`object`}function p(e){return e>400?e:(typeof r.SPA==`boolean`||typeof r.SPA==`string`?void 0:r.SPA?.failStatus)||e}async function m(e={}){let t=e.formData??o.form,n={},a,s=e.adapter??r.validators;if(typeof s==`object`){if(s!=i&&!(`jsonSchema`in s))throw new Ul(`Client validation adapter found in options.validators. A full adapter must be used when changing validators dynamically, for example "zod" instead of "zodClient".`);if(a=await s.validate(t),!a.success)n=Gl(a.issues,s.shape??o.shape??{});else if(e.recheckValidData!==!1)return m({...e,recheckValidData:!1})}else a={success:!0,data:{}};let c={...o.form,...t,...a.success?a.data:{}};return{valid:a.success,posted:!1,errors:n,data:c,constraints:o.constraints,message:void 0,id:o.formId,shape:o.shape}}function h(e){if(!r.onChange||!e.paths.length||e.type==`blur`)return;let t,n=e.paths.map(Ol);t=e.type&&e.paths.length==1&&e.formElement&&e.target instanceof Element?{path:n[0],paths:n,formElement:e.formElement,target:e.target,set(e,t,n){fu({form:d},e,n).set(t)},get(e){return ue(fu(d,e))}}:{paths:n,target:void 0,set(e,t,n){fu({form:d},e,n).set(t)},get(e){return ue(fu(d,e))}},r.onChange(t)}async function g(e,t=!1,n){e&&(r.validators==`clear`&&_e.update(t=>(El(t,e.paths,void 0),t)),setTimeout(()=>h(e)));let i=!1;if(t||(r.validationMethod==`onsubmit`||r.validationMethod==`submit-only`||r.validationMethod==`onblur`&&e?.type==`input`||r.validationMethod==`oninput`&&e?.type==`blur`)&&(i=!0),i||!e||!r.validators||r.validators==`clear`){if(e?.paths){let t=e?.formElement??Ve();t&&ee(t)}return}let a=await m({adapter:n});return a.valid&&(e.immediate||e.type!=`input`)&&d.set(a.data,{taint:`ignore`}),await te(),ne(a.errors,e,t),a}function ee(e){let t=new Map;if(r.customValidity&&e)for(let n of e.querySelectorAll(`[name]`)){if(typeof n.name!=`string`||!n.name.length)continue;let e=`validationMessage`in n?String(n.validationMessage):``;t.set(n.name,{el:n,message:e}),Ql(n,void 0)}return t}async function ne(e,t,n){let{type:i,immediate:a,multiple:s,paths:c}=t,l=o.errors,u={},d=new Map,f=t.formElement??Ve();f&&(d=ee(f)),Cl(e,e=>{if(!Array.isArray(e.value))return;let t=[...e.path];t[t.length-1]==`_errors`&&t.pop();let o=t.join(`.`),f=e.path[e.path.length-1]==`_errors`,p=e.value&&c.some(e=>f?t&&e&&t.length>0&&t[0]==e[0]:o==e.join(`.`));function m(){if(El(u,[e.path],e.value),r.customValidity&&p&&d.has(o)){let{el:t,message:n}=d.get(o);n!=e.value&&(setTimeout(()=>Ql(t,e.value)),d.clear())}}if(n||p&&r.validationMethod==`oninput`||a&&!s&&p)return m();if(s){let t=xl(ue(_e),e.path.slice(0,-1));if(t?.value&&typeof t?.value==`object`){for(let e of Object.values(t.value))if(Array.isArray(e))return m()}}let h=xl(l,e.path);if(h&&h.key in h.parent)return m();if(f){if(r.validationMethod==`oninput`||i==`blur`&&Te(Ol(e.path.slice(0,-1))))return m()}else if(i==`blur`&&p)return m()}),_e.set(u)}function re(e,t={}){return t.keepFiles&&Cl(o.form,t=>{if(!(t.parent instanceof FileList)&&(t.value instanceof File||t.value instanceof FileList)){let n=xl(e,t.path);(!n||!(n.key in n.parent))&&El(e,[t.path],t.value)}}),d.set(e,t)}function _(e,t){return e&&t&&r.resetForm&&(r.resetForm===!0||r.resetForm())}function ae(e=!0){let t=o.form,n=o.tainted;if(e){let e=Xe(o.form);t=e.data;let r=e.paths;r.length&&(n=Al(n)??{},El(n,r,!1))}return{valid:o.valid,posted:o.posted,errors:o.errors,data:t,constraints:o.constraints,message:o.message,id:o.formId,tainted:n,shape:o.shape}}async function oe(e,t){e.valid&&t&&_(e.valid,t)?se({message:e.message,posted:!0}):qe({form:e,untaint:t,keepFiles:!0,pessimisticUpdate:r.invalidateAll==`force`||r.invalidateAll==`pessimistic`}),Je.onUpdated.length&&await te();for(let t of Je.onUpdated)t({form:e})}function se(e={}){e.newState&&(n.data={...n.data,...e.newState});let t=Al(n);t.data={...t.data,...e.data},e.id!==void 0&&(t.id=e.id);let r=Al(a.tainted),i={};if(r&&e.data)for(let t in r)t in e.data&&(i[t]=r[t]);qe({form:t,untaint:Object.keys(i).length>0?i:!0,message:e.message,keepFiles:!1,posted:e.posted,resetted:!0})}async function ce(e){if(e.type==`error`)throw new Ul(`ActionResult of type "${e.type}" cannot be passed to update function.`);if(e.type==`redirect`){_(!0,!0)&&se({posted:!0});return}if(typeof e.data!=`object`)throw new Ul(`Non-object validation data returned from ActionResult.`);let t=c(e.data);if(!t.length)throw new Ul(`No form data returned from ActionResult. Make sure you return { form } in the form actions.`);for(let n of t)n.id===o.formId&&await oe(n,e.status>=200&&e.status<300)}let v=ie(a.message),de=ie(a.constraints),fe=ie(a.posted),pe=ie(a.shape),me=ie(e.errors),_e={subscribe:me.subscribe,set(e,t){return me.set(Kl(e,o.errors,t?.force))},update(e,t){return me.update(n=>Kl(e(n),o.errors,t?.force))},clear:()=>_e.set({})},y=null;function ve(e){y&&e&&Object.keys(e).length==1&&e.paths?.length&&y.target&&y.target instanceof HTMLInputElement&&y.target.type.toLowerCase()==`file`?y.paths=e.paths:y=e,setTimeout(()=>{g(y)},0)}function ye(e,t,n,r,i){y===null&&(y={paths:[]}),y.type=e,y.immediate=t,y.multiple=n,y.formElement=r,y.target=i}function be(){return y?.paths??[]}function xe(){y=null}let b={defaultMessage:`Leave page? Changes that you made may not be saved.`,state:ie(),message:r.taintedMessage,clean:Al(e.data),forceRedirection:!1};function x(){return r.taintedMessage&&!o.submitting&&!b.forceRedirection&&Ee()}function S(e){if(!x())return;e.preventDefault(),e.returnValue=``;let{taintedMessage:t}=r,n=typeof t==`function`||t===!0?b.defaultMessage:t;return(e||window.event).returnValue=n||b.defaultMessage,n}async function Se(e){if(!x())return;let{taintedMessage:t}=r,n=typeof t==`function`;if(n&&e.cancel(),e.type===`leave`)return;let i=n||t===!0?b.defaultMessage:t,a;try{a=n?await t(e):window.confirm(i||b.defaultMessage)}catch{a=!1}if(a&&e.to)try{b.forceRedirection=!0,await De(e.to.url,{...e.to.params});return}finally{b.forceRedirection=!1}else !a&&!n&&e.cancel()}function Ce(){r.taintedMessage=b.message}function we(){return b.state}function Te(e){if(!o.tainted)return!1;if(!e)return!!o.tainted;let t=xl(o.tainted,Dl(e));return!!t&&t.key in t.parent}function Ee(e){return arguments.length?typeof e==`boolean`?e:typeof e==`object`?Oe(e):!o.tainted||e===void 0?!1:Oe(xl(o.tainted,Dl(e))?.value):Oe(o.tainted)}function Oe(e){if(!e)return!1;if(typeof e==`object`){for(let t of Object.values(e))if(Oe(t))return!0}return e===!0}function Ae(e,t){if(t==`ignore`)return;let n=Tl(e,o.form),r=Tl(e,b.clean).map(e=>e.join());n.length&&(b.state.update(i=>(i||={},El(i,n,(n,i)=>{if(!r.includes(n.join()))return;let a=Sl(e,n),o=Sl(b.clean,n);return a&&o&&a.value===o.value?void 0:t===!0?!0:t===`untaint`?void 0:i.value}),i)),ve({paths:n})),(t==`untaint-all`||t==`untaint-form`)&&b.state.set(void 0)}function Ne(e,t){b.state.set(e),t&&(b.clean=t)}let Pe=ie(!1),Fe=ie(!1),Ie=ie(!1),Le=[b.state.subscribe(e=>a.tainted=Al(e)),d.subscribe(e=>a.form=Al(e)),_e.subscribe(e=>a.errors=Al(e)),s.subscribe(e=>a.formId=e),de.subscribe(e=>a.constraints=e),fe.subscribe(e=>a.posted=e),v.subscribe(e=>a.message=e),Pe.subscribe(e=>a.submitting=e),pe.subscribe(e=>a.shape=e)];function Re(e){Le.push(e)}function ze(){Le.forEach(e=>e())}let Be;function Ve(){return Be}function He(e){Be=document.createElement(`form`),Be.method=`POST`,Be.action=e,Ye(Be),document.body.appendChild(Be)}function Ue(e){Be&&(Be.action=e)}function We(){Be?.parentElement&&Be.remove(),Be=void 0}let Ke=he(_e,e=>e?ql(e):[]);r.taintedMessage=void 0;function qe(e){let t=e.form,n=e.message??t.message;if((e.untaint||e.resetted)&&Ne(typeof e.untaint==`boolean`?void 0:e.untaint,t.data),e.pessimisticUpdate||re(t.data,{taint:`ignore`,keepFiles:e.keepFiles}),v.set(n),e.resetted?_e.update(()=>({}),{force:!0}):_e.set(t.errors),s.set(t.id),fe.set(e.posted??t.posted),t.constraints&&de.set(t.constraints),t.shape&&pe.set(t.shape),a.valid=t.valid,r.flashMessage&&Xl(r)){let e=r.flashMessage.module.getFlash(_l);n&&ue(e)===void 0&&e.set(n)}}let Je={onSubmit:r.onSubmit?[r.onSubmit]:[],onResult:r.onResult?[r.onResult]:[],onUpdate:r.onUpdate?[r.onUpdate]:[],onUpdated:r.onUpdated?[r.onUpdated]:[],onError:r.onError?[r.onError]:[]};window.addEventListener(`beforeunload`,S),ge(()=>{window.removeEventListener(`beforeunload`,S)}),ke(Se),Re(_l.subscribe(async e=>{Su&&e===void 0&&(e={status:200});let t=e.status>=200&&e.status<300;if(r.applyAction&&e.form&&typeof e.form==`object`){let n=e.form;if(n.type===`error`)return;for(let e of c(n)){let n=_u.has(e);e.id!==o.formId||n||(_u.set(e,e),await oe(e,t))}}else if(r.applyAction!==`never`&&e.data&&typeof e.data==`object`)for(let i of c(e.data)){let e=_u.has(i);if(i.id!==o.formId||e)continue;(r.invalidateAll===`force`||r.invalidateAll===`pessimistic`)&&(n.data=i.data);let a=_(i.valid,!0);qe({form:i,untaint:t,keepFiles:!a,resetted:a})}})),typeof r.SPA==`string`&&He(r.SPA);function Ye(t,n){if(r.SPA!==void 0&&t.method==`get`&&(t.method=`post`),typeof r.SPA==`string`?r.SPA.length&&t.action==document.location.href&&(t.action=r.SPA):Be=t,n){if(n.onError){if(r.onError===`apply`)throw new Ul(`options.onError is set to "apply", cannot add any onError events.`);if(n.onError===`apply`)throw new Ul(`Cannot add "apply" as onError event in use:enhance.`);Je.onError.push(n.onError)}n.onResult&&Je.onResult.push(n.onResult),n.onSubmit&&Je.onSubmit.push(n.onSubmit),n.onUpdate&&Je.onUpdate.push(n.onUpdate),n.onUpdated&&Je.onUpdated.push(n.onUpdated)}Ce();let i;async function a(e){let n=iu(e.target);n.immediate&&!n.file&&await new Promise(e=>setTimeout(e,0)),i=be(),ye(`input`,n.immediate,n.multiple,t,e.target??void 0)}async function s(e){if(o.submitting||!i||be()!=i)return;let n=iu(e.target);n.immediate&&!n.file&&await new Promise(e=>setTimeout(e,0)),i!==void 0&&(g({paths:i,immediate:n.multiple,multiple:n.multiple,type:`blur`,formElement:t,target:e.target??void 0}),i=void 0)}t.addEventListener(`focusout`,s),t.addEventListener(`input`,a),ge(()=>{t.removeEventListener(`focusout`,s),t.removeEventListener(`input`,a)});let l=su(t,{submitting:Pe,delayed:Fe,timeout:Ie},r),u,d,h=Ge(t,async n=>{let a,s=r.validators,h={...n,jsonData(e){if(r.dataType!==`json`)throw new Ul(`options.dataType must be set to 'json' to use jsonData.`);a=e},validators(e){s=e},customRequest(e){d=e}},g=h.cancel,ee=!1;function te(e){let t={...e,posted:!0},n=t.valid?200:p(400),r={form:t},i=t.valid?{type:`success`,status:n,data:r}:{type:`failure`,status:n,data:r};setTimeout(()=>oe({result:i}),0)}function ne(){switch(r.clearOnSubmit){case`errors-and-message`:_e.clear(),v.set(void 0);break;case`errors`:_e.clear();break;case`message`:v.set(void 0);break}}async function re(t,n){if(t.status=n,r.onError!==`apply`){let n={result:t,message:v,form:e};for(let e of Je.onError)e!==`apply`&&(e!=vu||!r.flashMessage?.onError)&&await e(n)}r.flashMessage&&r.flashMessage.onError&&await r.flashMessage.onError({result:t,flashMessage:r.flashMessage.module.getFlash(_l)}),r.applyAction&&(r.onError==`apply`?await Me(t):await Me({type:`failure`,status:p(t.status),data:t}))}function ie(e={resetTimers:!0}){return ee=!0,e.resetTimers&&l.isSubmitting()&&l.completed({cancelled:ee}),g()}if(h.cancel=ie,l.isSubmitting()&&r.multipleSubmits==`prevent`)ie({resetTimers:!1});else{l.isSubmitting()&&r.multipleSubmits==`abort`&&u&&u.abort(),l.submitting(),u=h.controller;for(let e of Je.onSubmit)try{await e(h)}catch(e){ie(),re({type:`error`,error:e},500)}}if(ee&&r.flashMessage&&Yl(r),!ee){let e=!f()&&(t.noValidate||(h.submitter instanceof HTMLButtonElement||h.submitter instanceof HTMLInputElement)&&h.submitter.formNoValidate),n,c=async()=>await m({adapter:s});if(ne(),e||(n=await c(),n.valid||(ie({resetTimers:!1}),te(n))),!ee){r.flashMessage&&(r.clearOnSubmit==`errors-and-message`||r.clearOnSubmit==`message`)&&Xl(r)&&r.flashMessage.module.getFlash(_l).set(void 0);let e=`formData`in h?h.formData:h.data;if(i=void 0,f())n||=await c(),ie({resetTimers:!1}),te(n);else if(r.dataType===`json`){n||=await c();let t=Al(a??n.data);Cl(t,t=>{if(t.value instanceof File){let n=`__superform_file_`+Ol(t.path);return e.append(n,t.value),t.set(void 0)}else if(Array.isArray(t.value)&&t.value.length&&t.value.every(e=>e instanceof File)){let n=`__superform_files_`+Ol(t.path);for(let r of t.value)e.append(n,r);return t.set(void 0)}}),Object.keys(t).forEach(t=>{typeof e.get(t)==`string`&&e.delete(t)});let i=ae(it(t,r.transport?Object.fromEntries(Object.entries(r.transport).map(([e,t])=>[e,t.encode])):void 0),r.jsonChunkSize??5e5);for(let t of i)e.append(`__superform_json`,t)}if(!e.has(`__superform_id`)){let t=o.formId;t!==void 0&&e.set(`__superform_id`,t)}typeof r.SPA==`string`&&Ue(r.SPA)}}function ae(e,t){let n=Math.ceil(e.length/t),r=Array(n);for(let i=0,a=0;i<n;++i,a+=t)r[i]=e.substring(a,a+t);return r}async function oe(e){let n=!1;u=null;let i=`type`in e.result&&`status`in e.result?e.result:{type:`error`,status:p(parseInt(String(e.result.status))||500),error:e.result.error instanceof Error?e.result.error:e.result},a=()=>n=!0,s={result:i,formEl:t,formElement:t,cancel:a},d=Su||!f()?()=>{}:vl.subscribe(e=>{!e||e.from?.route.id===e.to?.route.id||a()});function m(e,t,n){t.result={type:`error`,error:e,status:p(n)}}l.setProcessingEvents(!0);for(let e of Je.onResult)try{await e(s)}catch(e){m(e,s,Math.max(i.status??500,400))}if(i=s.result,!n){if((i.type===`success`||i.type===`failure`)&&i.data){let e=c(i.data);if(!e.length)throw new Ul(`No form data returned from ActionResult. Make sure you return { form } in the form actions.`);for(let a of e){if(a.id!==o.formId)continue;let e={form:a,formEl:t,formElement:t,cancel:()=>n=!0,result:i};for(let t of Je.onUpdate)try{await t(e)}catch(t){m(t,e,Math.max(i.status??500,400))}i=e.result,n||(r.customValidity&&$l(t,e.form.errors),_(e.form.valid,i.type==`success`)&&e.formElement.querySelectorAll(`input[type="file"]`).forEach(e=>e.value=``))}}n||(i.type===`error`?await re(i,Math.max(i.status??500,400)):(i.type===`success`&&r.invalidateAll&&await je(),r.applyAction?await Me(i):await ce(i)))}if(l.setProcessingEvents(!1),n&&r.flashMessage&&Yl(r),n||i.type!=`redirect`)l.completed({cancelled:n});else if(Su)l.completed({cancelled:n,clearAll:!0});else{let e=vl.subscribe(t=>{t||(setTimeout(()=>{try{e&&e()}catch{}}),l.isSubmitting()&&l.completed({cancelled:n,clearAll:!0}))})}d()}if(!ee&&d){g();let e=await d(n),t;t=e instanceof Response?nt(await e.text()):e instanceof XMLHttpRequest?nt(e.responseText):e,t.type===`error`&&(t.status=e.status),oe({result:t})}return oe});return{destroy:()=>{for(let[e,t]of Object.entries(Je))Je[e]=t.filter(t=>t===r[e]);h.destroy()}}}function Xe(e){let t=[];if(Cl(e,e=>{if(e.value instanceof File||Array.isArray(e.value)&&e.value.length&&e.value.every(e=>e instanceof File))return t.push(e.path),`skip`}),!t.length)return{data:e,paths:t};let r=Al(e);return El(r,t,e=>xl(n.data,e)?.value),{data:r,paths:t}}return{form:d,formId:s,errors:_e,message:v,constraints:de,tainted:we(),submitting:le(Pe),delayed:le(Fe),timeout:le(Ie),options:r,capture:ae,restore:(e=>{qe({form:e,untaint:e.tainted??!0})}),async validate(e,t={}){if(!r.validators)throw new Ul(`options.validators must be set to use the validate method.`);t.update===void 0&&(t.update=!0),t.taint===void 0&&(t.taint=!1),typeof t.errors==`string`&&(t.errors=[t.errors]);let n,i=Dl(e);`value`in t?t.update===!0||t.update===`value`?(d.update(e=>(El(e,[i],t.value),e),{taint:t.taint}),n=o.form):(n=Al(o.form),El(n,[i],t.value)):n=o.form;let a=xl((await m({formData:n})).errors,i);return a&&a.value&&t.errors&&(a.value=t.errors),(t.update===!0||t.update==`errors`)&&_e.update(e=>(El(e,[i],a?.value),e)),a?.value},async validateForm(e={}){if(!r.validators&&!e.schema)throw new Ul(`options.validators or the schema option must be set to use the validateForm method.`);let t=e.update?await g({paths:[]},!0,e.schema):m({adapter:e.schema}),n=Ve();return e.update&&n&&setTimeout(()=>{n&&cu(n,{...r,scrollToError:e.focusOnError===!1?`off`:r.scrollToError})},1),t||m({adapter:e.schema})},allErrors:Ke,posted:fe,reset(e){return se({message:e?.keepMessage?o.message:void 0,data:e?.data,id:e?.id,newState:e?.newState})},submit(e){let t=Ve()?Ve():e&&e instanceof HTMLElement?e.closest(`form`):void 0;if(!t)throw new Ul(`use:enhance must be added to the form to use submit, or pass a HTMLElement inside the form (or the form itself) as an argument.`);if(!t.requestSubmit)return t.submit();let n=e&&(e instanceof HTMLButtonElement&&e.type==`submit`||e instanceof HTMLInputElement&&[`submit`,`image`].includes(e.type));t.requestSubmit(n?e:void 0)},isTainted:Ee,enhance:Ye}}function wu(e,t,n){e&&`superFormValidationLibrary`in e&&(n=t,t=e,e=null);let r=t,i=n?.defaults??r.defaults;return{id:n?.id??r.id??``,valid:!1,posted:!1,errors:{},data:{...i,...e},constraints:r.constraints,shape:r.shape}}function Tu(e){return Du(Il(e,!1,[]),[])}function Eu(...e){let t=e.filter(e=>!!e);if(t.length)return t.length==1?t[0]:Nl(...t)}function Du(e,t){if(!e)return;let n;if(e.union&&e.union.length){let r=e.union.map(n=>Il(n,e.isOptional,t)),i=r.map(e=>Du(e,t));n=Eu(n,...i),n&&(e.isNullable||e.isOptional||r.some(e=>e?.isNullable||e?.isOptional))&&delete n.required}if(e.array&&(n=Eu(n,...e.array.map(n=>Du(Il(n,e.isOptional,t),t)))),e.properties){let r={};for(let[n,i]of Object.entries(e.properties)){let a=Du(Il(i,!e.required?.includes(n)||i.default!==void 0,[n]),[...t,n]);typeof a==`object`&&Object.values(a).length>0&&(r[n]=a)}n=Eu(n,r)}return n??Ou(e)}function Ou(e){let t={},n=e.schema,r=n.type,i=n.format;if(r==`integer`&&i==`unix-time`){let e=n;e.minimum!==void 0&&(t.min=new Date(e.minimum).toISOString()),e.maximum!==void 0&&(t.max=new Date(e.maximum).toISOString())}else if(r==`string`){let e=n,r=[e.pattern,...e.allOf?e.allOf.map(e=>typeof e==`boolean`?void 0:e.pattern):[]].filter(e=>e!==void 0);r.length>0&&(t.pattern=r[0]),e.minLength!==void 0&&(t.minlength=e.minLength),e.maxLength!==void 0&&(t.maxlength=e.maxLength)}else if(r==`number`||r==`integer`){let e=n;e.minimum===void 0?e.exclusiveMinimum!==void 0&&(t.min=e.exclusiveMinimum+(r==`integer`?1:Number.MIN_VALUE)):t.min=e.minimum,e.maximum===void 0?e.exclusiveMaximum!==void 0&&(t.max=e.exclusiveMaximum-(r==`integer`?1:Number.MIN_VALUE)):t.max=e.maximum,e.multipleOf!==void 0&&(t.step=e.multipleOf)}else if(r==`array`){let e=n;e.minItems!==void 0&&(t.min=e.minItems),e.maxItems!==void 0&&(t.max=e.maxItems)}return!e.isNullable&&!e.isOptional&&(t.required=!0),Object.keys(t).length>0?t:void 0}function ku(e){return ju(Au(Il(e,!1,[]),0,[]))}function Au(e,t,n){if(!e)return``;function r(){return` `.repeat(t)}function i(r){return r.map(r=>Au(Il(r,e?.isOptional??!1,n),t+1,n)).filter(e=>e).join(`|`)}function a(){let t=[];return e?.isNullable&&t.push(`null`),e?.isOptional&&t.push(`undefined`),t.length?`|`+t.join(`|`):``}if(e.union)return`Union {
|
|
281
|
+
`+r()+i(e.union)+`
|
|
282
|
+
`+r()+`}`+a();if(e.properties){let i=[];for(let[r,a]of Object.entries(e.properties)){let o=Il(a,!e.required?.includes(r)||a.default!==void 0,[r]);i.push(r+`: `+Au(o,t+1,n))}return`Object {
|
|
283
|
+
`+r()+i.join(`,
|
|
284
|
+
`)+`
|
|
285
|
+
`+r()+`}`+a()}return e.array?`Array[`+i(e.array)+`]`+a():e.types.join(`|`)+a()}function ju(e){let t=0;for(let n=0,r=e.length;n<r;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t<0&&(t>>>=0),t.toString(36)}function Mu(e,t){if(!e||!(`superFormValidationLibrary`in e))throw new Ul(`Superforms v2 requires a validation adapter for the schema. Import one of your choice from "sveltekit-superforms/adapters" and wrap the schema with it.`);return t||=e.jsonSchema,{...e,constraints:e.constraints??Tu(t),defaults:e.defaults??zl(t),shape:pu(t),id:ku(t)}}try{SUPERFORMS_LEGACY}catch{}var Nu=de(((e,t)=>{function n(e){return typeof e!=`object`&&typeof e!=`function`||e===null}function r(){this.childBranches=new WeakMap,this.primitiveKeys=new Map,this.hasValue=!1,this.value=void 0}r.prototype.has=function(e){var t=n(e)?this.primitiveKeys.get(e):e;return t?this.childBranches.has(t):!1},r.prototype.get=function(e){var t=n(e)?this.primitiveKeys.get(e):e;return t?this.childBranches.get(t):void 0},r.prototype.resolveBranch=function(e){if(this.has(e))return this.get(e);var t=new r,n=this.createKey(e);return this.childBranches.set(n,t),t},r.prototype.setValue=function(e){return this.hasValue=!0,this.value=e},r.prototype.createKey=function(e){if(n(e)){var t={};return this.primitiveKeys.set(e,t),t}return e},r.prototype.clear=function(){if(arguments.length===0)this.childBranches=new WeakMap,this.primitiveKeys.clear(),this.hasValue=!1,this.value=void 0;else if(arguments.length===1){var e=arguments[0];if(n(e)){var t=this.primitiveKeys.get(e);t&&(this.childBranches.delete(t),this.primitiveKeys.delete(e))}else this.childBranches.delete(e)}else{var r=arguments[0];if(this.has(r)){var i=this.get(r);i.clear.apply(i,Array.prototype.slice.call(arguments,1))}}},t.exports=function(e){var t=new r;function n(){var n=Array.prototype.slice.call(arguments),r=n.reduce(function(e,t){return e.resolveBranch(t)},t);if(r.hasValue)return r.value;var i=e.apply(null,n);return r.setValue(i)}return n.clear=t.clear.bind(t),n}})),Pu=d(de(((e,t)=>{t.exports=Nu()}))(),1).default;function Fu(e,t){if(!e)throw Error(t)}var Iu={alternatives:(e,t,n)=>{let r=e.oneOf=[];return t.matches.forEach(function(e){if(e.schema)return r.push(Lu(e.schema,n));if(!e.is)throw Error(`joi.when requires an "is"`);if(!(e.then||e.otherwise))throw Error(`joi.when requires one or both of "then" and "otherwise"`);e.then&&r.push(Lu(e.then,n)),e.otherwise&&r.push(Lu(e.otherwise,n))}),e},date:e=>(e.type=`Date`,e),any:e=>(delete e.type,e),array:(e,t,n)=>{if(e.type=`array`,t._rules?.forEach(t=>{switch(t.name){case`unique`:e.uniqueItems=!0;break;case`length`:e.minItems=e.maxItems=t.args.limit;break;case`min`:e.minItems=t.args.limit;break;case`max`:e.maxItems=t.args.limit;break}}),t.$_terms){let r;t.$_terms._inclusions.length?r=t.$_terms._inclusions:t.$_terms._requireds.length&&(r=t.$_terms._requireds),r&&(e.items=Lu(r[0],n))}return e},binary:(e,t)=>(e.type=`string`,e.contentMediaType=t._meta.length>0&&t._meta[0].contentMediaType?t._meta[0].contentMediaType:`text/plain`,e.contentEncoding=t._flags.encoding?t._flags.encoding:`binary`,e),boolean:e=>(e.type=`boolean`,e),number:(e,t)=>(e.type=`number`,t._rules?.forEach(t=>{switch(t.name){case`integer`:e.type=`integer`;break;case`less`:e.exclusiveMaximum=t.args.limit;break;case`greater`:e.exclusiveMinimum=t.args.limit;break;case`min`:e.minimum=t.args.limit;break;case`max`:e.maximum=t.args.limit;break;case`precision`:{let n;n=t.args.limit&&t.args.limit>1?JSON.parse(`0.`+`0`.repeat(t.args.limit-1)+`1`):1,e.multipleOf=n;break}}}),e),string:(e,t)=>(e.type=`string`,t._rules.forEach(t=>{switch(t.name){case`email`:e.format=`email`;break;case`pattern`:case`regex`:{let n=t.args,r=n&&n.regex?n.regex:n;e.pattern=String(r).replace(/^\//,``).replace(/\/$/,``);break}case`min`:e.minLength=t.args.limit;break;case`max`:e.maxLength=t.args.limit;break;case`length`:e.minLength=e.maxLength=t.args.limit;break;case`uri`:e.format=`uri`;break}}),e),object:(e,t,n)=>(e.type=`object`,e.properties={},e.additionalProperties=!!(t._flags.allowUnknown||!t._inner.children),e.pattern=t.patterns?.map(e=>({regex:e.regex,rule:Lu(e.rule,n)}))??[],t.$_terms.keys?.length&&t.$_terms.keys.forEach(t=>{t.schema._flags.presence!==`forbidden`&&(e.properties||={},e.properties[t.key]=Lu(t.schema,n),(t.schema._flags.presence===`required`||t.schema._settings&&t.schema._settings.presence===`required`&&t.schema._flags.presence!==`optional`)&&(e.required=e.required||[],e.required.push(t.key)))}),e)};function Lu(e,t){if(Fu(typeof e==`object`&&`type`in e,`requires a joi schema object`),!Iu[e.type])throw Error(`sorry, do not know how to convert unknown joi type: "${e.type}"`);t&&Fu(typeof t==`function`,`transformer must be a function`);let n={};if(e._description&&(n.description=e._description),e._examples&&e._examples.length>0&&(n.examples=e._examples.map(e=>e.value)),e._examples&&e._examples.length===1&&(n.examples=e._examples[0].value),e._settings&&e._settings.language&&e._settings.language.label?n.title=e._settings.language.label:e._flags&&e._flags.label&&(n.title=e._flags.label),e._flags&&e._flags.default!==void 0&&e._flags.default!==null&&(n.default=e._flags.default),e._valids&&e._valids._set&&(e._valids._set.size||e._valids._set.length)){if(Array.isArray(e.children)||!e._flags.allowOnly)return{anyOf:[{type:e.type,enum:[...e._valids._set]},Iu[e.type](n,e,t)]};n.enum=[...e._valids._set]}let r=Iu[e.type](n,e,t);if(t&&(r=t(r,e)),e._valids?._values&&e._valids._values.size&&!e._flags.allowOnly){let t=Array.from(e._valids._values).map(e=>({const:e}));r.anyOf?r.anyOf=[...t,...r.anyOf]:r={anyOf:[...t,r]}}return r}Lu.TYPES=Iu;var Ru={assign:0,create:0,clone:0,discard:0,update:0};function zu(e,t){return Ru.assign+=1,{...e,...t}}function Bu(e){return Array.isArray(e)}function Vu(e){return A(typeof e,`bigint`)}function Hu(e){return A(typeof e,`boolean`)}function Uu(e){return A(typeof e,`function`)}function Wu(e){return A(e,null)}function Gu(e){return Number.isFinite(e)}function Ku(e){return qu(e)&&!Bu(e)}function qu(e){return A(typeof e,`object`)&&!Wu(e)}function Ju(e){return A(typeof e,`string`)}function A(e,t){return e===t}function Yu(e,t){return e>t}function Xu(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function j(e,t,n){return A(e.length,0)?n():t(e[0],e.slice(1))}function Zu(e){return A(e,`__proto__`)||A(e,`constructor`)||A(e,`prototype`)}function M(e,t){return Zu(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function N(e){return Object.getOwnPropertyNames(e)}function Qu(e){return Object.values(e)}function $u(e){return qu(e)&&M(e,`~guard`)}function ed(e){return e}function td(e){return e.map(e=>ad(e))}function nd(e){let t={},n=Object.getOwnPropertyDescriptors(e);for(let e of Object.keys(n)){let r=n[e];M(r,`value`)&&Object.defineProperty(t,e,{...r,value:ad(r.value)})}return t}function rd(e){return new RegExp(e.source,e.flags)}function id(e){return e}function ad(e){return e instanceof RegExp?rd(e):$u(e)?ed(e):Bu(e)?td(e):qu(e)?nd(e):id(e)}function od(e){return Ru.clone+=1,ad(e)}var sd={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function cd(){return sd}function ld(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function ud(e,t){return{...e,...t}}function P(e,t,n={}){Ru.create+=1;let r=cd(),i=ud(t,n),a=r.enumerableKind?ud(i,e):ld(i,e);return r.immutableTypes?Object.freeze(a):a}function dd(e,t){Ru.discard+=1;let n={},r=Object.getOwnPropertyDescriptors(od(e)),i=new Set(t);for(let e of Object.keys(r))i.has(e)||Object.defineProperty(n,e,r[e]);return n}function F(e,t,n){Ru.update+=1;let r=cd(),i=od(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return i}function I(e,t){return qu(e)&&M(e,`~kind`)&&A(e[`~kind`],t)}function fd(e){return qu(e)}function L(e,t,n){return P({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function pd(e){return I(e,`Deferred`)}function md(e){return{enumerable:cd().enumerableKind,writable:!1,configurable:!1,value:e}}var hd=class{constructor(){globalThis.Object.defineProperty(this,`~kind`,md(`Base`)),globalThis.Object.defineProperty(this,`~guard`,md({check:e=>this.Check(e),errors:e=>this.Errors(e)}))}Check(e){return!0}Errors(e){return[]}Convert(e){return e}Clean(e){return e}Default(e){return e}Create(){throw Error(`Create not implemented`)}Clone(){throw Error(`Clone not implemented`)}};function gd(e){return I(e,`Base`)}function _d(e,t){return P({"~kind":`Array`},{type:`array`,items:e},t)}function vd(e){return I(e,`Array`)}function yd(e){return dd(e,[`~kind`,`type`,`items`])}function bd(e,t){return P({"~kind":`AsyncIterator`},{type:`asyncIterator`,iteratorItems:e},t)}function xd(e){return I(e,`AsyncIterator`)}function Sd(e){return dd(e,[`~kind`,`type`,`iteratorItems`])}function Cd(e,t,n={}){return P({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function wd(e){return I(e,`Constructor`)}function Td(e){return dd(e,[`~kind`,`type`,`parameters`,`instanceType`])}function Ed(e,t,n={}){return P({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function Dd(e){return I(e,`Function`)}function Od(e){return dd(e,[`~kind`,`type`,`parameters`,`returnType`])}function kd(e,t){return P({"~kind":`Ref`},{$ref:e},t)}function Ad(e){return I(e,`Ref`)}function jd(e,t){return P({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function Md(e){return I(e,`Generic`)}function Nd(e){return P({"~kind":`Any`},{},e)}function Pd(e){return I(e,`Any`)}var Fd=`(?!)`;function Id(e){return P({"~kind":`Never`},{not:{}},e)}function Ld(e){return I(e,`Never`)}function Rd(e){return F(e,{"~optional":!0},{})}function zd(e,t){return F(Rd(e),{},t)}function Bd(e,t,n,r){return zd($(e,t,n),r)}function Vd(e,t={}){return L(`AddOptional`,[e],t)}function Hd(e,t={}){return zd(e,t)}function Ud(e){return Hd(e)}function Wd(e){return fd(e)&&M(e,`~optional`)}function Gd(e){return N(e).filter(t=>!Wd(e[t]))}function Kd(e){return N(e)}function qd(e){return Qu(e)}function R(e,t={}){let n=Gd(e);return P({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function Jd(e){return I(e,`Object`)}function Yd(e){return dd(e,[`~kind`,`type`,`properties`,`required`])}function z(e,t={}){return P({"~kind":`Union`},{anyOf:e},t)}function B(e){return I(e,`Union`)}function Xd(e){return dd(e,[`~kind`,`anyOf`])}function Zd(e){return P({"~kind":`Unknown`},{},e)}function Qd(e){return I(e,`Unknown`)}function $d(e,t,n){return P({"~kind":`Cyclic`},{$defs:N(e).reduce((t,n)=>({...t,[n]:F(e[n],{},{$id:n})}),{}),$ref:t},n)}function ef(e){return I(e,`Cyclic`)}function tf(e){return F(e,{"~unsafe":null},{})}function nf(e){return Ku(e)&&M(e,`~unsafe`)&&Wu(e[`~unsafe`])}function rf(e,t){return t[e.length]?.(...e)??(()=>{throw Error(`Invalid Arguments`)})()}function af(...e){let[t,n]=rf(e,{2:(e,t)=>[e,t,t],1:e=>[e,Zd(),Zd()]});return P({"~kind":`Infer`},{type:`infer`,name:t,extends:n},{})}function of(e){return I(e,`Infer`)}function sf(e,t,n,r={}){return P({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function cf(e){return I(e,`Dependent`)}function lf(e){return dd(e,[`~kind`,`if`,`then`,`else`])}function uf(e){return Ku(e)}function df(e){return N(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function ff(e,t){return P({"~kind":`Enum`},{enum:uf(e)?df(e):e},t)}function pf(e){return I(e,`Enum`)}function mf(e,t={}){return P({"~kind":`Intersect`},{allOf:e},t)}function hf(e){return I(e,`Intersect`)}function gf(e){return dd(e,[`~kind`,`allOf`])}function _f(){throw Error(`Unreachable`)}var vf;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(vf||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var yf=new Float64Array(1);new DataView(yf.buffer),new Uint8Array(yf.buffer),new TextEncoder;var bf=class{constructor(e,t){this.type=e,this.decode=t}Encode(e){let t=this.type,n={decode:Tf(t)?e=>this.decode(t[`~codec`].decode(e)):this.decode,encode:Tf(t)?n=>t[`~codec`].encode(e(n)):e};return F(this.type,{"~codec":n},{})}},xf=class{constructor(e){this.type=e}Decode(e){return new bf(this.type,e)}};function Sf(e){return new xf(e)}function Cf(e,t){return Sf(e).Decode(t).Encode(()=>{throw Error(`Encode not implemented`)})}function wf(e,t){return Sf(e).Decode(()=>{throw Error(`Decode not implemented`)}).Encode(t)}function Tf(e){return fd(e)&&M(e,`~codec`)&&qu(e[`~codec`])&&M(e[`~codec`],`encode`)&&M(e[`~codec`],`decode`)}function Ef(e){return lO(e)}function Df(e){return fd(e)&&M(e,`~immutable`)}function Of(e){return F(e,{"~readonly":!0},{})}function kf(e,t){return F(Of(e),{},t)}function Af(e,t,n,r){return kf($(e,t,n),r)}function jf(e,t={}){return L(`AddReadonly`,[e],t)}function Mf(e,t={}){return kf(e,t)}function Nf(e){return Mf(e)}function Pf(e){return fd(e)&&M(e,`~readonly`)}function Ff(e,t){return F(e,{"~refine":Rf(e)?[...e[`~refine`],t]:[t]},{})}function If(...e){let[t,n,r]=rf(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,()=>`Refine Error`]});return Ff(t,{check:n,error:Ju(r)?()=>r:r})}function Lf(e){return Ku(e)&&M(e,`check`)&&M(e,`error`)&&Uu(e.check)&&Uu(e.error)}function Rf(e){return fd(e)&&M(e,`~refine`)&&Bu(e[`~refine`])&&Xu(e[`~refine`],0,e=>Lf(e))}var zf=`-?(?:0|[1-9][0-9]*)n`;function Bf(e){return P({"~kind":`BigInt`},{type:`bigint`},e)}function Vf(e){return I(e,`BigInt`)}function Hf(e){return P({"~kind":`Boolean`},{type:`boolean`},e)}function Uf(e){return I(e,`Boolean`)}function Wf(e){return P({"~kind":`Identifier`},{name:e})}function Gf(e){return I(e,`Identifier`)}var Kf=`-?(?:0|[1-9][0-9]*)`;function qf(e){return P({"~kind":`Integer`},{type:`integer`},e)}function Jf(e){return I(e,`Integer`)}function Yf(e,t){return P({"~kind":`Iterator`},{type:`iterator`,iteratorItems:e},t)}function Xf(e){return I(e,`Iterator`)}function Zf(e){return dd(e,[`~kind`,`type`,`iteratorItems`])}var Qf=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function $f(e){return Vu(e)?`bigint`:Hu(e)?`boolean`:Gu(e)?`number`:Ju(e)?`string`:(()=>{throw new Qf(e)})()}function V(e,t){return P({"~kind":`Literal`},{type:$f(e),const:e},t)}function ep(e){return Vu(e)||Hu(e)||Gu(e)||Ju(e)}function tp(e){return H(e)&&Gu(e.const)}function np(e){return H(e)&&Ju(e.const)}function H(e){return I(e,`Literal`)}function rp(e){return P({"~kind":`Null`},{type:`null`},e)}function ip(e){return I(e,`Null`)}var ap=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function op(e){return P({"~kind":`Number`},{type:`number`},e)}function sp(e){return I(e,`Number`)}function cp(e){return P({"~kind":`Symbol`},{type:`symbol`},e)}function lp(e){return I(e,`Symbol`)}function up(...e){let[t,n,r]=rf(e,{3:(e,t,n)=>[e,t,n],2:(e,t)=>[e,t,t],1:e=>[e,Zd(),Zd()]});return P({"~kind":`Parameter`},{name:t,extends:n,equals:r},{})}function dp(e){return I(e,`Parameter`)}function fp(e,t){return P({"~kind":`Promise`},{type:`promise`,item:e},t)}function pp(e){return I(e,`Promise`)}function mp(e){return dd(e,[`~kind`,`type`,`item`])}function hp(e){return P({"~kind":`String`},{type:`string`},e)}function gp(e){return I(e,`String`)}function _p(e){let t=Nb(e);return A(t.length,2)?t[0]:[]}function vp(e){return!0}function yp(e){return j(e,(e,t)=>xp(e)?yp(t):!1,()=>!0)}function bp(e){return A(e.length,0)?!1:yp(e)}function xp(e){return B(e)?bp(e.anyOf):H(e)?vp(e.const):!1}function Sp(e){return bp(e)}function Cp(e){return P({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function wp(e,t,n=[]){return j(e,(e,r)=>wp(r,t,[...n,`${e}${t}`]),()=>n)}function Tp(e,t){return A(e.length,0)?[`${t}`]:wp(e,t)}function Ep(e,t,n=[]){return j(t,(t,r)=>Ep(e,r,[...n,...Dp(e,t)]),()=>n)}function Dp(e,t){return B(t)?Ep(e,t.anyOf):H(t)?Tp(e,t.const):_f()}function Op(e,t){return j(t,(t,n)=>Op(Dp(e,t),n),()=>e)}function kp(e){return e.map(e=>V(e))}function Ap(e){return z(kp(Op([],e)))}function jp(e){return A(e.length,0)?_f():A(e.length,1)&&H(e[0])?e[0]:Ap(e)}function Mp(e){let t=_p(e);return A(t.length,0)?hp():Sp(t)?jp(t):Cp(e)}function Np(e){let t=Mp(e);return vx(t)?hp():t}function Pp(e,t){return P({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function Fp(e){return Pp(Vm,e)}function Ip(e){return R({true:e,false:e})}function Lp(e,t={}){let[n,r,i]=[e,e.length,!1];return P({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function Rp(e){return I(e,`Tuple`)}function zp(e){return dd(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function Bp(e){return dd(e,[`~readonly`])}function Vp(e,t){return F(Bp(e),{},t)}function Hp(e,t,n,r){return Vp($(e,t,n),r)}function Up(e,t={}){return L(`RemoveReadonly`,[e],t)}function Wp(e,t={}){return Vp(e,t)}function Gp(e){return dd(e,[`~optional`])}function Kp(e,t){return F(Gp(e),{},t)}function qp(e,t,n,r){return Kp($(e,t,n),r)}function Jp(e,t={}){return L(`RemoveOptional`,[e],t)}function Yp(e,t={}){return Kp(e,t)}function Xp(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function Zp(e){return R(Xp(e.items))}function Qp(e,t){return Pf(e)?!!Pf(t):!1}function $p(e,t){return Wd(e)?!!Wd(t):!1}function em(e,t){let n=Qp(e,t),r=$p(e,t),i=Wp(Yp(_m([e,t])));return n&&r?Mf(Hd(i)):n&&!r?Mf(i):!n&&r?Hd(i):i}function tm(e,t,n){return n in e?n in t?em(e[n],t[n]):e[n]:n in t?t[n]:Id()}function nm(e,t){return[...new Set([...N(t),...N(e)])].reduce((n,r)=>({...n,[r]:tm(e,t,r)}),{})}function rm(e){return Jd(e)?e.properties:Rp(e)?Xp(e.items):_f()}function im(e,t){return R(nm(rm(e),rm(t)))}function am(e,t){let n=xC(e,t);return A(n,`left-inside`)?e:A(n,`right-inside`)||A(n,`equal`)?t:Id()}function om(e){return Jd(e)||Rp(e)}function sm(e,t){let n=B(e),r=B(t);return n||r}function cm(e,t){let n=bm(e),r=bm(t),i=sm(n,r),a=om(n),o=om(r);return i?_m([n,r]):a&&o?im(n,r):a&&!o?n:!a&&o?r:am(n,r)}function lm(e,t,n=[]){return j(t,(t,r)=>lm(e,r,[...n,cm(e,t)]),()=>A(n.length,0)?[e]:n)}function um(e,t,n=[]){return j(e,(e,r)=>um(r,t,[...n,...dm([e],t)]),()=>n)}function dm(e,t=[]){return j(e,(e,n)=>B(e)?dm(n,um(e.anyOf,t)):dm(n,lm(e,t)),()=>t)}function fm(e,t){return wx(gC({},e,t))?[]:[e]}function pm(e,t){return e.reduce((e,n)=>[...e,...fm(n,t)],[])}function mm(e,t){let n=bm(e);return ym(pm(B(n)?n.anyOf:[n],t))}function hm(e,t,n){return ym([mf([e,t]),mm(n,e)])}function gm(e){return ym(e.map(e=>V(e)))}function _m(e){return EC(dm(e))}function vm(e){return bm(Np(e))}function ym(e){return EC(e)}function bm(e){return cf(e)?hm(e.if,e.then,e.else):pf(e)?gm(e.enum):hf(e)?_m(e.allOf):vx(e)?vm(e.pattern):B(e)?ym(e.anyOf):e}function xm(e){return A(e.length,1)?e[0]:A(e.length,0)?Id():z(e)}function Sm(e,t){return Im(gm(e),t)}function Cm(e,t){return Pp(zm,t)}function wm(e,t){return Im(_m(e),t)}function Tm(e,t){return Ju(e)||Gu(e)?R({[e]:t}):A(e,!1)?R({false:t}):A(e,!0)?R({true:t}):R({})}function Em(e,t){return Pp(Bm,t)}function Dm(e,t){return M(e,`pattern`)&&(Ju(e.pattern)||e.pattern instanceof RegExp)?Pp(e.pattern.toString(),t):Pp(Vm,t)}function Om(e,t){return Sp(_p(e))?Im(vm(e),t):Pp(e,t)}function km(e){return B(e)?Am(e.anyOf):[e]}function Am(e){return e.reduce((e,t)=>[...e,...km(t)],[])}function jm(e){return e.some(e=>gp(e)||sp(e)||Jf(e))}function Mm(e,t){return A(jm(e),!0)?Pp(Vm,t):void 0}function Nm(e,t){return e.reduce((e,n)=>H(n)&&(Ju(n.const)||Gu(n.const))?{...e,[n.const]:t}:e,{})}function Pm(e,t){return R(Nm(e,t))}function Fm(e,t){let n=Am(e),r=Mm(n,t);return fd(r)?r:Pm(n,t)}function Im(e,t){return Pd(e)?Fp(t):Uf(e)?Ip(t):pf(e)?Sm(e.enum,t):Jf(e)?Cm(e,t):hf(e)?wm(e.allOf,t):H(e)?Tm(e.const,t):sp(e)?Em(e,t):B(e)?Fm(e.anyOf,t):gp(e)?Dm(e,t):vx(e)?Om(e.pattern,t):R({})}function Lm(e,t,n){return Q([e])?F(Im(e,t),{},n):Hm(e,t,n)}function Rm(e,t,n,r,i){return Lm($(e,t,n),$(e,t,r),i)}var zm=`^${Kf}$`,Bm=`^${ap}$`,Vm=`^.*$`;function Hm(e,t,n={}){return L(`Record`,[e,t],n)}function Um(e,t,n={}){return Lm(e,t,n)}function Wm(e,t){return Pp(e,t)}function Gm(e){return N(e.patternProperties)[0]}function Km(e){let t=Gm(e);return A(t,Vm)?hp():A(t,zm)?qf():A(t,Bm)?op():Mp(t)}function qm(e){return e.patternProperties[Gm(e)]}function Jm(e){return I(e,`Record`)}function Ym(e){return P({"~kind":`Rest`},{type:`rest`,items:e},{})}function Xm(e){return I(e,`Rest`)}function Zm(e){return P({"~kind":`This`},{$ref:`#`},e)}function Qm(e){return I(e,`This`)}function $m(e){return P({"~kind":`Undefined`},{type:`undefined`},e)}function eh(e){return I(e,`Undefined`)}function th(e){return P({"~kind":`Void`},{type:`void`},e)}function nh(e){return I(e,`Void`)}function rh(e,t){return A(e,`Array`)?_d(t[0]):A(e,`AsyncIterator`)?bd(t[0]):A(e,`Iterator`)?Yf(t[0]):A(e,`Promise`)?fp(t[0]):A(e,`Awaited`)?ow(t[0]):A(e,`Capitalize`)?gw(t[0]):A(e,`ConstructorParameters`)?Vw(t[0]):A(e,`Evaluate`)?uO(t[0]):A(e,`Exclude`)?Kw(t[0],t[1]):A(e,`Extract`)?Xw(t[0],t[1]):A(e,`Index`)?aT(t[0],t[1]):A(e,`InstanceType`)?eE(t[0]):A(e,`Lowercase`)?vw(t[0]):A(e,`NonNullable`)?IE(t[0]):A(e,`Omit`)?VE(t[0],t[1]):A(e,`Parameters`)?JE(t[0]):A(e,`Partial`)?$E(t[0]):A(e,`Pick`)?lD(t[0],t[1]):A(e,`Readonly`)?hD(t[0]):A(e,`KeyOf`)?aE(t[0]):A(e,`Record`)?Hm(t[0],t[1]):A(e,`Required`)?FD(t[0]):A(e,`ReturnType`)?zD(t[0]):A(e,`Uncapitalize`)?bw(t[0]):A(e,`Uppercase`)?Sw(t[0]):ew(kd(e),t)}function ih(){throw Error(`Unreachable`)}var ah=(e,t=[])=>e.reduce((e,t)=>Bu(t)&&A(t.length,2)?[...e,t[0]]:[...e,t],[]),oh=e=>{let[t,n]=e;return ah([...t,...n])};function sh(e){return up(e[0],e[2],e[4])}function ch(e){return up(e[0],e[2],e[2])}function lh(e){return up(e[0],Zd(),e[2])}function uh(e){return up(e,Zd(),Zd())}function dh(e){return e}function fh(e){return oh(e)}function ph(e){return e[1]}function mh(e){return oh(e)}function hh(e){return e[1]}function gh(e){return rh(e[0],e[1])}function _h(e){return null}function vh(e){return hp()}function yh(e){return op()}function bh(e){return Hf()}function xh(e){return $m()}function Sh(e){return rp()}function Ch(e){return qf()}function wh(e){return Bf()}function Th(e){return Zd()}function Eh(e){return Nd()}function Dh(e){return R({})}function Oh(e){return Id()}function kh(e){return cp()}function Ah(e){return th()}function jh(e){return Zm()}function Mh(e){return V(BigInt(e))}function Nh(e){return V(A(e,`true`))}function Ph(e){return V(parseFloat(e))}function Fh(e){return V(e)}function Ih(e){return e[1]}function Lh(e){return V(e)}function Rh(e){return A(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function zh(e){return e[1]}function Bh(e){return px(e)}function Vh(e){return A(e.length,6)?sf(e[1],e[3],e[5]):sf(e[1],e[3],Zd())}function Hh(e){return e.length>0}function Uh(e){return e.reduce((e,t)=>A(t.length,3)?[...e,[t[1]]]:[...e,[]],[])}function Wh(e){return A(e.length,6)?[e[1],e[3],e[5]]:[]}function Gh(e){return Bu(e)&&A(e.length,3)?e[1]:e}function Kh(e){return A(e.length,2)?e[1]:[]}function qh(e,t){return t.reduce((e,t)=>{let n=t;return A(n.length,1)?aT(e,n[0]):A(n.length,0)?_d(e):ih()},e)}function Jh(e,t){return A(t.length,3)?Iw(e,t[0],t[1],t[2]):e}function Yh(e,t){return Bu(t)&&A(t.length,0)?e:WD(e,t)}function Xh(e){let[t,n,r,i,a]=e;return Yh(Jh(t?aE(qh(n,r)):qh(n,r),i),a)}function Zh(e,t){return A(t.length,3)?(()=>{let[n,r,i]=t,a=Zh(r,i);if(A(n,`&`))return hf(a)?mf([e,...a.allOf]):mf([e,a]);if(A(n,`|`))return B(a)?z([e,...a.anyOf]):z([e,a]);ih()})():e}function Qh(e){return e}function $h(e){let[t,n]=e;return Zh(t,n)}function eg(e){return e}function tg(e){let[t,n]=e;return Zh(t,n)}function ng(e){return cO(e[1])}function rg(e){return e[1]}function ig(e){return jd(e[0],e[2])}function ag(e){return A(e.length,4)?af(e[1],e[3]):A(e.length,2)?af(e[1],Zd()):ih()}function og(e){return e}function sg(e){return`${e}`}function cg(e){return e}function lg(e){return e}function ug(e){return Jf(e[3])?zm:sp(e[3])?Bm:lp(e[3])||gp(e[3])?Vm:ih()}function dg(e){return e}function fg(e){return e.length>0}function pg(e){return e.length>0}function mg(e){let[t,n,r,i,a]=e;return{[n]:t&&r?jf(Vd(a)):t&&!r?jf(a):!t&&r?Vd(a):a}}function hg(e){return e}function gg(e){return oh(e)}function _g(e){return e.reduce((e,t)=>M(t,zm)||M(t,Bm)||M(t,Vm)?[e[0],zu(e[1],t)]:[zu(e[0],t),e[1]],[{},{}])}function vg(e){return _g(e[1])}function yg(e){let[t,n]=e;return R(t,A(N(n).length,0)?{}:{patternProperties:n})}function bg(e){return A(e.length,5)?jf(Vd(e[4])):A(e.length,3)?e[2]:A(e.length,4)?A(e[2],`readonly`)?jf(e[3]):Vd(e[3]):ih()}function xg(e){return jf(Vd(e[1]))}function Sg(e){return jf(e[1])}function Cg(e){return Vd(e[0])}function wg(e){return e}function Tg(e){return A(e.length,2)?Ym(e[1]):A(e.length,1)?e[0]:ih()}function Eg(e){return oh(e)}function Dg(e){return Lp(e[1])}function Og(e){return jf(Vd(e[4]))}function kg(e){return jf(e[3])}function Ag(e){return Vd(e[3])}function jg(e){return e[2]}function Mg(e){return e}function Ng(e){return A(e.length,2)?Ym(e[1]):A(e.length,1)?e[0]:ih()}function Pg(e){return oh(e)}function Fg(e){return Ed(e[1],e[4])}function Ig(e){return Cd(e[2],e[5])}function Lg(e,t){return A(e,`remove`)?Up(t):A(e,`add`)?jf(t):t}function Rg(e){return A(e.length,2)&&A(e[0],`-`)?`remove`:A(e.length,2)&&A(e[0],`+`)||A(e.length,1)?`add`:`none`}function zg(e,t){return A(e,`remove`)?Jp(t):A(e,`add`)?Vd(t):t}function Bg(e){return A(e.length,2)&&A(e[0],`-`)?`remove`:A(e.length,2)&&A(e[0],`+`)||A(e.length,1)?`add`:`none`}function Vg(e){return A(e.length,2)?[e[1]]:[]}function Hg(e){return Bu(e[6])&&A(e[6].length,1)?_E(Wf(e[3]),e[5],e[6][0],Lg(e[1],zg(e[8],e[10]))):_E(Wf(e[3]),e[5],kd(e[3]),Lg(e[1],zg(e[8],e[10])))}function Ug(e){return kd(e)}function Wg(e){return BigInt(e)}function Gg(e){return parseFloat(e)}function Kg(e){return A(e,`true`)}function qg(e){return e}function Jg(e){return null}function Yg(e){return{[e[0]]:e[2]}}function Xg(e){return oh(e)}function Zg(e){return e.reduce((e,t)=>zu(e,t),{})}function Qg(e){return Zg(e[1])}function $g(e){return oh(e)}function e_(e){return e[1]}function t_(e){return e}function n_(e){return Bf()}function r_(e){return hp()}function i_(e){return op()}function a_(e){return qf()}function o_(e){return Id()}function s_(e){return V(e)}function c_(e){return e}function l_(e){return z(e[1])}function u_(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function d_(e){return[e[0],...e[1]]}function f_(e){return e}function p_(e){return e[1]}function m_(e){return oh(e)}function h_(e){return A(e.length,2)?e[1]:[]}function g_(e){let t=e[2],n=e[3],[r,i]=e[4],a=A(N(i).length,0)?{}:{patternProperties:i};return{[e[1]]:jd(t,US(n,r,a))}}function __(e){let t=e[2],[n,r]=e[3],i=A(N(r).length,0)?{}:{patternProperties:r};return{[e[1]]:US(t,n,i)}}function v_(e){return{[e[1]]:jd(e[2],e[4])}}function y_(e){return{[e[1]]:e[3]}}function b_(e){return null}function x_(e){return e}function S_(e){return _g(oh(e))}function C_(e){return e[1]}function w_(e){let t=e[0],n=e[1];return fO(zu(t,n[0]))}function T_(e){return e}function E_(e){return A(e.length,2)}function U(e,t,n){return E_(e)?t(e[0],e[1]):n()}function D_(e,t){return A(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function O_(e,t){for(let n=0;n<e.length;n++){let r=D_(e[n],t);if(E_(r))return r}return[]}function k_(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var A_=[...k_(97,122),...k_(65,90)],j_=k_(49,57),M_=[`0`,...j_],N_=`//`,P_=`/*`,F_=`*/`;function I_(e){let t=e.indexOf(F_);return A(t,-1)?``:e.slice(t+2)}function L_(e){let t=e.indexOf(`
|
|
286
|
+
`);return A(t,-1)?``:e.slice(t)}function R_(e){return e.replace(/^[ \t\r\f\v]+/,``)}function z_(e){let t=R_(e);return t.startsWith(P_)?z_(I_(t.slice(2))):t.startsWith(N_)?z_(L_(t.slice(2))):t}function B_(e){let t=e.trimStart();return t.startsWith(P_)?B_(I_(t.slice(2))):t.startsWith(N_)?B_(L_(t.slice(2))):t}function V_(e,t){return U(O_([e],t),(e,t)=>[e,t],()=>[``,t])}function H_(e,t){return e.includes(t)}function U_(e,t,n,r=``){return U(O_(e,n),(n,i)=>H_(t,n)?U_(e,t,i,r):U_(e,t,i,`${r}${n}`),()=>[r,n])}function W_(e){return O_(j_,e)}var G_=[...M_,`_`];function K_(e){return U_(G_,[`_`],e)}function q_(e){return U(O_([`0`],e),(e,t)=>[e,t],()=>U(W_(e),(e,t)=>U(K_(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[]))}function J_(e){return q_(B_(e))}function Y_(e){return V_(`-`,e)}function X_(e){return U(Y_(e),(e,t)=>U(J_(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function Z_(e){return X_(B_(e))}function Q_(e){return U(Z_(e),(e,t)=>U(O_([`n`],t),(t,n)=>[`${e}`,n],()=>[]),()=>[])}function $_(e){return Q_(e)}function ev(e,t){return O_([e],t)}function W(e,t){return A(e,``)?[``,t]:e.startsWith(`
|
|
287
|
+
`)?ev(e,z_(t)):e.startsWith(` `)?ev(e,t):ev(e,B_(t))}var tv=[...A_,`_`,`$`];function nv(e){return O_(tv,e)}var rv=[...tv,...M_];function iv(e,t=``){return U(O_(rv,e),(e,n)=>iv(n,`${t}${e}`),()=>[t,e])}function av(e){return U(nv(e),(e,t)=>U(iv(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function G(e){return av(B_(e))}var ov=[...M_,`_`];function sv(e){return E_(O_([`.`],e))}function cv(e){return U(U_(ov,[`_`],e),(e,t)=>A(e,``)?[]:[e,t],()=>[])}function lv(e){return U(O_([`.`],e),(e,t)=>U(cv(t),(t,n)=>[`0${e}${t}`,n],()=>[]),()=>[])}function uv(e){return U(J_(e),(e,t)=>U(O_([`.`],t),(t,n)=>U(cv(n),(n,r)=>[`${e}${t}${n}`,r],()=>[`${e}`,n]),()=>[`${e}`,t]),()=>[])}function dv(e){return sv(e)?lv(e):uv(e)}function fv(e){return dv(B_(e))}function pv(e){return V_(`-`,e)}function mv(e){return U(pv(e),(e,t)=>U(fv(t),(t,n)=>[`${e}${t}`,n],()=>[]),()=>[])}function hv(e){return mv(B_(e))}function gv(e){return A(e,``)?[]:[e.slice(0,1),e.slice(1)]}function _v(e,t){return j(e,(e,n)=>t.startsWith(e)?!0:_v(n,t),()=>!1)}function vv(e,t,n=``){return U(gv(t),(r,i)=>_v(e,t)?[n,t]:vv(e,i,`${n}${r}`),()=>[])}function yv(e,t,n){return U(O_([e],n),(e,n)=>U(vv([t],n),(e,n)=>U(O_([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function bv(e,t,n){return U(O_([e],n),(e,n)=>U(vv([`
|
|
288
|
+
`,t],n),(e,n)=>U(O_([t],n),(t,n)=>[`${e}`,n],()=>[]),()=>[]),()=>[])}function xv(e,t,n,r){return n?yv(e,t,B_(r)):bv(e,t,B_(r))}function Sv(e,t){return O_(e,t)}function Cv(e,t){return xv(e,e,!1,t)}function wv(e,t){return U(Sv(e,t),(e,t)=>Cv(e,`${e}${t}`),()=>[])}function Tv(e,t){return wv(e,B_(t))}function Ev(e,t){return U(vv(e,t),(e,t)=>A(e,``)?[]:[e,t],()=>[])}var K=(e,t,n=()=>[])=>e.length===2?t(e):n(),Dv=e=>K(K(G(e),([e,t])=>K(W(`extends`,t),([t,n])=>K(q(n),([n,r])=>K(W(`=`,r),([r,i])=>K(q(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[sh(e),t]),Ov=e=>K(K(G(e),([e,t])=>K(W(`extends`,t),([t,n])=>K(q(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ch(e),t]),kv=e=>K(K(G(e),([e,t])=>K(W(`=`,t),([t,n])=>K(q(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[lh(e),t]),Av=e=>K(G(e),([e,t])=>[uh(e),t]),jv=e=>K(K(Dv(e),([e,t])=>[e,t],()=>K(Ov(e),([e,t])=>[e,t],()=>K(kv(e),([e,t])=>[e,t],()=>K(Av(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[dh(e),t]),Mv=(e,t=[])=>K(K(jv(e),([e,t])=>K(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Mv(n,[...t,e]),()=>[t,e]),Nv=e=>K(K(Mv(e),([e,t])=>K(K(K(jv(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[fh(e),t]),Pv=e=>K(K(W(`<`,e),([e,t])=>K(Nv(t),([t,n])=>K(W(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ph(e),t]),Fv=(e,t=[])=>K(K(q(e),([e,t])=>K(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Fv(n,[...t,e]),()=>[t,e]),Iv=e=>K(K(Fv(e),([e,t])=>K(K(K(q(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[mh(e),t]),Lv=e=>K(K(W(`<`,e),([e,t])=>K(Iv(t),([t,n])=>K(W(`>`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[hh(e),t]),Rv=e=>K(K(G(e),([e,t])=>K(Lv(t),([t,n])=>[[e,t],n])),([e,t])=>[gh(e),t]),zv=e=>K(K(K(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[_h(e),t]),Bv=e=>K(W(`string`,e),([e,t])=>[vh(e),t]),Vv=e=>K(W(`number`,e),([e,t])=>[yh(e),t]),Hv=e=>K(W(`boolean`,e),([e,t])=>[bh(e),t]),Uv=e=>K(W(`undefined`,e),([e,t])=>[xh(e),t]),Wv=e=>K(W(`null`,e),([e,t])=>[Sh(e),t]),Gv=e=>K(W(`integer`,e),([e,t])=>[Ch(e),t]),Kv=e=>K(W(`bigint`,e),([e,t])=>[wh(e),t]),qv=e=>K(W(`unknown`,e),([e,t])=>[Th(e),t]),Jv=e=>K(W(`any`,e),([e,t])=>[Eh(e),t]),Yv=e=>K(W(`object`,e),([e,t])=>[Dh(e),t]),Xv=e=>K(W(`never`,e),([e,t])=>[Oh(e),t]),Zv=e=>K(W(`symbol`,e),([e,t])=>[kh(e),t]),Qv=e=>K(W(`void`,e),([e,t])=>[Ah(e),t]),$v=e=>K(W(`this`,e),([e,t])=>[jh(e),t]),ey=e=>K(K(W("${",e),([e,t])=>K(q(t),([t,n])=>K(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Ih(e),t]),ty=e=>K(vv(["${","`"],e),([e,t])=>[Lh(e),t]),ny=e=>K(K(K(ty(e),([e,t])=>K(ey(t),([t,n])=>K(ny(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>K(K(ty(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K(K(ty(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[Rh(e),t]),ry=e=>K(K(W("`",e),([e,t])=>K(ny(t),([t,n])=>K(W("`",n),([n,r])=>[[e,t,n],r]))),([e,t])=>[zh(e),t]),iy=e=>K(ry(e),([e,t])=>[Bh(e),t]),ay=e=>K(K(K(W(`if`,e),([e,t])=>K(q(t),([t,n])=>K(W(`then`,n),([n,r])=>K(q(r),([r,i])=>K(W(`else`,i),([i,a])=>K(q(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>K(K(W(`if`,e),([e,t])=>K(q(t),([t,n])=>K(W(`then`,n),([n,r])=>K(q(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>[])),([e,t])=>[Vh(e),t]),oy=e=>K($_(e),([e,t])=>[Mh(e),t]),sy=e=>K(K(W(`true`,e),([e,t])=>[e,t],()=>K(W(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[Nh(e),t]),cy=e=>K(hv(e),([e,t])=>[Ph(e),t]),ly=e=>K(Tv([`'`,`"`],e),([e,t])=>[Fh(e),t]),uy=e=>K(K(K(W(`keyof`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Hh(e),t]),dy=(e,t=[])=>K(K(K(W(`[`,e),([e,t])=>K(q(t),([t,n])=>K(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>K(K(W(`[`,e),([e,t])=>K(W(`]`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,n])=>dy(n,[...t,e]),()=>[t,e]),fy=e=>K(dy(e),([e,t])=>[Uh(e),t]),py=e=>K(K(K(W(`extends`,e),([e,t])=>K(q(t),([t,n])=>K(W(`?`,n),([n,r])=>K(q(r),([r,i])=>K(W(`:`,i),([i,a])=>K(q(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Wh(e),t]),my=e=>K(K(K(W(`(`,e),([e,t])=>K(q(t),([t,n])=>K(W(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>K(Bv(e),([e,t])=>[e,t],()=>K(Vv(e),([e,t])=>[e,t],()=>K(Hv(e),([e,t])=>[e,t],()=>K(Uv(e),([e,t])=>[e,t],()=>K(Wv(e),([e,t])=>[e,t],()=>K(Gv(e),([e,t])=>[e,t],()=>K(Kv(e),([e,t])=>[e,t],()=>K(qv(e),([e,t])=>[e,t],()=>K(Jv(e),([e,t])=>[e,t],()=>K(Yv(e),([e,t])=>[e,t],()=>K(Xv(e),([e,t])=>[e,t],()=>K(Zv(e),([e,t])=>[e,t],()=>K(Qv(e),([e,t])=>[e,t],()=>K($v(e),([e,t])=>[e,t],()=>K(oy(e),([e,t])=>[e,t],()=>K(sy(e),([e,t])=>[e,t],()=>K(cy(e),([e,t])=>[e,t],()=>K(ly(e),([e,t])=>[e,t],()=>K(iy(e),([e,t])=>[e,t],()=>K(ay(e),([e,t])=>[e,t],()=>K(Ly(e),([e,t])=>[e,t],()=>K(Ky(e),([e,t])=>[e,t],()=>K(nb(e),([e,t])=>[e,t],()=>K(tb(e),([e,t])=>[e,t],()=>K(ob(e),([e,t])=>[e,t],()=>K(Rv(e),([e,t])=>[e,t],()=>K(sb(e),([e,t])=>[e,t],()=>[])))))))))))))))))))))))))))),([e,t])=>[Gh(e),t]),hy=e=>K(K(K(W(`with`,e),([e,t])=>K(_b(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Kh(e),t]),gy=e=>K(K(uy(e),([e,t])=>K(my(t),([t,n])=>K(fy(n),([n,r])=>K(py(r),([r,i])=>K(hy(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Xh(e),t]),_y=e=>K(K(K(W(`&`,e),([e,t])=>K(gy(t),([t,n])=>K(_y(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Qh(e),t]),vy=e=>K(K(gy(e),([e,t])=>K(_y(t),([t,n])=>[[e,t],n])),([e,t])=>[$h(e),t]),yy=e=>K(K(K(W(`|`,e),([e,t])=>K(vy(t),([t,n])=>K(yy(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[eg(e),t]),by=e=>K(K(vy(e),([e,t])=>K(yy(t),([t,n])=>[[e,t],n])),([e,t])=>[tg(e),t]),xy=e=>K(K(W(`readonly`,e),([e,t])=>K(by(t),([t,n])=>[[e,t],n])),([e,t])=>[ng(e),t]),Sy=e=>K(K(W(`|`,e),([e,t])=>K(by(t),([t,n])=>[[e,t],n])),([e,t])=>[rg(e),t]),Cy=e=>K(K(Pv(e),([e,t])=>K(W(`=`,t),([t,n])=>K(q(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[ig(e),t]),wy=e=>K(K(K(W(`infer`,e),([e,t])=>K(G(t),([t,n])=>K(W(`extends`,n),([n,r])=>K(by(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>K(K(W(`infer`,e),([e,t])=>K(G(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>[])),([e,t])=>[ag(e),t]),q=e=>K(K(wy(e),([e,t])=>[e,t],()=>K(Sy(e),([e,t])=>[e,t],()=>K(xy(e),([e,t])=>[e,t],()=>K(by(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[og(e),t]),Ty=e=>K(hv(e),([e,t])=>[sg(e),t]),Ey=e=>K(G(e),([e,t])=>[cg(e),t]),Dy=e=>K(Tv([`'`,`"`],e),([e,t])=>[lg(e),t]),Oy=e=>K(K(W(`[`,e),([e,t])=>K(G(t),([t,n])=>K(W(`:`,n),([n,r])=>K(K(Gv(r),([e,t])=>[e,t],()=>K(Vv(r),([e,t])=>[e,t],()=>K(Bv(r),([e,t])=>[e,t],()=>K(Zv(r),([e,t])=>[e,t],()=>[])))),([r,i])=>K(W(`]`,i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[ug(e),t]),ky=e=>K(K(Ty(e),([e,t])=>[e,t],()=>K(Ey(e),([e,t])=>[e,t],()=>K(Dy(e),([e,t])=>[e,t],()=>K(Oy(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[dg(e),t]),Ay=e=>K(K(K(W(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[fg(e),t]),jy=e=>K(K(K(W(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[pg(e),t]),My=e=>K(K(Ay(e),([e,t])=>K(ky(t),([t,n])=>K(jy(n),([n,r])=>K(W(`:`,r),([r,i])=>K(q(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[mg(e),t]),Ny=e=>K(K(K(W(`,`,e),([e,t])=>K(W(`
|
|
289
|
+
`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`;`,e),([e,t])=>K(W(`
|
|
290
|
+
`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`,`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K(K(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K(K(W(`
|
|
291
|
+
`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))))),([e,t])=>[hg(e),t]),Py=(e,t=[])=>K(K(My(e),([e,t])=>K(Ny(t),([t,n])=>[[e,t],n])),([e,n])=>Py(n,[...t,e]),()=>[t,e]),Fy=e=>K(K(Py(e),([e,t])=>K(K(K(My(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[gg(e),t]),Iy=e=>K(K(W(`{`,e),([e,t])=>K(Fy(t),([t,n])=>K(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[vg(e),t]),Ly=e=>K(Iy(e),([e,t])=>[yg(e),t]),Ry=e=>K(K(K(G(e),([e,t])=>K(W(`?`,t),([t,n])=>K(W(`:`,n),([n,r])=>K(W(`readonly`,r),([r,i])=>K(q(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[e,t],()=>K(K(G(e),([e,t])=>K(W(`:`,t),([t,n])=>K(W(`readonly`,n),([n,r])=>K(q(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>K(K(G(e),([e,t])=>K(W(`?`,t),([t,n])=>K(W(`:`,n),([n,r])=>K(q(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[e,t],()=>K(K(G(e),([e,t])=>K(W(`:`,t),([t,n])=>K(q(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>[])))),([e,t])=>[bg(e),t]),zy=e=>K(K(W(`readonly`,e),([e,t])=>K(q(t),([t,n])=>K(W(`?`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[xg(e),t]),By=e=>K(K(W(`readonly`,e),([e,t])=>K(q(t),([t,n])=>[[e,t],n])),([e,t])=>[Sg(e),t]),Vy=e=>K(K(q(e),([e,t])=>K(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[Cg(e),t]),Hy=e=>K(K(Ry(e),([e,t])=>[e,t],()=>K(zy(e),([e,t])=>[e,t],()=>K(By(e),([e,t])=>[e,t],()=>K(Vy(e),([e,t])=>[e,t],()=>K(q(e),([e,t])=>[e,t],()=>[]))))),([e,t])=>[wg(e),t]),Uy=e=>K(K(K(W(`...`,e),([e,t])=>K(Hy(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(Hy(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[Tg(e),t]),Wy=(e,t=[])=>K(K(Uy(e),([e,t])=>K(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Wy(n,[...t,e]),()=>[t,e]),Gy=e=>K(K(Wy(e),([e,t])=>K(K(K(Uy(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Eg(e),t]),Ky=e=>K(K(W(`[`,e),([e,t])=>K(Gy(t),([t,n])=>K(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Dg(e),t]),qy=e=>K(K(G(e),([e,t])=>K(W(`?`,t),([t,n])=>K(W(`:`,n),([n,r])=>K(W(`readonly`,r),([r,i])=>K(q(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Og(e),t]),Jy=e=>K(K(G(e),([e,t])=>K(W(`:`,t),([t,n])=>K(W(`readonly`,n),([n,r])=>K(q(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[kg(e),t]),Yy=e=>K(K(G(e),([e,t])=>K(W(`?`,t),([t,n])=>K(W(`:`,n),([n,r])=>K(q(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[Ag(e),t]),Xy=e=>K(K(G(e),([e,t])=>K(W(`:`,t),([t,n])=>K(q(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[jg(e),t]),Zy=e=>K(K(qy(e),([e,t])=>[e,t],()=>K(Jy(e),([e,t])=>[e,t],()=>K(Yy(e),([e,t])=>[e,t],()=>K(Xy(e),([e,t])=>[e,t],()=>[])))),([e,t])=>[Mg(e),t]),Qy=e=>K(K(K(W(`...`,e),([e,t])=>K(Zy(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(Zy(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[])),([e,t])=>[Ng(e),t]),$y=(e,t=[])=>K(K(Qy(e),([e,t])=>K(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>$y(n,[...t,e]),()=>[t,e]),eb=e=>K(K($y(e),([e,t])=>K(K(K(Qy(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Pg(e),t]),tb=e=>K(K(W(`(`,e),([e,t])=>K(eb(t),([t,n])=>K(W(`)`,n),([n,r])=>K(W(`=>`,r),([r,i])=>K(q(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[Fg(e),t]),nb=e=>K(K(W(`new`,e),([e,t])=>K(W(`(`,t),([t,n])=>K(eb(n),([n,r])=>K(W(`)`,r),([r,i])=>K(W(`=>`,i),([i,a])=>K(q(a),([a,o])=>[[e,t,n,r,i,a],o])))))),([e,t])=>[Ig(e),t]),rb=e=>K(K(K(W(`+`,e),([e,t])=>K(W(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`-`,e),([e,t])=>K(W(`readonly`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`readonly`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[Rg(e),t]),ib=e=>K(K(K(W(`+`,e),([e,t])=>K(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`-`,e),([e,t])=>K(W(`?`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`?`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])))),([e,t])=>[Bg(e),t]),ab=e=>K(K(K(W(`as`,e),([e,t])=>K(q(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[Vg(e),t]),ob=e=>K(K(W(`{`,e),([e,t])=>K(rb(t),([t,n])=>K(W(`[`,n),([n,r])=>K(G(r),([r,i])=>K(W(`in`,i),([i,a])=>K(q(a),([a,o])=>K(ab(o),([o,s])=>K(W(`]`,s),([s,c])=>K(ib(c),([c,l])=>K(W(`:`,l),([l,u])=>K(q(u),([u,d])=>K(zv(d),([d,f])=>K(W(`}`,f),([f,p])=>[[e,t,n,r,i,a,o,s,c,l,u,d,f],p]))))))))))))),([e,t])=>[Hg(e),t]),sb=e=>K(G(e),([e,t])=>[Ug(e),t]),cb=e=>K($_(e),([e,t])=>[Wg(e),t]),lb=e=>K(hv(e),([e,t])=>[Gg(e),t]),ub=e=>K(K(W(`true`,e),([e,t])=>[e,t],()=>K(W(`false`,e),([e,t])=>[e,t],()=>[])),([e,t])=>[Kg(e),t]),db=e=>K(Tv([`"`,`'`],e),([e,t])=>[qg(e),t]),fb=e=>K(W(`null`,e),([e,t])=>[Jg(e),t]),pb=e=>K(W(`undefined`,e),([e,t])=>[void 0,t]),mb=e=>K(K(ky(e),([e,t])=>K(W(`:`,t),([t,n])=>K(xb(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Yg(e),t]),hb=(e,t=[])=>K(K(mb(e),([e,t])=>K(Ny(t),([t,n])=>[[e,t],n])),([e,n])=>hb(n,[...t,e]),()=>[t,e]),gb=e=>K(K(hb(e),([e,t])=>K(K(K(mb(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[Xg(e),t]),_b=e=>K(K(W(`{`,e),([e,t])=>K(gb(t),([t,n])=>K(W(`}`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[Qg(e),t]),vb=(e,t=[])=>K(K(xb(e),([e,t])=>K(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>vb(n,[...t,e]),()=>[t,e]),yb=e=>K(K(vb(e),([e,t])=>K(K(K(xb(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[$g(e),t]),bb=e=>K(K(W(`[`,e),([e,t])=>K(yb(t),([t,n])=>K(W(`]`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e_(e),t]),xb=e=>K(K(cb(e),([e,t])=>[e,t],()=>K(lb(e),([e,t])=>[e,t],()=>K(ub(e),([e,t])=>[e,t],()=>K(db(e),([e,t])=>[e,t],()=>K(fb(e),([e,t])=>[e,t],()=>K(pb(e),([e,t])=>[e,t],()=>K(_b(e),([e,t])=>[e,t],()=>K(bb(e),([e,t])=>[e,t],()=>[])))))))),([e,t])=>[t_(e),t]),Sb=e=>K(W(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[n_(e),t]),Cb=e=>K(W(`.*`,e),([e,t])=>[r_(e),t]),wb=e=>K(W(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[i_(e),t]),Tb=e=>K(W(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[a_(e),t]),Eb=e=>K(W(`(?!)`,e),([e,t])=>[o_(e),t]),Db=e=>K(Ev([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[s_(e),t]),Ob=e=>K(K(Sb(e),([e,t])=>[e,t],()=>K(Cb(e),([e,t])=>[e,t],()=>K(wb(e),([e,t])=>[e,t],()=>K(Tb(e),([e,t])=>[e,t],()=>K(Eb(e),([e,t])=>[e,t],()=>K(kb(e),([e,t])=>[e,t],()=>K(Db(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[c_(e),t]),kb=e=>K(K(W(`(`,e),([e,t])=>K(Mb(t),([t,n])=>K(W(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[l_(e),t]),Ab=e=>K(K(K(jb(e),([e,t])=>K(W(`|`,t),([t,n])=>K(Ab(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>K(K(jb(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[u_(e),t]),jb=e=>K(K(Ob(e),([e,t])=>K(Mb(t),([t,n])=>[[e,t],n])),([e,t])=>[d_(e),t]),Mb=e=>K(K(Ab(e),([e,t])=>[e,t],()=>K(jb(e),([e,t])=>[e,t],()=>[])),([e,t])=>[f_(e),t]),Nb=e=>K(K(W(`^`,e),([e,t])=>K(Mb(t),([t,n])=>K(W(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[p_(e),t]),Pb=(e,t=[])=>K(K(q(e),([e,t])=>K(W(`,`,t),([t,n])=>[[e,t],n])),([e,n])=>Pb(n,[...t,e]),()=>[t,e]),Fb=e=>K(K(Pb(e),([e,t])=>K(K(K(q(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[m_(e),t]),Ib=e=>K(K(K(W(`extends`,e),([e,t])=>K(Fb(t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[h_(e),t]),Lb=e=>K(K(W(`interface`,e),([e,t])=>K(G(t),([t,n])=>K(Pv(n),([n,r])=>K(Ib(r),([r,i])=>K(Iy(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[g_(e),t]),Rb=e=>K(K(W(`interface`,e),([e,t])=>K(G(t),([t,n])=>K(Ib(n),([n,r])=>K(Iy(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[__(e),t]),zb=e=>K(K(W(`type`,e),([e,t])=>K(G(t),([t,n])=>K(Pv(n),([n,r])=>K(W(`=`,r),([r,i])=>K(q(i),([i,a])=>[[e,t,n,r,i],a]))))),([e,t])=>[v_(e),t]),Bb=e=>K(K(W(`type`,e),([e,t])=>K(G(t),([t,n])=>K(W(`=`,n),([n,r])=>K(q(r),([r,i])=>[[e,t,n,r],i])))),([e,t])=>[y_(e),t]),Vb=e=>K(K(K(W(`export`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],e],([e,t])=>[e,t],()=>[])),([e,t])=>[b_(e),t]),Hb=e=>K(K(K(W(`;`,e),([e,t])=>K(W(`
|
|
292
|
+
`,t),([t,n])=>[[e,t],n])),([e,t])=>[e,t],()=>K(K(W(`;`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K(K(W(`
|
|
293
|
+
`,e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>[]))),([e,t])=>[x_(e),t]),Ub=(e,t=[])=>K(K(Gb(e),([e,t])=>K(Hb(t),([t,n])=>[[e,t],n])),([e,n])=>Ub(n,[...t,e]),()=>[t,e]),Wb=e=>K(K(Ub(e),([e,t])=>K(K(K(Gb(t),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>K([[],t],([e,t])=>[e,t],()=>[])),([t,n])=>[[e,t],n])),([e,t])=>[S_(e),t]),Gb=e=>K(K(Vb(e),([e,t])=>K(K(Lb(t),([e,t])=>[e,t],()=>K(Rb(t),([e,t])=>[e,t],()=>K(zb(t),([e,t])=>[e,t],()=>K(Bb(t),([e,t])=>[e,t],()=>[])))),([t,n])=>K(zv(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[C_(e),t]),Kb=e=>K(K(Gb(e),([e,t])=>K(Wb(t),([t,n])=>[[e,t],n])),([e,t])=>[w_(e),t]),qb=e=>K(K(Kb(e),([e,t])=>[e,t],()=>K(Cy(e),([e,t])=>[e,t],()=>K(q(e),([e,t])=>[e,t],()=>[]))),([e,t])=>[T_(e),t]);function Jb(e){let t=ry(`\`${e}\``);return A(t.length,2)?t[0]:_f()}function Yb(e){return e.join(`|`)}function Xb(e){return e.slice(1,e.length-1)}function Zb(e,t,n){return cx(t,`${n}${e}`)}function Qb(e,t){return cx(e,`${t}${zf}`)}function $b(e,t){return cx(e,`${t}${Kf}`)}function ex(e,t){return cx(e,`${t}${ap}`)}function tx(e,t){return sx(z([V(`false`),V(`true`)]),e,t)}function nx(e,t){return cx(e,`${t}.*`)}function rx(e,t,n){return cx(t,`${n}${Xb(e)}`)}function ix(e,t,n){return sx(dx(e,{}),t,n)}function ax(e,t,n){return sx(gm(e),t,n)}function ox(e,t,n,r=[]){return j(e,(e,i)=>ox(i,t,n,[...r,sx(e,[],``)]),()=>cx(t,`${n}(${Yb(r)})`))}function sx(e,t,n){return pf(e)?ax(e.enum,t,n):Jf(e)?$b(t,n):H(e)?Zb(e.const,t,n):Vf(e)?Qb(t,n):Uf(e)?tx(t,n):sp(e)?ex(t,n):gp(e)?nx(t,n):vx(e)?rx(e.pattern,t,n):mx(e)?ix(e.parameters[0],t,n):B(e)?ox(e.anyOf,t,n):Fd}function cx(e,t){return j(e,(e,n)=>sx(e,n,t),()=>t)}function lx(e){return`^${cx(e,``)}$`}function ux(e){return Cp(lx(e))}function dx(e,t){return Q(e)?F(ux(e),{},t):px(e,t)}function fx(e,t,n,r){return dx(eO(e,t,n),r)}function px(e,t={}){return L(`TemplateLiteral`,[e],t)}function mx(e){return fd(e)&&M(e,`action`)&&A(e.action,`TemplateLiteral`)}function hx(e){return dx(e,{})}function gx(e){return hx(Jb(e))}function _x(e,t={}){return F(Ju(e)?gx(e):hx(e),{},t)}function vx(e){return I(e,`TemplateLiteral`)}var yx=l({ExtendsFalse:()=>Y,ExtendsTrue:()=>J,ExtendsUnion:()=>bx,IsExtendsFalse:()=>Cx,IsExtendsTrue:()=>Sx,IsExtendsTrueLike:()=>wx,IsExtendsUnion:()=>xx,Match:()=>Tx});function bx(e){return P({"~kind":`ExtendsUnion`},{inferred:e})}function xx(e){return qu(e)&&M(e,`~kind`)&&M(e,`inferred`)&&A(e[`~kind`],`ExtendsUnion`)&&qu(e.inferred)}function J(e){return P({"~kind":`ExtendsTrue`},{inferred:e})}function Sx(e){return qu(e)&&M(e,`~kind`)&&M(e,`inferred`)&&A(e[`~kind`],`ExtendsTrue`)&&qu(e.inferred)}function Y(){return P({"~kind":`ExtendsFalse`},{})}function Cx(e){return qu(e)&&M(e,`~kind`)&&A(e[`~kind`],`ExtendsFalse`)}function wx(e){return xx(e)||Sx(e)}function Tx(e,t,n){return wx(e)?t(e.inferred):n()}function Ex(e,t,n,r){return Tx(Z(e,n,r),r=>J(zu(zu(e,r),{[t]:n})),()=>Y())}function Dx(e,t){return J(e)}function Ox(e,t,n,r,i){return Tx(Z(e,t,n),e=>Tx(Z(e,t,r),e=>J(e),()=>Y()),()=>Tx(Z(e,t,i),e=>J(e),()=>Y()))}function kx(e,t,n){return Z(e,t,gm(n))}function Ax(e,t,n){return j(n,(n,r)=>Tx(Z(e,t,n),e=>Ax(e,t,r),()=>Y()),()=>J(e))}function jx(e,t,n){return Z(e,t,vm(n))}function Mx(e,t,n){return j(n,(n,r)=>Tx(Z(e,t,n),e=>J(e),()=>Mx(e,t,r)),()=>Y())}function X(e,t,n){return Pd(n)?Dx(e,t):cf(n)?Ox(e,t,n.if,n.then,n.else):pf(n)?kx(e,t,n.enum):of(n)?Ex(e,n.name,t,n.extends):hf(n)?Ax(e,t,n.allOf):vx(n)?jx(e,t,n.pattern):B(n)?Mx(e,t,n.anyOf):Qd(n)?J(e):Y()}function Nx(e,t,n){return of(n)?X(e,t,n):Pd(n)||Qd(n)?J(e):bx(e)}function Px(e,t){let n=Df(e),r=Df(t);return n&&r||!n&&r?!0:!(n&&!r)}function Fx(e,t,n,r){return vd(r)?Px(t,r)?Z(e,n,r.items):Y():X(e,t,r)}function Ix(e,t,n){return xd(n)?Z(e,t,n.iteratorItems):X(e,bd(t),n)}function Lx(e,t,n){return Vf(n)?J(e):X(e,t,n)}function Rx(e,t,n){return Uf(n)?J(e):X(e,t,n)}function zx(e,t,n,r,i){let a=of(r)?t:r,o=of(r)?r:t,s=Wd(t),c=Wd(r);return!s&&c?Y():Tx(Z(e,a,o),e=>Hx(e,n,i),()=>Y())}function Bx(e,t,n,r){return j(r,(r,i)=>zx(e,t,n,r,i),()=>Wd(t)?J(e):Y())}function Vx(e,t,n){return j(t,(t,r)=>Bx(e,t,r,n),()=>J(e))}function Hx(e,t,n){return Vx(e,t,n)}function Ux(e,t,n){return nh(n)?J(e):Z(e,t,n)}function Wx(e,t,n,r){return Pd(r)||Qd(r)?J(e):wd(r)?Tx(Hx(e,t,r.parameters),e=>Ux(e,n,r.instanceType),()=>Y()):Y()}function Gx(e,t,n,r,i){return Tx(Z(e,t,i),()=>Z(e,n,i),()=>Z(e,r,i))}function Kx(e,t,n){return Z(e,gm(t),n)}function qx(e,t,n,r){return Pd(r)||Qd(r)?J(e):Dd(r)?Tx(Hx(e,t,r.parameters),e=>Ux(e,n,r.returnType),()=>Y()):Y()}function Jx(e,t,n){return Jf(n)||sp(n)?J(e):X(e,t,n)}function Yx(e,t,n){return Z(e,_m(t),n)}function Xx(e,t,n){return Xf(n)?Z(e,t,n.iteratorItems):X(e,Yf(t),n)}function Zx(e,t,n){return t===n?J(e):Y()}function Qx(e,t,n){return H(n)?Zx(e,t,n.const):Vf(n)?J(e):X(e,V(t),n)}function $x(e,t,n){return H(n)?Zx(e,t,n.const):Uf(n)?J(e):X(e,V(t),n)}function eS(e,t,n){return H(n)?Zx(e,t,n.const):sp(n)?J(e):X(e,V(t),n)}function tS(e,t,n){return H(n)?Zx(e,t,n.const):gp(n)?J(e):X(e,V(t),n)}function nS(e,t,n){return Vu(t.const)?Qx(e,t.const,n):Hu(t.const)?$x(e,t.const,n):Gu(t.const)?eS(e,t.const,n):Ju(t.const)?tS(e,t.const,n):_f()}function rS(e,t,n){return of(n)?X(e,t,n):J(e)}function iS(e,t,n){return ip(n)?J(e):X(e,t,n)}function aS(e,t,n){return sp(n)?J(e):X(e,t,n)}function oS(e,t,n){return Wd(t)?Wd(n)?J(e):Y():J(e)}function sS(e,t,n){return of(n)&&Ld(n.extends)?Y():Tx(Z(e,t,n),e=>oS(e,t,n),()=>Y())}function cS(e,t){return e.reduce((e,n)=>n in t&&wx(t[n])?{...e,...t[n].inferred}:_f(),{})}function lS(e,t,n){let r={};for(let i of N(n))r[i]=i in t?sS({},t[i],n[i]):Wd(n[i])?of(n[i])?J(zu(e,{[n[i].name]:n[i].extends})):J(e):Y();let i=Qu(r).every(e=>wx(e)),a=i?cS(N(r),r):{};return i?J(a):Y()}function uS(e,t,n){let r=lS(e,t,n);return wx(r)?J(zu(e,r.inferred)):Y()}function dS(e,t,n){return uS(e,t,n)}function fS(e,t,n){return Jd(n)?dS(e,t,n.properties):X(e,R(t),n)}function pS(e,t,n){return pp(n)?Z(e,t,n.item):X(e,fp(t),n)}function mS(e,t,n){return gp(n)?J(e):X(e,t,n)}function hS(e,t,n){return lp(n)?J(e):X(e,t,n)}function gS(e,t,n){return Z(e,vm(t),n)}function _S(e,t){return P({"~kind":`Inferrable`},{name:e,type:t},{})}function vS(e){return qu(e)&&M(e,`~kind`)&&M(e,`name`)&&M(e,`type`)&&A(e[`~kind`],`Inferrable`)&&Ju(e.name)&&qu(e.type)}function yS(e){return Xm(e)?of(e.items)?vd(e.items.extends)?_S(e.items.name,e.items.extends.items):Qd(e.items.extends)?_S(e.items.name,e.items.extends):void 0:_f():void 0}function bS(e){return of(e)?_S(e.name,e.extends):void 0}function xS(e,t,n=[]){return j(e,(e,r)=>Tx(Z({},e,t),()=>xS(r,t,[...n,e]),()=>void 0),()=>n)}function SS(e,t,n,r){let i=xS(n,r);return Bu(i)?J(zu(e,{[t]:Lp(i)})):Y()}function CS(e,t,n,r){let i=xS(n,r);return Bu(i)?J(zu(e,{[t]:z(i)})):Y()}function wS(e){return[...e].reverse()}function TS(e,t){return t?wS(e):e}function ES(e){let t=e.length>0?e[0]:void 0;return fd(fd(t)?yS(t):void 0)}function DS(e,t,n,r,i,a){return Tx(Z(e,n,i),e=>AS(e,t,r,a),()=>Y())}function OS(e,t,n,r,i){let a=yS(r);return vS(a)?SS(e,a.name,TS(n,t),a.type):j(n,(n,a)=>DS(e,t,n,a,r,i),()=>Y())}function kS(e,t,n,r){return j(r,(r,i)=>OS(e,t,n,r,i),()=>A(n.length,0)?J(e):Y())}function AS(e,t,n,r){return kS(e,t,n,r)}function jS(e,t,n){let r=$D(e,ZD([],[]),n),i=ES(r);return AS(e,i,TS(t,i),TS(r,i))}function MS(e,t,n){let r=bS(n);return vS(r)?CS(e,r.name,t,r.type):j(t,(t,r)=>Tx(Z(e,t,n),e=>MS(e,r,n),()=>Y()),()=>J(e))}function NS(e,t,n){let r=$D(e,ZD([],[]),t);return Rp(n)?jS(e,r,n.items):vd(n)?MS(e,r,n.items):X(e,Lp(r),n)}function PS(e,t,n){return nh(n)||eh(n)?J(e):X(e,t,n)}function FS(e,t,n){return j(n,(n,r)=>Tx(Z(e,t,n),e=>J(e),()=>FS(e,t,r)),()=>Y())}function IS(e,t,n){return j(t,(t,r)=>Tx(FS(e,t,n),e=>IS(e,r,n),()=>Y()),()=>J(e))}function LS(e,t,n){let r=bS(n);return vS(r)?CS(e,r.name,t,r.type):B(n)?IS(e,t,n.anyOf):IS(e,t,[n])}function RS(e,t,n){return of(n)?X(e,t,n):Pd(n)||Qd(n)?J(e):Y()}function zS(e,t,n){return nh(n)?J(e):X(e,t,n)}function Z(e,t,n){return Pd(t)?Nx(e,t,n):vd(t)?Fx(e,t,t.items,n):xd(t)?Ix(e,t.iteratorItems,n):Vf(t)?Lx(e,t,n):Uf(t)?Rx(e,t,n):wd(t)?Wx(e,t.parameters,t.instanceType,n):cf(t)?Gx(e,t.if,t.then,t.else,n):pf(t)?Kx(e,t.enum,n):Dd(t)?qx(e,t.parameters,t.returnType,n):Jf(t)?Jx(e,t,n):hf(t)?Yx(e,t.allOf,n):Xf(t)?Xx(e,t.iteratorItems,n):H(t)?nS(e,t,n):Ld(t)?rS(e,t,n):ip(t)?iS(e,t,n):sp(t)?aS(e,t,n):Jd(t)?fS(e,t.properties,n):pp(t)?pS(e,t.item,n):gp(t)?mS(e,t,n):lp(t)?hS(e,t,n):vx(t)?gS(e,t.pattern,n):Rp(t)?NS(e,t.items,n):eh(t)?PS(e,t,n):B(t)?LS(e,t.anyOf,n):Qd(t)?RS(e,t,n):nh(t)?zS(e,t,n):Y()}function BS(e,t){return _m([...e,R(t)])}function VS(e,t,n){return Q(e)?F(BS(e,t),{},n):US(e,t,n)}function HS(e,t,n,r,i){return VS(eO(e,t,n),QD(e,t,r),i)}function US(e,t,n={}){return L(`Interface`,[e,t],n)}function WS(e){return fd(e)&&M(e,`action`)&&A(e.action,`Interface`)}function GS(e,t,n={}){return VS(e,t,n)}function KS(e,t,n){return e.includes(n)?!0:YS([...e,n],t,t[n])}function qS(e,t,n){return JS(e,t,qd(n))}function JS(e,t,n){return j(n,(n,r)=>YS(e,t,n)?!0:JS(e,t,r),()=>!1)}function YS(e,t,n){return Ad(n)?KS(e,t,n.$ref):vd(n)?YS(e,t,n.items):xd(n)?YS(e,t,n.iteratorItems):wd(n)?JS(e,t,[...n.parameters,n.instanceType]):Dd(n)?JS(e,t,[...n.parameters,n.returnType]):WS(n)?qS(e,t,n.parameters[1]):hf(n)?JS(e,t,n.allOf):Xf(n)?YS(e,t,n.iteratorItems):Jd(n)?qS(e,t,n.properties):pp(n)?YS(e,t,n.item):B(n)?JS(e,t,n.anyOf):Rp(n)?JS(e,t,n.items):Jm(n)?YS(e,t,qm(n)):!1}function XS(e,t,n){return YS(e,t,n)}function ZS(e,t){return t.reduce((t,n)=>n in e?XS([n],e,e[n])?[...t,n]:t:_f(),[])}function QS(e){return ZS(e,Kd(e))}function $S(e,t,n){return n.includes(t)?n:t in e?nC(e,e[t],[...n,t]):_f()}function eC(e,t,n){return tC(e,qd(t),n)}function tC(e,t,n){return t.reduce((t,n)=>nC(e,n,t),n)}function nC(e,t,n){return Ad(t)?$S(e,t.$ref,n):vd(t)?nC(e,t.items,n):xd(t)?nC(e,t.iteratorItems,n):wd(t)?tC(e,[...t.parameters,t.instanceType],n):Dd(t)?tC(e,[...t.parameters,t.returnType],n):WS(t)?eC(e,t.parameters[1],n):hf(t)?tC(e,t.allOf,n):Xf(t)?nC(e,t.iteratorItems,n):Jd(t)?eC(e,t.properties,n):pp(t)?nC(e,t.item,n):B(t)?tC(e,t.anyOf,n):Rp(t)?tC(e,t.items,n):Jm(t)?nC(e,qm(t),n):n}function rC(e,t,n){return nC(e,n,[t])}function iC(e){return Nd()}function aC(e){return N(e).reduce((t,n)=>({...t,[n]:sC(e[n])}),{})}function oC(e){return e.reduce((e,t)=>[...e,sC(t)],[])}function sC(e){return Ad(e)?iC(e.$ref):vd(e)?_d(sC(e.items),yd(e)):xd(e)?bd(sC(e.iteratorItems)):wd(e)?Cd(oC(e.parameters),sC(e.instanceType)):Dd(e)?Ed(oC(e.parameters),sC(e.returnType)):hf(e)?mf(oC(e.allOf)):Xf(e)?Yf(sC(e.iteratorItems)):Jd(e)?R(aC(e.properties)):pp(e)?fp(sC(e.item)):Jm(e)?Um(Km(e),sC(qm(e))):B(e)?z(oC(e.anyOf)):Rp(e)?Lp(oC(e.items)):e}function cC(e,t){return t in e?sC(e[t]):Zd()}function lC(e){return cC(e.$defs,e.$ref)}function uC(e,t,n){let r=eO(e,ZD([],[]),t),i=QD({},ZD([],[]),n);return _m([...r,R(i)])}function dC(e,t){return N(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=WS(r)?uC(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function fC(e,t,n){return $d(dC(e,rC(e,t,n)),t)}function pC(e,t){return t in e?Ad(e[t])?pC(e,e[t].$ref):e[t]:Id()}function mC(e,t){return pC(e,t)}function hC(e){return ef(e)?lC(e):nf(e)?Zd():e}function gC(e,t,n){return Z(e,hC(t),hC(n))}var _C=`equal`,vC=`disjoint`,yC=`left-inside`,bC=`right-inside`;function xC(e,t){let n=[Qd(e)?Y():gC({},e,t),Qd(e)?J({}):gC({},t,e)];return wx(n[0])&&wx(n[1])?_C:wx(n[0])&&Cx(n[1])?yC:Cx(n[0])&&wx(n[1])?bC:vC}function SC(e,t){return t.filter(t=>xC(e,t)!==`right-inside`)}function CC(e,t){return A(t.some(t=>{let n=xC(e,t);return A(n,`left-inside`)||A(n,`equal`)}),!1)}function wC(e,t){let n=bm(e);return Pd(n)?[n]:CC(n,t)?[...SC(n,t),n]:t}function TC(e){return e.reduce((e,t)=>Jd(t)?[...e,t]:Ld(t)?e:wC(t,e),[])}function EC(e){let t=Am(TC(e));return t.length===0?Id():t.length===1?t[0]:z(t)}function DC(e,t){return F(bm(e),{},t)}function OC(e,t,n,r){return DC($(e,t,n),r)}function kC(e,t=[]){return pd(e)&&A(e.action,`Conditional`)?Ad(e.parameters[0])?kC(e.parameters[2],kC(e.parameters[3],[...t,e.parameters[0].$ref])):kC(e.parameters[2],kC(e.parameters[3],t)):pd(e)&&A(e.action,`Mapped`)&&pd(e.parameters[1])&&A(e.parameters[1].action,`KeyOf`)&&Ad(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function AC(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function jC(e,t,n=[]){return j(e,(e,r)=>j(t,(t,i)=>jC(r,i,[...n,[t,e]]),()=>n),()=>n)}function MC(e){return B(e)?[...e.anyOf]:[e]}function NC(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function PC(e,t){return t.reduce((t,n)=>[...t,...NC(e,n)],[])}function FC(e){return e.reduce((e,t)=>A(t[0],!0)?PC(e,MC(t[1])):PC(e,[t[1]]),[[]])}function IC(e,t,n){let r=jC(t,AC(e,kC(n)));return pd(n)&&A(n.action,`Conditional`)||pd(n)&&A(n.action,`Mapped`)?FC(r):[t]}function LC(){return[`(not-resolvable)`,Id()]}function RC(){return[`(not-generic)`,Id()]}function zC(e,t,n){return[e,jd(t,n)]}function BC(e,t,n){return t in e?VC(e,t,e[t],n):LC()}function VC(e,t,n,r){return Md(n)?zC(t,n.parameters,n.expression):Ad(n)?BC(e,n.$ref,r):RC()}function HC(e,t,n){return VC(e,`(anonymous)`,t,n)}function UC(e,t,n){if(of(t)||nw(t)||wx(gC({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function WC(e,t,n,r,i){let a=$(e,t,i);return UC(n,a,r),zu(e,{[n]:a})}function GC(e,t,n,r,i){let a=$(e,t,n.extends),o=$(e,t,n.equals);return j(i,(i,o)=>KC(WC(e,t,n.name,a,i),t,r,o),()=>KC(WC(e,t,n.name,a,o),t,r,[]))}function KC(e,t,n,r){return j(n,(n,i)=>GC(e,t,n,i,r),()=>e)}function qC(e,t,n,r){return KC(e,t,n,r)}function JC(e){return Yu(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function YC(e,t){return A(JC(e),t)}function XC(e,t,n,r,i,a){let o=qC(e,t,r,a),s=$(o,ZD([...t.callstack,n.$ref],t.visited),i);return $(o,ZD([],[]),s)}function ZC(e,t,n,r,i,a){return a.reduce((a,o)=>[...a,XC(e,t,n,r,i,o)],[])}function QC(e,t,n,r,i,a){let o=ZC(e,t,n,r,i,IC(r,a,i));return A(o.length,1)?o[0]:ym(o)}function $C(e,t,n,r){let i=eO(e,t,r),a=HC(e,n,r),o=a[0],s=a[1];return Md(s)?YC(t,o)?ew(kd(o),i):QC(e,t,kd(o),s.parameters,s.expression,i):ew(n,i)}function ew(e,t){return P({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function tw(e,t){return $C({},ZD([],[]),e,t)}function nw(e){return I(e,`Call`)}function rw(e){return dd(e,[`~immutable`])}function iw(e,t){return F(rw(e),{},t)}function aw(e,t,n,r){return iw($(e,t,n),r)}function ow(e,t={}){return L(`Awaited`,[e],t)}function sw(e,t={}){return lw(e,t)}function cw(e){return pp(e)?cw(e.item):e}function lw(e,t){return Q([e])?F(cw(e),{},t):ow(e,t)}function uw(e,t,n,r){return lw($(e,t,n),r)}function dw(e,t){return e(t)}function fw(e,t){return Ju(t)?V(dw(e,t)):V(t)}function pw(e,t){return hw(e,vm(t))}function mw(e,t){return z(t.map(t=>hw(e,t)))}function hw(e,t){return H(t)?fw(e,t.const):vx(t)?pw(e,t.pattern):B(t)?mw(e,t.anyOf):t}function gw(e,t={}){return L(`Capitalize`,[e],t)}function _w(e,t={}){return Ow(e,t)}function vw(e,t={}){return L(`Lowercase`,[e],t)}function yw(e,t={}){return kw(e,t)}function bw(e,t={}){return L(`Uncapitalize`,[e],t)}function xw(e,t={}){return Aw(e,t)}function Sw(e,t={}){return L(`Uppercase`,[e],t)}function Cw(e,t={}){return jw(e,t)}var ww=e=>e[0].toUpperCase()+e.slice(1),Tw=e=>e.toLowerCase(),Ew=e=>e[0].toLowerCase()+e.slice(1),Dw=e=>e.toUpperCase();function Ow(e,t){return Q([e])?F(hw(ww,e),{},t):gw(e,t)}function kw(e,t){return Q([e])?F(hw(Tw,e),{},t):vw(e,t)}function Aw(e,t){return Q([e])?F(hw(Ew,e),{},t):bw(e,t)}function jw(e,t){return Q([e])?F(hw(Dw,e),{},t):Sw(e,t)}function Mw(e,t,n,r){return Ow($(e,t,n),r)}function Nw(e,t,n,r){return kw($(e,t,n),r)}function Pw(e,t,n,r){return Aw($(e,t,n),r)}function Fw(e,t,n,r){return jw($(e,t,n),r)}function Iw(e,t,n,r,i={}){return L(`Conditional`,[e,t,n,r],i)}function Lw(e,t,n,r,i={}){return zw({},ZD([],[]),e,t,n,r,i)}function Rw(e,t,n,r,i,a){let o=gC(e,n,r);return xx(o)?z([$(o.inferred,t,i),$(e,t,a)]):Sx(o)?$(o.inferred,t,i):$(e,t,a)}function zw(e,t,n,r,i,a,o){return Q([n,r])?F(Rw(e,t,n,r,i,a),{},o):Iw(n,r,i,a,o)}function Bw(e,t,n,r,i,a,o){return zw(e,t,$(e,t,n),$(e,t,r),i,a,o)}function Vw(e,t={}){return L(`ConstructorParameters`,[e],t)}function Hw(e,t={}){return Ww(e,t)}function Uw(e){let t=wd(e)?e.parameters:[];return Lp($D({},ZD([],[]),t))}function Ww(e,t){return Q([e])?F(Uw(e),{},t):Vw(e,t)}function Gw(e,t,n,r){return Ww($(e,t,n),r)}function Kw(e,t,n={}){return L(`Exclude`,[e,t],n)}function qw(e,t,n={}){return Jw(e,t,n)}function Jw(e,t,n){return Q([e,t])?F(mm(e,t),{},n):Kw(e,t,n)}function Yw(e,t,n,r,i){return Jw($(e,t,n),$(e,t,r),i)}function Xw(e,t,n={}){return L(`Extract`,[e,t],n)}function Zw(e,t,n={}){return tT(e,t,n)}function Qw(e,t){return wx(gC({},e,t))?[e]:[]}function $w(e,t){return e.reduce((e,n)=>[...e,...Qw(n,t)],[])}function eT(e,t){let n=bm(e);return ym($w(B(n)?n.anyOf:[n],t))}function tT(e,t,n){return Q([e,t])?F(eT(e,t),{},n):Xw(e,t,n)}function nT(e,t,n,r,i){return tT($(e,t,n),$(e,t,r),i)}function rT(e){return e.reduce((e,t)=>ep(t)?[...e,V(t)]:e,[])}function iT(e){return z(rT(e))}function aT(e,t,n={}){return L(`Index`,[e,t],n)}function oT(e,t,n={}){return QT(e,Bu(t)?iT(t):t,n)}function sT(e,t){return gT(mC(e,t))}function cT(e,t,n){return gT(hm(e,t,n))}function lT(e,t){let n=N(e).filter(e=>!M(t,e)),r=N(t).filter(t=>!M(e,t)),i=N(e).filter(e=>M(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:_m([e[r],t[r]])}),{});return zu(zu(a,o),s)}function uT(e){return e.reduce((e,t)=>lT(e,gT(t)),{})}function dT(e){return e}function fT(e){return gT(Zp(Lp(e)))}function pT(e,t){return N(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:ym([e[r],t[r]])}),{})}function mT(e,t){return j(e,(e,n)=>mT(n,pT(t,gT(e))),()=>t)}function hT(e){return j(e,(e,t)=>mT(t,gT(e)),()=>_f())}function gT(e){return ef(e)?sT(e.$defs,e.$ref):cf(e)?cT(e.if,e.then,e.else):hf(e)?uT(e.allOf):B(e)?hT(e.anyOf):Rp(e)?fT(e.items):Jd(e)?dT(e.properties):{}}function _T(e){return R(gT(e))}var vT=RegExp(`^(?:0|[1-9][0-9]*)$`);function yT(e){let t=`${e}`;return vT.test(t)?parseInt(t):e}function bT(e){return V(yT(e))}function xT(e){return e.map(e=>ST(e))}function ST(e){return hf(e)?mf(xT(e.allOf)):B(e)?z(xT(e.anyOf)):H(e)?bT(e.const):e}function CT(e,t){return wx(gC({},ST(t),op()))?e:H(t)&&A(t.const,`length`)?op():Id()}function wT(e,t){return jT(mC(e,t))}function TT(e,t,n){return jT(hm(e,t,n))}function ET(e){return jT(gm(e))}function DT(e){return jT(_m(e))}function OT(e){return[`${e}`]}function kT(e){return jT(vm(e))}function AT(e){return e.reduce((e,t)=>[...e,...jT(t)],[])}function jT(e){return ef(e)?wT(e.$defs,e.$ref):cf(e)?TT(e.if,e.then,e.else):pf(e)?ET(e.enum):hf(e)?DT(e.allOf):H(e)?OT(e.const):vx(e)?kT(e.pattern):B(e)?AT(e.anyOf):[]}function MT(e){return jT(e)}function NT(e,t){return t.map(t=>PT(e,t))}function PT(e,t){return vd(t)?_d(PT(e,t.items)):xd(t)?bd(PT(e,t.iteratorItems)):wd(t)?Cd(NT(e,t.parameters),PT(e,t.instanceType)):Dd(t)?Ed(NT(e,t.parameters),PT(e,t.returnType)):Xf(t)?Yf(PT(e,t.iteratorItems)):pp(t)?fp(PT(e,t.item)):Rp(t)?Lp(NT(e,t.items)):B(t)?z(NT(e,t.anyOf)):hf(t)?mf(NT(e,t.allOf)):Qm(t)?R(e):t}function FT(e,t){return PT(e,t)}function IT(e,t){return FT(e,t in e?e[t]:Id())}function LT(e,t){return t.reduce((t,n)=>[...t,IT(e,n)],[])}function RT(e,t){return ym(LT(e,MT(t)))}var zT=new RegExp(zm);function BT(e){return e.filter(e=>zT.test(e))}function VT(e){return ym(LT(e,BT(Kd(e))))}function HT(e,t){return sp(t)?VT(e):RT(e,t)}function UT(e){return V(yT(e))}function WT(e){return e.map(e=>GT(e))}function GT(e){return hf(e)?mf(WT(e.allOf)):B(e)?z(WT(e.anyOf)):H(e)?UT(e.const):e}function KT(e,t){return e.reduceRight((e,n,r)=>wx(gC({},V(r),t))?[n,...e]:e,[])}function qT(e,t){return xm(KT(e,GT(t)))}function JT(e){return xm(e)}function YT(e,t){return H(t)&&A(t.const,`length`)?V(e.length):sp(t)||Jf(t)?JT(e):qT(e,t)}function XT(e,t){return vd(e)?CT(e.items,t):Jd(e)?HT(e.properties,t):Rp(e)?YT(e.items,t):Id()}function ZT(e){return ef(e)||cf(e)||hf(e)||B(e)?_T(e):e}function QT(e,t,n){return Q([e,t])?F(XT(ZT(e),t),{},n):aT(e,t,n)}function $T(e,t,n,r,i){return QT($(e,t,n),$(e,t,r),i)}function eE(e,t={}){return L(`InstanceType`,[e],t)}function tE(e,t={}){return rE(e,t)}function nE(e){return wd(e)?e.instanceType:Id()}function rE(e,t){return Q([e])?F(nE(e),{},t):eE(e,t)}function iE(e,t,n,r={}){return rE($(e,t,n),r)}function aE(e,t={}){return L(`KeyOf`,[e],t)}function oE(e,t={}){return hE(e,t)}function sE(){return z([op(),hp(),cp()])}function cE(e){return op()}function lE(e){return e.reduce((e,t)=>ep(t)?[...e,V(yT(t))]:_f(),[])}function uE(e){return xm(lE(N(e)))}function dE(e){return Km(e)}function fE(e){return xm(e.map((e,t)=>V(t)))}function pE(e){return Pd(e)?sE():vd(e)?cE(e.items):Jd(e)?uE(e.properties):Jm(e)?dE(e):Rp(e)?fE(e.items):Id()}function mE(e){return ef(e)||cf(e)||hf(e)||B(e)?_T(e):e}function hE(e,t){return Q([e])?F(pE(mE(e)),{},t):aE(e,t)}function gE(e,t,n,r){return hE($(e,t,n),r)}function _E(e,t,n,r,i={}){return L(`Mapped`,[e,t,n,r],i)}function vE(e,t,n,r,i={}){return AE({},ZD([],[]),e,t,n,r,i)}function yE(e){return CE(vm(e))}function bE(e){return e.reduce((e,t)=>[...e,...CE(t)],[])}function xE(e){return CE(gm(e))}function SE(e){return Gu(e)?[V(`${e}`)]:[V(e)]}function CE(e){return pf(e)?xE(e.enum):H(e)?SE(e.const):vx(e)?yE(e.pattern):B(e)?bE(e.anyOf):[e]}function wE(e){return CE(e)}function TE(e){return vx(e)?vm(e.pattern):e}function EE(e,t,n,r,i,a){let o=zu(e,{[n.name]:r}),s=TE($(o,t,i)),c=$(o,t,a);return tp(s)||np(s)?{[s.const]:c}:{}}function DE(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,EE(e,t,n,o,i,a)],[])}function OE(e){return e.reduce((e,t)=>[...e,R(t)],[])}function kE(e,t,n,r,i,a){return _m(OE(DE(e,t,n,wE(r),i,a)))}function AE(e,t,n,r,i,a,o){return Q([r])?F(kE(e,t,n,r,i,a),{},o):_E(n,r,i,a,o)}function jE(e,t,n,r,i,a,o){return AE(e,t,n,$(e,t,r),i,a,o)}function ME(e,t,n){let r=zu(e,t);return N(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:fC(r,n,t[n])}),{})}function NE(e,t,n){let r=zu(e,t);return N(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:$(r,ZD([],[]),t[n])}),{})}function PE(e,t,n){let r=QS(t),i=ME(e,t,r),a=NE(e,t,r);return F({...i,...a},{},n)}function FE(e,t,n,r){return PE(e,n,r)}function IE(e,t={}){return L(`NonNullable`,[e],t)}function LE(e,t={}){return zE(e,t)}function RE(e){return Jw(e,z([rp(),$m()]),{})}function zE(e,t){return Q([e])?F(RE(e),{},t):IE(e,t)}function BE(e,t,n,r){return zE($(e,t,n),r)}function VE(e,t,n={}){return L(`Omit`,[e,t],n)}function HE(e,t,n={}){return KE(e,Bu(t)?iT(t):t,n)}function UE(e){let t=_T(e);return Jd(t)?t.properties:_f()}function WE(e,t){return N(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function GE(e,t){return R(WE(UE(e),MT(t)))}function KE(e,t,n){return Q([e,t])?F(GE(e,t),{},n):VE(e,t,n)}function qE(e,t,n,r,i){return KE($(e,t,n),$(e,t,r),i)}function JE(e,t={}){return L(`Parameters`,[e],t)}function YE(e,t={}){return ZE(e,t)}function XE(e){let t=Dd(e)?e.parameters:[];return Lp($D({},ZD([],[]),t))}function ZE(e,t){return Q([e])?F(XE(e),{},t):JE(e,t)}function QE(e,t,n,r){return ZE($(e,t,n),r)}function $E(e,t={}){return L(`Partial`,[e],t)}function eD(e,t={}){return sD(e,t)}function tD(e,t){let n=oD(mC(e,t));return $d(zu(e,{[t]:n}),t)}function nD(e,t,n){return oD(hm(e,t,n))}function rD(e){return oD(_m(e))}function iD(e){return z(e.map(e=>oD(e)))}function aD(e){return R(N(e).reduce((t,n)=>({...t,[n]:Hd(e[n])}),{}))}function oD(e){return ef(e)?tD(e.$defs,e.$ref):cf(e)?nD(e.if,e.then,e.else):hf(e)?rD(e.allOf):B(e)?iD(e.anyOf):Jd(e)?aD(e.properties):R({})}function sD(e,t){return Q([e])?F(oD(e),{},t):$E(e,t)}function cD(e,t,n,r){return sD($(e,t,n),r)}function lD(e,t,n={}){return L(`Pick`,[e,t],n)}function uD(e,t,n={}){return pD(e,Bu(t)?iT(t):t,n)}function dD(e,t){return N(e).reduce((n,r)=>t.includes(r)?zu(n,{[r]:e[r]}):n,{})}function fD(e,t){return R(dD(UE(e),MT(t)))}function pD(e,t,n){return Q([e,t])?F(fD(e,t),{},n):lD(e,t,n)}function mD(e,t,n,r,i){return pD($(e,t,n),$(e,t,r),i)}function hD(e,t={}){return L(`ReadonlyObject`,[e],t)}function gD(e,t={}){return ED(e,t)}var _D=gD;function vD(e){return lO(_d(e))}function yD(e,t){let n=TD(mC(e,t));return $d(zu(e,{[t]:n}),t)}function bD(e,t,n){return TD(hm(e,t,n))}function xD(e){return TD(_m(e))}function SD(e){return R(N(e).reduce((t,n)=>({...t,[n]:Mf(e[n])}),{}))}function CD(e){return lO(Lp(e))}function wD(e){return z(e.map(e=>TD(e)))}function TD(e){return vd(e)?vD(e.items):ef(e)?yD(e.$defs,e.$ref):cf(e)?bD(e.if,e.then,e.else):hf(e)?xD(e.allOf):Jd(e)?SD(e.properties):Rp(e)?CD(e.items):B(e)?wD(e.anyOf):e}function ED(e,t){return Q([e])?F(TD(e),{},t):hD(e)}function DD(e,t,n,r){return ED($(e,t,n),r)}function OD(e,t,n,r){return t.visited.includes(r)?n:r in e?$(e,ZD(t.callstack,[...t.visited,r]),e[r]):n}function kD(e,t){let n=PD(mC(e,t));return $d(zu(e,{[t]:n}),t)}function AD(e,t,n){return PD(hm(e,t,n))}function jD(e){return PD(_m(e))}function MD(e){return z(e.map(e=>PD(e)))}function ND(e){return R(N(e).reduce((t,n)=>({...t,[n]:Yp(e[n])}),{}))}function PD(e){return ef(e)?kD(e.$defs,e.$ref):cf(e)?AD(e.if,e.then,e.else):hf(e)?jD(e.allOf):B(e)?MD(e.anyOf):Jd(e)?ND(e.properties):R({})}function FD(e,t={}){return L(`Required`,[e],t)}function ID(e,t={}){return LD(e,t)}function LD(e,t){return Q([e])?F(PD(e),{},t):FD(e,t)}function RD(e,t,n,r){return LD($(e,t,n),r)}function zD(e,t={}){return L(`ReturnType`,[e],t)}function BD(e,t={}){return HD(e,t)}function VD(e){return Dd(e)?e.returnType:Id()}function HD(e,t){return Q([e])?F(VD(e),{},t):zD(e,t)}function UD(e,t,n,r={}){return HD($(e,t,n),r)}function WD(e,t){return L(`With`,[e,t],{})}function GD(e,t){return qD(e,t)}function KD(e,t){return GD(e,t)}function qD(e,t){return Q([e])?F(e,{},t):WD(e,t)}function JD(e,t,n,r){return qD($(e,t,n),r)}function YD(e){return Xm(e)?Rp(e.items)?XD(e.items.items):of(e.items)||Ad(e.items)?[e]:[Id()]:[e]}function XD(e){return e.reduce((e,t)=>[...e,...YD(t)],[])}function ZD(e,t){return{callstack:e,visited:t}}function Q(e){return j(e,(e,t)=>Ad(e)?!1:Q(t),()=>!0)}function QD(e,t,n){return N(n).reduce((r,i)=>({...r,[i]:$(e,t,n[i])}),{})}function $D(e,t,n){return XD(eO(e,t,n))}function eO(e,t,n){return n.map(n=>$(e,t,n))}function tO(e,t,n,r,i){return A(n,`AddImmutable`)?sO(e,t,r[0],i):A(n,`RemoveImmutable`)?aw(e,t,r[0],i):A(n,`AddReadonly`)?Af(e,t,r[0],i):A(n,`RemoveReadonly`)?Hp(e,t,r[0],i):A(n,`AddOptional`)?Bd(e,t,r[0],i):A(n,`RemoveOptional`)?qp(e,t,r[0],i):A(n,`Awaited`)?uw(e,t,r[0],i):A(n,`Capitalize`)?Mw(e,t,r[0],i):A(n,`Conditional`)?Bw(e,t,r[0],r[1],r[2],r[3],i):A(n,`ConstructorParameters`)?Gw(e,t,r[0],i):A(n,`Evaluate`)?OC(e,t,r[0],i):A(n,`Exclude`)?Yw(e,t,r[0],r[1],i):A(n,`Extract`)?nT(e,t,r[0],r[1],i):A(n,`Index`)?$T(e,t,r[0],r[1],i):A(n,`InstanceType`)?iE(e,t,r[0],i):A(n,`Interface`)?HS(e,t,r[0],r[1],i):A(n,`KeyOf`)?gE(e,t,r[0],i):A(n,`Lowercase`)?Nw(e,t,r[0],i):A(n,`Mapped`)?jE(e,t,r[0],r[1],r[2],r[3],i):A(n,`Module`)?FE(e,t,r[0],i):A(n,`NonNullable`)?BE(e,t,r[0],i):A(n,`Pick`)?mD(e,t,r[0],r[1],i):A(n,`Parameters`)?QE(e,t,r[0],i):A(n,`Partial`)?cD(e,t,r[0],i):A(n,`Omit`)?qE(e,t,r[0],r[1],i):A(n,`ReadonlyObject`)?DD(e,t,r[0],i):A(n,`Record`)?Rm(e,t,r[0],r[1],i):A(n,`Required`)?RD(e,t,r[0],i):A(n,`ReturnType`)?UD(e,t,r[0],i):A(n,`TemplateLiteral`)?fx(e,t,r[0],i):A(n,`Uncapitalize`)?Pw(e,t,r[0],i):A(n,`Uppercase`)?Fw(e,t,r[0],i):A(n,`With`)?JD(e,t,r[0],r[1]):L(n,r,i)}function nO(e,t,n){return n=gd(n)?n.Clone():n,Ad(n)?OD(e,t,n,n.$ref):vd(n)?_d($(e,t,n.items),yd(n)):xd(n)?bd($(e,t,n.iteratorItems),Sd(n)):nw(n)?$C(e,t,n.target,n.arguments):wd(n)?Cd(eO(e,t,n.parameters),$(e,t,n.instanceType),Td(n)):pd(n)?tO(e,t,n.action,n.parameters,n.options):Dd(n)?Ed(eO(e,t,n.parameters),$(e,t,n.returnType),Od(n)):cf(n)?sf($(e,t,n.if),$(e,t,n.then),$(e,t,n.else),lf(n)):hf(n)?mf(eO(e,t,n.allOf),gf(n)):Xf(n)?Yf($(e,t,n.iteratorItems),Zf(n)):Jd(n)?R(QD(e,t,n.properties),Yd(n)):pp(n)?fp($(e,t,n.item),mp(n)):Jm(n)?Wm(Gm(n),$(e,t,qm(n))):Xm(n)?Ym($(e,t,n.items)):Rp(n)?Lp($D(e,t,n.items),zp(n)):B(n)?z(eO(e,t,n.anyOf),Xd(n)):n}function rO(e,t){let n=Df(e)?Ef(t):t,r=Pf(e)?Nf(n):n;return Wd(e)?Ud(r):r}function $(e,t,n){let r=nO(e,t,n);return pd(n)?r:rO(n,r)}function iO(e,t){return $(e,ZD([],[]),t)}function aO(e){return F(e,{"~immutable":!0},{})}function oO(e,t){return F(aO(e),{},t)}function sO(e,t,n,r){return oO($(e,t,n),r)}function cO(e,t={}){return L(`AddImmutable`,[e],t)}function lO(e,t={}){return oO(e,t)}function uO(e,t={}){return L(`Evaluate`,[e],t)}function dO(e,t={}){return DC(e,t)}function fO(e,t={}){return L(`Module`,[e],t)}function pO(e,t={}){return FE({},ZD([],[]),e,t)}function mO(...e){let[t,n,r]=rf(e,{2:(e,t)=>Ju(e)?[{},e,t]:[e,t,{}],3:(e,t,n)=>[e,t,n],1:e=>[{},e,{}]}),i=qb(n);return F(Bu(i)&&A(i.length,2)?$(t,ZD([],[]),i[0]):Id(),{},r)}l({Any:()=>Nd,Array:()=>_d,AsyncIterator:()=>bd,Awaited:()=>sw,Base:()=>hd,BigInt:()=>Bf,Boolean:()=>Hf,Call:()=>tw,Capitalize:()=>_w,Codec:()=>Sf,Conditional:()=>Lw,Constructor:()=>Cd,ConstructorParameters:()=>Hw,Cyclic:()=>$d,Decode:()=>Cf,DecodeBuilder:()=>xf,Dependent:()=>sf,Encode:()=>wf,EncodeBuilder:()=>bf,Enum:()=>ff,Evaluate:()=>dO,Exclude:()=>qw,Extends:()=>gC,ExtendsResult:()=>yx,Extract:()=>Zw,Function:()=>Ed,Generic:()=>jd,Identifier:()=>Wf,Immutable:()=>Ef,Index:()=>oT,Infer:()=>af,InstanceType:()=>tE,Instantiate:()=>iO,Integer:()=>qf,Interface:()=>GS,Intersect:()=>mf,IsAny:()=>Pd,IsArray:()=>vd,IsAsyncIterator:()=>xd,IsBase:()=>gd,IsBigInt:()=>Vf,IsBoolean:()=>Uf,IsCall:()=>nw,IsCodec:()=>Tf,IsConstructor:()=>wd,IsCyclic:()=>ef,IsDependent:()=>cf,IsEnum:()=>pf,IsFunction:()=>Dd,IsGeneric:()=>Md,IsIdentifier:()=>Gf,IsImmutable:()=>Df,IsInfer:()=>of,IsInteger:()=>Jf,IsIntersect:()=>hf,IsIterator:()=>Xf,IsKind:()=>I,IsLiteral:()=>H,IsNever:()=>Ld,IsNull:()=>ip,IsNumber:()=>sp,IsObject:()=>Jd,IsOptional:()=>Wd,IsParameter:()=>dp,IsPromise:()=>pp,IsReadonly:()=>Pf,IsRecord:()=>Jm,IsRef:()=>Ad,IsRefine:()=>Rf,IsRest:()=>Xm,IsSchema:()=>fd,IsString:()=>gp,IsSymbol:()=>lp,IsTemplateLiteral:()=>vx,IsThis:()=>Qm,IsTuple:()=>Rp,IsUndefined:()=>eh,IsUnion:()=>B,IsUnknown:()=>Qd,IsUnsafe:()=>nf,IsVoid:()=>nh,Iterator:()=>Yf,KeyOf:()=>oE,Literal:()=>V,Lowercase:()=>yw,Mapped:()=>vE,Module:()=>pO,Never:()=>Id,NonNullable:()=>LE,Null:()=>rp,Number:()=>op,Object:()=>R,Omit:()=>HE,Optional:()=>Ud,Options:()=>KD,Parameter:()=>up,Parameters:()=>YE,Partial:()=>eD,Pick:()=>uD,Promise:()=>fp,Readonly:()=>Nf,ReadonlyObject:()=>gD,ReadonlyType:()=>_D,Record:()=>Um,RecordKey:()=>Km,RecordPattern:()=>Gm,RecordValue:()=>qm,Ref:()=>kd,Refine:()=>If,Required:()=>ID,Rest:()=>Ym,ReturnType:()=>BD,Script:()=>mO,String:()=>hp,Symbol:()=>cp,TemplateLiteral:()=>_x,This:()=>Zm,Tuple:()=>Lp,Uncapitalize:()=>xw,Undefined:()=>$m,Union:()=>z,Unknown:()=>Zd,Unsafe:()=>tf,Uppercase:()=>Cw,Void:()=>th,With:()=>GD}).Base;async function hO(e,t,n){let r=await e.safeParseAsync(t,{errorMap:n});return r.success?{data:r.data,success:!0}:{issues:r.error.issues.map(({message:e,path:t})=>({message:e,path:t})),success:!1}}function gO(e,t){return{superFormValidationLibrary:`zod`,validate:async n=>hO(e,n,t?.errorMap)}}var _O=Pu(gO),vO={unrepresentable:`any`,override:e=>{let t=e.zodSchema._zod.def;if(t.type===`date`)e.jsonSchema.type=`integer`,e.jsonSchema.format=`unix-time`;else if(t.type===`bigint`)e.jsonSchema.type=`string`,e.jsonSchema.format=`bigint`;else if(t.type===`pipe`){let n=t,r=n.in,i=n.out;if(r?._zod?.def.type===`string`){let t=i,n=!1;for(;t?._zod?.def;){let e=t._zod.def;if(e.type===`boolean`){n=!0;break}else if(e.type===`transform`)break;else if(e.type===`pipe`)t=e.out;else break}!n&&i?._zod?.def.type===`boolean`&&(n=!0),n&&(e.jsonSchema.type=`string`,e.jsonSchema.format=`stringbool`)}}else if(t.type===`set`)e.jsonSchema.type=`array`,e.jsonSchema.uniqueItems=!0,`default`in e.jsonSchema&&e.jsonSchema.default instanceof Set&&(e.jsonSchema.default=Array.from(e.jsonSchema.default));else if(t.type===`map`)e.jsonSchema.type=`array`,e.jsonSchema.format=`map`,`default`in e.jsonSchema&&e.jsonSchema.default instanceof Map&&(e.jsonSchema.default=Array.from(e.jsonSchema.default));else if(t.type==="default"){let n=t.innerType._zod.def;n.type===`set`&&t.defaultValue instanceof Set?(e.jsonSchema.type=`array`,e.jsonSchema.uniqueItems=!0,e.jsonSchema.default=Array.from(t.defaultValue)):n.type===`map`&&t.defaultValue instanceof Map&&(e.jsonSchema.type=`array`,e.jsonSchema.format=`map`,e.jsonSchema.default=Array.from(t.defaultValue))}}},yO=(e,t)=>ro(e,{...vO,...t});async function bO(e,t,n){if(n===void 0){let e=gt();n=e.customError??e.localeError}let r=await sn(e,t,{error:n});return r.success?{data:r.data,success:!0}:{issues:r.error.issues.map(({message:e,path:t})=>({message:e,path:t})),success:!1}}function xO(e,t){return Mu({superFormValidationLibrary:`zod4`,validate:async n=>bO(e,n,t?.error),jsonSchema:t?.jsonSchema??yO(e,t?.config),defaults:t?.defaults})}var SO=Pu(xO),CO=e=>{let t=Cu(wu(SO(e.schema)),{SPA:!0,validators:_O(e.schema),resetForm:!1,onUpdate:async({form:t})=>{t.valid&&await e.onSubmit?.(t.data)}});return e.defaultValues&&t.form.update(t=>({...t,...e.defaultValues})),t};export{il as a,Qo as c,ul as i,os as l,hl as n,Ls as o,fl as r,fs as s,CO as t,jo as u};
|