@mountaya/studio-react 0.0.0-stage → 0.2.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/CHANGELOG.md +98 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1087 -2
- package/THIRD-PARTY-NOTICES.txt +149 -0
- package/dist/chunk--VSQcEs_.cjs +26 -0
- package/dist/chunk--VSQcEs_.cjs.map +1 -0
- package/dist/chunk-0qoALFfx.cjs +454 -0
- package/dist/chunk-0qoALFfx.cjs.map +1 -0
- package/dist/chunk-0sHgX8We.cjs +97 -0
- package/dist/chunk-0sHgX8We.cjs.map +1 -0
- package/dist/chunk-4D4as_tP.js +16 -0
- package/dist/chunk-4D4as_tP.js.map +1 -0
- package/dist/chunk-6LM6wuIg.cjs +13 -0
- package/dist/chunk-6LM6wuIg.cjs.map +1 -0
- package/dist/chunk-6VpwF-77.js +7 -0
- package/dist/chunk-6VpwF-77.js.map +1 -0
- package/dist/chunk-6v2fJIDh.cjs +28 -0
- package/dist/chunk-6v2fJIDh.cjs.map +1 -0
- package/dist/chunk-Af0f-OjN.js +71 -0
- package/dist/chunk-Af0f-OjN.js.map +1 -0
- package/dist/chunk-B-QQkaWk.js +91 -0
- package/dist/chunk-B-QQkaWk.js.map +1 -0
- package/dist/chunk-B1lX5w6I.cjs +181 -0
- package/dist/chunk-B1lX5w6I.cjs.map +1 -0
- package/dist/chunk-B2gsz9OJ.js +19 -0
- package/dist/chunk-B2gsz9OJ.js.map +1 -0
- package/dist/chunk-B38srE2R.d.cts +3976 -0
- package/dist/chunk-B3HdxIq7.js +69 -0
- package/dist/chunk-B3HdxIq7.js.map +1 -0
- package/dist/chunk-B3UCX3Wd.js +30 -0
- package/dist/chunk-B3UCX3Wd.js.map +1 -0
- package/dist/chunk-B3mMYMtz.cjs +88 -0
- package/dist/chunk-B3mMYMtz.cjs.map +1 -0
- package/dist/chunk-B7D0neNQ.cjs +47 -0
- package/dist/chunk-B7D0neNQ.cjs.map +1 -0
- package/dist/chunk-B7UzNwmm.cjs +115 -0
- package/dist/chunk-B7UzNwmm.cjs.map +1 -0
- package/dist/chunk-B7d3NIaH.js +55 -0
- package/dist/chunk-B7d3NIaH.js.map +1 -0
- package/dist/chunk-B8ONCPFQ.cjs +70 -0
- package/dist/chunk-B8ONCPFQ.cjs.map +1 -0
- package/dist/chunk-B8QgG-RT.js +2232 -0
- package/dist/chunk-B8QgG-RT.js.map +1 -0
- package/dist/chunk-B8ZpXH0_.cjs +64 -0
- package/dist/chunk-B8ZpXH0_.cjs.map +1 -0
- package/dist/chunk-B8mS5bGc.cjs +112 -0
- package/dist/chunk-B8mS5bGc.cjs.map +1 -0
- package/dist/chunk-B9EkHHSU.js +40 -0
- package/dist/chunk-B9EkHHSU.js.map +1 -0
- package/dist/chunk-BA0PWNyn.js +234 -0
- package/dist/chunk-BA0PWNyn.js.map +1 -0
- package/dist/chunk-BAWE1gqe.js +60 -0
- package/dist/chunk-BAWE1gqe.js.map +1 -0
- package/dist/chunk-BAe9m2Yp.d.cts +963 -0
- package/dist/chunk-BDJCk6ml.js +19 -0
- package/dist/chunk-BDJCk6ml.js.map +1 -0
- package/dist/chunk-BFI2CR6j.cjs +381 -0
- package/dist/chunk-BFI2CR6j.cjs.map +1 -0
- package/dist/chunk-BIIJXiiS.js +40 -0
- package/dist/chunk-BIIJXiiS.js.map +1 -0
- package/dist/chunk-BJAn10wR.js +54 -0
- package/dist/chunk-BJAn10wR.js.map +1 -0
- package/dist/chunk-BLxPxx5p.js +1641 -0
- package/dist/chunk-BLxPxx5p.js.map +1 -0
- package/dist/chunk-BNSJoNwO.cjs +377 -0
- package/dist/chunk-BNSJoNwO.cjs.map +1 -0
- package/dist/chunk-BNTshA5u.js +304 -0
- package/dist/chunk-BNTshA5u.js.map +1 -0
- package/dist/chunk-BO_yHMn2.js +7 -0
- package/dist/chunk-BO_yHMn2.js.map +1 -0
- package/dist/chunk-BOpIVklq.cjs +23 -0
- package/dist/chunk-BOpIVklq.cjs.map +1 -0
- package/dist/chunk-BP8bHGiE.cjs +12 -0
- package/dist/chunk-BP8bHGiE.cjs.map +1 -0
- package/dist/chunk-BPsgx3c7.js +56 -0
- package/dist/chunk-BPsgx3c7.js.map +1 -0
- package/dist/chunk-BQkKY_kf.js +44 -0
- package/dist/chunk-BQkKY_kf.js.map +1 -0
- package/dist/chunk-BQoAEKyJ.js +193 -0
- package/dist/chunk-BQoAEKyJ.js.map +1 -0
- package/dist/chunk-BRuLc45I.cjs +21 -0
- package/dist/chunk-BRuLc45I.cjs.map +1 -0
- package/dist/chunk-BSnrqsA8.cjs +56 -0
- package/dist/chunk-BSnrqsA8.cjs.map +1 -0
- package/dist/chunk-BTDBomKm.cjs +80 -0
- package/dist/chunk-BTDBomKm.cjs.map +1 -0
- package/dist/chunk-BVogYy0R.js +375 -0
- package/dist/chunk-BVogYy0R.js.map +1 -0
- package/dist/chunk-BWITLmlf.js +6 -0
- package/dist/chunk-BWITLmlf.js.map +1 -0
- package/dist/chunk-BXUrvYqd.d.cts +112 -0
- package/dist/chunk-BXUrvYqd.d.ts +112 -0
- package/dist/chunk-BYzQfFFV.js +54 -0
- package/dist/chunk-BYzQfFFV.js.map +1 -0
- package/dist/chunk-BZCKMlN8.js +35 -0
- package/dist/chunk-BZCKMlN8.js.map +1 -0
- package/dist/chunk-BalPERFX.js +13 -0
- package/dist/chunk-BalPERFX.js.map +1 -0
- package/dist/chunk-Bb5SAw6T.cjs +72 -0
- package/dist/chunk-Bb5SAw6T.cjs.map +1 -0
- package/dist/chunk-BbQyoetL.cjs +269 -0
- package/dist/chunk-BbQyoetL.cjs.map +1 -0
- package/dist/chunk-BdepwGey.js +600 -0
- package/dist/chunk-BdepwGey.js.map +1 -0
- package/dist/chunk-BeB57TnZ.js +29 -0
- package/dist/chunk-BeB57TnZ.js.map +1 -0
- package/dist/chunk-BecxET4U.cjs +26 -0
- package/dist/chunk-BecxET4U.cjs.map +1 -0
- package/dist/chunk-Bfuu_B7M.js +16 -0
- package/dist/chunk-Bfuu_B7M.js.map +1 -0
- package/dist/chunk-Bh4xSiDO.js +93 -0
- package/dist/chunk-Bh4xSiDO.js.map +1 -0
- package/dist/chunk-BhLItb06.js +10 -0
- package/dist/chunk-BhLItb06.js.map +1 -0
- package/dist/chunk-BhelUZ4P.js +30 -0
- package/dist/chunk-BhelUZ4P.js.map +1 -0
- package/dist/chunk-BiMRpOwB.cjs +342 -0
- package/dist/chunk-BiMRpOwB.cjs.map +1 -0
- package/dist/chunk-Bj3ium6N.cjs +22 -0
- package/dist/chunk-Bj3ium6N.cjs.map +1 -0
- package/dist/chunk-BjQzK3c3.cjs +59 -0
- package/dist/chunk-BjQzK3c3.cjs.map +1 -0
- package/dist/chunk-BkvNTXo7.cjs +15 -0
- package/dist/chunk-BkvNTXo7.cjs.map +1 -0
- package/dist/chunk-BmJDHIlZ.cjs +50 -0
- package/dist/chunk-BmJDHIlZ.cjs.map +1 -0
- package/dist/chunk-BmztanwN.cjs +13 -0
- package/dist/chunk-BmztanwN.cjs.map +1 -0
- package/dist/chunk-Bnci-ej8.cjs +262 -0
- package/dist/chunk-Bnci-ej8.cjs.map +1 -0
- package/dist/chunk-BoOw05B0.js +24 -0
- package/dist/chunk-BoOw05B0.js.map +1 -0
- package/dist/chunk-BqPxk-8w.cjs +95 -0
- package/dist/chunk-BqPxk-8w.cjs.map +1 -0
- package/dist/chunk-Br_1h4WD.cjs +15 -0
- package/dist/chunk-Br_1h4WD.cjs.map +1 -0
- package/dist/chunk-BtmcBZXU.js +13 -0
- package/dist/chunk-BtmcBZXU.js.map +1 -0
- package/dist/chunk-BvaNI_86.js +11 -0
- package/dist/chunk-BvaNI_86.js.map +1 -0
- package/dist/chunk-BvoYNlF5.js +145 -0
- package/dist/chunk-BvoYNlF5.js.map +1 -0
- package/dist/chunk-BwnCGe7J.js +268 -0
- package/dist/chunk-BwnCGe7J.js.map +1 -0
- package/dist/chunk-BxpaOkyq.cjs +310 -0
- package/dist/chunk-BxpaOkyq.cjs.map +1 -0
- package/dist/chunk-BybRyFen.cjs +65 -0
- package/dist/chunk-BybRyFen.cjs.map +1 -0
- package/dist/chunk-C-9wXKm5.cjs +83 -0
- package/dist/chunk-C-9wXKm5.cjs.map +1 -0
- package/dist/chunk-C-hV-Usi.js +7 -0
- package/dist/chunk-C-hV-Usi.js.map +1 -0
- package/dist/chunk-C06UWdDq.js +100 -0
- package/dist/chunk-C06UWdDq.js.map +1 -0
- package/dist/chunk-C1NzDn7y.cjs +35 -0
- package/dist/chunk-C1NzDn7y.cjs.map +1 -0
- package/dist/chunk-C2zEVNM1.js +20 -0
- package/dist/chunk-C2zEVNM1.js.map +1 -0
- package/dist/chunk-C3ftwoOp.js +6 -0
- package/dist/chunk-C3ftwoOp.js.map +1 -0
- package/dist/chunk-C5ZETobm.js +17 -0
- package/dist/chunk-C5ZETobm.js.map +1 -0
- package/dist/chunk-C5oCIViv.js +98 -0
- package/dist/chunk-C5oCIViv.js.map +1 -0
- package/dist/chunk-C60kC4oZ.cjs +114 -0
- package/dist/chunk-C60kC4oZ.cjs.map +1 -0
- package/dist/chunk-C6Mr3Z8L.js +59 -0
- package/dist/chunk-C6Mr3Z8L.js.map +1 -0
- package/dist/chunk-C6cBmVch.js +119 -0
- package/dist/chunk-C6cBmVch.js.map +1 -0
- package/dist/chunk-C6vKd7KP.cjs +519 -0
- package/dist/chunk-C6vKd7KP.cjs.map +1 -0
- package/dist/chunk-C7NizUxN.js +21 -0
- package/dist/chunk-C7NizUxN.js.map +1 -0
- package/dist/chunk-C93yeTAD.js +91 -0
- package/dist/chunk-C93yeTAD.js.map +1 -0
- package/dist/chunk-CByZU6Hx.cjs +90 -0
- package/dist/chunk-CByZU6Hx.cjs.map +1 -0
- package/dist/chunk-CCNIPIJB.cjs +25 -0
- package/dist/chunk-CCNIPIJB.cjs.map +1 -0
- package/dist/chunk-CEDKBew2.js +15 -0
- package/dist/chunk-CEDKBew2.js.map +1 -0
- package/dist/chunk-CI2PEZIK.js +147 -0
- package/dist/chunk-CI2PEZIK.js.map +1 -0
- package/dist/chunk-CIjPAYuo.cjs +268 -0
- package/dist/chunk-CIjPAYuo.cjs.map +1 -0
- package/dist/chunk-CJyqD6Ib.js +518 -0
- package/dist/chunk-CJyqD6Ib.js.map +1 -0
- package/dist/chunk-CNFF8fiL.js +38 -0
- package/dist/chunk-CNFF8fiL.js.map +1 -0
- package/dist/chunk-CNFoFzhK.cjs +50 -0
- package/dist/chunk-CNFoFzhK.cjs.map +1 -0
- package/dist/chunk-CQAuAPOE.cjs +63 -0
- package/dist/chunk-CQAuAPOE.cjs.map +1 -0
- package/dist/chunk-CR46E73M.js +50 -0
- package/dist/chunk-CR46E73M.js.map +1 -0
- package/dist/chunk-CSq4CbT1.js +86 -0
- package/dist/chunk-CSq4CbT1.js.map +1 -0
- package/dist/chunk-CT6i9_8G.cjs +31 -0
- package/dist/chunk-CT6i9_8G.cjs.map +1 -0
- package/dist/chunk-CUKEOil1.cjs +108 -0
- package/dist/chunk-CUKEOil1.cjs.map +1 -0
- package/dist/chunk-CWxPV2vI.js +111 -0
- package/dist/chunk-CWxPV2vI.js.map +1 -0
- package/dist/chunk-CXap-mFu.js +50 -0
- package/dist/chunk-CXap-mFu.js.map +1 -0
- package/dist/chunk-CYx1vTOG.d.ts +69 -0
- package/dist/chunk-CZOXtOQp.js +261 -0
- package/dist/chunk-CZOXtOQp.js.map +1 -0
- package/dist/chunk-CZSBVyE9.js +68 -0
- package/dist/chunk-CZSBVyE9.js.map +1 -0
- package/dist/chunk-C_NZdnA3.cjs +57 -0
- package/dist/chunk-C_NZdnA3.cjs.map +1 -0
- package/dist/chunk-C_k4SxhD.js +245 -0
- package/dist/chunk-C_k4SxhD.js.map +1 -0
- package/dist/chunk-CaTeIppS.cjs +115 -0
- package/dist/chunk-CaTeIppS.cjs.map +1 -0
- package/dist/chunk-CaUCI-WV.cjs +69 -0
- package/dist/chunk-CaUCI-WV.cjs.map +1 -0
- package/dist/chunk-CblkEI9o.js +19 -0
- package/dist/chunk-CblkEI9o.js.map +1 -0
- package/dist/chunk-CcXeCiEQ.js +70 -0
- package/dist/chunk-CcXeCiEQ.js.map +1 -0
- package/dist/chunk-Ce4D2B8W.cjs +49 -0
- package/dist/chunk-Ce4D2B8W.cjs.map +1 -0
- package/dist/chunk-CetxbYL1.js +66 -0
- package/dist/chunk-CetxbYL1.js.map +1 -0
- package/dist/chunk-ClfU9elo.js +68 -0
- package/dist/chunk-ClfU9elo.js.map +1 -0
- package/dist/chunk-CmNHE_Un.cjs +4 -0
- package/dist/chunk-Cmb_XLfd.js +82 -0
- package/dist/chunk-Cmb_XLfd.js.map +1 -0
- package/dist/chunk-Cp26IdF1.js +72 -0
- package/dist/chunk-Cp26IdF1.js.map +1 -0
- package/dist/chunk-CsBkSCbR.cjs +92 -0
- package/dist/chunk-CsBkSCbR.cjs.map +1 -0
- package/dist/chunk-CsnIpELM.js +31 -0
- package/dist/chunk-CsnIpELM.js.map +1 -0
- package/dist/chunk-CsnJv55G.cjs +36 -0
- package/dist/chunk-CsnJv55G.cjs.map +1 -0
- package/dist/chunk-CsxHDVHF.cjs +68 -0
- package/dist/chunk-CsxHDVHF.cjs.map +1 -0
- package/dist/chunk-Cv1FyWmK.js +670 -0
- package/dist/chunk-Cv1FyWmK.js.map +1 -0
- package/dist/chunk-CwXRQ-3X.cjs +2238 -0
- package/dist/chunk-CwXRQ-3X.cjs.map +1 -0
- package/dist/chunk-CxC9GaSV.js +6 -0
- package/dist/chunk-CxC9GaSV.js.map +1 -0
- package/dist/chunk-CyDQK1JF.js +22 -0
- package/dist/chunk-CyDQK1JF.js.map +1 -0
- package/dist/chunk-CyFo-C-X.js +341 -0
- package/dist/chunk-CyFo-C-X.js.map +1 -0
- package/dist/chunk-CzGWcm8C.cjs +109 -0
- package/dist/chunk-CzGWcm8C.cjs.map +1 -0
- package/dist/chunk-D0Cmheqq.cjs +25 -0
- package/dist/chunk-D0Cmheqq.cjs.map +1 -0
- package/dist/chunk-D0VevtWq.cjs +13 -0
- package/dist/chunk-D0VevtWq.cjs.map +1 -0
- package/dist/chunk-D1HIZ09h.d.cts +22 -0
- package/dist/chunk-D1HIZ09h.d.ts +22 -0
- package/dist/chunk-D1PwxEEq.cjs +281 -0
- package/dist/chunk-D1PwxEEq.cjs.map +1 -0
- package/dist/chunk-D2BipKyx.d.cts +69 -0
- package/dist/chunk-D4g36nrI.d.ts +963 -0
- package/dist/chunk-D5vZKs5k.js +85 -0
- package/dist/chunk-D5vZKs5k.js.map +1 -0
- package/dist/chunk-D7XBi__G.js +17 -0
- package/dist/chunk-D7XBi__G.js.map +1 -0
- package/dist/chunk-D8TsKfym.cjs +35 -0
- package/dist/chunk-D8TsKfym.cjs.map +1 -0
- package/dist/chunk-D8r50zRF.cjs +4 -0
- package/dist/chunk-DAAlHzRS.js +2 -0
- package/dist/chunk-DBY6OSNP.js +13 -0
- package/dist/chunk-DBY6OSNP.js.map +1 -0
- package/dist/chunk-DBfZJAh3.js +146 -0
- package/dist/chunk-DBfZJAh3.js.map +1 -0
- package/dist/chunk-DBpF1Eur.cjs +69 -0
- package/dist/chunk-DBpF1Eur.cjs.map +1 -0
- package/dist/chunk-DCvhBL80.js +9 -0
- package/dist/chunk-DCvhBL80.js.map +1 -0
- package/dist/chunk-DDNoqMiU.cjs +12 -0
- package/dist/chunk-DDNoqMiU.cjs.map +1 -0
- package/dist/chunk-DEpLX45Z.cjs +25 -0
- package/dist/chunk-DEpLX45Z.cjs.map +1 -0
- package/dist/chunk-DFw3I0U0.cjs +19 -0
- package/dist/chunk-DFw3I0U0.cjs.map +1 -0
- package/dist/chunk-DJOkmY4u.cjs +36 -0
- package/dist/chunk-DJOkmY4u.cjs.map +1 -0
- package/dist/chunk-DJQsem2x.js +1128 -0
- package/dist/chunk-DJQsem2x.js.map +1 -0
- package/dist/chunk-DKNcYR4L.cjs +71 -0
- package/dist/chunk-DKNcYR4L.cjs.map +1 -0
- package/dist/chunk-DL4Q5WpP.cjs +19 -0
- package/dist/chunk-DL4Q5WpP.cjs.map +1 -0
- package/dist/chunk-DLt13wEh.js +279 -0
- package/dist/chunk-DLt13wEh.js.map +1 -0
- package/dist/chunk-DPvFDS5n.cjs +31 -0
- package/dist/chunk-DPvFDS5n.cjs.map +1 -0
- package/dist/chunk-DQ4l6EDZ.js +1728 -0
- package/dist/chunk-DQ4l6EDZ.js.map +1 -0
- package/dist/chunk-DQ_X9yhT.cjs +21 -0
- package/dist/chunk-DQ_X9yhT.cjs.map +1 -0
- package/dist/chunk-DQbbL87b.cjs +57 -0
- package/dist/chunk-DQbbL87b.cjs.map +1 -0
- package/dist/chunk-DRphChLx.js +15 -0
- package/dist/chunk-DRphChLx.js.map +1 -0
- package/dist/chunk-DSsTHBp4.js +62 -0
- package/dist/chunk-DSsTHBp4.js.map +1 -0
- package/dist/chunk-DVI59otQ.js +20 -0
- package/dist/chunk-DVI59otQ.js.map +1 -0
- package/dist/chunk-DVN4tYVL.cjs +235 -0
- package/dist/chunk-DVN4tYVL.cjs.map +1 -0
- package/dist/chunk-DWxCDSxn.cjs +36 -0
- package/dist/chunk-DWxCDSxn.cjs.map +1 -0
- package/dist/chunk-DXMaeZs_.cjs +135 -0
- package/dist/chunk-DXMaeZs_.cjs.map +1 -0
- package/dist/chunk-D_dPThBm.js +44 -0
- package/dist/chunk-D_dPThBm.js.map +1 -0
- package/dist/chunk-DbW3lF5Y.cjs +55 -0
- package/dist/chunk-DbW3lF5Y.cjs.map +1 -0
- package/dist/chunk-Dc0Robe4.cjs +254 -0
- package/dist/chunk-Dc0Robe4.cjs.map +1 -0
- package/dist/chunk-DcLLI7B1.cjs +16 -0
- package/dist/chunk-DcLLI7B1.cjs.map +1 -0
- package/dist/chunk-Dd9K8OSs.js +73 -0
- package/dist/chunk-Dd9K8OSs.js.map +1 -0
- package/dist/chunk-DeFJnC-Q.js +52 -0
- package/dist/chunk-DeFJnC-Q.js.map +1 -0
- package/dist/chunk-DeggaLXL.cjs +109 -0
- package/dist/chunk-DeggaLXL.cjs.map +1 -0
- package/dist/chunk-DetGuqR8.cjs +12 -0
- package/dist/chunk-DetGuqR8.cjs.map +1 -0
- package/dist/chunk-Df761BAX.cjs +4 -0
- package/dist/chunk-DfQZch7H.cjs +60 -0
- package/dist/chunk-DfQZch7H.cjs.map +1 -0
- package/dist/chunk-DhwoAmi8.cjs +77 -0
- package/dist/chunk-DhwoAmi8.cjs.map +1 -0
- package/dist/chunk-DkH1DKxi.cjs +66 -0
- package/dist/chunk-DkH1DKxi.cjs.map +1 -0
- package/dist/chunk-DkjkI8F5.cjs +150 -0
- package/dist/chunk-DkjkI8F5.cjs.map +1 -0
- package/dist/chunk-DlaVYkP2.cjs +23 -0
- package/dist/chunk-DlaVYkP2.cjs.map +1 -0
- package/dist/chunk-DlcsA1GQ.js +6 -0
- package/dist/chunk-DlcsA1GQ.js.map +1 -0
- package/dist/chunk-DmBkJhi_.js +8 -0
- package/dist/chunk-DmBkJhi_.js.map +1 -0
- package/dist/chunk-DnXjnOQ1.cjs +42 -0
- package/dist/chunk-DnXjnOQ1.cjs.map +1 -0
- package/dist/chunk-DrG9yz7c.js +509 -0
- package/dist/chunk-DrG9yz7c.js.map +1 -0
- package/dist/chunk-DsTU_5Be.js +96 -0
- package/dist/chunk-DsTU_5Be.js.map +1 -0
- package/dist/chunk-DsXj9iLu.cjs +1827 -0
- package/dist/chunk-DsXj9iLu.cjs.map +1 -0
- package/dist/chunk-DteUy52S.js +45 -0
- package/dist/chunk-DteUy52S.js.map +1 -0
- package/dist/chunk-DtvsE56k.cjs +12 -0
- package/dist/chunk-DtvsE56k.cjs.map +1 -0
- package/dist/chunk-DuD5YqoE.cjs +99 -0
- package/dist/chunk-DuD5YqoE.cjs.map +1 -0
- package/dist/chunk-DvrtQ0Y0.js +51 -0
- package/dist/chunk-DvrtQ0Y0.js.map +1 -0
- package/dist/chunk-DwUFwDV2.js +144 -0
- package/dist/chunk-DwUFwDV2.js.map +1 -0
- package/dist/chunk-Dy59Tdfm.cjs +67 -0
- package/dist/chunk-Dy59Tdfm.cjs.map +1 -0
- package/dist/chunk-DyJupG9U.cjs +74 -0
- package/dist/chunk-DyJupG9U.cjs.map +1 -0
- package/dist/chunk-DzCbinPo.js +9 -0
- package/dist/chunk-DzCbinPo.js.map +1 -0
- package/dist/chunk-GgcOmaXu.cjs +137 -0
- package/dist/chunk-GgcOmaXu.cjs.map +1 -0
- package/dist/chunk-GnVcZTQv.cjs +50 -0
- package/dist/chunk-GnVcZTQv.cjs.map +1 -0
- package/dist/chunk-JDLVWYk5.cjs +22 -0
- package/dist/chunk-JDLVWYk5.cjs.map +1 -0
- package/dist/chunk-NA04sFmY.js +2 -0
- package/dist/chunk-NqIZvB2L.js +44 -0
- package/dist/chunk-NqIZvB2L.js.map +1 -0
- package/dist/chunk-OGNas_Mn.cjs +654 -0
- package/dist/chunk-OGNas_Mn.cjs.map +1 -0
- package/dist/chunk-PeexRooj.cjs +12 -0
- package/dist/chunk-PeexRooj.cjs.map +1 -0
- package/dist/chunk-QUjeQKsz.js +26 -0
- package/dist/chunk-QUjeQKsz.js.map +1 -0
- package/dist/chunk-S0jc_E9W.cjs +62 -0
- package/dist/chunk-S0jc_E9W.cjs.map +1 -0
- package/dist/chunk-TLRG-UaM.js +453 -0
- package/dist/chunk-TLRG-UaM.js.map +1 -0
- package/dist/chunk-TYmd7TzW.cjs +68 -0
- package/dist/chunk-TYmd7TzW.cjs.map +1 -0
- package/dist/chunk-TlHnQSY_.js +250 -0
- package/dist/chunk-TlHnQSY_.js.map +1 -0
- package/dist/chunk-Vba_029j.js +36 -0
- package/dist/chunk-Vba_029j.js.map +1 -0
- package/dist/chunk-Vp0uJb7O.cjs +92 -0
- package/dist/chunk-Vp0uJb7O.cjs.map +1 -0
- package/dist/chunk-WPGdcwtf.cjs +15 -0
- package/dist/chunk-WPGdcwtf.cjs.map +1 -0
- package/dist/chunk-WUipjqNN.cjs +158 -0
- package/dist/chunk-WUipjqNN.cjs.map +1 -0
- package/dist/chunk-Y-zyJ0-m.js +6 -0
- package/dist/chunk-Y-zyJ0-m.js.map +1 -0
- package/dist/chunk-ZIIlDASG.js +94 -0
- package/dist/chunk-ZIIlDASG.js.map +1 -0
- package/dist/chunk-ZLDg2I1Z.js +6 -0
- package/dist/chunk-ZLDg2I1Z.js.map +1 -0
- package/dist/chunk-_jSTl9gW.cjs +1129 -0
- package/dist/chunk-_jSTl9gW.cjs.map +1 -0
- package/dist/chunk-b5CqEoo1.cjs +599 -0
- package/dist/chunk-b5CqEoo1.cjs.map +1 -0
- package/dist/chunk-bA-2OGXv.d.ts +3977 -0
- package/dist/chunk-bvwC3n0z.cjs +12 -0
- package/dist/chunk-bvwC3n0z.cjs.map +1 -0
- package/dist/chunk-cMQzXXQq.js +67 -0
- package/dist/chunk-cMQzXXQq.js.map +1 -0
- package/dist/chunk-cTRnGhbF.cjs +177 -0
- package/dist/chunk-cTRnGhbF.cjs.map +1 -0
- package/dist/chunk-dHKPMJ4D.js +85 -0
- package/dist/chunk-dHKPMJ4D.js.map +1 -0
- package/dist/chunk-d_BOXcT5.js +9 -0
- package/dist/chunk-d_BOXcT5.js.map +1 -0
- package/dist/chunk-ea1IbBcA.js +66 -0
- package/dist/chunk-ea1IbBcA.js.map +1 -0
- package/dist/chunk-f-dHVrF3.js +293 -0
- package/dist/chunk-f-dHVrF3.js.map +1 -0
- package/dist/chunk-h7Z5mAV_.cjs +41 -0
- package/dist/chunk-h7Z5mAV_.cjs.map +1 -0
- package/dist/chunk-jSgMzVr1.js +35 -0
- package/dist/chunk-jSgMzVr1.js.map +1 -0
- package/dist/chunk-kYE5SZgs.cjs +252 -0
- package/dist/chunk-kYE5SZgs.cjs.map +1 -0
- package/dist/chunk-lEnNKG6x.cjs +285 -0
- package/dist/chunk-lEnNKG6x.cjs.map +1 -0
- package/dist/chunk-lcml1N1G.js +11 -0
- package/dist/chunk-lcml1N1G.js.map +1 -0
- package/dist/chunk-nBK0qBXt.js +68 -0
- package/dist/chunk-nBK0qBXt.js.map +1 -0
- package/dist/chunk-njoANlUr.cjs +41 -0
- package/dist/chunk-njoANlUr.cjs.map +1 -0
- package/dist/chunk-nwutfrnH.cjs +430 -0
- package/dist/chunk-nwutfrnH.cjs.map +1 -0
- package/dist/chunk-o1EKuTLo.js +56 -0
- package/dist/chunk-o1EKuTLo.js.map +1 -0
- package/dist/chunk-oMFOZSQM.cjs +52 -0
- package/dist/chunk-oMFOZSQM.cjs.map +1 -0
- package/dist/chunk-pb64dLGD.cjs +682 -0
- package/dist/chunk-pb64dLGD.cjs.map +1 -0
- package/dist/chunk-s7kBzSlt.js +2 -0
- package/dist/chunk-uhXxE8xV.cjs +32 -0
- package/dist/chunk-uhXxE8xV.cjs.map +1 -0
- package/dist/chunk-vGzpsUSM.cjs +110 -0
- package/dist/chunk-vGzpsUSM.cjs.map +1 -0
- package/dist/chunk-vN_Di8Af.cjs +1890 -0
- package/dist/chunk-vN_Di8Af.cjs.map +1 -0
- package/dist/chunk-veLShVmw.js +41 -0
- package/dist/chunk-veLShVmw.js.map +1 -0
- package/dist/chunk-wTf5jOFv.js +253 -0
- package/dist/chunk-wTf5jOFv.js.map +1 -0
- package/dist/chunk-yO-Ek9RH.cjs +17 -0
- package/dist/chunk-yO-Ek9RH.cjs.map +1 -0
- package/dist/chunk-ye5UUSFw.js +280 -0
- package/dist/chunk-ye5UUSFw.js.map +1 -0
- package/dist/copilot/index.cjs +10 -0
- package/dist/copilot/index.d.cts +62 -0
- package/dist/copilot/index.d.ts +62 -0
- package/dist/copilot/index.js +4 -0
- package/dist/embed/index.cjs +1653 -0
- package/dist/embed/index.cjs.map +1 -0
- package/dist/embed/index.d.cts +291 -0
- package/dist/embed/index.d.ts +291 -0
- package/dist/embed/index.js +1643 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/headless/index.cjs +126 -0
- package/dist/headless/index.d.cts +4 -0
- package/dist/headless/index.d.ts +4 -0
- package/dist/headless/index.js +29 -0
- package/dist/import/index.cjs +403 -0
- package/dist/import/index.cjs.map +1 -0
- package/dist/import/index.d.cts +160 -0
- package/dist/import/index.d.ts +160 -0
- package/dist/import/index.js +393 -0
- package/dist/import/index.js.map +1 -0
- package/dist/index.cjs +8991 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4847 -0
- package/dist/index.d.ts +4847 -0
- package/dist/index.js +8768 -0
- package/dist/index.js.map +1 -0
- package/dist/map/index.cjs +36 -0
- package/dist/map/index.d.cts +2 -0
- package/dist/map/index.d.ts +2 -0
- package/dist/map/index.js +2 -0
- package/dist/styles.css +14684 -0
- package/dist/testing/index.cjs +398 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +302 -0
- package/dist/testing/index.d.ts +302 -0
- package/dist/testing/index.js +382 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/video/index.cjs +8 -0
- package/dist/video/index.d.cts +122 -0
- package/dist/video/index.d.ts +122 -0
- package/dist/video/index.js +2 -0
- package/package.json +226 -4
- package/src/agent/components/ActivityRow.tsx +226 -0
- package/src/agent/components/AgentEntityIndicator.tsx +67 -0
- package/src/agent/components/AgentMarkdown.tsx +530 -0
- package/src/agent/components/ChatComposer.tsx +161 -0
- package/src/agent/components/ChatTranscript.tsx +1358 -0
- package/src/agent/components/CopilotPanel.tsx +415 -0
- package/src/agent/components/CopilotStates.tsx +238 -0
- package/src/agent/components/CopilotTranscript.tsx +191 -0
- package/src/agent/components/MessageFeedback.tsx +100 -0
- package/src/agent/hooks/useAgentChatTransport.ts +61 -0
- package/src/agent/hooks/useAgentErrorCopy.ts +27 -0
- package/src/agent/hooks/useCopilotOpen.ts +68 -0
- package/src/agent/providers/AgentThreadsProvider.tsx +360 -0
- package/src/agent/providers/PromptPanelConversation.tsx +135 -0
- package/src/agent/rules/drawnNode.ts +24 -0
- package/src/alerts/components/MapAlerts.tsx +127 -0
- package/src/cache/hooks/useStudioCache.ts +40 -0
- package/src/cache/rules/studioCache.ts +145 -0
- package/src/collab/components/PeerEntityIndicator.tsx +150 -0
- package/src/collab/components/PresenceRoster.tsx +113 -0
- package/src/collab/components/peerLock.tsx +59 -0
- package/src/collab/hooks/useCollabOrganizationId.ts +24 -0
- package/src/collab/hooks/usePeerLockLabel.ts +41 -0
- package/src/collections/components/CollectionFormModal.tsx +280 -0
- package/src/collections/components/CollectionMultiSelect.tsx +640 -0
- package/src/collections/components/EditCollectionModal.tsx +114 -0
- package/src/collections/components/ManageCollectionsModal.tsx +692 -0
- package/src/collections/components/NewCollectionModal.tsx +87 -0
- package/src/collections/components/ShareCollectionModal.tsx +150 -0
- package/src/collections/hooks/useEntityCollections.ts +126 -0
- package/src/collections/hooks/useEveryPage.ts +33 -0
- package/src/controls/components/MapControlTooltip.tsx +84 -0
- package/src/controls/components/PoiOverlayMenu.tsx +342 -0
- package/src/controls/components/StudioControls.tsx +278 -0
- package/src/controls/rules/constants.ts +34 -0
- package/src/copilot/hooks/useStudioCopilotInset.ts +39 -0
- package/src/copilot/index.ts +29 -0
- package/src/directions/components/DirectionsModal.tsx +447 -0
- package/src/directions/components/directionsPdf.tsx +549 -0
- package/src/embed/components/DefaultViewControl.tsx +159 -0
- package/src/embed/components/EmbedBaseMapPicker.tsx +107 -0
- package/src/embed/components/EmbedCodeSection.tsx +329 -0
- package/src/embed/components/EmbedColumnsSection.tsx +167 -0
- package/src/embed/components/EmbedConfigForm.tsx +239 -0
- package/src/embed/components/EmbedElementSwitcher.tsx +85 -0
- package/src/embed/components/EmbedFieldControl.tsx +488 -0
- package/src/embed/components/EmbedGeneralSection.tsx +279 -0
- package/src/embed/components/EmbedKeyPanel.tsx +138 -0
- package/src/embed/components/EmbedSnippetCode.tsx +154 -0
- package/src/embed/components/EmbedStage.tsx +505 -0
- package/src/embed/components/EmbedTablePreview.tsx +134 -0
- package/src/embed/components/EmbedThemePicker.tsx +74 -0
- package/src/embed/components/EmbedTintPicker.tsx +76 -0
- package/src/embed/components/EmbedWizard.tsx +1031 -0
- package/src/embed/hooks/useEmbedCode.ts +170 -0
- package/src/embed/hooks/useEmbedCollectionItineraries.ts +42 -0
- package/src/embed/hooks/useEmbedLayerOptions.ts +75 -0
- package/src/embed/hooks/useEmbedPreviewCamera.ts +169 -0
- package/src/embed/index.ts +42 -0
- package/src/fullscreen/components/FullscreenHeader.tsx +77 -0
- package/src/fullscreen/components/FullscreenModal.tsx +80 -0
- package/src/fullscreen/components/WizardLayout.tsx +129 -0
- package/src/guards/components/AgentDrivingGuard.tsx +59 -0
- package/src/guards/components/UnsavedEditsGuard.tsx +210 -0
- package/src/guards/hooks/useReportUnsavedForm.ts +34 -0
- package/src/guards/hooks/useUnsavedEditsGuard.ts +44 -0
- package/src/headless/hooks/useAgentDriving.ts +21 -0
- package/src/headless/hooks/useBeginSegmentEdit.ts +89 -0
- package/src/headless/hooks/useBeginWaypointEdit.ts +74 -0
- package/src/headless/hooks/useCapabilitySet.ts +65 -0
- package/src/headless/hooks/useCollabResources.ts +148 -0
- package/src/headless/hooks/useCollectionScope.ts +37 -0
- package/src/headless/hooks/useEditActions.ts +250 -0
- package/src/headless/hooks/useEscapeKey.ts +43 -0
- package/src/headless/hooks/useInlineRename.ts +276 -0
- package/src/headless/hooks/useLiveAwareSegments.ts +88 -0
- package/src/headless/hooks/useLiveAwareWaypoints.ts +39 -0
- package/src/headless/hooks/useMapHoveredRow.ts +76 -0
- package/src/headless/hooks/usePlatformViewer.ts +452 -0
- package/src/headless/hooks/usePluginSlot.ts +235 -0
- package/src/headless/hooks/useRowEmphasis.ts +66 -0
- package/src/headless/hooks/useSegmentList.ts +428 -0
- package/src/headless/hooks/useSegmentRow.ts +370 -0
- package/src/headless/hooks/useSegmentRowActions.ts +267 -0
- package/src/headless/hooks/useShallowSelector.ts +145 -0
- package/src/headless/hooks/useStableMembers.ts +74 -0
- package/src/headless/hooks/useStoreSlice.ts +52 -0
- package/src/headless/hooks/useStreetViewCorridor.ts +120 -0
- package/src/headless/hooks/useStudioApi.ts +18 -0
- package/src/headless/hooks/useStudioDispatch.ts +180 -0
- package/src/headless/hooks/useStudioDispatchCount.ts +147 -0
- package/src/headless/hooks/useStudioDispatchUnsafe.ts +111 -0
- package/src/headless/hooks/useStudioEntitlement.ts +29 -0
- package/src/headless/hooks/useStudioFailureAlert.ts +67 -0
- package/src/headless/hooks/useStudioObserve.ts +38 -0
- package/src/headless/hooks/useStudioPreferences.ts +8 -0
- package/src/headless/hooks/useStudioSignedIn.ts +12 -0
- package/src/headless/hooks/useStudioStore.ts +72 -0
- package/src/headless/hooks/useStudioUnits.ts +23 -0
- package/src/headless/hooks/useStudioUrl.ts +24 -0
- package/src/headless/hooks/useStudioUserId.ts +5 -0
- package/src/headless/hooks/useStudioVerbHeld.ts +43 -0
- package/src/headless/hooks/useStudioViewer.ts +19 -0
- package/src/headless/hooks/useStudioViewerEntitlement.ts +40 -0
- package/src/headless/hooks/useStudioViewerItineraryLimit.ts +34 -0
- package/src/headless/hooks/useStudioViewerPreferences.ts +44 -0
- package/src/headless/hooks/useStudioViewerUnits.ts +50 -0
- package/src/headless/hooks/useStudioViewerUserId.ts +23 -0
- package/src/headless/hooks/useUiStore.ts +91 -0
- package/src/headless/hooks/useUiStoreShallow.ts +43 -0
- package/src/headless/hooks/useWaypointDetailsDialog.ts +52 -0
- package/src/headless/hooks/useWaypointList.ts +89 -0
- package/src/headless/hooks/useWaypointRow.ts +229 -0
- package/src/headless/hooks/useWaypointRowActions.ts +166 -0
- package/src/headless/index.ts +287 -0
- package/src/headless/providers/billingGate.tsx +129 -0
- package/src/headless/providers/copilot.tsx +155 -0
- package/src/headless/providers/mountayaStudio.tsx +127 -0
- package/src/headless/providers/navigationBlocker.tsx +91 -0
- package/src/headless/providers/notify.tsx +36 -0
- package/src/headless/providers/organizations.tsx +267 -0
- package/src/headless/providers/plugins.tsx +173 -0
- package/src/headless/providers/studio.tsx +1296 -0
- package/src/headless/providers/studioStrings.tsx +243 -0
- package/src/headless/rules/inputMethod.ts +19 -0
- package/src/hooks/useAgreementLimits.ts +165 -0
- package/src/hooks/useLayerCatalogOptions.ts +106 -0
- package/src/host/components/MountayaStudioHost.tsx +1018 -0
- package/src/host/hooks/useEmbeddedStudio.ts +24 -0
- package/src/host/hooks/useItineraryActivation.ts +126 -0
- package/src/host/hooks/useMemberGrants.ts +51 -0
- package/src/host/hooks/useStudioHostSurfaces.ts +100 -0
- package/src/host/hooks/useStudioPluginBinding.ts +133 -0
- package/src/host/hooks/useStudioSessionHeld.ts +111 -0
- package/src/host/hooks/useStudioToolBus.ts +127 -0
- package/src/host/hooks/useStudioToolContext.ts +175 -0
- package/src/host/providers/hostRegistry.tsx +144 -0
- package/src/host/providers/hostSurface.tsx +47 -0
- package/src/host/providers/hostVideo.tsx +73 -0
- package/src/import/components/DraftEntityList.tsx +298 -0
- package/src/import/components/FileDropInput.tsx +261 -0
- package/src/import/components/FileDropzone.tsx +97 -0
- package/src/import/components/ImportItineraryContent.tsx +133 -0
- package/src/import/components/ImportPreviewLegend.tsx +50 -0
- package/src/import/components/ImportPrimer.tsx +113 -0
- package/src/import/index.ts +32 -0
- package/src/import/providers/ImportRoutingGuideProvider.tsx +319 -0
- package/src/import/rules/routingGuidePictures.ts +20 -0
- package/src/index.ts +594 -0
- package/src/internal/components/Glyph.tsx +34 -0
- package/src/internal/components/MarkerGlyph.tsx +23 -0
- package/src/internal/components/MountayaMark.tsx +142 -0
- package/src/internal/hooks/useTextOverflow.ts +90 -0
- package/src/internal/providers/studioEditorRoot.tsx +42 -0
- package/src/internal/rules/editorRoot.ts +9 -0
- package/src/internal/rules/missingSeam.ts +32 -0
- package/src/itinerary/components/ActivityGuideModal.tsx +345 -0
- package/src/itinerary/components/ActivitySelect.tsx +204 -0
- package/src/itinerary/components/AddWaypointButton.tsx +151 -0
- package/src/itinerary/components/AscentInput.tsx +65 -0
- package/src/itinerary/components/Characteristics.tsx +129 -0
- package/src/itinerary/components/CursorReadout.tsx +66 -0
- package/src/itinerary/components/DistanceInput.tsx +67 -0
- package/src/itinerary/components/DraftProvenanceBanner.tsx +79 -0
- package/src/itinerary/components/DuplicateItineraryModal.tsx +341 -0
- package/src/itinerary/components/EditorSaveFooter.tsx +424 -0
- package/src/itinerary/components/ItineraryActionsMenu.tsx +655 -0
- package/src/itinerary/components/ItineraryForm.tsx +887 -0
- package/src/itinerary/components/ItineraryHeaderIdentity.tsx +121 -0
- package/src/itinerary/components/ItineraryHeaderMeta.tsx +68 -0
- package/src/itinerary/components/ItineraryHeaderTitle.tsx +88 -0
- package/src/itinerary/components/ItineraryIdentityFields.tsx +153 -0
- package/src/itinerary/components/ItineraryProfilePanel.tsx +619 -0
- package/src/itinerary/components/ItineraryProfileSheet.tsx +219 -0
- package/src/itinerary/components/ItinerarySubHeader.tsx +236 -0
- package/src/itinerary/components/PendingProfile.tsx +142 -0
- package/src/itinerary/components/PlaceCard.tsx +35 -0
- package/src/itinerary/components/PlaceMark.tsx +76 -0
- package/src/itinerary/components/ProfileAnalysisBars.tsx +84 -0
- package/src/itinerary/components/ProfileBar.tsx +215 -0
- package/src/itinerary/components/ProfileHeaderControls.tsx +116 -0
- package/src/itinerary/components/ProfileHeaderFigures.tsx +119 -0
- package/src/itinerary/components/ProfilePaceControl.tsx +97 -0
- package/src/itinerary/components/ProfileStat.tsx +76 -0
- package/src/itinerary/components/ProfileStatStrip.tsx +38 -0
- package/src/itinerary/components/RoadAccessModal.tsx +76 -0
- package/src/itinerary/components/RouteTypeControl.tsx +73 -0
- package/src/itinerary/components/SegmentGroupModal.tsx +312 -0
- package/src/itinerary/components/SegmentGroupRangePicker.tsx +228 -0
- package/src/itinerary/components/StagingCreateFooter.tsx +185 -0
- package/src/itinerary/components/StudioItineraryProfile.tsx +620 -0
- package/src/itinerary/components/SuggestForm.tsx +256 -0
- package/src/itinerary/components/SuggestFormActions.tsx +124 -0
- package/src/itinerary/components/SuggestionResultRow.tsx +98 -0
- package/src/itinerary/components/SuggestionResultsList.tsx +85 -0
- package/src/itinerary/components/WaypointAmenityPicker.tsx +105 -0
- package/src/itinerary/components/WaypointDetailFields.tsx +604 -0
- package/src/itinerary/components/WaypointDetailsModal.tsx +134 -0
- package/src/itinerary/components/WaypointDetailsRows.tsx +707 -0
- package/src/itinerary/components/WaypointDetailsView.tsx +389 -0
- package/src/itinerary/components/WaypointIconCircle.tsx +211 -0
- package/src/itinerary/components/WaypointIconPicker.tsx +82 -0
- package/src/itinerary/components/WaypointMarkers.tsx +293 -0
- package/src/itinerary/components/WaypointPreviewCard.tsx +56 -0
- package/src/itinerary/components/WaypointSectionNav.tsx +151 -0
- package/src/itinerary/components/WaypointSwitcher.tsx +143 -0
- package/src/itinerary/components/WaypointWorkbench.tsx +263 -0
- package/src/itinerary/hooks/useDuplicateDraft.ts +205 -0
- package/src/itinerary/hooks/useDuplicateSource.ts +69 -0
- package/src/itinerary/hooks/useFriendlyNameBanks.ts +26 -0
- package/src/itinerary/hooks/useItineraryEditable.ts +89 -0
- package/src/itinerary/hooks/useItineraryPace.ts +104 -0
- package/src/itinerary/hooks/useItinerarySubject.ts +117 -0
- package/src/itinerary/hooks/useOpenItineraryEditable.ts +39 -0
- package/src/itinerary/hooks/useProfileOverlay.tsx +61 -0
- package/src/itinerary/hooks/useProfileSeries.ts +95 -0
- package/src/itinerary/hooks/useProfileVisibility.ts +149 -0
- package/src/itinerary/hooks/useSeedDraftOrganization.ts +85 -0
- package/src/itinerary/hooks/useSegmentGroupSave.ts +143 -0
- package/src/itinerary/hooks/useStartFromSuggestion.ts +63 -0
- package/src/itinerary/hooks/useStudioItinerary.ts +35 -0
- package/src/itinerary/hooks/useSuggestionPin.ts +36 -0
- package/src/itinerary/hooks/useWaypointCardWords.ts +51 -0
- package/src/itinerary/hooks/useWaypointCreateFollowUp.ts +158 -0
- package/src/itinerary/hooks/useWaypointDetailsEditor.ts +280 -0
- package/src/itinerary/hooks/useWaypointSectionEntries.ts +114 -0
- package/src/itinerary/providers/ActivityGuideProvider.tsx +113 -0
- package/src/itinerary/providers/ItineraryViewProvider.tsx +146 -0
- package/src/itinerary/rules/amenityGlyphs.ts +25 -0
- package/src/itinerary/rules/cursorReadoutData.ts +34 -0
- package/src/itinerary/rules/profileCursor.ts +11 -0
- package/src/itinerary/rules/profileModel.ts +98 -0
- package/src/itinerary/rules/shownFocus.ts +11 -0
- package/src/itinerary/rules/waypointGlyphs.ts +42 -0
- package/src/itinerary/stores/profileHover.ts +54 -0
- package/src/lists/components/AddSegmentButton.tsx +240 -0
- package/src/lists/components/EditActions.tsx +153 -0
- package/src/lists/components/EditorListSection.tsx +117 -0
- package/src/lists/components/EditorSegmentRow.tsx +458 -0
- package/src/lists/components/ItineraryAddSegmentButton.tsx +66 -0
- package/src/lists/components/ItinerarySegmentList.tsx +301 -0
- package/src/lists/components/ItineraryWaypointList.tsx +257 -0
- package/src/lists/components/SegmentList.tsx +549 -0
- package/src/lists/components/SegmentSeam.tsx +292 -0
- package/src/lists/components/WaypointList.tsx +233 -0
- package/src/map/components/ContextMenuPopup.tsx +913 -0
- package/src/map/components/MapAnchoredPopup.tsx +285 -0
- package/src/map/components/SegmentViaPopup.tsx +133 -0
- package/src/map/hooks/useAccessRestrictions.ts +25 -0
- package/src/map/hooks/useEmbedConstraints.ts +359 -0
- package/src/map/hooks/useEmbedDisplaySeed.ts +61 -0
- package/src/map/hooks/useEmbedReady.ts +137 -0
- package/src/map/hooks/useHeldTileSources.ts +65 -0
- package/src/map/hooks/useSegmentColor.ts +24 -0
- package/src/map/hooks/useSpecificationLayers.ts +25 -0
- package/src/map/hooks/useStudioConstraints.ts +135 -0
- package/src/map/hooks/useStudioContextMenu.ts +34 -0
- package/src/map/hooks/useStudioContextMenuWaypoint.ts +119 -0
- package/src/map/hooks/useStudioEditCommitReporter.ts +56 -0
- package/src/map/hooks/useStudioEditEngine.ts +271 -0
- package/src/map/hooks/useStudioEnrichment.ts +117 -0
- package/src/map/hooks/useStudioItinerarySelection.ts +484 -0
- package/src/map/hooks/useStudioLayersScope.ts +34 -0
- package/src/map/hooks/useStudioMapBindings.ts +178 -0
- package/src/map/hooks/useStudioMapEditSeams.ts +161 -0
- package/src/map/hooks/useStudioMapSync.ts +127 -0
- package/src/map/hooks/useStudioOverlay.ts +75 -0
- package/src/map/hooks/useStudioOverlayWithdrawal.ts +52 -0
- package/src/map/hooks/useStudioOverlaysEntitled.ts +12 -0
- package/src/map/hooks/useStudioPeerDrafts.ts +126 -0
- package/src/map/hooks/useStudioPoiLayers.ts +110 -0
- package/src/map/hooks/useStudioPreviewSync.ts +205 -0
- package/src/map/hooks/useStudioSegmentEditing.ts +239 -0
- package/src/map/hooks/useStudioSegmentViaPrompt.ts +38 -0
- package/src/map/hooks/useStudioSplitPicking.ts +411 -0
- package/src/map/hooks/useStudioSuggestionPicking.ts +178 -0
- package/src/map/hooks/useStudioTimestamp.ts +226 -0
- package/src/map/hooks/useStudioUrlState.ts +340 -0
- package/src/map/hooks/useStudioWaypointEditing.ts +251 -0
- package/src/map/hooks/useStudioZoneEditing.ts +260 -0
- package/src/map/hooks/useStudioZoneOriginPicking.ts +129 -0
- package/src/map/hooks/useStudioZoneSelection.ts +240 -0
- package/src/map/hooks/useTileLayers.ts +33 -0
- package/src/map/index.ts +67 -0
- package/src/map/rules/editKeyboard.ts +216 -0
- package/src/map/rules/editTooltip.ts +222 -0
- package/src/map/rules/nearerEscape.ts +107 -0
- package/src/map/rules/poiGlyphs.ts +40 -0
- package/src/modals/components/AppModal.tsx +280 -0
- package/src/modals/components/ConfirmModal.tsx +223 -0
- package/src/modals/components/ExportModal.tsx +538 -0
- package/src/modals/components/LocationPermissionModal.tsx +129 -0
- package/src/modals/components/ModalFooter.tsx +187 -0
- package/src/modals/hooks/useConfirmGate.tsx +209 -0
- package/src/modals/hooks/useDiscardGuard.tsx +168 -0
- package/src/panels/components/EditShortcutHint.tsx +115 -0
- package/src/panels/components/FloatingOverlay.tsx +243 -0
- package/src/panels/components/GlyphPickerGrid.tsx +84 -0
- package/src/panels/components/PanelRouter.tsx +133 -0
- package/src/panels/components/PickerCard.tsx +108 -0
- package/src/panels/components/RadioOptionCard.tsx +116 -0
- package/src/panels/components/SidenavContentBody.tsx +56 -0
- package/src/panels/components/SidenavContentFooter.tsx +27 -0
- package/src/panels/components/SidenavContentHeader.tsx +172 -0
- package/src/panels/components/SidenavFormActions.tsx +96 -0
- package/src/panels/components/StudioFormStack.tsx +44 -0
- package/src/panels/components/StudioHeader.tsx +117 -0
- package/src/panels/components/StudioLayersPanel.tsx +909 -0
- package/src/panels/components/StudioPreferencesPanel.tsx +199 -0
- package/src/panels/rules/studioHeader.ts +68 -0
- package/src/plugins/components/PluginBoundary.tsx +62 -0
- package/src/plugins/components/PluginContextMenuActions.tsx +73 -0
- package/src/plugins/components/PluginControls.tsx +101 -0
- package/src/plugins/components/PluginHeldView.tsx +77 -0
- package/src/plugins/components/PluginMenuItems.tsx +63 -0
- package/src/plugins/components/PluginProfileHeader.tsx +71 -0
- package/src/plugins/components/PluginProfilePlot.tsx +134 -0
- package/src/plugins/components/PluginSlotItems.tsx +55 -0
- package/src/primitives/components/ActivityIcon.tsx +106 -0
- package/src/primitives/components/AllowlistField.tsx +508 -0
- package/src/primitives/components/CopyIconButton.tsx +80 -0
- package/src/primitives/components/DateTimeInput.tsx +133 -0
- package/src/primitives/components/DateTimePickerField.tsx +110 -0
- package/src/primitives/components/DescriptiveMenuItem.tsx +80 -0
- package/src/primitives/components/DialogSubject.tsx +102 -0
- package/src/primitives/components/DisabledMenuItem.tsx +45 -0
- package/src/primitives/components/DisabledReason.tsx +34 -0
- package/src/primitives/components/EmptyState.tsx +186 -0
- package/src/primitives/components/ErrorAlert.tsx +35 -0
- package/src/primitives/components/ErrorBoundary.tsx +55 -0
- package/src/primitives/components/FieldLabel.tsx +34 -0
- package/src/primitives/components/FormErrorAlert.tsx +33 -0
- package/src/primitives/components/GroupLabelledBy.tsx +31 -0
- package/src/primitives/components/LanguageSelect.tsx +139 -0
- package/src/primitives/components/ListSkeleton.tsx +64 -0
- package/src/primitives/components/MarqueeText.tsx +61 -0
- package/src/primitives/components/OrganizationScopeItem.tsx +146 -0
- package/src/primitives/components/OrganizationSelect.tsx +149 -0
- package/src/primitives/components/PointField.tsx +75 -0
- package/src/primitives/components/PrivacyControl.tsx +127 -0
- package/src/primitives/components/RenameInput.tsx +159 -0
- package/src/primitives/components/RequiredLabelWithHelp.tsx +76 -0
- package/src/primitives/components/SegmentIcon.tsx +43 -0
- package/src/primitives/components/SegmentIconLabel.tsx +37 -0
- package/src/primitives/components/SpeedInput.tsx +222 -0
- package/src/primitives/components/StudioSectionBoundary.tsx +56 -0
- package/src/primitives/components/StudioSegmentedControl.tsx +23 -0
- package/src/primitives/components/UnitPickerField.tsx +62 -0
- package/src/primitives/components/UnitPickerGrid.tsx +71 -0
- package/src/primitives/components/WarningAlert.tsx +34 -0
- package/src/primitives/hooks/useCompactLayout.ts +30 -0
- package/src/primitives/hooks/useSpeedControlLabel.ts +28 -0
- package/src/primitives/rules/activityBadge.ts +87 -0
- package/src/publication/components/PublicationBadge.tsx +42 -0
- package/src/publication/components/PublicationDot.tsx +31 -0
- package/src/publication/components/PublicationNotice.tsx +115 -0
- package/src/publication/components/PublicationSettledPill.tsx +43 -0
- package/src/publication/components/PublicationStatus.tsx +52 -0
- package/src/publication/components/UnpublishedPanel.tsx +133 -0
- package/src/publication/hooks/usePublicationHint.ts +235 -0
- package/src/publication/hooks/usePublishAct.ts +101 -0
- package/src/publication/hooks/usePublishItinerary.ts +27 -0
- package/src/publication/hooks/usePublishZone.ts +27 -0
- package/src/publication/hooks/usePublishableScope.ts +23 -0
- package/src/publication/hooks/usePublishedItinerary.ts +83 -0
- package/src/rows/components/ReadOnlySegmentRow.tsx +155 -0
- package/src/rows/components/RouteMetricLine.tsx +90 -0
- package/src/rows/components/RowMetadata.tsx +92 -0
- package/src/rows/components/SegmentRow.tsx +381 -0
- package/src/rows/components/SegmentRowActions.tsx +187 -0
- package/src/rows/components/SegmentRowBody.tsx +197 -0
- package/src/rows/components/StudioToggleRow.tsx +71 -0
- package/src/rows/components/SuggestionList.tsx +100 -0
- package/src/rows/components/SuggestionRowLayout.tsx +164 -0
- package/src/rows/components/WaypointRow.tsx +176 -0
- package/src/rows/components/WaypointRowLayout.tsx +279 -0
- package/src/rows/components/lockChrome.tsx +106 -0
- package/src/rules/menuActions.ts +149 -0
- package/src/rules/sizing.ts +127 -0
- package/src/rules/studioConfig.ts +719 -0
- package/src/search/components/CategoryTabs.tsx +136 -0
- package/src/search/components/ResultRow.tsx +242 -0
- package/src/search/components/ResultsList.tsx +182 -0
- package/src/search/components/SearchInput.tsx +100 -0
- package/src/search/components/SearchTab.tsx +614 -0
- package/src/sections/components/RailSwitcher.tsx +179 -0
- package/src/sections/components/SectionCard.tsx +48 -0
- package/src/sections/components/SectionHead.tsx +42 -0
- package/src/sections/components/SectionTabs.tsx +231 -0
- package/src/segments/components/SegmentColorCircle.tsx +118 -0
- package/src/segments/components/SegmentColorPicker.tsx +134 -0
- package/src/segments/components/SegmentModeControl.tsx +118 -0
- package/src/segments/components/SegmentRowMenu.tsx +449 -0
- package/src/segments/components/SegmentRowPopover.tsx +163 -0
- package/src/segments/components/SegmentSelect.tsx +116 -0
- package/src/segments/components/SegmentSpeedControl.tsx +299 -0
- package/src/share/components/ShareLinkManage.tsx +699 -0
- package/src/share/components/ShareModal.tsx +182 -0
- package/src/share/components/ShareSheet.tsx +178 -0
- package/src/share/components/ShareViewModal.tsx +131 -0
- package/src/share/hooks/useCanManageShareLink.ts +51 -0
- package/src/studio/components/MountayaStudio.tsx +1170 -0
- package/src/studio/components/MountayaStudioViewer.tsx +775 -0
- package/src/studio/hooks/useEmbeddedStudioConfig.ts +60 -0
- package/src/studio/hooks/useViewerActivation.ts +47 -0
- package/src/studio/hooks/useViewerCollectionSpecification.ts +58 -0
- package/src/studio/hooks/useViewerEmbedConfig.ts +74 -0
- package/src/studio/hooks/useViewerFraming.ts +211 -0
- package/src/studio/hooks/useViewerMapBindings.ts +109 -0
- package/src/styles.css +3994 -0
- package/src/testing/collections.ts +40 -0
- package/src/testing/hostRegistry.tsx +109 -0
- package/src/testing/index.ts +65 -0
- package/src/testing/itinerary.ts +297 -0
- package/src/testing/mountayaClient.tsx +218 -0
- package/src/testing/viewer.tsx +171 -0
- package/src/theme/components/StudioPortalScope.tsx +130 -0
- package/src/theme/hooks/useResolvedStudioTheme.ts +37 -0
- package/src/theme/rules/density.ts +157 -0
- package/src/theme/rules/mountayaStudioTheme.ts +114 -0
- package/src/theme/rules/passwordManager.ts +20 -0
- package/src/theme/rules/tokenStyle.ts +18 -0
- package/src/theme/rules/tokens.ts +71 -0
- package/src/theme/rules/tone.ts +34 -0
- package/src/theme/rules/zIndex.ts +40 -0
- package/src/video/components/CameraStep.tsx +82 -0
- package/src/video/components/DirectingScrim.tsx +28 -0
- package/src/video/components/DirectorChat.tsx +79 -0
- package/src/video/components/FormatStep.tsx +487 -0
- package/src/video/components/ModeCards.tsx +141 -0
- package/src/video/components/PlanNumberField.tsx +54 -0
- package/src/video/components/PreviewControls.tsx +212 -0
- package/src/video/components/PreviewStage.tsx +319 -0
- package/src/video/components/PreviewSurface.tsx +247 -0
- package/src/video/components/PreviewWatermark.tsx +77 -0
- package/src/video/components/ProfileOverlayCanvas.tsx +195 -0
- package/src/video/components/ProfileStep.tsx +254 -0
- package/src/video/components/RecordProgress.tsx +117 -0
- package/src/video/components/ReviewStep.tsx +244 -0
- package/src/video/components/ShotList.tsx +452 -0
- package/src/video/components/VideoExportWizard.tsx +827 -0
- package/src/video/components/WizardDirectingIndicator.tsx +57 -0
- package/src/video/components/WizardFooter.tsx +112 -0
- package/src/video/hooks/usePreviewPlanRefresh.ts +91 -0
- package/src/video/hooks/useVideoItinerarySubject.ts +18 -0
- package/src/video/hooks/useVideoOrganizationId.ts +30 -0
- package/src/video/hooks/useVideoPreviewSeed.ts +203 -0
- package/src/video/hooks/useVideoProfileSeed.ts +53 -0
- package/src/video/hooks/useVideoPublication.ts +29 -0
- package/src/video/hooks/useVideoRouteReady.ts +52 -0
- package/src/video/hooks/useVideoRouteSync.ts +100 -0
- package/src/video/hooks/useVideoTileTransform.ts +88 -0
- package/src/video/index.ts +24 -0
- package/src/video/providers/DirectorChatProvider.tsx +293 -0
- package/src/video/rules/changeTo.ts +20 -0
- package/src/zone/components/ZoneActionsMenu.tsx +305 -0
- package/src/zone/components/ZoneAvailabilityFields.tsx +98 -0
- package/src/zone/components/ZoneForm.tsx +622 -0
- package/src/zone/components/ZoneInheritedContext.tsx +70 -0
- package/src/zone/components/ZoneLevelSelect.tsx +86 -0
- package/src/zone/components/ZoneMetadataFields.tsx +89 -0
- package/src/zone/components/ZoneMethodSelect.tsx +90 -0
- package/src/zone/components/ZoneModeSelect.tsx +98 -0
- package/src/zone/components/ZoneRangeInput.tsx +129 -0
- package/src/zone/components/ZoneReachabilityFields.tsx +120 -0
- package/src/zone/components/ZoneSubHeader.tsx +188 -0
- package/src/zone/components/ZoneVisibility.tsx +94 -0
- package/src/zone/hooks/useStudioReachabilityStart.ts +79 -0
- package/src/zone/hooks/useStudioZonesBrowsed.ts +32 -0
|
@@ -0,0 +1,2232 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as useAgentErrorCopy, l as CopilotNoAccessNotice, o as useAgentChatTransport, p as CopilotSetupNotice } from "./chunk-f-dHVrF3.js";
|
|
3
|
+
import { n as FullscreenHeader, t as FullscreenModal } from "./chunk-Af0f-OjN.js";
|
|
4
|
+
import { t as WizardLayout } from "./chunk-BQkKY_kf.js";
|
|
5
|
+
import { t as useStudioDispatch } from "./chunk-nBK0qBXt.js";
|
|
6
|
+
import { t as useStudioEntitlement } from "./chunk-lcml1N1G.js";
|
|
7
|
+
import { n as useUiStoreApi, t as useUiStore } from "./chunk-CsnIpELM.js";
|
|
8
|
+
import { a as useCopilotSetupAction, r as useCopilotAvailability, s as useStoreSlice } from "./chunk-BZCKMlN8.js";
|
|
9
|
+
import { D as useStudioToolContext, a as useStudioActivityIconUrl, g as useStudioLanguageMark, i as useStudioActivities, p as useStudioFormatters, u as useStudioDemUrl } from "./chunk-TlHnQSY_.js";
|
|
10
|
+
import { n as useStudioScopedStrings, t as StudioStringsScope } from "./chunk-B7d3NIaH.js";
|
|
11
|
+
import { t as DialogSubject } from "./chunk-C6Mr3Z8L.js";
|
|
12
|
+
import { t as PublicationNotice } from "./chunk-DsTU_5Be.js";
|
|
13
|
+
import { t as SectionHead } from "./chunk-CyDQK1JF.js";
|
|
14
|
+
import { t as SectionNav } from "./chunk-B-QQkaWk.js";
|
|
15
|
+
import { r as useItinerarySubjectById } from "./chunk-veLShVmw.js";
|
|
16
|
+
import { t as useStudioItinerary } from "./chunk-BhLItb06.js";
|
|
17
|
+
import { t as useStudioPreferences } from "./chunk-CblkEI9o.js";
|
|
18
|
+
import { t as useUiStoreShallow } from "./chunk-BO_yHMn2.js";
|
|
19
|
+
import { t as missingSeam } from "./chunk-DlcsA1GQ.js";
|
|
20
|
+
import { t as RadioOptionCard } from "./chunk-BJAn10wR.js";
|
|
21
|
+
import { a as iconSizes, s as Glyph$1 } from "./chunk-C7NizUxN.js";
|
|
22
|
+
import { n as ChatComposer, t as ChatTranscript } from "./chunk-Cv1FyWmK.js";
|
|
23
|
+
import { t as useShallowSelector } from "./chunk-BhelUZ4P.js";
|
|
24
|
+
import { t as UnpublishedPanel } from "./chunk-C06UWdDq.js";
|
|
25
|
+
import { r as useStudioHostRegistry } from "./chunk-D7XBi__G.js";
|
|
26
|
+
import { a as LanguageSelect, t as UnitPickerGrid } from "./chunk-CI2PEZIK.js";
|
|
27
|
+
import { t as ErrorAlert } from "./chunk-4D4as_tP.js";
|
|
28
|
+
import { ActionIcon, Alert, Anchor, Box, Button, Center, Group, Input, Loader, Menu, NumberInput, Overlay, Paper, Popover, Progress, Radio, SegmentedControl, Slider, Stack, Switch, Tabs, Text, ThemeIcon, Tooltip, UnstyledButton } from "@mantine/core";
|
|
29
|
+
import { DEFAULT_HOLD_MS, DEFAULT_SHOT_PITCH_DEG, DEFAULT_SHOT_ZOOM, PREVIEW_PLAN_REFRESH_DEBOUNCE_MS, VIDEO_STEP_ORDER, activityForId, cameraBearingModeSchema, cameraModeSchema, cameraPlanSchema, cameraShotBaseSchema, createVideoDirectorStore, defaultVideoExportProfile, languageSchema, previewRefreshDisposition, profileDesignSchema, resolveBaseTerrain, resolveDemUrl, selectDirecting, selectVideoExportPlan, selectVideoExportRoute, selectVideoExportStatus, unitLengthSchema, unitPaceSchema, unitSlopeSchema, videoRouteSpans } from "@mountaya/studio";
|
|
30
|
+
import { createContext, memo, use, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
31
|
+
import { clampMapLanguage } from "@mountaya/elements/style";
|
|
32
|
+
import { ASPECT_OPTIONS, FORMAT_OPTIONS, FPS_OPTIONS, QUALITY_OPTIONS, RESOLUTION_OPTIONS, failureAlertFor, lengthUnitOptions, paceUnitOptions, publicationStateOf, slopeUnitOptions } from "@mountaya/studio/strings";
|
|
33
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
+
import { languageEndonym as languageEndonym$1 } from "@mountaya/elements/i18n";
|
|
35
|
+
import { useLatestRef, useMountayaLayersManifest } from "@mountaya/elements-react";
|
|
36
|
+
import { DirectorChatEngine } from "@mountaya/studio/agent";
|
|
37
|
+
import { boundsOf } from "@mountaya/elements/geo";
|
|
38
|
+
import { useId as useId$1, useWindowEvent } from "@mantine/hooks";
|
|
39
|
+
import { createVideoDirectorBus } from "@mountaya/studio/handlers";
|
|
40
|
+
import { buildElevationPoints, buildInfoBands } from "@mountaya/elements/profile";
|
|
41
|
+
import { segmentsForSelection } from "@mountaya/elements/data";
|
|
42
|
+
import { DEGREES_PER_TURN, MILLISECONDS_PER_SECOND, convertDuration, convertProportion } from "@mountaya/elements/units";
|
|
43
|
+
import { ViewerMapView } from "@mountaya/elements-react/editor";
|
|
44
|
+
import { createTransformRequest } from "@mountaya/elements";
|
|
45
|
+
import { aspectRatio, bitrateForOutput, estimatedVideoSizeMb, itineraryToRouteGeometry, planDurationMs, representativeStillFraction, resolveProfileSamples, routeLengthMeters, suggestVideoLengthMs, videoPresets } from "@mountaya/elements/camera";
|
|
46
|
+
import { MAX_TILE_CACHE_SIZE, VideoRunEngine, WATERMARK_INSET_PX, WATERMARK_REFERENCE_SHORT_SIDE, WATERMARK_URL, WATERMARK_WIDTH_PX, buildProfileCurve, ensureOverlayFonts, profileOverlayDesigns } from "@mountaya/elements/video";
|
|
47
|
+
const useVideoItinerarySubject = (itineraryId) => useItinerarySubjectById(itineraryId ?? void 0);
|
|
48
|
+
const useVideoOrganizationId = () => {
|
|
49
|
+
const itineraryId = useUiStore((state) => state.videoExport?.itineraryId ?? null);
|
|
50
|
+
const { data } = useStudioItinerary(itineraryId ?? void 0);
|
|
51
|
+
return data?.organization_id;
|
|
52
|
+
};
|
|
53
|
+
const useVideoProfileSeed = () => {
|
|
54
|
+
const { dispatch } = useStudioDispatch();
|
|
55
|
+
const preferencesRef = useLatestRef(useStudioPreferences());
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const preferences = preferencesRef.current;
|
|
58
|
+
const length = unitLengthSchema.catch("metric").parse(preferences?.length);
|
|
59
|
+
const pace = unitPaceSchema.catch("per-time").parse(preferences?.pace);
|
|
60
|
+
const slope = unitSlopeSchema.catch("degrees").parse(preferences?.slope);
|
|
61
|
+
const language = languageSchema.catch("en").parse(preferences?.language);
|
|
62
|
+
dispatch("studio.video.profile.units.set", {
|
|
63
|
+
length,
|
|
64
|
+
pace,
|
|
65
|
+
slope
|
|
66
|
+
});
|
|
67
|
+
dispatch("studio.video.profile.language.set", { language });
|
|
68
|
+
}, [dispatch, preferencesRef]);
|
|
69
|
+
};
|
|
70
|
+
const useVideoPublication = (itineraryId) => {
|
|
71
|
+
const { data, isError } = useStudioItinerary(itineraryId ?? void 0);
|
|
72
|
+
return publicationStateOf(data, isError);
|
|
73
|
+
};
|
|
74
|
+
const useVideoRouteReady = () => {
|
|
75
|
+
const { itineraryId, segmentId } = useUiStoreShallow((state) => ({
|
|
76
|
+
itineraryId: state.videoExport?.itineraryId ?? null,
|
|
77
|
+
segmentId: state.videoExport?.segmentId ?? null
|
|
78
|
+
}));
|
|
79
|
+
const { data, isError } = useStudioItinerary(itineraryId ?? void 0, "published");
|
|
80
|
+
return useMemo(() => {
|
|
81
|
+
if (!data) return isError ? "error" : "loading";
|
|
82
|
+
return itineraryToRouteGeometry(data, segmentId) ? "ready" : "empty";
|
|
83
|
+
}, [
|
|
84
|
+
data,
|
|
85
|
+
isError,
|
|
86
|
+
segmentId
|
|
87
|
+
]);
|
|
88
|
+
};
|
|
89
|
+
const useVideoRouteSync = () => {
|
|
90
|
+
const { dispatch } = useStudioDispatch();
|
|
91
|
+
const { itineraryId, segmentId } = useUiStoreShallow((state) => ({
|
|
92
|
+
itineraryId: state.videoExport?.itineraryId ?? null,
|
|
93
|
+
segmentId: state.videoExport?.segmentId ?? null
|
|
94
|
+
}));
|
|
95
|
+
const { data } = useStudioItinerary(itineraryId ?? void 0, "published");
|
|
96
|
+
const categories = useStudioActivities();
|
|
97
|
+
const activityIconUrl = useStudioActivityIconUrl();
|
|
98
|
+
const activity = data ? activityForId(categories, data.activity_id ?? "") : null;
|
|
99
|
+
const activityGlyphUrl = (activity ? activityIconUrl(activity.slug) : null) ?? null;
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (!itineraryId || !data) return;
|
|
102
|
+
const route = itineraryToRouteGeometry(data, segmentId);
|
|
103
|
+
if (!route) {
|
|
104
|
+
dispatch("studio.video.route.set", {
|
|
105
|
+
activityGlyphUrl: null,
|
|
106
|
+
profileSource: null,
|
|
107
|
+
route: null
|
|
108
|
+
});
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const segments = segmentsForSelection(data, segmentId);
|
|
112
|
+
const profileSource = {
|
|
113
|
+
elevationPoints: buildElevationPoints(segments),
|
|
114
|
+
segmentSpans: videoRouteSpans(data, segmentId),
|
|
115
|
+
slopeBands: buildInfoBands(segments, (segment) => segment.slope_info),
|
|
116
|
+
surfaceBands: buildInfoBands(segments, (segment) => segment.surface_info),
|
|
117
|
+
waytypeBands: buildInfoBands(segments, (segment) => segment.way_type_info)
|
|
118
|
+
};
|
|
119
|
+
dispatch("studio.video.route.set", {
|
|
120
|
+
activityGlyphUrl,
|
|
121
|
+
profileSource,
|
|
122
|
+
route
|
|
123
|
+
});
|
|
124
|
+
}, [
|
|
125
|
+
activityGlyphUrl,
|
|
126
|
+
dispatch,
|
|
127
|
+
data,
|
|
128
|
+
itineraryId,
|
|
129
|
+
segmentId
|
|
130
|
+
]);
|
|
131
|
+
};
|
|
132
|
+
const SECTIONS$12 = [
|
|
133
|
+
"confirm",
|
|
134
|
+
"copilot",
|
|
135
|
+
"director",
|
|
136
|
+
"prompt"
|
|
137
|
+
];
|
|
138
|
+
const DirectorChatContext = createContext(null);
|
|
139
|
+
const useDirectorChat = () => {
|
|
140
|
+
const value = use(DirectorChatContext);
|
|
141
|
+
if (!value) throw missingSeam("useDirectorChat", { component: "DirectorChatProvider" });
|
|
142
|
+
return value;
|
|
143
|
+
};
|
|
144
|
+
const useDirectorChatSurface = () => use(DirectorChatContext);
|
|
145
|
+
const useDirectorStore = (selector) => {
|
|
146
|
+
const { store } = useDirectorChat();
|
|
147
|
+
return useStoreSlice(store, selector);
|
|
148
|
+
};
|
|
149
|
+
const hold = () => {};
|
|
150
|
+
const directorPair = (config) => {
|
|
151
|
+
const store = createVideoDirectorStore();
|
|
152
|
+
return {
|
|
153
|
+
engine: new DirectorChatEngine({
|
|
154
|
+
...config,
|
|
155
|
+
store
|
|
156
|
+
}),
|
|
157
|
+
store
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
const DirectorChatSession = ({ ctx, invalidateAiConfig, publish, recoveryAddendum }) => {
|
|
161
|
+
const strings = useStudioScopedStrings(SECTIONS$12);
|
|
162
|
+
const [bus] = useState(createVideoDirectorBus);
|
|
163
|
+
const organizationId = useVideoOrganizationId() ?? null;
|
|
164
|
+
const transport = useAgentChatTransport();
|
|
165
|
+
const config = {
|
|
166
|
+
bus,
|
|
167
|
+
context: ctx,
|
|
168
|
+
errorCopy: useAgentErrorCopy(),
|
|
169
|
+
invalidateAiConfig,
|
|
170
|
+
organizationId,
|
|
171
|
+
recoveryAddendum,
|
|
172
|
+
strings,
|
|
173
|
+
transport
|
|
174
|
+
};
|
|
175
|
+
const [{ engine, store }, setHeld] = useState(() => directorPair(config));
|
|
176
|
+
const latestConfig = useRef(config);
|
|
177
|
+
useEffect(() => {
|
|
178
|
+
latestConfig.current = config;
|
|
179
|
+
engine.configure(config);
|
|
180
|
+
});
|
|
181
|
+
const setups = useRef(0);
|
|
182
|
+
const ended = useRef(null);
|
|
183
|
+
useEffect(() => {
|
|
184
|
+
if (ended.current === engine) {
|
|
185
|
+
setHeld(directorPair(latestConfig.current));
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
setups.current += 1;
|
|
189
|
+
const setup = setups.current;
|
|
190
|
+
const release = engine.subscribe(hold);
|
|
191
|
+
return () => {
|
|
192
|
+
release();
|
|
193
|
+
queueMicrotask(() => {
|
|
194
|
+
if (setups.current === setup) {
|
|
195
|
+
ended.current = engine;
|
|
196
|
+
engine.dispose();
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
}, [engine]);
|
|
201
|
+
const stop = useCallback(() => engine.stop(), [engine]);
|
|
202
|
+
const submit = useCallback((message) => engine.submit(message), [engine]);
|
|
203
|
+
const directing = useStoreSlice(store, selectDirecting);
|
|
204
|
+
const value = useMemo(() => ({
|
|
205
|
+
directing,
|
|
206
|
+
stop,
|
|
207
|
+
store,
|
|
208
|
+
submit
|
|
209
|
+
}), [
|
|
210
|
+
directing,
|
|
211
|
+
stop,
|
|
212
|
+
store,
|
|
213
|
+
submit
|
|
214
|
+
]);
|
|
215
|
+
useLayoutEffect(() => {
|
|
216
|
+
publish(value);
|
|
217
|
+
}, [publish, value]);
|
|
218
|
+
useLayoutEffect(() => () => publish(null), [publish]);
|
|
219
|
+
return null;
|
|
220
|
+
};
|
|
221
|
+
const DirectorChatProvider = ({ children, ctx, enabled = true, invalidateAiConfig, recoveryAddendum }) => {
|
|
222
|
+
const [surface, setSurface] = useState(null);
|
|
223
|
+
const stated = useMemo(() => enabled ? surface : null, [enabled, surface]);
|
|
224
|
+
return /* @__PURE__ */ jsxs(DirectorChatContext, {
|
|
225
|
+
value: stated,
|
|
226
|
+
children: [enabled ? /* @__PURE__ */ jsx(DirectorChatSession, {
|
|
227
|
+
ctx,
|
|
228
|
+
invalidateAiConfig,
|
|
229
|
+
publish: setSurface,
|
|
230
|
+
recoveryAddendum
|
|
231
|
+
}) : null, children]
|
|
232
|
+
});
|
|
233
|
+
};
|
|
234
|
+
const changeTo = (options, apply) => (reported) => {
|
|
235
|
+
const value = options.find((option) => String(option) === reported);
|
|
236
|
+
if (value !== void 0) apply(value);
|
|
237
|
+
};
|
|
238
|
+
const SECTIONS$11 = ["video"];
|
|
239
|
+
const videoModeChrome = {
|
|
240
|
+
chase: {
|
|
241
|
+
glyph: "camera-mode-chase",
|
|
242
|
+
orgOnly: false
|
|
243
|
+
},
|
|
244
|
+
cinematic: {
|
|
245
|
+
glyph: "camera-mode-cinematic",
|
|
246
|
+
orgOnly: false
|
|
247
|
+
},
|
|
248
|
+
director: {
|
|
249
|
+
glyph: "camera-mode-director",
|
|
250
|
+
orgOnly: true
|
|
251
|
+
},
|
|
252
|
+
drone: {
|
|
253
|
+
glyph: "camera-mode-drone",
|
|
254
|
+
orgOnly: false
|
|
255
|
+
},
|
|
256
|
+
helicopter: {
|
|
257
|
+
glyph: "camera-mode-helicopter",
|
|
258
|
+
orgOnly: false
|
|
259
|
+
},
|
|
260
|
+
overview: {
|
|
261
|
+
glyph: "camera-mode-overview",
|
|
262
|
+
orgOnly: false
|
|
263
|
+
},
|
|
264
|
+
smart: {
|
|
265
|
+
glyph: "camera-mode-smart",
|
|
266
|
+
orgOnly: false
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
const VIDEO_MODES = cameraModeSchema.options.map((mode) => ({
|
|
270
|
+
...videoModeChrome[mode],
|
|
271
|
+
mode
|
|
272
|
+
}));
|
|
273
|
+
const ModeCards = ({ disabled, mode }) => {
|
|
274
|
+
const words = useStudioScopedStrings(SECTIONS$11);
|
|
275
|
+
const { dispatch } = useStudioDispatch();
|
|
276
|
+
const withOrgModes = useStudioEntitlement("video-organization-modes");
|
|
277
|
+
const onChange = useMemo(() => changeTo(cameraModeSchema.options, (next) => {
|
|
278
|
+
dispatch("studio.video.mode.set", { mode: next });
|
|
279
|
+
}), [dispatch]);
|
|
280
|
+
const presets = VIDEO_MODES.filter((entry) => !entry.orgOnly);
|
|
281
|
+
const director = withOrgModes ? VIDEO_MODES.find((entry) => entry.orgOnly) : void 0;
|
|
282
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
283
|
+
gap: "xxs",
|
|
284
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
285
|
+
variant: "section-label",
|
|
286
|
+
children: words.video.mode.groupLabel
|
|
287
|
+
}), /* @__PURE__ */ jsxs(Radio.Group, {
|
|
288
|
+
"aria-label": words.video.mode.groupLabel,
|
|
289
|
+
onChange,
|
|
290
|
+
value: mode,
|
|
291
|
+
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
292
|
+
gap: "xs",
|
|
293
|
+
children: [presets.map((entry) => /* @__PURE__ */ jsx(RadioOptionCard, {
|
|
294
|
+
checked: entry.mode === mode,
|
|
295
|
+
description: words.video.mode[entry.mode].description,
|
|
296
|
+
disabled,
|
|
297
|
+
glyph: entry.glyph,
|
|
298
|
+
title: words.video.mode[entry.mode].title,
|
|
299
|
+
value: entry.mode
|
|
300
|
+
}, entry.mode)), director ? /* @__PURE__ */ jsx(RadioOptionCard, {
|
|
301
|
+
checked: director.mode === mode,
|
|
302
|
+
description: words.video.mode[director.mode].description,
|
|
303
|
+
disabled,
|
|
304
|
+
glyph: director.glyph,
|
|
305
|
+
title: words.video.mode[director.mode].title,
|
|
306
|
+
value: director.mode
|
|
307
|
+
}) : null]
|
|
308
|
+
}), director ? /* @__PURE__ */ jsx(Text, {
|
|
309
|
+
c: "dimmed",
|
|
310
|
+
mt: "xs",
|
|
311
|
+
size: "xs",
|
|
312
|
+
children: words.video.mode.directorHint
|
|
313
|
+
}) : null]
|
|
314
|
+
})]
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
const PlanNumberField = ({ floor, onSend, value, ...field }) => {
|
|
318
|
+
const [typed, setTyped] = useState();
|
|
319
|
+
const shown = typed !== void 0 && typed.over === value ? typed.text : value;
|
|
320
|
+
return /* @__PURE__ */ jsx(NumberInput, {
|
|
321
|
+
...field,
|
|
322
|
+
onBlur: () => setTyped(void 0),
|
|
323
|
+
onChange: (next) => {
|
|
324
|
+
setTyped({
|
|
325
|
+
over: value,
|
|
326
|
+
text: next
|
|
327
|
+
});
|
|
328
|
+
if (typeof next === "number" && Number.isFinite(next) && (floor ?? next) <= next) onSend(next);
|
|
329
|
+
},
|
|
330
|
+
value: shown
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
const SECTIONS$10 = ["video"];
|
|
334
|
+
const zoomDigits = { maximumFractionDigits: 1 };
|
|
335
|
+
const shotFields = cameraShotBaseSchema.shape;
|
|
336
|
+
const boundsOf$1 = (field, toField = (value) => value) => {
|
|
337
|
+
const bound = (value) => value !== null && Number.isFinite(value) ? toField(value) : void 0;
|
|
338
|
+
return {
|
|
339
|
+
max: bound(field.maxValue),
|
|
340
|
+
min: bound(field.minValue)
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
const positionBounds = boundsOf$1(shotFields.at, (ratio) => convertProportion(ratio, "ratio", "percent"));
|
|
344
|
+
const zoomBounds = boundsOf$1(shotFields.zoom);
|
|
345
|
+
const pitchBounds = boundsOf$1(shotFields.pitchDeg);
|
|
346
|
+
const holdBounds = boundsOf$1(shotFields.holdMs, (milliseconds) => convertDuration(milliseconds, "millisecond", "second"));
|
|
347
|
+
const speedBounds = boundsOf$1(shotFields.speedScale);
|
|
348
|
+
const rowButtonStyle = {
|
|
349
|
+
flex: 1,
|
|
350
|
+
minWidth: 0,
|
|
351
|
+
overflow: "hidden",
|
|
352
|
+
textOverflow: "ellipsis",
|
|
353
|
+
whiteSpace: "nowrap"
|
|
354
|
+
};
|
|
355
|
+
const ShotEditor = ({ onChange, shot }) => {
|
|
356
|
+
const words = useStudioScopedStrings(SECTIONS$10);
|
|
357
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
358
|
+
gap: "xs",
|
|
359
|
+
w: 240,
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ jsx(PlanNumberField, {
|
|
362
|
+
clampBehavior: "strict",
|
|
363
|
+
label: words.video.shots.at,
|
|
364
|
+
max: positionBounds.max,
|
|
365
|
+
min: positionBounds.min,
|
|
366
|
+
onSend: (value) => onChange({ at: convertProportion(value, "percent", "ratio") }),
|
|
367
|
+
size: "xs",
|
|
368
|
+
step: 1,
|
|
369
|
+
suffix: "%",
|
|
370
|
+
value: Math.round(convertProportion(shot.at, "ratio", "percent"))
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ jsx(PlanNumberField, {
|
|
373
|
+
clampBehavior: "strict",
|
|
374
|
+
label: words.video.shots.zoom,
|
|
375
|
+
max: zoomBounds.max,
|
|
376
|
+
min: zoomBounds.min,
|
|
377
|
+
onSend: (value) => onChange({ zoom: value }),
|
|
378
|
+
size: "xs",
|
|
379
|
+
step: .5,
|
|
380
|
+
value: shot.zoom
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ jsx(PlanNumberField, {
|
|
383
|
+
clampBehavior: "strict",
|
|
384
|
+
label: words.video.shots.pitch,
|
|
385
|
+
max: pitchBounds.max,
|
|
386
|
+
min: pitchBounds.min,
|
|
387
|
+
onSend: (value) => onChange({ pitchDeg: value }),
|
|
388
|
+
size: "xs",
|
|
389
|
+
step: 1,
|
|
390
|
+
suffix: "°",
|
|
391
|
+
value: Math.round(shot.pitchDeg)
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
394
|
+
gap: 0,
|
|
395
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
396
|
+
component: "label",
|
|
397
|
+
fz: "xs",
|
|
398
|
+
children: words.video.shots.bearingLabel
|
|
399
|
+
}), /* @__PURE__ */ jsx(SegmentedControl, {
|
|
400
|
+
data: cameraBearingModeSchema.options.map((mode) => ({
|
|
401
|
+
label: words.video.shots.bearing[mode],
|
|
402
|
+
value: mode
|
|
403
|
+
})),
|
|
404
|
+
onChange: (value) => onChange({ bearingMode: cameraBearingModeSchema.parse(value) }),
|
|
405
|
+
value: shot.bearingMode
|
|
406
|
+
})]
|
|
407
|
+
}),
|
|
408
|
+
shot.bearingMode === "value" ? /* @__PURE__ */ jsx(PlanNumberField, {
|
|
409
|
+
clampBehavior: "strict",
|
|
410
|
+
label: words.video.shots.bearingDeg,
|
|
411
|
+
max: DEGREES_PER_TURN,
|
|
412
|
+
min: 0,
|
|
413
|
+
onSend: (value) => onChange({ bearingDeg: value }),
|
|
414
|
+
size: "xs",
|
|
415
|
+
step: 5,
|
|
416
|
+
suffix: "°",
|
|
417
|
+
value: Math.round(shot.bearingDeg ?? 0)
|
|
418
|
+
}) : null,
|
|
419
|
+
/* @__PURE__ */ jsx(PlanNumberField, {
|
|
420
|
+
clampBehavior: "strict",
|
|
421
|
+
decimalScale: 1,
|
|
422
|
+
label: words.video.shots.hold,
|
|
423
|
+
max: holdBounds.max,
|
|
424
|
+
min: holdBounds.min,
|
|
425
|
+
onSend: (value) => onChange({ holdMs: value * MILLISECONDS_PER_SECOND }),
|
|
426
|
+
size: "xs",
|
|
427
|
+
step: .5,
|
|
428
|
+
suffix: " s",
|
|
429
|
+
value: shot.holdMs / MILLISECONDS_PER_SECOND
|
|
430
|
+
}),
|
|
431
|
+
/* @__PURE__ */ jsx(PlanNumberField, {
|
|
432
|
+
clampBehavior: "none",
|
|
433
|
+
decimalScale: 1,
|
|
434
|
+
floor: speedBounds.min,
|
|
435
|
+
isAllowed: ({ floatValue }) => floatValue === void 0 || speedBounds.max === void 0 || floatValue <= speedBounds.max,
|
|
436
|
+
label: words.video.shots.speed,
|
|
437
|
+
max: speedBounds.max,
|
|
438
|
+
min: speedBounds.min,
|
|
439
|
+
onSend: (value) => onChange({ speedScale: value }),
|
|
440
|
+
size: "xs",
|
|
441
|
+
step: .1,
|
|
442
|
+
suffix: "×",
|
|
443
|
+
value: shot.speedScale
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
const ShotRowBase = ({ directing, index, shot, totalMs }) => {
|
|
449
|
+
const words = useStudioScopedStrings(SECTIONS$10);
|
|
450
|
+
const { formatClock, formatNumber } = useStudioFormatters();
|
|
451
|
+
const { dispatch } = useStudioDispatch();
|
|
452
|
+
const onSeek = useCallback(() => {
|
|
453
|
+
dispatch("studio.video.preview.seek", { fraction: shot.at });
|
|
454
|
+
}, [dispatch, shot.at]);
|
|
455
|
+
const onRemove = useCallback(() => {
|
|
456
|
+
dispatch("studio.video.shot.remove", { id: shot.id });
|
|
457
|
+
}, [dispatch, shot.id]);
|
|
458
|
+
const setField = useCallback((changes) => {
|
|
459
|
+
dispatch("studio.video.shot.set", {
|
|
460
|
+
id: shot.id,
|
|
461
|
+
...changes
|
|
462
|
+
});
|
|
463
|
+
}, [dispatch, shot.id]);
|
|
464
|
+
const summary = [
|
|
465
|
+
`z${formatNumber(shot.zoom, zoomDigits)}`,
|
|
466
|
+
`${Math.round(shot.pitchDeg)}°`,
|
|
467
|
+
words.video.shots.bearing[shot.bearingMode],
|
|
468
|
+
shot.holdMs > 0 ? words.video.shots.holdSummary(shot.holdMs / MILLISECONDS_PER_SECOND) : null
|
|
469
|
+
].filter((part) => part !== null).join(" · ");
|
|
470
|
+
return /* @__PURE__ */ jsxs(Group, {
|
|
471
|
+
gap: "xs",
|
|
472
|
+
wrap: "nowrap",
|
|
473
|
+
children: [
|
|
474
|
+
/* @__PURE__ */ jsxs(UnstyledButton, {
|
|
475
|
+
"aria-label": words.video.shots.jumpTo(index + 1),
|
|
476
|
+
disabled: directing,
|
|
477
|
+
fz: "xs",
|
|
478
|
+
onClick: onSeek,
|
|
479
|
+
style: rowButtonStyle,
|
|
480
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
481
|
+
component: "span",
|
|
482
|
+
fw: 600,
|
|
483
|
+
fz: "xs",
|
|
484
|
+
children: `${index + 1} · ${formatClock(shot.at * totalMs)}`
|
|
485
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
486
|
+
c: "dimmed",
|
|
487
|
+
component: "span",
|
|
488
|
+
fz: "xs",
|
|
489
|
+
ml: "xs",
|
|
490
|
+
children: summary
|
|
491
|
+
})]
|
|
492
|
+
}),
|
|
493
|
+
/* @__PURE__ */ jsxs(Popover, {
|
|
494
|
+
position: "bottom-end",
|
|
495
|
+
shadow: "md",
|
|
496
|
+
trapFocus: true,
|
|
497
|
+
withinPortal: true,
|
|
498
|
+
children: [/* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(ActionIcon, {
|
|
499
|
+
"aria-label": words.video.shots.editShot(index + 1),
|
|
500
|
+
disabled: directing,
|
|
501
|
+
variant: "default",
|
|
502
|
+
children: /* @__PURE__ */ jsx(Glyph$1, {
|
|
503
|
+
name: "action-configure",
|
|
504
|
+
size: iconSizes.sm
|
|
505
|
+
})
|
|
506
|
+
}) }), /* @__PURE__ */ jsx(Popover.Dropdown, { children: /* @__PURE__ */ jsx(ShotEditor, {
|
|
507
|
+
onChange: setField,
|
|
508
|
+
shot
|
|
509
|
+
}) })]
|
|
510
|
+
}),
|
|
511
|
+
/* @__PURE__ */ jsx(ActionIcon, {
|
|
512
|
+
"aria-label": words.video.shots.remove(index + 1),
|
|
513
|
+
disabled: directing,
|
|
514
|
+
onClick: onRemove,
|
|
515
|
+
variant: "default",
|
|
516
|
+
children: /* @__PURE__ */ jsx(Glyph$1, {
|
|
517
|
+
name: "action-delete",
|
|
518
|
+
size: iconSizes.sm
|
|
519
|
+
})
|
|
520
|
+
})
|
|
521
|
+
]
|
|
522
|
+
});
|
|
523
|
+
};
|
|
524
|
+
const ShotRow = memo(ShotRowBase);
|
|
525
|
+
const ShotList = ({ directing, plan }) => {
|
|
526
|
+
const words = useStudioScopedStrings(SECTIONS$10);
|
|
527
|
+
const { dispatch } = useStudioDispatch();
|
|
528
|
+
const uiStore = useUiStoreApi();
|
|
529
|
+
const totalMs = planDurationMs(plan);
|
|
530
|
+
const playheadFraction = useCallback(() => {
|
|
531
|
+
const status = uiStore.getState().videoExport?.status;
|
|
532
|
+
return status && status.kind !== "idle" ? status.fraction : 0;
|
|
533
|
+
}, [uiStore]);
|
|
534
|
+
const onAddShot = useCallback(() => {
|
|
535
|
+
dispatch("studio.video.shot.add", {
|
|
536
|
+
at: playheadFraction(),
|
|
537
|
+
pitchDeg: DEFAULT_SHOT_PITCH_DEG,
|
|
538
|
+
zoom: DEFAULT_SHOT_ZOOM
|
|
539
|
+
});
|
|
540
|
+
}, [dispatch, playheadFraction]);
|
|
541
|
+
const onAddHold = useCallback(() => {
|
|
542
|
+
dispatch("studio.video.shot.addHold", {
|
|
543
|
+
at: playheadFraction(),
|
|
544
|
+
holdMs: DEFAULT_HOLD_MS,
|
|
545
|
+
pitchDeg: DEFAULT_SHOT_PITCH_DEG,
|
|
546
|
+
zoom: DEFAULT_SHOT_ZOOM
|
|
547
|
+
});
|
|
548
|
+
}, [dispatch, playheadFraction]);
|
|
549
|
+
const onAddOrbit = useCallback(() => {
|
|
550
|
+
dispatch("studio.video.orbit", {
|
|
551
|
+
at: playheadFraction(),
|
|
552
|
+
pitchDeg: DEFAULT_SHOT_PITCH_DEG,
|
|
553
|
+
zoom: DEFAULT_SHOT_ZOOM
|
|
554
|
+
});
|
|
555
|
+
}, [dispatch, playheadFraction]);
|
|
556
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
557
|
+
gap: "xs",
|
|
558
|
+
mt: "md",
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ jsx(Text, {
|
|
561
|
+
variant: "section-label",
|
|
562
|
+
children: words.video.shots.title
|
|
563
|
+
}),
|
|
564
|
+
plan.shots.length === 0 ? /* @__PURE__ */ jsx(Text, {
|
|
565
|
+
c: "dimmed",
|
|
566
|
+
size: "xs",
|
|
567
|
+
children: words.video.shots.empty
|
|
568
|
+
}) : /* @__PURE__ */ jsx(Stack, {
|
|
569
|
+
gap: "xxs",
|
|
570
|
+
children: plan.shots.map((shot, index) => /* @__PURE__ */ jsx(ShotRow, {
|
|
571
|
+
directing,
|
|
572
|
+
index,
|
|
573
|
+
shot,
|
|
574
|
+
totalMs
|
|
575
|
+
}, shot.id))
|
|
576
|
+
}),
|
|
577
|
+
/* @__PURE__ */ jsxs(Group, {
|
|
578
|
+
gap: "xs",
|
|
579
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
580
|
+
disabled: directing,
|
|
581
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
582
|
+
name: "action-add",
|
|
583
|
+
size: iconSizes.sm
|
|
584
|
+
}),
|
|
585
|
+
onClick: onAddShot,
|
|
586
|
+
variant: "default",
|
|
587
|
+
children: words.video.shots.add
|
|
588
|
+
}), /* @__PURE__ */ jsxs(Menu, {
|
|
589
|
+
position: "bottom-end",
|
|
590
|
+
withinPortal: true,
|
|
591
|
+
children: [/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(ActionIcon, {
|
|
592
|
+
"aria-label": words.video.shots.more,
|
|
593
|
+
disabled: directing,
|
|
594
|
+
size: "lg",
|
|
595
|
+
variant: "default",
|
|
596
|
+
children: /* @__PURE__ */ jsx(Glyph$1, {
|
|
597
|
+
name: "more",
|
|
598
|
+
size: iconSizes.sm
|
|
599
|
+
})
|
|
600
|
+
}) }), /* @__PURE__ */ jsxs(Menu.Dropdown, { children: [/* @__PURE__ */ jsx(Menu.Item, {
|
|
601
|
+
fz: "xs",
|
|
602
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
603
|
+
name: "shot-hold",
|
|
604
|
+
size: iconSizes.sm
|
|
605
|
+
}),
|
|
606
|
+
onClick: onAddHold,
|
|
607
|
+
children: words.video.shots.addHold
|
|
608
|
+
}), /* @__PURE__ */ jsx(Menu.Item, {
|
|
609
|
+
fz: "xs",
|
|
610
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
611
|
+
name: "shot-orbit",
|
|
612
|
+
size: iconSizes.sm
|
|
613
|
+
}),
|
|
614
|
+
onClick: onAddOrbit,
|
|
615
|
+
children: words.video.shots.addOrbit
|
|
616
|
+
})] })]
|
|
617
|
+
})]
|
|
618
|
+
})
|
|
619
|
+
]
|
|
620
|
+
});
|
|
621
|
+
};
|
|
622
|
+
const DIRECTOR_SLOT_REGION_ID = "video-director-slot";
|
|
623
|
+
const CameraStepDirectorSlot = ({ children }) => /* @__PURE__ */ jsx("div", {
|
|
624
|
+
id: DIRECTOR_SLOT_REGION_ID,
|
|
625
|
+
children
|
|
626
|
+
});
|
|
627
|
+
const CameraStep = ({ directing, director, plan, scrim }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Box, {
|
|
628
|
+
pos: "relative",
|
|
629
|
+
children: [
|
|
630
|
+
/* @__PURE__ */ jsx(ModeCards, {
|
|
631
|
+
disabled: directing,
|
|
632
|
+
mode: plan.mode
|
|
633
|
+
}),
|
|
634
|
+
plan.mode === "director" ? /* @__PURE__ */ jsx(ShotList, {
|
|
635
|
+
directing,
|
|
636
|
+
plan
|
|
637
|
+
}) : null,
|
|
638
|
+
scrim
|
|
639
|
+
]
|
|
640
|
+
}), /* @__PURE__ */ jsx(CameraStepDirectorSlot, { children: director })] });
|
|
641
|
+
const DirectingScrim = () => {
|
|
642
|
+
const { directing } = useDirectorChat();
|
|
643
|
+
if (!directing) return null;
|
|
644
|
+
return /* @__PURE__ */ jsx(Overlay, {
|
|
645
|
+
backgroundOpacity: .35,
|
|
646
|
+
blur: 1
|
|
647
|
+
});
|
|
648
|
+
};
|
|
649
|
+
const SECTIONS$9 = ["director", "prompt"];
|
|
650
|
+
const DirectorComposer = () => {
|
|
651
|
+
const words = useStudioScopedStrings(SECTIONS$9);
|
|
652
|
+
const { directing, stop, submit } = useDirectorChat();
|
|
653
|
+
return /* @__PURE__ */ jsx(ChatComposer, {
|
|
654
|
+
onSend: submit,
|
|
655
|
+
onStop: stop,
|
|
656
|
+
placeholder: words.director.placeholder,
|
|
657
|
+
running: directing,
|
|
658
|
+
stopLabel: words.director.stop
|
|
659
|
+
});
|
|
660
|
+
};
|
|
661
|
+
const TRANSCRIPT_MAX_HEIGHT = 240;
|
|
662
|
+
const DirectorChat = () => {
|
|
663
|
+
const words = useStudioScopedStrings(SECTIONS$9);
|
|
664
|
+
const { directing } = useDirectorChat();
|
|
665
|
+
const transcript = useDirectorStore(useShallowSelector((store) => store.transcript));
|
|
666
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
667
|
+
gap: "sm",
|
|
668
|
+
children: [/* @__PURE__ */ jsx(ChatTranscript, {
|
|
669
|
+
emptyHint: words.director.emptyHint,
|
|
670
|
+
entries: transcript,
|
|
671
|
+
maxHeight: TRANSCRIPT_MAX_HEIGHT,
|
|
672
|
+
running: directing
|
|
673
|
+
}), /* @__PURE__ */ jsx(DirectorComposer, {})]
|
|
674
|
+
});
|
|
675
|
+
};
|
|
676
|
+
const SECTIONS$8 = ["video"];
|
|
677
|
+
const GLYPH_BOX_SIZE = 34;
|
|
678
|
+
const FRAME_MAX_DIM = 22;
|
|
679
|
+
const innerFrameBaseStyle = {
|
|
680
|
+
border: "1.5px solid currentColor",
|
|
681
|
+
borderRadius: "var(--mantine-radius-xxs)"
|
|
682
|
+
};
|
|
683
|
+
const frameDimensions = (aspect) => {
|
|
684
|
+
const [w, h] = aspect.split(":").map(Number);
|
|
685
|
+
if (!w || !h) return {
|
|
686
|
+
height: FRAME_MAX_DIM,
|
|
687
|
+
width: FRAME_MAX_DIM
|
|
688
|
+
};
|
|
689
|
+
const scale = FRAME_MAX_DIM / Math.max(w, h);
|
|
690
|
+
return {
|
|
691
|
+
height: h * scale,
|
|
692
|
+
width: w * scale
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
const AspectGlyph = ({ aspect, checked }) => {
|
|
696
|
+
const frameStyle = {
|
|
697
|
+
...innerFrameBaseStyle,
|
|
698
|
+
...frameDimensions(aspect)
|
|
699
|
+
};
|
|
700
|
+
return /* @__PURE__ */ jsx(ThemeIcon, {
|
|
701
|
+
size: GLYPH_BOX_SIZE,
|
|
702
|
+
variant: checked ? "filled" : "light",
|
|
703
|
+
children: /* @__PURE__ */ jsx("div", { style: frameStyle })
|
|
704
|
+
});
|
|
705
|
+
};
|
|
706
|
+
const lengthBounds = ((field) => {
|
|
707
|
+
const seconds = (value) => value !== null && Number.isFinite(value) ? convertDuration(value, "millisecond", "second") : void 0;
|
|
708
|
+
return {
|
|
709
|
+
max: seconds(field.maxValue),
|
|
710
|
+
min: seconds(field.minValue)
|
|
711
|
+
};
|
|
712
|
+
})(cameraPlanSchema.shape.targetDurationMs.unwrap());
|
|
713
|
+
const LENGTH_STEP_SECONDS = 5;
|
|
714
|
+
const FORMAT_VALUES = FORMAT_OPTIONS.map((option) => option.value);
|
|
715
|
+
const FPS_VALUES = FPS_OPTIONS.map((option) => option.value);
|
|
716
|
+
const QUALITY_VALUES = QUALITY_OPTIONS.map((option) => option.value);
|
|
717
|
+
const PRESET_DESCRIPTORS = [
|
|
718
|
+
{
|
|
719
|
+
glyph: "frame-vertical",
|
|
720
|
+
orgOnly: false,
|
|
721
|
+
preset: "vertical",
|
|
722
|
+
template: videoPresets.vertical
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
glyph: "frame-widescreen",
|
|
726
|
+
orgOnly: false,
|
|
727
|
+
preset: "widescreen",
|
|
728
|
+
template: videoPresets.widescreen
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
glyph: "frame-square",
|
|
732
|
+
orgOnly: false,
|
|
733
|
+
preset: "square",
|
|
734
|
+
template: videoPresets.square
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
glyph: "frame-custom",
|
|
738
|
+
orgOnly: true,
|
|
739
|
+
preset: "custom",
|
|
740
|
+
template: null
|
|
741
|
+
}
|
|
742
|
+
];
|
|
743
|
+
const PRESET_VALUES = PRESET_DESCRIPTORS.map((entry) => entry.preset);
|
|
744
|
+
const suggestedSeconds = (route) => {
|
|
745
|
+
if (!route) return null;
|
|
746
|
+
return Math.round(suggestVideoLengthMs(routeLengthMeters(route.line)) / MILLISECONDS_PER_SECOND);
|
|
747
|
+
};
|
|
748
|
+
const PlanLengthField = ({ plan, route }) => {
|
|
749
|
+
const words = useStudioScopedStrings(SECTIONS$8);
|
|
750
|
+
const { dispatch } = useStudioDispatch();
|
|
751
|
+
const lengthSeconds = Math.round(plan.targetDurationMs / MILLISECONDS_PER_SECOND);
|
|
752
|
+
const suggestion = suggestedSeconds(route);
|
|
753
|
+
const onLengthChange = useCallback((seconds) => {
|
|
754
|
+
dispatch("studio.video.duration.set", { targetDurationMs: seconds * MILLISECONDS_PER_SECOND });
|
|
755
|
+
}, [dispatch]);
|
|
756
|
+
const onUseSuggested = useCallback(() => {
|
|
757
|
+
if (suggestion !== null) onLengthChange(suggestion);
|
|
758
|
+
}, [onLengthChange, suggestion]);
|
|
759
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
760
|
+
gap: "xxs",
|
|
761
|
+
children: [/* @__PURE__ */ jsx(PlanNumberField, {
|
|
762
|
+
clampBehavior: "none",
|
|
763
|
+
floor: lengthBounds.min,
|
|
764
|
+
isAllowed: ({ floatValue }) => floatValue === void 0 || lengthBounds.max === void 0 || floatValue <= lengthBounds.max,
|
|
765
|
+
label: words.video.format.length.label,
|
|
766
|
+
max: lengthBounds.max,
|
|
767
|
+
min: lengthBounds.min,
|
|
768
|
+
onSend: onLengthChange,
|
|
769
|
+
startValue: suggestion ?? void 0,
|
|
770
|
+
step: LENGTH_STEP_SECONDS,
|
|
771
|
+
suffix: ` ${words.video.format.length.unit}`,
|
|
772
|
+
value: lengthSeconds
|
|
773
|
+
}), suggestion !== null && suggestion !== lengthSeconds ? /* @__PURE__ */ jsx(Anchor, {
|
|
774
|
+
component: "button",
|
|
775
|
+
onClick: onUseSuggested,
|
|
776
|
+
size: "xs",
|
|
777
|
+
type: "button",
|
|
778
|
+
children: words.video.format.length.suggested(suggestion)
|
|
779
|
+
}) : null]
|
|
780
|
+
});
|
|
781
|
+
};
|
|
782
|
+
const FormatStep = ({ plan, route }) => {
|
|
783
|
+
const words = useStudioScopedStrings(SECTIONS$8);
|
|
784
|
+
const { dispatch } = useStudioDispatch();
|
|
785
|
+
const withOrgModes = useStudioEntitlement("video-organization-modes");
|
|
786
|
+
const output = plan.output;
|
|
787
|
+
const custom = output.preset === "custom";
|
|
788
|
+
const presets = useMemo(() => withOrgModes ? PRESET_DESCRIPTORS : PRESET_DESCRIPTORS.filter((entry) => !entry.orgOnly), [withOrgModes]);
|
|
789
|
+
const derivedBitrate = bitrateForOutput(output.resolution, output.fps, output.quality);
|
|
790
|
+
const applyCustom = useCallback((change) => {
|
|
791
|
+
const next = {
|
|
792
|
+
...output,
|
|
793
|
+
...change,
|
|
794
|
+
preset: "custom"
|
|
795
|
+
};
|
|
796
|
+
dispatch("studio.video.output.set", {
|
|
797
|
+
...next,
|
|
798
|
+
bitrateMbps: bitrateForOutput(next.resolution, next.fps, next.quality)
|
|
799
|
+
});
|
|
800
|
+
}, [dispatch, output]);
|
|
801
|
+
const onPresetChange = useMemo(() => changeTo(PRESET_VALUES, (preset) => {
|
|
802
|
+
if (preset === "custom") {
|
|
803
|
+
applyCustom({});
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
dispatch("studio.video.preset.set", { preset });
|
|
807
|
+
}), [applyCustom, dispatch]);
|
|
808
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
809
|
+
gap: "lg",
|
|
810
|
+
children: [
|
|
811
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
812
|
+
gap: "xxs",
|
|
813
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
814
|
+
variant: "section-label",
|
|
815
|
+
children: words.video.format.preset.groupLabel
|
|
816
|
+
}), /* @__PURE__ */ jsx(Radio.Group, {
|
|
817
|
+
"aria-label": words.video.format.preset.groupLabel,
|
|
818
|
+
onChange: onPresetChange,
|
|
819
|
+
value: output.preset,
|
|
820
|
+
children: /* @__PURE__ */ jsx(Stack, { children: presets.map((entry) => /* @__PURE__ */ jsx(RadioOptionCard, {
|
|
821
|
+
checked: entry.preset === output.preset,
|
|
822
|
+
description: words.video.format.preset[entry.preset].description,
|
|
823
|
+
glyph: entry.glyph,
|
|
824
|
+
media: entry.template ? /* @__PURE__ */ jsx(AspectGlyph, {
|
|
825
|
+
aspect: entry.template.aspect,
|
|
826
|
+
checked: entry.preset === output.preset
|
|
827
|
+
}) : void 0,
|
|
828
|
+
specs: entry.template ? words.video.format.preset.specs(entry.template.resolution, entry.template.aspect, entry.template.fps, entry.template.bitrateMbps) : void 0,
|
|
829
|
+
title: words.video.format.preset[entry.preset].title,
|
|
830
|
+
value: entry.preset
|
|
831
|
+
}, entry.preset)) })
|
|
832
|
+
})]
|
|
833
|
+
}),
|
|
834
|
+
custom ? /* @__PURE__ */ jsxs(Stack, {
|
|
835
|
+
gap: "md",
|
|
836
|
+
children: [
|
|
837
|
+
/* @__PURE__ */ jsx(Input.Wrapper, {
|
|
838
|
+
label: words.video.format.matrix.formatLabel,
|
|
839
|
+
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
840
|
+
data: FORMAT_OPTIONS.map((option) => ({
|
|
841
|
+
label: words.video.format.matrix[option.labelKey],
|
|
842
|
+
value: option.value
|
|
843
|
+
})),
|
|
844
|
+
onChange: changeTo(FORMAT_VALUES, (format) => applyCustom({ format })),
|
|
845
|
+
value: output.format
|
|
846
|
+
})
|
|
847
|
+
}),
|
|
848
|
+
/* @__PURE__ */ jsx(Input.Wrapper, {
|
|
849
|
+
label: words.video.format.matrix.resolutionLabel,
|
|
850
|
+
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
851
|
+
data: [...RESOLUTION_OPTIONS],
|
|
852
|
+
onChange: changeTo(RESOLUTION_OPTIONS, (resolution) => applyCustom({ resolution })),
|
|
853
|
+
value: output.resolution
|
|
854
|
+
})
|
|
855
|
+
}),
|
|
856
|
+
/* @__PURE__ */ jsx(Input.Wrapper, {
|
|
857
|
+
label: words.video.format.matrix.fpsLabel,
|
|
858
|
+
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
859
|
+
data: FPS_OPTIONS.map((option) => ({
|
|
860
|
+
label: words.video.format.matrix[option.labelKey],
|
|
861
|
+
value: String(option.value)
|
|
862
|
+
})),
|
|
863
|
+
onChange: changeTo(FPS_VALUES, (fps) => applyCustom({ fps })),
|
|
864
|
+
value: String(output.fps)
|
|
865
|
+
})
|
|
866
|
+
}),
|
|
867
|
+
/* @__PURE__ */ jsx(Input.Wrapper, {
|
|
868
|
+
label: words.video.format.matrix.qualityLabel,
|
|
869
|
+
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
870
|
+
data: QUALITY_OPTIONS.map((option) => ({
|
|
871
|
+
label: words.video.format.matrix[option.labelKey],
|
|
872
|
+
value: option.value
|
|
873
|
+
})),
|
|
874
|
+
onChange: changeTo(QUALITY_VALUES, (quality) => applyCustom({ quality })),
|
|
875
|
+
value: output.quality
|
|
876
|
+
})
|
|
877
|
+
}),
|
|
878
|
+
/* @__PURE__ */ jsx(Input.Wrapper, {
|
|
879
|
+
label: words.video.format.matrix.aspectLabel,
|
|
880
|
+
children: /* @__PURE__ */ jsx(SegmentedControl, {
|
|
881
|
+
data: [...ASPECT_OPTIONS],
|
|
882
|
+
onChange: changeTo(ASPECT_OPTIONS, (aspect) => applyCustom({ aspect })),
|
|
883
|
+
value: output.aspect
|
|
884
|
+
})
|
|
885
|
+
}),
|
|
886
|
+
/* @__PURE__ */ jsxs(Group, {
|
|
887
|
+
justify: "space-between",
|
|
888
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
889
|
+
c: "dimmed",
|
|
890
|
+
children: words.video.format.matrix.bitrateLabel
|
|
891
|
+
}), /* @__PURE__ */ jsx(Text, { children: words.video.format.matrix.bitrateValue(derivedBitrate) })]
|
|
892
|
+
})
|
|
893
|
+
]
|
|
894
|
+
}) : null,
|
|
895
|
+
/* @__PURE__ */ jsx(PlanLengthField, {
|
|
896
|
+
plan,
|
|
897
|
+
route
|
|
898
|
+
})
|
|
899
|
+
]
|
|
900
|
+
});
|
|
901
|
+
};
|
|
902
|
+
const SECTIONS$7 = ["video"];
|
|
903
|
+
const SCRUB_STEPS = 1e3;
|
|
904
|
+
const scrubStyle = { flex: 1 };
|
|
905
|
+
const readoutStyle = {
|
|
906
|
+
fontVariantNumeric: "tabular-nums",
|
|
907
|
+
whiteSpace: "nowrap"
|
|
908
|
+
};
|
|
909
|
+
const progressOf = (status) => status?.kind === "previewing" || status?.kind === "parked" ? status.fraction : 0;
|
|
910
|
+
const PreviewControls = ({ disabled, plan }) => {
|
|
911
|
+
const words = useStudioScopedStrings(SECTIONS$7);
|
|
912
|
+
const { formatClock } = useStudioFormatters();
|
|
913
|
+
const { dispatch } = useStudioDispatch();
|
|
914
|
+
const uiStore = useUiStoreApi();
|
|
915
|
+
const status = useUiStore(selectVideoExportStatus);
|
|
916
|
+
const playing = status?.kind === "previewing";
|
|
917
|
+
const fraction = progressOf(status);
|
|
918
|
+
const [loop, setLoop] = useState(false);
|
|
919
|
+
const [dragValue, setDragValue] = useState(null);
|
|
920
|
+
const onPlayPause = useCallback(() => {
|
|
921
|
+
dispatch(playing ? "studio.video.preview.pause" : "studio.video.preview.play", {});
|
|
922
|
+
}, [dispatch, playing]);
|
|
923
|
+
const onStop = useCallback(() => {
|
|
924
|
+
dispatch("studio.video.preview.stop", {});
|
|
925
|
+
}, [dispatch]);
|
|
926
|
+
const onScrub = useCallback((value) => {
|
|
927
|
+
setDragValue(value);
|
|
928
|
+
}, []);
|
|
929
|
+
const onScrubCommit = useCallback((value) => {
|
|
930
|
+
dispatch("studio.video.preview.seek", { fraction: value / SCRUB_STEPS });
|
|
931
|
+
setDragValue(null);
|
|
932
|
+
}, [dispatch]);
|
|
933
|
+
const onToggleLoop = useCallback(() => {
|
|
934
|
+
setLoop((current) => !current);
|
|
935
|
+
}, []);
|
|
936
|
+
const shotMarks = useMemo(() => plan.mode === "director" ? plan.shots.map((shot) => ({ value: Math.round(shot.at * SCRUB_STEPS) })) : void 0, [plan]);
|
|
937
|
+
const totalMs = useMemo(() => planDurationMs(plan), [plan]);
|
|
938
|
+
useEffect(() => {
|
|
939
|
+
if (!loop || disabled) return;
|
|
940
|
+
return uiStore.subscribe((state, previous) => {
|
|
941
|
+
const before = previous.videoExport?.status;
|
|
942
|
+
const after = state.videoExport?.status;
|
|
943
|
+
if (before?.kind === "previewing" && before.fraction >= 1 && after?.kind === "idle") dispatch("studio.video.preview.start", {});
|
|
944
|
+
});
|
|
945
|
+
}, [
|
|
946
|
+
dispatch,
|
|
947
|
+
disabled,
|
|
948
|
+
loop,
|
|
949
|
+
uiStore
|
|
950
|
+
]);
|
|
951
|
+
return /* @__PURE__ */ jsxs(Group, {
|
|
952
|
+
gap: "sm",
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ jsx(ActionIcon, {
|
|
955
|
+
"aria-keyshortcuts": "Space",
|
|
956
|
+
"aria-label": playing ? words.video.preview.pause : words.video.preview.play,
|
|
957
|
+
disabled,
|
|
958
|
+
onClick: onPlayPause,
|
|
959
|
+
children: playing ? /* @__PURE__ */ jsx(Glyph$1, {
|
|
960
|
+
name: "media-pause",
|
|
961
|
+
size: iconSizes.sm
|
|
962
|
+
}) : /* @__PURE__ */ jsx(Glyph$1, {
|
|
963
|
+
name: "media-play",
|
|
964
|
+
size: iconSizes.sm
|
|
965
|
+
})
|
|
966
|
+
}),
|
|
967
|
+
/* @__PURE__ */ jsx(ActionIcon, {
|
|
968
|
+
"aria-label": words.video.preview.stop,
|
|
969
|
+
disabled,
|
|
970
|
+
onClick: onStop,
|
|
971
|
+
children: /* @__PURE__ */ jsx(Glyph$1, {
|
|
972
|
+
name: "media-stop",
|
|
973
|
+
size: iconSizes.sm
|
|
974
|
+
})
|
|
975
|
+
}),
|
|
976
|
+
/* @__PURE__ */ jsx(Slider, {
|
|
977
|
+
"aria-label": words.video.preview.scrub,
|
|
978
|
+
disabled,
|
|
979
|
+
label: null,
|
|
980
|
+
marks: shotMarks,
|
|
981
|
+
max: SCRUB_STEPS,
|
|
982
|
+
min: 0,
|
|
983
|
+
onChange: onScrub,
|
|
984
|
+
onChangeEnd: onScrubCommit,
|
|
985
|
+
style: scrubStyle,
|
|
986
|
+
value: dragValue ?? Math.round(fraction * SCRUB_STEPS)
|
|
987
|
+
}),
|
|
988
|
+
/* @__PURE__ */ jsx(Text, {
|
|
989
|
+
c: "dimmed",
|
|
990
|
+
className: "mtya-studio-visible-from-xs",
|
|
991
|
+
size: "xs",
|
|
992
|
+
style: readoutStyle,
|
|
993
|
+
children: `${formatClock(fraction * totalMs)} / ${formatClock(totalMs)}`
|
|
994
|
+
}),
|
|
995
|
+
/* @__PURE__ */ jsx(ActionIcon, {
|
|
996
|
+
"aria-label": words.video.preview.loop,
|
|
997
|
+
"aria-pressed": loop,
|
|
998
|
+
disabled,
|
|
999
|
+
onClick: onToggleLoop,
|
|
1000
|
+
variant: loop ? "filled" : "default",
|
|
1001
|
+
children: /* @__PURE__ */ jsx(Glyph$1, {
|
|
1002
|
+
name: "media-loop",
|
|
1003
|
+
size: iconSizes.sm
|
|
1004
|
+
})
|
|
1005
|
+
})
|
|
1006
|
+
]
|
|
1007
|
+
});
|
|
1008
|
+
};
|
|
1009
|
+
const parkPreview = async (dispatch, fraction) => {
|
|
1010
|
+
const seek = await dispatch("studio.video.preview.seek", { fraction });
|
|
1011
|
+
if (seek.ok && seek.data.parked) await dispatch("studio.video.preview.pause", {});
|
|
1012
|
+
};
|
|
1013
|
+
const usePreviewPlanRefresh = (client, plan) => {
|
|
1014
|
+
const { dispatch } = useStudioDispatch();
|
|
1015
|
+
const uiStore = useUiStoreApi();
|
|
1016
|
+
const lastPlanRef = useRef(null);
|
|
1017
|
+
useEffect(() => {
|
|
1018
|
+
if (!client) {
|
|
1019
|
+
lastPlanRef.current = plan;
|
|
1020
|
+
return;
|
|
1021
|
+
}
|
|
1022
|
+
if (lastPlanRef.current === null || lastPlanRef.current === plan) {
|
|
1023
|
+
lastPlanRef.current = plan;
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
lastPlanRef.current = plan;
|
|
1027
|
+
const timer = setTimeout(() => {
|
|
1028
|
+
const status = uiStore.getState().videoExport?.status ?? null;
|
|
1029
|
+
const disposition = previewRefreshDisposition(status, plan);
|
|
1030
|
+
if (disposition.kind === "restart") dispatch("studio.video.preview.start", {});
|
|
1031
|
+
else if (disposition.kind === "park") parkPreview(dispatch, disposition.fraction);
|
|
1032
|
+
}, PREVIEW_PLAN_REFRESH_DEBOUNCE_MS);
|
|
1033
|
+
return () => clearTimeout(timer);
|
|
1034
|
+
}, [
|
|
1035
|
+
client,
|
|
1036
|
+
dispatch,
|
|
1037
|
+
plan,
|
|
1038
|
+
uiStore
|
|
1039
|
+
]);
|
|
1040
|
+
};
|
|
1041
|
+
const itineraryIcons = (segments, waypoints) => {
|
|
1042
|
+
const icons = [];
|
|
1043
|
+
for (const waypoint of waypoints) if (waypoint.icon && waypoint.color) icons.push({
|
|
1044
|
+
color: waypoint.color,
|
|
1045
|
+
icon: waypoint.icon
|
|
1046
|
+
});
|
|
1047
|
+
for (const segment of segments) if (segment.color) {
|
|
1048
|
+
icons.push({
|
|
1049
|
+
color: segment.color,
|
|
1050
|
+
icon: "flag-start"
|
|
1051
|
+
});
|
|
1052
|
+
icons.push({
|
|
1053
|
+
color: segment.color,
|
|
1054
|
+
icon: "flag-end"
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
return icons;
|
|
1058
|
+
};
|
|
1059
|
+
const useVideoPreviewSeed = (client) => {
|
|
1060
|
+
const { manifest: layers } = useMountayaLayersManifest();
|
|
1061
|
+
const demUrl = useStudioDemUrl();
|
|
1062
|
+
const language = useStudioPreferences()?.language;
|
|
1063
|
+
const route = useUiStore(selectVideoExportRoute);
|
|
1064
|
+
const itineraryId = useUiStore((state) => state.videoExport?.itineraryId ?? null);
|
|
1065
|
+
const { terrain, terrainVariant } = useUiStoreShallow((state) => ({
|
|
1066
|
+
terrain: state.terrain,
|
|
1067
|
+
terrainVariant: state.terrainVariant
|
|
1068
|
+
}));
|
|
1069
|
+
const { data: detail } = useStudioItinerary(itineraryId ?? void 0, "published");
|
|
1070
|
+
const baseTerrain = useMemo(() => layers ? resolveBaseTerrain(layers.terrains ?? [], terrain, terrainVariant, resolveDemUrl(layers, demUrl)) : null, [
|
|
1071
|
+
demUrl,
|
|
1072
|
+
layers,
|
|
1073
|
+
terrain,
|
|
1074
|
+
terrainVariant
|
|
1075
|
+
]);
|
|
1076
|
+
const styleUrl = baseTerrain?.styleUrl;
|
|
1077
|
+
const terrainDemUrl = baseTerrain?.demUrl;
|
|
1078
|
+
useEffect(() => {
|
|
1079
|
+
if (!client || styleUrl === void 0) return;
|
|
1080
|
+
client.setBaseTerrain(terrainDemUrl ? {
|
|
1081
|
+
demUrl: terrainDemUrl,
|
|
1082
|
+
styleUrl
|
|
1083
|
+
} : { styleUrl });
|
|
1084
|
+
}, [
|
|
1085
|
+
client,
|
|
1086
|
+
styleUrl,
|
|
1087
|
+
terrainDemUrl
|
|
1088
|
+
]);
|
|
1089
|
+
useEffect(() => {
|
|
1090
|
+
if (!client || !layers) return;
|
|
1091
|
+
const sources = [...layers.itineraries?.sources ?? [], ...layers.zones?.sources ?? []];
|
|
1092
|
+
if (sources.length > 0) client.addTileSources(sources);
|
|
1093
|
+
}, [client, layers]);
|
|
1094
|
+
const seeded = layers !== void 0 && layers !== null;
|
|
1095
|
+
useEffect(() => {
|
|
1096
|
+
if (!client || !seeded) return;
|
|
1097
|
+
client.setMapLanguage(clampMapLanguage(language));
|
|
1098
|
+
}, [
|
|
1099
|
+
client,
|
|
1100
|
+
language,
|
|
1101
|
+
seeded
|
|
1102
|
+
]);
|
|
1103
|
+
useEffect(() => {
|
|
1104
|
+
if (!client || !seeded || !detail || !itineraryId) return;
|
|
1105
|
+
const icons = itineraryIcons(detail.segments ?? [], detail.waypoints ?? []);
|
|
1106
|
+
if (icons.length > 0) client.prewarmItineraryIcons(icons);
|
|
1107
|
+
}, [
|
|
1108
|
+
client,
|
|
1109
|
+
detail,
|
|
1110
|
+
itineraryId,
|
|
1111
|
+
seeded,
|
|
1112
|
+
styleUrl,
|
|
1113
|
+
terrainDemUrl
|
|
1114
|
+
]);
|
|
1115
|
+
useEffect(() => {
|
|
1116
|
+
if (!client || !seeded || !detail || !itineraryId) return;
|
|
1117
|
+
client.setItineraryEmphasis({
|
|
1118
|
+
id: itineraryId,
|
|
1119
|
+
mode: "itinerary"
|
|
1120
|
+
});
|
|
1121
|
+
}, [
|
|
1122
|
+
client,
|
|
1123
|
+
detail,
|
|
1124
|
+
itineraryId,
|
|
1125
|
+
seeded
|
|
1126
|
+
]);
|
|
1127
|
+
useEffect(() => {
|
|
1128
|
+
if (!client || !seeded || !route) return;
|
|
1129
|
+
const bounds = boundsOf([{
|
|
1130
|
+
coordinates: route.line,
|
|
1131
|
+
type: "LineString"
|
|
1132
|
+
}]);
|
|
1133
|
+
if (bounds) client.fitBounds(bounds);
|
|
1134
|
+
}, [
|
|
1135
|
+
client,
|
|
1136
|
+
route,
|
|
1137
|
+
seeded
|
|
1138
|
+
]);
|
|
1139
|
+
};
|
|
1140
|
+
const withPublishedSurface = (url) => `${url}${url.includes("?") ? "&" : "?"}surface=published`;
|
|
1141
|
+
const publishedTileTransform = (client) => {
|
|
1142
|
+
const transport = client.transport;
|
|
1143
|
+
let claim;
|
|
1144
|
+
try {
|
|
1145
|
+
claim = createTransformRequest({
|
|
1146
|
+
...transport.mapCredential,
|
|
1147
|
+
language: transport.requestLanguage ?? "*",
|
|
1148
|
+
origins: [transport.tilesBaseUrl],
|
|
1149
|
+
sessionToken: () => transport.mapCredential.sessionToken
|
|
1150
|
+
});
|
|
1151
|
+
} catch {
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
return (url) => {
|
|
1155
|
+
const request = claim(url);
|
|
1156
|
+
return request.credentials === void 0 ? void 0 : {
|
|
1157
|
+
...request,
|
|
1158
|
+
url: withPublishedSurface(request.url)
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
const useVideoTileTransform = (mapClient, transformRequest) => {
|
|
1163
|
+
const stated = transformRequest !== void 0;
|
|
1164
|
+
const derived = useMemo(() => stated ? void 0 : publishedTileTransform(mapClient), [mapClient, stated]);
|
|
1165
|
+
return transformRequest ?? derived;
|
|
1166
|
+
};
|
|
1167
|
+
const previewWatermarkAnchorStyle = {
|
|
1168
|
+
left: `calc(100cqmin * ${WATERMARK_INSET_PX} / ${WATERMARK_REFERENCE_SHORT_SIDE})`,
|
|
1169
|
+
pointerEvents: "none",
|
|
1170
|
+
position: "absolute",
|
|
1171
|
+
top: `calc(100cqmin * ${WATERMARK_INSET_PX} / ${WATERMARK_REFERENCE_SHORT_SIDE})`,
|
|
1172
|
+
zIndex: 2
|
|
1173
|
+
};
|
|
1174
|
+
const previewWatermarkImageStyle = {
|
|
1175
|
+
display: "block",
|
|
1176
|
+
height: "auto",
|
|
1177
|
+
width: `calc(100cqmin * ${WATERMARK_WIDTH_PX} / ${WATERMARK_REFERENCE_SHORT_SIDE})`
|
|
1178
|
+
};
|
|
1179
|
+
const PreviewWatermark = () => {
|
|
1180
|
+
if (useStudioEntitlement("white-label")) return null;
|
|
1181
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
1182
|
+
"aria-hidden": true,
|
|
1183
|
+
style: previewWatermarkAnchorStyle,
|
|
1184
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
1185
|
+
alt: "",
|
|
1186
|
+
"aria-hidden": true,
|
|
1187
|
+
src: WATERMARK_URL,
|
|
1188
|
+
style: previewWatermarkImageStyle
|
|
1189
|
+
})
|
|
1190
|
+
});
|
|
1191
|
+
};
|
|
1192
|
+
const overlayStyle = {
|
|
1193
|
+
height: "100%",
|
|
1194
|
+
inset: 0,
|
|
1195
|
+
pointerEvents: "none",
|
|
1196
|
+
position: "absolute",
|
|
1197
|
+
width: "100%"
|
|
1198
|
+
};
|
|
1199
|
+
const fractionOf = (state) => {
|
|
1200
|
+
const status = selectVideoExportStatus(state);
|
|
1201
|
+
return status && status.kind !== "idle" ? status.fraction : 0;
|
|
1202
|
+
};
|
|
1203
|
+
const ProfileOverlayCanvas = () => {
|
|
1204
|
+
const canvasRef = useRef(null);
|
|
1205
|
+
const store = useUiStoreApi();
|
|
1206
|
+
const plan = useUiStore(selectVideoExportPlan);
|
|
1207
|
+
const route = useUiStore(selectVideoExportRoute);
|
|
1208
|
+
const profileSource = useUiStore((state) => state.videoExport?.profileSource ?? null);
|
|
1209
|
+
const design = useUiStore((state) => state.videoExport?.profile?.design ?? "graph");
|
|
1210
|
+
const length = useUiStore((state) => state.videoExport?.profile?.length ?? "metric");
|
|
1211
|
+
const pace = useUiStore((state) => state.videoExport?.profile?.pace ?? "per-time");
|
|
1212
|
+
const slope = useUiStore((state) => state.videoExport?.profile?.slope ?? "degrees");
|
|
1213
|
+
const language = useUiStore((state) => state.videoExport?.profile?.language ?? "en");
|
|
1214
|
+
const samples = useMemo(() => {
|
|
1215
|
+
if (!plan || !route || !profileSource) return [];
|
|
1216
|
+
return resolveProfileSamples(plan, route, profileSource);
|
|
1217
|
+
}, [
|
|
1218
|
+
plan,
|
|
1219
|
+
route,
|
|
1220
|
+
profileSource
|
|
1221
|
+
]);
|
|
1222
|
+
const curve = useMemo(() => buildProfileCurve(samples), [samples]);
|
|
1223
|
+
useEffect(() => {
|
|
1224
|
+
const canvas = canvasRef.current;
|
|
1225
|
+
if (!canvas) return;
|
|
1226
|
+
const context = canvas.getContext("2d");
|
|
1227
|
+
if (!context) return;
|
|
1228
|
+
const draw = () => {
|
|
1229
|
+
const ratio = window.devicePixelRatio || 1;
|
|
1230
|
+
const cssWidth = canvas.clientWidth;
|
|
1231
|
+
const cssHeight = canvas.clientHeight;
|
|
1232
|
+
const pixelWidth = Math.max(1, Math.round(cssWidth * ratio));
|
|
1233
|
+
const pixelHeight = Math.max(1, Math.round(cssHeight * ratio));
|
|
1234
|
+
if (canvas.width !== pixelWidth || canvas.height !== pixelHeight) {
|
|
1235
|
+
canvas.width = pixelWidth;
|
|
1236
|
+
canvas.height = pixelHeight;
|
|
1237
|
+
}
|
|
1238
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
1239
|
+
if (samples.length === 0) return;
|
|
1240
|
+
const fraction = fractionOf(store.getState());
|
|
1241
|
+
const lastIndex = samples.length - 1;
|
|
1242
|
+
const index = Math.min(lastIndex, Math.max(0, Math.round(fraction * lastIndex)));
|
|
1243
|
+
const sample = samples[index];
|
|
1244
|
+
if (!sample) return;
|
|
1245
|
+
profileOverlayDesigns[design](context, sample, curve, {
|
|
1246
|
+
height: canvas.height,
|
|
1247
|
+
width: canvas.width
|
|
1248
|
+
}, {
|
|
1249
|
+
language,
|
|
1250
|
+
length,
|
|
1251
|
+
pace,
|
|
1252
|
+
slope,
|
|
1253
|
+
temperature: "celsius"
|
|
1254
|
+
});
|
|
1255
|
+
};
|
|
1256
|
+
draw();
|
|
1257
|
+
let disposed = false;
|
|
1258
|
+
ensureOverlayFonts().then(() => {
|
|
1259
|
+
if (!disposed) draw();
|
|
1260
|
+
});
|
|
1261
|
+
const observer = new ResizeObserver(() => draw());
|
|
1262
|
+
observer.observe(canvas);
|
|
1263
|
+
const unsubscribe = store.subscribe((state, previous) => {
|
|
1264
|
+
if (fractionOf(state) !== fractionOf(previous)) draw();
|
|
1265
|
+
});
|
|
1266
|
+
return () => {
|
|
1267
|
+
disposed = true;
|
|
1268
|
+
observer.disconnect();
|
|
1269
|
+
unsubscribe();
|
|
1270
|
+
};
|
|
1271
|
+
}, [
|
|
1272
|
+
store,
|
|
1273
|
+
samples,
|
|
1274
|
+
curve,
|
|
1275
|
+
design,
|
|
1276
|
+
length,
|
|
1277
|
+
pace,
|
|
1278
|
+
slope,
|
|
1279
|
+
language
|
|
1280
|
+
]);
|
|
1281
|
+
return /* @__PURE__ */ jsx("canvas", {
|
|
1282
|
+
ref: canvasRef,
|
|
1283
|
+
style: overlayStyle
|
|
1284
|
+
});
|
|
1285
|
+
};
|
|
1286
|
+
const previewFrameStyle = {
|
|
1287
|
+
borderRadius: "var(--mantine-radius-md)",
|
|
1288
|
+
containerType: "size",
|
|
1289
|
+
height: "100%",
|
|
1290
|
+
overflow: "hidden",
|
|
1291
|
+
position: "relative",
|
|
1292
|
+
width: "100%"
|
|
1293
|
+
};
|
|
1294
|
+
const buildVideoRun = (map) => new VideoRunEngine(map.raw, map.events, () => map.loadOrganization());
|
|
1295
|
+
const PreviewMap = ({ client, mapClient, onClient, plan, transformRequest }) => {
|
|
1296
|
+
const { dispatch } = useStudioDispatch();
|
|
1297
|
+
const { registerVideoMap, unregisterVideoMap } = useStudioHostRegistry();
|
|
1298
|
+
useVideoPreviewSeed(client);
|
|
1299
|
+
const tileTransform = useVideoTileTransform(mapClient, transformRequest);
|
|
1300
|
+
const planRef = useLatestRef(plan);
|
|
1301
|
+
const onClientReady = useCallback((next) => {
|
|
1302
|
+
registerVideoMap(next);
|
|
1303
|
+
onClient(next);
|
|
1304
|
+
}, [registerVideoMap, onClient]);
|
|
1305
|
+
const onClientDestroy = useCallback(() => {
|
|
1306
|
+
unregisterVideoMap();
|
|
1307
|
+
onClient(null);
|
|
1308
|
+
}, [unregisterVideoMap, onClient]);
|
|
1309
|
+
useEffect(() => {
|
|
1310
|
+
if (!client) return;
|
|
1311
|
+
parkPreview(dispatch, representativeStillFraction(planRef.current));
|
|
1312
|
+
return () => {
|
|
1313
|
+
dispatch("studio.video.preview.stop", {});
|
|
1314
|
+
};
|
|
1315
|
+
}, [
|
|
1316
|
+
dispatch,
|
|
1317
|
+
client,
|
|
1318
|
+
planRef
|
|
1319
|
+
]);
|
|
1320
|
+
return /* @__PURE__ */ jsx(ViewerMapView, {
|
|
1321
|
+
client: mapClient,
|
|
1322
|
+
interactive: false,
|
|
1323
|
+
maxTileCacheSize: MAX_TILE_CACHE_SIZE,
|
|
1324
|
+
onClientDestroy,
|
|
1325
|
+
onClientReady,
|
|
1326
|
+
preserveDrawingBuffer: true,
|
|
1327
|
+
transformRequest: tileTransform,
|
|
1328
|
+
video: buildVideoRun,
|
|
1329
|
+
withUrlHash: false
|
|
1330
|
+
});
|
|
1331
|
+
};
|
|
1332
|
+
const PreviewSurface = ({ client, mapClient, onClient, plan, transformRequest }) => {
|
|
1333
|
+
usePreviewPlanRefresh(client, plan);
|
|
1334
|
+
const profileEnabled = useUiStore((state) => state.videoExport?.profile?.enabled ?? false);
|
|
1335
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1336
|
+
className: "ph-no-capture",
|
|
1337
|
+
style: previewFrameStyle,
|
|
1338
|
+
children: [
|
|
1339
|
+
/* @__PURE__ */ jsx(PreviewMap, {
|
|
1340
|
+
client,
|
|
1341
|
+
mapClient,
|
|
1342
|
+
onClient,
|
|
1343
|
+
plan,
|
|
1344
|
+
transformRequest
|
|
1345
|
+
}),
|
|
1346
|
+
profileEnabled ? /* @__PURE__ */ jsx(ProfileOverlayCanvas, {}) : null,
|
|
1347
|
+
/* @__PURE__ */ jsx(PreviewWatermark, {})
|
|
1348
|
+
]
|
|
1349
|
+
});
|
|
1350
|
+
};
|
|
1351
|
+
const SECTIONS$6 = ["publish", "video"];
|
|
1352
|
+
const stageBackdropStyle = {
|
|
1353
|
+
display: "flex",
|
|
1354
|
+
flexDirection: "column"
|
|
1355
|
+
};
|
|
1356
|
+
const frameBackdropStyle = {
|
|
1357
|
+
alignItems: "center",
|
|
1358
|
+
display: "flex",
|
|
1359
|
+
flex: 1,
|
|
1360
|
+
justifyContent: "center",
|
|
1361
|
+
minHeight: 0,
|
|
1362
|
+
overflow: "hidden"
|
|
1363
|
+
};
|
|
1364
|
+
const frameBaseStyle = {
|
|
1365
|
+
height: "100%",
|
|
1366
|
+
maxWidth: "100%",
|
|
1367
|
+
width: "auto"
|
|
1368
|
+
};
|
|
1369
|
+
const containedFrameSize = (outerWidth, outerHeight, ratio) => {
|
|
1370
|
+
if (![
|
|
1371
|
+
outerWidth,
|
|
1372
|
+
outerHeight,
|
|
1373
|
+
ratio
|
|
1374
|
+
].every((value) => Number.isFinite(value) && value > 0)) return null;
|
|
1375
|
+
if (outerWidth / outerHeight > ratio) return {
|
|
1376
|
+
height: outerHeight,
|
|
1377
|
+
width: outerHeight * ratio
|
|
1378
|
+
};
|
|
1379
|
+
const width = outerWidth;
|
|
1380
|
+
return {
|
|
1381
|
+
height: width / ratio,
|
|
1382
|
+
width
|
|
1383
|
+
};
|
|
1384
|
+
};
|
|
1385
|
+
const routeStateCoverStyle = {
|
|
1386
|
+
alignItems: "center",
|
|
1387
|
+
display: "flex",
|
|
1388
|
+
inset: 0,
|
|
1389
|
+
justifyContent: "center",
|
|
1390
|
+
pointerEvents: "none",
|
|
1391
|
+
position: "absolute"
|
|
1392
|
+
};
|
|
1393
|
+
const UnpublishedStage = ({ itineraryId, organizationId }) => /* @__PURE__ */ jsx(Box, {
|
|
1394
|
+
className: "mtya-preview-stage",
|
|
1395
|
+
miw: 0,
|
|
1396
|
+
pos: "relative",
|
|
1397
|
+
style: stageBackdropStyle,
|
|
1398
|
+
children: /* @__PURE__ */ jsx(UnpublishedPanel, {
|
|
1399
|
+
itineraryId,
|
|
1400
|
+
organizationId
|
|
1401
|
+
})
|
|
1402
|
+
});
|
|
1403
|
+
const PreviewStage = ({ client, directing, indicator, mapClient, notice, onClient, plan, recording, routeState = "ready", transformRequest }) => {
|
|
1404
|
+
const words = useStudioScopedStrings(SECTIONS$6);
|
|
1405
|
+
const ratio = aspectRatio(plan.output.aspect);
|
|
1406
|
+
const backdropRef = useRef(null);
|
|
1407
|
+
const [frameSize, setFrameSize] = useState(null);
|
|
1408
|
+
useLayoutEffect(() => {
|
|
1409
|
+
const backdrop = backdropRef.current;
|
|
1410
|
+
if (!backdrop) return;
|
|
1411
|
+
const measure = () => {
|
|
1412
|
+
const rect = backdrop.getBoundingClientRect();
|
|
1413
|
+
setFrameSize(containedFrameSize(rect.width, rect.height, ratio));
|
|
1414
|
+
};
|
|
1415
|
+
measure();
|
|
1416
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
1417
|
+
const observer = new ResizeObserver(measure);
|
|
1418
|
+
observer.observe(backdrop);
|
|
1419
|
+
return () => observer.disconnect();
|
|
1420
|
+
}, [ratio]);
|
|
1421
|
+
const frameStyle = useMemo(() => frameSize ? {
|
|
1422
|
+
height: frameSize.height,
|
|
1423
|
+
width: frameSize.width
|
|
1424
|
+
} : {
|
|
1425
|
+
...frameBaseStyle,
|
|
1426
|
+
aspectRatio: ratio
|
|
1427
|
+
}, [frameSize, ratio]);
|
|
1428
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
1429
|
+
bg: "dark.8",
|
|
1430
|
+
className: "mtya-preview-stage",
|
|
1431
|
+
miw: 0,
|
|
1432
|
+
pos: "relative",
|
|
1433
|
+
style: stageBackdropStyle,
|
|
1434
|
+
children: [
|
|
1435
|
+
notice === void 0 ? null : /* @__PURE__ */ jsx(Box, {
|
|
1436
|
+
p: "xs",
|
|
1437
|
+
pb: 0,
|
|
1438
|
+
children: notice
|
|
1439
|
+
}),
|
|
1440
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
1441
|
+
ref: backdropRef,
|
|
1442
|
+
style: frameBackdropStyle,
|
|
1443
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
1444
|
+
"data-testid": "preview-frame",
|
|
1445
|
+
style: frameStyle,
|
|
1446
|
+
children: /* @__PURE__ */ jsx(PreviewSurface, {
|
|
1447
|
+
client,
|
|
1448
|
+
mapClient,
|
|
1449
|
+
onClient,
|
|
1450
|
+
plan,
|
|
1451
|
+
transformRequest
|
|
1452
|
+
})
|
|
1453
|
+
}), routeState === "ready" ? null : /* @__PURE__ */ jsx(Stack, {
|
|
1454
|
+
align: "center",
|
|
1455
|
+
gap: "xs",
|
|
1456
|
+
style: routeStateCoverStyle,
|
|
1457
|
+
children: routeState === "loading" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Loader, { size: "sm" }), /* @__PURE__ */ jsx(Text, {
|
|
1458
|
+
c: "dimmed",
|
|
1459
|
+
size: "sm",
|
|
1460
|
+
children: words.video.preview.loading
|
|
1461
|
+
})] }) : /* @__PURE__ */ jsx(Text, {
|
|
1462
|
+
c: "dimmed",
|
|
1463
|
+
size: "sm",
|
|
1464
|
+
children: routeState === "error" ? words.video.preview.error : words.video.preview.empty
|
|
1465
|
+
})
|
|
1466
|
+
})]
|
|
1467
|
+
}),
|
|
1468
|
+
/* @__PURE__ */ jsx(Box, {
|
|
1469
|
+
bg: "var(--mantine-color-body)",
|
|
1470
|
+
px: "md",
|
|
1471
|
+
py: "xs",
|
|
1472
|
+
children: /* @__PURE__ */ jsx(PreviewControls, {
|
|
1473
|
+
disabled: directing || recording || routeState !== "ready",
|
|
1474
|
+
plan
|
|
1475
|
+
})
|
|
1476
|
+
}),
|
|
1477
|
+
indicator
|
|
1478
|
+
]
|
|
1479
|
+
});
|
|
1480
|
+
};
|
|
1481
|
+
const SECTIONS$5 = ["preferences", "video"];
|
|
1482
|
+
const DESIGN_OPTIONS = [
|
|
1483
|
+
{
|
|
1484
|
+
glyph: "profile-graph",
|
|
1485
|
+
value: "graph"
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
glyph: "profile-strip",
|
|
1489
|
+
value: "strip"
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
glyph: "profile-minimal",
|
|
1493
|
+
value: "minimal"
|
|
1494
|
+
}
|
|
1495
|
+
];
|
|
1496
|
+
const LANGUAGE_OPTIONS = languageSchema.options.map((value) => ({
|
|
1497
|
+
label: languageEndonym$1[value],
|
|
1498
|
+
value
|
|
1499
|
+
}));
|
|
1500
|
+
const ProfileStep = () => {
|
|
1501
|
+
const languageMark = useStudioLanguageMark();
|
|
1502
|
+
const words = useStudioScopedStrings(SECTIONS$5);
|
|
1503
|
+
const headingId = useId();
|
|
1504
|
+
const units = useStudioScopedStrings(SECTIONS$5).preferences.units;
|
|
1505
|
+
const { dispatch } = useStudioDispatch();
|
|
1506
|
+
const enabled = useUiStore((state) => state.videoExport?.profile?.enabled ?? false);
|
|
1507
|
+
const design = useUiStore((state) => state.videoExport?.profile?.design ?? "graph");
|
|
1508
|
+
const length = useUiStore((state) => state.videoExport?.profile?.length ?? "metric");
|
|
1509
|
+
const pace = useUiStore((state) => state.videoExport?.profile?.pace ?? "per-time");
|
|
1510
|
+
const slope = useUiStore((state) => state.videoExport?.profile?.slope ?? "degrees");
|
|
1511
|
+
const language = useUiStore((state) => state.videoExport?.profile?.language ?? "en");
|
|
1512
|
+
const onToggle = useCallback((next) => {
|
|
1513
|
+
dispatch("studio.video.profile.toggle", { enabled: next });
|
|
1514
|
+
}, [dispatch]);
|
|
1515
|
+
const onDesignChange = useCallback((value) => {
|
|
1516
|
+
dispatch("studio.video.profile.design.set", { design: profileDesignSchema.parse(value) });
|
|
1517
|
+
}, [dispatch]);
|
|
1518
|
+
const onLengthChange = useCallback((value) => {
|
|
1519
|
+
dispatch("studio.video.profile.units.set", {
|
|
1520
|
+
length: unitLengthSchema.parse(value),
|
|
1521
|
+
pace,
|
|
1522
|
+
slope
|
|
1523
|
+
});
|
|
1524
|
+
}, [
|
|
1525
|
+
dispatch,
|
|
1526
|
+
pace,
|
|
1527
|
+
slope
|
|
1528
|
+
]);
|
|
1529
|
+
const onPaceChange = useCallback((value) => {
|
|
1530
|
+
dispatch("studio.video.profile.units.set", {
|
|
1531
|
+
length,
|
|
1532
|
+
pace: unitPaceSchema.parse(value),
|
|
1533
|
+
slope
|
|
1534
|
+
});
|
|
1535
|
+
}, [
|
|
1536
|
+
dispatch,
|
|
1537
|
+
length,
|
|
1538
|
+
slope
|
|
1539
|
+
]);
|
|
1540
|
+
const onSlopeChange = useCallback((value) => {
|
|
1541
|
+
dispatch("studio.video.profile.units.set", {
|
|
1542
|
+
length,
|
|
1543
|
+
pace,
|
|
1544
|
+
slope: unitSlopeSchema.parse(value)
|
|
1545
|
+
});
|
|
1546
|
+
}, [
|
|
1547
|
+
dispatch,
|
|
1548
|
+
length,
|
|
1549
|
+
pace
|
|
1550
|
+
]);
|
|
1551
|
+
const onLanguageChange = useCallback((value) => {
|
|
1552
|
+
dispatch("studio.video.profile.language.set", { language: value });
|
|
1553
|
+
}, [dispatch]);
|
|
1554
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
1555
|
+
gap: "lg",
|
|
1556
|
+
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
1557
|
+
gap: "xxs",
|
|
1558
|
+
children: [/* @__PURE__ */ jsx(Switch, {
|
|
1559
|
+
checked: enabled,
|
|
1560
|
+
label: words.video.profile.enable,
|
|
1561
|
+
onChange: (event) => onToggle(event.currentTarget.checked)
|
|
1562
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
1563
|
+
c: "dimmed",
|
|
1564
|
+
size: "xs",
|
|
1565
|
+
children: words.video.profile.hint
|
|
1566
|
+
})]
|
|
1567
|
+
}), enabled ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1568
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
1569
|
+
gap: "xxs",
|
|
1570
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1571
|
+
variant: "section-label",
|
|
1572
|
+
children: words.video.profile.designLabel
|
|
1573
|
+
}), /* @__PURE__ */ jsx(Radio.Group, {
|
|
1574
|
+
"aria-label": words.video.profile.designLabel,
|
|
1575
|
+
onChange: onDesignChange,
|
|
1576
|
+
value: design,
|
|
1577
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
1578
|
+
gap: "xs",
|
|
1579
|
+
children: DESIGN_OPTIONS.map((option) => /* @__PURE__ */ jsx(RadioOptionCard, {
|
|
1580
|
+
checked: option.value === design,
|
|
1581
|
+
description: words.video.profile.design[option.value].description,
|
|
1582
|
+
glyph: option.glyph,
|
|
1583
|
+
title: words.video.profile.design[option.value].title,
|
|
1584
|
+
value: option.value
|
|
1585
|
+
}, option.value))
|
|
1586
|
+
})
|
|
1587
|
+
})]
|
|
1588
|
+
}),
|
|
1589
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
1590
|
+
gap: "xxs",
|
|
1591
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1592
|
+
id: `${headingId}-length`,
|
|
1593
|
+
variant: "section-label",
|
|
1594
|
+
children: words.video.profile.lengthLabel
|
|
1595
|
+
}), /* @__PURE__ */ jsx(UnitPickerGrid, {
|
|
1596
|
+
"aria-labelledby": `${headingId}-length`,
|
|
1597
|
+
kindSlug: "video-length",
|
|
1598
|
+
onChange: onLengthChange,
|
|
1599
|
+
options: lengthUnitOptions(units),
|
|
1600
|
+
value: length
|
|
1601
|
+
})]
|
|
1602
|
+
}),
|
|
1603
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
1604
|
+
gap: "xxs",
|
|
1605
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1606
|
+
id: `${headingId}-pace`,
|
|
1607
|
+
variant: "section-label",
|
|
1608
|
+
children: words.video.profile.paceLabel
|
|
1609
|
+
}), /* @__PURE__ */ jsx(UnitPickerGrid, {
|
|
1610
|
+
"aria-labelledby": `${headingId}-pace`,
|
|
1611
|
+
kindSlug: "video-pace",
|
|
1612
|
+
onChange: onPaceChange,
|
|
1613
|
+
options: paceUnitOptions(units, length),
|
|
1614
|
+
value: pace
|
|
1615
|
+
})]
|
|
1616
|
+
}),
|
|
1617
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
1618
|
+
gap: "xxs",
|
|
1619
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1620
|
+
id: `${headingId}-slope`,
|
|
1621
|
+
variant: "section-label",
|
|
1622
|
+
children: words.video.profile.slopeLabel
|
|
1623
|
+
}), /* @__PURE__ */ jsx(UnitPickerGrid, {
|
|
1624
|
+
"aria-labelledby": `${headingId}-slope`,
|
|
1625
|
+
kindSlug: "video-slope",
|
|
1626
|
+
onChange: onSlopeChange,
|
|
1627
|
+
options: slopeUnitOptions(units),
|
|
1628
|
+
value: slope
|
|
1629
|
+
})]
|
|
1630
|
+
}),
|
|
1631
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
1632
|
+
gap: "xxs",
|
|
1633
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1634
|
+
variant: "section-label",
|
|
1635
|
+
children: words.video.profile.languageLabel
|
|
1636
|
+
}), /* @__PURE__ */ jsx(LanguageSelect, {
|
|
1637
|
+
"aria-label": words.video.profile.languageLabel,
|
|
1638
|
+
onChange: onLanguageChange,
|
|
1639
|
+
options: LANGUAGE_OPTIONS,
|
|
1640
|
+
renderMark: languageMark,
|
|
1641
|
+
value: language
|
|
1642
|
+
})]
|
|
1643
|
+
})
|
|
1644
|
+
] }) : null]
|
|
1645
|
+
});
|
|
1646
|
+
};
|
|
1647
|
+
const SECTIONS$4 = ["video"];
|
|
1648
|
+
const RecordProgressBar = () => {
|
|
1649
|
+
const words = useStudioScopedStrings(SECTIONS$4);
|
|
1650
|
+
const recording = useUiStore((state) => {
|
|
1651
|
+
const status = selectVideoExportStatus(state);
|
|
1652
|
+
return status?.kind === "recording" ? status : null;
|
|
1653
|
+
});
|
|
1654
|
+
if (!recording) return null;
|
|
1655
|
+
return /* @__PURE__ */ jsxs(Group, {
|
|
1656
|
+
align: "center",
|
|
1657
|
+
flex: 1,
|
|
1658
|
+
gap: "sm",
|
|
1659
|
+
role: "status",
|
|
1660
|
+
wrap: "nowrap",
|
|
1661
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1662
|
+
c: "dimmed",
|
|
1663
|
+
size: "xs",
|
|
1664
|
+
children: words.video.record.phase[recording.phase]
|
|
1665
|
+
}), /* @__PURE__ */ jsx(Progress, {
|
|
1666
|
+
flex: 1,
|
|
1667
|
+
value: convertProportion(recording.fraction, "ratio", "percent")
|
|
1668
|
+
})]
|
|
1669
|
+
});
|
|
1670
|
+
};
|
|
1671
|
+
const RecordProgress = ({ outcome }) => {
|
|
1672
|
+
const words = useStudioScopedStrings(SECTIONS$4);
|
|
1673
|
+
const { dispatch } = useStudioDispatch();
|
|
1674
|
+
const onDownload = useCallback(() => {
|
|
1675
|
+
dispatch("studio.video.download", {});
|
|
1676
|
+
}, [dispatch]);
|
|
1677
|
+
if (outcome.kind === "error") return /* @__PURE__ */ jsx(ErrorAlert, {
|
|
1678
|
+
title: words.video.record.errorTitle,
|
|
1679
|
+
children: outcome.message
|
|
1680
|
+
});
|
|
1681
|
+
if (outcome.kind === "done") return /* @__PURE__ */ jsx(Alert, {
|
|
1682
|
+
color: "teal",
|
|
1683
|
+
icon: /* @__PURE__ */ jsx(Glyph$1, {
|
|
1684
|
+
name: "success",
|
|
1685
|
+
size: iconSizes.md
|
|
1686
|
+
}),
|
|
1687
|
+
title: words.video.record.doneTitle,
|
|
1688
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
1689
|
+
align: "flex-start",
|
|
1690
|
+
gap: "xs",
|
|
1691
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1692
|
+
size: "sm",
|
|
1693
|
+
children: words.video.record.done
|
|
1694
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
1695
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
1696
|
+
name: "download",
|
|
1697
|
+
size: iconSizes.sm
|
|
1698
|
+
}),
|
|
1699
|
+
onClick: onDownload,
|
|
1700
|
+
children: words.video.record.download
|
|
1701
|
+
})]
|
|
1702
|
+
})
|
|
1703
|
+
});
|
|
1704
|
+
return null;
|
|
1705
|
+
};
|
|
1706
|
+
const SECTIONS$3 = ["preferences", "video"];
|
|
1707
|
+
const SummaryRow = ({ label, value }) => /* @__PURE__ */ jsxs(Group, {
|
|
1708
|
+
justify: "space-between",
|
|
1709
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1710
|
+
c: "dimmed",
|
|
1711
|
+
children: label
|
|
1712
|
+
}), /* @__PURE__ */ jsx(Text, { children: value })]
|
|
1713
|
+
});
|
|
1714
|
+
const ReviewSection = ({ children, editLabel, onEdit, title }) => {
|
|
1715
|
+
const words = useStudioScopedStrings(SECTIONS$3);
|
|
1716
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
1717
|
+
gap: "sm",
|
|
1718
|
+
children: [/* @__PURE__ */ jsxs(Group, {
|
|
1719
|
+
justify: "space-between",
|
|
1720
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
1721
|
+
variant: "section-label",
|
|
1722
|
+
children: title
|
|
1723
|
+
}), /* @__PURE__ */ jsx(Anchor, {
|
|
1724
|
+
"aria-label": editLabel,
|
|
1725
|
+
component: "button",
|
|
1726
|
+
onClick: onEdit,
|
|
1727
|
+
size: "xs",
|
|
1728
|
+
type: "button",
|
|
1729
|
+
children: words.video.review.edit
|
|
1730
|
+
})]
|
|
1731
|
+
}), children]
|
|
1732
|
+
});
|
|
1733
|
+
};
|
|
1734
|
+
const ReviewStep = ({ outcome, plan }) => {
|
|
1735
|
+
const words = useStudioScopedStrings(SECTIONS$3);
|
|
1736
|
+
const { dispatch } = useStudioDispatch();
|
|
1737
|
+
const profile = useUiStore((state) => state.videoExport?.profile ?? defaultVideoExportProfile);
|
|
1738
|
+
const output = plan.output;
|
|
1739
|
+
const editStep = (step) => () => {
|
|
1740
|
+
dispatch("studio.video.step.set", { step });
|
|
1741
|
+
};
|
|
1742
|
+
const bitrate = output.bitrateMbps ?? bitrateForOutput(output.resolution, output.fps, output.quality);
|
|
1743
|
+
const formatEntry = FORMAT_OPTIONS.find((option) => option.value === output.format);
|
|
1744
|
+
const containerLabel = formatEntry ? words.video.format.matrix[formatEntry.labelKey] : output.format;
|
|
1745
|
+
const qualityEntry = QUALITY_OPTIONS.find((option) => option.value === output.quality);
|
|
1746
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
1747
|
+
gap: "xl",
|
|
1748
|
+
children: [
|
|
1749
|
+
/* @__PURE__ */ jsxs(ReviewSection, {
|
|
1750
|
+
editLabel: words.video.review.editSection(words.video.review.sections.format),
|
|
1751
|
+
onEdit: editStep("format"),
|
|
1752
|
+
title: words.video.review.sections.format,
|
|
1753
|
+
children: [
|
|
1754
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1755
|
+
label: words.video.review.preset,
|
|
1756
|
+
value: words.video.format.preset[output.preset].title
|
|
1757
|
+
}),
|
|
1758
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1759
|
+
label: words.video.review.length,
|
|
1760
|
+
value: words.video.format.lengthSeconds(Math.round(planDurationMs(plan) / MILLISECONDS_PER_SECOND))
|
|
1761
|
+
}),
|
|
1762
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1763
|
+
label: words.video.format.matrix.aspectLabel,
|
|
1764
|
+
value: output.aspect
|
|
1765
|
+
}),
|
|
1766
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1767
|
+
label: words.video.format.matrix.resolutionLabel,
|
|
1768
|
+
value: output.resolution
|
|
1769
|
+
}),
|
|
1770
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1771
|
+
label: words.video.format.matrix.fpsLabel,
|
|
1772
|
+
value: words.video.review.fpsValue(output.fps)
|
|
1773
|
+
}),
|
|
1774
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1775
|
+
label: words.video.format.matrix.formatLabel,
|
|
1776
|
+
value: containerLabel
|
|
1777
|
+
}),
|
|
1778
|
+
output.preset === "custom" && qualityEntry ? /* @__PURE__ */ jsx(SummaryRow, {
|
|
1779
|
+
label: words.video.format.matrix.qualityLabel,
|
|
1780
|
+
value: words.video.format.matrix[qualityEntry.labelKey]
|
|
1781
|
+
}) : null,
|
|
1782
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1783
|
+
label: words.video.format.matrix.bitrateLabel,
|
|
1784
|
+
value: words.video.format.matrix.bitrateValue(bitrate)
|
|
1785
|
+
}),
|
|
1786
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1787
|
+
label: words.video.review.estimatedSize,
|
|
1788
|
+
value: words.video.review.estimatedSizeValue(Math.round(estimatedVideoSizeMb(bitrate, planDurationMs(plan))))
|
|
1789
|
+
})
|
|
1790
|
+
]
|
|
1791
|
+
}),
|
|
1792
|
+
/* @__PURE__ */ jsxs(ReviewSection, {
|
|
1793
|
+
editLabel: words.video.review.editSection(words.video.review.sections.camera),
|
|
1794
|
+
onEdit: editStep("camera"),
|
|
1795
|
+
title: words.video.review.sections.camera,
|
|
1796
|
+
children: [/* @__PURE__ */ jsx(SummaryRow, {
|
|
1797
|
+
label: words.video.review.mode,
|
|
1798
|
+
value: words.video.mode[plan.mode].title
|
|
1799
|
+
}), plan.mode === "director" ? /* @__PURE__ */ jsx(SummaryRow, {
|
|
1800
|
+
label: words.video.review.shotsLabel,
|
|
1801
|
+
value: words.video.review.shots(plan.shots.length)
|
|
1802
|
+
}) : null]
|
|
1803
|
+
}),
|
|
1804
|
+
/* @__PURE__ */ jsxs(ReviewSection, {
|
|
1805
|
+
editLabel: words.video.review.editSection(words.video.review.sections.overlay),
|
|
1806
|
+
onEdit: editStep("profile"),
|
|
1807
|
+
title: words.video.review.sections.overlay,
|
|
1808
|
+
children: [/* @__PURE__ */ jsx(SummaryRow, {
|
|
1809
|
+
label: words.video.review.overlay,
|
|
1810
|
+
value: profile.enabled ? words.video.review.on : words.video.review.off
|
|
1811
|
+
}), profile.enabled ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1812
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1813
|
+
label: words.video.profile.designLabel,
|
|
1814
|
+
value: words.video.profile.design[profile.design].title
|
|
1815
|
+
}),
|
|
1816
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1817
|
+
label: words.video.profile.lengthLabel,
|
|
1818
|
+
value: words.preferences.units[profile.length].name
|
|
1819
|
+
}),
|
|
1820
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1821
|
+
label: words.video.profile.slopeLabel,
|
|
1822
|
+
value: words.preferences.units[profile.slope].name
|
|
1823
|
+
}),
|
|
1824
|
+
/* @__PURE__ */ jsx(SummaryRow, {
|
|
1825
|
+
label: words.video.profile.languageLabel,
|
|
1826
|
+
value: languageEndonym$1[profile.language]
|
|
1827
|
+
})
|
|
1828
|
+
] }) : null]
|
|
1829
|
+
}),
|
|
1830
|
+
/* @__PURE__ */ jsx(RecordProgress, { outcome })
|
|
1831
|
+
]
|
|
1832
|
+
});
|
|
1833
|
+
};
|
|
1834
|
+
const SECTIONS$2 = ["director"];
|
|
1835
|
+
const WizardDirectingIndicator = () => {
|
|
1836
|
+
const words = useStudioScopedStrings(SECTIONS$2);
|
|
1837
|
+
const { directing, stop } = useDirectorChat();
|
|
1838
|
+
const activeTool = useDirectorStore((store) => store.activeTool);
|
|
1839
|
+
if (!directing) return null;
|
|
1840
|
+
return /* @__PURE__ */ jsx(Overlay, {
|
|
1841
|
+
backgroundOpacity: .35,
|
|
1842
|
+
blur: 1,
|
|
1843
|
+
center: true,
|
|
1844
|
+
children: /* @__PURE__ */ jsx(Paper, {
|
|
1845
|
+
p: "md",
|
|
1846
|
+
shadow: "md",
|
|
1847
|
+
withBorder: true,
|
|
1848
|
+
children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
1849
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1850
|
+
fw: 500,
|
|
1851
|
+
children: words.director.directing
|
|
1852
|
+
}),
|
|
1853
|
+
/* @__PURE__ */ jsx(Text, {
|
|
1854
|
+
c: "dimmed",
|
|
1855
|
+
children: activeTool ?? words.director.activity
|
|
1856
|
+
}),
|
|
1857
|
+
/* @__PURE__ */ jsx(Group, {
|
|
1858
|
+
justify: "flex-end",
|
|
1859
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1860
|
+
color: "red",
|
|
1861
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
1862
|
+
name: "action-stop",
|
|
1863
|
+
size: iconSizes.sm
|
|
1864
|
+
}),
|
|
1865
|
+
onClick: stop,
|
|
1866
|
+
variant: "light",
|
|
1867
|
+
children: words.director.stop
|
|
1868
|
+
})
|
|
1869
|
+
})
|
|
1870
|
+
] })
|
|
1871
|
+
})
|
|
1872
|
+
});
|
|
1873
|
+
};
|
|
1874
|
+
const SECTIONS$1 = ["publish", "video"];
|
|
1875
|
+
const WizardFooter = ({ activeIndex, directing, onBack, onNext, onRecord, recordDisabled, recording, stepCount }) => {
|
|
1876
|
+
const words = useStudioScopedStrings(SECTIONS$1);
|
|
1877
|
+
const onReview = activeIndex === stepCount - 1;
|
|
1878
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
1879
|
+
className: "mtya-fullscreen-footer",
|
|
1880
|
+
px: "md",
|
|
1881
|
+
py: "sm",
|
|
1882
|
+
children: /* @__PURE__ */ jsxs(Group, {
|
|
1883
|
+
justify: "space-between",
|
|
1884
|
+
wrap: "nowrap",
|
|
1885
|
+
children: [
|
|
1886
|
+
/* @__PURE__ */ jsx(Button, {
|
|
1887
|
+
disabled: activeIndex === 0 || directing || recording,
|
|
1888
|
+
onClick: onBack,
|
|
1889
|
+
variant: "default",
|
|
1890
|
+
children: words.video.footer.back
|
|
1891
|
+
}),
|
|
1892
|
+
onReview ? /* @__PURE__ */ jsx(RecordProgressBar, {}) : null,
|
|
1893
|
+
onReview ? recordDisabled ? /* @__PURE__ */ jsx(Tooltip, {
|
|
1894
|
+
label: words.publish.blockedByUnpublished,
|
|
1895
|
+
position: "top",
|
|
1896
|
+
withinPortal: true,
|
|
1897
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Button, {
|
|
1898
|
+
disabled: true,
|
|
1899
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
1900
|
+
name: "video",
|
|
1901
|
+
size: iconSizes.sm
|
|
1902
|
+
}),
|
|
1903
|
+
children: words.video.record.start
|
|
1904
|
+
}) })
|
|
1905
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
1906
|
+
disabled: directing,
|
|
1907
|
+
leftSection: /* @__PURE__ */ jsx(Glyph$1, {
|
|
1908
|
+
name: "video",
|
|
1909
|
+
size: iconSizes.sm
|
|
1910
|
+
}),
|
|
1911
|
+
loading: recording,
|
|
1912
|
+
onClick: onRecord,
|
|
1913
|
+
children: words.video.record.start
|
|
1914
|
+
}) : /* @__PURE__ */ jsx(Button, {
|
|
1915
|
+
disabled: directing,
|
|
1916
|
+
onClick: onNext,
|
|
1917
|
+
children: words.video.footer.next
|
|
1918
|
+
})
|
|
1919
|
+
]
|
|
1920
|
+
})
|
|
1921
|
+
});
|
|
1922
|
+
};
|
|
1923
|
+
const SECTIONS = [
|
|
1924
|
+
"actions",
|
|
1925
|
+
"confirm",
|
|
1926
|
+
"copilot",
|
|
1927
|
+
"director",
|
|
1928
|
+
"failure",
|
|
1929
|
+
"itineraryActions",
|
|
1930
|
+
"preferences",
|
|
1931
|
+
"prompt",
|
|
1932
|
+
"publish",
|
|
1933
|
+
"video"
|
|
1934
|
+
];
|
|
1935
|
+
const stepGlyphs = {
|
|
1936
|
+
camera: "action-capture-view",
|
|
1937
|
+
format: "frame-widescreen",
|
|
1938
|
+
profile: "profile-graph",
|
|
1939
|
+
review: "check"
|
|
1940
|
+
};
|
|
1941
|
+
const VIDEO_WIZARD_CLASS = "mtya-video-wizard";
|
|
1942
|
+
const SEEK_STEP_FRACTION = .05;
|
|
1943
|
+
const INTERACTIVE_SELECTOR = "input, textarea, select, button, a, [contenteditable], [role='slider'], [role='menuitem']";
|
|
1944
|
+
const recordingStepStyle = { opacity: .5 };
|
|
1945
|
+
const MemoFormatStep = memo(FormatStep);
|
|
1946
|
+
const MemoCameraStep = memo(CameraStep);
|
|
1947
|
+
const MemoProfileStep = memo(ProfileStep);
|
|
1948
|
+
const MemoReviewStep = memo(ReviewStep);
|
|
1949
|
+
const idleOutcome = { kind: "idle" };
|
|
1950
|
+
const doneOutcome = { kind: "done" };
|
|
1951
|
+
const useRecordOutcome = () => {
|
|
1952
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
1953
|
+
const { dispatch } = useStudioDispatch();
|
|
1954
|
+
const [outcome, setOutcome] = useState(idleOutcome);
|
|
1955
|
+
const plan = useUiStore(selectVideoExportPlan);
|
|
1956
|
+
const profile = useUiStore((state) => state.videoExport?.profile ?? null);
|
|
1957
|
+
const seenPlan = useRef(plan);
|
|
1958
|
+
const seenProfile = useRef(profile);
|
|
1959
|
+
useEffect(() => {
|
|
1960
|
+
if (seenPlan.current === plan && seenProfile.current === profile) return;
|
|
1961
|
+
seenPlan.current = plan;
|
|
1962
|
+
seenProfile.current = profile;
|
|
1963
|
+
setOutcome(idleOutcome);
|
|
1964
|
+
}, [plan, profile]);
|
|
1965
|
+
return {
|
|
1966
|
+
onRecord: useCallback(() => {
|
|
1967
|
+
setOutcome(idleOutcome);
|
|
1968
|
+
dispatch("studio.video.record", {}).then((result) => {
|
|
1969
|
+
if (result.ok) {
|
|
1970
|
+
setOutcome(doneOutcome);
|
|
1971
|
+
return;
|
|
1972
|
+
}
|
|
1973
|
+
const refusal = result.code === "canceled" ? null : failureAlertFor(result, words.video.record.error, words.failure);
|
|
1974
|
+
setOutcome(refusal === null ? idleOutcome : {
|
|
1975
|
+
kind: "error",
|
|
1976
|
+
message: refusal.message
|
|
1977
|
+
});
|
|
1978
|
+
});
|
|
1979
|
+
}, [dispatch, words]),
|
|
1980
|
+
outcome
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
const useWizardSteps = (step) => {
|
|
1984
|
+
const { dispatch } = useStudioDispatch();
|
|
1985
|
+
const activeIndex = VIDEO_STEP_ORDER.indexOf(step);
|
|
1986
|
+
const goToStep = useCallback((next) => {
|
|
1987
|
+
dispatch("studio.video.step.set", { step: next });
|
|
1988
|
+
}, [dispatch]);
|
|
1989
|
+
return {
|
|
1990
|
+
activeIndex,
|
|
1991
|
+
goToStep,
|
|
1992
|
+
onBack: useCallback(() => {
|
|
1993
|
+
const previous = VIDEO_STEP_ORDER[activeIndex - 1];
|
|
1994
|
+
if (previous) goToStep(previous);
|
|
1995
|
+
}, [activeIndex, goToStep]),
|
|
1996
|
+
onNext: useCallback(() => {
|
|
1997
|
+
const next = VIDEO_STEP_ORDER[activeIndex + 1];
|
|
1998
|
+
if (next) goToStep(next);
|
|
1999
|
+
}, [activeIndex, goToStep])
|
|
2000
|
+
};
|
|
2001
|
+
};
|
|
2002
|
+
const usePreviewShortcuts = (inert) => {
|
|
2003
|
+
const { dispatch } = useStudioDispatch();
|
|
2004
|
+
const uiStore = useUiStoreApi();
|
|
2005
|
+
useWindowEvent("keydown", (event) => {
|
|
2006
|
+
if (inert) return;
|
|
2007
|
+
if (event.composedPath().some((node) => node instanceof Element && node.matches(INTERACTIVE_SELECTOR))) return;
|
|
2008
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
2009
|
+
if (event.code === "Space") {
|
|
2010
|
+
event.preventDefault();
|
|
2011
|
+
const playing = uiStore.getState().videoExport?.status.kind === "previewing";
|
|
2012
|
+
dispatch(playing ? "studio.video.preview.pause" : "studio.video.preview.play", {});
|
|
2013
|
+
return;
|
|
2014
|
+
}
|
|
2015
|
+
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
|
|
2016
|
+
event.preventDefault();
|
|
2017
|
+
const status = uiStore.getState().videoExport?.status;
|
|
2018
|
+
const fraction = status && status.kind !== "idle" ? status.fraction : 0;
|
|
2019
|
+
const delta = event.key === "ArrowLeft" ? -.05 : SEEK_STEP_FRACTION;
|
|
2020
|
+
dispatch("studio.video.preview.seek", { fraction: Math.min(1, Math.max(0, fraction + delta)) });
|
|
2021
|
+
}
|
|
2022
|
+
});
|
|
2023
|
+
};
|
|
2024
|
+
const WizardShell = ({ director, directing, indicator, itineraryId, mapClient, scrim, transformRequest }) => {
|
|
2025
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
2026
|
+
const { dispatch } = useStudioDispatch();
|
|
2027
|
+
const stepsId = useId$1();
|
|
2028
|
+
const plan = useUiStore(selectVideoExportPlan);
|
|
2029
|
+
const route = useUiStore(selectVideoExportRoute);
|
|
2030
|
+
const step = useUiStore((state) => state.videoExport?.step ?? "format");
|
|
2031
|
+
const recording = useUiStore((state) => selectVideoExportStatus(state)?.kind === "recording");
|
|
2032
|
+
const itinerarySubject = useVideoItinerarySubject(itineraryId);
|
|
2033
|
+
const publication = useVideoPublication(itineraryId);
|
|
2034
|
+
const unpublished = publication === "unpublished";
|
|
2035
|
+
const organizationId = useVideoOrganizationId();
|
|
2036
|
+
const routeReady = useVideoRouteReady();
|
|
2037
|
+
const routeState = publication === "error" ? "error" : routeReady;
|
|
2038
|
+
const flyable = routeState === "ready";
|
|
2039
|
+
const [client, setClient] = useState(null);
|
|
2040
|
+
const { onRecord, outcome } = useRecordOutcome();
|
|
2041
|
+
const { activeIndex, goToStep, onBack, onNext } = useWizardSteps(step);
|
|
2042
|
+
usePreviewShortcuts(Boolean(directing) || recording || !flyable);
|
|
2043
|
+
const close = useCallback(() => {
|
|
2044
|
+
dispatch("studio.video.close", {});
|
|
2045
|
+
}, [dispatch]);
|
|
2046
|
+
const held = Boolean(directing) || recording;
|
|
2047
|
+
const entries = useMemo(() => VIDEO_STEP_ORDER.map((id) => ({
|
|
2048
|
+
disabled: held && id !== step,
|
|
2049
|
+
glyph: stepGlyphs[id],
|
|
2050
|
+
id,
|
|
2051
|
+
label: words.video.steps[id].label
|
|
2052
|
+
})), [
|
|
2053
|
+
held,
|
|
2054
|
+
step,
|
|
2055
|
+
words
|
|
2056
|
+
]);
|
|
2057
|
+
if (!plan) return null;
|
|
2058
|
+
const stepBody = {
|
|
2059
|
+
camera: /* @__PURE__ */ jsx(MemoCameraStep, {
|
|
2060
|
+
directing,
|
|
2061
|
+
director,
|
|
2062
|
+
plan,
|
|
2063
|
+
scrim
|
|
2064
|
+
}),
|
|
2065
|
+
format: /* @__PURE__ */ jsx(MemoFormatStep, {
|
|
2066
|
+
plan,
|
|
2067
|
+
route
|
|
2068
|
+
}),
|
|
2069
|
+
profile: /* @__PURE__ */ jsx(MemoProfileStep, {}),
|
|
2070
|
+
review: /* @__PURE__ */ jsx(MemoReviewStep, {
|
|
2071
|
+
outcome,
|
|
2072
|
+
plan
|
|
2073
|
+
})
|
|
2074
|
+
};
|
|
2075
|
+
return /* @__PURE__ */ jsx(FullscreenModal, {
|
|
2076
|
+
ariaLabel: words.video.title,
|
|
2077
|
+
onClose: close,
|
|
2078
|
+
children: /* @__PURE__ */ jsx(WizardLayout, {
|
|
2079
|
+
className: VIDEO_WIZARD_CLASS,
|
|
2080
|
+
footer: /* @__PURE__ */ jsx(WizardFooter, {
|
|
2081
|
+
activeIndex,
|
|
2082
|
+
directing,
|
|
2083
|
+
onBack,
|
|
2084
|
+
onNext,
|
|
2085
|
+
onRecord,
|
|
2086
|
+
recordDisabled: unpublished || !flyable,
|
|
2087
|
+
recording,
|
|
2088
|
+
stepCount: VIDEO_STEP_ORDER.length
|
|
2089
|
+
}),
|
|
2090
|
+
header: /* @__PURE__ */ jsx(FullscreenHeader, {
|
|
2091
|
+
closeLabel: words.actions.close,
|
|
2092
|
+
onClose: close,
|
|
2093
|
+
subject: itinerarySubject ? /* @__PURE__ */ jsx(DialogSubject, { ...itinerarySubject }) : void 0,
|
|
2094
|
+
title: words.video.title
|
|
2095
|
+
}),
|
|
2096
|
+
id: stepsId,
|
|
2097
|
+
onChange: goToStep,
|
|
2098
|
+
panel: VIDEO_STEP_ORDER.map((id) => /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
2099
|
+
keepMounted: true,
|
|
2100
|
+
value: id,
|
|
2101
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
2102
|
+
gap: "lg",
|
|
2103
|
+
inert: recording,
|
|
2104
|
+
style: recording ? recordingStepStyle : void 0,
|
|
2105
|
+
children: [/* @__PURE__ */ jsx(SectionHead, {
|
|
2106
|
+
description: words.video.steps[id].description,
|
|
2107
|
+
title: words.video.steps[id].label
|
|
2108
|
+
}), /* @__PURE__ */ jsx(Box, { children: stepBody[id] })]
|
|
2109
|
+
})
|
|
2110
|
+
}, id)),
|
|
2111
|
+
rail: /* @__PURE__ */ jsxs(Stack, {
|
|
2112
|
+
gap: "xxs",
|
|
2113
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
2114
|
+
className: "mtya-studio-visible-from-md",
|
|
2115
|
+
px: "xxs",
|
|
2116
|
+
variant: "section-label",
|
|
2117
|
+
children: words.video.stepsHeading
|
|
2118
|
+
}), /* @__PURE__ */ jsx(SectionNav, {
|
|
2119
|
+
ariaLabel: words.video.stepsLabel,
|
|
2120
|
+
entries,
|
|
2121
|
+
id: stepsId,
|
|
2122
|
+
value: step
|
|
2123
|
+
})]
|
|
2124
|
+
}),
|
|
2125
|
+
sections: VIDEO_STEP_ORDER,
|
|
2126
|
+
stageAriaLabel: words.video.preview.label,
|
|
2127
|
+
value: step,
|
|
2128
|
+
children: unpublished ? /* @__PURE__ */ jsx(UnpublishedStage, {
|
|
2129
|
+
itineraryId,
|
|
2130
|
+
organizationId
|
|
2131
|
+
}) : /* @__PURE__ */ jsx(PreviewStage, {
|
|
2132
|
+
client,
|
|
2133
|
+
directing,
|
|
2134
|
+
indicator,
|
|
2135
|
+
mapClient,
|
|
2136
|
+
notice: publication === "dirty" ? /* @__PURE__ */ jsx(PublicationNotice, {
|
|
2137
|
+
itineraryId,
|
|
2138
|
+
organizationId,
|
|
2139
|
+
state: "dirty"
|
|
2140
|
+
}) : void 0,
|
|
2141
|
+
onClient: setClient,
|
|
2142
|
+
plan,
|
|
2143
|
+
recording,
|
|
2144
|
+
routeState,
|
|
2145
|
+
transformRequest
|
|
2146
|
+
})
|
|
2147
|
+
})
|
|
2148
|
+
});
|
|
2149
|
+
};
|
|
2150
|
+
const DirectorRegion = ({ children }) => {
|
|
2151
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
2152
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
2153
|
+
gap: "xs",
|
|
2154
|
+
mt: "lg",
|
|
2155
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
2156
|
+
variant: "section-label",
|
|
2157
|
+
children: words.director.heading
|
|
2158
|
+
}), children]
|
|
2159
|
+
});
|
|
2160
|
+
};
|
|
2161
|
+
const DirectorSlot = () => {
|
|
2162
|
+
const organizationId = useVideoOrganizationId() ?? void 0;
|
|
2163
|
+
const availability = useCopilotAvailability(organizationId);
|
|
2164
|
+
const setupAction = useCopilotSetupAction(organizationId);
|
|
2165
|
+
if (organizationId === void 0 || availability.loading) return /* @__PURE__ */ jsx(DirectorRegion, { children: /* @__PURE__ */ jsx(Group, {
|
|
2166
|
+
justify: "center",
|
|
2167
|
+
children: /* @__PURE__ */ jsx(Loader, { size: "sm" })
|
|
2168
|
+
}) });
|
|
2169
|
+
if (!availability.writable) return /* @__PURE__ */ jsx(DirectorRegion, { children: /* @__PURE__ */ jsx(CopilotNoAccessNotice, {}) });
|
|
2170
|
+
return /* @__PURE__ */ jsx(DirectorRegion, { children: availability.notConfigured ? /* @__PURE__ */ jsx(CopilotSetupNotice, { action: setupAction }) : /* @__PURE__ */ jsx(DirectorChat, {}) });
|
|
2171
|
+
};
|
|
2172
|
+
const DirectedShell = ({ itineraryId, mapClient, transformRequest }) => {
|
|
2173
|
+
const director = useDirectorChatSurface();
|
|
2174
|
+
return /* @__PURE__ */ jsx(WizardShell, {
|
|
2175
|
+
directing: director?.directing,
|
|
2176
|
+
director: director ? /* @__PURE__ */ jsx(DirectorSlot, {}) : void 0,
|
|
2177
|
+
indicator: director ? /* @__PURE__ */ jsx(WizardDirectingIndicator, {}) : void 0,
|
|
2178
|
+
itineraryId,
|
|
2179
|
+
mapClient,
|
|
2180
|
+
scrim: director ? /* @__PURE__ */ jsx(DirectingScrim, {}) : void 0,
|
|
2181
|
+
transformRequest
|
|
2182
|
+
});
|
|
2183
|
+
};
|
|
2184
|
+
const PersonalItineraryNotice = () => {
|
|
2185
|
+
const words = useStudioScopedStrings(SECTIONS);
|
|
2186
|
+
const { dispatch } = useStudioDispatch();
|
|
2187
|
+
const close = useCallback(() => {
|
|
2188
|
+
dispatch("studio.video.close", {});
|
|
2189
|
+
}, [dispatch]);
|
|
2190
|
+
return /* @__PURE__ */ jsxs(FullscreenModal, {
|
|
2191
|
+
ariaLabel: words.video.title,
|
|
2192
|
+
onClose: close,
|
|
2193
|
+
children: [/* @__PURE__ */ jsx(FullscreenHeader, {
|
|
2194
|
+
closeLabel: words.actions.close,
|
|
2195
|
+
onClose: close,
|
|
2196
|
+
title: words.video.title
|
|
2197
|
+
}), /* @__PURE__ */ jsx(Center, {
|
|
2198
|
+
flex: 1,
|
|
2199
|
+
p: "xl",
|
|
2200
|
+
children: /* @__PURE__ */ jsx(Alert, {
|
|
2201
|
+
color: "gray",
|
|
2202
|
+
maw: 420,
|
|
2203
|
+
children: words.itineraryActions.exportAsVideoPersonalHint
|
|
2204
|
+
})
|
|
2205
|
+
})]
|
|
2206
|
+
});
|
|
2207
|
+
};
|
|
2208
|
+
const VideoExportWizard = ({ invalidateAiConfig, itineraryId, mapClient, recoveryAddendum, strings, transformRequest }) => {
|
|
2209
|
+
const ctx = useStudioToolContext();
|
|
2210
|
+
useVideoRouteSync();
|
|
2211
|
+
useVideoProfileSeed();
|
|
2212
|
+
const withOrgModes = useStudioEntitlement("video-organization-modes");
|
|
2213
|
+
const personal = useVideoOrganizationId() === null;
|
|
2214
|
+
return /* @__PURE__ */ jsx(StudioStringsScope, {
|
|
2215
|
+
sections: SECTIONS,
|
|
2216
|
+
strings,
|
|
2217
|
+
children: /* @__PURE__ */ jsx(DirectorChatProvider, {
|
|
2218
|
+
ctx,
|
|
2219
|
+
enabled: withOrgModes && !personal,
|
|
2220
|
+
invalidateAiConfig,
|
|
2221
|
+
recoveryAddendum,
|
|
2222
|
+
children: personal ? /* @__PURE__ */ jsx(PersonalItineraryNotice, {}) : /* @__PURE__ */ jsx(DirectedShell, {
|
|
2223
|
+
itineraryId,
|
|
2224
|
+
mapClient,
|
|
2225
|
+
transformRequest
|
|
2226
|
+
})
|
|
2227
|
+
})
|
|
2228
|
+
});
|
|
2229
|
+
};
|
|
2230
|
+
export { VideoExportWizard as t };
|
|
2231
|
+
|
|
2232
|
+
//# sourceMappingURL=chunk-B8QgG-RT.js.map
|