@mountaya/studio-react 0.1.0 → 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 (1057) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +3 -3
  3. package/THIRD-PARTY-NOTICES.txt +2 -2
  4. package/dist/chunk--VSQcEs_.cjs +26 -0
  5. package/dist/chunk--VSQcEs_.cjs.map +1 -0
  6. package/dist/chunk-0qoALFfx.cjs +454 -0
  7. package/dist/chunk-0qoALFfx.cjs.map +1 -0
  8. package/dist/chunk-0sHgX8We.cjs +97 -0
  9. package/dist/chunk-0sHgX8We.cjs.map +1 -0
  10. package/dist/chunk-4D4as_tP.js +16 -0
  11. package/dist/chunk-4D4as_tP.js.map +1 -0
  12. package/dist/chunk-6LM6wuIg.cjs +13 -0
  13. package/dist/chunk-6LM6wuIg.cjs.map +1 -0
  14. package/dist/chunk-6VpwF-77.js +7 -0
  15. package/dist/chunk-6VpwF-77.js.map +1 -0
  16. package/dist/chunk-6v2fJIDh.cjs +28 -0
  17. package/dist/chunk-6v2fJIDh.cjs.map +1 -0
  18. package/dist/chunk-Af0f-OjN.js +71 -0
  19. package/dist/chunk-Af0f-OjN.js.map +1 -0
  20. package/dist/chunk-B-QQkaWk.js +91 -0
  21. package/dist/chunk-B-QQkaWk.js.map +1 -0
  22. package/dist/chunk-B1lX5w6I.cjs +181 -0
  23. package/dist/chunk-B1lX5w6I.cjs.map +1 -0
  24. package/dist/chunk-B2gsz9OJ.js +19 -0
  25. package/dist/chunk-B2gsz9OJ.js.map +1 -0
  26. package/dist/chunk-B38srE2R.d.cts +3976 -0
  27. package/dist/chunk-B3HdxIq7.js +69 -0
  28. package/dist/chunk-B3HdxIq7.js.map +1 -0
  29. package/dist/chunk-B3UCX3Wd.js +30 -0
  30. package/dist/chunk-B3UCX3Wd.js.map +1 -0
  31. package/dist/chunk-B3mMYMtz.cjs +88 -0
  32. package/dist/chunk-B3mMYMtz.cjs.map +1 -0
  33. package/dist/chunk-B7D0neNQ.cjs +47 -0
  34. package/dist/chunk-B7D0neNQ.cjs.map +1 -0
  35. package/dist/chunk-B7UzNwmm.cjs +115 -0
  36. package/dist/chunk-B7UzNwmm.cjs.map +1 -0
  37. package/dist/chunk-B7d3NIaH.js +55 -0
  38. package/dist/chunk-B7d3NIaH.js.map +1 -0
  39. package/dist/chunk-B8ONCPFQ.cjs +70 -0
  40. package/dist/chunk-B8ONCPFQ.cjs.map +1 -0
  41. package/dist/chunk-B8QgG-RT.js +2232 -0
  42. package/dist/chunk-B8QgG-RT.js.map +1 -0
  43. package/dist/chunk-B8ZpXH0_.cjs +64 -0
  44. package/dist/chunk-B8ZpXH0_.cjs.map +1 -0
  45. package/dist/chunk-B8mS5bGc.cjs +112 -0
  46. package/dist/chunk-B8mS5bGc.cjs.map +1 -0
  47. package/dist/chunk-B9EkHHSU.js +40 -0
  48. package/dist/chunk-B9EkHHSU.js.map +1 -0
  49. package/dist/chunk-BA0PWNyn.js +234 -0
  50. package/dist/chunk-BA0PWNyn.js.map +1 -0
  51. package/dist/chunk-BAWE1gqe.js +60 -0
  52. package/dist/chunk-BAWE1gqe.js.map +1 -0
  53. package/dist/chunk-BAe9m2Yp.d.cts +963 -0
  54. package/dist/chunk-BDJCk6ml.js +19 -0
  55. package/dist/chunk-BDJCk6ml.js.map +1 -0
  56. package/dist/chunk-BFI2CR6j.cjs +381 -0
  57. package/dist/chunk-BFI2CR6j.cjs.map +1 -0
  58. package/dist/chunk-BIIJXiiS.js +40 -0
  59. package/dist/chunk-BIIJXiiS.js.map +1 -0
  60. package/dist/chunk-BJAn10wR.js +54 -0
  61. package/dist/chunk-BJAn10wR.js.map +1 -0
  62. package/dist/chunk-BLxPxx5p.js +1641 -0
  63. package/dist/chunk-BLxPxx5p.js.map +1 -0
  64. package/dist/chunk-BNSJoNwO.cjs +377 -0
  65. package/dist/chunk-BNSJoNwO.cjs.map +1 -0
  66. package/dist/chunk-BNTshA5u.js +304 -0
  67. package/dist/chunk-BNTshA5u.js.map +1 -0
  68. package/dist/chunk-BO_yHMn2.js +7 -0
  69. package/dist/chunk-BO_yHMn2.js.map +1 -0
  70. package/dist/chunk-BOpIVklq.cjs +23 -0
  71. package/dist/chunk-BOpIVklq.cjs.map +1 -0
  72. package/dist/chunk-BP8bHGiE.cjs +12 -0
  73. package/dist/chunk-BP8bHGiE.cjs.map +1 -0
  74. package/dist/chunk-BPsgx3c7.js +56 -0
  75. package/dist/chunk-BPsgx3c7.js.map +1 -0
  76. package/dist/chunk-BQkKY_kf.js +44 -0
  77. package/dist/chunk-BQkKY_kf.js.map +1 -0
  78. package/dist/chunk-BQoAEKyJ.js +193 -0
  79. package/dist/chunk-BQoAEKyJ.js.map +1 -0
  80. package/dist/chunk-BRuLc45I.cjs +21 -0
  81. package/dist/chunk-BRuLc45I.cjs.map +1 -0
  82. package/dist/chunk-BSnrqsA8.cjs +56 -0
  83. package/dist/chunk-BSnrqsA8.cjs.map +1 -0
  84. package/dist/chunk-BTDBomKm.cjs +80 -0
  85. package/dist/chunk-BTDBomKm.cjs.map +1 -0
  86. package/dist/chunk-BVogYy0R.js +375 -0
  87. package/dist/chunk-BVogYy0R.js.map +1 -0
  88. package/dist/chunk-BWITLmlf.js +6 -0
  89. package/dist/chunk-BWITLmlf.js.map +1 -0
  90. package/dist/chunk-BXUrvYqd.d.cts +112 -0
  91. package/dist/chunk-BXUrvYqd.d.ts +112 -0
  92. package/dist/chunk-BYzQfFFV.js +54 -0
  93. package/dist/chunk-BYzQfFFV.js.map +1 -0
  94. package/dist/chunk-BZCKMlN8.js +35 -0
  95. package/dist/chunk-BZCKMlN8.js.map +1 -0
  96. package/dist/chunk-BalPERFX.js +13 -0
  97. package/dist/chunk-BalPERFX.js.map +1 -0
  98. package/dist/chunk-Bb5SAw6T.cjs +72 -0
  99. package/dist/chunk-Bb5SAw6T.cjs.map +1 -0
  100. package/dist/chunk-BbQyoetL.cjs +269 -0
  101. package/dist/chunk-BbQyoetL.cjs.map +1 -0
  102. package/dist/chunk-BdepwGey.js +600 -0
  103. package/dist/chunk-BdepwGey.js.map +1 -0
  104. package/dist/chunk-BeB57TnZ.js +29 -0
  105. package/dist/chunk-BeB57TnZ.js.map +1 -0
  106. package/dist/chunk-BecxET4U.cjs +26 -0
  107. package/dist/chunk-BecxET4U.cjs.map +1 -0
  108. package/dist/chunk-Bfuu_B7M.js +16 -0
  109. package/dist/chunk-Bfuu_B7M.js.map +1 -0
  110. package/dist/chunk-Bh4xSiDO.js +93 -0
  111. package/dist/chunk-Bh4xSiDO.js.map +1 -0
  112. package/dist/chunk-BhLItb06.js +10 -0
  113. package/dist/chunk-BhLItb06.js.map +1 -0
  114. package/dist/chunk-BhelUZ4P.js +30 -0
  115. package/dist/chunk-BhelUZ4P.js.map +1 -0
  116. package/dist/chunk-BiMRpOwB.cjs +342 -0
  117. package/dist/chunk-BiMRpOwB.cjs.map +1 -0
  118. package/dist/chunk-Bj3ium6N.cjs +22 -0
  119. package/dist/chunk-Bj3ium6N.cjs.map +1 -0
  120. package/dist/chunk-BjQzK3c3.cjs +59 -0
  121. package/dist/chunk-BjQzK3c3.cjs.map +1 -0
  122. package/dist/chunk-BkvNTXo7.cjs +15 -0
  123. package/dist/chunk-BkvNTXo7.cjs.map +1 -0
  124. package/dist/chunk-BmJDHIlZ.cjs +50 -0
  125. package/dist/chunk-BmJDHIlZ.cjs.map +1 -0
  126. package/dist/chunk-BmztanwN.cjs +13 -0
  127. package/dist/chunk-BmztanwN.cjs.map +1 -0
  128. package/dist/chunk-Bnci-ej8.cjs +262 -0
  129. package/dist/chunk-Bnci-ej8.cjs.map +1 -0
  130. package/dist/chunk-BoOw05B0.js +24 -0
  131. package/dist/chunk-BoOw05B0.js.map +1 -0
  132. package/dist/chunk-BqPxk-8w.cjs +95 -0
  133. package/dist/chunk-BqPxk-8w.cjs.map +1 -0
  134. package/dist/chunk-Br_1h4WD.cjs +15 -0
  135. package/dist/chunk-Br_1h4WD.cjs.map +1 -0
  136. package/dist/chunk-BtmcBZXU.js +13 -0
  137. package/dist/chunk-BtmcBZXU.js.map +1 -0
  138. package/dist/chunk-BvaNI_86.js +11 -0
  139. package/dist/chunk-BvaNI_86.js.map +1 -0
  140. package/dist/chunk-BvoYNlF5.js +145 -0
  141. package/dist/chunk-BvoYNlF5.js.map +1 -0
  142. package/dist/chunk-BwnCGe7J.js +268 -0
  143. package/dist/chunk-BwnCGe7J.js.map +1 -0
  144. package/dist/chunk-BxpaOkyq.cjs +310 -0
  145. package/dist/chunk-BxpaOkyq.cjs.map +1 -0
  146. package/dist/chunk-BybRyFen.cjs +65 -0
  147. package/dist/chunk-BybRyFen.cjs.map +1 -0
  148. package/dist/chunk-C-9wXKm5.cjs +83 -0
  149. package/dist/chunk-C-9wXKm5.cjs.map +1 -0
  150. package/dist/chunk-C-hV-Usi.js +7 -0
  151. package/dist/chunk-C-hV-Usi.js.map +1 -0
  152. package/dist/chunk-C06UWdDq.js +100 -0
  153. package/dist/chunk-C06UWdDq.js.map +1 -0
  154. package/dist/chunk-C1NzDn7y.cjs +35 -0
  155. package/dist/chunk-C1NzDn7y.cjs.map +1 -0
  156. package/dist/chunk-C2zEVNM1.js +20 -0
  157. package/dist/chunk-C2zEVNM1.js.map +1 -0
  158. package/dist/chunk-C3ftwoOp.js +6 -0
  159. package/dist/chunk-C3ftwoOp.js.map +1 -0
  160. package/dist/chunk-C5ZETobm.js +17 -0
  161. package/dist/chunk-C5ZETobm.js.map +1 -0
  162. package/dist/chunk-C5oCIViv.js +98 -0
  163. package/dist/chunk-C5oCIViv.js.map +1 -0
  164. package/dist/chunk-C60kC4oZ.cjs +114 -0
  165. package/dist/chunk-C60kC4oZ.cjs.map +1 -0
  166. package/dist/chunk-C6Mr3Z8L.js +59 -0
  167. package/dist/chunk-C6Mr3Z8L.js.map +1 -0
  168. package/dist/chunk-C6cBmVch.js +119 -0
  169. package/dist/chunk-C6cBmVch.js.map +1 -0
  170. package/dist/chunk-C6vKd7KP.cjs +519 -0
  171. package/dist/chunk-C6vKd7KP.cjs.map +1 -0
  172. package/dist/chunk-C7NizUxN.js +21 -0
  173. package/dist/chunk-C7NizUxN.js.map +1 -0
  174. package/dist/chunk-C93yeTAD.js +91 -0
  175. package/dist/chunk-C93yeTAD.js.map +1 -0
  176. package/dist/chunk-CByZU6Hx.cjs +90 -0
  177. package/dist/chunk-CByZU6Hx.cjs.map +1 -0
  178. package/dist/chunk-CCNIPIJB.cjs +25 -0
  179. package/dist/chunk-CCNIPIJB.cjs.map +1 -0
  180. package/dist/chunk-CEDKBew2.js +15 -0
  181. package/dist/chunk-CEDKBew2.js.map +1 -0
  182. package/dist/chunk-CI2PEZIK.js +147 -0
  183. package/dist/chunk-CI2PEZIK.js.map +1 -0
  184. package/dist/chunk-CIjPAYuo.cjs +268 -0
  185. package/dist/chunk-CIjPAYuo.cjs.map +1 -0
  186. package/dist/chunk-CJyqD6Ib.js +518 -0
  187. package/dist/chunk-CJyqD6Ib.js.map +1 -0
  188. package/dist/chunk-CNFF8fiL.js +38 -0
  189. package/dist/chunk-CNFF8fiL.js.map +1 -0
  190. package/dist/chunk-CNFoFzhK.cjs +50 -0
  191. package/dist/chunk-CNFoFzhK.cjs.map +1 -0
  192. package/dist/chunk-CQAuAPOE.cjs +63 -0
  193. package/dist/chunk-CQAuAPOE.cjs.map +1 -0
  194. package/dist/chunk-CR46E73M.js +50 -0
  195. package/dist/chunk-CR46E73M.js.map +1 -0
  196. package/dist/chunk-CSq4CbT1.js +86 -0
  197. package/dist/chunk-CSq4CbT1.js.map +1 -0
  198. package/dist/chunk-CT6i9_8G.cjs +31 -0
  199. package/dist/chunk-CT6i9_8G.cjs.map +1 -0
  200. package/dist/chunk-CUKEOil1.cjs +108 -0
  201. package/dist/chunk-CUKEOil1.cjs.map +1 -0
  202. package/dist/chunk-CWxPV2vI.js +111 -0
  203. package/dist/chunk-CWxPV2vI.js.map +1 -0
  204. package/dist/chunk-CXap-mFu.js +50 -0
  205. package/dist/chunk-CXap-mFu.js.map +1 -0
  206. package/dist/chunk-CYx1vTOG.d.ts +69 -0
  207. package/dist/chunk-CZOXtOQp.js +261 -0
  208. package/dist/chunk-CZOXtOQp.js.map +1 -0
  209. package/dist/chunk-CZSBVyE9.js +68 -0
  210. package/dist/chunk-CZSBVyE9.js.map +1 -0
  211. package/dist/chunk-C_NZdnA3.cjs +57 -0
  212. package/dist/chunk-C_NZdnA3.cjs.map +1 -0
  213. package/dist/chunk-C_k4SxhD.js +245 -0
  214. package/dist/chunk-C_k4SxhD.js.map +1 -0
  215. package/dist/chunk-CaTeIppS.cjs +115 -0
  216. package/dist/chunk-CaTeIppS.cjs.map +1 -0
  217. package/dist/chunk-CaUCI-WV.cjs +69 -0
  218. package/dist/chunk-CaUCI-WV.cjs.map +1 -0
  219. package/dist/chunk-CblkEI9o.js +19 -0
  220. package/dist/chunk-CblkEI9o.js.map +1 -0
  221. package/dist/chunk-CcXeCiEQ.js +70 -0
  222. package/dist/chunk-CcXeCiEQ.js.map +1 -0
  223. package/dist/chunk-Ce4D2B8W.cjs +49 -0
  224. package/dist/chunk-Ce4D2B8W.cjs.map +1 -0
  225. package/dist/chunk-CetxbYL1.js +66 -0
  226. package/dist/chunk-CetxbYL1.js.map +1 -0
  227. package/dist/chunk-ClfU9elo.js +68 -0
  228. package/dist/chunk-ClfU9elo.js.map +1 -0
  229. package/dist/chunk-CmNHE_Un.cjs +4 -0
  230. package/dist/chunk-Cmb_XLfd.js +82 -0
  231. package/dist/chunk-Cmb_XLfd.js.map +1 -0
  232. package/dist/chunk-Cp26IdF1.js +72 -0
  233. package/dist/chunk-Cp26IdF1.js.map +1 -0
  234. package/dist/chunk-CsBkSCbR.cjs +92 -0
  235. package/dist/chunk-CsBkSCbR.cjs.map +1 -0
  236. package/dist/chunk-CsnIpELM.js +31 -0
  237. package/dist/chunk-CsnIpELM.js.map +1 -0
  238. package/dist/chunk-CsnJv55G.cjs +36 -0
  239. package/dist/chunk-CsnJv55G.cjs.map +1 -0
  240. package/dist/chunk-CsxHDVHF.cjs +68 -0
  241. package/dist/chunk-CsxHDVHF.cjs.map +1 -0
  242. package/dist/chunk-Cv1FyWmK.js +670 -0
  243. package/dist/chunk-Cv1FyWmK.js.map +1 -0
  244. package/dist/chunk-CwXRQ-3X.cjs +2238 -0
  245. package/dist/chunk-CwXRQ-3X.cjs.map +1 -0
  246. package/dist/chunk-CxC9GaSV.js +6 -0
  247. package/dist/chunk-CxC9GaSV.js.map +1 -0
  248. package/dist/chunk-CyDQK1JF.js +22 -0
  249. package/dist/chunk-CyDQK1JF.js.map +1 -0
  250. package/dist/chunk-CyFo-C-X.js +341 -0
  251. package/dist/chunk-CyFo-C-X.js.map +1 -0
  252. package/dist/chunk-CzGWcm8C.cjs +109 -0
  253. package/dist/chunk-CzGWcm8C.cjs.map +1 -0
  254. package/dist/chunk-D0Cmheqq.cjs +25 -0
  255. package/dist/chunk-D0Cmheqq.cjs.map +1 -0
  256. package/dist/chunk-D0VevtWq.cjs +13 -0
  257. package/dist/chunk-D0VevtWq.cjs.map +1 -0
  258. package/dist/chunk-D1HIZ09h.d.cts +22 -0
  259. package/dist/chunk-D1HIZ09h.d.ts +22 -0
  260. package/dist/chunk-D1PwxEEq.cjs +281 -0
  261. package/dist/chunk-D1PwxEEq.cjs.map +1 -0
  262. package/dist/chunk-D2BipKyx.d.cts +69 -0
  263. package/dist/chunk-D4g36nrI.d.ts +963 -0
  264. package/dist/chunk-D5vZKs5k.js +85 -0
  265. package/dist/chunk-D5vZKs5k.js.map +1 -0
  266. package/dist/chunk-D7XBi__G.js +17 -0
  267. package/dist/chunk-D7XBi__G.js.map +1 -0
  268. package/dist/chunk-D8TsKfym.cjs +35 -0
  269. package/dist/chunk-D8TsKfym.cjs.map +1 -0
  270. package/dist/chunk-D8r50zRF.cjs +4 -0
  271. package/dist/chunk-DAAlHzRS.js +2 -0
  272. package/dist/chunk-DBY6OSNP.js +13 -0
  273. package/dist/chunk-DBY6OSNP.js.map +1 -0
  274. package/dist/chunk-DBfZJAh3.js +146 -0
  275. package/dist/chunk-DBfZJAh3.js.map +1 -0
  276. package/dist/chunk-DBpF1Eur.cjs +69 -0
  277. package/dist/chunk-DBpF1Eur.cjs.map +1 -0
  278. package/dist/chunk-DCvhBL80.js +9 -0
  279. package/dist/chunk-DCvhBL80.js.map +1 -0
  280. package/dist/chunk-DDNoqMiU.cjs +12 -0
  281. package/dist/chunk-DDNoqMiU.cjs.map +1 -0
  282. package/dist/chunk-DEpLX45Z.cjs +25 -0
  283. package/dist/chunk-DEpLX45Z.cjs.map +1 -0
  284. package/dist/chunk-DFw3I0U0.cjs +19 -0
  285. package/dist/chunk-DFw3I0U0.cjs.map +1 -0
  286. package/dist/chunk-DJOkmY4u.cjs +36 -0
  287. package/dist/chunk-DJOkmY4u.cjs.map +1 -0
  288. package/dist/chunk-DJQsem2x.js +1128 -0
  289. package/dist/chunk-DJQsem2x.js.map +1 -0
  290. package/dist/chunk-DKNcYR4L.cjs +71 -0
  291. package/dist/chunk-DKNcYR4L.cjs.map +1 -0
  292. package/dist/chunk-DL4Q5WpP.cjs +19 -0
  293. package/dist/chunk-DL4Q5WpP.cjs.map +1 -0
  294. package/dist/chunk-DLt13wEh.js +279 -0
  295. package/dist/chunk-DLt13wEh.js.map +1 -0
  296. package/dist/chunk-DPvFDS5n.cjs +31 -0
  297. package/dist/chunk-DPvFDS5n.cjs.map +1 -0
  298. package/dist/chunk-DQ4l6EDZ.js +1728 -0
  299. package/dist/chunk-DQ4l6EDZ.js.map +1 -0
  300. package/dist/chunk-DQ_X9yhT.cjs +21 -0
  301. package/dist/chunk-DQ_X9yhT.cjs.map +1 -0
  302. package/dist/chunk-DQbbL87b.cjs +57 -0
  303. package/dist/chunk-DQbbL87b.cjs.map +1 -0
  304. package/dist/chunk-DRphChLx.js +15 -0
  305. package/dist/chunk-DRphChLx.js.map +1 -0
  306. package/dist/chunk-DSsTHBp4.js +62 -0
  307. package/dist/chunk-DSsTHBp4.js.map +1 -0
  308. package/dist/chunk-DVI59otQ.js +20 -0
  309. package/dist/chunk-DVI59otQ.js.map +1 -0
  310. package/dist/chunk-DVN4tYVL.cjs +235 -0
  311. package/dist/chunk-DVN4tYVL.cjs.map +1 -0
  312. package/dist/chunk-DWxCDSxn.cjs +36 -0
  313. package/dist/chunk-DWxCDSxn.cjs.map +1 -0
  314. package/dist/chunk-DXMaeZs_.cjs +135 -0
  315. package/dist/chunk-DXMaeZs_.cjs.map +1 -0
  316. package/dist/chunk-D_dPThBm.js +44 -0
  317. package/dist/chunk-D_dPThBm.js.map +1 -0
  318. package/dist/chunk-DbW3lF5Y.cjs +55 -0
  319. package/dist/chunk-DbW3lF5Y.cjs.map +1 -0
  320. package/dist/chunk-Dc0Robe4.cjs +254 -0
  321. package/dist/chunk-Dc0Robe4.cjs.map +1 -0
  322. package/dist/chunk-DcLLI7B1.cjs +16 -0
  323. package/dist/chunk-DcLLI7B1.cjs.map +1 -0
  324. package/dist/chunk-Dd9K8OSs.js +73 -0
  325. package/dist/chunk-Dd9K8OSs.js.map +1 -0
  326. package/dist/chunk-DeFJnC-Q.js +52 -0
  327. package/dist/chunk-DeFJnC-Q.js.map +1 -0
  328. package/dist/chunk-DeggaLXL.cjs +109 -0
  329. package/dist/chunk-DeggaLXL.cjs.map +1 -0
  330. package/dist/chunk-DetGuqR8.cjs +12 -0
  331. package/dist/chunk-DetGuqR8.cjs.map +1 -0
  332. package/dist/chunk-Df761BAX.cjs +4 -0
  333. package/dist/chunk-DfQZch7H.cjs +60 -0
  334. package/dist/chunk-DfQZch7H.cjs.map +1 -0
  335. package/dist/chunk-DhwoAmi8.cjs +77 -0
  336. package/dist/chunk-DhwoAmi8.cjs.map +1 -0
  337. package/dist/chunk-DkH1DKxi.cjs +66 -0
  338. package/dist/chunk-DkH1DKxi.cjs.map +1 -0
  339. package/dist/chunk-DkjkI8F5.cjs +150 -0
  340. package/dist/chunk-DkjkI8F5.cjs.map +1 -0
  341. package/dist/chunk-DlaVYkP2.cjs +23 -0
  342. package/dist/chunk-DlaVYkP2.cjs.map +1 -0
  343. package/dist/chunk-DlcsA1GQ.js +6 -0
  344. package/dist/chunk-DlcsA1GQ.js.map +1 -0
  345. package/dist/chunk-DmBkJhi_.js +8 -0
  346. package/dist/chunk-DmBkJhi_.js.map +1 -0
  347. package/dist/chunk-DnXjnOQ1.cjs +42 -0
  348. package/dist/chunk-DnXjnOQ1.cjs.map +1 -0
  349. package/dist/chunk-DrG9yz7c.js +509 -0
  350. package/dist/chunk-DrG9yz7c.js.map +1 -0
  351. package/dist/chunk-DsTU_5Be.js +96 -0
  352. package/dist/chunk-DsTU_5Be.js.map +1 -0
  353. package/dist/chunk-DsXj9iLu.cjs +1827 -0
  354. package/dist/chunk-DsXj9iLu.cjs.map +1 -0
  355. package/dist/chunk-DteUy52S.js +45 -0
  356. package/dist/chunk-DteUy52S.js.map +1 -0
  357. package/dist/chunk-DtvsE56k.cjs +12 -0
  358. package/dist/chunk-DtvsE56k.cjs.map +1 -0
  359. package/dist/chunk-DuD5YqoE.cjs +99 -0
  360. package/dist/chunk-DuD5YqoE.cjs.map +1 -0
  361. package/dist/chunk-DvrtQ0Y0.js +51 -0
  362. package/dist/chunk-DvrtQ0Y0.js.map +1 -0
  363. package/dist/chunk-DwUFwDV2.js +144 -0
  364. package/dist/chunk-DwUFwDV2.js.map +1 -0
  365. package/dist/chunk-Dy59Tdfm.cjs +67 -0
  366. package/dist/chunk-Dy59Tdfm.cjs.map +1 -0
  367. package/dist/chunk-DyJupG9U.cjs +74 -0
  368. package/dist/chunk-DyJupG9U.cjs.map +1 -0
  369. package/dist/chunk-DzCbinPo.js +9 -0
  370. package/dist/chunk-DzCbinPo.js.map +1 -0
  371. package/dist/chunk-GgcOmaXu.cjs +137 -0
  372. package/dist/chunk-GgcOmaXu.cjs.map +1 -0
  373. package/dist/chunk-GnVcZTQv.cjs +50 -0
  374. package/dist/chunk-GnVcZTQv.cjs.map +1 -0
  375. package/dist/chunk-JDLVWYk5.cjs +22 -0
  376. package/dist/chunk-JDLVWYk5.cjs.map +1 -0
  377. package/dist/chunk-NA04sFmY.js +2 -0
  378. package/dist/chunk-NqIZvB2L.js +44 -0
  379. package/dist/chunk-NqIZvB2L.js.map +1 -0
  380. package/dist/chunk-OGNas_Mn.cjs +654 -0
  381. package/dist/chunk-OGNas_Mn.cjs.map +1 -0
  382. package/dist/chunk-PeexRooj.cjs +12 -0
  383. package/dist/chunk-PeexRooj.cjs.map +1 -0
  384. package/dist/chunk-QUjeQKsz.js +26 -0
  385. package/dist/chunk-QUjeQKsz.js.map +1 -0
  386. package/dist/chunk-S0jc_E9W.cjs +62 -0
  387. package/dist/chunk-S0jc_E9W.cjs.map +1 -0
  388. package/dist/chunk-TLRG-UaM.js +453 -0
  389. package/dist/chunk-TLRG-UaM.js.map +1 -0
  390. package/dist/chunk-TYmd7TzW.cjs +68 -0
  391. package/dist/chunk-TYmd7TzW.cjs.map +1 -0
  392. package/dist/chunk-TlHnQSY_.js +250 -0
  393. package/dist/chunk-TlHnQSY_.js.map +1 -0
  394. package/dist/chunk-Vba_029j.js +36 -0
  395. package/dist/chunk-Vba_029j.js.map +1 -0
  396. package/dist/chunk-Vp0uJb7O.cjs +92 -0
  397. package/dist/chunk-Vp0uJb7O.cjs.map +1 -0
  398. package/dist/chunk-WPGdcwtf.cjs +15 -0
  399. package/dist/chunk-WPGdcwtf.cjs.map +1 -0
  400. package/dist/chunk-WUipjqNN.cjs +158 -0
  401. package/dist/chunk-WUipjqNN.cjs.map +1 -0
  402. package/dist/chunk-Y-zyJ0-m.js +6 -0
  403. package/dist/chunk-Y-zyJ0-m.js.map +1 -0
  404. package/dist/chunk-ZIIlDASG.js +94 -0
  405. package/dist/chunk-ZIIlDASG.js.map +1 -0
  406. package/dist/chunk-ZLDg2I1Z.js +6 -0
  407. package/dist/chunk-ZLDg2I1Z.js.map +1 -0
  408. package/dist/chunk-_jSTl9gW.cjs +1129 -0
  409. package/dist/chunk-_jSTl9gW.cjs.map +1 -0
  410. package/dist/chunk-b5CqEoo1.cjs +599 -0
  411. package/dist/chunk-b5CqEoo1.cjs.map +1 -0
  412. package/dist/chunk-bA-2OGXv.d.ts +3977 -0
  413. package/dist/chunk-bvwC3n0z.cjs +12 -0
  414. package/dist/chunk-bvwC3n0z.cjs.map +1 -0
  415. package/dist/chunk-cMQzXXQq.js +67 -0
  416. package/dist/chunk-cMQzXXQq.js.map +1 -0
  417. package/dist/chunk-cTRnGhbF.cjs +177 -0
  418. package/dist/chunk-cTRnGhbF.cjs.map +1 -0
  419. package/dist/chunk-dHKPMJ4D.js +85 -0
  420. package/dist/chunk-dHKPMJ4D.js.map +1 -0
  421. package/dist/chunk-d_BOXcT5.js +9 -0
  422. package/dist/chunk-d_BOXcT5.js.map +1 -0
  423. package/dist/chunk-ea1IbBcA.js +66 -0
  424. package/dist/chunk-ea1IbBcA.js.map +1 -0
  425. package/dist/chunk-f-dHVrF3.js +293 -0
  426. package/dist/chunk-f-dHVrF3.js.map +1 -0
  427. package/dist/chunk-h7Z5mAV_.cjs +41 -0
  428. package/dist/chunk-h7Z5mAV_.cjs.map +1 -0
  429. package/dist/chunk-jSgMzVr1.js +35 -0
  430. package/dist/chunk-jSgMzVr1.js.map +1 -0
  431. package/dist/chunk-kYE5SZgs.cjs +252 -0
  432. package/dist/chunk-kYE5SZgs.cjs.map +1 -0
  433. package/dist/chunk-lEnNKG6x.cjs +285 -0
  434. package/dist/chunk-lEnNKG6x.cjs.map +1 -0
  435. package/dist/chunk-lcml1N1G.js +11 -0
  436. package/dist/chunk-lcml1N1G.js.map +1 -0
  437. package/dist/chunk-nBK0qBXt.js +68 -0
  438. package/dist/chunk-nBK0qBXt.js.map +1 -0
  439. package/dist/chunk-njoANlUr.cjs +41 -0
  440. package/dist/chunk-njoANlUr.cjs.map +1 -0
  441. package/dist/chunk-nwutfrnH.cjs +430 -0
  442. package/dist/chunk-nwutfrnH.cjs.map +1 -0
  443. package/dist/chunk-o1EKuTLo.js +56 -0
  444. package/dist/chunk-o1EKuTLo.js.map +1 -0
  445. package/dist/chunk-oMFOZSQM.cjs +52 -0
  446. package/dist/chunk-oMFOZSQM.cjs.map +1 -0
  447. package/dist/chunk-pb64dLGD.cjs +682 -0
  448. package/dist/chunk-pb64dLGD.cjs.map +1 -0
  449. package/dist/chunk-s7kBzSlt.js +2 -0
  450. package/dist/chunk-uhXxE8xV.cjs +32 -0
  451. package/dist/chunk-uhXxE8xV.cjs.map +1 -0
  452. package/dist/chunk-vGzpsUSM.cjs +110 -0
  453. package/dist/chunk-vGzpsUSM.cjs.map +1 -0
  454. package/dist/chunk-vN_Di8Af.cjs +1890 -0
  455. package/dist/chunk-vN_Di8Af.cjs.map +1 -0
  456. package/dist/chunk-veLShVmw.js +41 -0
  457. package/dist/chunk-veLShVmw.js.map +1 -0
  458. package/dist/chunk-wTf5jOFv.js +253 -0
  459. package/dist/chunk-wTf5jOFv.js.map +1 -0
  460. package/dist/chunk-yO-Ek9RH.cjs +17 -0
  461. package/dist/chunk-yO-Ek9RH.cjs.map +1 -0
  462. package/dist/chunk-ye5UUSFw.js +280 -0
  463. package/dist/chunk-ye5UUSFw.js.map +1 -0
  464. package/dist/copilot/index.cjs +8 -41
  465. package/dist/copilot/index.d.cts +3 -7
  466. package/dist/copilot/index.d.ts +3 -7
  467. package/dist/copilot/index.js +3 -29
  468. package/dist/embed/index.cjs +1599 -1762
  469. package/dist/embed/index.cjs.map +1 -1
  470. package/dist/embed/index.d.cts +86 -95
  471. package/dist/embed/index.d.ts +86 -95
  472. package/dist/embed/index.js +1594 -1760
  473. package/dist/embed/index.js.map +1 -1
  474. package/dist/headless/index.cjs +125 -407
  475. package/dist/headless/index.d.cts +4 -23
  476. package/dist/headless/index.d.ts +4 -23
  477. package/dist/headless/index.js +28 -30
  478. package/dist/import/index.cjs +386 -416
  479. package/dist/import/index.cjs.map +1 -1
  480. package/dist/import/index.d.cts +28 -37
  481. package/dist/import/index.d.ts +28 -37
  482. package/dist/import/index.js +379 -407
  483. package/dist/import/index.js.map +1 -1
  484. package/dist/index.cjs +8939 -10545
  485. package/dist/index.cjs.map +1 -1
  486. package/dist/index.d.cts +1786 -1888
  487. package/dist/index.d.ts +1786 -1888
  488. package/dist/index.js +8737 -9876
  489. package/dist/index.js.map +1 -1
  490. package/dist/map/index.cjs +34 -120
  491. package/dist/map/index.d.cts +2 -988
  492. package/dist/map/index.d.ts +2 -988
  493. package/dist/map/index.js +1 -24
  494. package/dist/styles.css +7 -0
  495. package/dist/testing/index.cjs +367 -326
  496. package/dist/testing/index.cjs.map +1 -1
  497. package/dist/testing/index.d.cts +84 -101
  498. package/dist/testing/index.d.ts +84 -101
  499. package/dist/testing/index.js +362 -324
  500. package/dist/testing/index.js.map +1 -1
  501. package/dist/video/index.cjs +6 -51
  502. package/dist/video/index.d.cts +44 -49
  503. package/dist/video/index.d.ts +44 -49
  504. package/dist/video/index.js +1 -43
  505. package/package.json +22 -23
  506. package/src/agent/components/ChatTranscript.tsx +1 -1
  507. package/src/agent/hooks/useAgentChatTransport.ts +1 -1
  508. package/src/controls/components/PoiOverlayMenu.tsx +1 -1
  509. package/src/controls/components/StudioControls.tsx +1 -1
  510. package/src/directions/components/DirectionsModal.tsx +1 -1
  511. package/src/directions/components/directionsPdf.tsx +1 -9
  512. package/src/embed/components/EmbedColumnsSection.tsx +1 -1
  513. package/src/embed/components/EmbedElementSwitcher.tsx +6 -8
  514. package/src/embed/components/EmbedTablePreview.tsx +2 -2
  515. package/src/embed/hooks/useEmbedPreviewCamera.ts +1 -1
  516. package/src/embed/index.ts +2 -8
  517. package/src/headless/hooks/usePlatformViewer.ts +2 -2
  518. package/src/headless/hooks/useSegmentList.ts +1 -1
  519. package/src/headless/hooks/useSegmentRow.ts +4 -0
  520. package/src/headless/hooks/useStreetViewCorridor.ts +1 -1
  521. package/src/headless/hooks/useStudioDispatch.ts +2 -3
  522. package/src/headless/hooks/useWaypointRow.ts +2 -0
  523. package/src/headless/providers/mountayaStudio.tsx +3 -2
  524. package/src/headless/providers/studio.tsx +5 -4
  525. package/src/headless/providers/studioStrings.tsx +1 -1
  526. package/src/host/components/MountayaStudioHost.tsx +2 -2
  527. package/src/host/hooks/useStudioToolBus.ts +1 -1
  528. package/src/host/hooks/useStudioToolContext.ts +1 -1
  529. package/src/index.ts +13 -52
  530. package/src/itinerary/components/ItineraryForm.tsx +1 -1
  531. package/src/itinerary/components/ItineraryHeaderIdentity.tsx +1 -1
  532. package/src/itinerary/components/PlaceMark.tsx +1 -1
  533. package/src/itinerary/components/SegmentGroupModal.tsx +1 -0
  534. package/src/itinerary/components/StudioItineraryProfile.tsx +5 -5
  535. package/src/itinerary/components/WaypointDetailsView.tsx +2 -2
  536. package/src/itinerary/components/WaypointMarkers.tsx +2 -2
  537. package/src/itinerary/components/WaypointPreviewCard.tsx +1 -1
  538. package/src/itinerary/components/WaypointSwitcher.tsx +1 -1
  539. package/src/itinerary/hooks/useItineraryPace.ts +1 -0
  540. package/src/itinerary/hooks/useProfileVisibility.ts +1 -1
  541. package/src/itinerary/providers/ItineraryViewProvider.tsx +1 -1
  542. package/src/itinerary/rules/amenityGlyphs.ts +1 -1
  543. package/src/lists/components/WaypointList.tsx +2 -1
  544. package/src/map/components/ContextMenuPopup.tsx +6 -6
  545. package/src/map/components/MapAnchoredPopup.tsx +2 -1
  546. package/src/map/hooks/useStudioConstraints.ts +1 -1
  547. package/src/map/hooks/useStudioEditEngine.ts +2 -1
  548. package/src/map/hooks/useStudioEnrichment.ts +1 -1
  549. package/src/map/hooks/useStudioItinerarySelection.ts +1 -1
  550. package/src/map/hooks/useStudioMapBindings.ts +2 -2
  551. package/src/map/hooks/useStudioMapSync.ts +2 -2
  552. package/src/map/hooks/useStudioOverlay.ts +1 -1
  553. package/src/map/hooks/useStudioPeerDrafts.ts +1 -1
  554. package/src/map/hooks/useStudioPoiLayers.ts +1 -1
  555. package/src/map/hooks/useStudioSuggestionPicking.ts +1 -1
  556. package/src/map/hooks/useStudioTimestamp.ts +1 -1
  557. package/src/map/hooks/useStudioUrlState.ts +1 -1
  558. package/src/map/hooks/useStudioWaypointEditing.ts +1 -1
  559. package/src/map/hooks/useStudioZoneEditing.ts +1 -1
  560. package/src/map/hooks/useStudioZoneSelection.ts +1 -1
  561. package/src/map/hooks/useTileLayers.ts +1 -1
  562. package/src/map/rules/poiGlyphs.ts +1 -1
  563. package/src/panels/components/StudioLayersPanel.tsx +1 -1
  564. package/src/primitives/components/ActivityIcon.tsx +1 -1
  565. package/src/primitives/components/DateTimePickerField.tsx +11 -2
  566. package/src/rows/components/WaypointRow.tsx +1 -0
  567. package/src/rows/components/WaypointRowLayout.tsx +1 -0
  568. package/src/rules/menuActions.ts +1 -1
  569. package/src/rules/studioConfig.ts +1 -1
  570. package/src/search/components/SearchTab.tsx +2 -2
  571. package/src/share/components/ShareSheet.tsx +1 -1
  572. package/src/studio/components/MountayaStudio.tsx +4 -4
  573. package/src/studio/components/MountayaStudioViewer.tsx +2 -2
  574. package/src/studio/hooks/useViewerActivation.ts +2 -2
  575. package/src/studio/hooks/useViewerMapBindings.ts +1 -1
  576. package/src/styles.css +6 -5
  577. package/src/testing/mountayaClient.tsx +1 -1
  578. package/src/video/components/PreviewSurface.tsx +2 -2
  579. package/src/video/components/VideoExportWizard.tsx +6 -8
  580. package/src/video/hooks/useVideoPreviewSeed.ts +2 -2
  581. package/src/zone/components/ZoneForm.tsx +1 -1
  582. package/dist/AgentMarkdown-RNLATZYN.cjs +0 -213
  583. package/dist/AgentMarkdown-RNLATZYN.cjs.map +0 -1
  584. package/dist/AgentMarkdown-TMN6E2XC.js +0 -206
  585. package/dist/AgentMarkdown-TMN6E2XC.js.map +0 -1
  586. package/dist/ContextMenuPopup-EOYN42YZ.js +0 -468
  587. package/dist/ContextMenuPopup-EOYN42YZ.js.map +0 -1
  588. package/dist/ContextMenuPopup-VQLAYYYZ.cjs +0 -470
  589. package/dist/ContextMenuPopup-VQLAYYYZ.cjs.map +0 -1
  590. package/dist/CopilotPanel-CCLEYZUN.js +0 -29
  591. package/dist/CopilotPanel-CCLEYZUN.js.map +0 -1
  592. package/dist/CopilotPanel-LYPMTDKX.cjs +0 -38
  593. package/dist/CopilotPanel-LYPMTDKX.cjs.map +0 -1
  594. package/dist/DateTimePickerField-FZRKJ2SU.js +0 -53
  595. package/dist/DateTimePickerField-FZRKJ2SU.js.map +0 -1
  596. package/dist/DateTimePickerField-NB456C6F.cjs +0 -55
  597. package/dist/DateTimePickerField-NB456C6F.cjs.map +0 -1
  598. package/dist/DirectionsModal-4Y346QFU.cjs +0 -291
  599. package/dist/DirectionsModal-4Y346QFU.cjs.map +0 -1
  600. package/dist/DirectionsModal-DRPO2654.js +0 -289
  601. package/dist/DirectionsModal-DRPO2654.js.map +0 -1
  602. package/dist/DuplicateItineraryModal-2QGWI7E7.js +0 -321
  603. package/dist/DuplicateItineraryModal-2QGWI7E7.js.map +0 -1
  604. package/dist/DuplicateItineraryModal-WFGMU6JL.cjs +0 -323
  605. package/dist/DuplicateItineraryModal-WFGMU6JL.cjs.map +0 -1
  606. package/dist/EditCollectionModal-4QYP53SX.js +0 -90
  607. package/dist/EditCollectionModal-4QYP53SX.js.map +0 -1
  608. package/dist/EditCollectionModal-T2TMAO53.cjs +0 -92
  609. package/dist/EditCollectionModal-T2TMAO53.cjs.map +0 -1
  610. package/dist/EmbedSnippetCode-NMFCQ7TF.cjs +0 -62
  611. package/dist/EmbedSnippetCode-NMFCQ7TF.cjs.map +0 -1
  612. package/dist/EmbedSnippetCode-TGBSWDMD.js +0 -60
  613. package/dist/EmbedSnippetCode-TGBSWDMD.js.map +0 -1
  614. package/dist/EmbedTablePreview-3RRHM63Q.js +0 -72
  615. package/dist/EmbedTablePreview-3RRHM63Q.js.map +0 -1
  616. package/dist/EmbedTablePreview-Z3W62MRV.cjs +0 -74
  617. package/dist/EmbedTablePreview-Z3W62MRV.cjs.map +0 -1
  618. package/dist/ExportModal-5NUZZPXN.cjs +0 -267
  619. package/dist/ExportModal-5NUZZPXN.cjs.map +0 -1
  620. package/dist/ExportModal-H7OYP6CK.js +0 -265
  621. package/dist/ExportModal-H7OYP6CK.js.map +0 -1
  622. package/dist/FileDropzone-GKPMAZF5.cjs +0 -41
  623. package/dist/FileDropzone-GKPMAZF5.cjs.map +0 -1
  624. package/dist/FileDropzone-GRXY4FXR.js +0 -39
  625. package/dist/FileDropzone-GRXY4FXR.js.map +0 -1
  626. package/dist/LocationPermissionModal-AFHI5J4S.cjs +0 -92
  627. package/dist/LocationPermissionModal-AFHI5J4S.cjs.map +0 -1
  628. package/dist/LocationPermissionModal-MURJ5DDB.js +0 -90
  629. package/dist/LocationPermissionModal-MURJ5DDB.js.map +0 -1
  630. package/dist/ManageCollectionsModal-E3IUHUTO.cjs +0 -402
  631. package/dist/ManageCollectionsModal-E3IUHUTO.cjs.map +0 -1
  632. package/dist/ManageCollectionsModal-FIHSZXSR.js +0 -400
  633. package/dist/ManageCollectionsModal-FIHSZXSR.js.map +0 -1
  634. package/dist/NewCollectionModal-7TBWVA3G.js +0 -75
  635. package/dist/NewCollectionModal-7TBWVA3G.js.map +0 -1
  636. package/dist/NewCollectionModal-QFQYCKCG.cjs +0 -77
  637. package/dist/NewCollectionModal-QFQYCKCG.cjs.map +0 -1
  638. package/dist/RoadAccessModal-DNUJV5PC.js +0 -57
  639. package/dist/RoadAccessModal-DNUJV5PC.js.map +0 -1
  640. package/dist/RoadAccessModal-WLLL2ASZ.cjs +0 -59
  641. package/dist/RoadAccessModal-WLLL2ASZ.cjs.map +0 -1
  642. package/dist/SegmentColorPicker-7Y4JEPFC.cjs +0 -81
  643. package/dist/SegmentColorPicker-7Y4JEPFC.cjs.map +0 -1
  644. package/dist/SegmentColorPicker-UNLPITUA.js +0 -79
  645. package/dist/SegmentColorPicker-UNLPITUA.js.map +0 -1
  646. package/dist/SegmentGroupModal-F54FZUR2.cjs +0 -32
  647. package/dist/SegmentGroupModal-F54FZUR2.cjs.map +0 -1
  648. package/dist/SegmentGroupModal-KBU7OPNJ.js +0 -23
  649. package/dist/SegmentGroupModal-KBU7OPNJ.js.map +0 -1
  650. package/dist/ShareCollectionModal-TWYE6JJ4.cjs +0 -82
  651. package/dist/ShareCollectionModal-TWYE6JJ4.cjs.map +0 -1
  652. package/dist/ShareCollectionModal-VXSRHX4S.js +0 -80
  653. package/dist/ShareCollectionModal-VXSRHX4S.js.map +0 -1
  654. package/dist/ShareModal-HLYNE7OL.js +0 -115
  655. package/dist/ShareModal-HLYNE7OL.js.map +0 -1
  656. package/dist/ShareModal-WISND27S.cjs +0 -117
  657. package/dist/ShareModal-WISND27S.cjs.map +0 -1
  658. package/dist/VideoExportWizard-BSDWA3B5.js +0 -44
  659. package/dist/VideoExportWizard-BSDWA3B5.js.map +0 -1
  660. package/dist/VideoExportWizard-UOHR4MNS.cjs +0 -53
  661. package/dist/VideoExportWizard-UOHR4MNS.cjs.map +0 -1
  662. package/dist/WaypointDetailsModal-LK5LBK6S.js +0 -270
  663. package/dist/WaypointDetailsModal-LK5LBK6S.js.map +0 -1
  664. package/dist/WaypointDetailsModal-MEMOLLUY.cjs +0 -272
  665. package/dist/WaypointDetailsModal-MEMOLLUY.cjs.map +0 -1
  666. package/dist/WaypointWorkbench-DCCLBURG.cjs +0 -1204
  667. package/dist/WaypointWorkbench-DCCLBURG.cjs.map +0 -1
  668. package/dist/WaypointWorkbench-NRCLGU23.js +0 -1202
  669. package/dist/WaypointWorkbench-NRCLGU23.js.map +0 -1
  670. package/dist/chunk-22BNE3YV.js +0 -13
  671. package/dist/chunk-22BNE3YV.js.map +0 -1
  672. package/dist/chunk-24RNBTO2.cjs +0 -154
  673. package/dist/chunk-24RNBTO2.cjs.map +0 -1
  674. package/dist/chunk-2DDL2LIJ.cjs +0 -65
  675. package/dist/chunk-2DDL2LIJ.cjs.map +0 -1
  676. package/dist/chunk-2GAMKPS2.cjs +0 -16
  677. package/dist/chunk-2GAMKPS2.cjs.map +0 -1
  678. package/dist/chunk-2K4HCCZJ.cjs +0 -51
  679. package/dist/chunk-2K4HCCZJ.cjs.map +0 -1
  680. package/dist/chunk-2MHWH3TS.cjs +0 -119
  681. package/dist/chunk-2MHWH3TS.cjs.map +0 -1
  682. package/dist/chunk-2MQBPZNR.cjs +0 -12
  683. package/dist/chunk-2MQBPZNR.cjs.map +0 -1
  684. package/dist/chunk-2QSPCXLM.js +0 -84
  685. package/dist/chunk-2QSPCXLM.js.map +0 -1
  686. package/dist/chunk-32WRG44G.js +0 -66
  687. package/dist/chunk-32WRG44G.js.map +0 -1
  688. package/dist/chunk-32XMYLEB.js +0 -9
  689. package/dist/chunk-32XMYLEB.js.map +0 -1
  690. package/dist/chunk-3BEHHSVE.cjs +0 -790
  691. package/dist/chunk-3BEHHSVE.cjs.map +0 -1
  692. package/dist/chunk-3HF2XZKQ.js +0 -8
  693. package/dist/chunk-3HF2XZKQ.js.map +0 -1
  694. package/dist/chunk-3K2NX5FH.js +0 -51
  695. package/dist/chunk-3K2NX5FH.js.map +0 -1
  696. package/dist/chunk-3Q23QKNI.cjs +0 -26
  697. package/dist/chunk-3Q23QKNI.cjs.map +0 -1
  698. package/dist/chunk-3TQV2M4C.cjs +0 -16
  699. package/dist/chunk-3TQV2M4C.cjs.map +0 -1
  700. package/dist/chunk-3XDKDTE6.js +0 -16
  701. package/dist/chunk-3XDKDTE6.js.map +0 -1
  702. package/dist/chunk-46EARJWC.js +0 -288
  703. package/dist/chunk-46EARJWC.js.map +0 -1
  704. package/dist/chunk-4DQOJIUV.js +0 -96
  705. package/dist/chunk-4DQOJIUV.js.map +0 -1
  706. package/dist/chunk-4T52NAVT.js +0 -10
  707. package/dist/chunk-4T52NAVT.js.map +0 -1
  708. package/dist/chunk-4TPRVQGY.js +0 -12
  709. package/dist/chunk-4TPRVQGY.js.map +0 -1
  710. package/dist/chunk-4TX5E63A.cjs +0 -12
  711. package/dist/chunk-4TX5E63A.cjs.map +0 -1
  712. package/dist/chunk-4VKJF24B.js +0 -22
  713. package/dist/chunk-4VKJF24B.js.map +0 -1
  714. package/dist/chunk-4Z734K3L.js +0 -15
  715. package/dist/chunk-4Z734K3L.js.map +0 -1
  716. package/dist/chunk-4ZRSEOZM.js +0 -629
  717. package/dist/chunk-4ZRSEOZM.js.map +0 -1
  718. package/dist/chunk-52T3VZR5.js +0 -55
  719. package/dist/chunk-52T3VZR5.js.map +0 -1
  720. package/dist/chunk-56DP2X7U.js +0 -15
  721. package/dist/chunk-56DP2X7U.js.map +0 -1
  722. package/dist/chunk-5AHT62LO.js +0 -24
  723. package/dist/chunk-5AHT62LO.js.map +0 -1
  724. package/dist/chunk-5BR4CTVV.cjs +0 -17
  725. package/dist/chunk-5BR4CTVV.cjs.map +0 -1
  726. package/dist/chunk-5CTZOFDV.cjs +0 -17
  727. package/dist/chunk-5CTZOFDV.cjs.map +0 -1
  728. package/dist/chunk-5F55MFIX.cjs +0 -45
  729. package/dist/chunk-5F55MFIX.cjs.map +0 -1
  730. package/dist/chunk-5FMQJ4A4.cjs +0 -362
  731. package/dist/chunk-5FMQJ4A4.cjs.map +0 -1
  732. package/dist/chunk-5PMEAMHS.js +0 -82
  733. package/dist/chunk-5PMEAMHS.js.map +0 -1
  734. package/dist/chunk-676DNRSN.js +0 -85
  735. package/dist/chunk-676DNRSN.js.map +0 -1
  736. package/dist/chunk-6H2F7JKL.js +0 -179
  737. package/dist/chunk-6H2F7JKL.js.map +0 -1
  738. package/dist/chunk-6HMRMON7.js +0 -10
  739. package/dist/chunk-6HMRMON7.js.map +0 -1
  740. package/dist/chunk-6NKPZ3LT.cjs +0 -14
  741. package/dist/chunk-6NKPZ3LT.cjs.map +0 -1
  742. package/dist/chunk-6TG2HZDG.js +0 -75
  743. package/dist/chunk-6TG2HZDG.js.map +0 -1
  744. package/dist/chunk-6WU7XEQA.cjs +0 -103
  745. package/dist/chunk-6WU7XEQA.cjs.map +0 -1
  746. package/dist/chunk-6YD325QI.cjs +0 -90
  747. package/dist/chunk-6YD325QI.cjs.map +0 -1
  748. package/dist/chunk-7B6TUEL5.js +0 -20
  749. package/dist/chunk-7B6TUEL5.js.map +0 -1
  750. package/dist/chunk-7KS5F27H.js +0 -33
  751. package/dist/chunk-7KS5F27H.js.map +0 -1
  752. package/dist/chunk-A2N6553V.cjs +0 -295
  753. package/dist/chunk-A2N6553V.cjs.map +0 -1
  754. package/dist/chunk-A66FJAVG.js +0 -44
  755. package/dist/chunk-A66FJAVG.js.map +0 -1
  756. package/dist/chunk-AF43JU4W.js +0 -27
  757. package/dist/chunk-AF43JU4W.js.map +0 -1
  758. package/dist/chunk-AHGHAWYR.js +0 -99
  759. package/dist/chunk-AHGHAWYR.js.map +0 -1
  760. package/dist/chunk-AKN5KIZT.js +0 -1969
  761. package/dist/chunk-AKN5KIZT.js.map +0 -1
  762. package/dist/chunk-ANTDR5MJ.cjs +0 -12
  763. package/dist/chunk-ANTDR5MJ.cjs.map +0 -1
  764. package/dist/chunk-AQ5JIIAE.js +0 -26
  765. package/dist/chunk-AQ5JIIAE.js.map +0 -1
  766. package/dist/chunk-ARHO5MLJ.js +0 -10
  767. package/dist/chunk-ARHO5MLJ.js.map +0 -1
  768. package/dist/chunk-BAYGKSWY.cjs +0 -26
  769. package/dist/chunk-BAYGKSWY.cjs.map +0 -1
  770. package/dist/chunk-BEJ5I724.js +0 -8
  771. package/dist/chunk-BEJ5I724.js.map +0 -1
  772. package/dist/chunk-BFNXXLVV.cjs +0 -34
  773. package/dist/chunk-BFNXXLVV.cjs.map +0 -1
  774. package/dist/chunk-BFQJDFGB.js +0 -57
  775. package/dist/chunk-BFQJDFGB.js.map +0 -1
  776. package/dist/chunk-CHEQJ6N7.cjs +0 -2214
  777. package/dist/chunk-CHEQJ6N7.cjs.map +0 -1
  778. package/dist/chunk-CJOJWZM7.js +0 -92
  779. package/dist/chunk-CJOJWZM7.js.map +0 -1
  780. package/dist/chunk-CJRSFC45.cjs +0 -578
  781. package/dist/chunk-CJRSFC45.cjs.map +0 -1
  782. package/dist/chunk-CWQ4WHPI.cjs +0 -46
  783. package/dist/chunk-CWQ4WHPI.cjs.map +0 -1
  784. package/dist/chunk-D3INXUFT.js +0 -360
  785. package/dist/chunk-D3INXUFT.js.map +0 -1
  786. package/dist/chunk-D6CDAYZ6.cjs +0 -18
  787. package/dist/chunk-D6CDAYZ6.cjs.map +0 -1
  788. package/dist/chunk-DDPXRXRD.cjs +0 -23
  789. package/dist/chunk-DDPXRXRD.cjs.map +0 -1
  790. package/dist/chunk-DUUPWSOZ.cjs +0 -14
  791. package/dist/chunk-DUUPWSOZ.cjs.map +0 -1
  792. package/dist/chunk-DVWYOHOB.cjs +0 -43
  793. package/dist/chunk-DVWYOHOB.cjs.map +0 -1
  794. package/dist/chunk-DZPHWBMC.cjs +0 -11
  795. package/dist/chunk-DZPHWBMC.cjs.map +0 -1
  796. package/dist/chunk-E26FROI3.js +0 -68
  797. package/dist/chunk-E26FROI3.js.map +0 -1
  798. package/dist/chunk-E7ZTDAQW.cjs +0 -37
  799. package/dist/chunk-E7ZTDAQW.cjs.map +0 -1
  800. package/dist/chunk-ECI4EKIV.cjs +0 -94
  801. package/dist/chunk-ECI4EKIV.cjs.map +0 -1
  802. package/dist/chunk-EN5RWYHP.cjs +0 -28
  803. package/dist/chunk-EN5RWYHP.cjs.map +0 -1
  804. package/dist/chunk-ET3UASEF.cjs +0 -91
  805. package/dist/chunk-ET3UASEF.cjs.map +0 -1
  806. package/dist/chunk-EW5SY246.cjs +0 -97
  807. package/dist/chunk-EW5SY246.cjs.map +0 -1
  808. package/dist/chunk-EWWHVV7R.cjs +0 -18
  809. package/dist/chunk-EWWHVV7R.cjs.map +0 -1
  810. package/dist/chunk-F2LZZC6X.js +0 -90
  811. package/dist/chunk-F2LZZC6X.js.map +0 -1
  812. package/dist/chunk-F6VFOI4U.cjs +0 -12
  813. package/dist/chunk-F6VFOI4U.cjs.map +0 -1
  814. package/dist/chunk-FGX3TEU4.cjs +0 -12
  815. package/dist/chunk-FGX3TEU4.cjs.map +0 -1
  816. package/dist/chunk-FK4F24KE.js +0 -10
  817. package/dist/chunk-FK4F24KE.js.map +0 -1
  818. package/dist/chunk-FLIGKB6K.js +0 -313
  819. package/dist/chunk-FLIGKB6K.js.map +0 -1
  820. package/dist/chunk-G2NDWNFB.cjs +0 -185
  821. package/dist/chunk-G2NDWNFB.cjs.map +0 -1
  822. package/dist/chunk-G2XORRLH.js +0 -15
  823. package/dist/chunk-G2XORRLH.js.map +0 -1
  824. package/dist/chunk-GIZN7NX5.cjs +0 -25
  825. package/dist/chunk-GIZN7NX5.cjs.map +0 -1
  826. package/dist/chunk-GM2BQ24D.js +0 -47
  827. package/dist/chunk-GM2BQ24D.js.map +0 -1
  828. package/dist/chunk-GMQJZ5N7.cjs +0 -50
  829. package/dist/chunk-GMQJZ5N7.cjs.map +0 -1
  830. package/dist/chunk-GT7RJOAA.cjs +0 -315
  831. package/dist/chunk-GT7RJOAA.cjs.map +0 -1
  832. package/dist/chunk-GWGUMPOL.js +0 -9
  833. package/dist/chunk-GWGUMPOL.js.map +0 -1
  834. package/dist/chunk-GWVKSSE3.cjs +0 -154
  835. package/dist/chunk-GWVKSSE3.cjs.map +0 -1
  836. package/dist/chunk-GY7UMPHT.cjs +0 -99
  837. package/dist/chunk-GY7UMPHT.cjs.map +0 -1
  838. package/dist/chunk-HMVBS5DU.js +0 -150
  839. package/dist/chunk-HMVBS5DU.js.map +0 -1
  840. package/dist/chunk-HXHA2C7C.js +0 -169
  841. package/dist/chunk-HXHA2C7C.js.map +0 -1
  842. package/dist/chunk-IHMOFX2A.js +0 -208
  843. package/dist/chunk-IHMOFX2A.js.map +0 -1
  844. package/dist/chunk-II6C3LU2.cjs +0 -49
  845. package/dist/chunk-II6C3LU2.cjs.map +0 -1
  846. package/dist/chunk-IOOAFCSR.cjs +0 -58
  847. package/dist/chunk-IOOAFCSR.cjs.map +0 -1
  848. package/dist/chunk-IQZSIOMM.js +0 -10
  849. package/dist/chunk-IQZSIOMM.js.map +0 -1
  850. package/dist/chunk-J2H3WIUM.cjs +0 -12
  851. package/dist/chunk-J2H3WIUM.cjs.map +0 -1
  852. package/dist/chunk-J62OBSUE.cjs +0 -54
  853. package/dist/chunk-J62OBSUE.cjs.map +0 -1
  854. package/dist/chunk-JFJVSJUX.cjs +0 -16
  855. package/dist/chunk-JFJVSJUX.cjs.map +0 -1
  856. package/dist/chunk-JI2M77Y7.cjs +0 -68
  857. package/dist/chunk-JI2M77Y7.cjs.map +0 -1
  858. package/dist/chunk-JLSOLL3C.js +0 -31
  859. package/dist/chunk-JLSOLL3C.js.map +0 -1
  860. package/dist/chunk-JRME3LCP.cjs +0 -41
  861. package/dist/chunk-JRME3LCP.cjs.map +0 -1
  862. package/dist/chunk-JUD3CWTI.cjs +0 -2005
  863. package/dist/chunk-JUD3CWTI.cjs.map +0 -1
  864. package/dist/chunk-JVFHF3LE.cjs +0 -11
  865. package/dist/chunk-JVFHF3LE.cjs.map +0 -1
  866. package/dist/chunk-JVS2WNKQ.js +0 -26
  867. package/dist/chunk-JVS2WNKQ.js.map +0 -1
  868. package/dist/chunk-JXAFIYLV.js +0 -94
  869. package/dist/chunk-JXAFIYLV.js.map +0 -1
  870. package/dist/chunk-K2E744ST.cjs +0 -18
  871. package/dist/chunk-K2E744ST.cjs.map +0 -1
  872. package/dist/chunk-K2ZEMBJ7.js +0 -56
  873. package/dist/chunk-K2ZEMBJ7.js.map +0 -1
  874. package/dist/chunk-KCXNMLKB.js +0 -22
  875. package/dist/chunk-KCXNMLKB.js.map +0 -1
  876. package/dist/chunk-KMMDPXY4.js +0 -35
  877. package/dist/chunk-KMMDPXY4.js.map +0 -1
  878. package/dist/chunk-KMSGFBAJ.cjs +0 -78
  879. package/dist/chunk-KMSGFBAJ.cjs.map +0 -1
  880. package/dist/chunk-KPD7K4XQ.cjs +0 -11
  881. package/dist/chunk-KPD7K4XQ.cjs.map +0 -1
  882. package/dist/chunk-KUD3B3BA.js +0 -12
  883. package/dist/chunk-KUD3B3BA.js.map +0 -1
  884. package/dist/chunk-L62LSMJ5.js +0 -9
  885. package/dist/chunk-L62LSMJ5.js.map +0 -1
  886. package/dist/chunk-LB57H6LF.cjs +0 -261
  887. package/dist/chunk-LB57H6LF.cjs.map +0 -1
  888. package/dist/chunk-LCPKNSC4.cjs +0 -48
  889. package/dist/chunk-LCPKNSC4.cjs.map +0 -1
  890. package/dist/chunk-LE3W2CSF.cjs +0 -84
  891. package/dist/chunk-LE3W2CSF.cjs.map +0 -1
  892. package/dist/chunk-LG736CNC.js +0 -13
  893. package/dist/chunk-LG736CNC.js.map +0 -1
  894. package/dist/chunk-LGNTAZ3L.cjs +0 -33
  895. package/dist/chunk-LGNTAZ3L.cjs.map +0 -1
  896. package/dist/chunk-LHXINV6N.cjs +0 -47
  897. package/dist/chunk-LHXINV6N.cjs.map +0 -1
  898. package/dist/chunk-LLZUTIQB.cjs +0 -24
  899. package/dist/chunk-LLZUTIQB.cjs.map +0 -1
  900. package/dist/chunk-LPGXRU7R.cjs +0 -12
  901. package/dist/chunk-LPGXRU7R.cjs.map +0 -1
  902. package/dist/chunk-MA2BBWF5.cjs +0 -96
  903. package/dist/chunk-MA2BBWF5.cjs.map +0 -1
  904. package/dist/chunk-MLGORMWF.js +0 -23
  905. package/dist/chunk-MLGORMWF.js.map +0 -1
  906. package/dist/chunk-MO7XCKLA.js +0 -62
  907. package/dist/chunk-MO7XCKLA.js.map +0 -1
  908. package/dist/chunk-N37UE6RQ.cjs +0 -1797
  909. package/dist/chunk-N37UE6RQ.cjs.map +0 -1
  910. package/dist/chunk-N6NWKUOR.cjs +0 -60
  911. package/dist/chunk-N6NWKUOR.cjs.map +0 -1
  912. package/dist/chunk-NI5CAMFC.js +0 -568
  913. package/dist/chunk-NI5CAMFC.js.map +0 -1
  914. package/dist/chunk-NNLCZGZK.js +0 -21
  915. package/dist/chunk-NNLCZGZK.js.map +0 -1
  916. package/dist/chunk-NWHFUVYX.js +0 -97
  917. package/dist/chunk-NWHFUVYX.js.map +0 -1
  918. package/dist/chunk-OMDB6ZB2.cjs +0 -176
  919. package/dist/chunk-OMDB6ZB2.cjs.map +0 -1
  920. package/dist/chunk-P5W4TRJO.cjs +0 -33
  921. package/dist/chunk-P5W4TRJO.cjs.map +0 -1
  922. package/dist/chunk-PADS6TDO.js +0 -89
  923. package/dist/chunk-PADS6TDO.js.map +0 -1
  924. package/dist/chunk-PFLNOHBT.js +0 -92
  925. package/dist/chunk-PFLNOHBT.js.map +0 -1
  926. package/dist/chunk-PTLYNDZS.cjs +0 -13
  927. package/dist/chunk-PTLYNDZS.cjs.map +0 -1
  928. package/dist/chunk-QC3X4DAW.cjs +0 -71
  929. package/dist/chunk-QC3X4DAW.cjs.map +0 -1
  930. package/dist/chunk-QPTICYGD.cjs +0 -272
  931. package/dist/chunk-QPTICYGD.cjs.map +0 -1
  932. package/dist/chunk-QZ7W2E4U.cjs +0 -319
  933. package/dist/chunk-QZ7W2E4U.cjs.map +0 -1
  934. package/dist/chunk-RJJPUPOY.cjs +0 -97
  935. package/dist/chunk-RJJPUPOY.cjs.map +0 -1
  936. package/dist/chunk-RRSMCCFS.js +0 -43
  937. package/dist/chunk-RRSMCCFS.js.map +0 -1
  938. package/dist/chunk-S6VCR6F5.js +0 -91
  939. package/dist/chunk-S6VCR6F5.js.map +0 -1
  940. package/dist/chunk-S7Y2GMYJ.cjs +0 -89
  941. package/dist/chunk-S7Y2GMYJ.cjs.map +0 -1
  942. package/dist/chunk-SIMEDLX3.cjs +0 -645
  943. package/dist/chunk-SIMEDLX3.cjs.map +0 -1
  944. package/dist/chunk-SQYF7HKF.cjs +0 -59
  945. package/dist/chunk-SQYF7HKF.cjs.map +0 -1
  946. package/dist/chunk-ST7BNVC2.cjs +0 -13
  947. package/dist/chunk-ST7BNVC2.cjs.map +0 -1
  948. package/dist/chunk-SZVRMMLS.js +0 -16
  949. package/dist/chunk-SZVRMMLS.js.map +0 -1
  950. package/dist/chunk-T27LICRD.js +0 -2212
  951. package/dist/chunk-T27LICRD.js.map +0 -1
  952. package/dist/chunk-TAU5HGJ3.cjs +0 -11
  953. package/dist/chunk-TAU5HGJ3.cjs.map +0 -1
  954. package/dist/chunk-TOM7TV5E.js +0 -25
  955. package/dist/chunk-TOM7TV5E.js.map +0 -1
  956. package/dist/chunk-TSRUDRT3.js +0 -59
  957. package/dist/chunk-TSRUDRT3.js.map +0 -1
  958. package/dist/chunk-U4FX33MW.js +0 -257
  959. package/dist/chunk-U4FX33MW.js.map +0 -1
  960. package/dist/chunk-UBOPWQWC.cjs +0 -28
  961. package/dist/chunk-UBOPWQWC.cjs.map +0 -1
  962. package/dist/chunk-UFE26GNF.js +0 -42
  963. package/dist/chunk-UFE26GNF.js.map +0 -1
  964. package/dist/chunk-UMQQVTEO.js +0 -257
  965. package/dist/chunk-UMQQVTEO.js.map +0 -1
  966. package/dist/chunk-UWY3SFAS.js +0 -10
  967. package/dist/chunk-UWY3SFAS.js.map +0 -1
  968. package/dist/chunk-V6EIIZPJ.js +0 -57
  969. package/dist/chunk-V6EIIZPJ.js.map +0 -1
  970. package/dist/chunk-V6G6W5CF.cjs +0 -61
  971. package/dist/chunk-V6G6W5CF.cjs.map +0 -1
  972. package/dist/chunk-VC4ZBWOK.js +0 -152
  973. package/dist/chunk-VC4ZBWOK.js.map +0 -1
  974. package/dist/chunk-VJRF6ILX.js +0 -35
  975. package/dist/chunk-VJRF6ILX.js.map +0 -1
  976. package/dist/chunk-VNSLCFO4.js +0 -787
  977. package/dist/chunk-VNSLCFO4.js.map +0 -1
  978. package/dist/chunk-W7GAP7ST.js +0 -21
  979. package/dist/chunk-W7GAP7ST.js.map +0 -1
  980. package/dist/chunk-WFUASJHS.js +0 -64
  981. package/dist/chunk-WFUASJHS.js.map +0 -1
  982. package/dist/chunk-WIKSIT3M.js +0 -46
  983. package/dist/chunk-WIKSIT3M.js.map +0 -1
  984. package/dist/chunk-WKLZLFLY.cjs +0 -32
  985. package/dist/chunk-WKLZLFLY.cjs.map +0 -1
  986. package/dist/chunk-WNB5HYON.cjs +0 -10
  987. package/dist/chunk-WNB5HYON.cjs.map +0 -1
  988. package/dist/chunk-WO5P2XBP.js +0 -86
  989. package/dist/chunk-WO5P2XBP.js.map +0 -1
  990. package/dist/chunk-WPYC4NGZ.cjs +0 -46
  991. package/dist/chunk-WPYC4NGZ.cjs.map +0 -1
  992. package/dist/chunk-WQRYZY67.cjs +0 -89
  993. package/dist/chunk-WQRYZY67.cjs.map +0 -1
  994. package/dist/chunk-WVCYVMJU.js +0 -11
  995. package/dist/chunk-WVCYVMJU.js.map +0 -1
  996. package/dist/chunk-WX25G2S3.js +0 -116
  997. package/dist/chunk-WX25G2S3.js.map +0 -1
  998. package/dist/chunk-X4FE7RRQ.js +0 -23
  999. package/dist/chunk-X4FE7RRQ.js.map +0 -1
  1000. package/dist/chunk-X6EIJNOQ.cjs +0 -67
  1001. package/dist/chunk-X6EIJNOQ.cjs.map +0 -1
  1002. package/dist/chunk-XUBATJH6.js +0 -1769
  1003. package/dist/chunk-XUBATJH6.js.map +0 -1
  1004. package/dist/chunk-XUMREYMG.js +0 -293
  1005. package/dist/chunk-XUMREYMG.js.map +0 -1
  1006. package/dist/chunk-XYAJ2FS2.js +0 -31
  1007. package/dist/chunk-XYAJ2FS2.js.map +0 -1
  1008. package/dist/chunk-YKES5P4H.cjs +0 -58
  1009. package/dist/chunk-YKES5P4H.cjs.map +0 -1
  1010. package/dist/chunk-YYAQ75AV.cjs +0 -216
  1011. package/dist/chunk-YYAQ75AV.cjs.map +0 -1
  1012. package/dist/chunk-YZ3NJKVV.js +0 -42
  1013. package/dist/chunk-YZ3NJKVV.js.map +0 -1
  1014. package/dist/chunk-Z5ECTUMN.cjs +0 -104
  1015. package/dist/chunk-Z5ECTUMN.cjs.map +0 -1
  1016. package/dist/chunk-ZAKVHYDL.cjs +0 -28
  1017. package/dist/chunk-ZAKVHYDL.cjs.map +0 -1
  1018. package/dist/chunk-ZF34JXGU.js +0 -39
  1019. package/dist/chunk-ZF34JXGU.js.map +0 -1
  1020. package/dist/chunk-ZHGWDP2M.cjs +0 -101
  1021. package/dist/chunk-ZHGWDP2M.cjs.map +0 -1
  1022. package/dist/chunk-ZLHTQQLT.js +0 -13
  1023. package/dist/chunk-ZLHTQQLT.js.map +0 -1
  1024. package/dist/chunk-ZPAMY3IZ.cjs +0 -25
  1025. package/dist/chunk-ZPAMY3IZ.cjs.map +0 -1
  1026. package/dist/chunk-ZR63UB4V.js +0 -42
  1027. package/dist/chunk-ZR63UB4V.js.map +0 -1
  1028. package/dist/chunk-ZRCEB3KL.js +0 -11
  1029. package/dist/chunk-ZRCEB3KL.js.map +0 -1
  1030. package/dist/chunk-ZRGQNRQI.cjs +0 -36
  1031. package/dist/chunk-ZRGQNRQI.cjs.map +0 -1
  1032. package/dist/chunk-ZVY4IL7O.cjs +0 -22
  1033. package/dist/chunk-ZVY4IL7O.cjs.map +0 -1
  1034. package/dist/chunk-ZWIVKODQ.js +0 -49
  1035. package/dist/chunk-ZWIVKODQ.js.map +0 -1
  1036. package/dist/chunk-ZYF2HNMZ.js +0 -10
  1037. package/dist/chunk-ZYF2HNMZ.js.map +0 -1
  1038. package/dist/copilot/index.cjs.map +0 -1
  1039. package/dist/copilot/index.js.map +0 -1
  1040. package/dist/directionsPdf-GITP3SCP.cjs +0 -274
  1041. package/dist/directionsPdf-GITP3SCP.cjs.map +0 -1
  1042. package/dist/directionsPdf-TDKVUBCU.js +0 -272
  1043. package/dist/directionsPdf-TDKVUBCU.js.map +0 -1
  1044. package/dist/headless/index.cjs.map +0 -1
  1045. package/dist/headless/index.js.map +0 -1
  1046. package/dist/hostRegistry-BTG-KkRY.d.cts +0 -115
  1047. package/dist/hostRegistry-BTG-KkRY.d.ts +0 -115
  1048. package/dist/index-CELBpE13.d.cts +0 -4198
  1049. package/dist/index-nqc3A-ty.d.ts +0 -4198
  1050. package/dist/map/index.cjs.map +0 -1
  1051. package/dist/map/index.js.map +0 -1
  1052. package/dist/routingGuidePictures-CxgXiuNd.d.cts +0 -22
  1053. package/dist/routingGuidePictures-CxgXiuNd.d.ts +0 -22
  1054. package/dist/studioStrings-lNvOeC1g.d.cts +0 -72
  1055. package/dist/studioStrings-lNvOeC1g.d.ts +0 -72
  1056. package/dist/video/index.cjs.map +0 -1
  1057. package/dist/video/index.js.map +0 -1
@@ -1,1816 +1,1653 @@
1
1
  "use client";
2
- 'use strict';
3
-
4
- var chunkWQRYZY67_cjs = require('../chunk-WQRYZY67.cjs');
5
- var chunkLB57H6LF_cjs = require('../chunk-LB57H6LF.cjs');
6
- var chunkZVY4IL7O_cjs = require('../chunk-ZVY4IL7O.cjs');
7
- var chunkJI2M77Y7_cjs = require('../chunk-JI2M77Y7.cjs');
8
- require('../chunk-LLZUTIQB.cjs');
9
- var chunkLE3W2CSF_cjs = require('../chunk-LE3W2CSF.cjs');
10
- require('../chunk-GMQJZ5N7.cjs');
11
- var chunkKPD7K4XQ_cjs = require('../chunk-KPD7K4XQ.cjs');
12
- var chunk2GAMKPS2_cjs = require('../chunk-2GAMKPS2.cjs');
13
- require('../chunk-2MQBPZNR.cjs');
14
- require('../chunk-ECI4EKIV.cjs');
15
- var chunkYKES5P4H_cjs = require('../chunk-YKES5P4H.cjs');
16
- var chunkD6CDAYZ6_cjs = require('../chunk-D6CDAYZ6.cjs');
17
- var chunkGY7UMPHT_cjs = require('../chunk-GY7UMPHT.cjs');
18
- var chunkG2NDWNFB_cjs = require('../chunk-G2NDWNFB.cjs');
19
- var chunkX6EIJNOQ_cjs = require('../chunk-X6EIJNOQ.cjs');
20
- var chunk6WU7XEQA_cjs = require('../chunk-6WU7XEQA.cjs');
21
- var chunkWPYC4NGZ_cjs = require('../chunk-WPYC4NGZ.cjs');
22
- var chunkF6VFOI4U_cjs = require('../chunk-F6VFOI4U.cjs');
23
- var chunkLGNTAZ3L_cjs = require('../chunk-LGNTAZ3L.cjs');
24
- var chunkN6NWKUOR_cjs = require('../chunk-N6NWKUOR.cjs');
25
- var chunkANTDR5MJ_cjs = require('../chunk-ANTDR5MJ.cjs');
26
- var chunkV6G6W5CF_cjs = require('../chunk-V6G6W5CF.cjs');
27
- require('../chunk-K2E744ST.cjs');
28
- require('../chunk-LHXINV6N.cjs');
29
- require('../chunk-5F55MFIX.cjs');
30
- require('../chunk-WKLZLFLY.cjs');
31
- var chunkBFNXXLVV_cjs = require('../chunk-BFNXXLVV.cjs');
32
- require('../chunk-JFJVSJUX.cjs');
33
- var chunkZRGQNRQI_cjs = require('../chunk-ZRGQNRQI.cjs');
34
- require('../chunk-EWWHVV7R.cjs');
35
- require('../chunk-DUUPWSOZ.cjs');
36
- require('../chunk-3Q23QKNI.cjs');
37
- require('../chunk-JVFHF3LE.cjs');
38
- require('../chunk-II6C3LU2.cjs');
39
- require('../chunk-BAYGKSWY.cjs');
40
- var chunk6YD325QI_cjs = require('../chunk-6YD325QI.cjs');
41
- var chunk2DDL2LIJ_cjs = require('../chunk-2DDL2LIJ.cjs');
42
- var chunkQZ7W2E4U_cjs = require('../chunk-QZ7W2E4U.cjs');
43
- var core = require('@mantine/core');
44
- var react = require('react');
45
- var jsxRuntime = require('react/jsx-runtime');
46
- var studio = require('@mountaya/studio');
47
- var strings = require('@mountaya/studio/strings');
48
- var hooks = require('@mantine/hooks');
49
- var clientReact = require('@mountaya/client-react');
50
- var elementsReact = require('@mountaya/elements-react');
51
- var geo = require('@mountaya/elements/geo');
52
-
53
- var CARD_THUMB_PX = 52;
54
- var EmbedBaseMapPicker = ({
55
- description,
56
- label,
57
- locked,
58
- onChange,
59
- options,
60
- value
61
- }) => {
62
- const layerThumbnail = chunkQZ7W2E4U_cjs.useStudioLayerThumbnail();
63
- const labelId = react.useId();
64
- return /* @__PURE__ */ jsxRuntime.jsx(core.Input.Wrapper, { description, label, labelProps: { id: labelId }, children: /* @__PURE__ */ jsxRuntime.jsx(core.Box, { className: "mtya-field-control", mod: { described: Boolean(description) }, children: /* @__PURE__ */ jsxRuntime.jsx(
65
- core.Radio.Group,
66
- {
67
- inputContainer: (children) => /* @__PURE__ */ jsxRuntime.jsx(chunkG2NDWNFB_cjs.GroupLabelledBy, { labelledBy: labelId, children }),
68
- onChange: (slug) => {
69
- if (slug) {
70
- onChange(slug);
71
- }
72
- },
73
- value,
74
- children: /* @__PURE__ */ jsxRuntime.jsx(core.SimpleGrid, { cols: 3, spacing: "xs", children: options.map((option) => {
75
- const thumbnail = layerThumbnail("terrain", option.value);
76
- return /* @__PURE__ */ jsxRuntime.jsx(
77
- chunkG2NDWNFB_cjs.PickerCard,
78
- {
79
- imageMedia: thumbnail !== void 0,
80
- kindSlug: "embed-terrain",
81
- locked,
82
- name: option.label,
83
- value: option.value,
84
- children: thumbnail === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(core.Image, { alt: option.label, h: CARD_THUMB_PX, src: thumbnail, w: "100%" })
85
- },
86
- option.value
87
- );
88
- }) })
89
- }
90
- ) }) });
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
+ });
91
82
  };
92
- var GlyphPickerGrid = ({
93
- "aria-labelledby": labelledBy,
94
- cols,
95
- kindSlug,
96
- locked,
97
- onChange,
98
- options,
99
- value
100
- }) => /* @__PURE__ */ jsxRuntime.jsx(
101
- core.Radio.Group,
102
- {
103
- inputContainer: labelledBy === void 0 ? void 0 : (children) => /* @__PURE__ */ jsxRuntime.jsx(chunkG2NDWNFB_cjs.GroupLabelledBy, { labelledBy, children }),
104
- onChange,
105
- value,
106
- children: /* @__PURE__ */ jsxRuntime.jsx(core.SimpleGrid, { cols, spacing: "xs", children: options.map(({ glyph, label, value: optionValue }) => /* @__PURE__ */ jsxRuntime.jsx(
107
- chunkG2NDWNFB_cjs.PickerCard,
108
- {
109
- kindSlug,
110
- locked,
111
- name: label,
112
- value: optionValue,
113
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: glyph, size: chunkBFNXXLVV_cjs.iconSizes.md })
114
- },
115
- optionValue
116
- )) })
117
- }
118
- );
119
- var themeGlyph = {
120
- dark: "theme-dark",
121
- light: "theme-light"
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"
122
108
  };
123
- var EmbedThemePicker = ({
124
- description,
125
- label,
126
- locked,
127
- onChange,
128
- options,
129
- value
130
- }) => {
131
- const cards = options.map((option) => ({
132
- glyph: themeGlyph[option.value] ?? "theme-light",
133
- label: option.label,
134
- value: option.value
135
- }));
136
- const labelId = react.useId();
137
- return /* @__PURE__ */ jsxRuntime.jsx(core.Input.Wrapper, { description, label, labelProps: { id: labelId }, children: /* @__PURE__ */ jsxRuntime.jsx(core.Box, { className: "mtya-field-control", mod: { described: Boolean(description) }, children: /* @__PURE__ */ jsxRuntime.jsx(
138
- GlyphPickerGrid,
139
- {
140
- "aria-labelledby": labelId,
141
- cols: 2,
142
- kindSlug: "embed-theme",
143
- locked,
144
- onChange,
145
- options: cards,
146
- value
147
- }
148
- ) }) });
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
+ });
149
134
  };
150
- var tintGlyph = {
151
- dark: "theme-dark",
152
- light: "theme-light"
135
+ const tintGlyph = {
136
+ dark: "theme-dark",
137
+ light: "theme-light"
153
138
  };
154
- var EmbedTintPicker = ({
155
- description,
156
- label,
157
- locked,
158
- onChange,
159
- options,
160
- value
161
- }) => {
162
- const cards = options.map((option) => ({
163
- glyph: tintGlyph[option.value] ?? "theme-light",
164
- label: option.label,
165
- value: option.value
166
- }));
167
- const labelId = react.useId();
168
- return /* @__PURE__ */ jsxRuntime.jsx(core.Input.Wrapper, { description, label, labelProps: { id: labelId }, children: /* @__PURE__ */ jsxRuntime.jsx(core.Box, { className: "mtya-field-control", mod: { described: Boolean(description) }, children: /* @__PURE__ */ jsxRuntime.jsx(
169
- GlyphPickerGrid,
170
- {
171
- "aria-labelledby": labelId,
172
- cols: 2,
173
- kindSlug: "embed-tint",
174
- locked,
175
- onChange,
176
- options: cards,
177
- value
178
- }
179
- ) }) });
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
+ });
180
164
  };
181
- var SECTIONS = ["controls", "embed", "preferences"];
182
- var dependencyParam = (key) => studio.EMBED_CONFIG_FIELDS.find((candidate) => candidate.key === key)?.param ?? null;
183
- var EmbedToggleSwitch = ({
184
- checked,
185
- description,
186
- disabled,
187
- label,
188
- onChange,
189
- tooltip
190
- }) => {
191
- const control = /* @__PURE__ */ jsxRuntime.jsx(
192
- core.Switch,
193
- {
194
- checked,
195
- description,
196
- disabled,
197
- label,
198
- onChange: (event) => onChange(event.currentTarget.checked)
199
- }
200
- );
201
- return tooltip ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: tooltip, position: "top-start", children: control }) : control;
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;
202
184
  };
203
- var unitPickerFields = {
204
- preferredUnitLength: { kindSlug: "embed-length", options: strings.lengthUnitOptions },
205
- preferredUnitPace: { kindSlug: "embed-pace", options: strings.paceUnitOptions },
206
- preferredUnitSlope: { kindSlug: "embed-slope", options: strings.slopeUnitOptions },
207
- preferredUnitTemperature: { kindSlug: "embed-temperature", options: strings.temperatureUnitOptions }
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
+ }
208
202
  };
209
- var isUnitPickerKey = (key) => key in unitPickerFields;
210
- var flagOf = (config, key) => config[key] === true;
211
- var textOf = (config, key) => {
212
- const value = config[key];
213
- return typeof value === "string" ? value : "";
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 : "";
214
208
  };
215
- var listOf = (config, key) => {
216
- const value = config[key];
217
- return Array.isArray(value) ? value : [];
209
+ const listOf = (config, key) => {
210
+ const value = config[key];
211
+ return Array.isArray(value) ? value : [];
218
212
  };
219
- var fieldDependencies = studio.embedFieldDependencies;
220
- var configKeysRead = (field) => {
221
- if (field.kind === "boolean") {
222
- return [field.key, ...fieldDependencies[field.key] ?? []];
223
- }
224
- if (field.kind === "enum") {
225
- return isUnitPickerKey(field.key) ? [field.key, "preferredUnitLength"] : [field.key];
226
- }
227
- return [field.key];
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];
228
218
  };
229
- var fieldCopy = (bank, param) => bank[param] ?? param;
230
- var EmbedFieldControlBase = ({
231
- config,
232
- field,
233
- layerOptions,
234
- onPatch,
235
- safetyRules
236
- }) => {
237
- const languageMark = chunkQZ7W2E4U_cjs.useStudioLanguageMark();
238
- const languageOptions = chunkQZ7W2E4U_cjs.useStudioLanguages();
239
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS);
240
- const units = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS).preferences.units;
241
- const label = fieldCopy(words.embed.fields, field.param);
242
- const labelId = react.useId();
243
- if (field.kind === "boolean") {
244
- const restricted = studio.isFieldRestricted(field.key, safetyRules);
245
- const unmet = studio.fieldDependenciesUnmet(field.key, config);
246
- const blocked = restricted || unmet.length > 0;
247
- const blockingLabels = unmet.map((key) => dependencyParam(key)).filter((param) => param !== null).map((param) => `"${fieldCopy(words.embed.fields, param)}"`);
248
- const dependencyTooltip = blockingLabels.length === 0 ? void 0 : words.embed.requiresField(blockingLabels.join(words.embed.requiresFieldSeparator));
249
- return /* @__PURE__ */ jsxRuntime.jsx(
250
- EmbedToggleSwitch,
251
- {
252
- checked: flagOf(config, field.key),
253
- description: fieldCopy(words.embed.fieldsDesc, field.param),
254
- disabled: blocked,
255
- label,
256
- onChange: (checked) => onPatch({ [field.key]: checked }),
257
- tooltip: restricted ? words.embed.safetyRestricted : dependencyTooltip
258
- }
259
- );
260
- }
261
- if (field.kind === "enum") {
262
- if (field.key === "preferredLanguage") {
263
- return /* @__PURE__ */ jsxRuntime.jsx(
264
- chunkG2NDWNFB_cjs.LanguageSelect,
265
- {
266
- label,
267
- onChange: (language) => onPatch({ preferredLanguage: language }),
268
- options: languageOptions,
269
- renderMark: languageMark,
270
- value: config.preferredLanguage
271
- }
272
- );
273
- }
274
- if (field.key === "terrainVariant") {
275
- return /* @__PURE__ */ jsxRuntime.jsx(
276
- EmbedTintPicker,
277
- {
278
- label,
279
- onChange: (value) => onPatch({ terrainVariant: value === "dark" ? "dark" : "light" }),
280
- options: studio.terrainVariantOptions(words),
281
- value: config.terrainVariant
282
- }
283
- );
284
- }
285
- if (isUnitPickerKey(field.key)) {
286
- const picker = unitPickerFields[field.key];
287
- return /* @__PURE__ */ jsxRuntime.jsx(core.Input.Wrapper, { label, labelProps: { id: labelId }, children: /* @__PURE__ */ jsxRuntime.jsx(
288
- chunkG2NDWNFB_cjs.UnitPickerGrid,
289
- {
290
- "aria-labelledby": labelId,
291
- kindSlug: picker.kindSlug,
292
- onChange: (value) => onPatch({ [field.key]: value }),
293
- options: picker.options(units, config.preferredUnitLength),
294
- value: textOf(config, field.key)
295
- }
296
- ) });
297
- }
298
- return /* @__PURE__ */ jsxRuntime.jsx(
299
- EmbedThemePicker,
300
- {
301
- label,
302
- onChange: (value) => onPatch({ [field.key]: value }),
303
- options: studio.enumFieldOptions(field.key, words),
304
- value: textOf(config, field.key)
305
- }
306
- );
307
- }
308
- if (field.kind === "string") {
309
- if (field.key === "segmentsColor") {
310
- const segmentsColor = config.segmentsColor;
311
- return /* @__PURE__ */ jsxRuntime.jsx(
312
- core.ColorInput,
313
- {
314
- label,
315
- onChange: (value) => onPatch({ segmentsColor: value }),
316
- placeholder: words.embed.fields.segments_color_placeholder,
317
- rightSection: segmentsColor === "" ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(
318
- core.CloseButton,
319
- {
320
- "aria-label": words.embed.fields.segments_color_clear,
321
- onClick: () => onPatch({ segmentsColor: "" })
322
- }
323
- ),
324
- rightSectionPointerEvents: "all",
325
- value: segmentsColor
326
- }
327
- );
328
- }
329
- return /* @__PURE__ */ jsxRuntime.jsx(
330
- EmbedBaseMapPicker,
331
- {
332
- label,
333
- onChange: (slug) => onPatch({ [field.key]: slug }),
334
- options: layerOptions.terrains,
335
- value: textOf(config, field.key)
336
- }
337
- );
338
- }
339
- const allowlistModeLabels = {
340
- all: words.embed.allowlist.all,
341
- specific: words.embed.allowlist.specific
342
- };
343
- if (field.key === "withOverlays") {
344
- const overlaysWithheld = !studio.overlaysOffered([], safetyRules?.with_overlays);
345
- return /* @__PURE__ */ jsxRuntime.jsx(
346
- chunkLB57H6LF_cjs.AllowlistField,
347
- {
348
- data: layerOptions.overlayGroups,
349
- description: overlaysWithheld ? words.embed.safetyRestricted : void 0,
350
- disabled: overlaysWithheld && layerOptions.overlayGroups.length === 0,
351
- label,
352
- modeLabels: allowlistModeLabels,
353
- nothingFoundMessage: words.controls.layers,
354
- onChange: (value) => onPatch({ withOverlays: value }),
355
- placeholder: words.embed.allowlist.overlaysPlaceholder,
356
- selectionCountLabel: words.embed.allowlist.selectedCount,
357
- value: config.withOverlays,
358
- variant: "display"
359
- }
360
- );
361
- }
362
- return /* @__PURE__ */ jsxRuntime.jsx(
363
- chunkLB57H6LF_cjs.AllowlistField,
364
- {
365
- data: layerOptions.terrains,
366
- label,
367
- modeLabels: allowlistModeLabels,
368
- nothingFoundMessage: words.controls.layers,
369
- onChange: (value) => onPatch({ [field.key]: value }),
370
- placeholder: words.embed.allowlist.terrainsPlaceholder,
371
- selectionCountLabel: words.embed.allowlist.selectedCount,
372
- value: listOf(config, field.key),
373
- variant: "display"
374
- }
375
- );
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
+ });
376
330
  };
377
- var 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]);
378
- var EmbedFieldControl = react.memo(EmbedFieldControlBase, sameFieldProps);
379
- var SECTIONS2 = ["embed"];
380
- var CODE_DEBOUNCE_MS = 300;
381
- var IFRAME_WIDTH = "100%";
382
- var IFRAME_HEIGHT = "480";
383
- var useEmbedCode = ({
384
- collectionId,
385
- config,
386
- defaultView,
387
- defaults,
388
- element,
389
- itineraryId,
390
- name,
391
- publishableKey,
392
- requireSessionToken,
393
- tableItineraryId,
394
- tables
395
- }) => {
396
- const appOrigin = chunkQZ7W2E4U_cjs.useStudioAppOrigin();
397
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS2);
398
- const [settled] = hooks.useDebouncedValue(config, CODE_DEBOUNCE_MS);
399
- const viewHash = react.useMemo(() => studio.buildEmbedViewHash(defaultView), [defaultView]);
400
- const iframeTitle = words.embed.code.iframeTitle(name);
401
- return react.useMemo(() => {
402
- if (!publishableKey) {
403
- return null;
404
- }
405
- if (studio.isEmbedTableElement(element)) {
406
- return tableItineraryId === null ? null : {
407
- code: studio.buildEmbedTableCode({
408
- columns: studio.embedTableColumns(element, tables),
409
- element,
410
- itineraryId: tableItineraryId,
411
- language: settled.preferredLanguage,
412
- length: settled.preferredUnitLength,
413
- publishableKey,
414
- requireSessionToken,
415
- serviceFilter: tables.serviceFilter
416
- }),
417
- language: "tsx"
418
- };
419
- }
420
- const iframe = studio.buildEmbedIframe({
421
- height: IFRAME_HEIGHT,
422
- src: studio.buildEmbedSrc(
423
- appOrigin,
424
- studio.buildEmbedSearch({
425
- collectionId: collectionId ?? void 0,
426
- config: settled,
427
- defaults,
428
- itineraryId: itineraryId ?? void 0,
429
- publishableKey
430
- }),
431
- viewHash
432
- ),
433
- title: iframeTitle,
434
- width: IFRAME_WIDTH
435
- });
436
- return {
437
- code: requireSessionToken ? `${iframe}
438
- ${studio.buildEmbedSessionScript({ appOrigin })}` : iframe,
439
- language: "html"
440
- };
441
- }, [
442
- appOrigin,
443
- collectionId,
444
- defaults,
445
- element,
446
- iframeTitle,
447
- itineraryId,
448
- publishableKey,
449
- requireSessionToken,
450
- settled,
451
- tableItineraryId,
452
- tables,
453
- viewHash
454
- ]);
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
+ ]);
455
388
  };
456
- var PAGE_LIMIT = 100;
457
- var NO_ITINERARIES = [];
458
- var useEmbedCollectionItineraries = (collectionId) => {
459
- const { data, isLoading } = clientReact.useMountayaQuery(
460
- "rest",
461
- "getCollectionItineraries",
462
- { collection_id: collectionId ?? "", query: { limit: PAGE_LIMIT } },
463
- { enabled: collectionId !== void 0, select: (body) => body.data }
464
- );
465
- return { itineraries: data ?? NO_ITINERARIES, pending: isLoading };
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
+ };
466
403
  };
467
- var SECTIONS3 = ["embed"];
468
- var useEmbedLayerOptions = (config, safetyRules, organizationId) => {
469
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS3);
470
- const language = elementsReact.useMountayaLanguage();
471
- const { overlayGroups, terrainOptions } = chunkLB57H6LF_cjs.useLayerCatalogOptions(language, organizationId);
472
- const otherLabel = words.embed.overlaysOther;
473
- const allowedOverlays = safetyRules?.with_overlays;
474
- return react.useMemo(
475
- () => studio.embedLayerOptions(
476
- { overlayGroups, terrains: terrainOptions },
477
- {
478
- terrain: config.terrain,
479
- withOverlays: config.withOverlays,
480
- withTerrains: config.withTerrains
481
- },
482
- allowedOverlays,
483
- otherLabel
484
- ),
485
- [
486
- allowedOverlays,
487
- config.terrain,
488
- config.withOverlays,
489
- config.withTerrains,
490
- otherLabel,
491
- overlayGroups,
492
- terrainOptions
493
- ]
494
- );
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
+ ]);
495
427
  };
496
- var CAMERA_REQUEST_TIMEOUT_MS = 1500;
497
- var previewOriginOf = (appOrigin) => {
498
- try {
499
- return new URL(appOrigin, window.location.href).origin;
500
- } catch {
501
- return window.location.origin;
502
- }
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
+ }
503
435
  };
504
- var useEmbedPreviewCamera = () => {
505
- const appOrigin = chunkQZ7W2E4U_cjs.useStudioAppOrigin();
506
- const appOriginRef = elementsReact.useLatestRef(appOrigin);
507
- const previewWindowRef = react.useRef(null);
508
- const pendingRef = react.useRef(null);
509
- const registerPreviewWindow = react.useCallback((win) => {
510
- previewWindowRef.current = win;
511
- }, []);
512
- react.useEffect(() => {
513
- const onMessage = (event) => {
514
- if (event.source !== previewWindowRef.current || event.origin !== previewOriginOf(appOriginRef.current)) {
515
- return;
516
- }
517
- const parsed = studio.cameraMessageSchema.safeParse(event.data);
518
- if (!parsed.success) {
519
- return;
520
- }
521
- const resolve = pendingRef.current;
522
- if (!resolve) {
523
- return;
524
- }
525
- pendingRef.current = null;
526
- resolve({
527
- bearing: parsed.data.bearing,
528
- center: parsed.data.center,
529
- pitch: parsed.data.pitch,
530
- zoom: parsed.data.zoom
531
- });
532
- };
533
- window.addEventListener("message", onMessage);
534
- return () => {
535
- window.removeEventListener("message", onMessage);
536
- };
537
- }, [appOriginRef]);
538
- const requestCamera = react.useCallback(() => {
539
- const previewWindow = previewWindowRef.current;
540
- if (!previewWindow) {
541
- return Promise.resolve(null);
542
- }
543
- return new Promise((resolve) => {
544
- pendingRef.current?.(null);
545
- const timeout = window.setTimeout(() => {
546
- if (pendingRef.current === settle) {
547
- pendingRef.current = null;
548
- resolve(null);
549
- }
550
- }, CAMERA_REQUEST_TIMEOUT_MS);
551
- const settle = (view) => {
552
- window.clearTimeout(timeout);
553
- resolve(view);
554
- };
555
- pendingRef.current = settle;
556
- previewWindow.postMessage(
557
- { type: studio.REQUEST_CAMERA_MESSAGE },
558
- previewOriginOf(appOriginRef.current)
559
- );
560
- });
561
- }, [appOriginRef]);
562
- return react.useMemo(
563
- () => ({ registerPreviewWindow, requestCamera }),
564
- [registerPreviewWindow, requestCamera]
565
- );
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]);
566
487
  };
567
- var SECTIONS4 = ["embed"];
568
- var emptyDefaultView = {
569
- bearing: null,
570
- center: null,
571
- pitch: null,
572
- zoom: null
488
+ const SECTIONS$8 = ["embed"];
489
+ const emptyDefaultView = {
490
+ bearing: null,
491
+ center: null,
492
+ pitch: null,
493
+ zoom: null
573
494
  };
574
- var UNSET_READOUT = "\u2013";
575
- var zoomDigits = { maximumFractionDigits: 1 };
576
- var DefaultViewControl = ({ onCapture, view }) => {
577
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS4);
578
- const { formatNumber } = chunkQZ7W2E4U_cjs.useStudioFormatters();
579
- const [capturing, setCapturing] = react.useState(false);
580
- const handleCapture = react.useCallback(async () => {
581
- setCapturing(true);
582
- try {
583
- await onCapture();
584
- } finally {
585
- setCapturing(false);
586
- }
587
- }, [onCapture]);
588
- const hasView = view.zoom !== null || view.bearing !== null || view.pitch !== null || view.center !== null;
589
- const readouts = [
590
- {
591
- label: words.embed.defaultView.zoomLabel,
592
- value: view.zoom === null ? UNSET_READOUT : formatNumber(view.zoom, zoomDigits)
593
- },
594
- {
595
- label: words.embed.defaultView.bearingLabel,
596
- value: view.bearing === null ? UNSET_READOUT : `${Math.round(view.bearing)}\xB0`
597
- },
598
- {
599
- label: words.embed.defaultView.pitchLabel,
600
- value: view.pitch === null ? UNSET_READOUT : `${Math.round(view.pitch)}\xB0`
601
- },
602
- {
603
- label: words.embed.defaultView.centerLabel,
604
- // A centre that names no place states nothing, as no centre does.
605
- value: (view.center === null ? null : geo.formatLngLat(view.center)) ?? UNSET_READOUT
606
- }
607
- ];
608
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "sm", children: [
609
- /* @__PURE__ */ jsxRuntime.jsx(
610
- core.Button,
611
- {
612
- leftSection: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "action-capture-view", size: chunkBFNXXLVV_cjs.iconSizes.sm }),
613
- loading: capturing,
614
- onClick: () => {
615
- void handleCapture();
616
- },
617
- variant: "light",
618
- children: words.embed.defaultView.capture
619
- }
620
- ),
621
- /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: "xxs", children: readouts.map((readout) => /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { justify: "space-between", children: [
622
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "dimmed", size: "xs", children: readout.label }),
623
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: hasView ? void 0 : "dimmed", fw: 600, children: readout.value })
624
- ] }, readout.label)) })
625
- ] });
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
+ });
626
557
  };
627
- var SECTIONS5 = ["embed"];
628
- var EmbedKeyPanel = ({
629
- element,
630
- keys,
631
- onChange,
632
- requireSessionToken,
633
- value
634
- }) => {
635
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS5);
636
- const options = react.useMemo(
637
- () => keys.keys.map((key) => ({
638
- description: studio.truncateKey(key.key),
639
- label: key.name,
640
- value: key.key
641
- })),
642
- [keys]
643
- );
644
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { children: [
645
- options.length > 0 ? (
646
- // The chosen key is not clicked away: an embed carries one key, and the wizard would
647
- // answer an emptied selection with the first key offered, one the publisher never chose.
648
- /* @__PURE__ */ jsxRuntime.jsx(
649
- core.Select,
650
- {
651
- allowDeselect: false,
652
- data: options,
653
- description: words.embed.key.description,
654
- label: words.embed.key.label,
655
- leftSection: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "api-key", size: chunkBFNXXLVV_cjs.iconSizes.sm }),
656
- onChange,
657
- placeholder: words.embed.key.placeholder,
658
- required: true,
659
- value,
660
- withAsterisk: true
661
- }
662
- )
663
- ) : (
664
- // No embeddable key available: the list is empty, or this reader is denied it. The
665
- // access-neutral note asks an admin to create one and links to the host's destination
666
- // for it when there is one; an admin can act on the link, a member just reads it.
667
- /* @__PURE__ */ jsxRuntime.jsx(chunkANTDR5MJ_cjs.WarningAlert, { title: words.embed.key.label, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
668
- words.embed.key.empty,
669
- keys.createKeyHref === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(core.Anchor, { href: keys.createKeyHref, rel: "noreferrer", target: "_blank", children: words.embed.key.createCta })
670
- ] }) })
671
- ),
672
- requireSessionToken ? /* @__PURE__ */ jsxRuntime.jsx(core.Alert, { color: "blue", icon: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "info", size: chunkBFNXXLVV_cjs.iconSizes.md }), children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
673
- studio.isEmbedTableElement(element) ? words.embed.key.sessionTokenTable : words.embed.key.sessionToken,
674
- keys.sessionTokenHref === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(core.Anchor, { href: keys.sessionTokenHref, rel: "noreferrer", target: "_blank", children: words.embed.key.sessionTokenLink })
675
- ] }) }) : null
676
- ] });
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] });
677
607
  };
678
- var SECTIONS6 = ["embed"];
679
- var EmbedSnippetCode = react.lazy(
680
- () => import('../EmbedSnippetCode-NMFCQ7TF.cjs').then((module) => ({ default: module.EmbedSnippetCode }))
681
- );
682
- var EmbedCodeStep = ({ children, description, position, title }) => {
683
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS6);
684
- return /* @__PURE__ */ jsxRuntime.jsx(chunkWQRYZY67_cjs.SectionCard, { children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "md", children: [
685
- /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
686
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "mtya-embed-step-mark", children: position }),
687
- /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
688
- /* @__PURE__ */ jsxRuntime.jsxs("h4", { className: "mtya-section-card-title", children: [
689
- /* @__PURE__ */ jsxRuntime.jsxs(core.VisuallyHidden, { children: [
690
- words.embed.code.step(position),
691
- " "
692
- ] }),
693
- title
694
- ] }),
695
- description === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "dimmed", children: description })
696
- ] })
697
- ] }),
698
- children
699
- ] }) });
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
+ }) });
700
634
  };
701
- var EmbedCodeBlock = ({ code, copyLabel, language }) => {
702
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS6);
703
- return /* @__PURE__ */ jsxRuntime.jsx(
704
- react.Suspense,
705
- {
706
- fallback: /* @__PURE__ */ jsxRuntime.jsx(core.Group, { justify: "center", p: "md", children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { size: "sm" }) }),
707
- children: /* @__PURE__ */ jsxRuntime.jsx(
708
- EmbedSnippetCode,
709
- {
710
- ariaLabel: copyLabel,
711
- code,
712
- copiedLabel: words.embed.code.copied,
713
- copyLabel,
714
- language
715
- }
716
- )
717
- }
718
- );
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
+ });
719
651
  };
720
- var EmbedDomainsNote = ({ domains, element, href }) => {
721
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS6);
722
- const copy = words.embed.domains;
723
- const table = studio.isEmbedTableElement(element);
724
- const link = href === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(core.Anchor, { href, rel: "noreferrer", target: "_blank", children: copy.manage });
725
- if (domains !== void 0 && domains.length > 0 && domains.every((entry) => studio.isLoopbackDomain(entry))) {
726
- const listedLocal = domains.join(copy.separator);
727
- const localOnly = table ? { body: copy.tableLocalOnly.body(listedLocal), title: copy.tableLocalOnly.title } : { body: copy.embedLocalOnly.body(listedLocal), title: copy.embedLocalOnly.title };
728
- return /* @__PURE__ */ jsxRuntime.jsx(chunkANTDR5MJ_cjs.WarningAlert, { title: localOnly.title, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
729
- localOnly.body,
730
- link
731
- ] }) });
732
- }
733
- if (domains !== void 0 && domains.length === 0) {
734
- return /* @__PURE__ */ jsxRuntime.jsx(chunkANTDR5MJ_cjs.WarningAlert, { title: table ? copy.tableNone.title : copy.embedNone.title, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
735
- table ? copy.tableNone.body : copy.embedNone.body,
736
- link
737
- ] }) });
738
- }
739
- const listed = domains === void 0 ? "" : domains.join(copy.separator);
740
- const sentence = domains === void 0 ? table ? copy.tableUnknown : copy.embedUnknown : table ? copy.tableListed(listed) : copy.embedListed(listed);
741
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
742
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { children: sentence }),
743
- link
744
- ] });
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
+ });
745
691
  };
746
- var EmbedCodeSection = ({
747
- code,
748
- domains,
749
- element,
750
- keys,
751
- onPublishableKeyChange,
752
- publishableKey,
753
- requireSessionToken,
754
- withheld
755
- }) => {
756
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS6);
757
- const copy = words.embed.code;
758
- const table = studio.isEmbedTableElement(element);
759
- const codeStep = table ? 3 : 2;
760
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { className: "mtya-wizard-page", gap: "lg", children: [
761
- /* @__PURE__ */ jsxRuntime.jsx(
762
- chunkD6CDAYZ6_cjs.SectionHead,
763
- {
764
- description: table ? words.embed.sectionHelp.codeTable : words.embed.sectionHelp.code,
765
- title: words.embed.sections.code
766
- }
767
- ),
768
- /* @__PURE__ */ jsxRuntime.jsx(EmbedCodeStep, { position: 1, title: copy.keyTitle, children: /* @__PURE__ */ jsxRuntime.jsx(
769
- EmbedKeyPanel,
770
- {
771
- element,
772
- keys,
773
- onChange: onPublishableKeyChange,
774
- requireSessionToken,
775
- value: publishableKey
776
- }
777
- ) }),
778
- table ? /* @__PURE__ */ jsxRuntime.jsx(
779
- EmbedCodeStep,
780
- {
781
- description: copy.install.description,
782
- position: 2,
783
- title: copy.install.title,
784
- children: /* @__PURE__ */ jsxRuntime.jsx(
785
- EmbedCodeBlock,
786
- {
787
- code: studio.EMBED_TABLE_INSTALL_COMMAND,
788
- copyLabel: copy.copyCommand,
789
- language: "text"
790
- }
791
- )
792
- }
793
- ) : null,
794
- /* @__PURE__ */ jsxRuntime.jsxs(
795
- EmbedCodeStep,
796
- {
797
- description: table ? copy.component.description : copy.iframe.description,
798
- position: codeStep,
799
- title: table ? copy.component.title : copy.iframe.title,
800
- children: [
801
- code === null ? (
802
- // No code to hand over: the step says what is missing where the code would stand. A
803
- // key missing is the one the step before this answers, so it is said as an
804
- // instruction. Any other reason is the sentence the wizard's footer says.
805
- /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { align: "flex-start", gap: "sm", wrap: "nowrap", children: [
806
- /* @__PURE__ */ jsxRuntime.jsx(core.Box, { c: "dimmed", mt: "xxs", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "locked", size: chunkBFNXXLVV_cjs.iconSizes.md }) }),
807
- publishableKey === null ? /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
808
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { fw: 500, children: words.embed.gated.noKey.title }),
809
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "dimmed", children: words.embed.gated.noKey.description })
810
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "dimmed", children: withheld })
811
- ] })
812
- ) : /* @__PURE__ */ jsxRuntime.jsx(EmbedCodeBlock, { code: code.code, copyLabel: copy.copy, language: code.language }),
813
- table ? /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "dimmed", size: "xs", children: copy.otherFrameworks }) : null
814
- ]
815
- }
816
- ),
817
- /* @__PURE__ */ jsxRuntime.jsx(EmbedCodeStep, { position: codeStep + 1, title: copy.domainsTitle, children: /* @__PURE__ */ jsxRuntime.jsx(EmbedDomainsNote, { domains, element, href: keys.allowedDomainsHref }) })
818
- ] });
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
+ });
819
775
  };
820
- var SECTIONS7 = ["controls", "embed", "preferences"];
821
- var EmbedSectionReset = ({
822
- description,
823
- disabled,
824
- onClick,
825
- title
826
- }) => /* @__PURE__ */ jsxRuntime.jsx(
827
- core.Tooltip,
828
- {
829
- label: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
830
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "white", fw: 600, size: "xs", children: title }),
831
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { c: "dimmed", size: "xs", children: description })
832
- ] }),
833
- position: "bottom-end",
834
- withinPortal: true,
835
- children: /* @__PURE__ */ jsxRuntime.jsx(
836
- core.ActionIcon,
837
- {
838
- "aria-label": title,
839
- c: "dimmed",
840
- disabled,
841
- onClick,
842
- variant: "subtle",
843
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "action-reset", size: chunkBFNXXLVV_cjs.iconSizes.sm })
844
- }
845
- )
846
- }
847
- );
848
- var assignField = (patch, key, value) => {
849
- patch[key] = value;
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;
850
811
  };
851
- var EmbedConfigForm = ({
852
- config,
853
- defaults,
854
- element,
855
- layerOptions,
856
- onPatch,
857
- safetyRules,
858
- section
859
- }) => {
860
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS7);
861
- const fields = studio.embedElementSectionFields(element, section);
862
- const changes = studio.embedSectionChanges(element, section, config, defaults);
863
- const reset = () => {
864
- const patch = {};
865
- for (const field of fields) {
866
- assignField(patch, field.key, defaults[field.key]);
867
- }
868
- onPatch(patch);
869
- };
870
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "lg", children: [
871
- /* @__PURE__ */ jsxRuntime.jsx(
872
- chunkD6CDAYZ6_cjs.SectionHead,
873
- {
874
- action: /* @__PURE__ */ jsxRuntime.jsx(
875
- EmbedSectionReset,
876
- {
877
- description: words.embed.reset.section.description,
878
- disabled: changes === 0,
879
- onClick: reset,
880
- title: words.embed.reset.section.title
881
- }
882
- ),
883
- description: section === "appearance" && studio.isEmbedTableElement(element) ? words.embed.sectionHelp.appearanceTable : words.embed.sectionHelp[section],
884
- title: words.embed.sections[section]
885
- }
886
- ),
887
- /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: "sm", children: fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
888
- EmbedFieldControl,
889
- {
890
- config,
891
- field,
892
- layerOptions,
893
- onPatch,
894
- safetyRules
895
- },
896
- field.key
897
- )) })
898
- ] });
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
+ });
899
843
  };
900
- var EmbedDefaultViewSection = ({
901
- defaultView,
902
- onCaptureCamera,
903
- onDefaultViewReset
904
- }) => {
905
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS7);
906
- const atDefault = defaultView.zoom === null && defaultView.bearing === null && defaultView.pitch === null && defaultView.center === null;
907
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "lg", children: [
908
- /* @__PURE__ */ jsxRuntime.jsx(
909
- chunkD6CDAYZ6_cjs.SectionHead,
910
- {
911
- action: /* @__PURE__ */ jsxRuntime.jsx(
912
- EmbedSectionReset,
913
- {
914
- description: words.embed.reset.defaultView.description,
915
- disabled: atDefault,
916
- onClick: onDefaultViewReset,
917
- title: words.embed.reset.defaultView.title
918
- }
919
- ),
920
- description: words.embed.defaultView.help,
921
- title: words.embed.sections.defaultView
922
- }
923
- ),
924
- /* @__PURE__ */ jsxRuntime.jsx(DefaultViewControl, { onCapture: onCaptureCamera, view: defaultView })
925
- ] });
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
+ });
926
863
  };
927
- var SECTIONS8 = ["controls", "embed", "preferences"];
928
- var TABLE_SECTIONS = ["table"];
929
- var EmbedColumnsSection = ({ element, onChange, options }) => {
930
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS8);
931
- const { table } = elementsReact.useMountayaScopedStrings(TABLE_SECTIONS);
932
- const copy = words.embed.columns;
933
- const toggleSegment = (column, shown) => onChange({
934
- ...options,
935
- segmentColumns: studio.toggleEmbedTableColumn(
936
- studio.EMBED_SEGMENT_TABLE_COLUMNS,
937
- options.segmentColumns,
938
- column,
939
- shown
940
- )
941
- });
942
- const toggleWaypoint = (column, shown) => onChange({
943
- ...options,
944
- waypointColumns: studio.toggleEmbedTableColumn(
945
- studio.EMBED_WAYPOINT_TABLE_COLUMNS,
946
- options.waypointColumns,
947
- column,
948
- shown
949
- )
950
- });
951
- const reset = () => onChange(
952
- element === "segment-table" ? { ...options, segmentColumns: studio.defaultEmbedTableOptions.segmentColumns } : {
953
- ...options,
954
- serviceFilter: studio.defaultEmbedTableOptions.serviceFilter,
955
- waypointColumns: studio.defaultEmbedTableOptions.waypointColumns
956
- }
957
- );
958
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "lg", children: [
959
- /* @__PURE__ */ jsxRuntime.jsx(
960
- chunkD6CDAYZ6_cjs.SectionHead,
961
- {
962
- action: /* @__PURE__ */ jsxRuntime.jsx(
963
- EmbedSectionReset,
964
- {
965
- description: words.embed.reset.columns.description,
966
- disabled: studio.embedTableChanges(element, options) === 0,
967
- onClick: reset,
968
- title: words.embed.reset.columns.title
969
- }
970
- ),
971
- description: words.embed.sectionHelp.columns,
972
- title: words.embed.sections.columns
973
- }
974
- ),
975
- /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: "sm", children: element === "segment-table" ? studio.EMBED_SEGMENT_TABLE_COLUMNS.map(
976
- (column) => column === "segment" ? /* @__PURE__ */ jsxRuntime.jsx(
977
- EmbedToggleSwitch,
978
- {
979
- checked: true,
980
- description: copy.locked,
981
- disabled: true,
982
- label: table[column],
983
- onChange: () => {
984
- }
985
- },
986
- column
987
- ) : /* @__PURE__ */ jsxRuntime.jsx(
988
- EmbedToggleSwitch,
989
- {
990
- checked: options.segmentColumns.includes(column),
991
- description: copy.segment[column],
992
- label: table[column],
993
- onChange: (shown) => toggleSegment(column, shown)
994
- },
995
- column
996
- )
997
- ) : studio.EMBED_WAYPOINT_TABLE_COLUMNS.map(
998
- (column) => column === "waypoint" ? /* @__PURE__ */ jsxRuntime.jsx(
999
- EmbedToggleSwitch,
1000
- {
1001
- checked: true,
1002
- description: copy.locked,
1003
- disabled: true,
1004
- label: table[column],
1005
- onChange: () => {
1006
- }
1007
- },
1008
- column
1009
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1010
- EmbedToggleSwitch,
1011
- {
1012
- checked: options.waypointColumns.includes(column),
1013
- description: copy.waypoint[column],
1014
- label: table[column],
1015
- onChange: (shown) => toggleWaypoint(column, shown)
1016
- },
1017
- column
1018
- )
1019
- ) }),
1020
- element === "waypoint-table" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1021
- /* @__PURE__ */ jsxRuntime.jsx(core.Divider, {}),
1022
- /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "sm", children: [
1023
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { variant: "section-label", children: copy.filter.heading }),
1024
- /* @__PURE__ */ jsxRuntime.jsx(
1025
- EmbedToggleSwitch,
1026
- {
1027
- checked: options.serviceFilter,
1028
- description: copy.filter.description,
1029
- label: copy.filter.label,
1030
- onChange: (serviceFilter) => onChange({ ...options, serviceFilter })
1031
- }
1032
- )
1033
- ] })
1034
- ] }) : null
1035
- ] });
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
+ });
1036
946
  };
1037
- var SECTIONS9 = ["embed"];
1038
- var elementGlyphs = {
1039
- map: "action-embed",
1040
- "segment-table": "routed",
1041
- "waypoint-table": "pin"
947
+ const SECTIONS$3 = ["embed"];
948
+ const elementGlyphs = {
949
+ map: "action-embed",
950
+ "segment-table": "routed",
951
+ "waypoint-table": "pin"
1042
952
  };
1043
- var LIST_WIDTH = 340;
1044
- var ElementMark = ({ element }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mtya-rail-switcher-mark", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: elementGlyphs[element], size: chunkBFNXXLVV_cjs.iconSizes.xs }) });
1045
- var EmbedElementSwitcher = ({ onChange, value }) => {
1046
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS9);
1047
- const options = studio.EMBED_ELEMENTS.map(
1048
- (element) => ({
1049
- description: words.embed.elements[element].description,
1050
- id: element,
1051
- mark: /* @__PURE__ */ jsxRuntime.jsx(ElementMark, { element }),
1052
- name: words.embed.elements[element].name
1053
- })
1054
- );
1055
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "xxs", children: [
1056
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { px: "xxs", variant: "section-label", children: words.embed.elements.label }),
1057
- /* @__PURE__ */ jsxRuntime.jsx(
1058
- chunkWQRYZY67_cjs.RailSwitcher,
1059
- {
1060
- ariaLabel: words.embed.elements.switcherLabel,
1061
- caption: words.embed.elements[value].caption,
1062
- listLabel: words.embed.elements.label,
1063
- listWidth: LIST_WIDTH,
1064
- mark: /* @__PURE__ */ jsxRuntime.jsx(ElementMark, { element: value }),
1065
- name: words.embed.elements[value].name,
1066
- onSelect: onChange,
1067
- options,
1068
- overflow: "wrap",
1069
- value
1070
- }
1071
- )
1072
- ] });
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
+ });
1073
988
  };
1074
- var SECTIONS10 = ["actions", "embed", "privacy"];
1075
- var FAILURE_SECTIONS = ["failure"];
1076
- var CollectionSelect = ({ itineraryId, onChange, value }) => {
1077
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS10);
1078
- const holding = clientReact.useCollections({ itinerary_id: itineraryId }, { enabled: itineraryId !== "" });
1079
- chunkZVY4IL7O_cjs.useEveryPage(holding);
1080
- const { data, isLoading } = holding;
1081
- const options = react.useMemo(
1082
- () => (data ?? []).map((collection) => ({ label: collection.name, value: collection.id })),
1083
- [data]
1084
- );
1085
- return /* @__PURE__ */ jsxRuntime.jsx(
1086
- core.Select,
1087
- {
1088
- clearable: true,
1089
- data: options,
1090
- description: words.embed.collection.pickerDescription,
1091
- disabled: isLoading,
1092
- label: words.embed.collection.pickerLabel,
1093
- nothingFoundMessage: words.embed.collection.pickerEmpty,
1094
- onChange,
1095
- placeholder: words.embed.collection.pickerPlaceholder,
1096
- searchable: true,
1097
- value
1098
- }
1099
- );
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
+ });
1100
1016
  };
1101
- var EmbedVisibility = ({ isPrivate, itineraryId, organizationId }) => {
1102
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS10);
1103
- const editable = chunkZRGQNRQI_cjs.useItineraryEditable({ createdById: void 0, organizationId });
1104
- const { failure } = chunk2DDL2LIJ_cjs.useStudioScopedStrings(FAILURE_SECTIONS);
1105
- const notify = chunk2GAMKPS2_cjs.useStudioNotify();
1106
- const { dispatch } = chunk6YD325QI_cjs.useStudioDispatch();
1107
- const [pendingPrivate, setPendingPrivate] = react.useState(null);
1108
- const visibilityCopy = pendingPrivate === true ? words.privacy.confirm.toPrivate : words.privacy.confirm.toPublic;
1109
- const onConfirmVisibility = () => {
1110
- if (pendingPrivate !== null) {
1111
- void dispatch("studio.itinerary.update", {
1112
- isPrivate: pendingPrivate,
1113
- itineraryId
1114
- }).then((result) => {
1115
- const refusal = strings.failureAlertFor(result, "", failure);
1116
- if (refusal !== null) {
1117
- notify.error(refusal.message.trim());
1118
- }
1119
- });
1120
- }
1121
- setPendingPrivate(null);
1122
- };
1123
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1124
- /* @__PURE__ */ jsxRuntime.jsx(
1125
- chunkJI2M77Y7_cjs.PrivacyControl,
1126
- {
1127
- caption: words.privacy.embedScope,
1128
- disabled: !editable,
1129
- onChange: setPendingPrivate,
1130
- resource: "itinerary",
1131
- value: isPrivate
1132
- }
1133
- ),
1134
- /* @__PURE__ */ jsxRuntime.jsx(
1135
- chunkLE3W2CSF_cjs.ConfirmModal,
1136
- {
1137
- acknowledgeLabel: visibilityCopy.acknowledge,
1138
- body: visibilityCopy.body,
1139
- cancelLabel: words.actions.cancel,
1140
- closeLabel: words.actions.close,
1141
- confirmLabel: visibilityCopy.confirm,
1142
- onCancel: () => setPendingPrivate(null),
1143
- onConfirm: onConfirmVisibility,
1144
- opened: pendingPrivate !== null,
1145
- title: visibilityCopy.title,
1146
- tone: "cautionary",
1147
- zIndex: chunkKPD7K4XQ_cjs.CONFIRM_MODAL_Z_INDEX
1148
- }
1149
- )
1150
- ] });
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
+ })] });
1151
1057
  };
1152
- var EmbedGeneralSection = ({
1153
- collectionId,
1154
- element,
1155
- isPrivate,
1156
- itineraries,
1157
- itinerariesPending,
1158
- itineraryId,
1159
- onCollectionIdChange,
1160
- onTableItineraryIdChange,
1161
- organizationId,
1162
- tableItineraryId
1163
- }) => {
1164
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS10);
1165
- const itineraryOptions = react.useMemo(
1166
- () => itineraries.map((itinerary) => ({ label: itinerary.name, value: itinerary.id })),
1167
- [itineraries]
1168
- );
1169
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "lg", children: [
1170
- /* @__PURE__ */ jsxRuntime.jsx(
1171
- chunkD6CDAYZ6_cjs.SectionHead,
1172
- {
1173
- description: itineraryId === void 0 ? words.embed.sectionHelp.generalCollection : words.embed.sectionHelp.general,
1174
- title: words.embed.sections.general
1175
- }
1176
- ),
1177
- itineraryId === void 0 ? (
1178
- // A collection target: the one thing to state is which of its itineraries a table lists.
1179
- // The choice is never emptied, since a table of no itinerary is no table.
1180
- /* @__PURE__ */ jsxRuntime.jsx(
1181
- core.Select,
1182
- {
1183
- allowDeselect: false,
1184
- data: itineraryOptions,
1185
- description: words.embed.itinerary.pickerDescription,
1186
- disabled: itinerariesPending,
1187
- label: words.embed.itinerary.pickerLabel,
1188
- nothingFoundMessage: words.embed.itinerary.pickerEmpty,
1189
- onChange: (next) => {
1190
- if (next !== null) {
1191
- onTableItineraryIdChange(next);
1192
- }
1193
- },
1194
- placeholder: words.embed.itinerary.pickerPlaceholder,
1195
- searchable: true,
1196
- value: tableItineraryId
1197
- }
1198
- )
1199
- ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1200
- /* @__PURE__ */ jsxRuntime.jsx(
1201
- EmbedVisibility,
1202
- {
1203
- isPrivate,
1204
- itineraryId,
1205
- organizationId
1206
- }
1207
- ),
1208
- studio.isEmbedTableElement(element) ? null : /* @__PURE__ */ jsxRuntime.jsx(
1209
- CollectionSelect,
1210
- {
1211
- itineraryId,
1212
- onChange: onCollectionIdChange,
1213
- value: collectionId
1214
- }
1215
- )
1216
- ] })
1217
- ] });
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
+ });
1218
1092
  };
1219
- var SECTIONS11 = ["embed", "publish"];
1220
- var EmbedTablePreview = react.lazy(
1221
- () => import('../EmbedTablePreview-Z3W62MRV.cjs').then((module) => ({ default: module.EmbedTablePreview }))
1222
- );
1223
- var PREVIEW_REST_MS = 300;
1224
- var movedBesideColor = (previous, next) => {
1225
- const { segmentsColor: _before, ...before } = previous;
1226
- const { segmentsColor: _after, ...after } = next;
1227
- const held = new Map(Object.entries(before));
1228
- const entries = Object.entries(after);
1229
- return entries.length !== held.size || entries.some(([key, value]) => !held.has(key) || !Object.is(held.get(key), value));
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));
1230
1102
  };
1231
- var usePreviewColor = (config) => {
1232
- const [rested] = hooks.useDebouncedValue(config.segmentsColor, PREVIEW_REST_MS);
1233
- const [shown, setShown] = react.useState(() => ({
1234
- color: config.segmentsColor,
1235
- config,
1236
- rested
1237
- }));
1238
- if (shown.config === config && shown.rested === rested) {
1239
- return shown.color;
1240
- }
1241
- const color = shown.config !== config && movedBesideColor(shown.config, config) ? config.segmentsColor : shown.rested !== rested ? rested : shown.color;
1242
- setShown({ color, config, rested });
1243
- return color;
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;
1244
1118
  };
1245
- var previewFrameStyle = {
1246
- display: "flex",
1247
- justifyContent: "center",
1248
- overflow: "hidden"
1119
+ const previewFrameStyle = {
1120
+ display: "flex",
1121
+ justifyContent: "center",
1122
+ overflow: "hidden"
1249
1123
  };
1250
- var previewIframeStyle = {
1251
- border: 0,
1252
- borderRadius: studio.EMBED_IFRAME_RADIUS_PX,
1253
- height: "100%",
1254
- maxHeight: "100%",
1255
- maxWidth: "100%",
1256
- width: "100%"
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%"
1257
1131
  };
1258
- var hiddenStyle = { display: "none" };
1259
- var EmbedMapPreview = ({
1260
- collectionId,
1261
- config,
1262
- defaultView,
1263
- defaults,
1264
- dirty,
1265
- itineraryId,
1266
- name,
1267
- onPreviewWindow,
1268
- organizationId,
1269
- publishableKey,
1270
- unpublished
1271
- }) => {
1272
- const appOrigin = chunkQZ7W2E4U_cjs.useStudioAppOrigin();
1273
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS11);
1274
- const viewHash = react.useMemo(() => studio.buildEmbedViewHash(defaultView), [defaultView]);
1275
- const previewColor = usePreviewColor(config);
1276
- const previewConfig = react.useMemo(
1277
- () => ({ ...config, segmentsColor: previewColor }),
1278
- [config, previewColor]
1279
- );
1280
- const previewSearch = react.useMemo(() => {
1281
- const base = studio.buildEmbedSearch({
1282
- collectionId: collectionId ?? void 0,
1283
- config: previewConfig,
1284
- defaults,
1285
- itineraryId: itineraryId ?? void 0,
1286
- publishableKey: publishableKey ?? ""
1287
- });
1288
- return [
1289
- ...base,
1290
- // `preview` MUST serialize as "true", the urlBoolean vocabulary the route's
1291
- // embedSearchSchema parses. "1" (or any other token) is dropped to undefined,
1292
- // which drops the surface to visitor (publishable-key) auth and 403s a private
1293
- // itinerary instead of authenticating the owner's session.
1294
- ["preview", "true"],
1295
- ["organization_id", organizationId]
1296
- ];
1297
- }, [collectionId, defaults, itineraryId, organizationId, previewConfig, publishableKey]);
1298
- const [preview, setPreview] = react.useState(() => ({
1299
- appOrigin,
1300
- search: previewSearch,
1301
- src: studio.buildEmbedSrc(appOrigin, previewSearch, viewHash)
1302
- }));
1303
- let previewSrc = preview.src;
1304
- if (preview.search !== previewSearch || preview.appOrigin !== appOrigin) {
1305
- previewSrc = studio.buildEmbedSrc(appOrigin, previewSearch, viewHash);
1306
- setPreview({ appOrigin, search: previewSearch, src: previewSrc });
1307
- }
1308
- if (unpublished && itineraryId !== null) {
1309
- return /* @__PURE__ */ jsxRuntime.jsx(chunkX6EIJNOQ_cjs.UnpublishedPanel, { itineraryId, organizationId });
1310
- }
1311
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1312
- dirty && itineraryId !== null ? /* @__PURE__ */ jsxRuntime.jsx(
1313
- chunk6WU7XEQA_cjs.PublicationNotice,
1314
- {
1315
- itineraryId,
1316
- organizationId,
1317
- state: "dirty"
1318
- }
1319
- ) : null,
1320
- /* @__PURE__ */ jsxRuntime.jsx(core.Box, { flex: 1, mih: 0, pt: dirty && itineraryId !== null ? "sm" : 0, style: previewFrameStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
1321
- "iframe",
1322
- {
1323
- ref: (el) => {
1324
- onPreviewWindow(el?.contentWindow ?? null);
1325
- },
1326
- src: previewSrc,
1327
- style: previewIframeStyle,
1328
- title: words.embed.preview.title(name)
1329
- }
1330
- ) })
1331
- ] });
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
+ })] });
1332
1198
  };
1333
- var EmbedTableStage = ({
1334
- element,
1335
- itineraryId,
1336
- language,
1337
- length,
1338
- options,
1339
- organizationId,
1340
- publication
1341
- }) => {
1342
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS11);
1343
- if (publication === "loading") {
1344
- return /* @__PURE__ */ jsxRuntime.jsx(core.Center, { flex: 1, p: "xl", children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, {}) });
1345
- }
1346
- if (itineraryId === null) {
1347
- return /* @__PURE__ */ jsxRuntime.jsx(core.Center, { flex: 1, p: "xl", children: /* @__PURE__ */ jsxRuntime.jsx(
1348
- chunkV6G6W5CF_cjs.EmptyState,
1349
- {
1350
- icon: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "itinerary", size: chunkBFNXXLVV_cjs.iconSizes.lg }),
1351
- title: words.embed.itinerary.pickerEmpty
1352
- }
1353
- ) });
1354
- }
1355
- if (publication === "unpublished") {
1356
- return /* @__PURE__ */ jsxRuntime.jsx(chunkX6EIJNOQ_cjs.UnpublishedPanel, { itineraryId, organizationId });
1357
- }
1358
- return /* @__PURE__ */ jsxRuntime.jsx(core.Box, { className: "mtya-embed-table-stage", children: /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { className: "mtya-embed-table-frame", children: [
1359
- publication === "dirty" ? /* @__PURE__ */ jsxRuntime.jsx(core.Box, { mb: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(
1360
- chunk6WU7XEQA_cjs.PublicationNotice,
1361
- {
1362
- itineraryId,
1363
- organizationId,
1364
- state: "dirty"
1365
- }
1366
- ) }) : null,
1367
- /* @__PURE__ */ jsxRuntime.jsx(
1368
- react.Suspense,
1369
- {
1370
- fallback: /* @__PURE__ */ jsxRuntime.jsx(core.Center, { flex: 1, p: "xl", children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, {}) }),
1371
- children: /* @__PURE__ */ jsxRuntime.jsx(
1372
- EmbedTablePreview,
1373
- {
1374
- element,
1375
- itineraryId,
1376
- language,
1377
- length,
1378
- options
1379
- }
1380
- )
1381
- }
1382
- )
1383
- ] }) });
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
+ });
1384
1248
  };
1385
- var EmbedStage = ({
1386
- element,
1387
- tableItineraryId,
1388
- tablePublication,
1389
- tables,
1390
- ...map
1391
- }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1392
- /* @__PURE__ */ jsxRuntime.jsx(
1393
- core.Box,
1394
- {
1395
- className: "mtya-fullscreen-stage",
1396
- flex: 1,
1397
- p: "md",
1398
- style: studio.isEmbedTableElement(element) ? hiddenStyle : void 0,
1399
- children: /* @__PURE__ */ jsxRuntime.jsx(EmbedMapPreview, { ...map })
1400
- }
1401
- ),
1402
- studio.isEmbedTableElement(element) ? /* @__PURE__ */ jsxRuntime.jsx(
1403
- EmbedTableStage,
1404
- {
1405
- element,
1406
- itineraryId: tableItineraryId,
1407
- language: map.config.preferredLanguage,
1408
- length: map.config.preferredUnitLength,
1409
- options: tables,
1410
- organizationId: map.organizationId,
1411
- publication: tablePublication
1412
- }
1413
- ) : null
1414
- ] });
1415
- var SECTIONS12 = ["actions", "controls", "embed", "preferences", "privacy", "publish"];
1416
- var sectionGlyphs = {
1417
- appearance: "appearance",
1418
- code: "action-copy",
1419
- columns: "menu",
1420
- controls: "controls",
1421
- defaultView: "default-view",
1422
- general: "info",
1423
- layers: "layers",
1424
- profile: "profile"
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"
1425
1281
  };
1426
- var inertEmbedOrganization = { found: true, pending: false };
1427
- var inertEmbedKeys = { keys: [] };
1428
- var EmbedWizardBody = ({
1429
- defaults,
1430
- isPrivate,
1431
- keys,
1432
- itinerarySubject,
1433
- name,
1434
- organizationId,
1435
- publication,
1436
- requireSessionToken,
1437
- safetyRules,
1438
- target
1439
- }) => {
1440
- const itineraryId = target.kind === "itinerary" ? target.id : void 0;
1441
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS12);
1442
- const { dispatch } = chunk6YD325QI_cjs.useStudioDispatch();
1443
- const sectionsId = hooks.useId();
1444
- const clampedDefaults = react.useMemo(
1445
- () => studio.clampConfigToFieldDependencies(studio.clampConfigToSafetyRules(defaults, safetyRules)),
1446
- [defaults, safetyRules]
1447
- );
1448
- const [config, setConfig] = react.useState(clampedDefaults);
1449
- const [tables, setTables] = react.useState(studio.defaultEmbedTableOptions);
1450
- const [element, setElement] = react.useState("map");
1451
- const [chosenSection, setChosenSection] = react.useState(null);
1452
- const [chosenKey, setChosenKey] = react.useState(null);
1453
- const [collectionId, setCollectionId] = react.useState(null);
1454
- const [chosenItineraryId, setChosenItineraryId] = react.useState(null);
1455
- const [defaultView, setDefaultView] = react.useState(emptyDefaultView);
1456
- const publishableKey = keys.keys.find((key) => key.key === chosenKey)?.key ?? keys.keys[0]?.key ?? null;
1457
- const previewCamera = useEmbedPreviewCamera();
1458
- const captureDefaultView = react.useCallback(async () => {
1459
- const view = await previewCamera.requestCamera();
1460
- if (view) {
1461
- setDefaultView({
1462
- bearing: view.bearing ?? null,
1463
- center: view.center ?? null,
1464
- pitch: view.pitch ?? null,
1465
- zoom: view.zoom ?? null
1466
- });
1467
- }
1468
- }, [previewCamera]);
1469
- const layerOptions = useEmbedLayerOptions(config, safetyRules, organizationId);
1470
- const patchConfig = react.useCallback(
1471
- (patch) => (
1472
- // Re-clamp on every patch so a safety-restricted boolean can never be
1473
- // turned on. The control is disabled, and this is the backstop behind it: a
1474
- // section reset patch carries the clamped defaults already, and any other
1475
- // source of a patch stays bounded by the rules.
1476
- //
1477
- // The dependency clamp runs AFTER the safety one, and the order is the
1478
- // only one that works: a safety rule can force the elevation chart off,
1479
- // and the fields that need the chart have to fall with it. Clamping
1480
- // dependencies first would leave them standing whenever the ORGANIZATION was what
1481
- // turned the chart off.
1482
- setConfig(
1483
- (current) => studio.clampConfigToFieldDependencies(
1484
- studio.clampConfigToSafetyRules({ ...current, ...patch }, safetyRules)
1485
- )
1486
- )
1487
- ),
1488
- [safetyRules]
1489
- );
1490
- const onClose = () => {
1491
- void dispatch("studio.embed.close", {});
1492
- };
1493
- const collection = useEmbedCollectionItineraries(
1494
- itineraryId === void 0 ? target.id : void 0
1495
- );
1496
- const tableItineraryId = itineraryId ?? (collection.itineraries.find((itinerary) => itinerary.id === chosenItineraryId) ?? collection.itineraries[0])?.id ?? null;
1497
- const table = studio.isEmbedTableElement(element);
1498
- const chosenDraft = chunkF6VFOI4U_cjs.useStudioItinerary(
1499
- itineraryId === void 0 && table ? tableItineraryId ?? void 0 : void 0
1500
- );
1501
- const listingPending = itineraryId === void 0 && table && collection.pending;
1502
- const tablePublication = itineraryId !== void 0 ? publication : listingPending ? "loading" : tableItineraryId === null ? "published" : strings.publicationStateOf(chosenDraft.data, chosenDraft.isError);
1503
- const sections = react.useMemo(
1504
- () => studio.embedElementSections(element, itineraryId !== void 0 || table),
1505
- [element, itineraryId, table]
1506
- );
1507
- const section = sections.find((candidate) => candidate === chosenSection) ?? sections[0] ?? "code";
1508
- const code = useEmbedCode({
1509
- collectionId: target.kind === "collection" ? target.id : collectionId,
1510
- config,
1511
- defaultView,
1512
- defaults: clampedDefaults,
1513
- element,
1514
- itineraryId: itineraryId ?? null,
1515
- name,
1516
- publishableKey,
1517
- requireSessionToken,
1518
- tableItineraryId,
1519
- tables
1520
- });
1521
- const unpublished = (table ? tablePublication : publication) === "unpublished";
1522
- const copyable = unpublished ? null : code;
1523
- const domains = safetyRules?.domains;
1524
- const localOnly = domains !== void 0 && domains.length > 0 && domains.every((entry) => studio.isLoopbackDomain(entry));
1525
- const noSite = domains !== void 0 && (domains.length === 0 || localOnly);
1526
- const noSiteWords = localOnly ? table ? {
1527
- status: words.embed.status.tableNoLiveSite,
1528
- title: words.embed.domains.tableLocalOnly.title
1529
- } : { status: words.embed.status.noLiveSite, title: words.embed.domains.embedLocalOnly.title } : table ? { status: words.embed.status.tableNoSite, title: words.embed.domains.tableNone.title } : { status: words.embed.status.noSite, title: words.embed.domains.embedNone.title };
1530
- 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;
1531
- const standing = withheld ?? (noSite ? noSiteWords.status : table ? words.embed.status.table : words.embed.status.map);
1532
- const changesIn = (id) => {
1533
- switch (id) {
1534
- case "appearance":
1535
- case "controls":
1536
- case "layers":
1537
- case "profile":
1538
- return studio.embedSectionChanges(element, id, config, clampedDefaults);
1539
- case "columns":
1540
- return table ? studio.embedTableChanges(element, tables) : 0;
1541
- case "defaultView":
1542
- return defaultView.center === null && defaultView.zoom === null ? 0 : 1;
1543
- default:
1544
- return 0;
1545
- }
1546
- };
1547
- const entries = sections.map((id) => {
1548
- const changes = changesIn(id);
1549
- const attention = id === "code" && !listingPending ? withheld ?? (noSite ? noSiteWords.title : null) : null;
1550
- return {
1551
- glyph: sectionGlyphs[id],
1552
- id,
1553
- label: words.embed.sections[id],
1554
- status: attention !== null ? { description: attention, kind: "attention" } : changes > 0 ? { count: changes, description: words.embed.sectionChanges(changes), kind: "count" } : void 0
1555
- };
1556
- });
1557
- const panelOf = (id) => {
1558
- switch (id) {
1559
- case "general":
1560
- return /* @__PURE__ */ jsxRuntime.jsx(
1561
- EmbedGeneralSection,
1562
- {
1563
- collectionId,
1564
- element,
1565
- isPrivate,
1566
- itineraries: collection.itineraries,
1567
- itinerariesPending: collection.pending,
1568
- itineraryId,
1569
- onCollectionIdChange: setCollectionId,
1570
- onTableItineraryIdChange: setChosenItineraryId,
1571
- organizationId,
1572
- tableItineraryId
1573
- }
1574
- );
1575
- case "defaultView":
1576
- return /* @__PURE__ */ jsxRuntime.jsx(
1577
- EmbedDefaultViewSection,
1578
- {
1579
- defaultView,
1580
- onCaptureCamera: captureDefaultView,
1581
- onDefaultViewReset: () => setDefaultView(emptyDefaultView)
1582
- }
1583
- );
1584
- case "columns":
1585
- return table ? /* @__PURE__ */ jsxRuntime.jsx(EmbedColumnsSection, { element, onChange: setTables, options: tables }) : null;
1586
- case "code":
1587
- return /* @__PURE__ */ jsxRuntime.jsx(
1588
- EmbedCodeSection,
1589
- {
1590
- code: copyable,
1591
- domains,
1592
- element,
1593
- keys,
1594
- onPublishableKeyChange: setChosenKey,
1595
- publishableKey,
1596
- requireSessionToken,
1597
- withheld
1598
- }
1599
- );
1600
- default:
1601
- return /* @__PURE__ */ jsxRuntime.jsx(
1602
- EmbedConfigForm,
1603
- {
1604
- config,
1605
- defaults: clampedDefaults,
1606
- element,
1607
- layerOptions,
1608
- onPatch: patchConfig,
1609
- safetyRules,
1610
- section: id
1611
- }
1612
- );
1613
- }
1614
- };
1615
- return /* @__PURE__ */ jsxRuntime.jsx(
1616
- chunkYKES5P4H_cjs.WizardLayout,
1617
- {
1618
- footer: (
1619
- // The bar every full-screen surface of the studio ends on (the shell's own divider and
1620
- // a primary), holding the wizard's one outcome. What withholds it is said beside the
1621
- // button as well as on it: the sentence stands in the bar, where a reader on a touch
1622
- // screen meets it, and the tooltip repeats it under a pointer, pointed UP because the
1623
- // bar sits at the bottom edge of the studio the dialog fills. The span shim is there
1624
- // because a disabled Button dispatches no pointer events to its Tooltip parent.
1625
- /* @__PURE__ */ jsxRuntime.jsx(core.Box, { className: "mtya-fullscreen-footer", px: "md", py: "sm", children: /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { gap: "sm", justify: "space-between", wrap: "nowrap", children: [
1626
- /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { flex: 1, gap: "xs", miw: 0, wrap: "nowrap", children: [
1627
- withheld === null && noSite ? /* @__PURE__ */ jsxRuntime.jsx(core.Box, { c: "orange", className: "mtya-embed-status-mark", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "warning", size: chunkBFNXXLVV_cjs.iconSizes.sm }) }) : null,
1628
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { "aria-live": "polite", c: "dimmed", flex: 1, lineClamp: 3, miw: 0, size: "xs", children: standing })
1629
- ] }),
1630
- copyable === null ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: withheld, position: "top", withinPortal: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(core.Button, { disabled: true, leftSection: /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "action-copy", size: chunkBFNXXLVV_cjs.iconSizes.sm }), children: words.embed.code.copy }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.CopyButton, { value: copyable.code, children: ({ copied, copy }) => /* @__PURE__ */ jsxRuntime.jsx(
1631
- core.Button,
1632
- {
1633
- color: copied ? "teal" : void 0,
1634
- leftSection: copied ? /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "check", size: chunkBFNXXLVV_cjs.iconSizes.sm }) : /* @__PURE__ */ jsxRuntime.jsx(chunkBFNXXLVV_cjs.Glyph, { name: "action-copy", size: chunkBFNXXLVV_cjs.iconSizes.sm }),
1635
- onClick: copy,
1636
- children: copied ? words.embed.code.copied : words.embed.code.copy
1637
- }
1638
- ) })
1639
- ] }) })
1640
- ),
1641
- header: /* @__PURE__ */ jsxRuntime.jsx(
1642
- chunkN6NWKUOR_cjs.FullscreenHeader,
1643
- {
1644
- closeLabel: words.actions.close,
1645
- onClose,
1646
- subject: itinerarySubject ? /* @__PURE__ */ jsxRuntime.jsx(chunkLGNTAZ3L_cjs.DialogSubject, { ...itinerarySubject }) : /* @__PURE__ */ jsxRuntime.jsx(chunkLGNTAZ3L_cjs.DialogSubject, { name }),
1647
- title: words.embed.title
1648
- }
1649
- ),
1650
- id: sectionsId,
1651
- onChange: setChosenSection,
1652
- panel: sections.map((id) => /* @__PURE__ */ jsxRuntime.jsx(core.Tabs.Panel, { value: id, children: panelOf(id) }, id)),
1653
- rail: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1654
- /* @__PURE__ */ jsxRuntime.jsx(EmbedElementSwitcher, { onChange: setElement, value: element }),
1655
- /* @__PURE__ */ jsxRuntime.jsx(
1656
- chunkGY7UMPHT_cjs.SectionNav,
1657
- {
1658
- ariaLabel: words.embed.sectionsLabel,
1659
- entries,
1660
- id: sectionsId,
1661
- value: section
1662
- }
1663
- )
1664
- ] }),
1665
- sectionLayout: section === "code" ? "page" : "split",
1666
- sections,
1667
- stageAriaLabel: words.embed.stageLabel,
1668
- value: section,
1669
- children: /* @__PURE__ */ jsxRuntime.jsx(
1670
- EmbedStage,
1671
- {
1672
- collectionId: target.kind === "collection" ? target.id : collectionId,
1673
- config,
1674
- defaults: clampedDefaults,
1675
- defaultView,
1676
- dirty: publication === "dirty",
1677
- element,
1678
- itineraryId: itineraryId ?? null,
1679
- name,
1680
- onPreviewWindow: previewCamera.registerPreviewWindow,
1681
- organizationId,
1682
- publishableKey,
1683
- tableItineraryId,
1684
- tablePublication,
1685
- tables,
1686
- unpublished: publication === "unpublished"
1687
- }
1688
- )
1689
- }
1690
- );
1282
+ const inertEmbedOrganization = {
1283
+ found: true,
1284
+ pending: false
1691
1285
  };
1692
- var EmbedWizardStatus = ({ children }) => {
1693
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS12);
1694
- const { dispatch } = chunk6YD325QI_cjs.useStudioDispatch();
1695
- const onClose = () => {
1696
- void dispatch("studio.embed.close", {});
1697
- };
1698
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1699
- /* @__PURE__ */ jsxRuntime.jsx(
1700
- chunkN6NWKUOR_cjs.FullscreenHeader,
1701
- {
1702
- closeLabel: words.actions.close,
1703
- onClose,
1704
- title: words.embed.title
1705
- }
1706
- ),
1707
- /* @__PURE__ */ jsxRuntime.jsx(core.Center, { flex: 1, p: "xl", children })
1708
- ] });
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
+ });
1709
1540
  };
1710
- var EmbedWizardLoader = () => /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardStatus, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, {}) });
1711
- var EmbedWizardRefusal = ({ target }) => {
1712
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS12);
1713
- return /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardStatus, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Alert, { color: "gray", maw: 420, children: target.kind === "collection" ? words.embed.notEmbeddableCollection : words.embed.notEmbeddable }) });
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
+ })] });
1714
1556
  };
1715
- var EmbedWizardNotOffered = () => {
1716
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS12);
1717
- return /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardStatus, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Alert, { color: "gray", maw: 420, children: words.embed.notOffered }) });
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
+ }) });
1718
1565
  };
1719
- var EmbedWizardLoadFailure = () => {
1720
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS12);
1721
- return /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardStatus, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Alert, { color: "red", maw: 420, children: words.embed.targetLoadFailed }) });
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
+ }) });
1722
1573
  };
1723
- var EmbedWizardOwner = ({
1724
- isPrivate,
1725
- itinerarySubject,
1726
- name,
1727
- organizationId,
1728
- publication,
1729
- target,
1730
- useKeys,
1731
- useOrganization
1732
- }) => {
1733
- const org = useOrganization?.(organizationId) ?? inertEmbedOrganization;
1734
- const embedKeys = useKeys?.(organizationId) ?? inertEmbedKeys;
1735
- const defaults = react.useMemo(() => studio.resolveOrgEmbedDefaults(org.defaults), [org.defaults]);
1736
- if (org.pending) {
1737
- return /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardLoader, {});
1738
- }
1739
- if (!org.found) {
1740
- return /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardRefusal, { target });
1741
- }
1742
- return /* @__PURE__ */ jsxRuntime.jsx(
1743
- EmbedWizardBody,
1744
- {
1745
- defaults,
1746
- isPrivate,
1747
- itinerarySubject,
1748
- keys: embedKeys,
1749
- name,
1750
- organizationId,
1751
- publication,
1752
- requireSessionToken: Boolean(org.safetyRules?.require_session_token),
1753
- safetyRules: org.safetyRules,
1754
- target
1755
- }
1756
- );
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
+ }) });
1757
1581
  };
1758
- var EmbedWizard = ({ strings: strings$1, target, useKeys, useOrganization }) => {
1759
- const words = chunk2DDL2LIJ_cjs.useStudioScopedStrings(SECTIONS12, strings$1);
1760
- const { dispatch } = chunk6YD325QI_cjs.useStudioDispatch();
1761
- const embeddedStudio = chunkLB57H6LF_cjs.useEmbeddedStudio();
1762
- const itineraryId = !embeddedStudio && target.kind === "itinerary" ? target.id : void 0;
1763
- const collectionId = !embeddedStudio && target.kind === "collection" ? target.id : void 0;
1764
- const {
1765
- data: itinerary,
1766
- isError: itineraryFailed,
1767
- isLoading: itineraryLoading
1768
- } = chunkF6VFOI4U_cjs.useStudioItinerary(itineraryId);
1769
- const {
1770
- data: collection,
1771
- isError: collectionFailed,
1772
- isLoading: collectionLoading
1773
- } = clientReact.useCollection(collectionId);
1774
- const itinerarySubject = chunkWPYC4NGZ_cjs.useItinerarySubjectById(itineraryId);
1775
- const resolved = collection ? {
1776
- isPrivate: collection.is_private,
1777
- name: collection.name,
1778
- organizationId: collection.organization_id,
1779
- publication: "published"
1780
- } : itinerary ? {
1781
- isPrivate: itinerary.is_private,
1782
- name: itinerary.name,
1783
- organizationId: itinerary.organization_id,
1784
- publication: strings.publicationStateOf(itinerary)
1785
- } : null;
1786
- const publishable = chunkX6EIJNOQ_cjs.usePublishableScope(resolved?.organizationId);
1787
- const ownerId = publishable && resolved?.organizationId ? resolved.organizationId : null;
1788
- const loading = itineraryLoading || collectionLoading;
1789
- const loadFailed = resolved === null && (itineraryFailed || collectionFailed);
1790
- const onClose = () => {
1791
- void dispatch("studio.embed.close", {});
1792
- };
1793
- return /* @__PURE__ */ jsxRuntime.jsx(chunk2DDL2LIJ_cjs.StudioStringsScope, { sections: SECTIONS12, strings: strings$1, children: /* @__PURE__ */ jsxRuntime.jsx(chunkN6NWKUOR_cjs.FullscreenModal, { ariaLabel: words.embed.title, onClose, children: embeddedStudio ? /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardNotOffered, {}) : loading ? /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardLoader, {}) : loadFailed ? /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardLoadFailure, {}) : !resolved || ownerId === null ? /* @__PURE__ */ jsxRuntime.jsx(EmbedWizardRefusal, { target }) : /* @__PURE__ */ jsxRuntime.jsx(
1794
- EmbedWizardOwner,
1795
- {
1796
- isPrivate: resolved.isPrivate,
1797
- itinerarySubject,
1798
- name: resolved.name,
1799
- organizationId: ownerId,
1800
- publication: resolved.publication,
1801
- target,
1802
- useKeys,
1803
- useOrganization
1804
- },
1805
- `${target.kind}:${target.id}:${ownerId}`
1806
- ) }) });
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
+ });
1807
1645
  };
1808
-
1809
1646
  exports.EmbedBaseMapPicker = EmbedBaseMapPicker;
1810
1647
  exports.EmbedFieldControl = EmbedFieldControl;
1811
1648
  exports.EmbedThemePicker = EmbedThemePicker;
1812
1649
  exports.EmbedTintPicker = EmbedTintPicker;
1813
1650
  exports.EmbedToggleSwitch = EmbedToggleSwitch;
1814
1651
  exports.EmbedWizard = EmbedWizard;
1815
- //# sourceMappingURL=index.cjs.map
1652
+
1816
1653
  //# sourceMappingURL=index.cjs.map