@mountaya/studio-react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1087 -2
- package/THIRD-PARTY-NOTICES.txt +149 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs +213 -0
- package/dist/AgentMarkdown-RNLATZYN.cjs.map +1 -0
- package/dist/AgentMarkdown-TMN6E2XC.js +206 -0
- package/dist/AgentMarkdown-TMN6E2XC.js.map +1 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js +468 -0
- package/dist/ContextMenuPopup-EOYN42YZ.js.map +1 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs +470 -0
- package/dist/ContextMenuPopup-VQLAYYYZ.cjs.map +1 -0
- package/dist/CopilotPanel-CCLEYZUN.js +29 -0
- package/dist/CopilotPanel-CCLEYZUN.js.map +1 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs +38 -0
- package/dist/CopilotPanel-LYPMTDKX.cjs.map +1 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js +53 -0
- package/dist/DateTimePickerField-FZRKJ2SU.js.map +1 -0
- package/dist/DateTimePickerField-NB456C6F.cjs +55 -0
- package/dist/DateTimePickerField-NB456C6F.cjs.map +1 -0
- package/dist/DirectionsModal-4Y346QFU.cjs +291 -0
- package/dist/DirectionsModal-4Y346QFU.cjs.map +1 -0
- package/dist/DirectionsModal-DRPO2654.js +289 -0
- package/dist/DirectionsModal-DRPO2654.js.map +1 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js +321 -0
- package/dist/DuplicateItineraryModal-2QGWI7E7.js.map +1 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs +323 -0
- package/dist/DuplicateItineraryModal-WFGMU6JL.cjs.map +1 -0
- package/dist/EditCollectionModal-4QYP53SX.js +90 -0
- package/dist/EditCollectionModal-4QYP53SX.js.map +1 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs +92 -0
- package/dist/EditCollectionModal-T2TMAO53.cjs.map +1 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs +62 -0
- package/dist/EmbedSnippetCode-NMFCQ7TF.cjs.map +1 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js +60 -0
- package/dist/EmbedSnippetCode-TGBSWDMD.js.map +1 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js +72 -0
- package/dist/EmbedTablePreview-3RRHM63Q.js.map +1 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs +74 -0
- package/dist/EmbedTablePreview-Z3W62MRV.cjs.map +1 -0
- package/dist/ExportModal-5NUZZPXN.cjs +267 -0
- package/dist/ExportModal-5NUZZPXN.cjs.map +1 -0
- package/dist/ExportModal-H7OYP6CK.js +265 -0
- package/dist/ExportModal-H7OYP6CK.js.map +1 -0
- package/dist/FileDropzone-GKPMAZF5.cjs +41 -0
- package/dist/FileDropzone-GKPMAZF5.cjs.map +1 -0
- package/dist/FileDropzone-GRXY4FXR.js +39 -0
- package/dist/FileDropzone-GRXY4FXR.js.map +1 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs +92 -0
- package/dist/LocationPermissionModal-AFHI5J4S.cjs.map +1 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js +90 -0
- package/dist/LocationPermissionModal-MURJ5DDB.js.map +1 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs +402 -0
- package/dist/ManageCollectionsModal-E3IUHUTO.cjs.map +1 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js +400 -0
- package/dist/ManageCollectionsModal-FIHSZXSR.js.map +1 -0
- package/dist/NewCollectionModal-7TBWVA3G.js +75 -0
- package/dist/NewCollectionModal-7TBWVA3G.js.map +1 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs +77 -0
- package/dist/NewCollectionModal-QFQYCKCG.cjs.map +1 -0
- package/dist/RoadAccessModal-DNUJV5PC.js +57 -0
- package/dist/RoadAccessModal-DNUJV5PC.js.map +1 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs +59 -0
- package/dist/RoadAccessModal-WLLL2ASZ.cjs.map +1 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs +81 -0
- package/dist/SegmentColorPicker-7Y4JEPFC.cjs.map +1 -0
- package/dist/SegmentColorPicker-UNLPITUA.js +79 -0
- package/dist/SegmentColorPicker-UNLPITUA.js.map +1 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs +32 -0
- package/dist/SegmentGroupModal-F54FZUR2.cjs.map +1 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js +23 -0
- package/dist/SegmentGroupModal-KBU7OPNJ.js.map +1 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs +82 -0
- package/dist/ShareCollectionModal-TWYE6JJ4.cjs.map +1 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js +80 -0
- package/dist/ShareCollectionModal-VXSRHX4S.js.map +1 -0
- package/dist/ShareModal-HLYNE7OL.js +115 -0
- package/dist/ShareModal-HLYNE7OL.js.map +1 -0
- package/dist/ShareModal-WISND27S.cjs +117 -0
- package/dist/ShareModal-WISND27S.cjs.map +1 -0
- package/dist/VideoExportWizard-BSDWA3B5.js +44 -0
- package/dist/VideoExportWizard-BSDWA3B5.js.map +1 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs +53 -0
- package/dist/VideoExportWizard-UOHR4MNS.cjs.map +1 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js +270 -0
- package/dist/WaypointDetailsModal-LK5LBK6S.js.map +1 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs +272 -0
- package/dist/WaypointDetailsModal-MEMOLLUY.cjs.map +1 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs +1204 -0
- package/dist/WaypointWorkbench-DCCLBURG.cjs.map +1 -0
- package/dist/WaypointWorkbench-NRCLGU23.js +1202 -0
- package/dist/WaypointWorkbench-NRCLGU23.js.map +1 -0
- package/dist/chunk-22BNE3YV.js +13 -0
- package/dist/chunk-22BNE3YV.js.map +1 -0
- package/dist/chunk-24RNBTO2.cjs +154 -0
- package/dist/chunk-24RNBTO2.cjs.map +1 -0
- package/dist/chunk-2DDL2LIJ.cjs +65 -0
- package/dist/chunk-2DDL2LIJ.cjs.map +1 -0
- package/dist/chunk-2GAMKPS2.cjs +16 -0
- package/dist/chunk-2GAMKPS2.cjs.map +1 -0
- package/dist/chunk-2K4HCCZJ.cjs +51 -0
- package/dist/chunk-2K4HCCZJ.cjs.map +1 -0
- package/dist/chunk-2MHWH3TS.cjs +119 -0
- package/dist/chunk-2MHWH3TS.cjs.map +1 -0
- package/dist/chunk-2MQBPZNR.cjs +12 -0
- package/dist/chunk-2MQBPZNR.cjs.map +1 -0
- package/dist/chunk-2QSPCXLM.js +84 -0
- package/dist/chunk-2QSPCXLM.js.map +1 -0
- package/dist/chunk-32WRG44G.js +66 -0
- package/dist/chunk-32WRG44G.js.map +1 -0
- package/dist/chunk-32XMYLEB.js +9 -0
- package/dist/chunk-32XMYLEB.js.map +1 -0
- package/dist/chunk-3BEHHSVE.cjs +790 -0
- package/dist/chunk-3BEHHSVE.cjs.map +1 -0
- package/dist/chunk-3HF2XZKQ.js +8 -0
- package/dist/chunk-3HF2XZKQ.js.map +1 -0
- package/dist/chunk-3K2NX5FH.js +51 -0
- package/dist/chunk-3K2NX5FH.js.map +1 -0
- package/dist/chunk-3Q23QKNI.cjs +26 -0
- package/dist/chunk-3Q23QKNI.cjs.map +1 -0
- package/dist/chunk-3TQV2M4C.cjs +16 -0
- package/dist/chunk-3TQV2M4C.cjs.map +1 -0
- package/dist/chunk-3XDKDTE6.js +16 -0
- package/dist/chunk-3XDKDTE6.js.map +1 -0
- package/dist/chunk-46EARJWC.js +288 -0
- package/dist/chunk-46EARJWC.js.map +1 -0
- package/dist/chunk-4DQOJIUV.js +96 -0
- package/dist/chunk-4DQOJIUV.js.map +1 -0
- package/dist/chunk-4T52NAVT.js +10 -0
- package/dist/chunk-4T52NAVT.js.map +1 -0
- package/dist/chunk-4TPRVQGY.js +12 -0
- package/dist/chunk-4TPRVQGY.js.map +1 -0
- package/dist/chunk-4TX5E63A.cjs +12 -0
- package/dist/chunk-4TX5E63A.cjs.map +1 -0
- package/dist/chunk-4VKJF24B.js +22 -0
- package/dist/chunk-4VKJF24B.js.map +1 -0
- package/dist/chunk-4Z734K3L.js +15 -0
- package/dist/chunk-4Z734K3L.js.map +1 -0
- package/dist/chunk-4ZRSEOZM.js +629 -0
- package/dist/chunk-4ZRSEOZM.js.map +1 -0
- package/dist/chunk-52T3VZR5.js +55 -0
- package/dist/chunk-52T3VZR5.js.map +1 -0
- package/dist/chunk-56DP2X7U.js +15 -0
- package/dist/chunk-56DP2X7U.js.map +1 -0
- package/dist/chunk-5AHT62LO.js +24 -0
- package/dist/chunk-5AHT62LO.js.map +1 -0
- package/dist/chunk-5BR4CTVV.cjs +17 -0
- package/dist/chunk-5BR4CTVV.cjs.map +1 -0
- package/dist/chunk-5CTZOFDV.cjs +17 -0
- package/dist/chunk-5CTZOFDV.cjs.map +1 -0
- package/dist/chunk-5F55MFIX.cjs +45 -0
- package/dist/chunk-5F55MFIX.cjs.map +1 -0
- package/dist/chunk-5FMQJ4A4.cjs +362 -0
- package/dist/chunk-5FMQJ4A4.cjs.map +1 -0
- package/dist/chunk-5PMEAMHS.js +82 -0
- package/dist/chunk-5PMEAMHS.js.map +1 -0
- package/dist/chunk-676DNRSN.js +85 -0
- package/dist/chunk-676DNRSN.js.map +1 -0
- package/dist/chunk-6H2F7JKL.js +179 -0
- package/dist/chunk-6H2F7JKL.js.map +1 -0
- package/dist/chunk-6HMRMON7.js +10 -0
- package/dist/chunk-6HMRMON7.js.map +1 -0
- package/dist/chunk-6NKPZ3LT.cjs +14 -0
- package/dist/chunk-6NKPZ3LT.cjs.map +1 -0
- package/dist/chunk-6TG2HZDG.js +75 -0
- package/dist/chunk-6TG2HZDG.js.map +1 -0
- package/dist/chunk-6WU7XEQA.cjs +103 -0
- package/dist/chunk-6WU7XEQA.cjs.map +1 -0
- package/dist/chunk-6YD325QI.cjs +90 -0
- package/dist/chunk-6YD325QI.cjs.map +1 -0
- package/dist/chunk-7B6TUEL5.js +20 -0
- package/dist/chunk-7B6TUEL5.js.map +1 -0
- package/dist/chunk-7KS5F27H.js +33 -0
- package/dist/chunk-7KS5F27H.js.map +1 -0
- package/dist/chunk-A2N6553V.cjs +295 -0
- package/dist/chunk-A2N6553V.cjs.map +1 -0
- package/dist/chunk-A66FJAVG.js +44 -0
- package/dist/chunk-A66FJAVG.js.map +1 -0
- package/dist/chunk-AF43JU4W.js +27 -0
- package/dist/chunk-AF43JU4W.js.map +1 -0
- package/dist/chunk-AHGHAWYR.js +99 -0
- package/dist/chunk-AHGHAWYR.js.map +1 -0
- package/dist/chunk-AKN5KIZT.js +1969 -0
- package/dist/chunk-AKN5KIZT.js.map +1 -0
- package/dist/chunk-ANTDR5MJ.cjs +12 -0
- package/dist/chunk-ANTDR5MJ.cjs.map +1 -0
- package/dist/chunk-AQ5JIIAE.js +26 -0
- package/dist/chunk-AQ5JIIAE.js.map +1 -0
- package/dist/chunk-ARHO5MLJ.js +10 -0
- package/dist/chunk-ARHO5MLJ.js.map +1 -0
- package/dist/chunk-BAYGKSWY.cjs +26 -0
- package/dist/chunk-BAYGKSWY.cjs.map +1 -0
- package/dist/chunk-BEJ5I724.js +8 -0
- package/dist/chunk-BEJ5I724.js.map +1 -0
- package/dist/chunk-BFNXXLVV.cjs +34 -0
- package/dist/chunk-BFNXXLVV.cjs.map +1 -0
- package/dist/chunk-BFQJDFGB.js +57 -0
- package/dist/chunk-BFQJDFGB.js.map +1 -0
- package/dist/chunk-CHEQJ6N7.cjs +2214 -0
- package/dist/chunk-CHEQJ6N7.cjs.map +1 -0
- package/dist/chunk-CJOJWZM7.js +92 -0
- package/dist/chunk-CJOJWZM7.js.map +1 -0
- package/dist/chunk-CJRSFC45.cjs +578 -0
- package/dist/chunk-CJRSFC45.cjs.map +1 -0
- package/dist/chunk-CWQ4WHPI.cjs +46 -0
- package/dist/chunk-CWQ4WHPI.cjs.map +1 -0
- package/dist/chunk-D3INXUFT.js +360 -0
- package/dist/chunk-D3INXUFT.js.map +1 -0
- package/dist/chunk-D6CDAYZ6.cjs +18 -0
- package/dist/chunk-D6CDAYZ6.cjs.map +1 -0
- package/dist/chunk-DDPXRXRD.cjs +23 -0
- package/dist/chunk-DDPXRXRD.cjs.map +1 -0
- package/dist/chunk-DUUPWSOZ.cjs +14 -0
- package/dist/chunk-DUUPWSOZ.cjs.map +1 -0
- package/dist/chunk-DVWYOHOB.cjs +43 -0
- package/dist/chunk-DVWYOHOB.cjs.map +1 -0
- package/dist/chunk-DZPHWBMC.cjs +11 -0
- package/dist/chunk-DZPHWBMC.cjs.map +1 -0
- package/dist/chunk-E26FROI3.js +68 -0
- package/dist/chunk-E26FROI3.js.map +1 -0
- package/dist/chunk-E7ZTDAQW.cjs +37 -0
- package/dist/chunk-E7ZTDAQW.cjs.map +1 -0
- package/dist/chunk-ECI4EKIV.cjs +94 -0
- package/dist/chunk-ECI4EKIV.cjs.map +1 -0
- package/dist/chunk-EN5RWYHP.cjs +28 -0
- package/dist/chunk-EN5RWYHP.cjs.map +1 -0
- package/dist/chunk-ET3UASEF.cjs +91 -0
- package/dist/chunk-ET3UASEF.cjs.map +1 -0
- package/dist/chunk-EW5SY246.cjs +97 -0
- package/dist/chunk-EW5SY246.cjs.map +1 -0
- package/dist/chunk-EWWHVV7R.cjs +18 -0
- package/dist/chunk-EWWHVV7R.cjs.map +1 -0
- package/dist/chunk-F2LZZC6X.js +90 -0
- package/dist/chunk-F2LZZC6X.js.map +1 -0
- package/dist/chunk-F6VFOI4U.cjs +12 -0
- package/dist/chunk-F6VFOI4U.cjs.map +1 -0
- package/dist/chunk-FGX3TEU4.cjs +12 -0
- package/dist/chunk-FGX3TEU4.cjs.map +1 -0
- package/dist/chunk-FK4F24KE.js +10 -0
- package/dist/chunk-FK4F24KE.js.map +1 -0
- package/dist/chunk-FLIGKB6K.js +313 -0
- package/dist/chunk-FLIGKB6K.js.map +1 -0
- package/dist/chunk-G2NDWNFB.cjs +185 -0
- package/dist/chunk-G2NDWNFB.cjs.map +1 -0
- package/dist/chunk-G2XORRLH.js +15 -0
- package/dist/chunk-G2XORRLH.js.map +1 -0
- package/dist/chunk-GIZN7NX5.cjs +25 -0
- package/dist/chunk-GIZN7NX5.cjs.map +1 -0
- package/dist/chunk-GM2BQ24D.js +47 -0
- package/dist/chunk-GM2BQ24D.js.map +1 -0
- package/dist/chunk-GMQJZ5N7.cjs +50 -0
- package/dist/chunk-GMQJZ5N7.cjs.map +1 -0
- package/dist/chunk-GT7RJOAA.cjs +315 -0
- package/dist/chunk-GT7RJOAA.cjs.map +1 -0
- package/dist/chunk-GWGUMPOL.js +9 -0
- package/dist/chunk-GWGUMPOL.js.map +1 -0
- package/dist/chunk-GWVKSSE3.cjs +154 -0
- package/dist/chunk-GWVKSSE3.cjs.map +1 -0
- package/dist/chunk-GY7UMPHT.cjs +99 -0
- package/dist/chunk-GY7UMPHT.cjs.map +1 -0
- package/dist/chunk-HMVBS5DU.js +150 -0
- package/dist/chunk-HMVBS5DU.js.map +1 -0
- package/dist/chunk-HXHA2C7C.js +169 -0
- package/dist/chunk-HXHA2C7C.js.map +1 -0
- package/dist/chunk-IHMOFX2A.js +208 -0
- package/dist/chunk-IHMOFX2A.js.map +1 -0
- package/dist/chunk-II6C3LU2.cjs +49 -0
- package/dist/chunk-II6C3LU2.cjs.map +1 -0
- package/dist/chunk-IOOAFCSR.cjs +58 -0
- package/dist/chunk-IOOAFCSR.cjs.map +1 -0
- package/dist/chunk-IQZSIOMM.js +10 -0
- package/dist/chunk-IQZSIOMM.js.map +1 -0
- package/dist/chunk-J2H3WIUM.cjs +12 -0
- package/dist/chunk-J2H3WIUM.cjs.map +1 -0
- package/dist/chunk-J62OBSUE.cjs +54 -0
- package/dist/chunk-J62OBSUE.cjs.map +1 -0
- package/dist/chunk-JFJVSJUX.cjs +16 -0
- package/dist/chunk-JFJVSJUX.cjs.map +1 -0
- package/dist/chunk-JI2M77Y7.cjs +68 -0
- package/dist/chunk-JI2M77Y7.cjs.map +1 -0
- package/dist/chunk-JLSOLL3C.js +31 -0
- package/dist/chunk-JLSOLL3C.js.map +1 -0
- package/dist/chunk-JRME3LCP.cjs +41 -0
- package/dist/chunk-JRME3LCP.cjs.map +1 -0
- package/dist/chunk-JUD3CWTI.cjs +2005 -0
- package/dist/chunk-JUD3CWTI.cjs.map +1 -0
- package/dist/chunk-JVFHF3LE.cjs +11 -0
- package/dist/chunk-JVFHF3LE.cjs.map +1 -0
- package/dist/chunk-JVS2WNKQ.js +26 -0
- package/dist/chunk-JVS2WNKQ.js.map +1 -0
- package/dist/chunk-JXAFIYLV.js +94 -0
- package/dist/chunk-JXAFIYLV.js.map +1 -0
- package/dist/chunk-K2E744ST.cjs +18 -0
- package/dist/chunk-K2E744ST.cjs.map +1 -0
- package/dist/chunk-K2ZEMBJ7.js +56 -0
- package/dist/chunk-K2ZEMBJ7.js.map +1 -0
- package/dist/chunk-KCXNMLKB.js +22 -0
- package/dist/chunk-KCXNMLKB.js.map +1 -0
- package/dist/chunk-KMMDPXY4.js +35 -0
- package/dist/chunk-KMMDPXY4.js.map +1 -0
- package/dist/chunk-KMSGFBAJ.cjs +78 -0
- package/dist/chunk-KMSGFBAJ.cjs.map +1 -0
- package/dist/chunk-KPD7K4XQ.cjs +11 -0
- package/dist/chunk-KPD7K4XQ.cjs.map +1 -0
- package/dist/chunk-KUD3B3BA.js +12 -0
- package/dist/chunk-KUD3B3BA.js.map +1 -0
- package/dist/chunk-L62LSMJ5.js +9 -0
- package/dist/chunk-L62LSMJ5.js.map +1 -0
- package/dist/chunk-LB57H6LF.cjs +261 -0
- package/dist/chunk-LB57H6LF.cjs.map +1 -0
- package/dist/chunk-LCPKNSC4.cjs +48 -0
- package/dist/chunk-LCPKNSC4.cjs.map +1 -0
- package/dist/chunk-LE3W2CSF.cjs +84 -0
- package/dist/chunk-LE3W2CSF.cjs.map +1 -0
- package/dist/chunk-LG736CNC.js +13 -0
- package/dist/chunk-LG736CNC.js.map +1 -0
- package/dist/chunk-LGNTAZ3L.cjs +33 -0
- package/dist/chunk-LGNTAZ3L.cjs.map +1 -0
- package/dist/chunk-LHXINV6N.cjs +47 -0
- package/dist/chunk-LHXINV6N.cjs.map +1 -0
- package/dist/chunk-LLZUTIQB.cjs +24 -0
- package/dist/chunk-LLZUTIQB.cjs.map +1 -0
- package/dist/chunk-LPGXRU7R.cjs +12 -0
- package/dist/chunk-LPGXRU7R.cjs.map +1 -0
- package/dist/chunk-MA2BBWF5.cjs +96 -0
- package/dist/chunk-MA2BBWF5.cjs.map +1 -0
- package/dist/chunk-MLGORMWF.js +23 -0
- package/dist/chunk-MLGORMWF.js.map +1 -0
- package/dist/chunk-MO7XCKLA.js +62 -0
- package/dist/chunk-MO7XCKLA.js.map +1 -0
- package/dist/chunk-N37UE6RQ.cjs +1797 -0
- package/dist/chunk-N37UE6RQ.cjs.map +1 -0
- package/dist/chunk-N6NWKUOR.cjs +60 -0
- package/dist/chunk-N6NWKUOR.cjs.map +1 -0
- package/dist/chunk-NI5CAMFC.js +568 -0
- package/dist/chunk-NI5CAMFC.js.map +1 -0
- package/dist/chunk-NNLCZGZK.js +21 -0
- package/dist/chunk-NNLCZGZK.js.map +1 -0
- package/dist/chunk-NWHFUVYX.js +97 -0
- package/dist/chunk-NWHFUVYX.js.map +1 -0
- package/dist/chunk-OMDB6ZB2.cjs +176 -0
- package/dist/chunk-OMDB6ZB2.cjs.map +1 -0
- package/dist/chunk-P5W4TRJO.cjs +33 -0
- package/dist/chunk-P5W4TRJO.cjs.map +1 -0
- package/dist/chunk-PADS6TDO.js +89 -0
- package/dist/chunk-PADS6TDO.js.map +1 -0
- package/dist/chunk-PFLNOHBT.js +92 -0
- package/dist/chunk-PFLNOHBT.js.map +1 -0
- package/dist/chunk-PTLYNDZS.cjs +13 -0
- package/dist/chunk-PTLYNDZS.cjs.map +1 -0
- package/dist/chunk-QC3X4DAW.cjs +71 -0
- package/dist/chunk-QC3X4DAW.cjs.map +1 -0
- package/dist/chunk-QPTICYGD.cjs +272 -0
- package/dist/chunk-QPTICYGD.cjs.map +1 -0
- package/dist/chunk-QZ7W2E4U.cjs +319 -0
- package/dist/chunk-QZ7W2E4U.cjs.map +1 -0
- package/dist/chunk-RJJPUPOY.cjs +97 -0
- package/dist/chunk-RJJPUPOY.cjs.map +1 -0
- package/dist/chunk-RRSMCCFS.js +43 -0
- package/dist/chunk-RRSMCCFS.js.map +1 -0
- package/dist/chunk-S6VCR6F5.js +91 -0
- package/dist/chunk-S6VCR6F5.js.map +1 -0
- package/dist/chunk-S7Y2GMYJ.cjs +89 -0
- package/dist/chunk-S7Y2GMYJ.cjs.map +1 -0
- package/dist/chunk-SIMEDLX3.cjs +645 -0
- package/dist/chunk-SIMEDLX3.cjs.map +1 -0
- package/dist/chunk-SQYF7HKF.cjs +59 -0
- package/dist/chunk-SQYF7HKF.cjs.map +1 -0
- package/dist/chunk-ST7BNVC2.cjs +13 -0
- package/dist/chunk-ST7BNVC2.cjs.map +1 -0
- package/dist/chunk-SZVRMMLS.js +16 -0
- package/dist/chunk-SZVRMMLS.js.map +1 -0
- package/dist/chunk-T27LICRD.js +2212 -0
- package/dist/chunk-T27LICRD.js.map +1 -0
- package/dist/chunk-TAU5HGJ3.cjs +11 -0
- package/dist/chunk-TAU5HGJ3.cjs.map +1 -0
- package/dist/chunk-TOM7TV5E.js +25 -0
- package/dist/chunk-TOM7TV5E.js.map +1 -0
- package/dist/chunk-TSRUDRT3.js +59 -0
- package/dist/chunk-TSRUDRT3.js.map +1 -0
- package/dist/chunk-U4FX33MW.js +257 -0
- package/dist/chunk-U4FX33MW.js.map +1 -0
- package/dist/chunk-UBOPWQWC.cjs +28 -0
- package/dist/chunk-UBOPWQWC.cjs.map +1 -0
- package/dist/chunk-UFE26GNF.js +42 -0
- package/dist/chunk-UFE26GNF.js.map +1 -0
- package/dist/chunk-UMQQVTEO.js +257 -0
- package/dist/chunk-UMQQVTEO.js.map +1 -0
- package/dist/chunk-UWY3SFAS.js +10 -0
- package/dist/chunk-UWY3SFAS.js.map +1 -0
- package/dist/chunk-V6EIIZPJ.js +57 -0
- package/dist/chunk-V6EIIZPJ.js.map +1 -0
- package/dist/chunk-V6G6W5CF.cjs +61 -0
- package/dist/chunk-V6G6W5CF.cjs.map +1 -0
- package/dist/chunk-VC4ZBWOK.js +152 -0
- package/dist/chunk-VC4ZBWOK.js.map +1 -0
- package/dist/chunk-VJRF6ILX.js +35 -0
- package/dist/chunk-VJRF6ILX.js.map +1 -0
- package/dist/chunk-VNSLCFO4.js +787 -0
- package/dist/chunk-VNSLCFO4.js.map +1 -0
- package/dist/chunk-W7GAP7ST.js +21 -0
- package/dist/chunk-W7GAP7ST.js.map +1 -0
- package/dist/chunk-WFUASJHS.js +64 -0
- package/dist/chunk-WFUASJHS.js.map +1 -0
- package/dist/chunk-WIKSIT3M.js +46 -0
- package/dist/chunk-WIKSIT3M.js.map +1 -0
- package/dist/chunk-WKLZLFLY.cjs +32 -0
- package/dist/chunk-WKLZLFLY.cjs.map +1 -0
- package/dist/chunk-WNB5HYON.cjs +10 -0
- package/dist/chunk-WNB5HYON.cjs.map +1 -0
- package/dist/chunk-WO5P2XBP.js +86 -0
- package/dist/chunk-WO5P2XBP.js.map +1 -0
- package/dist/chunk-WPYC4NGZ.cjs +46 -0
- package/dist/chunk-WPYC4NGZ.cjs.map +1 -0
- package/dist/chunk-WQRYZY67.cjs +89 -0
- package/dist/chunk-WQRYZY67.cjs.map +1 -0
- package/dist/chunk-WVCYVMJU.js +11 -0
- package/dist/chunk-WVCYVMJU.js.map +1 -0
- package/dist/chunk-WX25G2S3.js +116 -0
- package/dist/chunk-WX25G2S3.js.map +1 -0
- package/dist/chunk-X4FE7RRQ.js +23 -0
- package/dist/chunk-X4FE7RRQ.js.map +1 -0
- package/dist/chunk-X6EIJNOQ.cjs +67 -0
- package/dist/chunk-X6EIJNOQ.cjs.map +1 -0
- package/dist/chunk-XUBATJH6.js +1769 -0
- package/dist/chunk-XUBATJH6.js.map +1 -0
- package/dist/chunk-XUMREYMG.js +293 -0
- package/dist/chunk-XUMREYMG.js.map +1 -0
- package/dist/chunk-XYAJ2FS2.js +31 -0
- package/dist/chunk-XYAJ2FS2.js.map +1 -0
- package/dist/chunk-YKES5P4H.cjs +58 -0
- package/dist/chunk-YKES5P4H.cjs.map +1 -0
- package/dist/chunk-YYAQ75AV.cjs +216 -0
- package/dist/chunk-YYAQ75AV.cjs.map +1 -0
- package/dist/chunk-YZ3NJKVV.js +42 -0
- package/dist/chunk-YZ3NJKVV.js.map +1 -0
- package/dist/chunk-Z5ECTUMN.cjs +104 -0
- package/dist/chunk-Z5ECTUMN.cjs.map +1 -0
- package/dist/chunk-ZAKVHYDL.cjs +28 -0
- package/dist/chunk-ZAKVHYDL.cjs.map +1 -0
- package/dist/chunk-ZF34JXGU.js +39 -0
- package/dist/chunk-ZF34JXGU.js.map +1 -0
- package/dist/chunk-ZHGWDP2M.cjs +101 -0
- package/dist/chunk-ZHGWDP2M.cjs.map +1 -0
- package/dist/chunk-ZLHTQQLT.js +13 -0
- package/dist/chunk-ZLHTQQLT.js.map +1 -0
- package/dist/chunk-ZPAMY3IZ.cjs +25 -0
- package/dist/chunk-ZPAMY3IZ.cjs.map +1 -0
- package/dist/chunk-ZR63UB4V.js +42 -0
- package/dist/chunk-ZR63UB4V.js.map +1 -0
- package/dist/chunk-ZRCEB3KL.js +11 -0
- package/dist/chunk-ZRCEB3KL.js.map +1 -0
- package/dist/chunk-ZRGQNRQI.cjs +36 -0
- package/dist/chunk-ZRGQNRQI.cjs.map +1 -0
- package/dist/chunk-ZVY4IL7O.cjs +22 -0
- package/dist/chunk-ZVY4IL7O.cjs.map +1 -0
- package/dist/chunk-ZWIVKODQ.js +49 -0
- package/dist/chunk-ZWIVKODQ.js.map +1 -0
- package/dist/chunk-ZYF2HNMZ.js +10 -0
- package/dist/chunk-ZYF2HNMZ.js.map +1 -0
- package/dist/copilot/index.cjs +43 -0
- package/dist/copilot/index.cjs.map +1 -0
- package/dist/copilot/index.d.cts +66 -0
- package/dist/copilot/index.d.ts +66 -0
- package/dist/copilot/index.js +30 -0
- package/dist/copilot/index.js.map +1 -0
- package/dist/directionsPdf-GITP3SCP.cjs +274 -0
- package/dist/directionsPdf-GITP3SCP.cjs.map +1 -0
- package/dist/directionsPdf-TDKVUBCU.js +272 -0
- package/dist/directionsPdf-TDKVUBCU.js.map +1 -0
- package/dist/embed/index.cjs +1816 -0
- package/dist/embed/index.cjs.map +1 -0
- package/dist/embed/index.d.cts +300 -0
- package/dist/embed/index.d.ts +300 -0
- package/dist/embed/index.js +1809 -0
- package/dist/embed/index.js.map +1 -0
- package/dist/headless/index.cjs +408 -0
- package/dist/headless/index.cjs.map +1 -0
- package/dist/headless/index.d.cts +23 -0
- package/dist/headless/index.d.ts +23 -0
- package/dist/headless/index.js +31 -0
- package/dist/headless/index.js.map +1 -0
- package/dist/hostRegistry-BTG-KkRY.d.cts +115 -0
- package/dist/hostRegistry-BTG-KkRY.d.ts +115 -0
- package/dist/import/index.cjs +433 -0
- package/dist/import/index.cjs.map +1 -0
- package/dist/import/index.d.cts +169 -0
- package/dist/import/index.d.ts +169 -0
- package/dist/import/index.js +421 -0
- package/dist/import/index.js.map +1 -0
- package/dist/index-CELBpE13.d.cts +4198 -0
- package/dist/index-nqc3A-ty.d.ts +4198 -0
- package/dist/index.cjs +10597 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4949 -0
- package/dist/index.d.ts +4949 -0
- package/dist/index.js +9907 -0
- package/dist/index.js.map +1 -0
- package/dist/map/index.cjs +122 -0
- package/dist/map/index.cjs.map +1 -0
- package/dist/map/index.d.cts +988 -0
- package/dist/map/index.d.ts +988 -0
- package/dist/map/index.js +25 -0
- package/dist/map/index.js.map +1 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.cts +22 -0
- package/dist/routingGuidePictures-CxgXiuNd.d.ts +22 -0
- package/dist/studioStrings-lNvOeC1g.d.cts +72 -0
- package/dist/studioStrings-lNvOeC1g.d.ts +72 -0
- package/dist/styles.css +14677 -0
- package/dist/testing/index.cjs +357 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +319 -0
- package/dist/testing/index.d.ts +319 -0
- package/dist/testing/index.js +344 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/video/index.cjs +53 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +127 -0
- package/dist/video/index.d.ts +127 -0
- package/dist/video/index.js +44 -0
- package/dist/video/index.js.map +1 -0
- package/package.json +227 -4
- package/src/agent/components/ActivityRow.tsx +226 -0
- package/src/agent/components/AgentEntityIndicator.tsx +67 -0
- package/src/agent/components/AgentMarkdown.tsx +530 -0
- package/src/agent/components/ChatComposer.tsx +161 -0
- package/src/agent/components/ChatTranscript.tsx +1358 -0
- package/src/agent/components/CopilotPanel.tsx +415 -0
- package/src/agent/components/CopilotStates.tsx +238 -0
- package/src/agent/components/CopilotTranscript.tsx +191 -0
- package/src/agent/components/MessageFeedback.tsx +100 -0
- package/src/agent/hooks/useAgentChatTransport.ts +61 -0
- package/src/agent/hooks/useAgentErrorCopy.ts +27 -0
- package/src/agent/hooks/useCopilotOpen.ts +68 -0
- package/src/agent/providers/AgentThreadsProvider.tsx +360 -0
- package/src/agent/providers/PromptPanelConversation.tsx +135 -0
- package/src/agent/rules/drawnNode.ts +24 -0
- package/src/alerts/components/MapAlerts.tsx +127 -0
- package/src/cache/hooks/useStudioCache.ts +40 -0
- package/src/cache/rules/studioCache.ts +145 -0
- package/src/collab/components/PeerEntityIndicator.tsx +150 -0
- package/src/collab/components/PresenceRoster.tsx +113 -0
- package/src/collab/components/peerLock.tsx +59 -0
- package/src/collab/hooks/useCollabOrganizationId.ts +24 -0
- package/src/collab/hooks/usePeerLockLabel.ts +41 -0
- package/src/collections/components/CollectionFormModal.tsx +280 -0
- package/src/collections/components/CollectionMultiSelect.tsx +640 -0
- package/src/collections/components/EditCollectionModal.tsx +114 -0
- package/src/collections/components/ManageCollectionsModal.tsx +692 -0
- package/src/collections/components/NewCollectionModal.tsx +87 -0
- package/src/collections/components/ShareCollectionModal.tsx +150 -0
- package/src/collections/hooks/useEntityCollections.ts +126 -0
- package/src/collections/hooks/useEveryPage.ts +33 -0
- package/src/controls/components/MapControlTooltip.tsx +84 -0
- package/src/controls/components/PoiOverlayMenu.tsx +342 -0
- package/src/controls/components/StudioControls.tsx +278 -0
- package/src/controls/rules/constants.ts +34 -0
- package/src/copilot/hooks/useStudioCopilotInset.ts +39 -0
- package/src/copilot/index.ts +29 -0
- package/src/directions/components/DirectionsModal.tsx +447 -0
- package/src/directions/components/directionsPdf.tsx +557 -0
- package/src/embed/components/DefaultViewControl.tsx +159 -0
- package/src/embed/components/EmbedBaseMapPicker.tsx +107 -0
- package/src/embed/components/EmbedCodeSection.tsx +329 -0
- package/src/embed/components/EmbedColumnsSection.tsx +167 -0
- package/src/embed/components/EmbedConfigForm.tsx +239 -0
- package/src/embed/components/EmbedElementSwitcher.tsx +87 -0
- package/src/embed/components/EmbedFieldControl.tsx +488 -0
- package/src/embed/components/EmbedGeneralSection.tsx +279 -0
- package/src/embed/components/EmbedKeyPanel.tsx +138 -0
- package/src/embed/components/EmbedSnippetCode.tsx +154 -0
- package/src/embed/components/EmbedStage.tsx +505 -0
- package/src/embed/components/EmbedTablePreview.tsx +134 -0
- package/src/embed/components/EmbedThemePicker.tsx +74 -0
- package/src/embed/components/EmbedTintPicker.tsx +76 -0
- package/src/embed/components/EmbedWizard.tsx +1031 -0
- package/src/embed/hooks/useEmbedCode.ts +170 -0
- package/src/embed/hooks/useEmbedCollectionItineraries.ts +42 -0
- package/src/embed/hooks/useEmbedLayerOptions.ts +75 -0
- package/src/embed/hooks/useEmbedPreviewCamera.ts +169 -0
- package/src/embed/index.ts +48 -0
- package/src/fullscreen/components/FullscreenHeader.tsx +77 -0
- package/src/fullscreen/components/FullscreenModal.tsx +80 -0
- package/src/fullscreen/components/WizardLayout.tsx +129 -0
- package/src/guards/components/AgentDrivingGuard.tsx +59 -0
- package/src/guards/components/UnsavedEditsGuard.tsx +210 -0
- package/src/guards/hooks/useReportUnsavedForm.ts +34 -0
- package/src/guards/hooks/useUnsavedEditsGuard.ts +44 -0
- package/src/headless/hooks/useAgentDriving.ts +21 -0
- package/src/headless/hooks/useBeginSegmentEdit.ts +89 -0
- package/src/headless/hooks/useBeginWaypointEdit.ts +74 -0
- package/src/headless/hooks/useCapabilitySet.ts +65 -0
- package/src/headless/hooks/useCollabResources.ts +148 -0
- package/src/headless/hooks/useCollectionScope.ts +37 -0
- package/src/headless/hooks/useEditActions.ts +250 -0
- package/src/headless/hooks/useEscapeKey.ts +43 -0
- package/src/headless/hooks/useInlineRename.ts +276 -0
- package/src/headless/hooks/useLiveAwareSegments.ts +88 -0
- package/src/headless/hooks/useLiveAwareWaypoints.ts +39 -0
- package/src/headless/hooks/useMapHoveredRow.ts +76 -0
- package/src/headless/hooks/usePlatformViewer.ts +452 -0
- package/src/headless/hooks/usePluginSlot.ts +235 -0
- package/src/headless/hooks/useRowEmphasis.ts +66 -0
- package/src/headless/hooks/useSegmentList.ts +428 -0
- package/src/headless/hooks/useSegmentRow.ts +366 -0
- package/src/headless/hooks/useSegmentRowActions.ts +267 -0
- package/src/headless/hooks/useShallowSelector.ts +145 -0
- package/src/headless/hooks/useStableMembers.ts +74 -0
- package/src/headless/hooks/useStoreSlice.ts +52 -0
- package/src/headless/hooks/useStreetViewCorridor.ts +120 -0
- package/src/headless/hooks/useStudioApi.ts +18 -0
- package/src/headless/hooks/useStudioDispatch.ts +181 -0
- package/src/headless/hooks/useStudioDispatchCount.ts +147 -0
- package/src/headless/hooks/useStudioDispatchUnsafe.ts +111 -0
- package/src/headless/hooks/useStudioEntitlement.ts +29 -0
- package/src/headless/hooks/useStudioFailureAlert.ts +67 -0
- package/src/headless/hooks/useStudioObserve.ts +38 -0
- package/src/headless/hooks/useStudioPreferences.ts +8 -0
- package/src/headless/hooks/useStudioSignedIn.ts +12 -0
- package/src/headless/hooks/useStudioStore.ts +72 -0
- package/src/headless/hooks/useStudioUnits.ts +23 -0
- package/src/headless/hooks/useStudioUrl.ts +24 -0
- package/src/headless/hooks/useStudioUserId.ts +5 -0
- package/src/headless/hooks/useStudioVerbHeld.ts +43 -0
- package/src/headless/hooks/useStudioViewer.ts +19 -0
- package/src/headless/hooks/useStudioViewerEntitlement.ts +40 -0
- package/src/headless/hooks/useStudioViewerItineraryLimit.ts +34 -0
- package/src/headless/hooks/useStudioViewerPreferences.ts +44 -0
- package/src/headless/hooks/useStudioViewerUnits.ts +50 -0
- package/src/headless/hooks/useStudioViewerUserId.ts +23 -0
- package/src/headless/hooks/useUiStore.ts +91 -0
- package/src/headless/hooks/useUiStoreShallow.ts +43 -0
- package/src/headless/hooks/useWaypointDetailsDialog.ts +52 -0
- package/src/headless/hooks/useWaypointList.ts +89 -0
- package/src/headless/hooks/useWaypointRow.ts +227 -0
- package/src/headless/hooks/useWaypointRowActions.ts +166 -0
- package/src/headless/index.ts +287 -0
- package/src/headless/providers/billingGate.tsx +129 -0
- package/src/headless/providers/copilot.tsx +155 -0
- package/src/headless/providers/mountayaStudio.tsx +126 -0
- package/src/headless/providers/navigationBlocker.tsx +91 -0
- package/src/headless/providers/notify.tsx +36 -0
- package/src/headless/providers/organizations.tsx +267 -0
- package/src/headless/providers/plugins.tsx +173 -0
- package/src/headless/providers/studio.tsx +1295 -0
- package/src/headless/providers/studioStrings.tsx +243 -0
- package/src/headless/rules/inputMethod.ts +19 -0
- package/src/hooks/useAgreementLimits.ts +165 -0
- package/src/hooks/useLayerCatalogOptions.ts +106 -0
- package/src/host/components/MountayaStudioHost.tsx +1018 -0
- package/src/host/hooks/useEmbeddedStudio.ts +24 -0
- package/src/host/hooks/useItineraryActivation.ts +126 -0
- package/src/host/hooks/useMemberGrants.ts +51 -0
- package/src/host/hooks/useStudioHostSurfaces.ts +100 -0
- package/src/host/hooks/useStudioPluginBinding.ts +133 -0
- package/src/host/hooks/useStudioSessionHeld.ts +111 -0
- package/src/host/hooks/useStudioToolBus.ts +127 -0
- package/src/host/hooks/useStudioToolContext.ts +175 -0
- package/src/host/providers/hostRegistry.tsx +144 -0
- package/src/host/providers/hostSurface.tsx +47 -0
- package/src/host/providers/hostVideo.tsx +73 -0
- package/src/import/components/DraftEntityList.tsx +298 -0
- package/src/import/components/FileDropInput.tsx +261 -0
- package/src/import/components/FileDropzone.tsx +97 -0
- package/src/import/components/ImportItineraryContent.tsx +133 -0
- package/src/import/components/ImportPreviewLegend.tsx +50 -0
- package/src/import/components/ImportPrimer.tsx +113 -0
- package/src/import/index.ts +32 -0
- package/src/import/providers/ImportRoutingGuideProvider.tsx +319 -0
- package/src/import/rules/routingGuidePictures.ts +20 -0
- package/src/index.ts +633 -0
- package/src/internal/components/Glyph.tsx +34 -0
- package/src/internal/components/MarkerGlyph.tsx +23 -0
- package/src/internal/components/MountayaMark.tsx +142 -0
- package/src/internal/hooks/useTextOverflow.ts +90 -0
- package/src/internal/providers/studioEditorRoot.tsx +42 -0
- package/src/internal/rules/editorRoot.ts +9 -0
- package/src/internal/rules/missingSeam.ts +32 -0
- package/src/itinerary/components/ActivityGuideModal.tsx +345 -0
- package/src/itinerary/components/ActivitySelect.tsx +204 -0
- package/src/itinerary/components/AddWaypointButton.tsx +151 -0
- package/src/itinerary/components/AscentInput.tsx +65 -0
- package/src/itinerary/components/Characteristics.tsx +129 -0
- package/src/itinerary/components/CursorReadout.tsx +66 -0
- package/src/itinerary/components/DistanceInput.tsx +67 -0
- package/src/itinerary/components/DraftProvenanceBanner.tsx +79 -0
- package/src/itinerary/components/DuplicateItineraryModal.tsx +341 -0
- package/src/itinerary/components/EditorSaveFooter.tsx +424 -0
- package/src/itinerary/components/ItineraryActionsMenu.tsx +655 -0
- package/src/itinerary/components/ItineraryForm.tsx +887 -0
- package/src/itinerary/components/ItineraryHeaderIdentity.tsx +121 -0
- package/src/itinerary/components/ItineraryHeaderMeta.tsx +68 -0
- package/src/itinerary/components/ItineraryHeaderTitle.tsx +88 -0
- package/src/itinerary/components/ItineraryIdentityFields.tsx +153 -0
- package/src/itinerary/components/ItineraryProfilePanel.tsx +619 -0
- package/src/itinerary/components/ItineraryProfileSheet.tsx +219 -0
- package/src/itinerary/components/ItinerarySubHeader.tsx +236 -0
- package/src/itinerary/components/PendingProfile.tsx +142 -0
- package/src/itinerary/components/PlaceCard.tsx +35 -0
- package/src/itinerary/components/PlaceMark.tsx +76 -0
- package/src/itinerary/components/ProfileAnalysisBars.tsx +84 -0
- package/src/itinerary/components/ProfileBar.tsx +215 -0
- package/src/itinerary/components/ProfileHeaderControls.tsx +116 -0
- package/src/itinerary/components/ProfileHeaderFigures.tsx +119 -0
- package/src/itinerary/components/ProfilePaceControl.tsx +97 -0
- package/src/itinerary/components/ProfileStat.tsx +76 -0
- package/src/itinerary/components/ProfileStatStrip.tsx +38 -0
- package/src/itinerary/components/RoadAccessModal.tsx +76 -0
- package/src/itinerary/components/RouteTypeControl.tsx +73 -0
- package/src/itinerary/components/SegmentGroupModal.tsx +311 -0
- package/src/itinerary/components/SegmentGroupRangePicker.tsx +228 -0
- package/src/itinerary/components/StagingCreateFooter.tsx +185 -0
- package/src/itinerary/components/StudioItineraryProfile.tsx +620 -0
- package/src/itinerary/components/SuggestForm.tsx +256 -0
- package/src/itinerary/components/SuggestFormActions.tsx +124 -0
- package/src/itinerary/components/SuggestionResultRow.tsx +98 -0
- package/src/itinerary/components/SuggestionResultsList.tsx +85 -0
- package/src/itinerary/components/WaypointAmenityPicker.tsx +105 -0
- package/src/itinerary/components/WaypointDetailFields.tsx +604 -0
- package/src/itinerary/components/WaypointDetailsModal.tsx +134 -0
- package/src/itinerary/components/WaypointDetailsRows.tsx +707 -0
- package/src/itinerary/components/WaypointDetailsView.tsx +389 -0
- package/src/itinerary/components/WaypointIconCircle.tsx +211 -0
- package/src/itinerary/components/WaypointIconPicker.tsx +82 -0
- package/src/itinerary/components/WaypointMarkers.tsx +293 -0
- package/src/itinerary/components/WaypointPreviewCard.tsx +56 -0
- package/src/itinerary/components/WaypointSectionNav.tsx +151 -0
- package/src/itinerary/components/WaypointSwitcher.tsx +143 -0
- package/src/itinerary/components/WaypointWorkbench.tsx +263 -0
- package/src/itinerary/hooks/useDuplicateDraft.ts +205 -0
- package/src/itinerary/hooks/useDuplicateSource.ts +69 -0
- package/src/itinerary/hooks/useFriendlyNameBanks.ts +26 -0
- package/src/itinerary/hooks/useItineraryEditable.ts +89 -0
- package/src/itinerary/hooks/useItineraryPace.ts +103 -0
- package/src/itinerary/hooks/useItinerarySubject.ts +117 -0
- package/src/itinerary/hooks/useOpenItineraryEditable.ts +39 -0
- package/src/itinerary/hooks/useProfileOverlay.tsx +61 -0
- package/src/itinerary/hooks/useProfileSeries.ts +95 -0
- package/src/itinerary/hooks/useProfileVisibility.ts +149 -0
- package/src/itinerary/hooks/useSeedDraftOrganization.ts +85 -0
- package/src/itinerary/hooks/useSegmentGroupSave.ts +143 -0
- package/src/itinerary/hooks/useStartFromSuggestion.ts +63 -0
- package/src/itinerary/hooks/useStudioItinerary.ts +35 -0
- package/src/itinerary/hooks/useSuggestionPin.ts +36 -0
- package/src/itinerary/hooks/useWaypointCardWords.ts +51 -0
- package/src/itinerary/hooks/useWaypointCreateFollowUp.ts +158 -0
- package/src/itinerary/hooks/useWaypointDetailsEditor.ts +280 -0
- package/src/itinerary/hooks/useWaypointSectionEntries.ts +114 -0
- package/src/itinerary/providers/ActivityGuideProvider.tsx +113 -0
- package/src/itinerary/providers/ItineraryViewProvider.tsx +146 -0
- package/src/itinerary/rules/amenityGlyphs.ts +25 -0
- package/src/itinerary/rules/cursorReadoutData.ts +34 -0
- package/src/itinerary/rules/profileCursor.ts +11 -0
- package/src/itinerary/rules/profileModel.ts +98 -0
- package/src/itinerary/rules/shownFocus.ts +11 -0
- package/src/itinerary/rules/waypointGlyphs.ts +42 -0
- package/src/itinerary/stores/profileHover.ts +54 -0
- package/src/lists/components/AddSegmentButton.tsx +240 -0
- package/src/lists/components/EditActions.tsx +153 -0
- package/src/lists/components/EditorListSection.tsx +117 -0
- package/src/lists/components/EditorSegmentRow.tsx +458 -0
- package/src/lists/components/ItineraryAddSegmentButton.tsx +66 -0
- package/src/lists/components/ItinerarySegmentList.tsx +301 -0
- package/src/lists/components/ItineraryWaypointList.tsx +257 -0
- package/src/lists/components/SegmentList.tsx +549 -0
- package/src/lists/components/SegmentSeam.tsx +292 -0
- package/src/lists/components/WaypointList.tsx +232 -0
- package/src/map/components/ContextMenuPopup.tsx +913 -0
- package/src/map/components/MapAnchoredPopup.tsx +284 -0
- package/src/map/components/SegmentViaPopup.tsx +133 -0
- package/src/map/hooks/useAccessRestrictions.ts +25 -0
- package/src/map/hooks/useEmbedConstraints.ts +359 -0
- package/src/map/hooks/useEmbedDisplaySeed.ts +61 -0
- package/src/map/hooks/useEmbedReady.ts +137 -0
- package/src/map/hooks/useHeldTileSources.ts +65 -0
- package/src/map/hooks/useSegmentColor.ts +24 -0
- package/src/map/hooks/useSpecificationLayers.ts +25 -0
- package/src/map/hooks/useStudioConstraints.ts +135 -0
- package/src/map/hooks/useStudioContextMenu.ts +34 -0
- package/src/map/hooks/useStudioContextMenuWaypoint.ts +119 -0
- package/src/map/hooks/useStudioEditCommitReporter.ts +56 -0
- package/src/map/hooks/useStudioEditEngine.ts +270 -0
- package/src/map/hooks/useStudioEnrichment.ts +117 -0
- package/src/map/hooks/useStudioItinerarySelection.ts +484 -0
- package/src/map/hooks/useStudioLayersScope.ts +34 -0
- package/src/map/hooks/useStudioMapBindings.ts +178 -0
- package/src/map/hooks/useStudioMapEditSeams.ts +161 -0
- package/src/map/hooks/useStudioMapSync.ts +127 -0
- package/src/map/hooks/useStudioOverlay.ts +75 -0
- package/src/map/hooks/useStudioOverlayWithdrawal.ts +52 -0
- package/src/map/hooks/useStudioOverlaysEntitled.ts +12 -0
- package/src/map/hooks/useStudioPeerDrafts.ts +126 -0
- package/src/map/hooks/useStudioPoiLayers.ts +110 -0
- package/src/map/hooks/useStudioPreviewSync.ts +205 -0
- package/src/map/hooks/useStudioSegmentEditing.ts +239 -0
- package/src/map/hooks/useStudioSegmentViaPrompt.ts +38 -0
- package/src/map/hooks/useStudioSplitPicking.ts +411 -0
- package/src/map/hooks/useStudioSuggestionPicking.ts +178 -0
- package/src/map/hooks/useStudioTimestamp.ts +226 -0
- package/src/map/hooks/useStudioUrlState.ts +340 -0
- package/src/map/hooks/useStudioWaypointEditing.ts +251 -0
- package/src/map/hooks/useStudioZoneEditing.ts +260 -0
- package/src/map/hooks/useStudioZoneOriginPicking.ts +129 -0
- package/src/map/hooks/useStudioZoneSelection.ts +240 -0
- package/src/map/hooks/useTileLayers.ts +33 -0
- package/src/map/index.ts +67 -0
- package/src/map/rules/editKeyboard.ts +216 -0
- package/src/map/rules/editTooltip.ts +222 -0
- package/src/map/rules/nearerEscape.ts +107 -0
- package/src/map/rules/poiGlyphs.ts +40 -0
- package/src/modals/components/AppModal.tsx +280 -0
- package/src/modals/components/ConfirmModal.tsx +223 -0
- package/src/modals/components/ExportModal.tsx +538 -0
- package/src/modals/components/LocationPermissionModal.tsx +129 -0
- package/src/modals/components/ModalFooter.tsx +187 -0
- package/src/modals/hooks/useConfirmGate.tsx +209 -0
- package/src/modals/hooks/useDiscardGuard.tsx +168 -0
- package/src/panels/components/EditShortcutHint.tsx +115 -0
- package/src/panels/components/FloatingOverlay.tsx +243 -0
- package/src/panels/components/GlyphPickerGrid.tsx +84 -0
- package/src/panels/components/PanelRouter.tsx +133 -0
- package/src/panels/components/PickerCard.tsx +108 -0
- package/src/panels/components/RadioOptionCard.tsx +116 -0
- package/src/panels/components/SidenavContentBody.tsx +56 -0
- package/src/panels/components/SidenavContentFooter.tsx +27 -0
- package/src/panels/components/SidenavContentHeader.tsx +172 -0
- package/src/panels/components/SidenavFormActions.tsx +96 -0
- package/src/panels/components/StudioFormStack.tsx +44 -0
- package/src/panels/components/StudioHeader.tsx +117 -0
- package/src/panels/components/StudioLayersPanel.tsx +909 -0
- package/src/panels/components/StudioPreferencesPanel.tsx +199 -0
- package/src/panels/rules/studioHeader.ts +68 -0
- package/src/plugins/components/PluginBoundary.tsx +62 -0
- package/src/plugins/components/PluginContextMenuActions.tsx +73 -0
- package/src/plugins/components/PluginControls.tsx +101 -0
- package/src/plugins/components/PluginHeldView.tsx +77 -0
- package/src/plugins/components/PluginMenuItems.tsx +63 -0
- package/src/plugins/components/PluginProfileHeader.tsx +71 -0
- package/src/plugins/components/PluginProfilePlot.tsx +134 -0
- package/src/plugins/components/PluginSlotItems.tsx +55 -0
- package/src/primitives/components/ActivityIcon.tsx +106 -0
- package/src/primitives/components/AllowlistField.tsx +508 -0
- package/src/primitives/components/CopyIconButton.tsx +80 -0
- package/src/primitives/components/DateTimeInput.tsx +133 -0
- package/src/primitives/components/DateTimePickerField.tsx +101 -0
- package/src/primitives/components/DescriptiveMenuItem.tsx +80 -0
- package/src/primitives/components/DialogSubject.tsx +102 -0
- package/src/primitives/components/DisabledMenuItem.tsx +45 -0
- package/src/primitives/components/DisabledReason.tsx +34 -0
- package/src/primitives/components/EmptyState.tsx +186 -0
- package/src/primitives/components/ErrorAlert.tsx +35 -0
- package/src/primitives/components/ErrorBoundary.tsx +55 -0
- package/src/primitives/components/FieldLabel.tsx +34 -0
- package/src/primitives/components/FormErrorAlert.tsx +33 -0
- package/src/primitives/components/GroupLabelledBy.tsx +31 -0
- package/src/primitives/components/LanguageSelect.tsx +139 -0
- package/src/primitives/components/ListSkeleton.tsx +64 -0
- package/src/primitives/components/MarqueeText.tsx +61 -0
- package/src/primitives/components/OrganizationScopeItem.tsx +146 -0
- package/src/primitives/components/OrganizationSelect.tsx +149 -0
- package/src/primitives/components/PointField.tsx +75 -0
- package/src/primitives/components/PrivacyControl.tsx +127 -0
- package/src/primitives/components/RenameInput.tsx +159 -0
- package/src/primitives/components/RequiredLabelWithHelp.tsx +76 -0
- package/src/primitives/components/SegmentIcon.tsx +43 -0
- package/src/primitives/components/SegmentIconLabel.tsx +37 -0
- package/src/primitives/components/SpeedInput.tsx +222 -0
- package/src/primitives/components/StudioSectionBoundary.tsx +56 -0
- package/src/primitives/components/StudioSegmentedControl.tsx +23 -0
- package/src/primitives/components/UnitPickerField.tsx +62 -0
- package/src/primitives/components/UnitPickerGrid.tsx +71 -0
- package/src/primitives/components/WarningAlert.tsx +34 -0
- package/src/primitives/hooks/useCompactLayout.ts +30 -0
- package/src/primitives/hooks/useSpeedControlLabel.ts +28 -0
- package/src/primitives/rules/activityBadge.ts +87 -0
- package/src/publication/components/PublicationBadge.tsx +42 -0
- package/src/publication/components/PublicationDot.tsx +31 -0
- package/src/publication/components/PublicationNotice.tsx +115 -0
- package/src/publication/components/PublicationSettledPill.tsx +43 -0
- package/src/publication/components/PublicationStatus.tsx +52 -0
- package/src/publication/components/UnpublishedPanel.tsx +133 -0
- package/src/publication/hooks/usePublicationHint.ts +235 -0
- package/src/publication/hooks/usePublishAct.ts +101 -0
- package/src/publication/hooks/usePublishItinerary.ts +27 -0
- package/src/publication/hooks/usePublishZone.ts +27 -0
- package/src/publication/hooks/usePublishableScope.ts +23 -0
- package/src/publication/hooks/usePublishedItinerary.ts +83 -0
- package/src/rows/components/ReadOnlySegmentRow.tsx +155 -0
- package/src/rows/components/RouteMetricLine.tsx +90 -0
- package/src/rows/components/RowMetadata.tsx +92 -0
- package/src/rows/components/SegmentRow.tsx +381 -0
- package/src/rows/components/SegmentRowActions.tsx +187 -0
- package/src/rows/components/SegmentRowBody.tsx +197 -0
- package/src/rows/components/StudioToggleRow.tsx +71 -0
- package/src/rows/components/SuggestionList.tsx +100 -0
- package/src/rows/components/SuggestionRowLayout.tsx +164 -0
- package/src/rows/components/WaypointRow.tsx +175 -0
- package/src/rows/components/WaypointRowLayout.tsx +278 -0
- package/src/rows/components/lockChrome.tsx +106 -0
- package/src/rules/menuActions.ts +149 -0
- package/src/rules/sizing.ts +127 -0
- package/src/rules/studioConfig.ts +719 -0
- package/src/search/components/CategoryTabs.tsx +136 -0
- package/src/search/components/ResultRow.tsx +242 -0
- package/src/search/components/ResultsList.tsx +182 -0
- package/src/search/components/SearchInput.tsx +100 -0
- package/src/search/components/SearchTab.tsx +614 -0
- package/src/sections/components/RailSwitcher.tsx +179 -0
- package/src/sections/components/SectionCard.tsx +48 -0
- package/src/sections/components/SectionHead.tsx +42 -0
- package/src/sections/components/SectionTabs.tsx +231 -0
- package/src/segments/components/SegmentColorCircle.tsx +118 -0
- package/src/segments/components/SegmentColorPicker.tsx +134 -0
- package/src/segments/components/SegmentModeControl.tsx +118 -0
- package/src/segments/components/SegmentRowMenu.tsx +449 -0
- package/src/segments/components/SegmentRowPopover.tsx +163 -0
- package/src/segments/components/SegmentSelect.tsx +116 -0
- package/src/segments/components/SegmentSpeedControl.tsx +299 -0
- package/src/share/components/ShareLinkManage.tsx +699 -0
- package/src/share/components/ShareModal.tsx +182 -0
- package/src/share/components/ShareSheet.tsx +178 -0
- package/src/share/components/ShareViewModal.tsx +131 -0
- package/src/share/hooks/useCanManageShareLink.ts +51 -0
- package/src/studio/components/MountayaStudio.tsx +1170 -0
- package/src/studio/components/MountayaStudioViewer.tsx +775 -0
- package/src/studio/hooks/useEmbeddedStudioConfig.ts +60 -0
- package/src/studio/hooks/useViewerActivation.ts +47 -0
- package/src/studio/hooks/useViewerCollectionSpecification.ts +58 -0
- package/src/studio/hooks/useViewerEmbedConfig.ts +74 -0
- package/src/studio/hooks/useViewerFraming.ts +211 -0
- package/src/studio/hooks/useViewerMapBindings.ts +109 -0
- package/src/styles.css +3993 -0
- package/src/testing/collections.ts +40 -0
- package/src/testing/hostRegistry.tsx +109 -0
- package/src/testing/index.ts +65 -0
- package/src/testing/itinerary.ts +297 -0
- package/src/testing/mountayaClient.tsx +218 -0
- package/src/testing/viewer.tsx +171 -0
- package/src/theme/components/StudioPortalScope.tsx +130 -0
- package/src/theme/hooks/useResolvedStudioTheme.ts +37 -0
- package/src/theme/rules/density.ts +157 -0
- package/src/theme/rules/mountayaStudioTheme.ts +114 -0
- package/src/theme/rules/passwordManager.ts +20 -0
- package/src/theme/rules/tokenStyle.ts +18 -0
- package/src/theme/rules/tokens.ts +71 -0
- package/src/theme/rules/tone.ts +34 -0
- package/src/theme/rules/zIndex.ts +40 -0
- package/src/video/components/CameraStep.tsx +82 -0
- package/src/video/components/DirectingScrim.tsx +28 -0
- package/src/video/components/DirectorChat.tsx +79 -0
- package/src/video/components/FormatStep.tsx +487 -0
- package/src/video/components/ModeCards.tsx +141 -0
- package/src/video/components/PlanNumberField.tsx +54 -0
- package/src/video/components/PreviewControls.tsx +212 -0
- package/src/video/components/PreviewStage.tsx +319 -0
- package/src/video/components/PreviewSurface.tsx +247 -0
- package/src/video/components/PreviewWatermark.tsx +77 -0
- package/src/video/components/ProfileOverlayCanvas.tsx +195 -0
- package/src/video/components/ProfileStep.tsx +254 -0
- package/src/video/components/RecordProgress.tsx +117 -0
- package/src/video/components/ReviewStep.tsx +244 -0
- package/src/video/components/ShotList.tsx +452 -0
- package/src/video/components/VideoExportWizard.tsx +829 -0
- package/src/video/components/WizardDirectingIndicator.tsx +57 -0
- package/src/video/components/WizardFooter.tsx +112 -0
- package/src/video/hooks/usePreviewPlanRefresh.ts +91 -0
- package/src/video/hooks/useVideoItinerarySubject.ts +18 -0
- package/src/video/hooks/useVideoOrganizationId.ts +30 -0
- package/src/video/hooks/useVideoPreviewSeed.ts +203 -0
- package/src/video/hooks/useVideoProfileSeed.ts +53 -0
- package/src/video/hooks/useVideoPublication.ts +29 -0
- package/src/video/hooks/useVideoRouteReady.ts +52 -0
- package/src/video/hooks/useVideoRouteSync.ts +100 -0
- package/src/video/hooks/useVideoTileTransform.ts +88 -0
- package/src/video/index.ts +24 -0
- package/src/video/providers/DirectorChatProvider.tsx +293 -0
- package/src/video/rules/changeTo.ts +20 -0
- package/src/zone/components/ZoneActionsMenu.tsx +305 -0
- package/src/zone/components/ZoneAvailabilityFields.tsx +98 -0
- package/src/zone/components/ZoneForm.tsx +622 -0
- package/src/zone/components/ZoneInheritedContext.tsx +70 -0
- package/src/zone/components/ZoneLevelSelect.tsx +86 -0
- package/src/zone/components/ZoneMetadataFields.tsx +89 -0
- package/src/zone/components/ZoneMethodSelect.tsx +90 -0
- package/src/zone/components/ZoneModeSelect.tsx +98 -0
- package/src/zone/components/ZoneRangeInput.tsx +129 -0
- package/src/zone/components/ZoneReachabilityFields.tsx +120 -0
- package/src/zone/components/ZoneSubHeader.tsx +188 -0
- package/src/zone/components/ZoneVisibility.tsx +94 -0
- package/src/zone/hooks/useStudioReachabilityStart.ts +79 -0
- package/src/zone/hooks/useStudioZonesBrowsed.ts +32 -0
|
@@ -0,0 +1,1816 @@
|
|
|
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
|
+
) }) });
|
|
91
|
+
};
|
|
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"
|
|
122
|
+
};
|
|
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
|
+
) }) });
|
|
149
|
+
};
|
|
150
|
+
var tintGlyph = {
|
|
151
|
+
dark: "theme-dark",
|
|
152
|
+
light: "theme-light"
|
|
153
|
+
};
|
|
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
|
+
) }) });
|
|
180
|
+
};
|
|
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;
|
|
202
|
+
};
|
|
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 }
|
|
208
|
+
};
|
|
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 : "";
|
|
214
|
+
};
|
|
215
|
+
var listOf = (config, key) => {
|
|
216
|
+
const value = config[key];
|
|
217
|
+
return Array.isArray(value) ? value : [];
|
|
218
|
+
};
|
|
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];
|
|
228
|
+
};
|
|
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
|
+
);
|
|
376
|
+
};
|
|
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
|
+
]);
|
|
455
|
+
};
|
|
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 };
|
|
466
|
+
};
|
|
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
|
+
);
|
|
495
|
+
};
|
|
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
|
+
}
|
|
503
|
+
};
|
|
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
|
+
);
|
|
566
|
+
};
|
|
567
|
+
var SECTIONS4 = ["embed"];
|
|
568
|
+
var emptyDefaultView = {
|
|
569
|
+
bearing: null,
|
|
570
|
+
center: null,
|
|
571
|
+
pitch: null,
|
|
572
|
+
zoom: null
|
|
573
|
+
};
|
|
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
|
+
] });
|
|
626
|
+
};
|
|
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
|
+
] });
|
|
677
|
+
};
|
|
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
|
+
] }) });
|
|
700
|
+
};
|
|
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
|
+
);
|
|
719
|
+
};
|
|
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
|
+
] });
|
|
745
|
+
};
|
|
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
|
+
] });
|
|
819
|
+
};
|
|
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;
|
|
850
|
+
};
|
|
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
|
+
] });
|
|
899
|
+
};
|
|
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
|
+
] });
|
|
926
|
+
};
|
|
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
|
+
] });
|
|
1036
|
+
};
|
|
1037
|
+
var SECTIONS9 = ["embed"];
|
|
1038
|
+
var elementGlyphs = {
|
|
1039
|
+
map: "action-embed",
|
|
1040
|
+
"segment-table": "routed",
|
|
1041
|
+
"waypoint-table": "pin"
|
|
1042
|
+
};
|
|
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
|
+
] });
|
|
1073
|
+
};
|
|
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
|
+
);
|
|
1100
|
+
};
|
|
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
|
+
] });
|
|
1151
|
+
};
|
|
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
|
+
] });
|
|
1218
|
+
};
|
|
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));
|
|
1230
|
+
};
|
|
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;
|
|
1244
|
+
};
|
|
1245
|
+
var previewFrameStyle = {
|
|
1246
|
+
display: "flex",
|
|
1247
|
+
justifyContent: "center",
|
|
1248
|
+
overflow: "hidden"
|
|
1249
|
+
};
|
|
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%"
|
|
1257
|
+
};
|
|
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
|
+
] });
|
|
1332
|
+
};
|
|
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
|
+
] }) });
|
|
1384
|
+
};
|
|
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"
|
|
1425
|
+
};
|
|
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
|
+
);
|
|
1691
|
+
};
|
|
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
|
+
] });
|
|
1709
|
+
};
|
|
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 }) });
|
|
1714
|
+
};
|
|
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 }) });
|
|
1718
|
+
};
|
|
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 }) });
|
|
1722
|
+
};
|
|
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
|
+
);
|
|
1757
|
+
};
|
|
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
|
+
) }) });
|
|
1807
|
+
};
|
|
1808
|
+
|
|
1809
|
+
exports.EmbedBaseMapPicker = EmbedBaseMapPicker;
|
|
1810
|
+
exports.EmbedFieldControl = EmbedFieldControl;
|
|
1811
|
+
exports.EmbedThemePicker = EmbedThemePicker;
|
|
1812
|
+
exports.EmbedTintPicker = EmbedTintPicker;
|
|
1813
|
+
exports.EmbedToggleSwitch = EmbedToggleSwitch;
|
|
1814
|
+
exports.EmbedWizard = EmbedWizard;
|
|
1815
|
+
//# sourceMappingURL=index.cjs.map
|
|
1816
|
+
//# sourceMappingURL=index.cjs.map
|