@devmotion/cli 0.6.3 → 0.8.0
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/README.md +13 -0
- package/dist/index.js +135 -349
- package/mcp/mcp-stdio.mjs +377 -156
- package/package.json +1 -1
- package/studio/client/_app/immutable/assets/0.Lv_sH-a4.css +1 -0
- package/studio/client/_app/immutable/assets/0.Lv_sH-a4.css.br +0 -0
- package/studio/client/_app/immutable/assets/0.Lv_sH-a4.css.gz +0 -0
- package/studio/client/_app/immutable/assets/editor.BN5lBQZg.css +1 -0
- package/studio/client/_app/immutable/assets/editor.BN5lBQZg.css.br +0 -0
- package/studio/client/_app/immutable/assets/editor.BN5lBQZg.css.gz +0 -0
- package/studio/client/_app/immutable/chunks/4QfhfUmj.js +1 -0
- package/studio/client/_app/immutable/chunks/4QfhfUmj.js.br +0 -0
- package/studio/client/_app/immutable/chunks/4QfhfUmj.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/B4vsfLqj.js +1 -0
- package/studio/client/_app/immutable/chunks/B4vsfLqj.js.br +0 -0
- package/studio/client/_app/immutable/chunks/B4vsfLqj.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/B7SJbUFX.js +1 -0
- package/studio/client/_app/immutable/chunks/B7SJbUFX.js.br +0 -0
- package/studio/client/_app/immutable/chunks/B7SJbUFX.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/B9f32Zzc.js +1 -0
- package/studio/client/_app/immutable/chunks/B9f32Zzc.js.br +1 -0
- package/studio/client/_app/immutable/chunks/B9f32Zzc.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BHu0iPy_.js +1 -0
- package/studio/client/_app/immutable/chunks/BHu0iPy_.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BHu0iPy_.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BVqaYHsk.js +1 -0
- package/studio/client/_app/immutable/chunks/BVqaYHsk.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BVqaYHsk.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BcZVIP5f.js +1 -0
- package/studio/client/_app/immutable/chunks/BcZVIP5f.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BcZVIP5f.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BcqGu5mG.js +1 -0
- package/studio/client/_app/immutable/chunks/BcqGu5mG.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BcqGu5mG.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BfikHP7B.js +512 -0
- package/studio/client/_app/immutable/chunks/BfikHP7B.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BfikHP7B.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BpSxDpO2.js +1 -0
- package/studio/client/_app/immutable/chunks/BpSxDpO2.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BpSxDpO2.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BpuHE4_g.js +1 -0
- package/studio/client/_app/immutable/chunks/BpuHE4_g.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BpuHE4_g.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Bs1PixFT.js +1 -0
- package/studio/client/_app/immutable/chunks/Bs1PixFT.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Bs1PixFT.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Bu_5E1Sl.js +1 -0
- package/studio/client/_app/immutable/chunks/Bu_5E1Sl.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Bu_5E1Sl.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C2XXotQj.js +1 -0
- package/studio/client/_app/immutable/chunks/C2XXotQj.js.br +0 -0
- package/studio/client/_app/immutable/chunks/C2XXotQj.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CAACQLfs.js +1 -0
- package/studio/client/_app/immutable/chunks/CAACQLfs.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CAACQLfs.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CClcTVCL.js +1 -0
- package/studio/client/_app/immutable/chunks/CClcTVCL.js.br +2 -0
- package/studio/client/_app/immutable/chunks/CClcTVCL.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CDjRusee.js +1 -0
- package/studio/client/_app/immutable/chunks/CDjRusee.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CDjRusee.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CU5enDwt.js +1 -0
- package/studio/client/_app/immutable/chunks/CU5enDwt.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CU5enDwt.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CaaG7K_x.js +1 -0
- package/studio/client/_app/immutable/chunks/CaaG7K_x.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CaaG7K_x.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Cd2UbfQ6.js +2 -0
- package/studio/client/_app/immutable/chunks/Cd2UbfQ6.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Cd2UbfQ6.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Cf4-5HnP.js +1 -0
- package/studio/client/_app/immutable/chunks/Cf4-5HnP.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Cf4-5HnP.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CqE47GI1.js +1 -0
- package/studio/client/_app/immutable/chunks/CqE47GI1.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CqE47GI1.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CqaLkm1l.js +4 -0
- package/studio/client/_app/immutable/chunks/CqaLkm1l.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CqaLkm1l.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CrnqEuwa.js +1 -0
- package/studio/client/_app/immutable/chunks/CrnqEuwa.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CrnqEuwa.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Cv2_oVuk.js +1 -0
- package/studio/client/_app/immutable/chunks/Cv2_oVuk.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Cv2_oVuk.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/D0nqj3Uj.js +1 -0
- package/studio/client/_app/immutable/chunks/D0nqj3Uj.js.br +0 -0
- package/studio/client/_app/immutable/chunks/D0nqj3Uj.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/D260PcBB.js +1 -0
- package/studio/client/_app/immutable/chunks/D260PcBB.js.br +0 -0
- package/studio/client/_app/immutable/chunks/D260PcBB.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DB8_8dee.js +2 -0
- package/studio/client/_app/immutable/chunks/DB8_8dee.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DB8_8dee.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DBZQgiHq.js +4 -0
- package/studio/client/_app/immutable/chunks/DBZQgiHq.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DBZQgiHq.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DMxd0pKL.js +96 -0
- package/studio/client/_app/immutable/chunks/DMxd0pKL.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DMxd0pKL.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DXX6oqEY.js +1 -0
- package/studio/client/_app/immutable/chunks/DXX6oqEY.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DXX6oqEY.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DYsdFO9i.js +1 -0
- package/studio/client/_app/immutable/chunks/DYsdFO9i.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DYsdFO9i.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DgTYfJMu.js +5 -0
- package/studio/client/_app/immutable/chunks/DgTYfJMu.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DgTYfJMu.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DjvvdYFY.js +1 -0
- package/studio/client/_app/immutable/chunks/DjvvdYFY.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DjvvdYFY.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Dn_cJtKS.js +1 -0
- package/studio/client/_app/immutable/chunks/Dn_cJtKS.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Dn_cJtKS.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Dx_nuQP5.js +1 -0
- package/studio/client/_app/immutable/chunks/Dx_nuQP5.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Dx_nuQP5.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/G4iiuHEo.js +1 -0
- package/studio/client/_app/immutable/chunks/G4iiuHEo.js.br +0 -0
- package/studio/client/_app/immutable/chunks/G4iiuHEo.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/GODyLR7Y.js +1 -0
- package/studio/client/_app/immutable/chunks/GODyLR7Y.js.br +0 -0
- package/studio/client/_app/immutable/chunks/GODyLR7Y.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/H5GgA2Hg.js +1 -0
- package/studio/client/_app/immutable/chunks/H5GgA2Hg.js.br +3 -0
- package/studio/client/_app/immutable/chunks/H5GgA2Hg.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/KindPqpA.js +1 -0
- package/studio/client/_app/immutable/chunks/KindPqpA.js.br +0 -0
- package/studio/client/_app/immutable/chunks/KindPqpA.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/MR-UHLyi.js +99 -0
- package/studio/client/_app/immutable/chunks/MR-UHLyi.js.br +0 -0
- package/studio/client/_app/immutable/chunks/MR-UHLyi.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/PZ9NXo-7.js +1 -0
- package/studio/client/_app/immutable/chunks/PZ9NXo-7.js.br +0 -0
- package/studio/client/_app/immutable/chunks/PZ9NXo-7.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/YwFQw-CS.js +730 -0
- package/studio/client/_app/immutable/chunks/YwFQw-CS.js.br +0 -0
- package/studio/client/_app/immutable/chunks/YwFQw-CS.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/iTzoDmCj.js +1 -0
- package/studio/client/_app/immutable/chunks/iTzoDmCj.js.br +0 -0
- package/studio/client/_app/immutable/chunks/iTzoDmCj.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/pT1u3Hqy.js +1 -0
- package/studio/client/_app/immutable/chunks/pT1u3Hqy.js.br +0 -0
- package/studio/client/_app/immutable/chunks/pT1u3Hqy.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/wHWYACQ6.js +16 -0
- package/studio/client/_app/immutable/chunks/wHWYACQ6.js.br +0 -0
- package/studio/client/_app/immutable/chunks/wHWYACQ6.js.gz +0 -0
- package/studio/client/_app/immutable/entry/app.D0e6CgLl.js +2 -0
- package/studio/client/_app/immutable/entry/app.D0e6CgLl.js.br +0 -0
- package/studio/client/_app/immutable/entry/app.D0e6CgLl.js.gz +0 -0
- package/studio/client/_app/immutable/entry/start.CXzKoAgP.js +1 -0
- package/studio/client/_app/immutable/entry/start.CXzKoAgP.js.br +0 -0
- package/studio/client/_app/immutable/entry/start.CXzKoAgP.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/0.BfZbVR14.js +2 -0
- package/studio/client/_app/immutable/nodes/0.BfZbVR14.js.br +0 -0
- package/studio/client/_app/immutable/nodes/0.BfZbVR14.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/1.BGxVZc_Z.js +1 -0
- package/studio/client/_app/immutable/nodes/1.BGxVZc_Z.js.br +0 -0
- package/studio/client/_app/immutable/nodes/1.BGxVZc_Z.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/10.BmsU7Niv.js +1 -0
- package/studio/client/_app/immutable/nodes/10.BmsU7Niv.js.br +0 -0
- package/studio/client/_app/immutable/nodes/10.BmsU7Niv.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/11.Bl10BIeh.js +1 -0
- package/studio/client/_app/immutable/nodes/11.Bl10BIeh.js.br +0 -0
- package/studio/client/_app/immutable/nodes/11.Bl10BIeh.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/12.Di52Em2U.js +2 -0
- package/studio/client/_app/immutable/nodes/12.Di52Em2U.js.br +0 -0
- package/studio/client/_app/immutable/nodes/12.Di52Em2U.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/13.D1KxkAvV.js +1 -0
- package/studio/client/_app/immutable/nodes/13.D1KxkAvV.js.br +0 -0
- package/studio/client/_app/immutable/nodes/13.D1KxkAvV.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/14.Ba-ayQpO.js +1 -0
- package/studio/client/_app/immutable/nodes/14.Ba-ayQpO.js.br +0 -0
- package/studio/client/_app/immutable/nodes/14.Ba-ayQpO.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/15.Bjs1ENL4.js +1 -0
- package/studio/client/_app/immutable/nodes/15.Bjs1ENL4.js.br +0 -0
- package/studio/client/_app/immutable/nodes/15.Bjs1ENL4.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/16.Ca8aIyjV.js +8 -0
- package/studio/client/_app/immutable/nodes/16.Ca8aIyjV.js.br +0 -0
- package/studio/client/_app/immutable/nodes/16.Ca8aIyjV.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/17.DR-c7BuD.js +1 -0
- package/studio/client/_app/immutable/nodes/17.DR-c7BuD.js.br +0 -0
- package/studio/client/_app/immutable/nodes/17.DR-c7BuD.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/18.D3yl0Qok.js +1 -0
- package/studio/client/_app/immutable/nodes/18.D3yl0Qok.js.br +0 -0
- package/studio/client/_app/immutable/nodes/18.D3yl0Qok.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/19.r0zsNF0J.js +1 -0
- package/studio/client/_app/immutable/nodes/19.r0zsNF0J.js.br +0 -0
- package/studio/client/_app/immutable/nodes/19.r0zsNF0J.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/20.wKchvAGW.js +45 -0
- package/studio/client/_app/immutable/nodes/20.wKchvAGW.js.br +0 -0
- package/studio/client/_app/immutable/nodes/20.wKchvAGW.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/21.CX28-f1P.js +16 -0
- package/studio/client/_app/immutable/nodes/21.CX28-f1P.js.br +0 -0
- package/studio/client/_app/immutable/nodes/21.CX28-f1P.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/28.BwKSpFi_.js +8 -0
- package/studio/client/_app/immutable/nodes/28.BwKSpFi_.js.br +0 -0
- package/studio/client/_app/immutable/nodes/28.BwKSpFi_.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/3.D1ljfi_V.js +1 -0
- package/studio/client/_app/immutable/nodes/3.D1ljfi_V.js.br +0 -0
- package/studio/client/_app/immutable/nodes/3.D1ljfi_V.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/30.DA7Me2YV.js +26 -0
- package/studio/client/_app/immutable/nodes/30.DA7Me2YV.js.br +0 -0
- package/studio/client/_app/immutable/nodes/30.DA7Me2YV.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/38.its7uZHe.js +1 -0
- package/studio/client/_app/immutable/nodes/38.its7uZHe.js.br +0 -0
- package/studio/client/_app/immutable/nodes/38.its7uZHe.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/39.DrGfz0RO.js +88 -0
- package/studio/client/_app/immutable/nodes/39.DrGfz0RO.js.br +0 -0
- package/studio/client/_app/immutable/nodes/39.DrGfz0RO.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/4.C-XTv_8D.js +1 -0
- package/studio/client/_app/immutable/nodes/4.C-XTv_8D.js.br +0 -0
- package/studio/client/_app/immutable/nodes/4.C-XTv_8D.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/40.B0WM2OHu.js +17 -0
- package/studio/client/_app/immutable/nodes/40.B0WM2OHu.js.br +0 -0
- package/studio/client/_app/immutable/nodes/40.B0WM2OHu.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/41.BZzYfCVE.js +1 -0
- package/studio/client/_app/immutable/nodes/41.BZzYfCVE.js.br +0 -0
- package/studio/client/_app/immutable/nodes/41.BZzYfCVE.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/42.BP7aBc8V.js +1 -0
- package/studio/client/_app/immutable/nodes/42.BP7aBc8V.js.br +0 -0
- package/studio/client/_app/immutable/nodes/42.BP7aBc8V.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/43.DYWNhvqm.js +1 -0
- package/studio/client/_app/immutable/nodes/43.DYWNhvqm.js.br +0 -0
- package/studio/client/_app/immutable/nodes/43.DYWNhvqm.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/44.CsVF9aXe.js +1 -0
- package/studio/client/_app/immutable/nodes/44.CsVF9aXe.js.br +0 -0
- package/studio/client/_app/immutable/nodes/44.CsVF9aXe.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/45.CeMReWED.js +2 -0
- package/studio/client/_app/immutable/nodes/45.CeMReWED.js.br +0 -0
- package/studio/client/_app/immutable/nodes/45.CeMReWED.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/46.tPqAAZZF.js +1 -0
- package/studio/client/_app/immutable/nodes/46.tPqAAZZF.js.br +0 -0
- package/studio/client/_app/immutable/nodes/46.tPqAAZZF.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/47.1pFnCvbM.js +1 -0
- package/studio/client/_app/immutable/nodes/47.1pFnCvbM.js.br +0 -0
- package/studio/client/_app/immutable/nodes/47.1pFnCvbM.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/48.Cy1KgYAH.js +1 -0
- package/studio/client/_app/immutable/nodes/48.Cy1KgYAH.js.br +0 -0
- package/studio/client/_app/immutable/nodes/48.Cy1KgYAH.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/49.Bh6bDdsT.js +7 -0
- package/studio/client/_app/immutable/nodes/49.Bh6bDdsT.js.br +0 -0
- package/studio/client/_app/immutable/nodes/49.Bh6bDdsT.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/5.C-XTv_8D.js +1 -0
- package/studio/client/_app/immutable/nodes/5.C-XTv_8D.js.br +0 -0
- package/studio/client/_app/immutable/nodes/5.C-XTv_8D.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/7.CS9X1kOu.js +1 -0
- package/studio/client/_app/immutable/nodes/7.CS9X1kOu.js.br +0 -0
- package/studio/client/_app/immutable/nodes/7.CS9X1kOu.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/8.Cux2oyT5.js +1 -0
- package/studio/client/_app/immutable/nodes/8.Cux2oyT5.js.br +0 -0
- package/studio/client/_app/immutable/nodes/8.Cux2oyT5.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/9.Dl65IEFD.js +1 -0
- package/studio/client/_app/immutable/nodes/9.Dl65IEFD.js.br +0 -0
- package/studio/client/_app/immutable/nodes/9.Dl65IEFD.js.gz +0 -0
- package/studio/client/_app/version.json +1 -1
- package/studio/client/_app/version.json.br +0 -0
- package/studio/client/_app/version.json.gz +0 -0
- package/studio/prerendered/docs/api/errors.html +38 -38
- package/studio/prerendered/docs/api/errors.html.br +0 -0
- package/studio/prerendered/docs/api/errors.html.gz +0 -0
- package/studio/prerendered/docs/api/projects.html +38 -38
- package/studio/prerendered/docs/api/projects.html.br +0 -0
- package/studio/prerendered/docs/api/projects.html.gz +0 -0
- package/studio/prerendered/docs/api/renders.html +38 -38
- package/studio/prerendered/docs/api/renders.html.br +0 -0
- package/studio/prerendered/docs/api/renders.html.gz +0 -0
- package/studio/prerendered/docs/api/templates.html +38 -38
- package/studio/prerendered/docs/api/templates.html.br +0 -0
- package/studio/prerendered/docs/api/templates.html.gz +0 -0
- package/studio/prerendered/docs/api/webhooks.html +38 -38
- package/studio/prerendered/docs/api/webhooks.html.br +0 -0
- package/studio/prerendered/docs/api/webhooks.html.gz +0 -0
- package/studio/prerendered/docs/api.html +38 -38
- package/studio/prerendered/docs/api.html.br +0 -0
- package/studio/prerendered/docs/api.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/autogen.html +40 -40
- package/studio/prerendered/docs/mcp/integrations/autogen.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/autogen.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/crewai.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/crewai.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/crewai.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/dify.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/dify.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/dify.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/flowise.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/flowise.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/flowise.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/langchain.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/langchain.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/langchain.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/llamaindex.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/llamaindex.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/llamaindex.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/make.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/make.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/make.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations/n8n.html +38 -38
- package/studio/prerendered/docs/mcp/integrations/n8n.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations/n8n.html.gz +0 -0
- package/studio/prerendered/docs/mcp/integrations.html +38 -38
- package/studio/prerendered/docs/mcp/integrations.html.br +0 -0
- package/studio/prerendered/docs/mcp/integrations.html.gz +0 -0
- package/studio/prerendered/docs/mcp/plans.html +40 -40
- package/studio/prerendered/docs/mcp/plans.html.br +0 -0
- package/studio/prerendered/docs/mcp/plans.html.gz +0 -0
- package/studio/prerendered/docs/mcp/reference.html +48 -47
- package/studio/prerendered/docs/mcp/reference.html.br +0 -0
- package/studio/prerendered/docs/mcp/reference.html.gz +0 -0
- package/studio/prerendered/docs/mcp/setup.html +44 -42
- package/studio/prerendered/docs/mcp/setup.html.br +0 -0
- package/studio/prerendered/docs/mcp/setup.html.gz +0 -0
- package/studio/prerendered/docs/mcp.html +40 -40
- package/studio/prerendered/docs/mcp.html.br +0 -0
- package/studio/prerendered/docs/mcp.html.gz +0 -0
- package/studio/prerendered/docs.html +37 -37
- package/studio/prerendered/docs.html.br +0 -0
- package/studio/prerendered/docs.html.gz +0 -0
- package/studio/prerendered/dub/arabic.html +36 -36
- package/studio/prerendered/dub/arabic.html.br +0 -0
- package/studio/prerendered/dub/arabic.html.gz +0 -0
- package/studio/prerendered/dub/chinese-simplified.html +36 -36
- package/studio/prerendered/dub/chinese-simplified.html.br +0 -0
- package/studio/prerendered/dub/chinese-simplified.html.gz +0 -0
- package/studio/prerendered/dub/dutch.html +36 -36
- package/studio/prerendered/dub/dutch.html.br +0 -0
- package/studio/prerendered/dub/dutch.html.gz +0 -0
- package/studio/prerendered/dub/french.html +36 -36
- package/studio/prerendered/dub/french.html.br +0 -0
- package/studio/prerendered/dub/french.html.gz +0 -0
- package/studio/prerendered/dub/german.html +36 -36
- package/studio/prerendered/dub/german.html.br +0 -0
- package/studio/prerendered/dub/german.html.gz +0 -0
- package/studio/prerendered/dub/hindi.html +36 -36
- package/studio/prerendered/dub/hindi.html.br +0 -0
- package/studio/prerendered/dub/hindi.html.gz +0 -0
- package/studio/prerendered/dub/italian.html +36 -36
- package/studio/prerendered/dub/italian.html.br +0 -0
- package/studio/prerendered/dub/italian.html.gz +0 -0
- package/studio/prerendered/dub/japanese.html +36 -36
- package/studio/prerendered/dub/japanese.html.br +0 -0
- package/studio/prerendered/dub/japanese.html.gz +0 -0
- package/studio/prerendered/dub/korean.html +36 -36
- package/studio/prerendered/dub/korean.html.br +0 -0
- package/studio/prerendered/dub/korean.html.gz +0 -0
- package/studio/prerendered/dub/polish.html +36 -36
- package/studio/prerendered/dub/polish.html.br +0 -0
- package/studio/prerendered/dub/polish.html.gz +0 -0
- package/studio/prerendered/dub/portuguese.html +36 -36
- package/studio/prerendered/dub/portuguese.html.br +0 -0
- package/studio/prerendered/dub/portuguese.html.gz +0 -0
- package/studio/prerendered/dub/spanish.html +36 -36
- package/studio/prerendered/dub/spanish.html.br +0 -0
- package/studio/prerendered/dub/spanish.html.gz +0 -0
- package/studio/prerendered/sitemap.xml +90 -90
- package/studio/prerendered/sitemap.xml.br +0 -0
- package/studio/prerendered/sitemap.xml.gz +0 -0
- package/studio/prerendered/tools/add-captions/instagram.html +36 -36
- package/studio/prerendered/tools/add-captions/instagram.html.br +0 -0
- package/studio/prerendered/tools/add-captions/instagram.html.gz +0 -0
- package/studio/prerendered/tools/add-captions/linkedin.html +36 -36
- package/studio/prerendered/tools/add-captions/linkedin.html.br +0 -0
- package/studio/prerendered/tools/add-captions/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/add-captions/tiktok.html +36 -36
- package/studio/prerendered/tools/add-captions/tiktok.html.br +0 -0
- package/studio/prerendered/tools/add-captions/tiktok.html.gz +0 -0
- package/studio/prerendered/tools/add-captions/twitter-x.html +36 -36
- package/studio/prerendered/tools/add-captions/twitter-x.html.br +0 -0
- package/studio/prerendered/tools/add-captions/twitter-x.html.gz +0 -0
- package/studio/prerendered/tools/add-captions/youtube.html +36 -36
- package/studio/prerendered/tools/add-captions/youtube.html.br +0 -0
- package/studio/prerendered/tools/add-captions/youtube.html.gz +0 -0
- package/studio/prerendered/tools/add-captions.html +40 -40
- package/studio/prerendered/tools/add-captions.html.br +0 -0
- package/studio/prerendered/tools/add-captions.html.gz +0 -0
- package/studio/prerendered/tools/auto-cut/linkedin.html +36 -36
- package/studio/prerendered/tools/auto-cut/linkedin.html.br +0 -0
- package/studio/prerendered/tools/auto-cut/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/auto-cut/podcast.html +36 -36
- package/studio/prerendered/tools/auto-cut/podcast.html.br +0 -0
- package/studio/prerendered/tools/auto-cut/podcast.html.gz +0 -0
- package/studio/prerendered/tools/auto-cut/tiktok.html +36 -36
- package/studio/prerendered/tools/auto-cut/tiktok.html.br +0 -0
- package/studio/prerendered/tools/auto-cut/tiktok.html.gz +0 -0
- package/studio/prerendered/tools/auto-cut/youtube.html +36 -36
- package/studio/prerendered/tools/auto-cut/youtube.html.br +0 -0
- package/studio/prerendered/tools/auto-cut/youtube.html.gz +0 -0
- package/studio/prerendered/tools/auto-cut.html +40 -40
- package/studio/prerendered/tools/auto-cut.html.br +0 -0
- package/studio/prerendered/tools/auto-cut.html.gz +0 -0
- package/studio/prerendered/tools/generate-video/instagram.html +36 -36
- package/studio/prerendered/tools/generate-video/instagram.html.br +0 -0
- package/studio/prerendered/tools/generate-video/instagram.html.gz +0 -0
- package/studio/prerendered/tools/generate-video/tiktok.html +36 -36
- package/studio/prerendered/tools/generate-video/tiktok.html.br +0 -0
- package/studio/prerendered/tools/generate-video/tiktok.html.gz +0 -0
- package/studio/prerendered/tools/generate-video/twitter-x.html +36 -36
- package/studio/prerendered/tools/generate-video/twitter-x.html.br +0 -0
- package/studio/prerendered/tools/generate-video/twitter-x.html.gz +0 -0
- package/studio/prerendered/tools/generate-video/youtube.html +36 -36
- package/studio/prerendered/tools/generate-video/youtube.html.br +0 -0
- package/studio/prerendered/tools/generate-video/youtube.html.gz +0 -0
- package/studio/prerendered/tools/generate-video.html +40 -40
- package/studio/prerendered/tools/generate-video.html.br +0 -0
- package/studio/prerendered/tools/generate-video.html.gz +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/linkedin.html +36 -36
- package/studio/prerendered/tools/laptop-3d-intro/linkedin.html.br +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/saas.html +36 -36
- package/studio/prerendered/tools/laptop-3d-intro/saas.html.br +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/saas.html.gz +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/twitter-x.html +36 -36
- package/studio/prerendered/tools/laptop-3d-intro/twitter-x.html.br +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/twitter-x.html.gz +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/youtube.html +36 -36
- package/studio/prerendered/tools/laptop-3d-intro/youtube.html.br +0 -0
- package/studio/prerendered/tools/laptop-3d-intro/youtube.html.gz +0 -0
- package/studio/prerendered/tools/laptop-3d-intro.html +40 -40
- package/studio/prerendered/tools/laptop-3d-intro.html.br +0 -0
- package/studio/prerendered/tools/laptop-3d-intro.html.gz +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/linkedin.html +36 -36
- package/studio/prerendered/tools/screen-webcam-demo/linkedin.html.br +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/saas.html +36 -36
- package/studio/prerendered/tools/screen-webcam-demo/saas.html.br +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/saas.html.gz +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/twitter-x.html +36 -36
- package/studio/prerendered/tools/screen-webcam-demo/twitter-x.html.br +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/twitter-x.html.gz +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/youtube.html +36 -36
- package/studio/prerendered/tools/screen-webcam-demo/youtube.html.br +0 -0
- package/studio/prerendered/tools/screen-webcam-demo/youtube.html.gz +0 -0
- package/studio/prerendered/tools/screen-webcam-demo.html +40 -40
- package/studio/prerendered/tools/screen-webcam-demo.html.br +0 -0
- package/studio/prerendered/tools/screen-webcam-demo.html.gz +0 -0
- package/studio/prerendered/tools/screenshot-to-social/facebook.html +36 -36
- package/studio/prerendered/tools/screenshot-to-social/facebook.html.br +0 -0
- package/studio/prerendered/tools/screenshot-to-social/facebook.html.gz +0 -0
- package/studio/prerendered/tools/screenshot-to-social/instagram.html +36 -36
- package/studio/prerendered/tools/screenshot-to-social/instagram.html.br +0 -0
- package/studio/prerendered/tools/screenshot-to-social/instagram.html.gz +0 -0
- package/studio/prerendered/tools/screenshot-to-social/linkedin.html +36 -36
- package/studio/prerendered/tools/screenshot-to-social/linkedin.html.br +0 -0
- package/studio/prerendered/tools/screenshot-to-social/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/screenshot-to-social/twitter-x.html +36 -36
- package/studio/prerendered/tools/screenshot-to-social/twitter-x.html.br +0 -0
- package/studio/prerendered/tools/screenshot-to-social/twitter-x.html.gz +0 -0
- package/studio/prerendered/tools/screenshot-to-social.html +40 -40
- package/studio/prerendered/tools/screenshot-to-social.html.br +0 -0
- package/studio/prerendered/tools/screenshot-to-social.html.gz +0 -0
- package/studio/prerendered/tools/translate-video/instagram.html +36 -36
- package/studio/prerendered/tools/translate-video/instagram.html.br +0 -0
- package/studio/prerendered/tools/translate-video/instagram.html.gz +0 -0
- package/studio/prerendered/tools/translate-video/linkedin.html +36 -36
- package/studio/prerendered/tools/translate-video/linkedin.html.br +0 -0
- package/studio/prerendered/tools/translate-video/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/translate-video/tiktok.html +36 -36
- package/studio/prerendered/tools/translate-video/tiktok.html.br +0 -0
- package/studio/prerendered/tools/translate-video/tiktok.html.gz +0 -0
- package/studio/prerendered/tools/translate-video/youtube.html +36 -36
- package/studio/prerendered/tools/translate-video/youtube.html.br +0 -0
- package/studio/prerendered/tools/translate-video/youtube.html.gz +0 -0
- package/studio/prerendered/tools/translate-video.html +40 -40
- package/studio/prerendered/tools/translate-video.html.br +0 -0
- package/studio/prerendered/tools/translate-video.html.gz +0 -0
- package/studio/prerendered/tools/video-beautifier.html +40 -40
- package/studio/prerendered/tools/video-beautifier.html.br +0 -0
- package/studio/prerendered/tools/video-beautifier.html.gz +0 -0
- package/studio/prerendered/tools/video-to-browser/linkedin.html +36 -36
- package/studio/prerendered/tools/video-to-browser/linkedin.html.br +0 -0
- package/studio/prerendered/tools/video-to-browser/linkedin.html.gz +0 -0
- package/studio/prerendered/tools/video-to-browser/saas.html +36 -36
- package/studio/prerendered/tools/video-to-browser/saas.html.br +0 -0
- package/studio/prerendered/tools/video-to-browser/saas.html.gz +0 -0
- package/studio/prerendered/tools/video-to-browser/twitter-x.html +36 -36
- package/studio/prerendered/tools/video-to-browser/twitter-x.html.br +0 -0
- package/studio/prerendered/tools/video-to-browser/twitter-x.html.gz +0 -0
- package/studio/prerendered/tools/video-to-browser/youtube.html +36 -36
- package/studio/prerendered/tools/video-to-browser/youtube.html.br +0 -0
- package/studio/prerendered/tools/video-to-browser/youtube.html.gz +0 -0
- package/studio/prerendered/tools/video-to-browser.html +40 -40
- package/studio/prerendered/tools/video-to-browser.html.br +0 -0
- package/studio/prerendered/tools/video-to-browser.html.gz +0 -0
- package/studio/prerendered/tools/video-to-phone.html +40 -40
- package/studio/prerendered/tools/video-to-phone.html.br +0 -0
- package/studio/prerendered/tools/video-to-phone.html.gz +0 -0
- package/studio/prerendered/vs/canva.html +36 -36
- package/studio/prerendered/vs/canva.html.br +0 -0
- package/studio/prerendered/vs/canva.html.gz +0 -0
- package/studio/prerendered/vs/captions-ai.html +36 -36
- package/studio/prerendered/vs/captions-ai.html.br +0 -0
- package/studio/prerendered/vs/captions-ai.html.gz +0 -0
- package/studio/prerendered/vs/clipchamp.html +36 -36
- package/studio/prerendered/vs/clipchamp.html.br +0 -0
- package/studio/prerendered/vs/clipchamp.html.gz +0 -0
- package/studio/prerendered/vs/descript.html +36 -36
- package/studio/prerendered/vs/descript.html.br +0 -0
- package/studio/prerendered/vs/descript.html.gz +0 -0
- package/studio/prerendered/vs/kapwing.html +36 -36
- package/studio/prerendered/vs/kapwing.html.br +0 -0
- package/studio/prerendered/vs/kapwing.html.gz +0 -0
- package/studio/prerendered/vs/runway.html +36 -36
- package/studio/prerendered/vs/runway.html.br +0 -0
- package/studio/prerendered/vs/runway.html.gz +0 -0
- package/studio/prerendered/vs/submagic.html +36 -36
- package/studio/prerendered/vs/submagic.html.br +0 -0
- package/studio/prerendered/vs/submagic.html.gz +0 -0
- package/studio/prerendered/vs/veed.html +36 -36
- package/studio/prerendered/vs/veed.html.br +0 -0
- package/studio/prerendered/vs/veed.html.gz +0 -0
- package/studio/server/chunks/0-CwPSUJ3w.js +32 -0
- package/studio/server/chunks/0-CwPSUJ3w.js.map +1 -0
- package/studio/server/chunks/1-CbeNzLl-.js +9 -0
- package/studio/server/chunks/1-CbeNzLl-.js.map +1 -0
- package/studio/server/chunks/11-C0QAn-bF.js +9 -0
- package/studio/server/chunks/11-C0QAn-bF.js.map +1 -0
- package/studio/server/chunks/12-DCnPHABd.js +9 -0
- package/studio/server/chunks/12-DCnPHABd.js.map +1 -0
- package/studio/server/chunks/13-Cyy-P3vn.js +59 -0
- package/studio/server/chunks/13-Cyy-P3vn.js.map +1 -0
- package/studio/server/chunks/14-Dbdob-lm.js +60 -0
- package/studio/server/chunks/14-Dbdob-lm.js.map +1 -0
- package/studio/server/chunks/15-DyZbzGI-.js +9 -0
- package/studio/server/chunks/15-DyZbzGI-.js.map +1 -0
- package/studio/server/chunks/16-Qb7izz2W.js +72 -0
- package/studio/server/chunks/16-Qb7izz2W.js.map +1 -0
- package/studio/server/chunks/17-B5pMxn3Z.js +9 -0
- package/studio/server/chunks/17-B5pMxn3Z.js.map +1 -0
- package/studio/server/chunks/18-Dui1aDnz.js +9 -0
- package/studio/server/chunks/18-Dui1aDnz.js.map +1 -0
- package/studio/server/chunks/19-DgrfAbAy.js +9 -0
- package/studio/server/chunks/19-DgrfAbAy.js.map +1 -0
- package/studio/server/chunks/20-pRv7XuMf.js +139 -0
- package/studio/server/chunks/20-pRv7XuMf.js.map +1 -0
- package/studio/server/chunks/3-9IZCenAI.js +9 -0
- package/studio/server/chunks/3-9IZCenAI.js.map +1 -0
- package/studio/server/chunks/4-CsffFQv4.js +9 -0
- package/studio/server/chunks/4-CsffFQv4.js.map +1 -0
- package/studio/server/chunks/42-NP9_BFi5.js +56 -0
- package/studio/server/chunks/42-NP9_BFi5.js.map +1 -0
- package/studio/server/chunks/43-B0_JG7rx.js +9 -0
- package/studio/server/chunks/43-B0_JG7rx.js.map +1 -0
- package/studio/server/chunks/44-DRZom9oK.js +9 -0
- package/studio/server/chunks/44-DRZom9oK.js.map +1 -0
- package/studio/server/chunks/45-llvANtsn.js +115 -0
- package/studio/server/chunks/45-llvANtsn.js.map +1 -0
- package/studio/server/chunks/49-Bm394lLC.js +14 -0
- package/studio/server/chunks/49-Bm394lLC.js.map +1 -0
- package/studio/server/chunks/5-oazbOi9H.js +9 -0
- package/studio/server/chunks/5-oazbOi9H.js.map +1 -0
- package/studio/server/chunks/7-DHJzqCHK.js +215 -0
- package/studio/server/chunks/7-DHJzqCHK.js.map +1 -0
- package/studio/server/chunks/_error.svelte-BkTnhnxP.js +98 -0
- package/studio/server/chunks/_error.svelte-BkTnhnxP.js.map +1 -0
- package/studio/server/chunks/_error.svelte-CQzFToj8.js +98 -0
- package/studio/server/chunks/_error.svelte-CQzFToj8.js.map +1 -0
- package/studio/server/chunks/_layout.svelte-BY0hGh-H.js +64 -0
- package/studio/server/chunks/_layout.svelte-BY0hGh-H.js.map +1 -0
- package/studio/server/chunks/_layout.svelte-CMzss-C2.js +400 -0
- package/studio/server/chunks/_layout.svelte-CMzss-C2.js.map +1 -0
- package/studio/server/chunks/_layout.svelte-Cn4p7o4q.js +64 -0
- package/studio/server/chunks/_layout.svelte-Cn4p7o4q.js.map +1 -0
- package/studio/server/chunks/_layout.svelte-DL1DYuzO.js +1054 -0
- package/studio/server/chunks/_layout.svelte-DL1DYuzO.js.map +1 -0
- package/studio/server/chunks/_page.svelte-B8XqicVW.js +79 -0
- package/studio/server/chunks/_page.svelte-B8XqicVW.js.map +1 -0
- package/studio/server/chunks/_page.svelte-BF0kq_DA.js +418 -0
- package/studio/server/chunks/_page.svelte-BF0kq_DA.js.map +1 -0
- package/studio/server/chunks/_page.svelte-BFwMGeqy.js +111 -0
- package/studio/server/chunks/_page.svelte-BFwMGeqy.js.map +1 -0
- package/studio/server/chunks/_page.svelte-BGPhyNuC.js +192 -0
- package/studio/server/chunks/_page.svelte-BGPhyNuC.js.map +1 -0
- package/studio/server/chunks/_page.svelte-BdmhHvtc.js +113 -0
- package/studio/server/chunks/_page.svelte-BdmhHvtc.js.map +1 -0
- package/studio/server/chunks/_page.svelte-CU4XjUEe.js +11350 -0
- package/studio/server/chunks/_page.svelte-CU4XjUEe.js.map +1 -0
- package/studio/server/chunks/_page.svelte-D74PqaNq.js +256 -0
- package/studio/server/chunks/_page.svelte-D74PqaNq.js.map +1 -0
- package/studio/server/chunks/_page.svelte-DC9-8nEf.js +1021 -0
- package/studio/server/chunks/_page.svelte-DC9-8nEf.js.map +1 -0
- package/studio/server/chunks/_page.svelte-DgqoNyxe.js +1732 -0
- package/studio/server/chunks/_page.svelte-DgqoNyxe.js.map +1 -0
- package/studio/server/chunks/_page.svelte-DhLeBJD_.js +319 -0
- package/studio/server/chunks/_page.svelte-DhLeBJD_.js.map +1 -0
- package/studio/server/chunks/_page.svelte-czU-SjNZ.js +160 -0
- package/studio/server/chunks/_page.svelte-czU-SjNZ.js.map +1 -0
- package/studio/server/chunks/_page.svelte-uvKsK6Vw.js +506 -0
- package/studio/server/chunks/_page.svelte-uvKsK6Vw.js.map +1 -0
- package/studio/server/chunks/_server.ts-BHRR6T63.js +48 -0
- package/studio/server/chunks/_server.ts-BHRR6T63.js.map +1 -0
- package/studio/server/chunks/_server.ts-BHnpcEVo.js +52 -0
- package/studio/server/chunks/_server.ts-BHnpcEVo.js.map +1 -0
- package/studio/server/chunks/_server.ts-BMJ-08P_.js +34 -0
- package/studio/server/chunks/_server.ts-BMJ-08P_.js.map +1 -0
- package/studio/server/chunks/_server.ts-Bj0V1FXs.js +722 -0
- package/studio/server/chunks/_server.ts-Bj0V1FXs.js.map +1 -0
- package/studio/server/chunks/_server.ts-ByVY8xND.js +41 -0
- package/studio/server/chunks/_server.ts-ByVY8xND.js.map +1 -0
- package/studio/server/chunks/_server.ts-CA1HxfdZ.js +58 -0
- package/studio/server/chunks/_server.ts-CA1HxfdZ.js.map +1 -0
- package/studio/server/chunks/_server.ts-CGi39j79.js +232 -0
- package/studio/server/chunks/_server.ts-CGi39j79.js.map +1 -0
- package/studio/server/chunks/_server.ts-CGs8hOo6.js +760 -0
- package/studio/server/chunks/_server.ts-CGs8hOo6.js.map +1 -0
- package/studio/server/chunks/_server.ts-CNJZSPm5.js +60 -0
- package/studio/server/chunks/_server.ts-CNJZSPm5.js.map +1 -0
- package/studio/server/chunks/_server.ts-CXuYytLK.js +118 -0
- package/studio/server/chunks/_server.ts-CXuYytLK.js.map +1 -0
- package/studio/server/chunks/_server.ts-C_njIfbT.js +122 -0
- package/studio/server/chunks/_server.ts-C_njIfbT.js.map +1 -0
- package/studio/server/chunks/_server.ts-Ckj93zLL.js +49 -0
- package/studio/server/chunks/_server.ts-Ckj93zLL.js.map +1 -0
- package/studio/server/chunks/_server.ts-CriU7HwI.js +22 -0
- package/studio/server/chunks/_server.ts-CriU7HwI.js.map +1 -0
- package/studio/server/chunks/_server.ts-D1inEYb_.js +87 -0
- package/studio/server/chunks/_server.ts-D1inEYb_.js.map +1 -0
- package/studio/server/chunks/_server.ts-D_YUIRqi.js +87 -0
- package/studio/server/chunks/_server.ts-D_YUIRqi.js.map +1 -0
- package/studio/server/chunks/_server.ts-D_fEYx6c.js +158 -0
- package/studio/server/chunks/_server.ts-D_fEYx6c.js.map +1 -0
- package/studio/server/chunks/_server.ts-Dg9C9Iih.js +70 -0
- package/studio/server/chunks/_server.ts-Dg9C9Iih.js.map +1 -0
- package/studio/server/chunks/_server.ts-Dji1nGrU.js +91 -0
- package/studio/server/chunks/_server.ts-Dji1nGrU.js.map +1 -0
- package/studio/server/chunks/_server.ts-DnGq-qro.js +68 -0
- package/studio/server/chunks/_server.ts-DnGq-qro.js.map +1 -0
- package/studio/server/chunks/_server.ts-Do6qk473.js +56 -0
- package/studio/server/chunks/_server.ts-Do6qk473.js.map +1 -0
- package/studio/server/chunks/_server.ts-DsTz4hAe.js +96 -0
- package/studio/server/chunks/_server.ts-DsTz4hAe.js.map +1 -0
- package/studio/server/chunks/_server.ts-f6EVRY82.js +79 -0
- package/studio/server/chunks/_server.ts-f6EVRY82.js.map +1 -0
- package/studio/server/chunks/_server.ts-p_1efpqn.js +109 -0
- package/studio/server/chunks/_server.ts-p_1efpqn.js.map +1 -0
- package/studio/server/chunks/_server.ts-xAAnOaCl.js +303 -0
- package/studio/server/chunks/_server.ts-xAAnOaCl.js.map +1 -0
- package/studio/server/chunks/adapter-XtQVoo_l.js +91 -0
- package/studio/server/chunks/adapter-XtQVoo_l.js.map +1 -0
- package/studio/server/chunks/admin.remote-Dc0snX5Q.js +105 -0
- package/studio/server/chunks/admin.remote-Dc0snX5Q.js.map +1 -0
- package/studio/server/chunks/ai-access-bDlOKhrS.js +299 -0
- package/studio/server/chunks/ai-access-bDlOKhrS.js.map +1 -0
- package/studio/server/chunks/ai.remote-6DyE05J7.js +37 -0
- package/studio/server/chunks/ai.remote-6DyE05J7.js.map +1 -0
- package/studio/server/chunks/alert-dialog-description-BhZkDj31.js +578 -0
- package/studio/server/chunks/alert-dialog-description-BhZkDj31.js.map +1 -0
- package/studio/server/chunks/animation-sOd5R1cE.js +2912 -0
- package/studio/server/chunks/animation-sOd5R1cE.js.map +1 -0
- package/studio/server/chunks/api-Do--xZ9M.js +434 -0
- package/studio/server/chunks/api-Do--xZ9M.js.map +1 -0
- package/studio/server/chunks/api-keys-CcmgUWTH.js +117 -0
- package/studio/server/chunks/api-keys-CcmgUWTH.js.map +1 -0
- package/studio/server/chunks/api-keys.remote-JFKHDaD1.js +88 -0
- package/studio/server/chunks/api-keys.remote-JFKHDaD1.js.map +1 -0
- package/studio/server/chunks/app-header-BZw6FnXs.js +96 -0
- package/studio/server/chunks/app-header-BZw6FnXs.js.map +1 -0
- package/studio/server/chunks/assets.remote-CX2FvnlZ.js +113 -0
- package/studio/server/chunks/assets.remote-CX2FvnlZ.js.map +1 -0
- package/studio/server/chunks/attribute-protocol-DQ-1julf.js +151 -0
- package/studio/server/chunks/attribute-protocol-DQ-1julf.js.map +1 -0
- package/studio/server/chunks/auth-CdmLkVO-.js +22472 -0
- package/studio/server/chunks/auth-CdmLkVO-.js.map +1 -0
- package/studio/server/chunks/auth.remote-DgcD7hjY.js +351 -0
- package/studio/server/chunks/auth.remote-DgcD7hjY.js.map +1 -0
- package/studio/server/chunks/base-qepI6vHK.js +210 -0
- package/studio/server/chunks/base-qepI6vHK.js.map +1 -0
- package/studio/server/chunks/bun-sqlite-dialect-C8OaCWSL-CfYOKJsa.js +197 -0
- package/studio/server/chunks/bun-sqlite-dialect-C8OaCWSL-CfYOKJsa.js.map +1 -0
- package/studio/server/chunks/captions.remote-B5ErNQXV.js +184 -0
- package/studio/server/chunks/captions.remote-B5ErNQXV.js.map +1 -0
- package/studio/server/chunks/client2-vVBd4CsE.js +66 -0
- package/studio/server/chunks/client2-vVBd4CsE.js.map +1 -0
- package/studio/server/chunks/d1-sqlite-dialect-sYHNqBte-D3F4ZSZP.js +160 -0
- package/studio/server/chunks/d1-sqlite-dialect-sYHNqBte-D3F4ZSZP.js.map +1 -0
- package/studio/server/chunks/design-knowledge-D2NUeAAo.js +334 -0
- package/studio/server/chunks/design-knowledge-D2NUeAAo.js.map +1 -0
- package/studio/server/chunks/desktop-bootstrap-Z0_g_8r3.js +67 -0
- package/studio/server/chunks/desktop-bootstrap-Z0_g_8r3.js.map +1 -0
- package/studio/server/chunks/dubbing.remote-tYalz3IA.js +153 -0
- package/studio/server/chunks/dubbing.remote-tYalz3IA.js.map +1 -0
- package/studio/server/chunks/editor.svelte-Bdv5LaOt.js +21026 -0
- package/studio/server/chunks/editor.svelte-Bdv5LaOt.js.map +1 -0
- package/studio/server/chunks/env-AoZ3P0fg.js +92 -0
- package/studio/server/chunks/env-AoZ3P0fg.js.map +1 -0
- package/studio/server/chunks/extract-audio.remote-BKBT80-g.js +95 -0
- package/studio/server/chunks/extract-audio.remote-BKBT80-g.js.map +1 -0
- package/studio/server/chunks/feedback.remote-DveIB_5_.js +49 -0
- package/studio/server/chunks/feedback.remote-DveIB_5_.js.map +1 -0
- package/studio/server/chunks/find-stock-image-Cwkwf5gV.js +709 -0
- package/studio/server/chunks/find-stock-image-Cwkwf5gV.js.map +1 -0
- package/studio/server/chunks/fs-project-BxA38YDy.js +134 -0
- package/studio/server/chunks/fs-project-BxA38YDy.js.map +1 -0
- package/studio/server/chunks/hooks.server-DNzGN0kv.js +309 -0
- package/studio/server/chunks/hooks.server-DNzGN0kv.js.map +1 -0
- package/studio/server/chunks/html-parser-t3Ydy25K.js +8516 -0
- package/studio/server/chunks/html-parser-t3Ydy25K.js.map +1 -0
- package/studio/server/chunks/html-writer-D8dOWi0D.js +242 -0
- package/studio/server/chunks/html-writer-D8dOWi0D.js.map +1 -0
- package/studio/server/chunks/image-generation.remote-omBcspXi.js +140 -0
- package/studio/server/chunks/image-generation.remote-omBcspXi.js.map +1 -0
- package/studio/server/chunks/index-D-agccNM.js +4578 -0
- package/studio/server/chunks/index-D-agccNM.js.map +1 -0
- package/studio/server/chunks/index12-B6IiEYAz.js +265 -0
- package/studio/server/chunks/index12-B6IiEYAz.js.map +1 -0
- package/studio/server/chunks/index2-By5vPQD_.js +23 -0
- package/studio/server/chunks/index2-By5vPQD_.js.map +1 -0
- package/studio/server/chunks/index3-DS_3EH31.js +8 -0
- package/studio/server/chunks/index3-DS_3EH31.js.map +1 -0
- package/studio/server/chunks/index4-CgVJCMu8.js +48 -0
- package/studio/server/chunks/index4-CgVJCMu8.js.map +1 -0
- package/studio/server/chunks/index6-BwFC1GDh.js +239 -0
- package/studio/server/chunks/index6-BwFC1GDh.js.map +1 -0
- package/studio/server/chunks/index8-Dt6GB1aJ.js +44 -0
- package/studio/server/chunks/index8-Dt6GB1aJ.js.map +1 -0
- package/studio/server/chunks/layout-template-BhL4-5tM.js +1371 -0
- package/studio/server/chunks/layout-template-BhL4-5tM.js.map +1 -0
- package/studio/server/chunks/lummi-Cu3Js7rz.js +189 -0
- package/studio/server/chunks/lummi-Cu3Js7rz.js.map +1 -0
- package/studio/server/chunks/lummi.remote-BMN4XopC.js +44 -0
- package/studio/server/chunks/lummi.remote-BMN4XopC.js.map +1 -0
- package/studio/server/chunks/media-analysis-DXUN3NUM.js +229 -0
- package/studio/server/chunks/media-analysis-DXUN3NUM.js.map +1 -0
- package/studio/server/chunks/media-analysis.remote-BVdRHeP8.js +63 -0
- package/studio/server/chunks/media-analysis.remote-BVdRHeP8.js.map +1 -0
- package/studio/server/chunks/media-v9Bq2kuR.js +157 -0
- package/studio/server/chunks/media-v9Bq2kuR.js.map +1 -0
- package/studio/server/chunks/middleware-D0o6fOUG.js +72 -0
- package/studio/server/chunks/middleware-D0o6fOUG.js.map +1 -0
- package/studio/server/chunks/mutations-BlgZViQj.js +551 -0
- package/studio/server/chunks/mutations-BlgZViQj.js.map +1 -0
- package/studio/server/chunks/node-sqlite-dialect-BYaBkSm1.js +197 -0
- package/studio/server/chunks/node-sqlite-dialect-BYaBkSm1.js.map +1 -0
- package/studio/server/chunks/onboarding-email-CCv_cZ-_.js +311 -0
- package/studio/server/chunks/onboarding-email-CCv_cZ-_.js.map +1 -0
- package/studio/server/chunks/optional-services-BGRY7tmz.js +45 -0
- package/studio/server/chunks/optional-services-BGRY7tmz.js.map +1 -0
- package/studio/server/chunks/pagination-Q7FOr3rO.js +159 -0
- package/studio/server/chunks/pagination-Q7FOr3rO.js.map +1 -0
- package/studio/server/chunks/posthog-kZp2zKvY.js +11 -0
- package/studio/server/chunks/posthog-kZp2zKvY.js.map +1 -0
- package/studio/server/chunks/presets-CU-ej2J9.js +369 -0
- package/studio/server/chunks/presets-CU-ej2J9.js.map +1 -0
- package/studio/server/chunks/project-layer-yZ50OnjM.js +28 -0
- package/studio/server/chunks/project-layer-yZ50OnjM.js.map +1 -0
- package/studio/server/chunks/projects.remote-BevbcBv4.js +297 -0
- package/studio/server/chunks/projects.remote-BevbcBv4.js.map +1 -0
- package/studio/server/chunks/queue-init-CcgYZbeV.js +38 -0
- package/studio/server/chunks/queue-init-CcgYZbeV.js.map +1 -0
- package/studio/server/chunks/registry-DcyeMfNZ.js +18 -0
- package/studio/server/chunks/registry-DcyeMfNZ.js.map +1 -0
- package/studio/server/chunks/registry2-DJC1cBxe.js +4851 -0
- package/studio/server/chunks/registry2-DJC1cBxe.js.map +1 -0
- package/studio/server/chunks/remote-148gj0t-CLfgEUwr.js +15 -0
- package/studio/server/chunks/remote-148gj0t-CLfgEUwr.js.map +1 -0
- package/studio/server/chunks/remote-1afl6ud-BYqN02Le.js +18 -0
- package/studio/server/chunks/remote-1afl6ud-BYqN02Le.js.map +1 -0
- package/studio/server/chunks/remote-1cihryv-BxHbFmSt.js +34 -0
- package/studio/server/chunks/remote-1cihryv-BxHbFmSt.js.map +1 -0
- package/studio/server/chunks/remote-1ez0sx-BWvDnL9q.js +34 -0
- package/studio/server/chunks/remote-1ez0sx-BWvDnL9q.js.map +1 -0
- package/studio/server/chunks/remote-1mi3j6d-Cg0pK35v.js +21 -0
- package/studio/server/chunks/remote-1mi3j6d-Cg0pK35v.js.map +1 -0
- package/studio/server/chunks/remote-1rjk8jv-CF94t93Y.js +22 -0
- package/studio/server/chunks/remote-1rjk8jv-CF94t93Y.js.map +1 -0
- package/studio/server/chunks/remote-1web5fy-BcJGUGtw.js +35 -0
- package/studio/server/chunks/remote-1web5fy-BcJGUGtw.js.map +1 -0
- package/studio/server/chunks/remote-5mu9ty-CGtbs6nv.js +31 -0
- package/studio/server/chunks/remote-5mu9ty-CGtbs6nv.js.map +1 -0
- package/studio/server/chunks/remote-aelvq6-C3B2AyF6.js +26 -0
- package/studio/server/chunks/remote-aelvq6-C3B2AyF6.js.map +1 -0
- package/studio/server/chunks/remote-em2k3w-Z00J8-Q9.js +25 -0
- package/studio/server/chunks/remote-em2k3w-Z00J8-Q9.js.map +1 -0
- package/studio/server/chunks/remote-gezfls-DWj4X0qA.js +21 -0
- package/studio/server/chunks/remote-gezfls-DWj4X0qA.js.map +1 -0
- package/studio/server/chunks/remote-lv3p1w-BcKTNydX.js +15 -0
- package/studio/server/chunks/remote-lv3p1w-BcKTNydX.js.map +1 -0
- package/studio/server/chunks/remote-ssr7vi-rhkV3R21.js +33 -0
- package/studio/server/chunks/remote-ssr7vi-rhkV3R21.js.map +1 -0
- package/studio/server/chunks/remote-sy19x7-SCvG1tDD.js +29 -0
- package/studio/server/chunks/remote-sy19x7-SCvG1tDD.js.map +1 -0
- package/studio/server/chunks/remote-tisyb0-Ct_sfSGt.js +31 -0
- package/studio/server/chunks/remote-tisyb0-Ct_sfSGt.js.map +1 -0
- package/studio/server/chunks/remote-xj8myv-tYWgOBub.js +31 -0
- package/studio/server/chunks/remote-xj8myv-tYWgOBub.js.map +1 -0
- package/studio/server/chunks/remote-z7lvth-BxO_zBV5.js +23 -0
- package/studio/server/chunks/remote-z7lvth-BxO_zBV5.js.map +1 -0
- package/studio/server/chunks/remote-zjib3m-Dcyw4Y6L.js +24 -0
- package/studio/server/chunks/remote-zjib3m-Dcyw4Y6L.js.map +1 -0
- package/studio/server/chunks/render-api-DtG3ftN1.js +240 -0
- package/studio/server/chunks/render-api-DtG3ftN1.js.map +1 -0
- package/studio/server/chunks/scrub-xyz.svelte_svelte_type_style_lang-BuQqzLLy.js +4752 -0
- package/studio/server/chunks/scrub-xyz.svelte_svelte_type_style_lang-BuQqzLLy.js.map +1 -0
- package/studio/server/chunks/stock-image.remote-Cn_Dh7Ok.js +87 -0
- package/studio/server/chunks/stock-image.remote-Cn_Dh7Ok.js.map +1 -0
- package/studio/server/chunks/subscription-BC4gCTG6.js +138 -0
- package/studio/server/chunks/subscription-BC4gCTG6.js.map +1 -0
- package/studio/server/chunks/subscription-limits-kr9leRdz.js +114 -0
- package/studio/server/chunks/subscription-limits-kr9leRdz.js.map +1 -0
- package/studio/server/chunks/template-usage.remote-DL-DKmuu.js +53 -0
- package/studio/server/chunks/template-usage.remote-DL-DKmuu.js.map +1 -0
- package/studio/server/chunks/thumbnail-queue-D4GYcvrD.js +148 -0
- package/studio/server/chunks/thumbnail-queue-D4GYcvrD.js.map +1 -0
- package/studio/server/chunks/tooltip-provider-D6ZF3H34.js +30 -0
- package/studio/server/chunks/tooltip-provider-D6ZF3H34.js.map +1 -0
- package/studio/server/chunks/tooltip.svelte-DRe72lD-.js +658 -0
- package/studio/server/chunks/tooltip.svelte-DRe72lD-.js.map +1 -0
- package/studio/server/chunks/tts-voices-B9J2ZzGy.js +32 -0
- package/studio/server/chunks/tts-voices-B9J2ZzGy.js.map +1 -0
- package/studio/server/chunks/tts.remote-Btrg7DBL.js +194 -0
- package/studio/server/chunks/tts.remote-Btrg7DBL.js.map +1 -0
- package/studio/server/chunks/ui.svelte-FJio-gZM.js +88 -0
- package/studio/server/chunks/ui.svelte-FJio-gZM.js.map +1 -0
- package/studio/server/chunks/upload-service-Boi3a_IC.js +220 -0
- package/studio/server/chunks/upload-service-Boi3a_IC.js.map +1 -0
- package/studio/server/chunks/upload.remote-Bhhj6ZvH.js +131 -0
- package/studio/server/chunks/upload.remote-Bhhj6ZvH.js.map +1 -0
- package/studio/server/chunks/video-generation.remote-CBblzjAk.js +197 -0
- package/studio/server/chunks/video-generation.remote-CBblzjAk.js.map +1 -0
- package/studio/server/chunks/video-renderer-DJUVOoRL.js +412 -0
- package/studio/server/chunks/video-renderer-DJUVOoRL.js.map +1 -0
- package/studio/server/chunks/watermark-DJiyRHwX.js +164 -0
- package/studio/server/chunks/watermark-DJiyRHwX.js.map +1 -0
- package/studio/server/index.js +1 -1
- package/studio/server/manifest.js +64 -62
- package/studio/server/manifest.js.map +1 -1
- package/studio/client/_app/immutable/assets/0.BKuIH3jk.css +0 -1
- package/studio/client/_app/immutable/assets/0.BKuIH3jk.css.br +0 -0
- package/studio/client/_app/immutable/assets/0.BKuIH3jk.css.gz +0 -0
- package/studio/client/_app/immutable/assets/editor._QrWwLKb.css +0 -1
- package/studio/client/_app/immutable/assets/editor._QrWwLKb.css.br +0 -2
- package/studio/client/_app/immutable/assets/editor._QrWwLKb.css.gz +0 -0
- package/studio/client/_app/immutable/chunks/-w8AgfGk.js +0 -1
- package/studio/client/_app/immutable/chunks/-w8AgfGk.js.br +0 -0
- package/studio/client/_app/immutable/chunks/-w8AgfGk.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/0LXoSuAq.js +0 -1
- package/studio/client/_app/immutable/chunks/0LXoSuAq.js.br +0 -0
- package/studio/client/_app/immutable/chunks/0LXoSuAq.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/0hf0C23S.js +0 -1
- package/studio/client/_app/immutable/chunks/0hf0C23S.js.br +0 -0
- package/studio/client/_app/immutable/chunks/0hf0C23S.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/52GXB-Lx.js +0 -1
- package/studio/client/_app/immutable/chunks/52GXB-Lx.js.br +0 -0
- package/studio/client/_app/immutable/chunks/52GXB-Lx.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/B6hmyilk.js +0 -1
- package/studio/client/_app/immutable/chunks/B6hmyilk.js.br +0 -0
- package/studio/client/_app/immutable/chunks/B6hmyilk.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BAhypDJI.js +0 -1
- package/studio/client/_app/immutable/chunks/BAhypDJI.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BAhypDJI.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BSBe_oem.js +0 -16
- package/studio/client/_app/immutable/chunks/BSBe_oem.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BSBe_oem.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BSPxtRj6.js +0 -1
- package/studio/client/_app/immutable/chunks/BSPxtRj6.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BSPxtRj6.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BTkRM4Uk.js +0 -1
- package/studio/client/_app/immutable/chunks/BTkRM4Uk.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BTkRM4Uk.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BY7NfAld.js +0 -4
- package/studio/client/_app/immutable/chunks/BY7NfAld.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BY7NfAld.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BcFepoRa.js +0 -730
- package/studio/client/_app/immutable/chunks/BcFepoRa.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BcFepoRa.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/BvzaEl32.js +0 -1
- package/studio/client/_app/immutable/chunks/BvzaEl32.js.br +0 -0
- package/studio/client/_app/immutable/chunks/BvzaEl32.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Bxcr6TQy.js +0 -99
- package/studio/client/_app/immutable/chunks/Bxcr6TQy.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Bxcr6TQy.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C0K_KauH.js +0 -1
- package/studio/client/_app/immutable/chunks/C0K_KauH.js.br +0 -0
- package/studio/client/_app/immutable/chunks/C0K_KauH.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C3zSaQMD.js +0 -1
- package/studio/client/_app/immutable/chunks/C3zSaQMD.js.br +0 -2
- package/studio/client/_app/immutable/chunks/C3zSaQMD.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C6BSxyDb.js +0 -1
- package/studio/client/_app/immutable/chunks/C6BSxyDb.js.br +0 -0
- package/studio/client/_app/immutable/chunks/C6BSxyDb.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C8FzHBqQ.js +0 -1
- package/studio/client/_app/immutable/chunks/C8FzHBqQ.js.br +0 -0
- package/studio/client/_app/immutable/chunks/C8FzHBqQ.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CC8c0epL.js +0 -4
- package/studio/client/_app/immutable/chunks/CC8c0epL.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CC8c0epL.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CQdOmqus.js +0 -1
- package/studio/client/_app/immutable/chunks/CQdOmqus.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CQdOmqus.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C_JEyoc9.js +0 -1
- package/studio/client/_app/immutable/chunks/C_JEyoc9.js.br +0 -0
- package/studio/client/_app/immutable/chunks/C_JEyoc9.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/C_glBBzR.js +0 -2
- package/studio/client/_app/immutable/chunks/C_glBBzR.js.br +0 -0
- package/studio/client/_app/immutable/chunks/C_glBBzR.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CazEfIaP.js +0 -1
- package/studio/client/_app/immutable/chunks/CazEfIaP.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CazEfIaP.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CiDOuEjR.js +0 -1
- package/studio/client/_app/immutable/chunks/CiDOuEjR.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CiDOuEjR.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Cnoy1Nsk.js +0 -1
- package/studio/client/_app/immutable/chunks/Cnoy1Nsk.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Cnoy1Nsk.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/CrHjC-CS.js +0 -1
- package/studio/client/_app/immutable/chunks/CrHjC-CS.js.br +0 -0
- package/studio/client/_app/immutable/chunks/CrHjC-CS.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/D-G_aVDe.js +0 -1
- package/studio/client/_app/immutable/chunks/D-G_aVDe.js.br +0 -0
- package/studio/client/_app/immutable/chunks/D-G_aVDe.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DK-xvsKr.js +0 -1
- package/studio/client/_app/immutable/chunks/DK-xvsKr.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DK-xvsKr.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DKwvwQkU.js +0 -1
- package/studio/client/_app/immutable/chunks/DKwvwQkU.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DKwvwQkU.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DRDQO7lT.js +0 -1
- package/studio/client/_app/immutable/chunks/DRDQO7lT.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DRDQO7lT.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DTcslyJn.js +0 -1
- package/studio/client/_app/immutable/chunks/DTcslyJn.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DTcslyJn.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DbaIpQMW.js +0 -512
- package/studio/client/_app/immutable/chunks/DbaIpQMW.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DbaIpQMW.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Dhskw98X.js +0 -1
- package/studio/client/_app/immutable/chunks/Dhskw98X.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Dhskw98X.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Dl3gtmRH.js +0 -1
- package/studio/client/_app/immutable/chunks/Dl3gtmRH.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Dl3gtmRH.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Du09UsT_.js +0 -1
- package/studio/client/_app/immutable/chunks/Du09UsT_.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Du09UsT_.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/Duawn2EX.js +0 -1
- package/studio/client/_app/immutable/chunks/Duawn2EX.js.br +0 -0
- package/studio/client/_app/immutable/chunks/Duawn2EX.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DxbwWMuJ.js +0 -1
- package/studio/client/_app/immutable/chunks/DxbwWMuJ.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DxbwWMuJ.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/DzMyNXK1.js +0 -5
- package/studio/client/_app/immutable/chunks/DzMyNXK1.js.br +0 -0
- package/studio/client/_app/immutable/chunks/DzMyNXK1.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/K82XSOze.js +0 -1
- package/studio/client/_app/immutable/chunks/K82XSOze.js.br +0 -0
- package/studio/client/_app/immutable/chunks/K82XSOze.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/LegOngm6.js +0 -92
- package/studio/client/_app/immutable/chunks/LegOngm6.js.br +0 -0
- package/studio/client/_app/immutable/chunks/LegOngm6.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/QUVFwVNg.js +0 -1
- package/studio/client/_app/immutable/chunks/QUVFwVNg.js.br +0 -0
- package/studio/client/_app/immutable/chunks/QUVFwVNg.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/UzmbP4fJ.js +0 -1
- package/studio/client/_app/immutable/chunks/UzmbP4fJ.js.br +0 -0
- package/studio/client/_app/immutable/chunks/UzmbP4fJ.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/WVZkyfqK.js +0 -1
- package/studio/client/_app/immutable/chunks/WVZkyfqK.js.br +0 -0
- package/studio/client/_app/immutable/chunks/WVZkyfqK.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/lmiZGmp5.js +0 -1
- package/studio/client/_app/immutable/chunks/lmiZGmp5.js.br +0 -0
- package/studio/client/_app/immutable/chunks/lmiZGmp5.js.gz +0 -0
- package/studio/client/_app/immutable/chunks/t2OI8QCJ.js +0 -2
- package/studio/client/_app/immutable/chunks/t2OI8QCJ.js.br +0 -0
- package/studio/client/_app/immutable/chunks/t2OI8QCJ.js.gz +0 -0
- package/studio/client/_app/immutable/entry/app.ZJxo7olm.js +0 -2
- package/studio/client/_app/immutable/entry/app.ZJxo7olm.js.br +0 -0
- package/studio/client/_app/immutable/entry/app.ZJxo7olm.js.gz +0 -0
- package/studio/client/_app/immutable/entry/start.8QDn_ECL.js +0 -1
- package/studio/client/_app/immutable/entry/start.8QDn_ECL.js.br +0 -0
- package/studio/client/_app/immutable/entry/start.8QDn_ECL.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/0.adNFkwFE.js +0 -2
- package/studio/client/_app/immutable/nodes/0.adNFkwFE.js.br +0 -0
- package/studio/client/_app/immutable/nodes/0.adNFkwFE.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/1.BWNv6Cb_.js +0 -1
- package/studio/client/_app/immutable/nodes/1.BWNv6Cb_.js.br +0 -0
- package/studio/client/_app/immutable/nodes/1.BWNv6Cb_.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/10.CczwW3Jo.js +0 -1
- package/studio/client/_app/immutable/nodes/10.CczwW3Jo.js.br +0 -0
- package/studio/client/_app/immutable/nodes/10.CczwW3Jo.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/11.DLp4Fbp3.js +0 -1
- package/studio/client/_app/immutable/nodes/11.DLp4Fbp3.js.br +0 -0
- package/studio/client/_app/immutable/nodes/11.DLp4Fbp3.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/12.4rh6TzEf.js +0 -2
- package/studio/client/_app/immutable/nodes/12.4rh6TzEf.js.br +0 -0
- package/studio/client/_app/immutable/nodes/12.4rh6TzEf.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/13.Dz4al1DL.js +0 -1
- package/studio/client/_app/immutable/nodes/13.Dz4al1DL.js.br +0 -0
- package/studio/client/_app/immutable/nodes/13.Dz4al1DL.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/14.Bl81Dygj.js +0 -1
- package/studio/client/_app/immutable/nodes/14.Bl81Dygj.js.br +0 -0
- package/studio/client/_app/immutable/nodes/14.Bl81Dygj.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/15.gG909oU9.js +0 -1
- package/studio/client/_app/immutable/nodes/15.gG909oU9.js.br +0 -0
- package/studio/client/_app/immutable/nodes/15.gG909oU9.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/16.7V_UKKuG.js +0 -8
- package/studio/client/_app/immutable/nodes/16.7V_UKKuG.js.br +0 -0
- package/studio/client/_app/immutable/nodes/16.7V_UKKuG.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/17.Cz647w46.js +0 -1
- package/studio/client/_app/immutable/nodes/17.Cz647w46.js.br +0 -0
- package/studio/client/_app/immutable/nodes/17.Cz647w46.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/18.BCZi6A5-.js +0 -1
- package/studio/client/_app/immutable/nodes/18.BCZi6A5-.js.br +0 -0
- package/studio/client/_app/immutable/nodes/18.BCZi6A5-.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/19.DoglPV3k.js +0 -1
- package/studio/client/_app/immutable/nodes/19.DoglPV3k.js.br +0 -0
- package/studio/client/_app/immutable/nodes/19.DoglPV3k.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/20.DGbcSpHq.js +0 -45
- package/studio/client/_app/immutable/nodes/20.DGbcSpHq.js.br +0 -0
- package/studio/client/_app/immutable/nodes/20.DGbcSpHq.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/21.CdVcKzDq.js +0 -16
- package/studio/client/_app/immutable/nodes/21.CdVcKzDq.js.br +0 -0
- package/studio/client/_app/immutable/nodes/21.CdVcKzDq.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/28.lF0IrCqU.js +0 -8
- package/studio/client/_app/immutable/nodes/28.lF0IrCqU.js.br +0 -0
- package/studio/client/_app/immutable/nodes/28.lF0IrCqU.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/3.C1mJzj4n.js +0 -1
- package/studio/client/_app/immutable/nodes/3.C1mJzj4n.js.br +0 -0
- package/studio/client/_app/immutable/nodes/3.C1mJzj4n.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/30.BvTn5fYt.js +0 -26
- package/studio/client/_app/immutable/nodes/30.BvTn5fYt.js.br +0 -0
- package/studio/client/_app/immutable/nodes/30.BvTn5fYt.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/38.CX0Z5dJm.js +0 -1
- package/studio/client/_app/immutable/nodes/38.CX0Z5dJm.js.br +0 -0
- package/studio/client/_app/immutable/nodes/38.CX0Z5dJm.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/39.CRxr2YQ6.js +0 -87
- package/studio/client/_app/immutable/nodes/39.CRxr2YQ6.js.br +0 -0
- package/studio/client/_app/immutable/nodes/39.CRxr2YQ6.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/4.YfreNTfv.js +0 -1
- package/studio/client/_app/immutable/nodes/4.YfreNTfv.js.br +0 -1
- package/studio/client/_app/immutable/nodes/4.YfreNTfv.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/40.BVTwXIYj.js +0 -15
- package/studio/client/_app/immutable/nodes/40.BVTwXIYj.js.br +0 -0
- package/studio/client/_app/immutable/nodes/40.BVTwXIYj.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/41.JtyATqrM.js +0 -1
- package/studio/client/_app/immutable/nodes/41.JtyATqrM.js.br +0 -0
- package/studio/client/_app/immutable/nodes/41.JtyATqrM.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/42.XO5VZAmI.js +0 -1
- package/studio/client/_app/immutable/nodes/42.XO5VZAmI.js.br +0 -0
- package/studio/client/_app/immutable/nodes/42.XO5VZAmI.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/43.CWpVKGhz.js +0 -1
- package/studio/client/_app/immutable/nodes/43.CWpVKGhz.js.br +0 -0
- package/studio/client/_app/immutable/nodes/43.CWpVKGhz.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/44.DX64rKI7.js +0 -1
- package/studio/client/_app/immutable/nodes/44.DX64rKI7.js.br +0 -0
- package/studio/client/_app/immutable/nodes/44.DX64rKI7.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/45.mLQWUOa5.js +0 -2
- package/studio/client/_app/immutable/nodes/45.mLQWUOa5.js.br +0 -0
- package/studio/client/_app/immutable/nodes/45.mLQWUOa5.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/46.KA353oiQ.js +0 -1
- package/studio/client/_app/immutable/nodes/46.KA353oiQ.js.br +0 -0
- package/studio/client/_app/immutable/nodes/46.KA353oiQ.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/47.D3mABDjY.js +0 -1
- package/studio/client/_app/immutable/nodes/47.D3mABDjY.js.br +0 -0
- package/studio/client/_app/immutable/nodes/47.D3mABDjY.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/48.BwjQpQnt.js +0 -1
- package/studio/client/_app/immutable/nodes/48.BwjQpQnt.js.br +0 -0
- package/studio/client/_app/immutable/nodes/48.BwjQpQnt.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/49.EaoBcCzE.js +0 -7
- package/studio/client/_app/immutable/nodes/49.EaoBcCzE.js.br +0 -0
- package/studio/client/_app/immutable/nodes/49.EaoBcCzE.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/5.YfreNTfv.js +0 -1
- package/studio/client/_app/immutable/nodes/5.YfreNTfv.js.br +0 -1
- package/studio/client/_app/immutable/nodes/5.YfreNTfv.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/7.pzlwJNWY.js +0 -1
- package/studio/client/_app/immutable/nodes/7.pzlwJNWY.js.br +0 -0
- package/studio/client/_app/immutable/nodes/7.pzlwJNWY.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/8.COxVG2uL.js +0 -1
- package/studio/client/_app/immutable/nodes/8.COxVG2uL.js.br +0 -0
- package/studio/client/_app/immutable/nodes/8.COxVG2uL.js.gz +0 -0
- package/studio/client/_app/immutable/nodes/9.DEUtbL1G.js +0 -1
- package/studio/client/_app/immutable/nodes/9.DEUtbL1G.js.br +0 -0
- package/studio/client/_app/immutable/nodes/9.DEUtbL1G.js.gz +0 -0
- package/studio/server/chunks/0-oFoj6xob.js +0 -32
- package/studio/server/chunks/0-oFoj6xob.js.map +0 -1
- package/studio/server/chunks/1-BZOYuQnd.js +0 -9
- package/studio/server/chunks/1-BZOYuQnd.js.map +0 -1
- package/studio/server/chunks/11-BDyz7OWy.js +0 -9
- package/studio/server/chunks/11-BDyz7OWy.js.map +0 -1
- package/studio/server/chunks/12-DCVWOw1E.js +0 -9
- package/studio/server/chunks/12-DCVWOw1E.js.map +0 -1
- package/studio/server/chunks/13-D5eVPcWI.js +0 -59
- package/studio/server/chunks/13-D5eVPcWI.js.map +0 -1
- package/studio/server/chunks/14-DLN4rZiK.js +0 -60
- package/studio/server/chunks/14-DLN4rZiK.js.map +0 -1
- package/studio/server/chunks/15-D3vqObtU.js +0 -9
- package/studio/server/chunks/15-D3vqObtU.js.map +0 -1
- package/studio/server/chunks/16-B80xfxth.js +0 -72
- package/studio/server/chunks/16-B80xfxth.js.map +0 -1
- package/studio/server/chunks/17-BHuReO4a.js +0 -9
- package/studio/server/chunks/17-BHuReO4a.js.map +0 -1
- package/studio/server/chunks/18-wt-l6gKd.js +0 -9
- package/studio/server/chunks/18-wt-l6gKd.js.map +0 -1
- package/studio/server/chunks/19-CM1TK59H.js +0 -9
- package/studio/server/chunks/19-CM1TK59H.js.map +0 -1
- package/studio/server/chunks/20-l1HA1gZm.js +0 -138
- package/studio/server/chunks/20-l1HA1gZm.js.map +0 -1
- package/studio/server/chunks/3-CzCasqaG.js +0 -9
- package/studio/server/chunks/3-CzCasqaG.js.map +0 -1
- package/studio/server/chunks/4-CI_t25RD.js +0 -9
- package/studio/server/chunks/4-CI_t25RD.js.map +0 -1
- package/studio/server/chunks/42-P_ROr-Kz.js +0 -56
- package/studio/server/chunks/42-P_ROr-Kz.js.map +0 -1
- package/studio/server/chunks/43-DjsPMRbC.js +0 -9
- package/studio/server/chunks/43-DjsPMRbC.js.map +0 -1
- package/studio/server/chunks/44-Bja0V2qT.js +0 -9
- package/studio/server/chunks/44-Bja0V2qT.js.map +0 -1
- package/studio/server/chunks/45-ClLo6O3h.js +0 -114
- package/studio/server/chunks/45-ClLo6O3h.js.map +0 -1
- package/studio/server/chunks/49-1-oQCIAS.js +0 -14
- package/studio/server/chunks/49-1-oQCIAS.js.map +0 -1
- package/studio/server/chunks/5-rt2C_t_3.js +0 -9
- package/studio/server/chunks/5-rt2C_t_3.js.map +0 -1
- package/studio/server/chunks/7-bEHSOvc4.js +0 -215
- package/studio/server/chunks/7-bEHSOvc4.js.map +0 -1
- package/studio/server/chunks/_error.svelte-DVRBaDbx.js +0 -98
- package/studio/server/chunks/_error.svelte-DVRBaDbx.js.map +0 -1
- package/studio/server/chunks/_error.svelte-Dt8wv2eu.js +0 -98
- package/studio/server/chunks/_error.svelte-Dt8wv2eu.js.map +0 -1
- package/studio/server/chunks/_layout.svelte-55nnwb0N.js +0 -400
- package/studio/server/chunks/_layout.svelte-55nnwb0N.js.map +0 -1
- package/studio/server/chunks/_layout.svelte-BL7PMde9.js +0 -64
- package/studio/server/chunks/_layout.svelte-BL7PMde9.js.map +0 -1
- package/studio/server/chunks/_layout.svelte-BtEadWQB.js +0 -64
- package/studio/server/chunks/_layout.svelte-BtEadWQB.js.map +0 -1
- package/studio/server/chunks/_layout.svelte-CfDTUogU.js +0 -1054
- package/studio/server/chunks/_layout.svelte-CfDTUogU.js.map +0 -1
- package/studio/server/chunks/_page.svelte-B-1o9Tva.js +0 -506
- package/studio/server/chunks/_page.svelte-B-1o9Tva.js.map +0 -1
- package/studio/server/chunks/_page.svelte-B93-TmZo.js +0 -160
- package/studio/server/chunks/_page.svelte-B93-TmZo.js.map +0 -1
- package/studio/server/chunks/_page.svelte-BqwbRDzJ.js +0 -1731
- package/studio/server/chunks/_page.svelte-BqwbRDzJ.js.map +0 -1
- package/studio/server/chunks/_page.svelte-CWrqBxDM.js +0 -1021
- package/studio/server/chunks/_page.svelte-CWrqBxDM.js.map +0 -1
- package/studio/server/chunks/_page.svelte-Cg5sXfnK.js +0 -111
- package/studio/server/chunks/_page.svelte-Cg5sXfnK.js.map +0 -1
- package/studio/server/chunks/_page.svelte-CvEkB4SR.js +0 -319
- package/studio/server/chunks/_page.svelte-CvEkB4SR.js.map +0 -1
- package/studio/server/chunks/_page.svelte-D5uSaQ_6.js +0 -256
- package/studio/server/chunks/_page.svelte-D5uSaQ_6.js.map +0 -1
- package/studio/server/chunks/_page.svelte-D6XGPiAL.js +0 -79
- package/studio/server/chunks/_page.svelte-D6XGPiAL.js.map +0 -1
- package/studio/server/chunks/_page.svelte-DAyju3rn.js +0 -113
- package/studio/server/chunks/_page.svelte-DAyju3rn.js.map +0 -1
- package/studio/server/chunks/_page.svelte-Dxd9_9zA.js +0 -418
- package/studio/server/chunks/_page.svelte-Dxd9_9zA.js.map +0 -1
- package/studio/server/chunks/_page.svelte-GHdQM1UB.js +0 -191
- package/studio/server/chunks/_page.svelte-GHdQM1UB.js.map +0 -1
- package/studio/server/chunks/_page.svelte-axu5NW2S.js +0 -11053
- package/studio/server/chunks/_page.svelte-axu5NW2S.js.map +0 -1
- package/studio/server/chunks/_server.ts-5MqnJlEk.js +0 -87
- package/studio/server/chunks/_server.ts-5MqnJlEk.js.map +0 -1
- package/studio/server/chunks/_server.ts-6KoXdftM.js +0 -70
- package/studio/server/chunks/_server.ts-6KoXdftM.js.map +0 -1
- package/studio/server/chunks/_server.ts-BPbGZeLb.js +0 -718
- package/studio/server/chunks/_server.ts-BPbGZeLb.js.map +0 -1
- package/studio/server/chunks/_server.ts-BQiH-pDg.js +0 -79
- package/studio/server/chunks/_server.ts-BQiH-pDg.js.map +0 -1
- package/studio/server/chunks/_server.ts-BYd-I1tc.js +0 -41
- package/studio/server/chunks/_server.ts-BYd-I1tc.js.map +0 -1
- package/studio/server/chunks/_server.ts-BryF-BNZ.js +0 -96
- package/studio/server/chunks/_server.ts-BryF-BNZ.js.map +0 -1
- package/studio/server/chunks/_server.ts-C5J0RS2-.js +0 -117
- package/studio/server/chunks/_server.ts-C5J0RS2-.js.map +0 -1
- package/studio/server/chunks/_server.ts-CTCmDBMr.js +0 -49
- package/studio/server/chunks/_server.ts-CTCmDBMr.js.map +0 -1
- package/studio/server/chunks/_server.ts-CXM9soU9.js +0 -34
- package/studio/server/chunks/_server.ts-CXM9soU9.js.map +0 -1
- package/studio/server/chunks/_server.ts-CbZYXLYW.js +0 -56
- package/studio/server/chunks/_server.ts-CbZYXLYW.js.map +0 -1
- package/studio/server/chunks/_server.ts-CtiogpOk.js +0 -302
- package/studio/server/chunks/_server.ts-CtiogpOk.js.map +0 -1
- package/studio/server/chunks/_server.ts-D75v2LAN.js +0 -52
- package/studio/server/chunks/_server.ts-D75v2LAN.js.map +0 -1
- package/studio/server/chunks/_server.ts-DANOf9Kg.js +0 -158
- package/studio/server/chunks/_server.ts-DANOf9Kg.js.map +0 -1
- package/studio/server/chunks/_server.ts-DF0SCYmL.js +0 -48
- package/studio/server/chunks/_server.ts-DF0SCYmL.js.map +0 -1
- package/studio/server/chunks/_server.ts-DrkT4gOl.js +0 -121
- package/studio/server/chunks/_server.ts-DrkT4gOl.js.map +0 -1
- package/studio/server/chunks/_server.ts-DscCNgaG.js +0 -87
- package/studio/server/chunks/_server.ts-DscCNgaG.js.map +0 -1
- package/studio/server/chunks/_server.ts-Duz2jodQ.js +0 -22
- package/studio/server/chunks/_server.ts-Duz2jodQ.js.map +0 -1
- package/studio/server/chunks/_server.ts-K-RN8Vah.js +0 -684
- package/studio/server/chunks/_server.ts-K-RN8Vah.js.map +0 -1
- package/studio/server/chunks/_server.ts-OkHzpWAg.js +0 -68
- package/studio/server/chunks/_server.ts-OkHzpWAg.js.map +0 -1
- package/studio/server/chunks/_server.ts-T7wyJ0On.js +0 -58
- package/studio/server/chunks/_server.ts-T7wyJ0On.js.map +0 -1
- package/studio/server/chunks/_server.ts-XWBoVSBG.js +0 -232
- package/studio/server/chunks/_server.ts-XWBoVSBG.js.map +0 -1
- package/studio/server/chunks/_server.ts-liWNn8pd.js +0 -91
- package/studio/server/chunks/_server.ts-liWNn8pd.js.map +0 -1
- package/studio/server/chunks/_server.ts-wjU8lnxc.js +0 -108
- package/studio/server/chunks/_server.ts-wjU8lnxc.js.map +0 -1
- package/studio/server/chunks/_server.ts-xBWWvyW7.js +0 -60
- package/studio/server/chunks/_server.ts-xBWWvyW7.js.map +0 -1
- package/studio/server/chunks/adapter-B-i_4tnk.js +0 -91
- package/studio/server/chunks/adapter-B-i_4tnk.js.map +0 -1
- package/studio/server/chunks/admin.remote-5orFS4k1.js +0 -105
- package/studio/server/chunks/admin.remote-5orFS4k1.js.map +0 -1
- package/studio/server/chunks/ai-access-C-qFWKe-.js +0 -282
- package/studio/server/chunks/ai-access-C-qFWKe-.js.map +0 -1
- package/studio/server/chunks/ai.remote-Da4JRO59.js +0 -37
- package/studio/server/chunks/ai.remote-Da4JRO59.js.map +0 -1
- package/studio/server/chunks/alert-dialog-description-DOMGfPke.js +0 -578
- package/studio/server/chunks/alert-dialog-description-DOMGfPke.js.map +0 -1
- package/studio/server/chunks/animation-DPwINa4I.js +0 -2892
- package/studio/server/chunks/animation-DPwINa4I.js.map +0 -1
- package/studio/server/chunks/api-DkajkFtS.js +0 -434
- package/studio/server/chunks/api-DkajkFtS.js.map +0 -1
- package/studio/server/chunks/api-keys-D9bbxRhK.js +0 -117
- package/studio/server/chunks/api-keys-D9bbxRhK.js.map +0 -1
- package/studio/server/chunks/api-keys.remote-CN4CRiIA.js +0 -88
- package/studio/server/chunks/api-keys.remote-CN4CRiIA.js.map +0 -1
- package/studio/server/chunks/app-header-BfPEtjyC.js +0 -96
- package/studio/server/chunks/app-header-BfPEtjyC.js.map +0 -1
- package/studio/server/chunks/assets.remote-B8_mtYX6.js +0 -113
- package/studio/server/chunks/assets.remote-B8_mtYX6.js.map +0 -1
- package/studio/server/chunks/attribute-protocol-C_pjkekX.js +0 -151
- package/studio/server/chunks/attribute-protocol-C_pjkekX.js.map +0 -1
- package/studio/server/chunks/auth-CiWMo-Qu.js +0 -22472
- package/studio/server/chunks/auth-CiWMo-Qu.js.map +0 -1
- package/studio/server/chunks/auth.remote-C6edHyaa.js +0 -351
- package/studio/server/chunks/auth.remote-C6edHyaa.js.map +0 -1
- package/studio/server/chunks/base-Bq5n_4Fz.js +0 -210
- package/studio/server/chunks/base-Bq5n_4Fz.js.map +0 -1
- package/studio/server/chunks/bun-sqlite-dialect-C8OaCWSL-CsGahR4n.js +0 -197
- package/studio/server/chunks/bun-sqlite-dialect-C8OaCWSL-CsGahR4n.js.map +0 -1
- package/studio/server/chunks/captions.remote-BtVr9SZd.js +0 -184
- package/studio/server/chunks/captions.remote-BtVr9SZd.js.map +0 -1
- package/studio/server/chunks/client2-D2vZ7-eF.js +0 -66
- package/studio/server/chunks/client2-D2vZ7-eF.js.map +0 -1
- package/studio/server/chunks/d1-sqlite-dialect-sYHNqBte-ClSngqDL.js +0 -160
- package/studio/server/chunks/d1-sqlite-dialect-sYHNqBte-ClSngqDL.js.map +0 -1
- package/studio/server/chunks/desktop-bootstrap-C46aoZ6Z.js +0 -67
- package/studio/server/chunks/desktop-bootstrap-C46aoZ6Z.js.map +0 -1
- package/studio/server/chunks/dubbing.remote-DHGIYU_A.js +0 -153
- package/studio/server/chunks/dubbing.remote-DHGIYU_A.js.map +0 -1
- package/studio/server/chunks/editor.svelte-CiJvwHAm.js +0 -21024
- package/studio/server/chunks/editor.svelte-CiJvwHAm.js.map +0 -1
- package/studio/server/chunks/env-CsH9rG40.js +0 -91
- package/studio/server/chunks/env-CsH9rG40.js.map +0 -1
- package/studio/server/chunks/extract-audio.remote-D4Autpid.js +0 -95
- package/studio/server/chunks/extract-audio.remote-D4Autpid.js.map +0 -1
- package/studio/server/chunks/feedback.remote-CfdjHpdW.js +0 -49
- package/studio/server/chunks/feedback.remote-CfdjHpdW.js.map +0 -1
- package/studio/server/chunks/fs-project-BLLGFRv1.js +0 -134
- package/studio/server/chunks/fs-project-BLLGFRv1.js.map +0 -1
- package/studio/server/chunks/generate-speech-BERLu-Vk.js +0 -536
- package/studio/server/chunks/generate-speech-BERLu-Vk.js.map +0 -1
- package/studio/server/chunks/hooks.server-MEVEsSA9.js +0 -309
- package/studio/server/chunks/hooks.server-MEVEsSA9.js.map +0 -1
- package/studio/server/chunks/html-parser-LopZIqoS.js +0 -8516
- package/studio/server/chunks/html-parser-LopZIqoS.js.map +0 -1
- package/studio/server/chunks/html-writer-Ea_4f8hT.js +0 -242
- package/studio/server/chunks/html-writer-Ea_4f8hT.js.map +0 -1
- package/studio/server/chunks/index-CBGGzszt.js +0 -4578
- package/studio/server/chunks/index-CBGGzszt.js.map +0 -1
- package/studio/server/chunks/index12-C5zKPozR.js +0 -265
- package/studio/server/chunks/index12-C5zKPozR.js.map +0 -1
- package/studio/server/chunks/index2-e2qJOUJ5.js +0 -23
- package/studio/server/chunks/index2-e2qJOUJ5.js.map +0 -1
- package/studio/server/chunks/index3-akRvPp-y.js +0 -8
- package/studio/server/chunks/index3-akRvPp-y.js.map +0 -1
- package/studio/server/chunks/index4-CowumPcw.js +0 -48
- package/studio/server/chunks/index4-CowumPcw.js.map +0 -1
- package/studio/server/chunks/index6-92MPHdlt.js +0 -239
- package/studio/server/chunks/index6-92MPHdlt.js.map +0 -1
- package/studio/server/chunks/index8-zuJK-jFa.js +0 -44
- package/studio/server/chunks/index8-zuJK-jFa.js.map +0 -1
- package/studio/server/chunks/layout-template-BoNv9dF2.js +0 -1371
- package/studio/server/chunks/layout-template-BoNv9dF2.js.map +0 -1
- package/studio/server/chunks/lummi.remote-Bx8Vg0et.js +0 -215
- package/studio/server/chunks/lummi.remote-Bx8Vg0et.js.map +0 -1
- package/studio/server/chunks/media-ARIn6Aw1.js +0 -157
- package/studio/server/chunks/media-ARIn6Aw1.js.map +0 -1
- package/studio/server/chunks/media-analysis-GisyEkHY.js +0 -171
- package/studio/server/chunks/media-analysis-GisyEkHY.js.map +0 -1
- package/studio/server/chunks/media-analysis.remote-BzGY_HjI.js +0 -63
- package/studio/server/chunks/media-analysis.remote-BzGY_HjI.js.map +0 -1
- package/studio/server/chunks/middleware-CazuI_Wf.js +0 -72
- package/studio/server/chunks/middleware-CazuI_Wf.js.map +0 -1
- package/studio/server/chunks/mutation-schemas-DOtU1skD.js +0 -137
- package/studio/server/chunks/mutation-schemas-DOtU1skD.js.map +0 -1
- package/studio/server/chunks/mutations-6JWuU3s9.js +0 -503
- package/studio/server/chunks/mutations-6JWuU3s9.js.map +0 -1
- package/studio/server/chunks/node-sqlite-dialect-Q2OvDp9q.js +0 -197
- package/studio/server/chunks/node-sqlite-dialect-Q2OvDp9q.js.map +0 -1
- package/studio/server/chunks/onboarding-email-CHXOtnYq.js +0 -311
- package/studio/server/chunks/onboarding-email-CHXOtnYq.js.map +0 -1
- package/studio/server/chunks/optional-services-rI0rdA4P.js +0 -45
- package/studio/server/chunks/optional-services-rI0rdA4P.js.map +0 -1
- package/studio/server/chunks/pagination-JOJpLeOm.js +0 -159
- package/studio/server/chunks/pagination-JOJpLeOm.js.map +0 -1
- package/studio/server/chunks/posthog-DXw1m97H.js +0 -11
- package/studio/server/chunks/posthog-DXw1m97H.js.map +0 -1
- package/studio/server/chunks/presets-BKeKVq-L.js +0 -369
- package/studio/server/chunks/presets-BKeKVq-L.js.map +0 -1
- package/studio/server/chunks/project-layer-Bbz6zgRN.js +0 -28
- package/studio/server/chunks/project-layer-Bbz6zgRN.js.map +0 -1
- package/studio/server/chunks/projects.remote-Bzca0wLB.js +0 -297
- package/studio/server/chunks/projects.remote-Bzca0wLB.js.map +0 -1
- package/studio/server/chunks/queue-init-DUao6hhx.js +0 -38
- package/studio/server/chunks/queue-init-DUao6hhx.js.map +0 -1
- package/studio/server/chunks/registry-Cq-PY3D3.js +0 -16
- package/studio/server/chunks/registry-Cq-PY3D3.js.map +0 -1
- package/studio/server/chunks/registry2-BSIleFMP.js +0 -4851
- package/studio/server/chunks/registry2-BSIleFMP.js.map +0 -1
- package/studio/server/chunks/remote-148gj0t-CBE9iOwY.js +0 -14
- package/studio/server/chunks/remote-148gj0t-CBE9iOwY.js.map +0 -1
- package/studio/server/chunks/remote-1afl6ud-yFS1W6RH.js +0 -18
- package/studio/server/chunks/remote-1afl6ud-yFS1W6RH.js.map +0 -1
- package/studio/server/chunks/remote-1mi3j6d-COSwmla7.js +0 -21
- package/studio/server/chunks/remote-1mi3j6d-COSwmla7.js.map +0 -1
- package/studio/server/chunks/remote-1rjk8jv-C-ZOeAZr.js +0 -22
- package/studio/server/chunks/remote-1rjk8jv-C-ZOeAZr.js.map +0 -1
- package/studio/server/chunks/remote-1web5fy-Crw8BQuf.js +0 -30
- package/studio/server/chunks/remote-1web5fy-Crw8BQuf.js.map +0 -1
- package/studio/server/chunks/remote-5mu9ty-CiUcViXD.js +0 -31
- package/studio/server/chunks/remote-5mu9ty-CiUcViXD.js.map +0 -1
- package/studio/server/chunks/remote-aelvq6-BHLpqBRM.js +0 -26
- package/studio/server/chunks/remote-aelvq6-BHLpqBRM.js.map +0 -1
- package/studio/server/chunks/remote-em2k3w-BXLmObYN.js +0 -25
- package/studio/server/chunks/remote-em2k3w-BXLmObYN.js.map +0 -1
- package/studio/server/chunks/remote-gezfls-Cmzz6fWa.js +0 -21
- package/studio/server/chunks/remote-gezfls-Cmzz6fWa.js.map +0 -1
- package/studio/server/chunks/remote-lv3p1w-fkE1PB7N.js +0 -15
- package/studio/server/chunks/remote-lv3p1w-fkE1PB7N.js.map +0 -1
- package/studio/server/chunks/remote-ssr7vi-Cbv95MBE.js +0 -33
- package/studio/server/chunks/remote-ssr7vi-Cbv95MBE.js.map +0 -1
- package/studio/server/chunks/remote-sy19x7-BA_A5ekM.js +0 -29
- package/studio/server/chunks/remote-sy19x7-BA_A5ekM.js.map +0 -1
- package/studio/server/chunks/remote-tisyb0-CCv0922s.js +0 -31
- package/studio/server/chunks/remote-tisyb0-CCv0922s.js.map +0 -1
- package/studio/server/chunks/remote-xj8myv-CNAPSYMd.js +0 -31
- package/studio/server/chunks/remote-xj8myv-CNAPSYMd.js.map +0 -1
- package/studio/server/chunks/remote-z7lvth-Dddp33_7.js +0 -23
- package/studio/server/chunks/remote-z7lvth-Dddp33_7.js.map +0 -1
- package/studio/server/chunks/remote-zjib3m-CgmI2LZY.js +0 -24
- package/studio/server/chunks/remote-zjib3m-CgmI2LZY.js.map +0 -1
- package/studio/server/chunks/render-api-su0kZhxA.js +0 -240
- package/studio/server/chunks/render-api-su0kZhxA.js.map +0 -1
- package/studio/server/chunks/scrub-xyz.svelte_svelte_type_style_lang-DU6E-ve4.js +0 -4752
- package/studio/server/chunks/scrub-xyz.svelte_svelte_type_style_lang-DU6E-ve4.js.map +0 -1
- package/studio/server/chunks/subscription-CjEjoIFS.js +0 -138
- package/studio/server/chunks/subscription-CjEjoIFS.js.map +0 -1
- package/studio/server/chunks/subscription-limits-B7Q2pts9.js +0 -114
- package/studio/server/chunks/subscription-limits-B7Q2pts9.js.map +0 -1
- package/studio/server/chunks/template-usage.remote-DOFxtTHM.js +0 -53
- package/studio/server/chunks/template-usage.remote-DOFxtTHM.js.map +0 -1
- package/studio/server/chunks/thumbnail-queue-BrPRb6F7.js +0 -148
- package/studio/server/chunks/thumbnail-queue-BrPRb6F7.js.map +0 -1
- package/studio/server/chunks/tooltip-provider-BFZoIP02.js +0 -30
- package/studio/server/chunks/tooltip-provider-BFZoIP02.js.map +0 -1
- package/studio/server/chunks/tooltip.svelte-Bjv4TH3V.js +0 -658
- package/studio/server/chunks/tooltip.svelte-Bjv4TH3V.js.map +0 -1
- package/studio/server/chunks/tts.remote-yMAINgCv.js +0 -187
- package/studio/server/chunks/tts.remote-yMAINgCv.js.map +0 -1
- package/studio/server/chunks/ui.svelte-CpA5kqfc.js +0 -88
- package/studio/server/chunks/ui.svelte-CpA5kqfc.js.map +0 -1
- package/studio/server/chunks/upload-service-CC8E9Slo.js +0 -212
- package/studio/server/chunks/upload-service-CC8E9Slo.js.map +0 -1
- package/studio/server/chunks/upload.remote-RYslr_Ul.js +0 -131
- package/studio/server/chunks/upload.remote-RYslr_Ul.js.map +0 -1
- package/studio/server/chunks/video-generation.remote-CrPX-27G.js +0 -197
- package/studio/server/chunks/video-generation.remote-CrPX-27G.js.map +0 -1
- package/studio/server/chunks/video-renderer-CSVxoynk.js +0 -412
- package/studio/server/chunks/video-renderer-CSVxoynk.js.map +0 -1
- package/studio/server/chunks/watermark-R6qX4KkH.js +0 -164
- package/studio/server/chunks/watermark-R6qX4KkH.js.map +0 -1
|
@@ -0,0 +1,4752 @@
|
|
|
1
|
+
import './async-lVJA8xJZ.js';
|
|
2
|
+
import { d as spread_props, h as derived, i as escape_html, f as bind_props, l as attr_style, o as stringify, p as props_id, a as attributes, e as ensure_array_like, t as attr, c as clsx, w as attr_class } from './index9-D9BBZH26.js';
|
|
3
|
+
import { A as App_header } from './app-header-BZw6FnXs.js';
|
|
4
|
+
import { B as Button, L as Loader_circle, c as cn } from './button-EIkCOf5j.js';
|
|
5
|
+
import { ao as Popover, ap as Popover_trigger, aq as Popover_content, aA as Resolution_select, aB as Download, B as getEditorState, aC as Collapsible, ab as Pricing_dialog, aD as Root$1, aE as Collapsible_content, aF as Collapsible_trigger, aG as Dialog_content, aH as Dialog_header, aI as Dialog_title, aJ as Dialog_description, aw as Lock_open, L as Lock, n as noop$1, aK as MenuRootState, aL as MenuMenuState, aM as Floating_layer, aN as Heart, aO as Zap, aP as Calendar, H as Textarea, t as toast, e as Portal$1, aQ as DropdownMenuTriggerState, aR as Floating_layer_anchor, aS as MenuContentState, aT as Popper_layer_force_mount, aU as Popper_layer, aV as getFloatingContentCSSVars, aW as MenuSeparatorState } from './editor.svelte-Bdv5LaOt.js';
|
|
6
|
+
import { c as createBitsAttrs, e as createId, b as boxWith$1, a as attachRef, m as mergeProps } from './input-C1z0Nn4U.js';
|
|
7
|
+
import { Input, ALL_FORMATS, BlobSource, BufferTarget, Output, Mp4OutputFormat, Conversion } from 'mediabunny';
|
|
8
|
+
import { t as trackPlausibleEvent } from './auth-client-Cpf930Sw.js';
|
|
9
|
+
import { a as isLocalPreviewMode, i as isDesktopMode } from './desktop-mode-Bkebx7Vx.js';
|
|
10
|
+
import { I as Icon } from './Icon-DbEXclx7.js';
|
|
11
|
+
import { u as uiStore } from './ui.svelte-FJio-gZM.js';
|
|
12
|
+
import { T as Theme_toggle } from './theme-toggle-B1Lrt9wK.js';
|
|
13
|
+
import { g as getUser } from './auth.remote-DgcD7hjY.js';
|
|
14
|
+
import { t as toggleVisibility, f as forkProject } from './projects.remote-BevbcBv4.js';
|
|
15
|
+
import { g as goto } from './client3-6wS0pbKv.js';
|
|
16
|
+
import { r as resolve } from './server2-vs5lBcGY.js';
|
|
17
|
+
import { c as Tooltip$1, d as Tooltip_trigger$1, b as Tooltip_content } from './registry2-DJC1cBxe.js';
|
|
18
|
+
import { T as Tooltip_provider } from './tooltip-provider-D6ZF3H34.js';
|
|
19
|
+
import { I as IsMobile } from './is-mobile.svelte-zA7Ppfff.js';
|
|
20
|
+
import { C as Chevron_left } from './arrow-right-Ba81Wr45.js';
|
|
21
|
+
import { X, M as Menu$1 } from './x-dSB6BXUp.js';
|
|
22
|
+
import { G as Git_fork } from './git-fork-CuYAvz6f.js';
|
|
23
|
+
import { s as sendFeedback } from './feedback.remote-DveIB_5_.js';
|
|
24
|
+
import { c as createSubscriber } from './copy-gHAQZ-hc.js';
|
|
25
|
+
|
|
26
|
+
function Circle_alert($$renderer, $$props) {
|
|
27
|
+
$$renderer.component(($$renderer2) => {
|
|
28
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
29
|
+
const iconNode = [
|
|
30
|
+
["circle", { "cx": "12", "cy": "12", "r": "10" }],
|
|
31
|
+
["line", { "x1": "12", "x2": "12", "y1": "8", "y2": "12" }],
|
|
32
|
+
[
|
|
33
|
+
"line",
|
|
34
|
+
{ "x1": "12", "x2": "12.01", "y1": "16", "y2": "16" }
|
|
35
|
+
]
|
|
36
|
+
];
|
|
37
|
+
Icon($$renderer2, spread_props([
|
|
38
|
+
{ name: "circle-alert" },
|
|
39
|
+
/**
|
|
40
|
+
* @component @name CircleAlert
|
|
41
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
42
|
+
*
|
|
43
|
+
* @preview  - https://lucide.dev/icons/circle-alert
|
|
44
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
45
|
+
*
|
|
46
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
47
|
+
* @returns {FunctionalComponent} Svelte component
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
props,
|
|
51
|
+
{
|
|
52
|
+
iconNode,
|
|
53
|
+
children: ($$renderer3) => {
|
|
54
|
+
props.children?.($$renderer3);
|
|
55
|
+
$$renderer3.push(`<!---->`);
|
|
56
|
+
},
|
|
57
|
+
$$slots: { default: true }
|
|
58
|
+
}
|
|
59
|
+
]));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
const progressAttrs = createBitsAttrs({ component: "progress", parts: ["root"] });
|
|
63
|
+
class ProgressRootState {
|
|
64
|
+
static create(opts) {
|
|
65
|
+
return new ProgressRootState(opts);
|
|
66
|
+
}
|
|
67
|
+
opts;
|
|
68
|
+
attachment;
|
|
69
|
+
constructor(opts) {
|
|
70
|
+
this.opts = opts;
|
|
71
|
+
this.attachment = attachRef(this.opts.ref);
|
|
72
|
+
}
|
|
73
|
+
#props = derived(() => ({
|
|
74
|
+
role: "progressbar",
|
|
75
|
+
value: this.opts.value.current,
|
|
76
|
+
"aria-valuemin": this.opts.min.current,
|
|
77
|
+
"aria-valuemax": this.opts.max.current,
|
|
78
|
+
"aria-valuenow": this.opts.value.current === null ? void 0 : this.opts.value.current,
|
|
79
|
+
"data-value": this.opts.value.current === null ? void 0 : this.opts.value.current,
|
|
80
|
+
"data-state": getProgressDataState(this.opts.value.current, this.opts.max.current),
|
|
81
|
+
"data-max": this.opts.max.current,
|
|
82
|
+
"data-min": this.opts.min.current,
|
|
83
|
+
"data-indeterminate": this.opts.value.current === null ? "" : void 0,
|
|
84
|
+
[progressAttrs.root]: "",
|
|
85
|
+
...this.attachment
|
|
86
|
+
}));
|
|
87
|
+
get props() {
|
|
88
|
+
return this.#props();
|
|
89
|
+
}
|
|
90
|
+
set props($$value) {
|
|
91
|
+
return this.#props($$value);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function getProgressDataState(value, max) {
|
|
95
|
+
if (value === null) return "indeterminate";
|
|
96
|
+
return value === max ? "loaded" : "loading";
|
|
97
|
+
}
|
|
98
|
+
function Progress$1($$renderer, $$props) {
|
|
99
|
+
$$renderer.component(($$renderer2) => {
|
|
100
|
+
const uid = props_id($$renderer2);
|
|
101
|
+
let {
|
|
102
|
+
child,
|
|
103
|
+
children,
|
|
104
|
+
value = 0,
|
|
105
|
+
max = 100,
|
|
106
|
+
min = 0,
|
|
107
|
+
id = createId(uid),
|
|
108
|
+
ref = null,
|
|
109
|
+
$$slots,
|
|
110
|
+
$$events,
|
|
111
|
+
...restProps
|
|
112
|
+
} = $$props;
|
|
113
|
+
const rootState = ProgressRootState.create({
|
|
114
|
+
value: boxWith$1(() => value),
|
|
115
|
+
max: boxWith$1(() => max),
|
|
116
|
+
min: boxWith$1(() => min),
|
|
117
|
+
id: boxWith$1(() => id),
|
|
118
|
+
ref: boxWith$1(() => ref, (v) => ref = v)
|
|
119
|
+
});
|
|
120
|
+
const mergedProps = derived(() => mergeProps(restProps, rootState.props));
|
|
121
|
+
if (child) {
|
|
122
|
+
$$renderer2.push("<!--[0-->");
|
|
123
|
+
child($$renderer2, { props: mergedProps() });
|
|
124
|
+
$$renderer2.push(`<!---->`);
|
|
125
|
+
} else {
|
|
126
|
+
$$renderer2.push("<!--[-1-->");
|
|
127
|
+
$$renderer2.push(`<div${attributes({ ...mergedProps() })}>`);
|
|
128
|
+
children?.($$renderer2);
|
|
129
|
+
$$renderer2.push(`<!----></div>`);
|
|
130
|
+
}
|
|
131
|
+
$$renderer2.push(`<!--]-->`);
|
|
132
|
+
bind_props($$props, { ref });
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function Progress($$renderer, $$props) {
|
|
136
|
+
$$renderer.component(($$renderer2) => {
|
|
137
|
+
let {
|
|
138
|
+
ref = null,
|
|
139
|
+
class: className,
|
|
140
|
+
max = 100,
|
|
141
|
+
value,
|
|
142
|
+
$$slots,
|
|
143
|
+
$$events,
|
|
144
|
+
...restProps
|
|
145
|
+
} = $$props;
|
|
146
|
+
let $$settled = true;
|
|
147
|
+
let $$inner_renderer;
|
|
148
|
+
function $$render_inner($$renderer3) {
|
|
149
|
+
if (Progress$1) {
|
|
150
|
+
$$renderer3.push("<!--[-->");
|
|
151
|
+
Progress$1($$renderer3, spread_props([
|
|
152
|
+
{
|
|
153
|
+
"data-slot": "progress",
|
|
154
|
+
class: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className),
|
|
155
|
+
value,
|
|
156
|
+
max
|
|
157
|
+
},
|
|
158
|
+
restProps,
|
|
159
|
+
{
|
|
160
|
+
get ref() {
|
|
161
|
+
return ref;
|
|
162
|
+
},
|
|
163
|
+
set ref($$value) {
|
|
164
|
+
ref = $$value;
|
|
165
|
+
$$settled = false;
|
|
166
|
+
},
|
|
167
|
+
children: ($$renderer4) => {
|
|
168
|
+
$$renderer4.push(`<div data-slot="progress-indicator" class="h-full w-full flex-1 bg-primary transition-all"${attr_style(`transform: translateX(-${stringify(100 - 100 * (value ?? 0) / (max ?? 1))}%)`)}></div>`);
|
|
169
|
+
},
|
|
170
|
+
$$slots: { default: true }
|
|
171
|
+
}
|
|
172
|
+
]));
|
|
173
|
+
$$renderer3.push("<!--]-->");
|
|
174
|
+
} else {
|
|
175
|
+
$$renderer3.push("<!--[!-->");
|
|
176
|
+
$$renderer3.push("<!--]-->");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
do {
|
|
180
|
+
$$settled = true;
|
|
181
|
+
$$inner_renderer = $$renderer2.copy();
|
|
182
|
+
$$render_inner($$inner_renderer);
|
|
183
|
+
} while (!$$settled);
|
|
184
|
+
$$renderer2.subsume($$inner_renderer);
|
|
185
|
+
bind_props($$props, { ref });
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
class VideoCapture {
|
|
189
|
+
mediaStream = null;
|
|
190
|
+
mediaRecorder = null;
|
|
191
|
+
recordedChunks = [];
|
|
192
|
+
startTime = 0;
|
|
193
|
+
/**
|
|
194
|
+
* Check if Element Capture or Region Capture API is supported
|
|
195
|
+
*/
|
|
196
|
+
static isSupported() {
|
|
197
|
+
const hasElementCapture = "RestrictionTarget" in self && "fromElement" in RestrictionTarget;
|
|
198
|
+
const hasRegionCapture = "CropTarget" in self && "fromElement" in CropTarget;
|
|
199
|
+
const hasDisplayMedia = "mediaDevices" in navigator && "getDisplayMedia" in navigator.mediaDevices;
|
|
200
|
+
return (hasElementCapture || hasRegionCapture) && hasDisplayMedia;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Start capturing video from a specific element
|
|
204
|
+
* @param element The HTML element to capture
|
|
205
|
+
* @param options Export options
|
|
206
|
+
*/
|
|
207
|
+
async startCapture(element, options) {
|
|
208
|
+
if (!VideoCapture.isSupported()) {
|
|
209
|
+
throw new Error(
|
|
210
|
+
"Element Capture and Region Capture APIs are not supported in this browser. Please use Chrome 104+ on desktop."
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
try {
|
|
214
|
+
this.mediaStream = await navigator.mediaDevices.getDisplayMedia({
|
|
215
|
+
video: {
|
|
216
|
+
width: { ideal: options.width },
|
|
217
|
+
height: { ideal: options.height },
|
|
218
|
+
frameRate: { ideal: options.fps }
|
|
219
|
+
},
|
|
220
|
+
audio: false,
|
|
221
|
+
preferCurrentTab: true
|
|
222
|
+
});
|
|
223
|
+
const [videoTrack] = this.mediaStream.getVideoTracks();
|
|
224
|
+
if (!videoTrack) {
|
|
225
|
+
throw new Error("No video track available");
|
|
226
|
+
}
|
|
227
|
+
const settings = videoTrack.getSettings();
|
|
228
|
+
const displaySurface = settings.displaySurface;
|
|
229
|
+
if (!displaySurface || displaySurface !== "browser") {
|
|
230
|
+
throw new Error(
|
|
231
|
+
`Wrong tab selected! You selected "${displaySurface || "unknown"}" but capture requires "This tab" (browser). Please try again and select "This tab" from the browser dialog.`
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
let hasValidFrames = false;
|
|
235
|
+
if ("RestrictionTarget" in self && "fromElement" in RestrictionTarget) {
|
|
236
|
+
try {
|
|
237
|
+
const restrictionTarget = await RestrictionTarget.fromElement(element);
|
|
238
|
+
await videoTrack.restrictTo(restrictionTarget);
|
|
239
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
240
|
+
hasValidFrames = await this.testVideoTrack(this.mediaStream);
|
|
241
|
+
} catch {
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (!hasValidFrames && "CropTarget" in self && "fromElement" in CropTarget) {
|
|
245
|
+
try {
|
|
246
|
+
const cropTarget = await CropTarget.fromElement(element);
|
|
247
|
+
await videoTrack.cropTo(cropTarget);
|
|
248
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
249
|
+
hasValidFrames = await this.testVideoTrack(this.mediaStream);
|
|
250
|
+
} catch {
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (!hasValidFrames) {
|
|
254
|
+
throw new Error(
|
|
255
|
+
"Both Element Capture and Region Capture failed to produce valid frames. The element may have complex 3D transforms that prevent capture. Try simplifying the element structure or removing 3D transforms."
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
this.recordedChunks = [];
|
|
259
|
+
const mimeTypes = ["video/mp4"];
|
|
260
|
+
let selectedMimeType = "";
|
|
261
|
+
for (const mimeType of mimeTypes) {
|
|
262
|
+
if (MediaRecorder.isTypeSupported(mimeType)) {
|
|
263
|
+
selectedMimeType = mimeType;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (!selectedMimeType) {
|
|
268
|
+
throw new Error("No supported video codec found");
|
|
269
|
+
}
|
|
270
|
+
this.mediaRecorder = new MediaRecorder(this.mediaStream, {
|
|
271
|
+
mimeType: selectedMimeType,
|
|
272
|
+
videoBitsPerSecond: this.getVideoBitrate(options.width, options.height)
|
|
273
|
+
});
|
|
274
|
+
this.mediaRecorder.ondataavailable = (event) => {
|
|
275
|
+
if (event.data && event.data.size > 0) {
|
|
276
|
+
this.recordedChunks.push(event.data);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
this.mediaRecorder.onstop = () => {
|
|
280
|
+
const blob = new Blob(this.recordedChunks, { type: selectedMimeType });
|
|
281
|
+
options.onComplete?.(blob);
|
|
282
|
+
this.cleanup();
|
|
283
|
+
};
|
|
284
|
+
this.mediaRecorder.onerror = () => {
|
|
285
|
+
const error = new Error("MediaRecorder error");
|
|
286
|
+
options.onError?.(error);
|
|
287
|
+
this.cleanup();
|
|
288
|
+
};
|
|
289
|
+
this.startTime = Date.now();
|
|
290
|
+
this.mediaRecorder.start(100);
|
|
291
|
+
await new Promise((resolve) => {
|
|
292
|
+
if (this.mediaRecorder) {
|
|
293
|
+
this.mediaRecorder.onstart = () => {
|
|
294
|
+
resolve(void 0);
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
options.onReadyToRecord?.();
|
|
299
|
+
if (options.onProgress) {
|
|
300
|
+
this.trackProgress(options.duration * 1e3, options.onProgress);
|
|
301
|
+
}
|
|
302
|
+
} catch (error) {
|
|
303
|
+
this.cleanup();
|
|
304
|
+
throw error;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Test if the video track is producing frames with content
|
|
309
|
+
* @returns true if frames have content, false if empty
|
|
310
|
+
*/
|
|
311
|
+
async testVideoTrack(stream) {
|
|
312
|
+
return new Promise((resolve) => {
|
|
313
|
+
const video = document.createElement("video");
|
|
314
|
+
video.srcObject = stream;
|
|
315
|
+
video.muted = true;
|
|
316
|
+
video.playsInline = true;
|
|
317
|
+
const timeout = setTimeout(() => {
|
|
318
|
+
video.remove();
|
|
319
|
+
resolve(false);
|
|
320
|
+
}, 3e3);
|
|
321
|
+
video.onloadedmetadata = () => {
|
|
322
|
+
video.play().then(() => {
|
|
323
|
+
setTimeout(() => {
|
|
324
|
+
const canvas = document.createElement("canvas");
|
|
325
|
+
canvas.width = video.videoWidth || 100;
|
|
326
|
+
canvas.height = video.videoHeight || 100;
|
|
327
|
+
const ctx = canvas.getContext("2d");
|
|
328
|
+
let hasContent = false;
|
|
329
|
+
if (ctx) {
|
|
330
|
+
try {
|
|
331
|
+
ctx.drawImage(video, 0, 0);
|
|
332
|
+
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
|
333
|
+
for (let i = 0; i < imageData.data.length; i += 4) {
|
|
334
|
+
const r = imageData.data[i];
|
|
335
|
+
const g = imageData.data[i + 1];
|
|
336
|
+
const b = imageData.data[i + 2];
|
|
337
|
+
const a = imageData.data[i + 3];
|
|
338
|
+
if (r > 0 || g > 0 || b > 0 || a > 0) {
|
|
339
|
+
hasContent = true;
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
} catch {
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
clearTimeout(timeout);
|
|
347
|
+
video.remove();
|
|
348
|
+
canvas.remove();
|
|
349
|
+
resolve(hasContent);
|
|
350
|
+
}, 500);
|
|
351
|
+
}).catch(() => {
|
|
352
|
+
clearTimeout(timeout);
|
|
353
|
+
video.remove();
|
|
354
|
+
resolve(false);
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
video.onerror = () => {
|
|
358
|
+
clearTimeout(timeout);
|
|
359
|
+
video.remove();
|
|
360
|
+
resolve(false);
|
|
361
|
+
};
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Stop the recording
|
|
366
|
+
*/
|
|
367
|
+
stopCapture() {
|
|
368
|
+
if (this.mediaRecorder && this.mediaRecorder.state !== "inactive") {
|
|
369
|
+
this.mediaRecorder.stop();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Track recording progress
|
|
374
|
+
*/
|
|
375
|
+
trackProgress(durationMs, onProgress) {
|
|
376
|
+
const interval = setInterval(() => {
|
|
377
|
+
const elapsed = Date.now() - this.startTime;
|
|
378
|
+
const progress = Math.min(elapsed / durationMs * 100, 100);
|
|
379
|
+
onProgress(progress);
|
|
380
|
+
if (progress >= 100) {
|
|
381
|
+
clearInterval(interval);
|
|
382
|
+
}
|
|
383
|
+
}, 100);
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Calculate video bitrate based on resolution
|
|
387
|
+
*/
|
|
388
|
+
getVideoBitrate(width, height) {
|
|
389
|
+
const pixels = width * height;
|
|
390
|
+
const baseBitrate = pixels * 0.1 * 30;
|
|
391
|
+
return Math.max(25e5, Math.min(2e7, baseBitrate));
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Cleanup resources
|
|
395
|
+
*/
|
|
396
|
+
cleanup() {
|
|
397
|
+
if (this.mediaStream) {
|
|
398
|
+
this.mediaStream.getTracks().forEach((track) => track.stop());
|
|
399
|
+
this.mediaStream = null;
|
|
400
|
+
}
|
|
401
|
+
this.mediaRecorder = null;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Download the recorded video
|
|
405
|
+
*/
|
|
406
|
+
static downloadBlob(blob, filename) {
|
|
407
|
+
const url = URL.createObjectURL(blob);
|
|
408
|
+
const a = document.createElement("a");
|
|
409
|
+
a.href = url;
|
|
410
|
+
a.download = filename;
|
|
411
|
+
document.body.appendChild(a);
|
|
412
|
+
a.click();
|
|
413
|
+
document.body.removeChild(a);
|
|
414
|
+
URL.revokeObjectURL(url);
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Convert WebM blob to MP4 using mediabunny
|
|
418
|
+
* Optimized for QuickTime and universal MP4 compatibility
|
|
419
|
+
*/
|
|
420
|
+
static async convertToMp4(webmBlob, onProgress) {
|
|
421
|
+
console.log("Starting WebM to MP4 conversion...");
|
|
422
|
+
console.log("Input file size:", webmBlob.size);
|
|
423
|
+
const input = new Input({
|
|
424
|
+
source: new BlobSource(webmBlob),
|
|
425
|
+
formats: ALL_FORMATS
|
|
426
|
+
});
|
|
427
|
+
const target = new BufferTarget();
|
|
428
|
+
const output = new Output({
|
|
429
|
+
format: new Mp4OutputFormat(),
|
|
430
|
+
target
|
|
431
|
+
});
|
|
432
|
+
const conversion = await Conversion.init({ input, output });
|
|
433
|
+
conversion.onProgress = (progress) => {
|
|
434
|
+
const percentProgress = Math.round(progress * 100);
|
|
435
|
+
console.log(`Conversion progress: ${percentProgress}%`);
|
|
436
|
+
onProgress?.(percentProgress);
|
|
437
|
+
};
|
|
438
|
+
await conversion.execute();
|
|
439
|
+
console.log("Conversion complete");
|
|
440
|
+
if (!target.buffer) {
|
|
441
|
+
throw new Error("Conversion failed: no output buffer");
|
|
442
|
+
}
|
|
443
|
+
const mp4Blob = new Blob([target.buffer], { type: "video/mp4" });
|
|
444
|
+
console.log("Output file size:", mp4Blob.size, "bytes");
|
|
445
|
+
console.log("Compression ratio:", ((1 - mp4Blob.size / webmBlob.size) * 100).toFixed(2) + "%");
|
|
446
|
+
return mp4Blob;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function Export_popover($$renderer, $$props) {
|
|
450
|
+
$$renderer.component(($$renderer2) => {
|
|
451
|
+
let { projectId = null, disabled = false } = $$props;
|
|
452
|
+
const editorState = derived(getEditorState);
|
|
453
|
+
const projectStore = derived(() => editorState().project);
|
|
454
|
+
const resolutionValue = derived(() => {
|
|
455
|
+
const w = projectStore().state.width;
|
|
456
|
+
const h = projectStore().state.height;
|
|
457
|
+
return `${w}x${h}`;
|
|
458
|
+
});
|
|
459
|
+
function handleResolutionChange(value) {
|
|
460
|
+
const [w, h] = value.split("x").map(Number);
|
|
461
|
+
if (w && h) projectStore().updateProject({ width: w, height: h });
|
|
462
|
+
}
|
|
463
|
+
let open = false;
|
|
464
|
+
let isExporting = false;
|
|
465
|
+
let isPreparing = false;
|
|
466
|
+
let exportProgress = 0;
|
|
467
|
+
let errorMessage = null;
|
|
468
|
+
let serverPhase = "ready";
|
|
469
|
+
let videoCapture = new VideoCapture();
|
|
470
|
+
let abortController = null;
|
|
471
|
+
const exportMode = derived(() => isLocalPreviewMode() ? "local" : projectId ? "server" : "browser");
|
|
472
|
+
const progressLabel = derived(() => {
|
|
473
|
+
if (isPreparing) return "Preparing frames…";
|
|
474
|
+
if (exportMode() === "server") {
|
|
475
|
+
if (serverPhase === "initializing") return "Initializing render engine…";
|
|
476
|
+
if (serverPhase === "capturing") return "Capturing frames…";
|
|
477
|
+
if (serverPhase === "encoding") return "Encoding video…";
|
|
478
|
+
if (serverPhase === "done") return "Download starting…";
|
|
479
|
+
}
|
|
480
|
+
return "Recording video…";
|
|
481
|
+
});
|
|
482
|
+
async function handleExport() {
|
|
483
|
+
errorMessage = null;
|
|
484
|
+
trackPlausibleEvent("export_started", {
|
|
485
|
+
mode: exportMode(),
|
|
486
|
+
width: projectStore().state.width,
|
|
487
|
+
height: projectStore().state.height,
|
|
488
|
+
fps: projectStore().state.fps
|
|
489
|
+
});
|
|
490
|
+
if (exportMode() === "local") {
|
|
491
|
+
await handleLocalExport();
|
|
492
|
+
} else if (exportMode() === "server") {
|
|
493
|
+
await handleServerExport();
|
|
494
|
+
} else {
|
|
495
|
+
await handleBrowserExport();
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
async function handleLocalExport() {
|
|
499
|
+
const renderId = crypto.randomUUID();
|
|
500
|
+
isExporting = true;
|
|
501
|
+
exportProgress = 0;
|
|
502
|
+
serverPhase = "initializing";
|
|
503
|
+
let eventSource;
|
|
504
|
+
try {
|
|
505
|
+
const response = await fetch(`/api/local/render?renderId=${renderId}`, {
|
|
506
|
+
method: "POST",
|
|
507
|
+
headers: { "Content-Type": "application/json" },
|
|
508
|
+
body: JSON.stringify({
|
|
509
|
+
width: projectStore().state.width,
|
|
510
|
+
height: projectStore().state.height,
|
|
511
|
+
fps: projectStore().state.fps
|
|
512
|
+
})
|
|
513
|
+
});
|
|
514
|
+
if (!response.ok) {
|
|
515
|
+
throw new Error(await response.text() || `Export failed (${response.status})`);
|
|
516
|
+
}
|
|
517
|
+
await new Promise((resolve, reject) => {
|
|
518
|
+
const es = new EventSource(`/api/local/render?renderId=${renderId}`);
|
|
519
|
+
eventSource = es;
|
|
520
|
+
es.onmessage = (event) => {
|
|
521
|
+
try {
|
|
522
|
+
const data = JSON.parse(event.data);
|
|
523
|
+
exportProgress = data.percent;
|
|
524
|
+
serverPhase = data.phase;
|
|
525
|
+
if (data.phase === "done") {
|
|
526
|
+
es.close();
|
|
527
|
+
resolve();
|
|
528
|
+
} else if (data.phase === "error") {
|
|
529
|
+
es.close();
|
|
530
|
+
reject(new Error(data.error || "Render failed."));
|
|
531
|
+
}
|
|
532
|
+
} catch (err) {
|
|
533
|
+
console.error("Error parsing render event:", err);
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
es.onerror = () => {
|
|
537
|
+
es.close();
|
|
538
|
+
reject(new Error("Lost connection to render."));
|
|
539
|
+
};
|
|
540
|
+
});
|
|
541
|
+
const a = document.createElement("a");
|
|
542
|
+
a.href = `/api/local/render?renderId=${renderId}&download=1`;
|
|
543
|
+
a.download = "output.mp4";
|
|
544
|
+
document.body.appendChild(a);
|
|
545
|
+
a.click();
|
|
546
|
+
document.body.removeChild(a);
|
|
547
|
+
open = false;
|
|
548
|
+
} catch (err) {
|
|
549
|
+
errorMessage = err instanceof Error ? err.message : "Export failed. Is Playwright installed?";
|
|
550
|
+
serverPhase = "error";
|
|
551
|
+
} finally {
|
|
552
|
+
eventSource?.close();
|
|
553
|
+
isExporting = false;
|
|
554
|
+
exportProgress = 0;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
async function handleServerExport() {
|
|
558
|
+
if (!projectId) return;
|
|
559
|
+
const renderId = crypto.randomUUID();
|
|
560
|
+
isExporting = true;
|
|
561
|
+
exportProgress = 0;
|
|
562
|
+
serverPhase = "initializing";
|
|
563
|
+
let eventSource;
|
|
564
|
+
try {
|
|
565
|
+
abortController = new AbortController();
|
|
566
|
+
const response = await fetch(`/api/export/${projectId}?renderId=${renderId}`, {
|
|
567
|
+
method: "POST",
|
|
568
|
+
headers: { "Content-Type": "application/json" },
|
|
569
|
+
body: JSON.stringify({
|
|
570
|
+
width: projectStore().state.width,
|
|
571
|
+
height: projectStore().state.height,
|
|
572
|
+
fps: projectStore().state.fps
|
|
573
|
+
}),
|
|
574
|
+
signal: abortController.signal
|
|
575
|
+
});
|
|
576
|
+
if (!response.ok) {
|
|
577
|
+
throw new Error(await response.text() || `Export failed (${response.status})`);
|
|
578
|
+
}
|
|
579
|
+
await new Promise((resolve, reject) => {
|
|
580
|
+
const es = new EventSource(`/api/export/${projectId}?renderId=${renderId}`);
|
|
581
|
+
eventSource = es;
|
|
582
|
+
es.onmessage = (event) => {
|
|
583
|
+
try {
|
|
584
|
+
const data = JSON.parse(event.data);
|
|
585
|
+
exportProgress = data.percent;
|
|
586
|
+
serverPhase = data.phase;
|
|
587
|
+
if (data.phase === "done") {
|
|
588
|
+
es.close();
|
|
589
|
+
resolve();
|
|
590
|
+
} else if (data.phase === "error") {
|
|
591
|
+
es.close();
|
|
592
|
+
reject(new Error(data.error || "Server export failed."));
|
|
593
|
+
}
|
|
594
|
+
} catch (error) {
|
|
595
|
+
console.error("Error parsing server event:", error);
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
es.onerror = () => {
|
|
599
|
+
es.close();
|
|
600
|
+
reject(new Error("Lost connection to render progress."));
|
|
601
|
+
};
|
|
602
|
+
});
|
|
603
|
+
const downloadUrl = `/api/export/${projectId}?renderId=${renderId}&download=1&projectId=${projectId}`;
|
|
604
|
+
const a = document.createElement("a");
|
|
605
|
+
a.href = downloadUrl;
|
|
606
|
+
document.body.appendChild(a);
|
|
607
|
+
a.click();
|
|
608
|
+
document.body.removeChild(a);
|
|
609
|
+
trackPlausibleEvent("export_completed", { mode: "server" });
|
|
610
|
+
open = false;
|
|
611
|
+
} catch (error) {
|
|
612
|
+
if (error instanceof Error && error.name === "AbortError") return;
|
|
613
|
+
errorMessage = error instanceof Error ? error.message : "Export failed. Please try again.";
|
|
614
|
+
trackPlausibleEvent("export_failed", { mode: "server", error: errorMessage });
|
|
615
|
+
serverPhase = "error";
|
|
616
|
+
} finally {
|
|
617
|
+
eventSource?.close();
|
|
618
|
+
isExporting = false;
|
|
619
|
+
exportProgress = 0;
|
|
620
|
+
abortController = null;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
async function handleBrowserExport() {
|
|
624
|
+
isExporting = true;
|
|
625
|
+
exportProgress = 0;
|
|
626
|
+
if (!VideoCapture.isSupported()) {
|
|
627
|
+
errorMessage = "Video capture not supported. Use Chrome 104+ on desktop.";
|
|
628
|
+
isExporting = false;
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
const canvasElement = document.getElementById("project-viewport");
|
|
632
|
+
if (!canvasElement) {
|
|
633
|
+
errorMessage = "Canvas element not found.";
|
|
634
|
+
isExporting = false;
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
const originalZoom = projectStore().viewport.zoom;
|
|
638
|
+
const originalPan = { ...projectStore().viewport.pan };
|
|
639
|
+
try {
|
|
640
|
+
projectStore().pause();
|
|
641
|
+
projectStore().setCurrentTime(0);
|
|
642
|
+
projectStore().setZoom(1);
|
|
643
|
+
projectStore().setPan(0, 0);
|
|
644
|
+
isPreparing = true;
|
|
645
|
+
await Promise.all([
|
|
646
|
+
new Promise((resolve) => setTimeout(resolve, 300)),
|
|
647
|
+
projectStore().prepareRecording()
|
|
648
|
+
]);
|
|
649
|
+
isPreparing = false;
|
|
650
|
+
open = false;
|
|
651
|
+
projectStore().isRecording = true;
|
|
652
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
653
|
+
await videoCapture.startCapture(canvasElement, {
|
|
654
|
+
width: projectStore().state.width,
|
|
655
|
+
height: projectStore().state.height,
|
|
656
|
+
fps: projectStore().state.fps,
|
|
657
|
+
duration: projectStore().state.duration,
|
|
658
|
+
onReadyToRecord: () => {
|
|
659
|
+
projectStore().play();
|
|
660
|
+
const checkInterval = setInterval(
|
|
661
|
+
() => {
|
|
662
|
+
if (!projectStore().isPlaying && isExporting) {
|
|
663
|
+
clearInterval(checkInterval);
|
|
664
|
+
videoCapture.stopCapture();
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
100
|
|
668
|
+
);
|
|
669
|
+
},
|
|
670
|
+
onProgress: (progress) => {
|
|
671
|
+
exportProgress = progress;
|
|
672
|
+
},
|
|
673
|
+
onComplete: async (blob) => {
|
|
674
|
+
try {
|
|
675
|
+
VideoCapture.downloadBlob(blob, `${projectStore().state.name || "video"}.mp4`);
|
|
676
|
+
trackPlausibleEvent("export_completed", { mode: "browser" });
|
|
677
|
+
} catch (err) {
|
|
678
|
+
errorMessage = err instanceof Error ? err.message : "Failed to save video";
|
|
679
|
+
trackPlausibleEvent("export_failed", { mode: "browser", error: errorMessage });
|
|
680
|
+
}
|
|
681
|
+
projectStore().setCurrentTime(0);
|
|
682
|
+
projectStore().setZoom(originalZoom);
|
|
683
|
+
projectStore().setPan(originalPan.x, originalPan.y);
|
|
684
|
+
isExporting = false;
|
|
685
|
+
isPreparing = false;
|
|
686
|
+
projectStore().isRecording = false;
|
|
687
|
+
projectStore().clearFrameCache();
|
|
688
|
+
exportProgress = 0;
|
|
689
|
+
},
|
|
690
|
+
onError: (error) => {
|
|
691
|
+
errorMessage = error.message || "An error occurred during export";
|
|
692
|
+
trackPlausibleEvent("export_failed", { mode: "browser", error: errorMessage });
|
|
693
|
+
projectStore().pause();
|
|
694
|
+
projectStore().setCurrentTime(0);
|
|
695
|
+
projectStore().setZoom(originalZoom);
|
|
696
|
+
projectStore().setPan(originalPan.x, originalPan.y);
|
|
697
|
+
isExporting = false;
|
|
698
|
+
projectStore().isRecording = false;
|
|
699
|
+
projectStore().clearFrameCache();
|
|
700
|
+
exportProgress = 0;
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
} catch (error) {
|
|
704
|
+
errorMessage = error instanceof Error ? error.message : "Export failed. Please try again.";
|
|
705
|
+
trackPlausibleEvent("export_failed", { mode: "browser", error: errorMessage });
|
|
706
|
+
projectStore().pause();
|
|
707
|
+
projectStore().setCurrentTime(0);
|
|
708
|
+
projectStore().setZoom(originalZoom);
|
|
709
|
+
projectStore().setPan(originalPan.x, originalPan.y);
|
|
710
|
+
isExporting = false;
|
|
711
|
+
isPreparing = false;
|
|
712
|
+
projectStore().isRecording = false;
|
|
713
|
+
projectStore().clearFrameCache();
|
|
714
|
+
exportProgress = 0;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
function handleCancel() {
|
|
718
|
+
if (exportMode() === "server") {
|
|
719
|
+
abortController?.abort();
|
|
720
|
+
} else {
|
|
721
|
+
videoCapture.stopCapture();
|
|
722
|
+
}
|
|
723
|
+
projectStore().pause();
|
|
724
|
+
projectStore().setCurrentTime(0);
|
|
725
|
+
isExporting = false;
|
|
726
|
+
isPreparing = false;
|
|
727
|
+
projectStore().isRecording = false;
|
|
728
|
+
projectStore().clearFrameCache();
|
|
729
|
+
exportProgress = 0;
|
|
730
|
+
}
|
|
731
|
+
let $$settled = true;
|
|
732
|
+
let $$inner_renderer;
|
|
733
|
+
function $$render_inner($$renderer3) {
|
|
734
|
+
if (Popover) {
|
|
735
|
+
$$renderer3.push("<!--[-->");
|
|
736
|
+
Popover($$renderer3, {
|
|
737
|
+
get open() {
|
|
738
|
+
return open;
|
|
739
|
+
},
|
|
740
|
+
set open($$value) {
|
|
741
|
+
open = $$value;
|
|
742
|
+
$$settled = false;
|
|
743
|
+
},
|
|
744
|
+
children: ($$renderer4) => {
|
|
745
|
+
{
|
|
746
|
+
let child = function($$renderer5, { props }) {
|
|
747
|
+
Button($$renderer5, spread_props([
|
|
748
|
+
{ variant: "default", disabled },
|
|
749
|
+
props,
|
|
750
|
+
{
|
|
751
|
+
children: ($$renderer6) => {
|
|
752
|
+
if (isExporting) {
|
|
753
|
+
$$renderer6.push("<!--[0-->");
|
|
754
|
+
Loader_circle($$renderer6, { class: "mr-1.5 size-4 animate-spin" });
|
|
755
|
+
} else {
|
|
756
|
+
$$renderer6.push("<!--[-1-->");
|
|
757
|
+
Download($$renderer6, { class: "mr-1.5 size-4" });
|
|
758
|
+
}
|
|
759
|
+
$$renderer6.push(`<!--]--> Export Video`);
|
|
760
|
+
},
|
|
761
|
+
$$slots: { default: true }
|
|
762
|
+
}
|
|
763
|
+
]));
|
|
764
|
+
};
|
|
765
|
+
if (Popover_trigger) {
|
|
766
|
+
$$renderer4.push("<!--[-->");
|
|
767
|
+
Popover_trigger($$renderer4, { child, $$slots: { child: true } });
|
|
768
|
+
$$renderer4.push("<!--]-->");
|
|
769
|
+
} else {
|
|
770
|
+
$$renderer4.push("<!--[!-->");
|
|
771
|
+
$$renderer4.push("<!--]-->");
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
$$renderer4.push(` `);
|
|
775
|
+
if (Popover_content) {
|
|
776
|
+
$$renderer4.push("<!--[-->");
|
|
777
|
+
Popover_content($$renderer4, {
|
|
778
|
+
align: "end",
|
|
779
|
+
class: "w-56 p-3",
|
|
780
|
+
children: ($$renderer5) => {
|
|
781
|
+
if (isExporting) {
|
|
782
|
+
$$renderer5.push("<!--[0-->");
|
|
783
|
+
$$renderer5.push(`<div class="space-y-3"><p class="text-xs text-muted-foreground">${escape_html(progressLabel())}</p> `);
|
|
784
|
+
Progress($$renderer5, {
|
|
785
|
+
value: isPreparing ? projectStore().preparingProgress : exportProgress,
|
|
786
|
+
class: "h-1.5"
|
|
787
|
+
});
|
|
788
|
+
$$renderer5.push(`<!----> <div class="flex items-center justify-between"><span class="text-[10px] text-muted-foreground">${escape_html(Math.round(isPreparing ? projectStore().preparingProgress : exportProgress))}%</span> `);
|
|
789
|
+
Button($$renderer5, {
|
|
790
|
+
variant: "ghost",
|
|
791
|
+
size: "sm",
|
|
792
|
+
class: "h-6 px-2 text-xs",
|
|
793
|
+
onclick: handleCancel,
|
|
794
|
+
children: ($$renderer6) => {
|
|
795
|
+
$$renderer6.push(`<!---->Cancel`);
|
|
796
|
+
},
|
|
797
|
+
$$slots: { default: true }
|
|
798
|
+
});
|
|
799
|
+
$$renderer5.push(`<!----></div></div>`);
|
|
800
|
+
} else {
|
|
801
|
+
$$renderer5.push("<!--[-1-->");
|
|
802
|
+
$$renderer5.push(`<div class="space-y-3">`);
|
|
803
|
+
if (errorMessage) {
|
|
804
|
+
$$renderer5.push("<!--[0-->");
|
|
805
|
+
$$renderer5.push(`<div class="flex items-start gap-1.5 text-xs text-destructive">`);
|
|
806
|
+
Circle_alert($$renderer5, { class: "mt-0.5 size-3 shrink-0" });
|
|
807
|
+
$$renderer5.push(`<!----> <span>${escape_html(errorMessage)}</span></div>`);
|
|
808
|
+
} else {
|
|
809
|
+
$$renderer5.push("<!--[-1-->");
|
|
810
|
+
}
|
|
811
|
+
$$renderer5.push(`<!--]--> <div class="space-y-1.5"><p class="text-[10px] font-medium tracking-wider text-muted-foreground uppercase">Resolution</p> `);
|
|
812
|
+
Resolution_select($$renderer5, {
|
|
813
|
+
value: resolutionValue(),
|
|
814
|
+
onValueChange: handleResolutionChange
|
|
815
|
+
});
|
|
816
|
+
$$renderer5.push(`<!----></div> `);
|
|
817
|
+
Button($$renderer5, {
|
|
818
|
+
class: "w-full",
|
|
819
|
+
onclick: handleExport,
|
|
820
|
+
children: ($$renderer6) => {
|
|
821
|
+
$$renderer6.push(`<!---->Export`);
|
|
822
|
+
},
|
|
823
|
+
$$slots: { default: true }
|
|
824
|
+
});
|
|
825
|
+
$$renderer5.push(`<!----></div>`);
|
|
826
|
+
}
|
|
827
|
+
$$renderer5.push(`<!--]-->`);
|
|
828
|
+
},
|
|
829
|
+
$$slots: { default: true }
|
|
830
|
+
});
|
|
831
|
+
$$renderer4.push("<!--]-->");
|
|
832
|
+
} else {
|
|
833
|
+
$$renderer4.push("<!--[!-->");
|
|
834
|
+
$$renderer4.push("<!--]-->");
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
$$slots: { default: true }
|
|
838
|
+
});
|
|
839
|
+
$$renderer3.push("<!--]-->");
|
|
840
|
+
} else {
|
|
841
|
+
$$renderer3.push("<!--[!-->");
|
|
842
|
+
$$renderer3.push("<!--]-->");
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
do {
|
|
846
|
+
$$settled = true;
|
|
847
|
+
$$inner_renderer = $$renderer2.copy();
|
|
848
|
+
$$render_inner($$inner_renderer);
|
|
849
|
+
} while (!$$settled);
|
|
850
|
+
$$renderer2.subsume($$inner_renderer);
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
function Gem($$renderer, $$props) {
|
|
855
|
+
$$renderer.component(($$renderer2) => {
|
|
856
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
857
|
+
const iconNode = [
|
|
858
|
+
["path", { "d": "M10.5 3 8 9l4 13 4-13-2.5-6" }],
|
|
859
|
+
[
|
|
860
|
+
"path",
|
|
861
|
+
{
|
|
862
|
+
"d": "M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z"
|
|
863
|
+
}
|
|
864
|
+
],
|
|
865
|
+
["path", { "d": "M2 9h20" }]
|
|
866
|
+
];
|
|
867
|
+
Icon($$renderer2, spread_props([
|
|
868
|
+
{ name: "gem" },
|
|
869
|
+
/**
|
|
870
|
+
* @component @name Gem
|
|
871
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
872
|
+
*
|
|
873
|
+
* @preview  - https://lucide.dev/icons/gem
|
|
874
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
875
|
+
*
|
|
876
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
877
|
+
* @returns {FunctionalComponent} Svelte component
|
|
878
|
+
*
|
|
879
|
+
*/
|
|
880
|
+
props,
|
|
881
|
+
{
|
|
882
|
+
iconNode,
|
|
883
|
+
children: ($$renderer3) => {
|
|
884
|
+
props.children?.($$renderer3);
|
|
885
|
+
$$renderer3.push(`<!---->`);
|
|
886
|
+
},
|
|
887
|
+
$$slots: { default: true }
|
|
888
|
+
}
|
|
889
|
+
]));
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
function Keyboard($$renderer, $$props) {
|
|
893
|
+
$$renderer.component(($$renderer2) => {
|
|
894
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
895
|
+
const iconNode = [
|
|
896
|
+
["path", { "d": "M10 8h.01" }],
|
|
897
|
+
["path", { "d": "M12 12h.01" }],
|
|
898
|
+
["path", { "d": "M14 8h.01" }],
|
|
899
|
+
["path", { "d": "M16 12h.01" }],
|
|
900
|
+
["path", { "d": "M18 8h.01" }],
|
|
901
|
+
["path", { "d": "M6 8h.01" }],
|
|
902
|
+
["path", { "d": "M7 16h10" }],
|
|
903
|
+
["path", { "d": "M8 12h.01" }],
|
|
904
|
+
[
|
|
905
|
+
"rect",
|
|
906
|
+
{ "width": "20", "height": "16", "x": "2", "y": "4", "rx": "2" }
|
|
907
|
+
]
|
|
908
|
+
];
|
|
909
|
+
Icon($$renderer2, spread_props([
|
|
910
|
+
{ name: "keyboard" },
|
|
911
|
+
/**
|
|
912
|
+
* @component @name Keyboard
|
|
913
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
914
|
+
*
|
|
915
|
+
* @preview  - https://lucide.dev/icons/keyboard
|
|
916
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
917
|
+
*
|
|
918
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
919
|
+
* @returns {FunctionalComponent} Svelte component
|
|
920
|
+
*
|
|
921
|
+
*/
|
|
922
|
+
props,
|
|
923
|
+
{
|
|
924
|
+
iconNode,
|
|
925
|
+
children: ($$renderer3) => {
|
|
926
|
+
props.children?.($$renderer3);
|
|
927
|
+
$$renderer3.push(`<!---->`);
|
|
928
|
+
},
|
|
929
|
+
$$slots: { default: true }
|
|
930
|
+
}
|
|
931
|
+
]));
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
function Message_square($$renderer, $$props) {
|
|
935
|
+
$$renderer.component(($$renderer2) => {
|
|
936
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
937
|
+
const iconNode = [
|
|
938
|
+
[
|
|
939
|
+
"path",
|
|
940
|
+
{
|
|
941
|
+
"d": "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"
|
|
942
|
+
}
|
|
943
|
+
]
|
|
944
|
+
];
|
|
945
|
+
Icon($$renderer2, spread_props([
|
|
946
|
+
{ name: "message-square" },
|
|
947
|
+
/**
|
|
948
|
+
* @component @name MessageSquare
|
|
949
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
950
|
+
*
|
|
951
|
+
* @preview  - https://lucide.dev/icons/message-square
|
|
952
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
953
|
+
*
|
|
954
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
955
|
+
* @returns {FunctionalComponent} Svelte component
|
|
956
|
+
*
|
|
957
|
+
*/
|
|
958
|
+
props,
|
|
959
|
+
{
|
|
960
|
+
iconNode,
|
|
961
|
+
children: ($$renderer3) => {
|
|
962
|
+
props.children?.($$renderer3);
|
|
963
|
+
$$renderer3.push(`<!---->`);
|
|
964
|
+
},
|
|
965
|
+
$$slots: { default: true }
|
|
966
|
+
}
|
|
967
|
+
]));
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
function Redo_2($$renderer, $$props) {
|
|
971
|
+
$$renderer.component(($$renderer2) => {
|
|
972
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
973
|
+
const iconNode = [
|
|
974
|
+
["path", { "d": "m15 14 5-5-5-5" }],
|
|
975
|
+
[
|
|
976
|
+
"path",
|
|
977
|
+
{
|
|
978
|
+
"d": "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"
|
|
979
|
+
}
|
|
980
|
+
]
|
|
981
|
+
];
|
|
982
|
+
Icon($$renderer2, spread_props([
|
|
983
|
+
{ name: "redo-2" },
|
|
984
|
+
/**
|
|
985
|
+
* @component @name Redo2
|
|
986
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
987
|
+
*
|
|
988
|
+
* @preview  - https://lucide.dev/icons/redo-2
|
|
989
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
990
|
+
*
|
|
991
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
992
|
+
* @returns {FunctionalComponent} Svelte component
|
|
993
|
+
*
|
|
994
|
+
*/
|
|
995
|
+
props,
|
|
996
|
+
{
|
|
997
|
+
iconNode,
|
|
998
|
+
children: ($$renderer3) => {
|
|
999
|
+
props.children?.($$renderer3);
|
|
1000
|
+
$$renderer3.push(`<!---->`);
|
|
1001
|
+
},
|
|
1002
|
+
$$slots: { default: true }
|
|
1003
|
+
}
|
|
1004
|
+
]));
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
function Save($$renderer, $$props) {
|
|
1008
|
+
$$renderer.component(($$renderer2) => {
|
|
1009
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
1010
|
+
const iconNode = [
|
|
1011
|
+
[
|
|
1012
|
+
"path",
|
|
1013
|
+
{
|
|
1014
|
+
"d": "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"
|
|
1015
|
+
}
|
|
1016
|
+
],
|
|
1017
|
+
["path", { "d": "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }],
|
|
1018
|
+
["path", { "d": "M7 3v4a1 1 0 0 0 1 1h7" }]
|
|
1019
|
+
];
|
|
1020
|
+
Icon($$renderer2, spread_props([
|
|
1021
|
+
{ name: "save" },
|
|
1022
|
+
/**
|
|
1023
|
+
* @component @name Save
|
|
1024
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
1025
|
+
*
|
|
1026
|
+
* @preview  - https://lucide.dev/icons/save
|
|
1027
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
1028
|
+
*
|
|
1029
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
1030
|
+
* @returns {FunctionalComponent} Svelte component
|
|
1031
|
+
*
|
|
1032
|
+
*/
|
|
1033
|
+
props,
|
|
1034
|
+
{
|
|
1035
|
+
iconNode,
|
|
1036
|
+
children: ($$renderer3) => {
|
|
1037
|
+
props.children?.($$renderer3);
|
|
1038
|
+
$$renderer3.push(`<!---->`);
|
|
1039
|
+
},
|
|
1040
|
+
$$slots: { default: true }
|
|
1041
|
+
}
|
|
1042
|
+
]));
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
function Undo_2($$renderer, $$props) {
|
|
1046
|
+
$$renderer.component(($$renderer2) => {
|
|
1047
|
+
let { $$slots, $$events, ...props } = $$props;
|
|
1048
|
+
const iconNode = [
|
|
1049
|
+
["path", { "d": "M9 14 4 9l5-5" }],
|
|
1050
|
+
[
|
|
1051
|
+
"path",
|
|
1052
|
+
{
|
|
1053
|
+
"d": "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"
|
|
1054
|
+
}
|
|
1055
|
+
]
|
|
1056
|
+
];
|
|
1057
|
+
Icon($$renderer2, spread_props([
|
|
1058
|
+
{ name: "undo-2" },
|
|
1059
|
+
/**
|
|
1060
|
+
* @component @name Undo2
|
|
1061
|
+
* @description Lucide SVG icon component, renders SVG Element with children.
|
|
1062
|
+
*
|
|
1063
|
+
* @preview  - https://lucide.dev/icons/undo-2
|
|
1064
|
+
* @see https://lucide.dev/guide/packages/lucide-svelte - Documentation
|
|
1065
|
+
*
|
|
1066
|
+
* @param {Object} props - Lucide icons props and any valid SVG attribute
|
|
1067
|
+
* @returns {FunctionalComponent} Svelte component
|
|
1068
|
+
*
|
|
1069
|
+
*/
|
|
1070
|
+
props,
|
|
1071
|
+
{
|
|
1072
|
+
iconNode,
|
|
1073
|
+
children: ($$renderer3) => {
|
|
1074
|
+
props.children?.($$renderer3);
|
|
1075
|
+
$$renderer3.push(`<!---->`);
|
|
1076
|
+
},
|
|
1077
|
+
$$slots: { default: true }
|
|
1078
|
+
}
|
|
1079
|
+
]));
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
function Menu_separator($$renderer, $$props) {
|
|
1083
|
+
$$renderer.component(($$renderer2) => {
|
|
1084
|
+
const uid = props_id($$renderer2);
|
|
1085
|
+
let {
|
|
1086
|
+
ref = null,
|
|
1087
|
+
id = createId(uid),
|
|
1088
|
+
child,
|
|
1089
|
+
children,
|
|
1090
|
+
$$slots,
|
|
1091
|
+
$$events,
|
|
1092
|
+
...restProps
|
|
1093
|
+
} = $$props;
|
|
1094
|
+
const separatorState = MenuSeparatorState.create({
|
|
1095
|
+
id: boxWith$1(() => id),
|
|
1096
|
+
ref: boxWith$1(() => ref, (v) => ref = v)
|
|
1097
|
+
});
|
|
1098
|
+
const mergedProps = derived(() => mergeProps(restProps, separatorState.props));
|
|
1099
|
+
if (child) {
|
|
1100
|
+
$$renderer2.push("<!--[0-->");
|
|
1101
|
+
child($$renderer2, { props: mergedProps() });
|
|
1102
|
+
$$renderer2.push(`<!---->`);
|
|
1103
|
+
} else {
|
|
1104
|
+
$$renderer2.push("<!--[-1-->");
|
|
1105
|
+
$$renderer2.push(`<div${attributes({ ...mergedProps() })}>`);
|
|
1106
|
+
children?.($$renderer2);
|
|
1107
|
+
$$renderer2.push(`<!----></div>`);
|
|
1108
|
+
}
|
|
1109
|
+
$$renderer2.push(`<!--]-->`);
|
|
1110
|
+
bind_props($$props, { ref });
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
function Menu($$renderer, $$props) {
|
|
1114
|
+
$$renderer.component(($$renderer2) => {
|
|
1115
|
+
let {
|
|
1116
|
+
open = false,
|
|
1117
|
+
dir = "ltr",
|
|
1118
|
+
onOpenChange = noop$1,
|
|
1119
|
+
onOpenChangeComplete = noop$1,
|
|
1120
|
+
_internal_variant: variant = "dropdown-menu",
|
|
1121
|
+
children
|
|
1122
|
+
} = $$props;
|
|
1123
|
+
const root = MenuRootState.create({
|
|
1124
|
+
variant: boxWith$1(() => variant),
|
|
1125
|
+
dir: boxWith$1(() => dir),
|
|
1126
|
+
onClose: () => {
|
|
1127
|
+
open = false;
|
|
1128
|
+
onOpenChange(false);
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
MenuMenuState.create(
|
|
1132
|
+
{
|
|
1133
|
+
open: boxWith$1(() => open, (v) => {
|
|
1134
|
+
open = v;
|
|
1135
|
+
onOpenChange(v);
|
|
1136
|
+
}),
|
|
1137
|
+
onOpenChangeComplete: boxWith$1(() => onOpenChangeComplete)
|
|
1138
|
+
},
|
|
1139
|
+
root
|
|
1140
|
+
);
|
|
1141
|
+
Floating_layer($$renderer2, {
|
|
1142
|
+
children: ($$renderer3) => {
|
|
1143
|
+
children?.($$renderer3);
|
|
1144
|
+
$$renderer3.push(`<!---->`);
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
bind_props($$props, { open });
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
function Dropdown_menu_content$1($$renderer, $$props) {
|
|
1151
|
+
$$renderer.component(($$renderer2) => {
|
|
1152
|
+
const uid = props_id($$renderer2);
|
|
1153
|
+
let {
|
|
1154
|
+
id = createId(uid),
|
|
1155
|
+
child,
|
|
1156
|
+
children,
|
|
1157
|
+
ref = null,
|
|
1158
|
+
loop = true,
|
|
1159
|
+
onInteractOutside = noop$1,
|
|
1160
|
+
onEscapeKeydown = noop$1,
|
|
1161
|
+
onCloseAutoFocus = noop$1,
|
|
1162
|
+
forceMount = false,
|
|
1163
|
+
trapFocus = false,
|
|
1164
|
+
style,
|
|
1165
|
+
$$slots,
|
|
1166
|
+
$$events,
|
|
1167
|
+
...restProps
|
|
1168
|
+
} = $$props;
|
|
1169
|
+
const contentState = MenuContentState.create({
|
|
1170
|
+
id: boxWith$1(() => id),
|
|
1171
|
+
loop: boxWith$1(() => loop),
|
|
1172
|
+
ref: boxWith$1(() => ref, (v) => ref = v),
|
|
1173
|
+
onCloseAutoFocus: boxWith$1(() => onCloseAutoFocus)
|
|
1174
|
+
});
|
|
1175
|
+
const mergedProps = derived(() => mergeProps(restProps, contentState.props));
|
|
1176
|
+
function handleInteractOutside(e) {
|
|
1177
|
+
contentState.handleInteractOutside(e);
|
|
1178
|
+
if (e.defaultPrevented) return;
|
|
1179
|
+
onInteractOutside(e);
|
|
1180
|
+
if (e.defaultPrevented) return;
|
|
1181
|
+
if (e.target && e.target instanceof Element) {
|
|
1182
|
+
const subContentSelector = `[${contentState.parentMenu.root.getBitsAttr("sub-content")}]`;
|
|
1183
|
+
if (e.target.closest(subContentSelector)) return;
|
|
1184
|
+
}
|
|
1185
|
+
contentState.parentMenu.onClose();
|
|
1186
|
+
}
|
|
1187
|
+
function handleEscapeKeydown(e) {
|
|
1188
|
+
onEscapeKeydown(e);
|
|
1189
|
+
if (e.defaultPrevented) return;
|
|
1190
|
+
contentState.parentMenu.onClose();
|
|
1191
|
+
}
|
|
1192
|
+
if (forceMount) {
|
|
1193
|
+
$$renderer2.push("<!--[0-->");
|
|
1194
|
+
{
|
|
1195
|
+
let popper = function($$renderer3, { props, wrapperProps }) {
|
|
1196
|
+
const finalProps = mergeProps(props, { style: getFloatingContentCSSVars("dropdown-menu") }, { style });
|
|
1197
|
+
if (child) {
|
|
1198
|
+
$$renderer3.push("<!--[0-->");
|
|
1199
|
+
child($$renderer3, {
|
|
1200
|
+
props: finalProps,
|
|
1201
|
+
wrapperProps,
|
|
1202
|
+
...contentState.snippetProps
|
|
1203
|
+
});
|
|
1204
|
+
$$renderer3.push(`<!---->`);
|
|
1205
|
+
} else {
|
|
1206
|
+
$$renderer3.push("<!--[-1-->");
|
|
1207
|
+
$$renderer3.push(`<div${attributes({ ...wrapperProps })}><div${attributes({ ...finalProps })}>`);
|
|
1208
|
+
children?.($$renderer3);
|
|
1209
|
+
$$renderer3.push(`<!----></div></div>`);
|
|
1210
|
+
}
|
|
1211
|
+
$$renderer3.push(`<!--]-->`);
|
|
1212
|
+
};
|
|
1213
|
+
Popper_layer_force_mount($$renderer2, spread_props([
|
|
1214
|
+
mergedProps(),
|
|
1215
|
+
contentState.popperProps,
|
|
1216
|
+
{
|
|
1217
|
+
ref: contentState.opts.ref,
|
|
1218
|
+
enabled: contentState.parentMenu.opts.open.current,
|
|
1219
|
+
onInteractOutside: handleInteractOutside,
|
|
1220
|
+
onEscapeKeydown: handleEscapeKeydown,
|
|
1221
|
+
trapFocus,
|
|
1222
|
+
loop,
|
|
1223
|
+
forceMount: true,
|
|
1224
|
+
id,
|
|
1225
|
+
shouldRender: contentState.shouldRender,
|
|
1226
|
+
popper,
|
|
1227
|
+
$$slots: { popper: true }
|
|
1228
|
+
}
|
|
1229
|
+
]));
|
|
1230
|
+
}
|
|
1231
|
+
} else if (!forceMount) {
|
|
1232
|
+
$$renderer2.push("<!--[1-->");
|
|
1233
|
+
{
|
|
1234
|
+
let popper = function($$renderer3, { props, wrapperProps }) {
|
|
1235
|
+
const finalProps = mergeProps(props, { style: getFloatingContentCSSVars("dropdown-menu") }, { style });
|
|
1236
|
+
if (child) {
|
|
1237
|
+
$$renderer3.push("<!--[0-->");
|
|
1238
|
+
child($$renderer3, {
|
|
1239
|
+
props: finalProps,
|
|
1240
|
+
wrapperProps,
|
|
1241
|
+
...contentState.snippetProps
|
|
1242
|
+
});
|
|
1243
|
+
$$renderer3.push(`<!---->`);
|
|
1244
|
+
} else {
|
|
1245
|
+
$$renderer3.push("<!--[-1-->");
|
|
1246
|
+
$$renderer3.push(`<div${attributes({ ...wrapperProps })}><div${attributes({ ...finalProps })}>`);
|
|
1247
|
+
children?.($$renderer3);
|
|
1248
|
+
$$renderer3.push(`<!----></div></div>`);
|
|
1249
|
+
}
|
|
1250
|
+
$$renderer3.push(`<!--]-->`);
|
|
1251
|
+
};
|
|
1252
|
+
Popper_layer($$renderer2, spread_props([
|
|
1253
|
+
mergedProps(),
|
|
1254
|
+
contentState.popperProps,
|
|
1255
|
+
{
|
|
1256
|
+
ref: contentState.opts.ref,
|
|
1257
|
+
open: contentState.parentMenu.opts.open.current,
|
|
1258
|
+
onInteractOutside: handleInteractOutside,
|
|
1259
|
+
onEscapeKeydown: handleEscapeKeydown,
|
|
1260
|
+
trapFocus,
|
|
1261
|
+
loop,
|
|
1262
|
+
forceMount: false,
|
|
1263
|
+
id,
|
|
1264
|
+
shouldRender: contentState.shouldRender,
|
|
1265
|
+
popper,
|
|
1266
|
+
$$slots: { popper: true }
|
|
1267
|
+
}
|
|
1268
|
+
]));
|
|
1269
|
+
}
|
|
1270
|
+
} else {
|
|
1271
|
+
$$renderer2.push("<!--[-1-->");
|
|
1272
|
+
}
|
|
1273
|
+
$$renderer2.push(`<!--]-->`);
|
|
1274
|
+
bind_props($$props, { ref });
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
function Menu_trigger($$renderer, $$props) {
|
|
1278
|
+
$$renderer.component(($$renderer2) => {
|
|
1279
|
+
const uid = props_id($$renderer2);
|
|
1280
|
+
let {
|
|
1281
|
+
id = createId(uid),
|
|
1282
|
+
ref = null,
|
|
1283
|
+
child,
|
|
1284
|
+
children,
|
|
1285
|
+
disabled = false,
|
|
1286
|
+
type = "button",
|
|
1287
|
+
$$slots,
|
|
1288
|
+
$$events,
|
|
1289
|
+
...restProps
|
|
1290
|
+
} = $$props;
|
|
1291
|
+
const triggerState = DropdownMenuTriggerState.create({
|
|
1292
|
+
id: boxWith$1(() => id),
|
|
1293
|
+
disabled: boxWith$1(() => disabled ?? false),
|
|
1294
|
+
ref: boxWith$1(() => ref, (v) => ref = v)
|
|
1295
|
+
});
|
|
1296
|
+
const mergedProps = derived(() => mergeProps(restProps, triggerState.props, { type }));
|
|
1297
|
+
Floating_layer_anchor($$renderer2, {
|
|
1298
|
+
id,
|
|
1299
|
+
ref: triggerState.opts.ref,
|
|
1300
|
+
children: ($$renderer3) => {
|
|
1301
|
+
if (child) {
|
|
1302
|
+
$$renderer3.push("<!--[0-->");
|
|
1303
|
+
child($$renderer3, { props: mergedProps() });
|
|
1304
|
+
$$renderer3.push(`<!---->`);
|
|
1305
|
+
} else {
|
|
1306
|
+
$$renderer3.push("<!--[-1-->");
|
|
1307
|
+
$$renderer3.push(`<button${attributes({ ...mergedProps() })}>`);
|
|
1308
|
+
children?.($$renderer3);
|
|
1309
|
+
$$renderer3.push(`<!----></button>`);
|
|
1310
|
+
}
|
|
1311
|
+
$$renderer3.push(`<!--]-->`);
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
bind_props($$props, { ref });
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
function Dialog_footer($$renderer, $$props) {
|
|
1318
|
+
$$renderer.component(($$renderer2) => {
|
|
1319
|
+
let {
|
|
1320
|
+
ref = null,
|
|
1321
|
+
class: className,
|
|
1322
|
+
children,
|
|
1323
|
+
$$slots,
|
|
1324
|
+
$$events,
|
|
1325
|
+
...restProps
|
|
1326
|
+
} = $$props;
|
|
1327
|
+
$$renderer2.push(`<div${attributes({
|
|
1328
|
+
"data-slot": "dialog-footer",
|
|
1329
|
+
class: clsx(cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)),
|
|
1330
|
+
...restProps
|
|
1331
|
+
})}>`);
|
|
1332
|
+
children?.($$renderer2);
|
|
1333
|
+
$$renderer2.push(`<!----></div>`);
|
|
1334
|
+
bind_props($$props, { ref });
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1337
|
+
function Dropdown_menu_content($$renderer, $$props) {
|
|
1338
|
+
$$renderer.component(($$renderer2) => {
|
|
1339
|
+
let {
|
|
1340
|
+
ref = null,
|
|
1341
|
+
sideOffset = 4,
|
|
1342
|
+
portalProps,
|
|
1343
|
+
class: className,
|
|
1344
|
+
$$slots,
|
|
1345
|
+
$$events,
|
|
1346
|
+
...restProps
|
|
1347
|
+
} = $$props;
|
|
1348
|
+
let $$settled = true;
|
|
1349
|
+
let $$inner_renderer;
|
|
1350
|
+
function $$render_inner($$renderer3) {
|
|
1351
|
+
if (Portal$1) {
|
|
1352
|
+
$$renderer3.push("<!--[-->");
|
|
1353
|
+
Portal$1($$renderer3, spread_props([
|
|
1354
|
+
portalProps,
|
|
1355
|
+
{
|
|
1356
|
+
children: ($$renderer4) => {
|
|
1357
|
+
if (Dropdown_menu_content$1) {
|
|
1358
|
+
$$renderer4.push("<!--[-->");
|
|
1359
|
+
Dropdown_menu_content$1($$renderer4, spread_props([
|
|
1360
|
+
{
|
|
1361
|
+
"data-slot": "dropdown-menu-content",
|
|
1362
|
+
sideOffset,
|
|
1363
|
+
class: cn("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className)
|
|
1364
|
+
},
|
|
1365
|
+
restProps,
|
|
1366
|
+
{
|
|
1367
|
+
get ref() {
|
|
1368
|
+
return ref;
|
|
1369
|
+
},
|
|
1370
|
+
set ref($$value) {
|
|
1371
|
+
ref = $$value;
|
|
1372
|
+
$$settled = false;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
]));
|
|
1376
|
+
$$renderer4.push("<!--]-->");
|
|
1377
|
+
} else {
|
|
1378
|
+
$$renderer4.push("<!--[!-->");
|
|
1379
|
+
$$renderer4.push("<!--]-->");
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
$$slots: { default: true }
|
|
1383
|
+
}
|
|
1384
|
+
]));
|
|
1385
|
+
$$renderer3.push("<!--]-->");
|
|
1386
|
+
} else {
|
|
1387
|
+
$$renderer3.push("<!--[!-->");
|
|
1388
|
+
$$renderer3.push("<!--]-->");
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
do {
|
|
1392
|
+
$$settled = true;
|
|
1393
|
+
$$inner_renderer = $$renderer2.copy();
|
|
1394
|
+
$$render_inner($$inner_renderer);
|
|
1395
|
+
} while (!$$settled);
|
|
1396
|
+
$$renderer2.subsume($$inner_renderer);
|
|
1397
|
+
bind_props($$props, { ref });
|
|
1398
|
+
});
|
|
1399
|
+
}
|
|
1400
|
+
function Dropdown_menu_label($$renderer, $$props) {
|
|
1401
|
+
$$renderer.component(($$renderer2) => {
|
|
1402
|
+
let {
|
|
1403
|
+
ref = null,
|
|
1404
|
+
class: className,
|
|
1405
|
+
inset,
|
|
1406
|
+
children,
|
|
1407
|
+
$$slots,
|
|
1408
|
+
$$events,
|
|
1409
|
+
...restProps
|
|
1410
|
+
} = $$props;
|
|
1411
|
+
$$renderer2.push(`<div${attributes({
|
|
1412
|
+
"data-slot": "dropdown-menu-label",
|
|
1413
|
+
"data-inset": inset,
|
|
1414
|
+
class: clsx(cn("px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className)),
|
|
1415
|
+
...restProps
|
|
1416
|
+
})}>`);
|
|
1417
|
+
children?.($$renderer2);
|
|
1418
|
+
$$renderer2.push(`<!----></div>`);
|
|
1419
|
+
bind_props($$props, { ref });
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
function Dropdown_menu_separator($$renderer, $$props) {
|
|
1423
|
+
$$renderer.component(($$renderer2) => {
|
|
1424
|
+
let {
|
|
1425
|
+
ref = null,
|
|
1426
|
+
class: className,
|
|
1427
|
+
$$slots,
|
|
1428
|
+
$$events,
|
|
1429
|
+
...restProps
|
|
1430
|
+
} = $$props;
|
|
1431
|
+
let $$settled = true;
|
|
1432
|
+
let $$inner_renderer;
|
|
1433
|
+
function $$render_inner($$renderer3) {
|
|
1434
|
+
if (Menu_separator) {
|
|
1435
|
+
$$renderer3.push("<!--[-->");
|
|
1436
|
+
Menu_separator($$renderer3, spread_props([
|
|
1437
|
+
{
|
|
1438
|
+
"data-slot": "dropdown-menu-separator",
|
|
1439
|
+
class: cn("-mx-1 my-1 h-px bg-border", className)
|
|
1440
|
+
},
|
|
1441
|
+
restProps,
|
|
1442
|
+
{
|
|
1443
|
+
get ref() {
|
|
1444
|
+
return ref;
|
|
1445
|
+
},
|
|
1446
|
+
set ref($$value) {
|
|
1447
|
+
ref = $$value;
|
|
1448
|
+
$$settled = false;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
]));
|
|
1452
|
+
$$renderer3.push("<!--]-->");
|
|
1453
|
+
} else {
|
|
1454
|
+
$$renderer3.push("<!--[!-->");
|
|
1455
|
+
$$renderer3.push("<!--]-->");
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
do {
|
|
1459
|
+
$$settled = true;
|
|
1460
|
+
$$inner_renderer = $$renderer2.copy();
|
|
1461
|
+
$$render_inner($$inner_renderer);
|
|
1462
|
+
} while (!$$settled);
|
|
1463
|
+
$$renderer2.subsume($$inner_renderer);
|
|
1464
|
+
bind_props($$props, { ref });
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
function Dropdown_menu_trigger($$renderer, $$props) {
|
|
1468
|
+
$$renderer.component(($$renderer2) => {
|
|
1469
|
+
let { ref = null, $$slots, $$events, ...restProps } = $$props;
|
|
1470
|
+
let $$settled = true;
|
|
1471
|
+
let $$inner_renderer;
|
|
1472
|
+
function $$render_inner($$renderer3) {
|
|
1473
|
+
if (Menu_trigger) {
|
|
1474
|
+
$$renderer3.push("<!--[-->");
|
|
1475
|
+
Menu_trigger($$renderer3, spread_props([
|
|
1476
|
+
{ "data-slot": "dropdown-menu-trigger" },
|
|
1477
|
+
restProps,
|
|
1478
|
+
{
|
|
1479
|
+
get ref() {
|
|
1480
|
+
return ref;
|
|
1481
|
+
},
|
|
1482
|
+
set ref($$value) {
|
|
1483
|
+
ref = $$value;
|
|
1484
|
+
$$settled = false;
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
]));
|
|
1488
|
+
$$renderer3.push("<!--]-->");
|
|
1489
|
+
} else {
|
|
1490
|
+
$$renderer3.push("<!--[!-->");
|
|
1491
|
+
$$renderer3.push("<!--]-->");
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
do {
|
|
1495
|
+
$$settled = true;
|
|
1496
|
+
$$inner_renderer = $$renderer2.copy();
|
|
1497
|
+
$$render_inner($$inner_renderer);
|
|
1498
|
+
} while (!$$settled);
|
|
1499
|
+
$$renderer2.subsume($$inner_renderer);
|
|
1500
|
+
bind_props($$props, { ref });
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
const Root = Menu;
|
|
1504
|
+
function Tooltip_button($$renderer, $$props) {
|
|
1505
|
+
let {
|
|
1506
|
+
content,
|
|
1507
|
+
delayDuration = 400,
|
|
1508
|
+
side = "top",
|
|
1509
|
+
sideOffset = 0,
|
|
1510
|
+
contentClass,
|
|
1511
|
+
children,
|
|
1512
|
+
$$slots,
|
|
1513
|
+
$$events,
|
|
1514
|
+
...buttonProps
|
|
1515
|
+
} = $$props;
|
|
1516
|
+
if (Tooltip_provider) {
|
|
1517
|
+
$$renderer.push("<!--[-->");
|
|
1518
|
+
Tooltip_provider($$renderer, {
|
|
1519
|
+
children: ($$renderer2) => {
|
|
1520
|
+
if (Tooltip$1) {
|
|
1521
|
+
$$renderer2.push("<!--[-->");
|
|
1522
|
+
Tooltip$1($$renderer2, {
|
|
1523
|
+
delayDuration,
|
|
1524
|
+
children: ($$renderer3) => {
|
|
1525
|
+
{
|
|
1526
|
+
let child = function($$renderer4, { props }) {
|
|
1527
|
+
Button($$renderer4, spread_props([
|
|
1528
|
+
props,
|
|
1529
|
+
buttonProps,
|
|
1530
|
+
{
|
|
1531
|
+
children: ($$renderer5) => {
|
|
1532
|
+
children?.($$renderer5);
|
|
1533
|
+
$$renderer5.push(`<!---->`);
|
|
1534
|
+
},
|
|
1535
|
+
$$slots: { default: true }
|
|
1536
|
+
}
|
|
1537
|
+
]));
|
|
1538
|
+
};
|
|
1539
|
+
if (Tooltip_trigger$1) {
|
|
1540
|
+
$$renderer3.push("<!--[-->");
|
|
1541
|
+
Tooltip_trigger$1($$renderer3, { child, $$slots: { child: true } });
|
|
1542
|
+
$$renderer3.push("<!--]-->");
|
|
1543
|
+
} else {
|
|
1544
|
+
$$renderer3.push("<!--[!-->");
|
|
1545
|
+
$$renderer3.push("<!--]-->");
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
$$renderer3.push(` `);
|
|
1549
|
+
if (content) {
|
|
1550
|
+
$$renderer3.push("<!--[0-->");
|
|
1551
|
+
Tooltip_content($$renderer3, {
|
|
1552
|
+
side,
|
|
1553
|
+
sideOffset,
|
|
1554
|
+
class: contentClass,
|
|
1555
|
+
children: ($$renderer4) => {
|
|
1556
|
+
if (typeof content === "string") {
|
|
1557
|
+
$$renderer4.push("<!--[0-->");
|
|
1558
|
+
$$renderer4.push(`<p>${escape_html(content)}</p>`);
|
|
1559
|
+
} else {
|
|
1560
|
+
$$renderer4.push("<!--[-1-->");
|
|
1561
|
+
content($$renderer4);
|
|
1562
|
+
$$renderer4.push(`<!---->`);
|
|
1563
|
+
}
|
|
1564
|
+
$$renderer4.push(`<!--]-->`);
|
|
1565
|
+
},
|
|
1566
|
+
$$slots: { default: true }
|
|
1567
|
+
});
|
|
1568
|
+
} else {
|
|
1569
|
+
$$renderer3.push("<!--[-1-->");
|
|
1570
|
+
}
|
|
1571
|
+
$$renderer3.push(`<!--]-->`);
|
|
1572
|
+
},
|
|
1573
|
+
$$slots: { default: true }
|
|
1574
|
+
});
|
|
1575
|
+
$$renderer2.push("<!--]-->");
|
|
1576
|
+
} else {
|
|
1577
|
+
$$renderer2.push("<!--[!-->");
|
|
1578
|
+
$$renderer2.push("<!--]-->");
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
});
|
|
1582
|
+
$$renderer.push("<!--]-->");
|
|
1583
|
+
} else {
|
|
1584
|
+
$$renderer.push("<!--[!-->");
|
|
1585
|
+
$$renderer.push("<!--]-->");
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
function Toolbar($$renderer, $$props) {
|
|
1589
|
+
$$renderer.component(($$renderer2) => {
|
|
1590
|
+
const editorState = derived(getEditorState);
|
|
1591
|
+
let { showFeedbackBanner = false } = $$props;
|
|
1592
|
+
const projectStore = derived(() => editorState().project);
|
|
1593
|
+
const projectId = derived(() => editorState().dbProjectId);
|
|
1594
|
+
const isOwner = derived(() => editorState().isOwner);
|
|
1595
|
+
const canEdit = derived(() => editorState().canEdit);
|
|
1596
|
+
const isMcp = derived(() => editorState().isMcp);
|
|
1597
|
+
const mediaQuery = new IsMobile();
|
|
1598
|
+
const isMobile = derived(() => mediaQuery.current);
|
|
1599
|
+
let isPublic = derived(() => editorState().isPublic);
|
|
1600
|
+
let isRecording = derived(() => projectStore().isRecording);
|
|
1601
|
+
let headerOpen = false;
|
|
1602
|
+
let showPricingDialog = false;
|
|
1603
|
+
const user = derived(getUser);
|
|
1604
|
+
const shouldShowUpgrade = derived(() => !isDesktopMode() && !isLocalPreviewMode() && user().current && user().current.tier === "free");
|
|
1605
|
+
const canUndo = derived(() => projectStore().canUndo);
|
|
1606
|
+
const canRedo = derived(() => projectStore().canRedo);
|
|
1607
|
+
const shortcuts = [
|
|
1608
|
+
{ key: "Ctrl/Cmd + Z", description: "Undo" },
|
|
1609
|
+
{ key: "Ctrl/Cmd + Shift + Z", description: "Redo" },
|
|
1610
|
+
{ key: "Ctrl/Cmd + S", description: "Save Project" },
|
|
1611
|
+
{ key: "Ctrl/Cmd + N", description: "New Project" },
|
|
1612
|
+
{ key: "Ctrl/Cmd + E", description: "Export Video" }
|
|
1613
|
+
];
|
|
1614
|
+
async function handleSaveToCloud() {
|
|
1615
|
+
await uiStore.requireLogin("save your project", async () => await uiStore.doSaveToCloud(editorState()));
|
|
1616
|
+
}
|
|
1617
|
+
async function handleToggleVisibility() {
|
|
1618
|
+
if (!projectId()) return;
|
|
1619
|
+
await toggleVisibility({ id: projectId() });
|
|
1620
|
+
isPublic(!isPublic());
|
|
1621
|
+
}
|
|
1622
|
+
async function doFork() {
|
|
1623
|
+
if (!projectId()) return;
|
|
1624
|
+
const result = await forkProject({ id: projectId() });
|
|
1625
|
+
if (result.success && result.data.id) {
|
|
1626
|
+
goto(resolve("/(app)/editor/p/[id]", { id: result.data.id }));
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
function handleFork() {
|
|
1630
|
+
uiStore.requireLogin("fork this project", doFork);
|
|
1631
|
+
}
|
|
1632
|
+
const desktopMode = derived(isDesktopMode);
|
|
1633
|
+
const buttons = derived(() => [
|
|
1634
|
+
{
|
|
1635
|
+
id: "undo",
|
|
1636
|
+
label: "Undo",
|
|
1637
|
+
tooltip: "Undo (Ctrl/Cmd + Z)",
|
|
1638
|
+
icon: Undo_2,
|
|
1639
|
+
variant: "ghost",
|
|
1640
|
+
onclick: () => projectStore().undo(),
|
|
1641
|
+
disabled: isRecording() || !canEdit() || !canUndo(),
|
|
1642
|
+
visible: true
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
id: "redo",
|
|
1646
|
+
label: "Redo",
|
|
1647
|
+
tooltip: "Redo (Ctrl/Cmd + Shift + Z)",
|
|
1648
|
+
icon: Redo_2,
|
|
1649
|
+
variant: "ghost",
|
|
1650
|
+
onclick: () => projectStore().redo(),
|
|
1651
|
+
disabled: isRecording() || !canEdit() || !canRedo(),
|
|
1652
|
+
visible: true
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
id: "save",
|
|
1656
|
+
label: desktopMode() ? "Save" : "Save Cloud",
|
|
1657
|
+
tooltip: desktopMode() ? "Save Project (Ctrl/Cmd + S)" : "Save to Cloud (Ctrl/Cmd + S)",
|
|
1658
|
+
icon: Save,
|
|
1659
|
+
variant: "ghost",
|
|
1660
|
+
onclick: handleSaveToCloud,
|
|
1661
|
+
disabled: isRecording() || !canEdit(),
|
|
1662
|
+
visible: (!desktopMode() || true) && !isLocalPreviewMode(),
|
|
1663
|
+
showIndicator: editorState().hasUnsavedChanges
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
id: "visibility",
|
|
1667
|
+
label: isPublic() ? "Private" : "Public",
|
|
1668
|
+
tooltip: isPublic() ? "Make Private" : "Make Public",
|
|
1669
|
+
icon: isPublic() ? Lock_open : Lock,
|
|
1670
|
+
variant: "ghost",
|
|
1671
|
+
onclick: handleToggleVisibility,
|
|
1672
|
+
disabled: isRecording(),
|
|
1673
|
+
visible: (!desktopMode() || false) && !!projectId() && !!isOwner() && !!user().current
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
id: "fork",
|
|
1677
|
+
label: "Fork",
|
|
1678
|
+
tooltip: "Fork Project",
|
|
1679
|
+
icon: Git_fork,
|
|
1680
|
+
variant: "ghost",
|
|
1681
|
+
onclick: handleFork,
|
|
1682
|
+
disabled: isRecording(),
|
|
1683
|
+
visible: (!desktopMode() || false) && !!projectId()
|
|
1684
|
+
}
|
|
1685
|
+
]);
|
|
1686
|
+
let $$settled = true;
|
|
1687
|
+
let $$inner_renderer;
|
|
1688
|
+
function $$render_inner($$renderer3) {
|
|
1689
|
+
Collapsible($$renderer3, {
|
|
1690
|
+
class: "w-full",
|
|
1691
|
+
get open() {
|
|
1692
|
+
return headerOpen;
|
|
1693
|
+
},
|
|
1694
|
+
set open($$value) {
|
|
1695
|
+
headerOpen = $$value;
|
|
1696
|
+
$$settled = false;
|
|
1697
|
+
},
|
|
1698
|
+
children: ($$renderer4) => {
|
|
1699
|
+
{
|
|
1700
|
+
let leftContent = function($$renderer5) {
|
|
1701
|
+
$$renderer5.push(`<div class="flex items-center gap-2">`);
|
|
1702
|
+
Tooltip_button($$renderer5, {
|
|
1703
|
+
content: "My Projects",
|
|
1704
|
+
class: "ml-2",
|
|
1705
|
+
variant: "outline",
|
|
1706
|
+
href: resolve("/editor"),
|
|
1707
|
+
icon: Chevron_left,
|
|
1708
|
+
size: "icon"
|
|
1709
|
+
});
|
|
1710
|
+
$$renderer5.push(`<!----> `);
|
|
1711
|
+
if (isMcp()) {
|
|
1712
|
+
$$renderer5.push("<!--[0-->");
|
|
1713
|
+
$$renderer5.push(`<div class="flex items-center rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-[10px] font-bold tracking-wider text-primary">MCP</div>`);
|
|
1714
|
+
} else {
|
|
1715
|
+
$$renderer5.push("<!--[-1-->");
|
|
1716
|
+
}
|
|
1717
|
+
$$renderer5.push(`<!--]--></div> `);
|
|
1718
|
+
if (!isMobile()) {
|
|
1719
|
+
$$renderer5.push("<!--[0-->");
|
|
1720
|
+
$$renderer5.push(`<div class="flex items-center gap-1"><!--[-->`);
|
|
1721
|
+
const each_array = ensure_array_like(buttons().filter((b) => b.visible && b.id !== "export"));
|
|
1722
|
+
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
1723
|
+
let button = each_array[$$index];
|
|
1724
|
+
$$renderer5.push(`<div class="relative"${attr("data-onboarding", button.id)}>`);
|
|
1725
|
+
Tooltip_button($$renderer5, {
|
|
1726
|
+
content: button.tooltip,
|
|
1727
|
+
variant: button.variant,
|
|
1728
|
+
onclick: button.onclick,
|
|
1729
|
+
href: button.href,
|
|
1730
|
+
target: button.target,
|
|
1731
|
+
disabled: button.disabled,
|
|
1732
|
+
icon: button.icon
|
|
1733
|
+
});
|
|
1734
|
+
$$renderer5.push(`<!----> `);
|
|
1735
|
+
if (button.showIndicator) {
|
|
1736
|
+
$$renderer5.push("<!--[0-->");
|
|
1737
|
+
$$renderer5.push(`<span class="absolute top-1 right-1 h-2 w-2 rounded-full bg-orange-500 ring-2 ring-background"></span>`);
|
|
1738
|
+
} else {
|
|
1739
|
+
$$renderer5.push("<!--[-1-->");
|
|
1740
|
+
}
|
|
1741
|
+
$$renderer5.push(`<!--]--></div>`);
|
|
1742
|
+
}
|
|
1743
|
+
$$renderer5.push(`<!--]--></div>`);
|
|
1744
|
+
} else {
|
|
1745
|
+
$$renderer5.push("<!--[-1-->");
|
|
1746
|
+
}
|
|
1747
|
+
$$renderer5.push(`<!--]-->`);
|
|
1748
|
+
}, rightContent = function($$renderer5) {
|
|
1749
|
+
if (isRecording()) {
|
|
1750
|
+
$$renderer5.push("<!--[0-->");
|
|
1751
|
+
$$renderer5.push(`<div class="flex animate-pulse items-center gap-2 rounded-md bg-red-500 px-3 py-1 text-xs font-medium text-white lg:text-sm"><span class="h-2 w-2 rounded-full bg-white"></span> Recording...</div>`);
|
|
1752
|
+
} else {
|
|
1753
|
+
$$renderer5.push("<!--[-1-->");
|
|
1754
|
+
}
|
|
1755
|
+
$$renderer5.push(`<!--]--> <div class="flex items-center gap-2">`);
|
|
1756
|
+
if (!isMobile()) {
|
|
1757
|
+
$$renderer5.push("<!--[0-->");
|
|
1758
|
+
Theme_toggle($$renderer5, {});
|
|
1759
|
+
$$renderer5.push(`<!----> `);
|
|
1760
|
+
Tooltip_button($$renderer5, {
|
|
1761
|
+
content: "Request a feature or report a bug",
|
|
1762
|
+
variant: "ghost",
|
|
1763
|
+
href: "https://devmotion.canny.io/feature-requests",
|
|
1764
|
+
target: "_blank",
|
|
1765
|
+
rel: "noreferrer",
|
|
1766
|
+
icon: Message_square
|
|
1767
|
+
});
|
|
1768
|
+
$$renderer5.push(`<!----> `);
|
|
1769
|
+
Tooltip_button($$renderer5, {
|
|
1770
|
+
content: "Share feedback with the creator",
|
|
1771
|
+
variant: "ghost",
|
|
1772
|
+
onclick: () => showFeedbackBanner = true,
|
|
1773
|
+
icon: Heart
|
|
1774
|
+
});
|
|
1775
|
+
$$renderer5.push(`<!----> `);
|
|
1776
|
+
if (Root) {
|
|
1777
|
+
$$renderer5.push("<!--[-->");
|
|
1778
|
+
Root($$renderer5, {
|
|
1779
|
+
children: ($$renderer6) => {
|
|
1780
|
+
{
|
|
1781
|
+
let child = function($$renderer7, { props }) {
|
|
1782
|
+
Button($$renderer7, spread_props([{ variant: "ghost", icon: Keyboard }, props]));
|
|
1783
|
+
};
|
|
1784
|
+
if (Dropdown_menu_trigger) {
|
|
1785
|
+
$$renderer6.push("<!--[-->");
|
|
1786
|
+
Dropdown_menu_trigger($$renderer6, { child, $$slots: { child: true } });
|
|
1787
|
+
$$renderer6.push("<!--]-->");
|
|
1788
|
+
} else {
|
|
1789
|
+
$$renderer6.push("<!--[!-->");
|
|
1790
|
+
$$renderer6.push("<!--]-->");
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
$$renderer6.push(` `);
|
|
1794
|
+
if (Dropdown_menu_content) {
|
|
1795
|
+
$$renderer6.push("<!--[-->");
|
|
1796
|
+
Dropdown_menu_content($$renderer6, {
|
|
1797
|
+
align: "end",
|
|
1798
|
+
class: "w-64",
|
|
1799
|
+
children: ($$renderer7) => {
|
|
1800
|
+
if (Dropdown_menu_label) {
|
|
1801
|
+
$$renderer7.push("<!--[-->");
|
|
1802
|
+
Dropdown_menu_label($$renderer7, {
|
|
1803
|
+
children: ($$renderer8) => {
|
|
1804
|
+
$$renderer8.push(`<!---->Keyboard Shortcuts`);
|
|
1805
|
+
},
|
|
1806
|
+
$$slots: { default: true }
|
|
1807
|
+
});
|
|
1808
|
+
$$renderer7.push("<!--]-->");
|
|
1809
|
+
} else {
|
|
1810
|
+
$$renderer7.push("<!--[!-->");
|
|
1811
|
+
$$renderer7.push("<!--]-->");
|
|
1812
|
+
}
|
|
1813
|
+
$$renderer7.push(` `);
|
|
1814
|
+
if (Dropdown_menu_separator) {
|
|
1815
|
+
$$renderer7.push("<!--[-->");
|
|
1816
|
+
Dropdown_menu_separator($$renderer7, {});
|
|
1817
|
+
$$renderer7.push("<!--]-->");
|
|
1818
|
+
} else {
|
|
1819
|
+
$$renderer7.push("<!--[!-->");
|
|
1820
|
+
$$renderer7.push("<!--]-->");
|
|
1821
|
+
}
|
|
1822
|
+
$$renderer7.push(` <!--[-->`);
|
|
1823
|
+
const each_array_1 = ensure_array_like(shortcuts);
|
|
1824
|
+
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
|
1825
|
+
let shortcut = each_array_1[$$index_1];
|
|
1826
|
+
$$renderer7.push(`<div class="flex items-center justify-between px-2 py-1.5 text-sm"><span class="text-muted-foreground">${escape_html(shortcut.description)}</span> <kbd class="pointer-events-none inline-flex h-5 items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100 select-none">${escape_html(shortcut.key)}</kbd></div>`);
|
|
1827
|
+
}
|
|
1828
|
+
$$renderer7.push(`<!--]-->`);
|
|
1829
|
+
},
|
|
1830
|
+
$$slots: { default: true }
|
|
1831
|
+
});
|
|
1832
|
+
$$renderer6.push("<!--]-->");
|
|
1833
|
+
} else {
|
|
1834
|
+
$$renderer6.push("<!--[!-->");
|
|
1835
|
+
$$renderer6.push("<!--]-->");
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
$$slots: { default: true }
|
|
1839
|
+
});
|
|
1840
|
+
$$renderer5.push("<!--]-->");
|
|
1841
|
+
} else {
|
|
1842
|
+
$$renderer5.push("<!--[!-->");
|
|
1843
|
+
$$renderer5.push("<!--]-->");
|
|
1844
|
+
}
|
|
1845
|
+
$$renderer5.push(` `);
|
|
1846
|
+
{
|
|
1847
|
+
$$renderer5.push("<!--[-1-->");
|
|
1848
|
+
}
|
|
1849
|
+
$$renderer5.push(`<!--]--> `);
|
|
1850
|
+
if (shouldShowUpgrade()) {
|
|
1851
|
+
$$renderer5.push("<!--[0-->");
|
|
1852
|
+
Tooltip_button($$renderer5, {
|
|
1853
|
+
content: "Upgrade to Creator or Pro",
|
|
1854
|
+
variant: "secondary",
|
|
1855
|
+
onclick: () => showPricingDialog = true,
|
|
1856
|
+
icon: Gem,
|
|
1857
|
+
children: ($$renderer6) => {
|
|
1858
|
+
$$renderer6.push(`<!---->Upgrade`);
|
|
1859
|
+
},
|
|
1860
|
+
$$slots: { default: true }
|
|
1861
|
+
});
|
|
1862
|
+
} else {
|
|
1863
|
+
$$renderer5.push("<!--[-1-->");
|
|
1864
|
+
}
|
|
1865
|
+
$$renderer5.push(`<!--]--> <div data-onboarding="export">`);
|
|
1866
|
+
Export_popover($$renderer5, { projectId: projectId(), disabled: isRecording() });
|
|
1867
|
+
$$renderer5.push(`<!----></div>`);
|
|
1868
|
+
} else {
|
|
1869
|
+
$$renderer5.push("<!--[-1-->");
|
|
1870
|
+
}
|
|
1871
|
+
$$renderer5.push(`<!--]--> `);
|
|
1872
|
+
if (isMobile()) {
|
|
1873
|
+
$$renderer5.push("<!--[0-->");
|
|
1874
|
+
{
|
|
1875
|
+
let child = function($$renderer6, { props }) {
|
|
1876
|
+
Button($$renderer6, spread_props([
|
|
1877
|
+
{ variant: "ghost", size: "icon" },
|
|
1878
|
+
props,
|
|
1879
|
+
{
|
|
1880
|
+
children: ($$renderer7) => {
|
|
1881
|
+
if (headerOpen) {
|
|
1882
|
+
$$renderer7.push("<!--[0-->");
|
|
1883
|
+
X($$renderer7, { class: "size-4" });
|
|
1884
|
+
} else {
|
|
1885
|
+
$$renderer7.push("<!--[-1-->");
|
|
1886
|
+
Menu$1($$renderer7, { class: "size-4" });
|
|
1887
|
+
}
|
|
1888
|
+
$$renderer7.push(`<!--]-->`);
|
|
1889
|
+
},
|
|
1890
|
+
$$slots: { default: true }
|
|
1891
|
+
}
|
|
1892
|
+
]));
|
|
1893
|
+
};
|
|
1894
|
+
Collapsible_trigger($$renderer5, { child, $$slots: { child: true } });
|
|
1895
|
+
}
|
|
1896
|
+
} else {
|
|
1897
|
+
$$renderer5.push("<!--[-1-->");
|
|
1898
|
+
}
|
|
1899
|
+
$$renderer5.push(`<!--]--></div>`);
|
|
1900
|
+
};
|
|
1901
|
+
App_header($$renderer4, {
|
|
1902
|
+
leftContent,
|
|
1903
|
+
rightContent
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
$$renderer4.push(`<!----> `);
|
|
1907
|
+
Collapsible_content($$renderer4, {
|
|
1908
|
+
children: ($$renderer5) => {
|
|
1909
|
+
$$renderer5.push(`<div class="flex flex-col gap-2 border-b bg-muted/30 p-4"><div class="grid grid-cols-2 gap-2">`);
|
|
1910
|
+
if (shouldShowUpgrade()) {
|
|
1911
|
+
$$renderer5.push("<!--[0-->");
|
|
1912
|
+
Button($$renderer5, {
|
|
1913
|
+
variant: "default",
|
|
1914
|
+
onclick: () => showPricingDialog = true,
|
|
1915
|
+
icon: Zap,
|
|
1916
|
+
class: "col-span-2 w-full",
|
|
1917
|
+
children: ($$renderer6) => {
|
|
1918
|
+
$$renderer6.push(`<!---->Upgrade to Pro`);
|
|
1919
|
+
},
|
|
1920
|
+
$$slots: { default: true }
|
|
1921
|
+
});
|
|
1922
|
+
} else {
|
|
1923
|
+
$$renderer5.push("<!--[-1-->");
|
|
1924
|
+
}
|
|
1925
|
+
$$renderer5.push(`<!--]--> <!--[-->`);
|
|
1926
|
+
const each_array_2 = ensure_array_like(buttons().filter((b) => b.visible));
|
|
1927
|
+
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
1928
|
+
let button = each_array_2[$$index_2];
|
|
1929
|
+
$$renderer5.push(`<div class="relative">`);
|
|
1930
|
+
Button($$renderer5, {
|
|
1931
|
+
"data-sveltekit-reload": true,
|
|
1932
|
+
variant: "outline",
|
|
1933
|
+
onclick: button.onclick,
|
|
1934
|
+
href: button.href,
|
|
1935
|
+
disabled: button.disabled,
|
|
1936
|
+
icon: button.icon,
|
|
1937
|
+
class: "w-full",
|
|
1938
|
+
children: ($$renderer6) => {
|
|
1939
|
+
$$renderer6.push(`<!---->${escape_html(button.label)}`);
|
|
1940
|
+
},
|
|
1941
|
+
$$slots: { default: true }
|
|
1942
|
+
});
|
|
1943
|
+
$$renderer5.push(`<!----> `);
|
|
1944
|
+
if (button.showIndicator) {
|
|
1945
|
+
$$renderer5.push("<!--[0-->");
|
|
1946
|
+
$$renderer5.push(`<span class="absolute top-2 right-2 h-2 w-2 rounded-full bg-orange-500 ring-2 ring-background"></span>`);
|
|
1947
|
+
} else {
|
|
1948
|
+
$$renderer5.push("<!--[-1-->");
|
|
1949
|
+
}
|
|
1950
|
+
$$renderer5.push(`<!--]--></div>`);
|
|
1951
|
+
}
|
|
1952
|
+
$$renderer5.push(`<!--]--> <div class="col-span-2">`);
|
|
1953
|
+
Export_popover($$renderer5, { projectId: projectId(), disabled: isRecording() });
|
|
1954
|
+
$$renderer5.push(`<!----></div> `);
|
|
1955
|
+
Button($$renderer5, {
|
|
1956
|
+
variant: "outline",
|
|
1957
|
+
href: "https://devmotion.canny.io/feature-requests",
|
|
1958
|
+
target: "_blank",
|
|
1959
|
+
rel: "noreferrer",
|
|
1960
|
+
icon: Message_square,
|
|
1961
|
+
class: "w-full",
|
|
1962
|
+
children: ($$renderer6) => {
|
|
1963
|
+
$$renderer6.push(`<!---->Request a feature`);
|
|
1964
|
+
},
|
|
1965
|
+
$$slots: { default: true }
|
|
1966
|
+
});
|
|
1967
|
+
$$renderer5.push(`<!----> `);
|
|
1968
|
+
Theme_toggle($$renderer5, {
|
|
1969
|
+
variant: "outline",
|
|
1970
|
+
children: ($$renderer6) => {
|
|
1971
|
+
$$renderer6.push(`<!---->Toggle theme`);
|
|
1972
|
+
}
|
|
1973
|
+
});
|
|
1974
|
+
$$renderer5.push(`<!----></div></div>`);
|
|
1975
|
+
},
|
|
1976
|
+
$$slots: { default: true }
|
|
1977
|
+
});
|
|
1978
|
+
$$renderer4.push(`<!---->`);
|
|
1979
|
+
},
|
|
1980
|
+
$$slots: { default: true }
|
|
1981
|
+
});
|
|
1982
|
+
$$renderer3.push(`<!----> `);
|
|
1983
|
+
Pricing_dialog($$renderer3, {
|
|
1984
|
+
get open() {
|
|
1985
|
+
return showPricingDialog;
|
|
1986
|
+
},
|
|
1987
|
+
set open($$value) {
|
|
1988
|
+
showPricingDialog = $$value;
|
|
1989
|
+
$$settled = false;
|
|
1990
|
+
}
|
|
1991
|
+
});
|
|
1992
|
+
$$renderer3.push(`<!---->`);
|
|
1993
|
+
}
|
|
1994
|
+
do {
|
|
1995
|
+
$$settled = true;
|
|
1996
|
+
$$inner_renderer = $$renderer2.copy();
|
|
1997
|
+
$$render_inner($$inner_renderer);
|
|
1998
|
+
} while (!$$settled);
|
|
1999
|
+
$$renderer2.subsume($$inner_renderer);
|
|
2000
|
+
bind_props($$props, { showFeedbackBanner });
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
function Link_button($$renderer, $$props) {
|
|
2004
|
+
$$renderer.component(($$renderer2) => {
|
|
2005
|
+
let { class: className, href, onclick, children } = $$props;
|
|
2006
|
+
if (href) {
|
|
2007
|
+
$$renderer2.push("<!--[0-->");
|
|
2008
|
+
$$renderer2.push(`<a${attr("href", href)}${attr_class(clsx(cn("text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", className)))}>`);
|
|
2009
|
+
children($$renderer2);
|
|
2010
|
+
$$renderer2.push(`<!----></a>`);
|
|
2011
|
+
} else {
|
|
2012
|
+
$$renderer2.push("<!--[-1-->");
|
|
2013
|
+
$$renderer2.push(`<button type="button"${attr_class(clsx(cn("text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline", className)))}>`);
|
|
2014
|
+
children($$renderer2);
|
|
2015
|
+
$$renderer2.push(`<!----></button>`);
|
|
2016
|
+
}
|
|
2017
|
+
$$renderer2.push(`<!--]-->`);
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
function Feedback_banner($$renderer, $$props) {
|
|
2021
|
+
$$renderer.component(($$renderer2) => {
|
|
2022
|
+
const STORAGE_KEY = "devmotion_feedback_done";
|
|
2023
|
+
const CALENDLY_URL = "https://calendly.com/pavanello-emanuele/30min";
|
|
2024
|
+
let { open = false } = $$props;
|
|
2025
|
+
let message = "";
|
|
2026
|
+
let view = "main";
|
|
2027
|
+
async function handleSubmit() {
|
|
2028
|
+
if (!message.trim()) return;
|
|
2029
|
+
const result = await sendFeedback({ message: message.trim() });
|
|
2030
|
+
if (result.success) {
|
|
2031
|
+
localStorage.setItem(STORAGE_KEY, "1");
|
|
2032
|
+
open = false;
|
|
2033
|
+
toast.success("Thanks! Your feedback means a lot.");
|
|
2034
|
+
} else {
|
|
2035
|
+
toast.error("Failed to send feedback, try again.");
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
function handleCalendly() {
|
|
2039
|
+
localStorage.setItem(STORAGE_KEY, "1");
|
|
2040
|
+
window.open(CALENDLY_URL, "_blank", "noreferrer");
|
|
2041
|
+
open = false;
|
|
2042
|
+
}
|
|
2043
|
+
function handlePerfect() {
|
|
2044
|
+
localStorage.setItem(STORAGE_KEY, "1");
|
|
2045
|
+
open = false;
|
|
2046
|
+
}
|
|
2047
|
+
let $$settled = true;
|
|
2048
|
+
let $$inner_renderer;
|
|
2049
|
+
function $$render_inner($$renderer3) {
|
|
2050
|
+
if (Root$1) {
|
|
2051
|
+
$$renderer3.push("<!--[-->");
|
|
2052
|
+
Root$1($$renderer3, {
|
|
2053
|
+
get open() {
|
|
2054
|
+
return open;
|
|
2055
|
+
},
|
|
2056
|
+
set open($$value) {
|
|
2057
|
+
open = $$value;
|
|
2058
|
+
$$settled = false;
|
|
2059
|
+
},
|
|
2060
|
+
children: ($$renderer4) => {
|
|
2061
|
+
if (Dialog_content) {
|
|
2062
|
+
$$renderer4.push("<!--[-->");
|
|
2063
|
+
Dialog_content($$renderer4, {
|
|
2064
|
+
class: "max-w-[480px]",
|
|
2065
|
+
onEscapeKeydown: (e) => e.preventDefault(),
|
|
2066
|
+
onInteractOutside: (e) => e.preventDefault(),
|
|
2067
|
+
showCloseButton: false,
|
|
2068
|
+
children: ($$renderer5) => {
|
|
2069
|
+
if (view === "main") {
|
|
2070
|
+
$$renderer5.push("<!--[0-->");
|
|
2071
|
+
if (Dialog_header) {
|
|
2072
|
+
$$renderer5.push("<!--[-->");
|
|
2073
|
+
Dialog_header($$renderer5, {
|
|
2074
|
+
children: ($$renderer6) => {
|
|
2075
|
+
$$renderer6.push(`<div class="flex items-start gap-3"><div class="flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-base">👋</div> <div>`);
|
|
2076
|
+
if (Dialog_title) {
|
|
2077
|
+
$$renderer6.push("<!--[-->");
|
|
2078
|
+
Dialog_title($$renderer6, {
|
|
2079
|
+
class: "text-sm",
|
|
2080
|
+
children: ($$renderer7) => {
|
|
2081
|
+
$$renderer7.push(`<!---->Hey, I'm Emanuele — I built DevMotion.`);
|
|
2082
|
+
},
|
|
2083
|
+
$$slots: { default: true }
|
|
2084
|
+
});
|
|
2085
|
+
$$renderer6.push("<!--]-->");
|
|
2086
|
+
} else {
|
|
2087
|
+
$$renderer6.push("<!--[!-->");
|
|
2088
|
+
$$renderer6.push("<!--]-->");
|
|
2089
|
+
}
|
|
2090
|
+
$$renderer6.push(` `);
|
|
2091
|
+
if (Dialog_description) {
|
|
2092
|
+
$$renderer6.push("<!--[-->");
|
|
2093
|
+
Dialog_description($$renderer6, {
|
|
2094
|
+
class: "mt-2",
|
|
2095
|
+
children: ($$renderer7) => {
|
|
2096
|
+
$$renderer7.push(`<!---->I put a lot of passion into this and I want to keep making it better for <em>you</em>. Even a one-liner helps.`);
|
|
2097
|
+
},
|
|
2098
|
+
$$slots: { default: true }
|
|
2099
|
+
});
|
|
2100
|
+
$$renderer6.push("<!--]-->");
|
|
2101
|
+
} else {
|
|
2102
|
+
$$renderer6.push("<!--[!-->");
|
|
2103
|
+
$$renderer6.push("<!--]-->");
|
|
2104
|
+
}
|
|
2105
|
+
$$renderer6.push(` <p class="mt-2 text-sm text-muted-foreground">Or hop on a 30-min call and I'll give you <span class="font-semibold text-foreground">2 weeks of Pro for free</span>. No
|
|
2106
|
+
strings.</p></div></div>`);
|
|
2107
|
+
},
|
|
2108
|
+
$$slots: { default: true }
|
|
2109
|
+
});
|
|
2110
|
+
$$renderer5.push("<!--]-->");
|
|
2111
|
+
} else {
|
|
2112
|
+
$$renderer5.push("<!--[!-->");
|
|
2113
|
+
$$renderer5.push("<!--]-->");
|
|
2114
|
+
}
|
|
2115
|
+
$$renderer5.push(` `);
|
|
2116
|
+
if (Dialog_footer) {
|
|
2117
|
+
$$renderer5.push("<!--[-->");
|
|
2118
|
+
Dialog_footer($$renderer5, {
|
|
2119
|
+
class: "mt-2 flex-col gap-2 sm:flex-col",
|
|
2120
|
+
children: ($$renderer6) => {
|
|
2121
|
+
Button($$renderer6, {
|
|
2122
|
+
class: "w-full",
|
|
2123
|
+
onclick: () => view = "textarea",
|
|
2124
|
+
icon: Message_square,
|
|
2125
|
+
children: ($$renderer7) => {
|
|
2126
|
+
$$renderer7.push(`<!---->Leave quick feedback`);
|
|
2127
|
+
},
|
|
2128
|
+
$$slots: { default: true }
|
|
2129
|
+
});
|
|
2130
|
+
$$renderer6.push(`<!----> `);
|
|
2131
|
+
Button($$renderer6, {
|
|
2132
|
+
variant: "outline",
|
|
2133
|
+
class: "w-full",
|
|
2134
|
+
onclick: handleCalendly,
|
|
2135
|
+
icon: Calendar,
|
|
2136
|
+
children: ($$renderer7) => {
|
|
2137
|
+
$$renderer7.push(`<!---->Book a 30-min call → get 2 weeks Pro`);
|
|
2138
|
+
},
|
|
2139
|
+
$$slots: { default: true }
|
|
2140
|
+
});
|
|
2141
|
+
$$renderer6.push(`<!----> `);
|
|
2142
|
+
Link_button($$renderer6, {
|
|
2143
|
+
onclick: handlePerfect,
|
|
2144
|
+
class: "mx-auto",
|
|
2145
|
+
children: ($$renderer7) => {
|
|
2146
|
+
$$renderer7.push(`<!---->It's perfect as is, nothing to add`);
|
|
2147
|
+
}
|
|
2148
|
+
});
|
|
2149
|
+
$$renderer6.push(`<!---->`);
|
|
2150
|
+
},
|
|
2151
|
+
$$slots: { default: true }
|
|
2152
|
+
});
|
|
2153
|
+
$$renderer5.push("<!--]-->");
|
|
2154
|
+
} else {
|
|
2155
|
+
$$renderer5.push("<!--[!-->");
|
|
2156
|
+
$$renderer5.push("<!--]-->");
|
|
2157
|
+
}
|
|
2158
|
+
} else {
|
|
2159
|
+
$$renderer5.push("<!--[-1-->");
|
|
2160
|
+
if (Dialog_header) {
|
|
2161
|
+
$$renderer5.push("<!--[-->");
|
|
2162
|
+
Dialog_header($$renderer5, {
|
|
2163
|
+
children: ($$renderer6) => {
|
|
2164
|
+
$$renderer6.push(`<div class="flex items-center gap-2">`);
|
|
2165
|
+
Button($$renderer6, {
|
|
2166
|
+
variant: "ghost",
|
|
2167
|
+
size: "icon-sm",
|
|
2168
|
+
onclick: () => view = "main",
|
|
2169
|
+
icon: Chevron_left,
|
|
2170
|
+
class: "-ml-1 shrink-0"
|
|
2171
|
+
});
|
|
2172
|
+
$$renderer6.push(`<!----> `);
|
|
2173
|
+
if (Dialog_title) {
|
|
2174
|
+
$$renderer6.push("<!--[-->");
|
|
2175
|
+
Dialog_title($$renderer6, {
|
|
2176
|
+
children: ($$renderer7) => {
|
|
2177
|
+
$$renderer7.push(`<!---->What's on your mind?`);
|
|
2178
|
+
},
|
|
2179
|
+
$$slots: { default: true }
|
|
2180
|
+
});
|
|
2181
|
+
$$renderer6.push("<!--]-->");
|
|
2182
|
+
} else {
|
|
2183
|
+
$$renderer6.push("<!--[!-->");
|
|
2184
|
+
$$renderer6.push("<!--]-->");
|
|
2185
|
+
}
|
|
2186
|
+
$$renderer6.push(`</div>`);
|
|
2187
|
+
},
|
|
2188
|
+
$$slots: { default: true }
|
|
2189
|
+
});
|
|
2190
|
+
$$renderer5.push("<!--]-->");
|
|
2191
|
+
} else {
|
|
2192
|
+
$$renderer5.push("<!--[!-->");
|
|
2193
|
+
$$renderer5.push("<!--]-->");
|
|
2194
|
+
}
|
|
2195
|
+
$$renderer5.push(` `);
|
|
2196
|
+
Textarea($$renderer5, {
|
|
2197
|
+
placeholder: "Something broken, something missing, a wild idea… anything goes.",
|
|
2198
|
+
rows: 5,
|
|
2199
|
+
class: "resize-none",
|
|
2200
|
+
get value() {
|
|
2201
|
+
return message;
|
|
2202
|
+
},
|
|
2203
|
+
set value($$value) {
|
|
2204
|
+
message = $$value;
|
|
2205
|
+
$$settled = false;
|
|
2206
|
+
}
|
|
2207
|
+
});
|
|
2208
|
+
$$renderer5.push(`<!----> `);
|
|
2209
|
+
if (Dialog_footer) {
|
|
2210
|
+
$$renderer5.push("<!--[-->");
|
|
2211
|
+
Dialog_footer($$renderer5, {
|
|
2212
|
+
class: "mt-1 flex-row items-center justify-between sm:justify-between",
|
|
2213
|
+
children: ($$renderer6) => {
|
|
2214
|
+
Link_button($$renderer6, {
|
|
2215
|
+
onclick: handlePerfect,
|
|
2216
|
+
children: ($$renderer7) => {
|
|
2217
|
+
$$renderer7.push(`<!---->It's perfect as is`);
|
|
2218
|
+
}
|
|
2219
|
+
});
|
|
2220
|
+
$$renderer6.push(`<!----> `);
|
|
2221
|
+
Button($$renderer6, {
|
|
2222
|
+
onclick: handleSubmit,
|
|
2223
|
+
disabled: !message.trim(),
|
|
2224
|
+
icon: Heart,
|
|
2225
|
+
children: ($$renderer7) => {
|
|
2226
|
+
$$renderer7.push(`<!---->Send feedback`);
|
|
2227
|
+
},
|
|
2228
|
+
$$slots: { default: true }
|
|
2229
|
+
});
|
|
2230
|
+
$$renderer6.push(`<!---->`);
|
|
2231
|
+
},
|
|
2232
|
+
$$slots: { default: true }
|
|
2233
|
+
});
|
|
2234
|
+
$$renderer5.push("<!--]-->");
|
|
2235
|
+
} else {
|
|
2236
|
+
$$renderer5.push("<!--[!-->");
|
|
2237
|
+
$$renderer5.push("<!--]-->");
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
$$renderer5.push(`<!--]-->`);
|
|
2241
|
+
},
|
|
2242
|
+
$$slots: { default: true }
|
|
2243
|
+
});
|
|
2244
|
+
$$renderer4.push("<!--]-->");
|
|
2245
|
+
} else {
|
|
2246
|
+
$$renderer4.push("<!--[!-->");
|
|
2247
|
+
$$renderer4.push("<!--]-->");
|
|
2248
|
+
}
|
|
2249
|
+
},
|
|
2250
|
+
$$slots: { default: true }
|
|
2251
|
+
});
|
|
2252
|
+
$$renderer3.push("<!--]-->");
|
|
2253
|
+
} else {
|
|
2254
|
+
$$renderer3.push("<!--[!-->");
|
|
2255
|
+
$$renderer3.push("<!--]-->");
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
do {
|
|
2259
|
+
$$settled = true;
|
|
2260
|
+
$$inner_renderer = $$renderer2.copy();
|
|
2261
|
+
$$render_inner($$inner_renderer);
|
|
2262
|
+
} while (!$$settled);
|
|
2263
|
+
$$renderer2.subsume($$inner_renderer);
|
|
2264
|
+
bind_props($$props, { open });
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
function Editor_shell($$renderer, $$props) {
|
|
2268
|
+
$$renderer.component(($$renderer2) => {
|
|
2269
|
+
let { children } = $$props;
|
|
2270
|
+
let showFeedback = false;
|
|
2271
|
+
let $$settled = true;
|
|
2272
|
+
let $$inner_renderer;
|
|
2273
|
+
function $$render_inner($$renderer3) {
|
|
2274
|
+
$$renderer3.push(`<div class="flex h-screen w-full flex-col bg-background">`);
|
|
2275
|
+
Toolbar($$renderer3, {
|
|
2276
|
+
get showFeedbackBanner() {
|
|
2277
|
+
return showFeedback;
|
|
2278
|
+
},
|
|
2279
|
+
set showFeedbackBanner($$value) {
|
|
2280
|
+
showFeedback = $$value;
|
|
2281
|
+
$$settled = false;
|
|
2282
|
+
}
|
|
2283
|
+
});
|
|
2284
|
+
$$renderer3.push(`<!----> `);
|
|
2285
|
+
children($$renderer3);
|
|
2286
|
+
$$renderer3.push(`<!----></div> `);
|
|
2287
|
+
Feedback_banner($$renderer3, {
|
|
2288
|
+
get open() {
|
|
2289
|
+
return showFeedback;
|
|
2290
|
+
},
|
|
2291
|
+
set open($$value) {
|
|
2292
|
+
showFeedback = $$value;
|
|
2293
|
+
$$settled = false;
|
|
2294
|
+
}
|
|
2295
|
+
});
|
|
2296
|
+
$$renderer3.push(`<!---->`);
|
|
2297
|
+
}
|
|
2298
|
+
do {
|
|
2299
|
+
$$settled = true;
|
|
2300
|
+
$$inner_renderer = $$renderer2.copy();
|
|
2301
|
+
$$render_inner($$inner_renderer);
|
|
2302
|
+
} while (!$$settled);
|
|
2303
|
+
$$renderer2.subsume($$inner_renderer);
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
function isFunction(value) {
|
|
2307
|
+
return typeof value === "function";
|
|
2308
|
+
}
|
|
2309
|
+
function isObject(value) {
|
|
2310
|
+
return value !== null && typeof value === "object";
|
|
2311
|
+
}
|
|
2312
|
+
const CLASS_VALUE_PRIMITIVE_TYPES = ["string", "number", "bigint", "boolean"];
|
|
2313
|
+
function isClassValue(value) {
|
|
2314
|
+
if (value === null || value === void 0)
|
|
2315
|
+
return true;
|
|
2316
|
+
if (CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value))
|
|
2317
|
+
return true;
|
|
2318
|
+
if (Array.isArray(value))
|
|
2319
|
+
return value.every((item) => isClassValue(item));
|
|
2320
|
+
if (typeof value === "object") {
|
|
2321
|
+
if (Object.getPrototypeOf(value) !== Object.prototype)
|
|
2322
|
+
return false;
|
|
2323
|
+
return true;
|
|
2324
|
+
}
|
|
2325
|
+
return false;
|
|
2326
|
+
}
|
|
2327
|
+
const BoxSymbol = /* @__PURE__ */ Symbol("box");
|
|
2328
|
+
const isWritableSymbol = /* @__PURE__ */ Symbol("is-writable");
|
|
2329
|
+
function isBox(value) {
|
|
2330
|
+
return isObject(value) && BoxSymbol in value;
|
|
2331
|
+
}
|
|
2332
|
+
function isWritableBox(value) {
|
|
2333
|
+
return box.isBox(value) && isWritableSymbol in value;
|
|
2334
|
+
}
|
|
2335
|
+
function box(initialValue) {
|
|
2336
|
+
let current = initialValue;
|
|
2337
|
+
return {
|
|
2338
|
+
[BoxSymbol]: true,
|
|
2339
|
+
[isWritableSymbol]: true,
|
|
2340
|
+
get current() {
|
|
2341
|
+
return current;
|
|
2342
|
+
},
|
|
2343
|
+
set current(v) {
|
|
2344
|
+
current = v;
|
|
2345
|
+
}
|
|
2346
|
+
};
|
|
2347
|
+
}
|
|
2348
|
+
function boxWith(getter, setter) {
|
|
2349
|
+
const derived$1 = derived(getter);
|
|
2350
|
+
if (setter) {
|
|
2351
|
+
return {
|
|
2352
|
+
[BoxSymbol]: true,
|
|
2353
|
+
[isWritableSymbol]: true,
|
|
2354
|
+
get current() {
|
|
2355
|
+
return derived$1();
|
|
2356
|
+
},
|
|
2357
|
+
set current(v) {
|
|
2358
|
+
setter(v);
|
|
2359
|
+
}
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2362
|
+
return {
|
|
2363
|
+
[BoxSymbol]: true,
|
|
2364
|
+
get current() {
|
|
2365
|
+
return getter();
|
|
2366
|
+
}
|
|
2367
|
+
};
|
|
2368
|
+
}
|
|
2369
|
+
function boxFrom(value) {
|
|
2370
|
+
if (box.isBox(value)) return value;
|
|
2371
|
+
if (isFunction(value)) return box.with(value);
|
|
2372
|
+
return box(value);
|
|
2373
|
+
}
|
|
2374
|
+
function boxFlatten(boxes) {
|
|
2375
|
+
return Object.entries(boxes).reduce(
|
|
2376
|
+
(acc, [key, b]) => {
|
|
2377
|
+
if (!box.isBox(b)) {
|
|
2378
|
+
return Object.assign(acc, { [key]: b });
|
|
2379
|
+
}
|
|
2380
|
+
if (box.isWritableBox(b)) {
|
|
2381
|
+
Object.defineProperty(acc, key, {
|
|
2382
|
+
get() {
|
|
2383
|
+
return b.current;
|
|
2384
|
+
},
|
|
2385
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2386
|
+
set(v) {
|
|
2387
|
+
b.current = v;
|
|
2388
|
+
}
|
|
2389
|
+
});
|
|
2390
|
+
} else {
|
|
2391
|
+
Object.defineProperty(acc, key, {
|
|
2392
|
+
get() {
|
|
2393
|
+
return b.current;
|
|
2394
|
+
}
|
|
2395
|
+
});
|
|
2396
|
+
}
|
|
2397
|
+
return acc;
|
|
2398
|
+
},
|
|
2399
|
+
{}
|
|
2400
|
+
);
|
|
2401
|
+
}
|
|
2402
|
+
function toReadonlyBox(b) {
|
|
2403
|
+
if (!box.isWritableBox(b)) return b;
|
|
2404
|
+
return {
|
|
2405
|
+
[BoxSymbol]: true,
|
|
2406
|
+
get current() {
|
|
2407
|
+
return b.current;
|
|
2408
|
+
}
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2411
|
+
box.from = boxFrom;
|
|
2412
|
+
box.with = boxWith;
|
|
2413
|
+
box.flatten = boxFlatten;
|
|
2414
|
+
box.readonly = toReadonlyBox;
|
|
2415
|
+
box.isBox = isBox;
|
|
2416
|
+
box.isWritableBox = isWritableBox;
|
|
2417
|
+
function createParser(matcher, replacer) {
|
|
2418
|
+
const regex = RegExp(matcher, "g");
|
|
2419
|
+
return (str) => {
|
|
2420
|
+
if (typeof str !== "string") {
|
|
2421
|
+
throw new TypeError(`expected an argument of type string, but got ${typeof str}`);
|
|
2422
|
+
}
|
|
2423
|
+
if (!str.match(regex))
|
|
2424
|
+
return str;
|
|
2425
|
+
return str.replace(regex, replacer);
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
const camelToKebab = createParser(/[A-Z]/, (match) => `-${match.toLowerCase()}`);
|
|
2429
|
+
function styleToCSS(styleObj) {
|
|
2430
|
+
if (!styleObj || typeof styleObj !== "object" || Array.isArray(styleObj)) {
|
|
2431
|
+
throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);
|
|
2432
|
+
}
|
|
2433
|
+
return Object.keys(styleObj).map((property) => `${camelToKebab(property)}: ${styleObj[property]};`).join("\n");
|
|
2434
|
+
}
|
|
2435
|
+
function styleToString(style = {}) {
|
|
2436
|
+
return styleToCSS(style).replace("\n", " ");
|
|
2437
|
+
}
|
|
2438
|
+
const srOnlyStyles = {
|
|
2439
|
+
position: "absolute",
|
|
2440
|
+
width: "1px",
|
|
2441
|
+
height: "1px",
|
|
2442
|
+
padding: "0",
|
|
2443
|
+
margin: "-1px",
|
|
2444
|
+
overflow: "hidden",
|
|
2445
|
+
clip: "rect(0, 0, 0, 0)",
|
|
2446
|
+
whiteSpace: "nowrap",
|
|
2447
|
+
borderWidth: "0",
|
|
2448
|
+
transform: "translateX(-100%)"
|
|
2449
|
+
};
|
|
2450
|
+
styleToString(srOnlyStyles);
|
|
2451
|
+
const EVENT_LIST = [
|
|
2452
|
+
"onabort",
|
|
2453
|
+
"onanimationcancel",
|
|
2454
|
+
"onanimationend",
|
|
2455
|
+
"onanimationiteration",
|
|
2456
|
+
"onanimationstart",
|
|
2457
|
+
"onauxclick",
|
|
2458
|
+
"onbeforeinput",
|
|
2459
|
+
"onbeforetoggle",
|
|
2460
|
+
"onblur",
|
|
2461
|
+
"oncancel",
|
|
2462
|
+
"oncanplay",
|
|
2463
|
+
"oncanplaythrough",
|
|
2464
|
+
"onchange",
|
|
2465
|
+
"onclick",
|
|
2466
|
+
"onclose",
|
|
2467
|
+
"oncompositionend",
|
|
2468
|
+
"oncompositionstart",
|
|
2469
|
+
"oncompositionupdate",
|
|
2470
|
+
"oncontextlost",
|
|
2471
|
+
"oncontextmenu",
|
|
2472
|
+
"oncontextrestored",
|
|
2473
|
+
"oncopy",
|
|
2474
|
+
"oncuechange",
|
|
2475
|
+
"oncut",
|
|
2476
|
+
"ondblclick",
|
|
2477
|
+
"ondrag",
|
|
2478
|
+
"ondragend",
|
|
2479
|
+
"ondragenter",
|
|
2480
|
+
"ondragleave",
|
|
2481
|
+
"ondragover",
|
|
2482
|
+
"ondragstart",
|
|
2483
|
+
"ondrop",
|
|
2484
|
+
"ondurationchange",
|
|
2485
|
+
"onemptied",
|
|
2486
|
+
"onended",
|
|
2487
|
+
"onerror",
|
|
2488
|
+
"onfocus",
|
|
2489
|
+
"onfocusin",
|
|
2490
|
+
"onfocusout",
|
|
2491
|
+
"onformdata",
|
|
2492
|
+
"ongotpointercapture",
|
|
2493
|
+
"oninput",
|
|
2494
|
+
"oninvalid",
|
|
2495
|
+
"onkeydown",
|
|
2496
|
+
"onkeypress",
|
|
2497
|
+
"onkeyup",
|
|
2498
|
+
"onload",
|
|
2499
|
+
"onloadeddata",
|
|
2500
|
+
"onloadedmetadata",
|
|
2501
|
+
"onloadstart",
|
|
2502
|
+
"onlostpointercapture",
|
|
2503
|
+
"onmousedown",
|
|
2504
|
+
"onmouseenter",
|
|
2505
|
+
"onmouseleave",
|
|
2506
|
+
"onmousemove",
|
|
2507
|
+
"onmouseout",
|
|
2508
|
+
"onmouseover",
|
|
2509
|
+
"onmouseup",
|
|
2510
|
+
"onpaste",
|
|
2511
|
+
"onpause",
|
|
2512
|
+
"onplay",
|
|
2513
|
+
"onplaying",
|
|
2514
|
+
"onpointercancel",
|
|
2515
|
+
"onpointerdown",
|
|
2516
|
+
"onpointerenter",
|
|
2517
|
+
"onpointerleave",
|
|
2518
|
+
"onpointermove",
|
|
2519
|
+
"onpointerout",
|
|
2520
|
+
"onpointerover",
|
|
2521
|
+
"onpointerup",
|
|
2522
|
+
"onprogress",
|
|
2523
|
+
"onratechange",
|
|
2524
|
+
"onreset",
|
|
2525
|
+
"onresize",
|
|
2526
|
+
"onscroll",
|
|
2527
|
+
"onscrollend",
|
|
2528
|
+
"onsecuritypolicyviolation",
|
|
2529
|
+
"onseeked",
|
|
2530
|
+
"onseeking",
|
|
2531
|
+
"onselect",
|
|
2532
|
+
"onselectionchange",
|
|
2533
|
+
"onselectstart",
|
|
2534
|
+
"onslotchange",
|
|
2535
|
+
"onstalled",
|
|
2536
|
+
"onsubmit",
|
|
2537
|
+
"onsuspend",
|
|
2538
|
+
"ontimeupdate",
|
|
2539
|
+
"ontoggle",
|
|
2540
|
+
"ontouchcancel",
|
|
2541
|
+
"ontouchend",
|
|
2542
|
+
"ontouchmove",
|
|
2543
|
+
"ontouchstart",
|
|
2544
|
+
"ontransitioncancel",
|
|
2545
|
+
"ontransitionend",
|
|
2546
|
+
"ontransitionrun",
|
|
2547
|
+
"ontransitionstart",
|
|
2548
|
+
"onvolumechange",
|
|
2549
|
+
"onwaiting",
|
|
2550
|
+
"onwebkitanimationend",
|
|
2551
|
+
"onwebkitanimationiteration",
|
|
2552
|
+
"onwebkitanimationstart",
|
|
2553
|
+
"onwebkittransitionend",
|
|
2554
|
+
"onwheel"
|
|
2555
|
+
];
|
|
2556
|
+
const EVENT_LIST_SET = new Set(EVENT_LIST);
|
|
2557
|
+
const defaultWindow$1 = void 0;
|
|
2558
|
+
function getActiveElement$1(document) {
|
|
2559
|
+
let activeElement = document.activeElement;
|
|
2560
|
+
while (activeElement?.shadowRoot) {
|
|
2561
|
+
const node = activeElement.shadowRoot.activeElement;
|
|
2562
|
+
if (node === activeElement)
|
|
2563
|
+
break;
|
|
2564
|
+
else
|
|
2565
|
+
activeElement = node;
|
|
2566
|
+
}
|
|
2567
|
+
return activeElement;
|
|
2568
|
+
}
|
|
2569
|
+
let ActiveElement$1 = class ActiveElement {
|
|
2570
|
+
#document;
|
|
2571
|
+
#subscribe;
|
|
2572
|
+
constructor(options = {}) {
|
|
2573
|
+
const { window: window2 = defaultWindow$1, document = window2?.document } = options;
|
|
2574
|
+
if (window2 === void 0) return;
|
|
2575
|
+
this.#document = document;
|
|
2576
|
+
this.#subscribe = createSubscriber();
|
|
2577
|
+
}
|
|
2578
|
+
get current() {
|
|
2579
|
+
this.#subscribe?.();
|
|
2580
|
+
if (!this.#document) return null;
|
|
2581
|
+
return getActiveElement$1(this.#document);
|
|
2582
|
+
}
|
|
2583
|
+
};
|
|
2584
|
+
new ActiveElement$1();
|
|
2585
|
+
const defaultWindow = void 0;
|
|
2586
|
+
function getActiveElement(document) {
|
|
2587
|
+
let activeElement = document.activeElement;
|
|
2588
|
+
while (activeElement?.shadowRoot) {
|
|
2589
|
+
const node = activeElement.shadowRoot.activeElement;
|
|
2590
|
+
if (node === activeElement)
|
|
2591
|
+
break;
|
|
2592
|
+
else
|
|
2593
|
+
activeElement = node;
|
|
2594
|
+
}
|
|
2595
|
+
return activeElement;
|
|
2596
|
+
}
|
|
2597
|
+
class ActiveElement2 {
|
|
2598
|
+
#document;
|
|
2599
|
+
#subscribe;
|
|
2600
|
+
constructor(options = {}) {
|
|
2601
|
+
const { window: window2 = defaultWindow, document = window2?.document } = options;
|
|
2602
|
+
if (window2 === void 0) return;
|
|
2603
|
+
this.#document = document;
|
|
2604
|
+
this.#subscribe = createSubscriber();
|
|
2605
|
+
}
|
|
2606
|
+
get current() {
|
|
2607
|
+
this.#subscribe?.();
|
|
2608
|
+
if (!this.#document) return null;
|
|
2609
|
+
return getActiveElement(this.#document);
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
new ActiveElement2();
|
|
2613
|
+
function runWatcher(sources, flush, effect, options = {}) {
|
|
2614
|
+
const { lazy = false } = options;
|
|
2615
|
+
}
|
|
2616
|
+
function watch(sources, effect, options) {
|
|
2617
|
+
runWatcher(sources, "post", effect, options);
|
|
2618
|
+
}
|
|
2619
|
+
function watchPre(sources, effect, options) {
|
|
2620
|
+
runWatcher(sources, "pre", effect, options);
|
|
2621
|
+
}
|
|
2622
|
+
watch.pre = watchPre;
|
|
2623
|
+
function _getDefaults() {
|
|
2624
|
+
return {
|
|
2625
|
+
async: false,
|
|
2626
|
+
breaks: false,
|
|
2627
|
+
extensions: null,
|
|
2628
|
+
gfm: true,
|
|
2629
|
+
hooks: null,
|
|
2630
|
+
pedantic: false,
|
|
2631
|
+
renderer: null,
|
|
2632
|
+
silent: false,
|
|
2633
|
+
tokenizer: null,
|
|
2634
|
+
walkTokens: null
|
|
2635
|
+
};
|
|
2636
|
+
}
|
|
2637
|
+
let _defaults = _getDefaults();
|
|
2638
|
+
function changeDefaults(newDefaults) {
|
|
2639
|
+
_defaults = newDefaults;
|
|
2640
|
+
}
|
|
2641
|
+
const noopTest = { exec: () => null };
|
|
2642
|
+
function edit(regex, opt = "") {
|
|
2643
|
+
let source = typeof regex === "string" ? regex : regex.source;
|
|
2644
|
+
const obj = {
|
|
2645
|
+
replace: (name, val) => {
|
|
2646
|
+
let valSource = typeof val === "string" ? val : val.source;
|
|
2647
|
+
valSource = valSource.replace(other.caret, "$1");
|
|
2648
|
+
source = source.replace(name, valSource);
|
|
2649
|
+
return obj;
|
|
2650
|
+
},
|
|
2651
|
+
getRegex: () => {
|
|
2652
|
+
return new RegExp(source, opt);
|
|
2653
|
+
}
|
|
2654
|
+
};
|
|
2655
|
+
return obj;
|
|
2656
|
+
}
|
|
2657
|
+
const other = {
|
|
2658
|
+
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
2659
|
+
outputLinkReplace: /\\([\[\]])/g,
|
|
2660
|
+
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
2661
|
+
beginningSpace: /^\s+/,
|
|
2662
|
+
endingHash: /#$/,
|
|
2663
|
+
startingSpaceChar: /^ /,
|
|
2664
|
+
endingSpaceChar: / $/,
|
|
2665
|
+
nonSpaceChar: /[^ ]/,
|
|
2666
|
+
newLineCharGlobal: /\n/g,
|
|
2667
|
+
tabCharGlobal: /\t/g,
|
|
2668
|
+
multipleSpaceGlobal: /\s+/g,
|
|
2669
|
+
blankLine: /^[ \t]*$/,
|
|
2670
|
+
doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
|
|
2671
|
+
blockquoteStart: /^ {0,3}>/,
|
|
2672
|
+
blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
|
|
2673
|
+
blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
|
|
2674
|
+
listReplaceTabs: /^\t+/,
|
|
2675
|
+
listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
|
|
2676
|
+
listIsTask: /^\[[ xX]\] /,
|
|
2677
|
+
listReplaceTask: /^\[[ xX]\] +/,
|
|
2678
|
+
anyLine: /\n.*\n/,
|
|
2679
|
+
hrefBrackets: /^<(.*)>$/,
|
|
2680
|
+
tableDelimiter: /[:|]/,
|
|
2681
|
+
tableAlignChars: /^\||\| *$/g,
|
|
2682
|
+
tableRowBlankLine: /\n[ \t]*$/,
|
|
2683
|
+
tableAlignRight: /^ *-+: *$/,
|
|
2684
|
+
tableAlignCenter: /^ *:-+: *$/,
|
|
2685
|
+
tableAlignLeft: /^ *:-+ *$/,
|
|
2686
|
+
startATag: /^<a /i,
|
|
2687
|
+
endATag: /^<\/a>/i,
|
|
2688
|
+
startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
|
|
2689
|
+
endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
|
|
2690
|
+
startAngleBracket: /^</,
|
|
2691
|
+
endAngleBracket: />$/,
|
|
2692
|
+
pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
|
|
2693
|
+
unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
|
|
2694
|
+
escapeTest: /[&<>"']/,
|
|
2695
|
+
escapeReplace: /[&<>"']/g,
|
|
2696
|
+
escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
|
|
2697
|
+
escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
|
|
2698
|
+
unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,
|
|
2699
|
+
caret: /(^|[^\[])\^/g,
|
|
2700
|
+
percentDecode: /%25/g,
|
|
2701
|
+
findPipe: /\|/g,
|
|
2702
|
+
splitPipe: / \|/,
|
|
2703
|
+
slashPipe: /\\\|/g,
|
|
2704
|
+
carriageReturn: /\r\n|\r/g,
|
|
2705
|
+
spaceLine: /^ +$/gm,
|
|
2706
|
+
notSpaceStart: /^\S*/,
|
|
2707
|
+
endingNewline: /\n$/,
|
|
2708
|
+
listItemRegex: (bull) => new RegExp(`^( {0,3}${bull})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
2709
|
+
nextBulletRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
2710
|
+
hrRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
|
|
2711
|
+
fencesBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`),
|
|
2712
|
+
headingBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`),
|
|
2713
|
+
htmlBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
2714
|
+
};
|
|
2715
|
+
const newline = /^(?:[ \t]*(?:\n|$))+/;
|
|
2716
|
+
const blockCode = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
2717
|
+
const fences = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
2718
|
+
const hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
2719
|
+
const heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
2720
|
+
const bullet = /(?:[*+-]|\d{1,9}[.)])/;
|
|
2721
|
+
const lheadingCore = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
2722
|
+
const lheading = edit(lheadingCore).replace(/bull/g, bullet).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
2723
|
+
const lheadingGfm = edit(lheadingCore).replace(/bull/g, bullet).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
2724
|
+
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
|
|
2725
|
+
const blockText = /^[^\n]+/;
|
|
2726
|
+
const _blockLabel = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
|
|
2727
|
+
const def = edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", _blockLabel).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
2728
|
+
const list = edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, bullet).getRegex();
|
|
2729
|
+
const _tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
2730
|
+
const _comment = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
2731
|
+
const html = edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", _comment).replace("tag", _tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
2732
|
+
const paragraph = edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
|
|
2733
|
+
const blockquote = edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", paragraph).getRegex();
|
|
2734
|
+
const blockNormal = {
|
|
2735
|
+
blockquote,
|
|
2736
|
+
code: blockCode,
|
|
2737
|
+
def,
|
|
2738
|
+
fences,
|
|
2739
|
+
heading,
|
|
2740
|
+
hr,
|
|
2741
|
+
html,
|
|
2742
|
+
lheading,
|
|
2743
|
+
list,
|
|
2744
|
+
newline,
|
|
2745
|
+
paragraph,
|
|
2746
|
+
table: noopTest,
|
|
2747
|
+
text: blockText
|
|
2748
|
+
};
|
|
2749
|
+
const gfmTable = edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
|
|
2750
|
+
const blockGfm = {
|
|
2751
|
+
...blockNormal,
|
|
2752
|
+
lheading: lheadingGfm,
|
|
2753
|
+
table: gfmTable,
|
|
2754
|
+
paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", gfmTable).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex()
|
|
2755
|
+
};
|
|
2756
|
+
const blockPedantic = {
|
|
2757
|
+
...blockNormal,
|
|
2758
|
+
html: edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", _comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
2759
|
+
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
2760
|
+
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
2761
|
+
fences: noopTest,
|
|
2762
|
+
// fences not supported
|
|
2763
|
+
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
2764
|
+
paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", lheading).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
2765
|
+
};
|
|
2766
|
+
const escape$1 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
2767
|
+
const inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
2768
|
+
const br = /^( {2,}|\\)\n(?!\s*$)/;
|
|
2769
|
+
const inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
2770
|
+
const _punctuation = /[\p{P}\p{S}]/u;
|
|
2771
|
+
const _punctuationOrSpace = /[\s\p{P}\p{S}]/u;
|
|
2772
|
+
const _notPunctuationOrSpace = /[^\s\p{P}\p{S}]/u;
|
|
2773
|
+
const punctuation = edit(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _punctuationOrSpace).getRegex();
|
|
2774
|
+
const _punctuationGfmStrongEm = /(?!~)[\p{P}\p{S}]/u;
|
|
2775
|
+
const _punctuationOrSpaceGfmStrongEm = /(?!~)[\s\p{P}\p{S}]/u;
|
|
2776
|
+
const _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
2777
|
+
const blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
|
|
2778
|
+
const emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
|
|
2779
|
+
const emStrongLDelim = edit(emStrongLDelimCore, "u").replace(/punct/g, _punctuation).getRegex();
|
|
2780
|
+
const emStrongLDelimGfm = edit(emStrongLDelimCore, "u").replace(/punct/g, _punctuationGfmStrongEm).getRegex();
|
|
2781
|
+
const emStrongRDelimAstCore = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
2782
|
+
const emStrongRDelimAst = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
|
|
2783
|
+
const emStrongRDelimAstGfm = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g, _punctuationOrSpaceGfmStrongEm).replace(/punct/g, _punctuationGfmStrongEm).getRegex();
|
|
2784
|
+
const emStrongRDelimUnd = edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
|
|
2785
|
+
const anyPunctuation = edit(/\\(punct)/, "gu").replace(/punct/g, _punctuation).getRegex();
|
|
2786
|
+
const autolink = edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
2787
|
+
const _inlineComment = edit(_comment).replace("(?:-->|$)", "-->").getRegex();
|
|
2788
|
+
const tag = edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", _inlineComment).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
2789
|
+
const _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
|
|
2790
|
+
const link = edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", _inlineLabel).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
2791
|
+
const reflink = edit(/^!?\[(label)\]\[(ref)\]/).replace("label", _inlineLabel).replace("ref", _blockLabel).getRegex();
|
|
2792
|
+
const nolink = edit(/^!?\[(ref)\](?:\[\])?/).replace("ref", _blockLabel).getRegex();
|
|
2793
|
+
const reflinkSearch = edit("reflink|nolink(?!\\()", "g").replace("reflink", reflink).replace("nolink", nolink).getRegex();
|
|
2794
|
+
const inlineNormal = {
|
|
2795
|
+
_backpedal: noopTest,
|
|
2796
|
+
// only used for GFM url
|
|
2797
|
+
anyPunctuation,
|
|
2798
|
+
autolink,
|
|
2799
|
+
blockSkip,
|
|
2800
|
+
br,
|
|
2801
|
+
code: inlineCode,
|
|
2802
|
+
del: noopTest,
|
|
2803
|
+
emStrongLDelim,
|
|
2804
|
+
emStrongRDelimAst,
|
|
2805
|
+
emStrongRDelimUnd,
|
|
2806
|
+
escape: escape$1,
|
|
2807
|
+
link,
|
|
2808
|
+
nolink,
|
|
2809
|
+
punctuation,
|
|
2810
|
+
reflink,
|
|
2811
|
+
reflinkSearch,
|
|
2812
|
+
tag,
|
|
2813
|
+
text: inlineText,
|
|
2814
|
+
url: noopTest
|
|
2815
|
+
};
|
|
2816
|
+
const inlinePedantic = {
|
|
2817
|
+
...inlineNormal,
|
|
2818
|
+
link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", _inlineLabel).getRegex(),
|
|
2819
|
+
reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _inlineLabel).getRegex()
|
|
2820
|
+
};
|
|
2821
|
+
const inlineGfm = {
|
|
2822
|
+
...inlineNormal,
|
|
2823
|
+
emStrongRDelimAst: emStrongRDelimAstGfm,
|
|
2824
|
+
emStrongLDelim: emStrongLDelimGfm,
|
|
2825
|
+
url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
2826
|
+
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
2827
|
+
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
2828
|
+
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
2829
|
+
};
|
|
2830
|
+
const inlineBreaks = {
|
|
2831
|
+
...inlineGfm,
|
|
2832
|
+
br: edit(br).replace("{2,}", "*").getRegex(),
|
|
2833
|
+
text: edit(inlineGfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
2834
|
+
};
|
|
2835
|
+
const block = {
|
|
2836
|
+
normal: blockNormal,
|
|
2837
|
+
gfm: blockGfm,
|
|
2838
|
+
pedantic: blockPedantic
|
|
2839
|
+
};
|
|
2840
|
+
const inline = {
|
|
2841
|
+
normal: inlineNormal,
|
|
2842
|
+
gfm: inlineGfm,
|
|
2843
|
+
breaks: inlineBreaks,
|
|
2844
|
+
pedantic: inlinePedantic
|
|
2845
|
+
};
|
|
2846
|
+
const escapeReplacements = {
|
|
2847
|
+
"&": "&",
|
|
2848
|
+
"<": "<",
|
|
2849
|
+
">": ">",
|
|
2850
|
+
'"': """,
|
|
2851
|
+
"'": "'"
|
|
2852
|
+
};
|
|
2853
|
+
const getEscapeReplacement = (ch) => escapeReplacements[ch];
|
|
2854
|
+
function escape(html2, encode) {
|
|
2855
|
+
if (encode) {
|
|
2856
|
+
if (other.escapeTest.test(html2)) {
|
|
2857
|
+
return html2.replace(other.escapeReplace, getEscapeReplacement);
|
|
2858
|
+
}
|
|
2859
|
+
} else {
|
|
2860
|
+
if (other.escapeTestNoEncode.test(html2)) {
|
|
2861
|
+
return html2.replace(other.escapeReplaceNoEncode, getEscapeReplacement);
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
return html2;
|
|
2865
|
+
}
|
|
2866
|
+
function cleanUrl(href) {
|
|
2867
|
+
try {
|
|
2868
|
+
href = encodeURI(href).replace(other.percentDecode, "%");
|
|
2869
|
+
} catch {
|
|
2870
|
+
return null;
|
|
2871
|
+
}
|
|
2872
|
+
return href;
|
|
2873
|
+
}
|
|
2874
|
+
function splitCells(tableRow, count) {
|
|
2875
|
+
const row = tableRow.replace(other.findPipe, (match, offset, str) => {
|
|
2876
|
+
let escaped = false;
|
|
2877
|
+
let curr = offset;
|
|
2878
|
+
while (--curr >= 0 && str[curr] === "\\")
|
|
2879
|
+
escaped = !escaped;
|
|
2880
|
+
if (escaped) {
|
|
2881
|
+
return "|";
|
|
2882
|
+
} else {
|
|
2883
|
+
return " |";
|
|
2884
|
+
}
|
|
2885
|
+
}), cells = row.split(other.splitPipe);
|
|
2886
|
+
let i = 0;
|
|
2887
|
+
if (!cells[0].trim()) {
|
|
2888
|
+
cells.shift();
|
|
2889
|
+
}
|
|
2890
|
+
if (cells.length > 0 && !cells.at(-1)?.trim()) {
|
|
2891
|
+
cells.pop();
|
|
2892
|
+
}
|
|
2893
|
+
if (count) {
|
|
2894
|
+
if (cells.length > count) {
|
|
2895
|
+
cells.splice(count);
|
|
2896
|
+
} else {
|
|
2897
|
+
while (cells.length < count)
|
|
2898
|
+
cells.push("");
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2901
|
+
for (; i < cells.length; i++) {
|
|
2902
|
+
cells[i] = cells[i].trim().replace(other.slashPipe, "|");
|
|
2903
|
+
}
|
|
2904
|
+
return cells;
|
|
2905
|
+
}
|
|
2906
|
+
function rtrim(str, c, invert) {
|
|
2907
|
+
const l = str.length;
|
|
2908
|
+
if (l === 0) {
|
|
2909
|
+
return "";
|
|
2910
|
+
}
|
|
2911
|
+
let suffLen = 0;
|
|
2912
|
+
while (suffLen < l) {
|
|
2913
|
+
const currChar = str.charAt(l - suffLen - 1);
|
|
2914
|
+
if (currChar === c && true) {
|
|
2915
|
+
suffLen++;
|
|
2916
|
+
} else {
|
|
2917
|
+
break;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
return str.slice(0, l - suffLen);
|
|
2921
|
+
}
|
|
2922
|
+
function findClosingBracket(str, b) {
|
|
2923
|
+
if (str.indexOf(b[1]) === -1) {
|
|
2924
|
+
return -1;
|
|
2925
|
+
}
|
|
2926
|
+
let level = 0;
|
|
2927
|
+
for (let i = 0; i < str.length; i++) {
|
|
2928
|
+
if (str[i] === "\\") {
|
|
2929
|
+
i++;
|
|
2930
|
+
} else if (str[i] === b[0]) {
|
|
2931
|
+
level++;
|
|
2932
|
+
} else if (str[i] === b[1]) {
|
|
2933
|
+
level--;
|
|
2934
|
+
if (level < 0) {
|
|
2935
|
+
return i;
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
return -1;
|
|
2940
|
+
}
|
|
2941
|
+
function outputLink(cap, link2, raw, lexer, rules) {
|
|
2942
|
+
const href = link2.href;
|
|
2943
|
+
const title = link2.title || null;
|
|
2944
|
+
const text = cap[1].replace(rules.other.outputLinkReplace, "$1");
|
|
2945
|
+
if (cap[0].charAt(0) !== "!") {
|
|
2946
|
+
lexer.state.inLink = true;
|
|
2947
|
+
const token = {
|
|
2948
|
+
type: "link",
|
|
2949
|
+
raw,
|
|
2950
|
+
href,
|
|
2951
|
+
title,
|
|
2952
|
+
text,
|
|
2953
|
+
tokens: lexer.inlineTokens(text)
|
|
2954
|
+
};
|
|
2955
|
+
lexer.state.inLink = false;
|
|
2956
|
+
return token;
|
|
2957
|
+
}
|
|
2958
|
+
return {
|
|
2959
|
+
type: "image",
|
|
2960
|
+
raw,
|
|
2961
|
+
href,
|
|
2962
|
+
title,
|
|
2963
|
+
text
|
|
2964
|
+
};
|
|
2965
|
+
}
|
|
2966
|
+
function indentCodeCompensation(raw, text, rules) {
|
|
2967
|
+
const matchIndentToCode = raw.match(rules.other.indentCodeCompensation);
|
|
2968
|
+
if (matchIndentToCode === null) {
|
|
2969
|
+
return text;
|
|
2970
|
+
}
|
|
2971
|
+
const indentToCode = matchIndentToCode[1];
|
|
2972
|
+
return text.split("\n").map((node) => {
|
|
2973
|
+
const matchIndentInNode = node.match(rules.other.beginningSpace);
|
|
2974
|
+
if (matchIndentInNode === null) {
|
|
2975
|
+
return node;
|
|
2976
|
+
}
|
|
2977
|
+
const [indentInNode] = matchIndentInNode;
|
|
2978
|
+
if (indentInNode.length >= indentToCode.length) {
|
|
2979
|
+
return node.slice(indentToCode.length);
|
|
2980
|
+
}
|
|
2981
|
+
return node;
|
|
2982
|
+
}).join("\n");
|
|
2983
|
+
}
|
|
2984
|
+
class _Tokenizer {
|
|
2985
|
+
options;
|
|
2986
|
+
rules;
|
|
2987
|
+
// set by the lexer
|
|
2988
|
+
lexer;
|
|
2989
|
+
// set by the lexer
|
|
2990
|
+
constructor(options) {
|
|
2991
|
+
this.options = options || _defaults;
|
|
2992
|
+
}
|
|
2993
|
+
space(src) {
|
|
2994
|
+
const cap = this.rules.block.newline.exec(src);
|
|
2995
|
+
if (cap && cap[0].length > 0) {
|
|
2996
|
+
return {
|
|
2997
|
+
type: "space",
|
|
2998
|
+
raw: cap[0]
|
|
2999
|
+
};
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
code(src) {
|
|
3003
|
+
const cap = this.rules.block.code.exec(src);
|
|
3004
|
+
if (cap) {
|
|
3005
|
+
const text = cap[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
3006
|
+
return {
|
|
3007
|
+
type: "code",
|
|
3008
|
+
raw: cap[0],
|
|
3009
|
+
codeBlockStyle: "indented",
|
|
3010
|
+
text: !this.options.pedantic ? rtrim(text, "\n") : text
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
3014
|
+
fences(src) {
|
|
3015
|
+
const cap = this.rules.block.fences.exec(src);
|
|
3016
|
+
if (cap) {
|
|
3017
|
+
const raw = cap[0];
|
|
3018
|
+
const text = indentCodeCompensation(raw, cap[3] || "", this.rules);
|
|
3019
|
+
return {
|
|
3020
|
+
type: "code",
|
|
3021
|
+
raw,
|
|
3022
|
+
lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : cap[2],
|
|
3023
|
+
text
|
|
3024
|
+
};
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
heading(src) {
|
|
3028
|
+
const cap = this.rules.block.heading.exec(src);
|
|
3029
|
+
if (cap) {
|
|
3030
|
+
let text = cap[2].trim();
|
|
3031
|
+
if (this.rules.other.endingHash.test(text)) {
|
|
3032
|
+
const trimmed = rtrim(text, "#");
|
|
3033
|
+
if (this.options.pedantic) {
|
|
3034
|
+
text = trimmed.trim();
|
|
3035
|
+
} else if (!trimmed || this.rules.other.endingSpaceChar.test(trimmed)) {
|
|
3036
|
+
text = trimmed.trim();
|
|
3037
|
+
}
|
|
3038
|
+
}
|
|
3039
|
+
return {
|
|
3040
|
+
type: "heading",
|
|
3041
|
+
raw: cap[0],
|
|
3042
|
+
depth: cap[1].length,
|
|
3043
|
+
text,
|
|
3044
|
+
tokens: this.lexer.inline(text)
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
hr(src) {
|
|
3049
|
+
const cap = this.rules.block.hr.exec(src);
|
|
3050
|
+
if (cap) {
|
|
3051
|
+
return {
|
|
3052
|
+
type: "hr",
|
|
3053
|
+
raw: rtrim(cap[0], "\n")
|
|
3054
|
+
};
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
blockquote(src) {
|
|
3058
|
+
const cap = this.rules.block.blockquote.exec(src);
|
|
3059
|
+
if (cap) {
|
|
3060
|
+
let lines = rtrim(cap[0], "\n").split("\n");
|
|
3061
|
+
let raw = "";
|
|
3062
|
+
let text = "";
|
|
3063
|
+
const tokens = [];
|
|
3064
|
+
while (lines.length > 0) {
|
|
3065
|
+
let inBlockquote = false;
|
|
3066
|
+
const currentLines = [];
|
|
3067
|
+
let i;
|
|
3068
|
+
for (i = 0; i < lines.length; i++) {
|
|
3069
|
+
if (this.rules.other.blockquoteStart.test(lines[i])) {
|
|
3070
|
+
currentLines.push(lines[i]);
|
|
3071
|
+
inBlockquote = true;
|
|
3072
|
+
} else if (!inBlockquote) {
|
|
3073
|
+
currentLines.push(lines[i]);
|
|
3074
|
+
} else {
|
|
3075
|
+
break;
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
lines = lines.slice(i);
|
|
3079
|
+
const currentRaw = currentLines.join("\n");
|
|
3080
|
+
const currentText = currentRaw.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
3081
|
+
raw = raw ? `${raw}
|
|
3082
|
+
${currentRaw}` : currentRaw;
|
|
3083
|
+
text = text ? `${text}
|
|
3084
|
+
${currentText}` : currentText;
|
|
3085
|
+
const top = this.lexer.state.top;
|
|
3086
|
+
this.lexer.state.top = true;
|
|
3087
|
+
this.lexer.blockTokens(currentText, tokens, true);
|
|
3088
|
+
this.lexer.state.top = top;
|
|
3089
|
+
if (lines.length === 0) {
|
|
3090
|
+
break;
|
|
3091
|
+
}
|
|
3092
|
+
const lastToken = tokens.at(-1);
|
|
3093
|
+
if (lastToken?.type === "code") {
|
|
3094
|
+
break;
|
|
3095
|
+
} else if (lastToken?.type === "blockquote") {
|
|
3096
|
+
const oldToken = lastToken;
|
|
3097
|
+
const newText = oldToken.raw + "\n" + lines.join("\n");
|
|
3098
|
+
const newToken = this.blockquote(newText);
|
|
3099
|
+
tokens[tokens.length - 1] = newToken;
|
|
3100
|
+
raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
|
|
3101
|
+
text = text.substring(0, text.length - oldToken.text.length) + newToken.text;
|
|
3102
|
+
break;
|
|
3103
|
+
} else if (lastToken?.type === "list") {
|
|
3104
|
+
const oldToken = lastToken;
|
|
3105
|
+
const newText = oldToken.raw + "\n" + lines.join("\n");
|
|
3106
|
+
const newToken = this.list(newText);
|
|
3107
|
+
tokens[tokens.length - 1] = newToken;
|
|
3108
|
+
raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;
|
|
3109
|
+
text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;
|
|
3110
|
+
lines = newText.substring(tokens.at(-1).raw.length).split("\n");
|
|
3111
|
+
continue;
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
return {
|
|
3115
|
+
type: "blockquote",
|
|
3116
|
+
raw,
|
|
3117
|
+
tokens,
|
|
3118
|
+
text
|
|
3119
|
+
};
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
list(src) {
|
|
3123
|
+
let cap = this.rules.block.list.exec(src);
|
|
3124
|
+
if (cap) {
|
|
3125
|
+
let bull = cap[1].trim();
|
|
3126
|
+
const isordered = bull.length > 1;
|
|
3127
|
+
const list2 = {
|
|
3128
|
+
type: "list",
|
|
3129
|
+
raw: "",
|
|
3130
|
+
ordered: isordered,
|
|
3131
|
+
start: isordered ? +bull.slice(0, -1) : "",
|
|
3132
|
+
loose: false,
|
|
3133
|
+
items: []
|
|
3134
|
+
};
|
|
3135
|
+
bull = isordered ? `\\d{1,9}\\${bull.slice(-1)}` : `\\${bull}`;
|
|
3136
|
+
if (this.options.pedantic) {
|
|
3137
|
+
bull = isordered ? bull : "[*+-]";
|
|
3138
|
+
}
|
|
3139
|
+
const itemRegex = this.rules.other.listItemRegex(bull);
|
|
3140
|
+
let endsWithBlankLine = false;
|
|
3141
|
+
while (src) {
|
|
3142
|
+
let endEarly = false;
|
|
3143
|
+
let raw = "";
|
|
3144
|
+
let itemContents = "";
|
|
3145
|
+
if (!(cap = itemRegex.exec(src))) {
|
|
3146
|
+
break;
|
|
3147
|
+
}
|
|
3148
|
+
if (this.rules.block.hr.test(src)) {
|
|
3149
|
+
break;
|
|
3150
|
+
}
|
|
3151
|
+
raw = cap[0];
|
|
3152
|
+
src = src.substring(raw.length);
|
|
3153
|
+
let line = cap[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (t) => " ".repeat(3 * t.length));
|
|
3154
|
+
let nextLine = src.split("\n", 1)[0];
|
|
3155
|
+
let blankLine = !line.trim();
|
|
3156
|
+
let indent = 0;
|
|
3157
|
+
if (this.options.pedantic) {
|
|
3158
|
+
indent = 2;
|
|
3159
|
+
itemContents = line.trimStart();
|
|
3160
|
+
} else if (blankLine) {
|
|
3161
|
+
indent = cap[1].length + 1;
|
|
3162
|
+
} else {
|
|
3163
|
+
indent = cap[2].search(this.rules.other.nonSpaceChar);
|
|
3164
|
+
indent = indent > 4 ? 1 : indent;
|
|
3165
|
+
itemContents = line.slice(indent);
|
|
3166
|
+
indent += cap[1].length;
|
|
3167
|
+
}
|
|
3168
|
+
if (blankLine && this.rules.other.blankLine.test(nextLine)) {
|
|
3169
|
+
raw += nextLine + "\n";
|
|
3170
|
+
src = src.substring(nextLine.length + 1);
|
|
3171
|
+
endEarly = true;
|
|
3172
|
+
}
|
|
3173
|
+
if (!endEarly) {
|
|
3174
|
+
const nextBulletRegex = this.rules.other.nextBulletRegex(indent);
|
|
3175
|
+
const hrRegex = this.rules.other.hrRegex(indent);
|
|
3176
|
+
const fencesBeginRegex = this.rules.other.fencesBeginRegex(indent);
|
|
3177
|
+
const headingBeginRegex = this.rules.other.headingBeginRegex(indent);
|
|
3178
|
+
const htmlBeginRegex = this.rules.other.htmlBeginRegex(indent);
|
|
3179
|
+
while (src) {
|
|
3180
|
+
const rawLine = src.split("\n", 1)[0];
|
|
3181
|
+
let nextLineWithoutTabs;
|
|
3182
|
+
nextLine = rawLine;
|
|
3183
|
+
if (this.options.pedantic) {
|
|
3184
|
+
nextLine = nextLine.replace(this.rules.other.listReplaceNesting, " ");
|
|
3185
|
+
nextLineWithoutTabs = nextLine;
|
|
3186
|
+
} else {
|
|
3187
|
+
nextLineWithoutTabs = nextLine.replace(this.rules.other.tabCharGlobal, " ");
|
|
3188
|
+
}
|
|
3189
|
+
if (fencesBeginRegex.test(nextLine)) {
|
|
3190
|
+
break;
|
|
3191
|
+
}
|
|
3192
|
+
if (headingBeginRegex.test(nextLine)) {
|
|
3193
|
+
break;
|
|
3194
|
+
}
|
|
3195
|
+
if (htmlBeginRegex.test(nextLine)) {
|
|
3196
|
+
break;
|
|
3197
|
+
}
|
|
3198
|
+
if (nextBulletRegex.test(nextLine)) {
|
|
3199
|
+
break;
|
|
3200
|
+
}
|
|
3201
|
+
if (hrRegex.test(nextLine)) {
|
|
3202
|
+
break;
|
|
3203
|
+
}
|
|
3204
|
+
if (nextLineWithoutTabs.search(this.rules.other.nonSpaceChar) >= indent || !nextLine.trim()) {
|
|
3205
|
+
itemContents += "\n" + nextLineWithoutTabs.slice(indent);
|
|
3206
|
+
} else {
|
|
3207
|
+
if (blankLine) {
|
|
3208
|
+
break;
|
|
3209
|
+
}
|
|
3210
|
+
if (line.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4) {
|
|
3211
|
+
break;
|
|
3212
|
+
}
|
|
3213
|
+
if (fencesBeginRegex.test(line)) {
|
|
3214
|
+
break;
|
|
3215
|
+
}
|
|
3216
|
+
if (headingBeginRegex.test(line)) {
|
|
3217
|
+
break;
|
|
3218
|
+
}
|
|
3219
|
+
if (hrRegex.test(line)) {
|
|
3220
|
+
break;
|
|
3221
|
+
}
|
|
3222
|
+
itemContents += "\n" + nextLine;
|
|
3223
|
+
}
|
|
3224
|
+
if (!blankLine && !nextLine.trim()) {
|
|
3225
|
+
blankLine = true;
|
|
3226
|
+
}
|
|
3227
|
+
raw += rawLine + "\n";
|
|
3228
|
+
src = src.substring(rawLine.length + 1);
|
|
3229
|
+
line = nextLineWithoutTabs.slice(indent);
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
if (!list2.loose) {
|
|
3233
|
+
if (endsWithBlankLine) {
|
|
3234
|
+
list2.loose = true;
|
|
3235
|
+
} else if (this.rules.other.doubleBlankLine.test(raw)) {
|
|
3236
|
+
endsWithBlankLine = true;
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
let istask = null;
|
|
3240
|
+
let ischecked;
|
|
3241
|
+
if (this.options.gfm) {
|
|
3242
|
+
istask = this.rules.other.listIsTask.exec(itemContents);
|
|
3243
|
+
if (istask) {
|
|
3244
|
+
ischecked = istask[0] !== "[ ] ";
|
|
3245
|
+
itemContents = itemContents.replace(this.rules.other.listReplaceTask, "");
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
list2.items.push({
|
|
3249
|
+
type: "list_item",
|
|
3250
|
+
raw,
|
|
3251
|
+
task: !!istask,
|
|
3252
|
+
checked: ischecked,
|
|
3253
|
+
loose: false,
|
|
3254
|
+
text: itemContents,
|
|
3255
|
+
tokens: []
|
|
3256
|
+
});
|
|
3257
|
+
list2.raw += raw;
|
|
3258
|
+
}
|
|
3259
|
+
const lastItem = list2.items.at(-1);
|
|
3260
|
+
if (lastItem) {
|
|
3261
|
+
lastItem.raw = lastItem.raw.trimEnd();
|
|
3262
|
+
lastItem.text = lastItem.text.trimEnd();
|
|
3263
|
+
} else {
|
|
3264
|
+
return;
|
|
3265
|
+
}
|
|
3266
|
+
list2.raw = list2.raw.trimEnd();
|
|
3267
|
+
for (let i = 0; i < list2.items.length; i++) {
|
|
3268
|
+
this.lexer.state.top = false;
|
|
3269
|
+
list2.items[i].tokens = this.lexer.blockTokens(list2.items[i].text, []);
|
|
3270
|
+
if (!list2.loose) {
|
|
3271
|
+
const spacers = list2.items[i].tokens.filter((t) => t.type === "space");
|
|
3272
|
+
const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t) => this.rules.other.anyLine.test(t.raw));
|
|
3273
|
+
list2.loose = hasMultipleLineBreaks;
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
if (list2.loose) {
|
|
3277
|
+
for (let i = 0; i < list2.items.length; i++) {
|
|
3278
|
+
list2.items[i].loose = true;
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
return list2;
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
html(src) {
|
|
3285
|
+
const cap = this.rules.block.html.exec(src);
|
|
3286
|
+
if (cap) {
|
|
3287
|
+
const token = {
|
|
3288
|
+
type: "html",
|
|
3289
|
+
block: true,
|
|
3290
|
+
raw: cap[0],
|
|
3291
|
+
pre: cap[1] === "pre" || cap[1] === "script" || cap[1] === "style",
|
|
3292
|
+
text: cap[0]
|
|
3293
|
+
};
|
|
3294
|
+
return token;
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
def(src) {
|
|
3298
|
+
const cap = this.rules.block.def.exec(src);
|
|
3299
|
+
if (cap) {
|
|
3300
|
+
const tag2 = cap[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " ");
|
|
3301
|
+
const href = cap[2] ? cap[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "";
|
|
3302
|
+
const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : cap[3];
|
|
3303
|
+
return {
|
|
3304
|
+
type: "def",
|
|
3305
|
+
tag: tag2,
|
|
3306
|
+
raw: cap[0],
|
|
3307
|
+
href,
|
|
3308
|
+
title
|
|
3309
|
+
};
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
table(src) {
|
|
3313
|
+
const cap = this.rules.block.table.exec(src);
|
|
3314
|
+
if (!cap) {
|
|
3315
|
+
return;
|
|
3316
|
+
}
|
|
3317
|
+
if (!this.rules.other.tableDelimiter.test(cap[2])) {
|
|
3318
|
+
return;
|
|
3319
|
+
}
|
|
3320
|
+
const headers = splitCells(cap[1]);
|
|
3321
|
+
const aligns = cap[2].replace(this.rules.other.tableAlignChars, "").split("|");
|
|
3322
|
+
const rows = cap[3]?.trim() ? cap[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [];
|
|
3323
|
+
const item = {
|
|
3324
|
+
type: "table",
|
|
3325
|
+
raw: cap[0],
|
|
3326
|
+
header: [],
|
|
3327
|
+
align: [],
|
|
3328
|
+
rows: []
|
|
3329
|
+
};
|
|
3330
|
+
if (headers.length !== aligns.length) {
|
|
3331
|
+
return;
|
|
3332
|
+
}
|
|
3333
|
+
for (const align of aligns) {
|
|
3334
|
+
if (this.rules.other.tableAlignRight.test(align)) {
|
|
3335
|
+
item.align.push("right");
|
|
3336
|
+
} else if (this.rules.other.tableAlignCenter.test(align)) {
|
|
3337
|
+
item.align.push("center");
|
|
3338
|
+
} else if (this.rules.other.tableAlignLeft.test(align)) {
|
|
3339
|
+
item.align.push("left");
|
|
3340
|
+
} else {
|
|
3341
|
+
item.align.push(null);
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
for (let i = 0; i < headers.length; i++) {
|
|
3345
|
+
item.header.push({
|
|
3346
|
+
text: headers[i],
|
|
3347
|
+
tokens: this.lexer.inline(headers[i]),
|
|
3348
|
+
header: true,
|
|
3349
|
+
align: item.align[i]
|
|
3350
|
+
});
|
|
3351
|
+
}
|
|
3352
|
+
for (const row of rows) {
|
|
3353
|
+
item.rows.push(splitCells(row, item.header.length).map((cell, i) => {
|
|
3354
|
+
return {
|
|
3355
|
+
text: cell,
|
|
3356
|
+
tokens: this.lexer.inline(cell),
|
|
3357
|
+
header: false,
|
|
3358
|
+
align: item.align[i]
|
|
3359
|
+
};
|
|
3360
|
+
}));
|
|
3361
|
+
}
|
|
3362
|
+
return item;
|
|
3363
|
+
}
|
|
3364
|
+
lheading(src) {
|
|
3365
|
+
const cap = this.rules.block.lheading.exec(src);
|
|
3366
|
+
if (cap) {
|
|
3367
|
+
return {
|
|
3368
|
+
type: "heading",
|
|
3369
|
+
raw: cap[0],
|
|
3370
|
+
depth: cap[2].charAt(0) === "=" ? 1 : 2,
|
|
3371
|
+
text: cap[1],
|
|
3372
|
+
tokens: this.lexer.inline(cap[1])
|
|
3373
|
+
};
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
paragraph(src) {
|
|
3377
|
+
const cap = this.rules.block.paragraph.exec(src);
|
|
3378
|
+
if (cap) {
|
|
3379
|
+
const text = cap[1].charAt(cap[1].length - 1) === "\n" ? cap[1].slice(0, -1) : cap[1];
|
|
3380
|
+
return {
|
|
3381
|
+
type: "paragraph",
|
|
3382
|
+
raw: cap[0],
|
|
3383
|
+
text,
|
|
3384
|
+
tokens: this.lexer.inline(text)
|
|
3385
|
+
};
|
|
3386
|
+
}
|
|
3387
|
+
}
|
|
3388
|
+
text(src) {
|
|
3389
|
+
const cap = this.rules.block.text.exec(src);
|
|
3390
|
+
if (cap) {
|
|
3391
|
+
return {
|
|
3392
|
+
type: "text",
|
|
3393
|
+
raw: cap[0],
|
|
3394
|
+
text: cap[0],
|
|
3395
|
+
tokens: this.lexer.inline(cap[0])
|
|
3396
|
+
};
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
escape(src) {
|
|
3400
|
+
const cap = this.rules.inline.escape.exec(src);
|
|
3401
|
+
if (cap) {
|
|
3402
|
+
return {
|
|
3403
|
+
type: "escape",
|
|
3404
|
+
raw: cap[0],
|
|
3405
|
+
text: cap[1]
|
|
3406
|
+
};
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
tag(src) {
|
|
3410
|
+
const cap = this.rules.inline.tag.exec(src);
|
|
3411
|
+
if (cap) {
|
|
3412
|
+
if (!this.lexer.state.inLink && this.rules.other.startATag.test(cap[0])) {
|
|
3413
|
+
this.lexer.state.inLink = true;
|
|
3414
|
+
} else if (this.lexer.state.inLink && this.rules.other.endATag.test(cap[0])) {
|
|
3415
|
+
this.lexer.state.inLink = false;
|
|
3416
|
+
}
|
|
3417
|
+
if (!this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(cap[0])) {
|
|
3418
|
+
this.lexer.state.inRawBlock = true;
|
|
3419
|
+
} else if (this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(cap[0])) {
|
|
3420
|
+
this.lexer.state.inRawBlock = false;
|
|
3421
|
+
}
|
|
3422
|
+
return {
|
|
3423
|
+
type: "html",
|
|
3424
|
+
raw: cap[0],
|
|
3425
|
+
inLink: this.lexer.state.inLink,
|
|
3426
|
+
inRawBlock: this.lexer.state.inRawBlock,
|
|
3427
|
+
block: false,
|
|
3428
|
+
text: cap[0]
|
|
3429
|
+
};
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
link(src) {
|
|
3433
|
+
const cap = this.rules.inline.link.exec(src);
|
|
3434
|
+
if (cap) {
|
|
3435
|
+
const trimmedUrl = cap[2].trim();
|
|
3436
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(trimmedUrl)) {
|
|
3437
|
+
if (!this.rules.other.endAngleBracket.test(trimmedUrl)) {
|
|
3438
|
+
return;
|
|
3439
|
+
}
|
|
3440
|
+
const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), "\\");
|
|
3441
|
+
if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {
|
|
3442
|
+
return;
|
|
3443
|
+
}
|
|
3444
|
+
} else {
|
|
3445
|
+
const lastParenIndex = findClosingBracket(cap[2], "()");
|
|
3446
|
+
if (lastParenIndex > -1) {
|
|
3447
|
+
const start = cap[0].indexOf("!") === 0 ? 5 : 4;
|
|
3448
|
+
const linkLen = start + cap[1].length + lastParenIndex;
|
|
3449
|
+
cap[2] = cap[2].substring(0, lastParenIndex);
|
|
3450
|
+
cap[0] = cap[0].substring(0, linkLen).trim();
|
|
3451
|
+
cap[3] = "";
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
let href = cap[2];
|
|
3455
|
+
let title = "";
|
|
3456
|
+
if (this.options.pedantic) {
|
|
3457
|
+
const link2 = this.rules.other.pedanticHrefTitle.exec(href);
|
|
3458
|
+
if (link2) {
|
|
3459
|
+
href = link2[1];
|
|
3460
|
+
title = link2[3];
|
|
3461
|
+
}
|
|
3462
|
+
} else {
|
|
3463
|
+
title = cap[3] ? cap[3].slice(1, -1) : "";
|
|
3464
|
+
}
|
|
3465
|
+
href = href.trim();
|
|
3466
|
+
if (this.rules.other.startAngleBracket.test(href)) {
|
|
3467
|
+
if (this.options.pedantic && !this.rules.other.endAngleBracket.test(trimmedUrl)) {
|
|
3468
|
+
href = href.slice(1);
|
|
3469
|
+
} else {
|
|
3470
|
+
href = href.slice(1, -1);
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
return outputLink(cap, {
|
|
3474
|
+
href: href ? href.replace(this.rules.inline.anyPunctuation, "$1") : href,
|
|
3475
|
+
title: title ? title.replace(this.rules.inline.anyPunctuation, "$1") : title
|
|
3476
|
+
}, cap[0], this.lexer, this.rules);
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
reflink(src, links) {
|
|
3480
|
+
let cap;
|
|
3481
|
+
if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {
|
|
3482
|
+
const linkString = (cap[2] || cap[1]).replace(this.rules.other.multipleSpaceGlobal, " ");
|
|
3483
|
+
const link2 = links[linkString.toLowerCase()];
|
|
3484
|
+
if (!link2) {
|
|
3485
|
+
const text = cap[0].charAt(0);
|
|
3486
|
+
return {
|
|
3487
|
+
type: "text",
|
|
3488
|
+
raw: text,
|
|
3489
|
+
text
|
|
3490
|
+
};
|
|
3491
|
+
}
|
|
3492
|
+
return outputLink(cap, link2, cap[0], this.lexer, this.rules);
|
|
3493
|
+
}
|
|
3494
|
+
}
|
|
3495
|
+
emStrong(src, maskedSrc, prevChar = "") {
|
|
3496
|
+
let match = this.rules.inline.emStrongLDelim.exec(src);
|
|
3497
|
+
if (!match)
|
|
3498
|
+
return;
|
|
3499
|
+
if (match[3] && prevChar.match(this.rules.other.unicodeAlphaNumeric))
|
|
3500
|
+
return;
|
|
3501
|
+
const nextChar = match[1] || match[2] || "";
|
|
3502
|
+
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
|
3503
|
+
const lLength = [...match[0]].length - 1;
|
|
3504
|
+
let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
|
|
3505
|
+
const endReg = match[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
3506
|
+
endReg.lastIndex = 0;
|
|
3507
|
+
maskedSrc = maskedSrc.slice(-1 * src.length + lLength);
|
|
3508
|
+
while ((match = endReg.exec(maskedSrc)) != null) {
|
|
3509
|
+
rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
|
|
3510
|
+
if (!rDelim)
|
|
3511
|
+
continue;
|
|
3512
|
+
rLength = [...rDelim].length;
|
|
3513
|
+
if (match[3] || match[4]) {
|
|
3514
|
+
delimTotal += rLength;
|
|
3515
|
+
continue;
|
|
3516
|
+
} else if (match[5] || match[6]) {
|
|
3517
|
+
if (lLength % 3 && !((lLength + rLength) % 3)) {
|
|
3518
|
+
midDelimTotal += rLength;
|
|
3519
|
+
continue;
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
delimTotal -= rLength;
|
|
3523
|
+
if (delimTotal > 0)
|
|
3524
|
+
continue;
|
|
3525
|
+
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
|
3526
|
+
const lastCharLength = [...match[0]][0].length;
|
|
3527
|
+
const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);
|
|
3528
|
+
if (Math.min(lLength, rLength) % 2) {
|
|
3529
|
+
const text2 = raw.slice(1, -1);
|
|
3530
|
+
return {
|
|
3531
|
+
type: "em",
|
|
3532
|
+
raw,
|
|
3533
|
+
text: text2,
|
|
3534
|
+
tokens: this.lexer.inlineTokens(text2)
|
|
3535
|
+
};
|
|
3536
|
+
}
|
|
3537
|
+
const text = raw.slice(2, -2);
|
|
3538
|
+
return {
|
|
3539
|
+
type: "strong",
|
|
3540
|
+
raw,
|
|
3541
|
+
text,
|
|
3542
|
+
tokens: this.lexer.inlineTokens(text)
|
|
3543
|
+
};
|
|
3544
|
+
}
|
|
3545
|
+
}
|
|
3546
|
+
}
|
|
3547
|
+
codespan(src) {
|
|
3548
|
+
const cap = this.rules.inline.code.exec(src);
|
|
3549
|
+
if (cap) {
|
|
3550
|
+
let text = cap[2].replace(this.rules.other.newLineCharGlobal, " ");
|
|
3551
|
+
const hasNonSpaceChars = this.rules.other.nonSpaceChar.test(text);
|
|
3552
|
+
const hasSpaceCharsOnBothEnds = this.rules.other.startingSpaceChar.test(text) && this.rules.other.endingSpaceChar.test(text);
|
|
3553
|
+
if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
|
|
3554
|
+
text = text.substring(1, text.length - 1);
|
|
3555
|
+
}
|
|
3556
|
+
return {
|
|
3557
|
+
type: "codespan",
|
|
3558
|
+
raw: cap[0],
|
|
3559
|
+
text
|
|
3560
|
+
};
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
br(src) {
|
|
3564
|
+
const cap = this.rules.inline.br.exec(src);
|
|
3565
|
+
if (cap) {
|
|
3566
|
+
return {
|
|
3567
|
+
type: "br",
|
|
3568
|
+
raw: cap[0]
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
del(src) {
|
|
3573
|
+
const cap = this.rules.inline.del.exec(src);
|
|
3574
|
+
if (cap) {
|
|
3575
|
+
return {
|
|
3576
|
+
type: "del",
|
|
3577
|
+
raw: cap[0],
|
|
3578
|
+
text: cap[2],
|
|
3579
|
+
tokens: this.lexer.inlineTokens(cap[2])
|
|
3580
|
+
};
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
autolink(src) {
|
|
3584
|
+
const cap = this.rules.inline.autolink.exec(src);
|
|
3585
|
+
if (cap) {
|
|
3586
|
+
let text, href;
|
|
3587
|
+
if (cap[2] === "@") {
|
|
3588
|
+
text = cap[1];
|
|
3589
|
+
href = "mailto:" + text;
|
|
3590
|
+
} else {
|
|
3591
|
+
text = cap[1];
|
|
3592
|
+
href = text;
|
|
3593
|
+
}
|
|
3594
|
+
return {
|
|
3595
|
+
type: "link",
|
|
3596
|
+
raw: cap[0],
|
|
3597
|
+
text,
|
|
3598
|
+
href,
|
|
3599
|
+
tokens: [
|
|
3600
|
+
{
|
|
3601
|
+
type: "text",
|
|
3602
|
+
raw: text,
|
|
3603
|
+
text
|
|
3604
|
+
}
|
|
3605
|
+
]
|
|
3606
|
+
};
|
|
3607
|
+
}
|
|
3608
|
+
}
|
|
3609
|
+
url(src) {
|
|
3610
|
+
let cap;
|
|
3611
|
+
if (cap = this.rules.inline.url.exec(src)) {
|
|
3612
|
+
let text, href;
|
|
3613
|
+
if (cap[2] === "@") {
|
|
3614
|
+
text = cap[0];
|
|
3615
|
+
href = "mailto:" + text;
|
|
3616
|
+
} else {
|
|
3617
|
+
let prevCapZero;
|
|
3618
|
+
do {
|
|
3619
|
+
prevCapZero = cap[0];
|
|
3620
|
+
cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? "";
|
|
3621
|
+
} while (prevCapZero !== cap[0]);
|
|
3622
|
+
text = cap[0];
|
|
3623
|
+
if (cap[1] === "www.") {
|
|
3624
|
+
href = "http://" + cap[0];
|
|
3625
|
+
} else {
|
|
3626
|
+
href = cap[0];
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
return {
|
|
3630
|
+
type: "link",
|
|
3631
|
+
raw: cap[0],
|
|
3632
|
+
text,
|
|
3633
|
+
href,
|
|
3634
|
+
tokens: [
|
|
3635
|
+
{
|
|
3636
|
+
type: "text",
|
|
3637
|
+
raw: text,
|
|
3638
|
+
text
|
|
3639
|
+
}
|
|
3640
|
+
]
|
|
3641
|
+
};
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
inlineText(src) {
|
|
3645
|
+
const cap = this.rules.inline.text.exec(src);
|
|
3646
|
+
if (cap) {
|
|
3647
|
+
const escaped = this.lexer.state.inRawBlock;
|
|
3648
|
+
return {
|
|
3649
|
+
type: "text",
|
|
3650
|
+
raw: cap[0],
|
|
3651
|
+
text: cap[0],
|
|
3652
|
+
escaped
|
|
3653
|
+
};
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
class _Lexer {
|
|
3658
|
+
tokens;
|
|
3659
|
+
options;
|
|
3660
|
+
state;
|
|
3661
|
+
tokenizer;
|
|
3662
|
+
inlineQueue;
|
|
3663
|
+
constructor(options) {
|
|
3664
|
+
this.tokens = [];
|
|
3665
|
+
this.tokens.links = /* @__PURE__ */ Object.create(null);
|
|
3666
|
+
this.options = options || _defaults;
|
|
3667
|
+
this.options.tokenizer = this.options.tokenizer || new _Tokenizer();
|
|
3668
|
+
this.tokenizer = this.options.tokenizer;
|
|
3669
|
+
this.tokenizer.options = this.options;
|
|
3670
|
+
this.tokenizer.lexer = this;
|
|
3671
|
+
this.inlineQueue = [];
|
|
3672
|
+
this.state = {
|
|
3673
|
+
inLink: false,
|
|
3674
|
+
inRawBlock: false,
|
|
3675
|
+
top: true
|
|
3676
|
+
};
|
|
3677
|
+
const rules = {
|
|
3678
|
+
other,
|
|
3679
|
+
block: block.normal,
|
|
3680
|
+
inline: inline.normal
|
|
3681
|
+
};
|
|
3682
|
+
if (this.options.pedantic) {
|
|
3683
|
+
rules.block = block.pedantic;
|
|
3684
|
+
rules.inline = inline.pedantic;
|
|
3685
|
+
} else if (this.options.gfm) {
|
|
3686
|
+
rules.block = block.gfm;
|
|
3687
|
+
if (this.options.breaks) {
|
|
3688
|
+
rules.inline = inline.breaks;
|
|
3689
|
+
} else {
|
|
3690
|
+
rules.inline = inline.gfm;
|
|
3691
|
+
}
|
|
3692
|
+
}
|
|
3693
|
+
this.tokenizer.rules = rules;
|
|
3694
|
+
}
|
|
3695
|
+
/**
|
|
3696
|
+
* Expose Rules
|
|
3697
|
+
*/
|
|
3698
|
+
static get rules() {
|
|
3699
|
+
return {
|
|
3700
|
+
block,
|
|
3701
|
+
inline
|
|
3702
|
+
};
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* Static Lex Method
|
|
3706
|
+
*/
|
|
3707
|
+
static lex(src, options) {
|
|
3708
|
+
const lexer = new _Lexer(options);
|
|
3709
|
+
return lexer.lex(src);
|
|
3710
|
+
}
|
|
3711
|
+
/**
|
|
3712
|
+
* Static Lex Inline Method
|
|
3713
|
+
*/
|
|
3714
|
+
static lexInline(src, options) {
|
|
3715
|
+
const lexer = new _Lexer(options);
|
|
3716
|
+
return lexer.inlineTokens(src);
|
|
3717
|
+
}
|
|
3718
|
+
/**
|
|
3719
|
+
* Preprocessing
|
|
3720
|
+
*/
|
|
3721
|
+
lex(src) {
|
|
3722
|
+
src = src.replace(other.carriageReturn, "\n");
|
|
3723
|
+
this.blockTokens(src, this.tokens);
|
|
3724
|
+
for (let i = 0; i < this.inlineQueue.length; i++) {
|
|
3725
|
+
const next = this.inlineQueue[i];
|
|
3726
|
+
this.inlineTokens(next.src, next.tokens);
|
|
3727
|
+
}
|
|
3728
|
+
this.inlineQueue = [];
|
|
3729
|
+
return this.tokens;
|
|
3730
|
+
}
|
|
3731
|
+
blockTokens(src, tokens = [], lastParagraphClipped = false) {
|
|
3732
|
+
if (this.options.pedantic) {
|
|
3733
|
+
src = src.replace(other.tabCharGlobal, " ").replace(other.spaceLine, "");
|
|
3734
|
+
}
|
|
3735
|
+
while (src) {
|
|
3736
|
+
let token;
|
|
3737
|
+
if (this.options.extensions?.block?.some((extTokenizer) => {
|
|
3738
|
+
if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
|
|
3739
|
+
src = src.substring(token.raw.length);
|
|
3740
|
+
tokens.push(token);
|
|
3741
|
+
return true;
|
|
3742
|
+
}
|
|
3743
|
+
return false;
|
|
3744
|
+
})) {
|
|
3745
|
+
continue;
|
|
3746
|
+
}
|
|
3747
|
+
if (token = this.tokenizer.space(src)) {
|
|
3748
|
+
src = src.substring(token.raw.length);
|
|
3749
|
+
const lastToken = tokens.at(-1);
|
|
3750
|
+
if (token.raw.length === 1 && lastToken !== void 0) {
|
|
3751
|
+
lastToken.raw += "\n";
|
|
3752
|
+
} else {
|
|
3753
|
+
tokens.push(token);
|
|
3754
|
+
}
|
|
3755
|
+
continue;
|
|
3756
|
+
}
|
|
3757
|
+
if (token = this.tokenizer.code(src)) {
|
|
3758
|
+
src = src.substring(token.raw.length);
|
|
3759
|
+
const lastToken = tokens.at(-1);
|
|
3760
|
+
if (lastToken?.type === "paragraph" || lastToken?.type === "text") {
|
|
3761
|
+
lastToken.raw += "\n" + token.raw;
|
|
3762
|
+
lastToken.text += "\n" + token.text;
|
|
3763
|
+
this.inlineQueue.at(-1).src = lastToken.text;
|
|
3764
|
+
} else {
|
|
3765
|
+
tokens.push(token);
|
|
3766
|
+
}
|
|
3767
|
+
continue;
|
|
3768
|
+
}
|
|
3769
|
+
if (token = this.tokenizer.fences(src)) {
|
|
3770
|
+
src = src.substring(token.raw.length);
|
|
3771
|
+
tokens.push(token);
|
|
3772
|
+
continue;
|
|
3773
|
+
}
|
|
3774
|
+
if (token = this.tokenizer.heading(src)) {
|
|
3775
|
+
src = src.substring(token.raw.length);
|
|
3776
|
+
tokens.push(token);
|
|
3777
|
+
continue;
|
|
3778
|
+
}
|
|
3779
|
+
if (token = this.tokenizer.hr(src)) {
|
|
3780
|
+
src = src.substring(token.raw.length);
|
|
3781
|
+
tokens.push(token);
|
|
3782
|
+
continue;
|
|
3783
|
+
}
|
|
3784
|
+
if (token = this.tokenizer.blockquote(src)) {
|
|
3785
|
+
src = src.substring(token.raw.length);
|
|
3786
|
+
tokens.push(token);
|
|
3787
|
+
continue;
|
|
3788
|
+
}
|
|
3789
|
+
if (token = this.tokenizer.list(src)) {
|
|
3790
|
+
src = src.substring(token.raw.length);
|
|
3791
|
+
tokens.push(token);
|
|
3792
|
+
continue;
|
|
3793
|
+
}
|
|
3794
|
+
if (token = this.tokenizer.html(src)) {
|
|
3795
|
+
src = src.substring(token.raw.length);
|
|
3796
|
+
tokens.push(token);
|
|
3797
|
+
continue;
|
|
3798
|
+
}
|
|
3799
|
+
if (token = this.tokenizer.def(src)) {
|
|
3800
|
+
src = src.substring(token.raw.length);
|
|
3801
|
+
const lastToken = tokens.at(-1);
|
|
3802
|
+
if (lastToken?.type === "paragraph" || lastToken?.type === "text") {
|
|
3803
|
+
lastToken.raw += "\n" + token.raw;
|
|
3804
|
+
lastToken.text += "\n" + token.raw;
|
|
3805
|
+
this.inlineQueue.at(-1).src = lastToken.text;
|
|
3806
|
+
} else if (!this.tokens.links[token.tag]) {
|
|
3807
|
+
this.tokens.links[token.tag] = {
|
|
3808
|
+
href: token.href,
|
|
3809
|
+
title: token.title
|
|
3810
|
+
};
|
|
3811
|
+
}
|
|
3812
|
+
continue;
|
|
3813
|
+
}
|
|
3814
|
+
if (token = this.tokenizer.table(src)) {
|
|
3815
|
+
src = src.substring(token.raw.length);
|
|
3816
|
+
tokens.push(token);
|
|
3817
|
+
continue;
|
|
3818
|
+
}
|
|
3819
|
+
if (token = this.tokenizer.lheading(src)) {
|
|
3820
|
+
src = src.substring(token.raw.length);
|
|
3821
|
+
tokens.push(token);
|
|
3822
|
+
continue;
|
|
3823
|
+
}
|
|
3824
|
+
let cutSrc = src;
|
|
3825
|
+
if (this.options.extensions?.startBlock) {
|
|
3826
|
+
let startIndex = Infinity;
|
|
3827
|
+
const tempSrc = src.slice(1);
|
|
3828
|
+
let tempStart;
|
|
3829
|
+
this.options.extensions.startBlock.forEach((getStartIndex) => {
|
|
3830
|
+
tempStart = getStartIndex.call({ lexer: this }, tempSrc);
|
|
3831
|
+
if (typeof tempStart === "number" && tempStart >= 0) {
|
|
3832
|
+
startIndex = Math.min(startIndex, tempStart);
|
|
3833
|
+
}
|
|
3834
|
+
});
|
|
3835
|
+
if (startIndex < Infinity && startIndex >= 0) {
|
|
3836
|
+
cutSrc = src.substring(0, startIndex + 1);
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3839
|
+
if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
|
|
3840
|
+
const lastToken = tokens.at(-1);
|
|
3841
|
+
if (lastParagraphClipped && lastToken?.type === "paragraph") {
|
|
3842
|
+
lastToken.raw += "\n" + token.raw;
|
|
3843
|
+
lastToken.text += "\n" + token.text;
|
|
3844
|
+
this.inlineQueue.pop();
|
|
3845
|
+
this.inlineQueue.at(-1).src = lastToken.text;
|
|
3846
|
+
} else {
|
|
3847
|
+
tokens.push(token);
|
|
3848
|
+
}
|
|
3849
|
+
lastParagraphClipped = cutSrc.length !== src.length;
|
|
3850
|
+
src = src.substring(token.raw.length);
|
|
3851
|
+
continue;
|
|
3852
|
+
}
|
|
3853
|
+
if (token = this.tokenizer.text(src)) {
|
|
3854
|
+
src = src.substring(token.raw.length);
|
|
3855
|
+
const lastToken = tokens.at(-1);
|
|
3856
|
+
if (lastToken?.type === "text") {
|
|
3857
|
+
lastToken.raw += "\n" + token.raw;
|
|
3858
|
+
lastToken.text += "\n" + token.text;
|
|
3859
|
+
this.inlineQueue.pop();
|
|
3860
|
+
this.inlineQueue.at(-1).src = lastToken.text;
|
|
3861
|
+
} else {
|
|
3862
|
+
tokens.push(token);
|
|
3863
|
+
}
|
|
3864
|
+
continue;
|
|
3865
|
+
}
|
|
3866
|
+
if (src) {
|
|
3867
|
+
const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
|
|
3868
|
+
if (this.options.silent) {
|
|
3869
|
+
console.error(errMsg);
|
|
3870
|
+
break;
|
|
3871
|
+
} else {
|
|
3872
|
+
throw new Error(errMsg);
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
}
|
|
3876
|
+
this.state.top = true;
|
|
3877
|
+
return tokens;
|
|
3878
|
+
}
|
|
3879
|
+
inline(src, tokens = []) {
|
|
3880
|
+
this.inlineQueue.push({ src, tokens });
|
|
3881
|
+
return tokens;
|
|
3882
|
+
}
|
|
3883
|
+
/**
|
|
3884
|
+
* Lexing/Compiling
|
|
3885
|
+
*/
|
|
3886
|
+
inlineTokens(src, tokens = []) {
|
|
3887
|
+
let maskedSrc = src;
|
|
3888
|
+
let match = null;
|
|
3889
|
+
if (this.tokens.links) {
|
|
3890
|
+
const links = Object.keys(this.tokens.links);
|
|
3891
|
+
if (links.length > 0) {
|
|
3892
|
+
while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
|
|
3893
|
+
if (links.includes(match[0].slice(match[0].lastIndexOf("[") + 1, -1))) {
|
|
3894
|
+
maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
|
|
3900
|
+
maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
3901
|
+
}
|
|
3902
|
+
while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
|
|
3903
|
+
maskedSrc = maskedSrc.slice(0, match.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
3904
|
+
}
|
|
3905
|
+
let keepPrevChar = false;
|
|
3906
|
+
let prevChar = "";
|
|
3907
|
+
while (src) {
|
|
3908
|
+
if (!keepPrevChar) {
|
|
3909
|
+
prevChar = "";
|
|
3910
|
+
}
|
|
3911
|
+
keepPrevChar = false;
|
|
3912
|
+
let token;
|
|
3913
|
+
if (this.options.extensions?.inline?.some((extTokenizer) => {
|
|
3914
|
+
if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
|
|
3915
|
+
src = src.substring(token.raw.length);
|
|
3916
|
+
tokens.push(token);
|
|
3917
|
+
return true;
|
|
3918
|
+
}
|
|
3919
|
+
return false;
|
|
3920
|
+
})) {
|
|
3921
|
+
continue;
|
|
3922
|
+
}
|
|
3923
|
+
if (token = this.tokenizer.escape(src)) {
|
|
3924
|
+
src = src.substring(token.raw.length);
|
|
3925
|
+
tokens.push(token);
|
|
3926
|
+
continue;
|
|
3927
|
+
}
|
|
3928
|
+
if (token = this.tokenizer.tag(src)) {
|
|
3929
|
+
src = src.substring(token.raw.length);
|
|
3930
|
+
tokens.push(token);
|
|
3931
|
+
continue;
|
|
3932
|
+
}
|
|
3933
|
+
if (token = this.tokenizer.link(src)) {
|
|
3934
|
+
src = src.substring(token.raw.length);
|
|
3935
|
+
tokens.push(token);
|
|
3936
|
+
continue;
|
|
3937
|
+
}
|
|
3938
|
+
if (token = this.tokenizer.reflink(src, this.tokens.links)) {
|
|
3939
|
+
src = src.substring(token.raw.length);
|
|
3940
|
+
const lastToken = tokens.at(-1);
|
|
3941
|
+
if (token.type === "text" && lastToken?.type === "text") {
|
|
3942
|
+
lastToken.raw += token.raw;
|
|
3943
|
+
lastToken.text += token.text;
|
|
3944
|
+
} else {
|
|
3945
|
+
tokens.push(token);
|
|
3946
|
+
}
|
|
3947
|
+
continue;
|
|
3948
|
+
}
|
|
3949
|
+
if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {
|
|
3950
|
+
src = src.substring(token.raw.length);
|
|
3951
|
+
tokens.push(token);
|
|
3952
|
+
continue;
|
|
3953
|
+
}
|
|
3954
|
+
if (token = this.tokenizer.codespan(src)) {
|
|
3955
|
+
src = src.substring(token.raw.length);
|
|
3956
|
+
tokens.push(token);
|
|
3957
|
+
continue;
|
|
3958
|
+
}
|
|
3959
|
+
if (token = this.tokenizer.br(src)) {
|
|
3960
|
+
src = src.substring(token.raw.length);
|
|
3961
|
+
tokens.push(token);
|
|
3962
|
+
continue;
|
|
3963
|
+
}
|
|
3964
|
+
if (token = this.tokenizer.del(src)) {
|
|
3965
|
+
src = src.substring(token.raw.length);
|
|
3966
|
+
tokens.push(token);
|
|
3967
|
+
continue;
|
|
3968
|
+
}
|
|
3969
|
+
if (token = this.tokenizer.autolink(src)) {
|
|
3970
|
+
src = src.substring(token.raw.length);
|
|
3971
|
+
tokens.push(token);
|
|
3972
|
+
continue;
|
|
3973
|
+
}
|
|
3974
|
+
if (!this.state.inLink && (token = this.tokenizer.url(src))) {
|
|
3975
|
+
src = src.substring(token.raw.length);
|
|
3976
|
+
tokens.push(token);
|
|
3977
|
+
continue;
|
|
3978
|
+
}
|
|
3979
|
+
let cutSrc = src;
|
|
3980
|
+
if (this.options.extensions?.startInline) {
|
|
3981
|
+
let startIndex = Infinity;
|
|
3982
|
+
const tempSrc = src.slice(1);
|
|
3983
|
+
let tempStart;
|
|
3984
|
+
this.options.extensions.startInline.forEach((getStartIndex) => {
|
|
3985
|
+
tempStart = getStartIndex.call({ lexer: this }, tempSrc);
|
|
3986
|
+
if (typeof tempStart === "number" && tempStart >= 0) {
|
|
3987
|
+
startIndex = Math.min(startIndex, tempStart);
|
|
3988
|
+
}
|
|
3989
|
+
});
|
|
3990
|
+
if (startIndex < Infinity && startIndex >= 0) {
|
|
3991
|
+
cutSrc = src.substring(0, startIndex + 1);
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
if (token = this.tokenizer.inlineText(cutSrc)) {
|
|
3995
|
+
src = src.substring(token.raw.length);
|
|
3996
|
+
if (token.raw.slice(-1) !== "_") {
|
|
3997
|
+
prevChar = token.raw.slice(-1);
|
|
3998
|
+
}
|
|
3999
|
+
keepPrevChar = true;
|
|
4000
|
+
const lastToken = tokens.at(-1);
|
|
4001
|
+
if (lastToken?.type === "text") {
|
|
4002
|
+
lastToken.raw += token.raw;
|
|
4003
|
+
lastToken.text += token.text;
|
|
4004
|
+
} else {
|
|
4005
|
+
tokens.push(token);
|
|
4006
|
+
}
|
|
4007
|
+
continue;
|
|
4008
|
+
}
|
|
4009
|
+
if (src) {
|
|
4010
|
+
const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
|
|
4011
|
+
if (this.options.silent) {
|
|
4012
|
+
console.error(errMsg);
|
|
4013
|
+
break;
|
|
4014
|
+
} else {
|
|
4015
|
+
throw new Error(errMsg);
|
|
4016
|
+
}
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
return tokens;
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
class _Renderer {
|
|
4023
|
+
options;
|
|
4024
|
+
parser;
|
|
4025
|
+
// set by the parser
|
|
4026
|
+
constructor(options) {
|
|
4027
|
+
this.options = options || _defaults;
|
|
4028
|
+
}
|
|
4029
|
+
space(token) {
|
|
4030
|
+
return "";
|
|
4031
|
+
}
|
|
4032
|
+
code({ text, lang, escaped }) {
|
|
4033
|
+
const langString = (lang || "").match(other.notSpaceStart)?.[0];
|
|
4034
|
+
const code = text.replace(other.endingNewline, "") + "\n";
|
|
4035
|
+
if (!langString) {
|
|
4036
|
+
return "<pre><code>" + (escaped ? code : escape(code, true)) + "</code></pre>\n";
|
|
4037
|
+
}
|
|
4038
|
+
return '<pre><code class="language-' + escape(langString) + '">' + (escaped ? code : escape(code, true)) + "</code></pre>\n";
|
|
4039
|
+
}
|
|
4040
|
+
blockquote({ tokens }) {
|
|
4041
|
+
const body = this.parser.parse(tokens);
|
|
4042
|
+
return `<blockquote>
|
|
4043
|
+
${body}</blockquote>
|
|
4044
|
+
`;
|
|
4045
|
+
}
|
|
4046
|
+
html({ text }) {
|
|
4047
|
+
return text;
|
|
4048
|
+
}
|
|
4049
|
+
heading({ tokens, depth }) {
|
|
4050
|
+
return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>
|
|
4051
|
+
`;
|
|
4052
|
+
}
|
|
4053
|
+
hr(token) {
|
|
4054
|
+
return "<hr>\n";
|
|
4055
|
+
}
|
|
4056
|
+
list(token) {
|
|
4057
|
+
const ordered = token.ordered;
|
|
4058
|
+
const start = token.start;
|
|
4059
|
+
let body = "";
|
|
4060
|
+
for (let j = 0; j < token.items.length; j++) {
|
|
4061
|
+
const item = token.items[j];
|
|
4062
|
+
body += this.listitem(item);
|
|
4063
|
+
}
|
|
4064
|
+
const type = ordered ? "ol" : "ul";
|
|
4065
|
+
const startAttr = ordered && start !== 1 ? ' start="' + start + '"' : "";
|
|
4066
|
+
return "<" + type + startAttr + ">\n" + body + "</" + type + ">\n";
|
|
4067
|
+
}
|
|
4068
|
+
listitem(item) {
|
|
4069
|
+
let itemBody = "";
|
|
4070
|
+
if (item.task) {
|
|
4071
|
+
const checkbox = this.checkbox({ checked: !!item.checked });
|
|
4072
|
+
if (item.loose) {
|
|
4073
|
+
if (item.tokens[0]?.type === "paragraph") {
|
|
4074
|
+
item.tokens[0].text = checkbox + " " + item.tokens[0].text;
|
|
4075
|
+
if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
|
|
4076
|
+
item.tokens[0].tokens[0].text = checkbox + " " + escape(item.tokens[0].tokens[0].text);
|
|
4077
|
+
item.tokens[0].tokens[0].escaped = true;
|
|
4078
|
+
}
|
|
4079
|
+
} else {
|
|
4080
|
+
item.tokens.unshift({
|
|
4081
|
+
type: "text",
|
|
4082
|
+
raw: checkbox + " ",
|
|
4083
|
+
text: checkbox + " ",
|
|
4084
|
+
escaped: true
|
|
4085
|
+
});
|
|
4086
|
+
}
|
|
4087
|
+
} else {
|
|
4088
|
+
itemBody += checkbox + " ";
|
|
4089
|
+
}
|
|
4090
|
+
}
|
|
4091
|
+
itemBody += this.parser.parse(item.tokens, !!item.loose);
|
|
4092
|
+
return `<li>${itemBody}</li>
|
|
4093
|
+
`;
|
|
4094
|
+
}
|
|
4095
|
+
checkbox({ checked }) {
|
|
4096
|
+
return "<input " + (checked ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
|
|
4097
|
+
}
|
|
4098
|
+
paragraph({ tokens }) {
|
|
4099
|
+
return `<p>${this.parser.parseInline(tokens)}</p>
|
|
4100
|
+
`;
|
|
4101
|
+
}
|
|
4102
|
+
table(token) {
|
|
4103
|
+
let header = "";
|
|
4104
|
+
let cell = "";
|
|
4105
|
+
for (let j = 0; j < token.header.length; j++) {
|
|
4106
|
+
cell += this.tablecell(token.header[j]);
|
|
4107
|
+
}
|
|
4108
|
+
header += this.tablerow({ text: cell });
|
|
4109
|
+
let body = "";
|
|
4110
|
+
for (let j = 0; j < token.rows.length; j++) {
|
|
4111
|
+
const row = token.rows[j];
|
|
4112
|
+
cell = "";
|
|
4113
|
+
for (let k = 0; k < row.length; k++) {
|
|
4114
|
+
cell += this.tablecell(row[k]);
|
|
4115
|
+
}
|
|
4116
|
+
body += this.tablerow({ text: cell });
|
|
4117
|
+
}
|
|
4118
|
+
if (body)
|
|
4119
|
+
body = `<tbody>${body}</tbody>`;
|
|
4120
|
+
return "<table>\n<thead>\n" + header + "</thead>\n" + body + "</table>\n";
|
|
4121
|
+
}
|
|
4122
|
+
tablerow({ text }) {
|
|
4123
|
+
return `<tr>
|
|
4124
|
+
${text}</tr>
|
|
4125
|
+
`;
|
|
4126
|
+
}
|
|
4127
|
+
tablecell(token) {
|
|
4128
|
+
const content = this.parser.parseInline(token.tokens);
|
|
4129
|
+
const type = token.header ? "th" : "td";
|
|
4130
|
+
const tag2 = token.align ? `<${type} align="${token.align}">` : `<${type}>`;
|
|
4131
|
+
return tag2 + content + `</${type}>
|
|
4132
|
+
`;
|
|
4133
|
+
}
|
|
4134
|
+
/**
|
|
4135
|
+
* span level renderer
|
|
4136
|
+
*/
|
|
4137
|
+
strong({ tokens }) {
|
|
4138
|
+
return `<strong>${this.parser.parseInline(tokens)}</strong>`;
|
|
4139
|
+
}
|
|
4140
|
+
em({ tokens }) {
|
|
4141
|
+
return `<em>${this.parser.parseInline(tokens)}</em>`;
|
|
4142
|
+
}
|
|
4143
|
+
codespan({ text }) {
|
|
4144
|
+
return `<code>${escape(text, true)}</code>`;
|
|
4145
|
+
}
|
|
4146
|
+
br(token) {
|
|
4147
|
+
return "<br>";
|
|
4148
|
+
}
|
|
4149
|
+
del({ tokens }) {
|
|
4150
|
+
return `<del>${this.parser.parseInline(tokens)}</del>`;
|
|
4151
|
+
}
|
|
4152
|
+
link({ href, title, tokens }) {
|
|
4153
|
+
const text = this.parser.parseInline(tokens);
|
|
4154
|
+
const cleanHref = cleanUrl(href);
|
|
4155
|
+
if (cleanHref === null) {
|
|
4156
|
+
return text;
|
|
4157
|
+
}
|
|
4158
|
+
href = cleanHref;
|
|
4159
|
+
let out = '<a href="' + href + '"';
|
|
4160
|
+
if (title) {
|
|
4161
|
+
out += ' title="' + escape(title) + '"';
|
|
4162
|
+
}
|
|
4163
|
+
out += ">" + text + "</a>";
|
|
4164
|
+
return out;
|
|
4165
|
+
}
|
|
4166
|
+
image({ href, title, text }) {
|
|
4167
|
+
const cleanHref = cleanUrl(href);
|
|
4168
|
+
if (cleanHref === null) {
|
|
4169
|
+
return escape(text);
|
|
4170
|
+
}
|
|
4171
|
+
href = cleanHref;
|
|
4172
|
+
let out = `<img src="${href}" alt="${text}"`;
|
|
4173
|
+
if (title) {
|
|
4174
|
+
out += ` title="${escape(title)}"`;
|
|
4175
|
+
}
|
|
4176
|
+
out += ">";
|
|
4177
|
+
return out;
|
|
4178
|
+
}
|
|
4179
|
+
text(token) {
|
|
4180
|
+
return "tokens" in token && token.tokens ? this.parser.parseInline(token.tokens) : "escaped" in token && token.escaped ? token.text : escape(token.text);
|
|
4181
|
+
}
|
|
4182
|
+
}
|
|
4183
|
+
class _TextRenderer {
|
|
4184
|
+
// no need for block level renderers
|
|
4185
|
+
strong({ text }) {
|
|
4186
|
+
return text;
|
|
4187
|
+
}
|
|
4188
|
+
em({ text }) {
|
|
4189
|
+
return text;
|
|
4190
|
+
}
|
|
4191
|
+
codespan({ text }) {
|
|
4192
|
+
return text;
|
|
4193
|
+
}
|
|
4194
|
+
del({ text }) {
|
|
4195
|
+
return text;
|
|
4196
|
+
}
|
|
4197
|
+
html({ text }) {
|
|
4198
|
+
return text;
|
|
4199
|
+
}
|
|
4200
|
+
text({ text }) {
|
|
4201
|
+
return text;
|
|
4202
|
+
}
|
|
4203
|
+
link({ text }) {
|
|
4204
|
+
return "" + text;
|
|
4205
|
+
}
|
|
4206
|
+
image({ text }) {
|
|
4207
|
+
return "" + text;
|
|
4208
|
+
}
|
|
4209
|
+
br() {
|
|
4210
|
+
return "";
|
|
4211
|
+
}
|
|
4212
|
+
}
|
|
4213
|
+
class _Parser {
|
|
4214
|
+
options;
|
|
4215
|
+
renderer;
|
|
4216
|
+
textRenderer;
|
|
4217
|
+
constructor(options) {
|
|
4218
|
+
this.options = options || _defaults;
|
|
4219
|
+
this.options.renderer = this.options.renderer || new _Renderer();
|
|
4220
|
+
this.renderer = this.options.renderer;
|
|
4221
|
+
this.renderer.options = this.options;
|
|
4222
|
+
this.renderer.parser = this;
|
|
4223
|
+
this.textRenderer = new _TextRenderer();
|
|
4224
|
+
}
|
|
4225
|
+
/**
|
|
4226
|
+
* Static Parse Method
|
|
4227
|
+
*/
|
|
4228
|
+
static parse(tokens, options) {
|
|
4229
|
+
const parser = new _Parser(options);
|
|
4230
|
+
return parser.parse(tokens);
|
|
4231
|
+
}
|
|
4232
|
+
/**
|
|
4233
|
+
* Static Parse Inline Method
|
|
4234
|
+
*/
|
|
4235
|
+
static parseInline(tokens, options) {
|
|
4236
|
+
const parser = new _Parser(options);
|
|
4237
|
+
return parser.parseInline(tokens);
|
|
4238
|
+
}
|
|
4239
|
+
/**
|
|
4240
|
+
* Parse Loop
|
|
4241
|
+
*/
|
|
4242
|
+
parse(tokens, top = true) {
|
|
4243
|
+
let out = "";
|
|
4244
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
4245
|
+
const anyToken = tokens[i];
|
|
4246
|
+
if (this.options.extensions?.renderers?.[anyToken.type]) {
|
|
4247
|
+
const genericToken = anyToken;
|
|
4248
|
+
const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
|
|
4249
|
+
if (ret !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(genericToken.type)) {
|
|
4250
|
+
out += ret || "";
|
|
4251
|
+
continue;
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
const token = anyToken;
|
|
4255
|
+
switch (token.type) {
|
|
4256
|
+
case "space": {
|
|
4257
|
+
out += this.renderer.space(token);
|
|
4258
|
+
continue;
|
|
4259
|
+
}
|
|
4260
|
+
case "hr": {
|
|
4261
|
+
out += this.renderer.hr(token);
|
|
4262
|
+
continue;
|
|
4263
|
+
}
|
|
4264
|
+
case "heading": {
|
|
4265
|
+
out += this.renderer.heading(token);
|
|
4266
|
+
continue;
|
|
4267
|
+
}
|
|
4268
|
+
case "code": {
|
|
4269
|
+
out += this.renderer.code(token);
|
|
4270
|
+
continue;
|
|
4271
|
+
}
|
|
4272
|
+
case "table": {
|
|
4273
|
+
out += this.renderer.table(token);
|
|
4274
|
+
continue;
|
|
4275
|
+
}
|
|
4276
|
+
case "blockquote": {
|
|
4277
|
+
out += this.renderer.blockquote(token);
|
|
4278
|
+
continue;
|
|
4279
|
+
}
|
|
4280
|
+
case "list": {
|
|
4281
|
+
out += this.renderer.list(token);
|
|
4282
|
+
continue;
|
|
4283
|
+
}
|
|
4284
|
+
case "html": {
|
|
4285
|
+
out += this.renderer.html(token);
|
|
4286
|
+
continue;
|
|
4287
|
+
}
|
|
4288
|
+
case "paragraph": {
|
|
4289
|
+
out += this.renderer.paragraph(token);
|
|
4290
|
+
continue;
|
|
4291
|
+
}
|
|
4292
|
+
case "text": {
|
|
4293
|
+
let textToken = token;
|
|
4294
|
+
let body = this.renderer.text(textToken);
|
|
4295
|
+
while (i + 1 < tokens.length && tokens[i + 1].type === "text") {
|
|
4296
|
+
textToken = tokens[++i];
|
|
4297
|
+
body += "\n" + this.renderer.text(textToken);
|
|
4298
|
+
}
|
|
4299
|
+
if (top) {
|
|
4300
|
+
out += this.renderer.paragraph({
|
|
4301
|
+
type: "paragraph",
|
|
4302
|
+
raw: body,
|
|
4303
|
+
text: body,
|
|
4304
|
+
tokens: [{ type: "text", raw: body, text: body, escaped: true }]
|
|
4305
|
+
});
|
|
4306
|
+
} else {
|
|
4307
|
+
out += body;
|
|
4308
|
+
}
|
|
4309
|
+
continue;
|
|
4310
|
+
}
|
|
4311
|
+
default: {
|
|
4312
|
+
const errMsg = 'Token with "' + token.type + '" type was not found.';
|
|
4313
|
+
if (this.options.silent) {
|
|
4314
|
+
console.error(errMsg);
|
|
4315
|
+
return "";
|
|
4316
|
+
} else {
|
|
4317
|
+
throw new Error(errMsg);
|
|
4318
|
+
}
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
return out;
|
|
4323
|
+
}
|
|
4324
|
+
/**
|
|
4325
|
+
* Parse Inline Tokens
|
|
4326
|
+
*/
|
|
4327
|
+
parseInline(tokens, renderer = this.renderer) {
|
|
4328
|
+
let out = "";
|
|
4329
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
4330
|
+
const anyToken = tokens[i];
|
|
4331
|
+
if (this.options.extensions?.renderers?.[anyToken.type]) {
|
|
4332
|
+
const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
|
|
4333
|
+
if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
|
|
4334
|
+
out += ret || "";
|
|
4335
|
+
continue;
|
|
4336
|
+
}
|
|
4337
|
+
}
|
|
4338
|
+
const token = anyToken;
|
|
4339
|
+
switch (token.type) {
|
|
4340
|
+
case "escape": {
|
|
4341
|
+
out += renderer.text(token);
|
|
4342
|
+
break;
|
|
4343
|
+
}
|
|
4344
|
+
case "html": {
|
|
4345
|
+
out += renderer.html(token);
|
|
4346
|
+
break;
|
|
4347
|
+
}
|
|
4348
|
+
case "link": {
|
|
4349
|
+
out += renderer.link(token);
|
|
4350
|
+
break;
|
|
4351
|
+
}
|
|
4352
|
+
case "image": {
|
|
4353
|
+
out += renderer.image(token);
|
|
4354
|
+
break;
|
|
4355
|
+
}
|
|
4356
|
+
case "strong": {
|
|
4357
|
+
out += renderer.strong(token);
|
|
4358
|
+
break;
|
|
4359
|
+
}
|
|
4360
|
+
case "em": {
|
|
4361
|
+
out += renderer.em(token);
|
|
4362
|
+
break;
|
|
4363
|
+
}
|
|
4364
|
+
case "codespan": {
|
|
4365
|
+
out += renderer.codespan(token);
|
|
4366
|
+
break;
|
|
4367
|
+
}
|
|
4368
|
+
case "br": {
|
|
4369
|
+
out += renderer.br(token);
|
|
4370
|
+
break;
|
|
4371
|
+
}
|
|
4372
|
+
case "del": {
|
|
4373
|
+
out += renderer.del(token);
|
|
4374
|
+
break;
|
|
4375
|
+
}
|
|
4376
|
+
case "text": {
|
|
4377
|
+
out += renderer.text(token);
|
|
4378
|
+
break;
|
|
4379
|
+
}
|
|
4380
|
+
default: {
|
|
4381
|
+
const errMsg = 'Token with "' + token.type + '" type was not found.';
|
|
4382
|
+
if (this.options.silent) {
|
|
4383
|
+
console.error(errMsg);
|
|
4384
|
+
return "";
|
|
4385
|
+
} else {
|
|
4386
|
+
throw new Error(errMsg);
|
|
4387
|
+
}
|
|
4388
|
+
}
|
|
4389
|
+
}
|
|
4390
|
+
}
|
|
4391
|
+
return out;
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4394
|
+
class _Hooks {
|
|
4395
|
+
options;
|
|
4396
|
+
block;
|
|
4397
|
+
constructor(options) {
|
|
4398
|
+
this.options = options || _defaults;
|
|
4399
|
+
}
|
|
4400
|
+
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
4401
|
+
"preprocess",
|
|
4402
|
+
"postprocess",
|
|
4403
|
+
"processAllTokens"
|
|
4404
|
+
]);
|
|
4405
|
+
/**
|
|
4406
|
+
* Process markdown before marked
|
|
4407
|
+
*/
|
|
4408
|
+
preprocess(markdown) {
|
|
4409
|
+
return markdown;
|
|
4410
|
+
}
|
|
4411
|
+
/**
|
|
4412
|
+
* Process HTML after marked is finished
|
|
4413
|
+
*/
|
|
4414
|
+
postprocess(html2) {
|
|
4415
|
+
return html2;
|
|
4416
|
+
}
|
|
4417
|
+
/**
|
|
4418
|
+
* Process all tokens before walk tokens
|
|
4419
|
+
*/
|
|
4420
|
+
processAllTokens(tokens) {
|
|
4421
|
+
return tokens;
|
|
4422
|
+
}
|
|
4423
|
+
/**
|
|
4424
|
+
* Provide function to tokenize markdown
|
|
4425
|
+
*/
|
|
4426
|
+
provideLexer() {
|
|
4427
|
+
return this.block ? _Lexer.lex : _Lexer.lexInline;
|
|
4428
|
+
}
|
|
4429
|
+
/**
|
|
4430
|
+
* Provide function to parse tokens
|
|
4431
|
+
*/
|
|
4432
|
+
provideParser() {
|
|
4433
|
+
return this.block ? _Parser.parse : _Parser.parseInline;
|
|
4434
|
+
}
|
|
4435
|
+
}
|
|
4436
|
+
class Marked {
|
|
4437
|
+
defaults = _getDefaults();
|
|
4438
|
+
options = this.setOptions;
|
|
4439
|
+
parse = this.parseMarkdown(true);
|
|
4440
|
+
parseInline = this.parseMarkdown(false);
|
|
4441
|
+
Parser = _Parser;
|
|
4442
|
+
Renderer = _Renderer;
|
|
4443
|
+
TextRenderer = _TextRenderer;
|
|
4444
|
+
Lexer = _Lexer;
|
|
4445
|
+
Tokenizer = _Tokenizer;
|
|
4446
|
+
Hooks = _Hooks;
|
|
4447
|
+
constructor(...args) {
|
|
4448
|
+
this.use(...args);
|
|
4449
|
+
}
|
|
4450
|
+
/**
|
|
4451
|
+
* Run callback for every token
|
|
4452
|
+
*/
|
|
4453
|
+
walkTokens(tokens, callback) {
|
|
4454
|
+
let values = [];
|
|
4455
|
+
for (const token of tokens) {
|
|
4456
|
+
values = values.concat(callback.call(this, token));
|
|
4457
|
+
switch (token.type) {
|
|
4458
|
+
case "table": {
|
|
4459
|
+
const tableToken = token;
|
|
4460
|
+
for (const cell of tableToken.header) {
|
|
4461
|
+
values = values.concat(this.walkTokens(cell.tokens, callback));
|
|
4462
|
+
}
|
|
4463
|
+
for (const row of tableToken.rows) {
|
|
4464
|
+
for (const cell of row) {
|
|
4465
|
+
values = values.concat(this.walkTokens(cell.tokens, callback));
|
|
4466
|
+
}
|
|
4467
|
+
}
|
|
4468
|
+
break;
|
|
4469
|
+
}
|
|
4470
|
+
case "list": {
|
|
4471
|
+
const listToken = token;
|
|
4472
|
+
values = values.concat(this.walkTokens(listToken.items, callback));
|
|
4473
|
+
break;
|
|
4474
|
+
}
|
|
4475
|
+
default: {
|
|
4476
|
+
const genericToken = token;
|
|
4477
|
+
if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
|
|
4478
|
+
this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
|
|
4479
|
+
const tokens2 = genericToken[childTokens].flat(Infinity);
|
|
4480
|
+
values = values.concat(this.walkTokens(tokens2, callback));
|
|
4481
|
+
});
|
|
4482
|
+
} else if (genericToken.tokens) {
|
|
4483
|
+
values = values.concat(this.walkTokens(genericToken.tokens, callback));
|
|
4484
|
+
}
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
}
|
|
4488
|
+
return values;
|
|
4489
|
+
}
|
|
4490
|
+
use(...args) {
|
|
4491
|
+
const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
4492
|
+
args.forEach((pack) => {
|
|
4493
|
+
const opts = { ...pack };
|
|
4494
|
+
opts.async = this.defaults.async || opts.async || false;
|
|
4495
|
+
if (pack.extensions) {
|
|
4496
|
+
pack.extensions.forEach((ext) => {
|
|
4497
|
+
if (!ext.name) {
|
|
4498
|
+
throw new Error("extension name required");
|
|
4499
|
+
}
|
|
4500
|
+
if ("renderer" in ext) {
|
|
4501
|
+
const prevRenderer = extensions.renderers[ext.name];
|
|
4502
|
+
if (prevRenderer) {
|
|
4503
|
+
extensions.renderers[ext.name] = function(...args2) {
|
|
4504
|
+
let ret = ext.renderer.apply(this, args2);
|
|
4505
|
+
if (ret === false) {
|
|
4506
|
+
ret = prevRenderer.apply(this, args2);
|
|
4507
|
+
}
|
|
4508
|
+
return ret;
|
|
4509
|
+
};
|
|
4510
|
+
} else {
|
|
4511
|
+
extensions.renderers[ext.name] = ext.renderer;
|
|
4512
|
+
}
|
|
4513
|
+
}
|
|
4514
|
+
if ("tokenizer" in ext) {
|
|
4515
|
+
if (!ext.level || ext.level !== "block" && ext.level !== "inline") {
|
|
4516
|
+
throw new Error("extension level must be 'block' or 'inline'");
|
|
4517
|
+
}
|
|
4518
|
+
const extLevel = extensions[ext.level];
|
|
4519
|
+
if (extLevel) {
|
|
4520
|
+
extLevel.unshift(ext.tokenizer);
|
|
4521
|
+
} else {
|
|
4522
|
+
extensions[ext.level] = [ext.tokenizer];
|
|
4523
|
+
}
|
|
4524
|
+
if (ext.start) {
|
|
4525
|
+
if (ext.level === "block") {
|
|
4526
|
+
if (extensions.startBlock) {
|
|
4527
|
+
extensions.startBlock.push(ext.start);
|
|
4528
|
+
} else {
|
|
4529
|
+
extensions.startBlock = [ext.start];
|
|
4530
|
+
}
|
|
4531
|
+
} else if (ext.level === "inline") {
|
|
4532
|
+
if (extensions.startInline) {
|
|
4533
|
+
extensions.startInline.push(ext.start);
|
|
4534
|
+
} else {
|
|
4535
|
+
extensions.startInline = [ext.start];
|
|
4536
|
+
}
|
|
4537
|
+
}
|
|
4538
|
+
}
|
|
4539
|
+
}
|
|
4540
|
+
if ("childTokens" in ext && ext.childTokens) {
|
|
4541
|
+
extensions.childTokens[ext.name] = ext.childTokens;
|
|
4542
|
+
}
|
|
4543
|
+
});
|
|
4544
|
+
opts.extensions = extensions;
|
|
4545
|
+
}
|
|
4546
|
+
if (pack.renderer) {
|
|
4547
|
+
const renderer = this.defaults.renderer || new _Renderer(this.defaults);
|
|
4548
|
+
for (const prop in pack.renderer) {
|
|
4549
|
+
if (!(prop in renderer)) {
|
|
4550
|
+
throw new Error(`renderer '${prop}' does not exist`);
|
|
4551
|
+
}
|
|
4552
|
+
if (["options", "parser"].includes(prop)) {
|
|
4553
|
+
continue;
|
|
4554
|
+
}
|
|
4555
|
+
const rendererProp = prop;
|
|
4556
|
+
const rendererFunc = pack.renderer[rendererProp];
|
|
4557
|
+
const prevRenderer = renderer[rendererProp];
|
|
4558
|
+
renderer[rendererProp] = (...args2) => {
|
|
4559
|
+
let ret = rendererFunc.apply(renderer, args2);
|
|
4560
|
+
if (ret === false) {
|
|
4561
|
+
ret = prevRenderer.apply(renderer, args2);
|
|
4562
|
+
}
|
|
4563
|
+
return ret || "";
|
|
4564
|
+
};
|
|
4565
|
+
}
|
|
4566
|
+
opts.renderer = renderer;
|
|
4567
|
+
}
|
|
4568
|
+
if (pack.tokenizer) {
|
|
4569
|
+
const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);
|
|
4570
|
+
for (const prop in pack.tokenizer) {
|
|
4571
|
+
if (!(prop in tokenizer)) {
|
|
4572
|
+
throw new Error(`tokenizer '${prop}' does not exist`);
|
|
4573
|
+
}
|
|
4574
|
+
if (["options", "rules", "lexer"].includes(prop)) {
|
|
4575
|
+
continue;
|
|
4576
|
+
}
|
|
4577
|
+
const tokenizerProp = prop;
|
|
4578
|
+
const tokenizerFunc = pack.tokenizer[tokenizerProp];
|
|
4579
|
+
const prevTokenizer = tokenizer[tokenizerProp];
|
|
4580
|
+
tokenizer[tokenizerProp] = (...args2) => {
|
|
4581
|
+
let ret = tokenizerFunc.apply(tokenizer, args2);
|
|
4582
|
+
if (ret === false) {
|
|
4583
|
+
ret = prevTokenizer.apply(tokenizer, args2);
|
|
4584
|
+
}
|
|
4585
|
+
return ret;
|
|
4586
|
+
};
|
|
4587
|
+
}
|
|
4588
|
+
opts.tokenizer = tokenizer;
|
|
4589
|
+
}
|
|
4590
|
+
if (pack.hooks) {
|
|
4591
|
+
const hooks = this.defaults.hooks || new _Hooks();
|
|
4592
|
+
for (const prop in pack.hooks) {
|
|
4593
|
+
if (!(prop in hooks)) {
|
|
4594
|
+
throw new Error(`hook '${prop}' does not exist`);
|
|
4595
|
+
}
|
|
4596
|
+
if (["options", "block"].includes(prop)) {
|
|
4597
|
+
continue;
|
|
4598
|
+
}
|
|
4599
|
+
const hooksProp = prop;
|
|
4600
|
+
const hooksFunc = pack.hooks[hooksProp];
|
|
4601
|
+
const prevHook = hooks[hooksProp];
|
|
4602
|
+
if (_Hooks.passThroughHooks.has(prop)) {
|
|
4603
|
+
hooks[hooksProp] = (arg) => {
|
|
4604
|
+
if (this.defaults.async) {
|
|
4605
|
+
return Promise.resolve(hooksFunc.call(hooks, arg)).then((ret2) => {
|
|
4606
|
+
return prevHook.call(hooks, ret2);
|
|
4607
|
+
});
|
|
4608
|
+
}
|
|
4609
|
+
const ret = hooksFunc.call(hooks, arg);
|
|
4610
|
+
return prevHook.call(hooks, ret);
|
|
4611
|
+
};
|
|
4612
|
+
} else {
|
|
4613
|
+
hooks[hooksProp] = (...args2) => {
|
|
4614
|
+
let ret = hooksFunc.apply(hooks, args2);
|
|
4615
|
+
if (ret === false) {
|
|
4616
|
+
ret = prevHook.apply(hooks, args2);
|
|
4617
|
+
}
|
|
4618
|
+
return ret;
|
|
4619
|
+
};
|
|
4620
|
+
}
|
|
4621
|
+
}
|
|
4622
|
+
opts.hooks = hooks;
|
|
4623
|
+
}
|
|
4624
|
+
if (pack.walkTokens) {
|
|
4625
|
+
const walkTokens = this.defaults.walkTokens;
|
|
4626
|
+
const packWalktokens = pack.walkTokens;
|
|
4627
|
+
opts.walkTokens = function(token) {
|
|
4628
|
+
let values = [];
|
|
4629
|
+
values.push(packWalktokens.call(this, token));
|
|
4630
|
+
if (walkTokens) {
|
|
4631
|
+
values = values.concat(walkTokens.call(this, token));
|
|
4632
|
+
}
|
|
4633
|
+
return values;
|
|
4634
|
+
};
|
|
4635
|
+
}
|
|
4636
|
+
this.defaults = { ...this.defaults, ...opts };
|
|
4637
|
+
});
|
|
4638
|
+
return this;
|
|
4639
|
+
}
|
|
4640
|
+
setOptions(opt) {
|
|
4641
|
+
this.defaults = { ...this.defaults, ...opt };
|
|
4642
|
+
return this;
|
|
4643
|
+
}
|
|
4644
|
+
lexer(src, options) {
|
|
4645
|
+
return _Lexer.lex(src, options ?? this.defaults);
|
|
4646
|
+
}
|
|
4647
|
+
parser(tokens, options) {
|
|
4648
|
+
return _Parser.parse(tokens, options ?? this.defaults);
|
|
4649
|
+
}
|
|
4650
|
+
parseMarkdown(blockType) {
|
|
4651
|
+
const parse = (src, options) => {
|
|
4652
|
+
const origOpt = { ...options };
|
|
4653
|
+
const opt = { ...this.defaults, ...origOpt };
|
|
4654
|
+
const throwError = this.onError(!!opt.silent, !!opt.async);
|
|
4655
|
+
if (this.defaults.async === true && origOpt.async === false) {
|
|
4656
|
+
return throwError(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
4657
|
+
}
|
|
4658
|
+
if (typeof src === "undefined" || src === null) {
|
|
4659
|
+
return throwError(new Error("marked(): input parameter is undefined or null"));
|
|
4660
|
+
}
|
|
4661
|
+
if (typeof src !== "string") {
|
|
4662
|
+
return throwError(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(src) + ", string expected"));
|
|
4663
|
+
}
|
|
4664
|
+
if (opt.hooks) {
|
|
4665
|
+
opt.hooks.options = opt;
|
|
4666
|
+
opt.hooks.block = blockType;
|
|
4667
|
+
}
|
|
4668
|
+
const lexer = opt.hooks ? opt.hooks.provideLexer() : blockType ? _Lexer.lex : _Lexer.lexInline;
|
|
4669
|
+
const parser = opt.hooks ? opt.hooks.provideParser() : blockType ? _Parser.parse : _Parser.parseInline;
|
|
4670
|
+
if (opt.async) {
|
|
4671
|
+
return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then((src2) => lexer(src2, opt)).then((tokens) => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then((tokens) => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then((tokens) => parser(tokens, opt)).then((html2) => opt.hooks ? opt.hooks.postprocess(html2) : html2).catch(throwError);
|
|
4672
|
+
}
|
|
4673
|
+
try {
|
|
4674
|
+
if (opt.hooks) {
|
|
4675
|
+
src = opt.hooks.preprocess(src);
|
|
4676
|
+
}
|
|
4677
|
+
let tokens = lexer(src, opt);
|
|
4678
|
+
if (opt.hooks) {
|
|
4679
|
+
tokens = opt.hooks.processAllTokens(tokens);
|
|
4680
|
+
}
|
|
4681
|
+
if (opt.walkTokens) {
|
|
4682
|
+
this.walkTokens(tokens, opt.walkTokens);
|
|
4683
|
+
}
|
|
4684
|
+
let html2 = parser(tokens, opt);
|
|
4685
|
+
if (opt.hooks) {
|
|
4686
|
+
html2 = opt.hooks.postprocess(html2);
|
|
4687
|
+
}
|
|
4688
|
+
return html2;
|
|
4689
|
+
} catch (e) {
|
|
4690
|
+
return throwError(e);
|
|
4691
|
+
}
|
|
4692
|
+
};
|
|
4693
|
+
return parse;
|
|
4694
|
+
}
|
|
4695
|
+
onError(silent, async) {
|
|
4696
|
+
return (e) => {
|
|
4697
|
+
e.message += "\nPlease report this to https://github.com/markedjs/marked.";
|
|
4698
|
+
if (silent) {
|
|
4699
|
+
const msg = "<p>An error occurred:</p><pre>" + escape(e.message + "", true) + "</pre>";
|
|
4700
|
+
if (async) {
|
|
4701
|
+
return Promise.resolve(msg);
|
|
4702
|
+
}
|
|
4703
|
+
return msg;
|
|
4704
|
+
}
|
|
4705
|
+
if (async) {
|
|
4706
|
+
return Promise.reject(e);
|
|
4707
|
+
}
|
|
4708
|
+
throw e;
|
|
4709
|
+
};
|
|
4710
|
+
}
|
|
4711
|
+
}
|
|
4712
|
+
const markedInstance = new Marked();
|
|
4713
|
+
function marked(src, opt) {
|
|
4714
|
+
return markedInstance.parse(src, opt);
|
|
4715
|
+
}
|
|
4716
|
+
marked.options = marked.setOptions = function(options) {
|
|
4717
|
+
markedInstance.setOptions(options);
|
|
4718
|
+
marked.defaults = markedInstance.defaults;
|
|
4719
|
+
changeDefaults(marked.defaults);
|
|
4720
|
+
return marked;
|
|
4721
|
+
};
|
|
4722
|
+
marked.getDefaults = _getDefaults;
|
|
4723
|
+
marked.defaults = _defaults;
|
|
4724
|
+
marked.use = function(...args) {
|
|
4725
|
+
markedInstance.use(...args);
|
|
4726
|
+
marked.defaults = markedInstance.defaults;
|
|
4727
|
+
changeDefaults(marked.defaults);
|
|
4728
|
+
return marked;
|
|
4729
|
+
};
|
|
4730
|
+
marked.walkTokens = function(tokens, callback) {
|
|
4731
|
+
return markedInstance.walkTokens(tokens, callback);
|
|
4732
|
+
};
|
|
4733
|
+
marked.parseInline = markedInstance.parseInline;
|
|
4734
|
+
marked.Parser = _Parser;
|
|
4735
|
+
marked.parser = _Parser.parse;
|
|
4736
|
+
marked.Renderer = _Renderer;
|
|
4737
|
+
marked.TextRenderer = _TextRenderer;
|
|
4738
|
+
marked.Lexer = _Lexer;
|
|
4739
|
+
marked.lexer = _Lexer.lex;
|
|
4740
|
+
marked.Tokenizer = _Tokenizer;
|
|
4741
|
+
marked.Hooks = _Hooks;
|
|
4742
|
+
marked.parse = marked;
|
|
4743
|
+
marked.options;
|
|
4744
|
+
marked.setOptions;
|
|
4745
|
+
marked.use;
|
|
4746
|
+
marked.walkTokens;
|
|
4747
|
+
marked.parseInline;
|
|
4748
|
+
_Parser.parse;
|
|
4749
|
+
_Lexer.lex;
|
|
4750
|
+
|
|
4751
|
+
export { Circle_alert as C, Dropdown_menu_trigger as D, Editor_shell as E, Progress as P, Root as R, EVENT_LIST_SET as a, box as b, isObject as c, Dropdown_menu_content as d, Dropdown_menu_separator as e, isClassValue as i, styleToString as s, watch as w };
|
|
4752
|
+
//# sourceMappingURL=scrub-xyz.svelte_svelte_type_style_lang-BuQqzLLy.js.map
|