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