@phosart/devtool 0.2.68 → 0.3.1
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/build/client/editor/_app/immutable/assets/0.Ux16ViYx.css +1 -0
- package/build/client/editor/_app/immutable/assets/0.Ux16ViYx.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/0.Ux16ViYx.css.gz +0 -0
- package/build/client/editor/_app/immutable/assets/2.CQw26kp3.css +1 -0
- package/build/client/editor/_app/immutable/assets/2.CQw26kp3.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/2.CQw26kp3.css.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DEkLMHay.js → 2_fpIYfw.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/2_fpIYfw.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/2_fpIYfw.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{BmPG8j70.js → 4hIBzQ4_.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/4hIBzQ4_.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/4hIBzQ4_.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Dvj4DoMA.js → 6M6_Jaku.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/6M6_Jaku.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/6M6_Jaku.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/8TREzT-B.js +12 -0
- package/build/client/editor/_app/immutable/chunks/8TREzT-B.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/8TREzT-B.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{BNV8aWpA.js → B8dptkxa.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/B8dptkxa.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/B8dptkxa.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{wabKUHyo.js → BD8Rif0F.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BD8Rif0F.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BD8Rif0F.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BIHqivCG.js +1 -0
- package/build/client/editor/_app/immutable/chunks/BIHqivCG.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BIHqivCG.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BIdfFg4-.js +5 -0
- package/build/client/editor/_app/immutable/chunks/BIdfFg4-.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BIdfFg4-.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{C1cA1OFW.js → BM8aeisk.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/BM8aeisk.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BM8aeisk.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DDbagcfB.js → Bg7QG-lR.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/Bg7QG-lR.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Bg7QG-lR.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BhQfJa_w.js +1 -0
- package/build/client/editor/_app/immutable/chunks/BhQfJa_w.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BhQfJa_w.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C-A59nkV.js +2 -0
- package/build/client/editor/_app/immutable/chunks/C-A59nkV.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C-A59nkV.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C7nBEHTj.js +1 -0
- package/build/client/editor/_app/immutable/chunks/C7nBEHTj.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C7nBEHTj.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{BOWzgE0W.js → CHz30aZi.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/CHz30aZi.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CHz30aZi.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Dod547Wj.js → CIJYBsz7.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/CIJYBsz7.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CIJYBsz7.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CV1fs7J7.js +1 -0
- package/build/client/editor/_app/immutable/chunks/CV1fs7J7.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CV1fs7J7.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{FsbNKlUV.js → C_1cFU8t.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/C_1cFU8t.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C_1cFU8t.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CaJQZkse.js +1 -0
- package/build/client/editor/_app/immutable/chunks/CaJQZkse.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CaJQZkse.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{MTeUycsA.js → Chzdb0MJ.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/Chzdb0MJ.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Chzdb0MJ.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CjXc7KEq.js +1 -0
- package/build/client/editor/_app/immutable/chunks/CjXc7KEq.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CjXc7KEq.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{Clqpx6Fc.js → Cpl1xZcR.js} +3 -3
- package/build/client/editor/_app/immutable/chunks/Cpl1xZcR.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Cpl1xZcR.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CrkuL1u2.js +1 -0
- package/build/client/editor/_app/immutable/chunks/CrkuL1u2.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CrkuL1u2.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/D8MhBRSN.js +2 -0
- package/build/client/editor/_app/immutable/chunks/D8MhBRSN.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/D8MhBRSN.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DiGEiffF.js → DBso62O3.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DBso62O3.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DBso62O3.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{DhhrKZdn.js → DGf07soP.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DGf07soP.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DGf07soP.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DJ1Za4em.js +3 -0
- package/build/client/editor/_app/immutable/chunks/DJ1Za4em.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DJ1Za4em.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DJ9rCH37.js +22 -0
- package/build/client/editor/_app/immutable/chunks/DJ9rCH37.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DJ9rCH37.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DPUojd5V.js +1 -0
- package/build/client/editor/_app/immutable/chunks/DPUojd5V.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DPUojd5V.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{ysghqVTL.js → DbXE2WOu.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DbXE2WOu.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DbXE2WOu.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Djxk28NE.js +1 -0
- package/build/client/editor/_app/immutable/chunks/Djxk28NE.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Djxk28NE.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{BFbS_uKR.js → DrZfFIG4.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DrZfFIG4.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DrZfFIG4.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DuCpCuua.js +1 -0
- package/build/client/editor/_app/immutable/chunks/DuCpCuua.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DuCpCuua.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{CzKyBacq.js → DwuiomVV.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/DwuiomVV.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DwuiomVV.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Ve_50TjN.js +1 -0
- package/build/client/editor/_app/immutable/chunks/Ve_50TjN.js.br +2 -0
- package/build/client/editor/_app/immutable/chunks/Ve_50TjN.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/cuFCaUMD.js +1 -0
- package/build/client/editor/_app/immutable/chunks/cuFCaUMD.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/cuFCaUMD.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/eVS6w3pG.js +1 -0
- package/build/client/editor/_app/immutable/chunks/eVS6w3pG.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/eVS6w3pG.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/{CpKCa_gu.js → gJYnYvRf.js} +1 -1
- package/build/client/editor/_app/immutable/chunks/gJYnYvRf.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/gJYnYvRf.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/app.CgbGc-Y_.js +2 -0
- package/build/client/editor/_app/immutable/entry/app.CgbGc-Y_.js.br +0 -0
- package/build/client/editor/_app/immutable/entry/app.CgbGc-Y_.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/start.CO98WaLr.js +1 -0
- package/build/client/editor/_app/immutable/entry/start.CO98WaLr.js.br +2 -0
- package/build/client/editor/_app/immutable/entry/start.CO98WaLr.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/0.BQ4Xqjt4.js +1 -0
- package/build/client/editor/_app/immutable/nodes/0.BQ4Xqjt4.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/0.BQ4Xqjt4.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/1.BWGDHROd.js +1 -0
- package/build/client/editor/_app/immutable/nodes/1.BWGDHROd.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/1.BWGDHROd.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/2.DcKdvVu1.js +1 -0
- package/build/client/editor/_app/immutable/nodes/2.DcKdvVu1.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/2.DcKdvVu1.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/3.Ca3Dqd01.js +1 -0
- package/build/client/editor/_app/immutable/nodes/3.Ca3Dqd01.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/3.Ca3Dqd01.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/4.AVfHQX0d.js +37 -0
- package/build/client/editor/_app/immutable/nodes/4.AVfHQX0d.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/4.AVfHQX0d.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/5.nbQ2yM0G.js +1 -0
- package/build/client/editor/_app/immutable/nodes/5.nbQ2yM0G.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/5.nbQ2yM0G.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/6.DH1OYxdG.js +1 -0
- package/build/client/editor/_app/immutable/nodes/6.DH1OYxdG.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/6.DH1OYxdG.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/7.CAo4BWhz.js +1 -0
- package/build/client/editor/_app/immutable/nodes/7.CAo4BWhz.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/7.CAo4BWhz.js.gz +0 -0
- package/build/client/editor/_app/version.json +1 -1
- package/build/client/editor/_app/version.json.br +0 -0
- package/build/client/editor/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-BSK5opGv.js → 0-Koo6rmbv.js} +9 -8
- package/build/server/chunks/0-Koo6rmbv.js.map +1 -0
- package/build/server/chunks/1-B0Thkyus.js +9 -0
- package/build/server/chunks/1-B0Thkyus.js.map +1 -0
- package/build/server/chunks/{2-CXVg5EDG.js → 2-DHw7kcFW.js} +9 -8
- package/build/server/chunks/2-DHw7kcFW.js.map +1 -0
- package/build/server/chunks/{3-DQ17gh6a.js → 3-D9bhyYab.js} +3 -3
- package/build/server/chunks/3-D9bhyYab.js.map +1 -0
- package/build/server/chunks/{4-2jVZUs0V.js → 4-D2p4Aujv.js} +4 -4
- package/build/server/chunks/4-D2p4Aujv.js.map +1 -0
- package/build/server/chunks/{5-KRWLkgj4.js → 5-wF5YxjGB.js} +3 -3
- package/build/server/chunks/5-wF5YxjGB.js.map +1 -0
- package/build/server/chunks/{6-kp1tiXKf.js → 6-BqHx72aG.js} +9 -8
- package/build/server/chunks/6-BqHx72aG.js.map +1 -0
- package/build/server/chunks/7-BDj6mE5s.js +35 -0
- package/build/server/chunks/7-BDj6mE5s.js.map +1 -0
- package/build/server/chunks/{ActionButton-vALVNYy6.js → ActionButton-BVpJOdmZ.js} +5 -5
- package/build/server/chunks/ActionButton-BVpJOdmZ.js.map +1 -0
- package/build/server/chunks/AddImageButton-wkRQwQyU.js +100 -0
- package/build/server/chunks/AddImageButton-wkRQwQyU.js.map +1 -0
- package/build/server/chunks/{Checkbox-BMs5z3M6.js → Checkbox-o_OQis9x.js} +9 -9
- package/build/server/chunks/Checkbox-o_OQis9x.js.map +1 -0
- package/build/server/chunks/Icon-D6YekQ8Q.js +76 -0
- package/build/server/chunks/Icon-D6YekQ8Q.js.map +1 -0
- package/build/server/chunks/Layout-Cbf9GL2n.js +147 -0
- package/build/server/chunks/Layout-Cbf9GL2n.js.map +1 -0
- package/build/server/chunks/Modal-BmkqyOQk.js +112 -0
- package/build/server/chunks/Modal-BmkqyOQk.js.map +1 -0
- package/build/server/chunks/OriginalImage-T1O1RjA4.js +35 -0
- package/build/server/chunks/OriginalImage-T1O1RjA4.js.map +1 -0
- package/build/server/chunks/{SearchInput-1p6YrIBH.js → SearchInput-6iIV7qsX.js} +25 -24
- package/build/server/chunks/SearchInput-6iIV7qsX.js.map +1 -0
- package/build/server/chunks/{TagEdit-Ddkd6UkG.js → TagEdit-DKl5am0n.js} +15 -16
- package/build/server/chunks/TagEdit-DKl5am0n.js.map +1 -0
- package/build/server/chunks/{Tooltip-D76oRsU8.js → Tooltip-CcYD8tLg.js} +6 -6
- package/build/server/chunks/Tooltip-CcYD8tLg.js.map +1 -0
- package/build/server/chunks/{_layout.svelte-2KWCRjcD.js → _layout.svelte-B6foPZhp.js} +69 -70
- package/build/server/chunks/_layout.svelte-B6foPZhp.js.map +1 -0
- package/build/server/chunks/_page.svelte-BZdh5P6v.js +649 -0
- package/build/server/chunks/_page.svelte-BZdh5P6v.js.map +1 -0
- package/build/server/chunks/_page.svelte-B_b_4W_t.js +805 -0
- package/build/server/chunks/_page.svelte-B_b_4W_t.js.map +1 -0
- package/build/server/chunks/{_page.svelte-V9EuDN4l.js → _page.svelte-Bheq9Ffm.js} +28 -15
- package/build/server/chunks/_page.svelte-Bheq9Ffm.js.map +1 -0
- package/build/server/chunks/_page.svelte-DdU2q-2t.js +17934 -0
- package/build/server/chunks/_page.svelte-DdU2q-2t.js.map +1 -0
- package/build/server/chunks/_page.svelte-DwxJ8m-6.js +411 -0
- package/build/server/chunks/_page.svelte-DwxJ8m-6.js.map +1 -0
- package/build/server/chunks/_page.svelte-qqm4rNsV.js +168 -0
- package/build/server/chunks/_page.svelte-qqm4rNsV.js.map +1 -0
- package/build/server/chunks/{_server.ts-Cb3dYCK4.js → _server.ts-25JIEREN.js} +7 -6
- package/build/server/chunks/{_server.ts-Cb3dYCK4.js.map → _server.ts-25JIEREN.js.map} +1 -1
- package/build/server/chunks/{_server.ts-Lbj9p5U5.js → _server.ts-4CB_gvO3.js} +2 -2
- package/build/server/chunks/{_server.ts-Lbj9p5U5.js.map → _server.ts-4CB_gvO3.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CwUKZOw0.js → _server.ts-4InKcvV0.js} +2 -2
- package/build/server/chunks/{_server.ts-CwUKZOw0.js.map → _server.ts-4InKcvV0.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DKllrQ92.js → _server.ts-56AUug1F.js} +2 -2
- package/build/server/chunks/{_server.ts-DKllrQ92.js.map → _server.ts-56AUug1F.js.map} +1 -1
- package/build/server/chunks/{_server.ts-aQEmaso6.js → _server.ts-BDsjpmO7.js} +2 -2
- package/build/server/chunks/{_server.ts-aQEmaso6.js.map → _server.ts-BDsjpmO7.js.map} +1 -1
- package/build/server/chunks/{_server.ts-VxM8qlDT.js → _server.ts-BbrBd9qr.js} +7 -6
- package/build/server/chunks/_server.ts-BbrBd9qr.js.map +1 -0
- package/build/server/chunks/{_server.ts-OYdhWjAm.js → _server.ts-CDSLj_Cz.js} +2 -2
- package/build/server/chunks/{_server.ts-OYdhWjAm.js.map → _server.ts-CDSLj_Cz.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CfZtA_PK.js → _server.ts-CLng4zD2.js} +2 -2
- package/build/server/chunks/{_server.ts-CfZtA_PK.js.map → _server.ts-CLng4zD2.js.map} +1 -1
- package/build/server/chunks/{_server.ts-D3Kn7ITK.js → _server.ts-CR7NpJz0.js} +2 -2
- package/build/server/chunks/{_server.ts-D3Kn7ITK.js.map → _server.ts-CR7NpJz0.js.map} +1 -1
- package/build/server/chunks/{_server.ts-K9h73FYX.js → _server.ts-CV5o78gm.js} +4 -2
- package/build/server/chunks/_server.ts-CV5o78gm.js.map +1 -0
- package/build/server/chunks/{_server.ts-DScwtPDh.js → _server.ts-CpKRML6n.js} +2 -2
- package/build/server/chunks/{_server.ts-DScwtPDh.js.map → _server.ts-CpKRML6n.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DYp8i1IH.js → _server.ts-Ct5jwND_.js} +7 -6
- package/build/server/chunks/{_server.ts-DYp8i1IH.js.map → _server.ts-Ct5jwND_.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DaG2SqbQ.js → _server.ts-D7rlRPg6.js} +2 -2
- package/build/server/chunks/{_server.ts-DaG2SqbQ.js.map → _server.ts-D7rlRPg6.js.map} +1 -1
- package/build/server/chunks/{_server.ts-LdnFfvoN.js → _server.ts-DJhLhLB4.js} +2 -2
- package/build/server/chunks/{_server.ts-LdnFfvoN.js.map → _server.ts-DJhLhLB4.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DBffY4vB.js → _server.ts-DQccEkuS.js} +7 -6
- package/build/server/chunks/{_server.ts-DBffY4vB.js.map → _server.ts-DQccEkuS.js.map} +1 -1
- package/build/server/chunks/{_server.ts-4-hzH_go.js → _server.ts-DjCVj_-y.js} +2 -2
- package/build/server/chunks/{_server.ts-4-hzH_go.js.map → _server.ts-DjCVj_-y.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DorcYvBp.js → _server.ts-LofwHGyu.js} +7 -6
- package/build/server/chunks/{_server.ts-DorcYvBp.js.map → _server.ts-LofwHGyu.js.map} +1 -1
- package/build/server/chunks/{_server.ts-KTRfxaLf.js → _server.ts-k0OCZsPt.js} +2 -2
- package/build/server/chunks/{_server.ts-KTRfxaLf.js.map → _server.ts-k0OCZsPt.js.map} +1 -1
- package/build/server/chunks/circle-x-BfwNryZh.js +39 -0
- package/build/server/chunks/circle-x-BfwNryZh.js.map +1 -0
- package/build/server/chunks/error.svelte-C6YxQrsH.js +12 -0
- package/build/server/chunks/error.svelte-C6YxQrsH.js.map +1 -0
- package/build/server/chunks/{exports-7ECo9oy7.js → exports-BJD76umC.js} +57 -3
- package/build/server/chunks/exports-BJD76umC.js.map +1 -0
- package/build/server/chunks/eye-BlNCCVn1.js +43 -0
- package/build/server/chunks/eye-BlNCCVn1.js.map +1 -0
- package/build/server/chunks/{galleryoverride.svelte-B-LzQrr2.js → galleryoverride.svelte-BV3YLOis.js} +3 -3
- package/build/server/chunks/{galleryoverride.svelte-B-LzQrr2.js.map → galleryoverride.svelte-BV3YLOis.js.map} +1 -1
- package/build/server/chunks/{galleryutil-CdWyR2BP.js → galleryutil-BSy19g0y.js} +3 -2
- package/build/server/chunks/galleryutil-BSy19g0y.js.map +1 -0
- package/build/server/chunks/index-6GdTEbjU.js +57 -0
- package/build/server/chunks/index-6GdTEbjU.js.map +1 -0
- package/build/server/chunks/{index-CoD1IJuy.js → index-lhTMmBNn.js} +20 -3
- package/build/server/chunks/index-lhTMmBNn.js.map +1 -0
- package/build/server/chunks/{url-DAcOnjX0.js → root-CupBMgyF.js} +3008 -2549
- package/build/server/chunks/root-CupBMgyF.js.map +1 -0
- package/build/server/chunks/{routing-DnQyokYQ.js → routing-DTYvkbgc.js} +2 -2
- package/build/server/chunks/{routing-DnQyokYQ.js.map → routing-DTYvkbgc.js.map} +1 -1
- package/build/server/chunks/server2-92GrlBNh.js +28 -0
- package/build/server/chunks/server2-92GrlBNh.js.map +1 -0
- package/build/server/chunks/trash-rtKFMGED.js +77 -0
- package/build/server/chunks/trash-rtKFMGED.js.map +1 -0
- package/build/server/chunks/{util-B37Rvgjl.js → util-DS6EORSM.js} +3 -22
- package/build/server/chunks/util-DS6EORSM.js.map +1 -0
- package/build/server/index.js +785 -542
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +27 -27
- package/build/server/manifest.js.map +1 -1
- package/package.json +6 -1
- package/build/client/editor/_app/immutable/assets/0.CE-HU6_R.css +0 -1
- package/build/client/editor/_app/immutable/assets/0.CE-HU6_R.css.br +0 -0
- package/build/client/editor/_app/immutable/assets/0.CE-HU6_R.css.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/7WIKTAP8.js +0 -1
- package/build/client/editor/_app/immutable/chunks/7WIKTAP8.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/7WIKTAP8.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BFbS_uKR.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BFbS_uKR.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BNV8aWpA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BNV8aWpA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BOWzgE0W.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BOWzgE0W.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BZYFUfL0.js +0 -2
- package/build/client/editor/_app/immutable/chunks/BZYFUfL0.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BZYFUfL0.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/B_eqtYk0.js +0 -1
- package/build/client/editor/_app/immutable/chunks/B_eqtYk0.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/B_eqtYk0.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Be2MCKxf.js +0 -5
- package/build/client/editor/_app/immutable/chunks/Be2MCKxf.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Be2MCKxf.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/BmPG8j70.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/BmPG8j70.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C01s23Hz.js +0 -1
- package/build/client/editor/_app/immutable/chunks/C01s23Hz.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C01s23Hz.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C1cA1OFW.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/C1cA1OFW.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/C26Wy4GU.js +0 -1
- package/build/client/editor/_app/immutable/chunks/C26Wy4GU.js.br +0 -2
- package/build/client/editor/_app/immutable/chunks/C26Wy4GU.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CCJ98Hpm.js +0 -1
- package/build/client/editor/_app/immutable/chunks/CCJ98Hpm.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CCJ98Hpm.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CG-KH9SH.js +0 -2
- package/build/client/editor/_app/immutable/chunks/CG-KH9SH.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CG-KH9SH.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Cd00BVLy.js +0 -1
- package/build/client/editor/_app/immutable/chunks/Cd00BVLy.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Cd00BVLy.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Cl2_suSZ.js +0 -1
- package/build/client/editor/_app/immutable/chunks/Cl2_suSZ.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Cl2_suSZ.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Clqpx6Fc.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Clqpx6Fc.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CpKCa_gu.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CpKCa_gu.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CtvC2rTB.js +0 -1
- package/build/client/editor/_app/immutable/chunks/CtvC2rTB.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CtvC2rTB.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/CzKyBacq.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/CzKyBacq.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DDbagcfB.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DDbagcfB.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DEkLMHay.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DEkLMHay.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DI1C5o3m.js +0 -3
- package/build/client/editor/_app/immutable/chunks/DI1C5o3m.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DI1C5o3m.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DIKDu5zG.js +0 -12
- package/build/client/editor/_app/immutable/chunks/DIKDu5zG.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DIKDu5zG.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DMH-VYFG.js +0 -1
- package/build/client/editor/_app/immutable/chunks/DMH-VYFG.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DMH-VYFG.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DhhrKZdn.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DhhrKZdn.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/DiGEiffF.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/DiGEiffF.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Dod547Wj.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Dod547Wj.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/Dvj4DoMA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/Dvj4DoMA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/FsbNKlUV.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/FsbNKlUV.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/L4YI7OnJ.js +0 -22
- package/build/client/editor/_app/immutable/chunks/L4YI7OnJ.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/L4YI7OnJ.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/MTeUycsA.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/MTeUycsA.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/PPVm8Dsz.js +0 -1
- package/build/client/editor/_app/immutable/chunks/PPVm8Dsz.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/PPVm8Dsz.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/puykgk1P.js +0 -1
- package/build/client/editor/_app/immutable/chunks/puykgk1P.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/puykgk1P.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/rKXfWAby.js +0 -1
- package/build/client/editor/_app/immutable/chunks/rKXfWAby.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/rKXfWAby.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/vknWvHF8.js +0 -1
- package/build/client/editor/_app/immutable/chunks/vknWvHF8.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/vknWvHF8.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/wabKUHyo.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/wabKUHyo.js.gz +0 -0
- package/build/client/editor/_app/immutable/chunks/ysghqVTL.js.br +0 -0
- package/build/client/editor/_app/immutable/chunks/ysghqVTL.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/app.CP3zlKbN.js +0 -2
- package/build/client/editor/_app/immutable/entry/app.CP3zlKbN.js.br +0 -0
- package/build/client/editor/_app/immutable/entry/app.CP3zlKbN.js.gz +0 -0
- package/build/client/editor/_app/immutable/entry/start.CFGseth5.js +0 -1
- package/build/client/editor/_app/immutable/entry/start.CFGseth5.js.br +0 -2
- package/build/client/editor/_app/immutable/entry/start.CFGseth5.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/0.BmVvxYWP.js +0 -1
- package/build/client/editor/_app/immutable/nodes/0.BmVvxYWP.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/0.BmVvxYWP.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/1.Bba_cBgx.js +0 -1
- package/build/client/editor/_app/immutable/nodes/1.Bba_cBgx.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/1.Bba_cBgx.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/2.Cgkbi8ML.js +0 -1
- package/build/client/editor/_app/immutable/nodes/2.Cgkbi8ML.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/2.Cgkbi8ML.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/3.rwH1OI4K.js +0 -1
- package/build/client/editor/_app/immutable/nodes/3.rwH1OI4K.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/3.rwH1OI4K.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/4.DBOUNGQa.js +0 -2
- package/build/client/editor/_app/immutable/nodes/4.DBOUNGQa.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/4.DBOUNGQa.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/5.CeHMeyFV.js +0 -1
- package/build/client/editor/_app/immutable/nodes/5.CeHMeyFV.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/5.CeHMeyFV.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/6.DkEgF_rs.js +0 -1
- package/build/client/editor/_app/immutable/nodes/6.DkEgF_rs.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/6.DkEgF_rs.js.gz +0 -0
- package/build/client/editor/_app/immutable/nodes/7.DIWMVQ4S.js +0 -1
- package/build/client/editor/_app/immutable/nodes/7.DIWMVQ4S.js.br +0 -0
- package/build/client/editor/_app/immutable/nodes/7.DIWMVQ4S.js.gz +0 -0
- package/build/server/chunks/0-BSK5opGv.js.map +0 -1
- package/build/server/chunks/1-Mdhx-oEs.js +0 -9
- package/build/server/chunks/1-Mdhx-oEs.js.map +0 -1
- package/build/server/chunks/2-CXVg5EDG.js.map +0 -1
- package/build/server/chunks/3-DQ17gh6a.js.map +0 -1
- package/build/server/chunks/4-2jVZUs0V.js.map +0 -1
- package/build/server/chunks/5-KRWLkgj4.js.map +0 -1
- package/build/server/chunks/6-kp1tiXKf.js.map +0 -1
- package/build/server/chunks/7-DIYLAVeu.js +0 -35
- package/build/server/chunks/7-DIYLAVeu.js.map +0 -1
- package/build/server/chunks/ActionButton-vALVNYy6.js.map +0 -1
- package/build/server/chunks/Checkbox-BMs5z3M6.js.map +0 -1
- package/build/server/chunks/Modal-DaiQaG4-.js +0 -130
- package/build/server/chunks/Modal-DaiQaG4-.js.map +0 -1
- package/build/server/chunks/SearchInput-1p6YrIBH.js.map +0 -1
- package/build/server/chunks/TagEdit-Ddkd6UkG.js.map +0 -1
- package/build/server/chunks/TextBox-Bam4lYhA.js +0 -292
- package/build/server/chunks/TextBox-Bam4lYhA.js.map +0 -1
- package/build/server/chunks/Tooltip-D76oRsU8.js.map +0 -1
- package/build/server/chunks/_layout.svelte-2KWCRjcD.js.map +0 -1
- package/build/server/chunks/_page.svelte-Csn5PqWu.js +0 -1203
- package/build/server/chunks/_page.svelte-Csn5PqWu.js.map +0 -1
- package/build/server/chunks/_page.svelte-D3MfQIjp.js +0 -319
- package/build/server/chunks/_page.svelte-D3MfQIjp.js.map +0 -1
- package/build/server/chunks/_page.svelte-D91WMgZ8.js +0 -221
- package/build/server/chunks/_page.svelte-D91WMgZ8.js.map +0 -1
- package/build/server/chunks/_page.svelte-KTjPdsb4.js +0 -384
- package/build/server/chunks/_page.svelte-KTjPdsb4.js.map +0 -1
- package/build/server/chunks/_page.svelte-OOhjubE2.js +0 -142
- package/build/server/chunks/_page.svelte-OOhjubE2.js.map +0 -1
- package/build/server/chunks/_page.svelte-V9EuDN4l.js.map +0 -1
- package/build/server/chunks/_server.ts-K9h73FYX.js.map +0 -1
- package/build/server/chunks/_server.ts-VxM8qlDT.js.map +0 -1
- package/build/server/chunks/client-CHdX8mKQ.js +0 -31
- package/build/server/chunks/client-CHdX8mKQ.js.map +0 -1
- package/build/server/chunks/error.svelte-BvlPlxyo.js +0 -15
- package/build/server/chunks/error.svelte-BvlPlxyo.js.map +0 -1
- package/build/server/chunks/exports-7ECo9oy7.js.map +0 -1
- package/build/server/chunks/galleryutil-CdWyR2BP.js.map +0 -1
- package/build/server/chunks/index-CoD1IJuy.js.map +0 -1
- package/build/server/chunks/index-DeXr9LUC.js +0 -58
- package/build/server/chunks/index-DeXr9LUC.js.map +0 -1
- package/build/server/chunks/index2-kGSpwJ7x.js +0 -25
- package/build/server/chunks/index2-kGSpwJ7x.js.map +0 -1
- package/build/server/chunks/state.svelte-pSYW5Nat.js +0 -9
- package/build/server/chunks/state.svelte-pSYW5Nat.js.map +0 -1
- package/build/server/chunks/url-DAcOnjX0.js.map +0 -1
- package/build/server/chunks/util-B37Rvgjl.js.map +0 -1
- /package/build/client/editor/_app/immutable/assets/{TextBox.CXTVejeF.css → ImageEdit.CXTVejeF.css} +0 -0
- /package/build/client/editor/_app/immutable/assets/{TextBox.CXTVejeF.css.br → ImageEdit.CXTVejeF.css.br} +0 -0
- /package/build/client/editor/_app/immutable/assets/{TextBox.CXTVejeF.css.gz → ImageEdit.CXTVejeF.css.gz} +0 -0
package/build/server/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { b as
|
|
4
|
-
import {
|
|
5
|
-
import { w as writable, r as readable } from './chunks/index-DeXr9LUC.js';
|
|
1
|
+
import { H as HttpError, j as json, S as SvelteKitError, t as text, R as Redirect, i as isRedirect, e as error, A as ActionFailure } from './chunks/index-lhTMmBNn.js';
|
|
2
|
+
import { w as with_request_store, u as uneval, U as UNDEFINED, N as NAN, P as POSITIVE_INFINITY, a as NEGATIVE_INFINITY, b as NEGATIVE_ZERO, S as SPARSE, i as is_valid_array_len, M as MAX_ARRAY_INDEX, c as is_valid_array_index, H as HOLE, D as DevalueError, d as is_primitive, g as get_type, e as is_plain_object, f as enumerable_symbols, s as stringify_key, h as stringify_string, v as valid_array_indices, r as root, j as decode_pathname, k as DEV, n as normalize_path, l as disable_search, m as resolve, o as make_trackable } from './chunks/root-CupBMgyF.js';
|
|
3
|
+
import { b as base64_decode, v as validate_layout_server_exports, a as validate_layout_exports, c as validate_page_server_exports, d as validate_page_exports, t as text_encoder, w as writable, r as readable, e as base64_encode, g as get_relative_path } from './chunks/exports-BJD76umC.js';
|
|
4
|
+
import { b as base, a as app_dir, f as find_route, c as assets, r as relative, o as override, d as reset } from './chunks/routing-DTYvkbgc.js';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* @template {{ tracing: { enabled: boolean, root: import('@opentelemetry/api').Span, current: import('@opentelemetry/api').Span } }} T
|
|
@@ -20,87 +19,242 @@ function merge_tracing(event_like, current) {
|
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
21
|
|
|
22
|
+
function noop() {
|
|
23
|
+
}
|
|
24
|
+
function once(fn) {
|
|
25
|
+
let done = false;
|
|
26
|
+
let result;
|
|
27
|
+
return () => {
|
|
28
|
+
if (done) return result;
|
|
29
|
+
done = true;
|
|
30
|
+
return result = fn();
|
|
31
|
+
};
|
|
32
|
+
}
|
|
23
33
|
const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
|
|
24
34
|
const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
|
|
25
|
-
const MUTATIVE_METHODS = ["POST", "PUT", "PATCH", "DELETE"];
|
|
26
35
|
const PAGE_METHODS = ["GET", "POST", "HEAD"];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
36
|
+
var defaultParseOptions = {
|
|
37
|
+
decodeValues: true,
|
|
38
|
+
map: false,
|
|
39
|
+
silent: false,
|
|
40
|
+
split: "auto"
|
|
41
|
+
// auto = split strings but not arrays
|
|
42
|
+
};
|
|
43
|
+
function isForbiddenKey(key) {
|
|
44
|
+
return typeof key !== "string" || key in {};
|
|
45
|
+
}
|
|
46
|
+
function createNullObj() {
|
|
47
|
+
return /* @__PURE__ */ Object.create(null);
|
|
48
|
+
}
|
|
49
|
+
function isNonEmptyString(str) {
|
|
50
|
+
return typeof str === "string" && !!str.trim();
|
|
51
|
+
}
|
|
52
|
+
function parseString(setCookieValue, options) {
|
|
53
|
+
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
54
|
+
var nameValuePairStr = parts.shift();
|
|
55
|
+
var parsed = parseNameValuePair(nameValuePairStr);
|
|
56
|
+
var name = parsed.name;
|
|
57
|
+
var value = parsed.value;
|
|
58
|
+
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
|
59
|
+
if (isForbiddenKey(name)) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
value = options.decodeValues ? decodeURIComponent(value) : value;
|
|
64
|
+
} catch (e) {
|
|
65
|
+
console.error(
|
|
66
|
+
"set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
|
|
67
|
+
e
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
var cookie = createNullObj();
|
|
71
|
+
cookie.name = name;
|
|
72
|
+
cookie.value = value;
|
|
73
|
+
parts.forEach(function(part) {
|
|
74
|
+
var sides = part.split("=");
|
|
75
|
+
var key = sides.shift().trimLeft().toLowerCase();
|
|
76
|
+
if (isForbiddenKey(key)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
var value2 = sides.join("=");
|
|
80
|
+
if (key === "expires") {
|
|
81
|
+
cookie.expires = new Date(value2);
|
|
82
|
+
} else if (key === "max-age") {
|
|
83
|
+
var n = parseInt(value2, 10);
|
|
84
|
+
if (!Number.isNaN(n)) cookie.maxAge = n;
|
|
85
|
+
} else if (key === "secure") {
|
|
86
|
+
cookie.secure = true;
|
|
87
|
+
} else if (key === "httponly") {
|
|
88
|
+
cookie.httpOnly = true;
|
|
89
|
+
} else if (key === "samesite") {
|
|
90
|
+
cookie.sameSite = value2;
|
|
91
|
+
} else if (key === "partitioned") {
|
|
92
|
+
cookie.partitioned = true;
|
|
93
|
+
} else if (key) {
|
|
94
|
+
cookie[key] = value2;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return cookie;
|
|
98
|
+
}
|
|
99
|
+
function parseNameValuePair(nameValuePairStr) {
|
|
100
|
+
var name = "";
|
|
101
|
+
var value = "";
|
|
102
|
+
var nameValueArr = nameValuePairStr.split("=");
|
|
103
|
+
if (nameValueArr.length > 1) {
|
|
104
|
+
name = nameValueArr.shift();
|
|
105
|
+
value = nameValueArr.join("=");
|
|
106
|
+
} else {
|
|
107
|
+
value = nameValuePairStr;
|
|
108
|
+
}
|
|
109
|
+
return { name, value };
|
|
110
|
+
}
|
|
111
|
+
function parseSetCookie(input, options) {
|
|
112
|
+
options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
|
|
113
|
+
if (!input) {
|
|
114
|
+
if (!options.map) {
|
|
115
|
+
return [];
|
|
116
|
+
} else {
|
|
117
|
+
return createNullObj();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (input.headers) {
|
|
121
|
+
if (typeof input.headers.getSetCookie === "function") {
|
|
122
|
+
input = input.headers.getSetCookie();
|
|
123
|
+
} else if (input.headers["set-cookie"]) {
|
|
124
|
+
input = input.headers["set-cookie"];
|
|
125
|
+
} else {
|
|
126
|
+
var sch = input.headers[Object.keys(input.headers).find(function(key) {
|
|
127
|
+
return key.toLowerCase() === "set-cookie";
|
|
128
|
+
})];
|
|
129
|
+
if (!sch && input.headers.cookie && !options.silent) {
|
|
130
|
+
console.warn(
|
|
131
|
+
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
input = sch;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
var split = options.split;
|
|
138
|
+
var isArray = Array.isArray(input);
|
|
139
|
+
if (split === "auto") {
|
|
140
|
+
split = !isArray;
|
|
141
|
+
}
|
|
142
|
+
if (!isArray) {
|
|
143
|
+
input = [input];
|
|
144
|
+
}
|
|
145
|
+
input = input.filter(isNonEmptyString);
|
|
146
|
+
if (split) {
|
|
147
|
+
input = input.map(splitCookiesString).flat();
|
|
148
|
+
}
|
|
149
|
+
if (!options.map) {
|
|
150
|
+
return input.map(function(str) {
|
|
151
|
+
return parseString(str, options);
|
|
152
|
+
}).filter(Boolean);
|
|
153
|
+
} else {
|
|
154
|
+
var cookies = createNullObj();
|
|
155
|
+
return input.reduce(function(cookies2, str) {
|
|
156
|
+
var cookie = parseString(str, options);
|
|
157
|
+
if (cookie && !isForbiddenKey(cookie.name)) {
|
|
158
|
+
cookies2[cookie.name] = cookie;
|
|
159
|
+
}
|
|
160
|
+
return cookies2;
|
|
161
|
+
}, cookies);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function splitCookiesString(cookiesString) {
|
|
165
|
+
if (Array.isArray(cookiesString)) {
|
|
166
|
+
return cookiesString;
|
|
167
|
+
}
|
|
168
|
+
if (typeof cookiesString !== "string") {
|
|
169
|
+
return [];
|
|
170
|
+
}
|
|
171
|
+
var cookiesStrings = [];
|
|
172
|
+
var pos = 0;
|
|
173
|
+
var start;
|
|
174
|
+
var ch;
|
|
175
|
+
var lastComma;
|
|
176
|
+
var nextStart;
|
|
177
|
+
var cookiesSeparatorFound;
|
|
178
|
+
function skipWhitespace() {
|
|
179
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
180
|
+
pos += 1;
|
|
181
|
+
}
|
|
182
|
+
return pos < cookiesString.length;
|
|
183
|
+
}
|
|
184
|
+
function notSpecialChar() {
|
|
185
|
+
ch = cookiesString.charAt(pos);
|
|
186
|
+
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
187
|
+
}
|
|
188
|
+
while (pos < cookiesString.length) {
|
|
189
|
+
start = pos;
|
|
190
|
+
cookiesSeparatorFound = false;
|
|
191
|
+
while (skipWhitespace()) {
|
|
192
|
+
ch = cookiesString.charAt(pos);
|
|
193
|
+
if (ch === ",") {
|
|
194
|
+
lastComma = pos;
|
|
195
|
+
pos += 1;
|
|
196
|
+
skipWhitespace();
|
|
197
|
+
nextStart = pos;
|
|
198
|
+
while (pos < cookiesString.length && notSpecialChar()) {
|
|
199
|
+
pos += 1;
|
|
200
|
+
}
|
|
201
|
+
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
202
|
+
cookiesSeparatorFound = true;
|
|
203
|
+
pos = nextStart;
|
|
204
|
+
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
205
|
+
start = pos;
|
|
206
|
+
} else {
|
|
207
|
+
pos = lastComma + 1;
|
|
208
|
+
}
|
|
90
209
|
} else {
|
|
91
|
-
|
|
210
|
+
pos += 1;
|
|
92
211
|
}
|
|
93
212
|
}
|
|
213
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
214
|
+
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return cookiesStrings;
|
|
218
|
+
}
|
|
219
|
+
parseSetCookie.parseSetCookie = parseSetCookie;
|
|
220
|
+
parseSetCookie.parse = parseSetCookie;
|
|
221
|
+
parseSetCookie.parseString = parseString;
|
|
222
|
+
parseSetCookie.splitCookiesString = splitCookiesString;
|
|
223
|
+
function encode_native(array_buffer) {
|
|
224
|
+
return new Uint8Array(array_buffer).toBase64();
|
|
225
|
+
}
|
|
226
|
+
function decode_native(base64) {
|
|
227
|
+
return Uint8Array.fromBase64(base64).buffer;
|
|
228
|
+
}
|
|
229
|
+
function encode_buffer(array_buffer) {
|
|
230
|
+
return Buffer.from(array_buffer).toString("base64");
|
|
231
|
+
}
|
|
232
|
+
function decode_buffer(base64) {
|
|
233
|
+
return Uint8Array.from(Buffer.from(base64, "base64")).buffer;
|
|
234
|
+
}
|
|
235
|
+
function encode_legacy(array_buffer) {
|
|
236
|
+
const array = new Uint8Array(array_buffer);
|
|
237
|
+
let binary = "";
|
|
238
|
+
const chunk_size = 32768;
|
|
239
|
+
for (let i = 0; i < array.length; i += chunk_size) {
|
|
240
|
+
const chunk = array.subarray(i, i + chunk_size);
|
|
241
|
+
binary += String.fromCharCode.apply(null, chunk);
|
|
242
|
+
}
|
|
243
|
+
return btoa(binary);
|
|
244
|
+
}
|
|
245
|
+
function decode_legacy(base64) {
|
|
246
|
+
const binary_string = atob(base64);
|
|
247
|
+
const len = binary_string.length;
|
|
248
|
+
const array = new Uint8Array(len);
|
|
249
|
+
for (let i = 0; i < len; i++) {
|
|
250
|
+
array[i] = binary_string.charCodeAt(i);
|
|
94
251
|
}
|
|
95
|
-
return
|
|
252
|
+
return array.buffer;
|
|
96
253
|
}
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const NEGATIVE_INFINITY = -5;
|
|
102
|
-
const NEGATIVE_ZERO = -6;
|
|
103
|
-
const SPARSE = -7;
|
|
254
|
+
const native = typeof Uint8Array.fromBase64 === "function";
|
|
255
|
+
const buffer = typeof process === "object" && process.versions?.node !== void 0;
|
|
256
|
+
const encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
|
|
257
|
+
const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
|
|
104
258
|
function parse(serialized, revivers) {
|
|
105
259
|
return unflatten(JSON.parse(serialized), revivers);
|
|
106
260
|
}
|
|
@@ -167,13 +321,14 @@ function unflatten(parsed, revivers) {
|
|
|
167
321
|
case "RegExp":
|
|
168
322
|
hydrated[index] = new RegExp(value[1], value[2]);
|
|
169
323
|
break;
|
|
170
|
-
case "Object":
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
throw new Error("
|
|
324
|
+
case "Object": {
|
|
325
|
+
const wrapped_index = value[1];
|
|
326
|
+
if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") {
|
|
327
|
+
throw new Error("Invalid input");
|
|
174
328
|
}
|
|
175
|
-
hydrated[index] =
|
|
329
|
+
hydrated[index] = Object(hydrate(wrapped_index));
|
|
176
330
|
break;
|
|
331
|
+
}
|
|
177
332
|
case "BigInt":
|
|
178
333
|
hydrated[index] = BigInt(value[1]);
|
|
179
334
|
break;
|
|
@@ -192,19 +347,20 @@ function unflatten(parsed, revivers) {
|
|
|
192
347
|
case "Uint8ClampedArray":
|
|
193
348
|
case "Int16Array":
|
|
194
349
|
case "Uint16Array":
|
|
350
|
+
case "Float16Array":
|
|
195
351
|
case "Int32Array":
|
|
196
352
|
case "Uint32Array":
|
|
197
353
|
case "Float32Array":
|
|
198
354
|
case "Float64Array":
|
|
199
355
|
case "BigInt64Array":
|
|
200
|
-
case "BigUint64Array":
|
|
356
|
+
case "BigUint64Array":
|
|
357
|
+
case "DataView": {
|
|
201
358
|
if (values[value[1]][0] !== "ArrayBuffer") {
|
|
202
359
|
throw new Error("Invalid data");
|
|
203
360
|
}
|
|
204
361
|
const TypedArrayConstructor = globalThis[type];
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
hydrated[index] = value[2] !== void 0 ? typedArray.subarray(value[2], value[3]) : typedArray;
|
|
362
|
+
const buffer2 = hydrate(value[1]);
|
|
363
|
+
hydrated[index] = value[2] !== void 0 ? new TypedArrayConstructor(buffer2, value[2], value[3]) : new TypedArrayConstructor(buffer2);
|
|
208
364
|
break;
|
|
209
365
|
}
|
|
210
366
|
case "ArrayBuffer": {
|
|
@@ -243,18 +399,21 @@ function unflatten(parsed, revivers) {
|
|
|
243
399
|
}
|
|
244
400
|
} else if (value[0] === SPARSE) {
|
|
245
401
|
const len = value[1];
|
|
246
|
-
if (!
|
|
402
|
+
if (!is_valid_array_len(len)) {
|
|
247
403
|
throw new Error("Invalid input");
|
|
248
404
|
}
|
|
249
|
-
const array =
|
|
405
|
+
const array = [];
|
|
250
406
|
hydrated[index] = array;
|
|
407
|
+
array[MAX_ARRAY_INDEX] = void 0;
|
|
408
|
+
delete array[MAX_ARRAY_INDEX];
|
|
251
409
|
for (let i = 2; i < value.length; i += 2) {
|
|
252
410
|
const idx = value[i];
|
|
253
|
-
if (!
|
|
411
|
+
if (!is_valid_array_index(idx) || idx >= len) {
|
|
254
412
|
throw new Error("Invalid input");
|
|
255
413
|
}
|
|
256
414
|
array[idx] = hydrate(value[i + 1]);
|
|
257
415
|
}
|
|
416
|
+
array.length = len;
|
|
258
417
|
} else {
|
|
259
418
|
const array = new Array(value.length);
|
|
260
419
|
hydrated[index] = array;
|
|
@@ -280,6 +439,10 @@ function unflatten(parsed, revivers) {
|
|
|
280
439
|
return hydrate(0);
|
|
281
440
|
}
|
|
282
441
|
function stringify$1(value, reducers) {
|
|
442
|
+
const stringified = run(false, value, reducers);
|
|
443
|
+
return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
|
|
444
|
+
}
|
|
445
|
+
function run(async, value, reducers) {
|
|
283
446
|
const stringified = [];
|
|
284
447
|
const indexes = /* @__PURE__ */ new Map();
|
|
285
448
|
const custom = [];
|
|
@@ -290,14 +453,17 @@ function stringify$1(value, reducers) {
|
|
|
290
453
|
}
|
|
291
454
|
const keys = [];
|
|
292
455
|
let p = 0;
|
|
293
|
-
function flatten(thing) {
|
|
456
|
+
function flatten(thing, index2) {
|
|
294
457
|
if (thing === void 0) return UNDEFINED;
|
|
295
458
|
if (Number.isNaN(thing)) return NAN;
|
|
296
459
|
if (thing === Infinity) return POSITIVE_INFINITY;
|
|
297
460
|
if (thing === -Infinity) return NEGATIVE_INFINITY;
|
|
298
461
|
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;
|
|
299
|
-
if (indexes.has(thing)) return
|
|
300
|
-
|
|
462
|
+
if (indexes.has(thing)) return (
|
|
463
|
+
/** @type {number} */
|
|
464
|
+
indexes.get(thing)
|
|
465
|
+
);
|
|
466
|
+
index2 ??= p++;
|
|
301
467
|
indexes.set(thing, index2);
|
|
302
468
|
for (const { key, fn } of custom) {
|
|
303
469
|
const value2 = fn(thing);
|
|
@@ -308,20 +474,29 @@ function stringify$1(value, reducers) {
|
|
|
308
474
|
}
|
|
309
475
|
if (typeof thing === "function") {
|
|
310
476
|
throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
|
477
|
+
} else if (typeof thing === "symbol") {
|
|
478
|
+
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
|
311
479
|
}
|
|
312
480
|
let str = "";
|
|
313
481
|
if (is_primitive(thing)) {
|
|
314
482
|
str = stringify_primitive(thing);
|
|
483
|
+
} else if (typeof thing.then === "function") {
|
|
484
|
+
{
|
|
485
|
+
throw new DevalueError(
|
|
486
|
+
`Cannot stringify a Promise or thenable — use stringifyAsync instead`,
|
|
487
|
+
keys,
|
|
488
|
+
thing,
|
|
489
|
+
value
|
|
490
|
+
);
|
|
491
|
+
}
|
|
315
492
|
} else {
|
|
316
493
|
const type = get_type(thing);
|
|
317
494
|
switch (type) {
|
|
318
495
|
case "Number":
|
|
319
496
|
case "String":
|
|
320
497
|
case "Boolean":
|
|
321
|
-
str = `["Object",${stringify_primitive(thing)}]`;
|
|
322
|
-
break;
|
|
323
498
|
case "BigInt":
|
|
324
|
-
str = `["
|
|
499
|
+
str = `["Object",${flatten(thing.valueOf())}]`;
|
|
325
500
|
break;
|
|
326
501
|
case "Date":
|
|
327
502
|
const valid = !isNaN(thing.getDate());
|
|
@@ -385,9 +560,7 @@ function stringify$1(value, reducers) {
|
|
|
385
560
|
case "Map":
|
|
386
561
|
str = '["Map"';
|
|
387
562
|
for (const [key, value2] of thing) {
|
|
388
|
-
keys.push(
|
|
389
|
-
`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`
|
|
390
|
-
);
|
|
563
|
+
keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
|
|
391
564
|
str += `,${flatten(key)},${flatten(value2)}`;
|
|
392
565
|
keys.pop();
|
|
393
566
|
}
|
|
@@ -398,19 +571,18 @@ function stringify$1(value, reducers) {
|
|
|
398
571
|
case "Uint8ClampedArray":
|
|
399
572
|
case "Int16Array":
|
|
400
573
|
case "Uint16Array":
|
|
574
|
+
case "Float16Array":
|
|
401
575
|
case "Int32Array":
|
|
402
576
|
case "Uint32Array":
|
|
403
577
|
case "Float32Array":
|
|
404
578
|
case "Float64Array":
|
|
405
579
|
case "BigInt64Array":
|
|
406
|
-
case "BigUint64Array":
|
|
580
|
+
case "BigUint64Array":
|
|
581
|
+
case "DataView": {
|
|
407
582
|
const typedArray = thing;
|
|
408
583
|
str = '["' + type + '",' + flatten(typedArray.buffer);
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
if (a > 0 || b !== typedArray.buffer.byteLength) {
|
|
412
|
-
const m = +/(\d+)/.exec(type)[1] / 8;
|
|
413
|
-
str += `,${a / m},${b / m}`;
|
|
584
|
+
if (typedArray.byteLength !== typedArray.buffer.byteLength) {
|
|
585
|
+
str += `,${typedArray.byteOffset},${typedArray.length}`;
|
|
414
586
|
}
|
|
415
587
|
str += "]";
|
|
416
588
|
break;
|
|
@@ -433,20 +605,10 @@ function stringify$1(value, reducers) {
|
|
|
433
605
|
break;
|
|
434
606
|
default:
|
|
435
607
|
if (!is_plain_object(thing)) {
|
|
436
|
-
throw new DevalueError(
|
|
437
|
-
`Cannot stringify arbitrary non-POJOs`,
|
|
438
|
-
keys,
|
|
439
|
-
thing,
|
|
440
|
-
value
|
|
441
|
-
);
|
|
608
|
+
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
442
609
|
}
|
|
443
610
|
if (enumerable_symbols(thing).length > 0) {
|
|
444
|
-
throw new DevalueError(
|
|
445
|
-
`Cannot stringify POJOs with symbolic keys`,
|
|
446
|
-
keys,
|
|
447
|
-
thing,
|
|
448
|
-
value
|
|
449
|
-
);
|
|
611
|
+
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
|
450
612
|
}
|
|
451
613
|
if (Object.getPrototypeOf(thing) === null) {
|
|
452
614
|
str = '["null"';
|
|
@@ -491,17 +653,17 @@ function stringify$1(value, reducers) {
|
|
|
491
653
|
}
|
|
492
654
|
const index = flatten(value);
|
|
493
655
|
if (index < 0) return `${index}`;
|
|
494
|
-
return
|
|
656
|
+
return stringified;
|
|
495
657
|
}
|
|
496
658
|
function stringify_primitive(thing) {
|
|
497
659
|
const type = typeof thing;
|
|
498
660
|
if (type === "string") return stringify_string(thing);
|
|
499
|
-
if (thing instanceof String) return stringify_string(thing.toString());
|
|
500
661
|
if (thing === void 0) return UNDEFINED.toString();
|
|
501
662
|
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
|
|
502
663
|
if (type === "bigint") return `["BigInt","${thing}"]`;
|
|
503
664
|
return String(thing);
|
|
504
665
|
}
|
|
666
|
+
const decoder = new TextDecoder();
|
|
505
667
|
function set_nested_value(object, path_string, value) {
|
|
506
668
|
if (path_string.startsWith("n:")) {
|
|
507
669
|
path_string = path_string.slice(2);
|
|
@@ -549,10 +711,6 @@ async function deserialize_binary_form(request) {
|
|
|
549
711
|
if (!request.body) {
|
|
550
712
|
throw deserialize_error("no body");
|
|
551
713
|
}
|
|
552
|
-
const content_length = parseInt(request.headers.get("content-length") ?? "");
|
|
553
|
-
if (Number.isNaN(content_length)) {
|
|
554
|
-
throw deserialize_error("invalid Content-Length header");
|
|
555
|
-
}
|
|
556
714
|
const reader = request.body.getReader();
|
|
557
715
|
const chunks = [];
|
|
558
716
|
function get_chunk(index) {
|
|
@@ -593,13 +751,13 @@ async function deserialize_binary_form(request) {
|
|
|
593
751
|
chunks2.push(chunk);
|
|
594
752
|
cursor += chunk.byteLength;
|
|
595
753
|
}
|
|
596
|
-
const
|
|
754
|
+
const buffer2 = new Uint8Array(length);
|
|
597
755
|
cursor = 0;
|
|
598
756
|
for (const chunk of chunks2) {
|
|
599
|
-
|
|
757
|
+
buffer2.set(chunk, cursor);
|
|
600
758
|
cursor += chunk.byteLength;
|
|
601
759
|
}
|
|
602
|
-
return
|
|
760
|
+
return buffer2;
|
|
603
761
|
}
|
|
604
762
|
const header = await get_buffer(0, HEADER_BYTES);
|
|
605
763
|
if (!header) throw deserialize_error("too short");
|
|
@@ -608,13 +766,7 @@ async function deserialize_binary_form(request) {
|
|
|
608
766
|
}
|
|
609
767
|
const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);
|
|
610
768
|
const data_length = header_view.getUint32(1, true);
|
|
611
|
-
if (HEADER_BYTES + data_length > content_length) {
|
|
612
|
-
throw deserialize_error("data overflow");
|
|
613
|
-
}
|
|
614
769
|
const file_offsets_length = header_view.getUint16(5, true);
|
|
615
|
-
if (HEADER_BYTES + data_length + file_offsets_length > content_length) {
|
|
616
|
-
throw deserialize_error("file offset table overflow");
|
|
617
|
-
}
|
|
618
770
|
const data_buffer = await get_buffer(HEADER_BYTES, data_length);
|
|
619
771
|
if (!data_buffer) throw deserialize_error("data too short");
|
|
620
772
|
let file_offsets;
|
|
@@ -622,7 +774,7 @@ async function deserialize_binary_form(request) {
|
|
|
622
774
|
if (file_offsets_length > 0) {
|
|
623
775
|
const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);
|
|
624
776
|
if (!file_offsets_buffer) throw deserialize_error("file offset table too short");
|
|
625
|
-
const parsed_offsets = JSON.parse(
|
|
777
|
+
const parsed_offsets = JSON.parse(decoder.decode(file_offsets_buffer));
|
|
626
778
|
if (!Array.isArray(parsed_offsets) || parsed_offsets.some((n) => typeof n !== "number" || !Number.isInteger(n) || n < 0)) {
|
|
627
779
|
throw deserialize_error("invalid file offset table");
|
|
628
780
|
}
|
|
@@ -631,7 +783,7 @@ async function deserialize_binary_form(request) {
|
|
|
631
783
|
files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
|
|
632
784
|
}
|
|
633
785
|
const file_spans = [];
|
|
634
|
-
const [data, meta] = parse(
|
|
786
|
+
const [data, meta] = parse(decoder.decode(data_buffer), {
|
|
635
787
|
File: ([name, type, size, last_modified, index]) => {
|
|
636
788
|
if (typeof name !== "string" || typeof type !== "string" || typeof size !== "number" || typeof last_modified !== "number" || typeof index !== "number") {
|
|
637
789
|
throw deserialize_error("invalid file metadata");
|
|
@@ -642,9 +794,6 @@ async function deserialize_binary_form(request) {
|
|
|
642
794
|
}
|
|
643
795
|
file_offsets[index] = void 0;
|
|
644
796
|
offset += files_start_offset;
|
|
645
|
-
if (offset + size > content_length) {
|
|
646
|
-
throw deserialize_error("file data overflow");
|
|
647
|
-
}
|
|
648
797
|
file_spans.push({ offset, size });
|
|
649
798
|
return new Proxy(new LazyFile(name, type, size, last_modified, get_chunk, offset), {
|
|
650
799
|
getPrototypeOf() {
|
|
@@ -787,7 +936,7 @@ class LazyFile {
|
|
|
787
936
|
});
|
|
788
937
|
}
|
|
789
938
|
async text() {
|
|
790
|
-
return
|
|
939
|
+
return decoder.decode(await this.arrayBuffer());
|
|
791
940
|
}
|
|
792
941
|
}
|
|
793
942
|
const path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/;
|
|
@@ -810,8 +959,8 @@ function deep_set(object, keys, value) {
|
|
|
810
959
|
const key = keys[i];
|
|
811
960
|
check_prototype_pollution(key);
|
|
812
961
|
const is_array = /^\d+$/.test(keys[i + 1]);
|
|
813
|
-
const
|
|
814
|
-
const
|
|
962
|
+
const inner = Object.hasOwn(current, key) ? current[key] : void 0;
|
|
963
|
+
const exists = inner != null;
|
|
815
964
|
if (exists && is_array !== Array.isArray(inner)) {
|
|
816
965
|
throw new Error(`Invalid array key ${keys[i + 1]}`);
|
|
817
966
|
}
|
|
@@ -859,6 +1008,13 @@ function negotiate(accept, types) {
|
|
|
859
1008
|
}
|
|
860
1009
|
return accepted;
|
|
861
1010
|
}
|
|
1011
|
+
function get_set_cookies(headers) {
|
|
1012
|
+
if (typeof headers.getSetCookie === "function") {
|
|
1013
|
+
return headers.getSetCookie();
|
|
1014
|
+
}
|
|
1015
|
+
const set_cookie = headers.get("set-cookie");
|
|
1016
|
+
return set_cookie ? splitCookiesString(set_cookie) : [];
|
|
1017
|
+
}
|
|
862
1018
|
function is_content_type(request, ...types) {
|
|
863
1019
|
const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? "";
|
|
864
1020
|
return types.includes(type.toLowerCase());
|
|
@@ -1029,24 +1185,88 @@ function get_node_type(node_id) {
|
|
|
1029
1185
|
const dot_parts = filename.split(".");
|
|
1030
1186
|
return dot_parts.slice(0, -1).join(".");
|
|
1031
1187
|
}
|
|
1188
|
+
function create_replacer(transport) {
|
|
1189
|
+
const replacer = (thing) => {
|
|
1190
|
+
for (const key in transport) {
|
|
1191
|
+
const encoded = transport[key].encode(thing);
|
|
1192
|
+
if (encoded) {
|
|
1193
|
+
return `app.decode('${key}', ${uneval(encoded, replacer)})`;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
return replacer;
|
|
1198
|
+
}
|
|
1032
1199
|
const INVALIDATED_PARAM = "x-sveltekit-invalidated";
|
|
1033
1200
|
const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
|
|
1034
1201
|
function stringify(data, transport) {
|
|
1035
1202
|
const encoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode]));
|
|
1036
1203
|
return stringify$1(data, encoders);
|
|
1037
1204
|
}
|
|
1205
|
+
const remote_object = "__skrao";
|
|
1206
|
+
const remote_map = "__skram";
|
|
1207
|
+
const remote_set = "__skras";
|
|
1208
|
+
function create_remote_arg_revivers(transport) {
|
|
1209
|
+
const remote_fns_revivers = {
|
|
1210
|
+
/** @type {(value: unknown) => unknown} */
|
|
1211
|
+
[remote_object]: (value) => value,
|
|
1212
|
+
/** @type {(value: unknown) => Map<unknown, unknown>} */
|
|
1213
|
+
[remote_map]: (value) => {
|
|
1214
|
+
if (!Array.isArray(value)) {
|
|
1215
|
+
throw new Error("Invalid data for Map reviver");
|
|
1216
|
+
}
|
|
1217
|
+
const map = /* @__PURE__ */ new Map();
|
|
1218
|
+
for (const item of value) {
|
|
1219
|
+
if (!Array.isArray(item) || item.length !== 2 || typeof item[0] !== "string" || typeof item[1] !== "string") {
|
|
1220
|
+
throw new Error("Invalid data for Map reviver");
|
|
1221
|
+
}
|
|
1222
|
+
const [key, val] = item;
|
|
1223
|
+
map.set(parse$1(key), parse$1(val));
|
|
1224
|
+
}
|
|
1225
|
+
return map;
|
|
1226
|
+
},
|
|
1227
|
+
/** @type {(value: unknown) => Set<unknown>} */
|
|
1228
|
+
[remote_set]: (value) => {
|
|
1229
|
+
if (!Array.isArray(value)) {
|
|
1230
|
+
throw new Error("Invalid data for Set reviver");
|
|
1231
|
+
}
|
|
1232
|
+
const set = /* @__PURE__ */ new Set();
|
|
1233
|
+
for (const item of value) {
|
|
1234
|
+
if (typeof item !== "string") {
|
|
1235
|
+
throw new Error("Invalid data for Set reviver");
|
|
1236
|
+
}
|
|
1237
|
+
set.add(parse$1(item));
|
|
1238
|
+
}
|
|
1239
|
+
return set;
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
const user_revivers = Object.fromEntries(
|
|
1243
|
+
Object.entries(transport).map(([k, v]) => [k, v.decode])
|
|
1244
|
+
);
|
|
1245
|
+
const all_revivers = { ...user_revivers, ...remote_fns_revivers };
|
|
1246
|
+
const parse$1 = (data) => parse(data, all_revivers);
|
|
1247
|
+
return all_revivers;
|
|
1248
|
+
}
|
|
1038
1249
|
function parse_remote_arg(string, transport) {
|
|
1039
1250
|
if (!string) return void 0;
|
|
1040
|
-
const json_string =
|
|
1251
|
+
const json_string = new TextDecoder().decode(
|
|
1041
1252
|
// no need to add back `=` characters, atob can handle it
|
|
1042
1253
|
base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))
|
|
1043
1254
|
);
|
|
1044
|
-
|
|
1045
|
-
return parse(json_string, decoders);
|
|
1255
|
+
return parse(json_string, create_remote_arg_revivers(transport));
|
|
1046
1256
|
}
|
|
1047
1257
|
function create_remote_key(id, payload) {
|
|
1048
1258
|
return id + "/" + payload;
|
|
1049
1259
|
}
|
|
1260
|
+
function split_remote_key(key) {
|
|
1261
|
+
const i = key.lastIndexOf("/");
|
|
1262
|
+
if (i === -1) {
|
|
1263
|
+
throw new Error(`Invalid remote key: ${key}`);
|
|
1264
|
+
}
|
|
1265
|
+
return {
|
|
1266
|
+
id: key.slice(0, i),
|
|
1267
|
+
payload: key.slice(i + 1)
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1050
1270
|
|
|
1051
1271
|
let public_env = {};
|
|
1052
1272
|
function set_private_env(environment) {
|
|
@@ -1074,8 +1294,9 @@ const options = {
|
|
|
1074
1294
|
root,
|
|
1075
1295
|
service_worker: false,
|
|
1076
1296
|
service_worker_options: void 0,
|
|
1297
|
+
server_error_boundaries: false,
|
|
1077
1298
|
templates: {
|
|
1078
|
-
app: ({ head, body, assets, nonce, env }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
|
1299
|
+
app: ({ head, body, assets, nonce, env }) => '<!doctype html>\n<html lang="en" data-theme="mint">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
|
|
1079
1300
|
error: ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
|
|
1080
1301
|
|
|
1081
1302
|
<style>
|
|
@@ -1147,7 +1368,7 @@ const options = {
|
|
|
1147
1368
|
<div class="error">
|
|
1148
1369
|
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
|
1149
1370
|
},
|
|
1150
|
-
version_hash: "
|
|
1371
|
+
version_hash: "afdn7"
|
|
1151
1372
|
};
|
|
1152
1373
|
async function get_hooks() {
|
|
1153
1374
|
let handle;
|
|
@@ -1179,6 +1400,7 @@ function with_resolvers() {
|
|
|
1179
1400
|
}
|
|
1180
1401
|
const NULL_BODY_STATUS = [101, 103, 204, 205, 304];
|
|
1181
1402
|
const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
|
|
1403
|
+
const s = JSON.stringify;
|
|
1182
1404
|
async function render_endpoint(event, event_state, mod, state) {
|
|
1183
1405
|
const method = (
|
|
1184
1406
|
/** @type {import('types').HttpMethod} */
|
|
@@ -1203,7 +1425,6 @@ async function render_endpoint(event, event_state, mod, state) {
|
|
|
1203
1425
|
}
|
|
1204
1426
|
}
|
|
1205
1427
|
try {
|
|
1206
|
-
event_state.allows_commands = true;
|
|
1207
1428
|
const response = await with_request_store(
|
|
1208
1429
|
{ event, state: event_state },
|
|
1209
1430
|
() => handler(
|
|
@@ -1365,7 +1586,7 @@ async function handle_action_json_request(event, event_state, options2, server)
|
|
|
1365
1586
|
check_named_default_separate(actions);
|
|
1366
1587
|
try {
|
|
1367
1588
|
const data = await call_action(event, event_state, actions);
|
|
1368
|
-
if (
|
|
1589
|
+
if (DEV) ;
|
|
1369
1590
|
if (data instanceof ActionFailure) {
|
|
1370
1591
|
return action_json({
|
|
1371
1592
|
type: "failure",
|
|
@@ -1450,7 +1671,7 @@ async function handle_action_request(event, event_state, server) {
|
|
|
1450
1671
|
check_named_default_separate(actions);
|
|
1451
1672
|
try {
|
|
1452
1673
|
const data = await call_action(event, event_state, actions);
|
|
1453
|
-
if (
|
|
1674
|
+
if (DEV) ;
|
|
1454
1675
|
if (data instanceof ActionFailure) {
|
|
1455
1676
|
return {
|
|
1456
1677
|
type: "failure",
|
|
@@ -1519,7 +1740,6 @@ async function call_action(event, event_state, actions) {
|
|
|
1519
1740
|
},
|
|
1520
1741
|
fn: async (current2) => {
|
|
1521
1742
|
const traced_event = merge_tracing(event, current2);
|
|
1522
|
-
event_state.allows_commands = true;
|
|
1523
1743
|
const result = await with_request_store(
|
|
1524
1744
|
{ event: traced_event, state: event_state },
|
|
1525
1745
|
() => action(traced_event)
|
|
@@ -1535,14 +1755,7 @@ async function call_action(event, event_state, actions) {
|
|
|
1535
1755
|
});
|
|
1536
1756
|
}
|
|
1537
1757
|
function uneval_action_response(data, route_id, transport) {
|
|
1538
|
-
const replacer = (
|
|
1539
|
-
for (const key2 in transport) {
|
|
1540
|
-
const encoded = transport[key2].encode(thing);
|
|
1541
|
-
if (encoded) {
|
|
1542
|
-
return `app.decode('${key2}', ${uneval(encoded, replacer)})`;
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1758
|
+
const replacer = create_replacer(transport);
|
|
1546
1759
|
return try_serialize(data, (value) => uneval(value, replacer), route_id);
|
|
1547
1760
|
}
|
|
1548
1761
|
function stringify_action_response(data, route_id, transport) {
|
|
@@ -1666,9 +1879,9 @@ function server_data_serializer(event, event_state, options2) {
|
|
|
1666
1879
|
strings[i] = "null";
|
|
1667
1880
|
return;
|
|
1668
1881
|
}
|
|
1669
|
-
const
|
|
1670
|
-
if (node.slash)
|
|
1671
|
-
strings[i] = uneval(
|
|
1882
|
+
const payload2 = { type: "data", data: node.data, uses: serialize_uses(node) };
|
|
1883
|
+
if (node.slash) payload2.slash = node.slash;
|
|
1884
|
+
strings[i] = uneval(payload2, get_replacer(i));
|
|
1672
1885
|
} catch (e) {
|
|
1673
1886
|
e.path = e.path.slice(1);
|
|
1674
1887
|
throw new Error(clarify_devalue_error(
|
|
@@ -1910,8 +2123,9 @@ async function load_data({
|
|
|
1910
2123
|
},
|
|
1911
2124
|
fn: async (current2) => {
|
|
1912
2125
|
const traced_event = merge_tracing(event, current2);
|
|
2126
|
+
const child_state = { ...event_state, is_in_universal_load: true };
|
|
1913
2127
|
return await with_request_store(
|
|
1914
|
-
{ event: traced_event, state:
|
|
2128
|
+
{ event: traced_event, state: child_state },
|
|
1915
2129
|
() => load.call(null, {
|
|
1916
2130
|
url: event.url,
|
|
1917
2131
|
params: event.params,
|
|
@@ -1919,8 +2133,7 @@ async function load_data({
|
|
|
1919
2133
|
route: event.route,
|
|
1920
2134
|
fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts),
|
|
1921
2135
|
setHeaders: event.setHeaders,
|
|
1922
|
-
depends:
|
|
1923
|
-
},
|
|
2136
|
+
depends: noop,
|
|
1924
2137
|
parent,
|
|
1925
2138
|
untrack: (fn) => fn(),
|
|
1926
2139
|
tracing: traced_event.tracing
|
|
@@ -1963,7 +2176,7 @@ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
|
|
|
1963
2176
|
let teed_body;
|
|
1964
2177
|
const proxy = new Proxy(response, {
|
|
1965
2178
|
get(response2, key2, receiver) {
|
|
1966
|
-
async function push_fetched(
|
|
2179
|
+
async function push_fetched(body, is_b64) {
|
|
1967
2180
|
const status_number = Number(response2.status);
|
|
1968
2181
|
if (isNaN(status_number)) {
|
|
1969
2182
|
throw new Error(
|
|
@@ -1978,7 +2191,7 @@ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
|
|
|
1978
2191
|
input instanceof Request && cloned_body ? await stream_to_string(cloned_body) : init2?.body
|
|
1979
2192
|
),
|
|
1980
2193
|
request_headers: cloned_headers,
|
|
1981
|
-
response_body:
|
|
2194
|
+
response_body: body,
|
|
1982
2195
|
response: response2,
|
|
1983
2196
|
is_b64
|
|
1984
2197
|
});
|
|
@@ -2020,26 +2233,26 @@ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
|
|
|
2020
2233
|
};
|
|
2021
2234
|
}
|
|
2022
2235
|
async function text2() {
|
|
2023
|
-
const
|
|
2024
|
-
if (
|
|
2236
|
+
const body = await response2.text();
|
|
2237
|
+
if (body === "" && NULL_BODY_STATUS.includes(response2.status)) {
|
|
2025
2238
|
await push_fetched(void 0, false);
|
|
2026
2239
|
return void 0;
|
|
2027
2240
|
}
|
|
2028
|
-
if (!
|
|
2029
|
-
await push_fetched(
|
|
2241
|
+
if (!body || typeof body === "string") {
|
|
2242
|
+
await push_fetched(body, false);
|
|
2030
2243
|
}
|
|
2031
2244
|
if (dependency) {
|
|
2032
|
-
dependency.body =
|
|
2245
|
+
dependency.body = body;
|
|
2033
2246
|
}
|
|
2034
|
-
return
|
|
2247
|
+
return body;
|
|
2035
2248
|
}
|
|
2036
2249
|
if (key2 === "text") {
|
|
2037
2250
|
return text2;
|
|
2038
2251
|
}
|
|
2039
2252
|
if (key2 === "json") {
|
|
2040
2253
|
return async () => {
|
|
2041
|
-
const
|
|
2042
|
-
return
|
|
2254
|
+
const body = await text2();
|
|
2255
|
+
return body ? JSON.parse(body) : void 0;
|
|
2043
2256
|
};
|
|
2044
2257
|
}
|
|
2045
2258
|
const value = Reflect.get(response2, key2, response2);
|
|
@@ -2080,20 +2293,21 @@ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
|
|
|
2080
2293
|
};
|
|
2081
2294
|
return (input, init2) => {
|
|
2082
2295
|
const response = universal_fetch(input, init2);
|
|
2083
|
-
response.catch(
|
|
2084
|
-
});
|
|
2296
|
+
response.catch(noop);
|
|
2085
2297
|
return response;
|
|
2086
2298
|
};
|
|
2087
2299
|
}
|
|
2088
2300
|
async function stream_to_string(stream) {
|
|
2089
2301
|
let result = "";
|
|
2090
2302
|
const reader = stream.getReader();
|
|
2303
|
+
const decoder = new TextDecoder();
|
|
2091
2304
|
while (true) {
|
|
2092
2305
|
const { done, value } = await reader.read();
|
|
2093
2306
|
if (done) {
|
|
2307
|
+
result += decoder.decode();
|
|
2094
2308
|
break;
|
|
2095
2309
|
}
|
|
2096
|
-
result +=
|
|
2310
|
+
result += decoder.decode(value, { stream: true });
|
|
2097
2311
|
}
|
|
2098
2312
|
return result;
|
|
2099
2313
|
}
|
|
@@ -2132,13 +2346,13 @@ function serialize_data(fetched, filter, prerendering = false) {
|
|
|
2132
2346
|
else if (key2 === "age") age = value;
|
|
2133
2347
|
else if (key2 === "vary" && value.trim() === "*") varyAny = true;
|
|
2134
2348
|
}
|
|
2135
|
-
const
|
|
2349
|
+
const payload2 = {
|
|
2136
2350
|
status: fetched.response.status,
|
|
2137
2351
|
statusText: fetched.response.statusText,
|
|
2138
2352
|
headers: headers2,
|
|
2139
2353
|
body: fetched.response_body
|
|
2140
2354
|
};
|
|
2141
|
-
const safe_payload = JSON.stringify(
|
|
2355
|
+
const safe_payload = JSON.stringify(payload2).replace(pattern, (match) => replacements[match]);
|
|
2142
2356
|
const attrs = [
|
|
2143
2357
|
'type="application/json"',
|
|
2144
2358
|
"data-sveltekit-fetched",
|
|
@@ -2166,7 +2380,6 @@ function serialize_data(fetched, filter, prerendering = false) {
|
|
|
2166
2380
|
}
|
|
2167
2381
|
return `<script ${attrs.join(" ")}>${safe_payload}<\/script>`;
|
|
2168
2382
|
}
|
|
2169
|
-
const s = JSON.stringify;
|
|
2170
2383
|
function sha256(data) {
|
|
2171
2384
|
if (!key[0]) precompute();
|
|
2172
2385
|
const out = init.slice(0);
|
|
@@ -2564,9 +2777,9 @@ function create_server_routing_response(route, params, url, manifest) {
|
|
|
2564
2777
|
});
|
|
2565
2778
|
if (route) {
|
|
2566
2779
|
const csr_route = generate_route_object(route, url, manifest);
|
|
2567
|
-
const
|
|
2780
|
+
const body = `${create_css_import(route, url, manifest)}
|
|
2568
2781
|
export const route = ${csr_route}; export const params = ${JSON.stringify(params)};`;
|
|
2569
|
-
return { response: text(
|
|
2782
|
+
return { response: text(body, { headers: headers2 }), body };
|
|
2570
2783
|
} else {
|
|
2571
2784
|
return { response: text("", { headers: headers2 }), body: "" };
|
|
2572
2785
|
}
|
|
@@ -2605,7 +2818,8 @@ async function render_response({
|
|
|
2605
2818
|
event_state,
|
|
2606
2819
|
resolve_opts,
|
|
2607
2820
|
action_result,
|
|
2608
|
-
data_serializer
|
|
2821
|
+
data_serializer,
|
|
2822
|
+
error_components
|
|
2609
2823
|
}) {
|
|
2610
2824
|
if (state.prerendering) {
|
|
2611
2825
|
if (options2.csp.mode === "nonce") {
|
|
@@ -2658,6 +2872,12 @@ async function render_response({
|
|
|
2658
2872
|
),
|
|
2659
2873
|
form: form_value
|
|
2660
2874
|
};
|
|
2875
|
+
if (error_components) {
|
|
2876
|
+
if (error2) {
|
|
2877
|
+
props.error = error2;
|
|
2878
|
+
}
|
|
2879
|
+
props.errors = error_components;
|
|
2880
|
+
}
|
|
2661
2881
|
let data2 = {};
|
|
2662
2882
|
for (let i = 0; i < branch.length; i += 1) {
|
|
2663
2883
|
data2 = { ...data2, ...branch[i].data };
|
|
@@ -2685,12 +2905,24 @@ async function render_response({
|
|
|
2685
2905
|
}
|
|
2686
2906
|
]
|
|
2687
2907
|
]),
|
|
2688
|
-
csp: csp.script_needs_nonce ? { nonce: csp.nonce } : { hash: csp.script_needs_hash }
|
|
2908
|
+
csp: csp.script_needs_nonce ? { nonce: csp.nonce } : { hash: csp.script_needs_hash },
|
|
2909
|
+
transformError: error_components ? (
|
|
2910
|
+
/** @param {unknown} e */
|
|
2911
|
+
(async (e) => {
|
|
2912
|
+
if (isRedirect(e)) {
|
|
2913
|
+
throw e;
|
|
2914
|
+
}
|
|
2915
|
+
const transformed2 = await handle_error_and_jsonify(event, event_state, options2, e);
|
|
2916
|
+
props.page.error = props.error = error2 = transformed2;
|
|
2917
|
+
props.page.status = status = get_status(e);
|
|
2918
|
+
return transformed2;
|
|
2919
|
+
})
|
|
2920
|
+
) : void 0
|
|
2689
2921
|
};
|
|
2690
2922
|
try {
|
|
2691
|
-
if (
|
|
2692
|
-
|
|
2693
|
-
rendered = await with_request_store({ event, state:
|
|
2923
|
+
if (DEV) ;
|
|
2924
|
+
const state2 = { ...event_state, is_in_render: true };
|
|
2925
|
+
rendered = await with_request_store({ event, state: state2 }, async () => {
|
|
2694
2926
|
if (relative) override({ base: base$1, assets: assets$1 });
|
|
2695
2927
|
const maybe_promise = options2.root.render(props, render_opts);
|
|
2696
2928
|
const rendered2 = options2.async && "then" in maybe_promise ? (
|
|
@@ -2712,25 +2944,25 @@ async function render_response({
|
|
|
2712
2944
|
} finally {
|
|
2713
2945
|
reset();
|
|
2714
2946
|
}
|
|
2715
|
-
for (const { node } of branch) {
|
|
2716
|
-
for (const url of node.imports) modulepreloads.add(url);
|
|
2717
|
-
for (const url of node.stylesheets) stylesheets.add(url);
|
|
2718
|
-
for (const url of node.fonts) fonts.add(url);
|
|
2719
|
-
if (node.inline_styles && !client.inline) {
|
|
2720
|
-
Object.entries(await node.inline_styles()).forEach(([filename, css]) => {
|
|
2721
|
-
if (typeof css === "string") {
|
|
2722
|
-
inline_styles.set(filename, css);
|
|
2723
|
-
return;
|
|
2724
|
-
}
|
|
2725
|
-
inline_styles.set(filename, css(`${assets$1}/${app_dir}/immutable/assets`, assets$1));
|
|
2726
|
-
});
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
2947
|
} else {
|
|
2730
2948
|
rendered = { head: "", html: "", css: { code: "", map: null }, hashes: { script: [] } };
|
|
2731
2949
|
}
|
|
2950
|
+
for (const { node } of branch) {
|
|
2951
|
+
for (const url of node.imports) modulepreloads.add(url);
|
|
2952
|
+
for (const url of node.stylesheets) stylesheets.add(url);
|
|
2953
|
+
for (const url of node.fonts) fonts.add(url);
|
|
2954
|
+
if (node.inline_styles && !client.inline) {
|
|
2955
|
+
Object.entries(await node.inline_styles()).forEach(([filename, css]) => {
|
|
2956
|
+
if (typeof css === "string") {
|
|
2957
|
+
inline_styles.set(filename, css);
|
|
2958
|
+
return;
|
|
2959
|
+
}
|
|
2960
|
+
inline_styles.set(filename, css(`${assets$1}/${app_dir}/immutable/assets`, assets$1));
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2732
2964
|
const head = new Head(rendered.head, !!state.prerendering);
|
|
2733
|
-
let
|
|
2965
|
+
let body = rendered.html;
|
|
2734
2966
|
const prefixed = (path) => {
|
|
2735
2967
|
if (path.startsWith("/")) {
|
|
2736
2968
|
return base + path;
|
|
@@ -2769,7 +3001,7 @@ async function render_response({
|
|
|
2769
3001
|
const global = get_global_name(options2);
|
|
2770
3002
|
const { data, chunks } = data_serializer.get_data(csp);
|
|
2771
3003
|
if (page_config.ssr && page_config.csr) {
|
|
2772
|
-
|
|
3004
|
+
body += `
|
|
2773
3005
|
${fetched.map(
|
|
2774
3006
|
(item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!state.prerendering)
|
|
2775
3007
|
).join("\n ")}`;
|
|
@@ -2885,28 +3117,60 @@ ${indent} ${hydrate.join(`,
|
|
|
2885
3117
|
${indent} `)}
|
|
2886
3118
|
${indent}}`);
|
|
2887
3119
|
}
|
|
2888
|
-
const {
|
|
2889
|
-
let
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
3120
|
+
const { remote } = event_state;
|
|
3121
|
+
let serialized_query_data = "";
|
|
3122
|
+
let serialized_prerender_data = "";
|
|
3123
|
+
if (remote.data) {
|
|
3124
|
+
const query = {};
|
|
3125
|
+
const prerender = {};
|
|
3126
|
+
for (const [internals, cache] of remote.data) {
|
|
3127
|
+
if (!internals.id) continue;
|
|
2894
3128
|
for (const key2 in cache) {
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
3129
|
+
const entry = cache[key2];
|
|
3130
|
+
if (!entry.serialize) continue;
|
|
3131
|
+
const remote_key = create_remote_key(internals.id, key2);
|
|
3132
|
+
const store = internals.type === "prerender" ? prerender : query;
|
|
3133
|
+
if (event_state.remote.refreshes?.has(remote_key) || event_state.remote.reconnects?.has(remote_key)) {
|
|
3134
|
+
store[remote_key] = await entry.data;
|
|
3135
|
+
} else {
|
|
3136
|
+
const result = await Promise.race([
|
|
3137
|
+
Promise.resolve(entry.data).then(
|
|
3138
|
+
(v) => (
|
|
3139
|
+
/** @type {const} */
|
|
3140
|
+
{ settled: true, value: v }
|
|
3141
|
+
),
|
|
3142
|
+
(e) => (
|
|
3143
|
+
/** @type {const} */
|
|
3144
|
+
{ settled: true, error: e }
|
|
3145
|
+
)
|
|
3146
|
+
),
|
|
3147
|
+
new Promise((resolve2) => {
|
|
3148
|
+
queueMicrotask(() => resolve2(
|
|
3149
|
+
/** @type {const} */
|
|
3150
|
+
{ settled: false }
|
|
3151
|
+
));
|
|
3152
|
+
})
|
|
3153
|
+
]);
|
|
3154
|
+
if (result.settled) {
|
|
3155
|
+
if ("error" in result) throw result.error;
|
|
3156
|
+
store[remote_key] = result.value;
|
|
3157
|
+
}
|
|
2903
3158
|
}
|
|
2904
3159
|
}
|
|
2905
|
-
}
|
|
2906
|
-
|
|
3160
|
+
}
|
|
3161
|
+
const replacer = create_replacer(options2.hooks.transport);
|
|
3162
|
+
if (Object.keys(query).length > 0) {
|
|
3163
|
+
serialized_query_data = `${global}.query = ${uneval(query, replacer)};
|
|
3164
|
+
|
|
3165
|
+
`;
|
|
3166
|
+
}
|
|
3167
|
+
if (Object.keys(prerender).length > 0) {
|
|
3168
|
+
serialized_prerender_data = `${global}.prerender = ${uneval(prerender, replacer)};
|
|
2907
3169
|
|
|
2908
3170
|
`;
|
|
3171
|
+
}
|
|
2909
3172
|
}
|
|
3173
|
+
const serialized_remote_data = `${serialized_query_data}${serialized_prerender_data}`;
|
|
2910
3174
|
const boot = client.inline ? `${client.inline.script}
|
|
2911
3175
|
|
|
2912
3176
|
${serialized_remote_data}${global}.app.start(${args.join(", ")});` : client.app ? `Promise.all([
|
|
@@ -2933,8 +3197,14 @@ ${indent}}`);
|
|
|
2933
3197
|
opts = `, ${s(service_worker_options)}`;
|
|
2934
3198
|
}
|
|
2935
3199
|
blocks.push(`if ('serviceWorker' in navigator) {
|
|
3200
|
+
const script_url = '${prefixed("service-worker.js")}';
|
|
3201
|
+
const policy = globalThis?.window?.trustedTypes?.createPolicy(
|
|
3202
|
+
'sveltekit-trusted-url',
|
|
3203
|
+
{ createScriptURL(url) { return url; } }
|
|
3204
|
+
);
|
|
3205
|
+
const sanitised = policy?.createScriptURL(script_url) ?? script_url;
|
|
2936
3206
|
addEventListener('load', function () {
|
|
2937
|
-
navigator.serviceWorker.register(
|
|
3207
|
+
navigator.serviceWorker.register(sanitised${opts});
|
|
2938
3208
|
});
|
|
2939
3209
|
}`);
|
|
2940
3210
|
}
|
|
@@ -2944,7 +3214,7 @@ ${indent}}`);
|
|
|
2944
3214
|
}
|
|
2945
3215
|
`;
|
|
2946
3216
|
csp.add_script(init_app);
|
|
2947
|
-
|
|
3217
|
+
body += `
|
|
2948
3218
|
<script${csp.script_needs_nonce ? ` nonce="${csp.nonce}"` : ""}>${init_app}<\/script>
|
|
2949
3219
|
`;
|
|
2950
3220
|
}
|
|
@@ -2977,7 +3247,7 @@ ${indent}}`);
|
|
|
2977
3247
|
}
|
|
2978
3248
|
const html = options2.templates.app({
|
|
2979
3249
|
head: head.build(),
|
|
2980
|
-
body
|
|
3250
|
+
body,
|
|
2981
3251
|
assets: assets$1,
|
|
2982
3252
|
nonce: (
|
|
2983
3253
|
/** @type {string} */
|
|
@@ -3079,6 +3349,7 @@ class Head {
|
|
|
3079
3349
|
}
|
|
3080
3350
|
}
|
|
3081
3351
|
class PageNodes {
|
|
3352
|
+
/** All layout nodes and the page node, if any */
|
|
3082
3353
|
data;
|
|
3083
3354
|
/**
|
|
3084
3355
|
* @param {Array<import('types').SSRNode | undefined>} nodes
|
|
@@ -3242,6 +3513,7 @@ async function respond_with_error({
|
|
|
3242
3513
|
status,
|
|
3243
3514
|
error: await handle_error_and_jsonify(event, event_state, options2, error2),
|
|
3244
3515
|
branch,
|
|
3516
|
+
error_components: [],
|
|
3245
3517
|
fetched,
|
|
3246
3518
|
event,
|
|
3247
3519
|
event_state,
|
|
@@ -3279,15 +3551,14 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
|
|
|
3279
3551
|
const module = await remotes[hash2]();
|
|
3280
3552
|
const fn = module.default[name];
|
|
3281
3553
|
if (!fn) error(404);
|
|
3282
|
-
const
|
|
3554
|
+
const internals = fn.__;
|
|
3283
3555
|
const transport = options2.hooks.transport;
|
|
3284
3556
|
event.tracing.current.setAttributes({
|
|
3285
|
-
"sveltekit.remote.call.type":
|
|
3286
|
-
"sveltekit.remote.call.name":
|
|
3557
|
+
"sveltekit.remote.call.type": internals.type,
|
|
3558
|
+
"sveltekit.remote.call.name": internals.name
|
|
3287
3559
|
});
|
|
3288
|
-
let form_client_refreshes;
|
|
3289
3560
|
try {
|
|
3290
|
-
if (
|
|
3561
|
+
if (internals.type === "query_batch") {
|
|
3291
3562
|
if (event.request.method !== "POST") {
|
|
3292
3563
|
throw new SvelteKitError(
|
|
3293
3564
|
405,
|
|
@@ -3297,9 +3568,12 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
|
|
|
3297
3568
|
}
|
|
3298
3569
|
const { payloads } = await event.request.json();
|
|
3299
3570
|
const args = await Promise.all(
|
|
3300
|
-
payloads.map((
|
|
3571
|
+
payloads.map((payload3) => parse_remote_arg(payload3, transport))
|
|
3572
|
+
);
|
|
3573
|
+
const results = await with_request_store(
|
|
3574
|
+
{ event, state },
|
|
3575
|
+
() => internals.run(args, options2)
|
|
3301
3576
|
);
|
|
3302
|
-
const results = await with_request_store({ event, state }, () => info.run(args, options2));
|
|
3303
3577
|
return json(
|
|
3304
3578
|
/** @type {RemoteFunctionResponse} */
|
|
3305
3579
|
{
|
|
@@ -3308,7 +3582,7 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
|
|
|
3308
3582
|
}
|
|
3309
3583
|
);
|
|
3310
3584
|
}
|
|
3311
|
-
if (
|
|
3585
|
+
if (internals.type === "form") {
|
|
3312
3586
|
if (event.request.method !== "POST") {
|
|
3313
3587
|
throw new SvelteKitError(
|
|
3314
3588
|
405,
|
|
@@ -3326,42 +3600,124 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
|
|
|
3326
3600
|
);
|
|
3327
3601
|
}
|
|
3328
3602
|
const { data: data2, meta, form_data } = await deserialize_binary_form(event.request);
|
|
3329
|
-
|
|
3603
|
+
state.remote.requested = create_requested_map(meta.remote_refreshes);
|
|
3330
3604
|
if (additional_args && !("id" in data2)) {
|
|
3331
3605
|
data2.id = JSON.parse(decodeURIComponent(additional_args));
|
|
3332
3606
|
}
|
|
3333
|
-
const fn2 =
|
|
3607
|
+
const fn2 = internals.fn;
|
|
3334
3608
|
const result = await with_request_store({ event, state }, () => fn2(data2, meta, form_data));
|
|
3335
3609
|
return json(
|
|
3336
3610
|
/** @type {RemoteFunctionResponse} */
|
|
3337
3611
|
{
|
|
3338
3612
|
type: "result",
|
|
3339
3613
|
result: stringify(result, transport),
|
|
3340
|
-
refreshes: result.issues ? void 0 : await
|
|
3614
|
+
refreshes: result.issues ? void 0 : await serialize_singleflight(state.remote.refreshes),
|
|
3615
|
+
reconnects: result.issues ? void 0 : await serialize_singleflight(state.remote.reconnects)
|
|
3341
3616
|
}
|
|
3342
3617
|
);
|
|
3343
3618
|
}
|
|
3344
|
-
if (
|
|
3345
|
-
const { payload:
|
|
3346
|
-
|
|
3619
|
+
if (internals.type === "command") {
|
|
3620
|
+
const { payload: payload3, refreshes } = await event.request.json();
|
|
3621
|
+
state.remote.requested = create_requested_map(refreshes);
|
|
3622
|
+
const arg = parse_remote_arg(payload3, transport);
|
|
3347
3623
|
const data2 = await with_request_store({ event, state }, () => fn(arg));
|
|
3348
3624
|
return json(
|
|
3349
3625
|
/** @type {RemoteFunctionResponse} */
|
|
3350
3626
|
{
|
|
3351
3627
|
type: "result",
|
|
3352
3628
|
result: stringify(data2, transport),
|
|
3353
|
-
refreshes: await
|
|
3629
|
+
refreshes: await serialize_singleflight(state.remote.refreshes),
|
|
3630
|
+
reconnects: await serialize_singleflight(state.remote.reconnects)
|
|
3354
3631
|
}
|
|
3355
3632
|
);
|
|
3356
3633
|
}
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3634
|
+
if (internals.type === "query_live") {
|
|
3635
|
+
let send = function(controller, payload4) {
|
|
3636
|
+
controller.enqueue(encoder.encode(JSON.stringify(payload4) + "\n"));
|
|
3637
|
+
};
|
|
3638
|
+
if (event.request.method !== "GET") {
|
|
3639
|
+
throw new SvelteKitError(
|
|
3640
|
+
405,
|
|
3641
|
+
"Method Not Allowed",
|
|
3642
|
+
`\`query.live\` functions must be invoked via GET request, not ${event.request.method}`
|
|
3643
|
+
);
|
|
3644
|
+
}
|
|
3645
|
+
const payload3 = (
|
|
3646
|
+
/** @type {string} */
|
|
3647
|
+
new URL(event.request.url).searchParams.get("payload")
|
|
3648
|
+
);
|
|
3649
|
+
const generator = internals.run(event, state, parse_remote_arg(payload3, transport));
|
|
3650
|
+
const encoder = new TextEncoder();
|
|
3651
|
+
let closed = false;
|
|
3652
|
+
let result = void 0;
|
|
3653
|
+
async function cancel() {
|
|
3654
|
+
if (closed) return;
|
|
3655
|
+
closed = true;
|
|
3656
|
+
await generator.return(void 0);
|
|
3657
|
+
}
|
|
3658
|
+
event.request.signal.addEventListener("abort", cancel, { once: true });
|
|
3659
|
+
return new Response(
|
|
3660
|
+
new ReadableStream({
|
|
3661
|
+
async pull(controller) {
|
|
3662
|
+
if (event.request.signal.aborted) {
|
|
3663
|
+
await cancel();
|
|
3664
|
+
controller.close();
|
|
3665
|
+
return;
|
|
3666
|
+
}
|
|
3667
|
+
try {
|
|
3668
|
+
while (true) {
|
|
3669
|
+
const { value, done } = await generator.next();
|
|
3670
|
+
if (done) {
|
|
3671
|
+
await cancel();
|
|
3672
|
+
controller.close();
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3675
|
+
if (result !== (result = stringify(value, transport))) {
|
|
3676
|
+
send(controller, {
|
|
3677
|
+
type: "result",
|
|
3678
|
+
result
|
|
3679
|
+
});
|
|
3680
|
+
return;
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3683
|
+
} catch (error2) {
|
|
3684
|
+
if (!event.request.signal.aborted) {
|
|
3685
|
+
if (error2 instanceof Redirect) {
|
|
3686
|
+
send(controller, {
|
|
3687
|
+
type: "redirect",
|
|
3688
|
+
location: error2.location
|
|
3689
|
+
});
|
|
3690
|
+
} else {
|
|
3691
|
+
const status = error2 instanceof HttpError || error2 instanceof SvelteKitError ? error2.status : 500;
|
|
3692
|
+
send(controller, {
|
|
3693
|
+
type: "error",
|
|
3694
|
+
error: await handle_error_and_jsonify(event, state, options2, error2),
|
|
3695
|
+
status
|
|
3696
|
+
});
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3699
|
+
await cancel();
|
|
3700
|
+
controller.close();
|
|
3701
|
+
}
|
|
3702
|
+
},
|
|
3703
|
+
cancel
|
|
3704
|
+
}),
|
|
3705
|
+
{
|
|
3706
|
+
headers: {
|
|
3707
|
+
"cache-control": "private, no-store",
|
|
3708
|
+
"content-type": "application/x-ndjson"
|
|
3709
|
+
}
|
|
3710
|
+
}
|
|
3711
|
+
);
|
|
3712
|
+
}
|
|
3713
|
+
const payload2 = internals.type === "prerender" ? additional_args : (
|
|
3714
|
+
/** @type {string} */
|
|
3715
|
+
// new URL(...) necessary because we're hiding the URL from the user in the event object
|
|
3716
|
+
new URL(event.request.url).searchParams.get("payload")
|
|
3717
|
+
);
|
|
3718
|
+
const data = await with_request_store(
|
|
3363
3719
|
{ event, state },
|
|
3364
|
-
() => fn(parse_remote_arg(
|
|
3720
|
+
() => fn(parse_remote_arg(payload2, transport))
|
|
3365
3721
|
);
|
|
3366
3722
|
return json(
|
|
3367
3723
|
/** @type {RemoteFunctionResponse} */
|
|
@@ -3377,7 +3733,8 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
|
|
|
3377
3733
|
{
|
|
3378
3734
|
type: "redirect",
|
|
3379
3735
|
location: error2.location,
|
|
3380
|
-
refreshes: await
|
|
3736
|
+
refreshes: await serialize_singleflight(state.remote.refreshes),
|
|
3737
|
+
reconnects: await serialize_singleflight(state.remote.reconnects)
|
|
3381
3738
|
}
|
|
3382
3739
|
);
|
|
3383
3740
|
}
|
|
@@ -3399,34 +3756,43 @@ async function handle_remote_call_internal(event, state, options2, manifest, id)
|
|
|
3399
3756
|
}
|
|
3400
3757
|
);
|
|
3401
3758
|
}
|
|
3402
|
-
async function
|
|
3403
|
-
|
|
3404
|
-
if (client_refreshes) {
|
|
3405
|
-
for (const key2 of client_refreshes) {
|
|
3406
|
-
if (refreshes[key2] !== void 0) continue;
|
|
3407
|
-
const [hash3, name2, payload] = key2.split("/");
|
|
3408
|
-
const loader = manifest._.remotes[hash3];
|
|
3409
|
-
const fn2 = (await loader?.())?.default?.[name2];
|
|
3410
|
-
if (!fn2) error(400, "Bad Request");
|
|
3411
|
-
refreshes[key2] = with_request_store(
|
|
3412
|
-
{ event, state },
|
|
3413
|
-
() => fn2(parse_remote_arg(payload, transport))
|
|
3414
|
-
);
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
|
-
if (Object.keys(refreshes).length === 0) {
|
|
3759
|
+
async function serialize_singleflight(map) {
|
|
3760
|
+
if (!map || map.size === 0) {
|
|
3418
3761
|
return void 0;
|
|
3419
3762
|
}
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
)
|
|
3425
|
-
|
|
3426
|
-
|
|
3763
|
+
const results = await Promise.all(
|
|
3764
|
+
Array.from(map, async ([key2, promise]) => {
|
|
3765
|
+
try {
|
|
3766
|
+
return [key2, { type: "result", data: await promise }];
|
|
3767
|
+
} catch (error2) {
|
|
3768
|
+
const status = error2 instanceof HttpError || error2 instanceof SvelteKitError ? error2.status : 500;
|
|
3769
|
+
return [
|
|
3770
|
+
key2,
|
|
3771
|
+
{
|
|
3772
|
+
type: "error",
|
|
3773
|
+
status,
|
|
3774
|
+
error: await handle_error_and_jsonify(event, state, options2, error2)
|
|
3775
|
+
}
|
|
3776
|
+
];
|
|
3777
|
+
}
|
|
3778
|
+
})
|
|
3427
3779
|
);
|
|
3780
|
+
return stringify(Object.fromEntries(results), transport);
|
|
3428
3781
|
}
|
|
3429
3782
|
}
|
|
3783
|
+
function create_requested_map(refreshes) {
|
|
3784
|
+
const requested = /* @__PURE__ */ new Map();
|
|
3785
|
+
for (const key2 of refreshes ?? []) {
|
|
3786
|
+
const parts = split_remote_key(key2);
|
|
3787
|
+
const existing = requested.get(parts.id);
|
|
3788
|
+
if (existing) {
|
|
3789
|
+
existing.push(parts.payload);
|
|
3790
|
+
} else {
|
|
3791
|
+
requested.set(parts.id, [parts.payload]);
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
return requested;
|
|
3795
|
+
}
|
|
3430
3796
|
async function handle_remote_form_post(event, state, manifest, id) {
|
|
3431
3797
|
return record_span({
|
|
3432
3798
|
name: "sveltekit.remote.form.post",
|
|
@@ -3468,7 +3834,7 @@ async function handle_remote_form_post_internal(event, state, manifest, id) {
|
|
|
3468
3834
|
}
|
|
3469
3835
|
try {
|
|
3470
3836
|
const fn = (
|
|
3471
|
-
/** @type {
|
|
3837
|
+
/** @type {RemoteFormInternals} */
|
|
3472
3838
|
/** @type {any} */
|
|
3473
3839
|
form.__.fn
|
|
3474
3840
|
);
|
|
@@ -3516,7 +3882,7 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3516
3882
|
}
|
|
3517
3883
|
try {
|
|
3518
3884
|
const leaf_node = (
|
|
3519
|
-
/** @type {
|
|
3885
|
+
/** @type {SSRNode} */
|
|
3520
3886
|
nodes.page()
|
|
3521
3887
|
);
|
|
3522
3888
|
let status = 200;
|
|
@@ -3556,9 +3922,17 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3556
3922
|
const ssr = nodes.ssr();
|
|
3557
3923
|
const csr = nodes.csr();
|
|
3558
3924
|
if (ssr === false && !(state.prerendering && should_prerender_data)) {
|
|
3559
|
-
if (
|
|
3925
|
+
if (DEV && action_result && !event.request.headers.has("x-sveltekit-action")) ;
|
|
3560
3926
|
return await render_response({
|
|
3561
|
-
|
|
3927
|
+
// provide nodes without running load functions so that the styles and
|
|
3928
|
+
// fonts are linked in the head before CSR takes over
|
|
3929
|
+
branch: compact(nodes.data).map((node) => {
|
|
3930
|
+
return {
|
|
3931
|
+
node,
|
|
3932
|
+
data: null,
|
|
3933
|
+
server_data: null
|
|
3934
|
+
};
|
|
3935
|
+
}),
|
|
3562
3936
|
fetched,
|
|
3563
3937
|
page_config: {
|
|
3564
3938
|
ssr: false,
|
|
@@ -3642,10 +4016,8 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3642
4016
|
}
|
|
3643
4017
|
});
|
|
3644
4018
|
});
|
|
3645
|
-
for (const p of server_promises) p.catch(
|
|
3646
|
-
|
|
3647
|
-
for (const p of load_promises) p.catch(() => {
|
|
3648
|
-
});
|
|
4019
|
+
for (const p of server_promises) p.catch(noop);
|
|
4020
|
+
for (const p of load_promises) p.catch(noop);
|
|
3649
4021
|
for (let i = 0; i < nodes.data.length; i += 1) {
|
|
3650
4022
|
const node = nodes.data[i];
|
|
3651
4023
|
if (node) {
|
|
@@ -3657,13 +4029,13 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3657
4029
|
const err = normalize_error(e);
|
|
3658
4030
|
if (err instanceof Redirect) {
|
|
3659
4031
|
if (state.prerendering && should_prerender_data) {
|
|
3660
|
-
const
|
|
4032
|
+
const body = JSON.stringify({
|
|
3661
4033
|
type: "redirect",
|
|
3662
4034
|
location: err.location
|
|
3663
4035
|
});
|
|
3664
4036
|
state.prerendering.dependencies.set(data_pathname, {
|
|
3665
|
-
response: text(
|
|
3666
|
-
body
|
|
4037
|
+
response: text(body),
|
|
4038
|
+
body
|
|
3667
4039
|
});
|
|
3668
4040
|
}
|
|
3669
4041
|
return redirect_response(err.status, err.location);
|
|
@@ -3682,6 +4054,11 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3682
4054
|
data_serializer.set_max_nodes(j + 1);
|
|
3683
4055
|
const layouts = compact(branch.slice(0, j + 1));
|
|
3684
4056
|
const nodes2 = new PageNodes(layouts.map((layout) => layout.node));
|
|
4057
|
+
const error_branch = layouts.concat({
|
|
4058
|
+
node: node2,
|
|
4059
|
+
data: null,
|
|
4060
|
+
server_data: null
|
|
4061
|
+
});
|
|
3685
4062
|
return await render_response({
|
|
3686
4063
|
event,
|
|
3687
4064
|
event_state,
|
|
@@ -3695,11 +4072,14 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3695
4072
|
},
|
|
3696
4073
|
status: status2,
|
|
3697
4074
|
error: error2,
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
4075
|
+
error_components: await load_error_components(
|
|
4076
|
+
options2,
|
|
4077
|
+
ssr,
|
|
4078
|
+
error_branch,
|
|
4079
|
+
page,
|
|
4080
|
+
manifest
|
|
4081
|
+
),
|
|
4082
|
+
branch: error_branch,
|
|
3703
4083
|
fetched,
|
|
3704
4084
|
data_serializer
|
|
3705
4085
|
});
|
|
@@ -3736,10 +4116,11 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3736
4116
|
},
|
|
3737
4117
|
status,
|
|
3738
4118
|
error: null,
|
|
3739
|
-
branch:
|
|
4119
|
+
branch: compact(branch),
|
|
3740
4120
|
action_result,
|
|
3741
4121
|
fetched,
|
|
3742
|
-
data_serializer: ssr
|
|
4122
|
+
data_serializer: !ssr ? server_data_serializer(event, event_state, options2) : data_serializer,
|
|
4123
|
+
error_components: await load_error_components(options2, ssr, branch, page, manifest)
|
|
3743
4124
|
});
|
|
3744
4125
|
} catch (e) {
|
|
3745
4126
|
if (e instanceof Redirect) {
|
|
@@ -3757,14 +4138,25 @@ async function render_page(event, event_state, page, options2, manifest, state,
|
|
|
3757
4138
|
});
|
|
3758
4139
|
}
|
|
3759
4140
|
}
|
|
3760
|
-
function
|
|
3761
|
-
let
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
4141
|
+
async function load_error_components(options2, ssr, branch, page, manifest) {
|
|
4142
|
+
let error_components;
|
|
4143
|
+
if (options2.server_error_boundaries && ssr) {
|
|
4144
|
+
let last_idx = -1;
|
|
4145
|
+
error_components = await Promise.all(
|
|
4146
|
+
// eslint-disable-next-line @typescript-eslint/await-thenable
|
|
4147
|
+
branch.map((b, i) => {
|
|
4148
|
+
if (i === 0) return void 0;
|
|
4149
|
+
if (!b) return null;
|
|
4150
|
+
i--;
|
|
4151
|
+
while (i > last_idx + 1 && page.errors[i] === void 0) i -= 1;
|
|
4152
|
+
last_idx = i;
|
|
4153
|
+
const idx = page.errors[i];
|
|
4154
|
+
if (idx == null) return void 0;
|
|
4155
|
+
return manifest._.nodes[idx]?.().then((e) => e.component?.()).catch(() => void 0);
|
|
4156
|
+
}).filter((e) => e !== null)
|
|
4157
|
+
);
|
|
4158
|
+
}
|
|
4159
|
+
return error_components;
|
|
3768
4160
|
}
|
|
3769
4161
|
async function render_data(event, event_state, route, options2, manifest, state, invalidated_data_nodes, trailing_slash) {
|
|
3770
4162
|
if (!route.page) {
|
|
@@ -3910,7 +4302,7 @@ function requireDist() {
|
|
|
3910
4302
|
dist.stringifyCookie = stringifyCookie;
|
|
3911
4303
|
dist.stringifySetCookie = stringifySetCookie;
|
|
3912
4304
|
dist.serialize = stringifySetCookie;
|
|
3913
|
-
dist.parseSetCookie =
|
|
4305
|
+
dist.parseSetCookie = parseSetCookie;
|
|
3914
4306
|
dist.stringifySetCookie = stringifySetCookie;
|
|
3915
4307
|
dist.serialize = stringifySetCookie;
|
|
3916
4308
|
const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
|
|
@@ -4047,7 +4439,7 @@ function requireDist() {
|
|
|
4047
4439
|
}
|
|
4048
4440
|
return str;
|
|
4049
4441
|
}
|
|
4050
|
-
function
|
|
4442
|
+
function parseSetCookie(str, options2) {
|
|
4051
4443
|
const dec = options2?.decode || decode;
|
|
4052
4444
|
const len = str.length;
|
|
4053
4445
|
const endIdx = endIndex(str, 0, len);
|
|
@@ -4310,193 +4702,6 @@ function add_cookies_to_headers(headers2, cookies) {
|
|
|
4310
4702
|
}
|
|
4311
4703
|
}
|
|
4312
4704
|
}
|
|
4313
|
-
var defaultParseOptions = {
|
|
4314
|
-
decodeValues: true,
|
|
4315
|
-
map: false,
|
|
4316
|
-
silent: false,
|
|
4317
|
-
split: "auto"
|
|
4318
|
-
// auto = split strings but not arrays
|
|
4319
|
-
};
|
|
4320
|
-
function isForbiddenKey(key2) {
|
|
4321
|
-
return typeof key2 !== "string" || key2 in {};
|
|
4322
|
-
}
|
|
4323
|
-
function createNullObj() {
|
|
4324
|
-
return /* @__PURE__ */ Object.create(null);
|
|
4325
|
-
}
|
|
4326
|
-
function isNonEmptyString(str) {
|
|
4327
|
-
return typeof str === "string" && !!str.trim();
|
|
4328
|
-
}
|
|
4329
|
-
function parseString(setCookieValue, options2) {
|
|
4330
|
-
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
4331
|
-
var nameValuePairStr = parts.shift();
|
|
4332
|
-
var parsed = parseNameValuePair(nameValuePairStr);
|
|
4333
|
-
var name = parsed.name;
|
|
4334
|
-
var value = parsed.value;
|
|
4335
|
-
options2 = options2 ? Object.assign({}, defaultParseOptions, options2) : defaultParseOptions;
|
|
4336
|
-
if (isForbiddenKey(name)) {
|
|
4337
|
-
return null;
|
|
4338
|
-
}
|
|
4339
|
-
try {
|
|
4340
|
-
value = options2.decodeValues ? decodeURIComponent(value) : value;
|
|
4341
|
-
} catch (e) {
|
|
4342
|
-
console.error(
|
|
4343
|
-
"set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
|
|
4344
|
-
e
|
|
4345
|
-
);
|
|
4346
|
-
}
|
|
4347
|
-
var cookie = createNullObj();
|
|
4348
|
-
cookie.name = name;
|
|
4349
|
-
cookie.value = value;
|
|
4350
|
-
parts.forEach(function(part) {
|
|
4351
|
-
var sides = part.split("=");
|
|
4352
|
-
var key2 = sides.shift().trimLeft().toLowerCase();
|
|
4353
|
-
if (isForbiddenKey(key2)) {
|
|
4354
|
-
return;
|
|
4355
|
-
}
|
|
4356
|
-
var value2 = sides.join("=");
|
|
4357
|
-
if (key2 === "expires") {
|
|
4358
|
-
cookie.expires = new Date(value2);
|
|
4359
|
-
} else if (key2 === "max-age") {
|
|
4360
|
-
var n = parseInt(value2, 10);
|
|
4361
|
-
if (!Number.isNaN(n)) cookie.maxAge = n;
|
|
4362
|
-
} else if (key2 === "secure") {
|
|
4363
|
-
cookie.secure = true;
|
|
4364
|
-
} else if (key2 === "httponly") {
|
|
4365
|
-
cookie.httpOnly = true;
|
|
4366
|
-
} else if (key2 === "samesite") {
|
|
4367
|
-
cookie.sameSite = value2;
|
|
4368
|
-
} else if (key2 === "partitioned") {
|
|
4369
|
-
cookie.partitioned = true;
|
|
4370
|
-
} else if (key2) {
|
|
4371
|
-
cookie[key2] = value2;
|
|
4372
|
-
}
|
|
4373
|
-
});
|
|
4374
|
-
return cookie;
|
|
4375
|
-
}
|
|
4376
|
-
function parseNameValuePair(nameValuePairStr) {
|
|
4377
|
-
var name = "";
|
|
4378
|
-
var value = "";
|
|
4379
|
-
var nameValueArr = nameValuePairStr.split("=");
|
|
4380
|
-
if (nameValueArr.length > 1) {
|
|
4381
|
-
name = nameValueArr.shift();
|
|
4382
|
-
value = nameValueArr.join("=");
|
|
4383
|
-
} else {
|
|
4384
|
-
value = nameValuePairStr;
|
|
4385
|
-
}
|
|
4386
|
-
return { name, value };
|
|
4387
|
-
}
|
|
4388
|
-
function parseSetCookie(input, options2) {
|
|
4389
|
-
options2 = options2 ? Object.assign({}, defaultParseOptions, options2) : defaultParseOptions;
|
|
4390
|
-
if (!input) {
|
|
4391
|
-
if (!options2.map) {
|
|
4392
|
-
return [];
|
|
4393
|
-
} else {
|
|
4394
|
-
return createNullObj();
|
|
4395
|
-
}
|
|
4396
|
-
}
|
|
4397
|
-
if (input.headers) {
|
|
4398
|
-
if (typeof input.headers.getSetCookie === "function") {
|
|
4399
|
-
input = input.headers.getSetCookie();
|
|
4400
|
-
} else if (input.headers["set-cookie"]) {
|
|
4401
|
-
input = input.headers["set-cookie"];
|
|
4402
|
-
} else {
|
|
4403
|
-
var sch = input.headers[Object.keys(input.headers).find(function(key2) {
|
|
4404
|
-
return key2.toLowerCase() === "set-cookie";
|
|
4405
|
-
})];
|
|
4406
|
-
if (!sch && input.headers.cookie && !options2.silent) {
|
|
4407
|
-
console.warn(
|
|
4408
|
-
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
4409
|
-
);
|
|
4410
|
-
}
|
|
4411
|
-
input = sch;
|
|
4412
|
-
}
|
|
4413
|
-
}
|
|
4414
|
-
var split = options2.split;
|
|
4415
|
-
var isArray = Array.isArray(input);
|
|
4416
|
-
if (split === "auto") {
|
|
4417
|
-
split = !isArray;
|
|
4418
|
-
}
|
|
4419
|
-
if (!isArray) {
|
|
4420
|
-
input = [input];
|
|
4421
|
-
}
|
|
4422
|
-
input = input.filter(isNonEmptyString);
|
|
4423
|
-
if (split) {
|
|
4424
|
-
input = input.map(splitCookiesString).flat();
|
|
4425
|
-
}
|
|
4426
|
-
if (!options2.map) {
|
|
4427
|
-
return input.map(function(str) {
|
|
4428
|
-
return parseString(str, options2);
|
|
4429
|
-
}).filter(Boolean);
|
|
4430
|
-
} else {
|
|
4431
|
-
var cookies = createNullObj();
|
|
4432
|
-
return input.reduce(function(cookies2, str) {
|
|
4433
|
-
var cookie = parseString(str, options2);
|
|
4434
|
-
if (cookie && !isForbiddenKey(cookie.name)) {
|
|
4435
|
-
cookies2[cookie.name] = cookie;
|
|
4436
|
-
}
|
|
4437
|
-
return cookies2;
|
|
4438
|
-
}, cookies);
|
|
4439
|
-
}
|
|
4440
|
-
}
|
|
4441
|
-
function splitCookiesString(cookiesString) {
|
|
4442
|
-
if (Array.isArray(cookiesString)) {
|
|
4443
|
-
return cookiesString;
|
|
4444
|
-
}
|
|
4445
|
-
if (typeof cookiesString !== "string") {
|
|
4446
|
-
return [];
|
|
4447
|
-
}
|
|
4448
|
-
var cookiesStrings = [];
|
|
4449
|
-
var pos = 0;
|
|
4450
|
-
var start;
|
|
4451
|
-
var ch;
|
|
4452
|
-
var lastComma;
|
|
4453
|
-
var nextStart;
|
|
4454
|
-
var cookiesSeparatorFound;
|
|
4455
|
-
function skipWhitespace() {
|
|
4456
|
-
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
4457
|
-
pos += 1;
|
|
4458
|
-
}
|
|
4459
|
-
return pos < cookiesString.length;
|
|
4460
|
-
}
|
|
4461
|
-
function notSpecialChar() {
|
|
4462
|
-
ch = cookiesString.charAt(pos);
|
|
4463
|
-
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
4464
|
-
}
|
|
4465
|
-
while (pos < cookiesString.length) {
|
|
4466
|
-
start = pos;
|
|
4467
|
-
cookiesSeparatorFound = false;
|
|
4468
|
-
while (skipWhitespace()) {
|
|
4469
|
-
ch = cookiesString.charAt(pos);
|
|
4470
|
-
if (ch === ",") {
|
|
4471
|
-
lastComma = pos;
|
|
4472
|
-
pos += 1;
|
|
4473
|
-
skipWhitespace();
|
|
4474
|
-
nextStart = pos;
|
|
4475
|
-
while (pos < cookiesString.length && notSpecialChar()) {
|
|
4476
|
-
pos += 1;
|
|
4477
|
-
}
|
|
4478
|
-
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
4479
|
-
cookiesSeparatorFound = true;
|
|
4480
|
-
pos = nextStart;
|
|
4481
|
-
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
4482
|
-
start = pos;
|
|
4483
|
-
} else {
|
|
4484
|
-
pos = lastComma + 1;
|
|
4485
|
-
}
|
|
4486
|
-
} else {
|
|
4487
|
-
pos += 1;
|
|
4488
|
-
}
|
|
4489
|
-
}
|
|
4490
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
4491
|
-
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
4492
|
-
}
|
|
4493
|
-
}
|
|
4494
|
-
return cookiesStrings;
|
|
4495
|
-
}
|
|
4496
|
-
parseSetCookie.parseSetCookie = parseSetCookie;
|
|
4497
|
-
parseSetCookie.parse = parseSetCookie;
|
|
4498
|
-
parseSetCookie.parseString = parseString;
|
|
4499
|
-
parseSetCookie.splitCookiesString = splitCookiesString;
|
|
4500
4705
|
function create_fetch({ event, options: options2, manifest, state, get_cookie_header, set_internal }) {
|
|
4501
4706
|
const server_fetch = async (info, init2) => {
|
|
4502
4707
|
const original_request = normalize_fetch_input(info, init2, event.url);
|
|
@@ -4574,20 +4779,17 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
|
|
|
4574
4779
|
);
|
|
4575
4780
|
}
|
|
4576
4781
|
const response = await internal_fetch(request, options2, manifest, state);
|
|
4577
|
-
const
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
options3
|
|
4589
|
-
});
|
|
4590
|
-
}
|
|
4782
|
+
for (const str of get_set_cookies(response.headers)) {
|
|
4783
|
+
const { name, value, ...options3 } = parseString(str, {
|
|
4784
|
+
decodeValues: false
|
|
4785
|
+
});
|
|
4786
|
+
const path = options3.path ?? (url.pathname.split("/").slice(0, -1).join("/") || "/");
|
|
4787
|
+
set_internal(name, value, {
|
|
4788
|
+
path,
|
|
4789
|
+
encode: (value2) => value2,
|
|
4790
|
+
.../** @type {import('cookie').CookieSerializeOptions} */
|
|
4791
|
+
options3
|
|
4792
|
+
});
|
|
4591
4793
|
}
|
|
4592
4794
|
return response;
|
|
4593
4795
|
}
|
|
@@ -4595,8 +4797,7 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
|
|
|
4595
4797
|
};
|
|
4596
4798
|
return (input, init2) => {
|
|
4597
4799
|
const response = server_fetch(input, init2);
|
|
4598
|
-
response.catch(
|
|
4599
|
-
});
|
|
4800
|
+
response.catch(noop);
|
|
4600
4801
|
return response;
|
|
4601
4802
|
};
|
|
4602
4803
|
}
|
|
@@ -4611,8 +4812,7 @@ async function internal_fetch(request, options2, manifest, state) {
|
|
|
4611
4812
|
if (request.signal.aborted) {
|
|
4612
4813
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
4613
4814
|
}
|
|
4614
|
-
let remove_abort_listener =
|
|
4615
|
-
};
|
|
4815
|
+
let remove_abort_listener = noop;
|
|
4616
4816
|
const abort_promise = new Promise((_, reject) => {
|
|
4617
4817
|
const on_abort = () => {
|
|
4618
4818
|
reject(new DOMException("The operation was aborted.", "AbortError"));
|
|
@@ -4636,11 +4836,13 @@ async function internal_fetch(request, options2, manifest, state) {
|
|
|
4636
4836
|
});
|
|
4637
4837
|
}
|
|
4638
4838
|
}
|
|
4639
|
-
let
|
|
4839
|
+
let payload;
|
|
4640
4840
|
let etag;
|
|
4641
4841
|
let headers;
|
|
4642
4842
|
function get_public_env(request) {
|
|
4643
|
-
|
|
4843
|
+
const script = request.url.endsWith(".script.js");
|
|
4844
|
+
const env = public_env;
|
|
4845
|
+
payload ??= uneval(env);
|
|
4644
4846
|
etag ??= `W/${Date.now()}`;
|
|
4645
4847
|
headers ??= new Headers({
|
|
4646
4848
|
"content-type": "application/javascript; charset=utf-8",
|
|
@@ -4649,7 +4851,10 @@ function get_public_env(request) {
|
|
|
4649
4851
|
if (request.headers.get("if-none-match") === etag) {
|
|
4650
4852
|
return new Response(void 0, { status: 304, headers });
|
|
4651
4853
|
}
|
|
4652
|
-
|
|
4854
|
+
if (script) {
|
|
4855
|
+
return new Response(`globalThis.__sveltekit_sw={env:${payload}}`, { headers });
|
|
4856
|
+
}
|
|
4857
|
+
return new Response(`export const env=${payload}`, { headers });
|
|
4653
4858
|
}
|
|
4654
4859
|
const default_transform = ({ html }) => html;
|
|
4655
4860
|
const default_filter = () => false;
|
|
@@ -4708,7 +4913,18 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4708
4913
|
tracing: {
|
|
4709
4914
|
record_span
|
|
4710
4915
|
},
|
|
4711
|
-
|
|
4916
|
+
remote: {
|
|
4917
|
+
data: null,
|
|
4918
|
+
forms: null,
|
|
4919
|
+
refreshes: null,
|
|
4920
|
+
requested: null,
|
|
4921
|
+
reconnects: null,
|
|
4922
|
+
batches: null,
|
|
4923
|
+
live_iterators: null
|
|
4924
|
+
},
|
|
4925
|
+
is_in_remote_function: false,
|
|
4926
|
+
is_in_render: false,
|
|
4927
|
+
is_in_universal_load: false
|
|
4712
4928
|
};
|
|
4713
4929
|
const event = {
|
|
4714
4930
|
cookies,
|
|
@@ -4780,10 +4996,18 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4780
4996
|
if (state.prerendering) state.prerendering.inside_reroute = prerendering_reroute_state;
|
|
4781
4997
|
}
|
|
4782
4998
|
}
|
|
4999
|
+
let resolve_opts = {
|
|
5000
|
+
transformPageChunk: default_transform,
|
|
5001
|
+
filterSerializedResponseHeaders: default_filter,
|
|
5002
|
+
preload: default_preload
|
|
5003
|
+
};
|
|
5004
|
+
let trailing_slash = "never";
|
|
5005
|
+
let page_nodes;
|
|
4783
5006
|
try {
|
|
4784
5007
|
resolved_path = decode_pathname(resolved_path);
|
|
4785
5008
|
} catch {
|
|
4786
|
-
|
|
5009
|
+
resolved_path = null;
|
|
5010
|
+
return await handle();
|
|
4787
5011
|
}
|
|
4788
5012
|
if (
|
|
4789
5013
|
// the resolved path has been decoded so it should be compared to the decoded url pathname
|
|
@@ -4817,7 +5041,7 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4817
5041
|
if (is_route_resolution_request) {
|
|
4818
5042
|
return resolve_route(resolved_path, new URL(request.url), manifest);
|
|
4819
5043
|
}
|
|
4820
|
-
if (resolved_path === `/${app_dir}/env.js`) {
|
|
5044
|
+
if (resolved_path === `/${app_dir}/env.js` || resolved_path === `/${app_dir}/env.script.js`) {
|
|
4821
5045
|
return get_public_env(request);
|
|
4822
5046
|
}
|
|
4823
5047
|
if (!remote_id && resolved_path.startsWith(`/${app_dir}`)) {
|
|
@@ -4834,24 +5058,18 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4834
5058
|
event.params = result.params;
|
|
4835
5059
|
}
|
|
4836
5060
|
}
|
|
4837
|
-
let resolve_opts = {
|
|
4838
|
-
transformPageChunk: default_transform,
|
|
4839
|
-
filterSerializedResponseHeaders: default_filter,
|
|
4840
|
-
preload: default_preload
|
|
4841
|
-
};
|
|
4842
|
-
let trailing_slash = "never";
|
|
4843
5061
|
try {
|
|
4844
|
-
|
|
5062
|
+
page_nodes = route?.page ? new PageNodes(await load_page_nodes(route.page, manifest)) : void 0;
|
|
4845
5063
|
if (route && !remote_id) {
|
|
4846
5064
|
if (url.pathname === base || url.pathname === base + "/") {
|
|
4847
5065
|
trailing_slash = "always";
|
|
4848
5066
|
} else if (page_nodes) {
|
|
4849
|
-
if (
|
|
5067
|
+
if (DEV) ;
|
|
4850
5068
|
trailing_slash = page_nodes.trailing_slash();
|
|
4851
5069
|
} else if (route.endpoint) {
|
|
4852
5070
|
const node = await route.endpoint();
|
|
4853
5071
|
trailing_slash = node.trailingSlash ?? "never";
|
|
4854
|
-
if (
|
|
5072
|
+
if (DEV) ;
|
|
4855
5073
|
}
|
|
4856
5074
|
if (!is_data_request) {
|
|
4857
5075
|
const normalized = normalize_path(url.pathname, trailing_slash);
|
|
@@ -4879,14 +5097,28 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4879
5097
|
config = page_nodes.get_config() ?? config;
|
|
4880
5098
|
prerender = page_nodes.prerender();
|
|
4881
5099
|
}
|
|
4882
|
-
if (state.before_handle) {
|
|
4883
|
-
state.before_handle(event, config, prerender);
|
|
4884
|
-
}
|
|
4885
5100
|
if (state.emulator?.platform) {
|
|
4886
5101
|
event.platform = await state.emulator.platform({ config, prerender });
|
|
4887
5102
|
}
|
|
5103
|
+
if (state.before_handle) {
|
|
5104
|
+
return await state.before_handle(event, config, prerender, handle);
|
|
5105
|
+
}
|
|
4888
5106
|
}
|
|
4889
5107
|
}
|
|
5108
|
+
return await handle();
|
|
5109
|
+
} catch (e) {
|
|
5110
|
+
if (e instanceof Redirect) {
|
|
5111
|
+
try {
|
|
5112
|
+
const response = is_data_request || remote_id ? redirect_json_response(e) : route?.page && is_action_json_request(event) ? action_json_redirect(e) : redirect_response(e.status, e.location);
|
|
5113
|
+
add_cookies_to_headers(response.headers, new_cookies.values());
|
|
5114
|
+
return response;
|
|
5115
|
+
} catch (err) {
|
|
5116
|
+
return await handle_fatal_error(event, event_state, options2, err);
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
5119
|
+
return await handle_fatal_error(event, event_state, options2, e);
|
|
5120
|
+
}
|
|
5121
|
+
async function handle() {
|
|
4890
5122
|
set_trailing_slash(trailing_slash);
|
|
4891
5123
|
if (state.prerendering && !state.prerendering.fallback && !state.prerendering.inside_reroute) {
|
|
4892
5124
|
disable_search(url);
|
|
@@ -4897,7 +5129,6 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4897
5129
|
"http.route": event.route.id || "unknown",
|
|
4898
5130
|
"http.method": event.request.method,
|
|
4899
5131
|
"http.url": event.url.href,
|
|
4900
|
-
"sveltekit.is_data_request": is_data_request,
|
|
4901
5132
|
"sveltekit.is_sub_request": event.isSubRequest
|
|
4902
5133
|
},
|
|
4903
5134
|
fn: async (root_span) => {
|
|
@@ -4909,7 +5140,6 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4909
5140
|
current: root_span
|
|
4910
5141
|
}
|
|
4911
5142
|
};
|
|
4912
|
-
event_state.allows_commands = MUTATIVE_METHODS.includes(request.method);
|
|
4913
5143
|
return await with_request_store(
|
|
4914
5144
|
{ event: traced_event, state: event_state },
|
|
4915
5145
|
() => options2.hooks.handle({
|
|
@@ -4963,17 +5193,13 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4963
5193
|
);
|
|
4964
5194
|
if (if_none_match_value === etag2) {
|
|
4965
5195
|
const headers22 = new Headers({ etag: etag2 });
|
|
4966
|
-
for (const key2 of [
|
|
4967
|
-
"cache-control",
|
|
4968
|
-
"content-location",
|
|
4969
|
-
"date",
|
|
4970
|
-
"expires",
|
|
4971
|
-
"vary",
|
|
4972
|
-
"set-cookie"
|
|
4973
|
-
]) {
|
|
5196
|
+
for (const key2 of ["cache-control", "content-location", "date", "expires", "vary"]) {
|
|
4974
5197
|
const value = response.headers.get(key2);
|
|
4975
5198
|
if (value) headers22.set(key2, value);
|
|
4976
5199
|
}
|
|
5200
|
+
for (const cookie of get_set_cookies(response.headers)) {
|
|
5201
|
+
headers22.append("set-cookie", cookie);
|
|
5202
|
+
}
|
|
4977
5203
|
return new Response(void 0, {
|
|
4978
5204
|
status: 304,
|
|
4979
5205
|
headers: headers22
|
|
@@ -4991,15 +5217,8 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
4991
5217
|
}
|
|
4992
5218
|
}
|
|
4993
5219
|
return response;
|
|
4994
|
-
} catch (e) {
|
|
4995
|
-
if (e instanceof Redirect) {
|
|
4996
|
-
const response = is_data_request || remote_id ? redirect_json_response(e) : route?.page && is_action_json_request(event) ? action_json_redirect(e) : redirect_response(e.status, e.location);
|
|
4997
|
-
add_cookies_to_headers(response.headers, new_cookies.values());
|
|
4998
|
-
return response;
|
|
4999
|
-
}
|
|
5000
|
-
return await handle_fatal_error(event, event_state, options2, e);
|
|
5001
5220
|
}
|
|
5002
|
-
async function resolve2(event2,
|
|
5221
|
+
async function resolve2(event2, page_nodes2, opts) {
|
|
5003
5222
|
try {
|
|
5004
5223
|
if (opts) {
|
|
5005
5224
|
resolve_opts = {
|
|
@@ -5008,6 +5227,22 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
5008
5227
|
preload: opts.preload || default_preload
|
|
5009
5228
|
};
|
|
5010
5229
|
}
|
|
5230
|
+
if (resolved_path === null) {
|
|
5231
|
+
return await respond_with_error({
|
|
5232
|
+
event: event2,
|
|
5233
|
+
event_state,
|
|
5234
|
+
options: options2,
|
|
5235
|
+
manifest,
|
|
5236
|
+
state,
|
|
5237
|
+
status: 400,
|
|
5238
|
+
error: new SvelteKitError(
|
|
5239
|
+
400,
|
|
5240
|
+
"Malformed URI",
|
|
5241
|
+
`Failed to decode URI: ${event2.url.pathname}`
|
|
5242
|
+
),
|
|
5243
|
+
resolve_opts
|
|
5244
|
+
});
|
|
5245
|
+
}
|
|
5011
5246
|
if (options2.hash_routing || state.prerendering?.fallback) {
|
|
5012
5247
|
return await render_response({
|
|
5013
5248
|
event: event2,
|
|
@@ -5018,7 +5253,17 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
5018
5253
|
page_config: { ssr: false, csr: true },
|
|
5019
5254
|
status: 200,
|
|
5020
5255
|
error: null,
|
|
5021
|
-
branch: [
|
|
5256
|
+
branch: [
|
|
5257
|
+
// include the root layout because it applies to every page
|
|
5258
|
+
{
|
|
5259
|
+
node: (
|
|
5260
|
+
/** @type {SSRNode} */
|
|
5261
|
+
await manifest._.nodes[0]()
|
|
5262
|
+
),
|
|
5263
|
+
data: null,
|
|
5264
|
+
server_data: null
|
|
5265
|
+
}
|
|
5266
|
+
],
|
|
5022
5267
|
fetched: [],
|
|
5023
5268
|
resolve_opts,
|
|
5024
5269
|
data_serializer: server_data_serializer(event2, event_state, options2)
|
|
@@ -5047,7 +5292,7 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
5047
5292
|
} else if (route.endpoint && (!route.page || is_endpoint_request(event2))) {
|
|
5048
5293
|
response2 = await render_endpoint(event2, event_state, await route.endpoint(), state);
|
|
5049
5294
|
} else if (route.page) {
|
|
5050
|
-
if (!
|
|
5295
|
+
if (!page_nodes2) {
|
|
5051
5296
|
throw new Error("page_nodes not found. This should never happen");
|
|
5052
5297
|
} else if (page_methods.has(method)) {
|
|
5053
5298
|
response2 = await render_page(
|
|
@@ -5057,7 +5302,7 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
5057
5302
|
options2,
|
|
5058
5303
|
manifest,
|
|
5059
5304
|
state,
|
|
5060
|
-
|
|
5305
|
+
page_nodes2,
|
|
5061
5306
|
resolve_opts
|
|
5062
5307
|
);
|
|
5063
5308
|
} else {
|
|
@@ -5112,7 +5357,6 @@ async function internal_respond(request, options2, manifest, state) {
|
|
|
5112
5357
|
});
|
|
5113
5358
|
}
|
|
5114
5359
|
if (state.depth === 0) {
|
|
5115
|
-
if (BROWSER && event2.url.pathname === "/.well-known/appspecific/com.chrome.devtools.json") ;
|
|
5116
5360
|
return await respond_with_error({
|
|
5117
5361
|
event: event2,
|
|
5118
5362
|
event_state,
|
|
@@ -5245,8 +5489,7 @@ class Server {
|
|
|
5245
5489
|
console.error("Remote function schema validation failed:", issues);
|
|
5246
5490
|
return { message: "Bad Request" };
|
|
5247
5491
|
}),
|
|
5248
|
-
reroute: module.reroute ||
|
|
5249
|
-
}),
|
|
5492
|
+
reroute: module.reroute || noop,
|
|
5250
5493
|
transport: module.transport || {}
|
|
5251
5494
|
};
|
|
5252
5495
|
set_app({
|