@nanoforge-dev/editor 0.0.2-beta.ddbefdc → 0.0.2-beta.fb82bf8
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.C6GhYMOV.css +1 -0
- package/dist/client/_app/immutable/assets/0.C6GhYMOV.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.C6GhYMOV.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/{BS47D1Yd2.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/{y9jahtbD.js → BL60uqTv.js} +1 -1
- package/dist/client/_app/immutable/chunks/BL60uqTv.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BL60uqTv.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DT8Ddh1L2.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/BMtaFOTk.js +1 -0
- package/dist/client/_app/immutable/chunks/BMtaFOTk.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BMtaFOTk.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CKei9xPI2.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/{Fu4roQAh.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/BZQwXXQ9.js +6 -0
- package/dist/client/_app/immutable/chunks/BZQwXXQ9.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BZQwXXQ9.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{orCHVlgT.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/{BWDRzheF2.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/{xJ1-16vC.js → Bvw-zKPF.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bvw-zKPF.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bvw-zKPF.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{C1k-YaT9.js → Byy0Trua.js} +7 -7
- package/dist/client/_app/immutable/chunks/Byy0Trua.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Byy0Trua.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{uo5fvlDn2.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/{DH-ThjiG2.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/{Bk9DeFcz2.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/{CnhOha0Z2.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/{BzGBrbo22.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/{B4w9-fYM2.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/{DFXoGGM32.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/{C83DJP9w2.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/{BZqFHUa32.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/{BlGyHMDZ.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/{C8VsmuzL.js → IoPfG6j0.js} +1 -1
- package/dist/client/_app/immutable/chunks/IoPfG6j0.js.br +0 -0
- package/dist/client/_app/immutable/chunks/IoPfG6j0.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{DHQLzCjY2.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/{DuDzfUqN2.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/{C7bUlFLk2.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/{BwWAgYKi2.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/{mRVEsFly2.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.qM3aoeOi.js → app.Da-YtiND.js} +2 -2
- package/dist/client/_app/immutable/entry/app.Da-YtiND.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.Da-YtiND.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.cIweTlO3.js +1 -0
- package/dist/client/_app/immutable/entry/start.cIweTlO3.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.cIweTlO3.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{0.Dd5fG40d.js → 0.BzdTAZXJ.js} +1 -1
- package/dist/client/_app/immutable/nodes/0.BzdTAZXJ.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.BzdTAZXJ.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{1.D-XWgJOb.js → 1.HoGuDJlv.js} +1 -1
- package/dist/client/_app/immutable/nodes/1.HoGuDJlv.js.br +0 -0
- package/dist/client/_app/immutable/nodes/1.HoGuDJlv.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{9.BrWnGfyr.js → 11.DYAlovlI.js} +1 -1
- package/dist/client/_app/immutable/nodes/11.DYAlovlI.js.br +0 -0
- package/dist/client/_app/immutable/nodes/11.DYAlovlI.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.BbpmoZI0.js +1 -0
- package/dist/client/_app/immutable/nodes/2.BbpmoZI0.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.BbpmoZI0.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.CKQTqfUC.js +6 -0
- package/dist/client/_app/immutable/nodes/3.CKQTqfUC.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.CKQTqfUC.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-CaJWcpu3.js → 0-D8EFaSd9.js} +6 -6
- package/dist/server/chunks/{0-CaJWcpu3.js.map → 0-D8EFaSd9.js.map} +1 -1
- package/dist/server/chunks/{1-na9Uh1hG.js → 1-CtEQBFI1.js} +6 -6
- package/dist/server/chunks/{1-na9Uh1hG.js.map → 1-CtEQBFI1.js.map} +1 -1
- package/dist/server/chunks/{5-610NKQc3.js → 10-DuA1c-Jp.js} +5 -5
- package/dist/server/chunks/10-DuA1c-Jp.js.map +1 -0
- package/dist/server/chunks/11-CENxk_H3.js +22 -0
- package/dist/server/chunks/11-CENxk_H3.js.map +1 -0
- package/dist/server/chunks/{2-BM68e_rU.js → 2-BwBHdvIf.js} +10 -10
- package/dist/server/chunks/{2-BM68e_rU.js.map → 2-BwBHdvIf.js.map} +1 -1
- package/dist/server/chunks/3-BJRO5seJ.js +22 -0
- package/dist/server/chunks/3-BJRO5seJ.js.map +1 -0
- package/dist/server/chunks/{3-CtfjP4uZ.js → 4-C6nynU2n.js} +5 -5
- package/dist/server/chunks/{3-CtfjP4uZ.js.map → 4-C6nynU2n.js.map} +1 -1
- package/dist/server/chunks/{8-s07Rj2Zo.js → 5-GGXm17tz.js} +5 -5
- package/dist/server/chunks/{8-s07Rj2Zo.js.map → 5-GGXm17tz.js.map} +1 -1
- package/dist/server/chunks/{4-DP-_gDay.js → 6-CecbZbuB.js} +5 -5
- package/dist/server/chunks/{4-DP-_gDay.js.map → 6-CecbZbuB.js.map} +1 -1
- package/dist/server/chunks/7-TEJHHPfc.js +18 -0
- package/dist/server/chunks/7-TEJHHPfc.js.map +1 -0
- package/dist/server/chunks/{6-Dl_h_OyU.js → 8-DxuDvwam.js} +49 -36
- package/dist/server/chunks/8-DxuDvwam.js.map +1 -0
- package/dist/server/chunks/{7-BUEKgK7m.js → 9-C-7eeTkI.js} +5 -5
- package/dist/server/chunks/{7-BUEKgK7m.js.map → 9-C-7eeTkI.js.map} +1 -1
- package/dist/server/chunks/{_layout.svelte-uX7XiB9K.js → _layout.svelte-By6MJeec.js} +5 -5
- package/dist/server/chunks/_layout.svelte-By6MJeec.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-B_0YFORc.js → _page.svelte-BdTp6gki.js} +7 -7
- package/dist/server/chunks/{_page.svelte-B_0YFORc.js.map → _page.svelte-BdTp6gki.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-1bR7bJ2y.js → _page.svelte-CSTVKT86.js} +6 -6
- package/dist/server/chunks/_page.svelte-CSTVKT86.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-BmrR5-n-.js → _page.svelte-Dyt-dT8R.js} +153 -80
- package/dist/server/chunks/_page.svelte-Dyt-dT8R.js.map +1 -0
- package/dist/server/chunks/_server.ts--OTq6N7o.js +13 -0
- package/dist/server/chunks/_server.ts--OTq6N7o.js.map +1 -0
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js → _server.ts-BFl7cSax.js} +2 -2
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js.map → _server.ts-BFl7cSax.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-DlC2sxcm.js → _server.ts-Zy4HMSqW.js} +15 -3
- package/dist/server/chunks/_server.ts-Zy4HMSqW.js.map +1 -0
- package/dist/server/chunks/app-DUeJj5RD.js.map +1 -1
- package/dist/server/chunks/{client-BkmWBFaS.js → client-Crw1nXFW.js} +4 -4
- package/dist/server/chunks/client-Crw1nXFW.js.map +1 -0
- package/dist/server/chunks/{error-BGQyviUk.js → error-Bqe4QUEz.js} +140 -147
- package/dist/server/chunks/error-Bqe4QUEz.js.map +1 -0
- package/dist/server/chunks/{error.svelte-T6M8Vz4W.js → error.svelte-DG-7dfPY.js} +3 -3
- package/dist/server/chunks/error.svelte-DG-7dfPY.js.map +1 -0
- package/dist/server/chunks/{exports-CWOtdr_a.js → exports-D0uQzbjy.js} +4 -4
- package/dist/server/chunks/{exports-CWOtdr_a.js.map → exports-D0uQzbjy.js.map} +1 -1
- package/dist/server/chunks/{hooks.server-Bb56FM49.js → hooks.server-BqetKf4g.js} +6 -6
- package/dist/server/chunks/hooks.server-BqetKf4g.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-Bhh2w-5S.js → index-server-BthNUqCR.js} +1006 -1005
- package/dist/server/chunks/index-server-BthNUqCR.js.map +1 -0
- package/dist/server/chunks/{internal-DsA4iYdx.js → internal-vr3mPczx.js} +2 -2
- package/dist/server/chunks/{internal-DsA4iYdx.js.map → internal-vr3mPczx.js.map} +1 -1
- package/dist/server/chunks/{internal2-CeV_cIh4.js → internal2-BzKdwDhb.js} +22 -15
- package/dist/server/chunks/internal2-BzKdwDhb.js.map +1 -0
- package/dist/server/chunks/{loader-circle-CFNm9vip.js → loader-circle-C4T0os4K.js} +5 -5
- package/dist/server/chunks/loader-circle-C4T0os4K.js.map +1 -0
- package/dist/server/chunks/{logo-Cit4wZkS.js → logo-CZA0eXUA.js} +4 -4
- package/dist/server/chunks/logo-CZA0eXUA.js.map +1 -0
- package/dist/server/chunks/{project-loader-BSqYC-7k.js → project-loader-BDWXp4na.js} +4 -4
- package/dist/server/chunks/project-loader-BDWXp4na.js.map +1 -0
- package/dist/server/chunks/{request-handler-guINVc1G.js → request-handler-BKXKqx13.js} +97 -18
- package/dist/server/chunks/request-handler-BKXKqx13.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-DbJHhqwa.js → schemas-CeNiyNB9.js} +348 -303
- package/dist/server/chunks/schemas-CeNiyNB9.js.map +1 -0
- package/dist/server/chunks/{session-DLCjVGKo.js → session-By0bbFhg.js} +2 -2
- package/dist/server/chunks/{session-DLCjVGKo.js.map → session-By0bbFhg.js.map} +1 -1
- package/dist/server/chunks/shared-server-Cha0Qlv9.js.map +1 -1
- package/dist/server/chunks/{state-DpIO_6NS.js → state-Ds3woX9L.js} +3 -3
- package/dist/server/chunks/state-Ds3woX9L.js.map +1 -0
- package/dist/server/index.js +368 -353
- 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 +18 -16
- package/dist/client/_app/immutable/assets/0.PlL6w-dg.css +0 -1
- package/dist/client/_app/immutable/assets/0.PlL6w-dg.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.PlL6w-dg.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/B4w9-fYM2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/B4w9-fYM2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BS47D1Yd2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BS47D1Yd2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BW1UW6Hp.js +0 -1
- package/dist/client/_app/immutable/chunks/BW1UW6Hp.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BW1UW6Hp.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BWDRzheF2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BWDRzheF2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BZqFHUa32.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BZqFHUa32.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Bk9DeFcz2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bk9DeFcz2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BlGyHMDZ.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BlGyHMDZ.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BwWAgYKi2.js.br +0 -3
- package/dist/client/_app/immutable/chunks/BwWAgYKi2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BzGBrbo22.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BzGBrbo22.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C1k-YaT9.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C1k-YaT9.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C7bUlFLk2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C7bUlFLk2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C83DJP9w2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C83DJP9w2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C8VsmuzL.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C8VsmuzL.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CKei9xPI2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CKei9xPI2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CUEbnJ91.js +0 -6
- package/dist/client/_app/immutable/chunks/CUEbnJ91.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CUEbnJ91.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CnhOha0Z2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CnhOha0Z2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DFXoGGM32.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DFXoGGM32.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DH-ThjiG2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DH-ThjiG2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DHQLzCjY2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DHQLzCjY2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DT8Ddh1L2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DT8Ddh1L2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DuDzfUqN2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DuDzfUqN2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/Fu4roQAh.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Fu4roQAh.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/ZLGReh43.js +0 -3
- package/dist/client/_app/immutable/chunks/ZLGReh43.js.br +0 -0
- package/dist/client/_app/immutable/chunks/ZLGReh43.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/mRVEsFly2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/mRVEsFly2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/orCHVlgT.js.br +0 -0
- package/dist/client/_app/immutable/chunks/orCHVlgT.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/uo5fvlDn2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/uo5fvlDn2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/xJ1-16vC.js.br +0 -0
- package/dist/client/_app/immutable/chunks/xJ1-16vC.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/y9jahtbD.js.br +0 -0
- package/dist/client/_app/immutable/chunks/y9jahtbD.js.gz +0 -0
- package/dist/client/_app/immutable/entry/app.qM3aoeOi.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.qM3aoeOi.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.CDMZxkmh.js +0 -1
- package/dist/client/_app/immutable/entry/start.CDMZxkmh.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.CDMZxkmh.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/0.Dd5fG40d.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.Dd5fG40d.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/1.D-XWgJOb.js.br +0 -2
- package/dist/client/_app/immutable/nodes/1.D-XWgJOb.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.DkYlNzbR.js +0 -6
- package/dist/client/_app/immutable/nodes/10.DkYlNzbR.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.DkYlNzbR.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.D2mbM0C2.js +0 -1
- package/dist/client/_app/immutable/nodes/2.D2mbM0C2.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.D2mbM0C2.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/9.BrWnGfyr.js.br +0 -0
- package/dist/client/_app/immutable/nodes/9.BrWnGfyr.js.gz +0 -0
- package/dist/server/chunks/10-Dh1abrew.js +0 -22
- package/dist/server/chunks/10-Dh1abrew.js.map +0 -1
- package/dist/server/chunks/5-610NKQc3.js.map +0 -1
- package/dist/server/chunks/6-Dl_h_OyU.js.map +0 -1
- package/dist/server/chunks/9-DkqE8li9.js +0 -22
- package/dist/server/chunks/9-DkqE8li9.js.map +0 -1
- package/dist/server/chunks/_layout.svelte-uX7XiB9K.js.map +0 -1
- package/dist/server/chunks/_page.svelte-1bR7bJ2y.js.map +0 -1
- package/dist/server/chunks/_page.svelte-BmrR5-n-.js.map +0 -1
- package/dist/server/chunks/_server.ts-DlC2sxcm.js.map +0 -1
- package/dist/server/chunks/client-BkmWBFaS.js.map +0 -1
- package/dist/server/chunks/error-BGQyviUk.js.map +0 -1
- package/dist/server/chunks/error.svelte-T6M8Vz4W.js.map +0 -1
- package/dist/server/chunks/events-Bhh2w-5S.js.map +0 -1
- package/dist/server/chunks/hooks.server-Bb56FM49.js.map +0 -1
- package/dist/server/chunks/internal2-CeV_cIh4.js.map +0 -1
- package/dist/server/chunks/loader-circle-CFNm9vip.js.map +0 -1
- package/dist/server/chunks/logo-Cit4wZkS.js.map +0 -1
- package/dist/server/chunks/project-loader-BSqYC-7k.js.map +0 -1
- package/dist/server/chunks/request-handler-guINVc1G.js.map +0 -1
- package/dist/server/chunks/runtime-CDHWD9vo.js.map +0 -1
- package/dist/server/chunks/schemas-DbJHhqwa.js.map +0 -1
- package/dist/server/chunks/state-DpIO_6NS.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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk-ByNZkrT6.js";
|
|
2
|
-
import {
|
|
3
|
-
import { Q as stringify$1, f as fromStore } from "./internal2-
|
|
4
|
-
import "./exports-
|
|
5
|
-
import { i as invalidateAll, n as applyAction, t as afterNavigate } from "./client-
|
|
6
|
-
import { $ as createBitsAttrs, H as StyleToObject, I as Select, K as attachRef, L as Select_content, Q as cn, R as Select_item, U as Switch$1, W as Switch_thumb, X as boxWith$1, dt as mergeProps$1, et as createId, nt as deserialize, rt as enhance, z as Select_trigger } from "./error-
|
|
2
|
+
import { C as escape_html, K as props_id, O as getContext, S as ensure_array_like, T as get, W as onDestroy, Y as readonly$1, b as derived$1, c as attr_class, d as bind_props, dt as clsx, et as setContext, it as store_get, lt as unsubscribe_stores, m as clsx$1, ot as tick, rt as spread_props, u as attributes, ut as writable, y as derived } from "./index-server-BthNUqCR.js";
|
|
3
|
+
import { Q as stringify$1, f as fromStore } from "./internal2-BzKdwDhb.js";
|
|
4
|
+
import "./exports-D0uQzbjy.js";
|
|
5
|
+
import { i as invalidateAll, n as applyAction, t as afterNavigate } from "./client-Crw1nXFW.js";
|
|
6
|
+
import { $ as createBitsAttrs, H as StyleToObject, I as Select, K as attachRef, L as Select_content, Q as cn, R as Select_item, U as Switch$1, W as Switch_thumb, X as boxWith$1, dt as mergeProps$1, et as createId, nt as deserialize, rt as enhance, z as Select_trigger } from "./error-Bqe4QUEz.js";
|
|
7
7
|
//#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
8
8
|
var _a$1;
|
|
9
9
|
function $constructor(name, initializer, params) {
|
|
@@ -434,7 +434,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
434
434
|
}, ctx);
|
|
435
435
|
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
436
436
|
if (result.issues.length) {
|
|
437
|
-
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
437
|
+
const e = new ((_params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
438
438
|
captureStackTrace(e, _params?.callee);
|
|
439
439
|
throw e;
|
|
440
440
|
}
|
|
@@ -451,7 +451,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
451
451
|
}, ctx);
|
|
452
452
|
if (result instanceof Promise) result = await result;
|
|
453
453
|
if (result.issues.length) {
|
|
454
|
-
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
454
|
+
const e = new ((params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
455
455
|
captureStackTrace(e, params?.callee);
|
|
456
456
|
throw e;
|
|
457
457
|
}
|
|
@@ -5289,7 +5289,7 @@ function superForm(form, formOptions) {
|
|
|
5289
5289
|
};
|
|
5290
5290
|
form = form;
|
|
5291
5291
|
const _initialFormId = form.id = options.id ?? form.id;
|
|
5292
|
-
const _currentPage = get
|
|
5292
|
+
const _currentPage = get(page) ?? (STORYBOOK_MODE ? {} : void 0);
|
|
5293
5293
|
/**
|
|
5294
5294
|
* Need to clone the form data, in case it's used to populate multiple forms
|
|
5295
5295
|
* and in components that are mounted and destroyed multiple times.
|
|
@@ -5428,7 +5428,7 @@ function superForm(form, formOptions) {
|
|
|
5428
5428
|
fieldProxy({ form: Form$2 }, path, options).set(value);
|
|
5429
5429
|
},
|
|
5430
5430
|
get(path) {
|
|
5431
|
-
return get
|
|
5431
|
+
return get(fieldProxy(Form$2, path));
|
|
5432
5432
|
}
|
|
5433
5433
|
};
|
|
5434
5434
|
else changeEvent = {
|
|
@@ -5438,7 +5438,7 @@ function superForm(form, formOptions) {
|
|
|
5438
5438
|
fieldProxy({ form: Form$2 }, path, options).set(value);
|
|
5439
5439
|
},
|
|
5440
5440
|
get(path) {
|
|
5441
|
-
return get
|
|
5441
|
+
return get(fieldProxy(Form$2, path));
|
|
5442
5442
|
}
|
|
5443
5443
|
};
|
|
5444
5444
|
options.onChange(changeEvent);
|
|
@@ -5520,7 +5520,7 @@ function superForm(form, formOptions) {
|
|
|
5520
5520
|
if (isEventError && options.validationMethod == "oninput") return addError();
|
|
5521
5521
|
if (immediate && !multiple && isEventError) return addError();
|
|
5522
5522
|
if (multiple) {
|
|
5523
|
-
const errorPath = pathExists(get
|
|
5523
|
+
const errorPath = pathExists(get(Errors), error.path.slice(0, -1));
|
|
5524
5524
|
if (errorPath?.value && typeof errorPath?.value == "object") {
|
|
5525
5525
|
for (const errors of Object.values(errorPath.value)) if (Array.isArray(errors)) return addError();
|
|
5526
5526
|
}
|
|
@@ -5784,7 +5784,7 @@ function superForm(form, formOptions) {
|
|
|
5784
5784
|
__data.valid = form.valid;
|
|
5785
5785
|
if (options.flashMessage && shouldSyncFlash(options)) {
|
|
5786
5786
|
const flash = options.flashMessage.module.getFlash(page);
|
|
5787
|
-
if (message && get
|
|
5787
|
+
if (message && get(flash) === void 0) flash.set(message);
|
|
5788
5788
|
}
|
|
5789
5789
|
}
|
|
5790
5790
|
const formEvents = {
|
|
@@ -6814,41 +6814,10 @@ function IsKind(value, kind) {
|
|
|
6814
6814
|
function IsSchema(value) {
|
|
6815
6815
|
return IsObject$1(value);
|
|
6816
6816
|
}
|
|
6817
|
-
/** Creates an OptionalAddAction. */
|
|
6818
|
-
function OptionalAddAction(type) {
|
|
6819
|
-
return Create({ ["~kind"]: "OptionalAddAction" }, { type }, {});
|
|
6820
|
-
}
|
|
6821
|
-
/** Returns true if this value is a OptionalAddAction. */
|
|
6822
|
-
function IsOptionalAddAction(value) {
|
|
6823
|
-
return IsObject$1(value) && HasPropertyKey(value, "~kind") && HasPropertyKey(value, "type") && IsEqual(value["~kind"], "OptionalAddAction") && IsSchema(value.type);
|
|
6824
|
-
}
|
|
6825
|
-
/** Creates a OptionalRemoveAction. */
|
|
6826
|
-
function OptionalRemoveAction(type) {
|
|
6827
|
-
return Create({ ["~kind"]: "OptionalRemoveAction" }, { type }, {});
|
|
6828
|
-
}
|
|
6829
|
-
/** Returns true if this value is a OptionalRemoveAction. */
|
|
6830
|
-
function IsOptionalRemoveAction(value) {
|
|
6831
|
-
return IsObject$1(value) && HasPropertyKey(value, "~kind") && HasPropertyKey(value, "type") && IsEqual(value["~kind"], "OptionalRemoveAction") && IsSchema(value.type);
|
|
6832
|
-
}
|
|
6833
|
-
/** Creates a ReadonlyAddAction. */
|
|
6834
|
-
function ReadonlyAddAction(type) {
|
|
6835
|
-
return Create({ ["~kind"]: "ReadonlyAddAction" }, { type }, {});
|
|
6836
|
-
}
|
|
6837
|
-
/** Returns true if this value is a ReadonlyAddAction. */
|
|
6838
|
-
function IsReadonlyAddAction(value) {
|
|
6839
|
-
return IsObject$1(value) && HasPropertyKey(value, "~kind") && HasPropertyKey(value, "type") && IsEqual(value["~kind"], "ReadonlyAddAction") && IsSchema(value.type);
|
|
6840
|
-
}
|
|
6841
|
-
/** Creates a ReadonlyRemoveAction. */
|
|
6842
|
-
function ReadonlyRemoveAction(type) {
|
|
6843
|
-
return Create({ ["~kind"]: "ReadonlyRemoveAction" }, { type }, {});
|
|
6844
|
-
}
|
|
6845
|
-
/** Returns true if this value is a ReadonlyRemoveAction. */
|
|
6846
|
-
function IsReadonlyRemoveAction(value) {
|
|
6847
|
-
return IsObject$1(value) && HasPropertyKey(value, "~kind") && HasPropertyKey(value, "type") && IsEqual(value["~kind"], "ReadonlyRemoveAction") && IsSchema(value.type);
|
|
6848
|
-
}
|
|
6849
6817
|
/** Creates a Deferred action. */
|
|
6850
6818
|
function Deferred(action, parameters, options) {
|
|
6851
6819
|
return Create({ "~kind": "Deferred" }, {
|
|
6820
|
+
type: "deferred",
|
|
6852
6821
|
action,
|
|
6853
6822
|
parameters,
|
|
6854
6823
|
options
|
|
@@ -6858,73 +6827,6 @@ function Deferred(action, parameters, options) {
|
|
|
6858
6827
|
function IsDeferred(value) {
|
|
6859
6828
|
return IsKind(value, "Deferred");
|
|
6860
6829
|
}
|
|
6861
|
-
/**
|
|
6862
|
-
* Creates a Promise type.
|
|
6863
|
-
*
|
|
6864
|
-
* @deprecated This type is being removed in the next version of TypeBox. A fallback will be provided under examples.
|
|
6865
|
-
*/
|
|
6866
|
-
function _Promise_(item, options) {
|
|
6867
|
-
return Create({ ["~kind"]: "Promise" }, {
|
|
6868
|
-
type: "promise",
|
|
6869
|
-
item
|
|
6870
|
-
}, options);
|
|
6871
|
-
}
|
|
6872
|
-
/** Returns true if the given type is TPromise. */
|
|
6873
|
-
function IsPromise(value) {
|
|
6874
|
-
return IsKind(value, "Promise");
|
|
6875
|
-
}
|
|
6876
|
-
/** Extracts options from a TPromise. */
|
|
6877
|
-
function PromiseOptions(type) {
|
|
6878
|
-
return Discard(type, [
|
|
6879
|
-
"~kind",
|
|
6880
|
-
"type",
|
|
6881
|
-
"item"
|
|
6882
|
-
]);
|
|
6883
|
-
}
|
|
6884
|
-
/** Adds Immutable to the given type. */
|
|
6885
|
-
function ImmutableAdd(type) {
|
|
6886
|
-
return Update(type, { "~immutable": true }, {});
|
|
6887
|
-
}
|
|
6888
|
-
/** Applies an Immutable modifier to the given type. */
|
|
6889
|
-
function Immutable(type) {
|
|
6890
|
-
return ImmutableAdd(type);
|
|
6891
|
-
}
|
|
6892
|
-
/** Returns true if the given value is a TImmutable */
|
|
6893
|
-
function IsImmutable(value) {
|
|
6894
|
-
return IsSchema(value) && HasPropertyKey(value, "~immutable");
|
|
6895
|
-
}
|
|
6896
|
-
/** Removes Optional from the given type. */
|
|
6897
|
-
function OptionalRemove(type) {
|
|
6898
|
-
return Discard(type, ["~optional"]);
|
|
6899
|
-
}
|
|
6900
|
-
/** Adds Optional to the given type. */
|
|
6901
|
-
function OptionalAdd(type) {
|
|
6902
|
-
return Update(type, { "~optional": true }, {});
|
|
6903
|
-
}
|
|
6904
|
-
/** Applies an Optional modifier to the given type. */
|
|
6905
|
-
function Optional$2(type) {
|
|
6906
|
-
return OptionalAdd(type);
|
|
6907
|
-
}
|
|
6908
|
-
/** Returns true if the given value is TOptional */
|
|
6909
|
-
function IsOptional(value) {
|
|
6910
|
-
return IsSchema(value) && HasPropertyKey(value, "~optional");
|
|
6911
|
-
}
|
|
6912
|
-
/** Removes a Readonly property modifier from the given type. */
|
|
6913
|
-
function ReadonlyRemove(type) {
|
|
6914
|
-
return Discard(type, ["~readonly"]);
|
|
6915
|
-
}
|
|
6916
|
-
/** Adds a Readonly property modifier to the given type. */
|
|
6917
|
-
function ReadonlyAdd(type) {
|
|
6918
|
-
return Update(type, { "~readonly": true }, {});
|
|
6919
|
-
}
|
|
6920
|
-
/** Applies an Readonly property modifier to the given type. */
|
|
6921
|
-
function Readonly$1(type) {
|
|
6922
|
-
return ReadonlyAdd(type);
|
|
6923
|
-
}
|
|
6924
|
-
/** Returns true if the given value is a TReadonly */
|
|
6925
|
-
function IsReadonly(value) {
|
|
6926
|
-
return IsSchema(value) && HasPropertyKey(value, "~readonly");
|
|
6927
|
-
}
|
|
6928
6830
|
function BaseProperty(value) {
|
|
6929
6831
|
return {
|
|
6930
6832
|
enumerable: Get().enumerableKind,
|
|
@@ -7043,7 +6945,7 @@ function AsyncIteratorOptions(type) {
|
|
|
7043
6945
|
]);
|
|
7044
6946
|
}
|
|
7045
6947
|
/** Creates a Constructor type. */
|
|
7046
|
-
function Constructor
|
|
6948
|
+
function Constructor(parameters, instanceType, options = {}) {
|
|
7047
6949
|
return Create({ "~kind": "Constructor" }, {
|
|
7048
6950
|
type: "constructor",
|
|
7049
6951
|
parameters,
|
|
@@ -7121,6 +7023,31 @@ function Never(options) {
|
|
|
7121
7023
|
function IsNever(value) {
|
|
7122
7024
|
return IsKind(value, "Never");
|
|
7123
7025
|
}
|
|
7026
|
+
function AddOptionalOperation(type) {
|
|
7027
|
+
return Update(type, { "~optional": true }, {});
|
|
7028
|
+
}
|
|
7029
|
+
function AddOptionalAction(type, options) {
|
|
7030
|
+
return Update(AddOptionalOperation(type), {}, options);
|
|
7031
|
+
}
|
|
7032
|
+
function AddOptionalInstantiate(context, state, type, options) {
|
|
7033
|
+
return AddOptionalAction(InstantiateType(context, state, type), options);
|
|
7034
|
+
}
|
|
7035
|
+
/** Creates a deferred AddOptional action. */
|
|
7036
|
+
function AddOptionalDeferred(type, options = {}) {
|
|
7037
|
+
return Deferred("AddOptional", [type], options);
|
|
7038
|
+
}
|
|
7039
|
+
/** Applies an AddOptional action to a type. */
|
|
7040
|
+
function AddOptional(type, options = {}) {
|
|
7041
|
+
return AddOptionalAction(type, options);
|
|
7042
|
+
}
|
|
7043
|
+
/** Applies an Optional modifier to the given type. */
|
|
7044
|
+
function Optional$2(type) {
|
|
7045
|
+
return AddOptional(type);
|
|
7046
|
+
}
|
|
7047
|
+
/** Returns true if the given value is TOptional */
|
|
7048
|
+
function IsOptional(value) {
|
|
7049
|
+
return IsSchema(value) && HasPropertyKey(value, "~optional");
|
|
7050
|
+
}
|
|
7124
7051
|
/** Creates a RequiredArray derived from the given TProperties value. */
|
|
7125
7052
|
function RequiredArray(properties) {
|
|
7126
7053
|
return Keys(properties).filter((key) => !IsOptional(properties[key]));
|
|
@@ -7347,6 +7274,39 @@ function Encode(type, callback) {
|
|
|
7347
7274
|
function IsCodec(value) {
|
|
7348
7275
|
return IsSchema(value) && HasPropertyKey(value, "~codec") && IsObject$1(value["~codec"]) && HasPropertyKey(value["~codec"], "encode") && HasPropertyKey(value["~codec"], "decode");
|
|
7349
7276
|
}
|
|
7277
|
+
/** Applies an Immutable modifier to the given type. */
|
|
7278
|
+
function Immutable(type) {
|
|
7279
|
+
return AddImmutable(type);
|
|
7280
|
+
}
|
|
7281
|
+
/** Returns true if the given value is a TImmutable */
|
|
7282
|
+
function IsImmutable(value) {
|
|
7283
|
+
return IsSchema(value) && HasPropertyKey(value, "~immutable");
|
|
7284
|
+
}
|
|
7285
|
+
function AddReadonlyOperation(type) {
|
|
7286
|
+
return Update(type, { "~readonly": true }, {});
|
|
7287
|
+
}
|
|
7288
|
+
function AddReadonlyAction(type, options) {
|
|
7289
|
+
return Update(AddReadonlyOperation(type), {}, options);
|
|
7290
|
+
}
|
|
7291
|
+
function AddReadonlyInstantiate(context, state, type, options) {
|
|
7292
|
+
return AddReadonlyAction(InstantiateType(context, state, type), options);
|
|
7293
|
+
}
|
|
7294
|
+
/** Creates a deferred AddReadonly action. */
|
|
7295
|
+
function AddReadonlyDeferred(type, options = {}) {
|
|
7296
|
+
return Deferred("AddReadonly", [type], options);
|
|
7297
|
+
}
|
|
7298
|
+
/** Applies an AddReadonly action to a type. */
|
|
7299
|
+
function AddReadonly(type, options = {}) {
|
|
7300
|
+
return AddReadonlyAction(type, options);
|
|
7301
|
+
}
|
|
7302
|
+
/** Applies an Readonly property modifier to the given type. */
|
|
7303
|
+
function Readonly$1(type) {
|
|
7304
|
+
return AddReadonly(type);
|
|
7305
|
+
}
|
|
7306
|
+
/** Returns true if the given value is a TReadonly */
|
|
7307
|
+
function IsReadonly(value) {
|
|
7308
|
+
return IsSchema(value) && HasPropertyKey(value, "~readonly");
|
|
7309
|
+
}
|
|
7350
7310
|
/** Applies a Refine check to the given type. */
|
|
7351
7311
|
function RefineAdd(type, refinement) {
|
|
7352
7312
|
return Update(type, { "~refine": IsRefine(type) ? [...type["~refine"], refinement] : [refinement] }, {});
|
|
@@ -7452,7 +7412,7 @@ function LiteralTypeName(value) {
|
|
|
7452
7412
|
})();
|
|
7453
7413
|
}
|
|
7454
7414
|
/** Creates a Literal type. */
|
|
7455
|
-
function Literal
|
|
7415
|
+
function Literal(value, options) {
|
|
7456
7416
|
return Create({ "~kind": "Literal" }, {
|
|
7457
7417
|
type: LiteralTypeName(value),
|
|
7458
7418
|
const: value
|
|
@@ -7528,6 +7488,29 @@ function Parameter$1(...args) {
|
|
|
7528
7488
|
function IsParameter(value) {
|
|
7529
7489
|
return IsKind(value, "Parameter");
|
|
7530
7490
|
}
|
|
7491
|
+
/**
|
|
7492
|
+
* Creates a Promise type.
|
|
7493
|
+
*
|
|
7494
|
+
* @deprecated This type is being removed in the next version of TypeBox. A fallback will be provided under examples.
|
|
7495
|
+
*/
|
|
7496
|
+
function _Promise_(item, options) {
|
|
7497
|
+
return Create({ ["~kind"]: "Promise" }, {
|
|
7498
|
+
type: "promise",
|
|
7499
|
+
item
|
|
7500
|
+
}, options);
|
|
7501
|
+
}
|
|
7502
|
+
/** Returns true if the given type is TPromise. */
|
|
7503
|
+
function IsPromise(value) {
|
|
7504
|
+
return IsKind(value, "Promise");
|
|
7505
|
+
}
|
|
7506
|
+
/** Extracts options from a TPromise. */
|
|
7507
|
+
function PromiseOptions(type) {
|
|
7508
|
+
return Discard(type, [
|
|
7509
|
+
"~kind",
|
|
7510
|
+
"type",
|
|
7511
|
+
"item"
|
|
7512
|
+
]);
|
|
7513
|
+
}
|
|
7531
7514
|
/** Creates a String type. */
|
|
7532
7515
|
function String$2(options) {
|
|
7533
7516
|
return Create({ "~kind": "String" }, { type: "string" }, options);
|
|
@@ -7579,7 +7562,7 @@ function DecodeFromSpan(variants, types) {
|
|
|
7579
7562
|
return TakeLeft(types, (left, right) => DecodeFromSpan(FromType$16(variants, left), right), () => variants);
|
|
7580
7563
|
}
|
|
7581
7564
|
function VariantsToLiterals(variants) {
|
|
7582
|
-
return variants.map((variant) => Literal
|
|
7565
|
+
return variants.map((variant) => Literal(variant));
|
|
7583
7566
|
}
|
|
7584
7567
|
function DecodeTypesAsUnion(types) {
|
|
7585
7568
|
return Union(VariantsToLiterals(DecodeFromSpan([], types)));
|
|
@@ -7620,7 +7603,7 @@ function FromBooleanKey(value) {
|
|
|
7620
7603
|
});
|
|
7621
7604
|
}
|
|
7622
7605
|
/** Creates a Tuple type. */
|
|
7623
|
-
function Tuple
|
|
7606
|
+
function Tuple(types, options = {}) {
|
|
7624
7607
|
const [items, minItems, additionalItems] = [
|
|
7625
7608
|
types,
|
|
7626
7609
|
types.length,
|
|
@@ -7647,6 +7630,40 @@ function TupleOptions(type) {
|
|
|
7647
7630
|
"additionalItems"
|
|
7648
7631
|
]);
|
|
7649
7632
|
}
|
|
7633
|
+
function RemoveReadonlyOperation(type) {
|
|
7634
|
+
return Discard(type, ["~readonly"]);
|
|
7635
|
+
}
|
|
7636
|
+
function RemoveReadonlyAction(type, options) {
|
|
7637
|
+
return Update(RemoveReadonlyOperation(type), {}, options);
|
|
7638
|
+
}
|
|
7639
|
+
function RemoveReadonlyInstantiate(context, state, type, options) {
|
|
7640
|
+
return RemoveReadonlyAction(InstantiateType(context, state, type), options);
|
|
7641
|
+
}
|
|
7642
|
+
/** Creates a deferred RemoveReadonly action. */
|
|
7643
|
+
function RemoveReadonlyDeferred(type, options = {}) {
|
|
7644
|
+
return Deferred("RemoveReadonly", [type], options);
|
|
7645
|
+
}
|
|
7646
|
+
/** Applies an RemoveReadonly action to a type. */
|
|
7647
|
+
function RemoveReadonly(type, options = {}) {
|
|
7648
|
+
return RemoveReadonlyAction(type, options);
|
|
7649
|
+
}
|
|
7650
|
+
function RemoveOptionalOperation(type) {
|
|
7651
|
+
return Discard(type, ["~optional"]);
|
|
7652
|
+
}
|
|
7653
|
+
function RemoveOptionalAction(type, options) {
|
|
7654
|
+
return Update(RemoveOptionalOperation(type), {}, options);
|
|
7655
|
+
}
|
|
7656
|
+
function RemoveOptionalInstantiate(context, state, type, options) {
|
|
7657
|
+
return RemoveOptionalAction(InstantiateType(context, state, type), options);
|
|
7658
|
+
}
|
|
7659
|
+
/** Creates a deferred RemoveOptional action. */
|
|
7660
|
+
function RemoveOptionalDeferred(type, options = {}) {
|
|
7661
|
+
return Deferred("RemoveOptional", [type], options);
|
|
7662
|
+
}
|
|
7663
|
+
/** Applies an RemoveOptional action to a type. */
|
|
7664
|
+
function RemoveOptional(type, options = {}) {
|
|
7665
|
+
return RemoveOptionalAction(type, options);
|
|
7666
|
+
}
|
|
7650
7667
|
function TupleElementsToProperties(types) {
|
|
7651
7668
|
return types.reduceRight((result, right, index) => {
|
|
7652
7669
|
return {
|
|
@@ -7667,8 +7684,8 @@ function IsOptionalProperty(left, right) {
|
|
|
7667
7684
|
function CompositeProperty(left, right) {
|
|
7668
7685
|
const isReadonly = IsReadonlyProperty(left, right);
|
|
7669
7686
|
const isOptional = IsOptionalProperty(left, right);
|
|
7670
|
-
const property =
|
|
7671
|
-
return isReadonly && isOptional ?
|
|
7687
|
+
const property = RemoveReadonly(RemoveOptional(EvaluateIntersect([left, right])));
|
|
7688
|
+
return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
|
|
7672
7689
|
}
|
|
7673
7690
|
function CompositePropertyKey(left, right, key) {
|
|
7674
7691
|
return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : key in right ? right[key] : Never();
|
|
@@ -7732,7 +7749,7 @@ function EvaluateDependent(if_, then_, else_) {
|
|
|
7732
7749
|
return EvaluateUnion([Intersect([if_, then_]), ExcludeOperation(else_, if_)]);
|
|
7733
7750
|
}
|
|
7734
7751
|
function EvaluateEnum(values) {
|
|
7735
|
-
return EvaluateUnion(values.map((value) => Literal
|
|
7752
|
+
return EvaluateUnion(values.map((value) => Literal(value)));
|
|
7736
7753
|
}
|
|
7737
7754
|
function EvaluateIntersect(types) {
|
|
7738
7755
|
return Broaden(Distribute$1(types));
|
|
@@ -7964,14 +7981,23 @@ function KeywordVoidMapping(input) {
|
|
|
7964
7981
|
function KeywordThisMapping(input) {
|
|
7965
7982
|
return This();
|
|
7966
7983
|
}
|
|
7967
|
-
function
|
|
7968
|
-
return input;
|
|
7984
|
+
function LiteralBigIntMapping(input) {
|
|
7985
|
+
return Literal(BigInt(input));
|
|
7986
|
+
}
|
|
7987
|
+
function LiteralBooleanMapping(input) {
|
|
7988
|
+
return Literal(IsEqual(input, "true"));
|
|
7989
|
+
}
|
|
7990
|
+
function LiteralNumberMapping(input) {
|
|
7991
|
+
return Literal(parseFloat(input));
|
|
7992
|
+
}
|
|
7993
|
+
function LiteralStringMapping(input) {
|
|
7994
|
+
return Literal(input);
|
|
7969
7995
|
}
|
|
7970
7996
|
function TemplateInterpolateMapping(input) {
|
|
7971
7997
|
return input[1];
|
|
7972
7998
|
}
|
|
7973
7999
|
function TemplateSpanMapping(input) {
|
|
7974
|
-
return Literal
|
|
8000
|
+
return Literal(input);
|
|
7975
8001
|
}
|
|
7976
8002
|
function TemplateBodyMapping(input) {
|
|
7977
8003
|
return IsEqual(input.length, 3) ? [
|
|
@@ -7986,20 +8012,8 @@ function TemplateLiteralTypesMapping(input) {
|
|
|
7986
8012
|
function TemplateLiteralMapping(input) {
|
|
7987
8013
|
return TemplateLiteralDeferred(input);
|
|
7988
8014
|
}
|
|
7989
|
-
function
|
|
7990
|
-
return
|
|
7991
|
-
}
|
|
7992
|
-
function LiteralBooleanMapping(input) {
|
|
7993
|
-
return Literal$1(IsEqual(input, "true"));
|
|
7994
|
-
}
|
|
7995
|
-
function LiteralNumberMapping(input) {
|
|
7996
|
-
return Literal$1(parseFloat(input));
|
|
7997
|
-
}
|
|
7998
|
-
function LiteralStringMapping(input) {
|
|
7999
|
-
return Literal$1(input);
|
|
8000
|
-
}
|
|
8001
|
-
function LiteralMapping(input) {
|
|
8002
|
-
return input;
|
|
8015
|
+
function DependentMapping(input) {
|
|
8016
|
+
return IsEqual(input.length, 6) ? Dependent$1(input[1], input[3], input[5]) : Dependent$1(input[1], input[3], Unknown());
|
|
8003
8017
|
}
|
|
8004
8018
|
function KeyOfMapping(input) {
|
|
8005
8019
|
return input.length > 0;
|
|
@@ -8062,7 +8076,7 @@ function ExprMapping(input) {
|
|
|
8062
8076
|
return ExprBinaryMapping(left, rest);
|
|
8063
8077
|
}
|
|
8064
8078
|
function ExprReadonlyMapping(input) {
|
|
8065
|
-
return
|
|
8079
|
+
return AddImmutableDeferred(input[1]);
|
|
8066
8080
|
}
|
|
8067
8081
|
function ExprPipeMapping(input) {
|
|
8068
8082
|
return input[1];
|
|
@@ -8099,7 +8113,7 @@ function OptionalMapping(input) {
|
|
|
8099
8113
|
}
|
|
8100
8114
|
function PropertyMapping(input) {
|
|
8101
8115
|
const [isReadonly, key, isOptional, _colon, type] = input;
|
|
8102
|
-
return { [key]: isReadonly && isOptional ?
|
|
8116
|
+
return { [key]: isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type };
|
|
8103
8117
|
}
|
|
8104
8118
|
function PropertyDelimiterMapping(input) {
|
|
8105
8119
|
return input;
|
|
@@ -8120,16 +8134,16 @@ function _Object_Mapping(input) {
|
|
|
8120
8134
|
return _Object_$1(properties, IsEqual(Keys(patternProperties).length, 0) ? {} : { patternProperties });
|
|
8121
8135
|
}
|
|
8122
8136
|
function ElementNamedMapping(input) {
|
|
8123
|
-
return IsEqual(input.length, 5) ?
|
|
8137
|
+
return IsEqual(input.length, 5) ? AddReadonlyDeferred(AddOptionalDeferred(input[4])) : IsEqual(input.length, 3) ? input[2] : IsEqual(input.length, 4) ? IsEqual(input[2], "readonly") ? AddReadonlyDeferred(input[3]) : AddOptionalDeferred(input[3]) : Unreachable();
|
|
8124
8138
|
}
|
|
8125
8139
|
function ElementReadonlyOptionalMapping(input) {
|
|
8126
|
-
return
|
|
8140
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[1]));
|
|
8127
8141
|
}
|
|
8128
8142
|
function ElementReadonlyMapping(input) {
|
|
8129
|
-
return
|
|
8143
|
+
return AddReadonlyDeferred(input[1]);
|
|
8130
8144
|
}
|
|
8131
8145
|
function ElementOptionalMapping(input) {
|
|
8132
|
-
return
|
|
8146
|
+
return AddOptionalDeferred(input[0]);
|
|
8133
8147
|
}
|
|
8134
8148
|
function ElementBaseMapping(input) {
|
|
8135
8149
|
return input;
|
|
@@ -8140,17 +8154,17 @@ function ElementMapping(input) {
|
|
|
8140
8154
|
function ElementListMapping(input) {
|
|
8141
8155
|
return Delimited(input);
|
|
8142
8156
|
}
|
|
8143
|
-
function
|
|
8144
|
-
return Tuple
|
|
8157
|
+
function _Tuple_Mapping(input) {
|
|
8158
|
+
return Tuple(input[1]);
|
|
8145
8159
|
}
|
|
8146
8160
|
function ParameterReadonlyOptionalMapping(input) {
|
|
8147
|
-
return
|
|
8161
|
+
return AddReadonlyDeferred(AddOptionalDeferred(input[4]));
|
|
8148
8162
|
}
|
|
8149
8163
|
function ParameterReadonlyMapping(input) {
|
|
8150
|
-
return
|
|
8164
|
+
return AddReadonlyDeferred(input[3]);
|
|
8151
8165
|
}
|
|
8152
8166
|
function ParameterOptionalMapping(input) {
|
|
8153
|
-
return
|
|
8167
|
+
return AddOptionalDeferred(input[3]);
|
|
8154
8168
|
}
|
|
8155
8169
|
function ParameterTypeMapping(input) {
|
|
8156
8170
|
return input[2];
|
|
@@ -8167,17 +8181,17 @@ function ParameterListMapping(input) {
|
|
|
8167
8181
|
function _Function_Mapping(input) {
|
|
8168
8182
|
return _Function_$1(input[1], input[4]);
|
|
8169
8183
|
}
|
|
8170
|
-
function
|
|
8171
|
-
return Constructor
|
|
8184
|
+
function _Constructor_Mapping(input) {
|
|
8185
|
+
return Constructor(input[2], input[5]);
|
|
8172
8186
|
}
|
|
8173
|
-
function ApplyReadonly
|
|
8174
|
-
return IsEqual(state, "remove") ?
|
|
8187
|
+
function ApplyReadonly(state, type) {
|
|
8188
|
+
return IsEqual(state, "remove") ? RemoveReadonlyDeferred(type) : IsEqual(state, "add") ? AddReadonlyDeferred(type) : type;
|
|
8175
8189
|
}
|
|
8176
8190
|
function MappedReadonlyMapping(input) {
|
|
8177
8191
|
return IsEqual(input.length, 2) && IsEqual(input[0], "-") ? "remove" : IsEqual(input.length, 2) && IsEqual(input[0], "+") ? "add" : IsEqual(input.length, 1) ? "add" : "none";
|
|
8178
8192
|
}
|
|
8179
|
-
function ApplyOptional
|
|
8180
|
-
return IsEqual(state, "remove") ?
|
|
8193
|
+
function ApplyOptional(state, type) {
|
|
8194
|
+
return IsEqual(state, "remove") ? RemoveOptionalDeferred(type) : IsEqual(state, "add") ? AddOptionalDeferred(type) : type;
|
|
8181
8195
|
}
|
|
8182
8196
|
function MappedOptionalMapping(input) {
|
|
8183
8197
|
return IsEqual(input.length, 2) && IsEqual(input[0], "-") ? "remove" : IsEqual(input.length, 2) && IsEqual(input[0], "+") ? "add" : IsEqual(input.length, 1) ? "add" : "none";
|
|
@@ -8185,48 +8199,48 @@ function MappedOptionalMapping(input) {
|
|
|
8185
8199
|
function MappedAsMapping(input) {
|
|
8186
8200
|
return IsEqual(input.length, 2) ? [input[1]] : [];
|
|
8187
8201
|
}
|
|
8188
|
-
function
|
|
8189
|
-
return IsArray$1(input[6]) && IsEqual(input[6].length, 1) ? MappedDeferred(Identifier(input[3]), input[5], input[6][0], ApplyReadonly
|
|
8190
|
-
}
|
|
8191
|
-
function DependentMapping(input) {
|
|
8192
|
-
return IsEqual(input.length, 6) ? Dependent$1(input[1], input[3], input[5]) : Dependent$1(input[1], input[3], Unknown());
|
|
8202
|
+
function _Mapped_Mapping(input) {
|
|
8203
|
+
return IsArray$1(input[6]) && IsEqual(input[6].length, 1) ? MappedDeferred(Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))) : MappedDeferred(Identifier(input[3]), input[5], Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10])));
|
|
8193
8204
|
}
|
|
8194
8205
|
function ReferenceMapping(input) {
|
|
8195
8206
|
return Ref(input);
|
|
8196
8207
|
}
|
|
8197
|
-
function
|
|
8208
|
+
function WithBigIntMapping(input) {
|
|
8209
|
+
return BigInt(input);
|
|
8210
|
+
}
|
|
8211
|
+
function WithNumberMapping(input) {
|
|
8198
8212
|
return parseFloat(input);
|
|
8199
8213
|
}
|
|
8200
|
-
function
|
|
8214
|
+
function WithBooleanMapping(input) {
|
|
8201
8215
|
return IsEqual(input, "true");
|
|
8202
8216
|
}
|
|
8203
|
-
function
|
|
8217
|
+
function WithStringMapping(input) {
|
|
8204
8218
|
return input;
|
|
8205
8219
|
}
|
|
8206
|
-
function
|
|
8220
|
+
function WithNullMapping(input) {
|
|
8207
8221
|
return null;
|
|
8208
8222
|
}
|
|
8209
|
-
function
|
|
8223
|
+
function WithPropertyMapping(input) {
|
|
8210
8224
|
return { [input[0]]: input[2] };
|
|
8211
8225
|
}
|
|
8212
|
-
function
|
|
8226
|
+
function WithPropertyListMapping(input) {
|
|
8213
8227
|
return Delimited(input);
|
|
8214
8228
|
}
|
|
8215
|
-
function
|
|
8229
|
+
function WithObjectMappingReduce(propertyList) {
|
|
8216
8230
|
return propertyList.reduce((result, left) => {
|
|
8217
8231
|
return Assign(result, left);
|
|
8218
8232
|
}, {});
|
|
8219
8233
|
}
|
|
8220
|
-
function
|
|
8221
|
-
return
|
|
8234
|
+
function WithObjectMapping(input) {
|
|
8235
|
+
return WithObjectMappingReduce(input[1]);
|
|
8222
8236
|
}
|
|
8223
|
-
function
|
|
8237
|
+
function WithElementListMapping(input) {
|
|
8224
8238
|
return Delimited(input);
|
|
8225
8239
|
}
|
|
8226
|
-
function
|
|
8240
|
+
function WithArrayMapping(input) {
|
|
8227
8241
|
return input[1];
|
|
8228
8242
|
}
|
|
8229
|
-
function
|
|
8243
|
+
function WithValueMapping(input) {
|
|
8230
8244
|
return input;
|
|
8231
8245
|
}
|
|
8232
8246
|
function PatternBigIntMapping(input) {
|
|
@@ -8245,7 +8259,7 @@ function PatternNeverMapping(input) {
|
|
|
8245
8259
|
return Never();
|
|
8246
8260
|
}
|
|
8247
8261
|
function PatternTextMapping(input) {
|
|
8248
|
-
return Literal
|
|
8262
|
+
return Literal(input);
|
|
8249
8263
|
}
|
|
8250
8264
|
function PatternBaseMapping(input) {
|
|
8251
8265
|
return input;
|
|
@@ -8542,7 +8556,6 @@ var KeywordNever = (input) => If(Const("never", input), ([_0, input]) => [Keywor
|
|
|
8542
8556
|
var KeywordSymbol = (input) => If(Const("symbol", input), ([_0, input]) => [KeywordSymbolMapping(_0), input]);
|
|
8543
8557
|
var KeywordVoid = (input) => If(Const("void", input), ([_0, input]) => [KeywordVoidMapping(_0), input]);
|
|
8544
8558
|
var KeywordThis = (input) => If(Const("this", input), ([_0, input]) => [KeywordThisMapping(_0), input]);
|
|
8545
|
-
var Keyword = (input) => If(If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => [])))))))))))))), ([_0, input]) => [KeywordMapping(_0), input]);
|
|
8546
8559
|
var TemplateInterpolate = (input) => If(If(Const("${", input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Const("}", input), ([_2, input]) => [[
|
|
8547
8560
|
_0,
|
|
8548
8561
|
_1,
|
|
@@ -8560,11 +8573,23 @@ var TemplateLiteralTypes = (input) => If(If(Const("`", input), ([_0, input]) =>
|
|
|
8560
8573
|
_2
|
|
8561
8574
|
], input]))), ([_0, input]) => [TemplateLiteralTypesMapping(_0), input]);
|
|
8562
8575
|
var TemplateLiteral$1 = (input) => If(TemplateLiteralTypes(input), ([_0, input]) => [TemplateLiteralMapping(_0), input]);
|
|
8576
|
+
var Dependent = (input) => If(If(If(Const("if", input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Const("then", input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Const("else", input), ([_4, input]) => If(Type(input), ([_5, input]) => [[
|
|
8577
|
+
_0,
|
|
8578
|
+
_1,
|
|
8579
|
+
_2,
|
|
8580
|
+
_3,
|
|
8581
|
+
_4,
|
|
8582
|
+
_5
|
|
8583
|
+
], input])))))), ([_0, input]) => [_0, input], () => If(If(Const("if", input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Const("then", input), ([_2, input]) => If(Type(input), ([_3, input]) => [[
|
|
8584
|
+
_0,
|
|
8585
|
+
_1,
|
|
8586
|
+
_2,
|
|
8587
|
+
_3
|
|
8588
|
+
], input])))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [DependentMapping(_0), input]);
|
|
8563
8589
|
var LiteralBigInt = (input) => If(BigInt$1(input), ([_0, input]) => [LiteralBigIntMapping(_0), input]);
|
|
8564
8590
|
var LiteralBoolean = (input) => If(If(Const("true", input), ([_0, input]) => [_0, input], () => If(Const("false", input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [LiteralBooleanMapping(_0), input]);
|
|
8565
8591
|
var LiteralNumber = (input) => If(Number$1(input), ([_0, input]) => [LiteralNumberMapping(_0), input]);
|
|
8566
8592
|
var LiteralString = (input) => If(String$1(["'", "\""], input), ([_0, input]) => [LiteralStringMapping(_0), input]);
|
|
8567
|
-
var Literal = (input) => If(If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [LiteralMapping(_0), input]);
|
|
8568
8593
|
var KeyOf$1 = (input) => If(If(If(Const("keyof", input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [KeyOfMapping(_0), input]);
|
|
8569
8594
|
var IndexArray_0 = (input, result = []) => If(If(If(Const("[", input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Const("]", input), ([_2, input]) => [[
|
|
8570
8595
|
_0,
|
|
@@ -8584,8 +8609,8 @@ var Base = (input) => If(If(If(Const("(", input), ([_0, input]) => If(Type(input
|
|
|
8584
8609
|
_0,
|
|
8585
8610
|
_1,
|
|
8586
8611
|
_2
|
|
8587
|
-
], input]))), ([_0, input]) => [_0, input], () => If(
|
|
8588
|
-
var With$1 = (input) => If(If(If(Const("with", input), ([_0, input]) => If(
|
|
8612
|
+
], input]))), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral$1(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(_Tuple_(input), ([_0, input]) => [_0, input], () => If(_Constructor_(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(_Mapped_(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))))))))))))))))))), ([_0, input]) => [BaseMapping(_0), input]);
|
|
8613
|
+
var With$1 = (input) => If(If(If(Const("with", input), ([_0, input]) => If(WithObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [WithMapping(_0), input]);
|
|
8589
8614
|
var Factor = (input) => If(If(KeyOf$1(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends$1(input), ([_3, input]) => If(With$1(input), ([_4, input]) => [[
|
|
8590
8615
|
_0,
|
|
8591
8616
|
_1,
|
|
@@ -8680,11 +8705,11 @@ var ElementBase = (input) => If(If(ElementNamed(input), ([_0, input]) => [_0, in
|
|
|
8680
8705
|
var Element$1 = (input) => If(If(If(Const("...", input), ([_0, input]) => If(ElementBase(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(ElementBase(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [ElementMapping(_0), input]);
|
|
8681
8706
|
var ElementList_0 = (input, result = []) => If(If(Element$1(input), ([_0, input]) => If(Const(",", input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ElementList_0(input, [...result, _0]), () => [result, input]);
|
|
8682
8707
|
var ElementList = (input) => If(If(ElementList_0(input), ([_0, input]) => If(If(If(Element$1(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [ElementListMapping(_0), input]);
|
|
8683
|
-
var
|
|
8708
|
+
var _Tuple_ = (input) => If(If(Const("[", input), ([_0, input]) => If(ElementList(input), ([_1, input]) => If(Const("]", input), ([_2, input]) => [[
|
|
8684
8709
|
_0,
|
|
8685
8710
|
_1,
|
|
8686
8711
|
_2
|
|
8687
|
-
], input]))), ([_0, input]) => [
|
|
8712
|
+
], input]))), ([_0, input]) => [_Tuple_Mapping(_0), input]);
|
|
8688
8713
|
var ParameterReadonlyOptional = (input) => If(If(Ident(input), ([_0, input]) => If(Const("?", input), ([_1, input]) => If(Const(":", input), ([_2, input]) => If(Const("readonly", input), ([_3, input]) => If(Type(input), ([_4, input]) => [[
|
|
8689
8714
|
_0,
|
|
8690
8715
|
_1,
|
|
@@ -8720,18 +8745,18 @@ var _Function_ = (input) => If(If(Const("(", input), ([_0, input]) => If(Paramet
|
|
|
8720
8745
|
_3,
|
|
8721
8746
|
_4
|
|
8722
8747
|
], input]))))), ([_0, input]) => [_Function_Mapping(_0), input]);
|
|
8723
|
-
var
|
|
8748
|
+
var _Constructor_ = (input) => If(If(Const("new", input), ([_0, input]) => If(Const("(", input), ([_1, input]) => If(ParameterList(input), ([_2, input]) => If(Const(")", input), ([_3, input]) => If(Const("=>", input), ([_4, input]) => If(Type(input), ([_5, input]) => [[
|
|
8724
8749
|
_0,
|
|
8725
8750
|
_1,
|
|
8726
8751
|
_2,
|
|
8727
8752
|
_3,
|
|
8728
8753
|
_4,
|
|
8729
8754
|
_5
|
|
8730
|
-
], input])))))), ([_0, input]) => [
|
|
8755
|
+
], input])))))), ([_0, input]) => [_Constructor_Mapping(_0), input]);
|
|
8731
8756
|
var MappedReadonly = (input) => If(If(If(Const("+", input), ([_0, input]) => If(Const("readonly", input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Const("-", input), ([_0, input]) => If(Const("readonly", input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Const("readonly", input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [MappedReadonlyMapping(_0), input]);
|
|
8732
8757
|
var MappedOptional = (input) => If(If(If(Const("+", input), ([_0, input]) => If(Const("?", input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Const("-", input), ([_0, input]) => If(Const("?", input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Const("?", input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [MappedOptionalMapping(_0), input]);
|
|
8733
8758
|
var MappedAs = (input) => If(If(If(Const("as", input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [MappedAsMapping(_0), input]);
|
|
8734
|
-
var
|
|
8759
|
+
var _Mapped_ = (input) => If(If(Const("{", input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Const("[", input), ([_2, input]) => If(Ident(input), ([_3, input]) => If(Const("in", input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Const("]", input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Const(":", input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Const("}", input), ([_12, input]) => [[
|
|
8735
8760
|
_0,
|
|
8736
8761
|
_1,
|
|
8737
8762
|
_2,
|
|
@@ -8745,45 +8770,34 @@ var Mapped$1 = (input) => If(If(Const("{", input), ([_0, input]) => If(MappedRea
|
|
|
8745
8770
|
_10,
|
|
8746
8771
|
_11,
|
|
8747
8772
|
_12
|
|
8748
|
-
], input]))))))))))))), ([_0, input]) => [
|
|
8749
|
-
var Dependent = (input) => If(If(If(Const("if", input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Const("then", input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Const("else", input), ([_4, input]) => If(Type(input), ([_5, input]) => [[
|
|
8750
|
-
_0,
|
|
8751
|
-
_1,
|
|
8752
|
-
_2,
|
|
8753
|
-
_3,
|
|
8754
|
-
_4,
|
|
8755
|
-
_5
|
|
8756
|
-
], input])))))), ([_0, input]) => [_0, input], () => If(If(Const("if", input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Const("then", input), ([_2, input]) => If(Type(input), ([_3, input]) => [[
|
|
8757
|
-
_0,
|
|
8758
|
-
_1,
|
|
8759
|
-
_2,
|
|
8760
|
-
_3
|
|
8761
|
-
], input])))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [DependentMapping(_0), input]);
|
|
8773
|
+
], input]))))))))))))), ([_0, input]) => [_Mapped_Mapping(_0), input]);
|
|
8762
8774
|
var Reference = (input) => If(Ident(input), ([_0, input]) => [ReferenceMapping(_0), input]);
|
|
8763
|
-
var
|
|
8764
|
-
var
|
|
8765
|
-
var
|
|
8766
|
-
var
|
|
8767
|
-
var
|
|
8775
|
+
var WithBigInt = (input) => If(BigInt$1(input), ([_0, input]) => [WithBigIntMapping(_0), input]);
|
|
8776
|
+
var WithNumber = (input) => If(Number$1(input), ([_0, input]) => [WithNumberMapping(_0), input]);
|
|
8777
|
+
var WithBoolean = (input) => If(If(Const("true", input), ([_0, input]) => [_0, input], () => If(Const("false", input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [WithBooleanMapping(_0), input]);
|
|
8778
|
+
var WithString = (input) => If(String$1(["\"", "'"], input), ([_0, input]) => [WithStringMapping(_0), input]);
|
|
8779
|
+
var WithNull = (input) => If(Const("null", input), ([_0, input]) => [WithNullMapping(_0), input]);
|
|
8780
|
+
var WithUndefined = (input) => If(Const("undefined", input), ([_0, input]) => [void 0, input]);
|
|
8781
|
+
var WithProperty = (input) => If(If(PropertyKey(input), ([_0, input]) => If(Const(":", input), ([_1, input]) => If(WithValue(input), ([_2, input]) => [[
|
|
8768
8782
|
_0,
|
|
8769
8783
|
_1,
|
|
8770
8784
|
_2
|
|
8771
|
-
], input]))), ([_0, input]) => [
|
|
8772
|
-
var
|
|
8773
|
-
var
|
|
8774
|
-
var
|
|
8785
|
+
], input]))), ([_0, input]) => [WithPropertyMapping(_0), input]);
|
|
8786
|
+
var WithPropertyList_0 = (input, result = []) => If(If(WithProperty(input), ([_0, input]) => If(PropertyDelimiter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithPropertyList_0(input, [...result, _0]), () => [result, input]);
|
|
8787
|
+
var WithPropertyList = (input) => If(If(WithPropertyList_0(input), ([_0, input]) => If(If(If(WithProperty(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [WithPropertyListMapping(_0), input]);
|
|
8788
|
+
var WithObject = (input) => If(If(Const("{", input), ([_0, input]) => If(WithPropertyList(input), ([_1, input]) => If(Const("}", input), ([_2, input]) => [[
|
|
8775
8789
|
_0,
|
|
8776
8790
|
_1,
|
|
8777
8791
|
_2
|
|
8778
|
-
], input]))), ([_0, input]) => [
|
|
8779
|
-
var
|
|
8780
|
-
var
|
|
8781
|
-
var
|
|
8792
|
+
], input]))), ([_0, input]) => [WithObjectMapping(_0), input]);
|
|
8793
|
+
var WithElementList_0 = (input, result = []) => If(If(WithValue(input), ([_0, input]) => If(Const(",", input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithElementList_0(input, [...result, _0]), () => [result, input]);
|
|
8794
|
+
var WithElementList = (input) => If(If(WithElementList_0(input), ([_0, input]) => If(If(If(WithValue(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [WithElementListMapping(_0), input]);
|
|
8795
|
+
var WithArray = (input) => If(If(Const("[", input), ([_0, input]) => If(WithElementList(input), ([_1, input]) => If(Const("]", input), ([_2, input]) => [[
|
|
8782
8796
|
_0,
|
|
8783
8797
|
_1,
|
|
8784
8798
|
_2
|
|
8785
|
-
], input]))), ([_0, input]) => [
|
|
8786
|
-
var
|
|
8799
|
+
], input]))), ([_0, input]) => [WithArrayMapping(_0), input]);
|
|
8800
|
+
var WithValue = (input) => If(If(WithBigInt(input), ([_0, input]) => [_0, input], () => If(WithNumber(input), ([_0, input]) => [_0, input], () => If(WithBoolean(input), ([_0, input]) => [_0, input], () => If(WithString(input), ([_0, input]) => [_0, input], () => If(WithNull(input), ([_0, input]) => [_0, input], () => If(WithUndefined(input), ([_0, input]) => [_0, input], () => If(WithObject(input), ([_0, input]) => [_0, input], () => If(WithArray(input), ([_0, input]) => [_0, input], () => [])))))))), ([_0, input]) => [WithValueMapping(_0), input]);
|
|
8787
8801
|
var PatternBigInt = (input) => If(Const("-?(?:0|[1-9][0-9]*)n", input), ([_0, input]) => [PatternBigIntMapping(_0), input]);
|
|
8788
8802
|
var PatternString = (input) => If(Const(".*", input), ([_0, input]) => [PatternStringMapping(_0), input]);
|
|
8789
8803
|
var PatternNumber = (input) => If(Const("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?", input), ([_0, input]) => [PatternNumberMapping(_0), input]);
|
|
@@ -8882,7 +8896,7 @@ function EncodeNumber(right, pattern) {
|
|
|
8882
8896
|
return EncodeTypes(right, `${pattern}${NumberPattern}`);
|
|
8883
8897
|
}
|
|
8884
8898
|
function EncodeBoolean(right, pattern) {
|
|
8885
|
-
return EncodeType(Union([Literal
|
|
8899
|
+
return EncodeType(Union([Literal("false"), Literal("true")]), right, pattern);
|
|
8886
8900
|
}
|
|
8887
8901
|
function EncodeString(right, pattern) {
|
|
8888
8902
|
return EncodeTypes(right, `${pattern}.*`);
|
|
@@ -9062,16 +9076,16 @@ function ExtendsLiteralValue(inferred, left, right) {
|
|
|
9062
9076
|
return left === right ? ExtendsTrue(inferred) : ExtendsFalse();
|
|
9063
9077
|
}
|
|
9064
9078
|
function ExtendsLiteralBigInt(inferred, left, right) {
|
|
9065
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal
|
|
9079
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBigInt(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
9066
9080
|
}
|
|
9067
9081
|
function ExtendsLiteralBoolean(inferred, left, right) {
|
|
9068
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal
|
|
9082
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsBoolean(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
9069
9083
|
}
|
|
9070
9084
|
function ExtendsLiteralNumber(inferred, left, right) {
|
|
9071
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal
|
|
9085
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsNumber(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
9072
9086
|
}
|
|
9073
9087
|
function ExtendsLiteralString(inferred, left, right) {
|
|
9074
|
-
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal
|
|
9088
|
+
return IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) : IsString(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, Literal(left), right);
|
|
9075
9089
|
}
|
|
9076
9090
|
function ExtendsLiteral(inferred, left, right) {
|
|
9077
9091
|
return IsBigInt$1(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) : IsBoolean$1(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) : IsNumber$1(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) : IsString$1(left.const) ? ExtendsLiteralString(inferred, left.const, right) : Unreachable$1();
|
|
@@ -9148,7 +9162,7 @@ function TryInferResults(rest, right, result = []) {
|
|
|
9148
9162
|
}
|
|
9149
9163
|
function InferTupleResult(inferred, name, left, right) {
|
|
9150
9164
|
const results = TryInferResults(left, right);
|
|
9151
|
-
return IsArray$1(results) ? ExtendsTrue(Assign(inferred, { [name]: Tuple
|
|
9165
|
+
return IsArray$1(results) ? ExtendsTrue(Assign(inferred, { [name]: Tuple(results) })) : ExtendsFalse();
|
|
9152
9166
|
}
|
|
9153
9167
|
function InferUnionResult(inferred, name, left, right) {
|
|
9154
9168
|
const results = TryInferResults(left, right);
|
|
@@ -9178,7 +9192,7 @@ function Elements(inferred, reversed, leftRest, rightRest) {
|
|
|
9178
9192
|
return ElementsRight(inferred, reversed, leftRest, rightRest);
|
|
9179
9193
|
}
|
|
9180
9194
|
function ExtendsTupleToTuple(inferred, left, right) {
|
|
9181
|
-
const instantiatedRight = InstantiateElements(inferred,
|
|
9195
|
+
const instantiatedRight = InstantiateElements(inferred, State([], []), right);
|
|
9182
9196
|
const reversed = Reversed(instantiatedRight);
|
|
9183
9197
|
return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));
|
|
9184
9198
|
}
|
|
@@ -9187,8 +9201,8 @@ function ExtendsTupleToArray(inferred, left, right) {
|
|
|
9187
9201
|
return IsInferable(inferrable) ? InferUnionResult(inferred, inferrable["name"], left, inferrable["type"]) : TakeLeft(left, (head, tail) => Match(ExtendsLeft(inferred, head, right), (inferred) => ExtendsTupleToArray(inferred, tail, right), () => ExtendsFalse()), () => ExtendsTrue(inferred));
|
|
9188
9202
|
}
|
|
9189
9203
|
function ExtendsTuple(inferred, left, right) {
|
|
9190
|
-
const instantiatedLeft = InstantiateElements(inferred,
|
|
9191
|
-
return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple
|
|
9204
|
+
const instantiatedLeft = InstantiateElements(inferred, State([], []), left);
|
|
9205
|
+
return IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) : IsArray(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) : ExtendsRight(inferred, Tuple(instantiatedLeft), right);
|
|
9192
9206
|
}
|
|
9193
9207
|
function ExtendsUndefined(inferred, left, right) {
|
|
9194
9208
|
return IsVoid(right) ? ExtendsTrue(inferred) : IsUndefined(right) ? ExtendsTrue(inferred) : ExtendsRight(inferred, left, right);
|
|
@@ -9293,7 +9307,7 @@ function FromTypes$1(types) {
|
|
|
9293
9307
|
}, []);
|
|
9294
9308
|
}
|
|
9295
9309
|
function FromType$13(type) {
|
|
9296
|
-
return IsRef(type) ? FromRef$1(type.$ref) : IsArray(type) ? _Array_(FromType$13(type.items), ArrayOptions(type)) : IsAsyncIterator(type) ? AsyncIterator(FromType$13(type.iteratorItems)) : IsConstructor(type) ? Constructor
|
|
9310
|
+
return IsRef(type) ? FromRef$1(type.$ref) : IsArray(type) ? _Array_(FromType$13(type.items), ArrayOptions(type)) : IsAsyncIterator(type) ? AsyncIterator(FromType$13(type.iteratorItems)) : IsConstructor(type) ? Constructor(FromTypes$1(type.parameters), FromType$13(type.instanceType)) : IsFunction(type) ? _Function_$1(FromTypes$1(type.parameters), FromType$13(type.returnType)) : IsIntersect(type) ? Intersect(FromTypes$1(type.allOf)) : IsIterator(type) ? Iterator(FromType$13(type.iteratorItems)) : IsObject(type) ? _Object_$1(FromProperties(type.properties)) : IsPromise(type) ? _Promise_(FromType$13(type.item)) : IsRecord(type) ? Record(RecordKey(type), FromType$13(RecordValue(type))) : IsUnion(type) ? Union(FromTypes$1(type.anyOf)) : IsTuple(type) ? Tuple(FromTypes$1(type.items)) : type;
|
|
9297
9311
|
}
|
|
9298
9312
|
function CyclicAnyFromParameters(defs, ref) {
|
|
9299
9313
|
return ref in defs ? FromType$13(defs[ref]) : Unknown();
|
|
@@ -9303,8 +9317,8 @@ function CyclicExtends(type) {
|
|
|
9303
9317
|
return CyclicAnyFromParameters(type.$defs, type.$ref);
|
|
9304
9318
|
}
|
|
9305
9319
|
function CyclicInterface(context, heritage, properties) {
|
|
9306
|
-
const instantiatedHeritage = InstantiateTypes(context,
|
|
9307
|
-
const instantiatedProperties = InstantiateProperties({},
|
|
9320
|
+
const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);
|
|
9321
|
+
const instantiatedProperties = InstantiateProperties({}, State([], []), properties);
|
|
9308
9322
|
return EvaluateIntersect([...instantiatedHeritage, _Object_$1(instantiatedProperties)]);
|
|
9309
9323
|
}
|
|
9310
9324
|
function CyclicDefinitions(context, dependencies) {
|
|
@@ -9454,7 +9468,9 @@ function IsTailCall(state, name) {
|
|
|
9454
9468
|
return IsEqual(Peek(state), name);
|
|
9455
9469
|
}
|
|
9456
9470
|
function CallDispatch(context, state, target, parameters, expression, arguments_) {
|
|
9457
|
-
|
|
9471
|
+
const argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_);
|
|
9472
|
+
const returnType = InstantiateType(argumentsContext, State([...state["callstack"], target["$ref"]], state["visited"]), expression);
|
|
9473
|
+
return InstantiateType(argumentsContext, State([], []), returnType);
|
|
9458
9474
|
}
|
|
9459
9475
|
function CallDistributed(context, state, target, parameters, expression, distributedArguments) {
|
|
9460
9476
|
return distributedArguments.reduce((result, arguments_) => [...result, CallDispatch(context, state, target, parameters, expression, arguments_)], []);
|
|
@@ -9472,23 +9488,54 @@ function CallInstantiate(context, state, target, arguments_) {
|
|
|
9472
9488
|
}
|
|
9473
9489
|
function CallConstruct(target, arguments_) {
|
|
9474
9490
|
return Create({ ["~kind"]: "Call" }, {
|
|
9491
|
+
type: "call",
|
|
9475
9492
|
target,
|
|
9476
9493
|
arguments: arguments_
|
|
9477
9494
|
}, {});
|
|
9478
9495
|
}
|
|
9479
9496
|
/** Creates a Call type. */
|
|
9480
9497
|
function Call(target, arguments_) {
|
|
9481
|
-
return CallInstantiate({},
|
|
9498
|
+
return CallInstantiate({}, State([], []), target, arguments_);
|
|
9482
9499
|
}
|
|
9483
9500
|
/** Returns true if the given type is a TCall. */
|
|
9484
9501
|
function IsCall(value) {
|
|
9485
9502
|
return IsKind(value, "Call");
|
|
9486
9503
|
}
|
|
9504
|
+
function RemoveImmutableOperation(type) {
|
|
9505
|
+
return Discard(type, ["~immutable"]);
|
|
9506
|
+
}
|
|
9507
|
+
function RemoveImmutableAction(type, options) {
|
|
9508
|
+
return Update(RemoveImmutableOperation(type), {}, options);
|
|
9509
|
+
}
|
|
9510
|
+
function RemoveImmutableInstantiate(context, state, type, options) {
|
|
9511
|
+
return RemoveImmutableAction(InstantiateType(context, state, type), options);
|
|
9512
|
+
}
|
|
9513
|
+
/** Creates a deferred Awaited action. */
|
|
9514
|
+
function AwaitedDeferred(type, options = {}) {
|
|
9515
|
+
return Deferred("Awaited", [type], options);
|
|
9516
|
+
}
|
|
9517
|
+
/**
|
|
9518
|
+
* Applies an Awaited action to a type.
|
|
9519
|
+
*
|
|
9520
|
+
* @deprecated This action is being removed in the next version of TypeBox.
|
|
9521
|
+
*/
|
|
9522
|
+
function Awaited(type, options = {}) {
|
|
9523
|
+
return AwaitedAction(type, options);
|
|
9524
|
+
}
|
|
9525
|
+
function AwaitedOperation(type) {
|
|
9526
|
+
return IsPromise(type) ? AwaitedOperation(type.item) : type;
|
|
9527
|
+
}
|
|
9528
|
+
function AwaitedAction(type, options) {
|
|
9529
|
+
return CanInstantiate([type]) ? Update(AwaitedOperation(type), {}, options) : AwaitedDeferred(type, options);
|
|
9530
|
+
}
|
|
9531
|
+
function AwaitedInstantiate(context, state, type, options) {
|
|
9532
|
+
return AwaitedAction(InstantiateType(context, state, type), options);
|
|
9533
|
+
}
|
|
9487
9534
|
function ApplyMapping(mapping, value) {
|
|
9488
9535
|
return mapping(value);
|
|
9489
9536
|
}
|
|
9490
9537
|
function FromLiteral$2(mapping, value) {
|
|
9491
|
-
return IsString$1(value) ? Literal
|
|
9538
|
+
return IsString$1(value) ? Literal(ApplyMapping(mapping, value)) : Literal(value);
|
|
9492
9539
|
}
|
|
9493
9540
|
function FromTemplateLiteral$2(mapping, pattern) {
|
|
9494
9541
|
return FromType$11(mapping, EvaluateTemplateLiteral(pattern));
|
|
@@ -9570,7 +9617,7 @@ function ConditionalDeferred(left, right, true_, false_, options = {}) {
|
|
|
9570
9617
|
}
|
|
9571
9618
|
/** Applies a Conditional action to the given types. */
|
|
9572
9619
|
function Conditional(left, right, true_, false_, options = {}) {
|
|
9573
|
-
return ConditionalAction({},
|
|
9620
|
+
return ConditionalAction({}, State([], []), left, right, true_, false_, options);
|
|
9574
9621
|
}
|
|
9575
9622
|
function ConditionalOperation(context, state, left, right, true_, false_) {
|
|
9576
9623
|
const extendsResult = Extends(context, left, right);
|
|
@@ -9591,7 +9638,8 @@ function ConstructorParameters(type, options = {}) {
|
|
|
9591
9638
|
return ConstructorParametersAction(type, options);
|
|
9592
9639
|
}
|
|
9593
9640
|
function ConstructorParametersOperation(type) {
|
|
9594
|
-
|
|
9641
|
+
const parameters = IsConstructor(type) ? type["parameters"] : [];
|
|
9642
|
+
return Tuple(InstantiateElements({}, State([], []), parameters));
|
|
9595
9643
|
}
|
|
9596
9644
|
function ConstructorParametersAction(type, options) {
|
|
9597
9645
|
return CanInstantiate([type]) ? Update(ConstructorParametersOperation(type), {}, options) : ConstructorParametersDeferred(type, options);
|
|
@@ -9641,7 +9689,7 @@ function ExtractInstantiate(context, state, left, right, options) {
|
|
|
9641
9689
|
}
|
|
9642
9690
|
function KeysToLiterals(keys) {
|
|
9643
9691
|
return keys.reduce((result, left) => {
|
|
9644
|
-
return IsLiteralValue(left) ? [...result, Literal
|
|
9692
|
+
return IsLiteralValue(left) ? [...result, Literal(left)] : result;
|
|
9645
9693
|
}, []);
|
|
9646
9694
|
}
|
|
9647
9695
|
function KeysToIndexer(keys) {
|
|
@@ -9688,7 +9736,7 @@ function FromObject$5(properties) {
|
|
|
9688
9736
|
return properties;
|
|
9689
9737
|
}
|
|
9690
9738
|
function FromTuple$3(types) {
|
|
9691
|
-
return FromType$10(TupleToObject(Tuple
|
|
9739
|
+
return FromType$10(TupleToObject(Tuple(types)));
|
|
9692
9740
|
}
|
|
9693
9741
|
function CollapseUnionProperties(left, right) {
|
|
9694
9742
|
return Keys(left).filter((key) => key in right).reduce((result, key) => {
|
|
@@ -9722,7 +9770,7 @@ function ConvertToIntegerKey(value) {
|
|
|
9722
9770
|
return integerKeyPattern.test(normal) ? parseInt(normal) : value;
|
|
9723
9771
|
}
|
|
9724
9772
|
function NormalizeLiteral(value) {
|
|
9725
|
-
return Literal
|
|
9773
|
+
return Literal(ConvertToIntegerKey(value));
|
|
9726
9774
|
}
|
|
9727
9775
|
function NormalizeIndexerTypes(types) {
|
|
9728
9776
|
return types.map((type) => NormalizeIndexer(type));
|
|
@@ -9772,7 +9820,7 @@ function FromTypes(properties, types) {
|
|
|
9772
9820
|
return types.map((type) => FromType$8(properties, type));
|
|
9773
9821
|
}
|
|
9774
9822
|
function FromType$8(properties, type) {
|
|
9775
|
-
return IsArray(type) ? _Array_(FromType$8(properties, type.items)) : IsAsyncIterator(type) ? AsyncIterator(FromType$8(properties, type.iteratorItems)) : IsConstructor(type) ? Constructor
|
|
9823
|
+
return IsArray(type) ? _Array_(FromType$8(properties, type.items)) : IsAsyncIterator(type) ? AsyncIterator(FromType$8(properties, type.iteratorItems)) : IsConstructor(type) ? Constructor(FromTypes(properties, type.parameters), FromType$8(properties, type.instanceType)) : IsFunction(type) ? _Function_$1(FromTypes(properties, type.parameters), FromType$8(properties, type.returnType)) : IsIterator(type) ? Iterator(FromType$8(properties, type.iteratorItems)) : IsPromise(type) ? _Promise_(FromType$8(properties, type.item)) : IsTuple(type) ? Tuple(FromTypes(properties, type.items)) : IsUnion(type) ? Union(FromTypes(properties, type.anyOf)) : IsIntersect(type) ? Intersect(FromTypes(properties, type.allOf)) : IsThis(type) ? _Object_$1(properties) : type;
|
|
9776
9824
|
}
|
|
9777
9825
|
function ExpandThis(properties, type) {
|
|
9778
9826
|
return FromType$8(properties, type);
|
|
@@ -9799,7 +9847,7 @@ function FromObject$4(properties, indexer) {
|
|
|
9799
9847
|
return IsNumber(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);
|
|
9800
9848
|
}
|
|
9801
9849
|
function ConvertLiteral(value) {
|
|
9802
|
-
return Literal
|
|
9850
|
+
return Literal(ConvertToIntegerKey(value));
|
|
9803
9851
|
}
|
|
9804
9852
|
function ArrayIndexerTypes(types) {
|
|
9805
9853
|
return types.map((type) => FormatArrayIndexer(type));
|
|
@@ -9810,7 +9858,7 @@ function FormatArrayIndexer(type) {
|
|
|
9810
9858
|
}
|
|
9811
9859
|
function IndexElementsWithIndexer(types, indexer) {
|
|
9812
9860
|
return types.reduceRight((result, right, index) => {
|
|
9813
|
-
return IsExtendsTrueLike(Extends({}, Literal
|
|
9861
|
+
return IsExtendsTrueLike(Extends({}, Literal(index), indexer)) ? [right, ...result] : result;
|
|
9814
9862
|
}, []);
|
|
9815
9863
|
}
|
|
9816
9864
|
function FromTupleWithIndexer(types, indexer) {
|
|
@@ -9820,7 +9868,7 @@ function FromTupleWithoutIndexer(types) {
|
|
|
9820
9868
|
return EvaluateUnionFast(types);
|
|
9821
9869
|
}
|
|
9822
9870
|
function FromTuple$2(types, indexer) {
|
|
9823
|
-
return IsLiteral(indexer) && IsEqual(indexer.const, "length") ? Literal
|
|
9871
|
+
return IsLiteral(indexer) && IsEqual(indexer.const, "length") ? Literal(types.length) : IsNumber(indexer) || IsInteger(indexer) ? FromTupleWithoutIndexer(types) : FromTupleWithIndexer(types, indexer);
|
|
9824
9872
|
}
|
|
9825
9873
|
function FromType$7(type, indexer) {
|
|
9826
9874
|
return IsArray(type) ? FromArray$2(type.items, indexer) : IsObject(type) ? FromObject$4(type.properties, indexer) : IsTuple(type) ? FromTuple$2(type.items, indexer) : Never();
|
|
@@ -9871,7 +9919,7 @@ function FromArray$1(_type) {
|
|
|
9871
9919
|
}
|
|
9872
9920
|
function FromPropertyKeys(keys) {
|
|
9873
9921
|
return keys.reduce((result, left) => {
|
|
9874
|
-
return IsLiteralValue(left) ? [...result, Literal
|
|
9922
|
+
return IsLiteralValue(left) ? [...result, Literal(ConvertToIntegerKey(left))] : Unreachable$1();
|
|
9875
9923
|
}, []);
|
|
9876
9924
|
}
|
|
9877
9925
|
function FromObject$3(properties) {
|
|
@@ -9881,7 +9929,7 @@ function FromRecord(type) {
|
|
|
9881
9929
|
return RecordKey(type);
|
|
9882
9930
|
}
|
|
9883
9931
|
function FromTuple$1(types) {
|
|
9884
|
-
return EvaluateUnionFast(types.map((_, index) => Literal
|
|
9932
|
+
return EvaluateUnionFast(types.map((_, index) => Literal(index)));
|
|
9885
9933
|
}
|
|
9886
9934
|
function FromType$6(type) {
|
|
9887
9935
|
return IsAny(type) ? FromAny() : IsArray(type) ? FromArray$1(type.items) : IsObject(type) ? FromObject$3(type.properties) : IsRecord(type) ? FromRecord(type) : IsTuple(type) ? FromTuple$1(type.items) : Never();
|
|
@@ -9906,7 +9954,7 @@ function MappedDeferred(identifier, type, as, property, options = {}) {
|
|
|
9906
9954
|
}
|
|
9907
9955
|
/** Applies a Mapped action using the given types. */
|
|
9908
9956
|
function Mapped(identifier, type, as, property, options = {}) {
|
|
9909
|
-
return MappedAction({},
|
|
9957
|
+
return MappedAction({}, State([], []), identifier, type, as, property, options);
|
|
9910
9958
|
}
|
|
9911
9959
|
function FromTemplateLiteral(pattern) {
|
|
9912
9960
|
return FromType$5(EvaluateTemplateLiteral(pattern));
|
|
@@ -9920,7 +9968,7 @@ function FromEnum(values) {
|
|
|
9920
9968
|
return FromType$5(EvaluateEnum(values));
|
|
9921
9969
|
}
|
|
9922
9970
|
function FromLiteral(value) {
|
|
9923
|
-
return IsNumber$1(value) ? [Literal
|
|
9971
|
+
return IsNumber$1(value) ? [Literal(`${value}`)] : [Literal(value)];
|
|
9924
9972
|
}
|
|
9925
9973
|
function FromType$5(type) {
|
|
9926
9974
|
return IsEnum(type) ? FromEnum(type.enum) : IsLiteral(type) ? FromLiteral(type.const) : IsTemplateLiteral(type) ? FromTemplateLiteral(type.pattern) : IsUnion(type) ? FromUnion$3(type.anyOf) : [type];
|
|
@@ -9956,33 +10004,35 @@ function MappedAction(context, state, identifier, type, as, property, options) {
|
|
|
9956
10004
|
function MappedInstantiate(context, state, identifier, type, as, property, options) {
|
|
9957
10005
|
return MappedAction(context, state, identifier, InstantiateType(context, state, type), as, property, options);
|
|
9958
10006
|
}
|
|
9959
|
-
function InstantiateCyclics(context, cyclicKeys) {
|
|
9960
|
-
|
|
10007
|
+
function InstantiateCyclics(context, declarations, cyclicKeys) {
|
|
10008
|
+
const declarationContext = Assign(context, declarations);
|
|
10009
|
+
return Keys(declarations).filter((key) => cyclicKeys.includes(key)).reduce((result, key) => {
|
|
9961
10010
|
return {
|
|
9962
10011
|
...result,
|
|
9963
|
-
[key]: InstantiateCyclic(
|
|
10012
|
+
[key]: InstantiateCyclic(declarationContext, key, declarations[key])
|
|
9964
10013
|
};
|
|
9965
10014
|
}, {});
|
|
9966
10015
|
}
|
|
9967
|
-
function InstantiateNonCyclics(context, cyclicKeys) {
|
|
9968
|
-
|
|
10016
|
+
function InstantiateNonCyclics(context, declarations, cyclicKeys) {
|
|
10017
|
+
const declarationContext = Assign(context, declarations);
|
|
10018
|
+
return Keys(declarations).filter((key) => !cyclicKeys.includes(key)).reduce((result, key) => {
|
|
9969
10019
|
return {
|
|
9970
10020
|
...result,
|
|
9971
|
-
[key]: InstantiateType(
|
|
10021
|
+
[key]: InstantiateType(declarationContext, State([], []), declarations[key])
|
|
9972
10022
|
};
|
|
9973
10023
|
}, {});
|
|
9974
10024
|
}
|
|
9975
|
-
function InstantiateModule(context, options) {
|
|
9976
|
-
const cyclicCandidates = CyclicCandidates(
|
|
9977
|
-
const instantiatedCyclics = InstantiateCyclics(context, cyclicCandidates);
|
|
9978
|
-
const instantiatedNonCyclics = InstantiateNonCyclics(context, cyclicCandidates);
|
|
10025
|
+
function InstantiateModule(context, declarations, options) {
|
|
10026
|
+
const cyclicCandidates = CyclicCandidates(declarations);
|
|
10027
|
+
const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);
|
|
10028
|
+
const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);
|
|
9979
10029
|
return Update({
|
|
9980
10030
|
...instantiatedCyclics,
|
|
9981
10031
|
...instantiatedNonCyclics
|
|
9982
10032
|
}, {}, options);
|
|
9983
10033
|
}
|
|
9984
|
-
function ModuleInstantiate(context, _state,
|
|
9985
|
-
return InstantiateModule(
|
|
10034
|
+
function ModuleInstantiate(context, _state, declarations, options) {
|
|
10035
|
+
return InstantiateModule(context, declarations, options);
|
|
9986
10036
|
}
|
|
9987
10037
|
/** Creates a deferred NonNullable action. */
|
|
9988
10038
|
function NonNullableDeferred(type, options = {}) {
|
|
@@ -10040,7 +10090,8 @@ function Parameters(type, options = {}) {
|
|
|
10040
10090
|
return ParametersAction(type, options);
|
|
10041
10091
|
}
|
|
10042
10092
|
function ParametersOperation(type) {
|
|
10043
|
-
|
|
10093
|
+
const parameters = IsFunction(type) ? type["parameters"] : [];
|
|
10094
|
+
return Tuple(InstantiateElements({}, State([], []), parameters));
|
|
10044
10095
|
}
|
|
10045
10096
|
function ParametersAction(type, options) {
|
|
10046
10097
|
return CanInstantiate([type]) ? Update(ParametersOperation(type), {}, options) : ParametersDeferred(type, options);
|
|
@@ -10073,7 +10124,7 @@ function FromObject$2(properties) {
|
|
|
10073
10124
|
return _Object_$1(Keys(properties).reduce((result, left) => {
|
|
10074
10125
|
return {
|
|
10075
10126
|
...result,
|
|
10076
|
-
[left]:
|
|
10127
|
+
[left]: AddOptional(properties[left])
|
|
10077
10128
|
};
|
|
10078
10129
|
}, {}));
|
|
10079
10130
|
}
|
|
@@ -10122,7 +10173,7 @@ function ReadonlyObject(type, options = {}) {
|
|
|
10122
10173
|
*/
|
|
10123
10174
|
var ReadonlyType = ReadonlyObject;
|
|
10124
10175
|
function FromArray(type) {
|
|
10125
|
-
return
|
|
10176
|
+
return AddImmutable(_Array_(type));
|
|
10126
10177
|
}
|
|
10127
10178
|
function FromCyclic$1(defs, ref) {
|
|
10128
10179
|
const partial = FromType$1(CyclicTarget(defs, ref));
|
|
@@ -10138,12 +10189,12 @@ function FromObject$1(properties) {
|
|
|
10138
10189
|
return _Object_$1(Keys(properties).reduce((result, left) => {
|
|
10139
10190
|
return {
|
|
10140
10191
|
...result,
|
|
10141
|
-
[left]:
|
|
10192
|
+
[left]: AddReadonly(properties[left])
|
|
10142
10193
|
};
|
|
10143
10194
|
}, {}));
|
|
10144
10195
|
}
|
|
10145
10196
|
function FromTuple(types) {
|
|
10146
|
-
return
|
|
10197
|
+
return AddImmutable(Tuple(types));
|
|
10147
10198
|
}
|
|
10148
10199
|
function FromUnion$1(types) {
|
|
10149
10200
|
return Union(types.map((type) => FromType$1(type)));
|
|
@@ -10158,7 +10209,7 @@ function ReadonlyObjectInstantiate(context, state, type, options) {
|
|
|
10158
10209
|
return ReadonlyObjectAction(InstantiateType(context, state, type), options);
|
|
10159
10210
|
}
|
|
10160
10211
|
function RefInstantiate(context, state, type, ref) {
|
|
10161
|
-
return ref in context ?
|
|
10212
|
+
return state.visited.includes(ref) ? type : ref in context ? InstantiateType(context, State(state["callstack"], [...state["visited"], ref]), context[ref]) : type;
|
|
10162
10213
|
}
|
|
10163
10214
|
function FromCyclic(defs, ref) {
|
|
10164
10215
|
const partial = FromType(CyclicTarget(defs, ref));
|
|
@@ -10177,7 +10228,7 @@ function FromObject(properties) {
|
|
|
10177
10228
|
return _Object_$1(Keys(properties).reduce((result, left) => {
|
|
10178
10229
|
return {
|
|
10179
10230
|
...result,
|
|
10180
|
-
[left]:
|
|
10231
|
+
[left]: RemoveOptional(properties[left])
|
|
10181
10232
|
};
|
|
10182
10233
|
}, {}));
|
|
10183
10234
|
}
|
|
@@ -10244,22 +10295,15 @@ function RestSpread(types) {
|
|
|
10244
10295
|
return [...result, ...SpreadElement(left)];
|
|
10245
10296
|
}, []);
|
|
10246
10297
|
}
|
|
10298
|
+
function State(callstack, visited) {
|
|
10299
|
+
return {
|
|
10300
|
+
callstack,
|
|
10301
|
+
visited
|
|
10302
|
+
};
|
|
10303
|
+
}
|
|
10247
10304
|
function CanInstantiate(types) {
|
|
10248
10305
|
return TakeLeft(types, (left, right) => IsRef(left) ? false : CanInstantiate(right), () => true);
|
|
10249
10306
|
}
|
|
10250
|
-
function ModifierActions(type, readonly, optional) {
|
|
10251
|
-
return IsReadonlyRemoveAction(type) ? ModifierActions(type.type, "remove", optional) : IsOptionalRemoveAction(type) ? ModifierActions(type.type, readonly, "remove") : IsReadonlyAddAction(type) ? ModifierActions(type.type, "add", optional) : IsOptionalAddAction(type) ? ModifierActions(type.type, readonly, "add") : [
|
|
10252
|
-
type,
|
|
10253
|
-
readonly,
|
|
10254
|
-
optional
|
|
10255
|
-
];
|
|
10256
|
-
}
|
|
10257
|
-
function ApplyReadonly(action, type) {
|
|
10258
|
-
return IsEqual(action, "remove") ? ReadonlyRemove(type) : IsEqual(action, "add") ? ReadonlyAdd(type) : type;
|
|
10259
|
-
}
|
|
10260
|
-
function ApplyOptional(action, type) {
|
|
10261
|
-
return IsEqual(action, "remove") ? OptionalRemove(type) : IsEqual(action, "add") ? OptionalAdd(type) : type;
|
|
10262
|
-
}
|
|
10263
10307
|
function InstantiateProperties(context, state, properties) {
|
|
10264
10308
|
return Keys(properties).reduce((result, key) => {
|
|
10265
10309
|
return {
|
|
@@ -10275,40 +10319,41 @@ function InstantiateTypes(context, state, types) {
|
|
|
10275
10319
|
return types.map((type) => InstantiateType(context, state, type));
|
|
10276
10320
|
}
|
|
10277
10321
|
function InstantiateDeferred(context, state, action, parameters, options) {
|
|
10278
|
-
return IsEqual(action, "Awaited") ? AwaitedInstantiate(context, state, parameters[0], options) : IsEqual(action, "Capitalize") ? CapitalizeInstantiate(context, state, parameters[0], options) : IsEqual(action, "Conditional") ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : IsEqual(action, "ConstructorParameters") ? ConstructorParametersInstantiate(context, state, parameters[0], options) : IsEqual(action, "Evaluate") ? EvaluateInstantiate(context, state, parameters[0], options) : IsEqual(action, "Exclude") ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Extract") ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Index") ? IndexInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "InstanceType") ? InstanceTypeInstantiate(context, state, parameters[0], options) : IsEqual(action, "Interface") ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "KeyOf") ? KeyOfInstantiate(context, state, parameters[0], options) : IsEqual(action, "Lowercase") ? LowercaseInstantiate(context, state, parameters[0], options) : IsEqual(action, "Mapped") ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : IsEqual(action, "Module") ? ModuleInstantiate(context, state, parameters[0], options) : IsEqual(action, "NonNullable") ? NonNullableInstantiate(context, state, parameters[0], options) : IsEqual(action, "Pick") ? PickInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Parameters") ? ParametersInstantiate(context, state, parameters[0], options) : IsEqual(action, "Partial") ? PartialInstantiate(context, state, parameters[0], options) : IsEqual(action, "Omit") ? OmitInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "ReadonlyObject") ? ReadonlyObjectInstantiate(context, state, parameters[0], options) : IsEqual(action, "Record") ? RecordInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Required") ? RequiredInstantiate(context, state, parameters[0], options) : IsEqual(action, "ReturnType") ? ReturnTypeInstantiate(context, state, parameters[0], options) : IsEqual(action, "TemplateLiteral") ? TemplateLiteralInstantiate(context, state, parameters[0], options) : IsEqual(action, "Uncapitalize") ? UncapitalizeInstantiate(context, state, parameters[0], options) : IsEqual(action, "Uppercase") ? UppercaseInstantiate(context, state, parameters[0], options) : IsEqual(action, "With") ? WithInstantiate(context, state, parameters[0], parameters[1]) : Deferred(action, parameters, options);
|
|
10322
|
+
return IsEqual(action, "AddImmutable") ? AddImmutableInstantiate(context, state, parameters[0], options) : IsEqual(action, "RemoveImmutable") ? RemoveImmutableInstantiate(context, state, parameters[0], options) : IsEqual(action, "AddReadonly") ? AddReadonlyInstantiate(context, state, parameters[0], options) : IsEqual(action, "RemoveReadonly") ? RemoveReadonlyInstantiate(context, state, parameters[0], options) : IsEqual(action, "AddOptional") ? AddOptionalInstantiate(context, state, parameters[0], options) : IsEqual(action, "RemoveOptional") ? RemoveOptionalInstantiate(context, state, parameters[0], options) : IsEqual(action, "Awaited") ? AwaitedInstantiate(context, state, parameters[0], options) : IsEqual(action, "Capitalize") ? CapitalizeInstantiate(context, state, parameters[0], options) : IsEqual(action, "Conditional") ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : IsEqual(action, "ConstructorParameters") ? ConstructorParametersInstantiate(context, state, parameters[0], options) : IsEqual(action, "Evaluate") ? EvaluateInstantiate(context, state, parameters[0], options) : IsEqual(action, "Exclude") ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Extract") ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Index") ? IndexInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "InstanceType") ? InstanceTypeInstantiate(context, state, parameters[0], options) : IsEqual(action, "Interface") ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "KeyOf") ? KeyOfInstantiate(context, state, parameters[0], options) : IsEqual(action, "Lowercase") ? LowercaseInstantiate(context, state, parameters[0], options) : IsEqual(action, "Mapped") ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) : IsEqual(action, "Module") ? ModuleInstantiate(context, state, parameters[0], options) : IsEqual(action, "NonNullable") ? NonNullableInstantiate(context, state, parameters[0], options) : IsEqual(action, "Pick") ? PickInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Parameters") ? ParametersInstantiate(context, state, parameters[0], options) : IsEqual(action, "Partial") ? PartialInstantiate(context, state, parameters[0], options) : IsEqual(action, "Omit") ? OmitInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "ReadonlyObject") ? ReadonlyObjectInstantiate(context, state, parameters[0], options) : IsEqual(action, "Record") ? RecordInstantiate(context, state, parameters[0], parameters[1], options) : IsEqual(action, "Required") ? RequiredInstantiate(context, state, parameters[0], options) : IsEqual(action, "ReturnType") ? ReturnTypeInstantiate(context, state, parameters[0], options) : IsEqual(action, "TemplateLiteral") ? TemplateLiteralInstantiate(context, state, parameters[0], options) : IsEqual(action, "Uncapitalize") ? UncapitalizeInstantiate(context, state, parameters[0], options) : IsEqual(action, "Uppercase") ? UppercaseInstantiate(context, state, parameters[0], options) : IsEqual(action, "With") ? WithInstantiate(context, state, parameters[0], parameters[1]) : Deferred(action, parameters, options);
|
|
10323
|
+
}
|
|
10324
|
+
function InstantiateImmediate(context, state, type) {
|
|
10325
|
+
type = IsBase(type) ? type.Clone() : type;
|
|
10326
|
+
return IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsAsyncIterator(type) ? AsyncIterator(InstantiateType(context, state, type.iteratorItems), AsyncIteratorOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : IsFunction(type) ? _Function_$1(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsDependent(type) ? Dependent$1(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsIterator(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) : IsObject(type) ? _Object_$1(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsPromise(type) ? _Promise_(InstantiateType(context, state, type.item), PromiseOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
10327
|
+
}
|
|
10328
|
+
function WithModifiers(type, instantiatedType) {
|
|
10329
|
+
const withImmutable = IsImmutable(type) ? Immutable(instantiatedType) : instantiatedType;
|
|
10330
|
+
const withReadonly = IsReadonly(type) ? Readonly$1(withImmutable) : withImmutable;
|
|
10331
|
+
return IsOptional(type) ? Optional$2(withReadonly) : withReadonly;
|
|
10279
10332
|
}
|
|
10280
|
-
function InstantiateType(context, state,
|
|
10281
|
-
const
|
|
10282
|
-
|
|
10283
|
-
const type = IsBase(modifiers[0]) ? modifiers[0].Clone() : modifiers[0];
|
|
10284
|
-
const instantiated = IsRef(type) ? RefInstantiate(context, state, type, type.$ref) : IsArray(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) : IsAsyncIterator(type) ? AsyncIterator(InstantiateType(context, state, type.iteratorItems), AsyncIteratorOptions(type)) : IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) : IsConstructor(type) ? Constructor$1(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) : IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) : IsFunction(type) ? _Function_$1(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) : IsDependent(type) ? Dependent$1(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) : IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) : IsIterator(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) : IsObject(type) ? _Object_$1(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) : IsPromise(type) ? _Promise_(InstantiateType(context, state, type.item), PromiseOptions(type)) : IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) : IsRest(type) ? Rest(InstantiateType(context, state, type.items)) : IsTuple(type) ? Tuple$1(InstantiateElements(context, state, type.items), TupleOptions(type)) : IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) : type;
|
|
10285
|
-
const withImmutable = immutable ? Immutable(instantiated) : instantiated;
|
|
10286
|
-
return ApplyReadonly(modifiers[1], ApplyOptional(modifiers[2], withImmutable));
|
|
10333
|
+
function InstantiateType(context, state, type) {
|
|
10334
|
+
const instantiatedType = InstantiateImmediate(context, state, type);
|
|
10335
|
+
return IsDeferred(type) ? instantiatedType : WithModifiers(type, instantiatedType);
|
|
10287
10336
|
}
|
|
10288
10337
|
/** Instantiates computed schematics using the given context and type. */
|
|
10289
10338
|
function Instantiate(context, type) {
|
|
10290
|
-
return InstantiateType(context,
|
|
10339
|
+
return InstantiateType(context, State([], []), type);
|
|
10291
10340
|
}
|
|
10292
|
-
function
|
|
10293
|
-
return
|
|
10341
|
+
function AddImmutableOperation(type) {
|
|
10342
|
+
return Update(type, { "~immutable": true }, {});
|
|
10294
10343
|
}
|
|
10295
|
-
function
|
|
10296
|
-
return
|
|
10344
|
+
function AddImmutableAction(type, options) {
|
|
10345
|
+
return Update(AddImmutableOperation(type), {}, options);
|
|
10297
10346
|
}
|
|
10298
|
-
function
|
|
10299
|
-
return
|
|
10347
|
+
function AddImmutableInstantiate(context, state, type, options) {
|
|
10348
|
+
return AddImmutableAction(InstantiateType(context, state, type), options);
|
|
10300
10349
|
}
|
|
10301
|
-
/** Creates a deferred
|
|
10302
|
-
function
|
|
10303
|
-
return Deferred("
|
|
10350
|
+
/** Creates a deferred AddImmutable action. */
|
|
10351
|
+
function AddImmutableDeferred(type, options = {}) {
|
|
10352
|
+
return Deferred("AddImmutable", [type], options);
|
|
10304
10353
|
}
|
|
10305
|
-
/**
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
* @deprecated This action is being removed in the next version of TypeBox.
|
|
10309
|
-
*/
|
|
10310
|
-
function Awaited(type, options = {}) {
|
|
10311
|
-
return AwaitedAction(type, options);
|
|
10354
|
+
/** Applies an AddImmutable action to a type. */
|
|
10355
|
+
function AddImmutable(type, options = {}) {
|
|
10356
|
+
return AddImmutableAction(type, options);
|
|
10312
10357
|
}
|
|
10313
10358
|
/** Creates a deferred Evaluate action. */
|
|
10314
10359
|
function EvaluateDeferred(type, options = {}) {
|
|
@@ -10319,12 +10364,12 @@ function Evaluate(type, options = {}) {
|
|
|
10319
10364
|
return EvaluateAction(type, options);
|
|
10320
10365
|
}
|
|
10321
10366
|
/** Creates a deferred Module action. */
|
|
10322
|
-
function ModuleDeferred(
|
|
10323
|
-
return Deferred("Module", [
|
|
10367
|
+
function ModuleDeferred(declarations, options = {}) {
|
|
10368
|
+
return Deferred("Module", [declarations], options);
|
|
10324
10369
|
}
|
|
10325
|
-
/**
|
|
10326
|
-
function Module(
|
|
10327
|
-
return
|
|
10370
|
+
/** Creates a Module with the given declarations */
|
|
10371
|
+
function Module(declarations, options = {}) {
|
|
10372
|
+
return ModuleInstantiate({}, State([], []), declarations, options);
|
|
10328
10373
|
}
|
|
10329
10374
|
/** Parses a type from a TypeScript type expression */
|
|
10330
10375
|
function Script(...args) {
|
|
@@ -10350,7 +10395,7 @@ function Script(...args) {
|
|
|
10350
10395
|
]
|
|
10351
10396
|
});
|
|
10352
10397
|
const result = Script$1(input);
|
|
10353
|
-
return Update(IsArray$1(result) && IsEqual(result.length, 2) ? InstantiateType(context,
|
|
10398
|
+
return Update(IsArray$1(result) && IsEqual(result.length, 2) ? InstantiateType(context, State([], []), result[0]) : Never(), {}, options);
|
|
10354
10399
|
}
|
|
10355
10400
|
(/* @__PURE__ */ __exportAll({
|
|
10356
10401
|
Any: () => Any,
|
|
@@ -10364,7 +10409,7 @@ function Script(...args) {
|
|
|
10364
10409
|
Capitalize: () => Capitalize,
|
|
10365
10410
|
Codec: () => Codec,
|
|
10366
10411
|
Conditional: () => Conditional,
|
|
10367
|
-
Constructor: () => Constructor
|
|
10412
|
+
Constructor: () => Constructor,
|
|
10368
10413
|
ConstructorParameters: () => ConstructorParameters,
|
|
10369
10414
|
Cyclic: () => Cyclic,
|
|
10370
10415
|
Decode: () => Decode,
|
|
@@ -10436,7 +10481,7 @@ function Script(...args) {
|
|
|
10436
10481
|
IsVoid: () => IsVoid,
|
|
10437
10482
|
Iterator: () => Iterator,
|
|
10438
10483
|
KeyOf: () => KeyOf,
|
|
10439
|
-
Literal: () => Literal
|
|
10484
|
+
Literal: () => Literal,
|
|
10440
10485
|
Lowercase: () => Lowercase,
|
|
10441
10486
|
Mapped: () => Mapped,
|
|
10442
10487
|
Module: () => Module,
|
|
@@ -10470,7 +10515,7 @@ function Script(...args) {
|
|
|
10470
10515
|
Symbol: () => Symbol$1,
|
|
10471
10516
|
TemplateLiteral: () => TemplateLiteral,
|
|
10472
10517
|
This: () => This,
|
|
10473
|
-
Tuple: () => Tuple
|
|
10518
|
+
Tuple: () => Tuple,
|
|
10474
10519
|
Uncapitalize: () => Uncapitalize,
|
|
10475
10520
|
Undefined: () => Undefined,
|
|
10476
10521
|
Union: () => Union,
|
|
@@ -11361,4 +11406,4 @@ function superRefine(fn, params) {
|
|
|
11361
11406
|
//#endregion
|
|
11362
11407
|
export { Form$1 as a, FormFieldSwitch as c, string as i, useForm as l, boolean as n, FormField as o, object as r, FormFieldSelect as s, _enum as t };
|
|
11363
11408
|
|
|
11364
|
-
//# sourceMappingURL=schemas-
|
|
11409
|
+
//# sourceMappingURL=schemas-CeNiyNB9.js.map
|