@nanoforge-dev/editor 0.0.2-beta.580354c → 0.0.2-beta.82a2d26
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.B5z3JAkE.css +1 -0
- package/dist/client/_app/immutable/assets/0.B5z3JAkE.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.B5z3JAkE.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/{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/{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/{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/{CObqXk_q.js → Bp3dOgoC.js} +1 -1
- package/dist/client/_app/immutable/chunks/Bp3dOgoC.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Bp3dOgoC.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/BpNXszev.js +6 -0
- package/dist/client/_app/immutable/chunks/BpNXszev.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BpNXszev.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{v6YHThuS.js → CBb7lP5l.js} +1 -1
- package/dist/client/_app/immutable/chunks/CBb7lP5l.js.br +2 -0
- package/dist/client/_app/immutable/chunks/CBb7lP5l.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CZo4a556.js → CByF3Zfc.js} +1 -1
- package/dist/client/_app/immutable/chunks/CByF3Zfc.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CByF3Zfc.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/DV4appXC.js +1 -0
- package/dist/client/_app/immutable/chunks/DV4appXC.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DV4appXC.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/{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/chunks/{D1JHNh7-.js → z7c9RqCD.js} +10 -10
- package/dist/client/_app/immutable/chunks/z7c9RqCD.js.br +0 -0
- package/dist/client/_app/immutable/chunks/z7c9RqCD.js.gz +0 -0
- package/dist/client/_app/immutable/entry/{app.B8CjVJ8m.js → app.6QEfz-iq.js} +2 -2
- package/dist/client/_app/immutable/entry/app.6QEfz-iq.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.6QEfz-iq.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.DgVllUEP.js +1 -0
- package/dist/client/_app/immutable/entry/start.DgVllUEP.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.DgVllUEP.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{0.Cc3CiDns.js → 0.DHdCqwIJ.js} +1 -1
- package/dist/client/_app/immutable/nodes/0.DHdCqwIJ.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.DHdCqwIJ.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{1.aoxJA8Qo.js → 1.loL9C4pA.js} +1 -1
- package/dist/client/_app/immutable/nodes/1.loL9C4pA.js.br +3 -0
- package/dist/client/_app/immutable/nodes/1.loL9C4pA.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{10.DTh0Qakp.js → 11.BJRhAisP.js} +1 -1
- package/dist/client/_app/immutable/nodes/11.BJRhAisP.js.br +0 -0
- package/dist/client/_app/immutable/nodes/11.BJRhAisP.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js +1 -0
- package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.5Lbr-iiR.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js +6 -0
- package/dist/client/_app/immutable/nodes/3.5BHWCtcR.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.5BHWCtcR.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-BAWoYonx.js → 0-DK13KdVt.js} +6 -6
- package/dist/server/chunks/{0-BAWoYonx.js.map → 0-DK13KdVt.js.map} +1 -1
- package/dist/server/chunks/{1-l2q82N-q.js → 1-DytmaR_G.js} +6 -6
- package/dist/server/chunks/{1-l2q82N-q.js.map → 1-DytmaR_G.js.map} +1 -1
- package/dist/server/chunks/{9-DPn3d8kr.js → 10-zM8H1H7h.js} +5 -5
- package/dist/server/chunks/10-zM8H1H7h.js.map +1 -0
- package/dist/server/chunks/11-DAhp5wFR.js +22 -0
- package/dist/server/chunks/11-DAhp5wFR.js.map +1 -0
- package/dist/server/chunks/{2-BTcCBWEw.js → 2-BdHpeJzA.js} +10 -10
- package/dist/server/chunks/{2-BTcCBWEw.js.map → 2-BdHpeJzA.js.map} +1 -1
- package/dist/server/chunks/{3-B9-EfDcH.js → 3-CFpQUapX.js} +10 -10
- package/dist/server/chunks/{3-B9-EfDcH.js.map → 3-CFpQUapX.js.map} +1 -1
- package/dist/server/chunks/{4-BYQgShv3.js → 4-8BW6Sdb0.js} +23 -9
- package/dist/server/chunks/4-8BW6Sdb0.js.map +1 -0
- package/dist/server/chunks/{5-B4IXyXqv.js → 5-1NMUY_LH.js} +3 -3
- package/dist/server/chunks/{5-B4IXyXqv.js.map → 5-1NMUY_LH.js.map} +1 -1
- package/dist/server/chunks/{6-DH_IMDRv.js → 6-DE-wH6HQ.js} +3 -3
- package/dist/server/chunks/{6-DH_IMDRv.js.map → 6-DE-wH6HQ.js.map} +1 -1
- package/dist/server/chunks/7-B1Qi_1kM.js +18 -0
- package/dist/server/chunks/7-B1Qi_1kM.js.map +1 -0
- package/dist/server/chunks/8-sn6bIqkc.js +91 -0
- package/dist/server/chunks/8-sn6bIqkc.js.map +1 -0
- package/dist/server/chunks/{8-CRTa48Fz.js → 9-UjOK68In.js} +5 -5
- package/dist/server/chunks/{8-CRTa48Fz.js.map → 9-UjOK68In.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-TY3dq2.js → _page.svelte-B3dvQwz5.js} +7 -7
- package/dist/server/chunks/{_page.svelte-B-TY3dq2.js.map → _page.svelte-B3dvQwz5.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-1s5jXYk_.js → _page.svelte-DRyjxD6O.js} +243 -97
- package/dist/server/chunks/_page.svelte-DRyjxD6O.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-BHks8xKU.js → _page.svelte-DYpkpTnJ.js} +6 -6
- package/dist/server/chunks/_page.svelte-DYpkpTnJ.js.map +1 -0
- package/dist/server/chunks/_server.ts-C1vgzIkJ.js +13 -0
- package/dist/server/chunks/_server.ts-C1vgzIkJ.js.map +1 -0
- package/dist/server/chunks/{_server.ts-y6LeO9-5.js → _server.ts-Dy1xpkL2.js} +2 -2
- package/dist/server/chunks/{_server.ts-y6LeO9-5.js.map → _server.ts-Dy1xpkL2.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js → _server.ts-Hci5qTfA.js} +2 -2
- package/dist/server/chunks/{_server.ts-a-I4s4R9.js.map → _server.ts-Hci5qTfA.js.map} +1 -1
- package/dist/server/chunks/app-DUeJj5RD.js.map +1 -1
- package/dist/server/chunks/{client-DWDrOrQL.js → client-DBcQyXdV.js} +4 -4
- package/dist/server/chunks/client-DBcQyXdV.js.map +1 -0
- package/dist/server/chunks/{error-cCQrHDre.js → error-dHCCrW4T.js} +301 -147
- package/dist/server/chunks/error-dHCCrW4T.js.map +1 -0
- package/dist/server/chunks/{error.svelte-nsiVeFAJ.js → error.svelte-CAHakCnN.js} +3 -3
- package/dist/server/chunks/error.svelte-CAHakCnN.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-Cdesln7C.js → hooks.server-BR9nwSH9.js} +6 -6
- package/dist/server/chunks/hooks.server-BR9nwSH9.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-DF9-voLX.js → internal2-DhEJvRRa.js} +22 -15
- package/dist/server/chunks/internal2-DhEJvRRa.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-CgSTOPfJ.js → logo-V5iuJCmy.js} +4 -4
- package/dist/server/chunks/logo-V5iuJCmy.js.map +1 -0
- package/dist/server/chunks/{project-loader-DPwVwx5v.js → project-loader-CkPdftFo.js} +4 -4
- package/dist/server/chunks/project-loader-CkPdftFo.js.map +1 -0
- package/dist/server/chunks/{request-handler-guINVc1G.js → request-handler-BVHWtbqx.js} +206 -140
- package/dist/server/chunks/request-handler-BVHWtbqx.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-nSPQog67.js → schemas-l8C4cVM-.js} +348 -303
- package/dist/server/chunks/schemas-l8C4cVM-.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-CuPzwLiF.js → state-D4QqZ0FB.js} +3 -3
- package/dist/server/chunks/state-D4QqZ0FB.js.map +1 -0
- package/dist/server/index.js +368 -353
- package/dist/server/index.js.map +1 -1
- package/dist/server/manifest.js +48 -24
- package/dist/server/manifest.js.map +1 -1
- package/package.json +18 -16
- package/dist/client/_app/immutable/assets/0.BRAq3OL4.css +0 -1
- package/dist/client/_app/immutable/assets/0.BRAq3OL4.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.BRAq3OL4.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/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/Brp9NRGe.js +0 -6
- package/dist/client/_app/immutable/chunks/Brp9NRGe.js.br +0 -0
- package/dist/client/_app/immutable/chunks/Brp9NRGe.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/BwpZ7W8G.js +0 -1
- package/dist/client/_app/immutable/chunks/BwpZ7W8G.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BwpZ7W8G.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/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/CKei9xPI2.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CKei9xPI2.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CObqXk_q.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CObqXk_q.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CZo4a556.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CZo4a556.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/D1JHNh7-.js.br +0 -0
- package/dist/client/_app/immutable/chunks/D1JHNh7-.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/v6YHThuS.js.br +0 -0
- package/dist/client/_app/immutable/chunks/v6YHThuS.js.gz +0 -0
- package/dist/client/_app/immutable/entry/app.B8CjVJ8m.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.B8CjVJ8m.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.xcie2Yx0.js +0 -1
- package/dist/client/_app/immutable/entry/start.xcie2Yx0.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.xcie2Yx0.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/0.Cc3CiDns.js.br +0 -0
- package/dist/client/_app/immutable/nodes/0.Cc3CiDns.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/1.aoxJA8Qo.js.br +0 -3
- package/dist/client/_app/immutable/nodes/1.aoxJA8Qo.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.DTh0Qakp.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.DTh0Qakp.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.DggbBWOd.js +0 -1
- package/dist/client/_app/immutable/nodes/2.DggbBWOd.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.DggbBWOd.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js +0 -6
- package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js.br +0 -0
- package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js.gz +0 -0
- package/dist/server/chunks/10-DliMkA_F.js +0 -22
- package/dist/server/chunks/10-DliMkA_F.js.map +0 -1
- package/dist/server/chunks/4-BYQgShv3.js.map +0 -1
- package/dist/server/chunks/7-CPMeoSUO.js +0 -98
- package/dist/server/chunks/7-CPMeoSUO.js.map +0 -1
- package/dist/server/chunks/9-DPn3d8kr.js.map +0 -1
- package/dist/server/chunks/_layout.svelte-uX7XiB9K.js.map +0 -1
- package/dist/server/chunks/_page.svelte-1s5jXYk_.js.map +0 -1
- package/dist/server/chunks/_page.svelte-BHks8xKU.js.map +0 -1
- package/dist/server/chunks/client-DWDrOrQL.js.map +0 -1
- package/dist/server/chunks/error-cCQrHDre.js.map +0 -1
- package/dist/server/chunks/error.svelte-nsiVeFAJ.js.map +0 -1
- package/dist/server/chunks/events-Bhh2w-5S.js.map +0 -1
- package/dist/server/chunks/hooks.server-Cdesln7C.js.map +0 -1
- package/dist/server/chunks/internal2-DF9-voLX.js.map +0 -1
- package/dist/server/chunks/loader-circle-CFNm9vip.js.map +0 -1
- package/dist/server/chunks/logo-CgSTOPfJ.js.map +0 -1
- package/dist/server/chunks/project-loader-DPwVwx5v.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-nSPQog67.js.map +0 -1
- package/dist/server/chunks/state-CuPzwLiF.js.map +0 -1
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js → CVaqCwHa2.js} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.br → CVaqCwHa2.js.br} +0 -0
- /package/dist/client/_app/immutable/chunks/{CVaqCwHa.js.gz → CVaqCwHa2.js.gz} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js → De2hgUGE2.js} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.br → De2hgUGE2.js.br} +0 -0
- /package/dist/client/_app/immutable/chunks/{De2hgUGE.js.gz → De2hgUGE2.js.gz} +0 -0
- /package/dist/server/chunks/{chunk-D7D4PA-g.js → rolldown-runtime-D7D4PA-g.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-handler-BVHWtbqx.js","names":[],"sources":["../../../.svelte-kit/adapter-bun/chunks/request-handler.js"],"sourcesContent":["import { t as private_env } from \"./shared-server.js\";\nimport { n as Exception } from \"./const.js\";\nimport { a as PUBLIC_MODE, n as HttpClient, t as formatFrom } from \"./format.js\";\nimport { c as resolveSession, l as generateKey, n as resolveProject, o as addProjectToSession, r as tryAddProjectSession, s as getOrCreateSession, t as getProject } from \"./session.js\";\nimport { fail } from \"@sveltejs/kit\";\nimport { plainToInstance } from \"class-transformer\";\nimport { validate } from \"class-validator\";\nimport micromatch from \"micromatch\";\nimport path, { dirname, join, resolve } from \"node:path\";\nimport * as tar from \"tar\";\nimport fs, { existsSync } from \"node:fs\";\nimport { $ } from \"bun\";\nimport { config } from \"dotenv\";\nimport ts from \"typescript\";\n//#region src/lib/server/utils/request-handler/body.ts\nvar parseFormDataBody = (rawBody, c) => {\n\treturn parseBody(Object.fromEntries(Array.from(rawBody.entries()).map(([key, value]) => [key, JSON.parse(value)])), c);\n};\nvar parseBody = async (baseBody, c) => {\n\tif (!c) return baseBody;\n\tconst errors = await validate(plainToInstance(c, baseBody, { excludeExtraneousValues: true }));\n\tif (errors.length > 0) throw new Exception(\"Bad Request\", `Invalid body :\\n${errors.toString().replace(/,/g, \"\\n\")}`, 400);\n\treturn baseBody;\n};\n//#endregion\n//#region src/lib/server/utils/request-handler/context.ts\nvar getContext = async (event) => {\n\tconst session = await resolveSession(event.locals.session);\n\tconst project = resolveProject(event.request.headers, session);\n\treturn {\n\t\tonline: PUBLIC_MODE === \"ONLINE\",\n\t\tsession,\n\t\tproject\n\t};\n};\n//#endregion\n//#region src/lib/utils/http/query.ts\nvar getUrl = (url, query) => {\n\tconst entries = Object.entries(query ?? {}).filter(([, value]) => value !== void 0);\n\tif (entries.length === 0) return url;\n\treturn `${url}?${new URLSearchParams(entries).toString()}`;\n};\n//#endregion\n//#region src/lib/server/utils/cookies/index.ts\nvar setTokensInCookies = (cookies, { accessToken, refreshToken, tokenExpiresAt }) => {\n\tcookies.set(\"accessToken\", accessToken, {\n\t\thttpOnly: true,\n\t\tsecure: private_env.NODE_ENV === \"production\",\n\t\tsameSite: \"lax\",\n\t\tpath: \"/\",\n\t\texpires: new Date(tokenExpiresAt)\n\t});\n\tcookies.set(\"refreshToken\", refreshToken, {\n\t\thttpOnly: true,\n\t\tsecure: private_env.NODE_ENV === \"production\",\n\t\tsameSite: \"lax\",\n\t\tpath: \"/\",\n\t\tmaxAge: 3600 * 24 * 30\n\t});\n};\n//#endregion\n//#region src/lib/server/api/middlewares/refresh-token.middleware.ts\nvar refreshToken = async (cookies, force = false) => {\n\tlet accessToken = force ? void 0 : cookies.get(\"accessToken\");\n\tconst refreshToken = cookies.get(\"refreshToken\");\n\tif (!accessToken) {\n\t\tif (!refreshToken) throw new Exception(\"Unauthorized\", \"No token found\", 401);\n\t\ttry {\n\t\t\tconst tokens = await getNoAuthApi().auth.refreshToken({ refreshToken });\n\t\t\tsetTokensInCookies(cookies, tokens);\n\t\t\taccessToken = tokens.accessToken;\n\t\t} catch {\n\t\t\tthrow new Exception(\"Unauthorized\", \"Invalid refresh token\", 401);\n\t\t}\n\t}\n\treturn accessToken;\n};\nvar getRequestParams = (params, token) => ({\n\t...params,\n\toptions: {\n\t\t...params.options,\n\t\theaders: {\n\t\t\t...params.options.headers,\n\t\t\tAuthorization: `Bearer ${token}`\n\t\t}\n\t}\n});\nvar useTokenMiddleware = (cookies) => {\n\treturn async (params, next) => {\n\t\tconst res = await next(getRequestParams(params, cookies.get(\"accessToken\") ?? await refreshToken(cookies)));\n\t\tif (res.status === 401) return await next(getRequestParams(params, await refreshToken(cookies, true)));\n\t\treturn res;\n\t};\n};\n//#endregion\n//#region src/lib/server/api/base.repository.ts\nvar BaseRepository = class {\n\t_client;\n\t_online;\n\tconstructor(client, online = true) {\n\t\tthis._client = client;\n\t\tthis._online = online;\n\t}\n\tget(path, options) {\n\t\treturn this.runRequest(\"get\", path, options);\n\t}\n\tpost(path, body, options) {\n\t\treturn this.runRequestBody(\"post\", path, body, options);\n\t}\n\tput(path, body, options) {\n\t\treturn this.runRequestBody(\"put\", path, body, options);\n\t}\n\tpatch(path, body, options) {\n\t\treturn this.runRequestBody(\"patch\", path, body, options);\n\t}\n\tdelete(path, options) {\n\t\treturn this.runRequest(\"delete\", path, options);\n\t}\n\tassertOnline() {\n\t\tif (!this._online) throw new Error(\"This route is only available in online mode\");\n\t}\n\tasync runRequest(request, path, options) {\n\t\tif (!options?.offline) this.assertOnline();\n\t\tconst res = await this._client[request](path, options);\n\t\tif (!res.ok) throw new Error(`Request failed with status code ${res.status}`, { cause: await res.json() });\n\t\treturn await res.json();\n\t}\n\tasync runRequestBody(request, path, body, options) {\n\t\tif (!options?.offline) this.assertOnline();\n\t\tconst res = await this._client[request](path, body === void 0 ? void 0 : JSON.stringify(body), options);\n\t\tconst data = await res.json();\n\t\tif (!res.ok) throw new Error(`Request failed with status code ${res.status}`, { cause: data });\n\t\treturn data;\n\t}\n};\n//#endregion\n//#region src/lib/server/api/repositories/auth.repository.ts\nvar AuthRepository = class extends BaseRepository {\n\trefreshToken(input) {\n\t\treturn this.post(`/auth/refresh-token`, input);\n\t}\n};\n//#endregion\n//#region src/lib/server/api/repositories/package.repository.ts\nvar PackageRepository = class extends BaseRepository {\n\tgetAll(query) {\n\t\treturn this.get(getUrl(`/packages`, query), { offline: true });\n\t}\n};\n//#endregion\n//#region src/lib/server/api/repositories/projects.repository.ts\nvar ProjectRepository = class extends BaseRepository {\n\tgetProject(id) {\n\t\treturn this.get(`/editor/projects/${id}`);\n\t}\n\tgetProjects() {\n\t\treturn this.get(`/projects`);\n\t}\n};\n//#endregion\n//#region src/lib/server/api/repositories/registry.repository.ts\nvar RegistryRepository = class extends BaseRepository {\n\tgetPackage(packageName) {\n\t\treturn this.get(`/registry/${packageName}`, { offline: true });\n\t}\n};\n//#endregion\n//#region src/lib/server/api/client.ts\nvar DEFAULT_API_URL = \"https://api.nanoforge.eu\";\nvar getNoAuthApi = () => {\n\tconst client = new HttpClient(private_env.API_URL ?? DEFAULT_API_URL, { headers: { \"Content-Type\": \"application/json\" } });\n\tconst isOnline = PUBLIC_MODE === \"ONLINE\";\n\treturn {\n\t\tauth: new AuthRepository(client, isOnline),\n\t\tpackages: new PackageRepository(client, isOnline),\n\t\tregistry: new RegistryRepository(client, isOnline)\n\t};\n};\nvar getApi = (cookies) => {\n\tif (!private_env.API_KEY) throw new Error(\"API_KEY is not defined\");\n\tconst client = new HttpClient(private_env.API_URL ?? DEFAULT_API_URL, { headers: {\n\t\t\"Content-Type\": \"application/json\",\n\t\t\"Api-Key\": private_env.API_KEY\n\t} }).useMiddlewares(useTokenMiddleware(cookies));\n\treturn {\n\t\tauth: new AuthRepository(client),\n\t\tpackages: new PackageRepository(client),\n\t\tprojects: new ProjectRepository(client),\n\t\tregistry: new RegistryRepository(client)\n\t};\n};\n//#endregion\n//#region src/lib/server/cli/cli-defaults.ts\nvar CLI_NEW_DEFAULTS = {\n\tpackageManager: \"npm\",\n\tlanguage: \"ts\",\n\tstrict: false,\n\tserver: false,\n\tskipInstall: false,\n\tdocker: false,\n\tgit: false,\n\tgitRemote: false\n};\nvar CLI_INSTALL_DEFAULTS = {};\nvar CLI_BUILD_DEFAULTS = {};\nvar CLI_START_DEFAULTS = {};\nvar CLI_DEV_DEFAULTS = {};\nvar CLI_GENERATE_DEFAULTS = {};\nvar CLI_CREATE_DEFAULTS = {};\n//#endregion\n//#region src/lib/server/cli/cli-error.ts\nvar CliError = class extends Exception {\n\tconstructor(message) {\n\t\tsuper(\"Internal Server Error\", message, 500);\n\t}\n};\n//#endregion\n//#region src/lib/server/cli/cli.ts\nvar Cli = class {\n\t_projectPath;\n\tconstructor(context) {\n\t\tthis._projectPath = context.project?.path;\n\t}\n\tnew(opts, runOpts) {\n\t\treturn this.runCommand(\"new\", [], { ...opts }, CLI_NEW_DEFAULTS, runOpts);\n\t}\n\tinstall(pkgs, opts, runOpts) {\n\t\tthis.assertProject();\n\t\treturn this.runCommand(\"install\", pkgs, {\n\t\t\t...opts,\n\t\t\tdirectory: this._projectPath\n\t\t}, CLI_INSTALL_DEFAULTS, runOpts);\n\t}\n\tbuild(opts, runOpts) {\n\t\tthis.assertProject();\n\t\treturn this.runCommand(\"build\", [], {\n\t\t\t...opts,\n\t\t\tdirectory: this._projectPath\n\t\t}, CLI_BUILD_DEFAULTS, runOpts);\n\t}\n\tstart(opts, runOpts) {\n\t\tthis.assertProject();\n\t\treturn this.runCommand(\"start\", [], {\n\t\t\t...opts,\n\t\t\tdirectory: this._projectPath\n\t\t}, CLI_START_DEFAULTS, runOpts);\n\t}\n\tdev(opts, runOpts) {\n\t\tthis.assertProject();\n\t\treturn this.runCommand(\"dev\", [], {\n\t\t\t...opts,\n\t\t\tdirectory: this._projectPath\n\t\t}, CLI_DEV_DEFAULTS, runOpts);\n\t}\n\tgenerate(opts, runOpts) {\n\t\tthis.assertProject();\n\t\treturn this.runCommand(\"generate\", [], {\n\t\t\t...opts,\n\t\t\tdirectory: this._projectPath\n\t\t}, CLI_GENERATE_DEFAULTS, runOpts);\n\t}\n\tcreate(part, opts, runOpts) {\n\t\tthis.assertProject();\n\t\treturn this.runCommand(\"create\", [part], {\n\t\t\t...opts,\n\t\t\tdirectory: this._projectPath\n\t\t}, CLI_CREATE_DEFAULTS, runOpts);\n\t}\n\trunCommand(command, params, opts, defaultOpts, { async = false } = {}) {\n\t\tconst fullCommand = [\n\t\t\tprivate_env.NF_CLI_PATH ?? \"nf\",\n\t\t\tcommand,\n\t\t\t...params,\n\t\t\t...this.resolveParams(opts, defaultOpts)\n\t\t];\n\t\tif (async) {\n\t\t\tconst res = Bun.spawn(fullCommand, {\n\t\t\t\tstdout: \"pipe\",\n\t\t\t\tstderr: \"pipe\",\n\t\t\t\tcwd: private_env.FS_ROOT ?? void 0\n\t\t\t});\n\t\t\tres.exited.then((exitCode) => {\n\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\tconsole.log(res.stdout.toString());\n\t\t\t\t\tconsole.error(res.stderr.toString());\n\t\t\t\t\tthrow new CliError(res.stderr.toString());\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst res = Bun.spawnSync(fullCommand, {\n\t\t\t\tstdout: \"pipe\",\n\t\t\t\tstderr: \"pipe\",\n\t\t\t\tcwd: private_env.FS_ROOT ?? void 0\n\t\t\t});\n\t\t\tif (res.exitCode !== 0) {\n\t\t\t\tconsole.log(res.stdout.toString());\n\t\t\t\tconsole.error(res.stderr.toString());\n\t\t\t\tthrow new CliError(res.stderr.toString());\n\t\t\t}\n\t\t}\n\t}\n\tmergeParams(...opts) {\n\t\tconst merged = {};\n\t\tfor (const opt of opts) for (const [key, value] of Object.entries(opt)) {\n\t\t\tif (value === void 0) continue;\n\t\t\tmerged[key] = value;\n\t\t}\n\t\treturn merged;\n\t}\n\tresolveParams(opts, defaultOpts) {\n\t\tconst params = [];\n\t\tfor (const [key, value] of Object.entries(this.mergeParams(defaultOpts, opts))) {\n\t\t\tconst name = formatFrom.camel(key).toKebab();\n\t\t\tif (typeof value === \"boolean\") if (value) params.push(`--${name}`);\n\t\t\telse params.push(`--no-${name}`);\n\t\t\telse params.push(`--${name}`, `${value}`);\n\t\t}\n\t\treturn params;\n\t}\n\tassertProject() {\n\t\tif (!this._projectPath) throw new CliError(\"No project path set\");\n\t\tif (!Bun.file(this._projectPath).exists()) throw new CliError(\"Project does not exist\");\n\t}\n};\n//#endregion\n//#region src/lib/server/file-system/file-system.functions.ts\nvar resolveRootPath = (userPath) => {\n\treturn resolve(resolve(private_env.FS_ROOT ?? \"\"), userPath);\n};\nvar resolveArchiveRootPath = () => {\n\treturn resolve(private_env.ARCHIVE_ROOT ?? \"\");\n};\n//#endregion\n//#region src/lib/server/file-system/file-system-error.ts\nvar FileSystemError = class extends Exception {\n\tconstructor(message) {\n\t\tsuper(\"Bad Request\", message, 400);\n\t}\n};\n//#endregion\n//#region src/lib/server/file-system/project-directory.ts\nfunction directoryContentToFileEntries(directoryContent, basePath = \"\") {\n\tconst entries = [];\n\tdirectoryContent.files.forEach((file) => {\n\t\tentries.push(basePath + \"/\" + file);\n\t});\n\tObject.entries(directoryContent.directories).forEach(([path, dirContent]) => {\n\t\tif (!dirContent) return;\n\t\tentries.push(...directoryContentToFileEntries(dirContent, basePath + \"/\" + path));\n\t});\n\treturn entries;\n}\nvar ProjectDirectory = class {\n\tpath;\n\tprojectPath;\n\tconstructor(dirPath, projectPath) {\n\t\tthis.path = resolve(projectPath, \"./\" + dirPath);\n\t\tthis.projectPath = projectPath;\n\t\tthis._checkPathIsInsideProject();\n\t}\n\tread(recursive = false, createIfNotExist = false) {\n\t\tif (createIfNotExist) {\n\t\t\tif (!fs.existsSync(this.path)) this.create();\n\t\t}\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsDir();\n\t\tthis._checkPathIsReadable();\n\t\treturn this._readDirContent(this.path, recursive);\n\t}\n\tcreate(path = this.path) {\n\t\tthis._checkPathNotExists();\n\t\tfs.mkdirSync(path, { recursive: true });\n\t}\n\tdelete(recursive = false) {\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsDir();\n\t\tif (!recursive) this._checkDirIsEmpty();\n\t\tfs.rmSync(this.path, { recursive });\n\t}\n\trename(newPath) {\n\t\tconst absoluteNewDirPath = resolve(this.projectPath, \"./\" + newPath);\n\t\tthis._checkPathIsInsideProject(absoluteNewDirPath);\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsDir();\n\t\tthis._checkPathIsWritable();\n\t\tconst newFolderPath = dirname(absoluteNewDirPath);\n\t\tthis._checkPathExists(newFolderPath);\n\t\tthis._checkPathIsWritable(newFolderPath);\n\t\tthis._checkPathNotExists(absoluteNewDirPath);\n\t\tfs.renameSync(this.path, absoluteNewDirPath);\n\t\tthis.path = absoluteNewDirPath;\n\t}\n\tassertExists() {\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsDir();\n\t\tthis._checkPathIsReadable();\n\t}\n\t_checkPathIsInsideProject(path = this.path) {\n\t\tif (!path.startsWith(this.projectPath)) throw new FileSystemError(`Path ${path} is outside of the project directory`);\n\t}\n\t_checkPathExists(path = this.path) {\n\t\tif (!fs.existsSync(path)) throw new FileSystemError(`Path ${path} should exist`);\n\t}\n\t_checkPathNotExists(path = this.path) {\n\t\tif (fs.existsSync(path)) throw new FileSystemError(`Path ${path} should not exist`);\n\t}\n\t_checkPathIsDir(path = this.path) {\n\t\tlet stats;\n\t\ttry {\n\t\t\tstats = fs.lstatSync(path);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} does not exist`);\n\t\t}\n\t\tif (!stats.isDirectory()) throw new FileSystemError(`Path ${path} is not a directory`);\n\t}\n\t_checkPathIsWritable(path = this.path) {\n\t\ttry {\n\t\t\tfs.accessSync(path, fs.constants.W_OK);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} writable`);\n\t\t}\n\t}\n\t_checkPathIsReadable(path = this.path) {\n\t\ttry {\n\t\t\tfs.accessSync(path, fs.constants.R_OK);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} writable`);\n\t\t}\n\t}\n\t_checkDirIsEmpty(path = this.path) {\n\t\tif (fs.readdirSync(path).length > 0) throw new FileSystemError(`Directory ${path} is not empty`);\n\t}\n\t_readDirContent(path = this.path, recursive = false) {\n\t\tconst dirContent = {\n\t\t\tfiles: [],\n\t\t\tdirectories: {}\n\t\t};\n\t\tfs.readdirSync(path, {\n\t\t\twithFileTypes: true,\n\t\t\trecursive: false\n\t\t}).forEach((item) => {\n\t\t\tif (item.isFile()) dirContent.files.push(item.name);\n\t\t\telse if (item.isDirectory()) dirContent.directories[item.name] = recursive ? this._readDirContent(path + \"/\" + item.name, recursive) : null;\n\t\t});\n\t\treturn dirContent;\n\t}\n};\n//#endregion\n//#region src/lib/server/file-system/archive.ts\nvar archives = /* @__PURE__ */ new Map();\nvar ArchiveSystem = class {\n\thandler;\n\tcontext;\n\t_rootPath;\n\t_sessionId;\n\tconstructor(handler, context) {\n\t\tthis.handler = handler;\n\t\tthis.context = context;\n\t\tthis._sessionId = context.session.id;\n\t\tthis._rootPath = resolveArchiveRootPath();\n\t}\n\tasync create(ignoreFile = \".gitignore\") {\n\t\tconst dir = this.handler.fs.getDirectory(\"\");\n\t\tlet files = directoryContentToFileEntries(dir.read(true)).map((n) => n.startsWith(\"/\") ? n.slice(1) : n);\n\t\ttry {\n\t\t\tconst ignore = await Bun.file(join(dir.path, ignoreFile)).text();\n\t\t\tfiles = micromatch.not(files, ignore.split(\"\\n\").filter(Boolean), {\n\t\t\t\tdot: true,\n\t\t\t\tcontains: true\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.warn(`Could not read ${ignoreFile} file`, e);\n\t\t}\n\t\tconst id = `${this._resolveId()}.tgz`;\n\t\tconst path = join(this._rootPath, id);\n\t\tawait tar.c({\n\t\t\tgzip: true,\n\t\t\tfile: path,\n\t\t\tcwd: dir.path\n\t\t}, files);\n\t\tarchives.set(id, {\n\t\t\tsessionId: this._sessionId,\n\t\t\tpath\n\t\t});\n\t\tsetTimeout(this._delete.bind(this, id), 1e3 * 60 * 15);\n\t\treturn id;\n\t}\n\tasync get(id) {\n\t\tconst archive = archives.get(id);\n\t\tif (!archive) throw new Exception(\"Not Found\", \"Archive not found\", 404);\n\t\tif (archive.sessionId !== this._sessionId) throw new Exception(\"Forbidden\", \"Archive is not yours\", 403);\n\t\treturn Bun.file(archive.path);\n\t}\n\tasync _delete(id) {\n\t\tconst archive = archives.get(id);\n\t\tif (!archive) return;\n\t\ttry {\n\t\t\tawait Bun.file(archive.path).delete();\n\t\t\tarchives.delete(id);\n\t\t} catch (e) {\n\t\t\tconsole.error(\"Could not delete archive\", e);\n\t\t}\n\t}\n\t_resolveId() {\n\t\treturn `${this.context.project.path.split(\"/\").pop() ?? \"unknown\"}-${(/* @__PURE__ */ new Date()).toISOString()}`;\n\t}\n};\n//#endregion\n//#region src/lib/server/file-system/project-file.ts\nvar ProjectFile = class {\n\t_path;\n\tprojectPath;\n\tconstructor(filePath, projectPath) {\n\t\tthis._path = path.resolve(projectPath, \"./\" + filePath);\n\t\tthis.projectPath = projectPath;\n\t\tthis._checkPathIsInsideProject();\n\t}\n\tget path() {\n\t\tthis._checkPathExists();\n\t\treturn this._path;\n\t}\n\tread(encoding) {\n\t\tthis.isReadable();\n\t\treturn fs.readFileSync(this._path).toString(encoding);\n\t}\n\treadStream() {\n\t\tthis.isReadable();\n\t\treturn Bun.file(this._path).stream();\n\t}\n\treadJson() {\n\t\tconst raw = this.read();\n\t\treturn JSON.parse(raw);\n\t}\n\twrite(text) {\n\t\tthis._checkWritableAndCreateFolder();\n\t\tfs.writeFileSync(this._path, text, { flush: true });\n\t}\n\twriteJson(content) {\n\t\tconst raw = JSON.stringify(content);\n\t\tthis.write(raw);\n\t}\n\tgetWriteStream() {\n\t\tthis._checkWritableAndCreateFolder();\n\t\treturn fs.createWriteStream(this._path);\n\t}\n\tdelete() {\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsFile();\n\t\tthis._checkPathIsWritable();\n\t\tfs.rmSync(this._path);\n\t}\n\trename(newPath) {\n\t\tconst absoluteNewPath = path.resolve(this.projectPath, \"./\" + newPath);\n\t\tthis._checkPathIsInsideProject(newPath);\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsFile();\n\t\tthis._checkPathIsWritable();\n\t\tconst newFolderPath = path.dirname(absoluteNewPath);\n\t\tthis._checkPathExists(newFolderPath);\n\t\tthis._checkPathIsWritable(newFolderPath);\n\t\tthis._checkPathNotExists(absoluteNewPath);\n\t\tfs.renameSync(this._path, absoluteNewPath);\n\t\tthis._path = absoluteNewPath;\n\t}\n\tisReadable() {\n\t\tthis._checkPathExists();\n\t\tthis._checkPathIsFile();\n\t\tthis._checkPathIsReadable();\n\t}\n\t_checkWritableAndCreateFolder() {\n\t\tconst folderPath = path.dirname(this._path);\n\t\ttry {\n\t\t\tthis._checkPathExists(folderPath);\n\t\t} catch {\n\t\t\tfs.mkdirSync(folderPath, { recursive: true });\n\t\t}\n\t\tif (fs.existsSync(this._path)) {\n\t\t\tthis._checkPathIsFile();\n\t\t\tthis._checkPathIsWritable();\n\t\t} else {\n\t\t\tthis._checkPathExists(folderPath);\n\t\t\tthis._checkPathIsDir(folderPath);\n\t\t\tthis._checkPathIsWritable(folderPath);\n\t\t}\n\t}\n\t_checkPathIsInsideProject(path = this._path) {\n\t\tif (!path.startsWith(this.projectPath)) throw new FileSystemError(`Path ${path} is outside of the project directory`);\n\t}\n\t_checkPathExists(path = this._path) {\n\t\tif (!fs.existsSync(path)) throw new FileSystemError(`Path ${path} should exist`);\n\t}\n\t_checkPathNotExists(path = this._path) {\n\t\tif (fs.existsSync(path)) throw new FileSystemError(`Path ${path} should not exist`);\n\t}\n\t_checkPathIsFile(path = this._path) {\n\t\tlet stats;\n\t\ttry {\n\t\t\tstats = fs.lstatSync(path);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} does not exist`);\n\t\t}\n\t\tif (!stats.isFile()) throw new FileSystemError(`Path ${path} is not a this.path`);\n\t}\n\t_checkPathIsDir(path = this._path) {\n\t\tlet stats;\n\t\ttry {\n\t\t\tstats = fs.lstatSync(path);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} does not exist`);\n\t\t}\n\t\tif (!stats.isDirectory()) throw new FileSystemError(`Path ${path} is not a directory`);\n\t}\n\t_checkPathIsWritable(path = this._path) {\n\t\ttry {\n\t\t\tfs.accessSync(path, fs.constants.W_OK);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} writable`);\n\t\t}\n\t}\n\t_checkPathIsReadable(path = this._path) {\n\t\ttry {\n\t\t\tfs.accessSync(path, fs.constants.R_OK);\n\t\t} catch {\n\t\t\tthrow new FileSystemError(`Path ${path} writable`);\n\t\t}\n\t}\n};\n//#endregion\n//#region src/lib/server/file-system/file-system.ts\nvar FileSystem = class {\n\t_rootPath;\n\tconstructor(arg) {\n\t\tif (typeof arg === \"string\") {\n\t\t\tthis._rootPath = resolveRootPath(arg);\n\t\t\treturn;\n\t\t}\n\t\tif (!arg.project) throw new Exception(\"Bad Request\", \"Project is not defined\", 400);\n\t\tthis._rootPath = resolveRootPath(arg.project.path);\n\t}\n\tgetDirectory(path) {\n\t\treturn new ProjectDirectory(path, this._rootPath);\n\t}\n\tgetFile(path) {\n\t\treturn new ProjectFile(path, this._rootPath);\n\t}\n};\n//#endregion\n//#region src/lib/server/git/git.ts\nvar Git = class {\n\t_rootPath;\n\t_token;\n\t_path;\n\tconstructor(context) {\n\t\tthis._rootPath = resolve(private_env.FS_ROOT ?? \"\");\n\t\tthis._token = context.project.gateway?.token ?? null;\n\t\tthis._path = context.project.path;\n\t}\n\tasync clone(url) {\n\t\tconst path = await this.resolvePath(url);\n\t\tif (existsSync(path)) return path;\n\t\tif (this._token) url = url.replace(\"https://github.com/\", `https://oauth2:${this._token}@github.com/`);\n\t\tawait this.runCommand(\"clone\", [url, path]);\n\t\treturn path;\n\t}\n\tasync push() {\n\t\tawait this.runCommand(\"add\", [\"--all\"], { path: this._path });\n\t\tif ((await this.runCommand(\"status\", [], { path: this._path })).stdout.includes(\"nothing to commit\")) return;\n\t\tawait this.runCommand(\"commit\", [\"-m\", `nanoforged at ${(/* @__PURE__ */ new Date()).toISOString()}`], { path: this._path });\n\t\tawait this.runCommand(\"push\", [\n\t\t\t\"-u\",\n\t\t\t\"origin\",\n\t\t\t\"main\"\n\t\t], { path: this._path });\n\t}\n\trunCommand(command, params, options) {\n\t\tconst cwd = resolve(this._rootPath, options?.path ?? \"\");\n\t\treturn $`git ${command} ${params}`.cwd(cwd).env({ ...process.env });\n\t}\n\tasync resolvePath(url) {\n\t\tconst basePath = url.split(\"/\").pop()?.replace(\".git\", \"\");\n\t\tif (!basePath) throw new Error(\"Invalid URL\");\n\t\tconst fullBasePath = resolve(this._rootPath, basePath);\n\t\tlet path = fullBasePath;\n\t\twhile (await Bun.file(path).exists()) path = resolve(fullBasePath, generateKey(5));\n\t\treturn path;\n\t}\n};\n//#endregion\n//#region src/lib/server/project/load-project.ts\nvar loadProject = async (projectSession, handler) => {\n\tconst session = await getOrCreateSession(handler.event.locals.session);\n\tconst projectId = tryAddProjectSession(projectSession);\n\taddProjectToSession(session, projectId);\n\thandler.context = {\n\t\t...handler.context,\n\t\tproject: projectSession\n\t};\n\treturn {\n\t\tid: projectId,\n\t\tcacheResolvable: handler.context.online ? projectSession.gateway?.id : projectSession.path\n\t};\n};\nvar loadProjectFromId = async (id, handler) => {\n\tconst session = await getOrCreateSession(handler.event.locals.session);\n\tconst projectSession = getProject(id, session);\n\tif (!projectSession) throw new Exception(\"Bad Request\", \"Project not found\", 400);\n\taddProjectToSession(session, id);\n\thandler.context = {\n\t\t...handler.context,\n\t\tproject: projectSession\n\t};\n\treturn {\n\t\tid,\n\t\tcacheResolvable: handler.context.online ? projectSession.gateway?.id : projectSession.path\n\t};\n};\n//#endregion\n//#region src/lib/server/project/library/library-handler.ts\nvar LibraryHandler = class {\n\thandler;\n\tconstructor(handler) {\n\t\tthis.handler = handler;\n\t}\n\tasync installLibrary(name) {\n\t\tthis.handler._cli.install([name], {\n\t\t\tserver: this.handler._part === \"server\" || void 0,\n\t\t\tlib: true\n\t\t});\n\t\treturn { save: {\n\t\t\tid: this._resolveIdFromName(name),\n\t\t\ttype: \"\",\n\t\t\tname: \"\",\n\t\t\tpath: name\n\t\t} };\n\t}\n\t_resolveIdFromName(name) {\n\t\tconst [org, pkg] = name.split(\"/\");\n\t\tif (!org || !pkg) throw new Error(\"Invalid library name\");\n\t\tconst id = !pkg ? org : pkg;\n\t\treturn `${formatFrom.kebab(id).toCamel()}Library`;\n\t}\n};\n//#endregion\n//#region src/lib/server/project/loader/env.ts\nvar PREFIX_CLIENT = \"NANOFORGE_CLIENT_\";\nvar PREFIX_SERVER = \"NANOFORGE_SERVER_\";\nvar PREFIX = \"NANOFORGE_\";\nvar loadEnv = (path) => {\n\tconst env = {};\n\tconfig({\n\t\tpath,\n\t\tprocessEnv: env\n\t});\n\treturn env;\n};\nvar parseEnv = (part, env) => {\n\tconst partPrefix = part === \"client\" ? PREFIX_CLIENT : PREFIX_SERVER;\n\treturn Object.fromEntries(Object.entries(env).filter(([key]) => key.startsWith(PREFIX) && (part === \"client\" && !key.startsWith(PREFIX_SERVER) || part === \"server\" && !key.startsWith(PREFIX_CLIENT))).map(([key, value]) => [key.replace(new RegExp(`^${partPrefix}|${PREFIX}`), \"\"), value]));\n};\nvar resolveEnv = (part, projectPath) => {\n\treturn parseEnv(part, loadEnv(resolve(projectPath, \".env\")));\n};\n//#endregion\n//#region src/lib/server/project/loader/loader.ts\nvar Loader = class {\n\thandler;\n\t_fs;\n\t_basePath;\n\tconstructor(handler) {\n\t\tthis.handler = handler;\n\t\tthis._basePath = join(this.handler._path, \".nanoforge\", this.handler._part);\n\t\tthis._fs = new FileSystem(this._basePath);\n\t}\n\tgetEnv() {\n\t\treturn resolveEnv(this.handler._part, this.handler._path);\n\t}\n\tgetManifest() {\n\t\treturn {\n\t\t\tversion: \"1.0.0\",\n\t\t\tfiles: directoryContentToFileEntries(this._fs.getDirectory(\".\").read(true)).map((path) => ({ path }))\n\t\t};\n\t}\n\tgetFile(path) {\n\t\treturn this._fs.getFile(path);\n\t}\n};\n//#endregion\n//#region src/lib/server/project/package/package.enum.ts\nvar PackageTypeEnum = /* @__PURE__ */ function(PackageTypeEnum) {\n\tPackageTypeEnum[\"COMPONENT\"] = \"component\";\n\tPackageTypeEnum[\"SYSTEM\"] = \"system\";\n\tPackageTypeEnum[\"ASSET\"] = \"asset\";\n\treturn PackageTypeEnum;\n}({});\n//#endregion\n//#region src/lib/server/project/package/package.const.ts\nvar PACKAGES_PATH = {\n\t[PackageTypeEnum.COMPONENT]: \"components\",\n\t[PackageTypeEnum.SYSTEM]: \"systems\",\n\t[PackageTypeEnum.ASSET]: \"assets\"\n};\nPackageTypeEnum.COMPONENT, PackageTypeEnum.SYSTEM, PackageTypeEnum.ASSET;\nvar PACKAGES_PATH_FORMATTER = {\n\t[PackageTypeEnum.COMPONENT]: (n) => formatFrom.all(n).toKebab() + \".component\",\n\t[PackageTypeEnum.SYSTEM]: (n) => formatFrom.all(n).toKebab() + \".system\",\n\t[PackageTypeEnum.ASSET]: (n) => n\n};\n//#endregion\n//#region src/lib/server/project/package/manifest/manifest-resolver.ts\nvar MANIFEST_TITLES = {\n\t[PackageTypeEnum.COMPONENT]: \"EDITOR_COMPONENT_MANIFEST\",\n\t[PackageTypeEnum.SYSTEM]: \"EDITOR_SYSTEM_MANIFEST\"\n};\nvar findManifestNode = (title, source) => {\n\tlet res = null;\n\tsource.forEachChild((node) => {\n\t\tif (!ts.isVariableStatement(node)) return;\n\t\tnode.declarationList.declarations.forEach((decl) => {\n\t\t\tif (!ts.isVariableDeclaration(decl)) return;\n\t\t\tif (decl.name.getText() === title) res = decl;\n\t\t});\n\t});\n\treturn res;\n};\nvar getName = (source) => {\n\tlet res = null;\n\tsource.forEachChild((node) => {\n\t\tif (!ts.isExportAssignment(node)) return;\n\t\tif (!node.getChildren().some((n) => n.getText() === \"export\") || !node.getChildren().some((n) => n.getText() === \"default\")) return;\n\t\tres = node.expression.getFirstToken()?.getText();\n\t});\n\treturn res;\n};\nvar parseProperty = (prop) => {\n\tif (!ts.isPropertyAssignment(prop)) return {};\n\tconst name = prop.name.getText();\n\tconst value = prop.initializer;\n\tif (!value) return {};\n\treturn { [name]: parseElement(value) };\n};\nvar parseElement = (value) => {\n\tif (ts.isStringLiteral(value)) return value.text;\n\tif (ts.isNumericLiteral(value)) return Number(value.text);\n\tif (ts.isLiteralTypeLiteral(value)) {\n\t\tconst txt = value.getText();\n\t\tif (txt === \"true\") return true;\n\t\tif (txt === \"false\") return false;\n\t\tif (txt === \"null\") return null;\n\t\tif (txt === \"undefined\") return void 0;\n\t}\n\tif (ts.isArrayLiteralExpression(value)) return value.elements.map((el) => parseElement(el));\n\tif (ts.isObjectLiteralExpression(value)) return value.properties.reduce((acc, prop) => {\n\t\treturn {\n\t\t\t...acc,\n\t\t\t...parseProperty(prop)\n\t\t};\n\t}, {});\n\tthrow new Error(\"Unknown element type\");\n};\nvar getManifestFromNode = (source) => {\n\tif (!source) return null;\n\tconst init = source.initializer;\n\tif (!init) return null;\n\tif (!ts.isObjectLiteralExpression(init)) return null;\n\treturn parseElement(init);\n};\nvar parseManifest = (type, source) => {\n\tconst id = getName(source);\n\tconst manifest = getManifestFromNode(findManifestNode(MANIFEST_TITLES[type], source));\n\tif (!id || !manifest) return null;\n\treturn {\n\t\tid,\n\t\ttype,\n\t\t...manifest\n\t};\n};\nvar resolveManifest = (type, content) => {\n\treturn parseManifest(type, ts.createSourceFile(\"tmp.ts\", content, ts.ScriptTarget.ESNext, true));\n};\n//#endregion\n//#region src/lib/server/project/package/manifest/manifest-handler.ts\nvar resolveSave = (type, name, path, manifest) => {\n\tconst base = {\n\t\tname,\n\t\tpath\n\t};\n\tif (type === PackageTypeEnum.SYSTEM) return base;\n\treturn {\n\t\t...base,\n\t\tparamsNames: manifest.params.map(({ name }) => name)\n\t};\n};\nvar ManifestHandler = class {\n\thandler;\n\tconstructor(handler) {\n\t\tthis.handler = handler;\n\t}\n\tresolveFromName(type, rawName) {\n\t\treturn this.resolveFromFilename(type, PACKAGES_PATH_FORMATTER[type](rawName));\n\t}\n\tresolveFromFilename(type, filename) {\n\t\tconst path = join(PACKAGES_PATH[type], filename);\n\t\treturn this.resolveFromPath(type, path);\n\t}\n\tresolveFromPath(type, path) {\n\t\tconst manifest = this._resolveManifest(type, path);\n\t\treturn {\n\t\t\tmanifest,\n\t\t\tsave: resolveSave(type, manifest.id, path, manifest)\n\t\t};\n\t}\n\t_resolveManifest(type, path) {\n\t\treturn this._findPackageManifest((p) => this._getPackageManifest(type, p), path);\n\t}\n\t_getPackageManifest(type, path) {\n\t\treturn resolveManifest(type, this.handler._rootFs.getFile(this._resolvePartPath(path)).read());\n\t}\n\t_findPackageManifest(manifestGetter, path) {\n\t\tconst manifest = [\n\t\t\t\"\",\n\t\t\t\".ts\",\n\t\t\t\".js\"\n\t\t].reduce((result, p) => {\n\t\t\tif (result) return result;\n\t\t\ttry {\n\t\t\t\treturn manifestGetter(path + p);\n\t\t\t} catch (e) {\n\t\t\t\tif (!(e instanceof FileSystemError)) throw e;\n\t\t\t}\n\t\t}, void 0);\n\t\tif (!manifest) throw new FileSystemError(\"Can't find package manifest\");\n\t\treturn manifest;\n\t}\n\t_resolvePartPath(path) {\n\t\treturn join(this.handler._part, path);\n\t}\n};\n//#endregion\n//#region src/lib/server/project/package/package-handler.ts\nvar PackageHandler = class {\n\thandler;\n\tmanifestHandler;\n\tconstructor(handler) {\n\t\tthis.handler = handler;\n\t\tthis.manifestHandler = new ManifestHandler(handler);\n\t}\n\tasync installPackages(names) {\n\t\tif (names.length === 0) return [];\n\t\tthis.handler._cli.install(names, { server: this.handler._part === \"server\" || void 0 });\n\t\treturn Promise.all(names.map(async (name) => {\n\t\t\tconst r = await this.handler._api.registry.getPackage(name);\n\t\t\treturn this._resolvesPackage(r.type, r._file);\n\t\t}));\n\t}\n\tcreateComponent(name) {\n\t\tthis._createPackage(PackageTypeEnum.COMPONENT, name);\n\t\treturn this.manifestHandler.resolveFromName(PackageTypeEnum.COMPONENT, name);\n\t}\n\tcreateSystem(name) {\n\t\tthis._createPackage(PackageTypeEnum.SYSTEM, name);\n\t\treturn this.manifestHandler.resolveFromName(PackageTypeEnum.SYSTEM, name);\n\t}\n\tasync getComponents() {\n\t\treturn this._resolvesPackages(PackageTypeEnum.COMPONENT);\n\t}\n\tasync getSystems() {\n\t\treturn this._resolvesPackages(PackageTypeEnum.SYSTEM);\n\t}\n\tasync getAssets() {\n\t\treturn this._resolvesPackages(PackageTypeEnum.ASSET);\n\t}\n\t_resolvesPackages(type) {\n\t\tconst basePath = PACKAGES_PATH[type];\n\t\tconst content = this.handler.fs.getDirectory(basePath).read(true, true);\n\t\treturn this._resolvesPackageFilesPathFromContent(content).map((path) => this._resolvesPackage(type, path, basePath));\n\t}\n\t_resolvesPackage(type, filename, basePath = PACKAGES_PATH[type]) {\n\t\tconst path = join(basePath, filename);\n\t\tif (type === PackageTypeEnum.ASSET) return { path };\n\t\treturn this.manifestHandler.resolveFromPath(type, path);\n\t}\n\t_resolvesPackageFilesPathFromContent(content, path = \"\") {\n\t\tconst files = content.files.map((file) => join(path, file));\n\t\tconst directories = Object.entries(content.directories).map(([key, value]) => {\n\t\t\tif (!value) return [];\n\t\t\treturn this._resolvesPackageFilesPathFromContent(value, join(path, key)).filter(Boolean);\n\t\t});\n\t\treturn [...files, ...directories.flat()];\n\t}\n\t_createPackage(type, name) {\n\t\tthis.handler._cli.create(type, {\n\t\t\tname,\n\t\t\tserver: this.handler._part === \"server\" || void 0\n\t\t});\n\t}\n};\n//#endregion\n//#region src/lib/server/project/save/save-handler.ts\nvar SaveHandler = class {\n\thandler;\n\tconstructor(handler) {\n\t\tthis.handler = handler;\n\t}\n\tasync getSave() {\n\t\treturn this.handler._rootFs.getFile(this.resolveSavePath()).readJson();\n\t}\n\tasync updateSave(save) {\n\t\tthis.handler._rootFs.getFile(this.resolveSavePath()).writeJson(save);\n\t}\n\tresolveSavePath() {\n\t\treturn `.nanoforge/${this.handler._part}.save.json`;\n\t}\n};\n//#endregion\n//#region src/lib/server/project/project-handler.ts\nvar ProjectHandler = class {\n\t_path;\n\t_part;\n\t_cli;\n\t_api;\n\t_rootFs;\n\t_fs;\n\t_loader;\n\t_save;\n\t_package;\n\t_library;\n\tconstructor(handler, context, part) {\n\t\tif (!context.project) throw new Exception(\"Bad Request\", \"Project missing in context\", 400);\n\t\tthis._path = context.project.path;\n\t\tthis._part = part;\n\t\tthis._cli = handler.cli;\n\t\tthis._api = handler.api;\n\t\tthis._rootFs = handler.fs;\n\t}\n\t/**\n\t* Get the file system of the project content\n\t* This file system has his root at /<client|server>\n\t*/\n\tget fs() {\n\t\tif (!this._fs) this._fs = new FileSystem(join(this._path, this._part));\n\t\treturn this._fs;\n\t}\n\t/**\n\t* Get the loader functions of the project\n\t*/\n\tget loader() {\n\t\tif (!this._loader) this._loader = new Loader(this);\n\t\treturn this._loader;\n\t}\n\tget save() {\n\t\tif (!this._save) this._save = new SaveHandler(this);\n\t\treturn this._save;\n\t}\n\tget package() {\n\t\tif (!this._package) this._package = new PackageHandler(this);\n\t\treturn this._package;\n\t}\n\tget library() {\n\t\tif (!this._library) this._library = new LibraryHandler(this);\n\t\treturn this._library;\n\t}\n};\n//#endregion\n//#region src/lib/server/project/project-manager.ts\nvar ProjectManager = class {\n\t_handler;\n\t_context;\n\t_client;\n\t_server;\n\tconstructor(handler, context) {\n\t\tthis._handler = handler;\n\t\tthis._context = context;\n\t}\n\t/**\n\t* Get the client project handler\n\t* @beta The separation between client and server projects is not the final goal of the project manager.\n\t*/\n\tget client() {\n\t\tif (!this._client) this._client = new ProjectHandler(this._handler, this._context, \"client\");\n\t\treturn this._client;\n\t}\n\t/**\n\t* Get the server project handler\n\t* @beta The separation between client and server projects is not the final goal of the project manager.\n\t*/\n\tget server() {\n\t\tif (!this._server) this._server = new ProjectHandler(this._handler, this._context, \"server\");\n\t\treturn this._server;\n\t}\n};\n//#endregion\n//#region src/lib/server/utils/request-handler/handler.ts\nvar Handler = class {\n\t_context;\n\t_event;\n\t_body;\n\t_apiCache;\n\t_cliCache;\n\t_fsCache;\n\t_gitCache;\n\t_projectCache;\n\t_archiveCache;\n\tconstructor(context, event, body) {\n\t\tthis._context = context;\n\t\tthis._event = event;\n\t\tthis._body = body;\n\t}\n\tget context() {\n\t\treturn this._context;\n\t}\n\tset context(context) {\n\t\tthis._context = context;\n\t\tthis._apiCache = void 0;\n\t\tthis._cliCache = void 0;\n\t\tthis._fsCache = void 0;\n\t\tthis._gitCache = void 0;\n\t\tthis._archiveCache = void 0;\n\t}\n\tget event() {\n\t\treturn this._event;\n\t}\n\tget body() {\n\t\treturn this._body;\n\t}\n\tget api() {\n\t\tif (!this._apiCache) this._apiCache = this._context.online ? getApi(this._event.cookies) : getNoAuthApi();\n\t\treturn this._apiCache;\n\t}\n\tget cli() {\n\t\tif (!this._cliCache) this._cliCache = new Cli(this._context);\n\t\treturn this._cliCache;\n\t}\n\tget fs() {\n\t\tif (!this._fsCache) this._fsCache = new FileSystem(this._context);\n\t\treturn this._fsCache;\n\t}\n\tget git() {\n\t\tif (!this._gitCache) this._gitCache = new Git(this._context);\n\t\treturn this._gitCache;\n\t}\n\tget project() {\n\t\tif (!this._projectCache) this._projectCache = new ProjectManager(this, this._context);\n\t\treturn this._projectCache;\n\t}\n\tget archive() {\n\t\tif (!this._archiveCache) this._archiveCache = new ArchiveSystem(this, this._context);\n\t\treturn this._archiveCache;\n\t}\n};\n//#endregion\n//#region src/lib/server/utils/request-handler/request.policy.ts\nvar DEFAULT_OPTIONS = {\n\tonlineOnly: false,\n\tofflineOnly: false,\n\tprojectOptional: false\n};\nvar assertProject = (context, options) => {\n\tif (options.projectOptional) return;\n\tif (!context.session) throw new Exception(\"Bad Request\", \"No session\", 400);\n\tif (!context.project) throw new Exception(\"Bad Request\", \"Request required a project\", 400);\n\tif (context.online && !context.project.gateway) throw new Exception(\"Internal Server Error\", \"Project don't have gateway on online mode\", 500);\n};\nvar assertMode = (context, options) => {\n\tif (options.onlineOnly && !context.online) throw new Exception(\"Method Not Allowed\", \"This action is not available offline\", 405);\n\tif (options.offlineOnly && context.online) throw new Exception(\"Method Not Allowed\", \"This action is not available online\", 405);\n};\nvar assertRequest = (context, rawOptions) => {\n\tconst options = {\n\t\t...DEFAULT_OPTIONS,\n\t\t...rawOptions\n\t};\n\tassertMode(context, options);\n\tassertProject(context, options);\n};\n//#endregion\n//#region src/lib/server/utils/request-handler/action-handler.ts\nvar handleError$1 = (e) => {\n\tconsole.error(e);\n\tif (e instanceof Exception) return fail(e.status, {\n\t\terror: e.error,\n\t\tmessage: e.message\n\t});\n\treturn fail(500, {\n\t\terror: \"Internal Server Error\",\n\t\tmessage: e.toString()\n\t});\n};\nvar useActionHandler = (callback, options) => {\n\treturn async (event) => {\n\t\ttry {\n\t\t\tconst context = await getContext(event);\n\t\t\tconst body = await parseFormDataBody(await event.request.formData(), options?.body);\n\t\t\tassertRequest(context, options);\n\t\t\treturn await callback(new Handler(context, event, body));\n\t\t} catch (e) {\n\t\t\treturn handleError$1(e);\n\t\t}\n\t};\n};\n//#endregion\n//#region src/lib/server/utils/request-handler/request-handler.ts\nvar handleError = (e) => {\n\tif (e instanceof Exception) return Response.json({\n\t\terror: e.error,\n\t\tmessage: e.message\n\t}, { status: e.status });\n\tconsole.error(e);\n\treturn Response.json({\n\t\terror: \"Internal Server Error\",\n\t\tmessage: e\n\t}, { status: 500 });\n};\nvar useRequestHandler = (callback, options) => {\n\treturn async (event) => {\n\t\ttry {\n\t\t\tconst context = await getContext(event);\n\t\t\tassertRequest(context, options);\n\t\t\treturn await callback(new Handler(context, event, {}));\n\t\t} catch (e) {\n\t\t\treturn handleError(e);\n\t\t}\n\t};\n};\n//#endregion\nexport { Git as a, loadProjectFromId as i, useActionHandler as n, loadProject as r, useRequestHandler as t };\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAI,qBAAqB,SAAS,MAAM;CACvC,OAAO,UAAU,OAAO,YAAY,MAAM,KAAK,QAAQ,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AACtH;AACA,IAAI,YAAY,OAAO,UAAU,MAAM;CACtC,IAAI,CAAC,GAAG,OAAO;CACf,MAAM,SAAS,MAAM,SAAS,gBAAgB,GAAG,UAAU,EAAE,yBAAyB,KAAK,CAAC,CAAC;CAC7F,IAAI,OAAO,SAAS,GAAG,MAAM,IAAI,UAAU,eAAe,mBAAmB,OAAO,SAAS,CAAC,CAAC,QAAQ,MAAM,IAAI,KAAK,GAAG;CACzH,OAAO;AACR;AAGA,IAAI,aAAa,OAAO,UAAU;CACjC,MAAM,UAAU,MAAM,eAAe,MAAM,OAAO,OAAO;CACzD,MAAM,UAAU,eAAe,MAAM,QAAQ,SAAS,OAAO;CAC7D,OAAO;EACN,QAAQ,gBAAgB;EACxB;EACA;CACD;AACD;AAGA,IAAI,UAAU,KAAK,UAAU;CAC5B,MAAM,UAAU,OAAO,QAAQ,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,GAA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;EACtD,SAAS,GAAG;GACX,OAAO,YAAY,CAAC;EACrB;CACD;AACD"}
|
|
@@ -130,7 +130,7 @@ var localeInitiallySet = false;
|
|
|
130
130
|
* in the order they are defined. In SSR contexts, the locale is retrieved from AsyncLocalStorage
|
|
131
131
|
* which is set by the `paraglideMiddleware()`.
|
|
132
132
|
*
|
|
133
|
-
* @see https://
|
|
133
|
+
* @see https://paraglidejs.com/strategy - Configure locale detection strategies
|
|
134
134
|
*
|
|
135
135
|
* @example
|
|
136
136
|
* if (getLocale() === 'de') {
|
|
@@ -155,7 +155,7 @@ var getLocale = () => {
|
|
|
155
155
|
}
|
|
156
156
|
return resolved;
|
|
157
157
|
}
|
|
158
|
-
throw new Error("No locale found. Read the docs https://
|
|
158
|
+
throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
|
|
159
159
|
};
|
|
160
160
|
/**
|
|
161
161
|
* Resolve locale for a given URL using route-aware strategies.
|
|
@@ -166,7 +166,7 @@ var getLocale = () => {
|
|
|
166
166
|
function getLocaleForUrl(url) {
|
|
167
167
|
const resolved = resolveLocaleWithStrategies(getStrategyForUrl(url), typeof url === "string" ? url : url.href);
|
|
168
168
|
if (resolved) return resolved;
|
|
169
|
-
throw new Error("No locale found. Read the docs https://
|
|
169
|
+
throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
172
|
* @param {typeof strategy} strategyToUse
|
|
@@ -206,7 +206,7 @@ function resolveLocaleWithStrategies(strategyToUse, urlForUrlStrategy) {
|
|
|
206
206
|
* If any custom strategy's `setLocale` function is async, then this function
|
|
207
207
|
* will become async as well.
|
|
208
208
|
*
|
|
209
|
-
* @see https://
|
|
209
|
+
* @see https://paraglidejs.com/strategy
|
|
210
210
|
*
|
|
211
211
|
* @example
|
|
212
212
|
* setLocale('en');
|
|
@@ -299,7 +299,7 @@ var extractLocaleFromRequestWithStrategies = (request, strategies, url = request
|
|
|
299
299
|
const matchedLocale = toLocale(locale);
|
|
300
300
|
if (matchedLocale) return matchedLocale;
|
|
301
301
|
}
|
|
302
|
-
throw new Error("No locale found. There is an error in your strategy. Try adding 'baseLocale' as the very last strategy. Read more here https://
|
|
302
|
+
throw new Error("No locale found. There is an error in your strategy. Try adding 'baseLocale' as the very last strategy. Read more here https://paraglidejs.com/errors#no-locale-found");
|
|
303
303
|
};
|
|
304
304
|
/**
|
|
305
305
|
* @param {Request} request
|
|
@@ -427,7 +427,7 @@ function defaultUrlPatternExtractLocale(url) {
|
|
|
427
427
|
* For client-side UI components, use `localizeHref()` instead, which provides
|
|
428
428
|
* a more convenient API with relative paths and automatic locale detection.
|
|
429
429
|
*
|
|
430
|
-
* @see https://
|
|
430
|
+
* @see https://paraglidejs.com/i18n-routing
|
|
431
431
|
*
|
|
432
432
|
* @example
|
|
433
433
|
* ```typescript
|
|
@@ -490,7 +490,7 @@ function localizeUrlDefaultPattern(url, locale) {
|
|
|
490
490
|
* For client-side UI components, use `deLocalizeHref()` instead, which provides
|
|
491
491
|
* a more convenient API with relative paths.
|
|
492
492
|
*
|
|
493
|
-
* @see https://
|
|
493
|
+
* @see https://paraglidejs.com/i18n-routing
|
|
494
494
|
*
|
|
495
495
|
* @example
|
|
496
496
|
* ```typescript
|
|
@@ -560,7 +560,7 @@ function deLocalizeUrlDefaultPattern(url) {
|
|
|
560
560
|
*
|
|
561
561
|
* When called in the browser without arguments, the current `window.location.href` is used.
|
|
562
562
|
*
|
|
563
|
-
* @see https://
|
|
563
|
+
* @see https://paraglidejs.com/i18n-routing#redirects
|
|
564
564
|
*
|
|
565
565
|
* @example
|
|
566
566
|
* // Client side usage (e.g. TanStack Router beforeLoad hook)
|
|
@@ -696,4 +696,4 @@ function isCustomStrategy(strategy) {
|
|
|
696
696
|
//#endregion
|
|
697
697
|
export { serverAsyncLocalStorage as a, overwriteServerAsyncLocalStorage as i, getStrategyForUrl as n, shouldRedirect as o, isExcludedByRouteStrategy as r, deLocalizeUrl as t };
|
|
698
698
|
|
|
699
|
-
//# sourceMappingURL=runtime-
|
|
699
|
+
//# sourceMappingURL=runtime-26c7QsEi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-26c7QsEi.js","names":[],"sources":["../../../.svelte-kit/adapter-bun/chunks/runtime.js"],"sourcesContent":["//#region src/lib/paraglide/runtime.js\n/** @type {any} */\nvar URLPattern = {};\n/**\n* The project's locales that have been specified in the settings.\n*\n* @example\n* if (locales.includes(userSelectedLocale) === false) {\n* throw new Error('Locale is not available');\n* }\n*/\nvar locales = [\"en\", \"fr\"];\n/** @type {string} */\nvar cookieName = \"PARAGLIDE_LOCALE\";\n/**\n* @type {Array<\"cookie\" | \"baseLocale\" | \"globalVariable\" | \"url\" | \"preferredLanguage\" | \"localStorage\" | `custom-${string}`>}\n*/\nvar strategy = [\n\t\"cookie\",\n\t\"globalVariable\",\n\t\"baseLocale\"\n];\n/**\n* Route-level strategy overrides.\n*\n* `match` uses URLPattern syntax.\n*\n* @type {Array<{\n* match: string;\n* strategy?: Array<\"cookie\" | \"baseLocale\" | \"globalVariable\" | \"url\" | \"preferredLanguage\" | \"localStorage\" | `custom-${string}`>;\n* exclude?: boolean;\n* }>}\n*/\nvar routeStrategies = [];\n/** @type {string | undefined} */\nvar cachedRouteStrategyUrl;\n/** @type {{ match: string; strategy?: typeof strategy; exclude?: boolean } | undefined} */\nvar cachedRouteStrategy;\n/**\n* @param {string | URL} url\n* @returns {{ match: string; strategy?: typeof strategy; exclude?: boolean } | undefined}\n*/\nfunction findMatchingRouteStrategy(url) {\n\tif (routeStrategies.length === 0) return;\n\tconst urlString = typeof url === \"string\" ? url : url.href;\n\tif (cachedRouteStrategyUrl === urlString) return cachedRouteStrategy;\n\tconst urlObject = new URL(urlString, \"http://dummy.com\");\n\tlet match;\n\tfor (const routeStrategy of routeStrategies) if (new URLPattern(routeStrategy.match, urlObject.href).exec(urlObject.href)) {\n\t\tmatch = routeStrategy;\n\t\tbreak;\n\t}\n\tcachedRouteStrategyUrl = urlString;\n\tcachedRouteStrategy = match;\n\treturn match;\n}\n/**\n* Returns the strategy to use for a specific URL.\n*\n* If no route strategy matches (or the matching rule is `exclude: true`),\n* the global strategy is returned.\n*\n* @param {string | URL} url\n* @returns {typeof strategy}\n*/\nfunction getStrategyForUrl(url) {\n\tconst routeStrategy = findMatchingRouteStrategy(url);\n\tif (routeStrategy && routeStrategy.exclude !== true && Array.isArray(routeStrategy.strategy)) return routeStrategy.strategy;\n\treturn strategy;\n}\n/**\n* Returns whether the given URL is excluded from middleware i18n processing.\n*\n* @param {string | URL} url\n* @returns {boolean}\n*/\nfunction isExcludedByRouteStrategy(url) {\n\treturn findMatchingRouteStrategy(url)?.exclude === true;\n}\n/**\n* @typedef {{\n* \t\tgetStore(): {\n* \t\tlocale?: Locale,\n* \t\t\torigin?: string,\n* \t\t\tmessageCalls?: Set<string>\n* \t} | undefined,\n* \t\trun: (store: { locale?: Locale, origin?: string, messageCalls?: Set<string>},\n* cb: any) => any\n* }} ParaglideAsyncLocalStorage\n*/\n/**\n* Server side async local storage that is set by `serverMiddleware()`.\n*\n* The variable is used to retrieve the locale and origin in a server-side\n* rendering context without effecting other requests.\n*\n* @type {ParaglideAsyncLocalStorage | undefined}\n*/\nvar serverAsyncLocalStorage = void 0;\n/**\n* Sets the server side async local storage.\n*\n* The function is needed because the `runtime.js` file\n* must define the `serverAsyncLocalStorage` variable to\n* avoid a circular import between `runtime.js` and\n* `server.js` files.\n*\n* @param {ParaglideAsyncLocalStorage | undefined} value\n*/\nfunction overwriteServerAsyncLocalStorage(value) {\n\tserverAsyncLocalStorage = value;\n}\n/** @type {any} */ globalThis.__paraglide = globalThis.__paraglide ?? {};\n/** @type {any} */ globalThis.__paraglide.ssr = globalThis.__paraglide.ssr ?? {};\n/**\n* This is a fallback to get started with a custom\n* strategy and avoid type errors.\n*\n* The implementation is overwritten\n* by `overwriteGetLocale()` and `defineSetLocale()`.\n*\n* @type {Locale | undefined}\n*/\nvar _locale;\nvar localeInitiallySet = false;\n/**\n* Get the current locale.\n*\n* The locale is resolved using your configured strategies (URL, cookie, localStorage, etc.)\n* in the order they are defined. In SSR contexts, the locale is retrieved from AsyncLocalStorage\n* which is set by the `paraglideMiddleware()`.\n*\n* @see https://paraglidejs.com/strategy - Configure locale detection strategies\n*\n* @example\n* if (getLocale() === 'de') {\n* console.log('Germany 🇩🇪');\n* } else if (getLocale() === 'nl') {\n* console.log('Netherlands 🇳🇱');\n* }\n*\n* @returns {Locale} The current locale.\n*/\nvar getLocale = () => {\n\tif (serverAsyncLocalStorage) {\n\t\tconst locale = serverAsyncLocalStorage?.getStore()?.locale;\n\t\tif (locale) return locale;\n\t}\n\tconst resolved = resolveLocaleWithStrategies(strategy, typeof window !== \"undefined\" ? window.location?.href : void 0);\n\tif (resolved) {\n\t\tif (!localeInitiallySet) {\n\t\t\t_locale = resolved;\n\t\t\tlocaleInitiallySet = true;\n\t\t\tsetLocale(resolved, { reload: false });\n\t\t}\n\t\treturn resolved;\n\t}\n\tthrow new Error(\"No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found\");\n};\n/**\n* Resolve locale for a given URL using route-aware strategies.\n*\n* @param {string | URL} url\n* @returns {Locale}\n*/\nfunction getLocaleForUrl(url) {\n\tconst resolved = resolveLocaleWithStrategies(getStrategyForUrl(url), typeof url === \"string\" ? url : url.href);\n\tif (resolved) return resolved;\n\tthrow new Error(\"No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found\");\n}\n/**\n* @param {typeof strategy} strategyToUse\n* @param {string | undefined} urlForUrlStrategy\n* @returns {Locale | undefined}\n*/\nfunction resolveLocaleWithStrategies(strategyToUse, urlForUrlStrategy) {\n\t/** @type {string | undefined} */\n\tlet locale;\n\tfor (const strat of strategyToUse) {\n\t\tif (strat === \"cookie\") locale = extractLocaleFromCookie();\n\t\telse if (strat === \"baseLocale\") locale = \"en\";\n\t\telse if (strat === \"globalVariable\" && _locale !== void 0) locale = _locale;\n\t\telse if (isCustomStrategy(strat) && customClientStrategies.has(strat)) {\n\t\t\tconst handler = customClientStrategies.get(strat);\n\t\t\tif (handler) {\n\t\t\t\tconst result = handler.getLocale();\n\t\t\t\tif (result instanceof Promise) continue;\n\t\t\t\tif (result !== void 0) return assertIsLocale(result);\n\t\t\t}\n\t\t}\n\t\tconst matchedLocale = toLocale(locale);\n\t\tif (matchedLocale) return matchedLocale;\n\t}\n}\n/**\n* @typedef {(newLocale: Locale, options?: { reload?: boolean }) => void | Promise<void>} SetLocaleFn\n*/\n/**\n* Set the locale.\n*\n* Updates the locale using your configured strategies (cookie, localStorage, URL, etc.).\n* By default, this reloads the page on the client to reflect the new locale. Reloading\n* can be disabled by passing `reload: false` as an option, but you'll need to ensure\n* the UI updates to reflect the new locale.\n*\n* If any custom strategy's `setLocale` function is async, then this function\n* will become async as well.\n*\n* @see https://paraglidejs.com/strategy\n*\n* @example\n* setLocale('en');\n*\n* @example\n* setLocale('en', { reload: false });\n*\n* @type {SetLocaleFn}\n*/\nvar setLocale = (newLocale, options) => {\n\t({ ...options });\n\ttry {\n\t\tgetLocale();\n\t} catch {}\n\t/** @type {Array<Promise<void>>} */\n\tconst customSetLocalePromises = [];\n\tlet strategyToUse = strategy;\n\tfor (const strat of strategyToUse) if (strat === \"globalVariable\") _locale = newLocale;\n\telse if (strat === \"cookie\") continue;\n\telse if (strat === \"baseLocale\") continue;\n\telse if (isCustomStrategy(strat) && customClientStrategies.has(strat)) {\n\t\tconst handler = customClientStrategies.get(strat);\n\t\tif (handler) {\n\t\t\tlet result = handler.setLocale(newLocale);\n\t\t\tif (result instanceof Promise) {\n\t\t\t\tresult = result.catch((error) => {\n\t\t\t\t\tthrow new Error(`Custom strategy \"${strat}\" setLocale failed.`, { cause: error });\n\t\t\t\t});\n\t\t\t\tcustomSetLocalePromises.push(result);\n\t\t\t}\n\t\t}\n\t}\n\tif (customSetLocalePromises.length) return Promise.all(customSetLocalePromises).then(() => {});\n};\n/**\n* The origin of the current URL.\n*\n* Defaults to \"http://y.com\" in non-browser environments. If this\n* behavior is not desired, the implementation can be overwritten\n* by `overwriteGetUrlOrigin()`.\n*\n* @type {() => string}\n*/\nvar getUrlOrigin = () => {\n\tif (serverAsyncLocalStorage) return serverAsyncLocalStorage.getStore()?.origin ?? \"http://fallback.com\";\n\telse if (typeof window !== \"undefined\") return window.location.origin;\n\treturn \"http://fallback.com\";\n};\n/**\n* Coerces a locale-like string to the canonical locale value used by the runtime.\n*\n* @param {unknown} value\n* @returns {Locale | undefined}\n*/\nfunction toLocale(value) {\n\tif (typeof value !== \"string\") return;\n\tconst lowerValue = value.toLowerCase();\n\tfor (const locale of locales) if (locale.toLowerCase() === lowerValue) return locale;\n}\n/**\n* Asserts that the input can be normalized to a locale.\n*\n* @param {unknown} input - The input to check.\n* @returns {Locale} The input normalized to a Locale.\n* @throws {Error} If the input is not a locale.\n*/\nfunction assertIsLocale(input) {\n\tconst locale = toLocale(input);\n\tif (locale) return locale;\n\tthrow new Error(`Invalid locale: ${input}. Expected one of: ${locales.join(\", \")}`);\n}\n/**\n* Extracts a locale from a request using the provided strategy order.\n*\n* @param {Request} request\n* @param {typeof strategy} strategies\n* @param {string | URL} [url]\n* @returns {Locale}\n*/\nvar extractLocaleFromRequestWithStrategies = (request, strategies, url = request.url) => {\n\tresolveEffectiveRequestUrl(request, url);\n\t/** @type {string|undefined} */\n\tlet locale;\n\tfor (const strat of strategies) {\n\t\tif (strat === \"cookie\") locale = request.headers.get(\"cookie\")?.split(\"; \").find((c) => c.startsWith(\"PARAGLIDE_LOCALE=\"))?.split(\"=\")[1];\n\t\telse if (strat === \"globalVariable\") locale = _locale;\n\t\telse if (strat === \"baseLocale\") return \"en\";\n\t\telse if (strat === \"localStorage\") continue;\n\t\telse if (isCustomStrategy(strat)) continue;\n\t\tconst matchedLocale = toLocale(locale);\n\t\tif (matchedLocale) return matchedLocale;\n\t}\n\tthrow new Error(\"No locale found. There is an error in your strategy. Try adding 'baseLocale' as the very last strategy. Read more here https://paraglidejs.com/errors#no-locale-found\");\n};\n/**\n* @param {Request} request\n* @param {string | URL | undefined} effectiveRequestUrl\n* @returns {URL}\n*/\nfunction resolveEffectiveRequestUrl(request, effectiveRequestUrl = request.url) {\n\tif (effectiveRequestUrl instanceof URL) return new URL(effectiveRequestUrl.href);\n\treturn new URL(effectiveRequestUrl, request.url);\n}\n/**\n* Asynchronously extracts a locale from a request.\n*\n* This function supports async custom server strategies, unlike the synchronous\n* `extractLocaleFromRequest`. Use this function when you have custom server strategies\n* that need to perform asynchronous operations (like database calls) in their getLocale method.\n*\n* The function first processes any custom server strategies asynchronously, then falls back\n* to the synchronous `extractLocaleFromRequest` for all other strategies.\n*\n* @see {@link https://github.com/opral/inlang-paraglide-js/issues/527#issuecomment-2978151022}\n*\n* @example\n* // Basic usage\n* const locale = await extractLocaleFromRequestAsync(request);\n*\n* @example\n* // With custom async server strategy\n* defineCustomServerStrategy(\"custom-database\", {\n* getLocale: async (request) => {\n* const userId = extractUserIdFromRequest(request);\n* return await getUserLocaleFromDatabase(userId);\n* }\n* });\n*\n* const locale = await extractLocaleFromRequestAsync(request);\n*\n* @param {Request} request - The request object to extract the locale from.\n* @param {{ effectiveRequestUrl?: string | URL }} [options] - Effective request URL to use for route matching and locale detection with the URL strategy.\n* @returns {Promise<Locale>} The extracted locale.\n*/\nvar extractLocaleFromRequestAsync = async (request, options = {}) => {\n\t/** @type {string|undefined} */\n\tlet locale;\n\tconst effectiveRequestUrl = resolveEffectiveRequestUrlFromRequestAsync(request, options.effectiveRequestUrl);\n\tconst strategy = getStrategyForUrl(effectiveRequestUrl);\n\tfor (const strat of strategy) if (isCustomStrategy(strat) && customServerStrategies.has(strat)) {\n\t\tconst handler = customServerStrategies.get(strat);\n\t\tif (handler)\n /** @type {string|undefined} */\n\t\tlocale = await handler.getLocale(request);\n\t\tconst matchedLocale = toLocale(locale);\n\t\tif (matchedLocale) return matchedLocale;\n\t}\n\treturn extractLocaleFromRequestWithStrategies(request, strategy, effectiveRequestUrl);\n};\n/**\n* @param {Request} request\n* @param {string | URL | undefined} effectiveRequestUrl\n* @returns {URL}\n*/\nfunction resolveEffectiveRequestUrlFromRequestAsync(request, effectiveRequestUrl = request.url) {\n\tif (effectiveRequestUrl instanceof URL) return new URL(effectiveRequestUrl.href);\n\treturn new URL(effectiveRequestUrl, request.url);\n}\n/**\n* Extracts a cookie from the document.\n*\n* Will return undefined if the document is not available or if the cookie is not set.\n* The `document` object is not available in server-side rendering, so this function should not be called in that context.\n*\n* @returns {Locale | undefined}\n*/\nfunction extractLocaleFromCookie() {\n\tif (typeof document === \"undefined\" || !document.cookie) return;\n\tconst locale = document.cookie.match(new RegExp(`(^| )${cookieName}=([^;]+)`))?.[2];\n\treturn toLocale(locale);\n}\n/**\n* If extractLocaleFromUrl is called many times on the same page and the URL\n* hasn't changed, we don't need to recompute it every time which can get expensive.\n* We might use a LRU cache if needed, but for now storing only the last result is enough.\n* https://github.com/opral/monorepo/pull/3575#discussion_r2066731243\n*/\n/** @type {string|undefined} */\nvar cachedUrl;\n/** @type {Locale|undefined} */\nvar cachedLocale;\n/**\n* Extracts the locale from a given URL using native URLPattern.\n*\n* The built-in default `/:locale/...` routing is case-insensitive because it\n* canonicalizes the first path segment with `toLocale()`. Custom `urlPatterns`\n* keep URLPattern's normal exact matching semantics for path segments.\n*\n* @param {URL|string} url - The full URL from which to extract the locale.\n* @returns {Locale|undefined} The extracted locale, or undefined if no locale is found.\n*/\nfunction extractLocaleFromUrl(url) {\n\tconst urlString = typeof url === \"string\" ? url : url.href;\n\tif (cachedUrl === urlString) return cachedLocale;\n\t/** @type {Locale | undefined} */\n\tlet result;\n\tresult = defaultUrlPatternExtractLocale(url);\n\tcachedUrl = urlString;\n\tcachedLocale = result;\n\treturn result;\n}\n/**\n* https://github.com/opral/inlang-paraglide-js/issues/381\n*\n* @param {URL | string} url - The full URL from which to extract the locale.\n* @returns {Locale | undefined} The extracted locale, or undefined if no locale is found.\n*/\nfunction defaultUrlPatternExtractLocale(url) {\n\treturn toLocale(new URL(url, \"http://dummy.com\").pathname.split(\"/\").filter(Boolean)[0]) || \"en\";\n}\n/**\n* Lower-level URL localization function, primarily used in server contexts.\n*\n* This function is designed for server-side usage where you need precise control\n* over URL localization, such as in middleware or request handlers. It works with\n* URL objects and always returns absolute URLs.\n*\n* For client-side UI components, use `localizeHref()` instead, which provides\n* a more convenient API with relative paths and automatic locale detection.\n*\n* @see https://paraglidejs.com/i18n-routing\n*\n* @example\n* ```typescript\n* // Server middleware example\n* app.use((req, res, next) => {\n* const url = new URL(req.url, `${req.protocol}://${req.headers.host}`);\n* const localized = localizeUrl(url, { locale: \"de\" });\n*\n* if (localized.href !== url.href) {\n* return res.redirect(localized.href);\n* }\n* next();\n* });\n* ```\n*\n* @example\n* ```typescript\n* // Using with URL patterns\n* const url = new URL(\"https://example.com/about\");\n* localizeUrl(url, { locale: \"de\" });\n* // => URL(\"https://example.com/de/about\")\n*\n* // Using with domain-based localization\n* const url = new URL(\"https://example.com/store\");\n* localizeUrl(url, { locale: \"de\" });\n* // => URL(\"https://de.example.com/store\")\n* ```\n*\n* @param {string | URL} url - The URL to localize. If string, must be absolute.\n* @param {object} [options] - Options for localization\n* @param {Locale} [options.locale] - Target locale. If not provided, uses getLocale()\n* @returns {URL} The localized URL, always absolute\n*/\nfunction localizeUrl(url, options) {\n\treturn localizeUrlDefaultPattern(url, options?.locale ? assertIsLocale(options?.locale) : getLocale());\n}\n/**\n* https://github.com/opral/inlang-paraglide-js/issues/381\n*\n* @param {string | URL} url\n* @param {Locale} locale\n* @returns {URL}\n*/\nfunction localizeUrlDefaultPattern(url, locale) {\n\tconst urlObj = typeof url === \"string\" ? new URL(url, getUrlOrigin()) : new URL(url);\n\tif (extractLocaleFromUrl(urlObj) === locale) return urlObj;\n\tconst pathSegments = urlObj.pathname.split(\"/\").filter(Boolean);\n\tif (pathSegments.length > 0 && toLocale(pathSegments[0])) pathSegments.shift();\n\tif (locale === \"en\") urlObj.pathname = \"/\" + pathSegments.join(\"/\");\n\telse urlObj.pathname = \"/\" + locale + \"/\" + pathSegments.join(\"/\");\n\treturn urlObj;\n}\n/**\n* Low-level URL de-localization function, primarily used in server contexts.\n*\n* This function is designed for server-side usage where you need precise control\n* over URL de-localization, such as in middleware or request handlers. It works with\n* URL objects and always returns absolute URLs.\n*\n* For client-side UI components, use `deLocalizeHref()` instead, which provides\n* a more convenient API with relative paths.\n*\n* @see https://paraglidejs.com/i18n-routing\n*\n* @example\n* ```typescript\n* // Server middleware example\n* app.use((req, res, next) => {\n* const url = new URL(req.url, `${req.protocol}://${req.headers.host}`);\n* const baseUrl = deLocalizeUrl(url);\n*\n* // Store the base URL for later use\n* req.baseUrl = baseUrl;\n* next();\n* });\n* ```\n*\n* @example\n* ```typescript\n* // Using with URL patterns\n* const url = new URL(\"https://example.com/de/about\");\n* deLocalizeUrl(url); // => URL(\"https://example.com/about\")\n*\n* // Using with domain-based localization\n* const url = new URL(\"https://de.example.com/store\");\n* deLocalizeUrl(url); // => URL(\"https://example.com/store\")\n* ```\n*\n* @param {string | URL} url - The URL to de-localize. If string, must be absolute.\n* @returns {URL} The de-localized URL, always absolute\n*/\nfunction deLocalizeUrl(url) {\n\treturn deLocalizeUrlDefaultPattern(url);\n}\n/**\n* De-localizes a URL using the default pattern (/:locale/*)\n* @param {string|URL} url\n* @returns {URL}\n*/\nfunction deLocalizeUrlDefaultPattern(url) {\n\tconst urlObj = typeof url === \"string\" ? new URL(url, getUrlOrigin()) : new URL(url);\n\tconst pathSegments = urlObj.pathname.split(\"/\").filter(Boolean);\n\tif (pathSegments.length > 0 && toLocale(pathSegments[0])) urlObj.pathname = \"/\" + pathSegments.slice(1).join(\"/\");\n\treturn urlObj;\n}\n/**\n* @typedef {object} ShouldRedirectServerInput\n* @property {Request} request\n* @property {string | URL} [effectiveRequestUrl] - Effective request URL to use for route matching, locale detection with the URL strategy, and redirect targets.\n* @property {Locale} [locale]\n*\n* @typedef {object} ShouldRedirectClientInput\n* @property {undefined} [request]\n* @property {string | URL} [url]\n* @property {Locale} [locale]\n*\n* @typedef {ShouldRedirectServerInput | ShouldRedirectClientInput} ShouldRedirectInput\n*\n* @typedef {object} ShouldRedirectResult\n* @property {boolean} shouldRedirect - Indicates whether the consumer should perform a redirect.\n* @property {Locale} locale - Locale resolved using the configured strategies.\n* @property {URL | undefined} redirectUrl - Destination URL when a redirect is required.\n*/\n/**\n* Determines whether a redirect is required to align the current URL with the active locale.\n*\n* This helper mirrors the logic that powers `paraglideMiddleware`, but works in both server\n* and client environments. It evaluates the configured strategies in order, computes the\n* canonical localized URL, and reports when the current URL does not match.\n*\n* When called in the browser without arguments, the current `window.location.href` is used.\n*\n* @see https://paraglidejs.com/i18n-routing#redirects\n*\n* @example\n* // Client side usage (e.g. TanStack Router beforeLoad hook)\n* async function beforeLoad({ location }) {\n* const decision = await shouldRedirect({ url: location.href });\n*\n* if (decision.shouldRedirect) {\n* throw redirect({ to: decision.redirectUrl.href });\n* }\n* }\n*\n* @example\n* // Server side usage with a Request\n* export async function handle(request) {\n* const decision = await shouldRedirect({ request });\n*\n* if (decision.shouldRedirect) {\n* return Response.redirect(decision.redirectUrl, 307);\n* }\n*\n* return render(request, decision.locale);\n* }\n*\n* @example\n* // Server side usage behind a proxy where request.url is not public-facing\n* export async function handle(request) {\n* const effectiveRequestUrl = new URL(request.url);\n* effectiveRequestUrl.protocol = \"https:\";\n* effectiveRequestUrl.host = \"example.com\";\n*\n* const decision = await shouldRedirect({\n* request,\n* effectiveRequestUrl,\n* });\n*\n* if (decision.shouldRedirect) {\n* return Response.redirect(decision.redirectUrl, 307);\n* }\n* }\n*\n* @param {ShouldRedirectInput} [input]\n* @returns {Promise<ShouldRedirectResult>}\n*/\nasync function shouldRedirect(input = {}) {\n\tconst currentUrl = resolveUrl(input);\n\tconst locale = await resolveLocale(input, currentUrl);\n\tconst strategy = getStrategyForUrl(currentUrl.href);\n\tif (isExcludedByRouteStrategy(currentUrl.href) || !strategy.includes(\"url\")) return {\n\t\tshouldRedirect: false,\n\t\tlocale,\n\t\tredirectUrl: void 0\n\t};\n\tconst localizedUrl = localizeUrl(currentUrl.href, { locale });\n\tconst shouldRedirectToLocalizedUrl = normalizeUrl(localizedUrl.href) !== normalizeUrl(currentUrl.href);\n\treturn {\n\t\tshouldRedirect: shouldRedirectToLocalizedUrl,\n\t\tlocale,\n\t\tredirectUrl: shouldRedirectToLocalizedUrl ? localizedUrl : void 0\n\t};\n}\n/**\n* Resolves the locale either from the provided input or by using the configured strategies.\n*\n* @param {ShouldRedirectInput} input\n* @param {URL} currentUrl\n* @returns {Promise<Locale>}\n*/\nasync function resolveLocale(input, currentUrl) {\n\tconst locale = toLocale(input.locale);\n\tif (locale) return locale;\n\tif (input.request) return extractLocaleFromRequestAsync(input.request, { effectiveRequestUrl: currentUrl });\n\tif (\"url\" in input && typeof input.url !== \"undefined\") return getLocaleForUrl(currentUrl.href);\n\treturn getLocale();\n}\n/**\n* Resolves the current URL from the provided input or runtime context.\n*\n* @param {ShouldRedirectInput} input\n* @returns {URL}\n*/\nfunction resolveUrl(input) {\n\tif (\"effectiveRequestUrl\" in input && input.effectiveRequestUrl instanceof URL) return new URL(input.effectiveRequestUrl.href);\n\tif (\"effectiveRequestUrl\" in input && typeof input.effectiveRequestUrl === \"string\") return new URL(input.effectiveRequestUrl, input.request ? input.request.url : getUrlOrigin());\n\tif (input.request) return new URL(input.request.url);\n\tif (\"url\" in input && input.url instanceof URL) return new URL(input.url.href);\n\tif (\"url\" in input && typeof input.url === \"string\") return new URL(input.url, getUrlOrigin());\n\tif (typeof window !== \"undefined\" && window?.location?.href) return new URL(window.location.href);\n\tthrow new Error(\"shouldRedirect() requires either a request, an absolute URL, or must run in a browser environment.\");\n}\n/**\n* Normalize url for comparison by stripping the trailing slash.\n*\n* @param {string} url\n* @returns {string}\n*/\nfunction normalizeUrl(url) {\n\tconst urlObj = new URL(url);\n\turlObj.pathname = urlObj.pathname.replace(/\\/$/, \"\");\n\treturn urlObj.href;\n}\n/**\n* @typedef {\"cookie\" | \"baseLocale\" | \"globalVariable\" | \"url\" | \"preferredLanguage\" | \"localStorage\"} BuiltInStrategy\n*/\n/**\n* @typedef {`custom_${string}`} CustomStrategy\n*/\n/**\n* @typedef {BuiltInStrategy | CustomStrategy} Strategy\n*/\n/**\n* @typedef {Array<Strategy>} Strategies\n*/\n/**\n* @typedef {{ getLocale: (request?: Request) => Promise<string | undefined> | (string | undefined) }} CustomServerStrategyHandler\n*/\n/**\n* @typedef {{ getLocale: () => Promise<string|undefined> | (string | undefined), setLocale: (locale: string) => Promise<void> | void }} CustomClientStrategyHandler\n*/\n/** @type {Map<string, CustomServerStrategyHandler>} */\nvar customServerStrategies = /* @__PURE__ */ new Map();\n/** @type {Map<string, CustomClientStrategyHandler>} */\nvar customClientStrategies = /* @__PURE__ */ new Map();\n/**\n* Checks if the given strategy is a custom strategy.\n*\n* @param {unknown} strategy The name of the custom strategy to validate.\n* Must be a string that starts with \"custom-\" followed by alphanumeric characters, hyphens, or underscores.\n* @returns {boolean} Returns true if it is a custom strategy, false otherwise.\n*/\nfunction isCustomStrategy(strategy) {\n\treturn typeof strategy === \"string\" && /^custom-[A-Za-z0-9_-]+$/.test(strategy);\n}\n/**\n* A locale that is available in the project.\n*\n* @example\n* setLocale(request.locale as Locale)\n*\n* @typedef {typeof locales[number]} Locale\n*/\n/**\n* A branded type representing a localized string.\n*\n* Message functions return this type instead of \\`string\\`, enabling TypeScript\n* to distinguish translated strings from regular strings at compile time.\n* This allows you to enforce that only properly localized content is used\n* in your UI components.\n*\n* Since \\`LocalizedString\\` is a branded subtype of \\`string\\`, it remains fully\n* backward compatible—you can pass it anywhere a \\`string\\` is expected.\n*\n* @example\n* // Enforce localized strings in your components\n* function PageTitle(props: { title: LocalizedString }) {\n* return <h1>{props.title}</h1>\n* }\n*\n* // ✅ Correct: using a message function\n* <PageTitle title={m.welcome_title()} />\n*\n* // ❌ Type error: raw strings are not LocalizedString\n* <PageTitle title=\"Welcome\" />\n*\n* @example\n* // LocalizedString is assignable to string (backward compatible)\n* const localized: LocalizedString = m.greeting()\n* const str: string = localized // ✅ works fine\n*\n* // But string is not assignable to LocalizedString\n* const raw: LocalizedString = \"Hello\" // ❌ Type error\n*\n* @example\n* // Catches accidental string concatenation\n* function showMessage(msg: LocalizedString) { ... }\n*\n* showMessage(m.hello()) // ✅\n* showMessage(\"Hello \" + userName) // ❌ Type error\n* showMessage(m.hello_user({ name: userName })) // ✅ use params instead\n*\n* @typedef {string & { readonly __brand: 'LocalizedString' }} LocalizedString\n*/\n/**\n* A single markup option passed to a tag instance.\n*\n* @typedef {{\n* name: string;\n* value: unknown;\n* }} MessageMarkupOption\n*/\n/**\n* A single static markup attribute attached to a tag instance.\n*\n* @typedef {{\n* name: string;\n* value: string | true;\n* }} MessageMarkupAttribute\n*/\n/**\n* Record of markup options for a tag instance.\n*\n* @typedef {Record<string, unknown>} MessageMarkupOptions\n*/\n/**\n* Record of markup attributes for a tag instance.\n*\n* @typedef {Record<string, string | true>} MessageMarkupAttributes\n*/\n/**\n* Type-level schema for a single markup tag.\n*\n* @typedef {{\n* options: MessageMarkupOptions;\n* attributes: MessageMarkupAttributes;\n* children: boolean;\n* }} MessageMarkupTag\n*/\n/**\n* Type-level schema for all markup tags in a message.\n*\n* @typedef {Record<string, MessageMarkupTag>} MessageMarkupSchema\n*/\n/**\n* Type-only metadata attached to compiled message functions.\n*\n* @template Inputs\n* @template Options\n* @template {MessageMarkupSchema} [Markup = MessageMarkupSchema]\n* @typedef {{\n* readonly __paraglide?: {\n* inputs: Inputs;\n* options: Options;\n* markup: Markup;\n* };\n* }} MessageMetadata\n*/\n/**\n* A compiled, framework-neutral message part.\n*\n* @typedef {{\n* type: \"text\";\n* value: string;\n* } | {\n* type: \"markup-start\";\n* name: string;\n* options: MessageMarkupOptions;\n* attributes: MessageMarkupAttributes;\n* } | {\n* type: \"markup-end\";\n* name: string;\n* options: MessageMarkupOptions;\n* attributes: MessageMarkupAttributes;\n* } | {\n* type: \"markup-standalone\";\n* name: string;\n* options: MessageMarkupOptions;\n* attributes: MessageMarkupAttributes;\n* }} MessagePart\n*/\n/**\n* A message function is a message for a specific locale.\n*\n* @example\n* m.hello({ name: 'world' })\n*\n* @typedef {(inputs?: Record<string, never>) => LocalizedString} MessageFunction\n*/\n/**\n* A message bundle function that selects the message to be returned.\n*\n* Uses `getLocale()` under the hood to determine the locale with an option.\n*\n* @template {string} T\n*\n* @example\n* * m.hello({ name: 'world' }, { locale: \"en\" })\n*\n* @typedef {(params: Record<string, never>, options: { locale: T }) => LocalizedString} MessageBundleFunction\n*/\n//#endregion\nexport { serverAsyncLocalStorage as a, overwriteServerAsyncLocalStorage as i, getStrategyForUrl as n, shouldRedirect as o, isExcludedByRouteStrategy as r, deLocalizeUrl as t };\n"],"mappings":";;AAEA,IAAI,aAAa,CAAC;;;;;;;;;AASlB,IAAI,UAAU,CAAC,MAAM,IAAI;;AAEzB,IAAI,aAAa;;;;AAIjB,IAAI,WAAW;CACd;CACA;CACA;AACD;;;;;;;;;;;;AAYA,IAAI,kBAAkB,CAAC;;AAEvB,IAAI;;AAEJ,IAAI;;;;;AAKJ,SAAS,0BAA0B,KAAK;CACvC,IAAI,gBAAgB,WAAW,GAAG;CAClC,MAAM,YAAY,OAAO,QAAQ,WAAW,MAAM,IAAI;CACtD,IAAI,2BAA2B,WAAW,OAAO;CACjD,MAAM,YAAY,IAAI,IAAI,WAAW,kBAAkB;CACvD,IAAI;CACJ,KAAK,MAAM,iBAAiB,iBAAiB,IAAI,IAAI,WAAW,cAAc,OAAO,UAAU,IAAI,CAAC,CAAC,KAAK,UAAU,IAAI,GAAG;EAC1H,QAAQ;EACR;CACD;CACA,yBAAyB;CACzB,sBAAsB;CACtB,OAAO;AACR;;;;;;;;;;AAUA,SAAS,kBAAkB,KAAK;CAC/B,MAAM,gBAAgB,0BAA0B,GAAG;CACnD,IAAI,iBAAiB,cAAc,YAAY,QAAQ,MAAM,QAAQ,cAAc,QAAQ,GAAG,OAAO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