@mountaya/studio-react 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (976) hide show
  1. package/CHANGELOG.md +98 -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/chunk--VSQcEs_.cjs +26 -0
  7. package/dist/chunk--VSQcEs_.cjs.map +1 -0
  8. package/dist/chunk-0qoALFfx.cjs +454 -0
  9. package/dist/chunk-0qoALFfx.cjs.map +1 -0
  10. package/dist/chunk-0sHgX8We.cjs +97 -0
  11. package/dist/chunk-0sHgX8We.cjs.map +1 -0
  12. package/dist/chunk-4D4as_tP.js +16 -0
  13. package/dist/chunk-4D4as_tP.js.map +1 -0
  14. package/dist/chunk-6LM6wuIg.cjs +13 -0
  15. package/dist/chunk-6LM6wuIg.cjs.map +1 -0
  16. package/dist/chunk-6VpwF-77.js +7 -0
  17. package/dist/chunk-6VpwF-77.js.map +1 -0
  18. package/dist/chunk-6v2fJIDh.cjs +28 -0
  19. package/dist/chunk-6v2fJIDh.cjs.map +1 -0
  20. package/dist/chunk-Af0f-OjN.js +71 -0
  21. package/dist/chunk-Af0f-OjN.js.map +1 -0
  22. package/dist/chunk-B-QQkaWk.js +91 -0
  23. package/dist/chunk-B-QQkaWk.js.map +1 -0
  24. package/dist/chunk-B1lX5w6I.cjs +181 -0
  25. package/dist/chunk-B1lX5w6I.cjs.map +1 -0
  26. package/dist/chunk-B2gsz9OJ.js +19 -0
  27. package/dist/chunk-B2gsz9OJ.js.map +1 -0
  28. package/dist/chunk-B38srE2R.d.cts +3976 -0
  29. package/dist/chunk-B3HdxIq7.js +69 -0
  30. package/dist/chunk-B3HdxIq7.js.map +1 -0
  31. package/dist/chunk-B3UCX3Wd.js +30 -0
  32. package/dist/chunk-B3UCX3Wd.js.map +1 -0
  33. package/dist/chunk-B3mMYMtz.cjs +88 -0
  34. package/dist/chunk-B3mMYMtz.cjs.map +1 -0
  35. package/dist/chunk-B7D0neNQ.cjs +47 -0
  36. package/dist/chunk-B7D0neNQ.cjs.map +1 -0
  37. package/dist/chunk-B7UzNwmm.cjs +115 -0
  38. package/dist/chunk-B7UzNwmm.cjs.map +1 -0
  39. package/dist/chunk-B7d3NIaH.js +55 -0
  40. package/dist/chunk-B7d3NIaH.js.map +1 -0
  41. package/dist/chunk-B8ONCPFQ.cjs +70 -0
  42. package/dist/chunk-B8ONCPFQ.cjs.map +1 -0
  43. package/dist/chunk-B8QgG-RT.js +2232 -0
  44. package/dist/chunk-B8QgG-RT.js.map +1 -0
  45. package/dist/chunk-B8ZpXH0_.cjs +64 -0
  46. package/dist/chunk-B8ZpXH0_.cjs.map +1 -0
  47. package/dist/chunk-B8mS5bGc.cjs +112 -0
  48. package/dist/chunk-B8mS5bGc.cjs.map +1 -0
  49. package/dist/chunk-B9EkHHSU.js +40 -0
  50. package/dist/chunk-B9EkHHSU.js.map +1 -0
  51. package/dist/chunk-BA0PWNyn.js +234 -0
  52. package/dist/chunk-BA0PWNyn.js.map +1 -0
  53. package/dist/chunk-BAWE1gqe.js +60 -0
  54. package/dist/chunk-BAWE1gqe.js.map +1 -0
  55. package/dist/chunk-BAe9m2Yp.d.cts +963 -0
  56. package/dist/chunk-BDJCk6ml.js +19 -0
  57. package/dist/chunk-BDJCk6ml.js.map +1 -0
  58. package/dist/chunk-BFI2CR6j.cjs +381 -0
  59. package/dist/chunk-BFI2CR6j.cjs.map +1 -0
  60. package/dist/chunk-BIIJXiiS.js +40 -0
  61. package/dist/chunk-BIIJXiiS.js.map +1 -0
  62. package/dist/chunk-BJAn10wR.js +54 -0
  63. package/dist/chunk-BJAn10wR.js.map +1 -0
  64. package/dist/chunk-BLxPxx5p.js +1641 -0
  65. package/dist/chunk-BLxPxx5p.js.map +1 -0
  66. package/dist/chunk-BNSJoNwO.cjs +377 -0
  67. package/dist/chunk-BNSJoNwO.cjs.map +1 -0
  68. package/dist/chunk-BNTshA5u.js +304 -0
  69. package/dist/chunk-BNTshA5u.js.map +1 -0
  70. package/dist/chunk-BO_yHMn2.js +7 -0
  71. package/dist/chunk-BO_yHMn2.js.map +1 -0
  72. package/dist/chunk-BOpIVklq.cjs +23 -0
  73. package/dist/chunk-BOpIVklq.cjs.map +1 -0
  74. package/dist/chunk-BP8bHGiE.cjs +12 -0
  75. package/dist/chunk-BP8bHGiE.cjs.map +1 -0
  76. package/dist/chunk-BPsgx3c7.js +56 -0
  77. package/dist/chunk-BPsgx3c7.js.map +1 -0
  78. package/dist/chunk-BQkKY_kf.js +44 -0
  79. package/dist/chunk-BQkKY_kf.js.map +1 -0
  80. package/dist/chunk-BQoAEKyJ.js +193 -0
  81. package/dist/chunk-BQoAEKyJ.js.map +1 -0
  82. package/dist/chunk-BRuLc45I.cjs +21 -0
  83. package/dist/chunk-BRuLc45I.cjs.map +1 -0
  84. package/dist/chunk-BSnrqsA8.cjs +56 -0
  85. package/dist/chunk-BSnrqsA8.cjs.map +1 -0
  86. package/dist/chunk-BTDBomKm.cjs +80 -0
  87. package/dist/chunk-BTDBomKm.cjs.map +1 -0
  88. package/dist/chunk-BVogYy0R.js +375 -0
  89. package/dist/chunk-BVogYy0R.js.map +1 -0
  90. package/dist/chunk-BWITLmlf.js +6 -0
  91. package/dist/chunk-BWITLmlf.js.map +1 -0
  92. package/dist/chunk-BXUrvYqd.d.cts +112 -0
  93. package/dist/chunk-BXUrvYqd.d.ts +112 -0
  94. package/dist/chunk-BYzQfFFV.js +54 -0
  95. package/dist/chunk-BYzQfFFV.js.map +1 -0
  96. package/dist/chunk-BZCKMlN8.js +35 -0
  97. package/dist/chunk-BZCKMlN8.js.map +1 -0
  98. package/dist/chunk-BalPERFX.js +13 -0
  99. package/dist/chunk-BalPERFX.js.map +1 -0
  100. package/dist/chunk-Bb5SAw6T.cjs +72 -0
  101. package/dist/chunk-Bb5SAw6T.cjs.map +1 -0
  102. package/dist/chunk-BbQyoetL.cjs +269 -0
  103. package/dist/chunk-BbQyoetL.cjs.map +1 -0
  104. package/dist/chunk-BdepwGey.js +600 -0
  105. package/dist/chunk-BdepwGey.js.map +1 -0
  106. package/dist/chunk-BeB57TnZ.js +29 -0
  107. package/dist/chunk-BeB57TnZ.js.map +1 -0
  108. package/dist/chunk-BecxET4U.cjs +26 -0
  109. package/dist/chunk-BecxET4U.cjs.map +1 -0
  110. package/dist/chunk-Bfuu_B7M.js +16 -0
  111. package/dist/chunk-Bfuu_B7M.js.map +1 -0
  112. package/dist/chunk-Bh4xSiDO.js +93 -0
  113. package/dist/chunk-Bh4xSiDO.js.map +1 -0
  114. package/dist/chunk-BhLItb06.js +10 -0
  115. package/dist/chunk-BhLItb06.js.map +1 -0
  116. package/dist/chunk-BhelUZ4P.js +30 -0
  117. package/dist/chunk-BhelUZ4P.js.map +1 -0
  118. package/dist/chunk-BiMRpOwB.cjs +342 -0
  119. package/dist/chunk-BiMRpOwB.cjs.map +1 -0
  120. package/dist/chunk-Bj3ium6N.cjs +22 -0
  121. package/dist/chunk-Bj3ium6N.cjs.map +1 -0
  122. package/dist/chunk-BjQzK3c3.cjs +59 -0
  123. package/dist/chunk-BjQzK3c3.cjs.map +1 -0
  124. package/dist/chunk-BkvNTXo7.cjs +15 -0
  125. package/dist/chunk-BkvNTXo7.cjs.map +1 -0
  126. package/dist/chunk-BmJDHIlZ.cjs +50 -0
  127. package/dist/chunk-BmJDHIlZ.cjs.map +1 -0
  128. package/dist/chunk-BmztanwN.cjs +13 -0
  129. package/dist/chunk-BmztanwN.cjs.map +1 -0
  130. package/dist/chunk-Bnci-ej8.cjs +262 -0
  131. package/dist/chunk-Bnci-ej8.cjs.map +1 -0
  132. package/dist/chunk-BoOw05B0.js +24 -0
  133. package/dist/chunk-BoOw05B0.js.map +1 -0
  134. package/dist/chunk-BqPxk-8w.cjs +95 -0
  135. package/dist/chunk-BqPxk-8w.cjs.map +1 -0
  136. package/dist/chunk-Br_1h4WD.cjs +15 -0
  137. package/dist/chunk-Br_1h4WD.cjs.map +1 -0
  138. package/dist/chunk-BtmcBZXU.js +13 -0
  139. package/dist/chunk-BtmcBZXU.js.map +1 -0
  140. package/dist/chunk-BvaNI_86.js +11 -0
  141. package/dist/chunk-BvaNI_86.js.map +1 -0
  142. package/dist/chunk-BvoYNlF5.js +145 -0
  143. package/dist/chunk-BvoYNlF5.js.map +1 -0
  144. package/dist/chunk-BwnCGe7J.js +268 -0
  145. package/dist/chunk-BwnCGe7J.js.map +1 -0
  146. package/dist/chunk-BxpaOkyq.cjs +310 -0
  147. package/dist/chunk-BxpaOkyq.cjs.map +1 -0
  148. package/dist/chunk-BybRyFen.cjs +65 -0
  149. package/dist/chunk-BybRyFen.cjs.map +1 -0
  150. package/dist/chunk-C-9wXKm5.cjs +83 -0
  151. package/dist/chunk-C-9wXKm5.cjs.map +1 -0
  152. package/dist/chunk-C-hV-Usi.js +7 -0
  153. package/dist/chunk-C-hV-Usi.js.map +1 -0
  154. package/dist/chunk-C06UWdDq.js +100 -0
  155. package/dist/chunk-C06UWdDq.js.map +1 -0
  156. package/dist/chunk-C1NzDn7y.cjs +35 -0
  157. package/dist/chunk-C1NzDn7y.cjs.map +1 -0
  158. package/dist/chunk-C2zEVNM1.js +20 -0
  159. package/dist/chunk-C2zEVNM1.js.map +1 -0
  160. package/dist/chunk-C3ftwoOp.js +6 -0
  161. package/dist/chunk-C3ftwoOp.js.map +1 -0
  162. package/dist/chunk-C5ZETobm.js +17 -0
  163. package/dist/chunk-C5ZETobm.js.map +1 -0
  164. package/dist/chunk-C5oCIViv.js +98 -0
  165. package/dist/chunk-C5oCIViv.js.map +1 -0
  166. package/dist/chunk-C60kC4oZ.cjs +114 -0
  167. package/dist/chunk-C60kC4oZ.cjs.map +1 -0
  168. package/dist/chunk-C6Mr3Z8L.js +59 -0
  169. package/dist/chunk-C6Mr3Z8L.js.map +1 -0
  170. package/dist/chunk-C6cBmVch.js +119 -0
  171. package/dist/chunk-C6cBmVch.js.map +1 -0
  172. package/dist/chunk-C6vKd7KP.cjs +519 -0
  173. package/dist/chunk-C6vKd7KP.cjs.map +1 -0
  174. package/dist/chunk-C7NizUxN.js +21 -0
  175. package/dist/chunk-C7NizUxN.js.map +1 -0
  176. package/dist/chunk-C93yeTAD.js +91 -0
  177. package/dist/chunk-C93yeTAD.js.map +1 -0
  178. package/dist/chunk-CByZU6Hx.cjs +90 -0
  179. package/dist/chunk-CByZU6Hx.cjs.map +1 -0
  180. package/dist/chunk-CCNIPIJB.cjs +25 -0
  181. package/dist/chunk-CCNIPIJB.cjs.map +1 -0
  182. package/dist/chunk-CEDKBew2.js +15 -0
  183. package/dist/chunk-CEDKBew2.js.map +1 -0
  184. package/dist/chunk-CI2PEZIK.js +147 -0
  185. package/dist/chunk-CI2PEZIK.js.map +1 -0
  186. package/dist/chunk-CIjPAYuo.cjs +268 -0
  187. package/dist/chunk-CIjPAYuo.cjs.map +1 -0
  188. package/dist/chunk-CJyqD6Ib.js +518 -0
  189. package/dist/chunk-CJyqD6Ib.js.map +1 -0
  190. package/dist/chunk-CNFF8fiL.js +38 -0
  191. package/dist/chunk-CNFF8fiL.js.map +1 -0
  192. package/dist/chunk-CNFoFzhK.cjs +50 -0
  193. package/dist/chunk-CNFoFzhK.cjs.map +1 -0
  194. package/dist/chunk-CQAuAPOE.cjs +63 -0
  195. package/dist/chunk-CQAuAPOE.cjs.map +1 -0
  196. package/dist/chunk-CR46E73M.js +50 -0
  197. package/dist/chunk-CR46E73M.js.map +1 -0
  198. package/dist/chunk-CSq4CbT1.js +86 -0
  199. package/dist/chunk-CSq4CbT1.js.map +1 -0
  200. package/dist/chunk-CT6i9_8G.cjs +31 -0
  201. package/dist/chunk-CT6i9_8G.cjs.map +1 -0
  202. package/dist/chunk-CUKEOil1.cjs +108 -0
  203. package/dist/chunk-CUKEOil1.cjs.map +1 -0
  204. package/dist/chunk-CWxPV2vI.js +111 -0
  205. package/dist/chunk-CWxPV2vI.js.map +1 -0
  206. package/dist/chunk-CXap-mFu.js +50 -0
  207. package/dist/chunk-CXap-mFu.js.map +1 -0
  208. package/dist/chunk-CYx1vTOG.d.ts +69 -0
  209. package/dist/chunk-CZOXtOQp.js +261 -0
  210. package/dist/chunk-CZOXtOQp.js.map +1 -0
  211. package/dist/chunk-CZSBVyE9.js +68 -0
  212. package/dist/chunk-CZSBVyE9.js.map +1 -0
  213. package/dist/chunk-C_NZdnA3.cjs +57 -0
  214. package/dist/chunk-C_NZdnA3.cjs.map +1 -0
  215. package/dist/chunk-C_k4SxhD.js +245 -0
  216. package/dist/chunk-C_k4SxhD.js.map +1 -0
  217. package/dist/chunk-CaTeIppS.cjs +115 -0
  218. package/dist/chunk-CaTeIppS.cjs.map +1 -0
  219. package/dist/chunk-CaUCI-WV.cjs +69 -0
  220. package/dist/chunk-CaUCI-WV.cjs.map +1 -0
  221. package/dist/chunk-CblkEI9o.js +19 -0
  222. package/dist/chunk-CblkEI9o.js.map +1 -0
  223. package/dist/chunk-CcXeCiEQ.js +70 -0
  224. package/dist/chunk-CcXeCiEQ.js.map +1 -0
  225. package/dist/chunk-Ce4D2B8W.cjs +49 -0
  226. package/dist/chunk-Ce4D2B8W.cjs.map +1 -0
  227. package/dist/chunk-CetxbYL1.js +66 -0
  228. package/dist/chunk-CetxbYL1.js.map +1 -0
  229. package/dist/chunk-ClfU9elo.js +68 -0
  230. package/dist/chunk-ClfU9elo.js.map +1 -0
  231. package/dist/chunk-CmNHE_Un.cjs +4 -0
  232. package/dist/chunk-Cmb_XLfd.js +82 -0
  233. package/dist/chunk-Cmb_XLfd.js.map +1 -0
  234. package/dist/chunk-Cp26IdF1.js +72 -0
  235. package/dist/chunk-Cp26IdF1.js.map +1 -0
  236. package/dist/chunk-CsBkSCbR.cjs +92 -0
  237. package/dist/chunk-CsBkSCbR.cjs.map +1 -0
  238. package/dist/chunk-CsnIpELM.js +31 -0
  239. package/dist/chunk-CsnIpELM.js.map +1 -0
  240. package/dist/chunk-CsnJv55G.cjs +36 -0
  241. package/dist/chunk-CsnJv55G.cjs.map +1 -0
  242. package/dist/chunk-CsxHDVHF.cjs +68 -0
  243. package/dist/chunk-CsxHDVHF.cjs.map +1 -0
  244. package/dist/chunk-Cv1FyWmK.js +670 -0
  245. package/dist/chunk-Cv1FyWmK.js.map +1 -0
  246. package/dist/chunk-CwXRQ-3X.cjs +2238 -0
  247. package/dist/chunk-CwXRQ-3X.cjs.map +1 -0
  248. package/dist/chunk-CxC9GaSV.js +6 -0
  249. package/dist/chunk-CxC9GaSV.js.map +1 -0
  250. package/dist/chunk-CyDQK1JF.js +22 -0
  251. package/dist/chunk-CyDQK1JF.js.map +1 -0
  252. package/dist/chunk-CyFo-C-X.js +341 -0
  253. package/dist/chunk-CyFo-C-X.js.map +1 -0
  254. package/dist/chunk-CzGWcm8C.cjs +109 -0
  255. package/dist/chunk-CzGWcm8C.cjs.map +1 -0
  256. package/dist/chunk-D0Cmheqq.cjs +25 -0
  257. package/dist/chunk-D0Cmheqq.cjs.map +1 -0
  258. package/dist/chunk-D0VevtWq.cjs +13 -0
  259. package/dist/chunk-D0VevtWq.cjs.map +1 -0
  260. package/dist/chunk-D1HIZ09h.d.cts +22 -0
  261. package/dist/chunk-D1HIZ09h.d.ts +22 -0
  262. package/dist/chunk-D1PwxEEq.cjs +281 -0
  263. package/dist/chunk-D1PwxEEq.cjs.map +1 -0
  264. package/dist/chunk-D2BipKyx.d.cts +69 -0
  265. package/dist/chunk-D4g36nrI.d.ts +963 -0
  266. package/dist/chunk-D5vZKs5k.js +85 -0
  267. package/dist/chunk-D5vZKs5k.js.map +1 -0
  268. package/dist/chunk-D7XBi__G.js +17 -0
  269. package/dist/chunk-D7XBi__G.js.map +1 -0
  270. package/dist/chunk-D8TsKfym.cjs +35 -0
  271. package/dist/chunk-D8TsKfym.cjs.map +1 -0
  272. package/dist/chunk-D8r50zRF.cjs +4 -0
  273. package/dist/chunk-DAAlHzRS.js +2 -0
  274. package/dist/chunk-DBY6OSNP.js +13 -0
  275. package/dist/chunk-DBY6OSNP.js.map +1 -0
  276. package/dist/chunk-DBfZJAh3.js +146 -0
  277. package/dist/chunk-DBfZJAh3.js.map +1 -0
  278. package/dist/chunk-DBpF1Eur.cjs +69 -0
  279. package/dist/chunk-DBpF1Eur.cjs.map +1 -0
  280. package/dist/chunk-DCvhBL80.js +9 -0
  281. package/dist/chunk-DCvhBL80.js.map +1 -0
  282. package/dist/chunk-DDNoqMiU.cjs +12 -0
  283. package/dist/chunk-DDNoqMiU.cjs.map +1 -0
  284. package/dist/chunk-DEpLX45Z.cjs +25 -0
  285. package/dist/chunk-DEpLX45Z.cjs.map +1 -0
  286. package/dist/chunk-DFw3I0U0.cjs +19 -0
  287. package/dist/chunk-DFw3I0U0.cjs.map +1 -0
  288. package/dist/chunk-DJOkmY4u.cjs +36 -0
  289. package/dist/chunk-DJOkmY4u.cjs.map +1 -0
  290. package/dist/chunk-DJQsem2x.js +1128 -0
  291. package/dist/chunk-DJQsem2x.js.map +1 -0
  292. package/dist/chunk-DKNcYR4L.cjs +71 -0
  293. package/dist/chunk-DKNcYR4L.cjs.map +1 -0
  294. package/dist/chunk-DL4Q5WpP.cjs +19 -0
  295. package/dist/chunk-DL4Q5WpP.cjs.map +1 -0
  296. package/dist/chunk-DLt13wEh.js +279 -0
  297. package/dist/chunk-DLt13wEh.js.map +1 -0
  298. package/dist/chunk-DPvFDS5n.cjs +31 -0
  299. package/dist/chunk-DPvFDS5n.cjs.map +1 -0
  300. package/dist/chunk-DQ4l6EDZ.js +1728 -0
  301. package/dist/chunk-DQ4l6EDZ.js.map +1 -0
  302. package/dist/chunk-DQ_X9yhT.cjs +21 -0
  303. package/dist/chunk-DQ_X9yhT.cjs.map +1 -0
  304. package/dist/chunk-DQbbL87b.cjs +57 -0
  305. package/dist/chunk-DQbbL87b.cjs.map +1 -0
  306. package/dist/chunk-DRphChLx.js +15 -0
  307. package/dist/chunk-DRphChLx.js.map +1 -0
  308. package/dist/chunk-DSsTHBp4.js +62 -0
  309. package/dist/chunk-DSsTHBp4.js.map +1 -0
  310. package/dist/chunk-DVI59otQ.js +20 -0
  311. package/dist/chunk-DVI59otQ.js.map +1 -0
  312. package/dist/chunk-DVN4tYVL.cjs +235 -0
  313. package/dist/chunk-DVN4tYVL.cjs.map +1 -0
  314. package/dist/chunk-DWxCDSxn.cjs +36 -0
  315. package/dist/chunk-DWxCDSxn.cjs.map +1 -0
  316. package/dist/chunk-DXMaeZs_.cjs +135 -0
  317. package/dist/chunk-DXMaeZs_.cjs.map +1 -0
  318. package/dist/chunk-D_dPThBm.js +44 -0
  319. package/dist/chunk-D_dPThBm.js.map +1 -0
  320. package/dist/chunk-DbW3lF5Y.cjs +55 -0
  321. package/dist/chunk-DbW3lF5Y.cjs.map +1 -0
  322. package/dist/chunk-Dc0Robe4.cjs +254 -0
  323. package/dist/chunk-Dc0Robe4.cjs.map +1 -0
  324. package/dist/chunk-DcLLI7B1.cjs +16 -0
  325. package/dist/chunk-DcLLI7B1.cjs.map +1 -0
  326. package/dist/chunk-Dd9K8OSs.js +73 -0
  327. package/dist/chunk-Dd9K8OSs.js.map +1 -0
  328. package/dist/chunk-DeFJnC-Q.js +52 -0
  329. package/dist/chunk-DeFJnC-Q.js.map +1 -0
  330. package/dist/chunk-DeggaLXL.cjs +109 -0
  331. package/dist/chunk-DeggaLXL.cjs.map +1 -0
  332. package/dist/chunk-DetGuqR8.cjs +12 -0
  333. package/dist/chunk-DetGuqR8.cjs.map +1 -0
  334. package/dist/chunk-Df761BAX.cjs +4 -0
  335. package/dist/chunk-DfQZch7H.cjs +60 -0
  336. package/dist/chunk-DfQZch7H.cjs.map +1 -0
  337. package/dist/chunk-DhwoAmi8.cjs +77 -0
  338. package/dist/chunk-DhwoAmi8.cjs.map +1 -0
  339. package/dist/chunk-DkH1DKxi.cjs +66 -0
  340. package/dist/chunk-DkH1DKxi.cjs.map +1 -0
  341. package/dist/chunk-DkjkI8F5.cjs +150 -0
  342. package/dist/chunk-DkjkI8F5.cjs.map +1 -0
  343. package/dist/chunk-DlaVYkP2.cjs +23 -0
  344. package/dist/chunk-DlaVYkP2.cjs.map +1 -0
  345. package/dist/chunk-DlcsA1GQ.js +6 -0
  346. package/dist/chunk-DlcsA1GQ.js.map +1 -0
  347. package/dist/chunk-DmBkJhi_.js +8 -0
  348. package/dist/chunk-DmBkJhi_.js.map +1 -0
  349. package/dist/chunk-DnXjnOQ1.cjs +42 -0
  350. package/dist/chunk-DnXjnOQ1.cjs.map +1 -0
  351. package/dist/chunk-DrG9yz7c.js +509 -0
  352. package/dist/chunk-DrG9yz7c.js.map +1 -0
  353. package/dist/chunk-DsTU_5Be.js +96 -0
  354. package/dist/chunk-DsTU_5Be.js.map +1 -0
  355. package/dist/chunk-DsXj9iLu.cjs +1827 -0
  356. package/dist/chunk-DsXj9iLu.cjs.map +1 -0
  357. package/dist/chunk-DteUy52S.js +45 -0
  358. package/dist/chunk-DteUy52S.js.map +1 -0
  359. package/dist/chunk-DtvsE56k.cjs +12 -0
  360. package/dist/chunk-DtvsE56k.cjs.map +1 -0
  361. package/dist/chunk-DuD5YqoE.cjs +99 -0
  362. package/dist/chunk-DuD5YqoE.cjs.map +1 -0
  363. package/dist/chunk-DvrtQ0Y0.js +51 -0
  364. package/dist/chunk-DvrtQ0Y0.js.map +1 -0
  365. package/dist/chunk-DwUFwDV2.js +144 -0
  366. package/dist/chunk-DwUFwDV2.js.map +1 -0
  367. package/dist/chunk-Dy59Tdfm.cjs +67 -0
  368. package/dist/chunk-Dy59Tdfm.cjs.map +1 -0
  369. package/dist/chunk-DyJupG9U.cjs +74 -0
  370. package/dist/chunk-DyJupG9U.cjs.map +1 -0
  371. package/dist/chunk-DzCbinPo.js +9 -0
  372. package/dist/chunk-DzCbinPo.js.map +1 -0
  373. package/dist/chunk-GgcOmaXu.cjs +137 -0
  374. package/dist/chunk-GgcOmaXu.cjs.map +1 -0
  375. package/dist/chunk-GnVcZTQv.cjs +50 -0
  376. package/dist/chunk-GnVcZTQv.cjs.map +1 -0
  377. package/dist/chunk-JDLVWYk5.cjs +22 -0
  378. package/dist/chunk-JDLVWYk5.cjs.map +1 -0
  379. package/dist/chunk-NA04sFmY.js +2 -0
  380. package/dist/chunk-NqIZvB2L.js +44 -0
  381. package/dist/chunk-NqIZvB2L.js.map +1 -0
  382. package/dist/chunk-OGNas_Mn.cjs +654 -0
  383. package/dist/chunk-OGNas_Mn.cjs.map +1 -0
  384. package/dist/chunk-PeexRooj.cjs +12 -0
  385. package/dist/chunk-PeexRooj.cjs.map +1 -0
  386. package/dist/chunk-QUjeQKsz.js +26 -0
  387. package/dist/chunk-QUjeQKsz.js.map +1 -0
  388. package/dist/chunk-S0jc_E9W.cjs +62 -0
  389. package/dist/chunk-S0jc_E9W.cjs.map +1 -0
  390. package/dist/chunk-TLRG-UaM.js +453 -0
  391. package/dist/chunk-TLRG-UaM.js.map +1 -0
  392. package/dist/chunk-TYmd7TzW.cjs +68 -0
  393. package/dist/chunk-TYmd7TzW.cjs.map +1 -0
  394. package/dist/chunk-TlHnQSY_.js +250 -0
  395. package/dist/chunk-TlHnQSY_.js.map +1 -0
  396. package/dist/chunk-Vba_029j.js +36 -0
  397. package/dist/chunk-Vba_029j.js.map +1 -0
  398. package/dist/chunk-Vp0uJb7O.cjs +92 -0
  399. package/dist/chunk-Vp0uJb7O.cjs.map +1 -0
  400. package/dist/chunk-WPGdcwtf.cjs +15 -0
  401. package/dist/chunk-WPGdcwtf.cjs.map +1 -0
  402. package/dist/chunk-WUipjqNN.cjs +158 -0
  403. package/dist/chunk-WUipjqNN.cjs.map +1 -0
  404. package/dist/chunk-Y-zyJ0-m.js +6 -0
  405. package/dist/chunk-Y-zyJ0-m.js.map +1 -0
  406. package/dist/chunk-ZIIlDASG.js +94 -0
  407. package/dist/chunk-ZIIlDASG.js.map +1 -0
  408. package/dist/chunk-ZLDg2I1Z.js +6 -0
  409. package/dist/chunk-ZLDg2I1Z.js.map +1 -0
  410. package/dist/chunk-_jSTl9gW.cjs +1129 -0
  411. package/dist/chunk-_jSTl9gW.cjs.map +1 -0
  412. package/dist/chunk-b5CqEoo1.cjs +599 -0
  413. package/dist/chunk-b5CqEoo1.cjs.map +1 -0
  414. package/dist/chunk-bA-2OGXv.d.ts +3977 -0
  415. package/dist/chunk-bvwC3n0z.cjs +12 -0
  416. package/dist/chunk-bvwC3n0z.cjs.map +1 -0
  417. package/dist/chunk-cMQzXXQq.js +67 -0
  418. package/dist/chunk-cMQzXXQq.js.map +1 -0
  419. package/dist/chunk-cTRnGhbF.cjs +177 -0
  420. package/dist/chunk-cTRnGhbF.cjs.map +1 -0
  421. package/dist/chunk-dHKPMJ4D.js +85 -0
  422. package/dist/chunk-dHKPMJ4D.js.map +1 -0
  423. package/dist/chunk-d_BOXcT5.js +9 -0
  424. package/dist/chunk-d_BOXcT5.js.map +1 -0
  425. package/dist/chunk-ea1IbBcA.js +66 -0
  426. package/dist/chunk-ea1IbBcA.js.map +1 -0
  427. package/dist/chunk-f-dHVrF3.js +293 -0
  428. package/dist/chunk-f-dHVrF3.js.map +1 -0
  429. package/dist/chunk-h7Z5mAV_.cjs +41 -0
  430. package/dist/chunk-h7Z5mAV_.cjs.map +1 -0
  431. package/dist/chunk-jSgMzVr1.js +35 -0
  432. package/dist/chunk-jSgMzVr1.js.map +1 -0
  433. package/dist/chunk-kYE5SZgs.cjs +252 -0
  434. package/dist/chunk-kYE5SZgs.cjs.map +1 -0
  435. package/dist/chunk-lEnNKG6x.cjs +285 -0
  436. package/dist/chunk-lEnNKG6x.cjs.map +1 -0
  437. package/dist/chunk-lcml1N1G.js +11 -0
  438. package/dist/chunk-lcml1N1G.js.map +1 -0
  439. package/dist/chunk-nBK0qBXt.js +68 -0
  440. package/dist/chunk-nBK0qBXt.js.map +1 -0
  441. package/dist/chunk-njoANlUr.cjs +41 -0
  442. package/dist/chunk-njoANlUr.cjs.map +1 -0
  443. package/dist/chunk-nwutfrnH.cjs +430 -0
  444. package/dist/chunk-nwutfrnH.cjs.map +1 -0
  445. package/dist/chunk-o1EKuTLo.js +56 -0
  446. package/dist/chunk-o1EKuTLo.js.map +1 -0
  447. package/dist/chunk-oMFOZSQM.cjs +52 -0
  448. package/dist/chunk-oMFOZSQM.cjs.map +1 -0
  449. package/dist/chunk-pb64dLGD.cjs +682 -0
  450. package/dist/chunk-pb64dLGD.cjs.map +1 -0
  451. package/dist/chunk-s7kBzSlt.js +2 -0
  452. package/dist/chunk-uhXxE8xV.cjs +32 -0
  453. package/dist/chunk-uhXxE8xV.cjs.map +1 -0
  454. package/dist/chunk-vGzpsUSM.cjs +110 -0
  455. package/dist/chunk-vGzpsUSM.cjs.map +1 -0
  456. package/dist/chunk-vN_Di8Af.cjs +1890 -0
  457. package/dist/chunk-vN_Di8Af.cjs.map +1 -0
  458. package/dist/chunk-veLShVmw.js +41 -0
  459. package/dist/chunk-veLShVmw.js.map +1 -0
  460. package/dist/chunk-wTf5jOFv.js +253 -0
  461. package/dist/chunk-wTf5jOFv.js.map +1 -0
  462. package/dist/chunk-yO-Ek9RH.cjs +17 -0
  463. package/dist/chunk-yO-Ek9RH.cjs.map +1 -0
  464. package/dist/chunk-ye5UUSFw.js +280 -0
  465. package/dist/chunk-ye5UUSFw.js.map +1 -0
  466. package/dist/copilot/index.cjs +10 -0
  467. package/dist/copilot/index.d.cts +62 -0
  468. package/dist/copilot/index.d.ts +62 -0
  469. package/dist/copilot/index.js +4 -0
  470. package/dist/embed/index.cjs +1653 -0
  471. package/dist/embed/index.cjs.map +1 -0
  472. package/dist/embed/index.d.cts +291 -0
  473. package/dist/embed/index.d.ts +291 -0
  474. package/dist/embed/index.js +1643 -0
  475. package/dist/embed/index.js.map +1 -0
  476. package/dist/headless/index.cjs +126 -0
  477. package/dist/headless/index.d.cts +4 -0
  478. package/dist/headless/index.d.ts +4 -0
  479. package/dist/headless/index.js +29 -0
  480. package/dist/import/index.cjs +403 -0
  481. package/dist/import/index.cjs.map +1 -0
  482. package/dist/import/index.d.cts +160 -0
  483. package/dist/import/index.d.ts +160 -0
  484. package/dist/import/index.js +393 -0
  485. package/dist/import/index.js.map +1 -0
  486. package/dist/index.cjs +8991 -0
  487. package/dist/index.cjs.map +1 -0
  488. package/dist/index.d.cts +4847 -0
  489. package/dist/index.d.ts +4847 -0
  490. package/dist/index.js +8768 -0
  491. package/dist/index.js.map +1 -0
  492. package/dist/map/index.cjs +36 -0
  493. package/dist/map/index.d.cts +2 -0
  494. package/dist/map/index.d.ts +2 -0
  495. package/dist/map/index.js +2 -0
  496. package/dist/styles.css +14684 -0
  497. package/dist/testing/index.cjs +398 -0
  498. package/dist/testing/index.cjs.map +1 -0
  499. package/dist/testing/index.d.cts +302 -0
  500. package/dist/testing/index.d.ts +302 -0
  501. package/dist/testing/index.js +382 -0
  502. package/dist/testing/index.js.map +1 -0
  503. package/dist/video/index.cjs +8 -0
  504. package/dist/video/index.d.cts +122 -0
  505. package/dist/video/index.d.ts +122 -0
  506. package/dist/video/index.js +2 -0
  507. package/package.json +226 -4
  508. package/src/agent/components/ActivityRow.tsx +226 -0
  509. package/src/agent/components/AgentEntityIndicator.tsx +67 -0
  510. package/src/agent/components/AgentMarkdown.tsx +530 -0
  511. package/src/agent/components/ChatComposer.tsx +161 -0
  512. package/src/agent/components/ChatTranscript.tsx +1358 -0
  513. package/src/agent/components/CopilotPanel.tsx +415 -0
  514. package/src/agent/components/CopilotStates.tsx +238 -0
  515. package/src/agent/components/CopilotTranscript.tsx +191 -0
  516. package/src/agent/components/MessageFeedback.tsx +100 -0
  517. package/src/agent/hooks/useAgentChatTransport.ts +61 -0
  518. package/src/agent/hooks/useAgentErrorCopy.ts +27 -0
  519. package/src/agent/hooks/useCopilotOpen.ts +68 -0
  520. package/src/agent/providers/AgentThreadsProvider.tsx +360 -0
  521. package/src/agent/providers/PromptPanelConversation.tsx +135 -0
  522. package/src/agent/rules/drawnNode.ts +24 -0
  523. package/src/alerts/components/MapAlerts.tsx +127 -0
  524. package/src/cache/hooks/useStudioCache.ts +40 -0
  525. package/src/cache/rules/studioCache.ts +145 -0
  526. package/src/collab/components/PeerEntityIndicator.tsx +150 -0
  527. package/src/collab/components/PresenceRoster.tsx +113 -0
  528. package/src/collab/components/peerLock.tsx +59 -0
  529. package/src/collab/hooks/useCollabOrganizationId.ts +24 -0
  530. package/src/collab/hooks/usePeerLockLabel.ts +41 -0
  531. package/src/collections/components/CollectionFormModal.tsx +280 -0
  532. package/src/collections/components/CollectionMultiSelect.tsx +640 -0
  533. package/src/collections/components/EditCollectionModal.tsx +114 -0
  534. package/src/collections/components/ManageCollectionsModal.tsx +692 -0
  535. package/src/collections/components/NewCollectionModal.tsx +87 -0
  536. package/src/collections/components/ShareCollectionModal.tsx +150 -0
  537. package/src/collections/hooks/useEntityCollections.ts +126 -0
  538. package/src/collections/hooks/useEveryPage.ts +33 -0
  539. package/src/controls/components/MapControlTooltip.tsx +84 -0
  540. package/src/controls/components/PoiOverlayMenu.tsx +342 -0
  541. package/src/controls/components/StudioControls.tsx +278 -0
  542. package/src/controls/rules/constants.ts +34 -0
  543. package/src/copilot/hooks/useStudioCopilotInset.ts +39 -0
  544. package/src/copilot/index.ts +29 -0
  545. package/src/directions/components/DirectionsModal.tsx +447 -0
  546. package/src/directions/components/directionsPdf.tsx +549 -0
  547. package/src/embed/components/DefaultViewControl.tsx +159 -0
  548. package/src/embed/components/EmbedBaseMapPicker.tsx +107 -0
  549. package/src/embed/components/EmbedCodeSection.tsx +329 -0
  550. package/src/embed/components/EmbedColumnsSection.tsx +167 -0
  551. package/src/embed/components/EmbedConfigForm.tsx +239 -0
  552. package/src/embed/components/EmbedElementSwitcher.tsx +85 -0
  553. package/src/embed/components/EmbedFieldControl.tsx +488 -0
  554. package/src/embed/components/EmbedGeneralSection.tsx +279 -0
  555. package/src/embed/components/EmbedKeyPanel.tsx +138 -0
  556. package/src/embed/components/EmbedSnippetCode.tsx +154 -0
  557. package/src/embed/components/EmbedStage.tsx +505 -0
  558. package/src/embed/components/EmbedTablePreview.tsx +134 -0
  559. package/src/embed/components/EmbedThemePicker.tsx +74 -0
  560. package/src/embed/components/EmbedTintPicker.tsx +76 -0
  561. package/src/embed/components/EmbedWizard.tsx +1031 -0
  562. package/src/embed/hooks/useEmbedCode.ts +170 -0
  563. package/src/embed/hooks/useEmbedCollectionItineraries.ts +42 -0
  564. package/src/embed/hooks/useEmbedLayerOptions.ts +75 -0
  565. package/src/embed/hooks/useEmbedPreviewCamera.ts +169 -0
  566. package/src/embed/index.ts +42 -0
  567. package/src/fullscreen/components/FullscreenHeader.tsx +77 -0
  568. package/src/fullscreen/components/FullscreenModal.tsx +80 -0
  569. package/src/fullscreen/components/WizardLayout.tsx +129 -0
  570. package/src/guards/components/AgentDrivingGuard.tsx +59 -0
  571. package/src/guards/components/UnsavedEditsGuard.tsx +210 -0
  572. package/src/guards/hooks/useReportUnsavedForm.ts +34 -0
  573. package/src/guards/hooks/useUnsavedEditsGuard.ts +44 -0
  574. package/src/headless/hooks/useAgentDriving.ts +21 -0
  575. package/src/headless/hooks/useBeginSegmentEdit.ts +89 -0
  576. package/src/headless/hooks/useBeginWaypointEdit.ts +74 -0
  577. package/src/headless/hooks/useCapabilitySet.ts +65 -0
  578. package/src/headless/hooks/useCollabResources.ts +148 -0
  579. package/src/headless/hooks/useCollectionScope.ts +37 -0
  580. package/src/headless/hooks/useEditActions.ts +250 -0
  581. package/src/headless/hooks/useEscapeKey.ts +43 -0
  582. package/src/headless/hooks/useInlineRename.ts +276 -0
  583. package/src/headless/hooks/useLiveAwareSegments.ts +88 -0
  584. package/src/headless/hooks/useLiveAwareWaypoints.ts +39 -0
  585. package/src/headless/hooks/useMapHoveredRow.ts +76 -0
  586. package/src/headless/hooks/usePlatformViewer.ts +452 -0
  587. package/src/headless/hooks/usePluginSlot.ts +235 -0
  588. package/src/headless/hooks/useRowEmphasis.ts +66 -0
  589. package/src/headless/hooks/useSegmentList.ts +428 -0
  590. package/src/headless/hooks/useSegmentRow.ts +370 -0
  591. package/src/headless/hooks/useSegmentRowActions.ts +267 -0
  592. package/src/headless/hooks/useShallowSelector.ts +145 -0
  593. package/src/headless/hooks/useStableMembers.ts +74 -0
  594. package/src/headless/hooks/useStoreSlice.ts +52 -0
  595. package/src/headless/hooks/useStreetViewCorridor.ts +120 -0
  596. package/src/headless/hooks/useStudioApi.ts +18 -0
  597. package/src/headless/hooks/useStudioDispatch.ts +180 -0
  598. package/src/headless/hooks/useStudioDispatchCount.ts +147 -0
  599. package/src/headless/hooks/useStudioDispatchUnsafe.ts +111 -0
  600. package/src/headless/hooks/useStudioEntitlement.ts +29 -0
  601. package/src/headless/hooks/useStudioFailureAlert.ts +67 -0
  602. package/src/headless/hooks/useStudioObserve.ts +38 -0
  603. package/src/headless/hooks/useStudioPreferences.ts +8 -0
  604. package/src/headless/hooks/useStudioSignedIn.ts +12 -0
  605. package/src/headless/hooks/useStudioStore.ts +72 -0
  606. package/src/headless/hooks/useStudioUnits.ts +23 -0
  607. package/src/headless/hooks/useStudioUrl.ts +24 -0
  608. package/src/headless/hooks/useStudioUserId.ts +5 -0
  609. package/src/headless/hooks/useStudioVerbHeld.ts +43 -0
  610. package/src/headless/hooks/useStudioViewer.ts +19 -0
  611. package/src/headless/hooks/useStudioViewerEntitlement.ts +40 -0
  612. package/src/headless/hooks/useStudioViewerItineraryLimit.ts +34 -0
  613. package/src/headless/hooks/useStudioViewerPreferences.ts +44 -0
  614. package/src/headless/hooks/useStudioViewerUnits.ts +50 -0
  615. package/src/headless/hooks/useStudioViewerUserId.ts +23 -0
  616. package/src/headless/hooks/useUiStore.ts +91 -0
  617. package/src/headless/hooks/useUiStoreShallow.ts +43 -0
  618. package/src/headless/hooks/useWaypointDetailsDialog.ts +52 -0
  619. package/src/headless/hooks/useWaypointList.ts +89 -0
  620. package/src/headless/hooks/useWaypointRow.ts +229 -0
  621. package/src/headless/hooks/useWaypointRowActions.ts +166 -0
  622. package/src/headless/index.ts +287 -0
  623. package/src/headless/providers/billingGate.tsx +129 -0
  624. package/src/headless/providers/copilot.tsx +155 -0
  625. package/src/headless/providers/mountayaStudio.tsx +127 -0
  626. package/src/headless/providers/navigationBlocker.tsx +91 -0
  627. package/src/headless/providers/notify.tsx +36 -0
  628. package/src/headless/providers/organizations.tsx +267 -0
  629. package/src/headless/providers/plugins.tsx +173 -0
  630. package/src/headless/providers/studio.tsx +1296 -0
  631. package/src/headless/providers/studioStrings.tsx +243 -0
  632. package/src/headless/rules/inputMethod.ts +19 -0
  633. package/src/hooks/useAgreementLimits.ts +165 -0
  634. package/src/hooks/useLayerCatalogOptions.ts +106 -0
  635. package/src/host/components/MountayaStudioHost.tsx +1018 -0
  636. package/src/host/hooks/useEmbeddedStudio.ts +24 -0
  637. package/src/host/hooks/useItineraryActivation.ts +126 -0
  638. package/src/host/hooks/useMemberGrants.ts +51 -0
  639. package/src/host/hooks/useStudioHostSurfaces.ts +100 -0
  640. package/src/host/hooks/useStudioPluginBinding.ts +133 -0
  641. package/src/host/hooks/useStudioSessionHeld.ts +111 -0
  642. package/src/host/hooks/useStudioToolBus.ts +127 -0
  643. package/src/host/hooks/useStudioToolContext.ts +175 -0
  644. package/src/host/providers/hostRegistry.tsx +144 -0
  645. package/src/host/providers/hostSurface.tsx +47 -0
  646. package/src/host/providers/hostVideo.tsx +73 -0
  647. package/src/import/components/DraftEntityList.tsx +298 -0
  648. package/src/import/components/FileDropInput.tsx +261 -0
  649. package/src/import/components/FileDropzone.tsx +97 -0
  650. package/src/import/components/ImportItineraryContent.tsx +133 -0
  651. package/src/import/components/ImportPreviewLegend.tsx +50 -0
  652. package/src/import/components/ImportPrimer.tsx +113 -0
  653. package/src/import/index.ts +32 -0
  654. package/src/import/providers/ImportRoutingGuideProvider.tsx +319 -0
  655. package/src/import/rules/routingGuidePictures.ts +20 -0
  656. package/src/index.ts +594 -0
  657. package/src/internal/components/Glyph.tsx +34 -0
  658. package/src/internal/components/MarkerGlyph.tsx +23 -0
  659. package/src/internal/components/MountayaMark.tsx +142 -0
  660. package/src/internal/hooks/useTextOverflow.ts +90 -0
  661. package/src/internal/providers/studioEditorRoot.tsx +42 -0
  662. package/src/internal/rules/editorRoot.ts +9 -0
  663. package/src/internal/rules/missingSeam.ts +32 -0
  664. package/src/itinerary/components/ActivityGuideModal.tsx +345 -0
  665. package/src/itinerary/components/ActivitySelect.tsx +204 -0
  666. package/src/itinerary/components/AddWaypointButton.tsx +151 -0
  667. package/src/itinerary/components/AscentInput.tsx +65 -0
  668. package/src/itinerary/components/Characteristics.tsx +129 -0
  669. package/src/itinerary/components/CursorReadout.tsx +66 -0
  670. package/src/itinerary/components/DistanceInput.tsx +67 -0
  671. package/src/itinerary/components/DraftProvenanceBanner.tsx +79 -0
  672. package/src/itinerary/components/DuplicateItineraryModal.tsx +341 -0
  673. package/src/itinerary/components/EditorSaveFooter.tsx +424 -0
  674. package/src/itinerary/components/ItineraryActionsMenu.tsx +655 -0
  675. package/src/itinerary/components/ItineraryForm.tsx +887 -0
  676. package/src/itinerary/components/ItineraryHeaderIdentity.tsx +121 -0
  677. package/src/itinerary/components/ItineraryHeaderMeta.tsx +68 -0
  678. package/src/itinerary/components/ItineraryHeaderTitle.tsx +88 -0
  679. package/src/itinerary/components/ItineraryIdentityFields.tsx +153 -0
  680. package/src/itinerary/components/ItineraryProfilePanel.tsx +619 -0
  681. package/src/itinerary/components/ItineraryProfileSheet.tsx +219 -0
  682. package/src/itinerary/components/ItinerarySubHeader.tsx +236 -0
  683. package/src/itinerary/components/PendingProfile.tsx +142 -0
  684. package/src/itinerary/components/PlaceCard.tsx +35 -0
  685. package/src/itinerary/components/PlaceMark.tsx +76 -0
  686. package/src/itinerary/components/ProfileAnalysisBars.tsx +84 -0
  687. package/src/itinerary/components/ProfileBar.tsx +215 -0
  688. package/src/itinerary/components/ProfileHeaderControls.tsx +116 -0
  689. package/src/itinerary/components/ProfileHeaderFigures.tsx +119 -0
  690. package/src/itinerary/components/ProfilePaceControl.tsx +97 -0
  691. package/src/itinerary/components/ProfileStat.tsx +76 -0
  692. package/src/itinerary/components/ProfileStatStrip.tsx +38 -0
  693. package/src/itinerary/components/RoadAccessModal.tsx +76 -0
  694. package/src/itinerary/components/RouteTypeControl.tsx +73 -0
  695. package/src/itinerary/components/SegmentGroupModal.tsx +312 -0
  696. package/src/itinerary/components/SegmentGroupRangePicker.tsx +228 -0
  697. package/src/itinerary/components/StagingCreateFooter.tsx +185 -0
  698. package/src/itinerary/components/StudioItineraryProfile.tsx +620 -0
  699. package/src/itinerary/components/SuggestForm.tsx +256 -0
  700. package/src/itinerary/components/SuggestFormActions.tsx +124 -0
  701. package/src/itinerary/components/SuggestionResultRow.tsx +98 -0
  702. package/src/itinerary/components/SuggestionResultsList.tsx +85 -0
  703. package/src/itinerary/components/WaypointAmenityPicker.tsx +105 -0
  704. package/src/itinerary/components/WaypointDetailFields.tsx +604 -0
  705. package/src/itinerary/components/WaypointDetailsModal.tsx +134 -0
  706. package/src/itinerary/components/WaypointDetailsRows.tsx +707 -0
  707. package/src/itinerary/components/WaypointDetailsView.tsx +389 -0
  708. package/src/itinerary/components/WaypointIconCircle.tsx +211 -0
  709. package/src/itinerary/components/WaypointIconPicker.tsx +82 -0
  710. package/src/itinerary/components/WaypointMarkers.tsx +293 -0
  711. package/src/itinerary/components/WaypointPreviewCard.tsx +56 -0
  712. package/src/itinerary/components/WaypointSectionNav.tsx +151 -0
  713. package/src/itinerary/components/WaypointSwitcher.tsx +143 -0
  714. package/src/itinerary/components/WaypointWorkbench.tsx +263 -0
  715. package/src/itinerary/hooks/useDuplicateDraft.ts +205 -0
  716. package/src/itinerary/hooks/useDuplicateSource.ts +69 -0
  717. package/src/itinerary/hooks/useFriendlyNameBanks.ts +26 -0
  718. package/src/itinerary/hooks/useItineraryEditable.ts +89 -0
  719. package/src/itinerary/hooks/useItineraryPace.ts +104 -0
  720. package/src/itinerary/hooks/useItinerarySubject.ts +117 -0
  721. package/src/itinerary/hooks/useOpenItineraryEditable.ts +39 -0
  722. package/src/itinerary/hooks/useProfileOverlay.tsx +61 -0
  723. package/src/itinerary/hooks/useProfileSeries.ts +95 -0
  724. package/src/itinerary/hooks/useProfileVisibility.ts +149 -0
  725. package/src/itinerary/hooks/useSeedDraftOrganization.ts +85 -0
  726. package/src/itinerary/hooks/useSegmentGroupSave.ts +143 -0
  727. package/src/itinerary/hooks/useStartFromSuggestion.ts +63 -0
  728. package/src/itinerary/hooks/useStudioItinerary.ts +35 -0
  729. package/src/itinerary/hooks/useSuggestionPin.ts +36 -0
  730. package/src/itinerary/hooks/useWaypointCardWords.ts +51 -0
  731. package/src/itinerary/hooks/useWaypointCreateFollowUp.ts +158 -0
  732. package/src/itinerary/hooks/useWaypointDetailsEditor.ts +280 -0
  733. package/src/itinerary/hooks/useWaypointSectionEntries.ts +114 -0
  734. package/src/itinerary/providers/ActivityGuideProvider.tsx +113 -0
  735. package/src/itinerary/providers/ItineraryViewProvider.tsx +146 -0
  736. package/src/itinerary/rules/amenityGlyphs.ts +25 -0
  737. package/src/itinerary/rules/cursorReadoutData.ts +34 -0
  738. package/src/itinerary/rules/profileCursor.ts +11 -0
  739. package/src/itinerary/rules/profileModel.ts +98 -0
  740. package/src/itinerary/rules/shownFocus.ts +11 -0
  741. package/src/itinerary/rules/waypointGlyphs.ts +42 -0
  742. package/src/itinerary/stores/profileHover.ts +54 -0
  743. package/src/lists/components/AddSegmentButton.tsx +240 -0
  744. package/src/lists/components/EditActions.tsx +153 -0
  745. package/src/lists/components/EditorListSection.tsx +117 -0
  746. package/src/lists/components/EditorSegmentRow.tsx +458 -0
  747. package/src/lists/components/ItineraryAddSegmentButton.tsx +66 -0
  748. package/src/lists/components/ItinerarySegmentList.tsx +301 -0
  749. package/src/lists/components/ItineraryWaypointList.tsx +257 -0
  750. package/src/lists/components/SegmentList.tsx +549 -0
  751. package/src/lists/components/SegmentSeam.tsx +292 -0
  752. package/src/lists/components/WaypointList.tsx +233 -0
  753. package/src/map/components/ContextMenuPopup.tsx +913 -0
  754. package/src/map/components/MapAnchoredPopup.tsx +285 -0
  755. package/src/map/components/SegmentViaPopup.tsx +133 -0
  756. package/src/map/hooks/useAccessRestrictions.ts +25 -0
  757. package/src/map/hooks/useEmbedConstraints.ts +359 -0
  758. package/src/map/hooks/useEmbedDisplaySeed.ts +61 -0
  759. package/src/map/hooks/useEmbedReady.ts +137 -0
  760. package/src/map/hooks/useHeldTileSources.ts +65 -0
  761. package/src/map/hooks/useSegmentColor.ts +24 -0
  762. package/src/map/hooks/useSpecificationLayers.ts +25 -0
  763. package/src/map/hooks/useStudioConstraints.ts +135 -0
  764. package/src/map/hooks/useStudioContextMenu.ts +34 -0
  765. package/src/map/hooks/useStudioContextMenuWaypoint.ts +119 -0
  766. package/src/map/hooks/useStudioEditCommitReporter.ts +56 -0
  767. package/src/map/hooks/useStudioEditEngine.ts +271 -0
  768. package/src/map/hooks/useStudioEnrichment.ts +117 -0
  769. package/src/map/hooks/useStudioItinerarySelection.ts +484 -0
  770. package/src/map/hooks/useStudioLayersScope.ts +34 -0
  771. package/src/map/hooks/useStudioMapBindings.ts +178 -0
  772. package/src/map/hooks/useStudioMapEditSeams.ts +161 -0
  773. package/src/map/hooks/useStudioMapSync.ts +127 -0
  774. package/src/map/hooks/useStudioOverlay.ts +75 -0
  775. package/src/map/hooks/useStudioOverlayWithdrawal.ts +52 -0
  776. package/src/map/hooks/useStudioOverlaysEntitled.ts +12 -0
  777. package/src/map/hooks/useStudioPeerDrafts.ts +126 -0
  778. package/src/map/hooks/useStudioPoiLayers.ts +110 -0
  779. package/src/map/hooks/useStudioPreviewSync.ts +205 -0
  780. package/src/map/hooks/useStudioSegmentEditing.ts +239 -0
  781. package/src/map/hooks/useStudioSegmentViaPrompt.ts +38 -0
  782. package/src/map/hooks/useStudioSplitPicking.ts +411 -0
  783. package/src/map/hooks/useStudioSuggestionPicking.ts +178 -0
  784. package/src/map/hooks/useStudioTimestamp.ts +226 -0
  785. package/src/map/hooks/useStudioUrlState.ts +340 -0
  786. package/src/map/hooks/useStudioWaypointEditing.ts +251 -0
  787. package/src/map/hooks/useStudioZoneEditing.ts +260 -0
  788. package/src/map/hooks/useStudioZoneOriginPicking.ts +129 -0
  789. package/src/map/hooks/useStudioZoneSelection.ts +240 -0
  790. package/src/map/hooks/useTileLayers.ts +33 -0
  791. package/src/map/index.ts +67 -0
  792. package/src/map/rules/editKeyboard.ts +216 -0
  793. package/src/map/rules/editTooltip.ts +222 -0
  794. package/src/map/rules/nearerEscape.ts +107 -0
  795. package/src/map/rules/poiGlyphs.ts +40 -0
  796. package/src/modals/components/AppModal.tsx +280 -0
  797. package/src/modals/components/ConfirmModal.tsx +223 -0
  798. package/src/modals/components/ExportModal.tsx +538 -0
  799. package/src/modals/components/LocationPermissionModal.tsx +129 -0
  800. package/src/modals/components/ModalFooter.tsx +187 -0
  801. package/src/modals/hooks/useConfirmGate.tsx +209 -0
  802. package/src/modals/hooks/useDiscardGuard.tsx +168 -0
  803. package/src/panels/components/EditShortcutHint.tsx +115 -0
  804. package/src/panels/components/FloatingOverlay.tsx +243 -0
  805. package/src/panels/components/GlyphPickerGrid.tsx +84 -0
  806. package/src/panels/components/PanelRouter.tsx +133 -0
  807. package/src/panels/components/PickerCard.tsx +108 -0
  808. package/src/panels/components/RadioOptionCard.tsx +116 -0
  809. package/src/panels/components/SidenavContentBody.tsx +56 -0
  810. package/src/panels/components/SidenavContentFooter.tsx +27 -0
  811. package/src/panels/components/SidenavContentHeader.tsx +172 -0
  812. package/src/panels/components/SidenavFormActions.tsx +96 -0
  813. package/src/panels/components/StudioFormStack.tsx +44 -0
  814. package/src/panels/components/StudioHeader.tsx +117 -0
  815. package/src/panels/components/StudioLayersPanel.tsx +909 -0
  816. package/src/panels/components/StudioPreferencesPanel.tsx +199 -0
  817. package/src/panels/rules/studioHeader.ts +68 -0
  818. package/src/plugins/components/PluginBoundary.tsx +62 -0
  819. package/src/plugins/components/PluginContextMenuActions.tsx +73 -0
  820. package/src/plugins/components/PluginControls.tsx +101 -0
  821. package/src/plugins/components/PluginHeldView.tsx +77 -0
  822. package/src/plugins/components/PluginMenuItems.tsx +63 -0
  823. package/src/plugins/components/PluginProfileHeader.tsx +71 -0
  824. package/src/plugins/components/PluginProfilePlot.tsx +134 -0
  825. package/src/plugins/components/PluginSlotItems.tsx +55 -0
  826. package/src/primitives/components/ActivityIcon.tsx +106 -0
  827. package/src/primitives/components/AllowlistField.tsx +508 -0
  828. package/src/primitives/components/CopyIconButton.tsx +80 -0
  829. package/src/primitives/components/DateTimeInput.tsx +133 -0
  830. package/src/primitives/components/DateTimePickerField.tsx +110 -0
  831. package/src/primitives/components/DescriptiveMenuItem.tsx +80 -0
  832. package/src/primitives/components/DialogSubject.tsx +102 -0
  833. package/src/primitives/components/DisabledMenuItem.tsx +45 -0
  834. package/src/primitives/components/DisabledReason.tsx +34 -0
  835. package/src/primitives/components/EmptyState.tsx +186 -0
  836. package/src/primitives/components/ErrorAlert.tsx +35 -0
  837. package/src/primitives/components/ErrorBoundary.tsx +55 -0
  838. package/src/primitives/components/FieldLabel.tsx +34 -0
  839. package/src/primitives/components/FormErrorAlert.tsx +33 -0
  840. package/src/primitives/components/GroupLabelledBy.tsx +31 -0
  841. package/src/primitives/components/LanguageSelect.tsx +139 -0
  842. package/src/primitives/components/ListSkeleton.tsx +64 -0
  843. package/src/primitives/components/MarqueeText.tsx +61 -0
  844. package/src/primitives/components/OrganizationScopeItem.tsx +146 -0
  845. package/src/primitives/components/OrganizationSelect.tsx +149 -0
  846. package/src/primitives/components/PointField.tsx +75 -0
  847. package/src/primitives/components/PrivacyControl.tsx +127 -0
  848. package/src/primitives/components/RenameInput.tsx +159 -0
  849. package/src/primitives/components/RequiredLabelWithHelp.tsx +76 -0
  850. package/src/primitives/components/SegmentIcon.tsx +43 -0
  851. package/src/primitives/components/SegmentIconLabel.tsx +37 -0
  852. package/src/primitives/components/SpeedInput.tsx +222 -0
  853. package/src/primitives/components/StudioSectionBoundary.tsx +56 -0
  854. package/src/primitives/components/StudioSegmentedControl.tsx +23 -0
  855. package/src/primitives/components/UnitPickerField.tsx +62 -0
  856. package/src/primitives/components/UnitPickerGrid.tsx +71 -0
  857. package/src/primitives/components/WarningAlert.tsx +34 -0
  858. package/src/primitives/hooks/useCompactLayout.ts +30 -0
  859. package/src/primitives/hooks/useSpeedControlLabel.ts +28 -0
  860. package/src/primitives/rules/activityBadge.ts +87 -0
  861. package/src/publication/components/PublicationBadge.tsx +42 -0
  862. package/src/publication/components/PublicationDot.tsx +31 -0
  863. package/src/publication/components/PublicationNotice.tsx +115 -0
  864. package/src/publication/components/PublicationSettledPill.tsx +43 -0
  865. package/src/publication/components/PublicationStatus.tsx +52 -0
  866. package/src/publication/components/UnpublishedPanel.tsx +133 -0
  867. package/src/publication/hooks/usePublicationHint.ts +235 -0
  868. package/src/publication/hooks/usePublishAct.ts +101 -0
  869. package/src/publication/hooks/usePublishItinerary.ts +27 -0
  870. package/src/publication/hooks/usePublishZone.ts +27 -0
  871. package/src/publication/hooks/usePublishableScope.ts +23 -0
  872. package/src/publication/hooks/usePublishedItinerary.ts +83 -0
  873. package/src/rows/components/ReadOnlySegmentRow.tsx +155 -0
  874. package/src/rows/components/RouteMetricLine.tsx +90 -0
  875. package/src/rows/components/RowMetadata.tsx +92 -0
  876. package/src/rows/components/SegmentRow.tsx +381 -0
  877. package/src/rows/components/SegmentRowActions.tsx +187 -0
  878. package/src/rows/components/SegmentRowBody.tsx +197 -0
  879. package/src/rows/components/StudioToggleRow.tsx +71 -0
  880. package/src/rows/components/SuggestionList.tsx +100 -0
  881. package/src/rows/components/SuggestionRowLayout.tsx +164 -0
  882. package/src/rows/components/WaypointRow.tsx +176 -0
  883. package/src/rows/components/WaypointRowLayout.tsx +279 -0
  884. package/src/rows/components/lockChrome.tsx +106 -0
  885. package/src/rules/menuActions.ts +149 -0
  886. package/src/rules/sizing.ts +127 -0
  887. package/src/rules/studioConfig.ts +719 -0
  888. package/src/search/components/CategoryTabs.tsx +136 -0
  889. package/src/search/components/ResultRow.tsx +242 -0
  890. package/src/search/components/ResultsList.tsx +182 -0
  891. package/src/search/components/SearchInput.tsx +100 -0
  892. package/src/search/components/SearchTab.tsx +614 -0
  893. package/src/sections/components/RailSwitcher.tsx +179 -0
  894. package/src/sections/components/SectionCard.tsx +48 -0
  895. package/src/sections/components/SectionHead.tsx +42 -0
  896. package/src/sections/components/SectionTabs.tsx +231 -0
  897. package/src/segments/components/SegmentColorCircle.tsx +118 -0
  898. package/src/segments/components/SegmentColorPicker.tsx +134 -0
  899. package/src/segments/components/SegmentModeControl.tsx +118 -0
  900. package/src/segments/components/SegmentRowMenu.tsx +449 -0
  901. package/src/segments/components/SegmentRowPopover.tsx +163 -0
  902. package/src/segments/components/SegmentSelect.tsx +116 -0
  903. package/src/segments/components/SegmentSpeedControl.tsx +299 -0
  904. package/src/share/components/ShareLinkManage.tsx +699 -0
  905. package/src/share/components/ShareModal.tsx +182 -0
  906. package/src/share/components/ShareSheet.tsx +178 -0
  907. package/src/share/components/ShareViewModal.tsx +131 -0
  908. package/src/share/hooks/useCanManageShareLink.ts +51 -0
  909. package/src/studio/components/MountayaStudio.tsx +1170 -0
  910. package/src/studio/components/MountayaStudioViewer.tsx +775 -0
  911. package/src/studio/hooks/useEmbeddedStudioConfig.ts +60 -0
  912. package/src/studio/hooks/useViewerActivation.ts +47 -0
  913. package/src/studio/hooks/useViewerCollectionSpecification.ts +58 -0
  914. package/src/studio/hooks/useViewerEmbedConfig.ts +74 -0
  915. package/src/studio/hooks/useViewerFraming.ts +211 -0
  916. package/src/studio/hooks/useViewerMapBindings.ts +109 -0
  917. package/src/styles.css +3994 -0
  918. package/src/testing/collections.ts +40 -0
  919. package/src/testing/hostRegistry.tsx +109 -0
  920. package/src/testing/index.ts +65 -0
  921. package/src/testing/itinerary.ts +297 -0
  922. package/src/testing/mountayaClient.tsx +218 -0
  923. package/src/testing/viewer.tsx +171 -0
  924. package/src/theme/components/StudioPortalScope.tsx +130 -0
  925. package/src/theme/hooks/useResolvedStudioTheme.ts +37 -0
  926. package/src/theme/rules/density.ts +157 -0
  927. package/src/theme/rules/mountayaStudioTheme.ts +114 -0
  928. package/src/theme/rules/passwordManager.ts +20 -0
  929. package/src/theme/rules/tokenStyle.ts +18 -0
  930. package/src/theme/rules/tokens.ts +71 -0
  931. package/src/theme/rules/tone.ts +34 -0
  932. package/src/theme/rules/zIndex.ts +40 -0
  933. package/src/video/components/CameraStep.tsx +82 -0
  934. package/src/video/components/DirectingScrim.tsx +28 -0
  935. package/src/video/components/DirectorChat.tsx +79 -0
  936. package/src/video/components/FormatStep.tsx +487 -0
  937. package/src/video/components/ModeCards.tsx +141 -0
  938. package/src/video/components/PlanNumberField.tsx +54 -0
  939. package/src/video/components/PreviewControls.tsx +212 -0
  940. package/src/video/components/PreviewStage.tsx +319 -0
  941. package/src/video/components/PreviewSurface.tsx +247 -0
  942. package/src/video/components/PreviewWatermark.tsx +77 -0
  943. package/src/video/components/ProfileOverlayCanvas.tsx +195 -0
  944. package/src/video/components/ProfileStep.tsx +254 -0
  945. package/src/video/components/RecordProgress.tsx +117 -0
  946. package/src/video/components/ReviewStep.tsx +244 -0
  947. package/src/video/components/ShotList.tsx +452 -0
  948. package/src/video/components/VideoExportWizard.tsx +827 -0
  949. package/src/video/components/WizardDirectingIndicator.tsx +57 -0
  950. package/src/video/components/WizardFooter.tsx +112 -0
  951. package/src/video/hooks/usePreviewPlanRefresh.ts +91 -0
  952. package/src/video/hooks/useVideoItinerarySubject.ts +18 -0
  953. package/src/video/hooks/useVideoOrganizationId.ts +30 -0
  954. package/src/video/hooks/useVideoPreviewSeed.ts +203 -0
  955. package/src/video/hooks/useVideoProfileSeed.ts +53 -0
  956. package/src/video/hooks/useVideoPublication.ts +29 -0
  957. package/src/video/hooks/useVideoRouteReady.ts +52 -0
  958. package/src/video/hooks/useVideoRouteSync.ts +100 -0
  959. package/src/video/hooks/useVideoTileTransform.ts +88 -0
  960. package/src/video/index.ts +24 -0
  961. package/src/video/providers/DirectorChatProvider.tsx +293 -0
  962. package/src/video/rules/changeTo.ts +20 -0
  963. package/src/zone/components/ZoneActionsMenu.tsx +305 -0
  964. package/src/zone/components/ZoneAvailabilityFields.tsx +98 -0
  965. package/src/zone/components/ZoneForm.tsx +622 -0
  966. package/src/zone/components/ZoneInheritedContext.tsx +70 -0
  967. package/src/zone/components/ZoneLevelSelect.tsx +86 -0
  968. package/src/zone/components/ZoneMetadataFields.tsx +89 -0
  969. package/src/zone/components/ZoneMethodSelect.tsx +90 -0
  970. package/src/zone/components/ZoneModeSelect.tsx +98 -0
  971. package/src/zone/components/ZoneRangeInput.tsx +129 -0
  972. package/src/zone/components/ZoneReachabilityFields.tsx +120 -0
  973. package/src/zone/components/ZoneSubHeader.tsx +188 -0
  974. package/src/zone/components/ZoneVisibility.tsx +94 -0
  975. package/src/zone/hooks/useStudioReachabilityStart.ts +79 -0
  976. package/src/zone/hooks/useStudioZonesBrowsed.ts +32 -0
@@ -0,0 +1,1653 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperties(exports, {
4
+ __esModule: { value: true },
5
+ [Symbol.toStringTag]: { value: "Module" }
6
+ });
7
+ const require_studio = require("../chunk-nwutfrnH.cjs");
8
+ const require_UnitPickerGrid = require("../chunk-cTRnGhbF.cjs");
9
+ const require_studioStrings = require("../chunk-Dy59Tdfm.cjs");
10
+ const require_AllowlistField = require("../chunk-kYE5SZgs.cjs");
11
+ const require_sizing = require("../chunk-CQAuAPOE.cjs");
12
+ const require_FullscreenModal = require("../chunk-C-9wXKm5.cjs");
13
+ const require_WizardLayout = require("../chunk-BmJDHIlZ.cjs");
14
+ const require_useStudioDispatch = require("../chunk-Vp0uJb7O.cjs");
15
+ const require_useItinerarySubject = require("../chunk-BjQzK3c3.cjs");
16
+ const require_useStudioItinerary = require("../chunk-DcLLI7B1.cjs");
17
+ const require_DialogSubject = require("../chunk-BybRyFen.cjs");
18
+ const require_UnpublishedPanel = require("../chunk-B8mS5bGc.cjs");
19
+ const require_SectionTabs = require("../chunk-CaTeIppS.cjs");
20
+ const require_WarningAlert = require("../chunk-Bj3ium6N.cjs");
21
+ const require_RailSwitcher = require("../chunk-vGzpsUSM.cjs");
22
+ const require_SectionHead = require("../chunk-6v2fJIDh.cjs");
23
+ const require_useEveryPage = require("../chunk-DQ_X9yhT.cjs");
24
+ const require_notify = require("../chunk-D0Cmheqq.cjs");
25
+ const require_useItineraryEditable = require("../chunk-CsnJv55G.cjs");
26
+ const require_ConfirmModal = require("../chunk-Bb5SAw6T.cjs");
27
+ const require_PrivacyControl = require("../chunk-DkH1DKxi.cjs");
28
+ const require_EmptyState = require("../chunk-B3mMYMtz.cjs");
29
+ const require_PublicationNotice = require("../chunk-C60kC4oZ.cjs");
30
+ let _mantine_core = require("@mantine/core");
31
+ let _mountaya_studio = require("@mountaya/studio");
32
+ let react = require("react");
33
+ let _mountaya_studio_strings = require("@mountaya/studio/strings");
34
+ let react_jsx_runtime = require("react/jsx-runtime");
35
+ let _mountaya_elements_react = require("@mountaya/elements-react");
36
+ let _mountaya_client_react = require("@mountaya/client-react");
37
+ let _mountaya_elements_geo = require("@mountaya/elements/geo");
38
+ let _mantine_hooks = require("@mantine/hooks");
39
+ const CARD_THUMB_PX = 52;
40
+ const EmbedBaseMapPicker = ({ description, label, locked, onChange, options, value }) => {
41
+ const layerThumbnail = require_studio.useStudioLayerThumbnail();
42
+ const labelId = (0, react.useId)();
43
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Input.Wrapper, {
44
+ description,
45
+ label,
46
+ labelProps: { id: labelId },
47
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
48
+ className: "mtya-field-control",
49
+ mod: { described: Boolean(description) },
50
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Radio.Group, {
51
+ inputContainer: (children) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnitPickerGrid.GroupLabelledBy, {
52
+ labelledBy: labelId,
53
+ children
54
+ }),
55
+ onChange: (slug) => {
56
+ if (slug) onChange(slug);
57
+ },
58
+ value,
59
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.SimpleGrid, {
60
+ cols: 3,
61
+ spacing: "xs",
62
+ children: options.map((option) => {
63
+ const thumbnail = layerThumbnail("terrain", option.value);
64
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnitPickerGrid.PickerCard, {
65
+ imageMedia: thumbnail !== void 0,
66
+ kindSlug: "embed-terrain",
67
+ locked,
68
+ name: option.label,
69
+ value: option.value,
70
+ children: thumbnail === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Image, {
71
+ alt: option.label,
72
+ h: CARD_THUMB_PX,
73
+ src: thumbnail,
74
+ w: "100%"
75
+ })
76
+ }, option.value);
77
+ })
78
+ })
79
+ })
80
+ })
81
+ });
82
+ };
83
+ const GlyphPickerGrid = ({ "aria-labelledby": labelledBy, cols, kindSlug, locked, onChange, options, value }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Radio.Group, {
84
+ inputContainer: labelledBy === void 0 ? void 0 : (children) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnitPickerGrid.GroupLabelledBy, {
85
+ labelledBy,
86
+ children
87
+ }),
88
+ onChange,
89
+ value,
90
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.SimpleGrid, {
91
+ cols,
92
+ spacing: "xs",
93
+ children: options.map(({ glyph, label, value: optionValue }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnitPickerGrid.PickerCard, {
94
+ kindSlug,
95
+ locked,
96
+ name: label,
97
+ value: optionValue,
98
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
99
+ name: glyph,
100
+ size: require_sizing.iconSizes.md
101
+ })
102
+ }, optionValue))
103
+ })
104
+ });
105
+ const themeGlyph = {
106
+ dark: "theme-dark",
107
+ light: "theme-light"
108
+ };
109
+ const EmbedThemePicker = ({ description, label, locked, onChange, options, value }) => {
110
+ const cards = options.map((option) => ({
111
+ glyph: themeGlyph[option.value] ?? "theme-light",
112
+ label: option.label,
113
+ value: option.value
114
+ }));
115
+ const labelId = (0, react.useId)();
116
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Input.Wrapper, {
117
+ description,
118
+ label,
119
+ labelProps: { id: labelId },
120
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
121
+ className: "mtya-field-control",
122
+ mod: { described: Boolean(description) },
123
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlyphPickerGrid, {
124
+ "aria-labelledby": labelId,
125
+ cols: 2,
126
+ kindSlug: "embed-theme",
127
+ locked,
128
+ onChange,
129
+ options: cards,
130
+ value
131
+ })
132
+ })
133
+ });
134
+ };
135
+ const tintGlyph = {
136
+ dark: "theme-dark",
137
+ light: "theme-light"
138
+ };
139
+ const EmbedTintPicker = ({ description, label, locked, onChange, options, value }) => {
140
+ const cards = options.map((option) => ({
141
+ glyph: tintGlyph[option.value] ?? "theme-light",
142
+ label: option.label,
143
+ value: option.value
144
+ }));
145
+ const labelId = (0, react.useId)();
146
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Input.Wrapper, {
147
+ description,
148
+ label,
149
+ labelProps: { id: labelId },
150
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
151
+ className: "mtya-field-control",
152
+ mod: { described: Boolean(description) },
153
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlyphPickerGrid, {
154
+ "aria-labelledby": labelId,
155
+ cols: 2,
156
+ kindSlug: "embed-tint",
157
+ locked,
158
+ onChange,
159
+ options: cards,
160
+ value
161
+ })
162
+ })
163
+ });
164
+ };
165
+ const SECTIONS$11 = [
166
+ "controls",
167
+ "embed",
168
+ "preferences"
169
+ ];
170
+ const dependencyParam = (key) => _mountaya_studio.EMBED_CONFIG_FIELDS.find((candidate) => candidate.key === key)?.param ?? null;
171
+ const EmbedToggleSwitch = ({ checked, description, disabled, label, onChange, tooltip }) => {
172
+ const control = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Switch, {
173
+ checked,
174
+ description,
175
+ disabled,
176
+ label,
177
+ onChange: (event) => onChange(event.currentTarget.checked)
178
+ });
179
+ return tooltip ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Tooltip, {
180
+ label: tooltip,
181
+ position: "top-start",
182
+ children: control
183
+ }) : control;
184
+ };
185
+ const unitPickerFields = {
186
+ preferredUnitLength: {
187
+ kindSlug: "embed-length",
188
+ options: _mountaya_studio_strings.lengthUnitOptions
189
+ },
190
+ preferredUnitPace: {
191
+ kindSlug: "embed-pace",
192
+ options: _mountaya_studio_strings.paceUnitOptions
193
+ },
194
+ preferredUnitSlope: {
195
+ kindSlug: "embed-slope",
196
+ options: _mountaya_studio_strings.slopeUnitOptions
197
+ },
198
+ preferredUnitTemperature: {
199
+ kindSlug: "embed-temperature",
200
+ options: _mountaya_studio_strings.temperatureUnitOptions
201
+ }
202
+ };
203
+ const isUnitPickerKey = (key) => key in unitPickerFields;
204
+ const flagOf = (config, key) => config[key] === true;
205
+ const textOf = (config, key) => {
206
+ const value = config[key];
207
+ return typeof value === "string" ? value : "";
208
+ };
209
+ const listOf = (config, key) => {
210
+ const value = config[key];
211
+ return Array.isArray(value) ? value : [];
212
+ };
213
+ const fieldDependencies = _mountaya_studio.embedFieldDependencies;
214
+ const configKeysRead = (field) => {
215
+ if (field.kind === "boolean") return [field.key, ...fieldDependencies[field.key] ?? []];
216
+ if (field.kind === "enum") return isUnitPickerKey(field.key) ? [field.key, "preferredUnitLength"] : [field.key];
217
+ return [field.key];
218
+ };
219
+ const fieldCopy = (bank, param) => bank[param] ?? param;
220
+ const EmbedFieldControlBase = ({ config, field, layerOptions, onPatch, safetyRules }) => {
221
+ const languageMark = require_studio.useStudioLanguageMark();
222
+ const languageOptions = require_studio.useStudioLanguages();
223
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$11);
224
+ const units = require_studioStrings.useStudioScopedStrings(SECTIONS$11).preferences.units;
225
+ const label = fieldCopy(words.embed.fields, field.param);
226
+ const labelId = (0, react.useId)();
227
+ if (field.kind === "boolean") {
228
+ const restricted = (0, _mountaya_studio.isFieldRestricted)(field.key, safetyRules);
229
+ const unmet = (0, _mountaya_studio.fieldDependenciesUnmet)(field.key, config);
230
+ const blocked = restricted || unmet.length > 0;
231
+ const blockingLabels = unmet.map((key) => dependencyParam(key)).filter((param) => param !== null).map((param) => `"${fieldCopy(words.embed.fields, param)}"`);
232
+ const dependencyTooltip = blockingLabels.length === 0 ? void 0 : words.embed.requiresField(blockingLabels.join(words.embed.requiresFieldSeparator));
233
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedToggleSwitch, {
234
+ checked: flagOf(config, field.key),
235
+ description: fieldCopy(words.embed.fieldsDesc, field.param),
236
+ disabled: blocked,
237
+ label,
238
+ onChange: (checked) => onPatch({ [field.key]: checked }),
239
+ tooltip: restricted ? words.embed.safetyRestricted : dependencyTooltip
240
+ });
241
+ }
242
+ if (field.kind === "enum") {
243
+ if (field.key === "preferredLanguage") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnitPickerGrid.LanguageSelect, {
244
+ label,
245
+ onChange: (language) => onPatch({ preferredLanguage: language }),
246
+ options: languageOptions,
247
+ renderMark: languageMark,
248
+ value: config.preferredLanguage
249
+ });
250
+ if (field.key === "terrainVariant") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedTintPicker, {
251
+ label,
252
+ onChange: (value) => onPatch({ terrainVariant: value === "dark" ? "dark" : "light" }),
253
+ options: (0, _mountaya_studio.terrainVariantOptions)(words),
254
+ value: config.terrainVariant
255
+ });
256
+ if (isUnitPickerKey(field.key)) {
257
+ const picker = unitPickerFields[field.key];
258
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Input.Wrapper, {
259
+ label,
260
+ labelProps: { id: labelId },
261
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnitPickerGrid.UnitPickerGrid, {
262
+ "aria-labelledby": labelId,
263
+ kindSlug: picker.kindSlug,
264
+ onChange: (value) => onPatch({ [field.key]: value }),
265
+ options: picker.options(units, config.preferredUnitLength),
266
+ value: textOf(config, field.key)
267
+ })
268
+ });
269
+ }
270
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedThemePicker, {
271
+ label,
272
+ onChange: (value) => onPatch({ [field.key]: value }),
273
+ options: (0, _mountaya_studio.enumFieldOptions)(field.key, words),
274
+ value: textOf(config, field.key)
275
+ });
276
+ }
277
+ if (field.kind === "string") {
278
+ if (field.key === "segmentsColor") {
279
+ const segmentsColor = config.segmentsColor;
280
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.ColorInput, {
281
+ label,
282
+ onChange: (value) => onPatch({ segmentsColor: value }),
283
+ placeholder: words.embed.fields.segments_color_placeholder,
284
+ rightSection: segmentsColor === "" ? void 0 : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.CloseButton, {
285
+ "aria-label": words.embed.fields.segments_color_clear,
286
+ onClick: () => onPatch({ segmentsColor: "" })
287
+ }),
288
+ rightSectionPointerEvents: "all",
289
+ value: segmentsColor
290
+ });
291
+ }
292
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedBaseMapPicker, {
293
+ label,
294
+ onChange: (slug) => onPatch({ [field.key]: slug }),
295
+ options: layerOptions.terrains,
296
+ value: textOf(config, field.key)
297
+ });
298
+ }
299
+ const allowlistModeLabels = {
300
+ all: words.embed.allowlist.all,
301
+ specific: words.embed.allowlist.specific
302
+ };
303
+ if (field.key === "withOverlays") {
304
+ const overlaysWithheld = !(0, _mountaya_studio.overlaysOffered)([], safetyRules?.with_overlays);
305
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AllowlistField.AllowlistField, {
306
+ data: layerOptions.overlayGroups,
307
+ description: overlaysWithheld ? words.embed.safetyRestricted : void 0,
308
+ disabled: overlaysWithheld && layerOptions.overlayGroups.length === 0,
309
+ label,
310
+ modeLabels: allowlistModeLabels,
311
+ nothingFoundMessage: words.controls.layers,
312
+ onChange: (value) => onPatch({ withOverlays: value }),
313
+ placeholder: words.embed.allowlist.overlaysPlaceholder,
314
+ selectionCountLabel: words.embed.allowlist.selectedCount,
315
+ value: config.withOverlays,
316
+ variant: "display"
317
+ });
318
+ }
319
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AllowlistField.AllowlistField, {
320
+ data: layerOptions.terrains,
321
+ label,
322
+ modeLabels: allowlistModeLabels,
323
+ nothingFoundMessage: words.controls.layers,
324
+ onChange: (value) => onPatch({ [field.key]: value }),
325
+ placeholder: words.embed.allowlist.terrainsPlaceholder,
326
+ selectionCountLabel: words.embed.allowlist.selectedCount,
327
+ value: listOf(config, field.key),
328
+ variant: "display"
329
+ });
330
+ };
331
+ const sameFieldProps = (previous, next) => previous.field === next.field && previous.layerOptions === next.layerOptions && previous.onPatch === next.onPatch && previous.safetyRules === next.safetyRules && configKeysRead(next.field).every((key) => previous.config[key] === next.config[key]);
332
+ const EmbedFieldControl = (0, react.memo)(EmbedFieldControlBase, sameFieldProps);
333
+ const SECTIONS$10 = ["embed"];
334
+ const CODE_DEBOUNCE_MS = 300;
335
+ const IFRAME_WIDTH = "100%";
336
+ const IFRAME_HEIGHT = "480";
337
+ const useEmbedCode = ({ collectionId, config, defaultView, defaults, element, itineraryId, name, publishableKey, requireSessionToken, tableItineraryId, tables }) => {
338
+ const appOrigin = require_studio.useStudioAppOrigin();
339
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$10);
340
+ const [settled] = (0, _mantine_hooks.useDebouncedValue)(config, CODE_DEBOUNCE_MS);
341
+ const viewHash = (0, react.useMemo)(() => (0, _mountaya_studio.buildEmbedViewHash)(defaultView), [defaultView]);
342
+ const iframeTitle = words.embed.code.iframeTitle(name);
343
+ return (0, react.useMemo)(() => {
344
+ if (!publishableKey) return null;
345
+ if ((0, _mountaya_studio.isEmbedTableElement)(element)) return tableItineraryId === null ? null : {
346
+ code: (0, _mountaya_studio.buildEmbedTableCode)({
347
+ columns: (0, _mountaya_studio.embedTableColumns)(element, tables),
348
+ element,
349
+ itineraryId: tableItineraryId,
350
+ language: settled.preferredLanguage,
351
+ length: settled.preferredUnitLength,
352
+ publishableKey,
353
+ requireSessionToken,
354
+ serviceFilter: tables.serviceFilter
355
+ }),
356
+ language: "tsx"
357
+ };
358
+ const iframe = (0, _mountaya_studio.buildEmbedIframe)({
359
+ height: IFRAME_HEIGHT,
360
+ src: (0, _mountaya_studio.buildEmbedSrc)(appOrigin, (0, _mountaya_studio.buildEmbedSearch)({
361
+ collectionId: collectionId ?? void 0,
362
+ config: settled,
363
+ defaults,
364
+ itineraryId: itineraryId ?? void 0,
365
+ publishableKey
366
+ }), viewHash),
367
+ title: iframeTitle,
368
+ width: IFRAME_WIDTH
369
+ });
370
+ return {
371
+ code: requireSessionToken ? `${iframe}\n${(0, _mountaya_studio.buildEmbedSessionScript)({ appOrigin })}` : iframe,
372
+ language: "html"
373
+ };
374
+ }, [
375
+ appOrigin,
376
+ collectionId,
377
+ defaults,
378
+ element,
379
+ iframeTitle,
380
+ itineraryId,
381
+ publishableKey,
382
+ requireSessionToken,
383
+ settled,
384
+ tableItineraryId,
385
+ tables,
386
+ viewHash
387
+ ]);
388
+ };
389
+ const PAGE_LIMIT = 100;
390
+ const NO_ITINERARIES = [];
391
+ const useEmbedCollectionItineraries = (collectionId) => {
392
+ const { data, isLoading } = (0, _mountaya_client_react.useMountayaQuery)("rest", "getCollectionItineraries", {
393
+ collection_id: collectionId ?? "",
394
+ query: { limit: PAGE_LIMIT }
395
+ }, {
396
+ enabled: collectionId !== void 0,
397
+ select: (body) => body.data
398
+ });
399
+ return {
400
+ itineraries: data ?? NO_ITINERARIES,
401
+ pending: isLoading
402
+ };
403
+ };
404
+ const SECTIONS$9 = ["embed"];
405
+ const useEmbedLayerOptions = (config, safetyRules, organizationId) => {
406
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$9);
407
+ const language = (0, _mountaya_elements_react.useMountayaLanguage)();
408
+ const { overlayGroups, terrainOptions } = require_AllowlistField.useLayerCatalogOptions(language, organizationId);
409
+ const otherLabel = words.embed.overlaysOther;
410
+ const allowedOverlays = safetyRules?.with_overlays;
411
+ return (0, react.useMemo)(() => (0, _mountaya_studio.embedLayerOptions)({
412
+ overlayGroups,
413
+ terrains: terrainOptions
414
+ }, {
415
+ terrain: config.terrain,
416
+ withOverlays: config.withOverlays,
417
+ withTerrains: config.withTerrains
418
+ }, allowedOverlays, otherLabel), [
419
+ allowedOverlays,
420
+ config.terrain,
421
+ config.withOverlays,
422
+ config.withTerrains,
423
+ otherLabel,
424
+ overlayGroups,
425
+ terrainOptions
426
+ ]);
427
+ };
428
+ const CAMERA_REQUEST_TIMEOUT_MS = 1500;
429
+ const previewOriginOf = (appOrigin) => {
430
+ try {
431
+ return new URL(appOrigin, window.location.href).origin;
432
+ } catch {
433
+ return window.location.origin;
434
+ }
435
+ };
436
+ const useEmbedPreviewCamera = () => {
437
+ const appOrigin = require_studio.useStudioAppOrigin();
438
+ const appOriginRef = (0, _mountaya_elements_react.useLatestRef)(appOrigin);
439
+ const previewWindowRef = (0, react.useRef)(null);
440
+ const pendingRef = (0, react.useRef)(null);
441
+ const registerPreviewWindow = (0, react.useCallback)((win) => {
442
+ previewWindowRef.current = win;
443
+ }, []);
444
+ (0, react.useEffect)(() => {
445
+ const onMessage = (event) => {
446
+ if (event.source !== previewWindowRef.current || event.origin !== previewOriginOf(appOriginRef.current)) return;
447
+ const parsed = _mountaya_studio.cameraMessageSchema.safeParse(event.data);
448
+ if (!parsed.success) return;
449
+ const resolve = pendingRef.current;
450
+ if (!resolve) return;
451
+ pendingRef.current = null;
452
+ resolve({
453
+ bearing: parsed.data.bearing,
454
+ center: parsed.data.center,
455
+ pitch: parsed.data.pitch,
456
+ zoom: parsed.data.zoom
457
+ });
458
+ };
459
+ window.addEventListener("message", onMessage);
460
+ return () => {
461
+ window.removeEventListener("message", onMessage);
462
+ };
463
+ }, [appOriginRef]);
464
+ const requestCamera = (0, react.useCallback)(() => {
465
+ const previewWindow = previewWindowRef.current;
466
+ if (!previewWindow) return Promise.resolve(null);
467
+ return new Promise((resolve) => {
468
+ pendingRef.current?.(null);
469
+ const timeout = window.setTimeout(() => {
470
+ if (pendingRef.current === settle) {
471
+ pendingRef.current = null;
472
+ resolve(null);
473
+ }
474
+ }, CAMERA_REQUEST_TIMEOUT_MS);
475
+ const settle = (view) => {
476
+ window.clearTimeout(timeout);
477
+ resolve(view);
478
+ };
479
+ pendingRef.current = settle;
480
+ previewWindow.postMessage({ type: _mountaya_studio.REQUEST_CAMERA_MESSAGE }, previewOriginOf(appOriginRef.current));
481
+ });
482
+ }, [appOriginRef]);
483
+ return (0, react.useMemo)(() => ({
484
+ registerPreviewWindow,
485
+ requestCamera
486
+ }), [registerPreviewWindow, requestCamera]);
487
+ };
488
+ const SECTIONS$8 = ["embed"];
489
+ const emptyDefaultView = {
490
+ bearing: null,
491
+ center: null,
492
+ pitch: null,
493
+ zoom: null
494
+ };
495
+ const UNSET_READOUT = "–";
496
+ const zoomDigits = { maximumFractionDigits: 1 };
497
+ const DefaultViewControl = ({ onCapture, view }) => {
498
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$8);
499
+ const { formatNumber } = require_studio.useStudioFormatters();
500
+ const [capturing, setCapturing] = (0, react.useState)(false);
501
+ const handleCapture = (0, react.useCallback)(async () => {
502
+ setCapturing(true);
503
+ try {
504
+ await onCapture();
505
+ } finally {
506
+ setCapturing(false);
507
+ }
508
+ }, [onCapture]);
509
+ const hasView = view.zoom !== null || view.bearing !== null || view.pitch !== null || view.center !== null;
510
+ const readouts = [
511
+ {
512
+ label: words.embed.defaultView.zoomLabel,
513
+ value: view.zoom === null ? UNSET_READOUT : formatNumber(view.zoom, zoomDigits)
514
+ },
515
+ {
516
+ label: words.embed.defaultView.bearingLabel,
517
+ value: view.bearing === null ? UNSET_READOUT : `${Math.round(view.bearing)}°`
518
+ },
519
+ {
520
+ label: words.embed.defaultView.pitchLabel,
521
+ value: view.pitch === null ? UNSET_READOUT : `${Math.round(view.pitch)}°`
522
+ },
523
+ {
524
+ label: words.embed.defaultView.centerLabel,
525
+ value: (view.center === null ? null : (0, _mountaya_elements_geo.formatLngLat)(view.center)) ?? UNSET_READOUT
526
+ }
527
+ ];
528
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
529
+ gap: "sm",
530
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Button, {
531
+ leftSection: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
532
+ name: "action-capture-view",
533
+ size: require_sizing.iconSizes.sm
534
+ }),
535
+ loading: capturing,
536
+ onClick: () => {
537
+ handleCapture();
538
+ },
539
+ variant: "light",
540
+ children: words.embed.defaultView.capture
541
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Stack, {
542
+ gap: "xxs",
543
+ children: readouts.map((readout) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, {
544
+ justify: "space-between",
545
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
546
+ c: "dimmed",
547
+ size: "xs",
548
+ children: readout.label
549
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
550
+ c: hasView ? void 0 : "dimmed",
551
+ fw: 600,
552
+ children: readout.value
553
+ })]
554
+ }, readout.label))
555
+ })]
556
+ });
557
+ };
558
+ const SECTIONS$7 = ["embed"];
559
+ const EmbedKeyPanel = ({ element, keys, onChange, requireSessionToken, value }) => {
560
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$7);
561
+ const options = (0, react.useMemo)(() => keys.keys.map((key) => ({
562
+ description: (0, _mountaya_studio.truncateKey)(key.key),
563
+ label: key.name,
564
+ value: key.key
565
+ })), [keys]);
566
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, { children: [options.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Select, {
567
+ allowDeselect: false,
568
+ data: options,
569
+ description: words.embed.key.description,
570
+ label: words.embed.key.label,
571
+ leftSection: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
572
+ name: "api-key",
573
+ size: require_sizing.iconSizes.sm
574
+ }),
575
+ onChange,
576
+ placeholder: words.embed.key.placeholder,
577
+ required: true,
578
+ value,
579
+ withAsterisk: true
580
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WarningAlert.WarningAlert, {
581
+ title: words.embed.key.label,
582
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
583
+ gap: "xxs",
584
+ children: [words.embed.key.empty, keys.createKeyHref === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Anchor, {
585
+ href: keys.createKeyHref,
586
+ rel: "noreferrer",
587
+ target: "_blank",
588
+ children: words.embed.key.createCta
589
+ })]
590
+ })
591
+ }), requireSessionToken ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Alert, {
592
+ color: "blue",
593
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
594
+ name: "info",
595
+ size: require_sizing.iconSizes.md
596
+ }),
597
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
598
+ gap: "xxs",
599
+ children: [(0, _mountaya_studio.isEmbedTableElement)(element) ? words.embed.key.sessionTokenTable : words.embed.key.sessionToken, keys.sessionTokenHref === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Anchor, {
600
+ href: keys.sessionTokenHref,
601
+ rel: "noreferrer",
602
+ target: "_blank",
603
+ children: words.embed.key.sessionTokenLink
604
+ })]
605
+ })
606
+ }) : null] });
607
+ };
608
+ const SECTIONS$6 = ["embed"];
609
+ const EmbedSnippetCode = (0, react.lazy)(() => Promise.resolve().then(() => require("../chunk-DbW3lF5Y.cjs")).then((module) => ({ default: module.EmbedSnippetCode })));
610
+ const EmbedCodeStep = ({ children, description, position, title }) => {
611
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$6);
612
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RailSwitcher.SectionCard, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
613
+ gap: "md",
614
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, {
615
+ align: "flex-start",
616
+ gap: "sm",
617
+ wrap: "nowrap",
618
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
619
+ "aria-hidden": true,
620
+ className: "mtya-embed-step-mark",
621
+ children: position
622
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
623
+ gap: "xxs",
624
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h4", {
625
+ className: "mtya-section-card-title",
626
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.VisuallyHidden, { children: [words.embed.code.step(position), " "] }), title]
627
+ }), description === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
628
+ c: "dimmed",
629
+ children: description
630
+ })]
631
+ })]
632
+ }), children]
633
+ }) });
634
+ };
635
+ const EmbedCodeBlock = ({ code, copyLabel, language }) => {
636
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$6);
637
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
638
+ fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Group, {
639
+ justify: "center",
640
+ p: "md",
641
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Loader, { size: "sm" })
642
+ }),
643
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedSnippetCode, {
644
+ ariaLabel: copyLabel,
645
+ code,
646
+ copiedLabel: words.embed.code.copied,
647
+ copyLabel,
648
+ language
649
+ })
650
+ });
651
+ };
652
+ const EmbedDomainsNote = ({ domains, element, href }) => {
653
+ const copy = require_studioStrings.useStudioScopedStrings(SECTIONS$6).embed.domains;
654
+ const table = (0, _mountaya_studio.isEmbedTableElement)(element);
655
+ const link = href === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Anchor, {
656
+ href,
657
+ rel: "noreferrer",
658
+ target: "_blank",
659
+ children: copy.manage
660
+ });
661
+ if (domains !== void 0 && domains.length > 0 && domains.every((entry) => (0, _mountaya_studio.isLoopbackDomain)(entry))) {
662
+ const listedLocal = domains.join(copy.separator);
663
+ const localOnly = table ? {
664
+ body: copy.tableLocalOnly.body(listedLocal),
665
+ title: copy.tableLocalOnly.title
666
+ } : {
667
+ body: copy.embedLocalOnly.body(listedLocal),
668
+ title: copy.embedLocalOnly.title
669
+ };
670
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WarningAlert.WarningAlert, {
671
+ title: localOnly.title,
672
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
673
+ gap: "xxs",
674
+ children: [localOnly.body, link]
675
+ })
676
+ });
677
+ }
678
+ if (domains !== void 0 && domains.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WarningAlert.WarningAlert, {
679
+ title: table ? copy.tableNone.title : copy.embedNone.title,
680
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
681
+ gap: "xxs",
682
+ children: [table ? copy.tableNone.body : copy.embedNone.body, link]
683
+ })
684
+ });
685
+ const listed = domains === void 0 ? "" : domains.join(copy.separator);
686
+ const sentence = domains === void 0 ? table ? copy.tableUnknown : copy.embedUnknown : table ? copy.tableListed(listed) : copy.embedListed(listed);
687
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
688
+ gap: "xxs",
689
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, { children: sentence }), link]
690
+ });
691
+ };
692
+ const EmbedCodeSection = ({ code, domains, element, keys, onPublishableKeyChange, publishableKey, requireSessionToken, withheld }) => {
693
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$6);
694
+ const copy = words.embed.code;
695
+ const table = (0, _mountaya_studio.isEmbedTableElement)(element);
696
+ const codeStep = table ? 3 : 2;
697
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
698
+ className: "mtya-wizard-page",
699
+ gap: "lg",
700
+ children: [
701
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SectionHead.SectionHead, {
702
+ description: table ? words.embed.sectionHelp.codeTable : words.embed.sectionHelp.code,
703
+ title: words.embed.sections.code
704
+ }),
705
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedCodeStep, {
706
+ position: 1,
707
+ title: copy.keyTitle,
708
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedKeyPanel, {
709
+ element,
710
+ keys,
711
+ onChange: onPublishableKeyChange,
712
+ requireSessionToken,
713
+ value: publishableKey
714
+ })
715
+ }),
716
+ table ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedCodeStep, {
717
+ description: copy.install.description,
718
+ position: 2,
719
+ title: copy.install.title,
720
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedCodeBlock, {
721
+ code: _mountaya_studio.EMBED_TABLE_INSTALL_COMMAND,
722
+ copyLabel: copy.copyCommand,
723
+ language: "text"
724
+ })
725
+ }) : null,
726
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(EmbedCodeStep, {
727
+ description: table ? copy.component.description : copy.iframe.description,
728
+ position: codeStep,
729
+ title: table ? copy.component.title : copy.iframe.title,
730
+ children: [code === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, {
731
+ align: "flex-start",
732
+ gap: "sm",
733
+ wrap: "nowrap",
734
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
735
+ c: "dimmed",
736
+ mt: "xxs",
737
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
738
+ name: "locked",
739
+ size: require_sizing.iconSizes.md
740
+ })
741
+ }), publishableKey === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
742
+ gap: "xxs",
743
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
744
+ fw: 500,
745
+ children: words.embed.gated.noKey.title
746
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
747
+ c: "dimmed",
748
+ children: words.embed.gated.noKey.description
749
+ })]
750
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
751
+ c: "dimmed",
752
+ children: withheld
753
+ })]
754
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedCodeBlock, {
755
+ code: code.code,
756
+ copyLabel: copy.copy,
757
+ language: code.language
758
+ }), table ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
759
+ c: "dimmed",
760
+ size: "xs",
761
+ children: copy.otherFrameworks
762
+ }) : null]
763
+ }),
764
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedCodeStep, {
765
+ position: codeStep + 1,
766
+ title: copy.domainsTitle,
767
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedDomainsNote, {
768
+ domains,
769
+ element,
770
+ href: keys.allowedDomainsHref
771
+ })
772
+ })
773
+ ]
774
+ });
775
+ };
776
+ const SECTIONS$5 = [
777
+ "controls",
778
+ "embed",
779
+ "preferences"
780
+ ];
781
+ const EmbedSectionReset = ({ description, disabled, onClick, title }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Tooltip, {
782
+ label: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
783
+ gap: "xxs",
784
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
785
+ c: "white",
786
+ fw: 600,
787
+ size: "xs",
788
+ children: title
789
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
790
+ c: "dimmed",
791
+ size: "xs",
792
+ children: description
793
+ })]
794
+ }),
795
+ position: "bottom-end",
796
+ withinPortal: true,
797
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.ActionIcon, {
798
+ "aria-label": title,
799
+ c: "dimmed",
800
+ disabled,
801
+ onClick,
802
+ variant: "subtle",
803
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
804
+ name: "action-reset",
805
+ size: require_sizing.iconSizes.sm
806
+ })
807
+ })
808
+ });
809
+ const assignField = (patch, key, value) => {
810
+ patch[key] = value;
811
+ };
812
+ const EmbedConfigForm = ({ config, defaults, element, layerOptions, onPatch, safetyRules, section }) => {
813
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$5);
814
+ const fields = (0, _mountaya_studio.embedElementSectionFields)(element, section);
815
+ const changes = (0, _mountaya_studio.embedSectionChanges)(element, section, config, defaults);
816
+ const reset = () => {
817
+ const patch = {};
818
+ for (const field of fields) assignField(patch, field.key, defaults[field.key]);
819
+ onPatch(patch);
820
+ };
821
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
822
+ gap: "lg",
823
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SectionHead.SectionHead, {
824
+ action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedSectionReset, {
825
+ description: words.embed.reset.section.description,
826
+ disabled: changes === 0,
827
+ onClick: reset,
828
+ title: words.embed.reset.section.title
829
+ }),
830
+ description: section === "appearance" && (0, _mountaya_studio.isEmbedTableElement)(element) ? words.embed.sectionHelp.appearanceTable : words.embed.sectionHelp[section],
831
+ title: words.embed.sections[section]
832
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Stack, {
833
+ gap: "sm",
834
+ children: fields.map((field) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedFieldControl, {
835
+ config,
836
+ field,
837
+ layerOptions,
838
+ onPatch,
839
+ safetyRules
840
+ }, field.key))
841
+ })]
842
+ });
843
+ };
844
+ const EmbedDefaultViewSection = ({ defaultView, onCaptureCamera, onDefaultViewReset }) => {
845
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$5);
846
+ const atDefault = defaultView.zoom === null && defaultView.bearing === null && defaultView.pitch === null && defaultView.center === null;
847
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
848
+ gap: "lg",
849
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SectionHead.SectionHead, {
850
+ action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedSectionReset, {
851
+ description: words.embed.reset.defaultView.description,
852
+ disabled: atDefault,
853
+ onClick: onDefaultViewReset,
854
+ title: words.embed.reset.defaultView.title
855
+ }),
856
+ description: words.embed.defaultView.help,
857
+ title: words.embed.sections.defaultView
858
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultViewControl, {
859
+ onCapture: onCaptureCamera,
860
+ view: defaultView
861
+ })]
862
+ });
863
+ };
864
+ const SECTIONS$4 = [
865
+ "controls",
866
+ "embed",
867
+ "preferences"
868
+ ];
869
+ const TABLE_SECTIONS = ["table"];
870
+ const EmbedColumnsSection = ({ element, onChange, options }) => {
871
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$4);
872
+ const { table } = (0, _mountaya_elements_react.useMountayaScopedStrings)(TABLE_SECTIONS);
873
+ const copy = words.embed.columns;
874
+ const toggleSegment = (column, shown) => onChange({
875
+ ...options,
876
+ segmentColumns: (0, _mountaya_studio.toggleEmbedTableColumn)(_mountaya_studio.EMBED_SEGMENT_TABLE_COLUMNS, options.segmentColumns, column, shown)
877
+ });
878
+ const toggleWaypoint = (column, shown) => onChange({
879
+ ...options,
880
+ waypointColumns: (0, _mountaya_studio.toggleEmbedTableColumn)(_mountaya_studio.EMBED_WAYPOINT_TABLE_COLUMNS, options.waypointColumns, column, shown)
881
+ });
882
+ const reset = () => onChange(element === "segment-table" ? {
883
+ ...options,
884
+ segmentColumns: _mountaya_studio.defaultEmbedTableOptions.segmentColumns
885
+ } : {
886
+ ...options,
887
+ serviceFilter: _mountaya_studio.defaultEmbedTableOptions.serviceFilter,
888
+ waypointColumns: _mountaya_studio.defaultEmbedTableOptions.waypointColumns
889
+ });
890
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
891
+ gap: "lg",
892
+ children: [
893
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SectionHead.SectionHead, {
894
+ action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedSectionReset, {
895
+ description: words.embed.reset.columns.description,
896
+ disabled: (0, _mountaya_studio.embedTableChanges)(element, options) === 0,
897
+ onClick: reset,
898
+ title: words.embed.reset.columns.title
899
+ }),
900
+ description: words.embed.sectionHelp.columns,
901
+ title: words.embed.sections.columns
902
+ }),
903
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Stack, {
904
+ gap: "sm",
905
+ children: element === "segment-table" ? _mountaya_studio.EMBED_SEGMENT_TABLE_COLUMNS.map((column) => column === "segment" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedToggleSwitch, {
906
+ checked: true,
907
+ description: copy.locked,
908
+ disabled: true,
909
+ label: table[column],
910
+ onChange: () => {}
911
+ }, column) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedToggleSwitch, {
912
+ checked: options.segmentColumns.includes(column),
913
+ description: copy.segment[column],
914
+ label: table[column],
915
+ onChange: (shown) => toggleSegment(column, shown)
916
+ }, column)) : _mountaya_studio.EMBED_WAYPOINT_TABLE_COLUMNS.map((column) => column === "waypoint" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedToggleSwitch, {
917
+ checked: true,
918
+ description: copy.locked,
919
+ disabled: true,
920
+ label: table[column],
921
+ onChange: () => {}
922
+ }, column) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedToggleSwitch, {
923
+ checked: options.waypointColumns.includes(column),
924
+ description: copy.waypoint[column],
925
+ label: table[column],
926
+ onChange: (shown) => toggleWaypoint(column, shown)
927
+ }, column))
928
+ }),
929
+ element === "waypoint-table" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Divider, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
930
+ gap: "sm",
931
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
932
+ variant: "section-label",
933
+ children: copy.filter.heading
934
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedToggleSwitch, {
935
+ checked: options.serviceFilter,
936
+ description: copy.filter.description,
937
+ label: copy.filter.label,
938
+ onChange: (serviceFilter) => onChange({
939
+ ...options,
940
+ serviceFilter
941
+ })
942
+ })]
943
+ })] }) : null
944
+ ]
945
+ });
946
+ };
947
+ const SECTIONS$3 = ["embed"];
948
+ const elementGlyphs = {
949
+ map: "action-embed",
950
+ "segment-table": "routed",
951
+ "waypoint-table": "pin"
952
+ };
953
+ const LIST_WIDTH = 340;
954
+ const ElementMark = ({ element }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
955
+ className: "mtya-rail-switcher-mark",
956
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
957
+ name: elementGlyphs[element],
958
+ size: require_sizing.iconSizes.xs
959
+ })
960
+ });
961
+ const EmbedElementSwitcher = ({ onChange, value }) => {
962
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$3);
963
+ const options = _mountaya_studio.EMBED_ELEMENTS.map((element) => ({
964
+ description: words.embed.elements[element].description,
965
+ id: element,
966
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ElementMark, { element }),
967
+ name: words.embed.elements[element].name
968
+ }));
969
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
970
+ gap: "xxs",
971
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
972
+ px: "xxs",
973
+ variant: "section-label",
974
+ children: words.embed.elements.label
975
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RailSwitcher.RailSwitcher, {
976
+ ariaLabel: words.embed.elements.switcherLabel,
977
+ caption: words.embed.elements[value].caption,
978
+ listLabel: words.embed.elements.label,
979
+ listWidth: LIST_WIDTH,
980
+ mark: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ElementMark, { element: value }),
981
+ name: words.embed.elements[value].name,
982
+ onSelect: onChange,
983
+ options,
984
+ overflow: "wrap",
985
+ value
986
+ })]
987
+ });
988
+ };
989
+ const SECTIONS$2 = [
990
+ "actions",
991
+ "embed",
992
+ "privacy"
993
+ ];
994
+ const FAILURE_SECTIONS = ["failure"];
995
+ const CollectionSelect = ({ itineraryId, onChange, value }) => {
996
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$2);
997
+ const holding = (0, _mountaya_client_react.useCollections)({ itinerary_id: itineraryId }, { enabled: itineraryId !== "" });
998
+ require_useEveryPage.useEveryPage(holding);
999
+ const { data, isLoading } = holding;
1000
+ const options = (0, react.useMemo)(() => (data ?? []).map((collection) => ({
1001
+ label: collection.name,
1002
+ value: collection.id
1003
+ })), [data]);
1004
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Select, {
1005
+ clearable: true,
1006
+ data: options,
1007
+ description: words.embed.collection.pickerDescription,
1008
+ disabled: isLoading,
1009
+ label: words.embed.collection.pickerLabel,
1010
+ nothingFoundMessage: words.embed.collection.pickerEmpty,
1011
+ onChange,
1012
+ placeholder: words.embed.collection.pickerPlaceholder,
1013
+ searchable: true,
1014
+ value
1015
+ });
1016
+ };
1017
+ const EmbedVisibility = ({ isPrivate, itineraryId, organizationId }) => {
1018
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$2);
1019
+ const editable = require_useItineraryEditable.useItineraryEditable({
1020
+ createdById: void 0,
1021
+ organizationId
1022
+ });
1023
+ const { failure } = require_studioStrings.useStudioScopedStrings(FAILURE_SECTIONS);
1024
+ const notify = require_notify.useStudioNotify();
1025
+ const { dispatch } = require_useStudioDispatch.useStudioDispatch();
1026
+ const [pendingPrivate, setPendingPrivate] = (0, react.useState)(null);
1027
+ const visibilityCopy = pendingPrivate === true ? words.privacy.confirm.toPrivate : words.privacy.confirm.toPublic;
1028
+ const onConfirmVisibility = () => {
1029
+ if (pendingPrivate !== null) dispatch("studio.itinerary.update", {
1030
+ isPrivate: pendingPrivate,
1031
+ itineraryId
1032
+ }).then((result) => {
1033
+ const refusal = (0, _mountaya_studio_strings.failureAlertFor)(result, "", failure);
1034
+ if (refusal !== null) notify.error(refusal.message.trim());
1035
+ });
1036
+ setPendingPrivate(null);
1037
+ };
1038
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PrivacyControl.PrivacyControl, {
1039
+ caption: words.privacy.embedScope,
1040
+ disabled: !editable,
1041
+ onChange: setPendingPrivate,
1042
+ resource: "itinerary",
1043
+ value: isPrivate
1044
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ConfirmModal.ConfirmModal, {
1045
+ acknowledgeLabel: visibilityCopy.acknowledge,
1046
+ body: visibilityCopy.body,
1047
+ cancelLabel: words.actions.cancel,
1048
+ closeLabel: words.actions.close,
1049
+ confirmLabel: visibilityCopy.confirm,
1050
+ onCancel: () => setPendingPrivate(null),
1051
+ onConfirm: onConfirmVisibility,
1052
+ opened: pendingPrivate !== null,
1053
+ title: visibilityCopy.title,
1054
+ tone: "cautionary",
1055
+ zIndex: 250
1056
+ })] });
1057
+ };
1058
+ const EmbedGeneralSection = ({ collectionId, element, isPrivate, itineraries, itinerariesPending, itineraryId, onCollectionIdChange, onTableItineraryIdChange, organizationId, tableItineraryId }) => {
1059
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$2);
1060
+ const itineraryOptions = (0, react.useMemo)(() => itineraries.map((itinerary) => ({
1061
+ label: itinerary.name,
1062
+ value: itinerary.id
1063
+ })), [itineraries]);
1064
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Stack, {
1065
+ gap: "lg",
1066
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SectionHead.SectionHead, {
1067
+ description: itineraryId === void 0 ? words.embed.sectionHelp.generalCollection : words.embed.sectionHelp.general,
1068
+ title: words.embed.sections.general
1069
+ }), itineraryId === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Select, {
1070
+ allowDeselect: false,
1071
+ data: itineraryOptions,
1072
+ description: words.embed.itinerary.pickerDescription,
1073
+ disabled: itinerariesPending,
1074
+ label: words.embed.itinerary.pickerLabel,
1075
+ nothingFoundMessage: words.embed.itinerary.pickerEmpty,
1076
+ onChange: (next) => {
1077
+ if (next !== null) onTableItineraryIdChange(next);
1078
+ },
1079
+ placeholder: words.embed.itinerary.pickerPlaceholder,
1080
+ searchable: true,
1081
+ value: tableItineraryId
1082
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedVisibility, {
1083
+ isPrivate,
1084
+ itineraryId,
1085
+ organizationId
1086
+ }), (0, _mountaya_studio.isEmbedTableElement)(element) ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollectionSelect, {
1087
+ itineraryId,
1088
+ onChange: onCollectionIdChange,
1089
+ value: collectionId
1090
+ })] })]
1091
+ });
1092
+ };
1093
+ const SECTIONS$1 = ["embed", "publish"];
1094
+ const EmbedTablePreview = (0, react.lazy)(() => Promise.resolve().then(() => require("../chunk-DBpF1Eur.cjs")).then((module) => ({ default: module.EmbedTablePreview })));
1095
+ const PREVIEW_REST_MS = 300;
1096
+ const movedBesideColor = (previous, next) => {
1097
+ const { segmentsColor: _before, ...before } = previous;
1098
+ const { segmentsColor: _after, ...after } = next;
1099
+ const held = new Map(Object.entries(before));
1100
+ const entries = Object.entries(after);
1101
+ return entries.length !== held.size || entries.some(([key, value]) => !held.has(key) || !Object.is(held.get(key), value));
1102
+ };
1103
+ const usePreviewColor = (config) => {
1104
+ const [rested] = (0, _mantine_hooks.useDebouncedValue)(config.segmentsColor, PREVIEW_REST_MS);
1105
+ const [shown, setShown] = (0, react.useState)(() => ({
1106
+ color: config.segmentsColor,
1107
+ config,
1108
+ rested
1109
+ }));
1110
+ if (shown.config === config && shown.rested === rested) return shown.color;
1111
+ const color = shown.config !== config && movedBesideColor(shown.config, config) ? config.segmentsColor : shown.rested !== rested ? rested : shown.color;
1112
+ setShown({
1113
+ color,
1114
+ config,
1115
+ rested
1116
+ });
1117
+ return color;
1118
+ };
1119
+ const previewFrameStyle = {
1120
+ display: "flex",
1121
+ justifyContent: "center",
1122
+ overflow: "hidden"
1123
+ };
1124
+ const previewIframeStyle = {
1125
+ border: 0,
1126
+ borderRadius: _mountaya_studio.EMBED_IFRAME_RADIUS_PX,
1127
+ height: "100%",
1128
+ maxHeight: "100%",
1129
+ maxWidth: "100%",
1130
+ width: "100%"
1131
+ };
1132
+ const hiddenStyle = { display: "none" };
1133
+ const EmbedMapPreview = ({ collectionId, config, defaultView, defaults, dirty, itineraryId, name, onPreviewWindow, organizationId, publishableKey, unpublished }) => {
1134
+ const appOrigin = require_studio.useStudioAppOrigin();
1135
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$1);
1136
+ const viewHash = (0, react.useMemo)(() => (0, _mountaya_studio.buildEmbedViewHash)(defaultView), [defaultView]);
1137
+ const previewColor = usePreviewColor(config);
1138
+ const previewConfig = (0, react.useMemo)(() => ({
1139
+ ...config,
1140
+ segmentsColor: previewColor
1141
+ }), [config, previewColor]);
1142
+ const previewSearch = (0, react.useMemo)(() => {
1143
+ return [
1144
+ ...(0, _mountaya_studio.buildEmbedSearch)({
1145
+ collectionId: collectionId ?? void 0,
1146
+ config: previewConfig,
1147
+ defaults,
1148
+ itineraryId: itineraryId ?? void 0,
1149
+ publishableKey: publishableKey ?? ""
1150
+ }),
1151
+ ["preview", "true"],
1152
+ ["organization_id", organizationId]
1153
+ ];
1154
+ }, [
1155
+ collectionId,
1156
+ defaults,
1157
+ itineraryId,
1158
+ organizationId,
1159
+ previewConfig,
1160
+ publishableKey
1161
+ ]);
1162
+ const [preview, setPreview] = (0, react.useState)(() => ({
1163
+ appOrigin,
1164
+ search: previewSearch,
1165
+ src: (0, _mountaya_studio.buildEmbedSrc)(appOrigin, previewSearch, viewHash)
1166
+ }));
1167
+ let previewSrc = preview.src;
1168
+ if (preview.search !== previewSearch || preview.appOrigin !== appOrigin) {
1169
+ previewSrc = (0, _mountaya_studio.buildEmbedSrc)(appOrigin, previewSearch, viewHash);
1170
+ setPreview({
1171
+ appOrigin,
1172
+ search: previewSearch,
1173
+ src: previewSrc
1174
+ });
1175
+ }
1176
+ if (unpublished && itineraryId !== null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnpublishedPanel.UnpublishedPanel, {
1177
+ itineraryId,
1178
+ organizationId
1179
+ });
1180
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [dirty && itineraryId !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PublicationNotice.PublicationNotice, {
1181
+ itineraryId,
1182
+ organizationId,
1183
+ state: "dirty"
1184
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
1185
+ flex: 1,
1186
+ mih: 0,
1187
+ pt: dirty && itineraryId !== null ? "sm" : 0,
1188
+ style: previewFrameStyle,
1189
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("iframe", {
1190
+ ref: (el) => {
1191
+ onPreviewWindow(el?.contentWindow ?? null);
1192
+ },
1193
+ src: previewSrc,
1194
+ style: previewIframeStyle,
1195
+ title: words.embed.preview.title(name)
1196
+ })
1197
+ })] });
1198
+ };
1199
+ const EmbedTableStage = ({ element, itineraryId, language, length, options, organizationId, publication }) => {
1200
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS$1);
1201
+ if (publication === "loading") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Center, {
1202
+ flex: 1,
1203
+ p: "xl",
1204
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Loader, {})
1205
+ });
1206
+ if (itineraryId === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Center, {
1207
+ flex: 1,
1208
+ p: "xl",
1209
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_EmptyState.EmptyState, {
1210
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
1211
+ name: "itinerary",
1212
+ size: require_sizing.iconSizes.lg
1213
+ }),
1214
+ title: words.embed.itinerary.pickerEmpty
1215
+ })
1216
+ });
1217
+ if (publication === "unpublished") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnpublishedPanel.UnpublishedPanel, {
1218
+ itineraryId,
1219
+ organizationId
1220
+ });
1221
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
1222
+ className: "mtya-embed-table-stage",
1223
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Box, {
1224
+ className: "mtya-embed-table-frame",
1225
+ children: [publication === "dirty" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
1226
+ mb: "sm",
1227
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PublicationNotice.PublicationNotice, {
1228
+ itineraryId,
1229
+ organizationId,
1230
+ state: "dirty"
1231
+ })
1232
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
1233
+ fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Center, {
1234
+ flex: 1,
1235
+ p: "xl",
1236
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Loader, {})
1237
+ }),
1238
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedTablePreview, {
1239
+ element,
1240
+ itineraryId,
1241
+ language,
1242
+ length,
1243
+ options
1244
+ })
1245
+ })]
1246
+ })
1247
+ });
1248
+ };
1249
+ const EmbedStage = ({ element, tableItineraryId, tablePublication, tables, ...map }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
1250
+ className: "mtya-fullscreen-stage",
1251
+ flex: 1,
1252
+ p: "md",
1253
+ style: (0, _mountaya_studio.isEmbedTableElement)(element) ? hiddenStyle : void 0,
1254
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedMapPreview, { ...map })
1255
+ }), (0, _mountaya_studio.isEmbedTableElement)(element) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedTableStage, {
1256
+ element,
1257
+ itineraryId: tableItineraryId,
1258
+ language: map.config.preferredLanguage,
1259
+ length: map.config.preferredUnitLength,
1260
+ options: tables,
1261
+ organizationId: map.organizationId,
1262
+ publication: tablePublication
1263
+ }) : null] });
1264
+ const SECTIONS = [
1265
+ "actions",
1266
+ "controls",
1267
+ "embed",
1268
+ "preferences",
1269
+ "privacy",
1270
+ "publish"
1271
+ ];
1272
+ const sectionGlyphs = {
1273
+ appearance: "appearance",
1274
+ code: "action-copy",
1275
+ columns: "menu",
1276
+ controls: "controls",
1277
+ defaultView: "default-view",
1278
+ general: "info",
1279
+ layers: "layers",
1280
+ profile: "profile"
1281
+ };
1282
+ const inertEmbedOrganization = {
1283
+ found: true,
1284
+ pending: false
1285
+ };
1286
+ const inertEmbedKeys = { keys: [] };
1287
+ const EmbedWizardBody = ({ defaults, isPrivate, keys, itinerarySubject, name, organizationId, publication, requireSessionToken, safetyRules, target }) => {
1288
+ const itineraryId = target.kind === "itinerary" ? target.id : void 0;
1289
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS);
1290
+ const { dispatch } = require_useStudioDispatch.useStudioDispatch();
1291
+ const sectionsId = (0, _mantine_hooks.useId)();
1292
+ const clampedDefaults = (0, react.useMemo)(() => (0, _mountaya_studio.clampConfigToFieldDependencies)((0, _mountaya_studio.clampConfigToSafetyRules)(defaults, safetyRules)), [defaults, safetyRules]);
1293
+ const [config, setConfig] = (0, react.useState)(clampedDefaults);
1294
+ const [tables, setTables] = (0, react.useState)(_mountaya_studio.defaultEmbedTableOptions);
1295
+ const [element, setElement] = (0, react.useState)("map");
1296
+ const [chosenSection, setChosenSection] = (0, react.useState)(null);
1297
+ const [chosenKey, setChosenKey] = (0, react.useState)(null);
1298
+ const [collectionId, setCollectionId] = (0, react.useState)(null);
1299
+ const [chosenItineraryId, setChosenItineraryId] = (0, react.useState)(null);
1300
+ const [defaultView, setDefaultView] = (0, react.useState)(emptyDefaultView);
1301
+ const publishableKey = keys.keys.find((key) => key.key === chosenKey)?.key ?? keys.keys[0]?.key ?? null;
1302
+ const previewCamera = useEmbedPreviewCamera();
1303
+ const captureDefaultView = (0, react.useCallback)(async () => {
1304
+ const view = await previewCamera.requestCamera();
1305
+ if (view) setDefaultView({
1306
+ bearing: view.bearing ?? null,
1307
+ center: view.center ?? null,
1308
+ pitch: view.pitch ?? null,
1309
+ zoom: view.zoom ?? null
1310
+ });
1311
+ }, [previewCamera]);
1312
+ const layerOptions = useEmbedLayerOptions(config, safetyRules, organizationId);
1313
+ const patchConfig = (0, react.useCallback)((patch) => setConfig((current) => (0, _mountaya_studio.clampConfigToFieldDependencies)((0, _mountaya_studio.clampConfigToSafetyRules)({
1314
+ ...current,
1315
+ ...patch
1316
+ }, safetyRules))), [safetyRules]);
1317
+ const onClose = () => {
1318
+ dispatch("studio.embed.close", {});
1319
+ };
1320
+ const collection = useEmbedCollectionItineraries(itineraryId === void 0 ? target.id : void 0);
1321
+ const tableItineraryId = itineraryId ?? (collection.itineraries.find((itinerary) => itinerary.id === chosenItineraryId) ?? collection.itineraries[0])?.id ?? null;
1322
+ const table = (0, _mountaya_studio.isEmbedTableElement)(element);
1323
+ const chosenDraft = require_useStudioItinerary.useStudioItinerary(itineraryId === void 0 && table ? tableItineraryId ?? void 0 : void 0);
1324
+ const listingPending = itineraryId === void 0 && table && collection.pending;
1325
+ const tablePublication = itineraryId !== void 0 ? publication : listingPending ? "loading" : tableItineraryId === null ? "published" : (0, _mountaya_studio_strings.publicationStateOf)(chosenDraft.data, chosenDraft.isError);
1326
+ const sections = (0, react.useMemo)(() => (0, _mountaya_studio.embedElementSections)(element, itineraryId !== void 0 || table), [
1327
+ element,
1328
+ itineraryId,
1329
+ table
1330
+ ]);
1331
+ const section = sections.find((candidate) => candidate === chosenSection) ?? sections[0] ?? "code";
1332
+ const code = useEmbedCode({
1333
+ collectionId: target.kind === "collection" ? target.id : collectionId,
1334
+ config,
1335
+ defaultView,
1336
+ defaults: clampedDefaults,
1337
+ element,
1338
+ itineraryId: itineraryId ?? null,
1339
+ name,
1340
+ publishableKey,
1341
+ requireSessionToken,
1342
+ tableItineraryId,
1343
+ tables
1344
+ });
1345
+ const unpublished = (table ? tablePublication : publication) === "unpublished";
1346
+ const copyable = unpublished ? null : code;
1347
+ const domains = safetyRules?.domains;
1348
+ const localOnly = domains !== void 0 && domains.length > 0 && domains.every((entry) => (0, _mountaya_studio.isLoopbackDomain)(entry));
1349
+ const noSite = domains !== void 0 && (domains.length === 0 || localOnly);
1350
+ const noSiteWords = localOnly ? table ? {
1351
+ status: words.embed.status.tableNoLiveSite,
1352
+ title: words.embed.domains.tableLocalOnly.title
1353
+ } : {
1354
+ status: words.embed.status.noLiveSite,
1355
+ title: words.embed.domains.embedLocalOnly.title
1356
+ } : table ? {
1357
+ status: words.embed.status.tableNoSite,
1358
+ title: words.embed.domains.tableNone.title
1359
+ } : {
1360
+ status: words.embed.status.noSite,
1361
+ title: words.embed.domains.embedNone.title
1362
+ };
1363
+ const withheld = unpublished ? words.embed.status.unpublished : publishableKey === null ? words.embed.gated.noKey.description : copyable === null ? listingPending ? words.publish.loading : words.embed.itinerary.pickerEmpty : null;
1364
+ const standing = withheld ?? (noSite ? noSiteWords.status : table ? words.embed.status.table : words.embed.status.map);
1365
+ const changesIn = (id) => {
1366
+ switch (id) {
1367
+ case "appearance":
1368
+ case "controls":
1369
+ case "layers":
1370
+ case "profile": return (0, _mountaya_studio.embedSectionChanges)(element, id, config, clampedDefaults);
1371
+ case "columns": return table ? (0, _mountaya_studio.embedTableChanges)(element, tables) : 0;
1372
+ case "defaultView": return defaultView.center === null && defaultView.zoom === null ? 0 : 1;
1373
+ default: return 0;
1374
+ }
1375
+ };
1376
+ const entries = sections.map((id) => {
1377
+ const changes = changesIn(id);
1378
+ const attention = id === "code" && !listingPending ? withheld ?? (noSite ? noSiteWords.title : null) : null;
1379
+ return {
1380
+ glyph: sectionGlyphs[id],
1381
+ id,
1382
+ label: words.embed.sections[id],
1383
+ status: attention !== null ? {
1384
+ description: attention,
1385
+ kind: "attention"
1386
+ } : changes > 0 ? {
1387
+ count: changes,
1388
+ description: words.embed.sectionChanges(changes),
1389
+ kind: "count"
1390
+ } : void 0
1391
+ };
1392
+ });
1393
+ const panelOf = (id) => {
1394
+ switch (id) {
1395
+ case "general": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedGeneralSection, {
1396
+ collectionId,
1397
+ element,
1398
+ isPrivate,
1399
+ itineraries: collection.itineraries,
1400
+ itinerariesPending: collection.pending,
1401
+ itineraryId,
1402
+ onCollectionIdChange: setCollectionId,
1403
+ onTableItineraryIdChange: setChosenItineraryId,
1404
+ organizationId,
1405
+ tableItineraryId
1406
+ });
1407
+ case "defaultView": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedDefaultViewSection, {
1408
+ defaultView,
1409
+ onCaptureCamera: captureDefaultView,
1410
+ onDefaultViewReset: () => setDefaultView(emptyDefaultView)
1411
+ });
1412
+ case "columns": return table ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedColumnsSection, {
1413
+ element,
1414
+ onChange: setTables,
1415
+ options: tables
1416
+ }) : null;
1417
+ case "code": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedCodeSection, {
1418
+ code: copyable,
1419
+ domains,
1420
+ element,
1421
+ keys,
1422
+ onPublishableKeyChange: setChosenKey,
1423
+ publishableKey,
1424
+ requireSessionToken,
1425
+ withheld
1426
+ });
1427
+ default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedConfigForm, {
1428
+ config,
1429
+ defaults: clampedDefaults,
1430
+ element,
1431
+ layerOptions,
1432
+ onPatch: patchConfig,
1433
+ safetyRules,
1434
+ section: id
1435
+ });
1436
+ }
1437
+ };
1438
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WizardLayout.WizardLayout, {
1439
+ footer: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
1440
+ className: "mtya-fullscreen-footer",
1441
+ px: "md",
1442
+ py: "sm",
1443
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, {
1444
+ gap: "sm",
1445
+ justify: "space-between",
1446
+ wrap: "nowrap",
1447
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mantine_core.Group, {
1448
+ flex: 1,
1449
+ gap: "xs",
1450
+ miw: 0,
1451
+ wrap: "nowrap",
1452
+ children: [withheld === null && noSite ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Box, {
1453
+ c: "orange",
1454
+ className: "mtya-embed-status-mark",
1455
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
1456
+ name: "warning",
1457
+ size: require_sizing.iconSizes.sm
1458
+ })
1459
+ }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Text, {
1460
+ "aria-live": "polite",
1461
+ c: "dimmed",
1462
+ flex: 1,
1463
+ lineClamp: 3,
1464
+ miw: 0,
1465
+ size: "xs",
1466
+ children: standing
1467
+ })]
1468
+ }), copyable === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Tooltip, {
1469
+ label: withheld,
1470
+ position: "top",
1471
+ withinPortal: true,
1472
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Button, {
1473
+ disabled: true,
1474
+ leftSection: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
1475
+ name: "action-copy",
1476
+ size: require_sizing.iconSizes.sm
1477
+ }),
1478
+ children: words.embed.code.copy
1479
+ }) })
1480
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.CopyButton, {
1481
+ value: copyable.code,
1482
+ children: ({ copied, copy }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Button, {
1483
+ color: copied ? "teal" : void 0,
1484
+ leftSection: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
1485
+ name: "check",
1486
+ size: require_sizing.iconSizes.sm
1487
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sizing.Glyph, {
1488
+ name: "action-copy",
1489
+ size: require_sizing.iconSizes.sm
1490
+ }),
1491
+ onClick: copy,
1492
+ children: copied ? words.embed.code.copied : words.embed.code.copy
1493
+ })
1494
+ })]
1495
+ })
1496
+ }),
1497
+ header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FullscreenModal.FullscreenHeader, {
1498
+ closeLabel: words.actions.close,
1499
+ onClose,
1500
+ subject: itinerarySubject ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DialogSubject.DialogSubject, { ...itinerarySubject }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DialogSubject.DialogSubject, { name }),
1501
+ title: words.embed.title
1502
+ }),
1503
+ id: sectionsId,
1504
+ onChange: setChosenSection,
1505
+ panel: sections.map((id) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Tabs.Panel, {
1506
+ value: id,
1507
+ children: panelOf(id)
1508
+ }, id)),
1509
+ rail: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedElementSwitcher, {
1510
+ onChange: setElement,
1511
+ value: element
1512
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SectionTabs.SectionNav, {
1513
+ ariaLabel: words.embed.sectionsLabel,
1514
+ entries,
1515
+ id: sectionsId,
1516
+ value: section
1517
+ })] }),
1518
+ sectionLayout: section === "code" ? "page" : "split",
1519
+ sections,
1520
+ stageAriaLabel: words.embed.stageLabel,
1521
+ value: section,
1522
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedStage, {
1523
+ collectionId: target.kind === "collection" ? target.id : collectionId,
1524
+ config,
1525
+ defaults: clampedDefaults,
1526
+ defaultView,
1527
+ dirty: publication === "dirty",
1528
+ element,
1529
+ itineraryId: itineraryId ?? null,
1530
+ name,
1531
+ onPreviewWindow: previewCamera.registerPreviewWindow,
1532
+ organizationId,
1533
+ publishableKey,
1534
+ tableItineraryId,
1535
+ tablePublication,
1536
+ tables,
1537
+ unpublished: publication === "unpublished"
1538
+ })
1539
+ });
1540
+ };
1541
+ const EmbedWizardStatus = ({ children }) => {
1542
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS);
1543
+ const { dispatch } = require_useStudioDispatch.useStudioDispatch();
1544
+ const onClose = () => {
1545
+ dispatch("studio.embed.close", {});
1546
+ };
1547
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FullscreenModal.FullscreenHeader, {
1548
+ closeLabel: words.actions.close,
1549
+ onClose,
1550
+ title: words.embed.title
1551
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Center, {
1552
+ flex: 1,
1553
+ p: "xl",
1554
+ children
1555
+ })] });
1556
+ };
1557
+ const EmbedWizardLoader = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardStatus, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Loader, {}) });
1558
+ const EmbedWizardRefusal = ({ target }) => {
1559
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS);
1560
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardStatus, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Alert, {
1561
+ color: "gray",
1562
+ maw: 420,
1563
+ children: target.kind === "collection" ? words.embed.notEmbeddableCollection : words.embed.notEmbeddable
1564
+ }) });
1565
+ };
1566
+ const EmbedWizardNotOffered = () => {
1567
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS);
1568
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardStatus, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Alert, {
1569
+ color: "gray",
1570
+ maw: 420,
1571
+ children: words.embed.notOffered
1572
+ }) });
1573
+ };
1574
+ const EmbedWizardLoadFailure = () => {
1575
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS);
1576
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardStatus, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Alert, {
1577
+ color: "red",
1578
+ maw: 420,
1579
+ children: words.embed.targetLoadFailed
1580
+ }) });
1581
+ };
1582
+ const EmbedWizardOwner = ({ isPrivate, itinerarySubject, name, organizationId, publication, target, useKeys, useOrganization }) => {
1583
+ const org = useOrganization?.(organizationId) ?? inertEmbedOrganization;
1584
+ const embedKeys = useKeys?.(organizationId) ?? inertEmbedKeys;
1585
+ const defaults = (0, react.useMemo)(() => (0, _mountaya_studio.resolveOrgEmbedDefaults)(org.defaults), [org.defaults]);
1586
+ if (org.pending) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardLoader, {});
1587
+ if (!org.found) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardRefusal, { target });
1588
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardBody, {
1589
+ defaults,
1590
+ isPrivate,
1591
+ itinerarySubject,
1592
+ keys: embedKeys,
1593
+ name,
1594
+ organizationId,
1595
+ publication,
1596
+ requireSessionToken: Boolean(org.safetyRules?.require_session_token),
1597
+ safetyRules: org.safetyRules,
1598
+ target
1599
+ });
1600
+ };
1601
+ const EmbedWizard = ({ strings, target, useKeys, useOrganization }) => {
1602
+ const words = require_studioStrings.useStudioScopedStrings(SECTIONS, strings);
1603
+ const { dispatch } = require_useStudioDispatch.useStudioDispatch();
1604
+ const embeddedStudio = require_AllowlistField.useEmbeddedStudio();
1605
+ const itineraryId = !embeddedStudio && target.kind === "itinerary" ? target.id : void 0;
1606
+ const collectionId = !embeddedStudio && target.kind === "collection" ? target.id : void 0;
1607
+ const { data: itinerary, isError: itineraryFailed, isLoading: itineraryLoading } = require_useStudioItinerary.useStudioItinerary(itineraryId);
1608
+ const { data: collection, isError: collectionFailed, isLoading: collectionLoading } = (0, _mountaya_client_react.useCollection)(collectionId);
1609
+ const itinerarySubject = require_useItinerarySubject.useItinerarySubjectById(itineraryId);
1610
+ const resolved = collection ? {
1611
+ isPrivate: collection.is_private,
1612
+ name: collection.name,
1613
+ organizationId: collection.organization_id,
1614
+ publication: "published"
1615
+ } : itinerary ? {
1616
+ isPrivate: itinerary.is_private,
1617
+ name: itinerary.name,
1618
+ organizationId: itinerary.organization_id,
1619
+ publication: (0, _mountaya_studio_strings.publicationStateOf)(itinerary)
1620
+ } : null;
1621
+ const ownerId = require_UnpublishedPanel.usePublishableScope(resolved?.organizationId) && resolved?.organizationId ? resolved.organizationId : null;
1622
+ const loading = itineraryLoading || collectionLoading;
1623
+ const loadFailed = resolved === null && (itineraryFailed || collectionFailed);
1624
+ const onClose = () => {
1625
+ dispatch("studio.embed.close", {});
1626
+ };
1627
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_studioStrings.StudioStringsScope, {
1628
+ sections: SECTIONS,
1629
+ strings,
1630
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FullscreenModal.FullscreenModal, {
1631
+ ariaLabel: words.embed.title,
1632
+ onClose,
1633
+ children: embeddedStudio ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardNotOffered, {}) : loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardLoader, {}) : loadFailed ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardLoadFailure, {}) : !resolved || ownerId === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardRefusal, { target }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbedWizardOwner, {
1634
+ isPrivate: resolved.isPrivate,
1635
+ itinerarySubject,
1636
+ name: resolved.name,
1637
+ organizationId: ownerId,
1638
+ publication: resolved.publication,
1639
+ target,
1640
+ useKeys,
1641
+ useOrganization
1642
+ }, `${target.kind}:${target.id}:${ownerId}`)
1643
+ })
1644
+ });
1645
+ };
1646
+ exports.EmbedBaseMapPicker = EmbedBaseMapPicker;
1647
+ exports.EmbedFieldControl = EmbedFieldControl;
1648
+ exports.EmbedThemePicker = EmbedThemePicker;
1649
+ exports.EmbedTintPicker = EmbedTintPicker;
1650
+ exports.EmbedToggleSwitch = EmbedToggleSwitch;
1651
+ exports.EmbedWizard = EmbedWizard;
1652
+
1653
+ //# sourceMappingURL=index.cjs.map