@expofp/floorplan 3.2.5 → 3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/dist/browser/{CookieConsent-Dg2oD8sN.js → CookieConsent-C0WrwOQU.js} +2995 -2564
  2. package/dist/browser/{Debug-CbQznba_.js → Debug-7KOvbcgu.js} +9 -9
  3. package/dist/browser/{Demo-BdNX6_TP.js → Demo-BTrpOaT8.js} +12 -12
  4. package/dist/browser/{Free-BwoR5utw.js → Free-1JPcV1Tq.js} +14 -14
  5. package/dist/browser/{Gallery-CXfebPUO.js → Gallery-PP-H3fui.js} +9 -9
  6. package/dist/browser/{GpsLoader-Br89Qdn5.js → GpsLoader-pif05qaO.js} +33 -33
  7. package/dist/browser/{KioskStore-B2-ZAICw.js → KioskStore-BmqfGXEW.js} +17 -17
  8. package/dist/browser/Mapbox-BEO3oA1E.js +120 -0
  9. package/dist/browser/{SetKioskMode-CeBuv4Qc.js → SetKioskMode-BjyRxPem.js} +17 -17
  10. package/dist/browser/ShowKiosk-DrNFPO0o.js +26 -0
  11. package/dist/browser/{ThreeComponent-yHjpVIkt.js → ThreeComponent-CkTRDPj-.js} +244 -244
  12. package/dist/browser/{TouchHand-BEAsV_dg.js → TouchHand-BX9ElW6V.js} +4 -4
  13. package/dist/browser/{ViewerMenuPanel-Db8sxCQM.js → ViewerMenuPanel-BpxIaNdU.js} +15 -15
  14. package/dist/browser/{add-debug-secret-listener-BLEkj_Uk.js → add-debug-secret-listener-BV3Vlx9C.js} +1 -1
  15. package/dist/browser/{boolean-editor-COimNwU3.js → boolean-editor-DfkvcIH0.js} +10 -10
  16. package/dist/browser/bootIntercom-XKKrQyNd.js +37 -0
  17. package/dist/browser/{box-BQZT5OqH.js → box-Cy-U95_G.js} +5 -5
  18. package/dist/browser/{browser-8dPZoUbt.js → browser-oUjLaYcl.js} +2 -2
  19. package/dist/browser/bundle.json +53 -53
  20. package/dist/browser/{classnames-BCwn2LMt.js → classnames-DpaK9tQ8.js} +2 -2
  21. package/dist/browser/{client-Db8--ZUb.js → client-smunwL9U.js} +4 -4
  22. package/dist/browser/{data-DmyuOKjY.js → data-BVaCNE1I.js} +56 -56
  23. package/dist/browser/{debug-overlay-B4Z5LEoG.js → debug-overlay-CYWt6Xv8.js} +11 -11
  24. package/dist/browser/{debug-ui-CvJwtvIB.js → debug-ui-D63K4FZz.js} +6 -6
  25. package/dist/browser/{dist-C97JwCm0.js → dist-BU_A8R-K.js} +6 -6
  26. package/dist/browser/{dist-BG3wb6v1.js → dist-XBFUxmAT.js} +3 -3
  27. package/dist/browser/{dist-Dci3wfOd.js → dist-irw0I8ne.js} +5 -5
  28. package/dist/browser/{efp-debug-init-p9zcimBs.js → efp-debug-init-CPGmIrNj.js} +2 -2
  29. package/dist/browser/{enum-editor-o306HPmN.js → enum-editor-B_JVlLVN.js} +11 -11
  30. package/dist/browser/{exports-CStWW5-w.js → exports-C5NN5UxX.js} +1 -1
  31. package/dist/browser/{favicon-BA1CtVMn.js → favicon-B0nAd4Pr.js} +1 -1
  32. package/dist/browser/{fetch-retry.umd-Baj5gCtY.js → fetch-retry.umd-DBq0GieJ.js} +2 -2
  33. package/dist/browser/{flex-Bk7NLAwd.js → flex-DOhgUp1k.js} +6 -6
  34. package/dist/browser/{flex.props-DYJg7oQW.js → flex.props-D8JHoC5B.js} +2 -2
  35. package/dist/browser/{floorplan.loader-DSLFX3Z1.js → floorplan.loader-Cme4mipd.js} +9 -9
  36. package/dist/browser/{floorplan.ready-D1C9tWKU.js → floorplan.ready-C25lQjgP.js} +215 -254
  37. package/dist/browser/{fuse-DHUSTGYM.js → fuse-D1o3bI0m.js} +2 -2
  38. package/dist/browser/index.js +12 -12
  39. package/dist/browser/{is-debug-Hdaykk22.js → is-debug-D9BzIDdu.js} +3 -3
  40. package/dist/browser/{jsx-runtime-BudMXsuy.js → jsx-runtime-C0zFKVvF.js} +2 -2
  41. package/dist/browser/{lib-Dl-Q0kBv.js → lib-D2sBqUIY.js} +4 -4
  42. package/dist/browser/{main-C74Uu09R.js → main-GLYY8zv3.js} +1 -1
  43. package/dist/browser/{mobx-CqnQOCE3.js → mobx-D5pYBM85.js} +4 -4
  44. package/dist/browser/{particles.min-By5wV8f0.js → particles.min-egXyIDIV.js} +2 -2
  45. package/dist/browser/{prop-types-PFP3f1FZ.js → prop-types-xhHzBbvi.js} +2 -2
  46. package/dist/browser/{react-COj6SqvB.js → react-CanbjT5I.js} +2 -2
  47. package/dist/browser/{react-dom-BdCxtmki.js → react-dom-wNBYs_H5.js} +3 -3
  48. package/dist/browser/{reset-all-settings-BQEz2q9w.js → reset-all-settings-5oUUws5J.js} +7 -7
  49. package/dist/browser/{rolldown-runtime-msuxsciZ.js → rolldown-runtime-BKpHzyBK.js} +1 -1
  50. package/dist/browser/{settings-C0lWPVRL.js → settings-D5qqIejY.js} +2 -2
  51. package/dist/browser/{settings-item-Y4RmHiJ4.js → settings-item-Blm7DAEt.js} +6 -6
  52. package/dist/browser/{store-5PES-APA.js → store-CM7rJpRZ.js} +1151 -916
  53. package/dist/browser/{string-editor-CDEAe6WK.js → string-editor-CLdOCbq2.js} +8 -8
  54. package/dist/browser/{theme-yitmRjt6.js → theme-App4ywLP.js} +8 -8
  55. package/dist/browser/{ui--XBIRzrF.js → ui-BN6m_5pK.js} +8 -8
  56. package/dist/esm/RouteCutIn.js +1 -1
  57. package/dist/esm/components/IntercomLauncher.d.ts +5 -0
  58. package/dist/esm/components/IntercomLauncher.js +1 -0
  59. package/dist/esm/components/Layout.js +1 -1
  60. package/dist/esm/components/Map/Map.js +1 -1
  61. package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
  62. package/dist/esm/components/gps/useUserLocationAndHeading.js +1 -1
  63. package/dist/esm/components/gps/utils.js +1 -1
  64. package/dist/esm/floorplan.ready.js +1 -1
  65. package/dist/esm/intercom/bootIntercom.js +1 -19
  66. package/dist/esm/store/IntercomStore.d.ts +7 -0
  67. package/dist/esm/store/IntercomStore.js +1 -0
  68. package/dist/esm/store/RootStore.d.ts +2 -0
  69. package/dist/esm/store/RootStore.js +1 -1
  70. package/dist/esm/store/RouteStore.d.ts +1 -1
  71. package/dist/esm/store/RouteStore.js +1 -1
  72. package/dist/esm/store/index.d.ts +1 -0
  73. package/dist/esm/store/index.js +1 -1
  74. package/dist/esm/utils/gps.d.ts +0 -1
  75. package/dist/esm/utils/gps.js +1 -1
  76. package/dist/esm/utils/haversineDistance.d.ts +7 -0
  77. package/dist/esm/utils/haversineDistance.js +1 -0
  78. package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +13 -0
  79. package/dist/esm/wayfinding/adapters/boothToEndpoint.js +1 -0
  80. package/dist/esm/wayfinding/adapters/boothToWaypoint.d.ts +1 -1
  81. package/dist/esm/wayfinding/adapters/canvasIconProvider.d.ts +20 -0
  82. package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -0
  83. package/dist/esm/wayfinding/adapters/floorContext.d.ts +10 -0
  84. package/dist/esm/wayfinding/adapters/floorContext.js +1 -0
  85. package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +1 -1
  86. package/dist/esm/wayfinding/adapters/iconProvider.d.ts +15 -0
  87. package/dist/esm/wayfinding/adapters/index.d.ts +9 -0
  88. package/dist/esm/wayfinding/adapters/index.js +1 -0
  89. package/dist/esm/wayfinding/adapters/kioskCanvas.d.ts +7 -0
  90. package/dist/esm/wayfinding/adapters/kioskCanvas.js +1 -0
  91. package/dist/esm/wayfinding/adapters/positionInput.d.ts +11 -0
  92. package/dist/esm/wayfinding/adapters/positionInput.js +1 -0
  93. package/dist/esm/wayfinding/bindMobxReactions.d.ts +27 -0
  94. package/dist/esm/wayfinding/bindMobxReactions.js +1 -0
  95. package/dist/esm/wayfinding/{__tests__ → core/__tests__}/helpers.d.ts +0 -5
  96. package/dist/esm/wayfinding/core/__tests__/helpers.js +1 -0
  97. package/dist/esm/wayfinding/core/createWayfindingEngine.d.ts +16 -0
  98. package/dist/esm/wayfinding/core/createWayfindingEngine.js +1 -0
  99. package/dist/esm/wayfinding/{graph → core/graph}/graphCache.d.ts +2 -1
  100. package/dist/esm/wayfinding/core/index.d.ts +16 -0
  101. package/dist/esm/wayfinding/core/index.js +1 -0
  102. package/dist/esm/wayfinding/core/position/distanceToRoute.d.ts +3 -0
  103. package/dist/esm/wayfinding/core/position/distanceToRoute.js +1 -0
  104. package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +22 -0
  105. package/dist/esm/wayfinding/core/position/gpsThreshold.js +1 -0
  106. package/dist/esm/wayfinding/core/position/shouldReroute.d.ts +3 -0
  107. package/dist/esm/wayfinding/core/position/shouldReroute.js +1 -0
  108. package/dist/esm/wayfinding/core/position/snapToRoute.d.ts +4 -0
  109. package/dist/esm/wayfinding/core/position/snapToRoute.js +1 -0
  110. package/dist/esm/{components/Map/drawing/config/route-snapping → wayfinding/core/position}/splitRouteByPoint.d.ts +1 -1
  111. package/dist/esm/wayfinding/core/position/splitRouteByPoint.js +1 -0
  112. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.d.ts +19 -0
  113. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.js +1 -0
  114. package/dist/esm/wayfinding/{rendering → core/rendering}/computeTransitionPoints.d.ts +2 -2
  115. package/dist/esm/wayfinding/core/rendering/getVisibleRouteLines.d.ts +11 -0
  116. package/dist/esm/wayfinding/core/rendering/getVisibleRouteLines.js +1 -0
  117. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.d.ts +20 -0
  118. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.js +1 -0
  119. package/dist/esm/wayfinding/core/rendering/routeGeometry.d.ts +15 -0
  120. package/dist/esm/wayfinding/core/rendering/routeGeometry.js +1 -0
  121. package/dist/esm/wayfinding/core/routing/optimizeWaypointOrder.d.ts +19 -0
  122. package/dist/esm/wayfinding/core/routing/optimizeWaypointOrder.js +1 -0
  123. package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +7 -0
  124. package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +1 -0
  125. package/dist/esm/wayfinding/{types.d.ts → core/types.d.ts} +37 -0
  126. package/dist/esm/wayfinding/createWayfinding.d.ts +3 -0
  127. package/dist/esm/wayfinding/createWayfinding.js +1 -0
  128. package/dist/esm/wayfinding/handlers/kioskHandler.d.ts +25 -0
  129. package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -0
  130. package/dist/esm/wayfinding/handlers/yahHandler.d.ts +23 -0
  131. package/dist/esm/wayfinding/handlers/yahHandler.js +1 -0
  132. package/dist/esm/wayfinding/layers.d.ts +14 -0
  133. package/dist/esm/wayfinding/layers.js +1 -0
  134. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.d.ts +14 -0
  135. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.js +1 -0
  136. package/dist/esm/wayfinding/renderer/iconManager.d.ts +31 -0
  137. package/dist/esm/wayfinding/renderer/iconManager.js +1 -0
  138. package/dist/esm/wayfinding/renderer/index.d.ts +3 -0
  139. package/dist/esm/wayfinding/renderer/index.js +1 -0
  140. package/dist/esm/wayfinding/renderer/layerManager.d.ts +27 -0
  141. package/dist/esm/wayfinding/renderer/layerManager.js +1 -0
  142. package/dist/esm/wayfinding/renderer/routeLineManager.d.ts +42 -0
  143. package/dist/esm/wayfinding/renderer/routeLineManager.js +1 -0
  144. package/dist/esm/wayfinding/renderer/trailManager.d.ts +27 -0
  145. package/dist/esm/wayfinding/renderer/trailManager.js +1 -0
  146. package/dist/esm/wayfinding/renderer/types.d.ts +162 -0
  147. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.d.ts +3 -0
  148. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -0
  149. package/dist/esm/wayfinding/runtime/endpointView.d.ts +16 -0
  150. package/dist/esm/wayfinding/runtime/endpointView.js +1 -0
  151. package/dist/esm/wayfinding/runtime/getRouteLines.d.ts +13 -0
  152. package/dist/esm/wayfinding/runtime/getRouteLines.js +1 -0
  153. package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +57 -0
  154. package/dist/esm/wayfinding/runtime/positionTrailView.js +1 -0
  155. package/dist/esm/wayfinding/runtime/positionView.d.ts +23 -0
  156. package/dist/esm/wayfinding/runtime/positionView.js +1 -0
  157. package/dist/esm/wayfinding/runtime/routeLinesView.d.ts +18 -0
  158. package/dist/esm/wayfinding/runtime/routeLinesView.js +1 -0
  159. package/dist/esm/wayfinding/runtime/routeRenderData.d.ts +29 -0
  160. package/dist/esm/wayfinding/runtime/routeRenderData.js +1 -0
  161. package/dist/esm/wayfinding/runtime/routeUpdate.d.ts +14 -0
  162. package/dist/esm/wayfinding/runtime/routeUpdate.js +1 -0
  163. package/dist/esm/wayfinding/runtime/trailView.d.ts +21 -0
  164. package/dist/esm/wayfinding/runtime/trailView.js +1 -0
  165. package/dist/esm/wayfinding/runtime/transitionView.d.ts +18 -0
  166. package/dist/esm/wayfinding/runtime/transitionView.js +1 -0
  167. package/dist/esm/wayfinding/runtime/types.d.ts +72 -0
  168. package/dist/esm/wayfinding/runtime/types.js +1 -0
  169. package/dist/esm/wayfinding/utils/findBoothInRadius.d.ts +4 -0
  170. package/dist/esm/wayfinding/utils/findBoothInRadius.js +1 -0
  171. package/package.json +3 -3
  172. package/dist/browser/Mapbox-B5PiDpk1.js +0 -120
  173. package/dist/browser/ShowKiosk-CfxC8v7B.js +0 -26
  174. package/dist/browser/bootIntercom-DjZFUOTC.js +0 -40
  175. package/dist/esm/components/Map/drawing/config/config-wf.d.ts +0 -8
  176. package/dist/esm/components/Map/drawing/config/config-wf.js +0 -1
  177. package/dist/esm/components/Map/drawing/config/route-snapping/index.d.ts +0 -5
  178. package/dist/esm/components/Map/drawing/config/route-snapping/index.js +0 -1
  179. package/dist/esm/components/Map/drawing/config/route-snapping/snapPositionToRoute.d.ts +0 -21
  180. package/dist/esm/components/Map/drawing/config/route-snapping/snapPositionToRoute.js +0 -1
  181. package/dist/esm/components/Map/drawing/config/route-snapping/splitRouteByPoint.js +0 -1
  182. package/dist/esm/components/Map/drawing/config/route-snapping/types.d.ts +0 -18
  183. package/dist/esm/components/Map/drawing/config/route-snapping/utils.d.ts +0 -29
  184. package/dist/esm/components/Map/drawing/config/route-snapping/utils.js +0 -1
  185. package/dist/esm/utils/buildOptimizedRoute.d.ts +0 -11
  186. package/dist/esm/utils/buildOptimizedRoute.js +0 -1
  187. package/dist/esm/wayfinding/_PLAN-public-api.d.ts +0 -220
  188. package/dist/esm/wayfinding/__integration__/legacy/legacyWayfinding.d.ts +0 -27
  189. package/dist/esm/wayfinding/__integration__/legacy/legacyWayfinding.js +0 -1
  190. package/dist/esm/wayfinding/__tests__/helpers.js +0 -1
  191. package/dist/esm/wayfinding/index.d.ts +0 -18
  192. package/dist/esm/wayfinding/index.js +0 -1
  193. package/dist/esm/wayfinding/rendering/normalizeRouteDirection.d.ts +0 -19
  194. package/dist/esm/wayfinding/rendering/normalizeRouteDirection.js +0 -1
  195. package/dist/esm/wayfinding/rendering/routeGeometry.d.ts +0 -16
  196. package/dist/esm/wayfinding/rendering/routeGeometry.js +0 -1
  197. package/dist/esm/wayfinding/routing/getGraphLines.d.ts +0 -14
  198. package/dist/esm/wayfinding/routing/getGraphLines.js +0 -1
  199. /package/dist/esm/{components/Map/drawing/config/route-snapping/types.js → wayfinding/adapters/iconProvider.js} +0 -0
  200. /package/dist/esm/wayfinding/{graph → core/graph}/buildGraph.d.ts +0 -0
  201. /package/dist/esm/wayfinding/{graph → core/graph}/buildGraph.js +0 -0
  202. /package/dist/esm/wayfinding/{graph → core/graph}/buildNGraph.d.ts +0 -0
  203. /package/dist/esm/wayfinding/{graph → core/graph}/buildNGraph.js +0 -0
  204. /package/dist/esm/wayfinding/{graph → core/graph}/constants.d.ts +0 -0
  205. /package/dist/esm/wayfinding/{graph → core/graph}/constants.js +0 -0
  206. /package/dist/esm/wayfinding/{graph → core/graph}/findShortestPath.d.ts +0 -0
  207. /package/dist/esm/wayfinding/{graph → core/graph}/findShortestPath.js +0 -0
  208. /package/dist/esm/wayfinding/{graph → core/graph}/graphCache.js +0 -0
  209. /package/dist/esm/wayfinding/{graph → core/graph}/graphHelpers.d.ts +0 -0
  210. /package/dist/esm/wayfinding/{graph → core/graph}/graphHelpers.js +0 -0
  211. /package/dist/esm/wayfinding/{graph → core/graph}/linkCost.d.ts +0 -0
  212. /package/dist/esm/wayfinding/{graph → core/graph}/linkCost.js +0 -0
  213. /package/dist/esm/wayfinding/{graph → core/graph}/pathfinder/aStarPathFinder.d.ts +0 -0
  214. /package/dist/esm/wayfinding/{graph → core/graph}/pathfinder/aStarPathFinder.js +0 -0
  215. /package/dist/esm/wayfinding/{graph → core/graph}/pathfinder/parseNodeId.d.ts +0 -0
  216. /package/dist/esm/wayfinding/{graph → core/graph}/pathfinder/parseNodeId.js +0 -0
  217. /package/dist/esm/wayfinding/{rendering → core/rendering}/computeTransitionPoints.js +0 -0
  218. /package/dist/esm/wayfinding/{routing → core/routing}/buildMultiPointRoute.d.ts +0 -0
  219. /package/dist/esm/wayfinding/{routing → core/routing}/buildMultiPointRoute.js +0 -0
  220. /package/dist/esm/wayfinding/{routing → core/routing}/buildRoute.d.ts +0 -0
  221. /package/dist/esm/wayfinding/{routing → core/routing}/buildRoute.js +0 -0
  222. /package/dist/esm/wayfinding/{routing → core/routing}/findNearestGraphPoint.d.ts +0 -0
  223. /package/dist/esm/wayfinding/{routing → core/routing}/findNearestGraphPoint.js +0 -0
  224. /package/dist/esm/wayfinding/{routing → core/routing}/getRouteLength.d.ts +0 -0
  225. /package/dist/esm/wayfinding/{routing → core/routing}/getRouteLength.js +0 -0
  226. /package/dist/esm/wayfinding/{routing → core/routing}/routeResult.d.ts +0 -0
  227. /package/dist/esm/wayfinding/{routing → core/routing}/routeResult.js +0 -0
  228. /package/dist/esm/wayfinding/{types.js → core/types.js} +0 -0
  229. /package/dist/esm/wayfinding/{_PLAN-public-api.js → renderer/types.js} +0 -0
@@ -1,18 +1,18 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.2.5" };
4
+ e.SENTRY_RELEASE = { id: "3.2.7" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "d6998a34-2e60-485b-acb4-511cd67af42e", e._sentryDebugIdIdentifier = "sentry-dbid-d6998a34-2e60-485b-acb4-511cd67af42e");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-msuxsciZ.js";
10
- import { t } from "./react-COj6SqvB.js";
11
- import { t as n } from "./jsx-runtime-BudMXsuy.js";
12
- import { E as r, c as i, l as a, o, r as s, v as c } from "./box-BQZT5OqH.js";
13
- import { t as l } from "./classnames-BCwn2LMt.js";
14
- import { t as u } from "./flex.props-DYJg7oQW.js";
15
- import { t as d } from "./settings-item-Y4RmHiJ4.js";
9
+ import { r as e } from "./rolldown-runtime-BKpHzyBK.js";
10
+ import { t } from "./react-CanbjT5I.js";
11
+ import { t as n } from "./jsx-runtime-C0zFKVvF.js";
12
+ import { E as r, c as i, l as a, o, r as s, v as c } from "./box-Cy-U95_G.js";
13
+ import { t as l } from "./classnames-DpaK9tQ8.js";
14
+ import { t as u } from "./flex.props-D8JHoC5B.js";
15
+ import { t as d } from "./settings-item-Blm7DAEt.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@19.2._d6d76dcfd4c9de055b7c51247e12b902/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
17
17
  var f = {
18
18
  size: {
@@ -1,18 +1,18 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.2.5" };
4
+ e.SENTRY_RELEASE = { id: "3.2.7" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7ef9ec30-23fe-46ab-9eef-b60026a43ae8", e._sentryDebugIdIdentifier = "sentry-dbid-7ef9ec30-23fe-46ab-9eef-b60026a43ae8");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-msuxsciZ.js";
10
- import { t } from "./react-COj6SqvB.js";
11
- import { t as n } from "./jsx-runtime-BudMXsuy.js";
12
- import { t as r } from "./react-dom-BdCxtmki.js";
13
- import { C as i, D as a, S as o, T as s, _ as c, a as l, g as u, w as d } from "./box-BQZT5OqH.js";
14
- import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-C97JwCm0.js";
15
- import { t as y } from "./classnames-BCwn2LMt.js";
9
+ import { r as e } from "./rolldown-runtime-BKpHzyBK.js";
10
+ import { t } from "./react-CanbjT5I.js";
11
+ import { t as n } from "./jsx-runtime-C0zFKVvF.js";
12
+ import { t as r } from "./react-dom-wNBYs_H5.js";
13
+ import { C as i, D as a, S as o, T as s, _ as c, a as l, g as u, w as d } from "./box-Cy-U95_G.js";
14
+ import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-BU_A8R-K.js";
15
+ import { t as y } from "./classnames-DpaK9tQ8.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.14__@ty_d1be9c417e0b55d219bafdc186d26ce0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
17
17
  var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
18
18
  position: "absolute",
@@ -1,17 +1,17 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.2.5" };
4
+ e.SENTRY_RELEASE = { id: "3.2.7" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "92182a39-8df3-47fb-a7de-39aa7bf1975b", e._sentryDebugIdIdentifier = "sentry-dbid-92182a39-8df3-47fb-a7de-39aa7bf1975b");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-msuxsciZ.js";
10
- import { i as t, r as n } from "./reset-all-settings-BQEz2q9w.js";
11
- import { t as r } from "./jsx-runtime-BudMXsuy.js";
12
- import "./settings-C0lWPVRL.js";
13
- import { t as i } from "./browser-8dPZoUbt.js";
14
- import { t as a } from "./add-debug-secret-listener-BLEkj_Uk.js";
9
+ import { r as e } from "./rolldown-runtime-BKpHzyBK.js";
10
+ import { i as t, r as n } from "./reset-all-settings-5oUUws5J.js";
11
+ import { t as r } from "./jsx-runtime-C0zFKVvF.js";
12
+ import "./settings-D5qqIejY.js";
13
+ import { t as i } from "./browser-oUjLaYcl.js";
14
+ import { t as a } from "./add-debug-secret-listener-BV3Vlx9C.js";
15
15
  //#region ../debug/src/lib/ui/render-debug-ui.tsx
16
16
  var o = /* @__PURE__ */ e(i(), 1), s = r(), c = !1;
17
17
  function l() {
@@ -26,7 +26,7 @@ function l() {
26
26
  }
27
27
  });
28
28
  let i = async (t) => {
29
- let { DebugUi: n } = await import("./debug-ui-CvJwtvIB.js"), { createRoot: i } = await import("./client-Db8--ZUb.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-D63K4FZz.js"), { createRoot: i } = await import("./client-smunwL9U.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
30
30
  document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, s.jsx)(n, {
31
31
  useDebugButtonState: r.useState,
32
32
  open: t
@@ -1 +1 @@
1
- import{SpecialBooth as b}from"./store/BoothStore";import{graphDataSource as E}from"./wayfinding";import P from"./store";import D from"./core/Rect";import{areLayersEnabled as S}from"./utils/areLayersEnabled";export class RouteCutIn extends b{id;name;destination;slug;meta;store=P.boothStore;exhibitors=[];paths=[];routePoint;rect=D.fromCxcywh(0,0,0,0);entity={type:"route-cut-in"};constructor(i,r,n,s,t={}){super(),this.id=i,this.name=r,this.destination=n,this.slug=s,this.meta=t,this.layer=P.layerStore.findLayer(n.layer),this.routePoint=this.findClosestRoutePoint();const e=this.findClosestLineEnd(this.routePoint);e&&(this.rect=D.fromCxcywh(e.x,e.y,1,1)),Object.freeze(this)}findClosestRoutePoint(){const i=E.getLines(),r=S()?i.filter(t=>t.p0.layer===this.destination.layer&&t.p1.layer===this.destination.layer):i;if(!r?.length)return null;let n=1/0,s=null;return r.forEach(t=>{const e=this.distanceToLine(this.destination,t.p0,t.p1);e<n&&(n=e,s=t)}),{...this.findClosestPointOnLine(this.destination,s),layer:this.destination.layer}}distanceToLine(i,r,n){const s=i.x,t=i.y,e=r.x,o=r.y,l=n.x,d=n.y,x=s-e,h=t-o,a=l-e,u=d-o,m=x*a+h*u,f=a*a+u*u;let c=-1;f!==0&&(c=m/f);let y,p;c<0?(y=e,p=o):c>1?(y=l,p=d):(y=e+c*a,p=o+c*u);const L=s-y,C=t-p;return Math.sqrt(L*L+C*C)}findClosestPointOnLine(i,r){const{x:n,y:s}=r.p0,{x:t,y:e}=r.p1,{x:o,y:l}=i,d=o-n,x=l-s,h=t-n,a=e-s,u=d*h+x*a,m=h*h+a*a;let f=-1;m!==0&&(f=u/m);let c,y;return f<0?(c=n,y=s):f>1?(c=t,y=e):(c=n+f*h,y=s+f*a),{x:c,y}}findClosestLineEnd(i){if(!i)return null;const r=E.getLineEnds(),n=S()?r.filter(o=>o.layer===i.layer):r;let s=null,t=1/0;function e(o,l,d,x){return Math.sqrt((d-o)**2+(x-l)**2)}return n.forEach(o=>{const l=e(i.x,i.y,o.x,o.y);l<t&&(t=l,s=o)}),s}}
1
+ import{SpecialBooth as b}from"./store/BoothStore";import{graphDataSource as E}from"./wayfinding/adapters";import P from"./store";import D from"./core/Rect";import{areLayersEnabled as S}from"./utils/areLayersEnabled";export class RouteCutIn extends b{id;name;destination;slug;meta;store=P.boothStore;exhibitors=[];paths=[];routePoint;rect=D.fromCxcywh(0,0,0,0);entity={type:"route-cut-in"};constructor(i,r,n,s,t={}){super(),this.id=i,this.name=r,this.destination=n,this.slug=s,this.meta=t,this.layer=P.layerStore.findLayer(n.layer),this.routePoint=this.findClosestRoutePoint();const e=this.findClosestLineEnd(this.routePoint);e&&(this.rect=D.fromCxcywh(e.x,e.y,1,1)),Object.freeze(this)}findClosestRoutePoint(){const i=E.getLines(),r=S()?i.filter(t=>t.p0.layer===this.destination.layer&&t.p1.layer===this.destination.layer):i;if(!r?.length)return null;let n=1/0,s=null;return r.forEach(t=>{const e=this.distanceToLine(this.destination,t.p0,t.p1);e<n&&(n=e,s=t)}),{...this.findClosestPointOnLine(this.destination,s),layer:this.destination.layer}}distanceToLine(i,r,n){const s=i.x,t=i.y,e=r.x,o=r.y,l=n.x,d=n.y,x=s-e,h=t-o,a=l-e,u=d-o,m=x*a+h*u,f=a*a+u*u;let c=-1;f!==0&&(c=m/f);let y,p;c<0?(y=e,p=o):c>1?(y=l,p=d):(y=e+c*a,p=o+c*u);const L=s-y,C=t-p;return Math.sqrt(L*L+C*C)}findClosestPointOnLine(i,r){const{x:n,y:s}=r.p0,{x:t,y:e}=r.p1,{x:o,y:l}=i,d=o-n,x=l-s,h=t-n,a=e-s,u=d*h+x*a,m=h*h+a*a;let f=-1;m!==0&&(f=u/m);let c,y;return f<0?(c=n,y=s):f>1?(c=t,y=e):(c=n+f*h,y=s+f*a),{x:c,y}}findClosestLineEnd(i){if(!i)return null;const r=E.getLineEnds(),n=S()?r.filter(o=>o.layer===i.layer):r;let s=null,t=1/0;function e(o,l,d,x){return Math.sqrt((d-o)**2+(x-l)**2)}return n.forEach(o=>{const l=e(i.x,i.y,o.x,o.y);l<t&&(t=l,s=o)}),s}}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "./IntercomLauncher.scss";
3
+ declare const IntercomLauncher: React.FunctionComponent<object>;
4
+ export default IntercomLauncher;
5
+ //# sourceMappingURL=IntercomLauncher.d.ts.map
@@ -0,0 +1 @@
1
+ import{jsx as r,jsxs as c}from"react/jsx-runtime";import{observer as i}from"mobx-react-lite";import{intercomStore as t}from"../store";import{t as o}from"../utils/i18n";import"./IntercomLauncher.scss";const s=i(function(){if(!t.enabled)return null;const a=()=>{const n=window;typeof n.Intercom=="function"&&n.Intercom("show")},e=t.unreadCount;return c("button",{className:"efp-intercom-launcher",type:"button","aria-label":o("Open chat"),onClick:a,children:[r("svg",{width:"24",height:"24",viewBox:"0 0 28 32",fill:"currentColor","aria-hidden":"true",focusable:"false",children:r("path",{d:"M28 32s-4.714-1.855-8.527-3.34H3.437C1.54 28.66 0 27.026 0 25.013V3.644C0 1.633 1.54 0 3.437 0h21.125c1.898 0 3.437 1.632 3.437 3.645v18.404H28V32zm-4.139-11.982a.88.88 0 00-1.292-.105c-.03.026-3.015 2.681-8.57 2.681-5.486 0-8.517-2.636-8.571-2.684a.88.88 0 00-1.29.107 1.01 1.01 0 00-.219.708.992.992 0 00.318.664c.142.128 3.537 3.15 9.762 3.15 6.226 0 9.621-3.022 9.763-3.15a.992.992 0 00.317-.664 1.01 1.01 0 00-.218-.707z"})}),e>0&&r("span",{className:"efp-intercom-launcher__badge","aria-label":o("Unread messages"),children:e>99?"99+":e})]})});export default s;
@@ -1 +1 @@
1
- import{jsx as o,jsxs as g}from"react/jsx-runtime";import{observer as z}from"mobx-react-lite";import r,{Suspense as a,useEffect as M,useState as E}from"react";import w from"classnames";import t,{layersStore as d,uiState as e}from"../store";import f from"../tools/settings";import{isWebGlSupported as L}from"../utils";import R from"../utils/is-debug";import O from"../utils/is-iframe";import B from"./Controls";import D from"./LevelSelector";import G from"./LargeMessage";import"../styles/main.scss";import"./Layout.scss";import T from"./LogoOverlay";import A from"./SearchBox";import j from"./SearchButtons/SearchButtons";import F from"./MobileToggleButton";import{CategoryFilterModal as P}from"./CategoryFilterModal";import I from"./SessionsFiltersModal";import V from"./SpeakersFiltersModal";import $ from"./Map/Map";import{MapLoader as H}from"./Mapbox/MapLoader";import K from"./OverlayContainer";import _ from"./Share";import N from"./Ws";import{LayersMode as y}from"../store/LayerStore";import U from"./LayersLoading";import{fpGeo as W}from"../data/fpGeo";import{checkUserIsGDPR as X,GaEventActions as s,hasUserConsent as q,sendEventToGa as l,setConsentSettings as S,setCookieConsent as C}from"../tools/gtag";import Y from"./HeatmapLegend";import{useReaction as m}from"../utils/mobx";import J from"../tools/track-event";import Q from"./GlobalErrorMessage";const Z=r.lazy(()=>import("./Demo")),ee=r.lazy(()=>import("./Free")),oe=r.lazy(()=>import("./Debug")),te=r.lazy(()=>import("./Mapbox/Mapbox")),ie=r.lazy(()=>import("./Threejs/ThreeComponent")),re=r.lazy(()=>import("./Modal")),ae=r.lazy(()=>import("./CookieConsent")),le=r.lazy(()=>import("./GpsLoader")),ne=r.lazy(()=>import("./Kiosk/SetKioskMode")),se=r.lazy(()=>import("./Kiosk/ShowKiosk"));export default z(function({offHistory:b,allowConsent:p}){const[u,c]=E(!1);let n=null;e.bannerType==="demo"?n=o(Z,{}):e.bannerType==="free"&&(n=o(ee,{}));const v=()=>{C(!0),S(),t.uiState.hideCookieConsent=!0},x=()=>{C(!1),S(),t.uiState.hideCookieConsent=!0};M(()=>{async function i(){const k=await X();c(!!(k||k===null))}q(p)?c(!0):i()},[]),m(()=>e.selectedExhibitor,i=>{t.heatmapStore.forceTrack?(l(t.heatmapStore.forceTrack.action,t.heatmapStore.forceTrack.label),t.heatmapStore.forceTrack=null):i&&(J("exview",i.id),l(s.ViewExhibitor,i.name))}),m(()=>e.selectedBooth,i=>i?.name&&l(s.ViewBooth,i.name)),m(()=>e.selectedCategory,i=>i?.name&&l(s.ViewCategory,i?.name)),m(()=>e.selectedEventItem,i=>i?.name&&l(s.ViewExhibitor,i.name));const h=!e.hideCookieConsent&&!e.kiosk&&u&&p===void 0;return o("div",{id:"efp-layout",className:w("layout",{"efp-kiosk":e.kiosk,"efp-kiosk-route-active":e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":e.wsShown,"efp-no-overlay":e.noOverlay,"efp-top-banner":e.bannerType==="free"&&!e.freeBannerDismissed,"efp-viewer-mode":e.viewerMode}),dir:e.rtl?"rtl":"ltr",style:{"--ui-scale":e.uiScale.toString()},children:g("div",{className:`layout__fixed expo-${f.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(d.mode===y.Radio||d.mode===y.CheckBox)&&!e.floorsControlHidden&&t.initialized&&o(D,{}),!e.noOverlay&&t.initialized&&o(K,{isGDPR:u,allowConsent:p}),t.initialized&&o(T,{}),!e.noOverlay&&t.initialized&&!(e.viewerMode&&e.menu)&&o(A,{}),!e.noOverlay&&t.initialized&&o(j,{}),!e.noOverlay&&t.initialized&&o(F,{}),!e.mapControlsHidden&&t.initialized&&o(B,{}),!e.hideHeaderLogo&&t.initialized&&o(N,{}),t.routeStore.gpsEnabled&&o(le,{requestCompassAllowed:!h}),L&&o($,{}),t.mapboxStore.mapBoxActivated&&t.mapboxStore.mapBoxEnabled&&o(a,{fallback:o(H,{}),children:W?.properties?.mode==="threejs"?o(ie,{isMapbox:t.mapboxStore.isMapbox,expo:f.EXPO}):o(te,{})}),n&&!e.hideFreeOrDemo&&!e.heatmap?o(a,{fallback:null,children:n}):null,h&&o(a,{fallback:null,children:o(ae,{link:"https://expofp.com/pages/viewer-cookie-consent",onClickAccept:v,onClickReject:x})}),R?o(a,{fallback:null,children:o(oe,{})}):null,O&&o(G,{}),e.modalActive.share?o(a,{fallback:null,children:o(re,{type:"share",open:e.modalActive.share,onClickClose:()=>t.toggleModal("share"),children:o(_,{title:e.selectedExhibitor?.name||e.selectedEventItem?.name||"",url:b?`${window.location.origin}?${encodeURI(e.selectedExhibitor?.slug||e.selectedEventItem?.slug)}`:window.location.href})})}):null,e.heatmap||e.heatmapYah?o(Y,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:e.responsiveClass,max:t.heatmapStore.minAndMaxClicks.max,min:t.heatmapStore.minAndMaxClicks.min,colors:f.heatmapColors}):null,o(U,{active:!d.layersLoaded}),o("div",{id:"fps"}),t.initialized&&o(P,{}),t.initialized&&o(I,{store:t.sessionsFilterStore}),t.initialized&&o(V,{store:t.speakerFilterStore}),o(Q,{}),t.initialized&&e.setKioskModeEnabled&&o(a,{fallback:null,children:o(ne,{})}),t.initialized&&!e.setKioskModeEnabled&&o(a,{fallback:null,children:o(se,{})})]})})});
1
+ import{jsx as o,jsxs as g}from"react/jsx-runtime";import{observer as z}from"mobx-react-lite";import r,{Suspense as a,useEffect as M,useState as E}from"react";import w from"classnames";import t,{layersStore as d,uiState as e}from"../store";import f from"../tools/settings";import{isWebGlSupported as L}from"../utils";import R from"../utils/is-debug";import O from"../utils/is-iframe";import B from"./Controls";import D from"./LevelSelector";import G from"./LargeMessage";import"../styles/main.scss";import"./Layout.scss";import T from"./LogoOverlay";import A from"./SearchBox";import j from"./SearchButtons/SearchButtons";import F from"./MobileToggleButton";import I from"./IntercomLauncher";import{CategoryFilterModal as P}from"./CategoryFilterModal";import V from"./SessionsFiltersModal";import $ from"./SpeakersFiltersModal";import H from"./Map/Map";import{MapLoader as K}from"./Mapbox/MapLoader";import _ from"./OverlayContainer";import N from"./Share";import U from"./Ws";import{LayersMode as y}from"../store/LayerStore";import W from"./LayersLoading";import{fpGeo as X}from"../data/fpGeo";import{checkUserIsGDPR as q,GaEventActions as s,hasUserConsent as Y,sendEventToGa as l,setConsentSettings as S,setCookieConsent as C}from"../tools/gtag";import J from"./HeatmapLegend";import{useReaction as m}from"../utils/mobx";import Q from"../tools/track-event";import Z from"./GlobalErrorMessage";const ee=r.lazy(()=>import("./Demo")),oe=r.lazy(()=>import("./Free")),te=r.lazy(()=>import("./Debug")),ie=r.lazy(()=>import("./Mapbox/Mapbox")),re=r.lazy(()=>import("./Threejs/ThreeComponent")),ae=r.lazy(()=>import("./Modal")),le=r.lazy(()=>import("./CookieConsent")),ne=r.lazy(()=>import("./GpsLoader")),se=r.lazy(()=>import("./Kiosk/SetKioskMode")),me=r.lazy(()=>import("./Kiosk/ShowKiosk"));export default z(function({offHistory:b,allowConsent:p}){const[u,c]=E(!1);let n=null;e.bannerType==="demo"?n=o(ee,{}):e.bannerType==="free"&&(n=o(oe,{}));const v=()=>{C(!0),S(),t.uiState.hideCookieConsent=!0},x=()=>{C(!1),S(),t.uiState.hideCookieConsent=!0};M(()=>{async function i(){const k=await q();c(!!(k||k===null))}Y(p)?c(!0):i()},[]),m(()=>e.selectedExhibitor,i=>{t.heatmapStore.forceTrack?(l(t.heatmapStore.forceTrack.action,t.heatmapStore.forceTrack.label),t.heatmapStore.forceTrack=null):i&&(Q("exview",i.id),l(s.ViewExhibitor,i.name))}),m(()=>e.selectedBooth,i=>i?.name&&l(s.ViewBooth,i.name)),m(()=>e.selectedCategory,i=>i?.name&&l(s.ViewCategory,i?.name)),m(()=>e.selectedEventItem,i=>i?.name&&l(s.ViewExhibitor,i.name));const h=!e.hideCookieConsent&&!e.kiosk&&u&&p===void 0;return o("div",{id:"efp-layout",className:w("layout",{"efp-kiosk":e.kiosk,"efp-kiosk-route-active":e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":e.wsShown,"efp-no-overlay":e.noOverlay,"efp-top-banner":e.bannerType==="free"&&!e.freeBannerDismissed,"efp-viewer-mode":e.viewerMode}),dir:e.rtl?"rtl":"ltr",style:{"--ui-scale":e.uiScale.toString()},children:g("div",{className:`layout__fixed expo-${f.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(d.mode===y.Radio||d.mode===y.CheckBox)&&!e.floorsControlHidden&&t.initialized&&o(D,{}),!e.noOverlay&&t.initialized&&o(_,{isGDPR:u,allowConsent:p}),t.initialized&&o(T,{}),!e.noOverlay&&t.initialized&&!(e.viewerMode&&e.menu)&&o(A,{}),!e.noOverlay&&t.initialized&&o(j,{}),!e.noOverlay&&t.initialized&&o(F,{}),!e.mapControlsHidden&&t.initialized&&o(B,{}),o(I,{}),!e.hideHeaderLogo&&t.initialized&&o(U,{}),t.routeStore.gpsEnabled&&o(ne,{requestCompassAllowed:!h}),L&&o(H,{}),t.mapboxStore.mapBoxActivated&&t.mapboxStore.mapBoxEnabled&&o(a,{fallback:o(K,{}),children:X?.properties?.mode==="threejs"?o(re,{isMapbox:t.mapboxStore.isMapbox,expo:f.EXPO}):o(ie,{})}),n&&!e.hideFreeOrDemo&&!e.heatmap?o(a,{fallback:null,children:n}):null,h&&o(a,{fallback:null,children:o(le,{link:"https://expofp.com/pages/viewer-cookie-consent",onClickAccept:v,onClickReject:x})}),R?o(a,{fallback:null,children:o(te,{})}):null,O&&o(G,{}),e.modalActive.share?o(a,{fallback:null,children:o(ae,{type:"share",open:e.modalActive.share,onClickClose:()=>t.toggleModal("share"),children:o(N,{title:e.selectedExhibitor?.name||e.selectedEventItem?.name||"",url:b?`${window.location.origin}?${encodeURI(e.selectedExhibitor?.slug||e.selectedEventItem?.slug)}`:window.location.href})})}):null,e.heatmap||e.heatmapYah?o(J,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:e.responsiveClass,max:t.heatmapStore.minAndMaxClicks.max,min:t.heatmapStore.minAndMaxClicks.min,colors:f.heatmapColors}):null,o(W,{active:!d.layersLoaded}),o("div",{id:"fps"}),t.initialized&&o(P,{}),t.initialized&&o(V,{store:t.sessionsFilterStore}),t.initialized&&o($,{store:t.speakerFilterStore}),o(Z,{}),t.initialized&&e.setKioskModeEnabled&&o(a,{fallback:null,children:o(se,{})}),t.initialized&&!e.setKioskModeEnabled&&o(a,{fallback:null,children:o(me,{})})]})})});
@@ -1 +1 @@
1
- import{jsx as S,jsxs as I,Fragment as H}from"react/jsx-runtime";import{useObserver as Y}from"mobx-react-lite";import q from"classnames";import{useEffect as J,useMemo as Q,useRef as z,useState as ee}from"react";import{observable as oe}from"mobx";import i,{boothStore as te,layersStore as R,uiState as e}from"../../store";import re from"./drawing/config/config-all";import{useReaction as d}from"../../utils/mobx";import{LayerMode as g}from"../../store/LayerStore";import p from"../../tools/settings";import{Rect as x}from"./drawing/config/Rect";import C from"../../core/Rect";import{Exhibitor as F}from"../../store/ExhibitorStore";import{BoothBase as ne}from"../../store/BoothStore";import{CurrentPosition as ie,Route as ae}from"../../store/RouteStore";import{Category as se}from"../../store/CategoryStore";import T from"../../tools/logger";import{svgArea as D}from"../../data/svg";import{configMarkers as le,getMarkerFromClick as me}from"./drawing/config/config-markers";import ce from"color";import fe from"./drawing/config/config-wf";import{createSceneDef as de}from"../../renderer";import{convertGpsToLocal as ue}from"../../utils/gps";import{fpGeo as pe}from"../../data/fpGeo";import v from"../../utils/is-debug";import{Draggable as he}from"../Draggable";import{useBuildRoute as ve}from"./traffic/useBuildRoute";import{useManageTraffic as be}from"./traffic/useManageTraffic";import{DEBUG_STORAGE_KEY as G,PATHWAY_KEY as N}from"../../constants";import O from"./booth-by-xy";import{mapRollSetting as X}from"../../renderer";import{loadLayersImages as ye}from"./drawing/config/loadBoothsImages";import{areLayersEnabled as ge}from"../../utils/areLayersEnabled";import{pickDefaultScene as A,pickDefaultScenePoint as xe}from"../../renderer/engine-core/defs";const j=Number.isFinite(p.maxZoom);export default function we(){let k={};const K="#ebebeb",h=z(),b=Q(()=>oe({moving:!1,prevLevel:i.layerStore.layers.find(o=>!o.frozen&&o.visible)}),[]),s=i.rendererService;let l;const L=z(null);let B=null,M=null;const[U,V]=ee(()=>typeof window<"u"&&window.localStorage?localStorage.getItem(G)!=="false":!0);d(()=>i.routeStore.currentRouteLayer,()=>{if(!s.scene||b.prevLevel===i.routeStore.currentRouteLayer)return;const o=s.scene.rootLayer.children.filter(r=>i.layerStore.floors.some(n=>r.name.includes(n.name)));let t=i.routeStore.currentRouteLayer.name;if(!o.find(r=>r.name===t))return;const a=o?.map(r=>(r.name===t&&(r.hidden=!1),r.name===b.prevLevel?.name&&(r.hidden=!0),r));b.prevLevel=i.routeStore.currentRouteLayer,s.update(...a)}),d(()=>e.centerMap,()=>{!e.centerMap||i.mapboxStore.showMapbox||(l.controls.resetCamera({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)}),J(()=>{if(!h.current)return;async function o(){let t={};try{if(v){const r=document.createElement("canvas").getContext("webgl2"),n=r&&r.getExtension("EXT_disjoint_timer_query_webgl2"),m=(await import("stats-gl")).default,f=new m({trackGPU:n,horizontal:!0}),u=L.current;if(!u)throw new Error("memoryInfoPanel not found.");f.dom.style.position="relative",u.style.width=`${90*(n?3:2)}px`,u.style.height="48px",u.appendChild(f.dom),t={stats:f,memoryInfoPanel:u}}}catch(a){console.error(a)}l=s.create({canvas:h.current,ui:t}),e.canvasVisibleRectPx&&(l.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx)),re(s).then(a=>{v&&console.log("Renderer settings",l);const r=ce(p.backgroundColor==="none"?K:p.backgroundColor).string("rgba");k=de(a,x.fromCoreRect(D),r),s.start(k),X(l,i.fp.enableRotation?1:0),j&&l.viewport.setMaxZoom(p.maxZoom),R.layersLoaded=!0,i.fp.onFpConfigured&&i.fp?.onFpConfigured(),B=fe(s),M=le(s),ye(s)}),l.events.addEventListener("pointer:move",({data:a})=>{if(e.setKioskModeEnabled)return;const{point:r,defs:n}=A(a),c=O(r.x,r.y),m=E(n[0]);e.hoveredBooth=c||m}),l.events.addEventListener("pointer:out",()=>{e.setKioskModeEnabled||(e.hoveredBooth=null)}),l.events.addEventListener("pointer:click",({data:a})=>{if(!e?.rootElement)return;window.__resett&&window.__resett(),e.overlayPosition==="bottom"&&e.overlaySize==="full"&&i.showMap();const{point:r,defs:n}=A(a),{x:c,y:m}=r;if(e.onGetCoordsClick){const y=i.layerStore.layers.find(w=>w.visible&&(w.mode===g.TurnedOn||w.mode===g.TurnedOff));e.onGetCoordsClick({x:c,y:m,z:y?.name||null})}if(e.setKioskModeEnabled)return;if(e.onMarkerClick){const y=me(c,m,s.scale);v&&console.log("marker",y),e.onMarkerClick(y)}const f=O(r.x,r.y),u=E(n[0]);v&&console.log("boothIdFromClientXy",f,"boothByShape",u,"pointer:click point",r),i.clickBooth(f||u)}),l.events.addEventListener("navigation:change",()=>window.__resett&&window.__resett())}return o(),i.fp.getCenterCoordinates=Z,()=>W()},[]);function W(){B?.(),M?.(),s.dispose()}function Z(){const o=h.current;if(!h.current)throw new Error("Canvas not ready");const t=xe(l.viewport.canvasToSvg({x:o.clientWidth/2,y:o.clientHeight/2})),r=i.layerStore.visible.find(n=>n.mode===g.TurnedOff||n.mode===g.TurnedOn)?.name||null;return{...t,z:r}}function E(o){return!o||!o.shape?null:te.booths.find(t=>t.shapes?.find(a=>a.shape==o.shape))}d(()=>e.zoomBy,()=>{if(!e.zoomBy||i.mapboxStore.showMapbox)return;const o=e.zoomBy;l.controls.zoomBy(o),e.zoomBy=null}),d(()=>e.dimmed,o=>{if(!s.scene)return;const t=s.scene.rootLayer;t.dim!==o&&(t.dim=o,s.update(t))}),d(()=>e.details,()=>{if(!e.onDetails)return;if(!e.details){e.onDetails(null);return}var o=e.details;if(p.EXPO==="wineparis"&&(o instanceof F&&(o=o.booths[0]),!o))return;let t=null,a=[];o instanceof F?(t="exhibitor",a=o.booths.map(n=>n.name).sort((n,c)=>n==i.routeStore.tempToBooth?.name?-1:c==i.routeStore.tempToBooth?.name?1:0)):o instanceof ne?(t="booth",a=[o.name]):o instanceof ae?(t="route",a=[o.from?.name,o.to?.name].filter(n=>!!n)):o instanceof se&&(t="category",a=o.exhibitors.map(n=>n.booths.map(c=>c.name)).flat());var r={type:t,name:o?.name,id:o?.id,externalId:o?.externalId,boothsNames:a};e.onDetails({...r,...t==="route"?{routeInfo:i.routeStore.routeInfo}:{}})}),d(()=>e.canvasVisibleRectPx,()=>{s.renderer&&(s.renderer.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx))},{fireImmediately:!0}),d(()=>e.moveToRect,()=>{!e.moveToRect||i.mapboxStore.showMapbox||(e.moveToRect&&e.moveToRect.h!==1/0&&e.moveToRect.w!==1/0&&e.moveToRect.h>0&&e.moveToRect.w>0&&_(e.moveToRect),e.moveToRect=null)}),d(()=>e.rollReset,o=>{o&&(l.controls.resetCamera({roll:!0}),e.rollReset=!1)}),d(()=>e.moveToBooths,()=>{if(T.log("this.moveToBooths",e.moveToBooths),!e.moveToBooths||i.mapboxStore.showMapbox)return;T.log("watched moveToBooths",e.moveToBooths);const o=e.moveToBooths.filter(t=>t.rect).map(t=>t.rect);o.length!==0&&(_(C.fromMultiple(o)),e.moveToBooths=null)}),d(()=>e.mapSettings,({zoomtime:o,center:t,centerxy:a,bearing:r,roll:n,z:c})=>{if(!(i.mapboxStore.showMapbox||!s.renderer))try{o&&o!==e.defaultMapSettings.zoomtime&&s.renderer.controls.configure({zoomTime:o/1e3}),i.fp.enableRotation&&X(l,n);let m;if(t){const f=t.split(",").map(Number),u=new ie(void 0,void 0,void 0,void 0,f[0],f[1]);m=ue(u,pe.properties.config)}else if(a){const f=a.split(",").map(Number);m={x:f[0],y:f[1]}}c&&i.fp.activateFloor({name:c}),(m?.x||m?.y)&&s.renderer.controls.panTo(m.x,m.y),Number.isFinite(r)&&s.renderer.controls.rollTo(r)}catch(m){T.error("Error in mapSettings reaction",m)}}),ve({enabled:R.layersLoaded&&e.buildRoute,rendererService:s});const P="routes-api.expofp.com";be({permission:R.layersLoaded,rendererService:s,dataJsonUrl:`https://${P}/v1/routes?expo=${p.EXPO}`,websocketUrl:`wss://${P}/locations?expo=${p.EXPO}`}),d(()=>i.layerStore.visible,o=>{if(!s.scene)return;const t=o.filter(n=>n.name.toLowerCase().includes(N)),r=s.scene.rootLayer.children.filter(n=>n.name.toLowerCase().includes(N));r.forEach(n=>{n.hidden=!t.find(c=>c.name===n.name)}),s.update(...r)});function _(o){let t=o;const a=$(o,D);e.kioskData&&(!ge()||i.routeStore.defaultFrom?.layer?.name===i.routeStore.currentRouteLayer?.name)&&(t=C.fromMultiple([o,C.fromXywh(e.kioskData.x,e.kioskData.y,1,1)]));const r=x.fromCoreRect(t),n={paddingPercent:a,maxZoom:j?void 0:10};if(e.shouldShiftMapRect){l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x+e.overlayWidthPx};try{l.controls.zoomTo(r,n)}finally{l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x-e.overlayWidthPx}}}else l.controls.zoomTo(r,n)}function $(o,t){return!o||!t?0:(o.w*o.h/(t.h*t.w)>.1?15:25)/100}return Y(()=>I(H,{children:[S("canvas",{style:{width:"100%",height:"100%"},ref:h,className:q({map:!0,moving:b.moving,hidden:i.mapboxStore.showMapbox}),children:"ExpoFP.com"}),v&&U&&I(he,{className:"debug-fps",children:[S("div",{ref:L}),S("button",{onClick:()=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(G,"false"),V(!1)},style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",backgroundColor:"#333",color:"#fff",border:"1px solid #555",width:"100%"},children:"Hide debug"})]})]}))}
1
+ import{jsx as S,jsxs as I,Fragment as H}from"react/jsx-runtime";import{useObserver as Y}from"mobx-react-lite";import q from"classnames";import{useEffect as J,useMemo as Q,useRef as z,useState as ee}from"react";import{observable as oe}from"mobx";import i,{boothStore as te,layersStore as R,uiState as e}from"../../store";import re from"./drawing/config/config-all";import{useReaction as d}from"../../utils/mobx";import{LayerMode as g}from"../../store/LayerStore";import p from"../../tools/settings";import{Rect as x}from"./drawing/config/Rect";import C from"../../core/Rect";import{Exhibitor as F}from"../../store/ExhibitorStore";import{BoothBase as ne}from"../../store/BoothStore";import{CurrentPosition as ie,Route as ae}from"../../store/RouteStore";import{Category as se}from"../../store/CategoryStore";import T from"../../tools/logger";import{svgArea as D}from"../../data/svg";import{configMarkers as le,getMarkerFromClick as me}from"./drawing/config/config-markers";import ce from"color";import{createWayfinding as fe}from"../../wayfinding/createWayfinding";import{createSceneDef as de}from"../../renderer";import{convertGpsToLocal as ue}from"../../utils/gps";import{fpGeo as pe}from"../../data/fpGeo";import v from"../../utils/is-debug";import{Draggable as he}from"../Draggable";import{useBuildRoute as ve}from"./traffic/useBuildRoute";import{useManageTraffic as be}from"./traffic/useManageTraffic";import{DEBUG_STORAGE_KEY as G,PATHWAY_KEY as N}from"../../constants";import O from"./booth-by-xy";import{mapRollSetting as X}from"../../renderer";import{loadLayersImages as ye}from"./drawing/config/loadBoothsImages";import{areLayersEnabled as ge}from"../../utils/areLayersEnabled";import{pickDefaultScene as A,pickDefaultScenePoint as xe}from"../../renderer/engine-core/defs";const j=Number.isFinite(p.maxZoom);export default function we(){let k={};const K="#ebebeb",h=z(),b=Q(()=>oe({moving:!1,prevLevel:i.layerStore.layers.find(o=>!o.frozen&&o.visible)}),[]),s=i.rendererService;let l;const L=z(null);let B=null,M=null;const[U,V]=ee(()=>typeof window<"u"&&window.localStorage?localStorage.getItem(G)!=="false":!0);d(()=>i.routeStore.currentRouteLayer,()=>{if(!s.scene||b.prevLevel===i.routeStore.currentRouteLayer)return;const o=s.scene.rootLayer.children.filter(r=>i.layerStore.floors.some(n=>r.name.includes(n.name)));let t=i.routeStore.currentRouteLayer.name;if(!o.find(r=>r.name===t))return;const a=o?.map(r=>(r.name===t&&(r.hidden=!1),r.name===b.prevLevel?.name&&(r.hidden=!0),r));b.prevLevel=i.routeStore.currentRouteLayer,s.update(...a)}),d(()=>e.centerMap,()=>{!e.centerMap||i.mapboxStore.showMapbox||(l.controls.resetCamera({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)}),J(()=>{if(!h.current)return;async function o(){let t={};try{if(v){const r=document.createElement("canvas").getContext("webgl2"),n=r&&r.getExtension("EXT_disjoint_timer_query_webgl2"),m=(await import("stats-gl")).default,f=new m({trackGPU:n,horizontal:!0}),u=L.current;if(!u)throw new Error("memoryInfoPanel not found.");f.dom.style.position="relative",u.style.width=`${90*(n?3:2)}px`,u.style.height="48px",u.appendChild(f.dom),t={stats:f,memoryInfoPanel:u}}}catch(a){console.error(a)}l=s.create({canvas:h.current,ui:t}),e.canvasVisibleRectPx&&(l.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx)),re(s).then(a=>{v&&console.log("Renderer settings",l);const r=ce(p.backgroundColor==="none"?K:p.backgroundColor).string("rgba");k=de(a,x.fromCoreRect(D),r),s.start(k),X(l,i.fp.enableRotation?1:0),j&&l.viewport.setMaxZoom(p.maxZoom),R.layersLoaded=!0,i.fp.onFpConfigured&&i.fp?.onFpConfigured(),B=fe(s),M=le(s),ye(s)}),l.events.addEventListener("pointer:move",({data:a})=>{if(e.setKioskModeEnabled)return;const{point:r,defs:n}=A(a),c=O(r.x,r.y),m=E(n[0]);e.hoveredBooth=c||m}),l.events.addEventListener("pointer:out",()=>{e.setKioskModeEnabled||(e.hoveredBooth=null)}),l.events.addEventListener("pointer:click",({data:a})=>{if(!e?.rootElement)return;window.__resett&&window.__resett(),e.overlayPosition==="bottom"&&e.overlaySize==="full"&&i.showMap();const{point:r,defs:n}=A(a),{x:c,y:m}=r;if(e.onGetCoordsClick){const y=i.layerStore.layers.find(w=>w.visible&&(w.mode===g.TurnedOn||w.mode===g.TurnedOff));e.onGetCoordsClick({x:c,y:m,z:y?.name||null})}if(e.setKioskModeEnabled)return;if(e.onMarkerClick){const y=me(c,m,s.scale);v&&console.log("marker",y),e.onMarkerClick(y)}const f=O(r.x,r.y),u=E(n[0]);v&&console.log("boothIdFromClientXy",f,"boothByShape",u,"pointer:click point",r),i.clickBooth(f||u)}),l.events.addEventListener("navigation:change",()=>window.__resett&&window.__resett())}return o(),i.fp.getCenterCoordinates=Z,()=>W()},[]);function W(){B?.(),M?.(),s.dispose()}function Z(){const o=h.current;if(!h.current)throw new Error("Canvas not ready");const t=xe(l.viewport.canvasToSvg({x:o.clientWidth/2,y:o.clientHeight/2})),r=i.layerStore.visible.find(n=>n.mode===g.TurnedOff||n.mode===g.TurnedOn)?.name||null;return{...t,z:r}}function E(o){return!o||!o.shape?null:te.booths.find(t=>t.shapes?.find(a=>a.shape==o.shape))}d(()=>e.zoomBy,()=>{if(!e.zoomBy||i.mapboxStore.showMapbox)return;const o=e.zoomBy;l.controls.zoomBy(o),e.zoomBy=null}),d(()=>e.dimmed,o=>{if(!s.scene)return;const t=s.scene.rootLayer;t.dim!==o&&(t.dim=o,s.update(t))}),d(()=>e.details,()=>{if(!e.onDetails)return;if(!e.details){e.onDetails(null);return}var o=e.details;if(p.EXPO==="wineparis"&&(o instanceof F&&(o=o.booths[0]),!o))return;let t=null,a=[];o instanceof F?(t="exhibitor",a=o.booths.map(n=>n.name).sort((n,c)=>n==i.routeStore.tempToBooth?.name?-1:c==i.routeStore.tempToBooth?.name?1:0)):o instanceof ne?(t="booth",a=[o.name]):o instanceof ae?(t="route",a=[o.from?.name,o.to?.name].filter(n=>!!n)):o instanceof se&&(t="category",a=o.exhibitors.map(n=>n.booths.map(c=>c.name)).flat());var r={type:t,name:o?.name,id:o?.id,externalId:o?.externalId,boothsNames:a};e.onDetails({...r,...t==="route"?{routeInfo:i.routeStore.routeInfo}:{}})}),d(()=>e.canvasVisibleRectPx,()=>{s.renderer&&(s.renderer.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx))},{fireImmediately:!0}),d(()=>e.moveToRect,()=>{!e.moveToRect||i.mapboxStore.showMapbox||(e.moveToRect&&e.moveToRect.h!==1/0&&e.moveToRect.w!==1/0&&e.moveToRect.h>0&&e.moveToRect.w>0&&_(e.moveToRect),e.moveToRect=null)}),d(()=>e.rollReset,o=>{o&&(l.controls.resetCamera({roll:!0}),e.rollReset=!1)}),d(()=>e.moveToBooths,()=>{if(T.log("this.moveToBooths",e.moveToBooths),!e.moveToBooths||i.mapboxStore.showMapbox)return;T.log("watched moveToBooths",e.moveToBooths);const o=e.moveToBooths.filter(t=>t.rect).map(t=>t.rect);o.length!==0&&(_(C.fromMultiple(o)),e.moveToBooths=null)}),d(()=>e.mapSettings,({zoomtime:o,center:t,centerxy:a,bearing:r,roll:n,z:c})=>{if(!(i.mapboxStore.showMapbox||!s.renderer))try{o&&o!==e.defaultMapSettings.zoomtime&&s.renderer.controls.configure({zoomTime:o/1e3}),i.fp.enableRotation&&X(l,n);let m;if(t){const f=t.split(",").map(Number),u=new ie(void 0,void 0,void 0,void 0,f[0],f[1]);m=ue(u,pe.properties.config)}else if(a){const f=a.split(",").map(Number);m={x:f[0],y:f[1]}}c&&i.fp.activateFloor({name:c}),(m?.x||m?.y)&&s.renderer.controls.panTo(m.x,m.y),Number.isFinite(r)&&s.renderer.controls.rollTo(r)}catch(m){T.error("Error in mapSettings reaction",m)}}),ve({enabled:R.layersLoaded&&e.buildRoute,rendererService:s});const P="routes-api.expofp.com";be({permission:R.layersLoaded,rendererService:s,dataJsonUrl:`https://${P}/v1/routes?expo=${p.EXPO}`,websocketUrl:`wss://${P}/locations?expo=${p.EXPO}`}),d(()=>i.layerStore.visible,o=>{if(!s.scene)return;const t=o.filter(n=>n.name.toLowerCase().includes(N)),r=s.scene.rootLayer.children.filter(n=>n.name.toLowerCase().includes(N));r.forEach(n=>{n.hidden=!t.find(c=>c.name===n.name)}),s.update(...r)});function _(o){let t=o;const a=$(o,D);e.kioskData&&(!ge()||i.routeStore.defaultFrom?.layer?.name===i.routeStore.currentRouteLayer?.name)&&(t=C.fromMultiple([o,C.fromXywh(e.kioskData.x,e.kioskData.y,1,1)]));const r=x.fromCoreRect(t),n={paddingPercent:a,maxZoom:j?void 0:10};if(e.shouldShiftMapRect){l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x+e.overlayWidthPx};try{l.controls.zoomTo(r,n)}finally{l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x-e.overlayWidthPx}}}else l.controls.zoomTo(r,n)}function $(o,t){return!o||!t?0:(o.w*o.h/(t.h*t.w)>.1?15:25)/100}return Y(()=>I(H,{children:[S("canvas",{style:{width:"100%",height:"100%"},ref:h,className:q({map:!0,moving:b.moving,hidden:i.mapboxStore.showMapbox}),children:"ExpoFP.com"}),v&&U&&I(he,{className:"debug-fps",children:[S("div",{ref:L}),S("button",{onClick:()=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(G,"false"),V(!1)},style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",backgroundColor:"#333",color:"#fff",border:"1px solid #555",width:"100%"},children:"Hide debug"})]})]}))}
@@ -1 +1 @@
1
- import c from"../../../../store";import E from"./config-load-layer";import{createLayerDef as r}from"../../../../renderer";import{WF_CURRENT_POSITION_NAME as d,WF_LINES_ANIMATED_LAYER_NAME as p,WF_LINES_LAYER_NAME as y,WF_POINTS_LAYER_NAME as N,WF_TRAIL_LAYER_NAME as R}from"./config-wf";import{MARKER_LAYER_NAME as u}from"./config-markers";import M from"./config-yah";import{createTrafficLayers as T}from"../../traffic/trafficLayers";import{PATHWAY_KEY as Y}from"../../../../constants";import{configBoothsBadges as I}from"./config-booth-badge";export default function P(f){M();let{layers:t,defaultLayer:s}=c.layerStore;if(s){const o=[].concat(t),e=t.find(i=>i===s),a=t.indexOf(e);o.splice(a,1),t=[e].concat(o)}const L=t.filter(o=>!o.rootParent).map(o=>E(o,f));return Promise.all(L).then(o=>{const e=r(N,[],{dim:!1,interactive:!0}),a=r(d,[],{dim:!1}),i=r(y,[],{dim:!1}),l=r(u,[]),A=r(R,[],{dim:!1}),_=r(p,[],{dim:!1});o.forEach(m=>{m.name.toLowerCase().includes(Y)&&(m.dim=!1)});const n=I(f,"root",c.boothStore.booths);return[...o.flat(),...n?[n]:[],...T(),l,A,i,_,e,a]})}
1
+ import c from"../../../../store";import E from"./config-load-layer";import{createLayerDef as t}from"../../../../renderer";import{WF_LINES_ANIMATED_LAYER_NAME as _,WF_LINES_LAYER_NAME as d,WF_POINTS_LAYER_NAME as p,WF_TRAIL_LAYER_NAME as y}from"../../../../wayfinding/layers";import{MARKER_LAYER_NAME as N}from"./config-markers";import R from"./config-yah";import{createTrafficLayers as Y}from"../../traffic/trafficLayers";import{PATHWAY_KEY as u}from"../../../../constants";import{configBoothsBadges as M}from"./config-booth-badge";export default function h(f){R();let{layers:r,defaultLayer:s}=c.layerStore;if(s){const o=[].concat(r),e=r.find(i=>i===s),a=r.indexOf(e);o.splice(a,1),r=[e].concat(o)}const L=r.filter(o=>!o.rootParent).map(o=>E(o,f));return Promise.all(L).then(o=>{const e=t(p,[],{dim:!1,interactive:!0}),a=t(d,[],{dim:!1}),i=t(N,[]),l=t(y,[],{dim:!1}),A=t(_,[],{dim:!1});o.forEach(m=>{m.name.toLowerCase().includes(u)&&(m.dim=!1)});const n=M(f,"root",c.boothStore.booths);return[...o.flat(),...n?[n]:[],...Y(),i,l,a,A,e]})}
@@ -1 +1 @@
1
- import{useCallback as A,useRef as e}from"react";import{hasMeaningfulChange as O,MOVE_THRESHOLD_M as E,normalizeHeading as v}from"./utils";import H from"../../tools/logger";import{distance as L}from"../../utils/gps";const _=120,C=3e3,G=360;export function useUserLocationAndHeading(g){const o=e(null),s=e(null),f=e(0),u=e(null),d=e(!1),t=e(null),a=e(!1),l=e(null),h=n=>g(n),m=n=>{const r=Date.now();if(r-f.current<_)return;const i=u.current;if(!t.current){t.current=n,f.current=r,u.current=n,h(n);return}const w=L(t.current.lat,t.current.lng,n.lat,n.lng);let c;a.current?w<=E?(a.current=!1,t.current=n,c={...t.current,heading:n.heading}):(t.current=n,c=n):w>=E?(a.current=!0,t.current=n,l.current=null,c=n):(l.current==null&&(l.current=r),r-l.current>C&&(t.current=n),c={...t.current,heading:n.heading}),!(i&&!O(i,c))&&(f.current=r,u.current=c,h(c))},R=A(n=>{const r=n.webkitCompassHeading??(n.alpha!=null?G-n.alpha:null);if(r==null)return;const i=v(r);s.current!==i&&(s.current=i,u.current&&m({...u.current,heading:i}))},[g]);return{startGeolocation:()=>{o.current==null&&(o.current=navigator.geolocation.watchPosition(n=>{m({lat:n.coords.latitude,lng:n.coords.longitude,heading:s.current})},n=>H.warn("Geolocation watch error:",n),{enableHighAccuracy:!0,maximumAge:0}))},startOrientation:()=>{d.current||(d.current=!0,window.addEventListener("deviceorientation",R,!0))},stopGeolocation:()=>{o.current!=null&&(navigator.geolocation.clearWatch(o.current),o.current=null),t.current=null,a.current=!1},stopOrientation:()=>{d.current=!1,window.removeEventListener("deviceorientation",R,!0)}}}
1
+ import{useCallback as v,useRef as e}from"react";import{hasMeaningfulChange as A,MOVE_THRESHOLD_M as E,normalizeHeading as O}from"./utils";import H from"../../tools/logger";import{haversineDistance as L}from"../../utils/haversineDistance";const _=120,C=3e3,G=360;export function useUserLocationAndHeading(g){const o=e(null),s=e(null),f=e(0),u=e(null),d=e(!1),t=e(null),a=e(!1),l=e(null),h=n=>g(n),m=n=>{const r=Date.now();if(r-f.current<_)return;const i=u.current;if(!t.current){t.current=n,f.current=r,u.current=n,h(n);return}const w=L(t.current.lat,t.current.lng,n.lat,n.lng);let c;a.current?w<=E?(a.current=!1,t.current=n,c={...t.current,heading:n.heading}):(t.current=n,c=n):w>=E?(a.current=!0,t.current=n,l.current=null,c=n):(l.current==null&&(l.current=r),r-l.current>C&&(t.current=n),c={...t.current,heading:n.heading}),!(i&&!A(i,c))&&(f.current=r,u.current=c,h(c))},R=v(n=>{const r=n.webkitCompassHeading??(n.alpha!=null?G-n.alpha:null);if(r==null)return;const i=O(r);s.current!==i&&(s.current=i,u.current&&m({...u.current,heading:i}))},[g]);return{startGeolocation:()=>{o.current==null&&(o.current=navigator.geolocation.watchPosition(n=>{m({lat:n.coords.latitude,lng:n.coords.longitude,heading:s.current})},n=>H.warn("Geolocation watch error:",n),{enableHighAccuracy:!0,maximumAge:0}))},startOrientation:()=>{d.current||(d.current=!0,window.addEventListener("deviceorientation",R,!0))},stopGeolocation:()=>{o.current!=null&&(navigator.geolocation.clearWatch(o.current),o.current=null),t.current=null,a.current=!1},stopOrientation:()=>{d.current=!1,window.removeEventListener("deviceorientation",R,!0)}}}
@@ -1 +1 @@
1
- import{distance as e}from"../../utils/gps";export const MOVE_THRESHOLD_M=3;export function normalizeHeading(n){return Math.floor(n)}export function hasMeaningfulChange(n,t){return e(n.lat,n.lng,t.lat,t.lng)>=MOVE_THRESHOLD_M?!0:n.heading!==t.heading}
1
+ import{haversineDistance as e}from"../../utils/haversineDistance";export const MOVE_THRESHOLD_M=3;export function normalizeHeading(n){return Math.floor(n)}export function hasMeaningfulChange(n,t){return e(n.lat,n.lng,t.lat,t.lng)>=MOVE_THRESHOLD_M?!0:n.heading!==t.heading}
@@ -1 +1 @@
1
- import{jsx as g,Fragment as L,jsxs as C}from"react/jsx-runtime";import{reaction as T}from"mobx";import{createRoot as R}from"react-dom/client";import{install as I}from"resize-observer";import V from"./components/Layout";import $ from"./floorplan.loader";import{applyParameters as M,destroyHistory as j,initRouting as z}from"./services/routing";import t from"./store";import{Route as S,findBooth as x,separateExternalIds as E}from"./store/RouteStore";import{destroyUiHandlers as G}from"./store/init/init-ui";import{GaEventActions as P,destroyGtag as _,sendEventToGa as w,setConsentSettings as q}from"./tools/gtag";import N from"./tools/report-error";import{resetGlobalVariables as Y}from"./tools/reset";import H from"./tools/track-event";import{fpGeo as v}from"./data/fpGeo";import{convertLocalToGps as O,isValidPointCoords as d}from"./utils/gps";import m from"./core/Rect";import{mapEntity as y}from"./utils/mapEntity";import{LANG_KEY as X,MAX_ROUTE_WAYPOINTS as p,PATHWAY_KEY as U}from"./constants";import{getStorage as B}from"./utils/entity-storage";import{ErrorBoundary as D}from"@sentry/react";import{POISelectorsSchema as F,BoundsSchema as K,ZoomToOptionsSchema as A}from"./schemas/sdk.schemas";import W from"debug";import{buildOptimizedRoute as Q}from"./utils/buildOptimizedRoute";import{hasLocale as Z,getLocales as J}from"./utils/i18n";const b=W("efp:api");I();export default class ee extends ${root;init(){this.ignoreQuery||z(this.offHistory),H("load"),t.fp=this,q(this.allowConsent),w(P.Load,""),this.root=R(this.renderTarget),this.root.render(g(D,{children:g(V,{offHistory:this.offHistory,allowConsent:this.allowConsent})})),w(P.Rendered,""),T(()=>t.layerStore.layersLoaded,()=>{this.resolveReady(),t.initialized||this.onInit?.(this),t.initialized=!0})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const i=t.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));t.selectBooth(i)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null;return}const i=t.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!i?.length)return;if(typeof e=="string"){t.selectExhibitor(i[0]),t.moveToList([i[0]]);return}const o=i.flatMap(s=>s.booths.map(r=>r.layer)),{description:n}=o.reduce((s,r)=>(s.freq[r.description]=(s.freq[r.description]||0)+1,s.freq[r.description]>s.maxCount&&(s.maxCount=s.freq[r.description],s.mostFrequent=r),s),{freq:{},mostFrequent:o[0],maxCount:0}).mostFrequent;t.layerStore.updateVisibility(n,!0),t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null,t.uiState.list={type:"filter",items:i,query:{key:"exhibitors",value:i.map(s=>s.externalId).join(",")}},t.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),t.boothStore.highlightedByExternalIds=[],t.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),t.exhibitorStore.highlightedByExternalIds=[],t.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:i,exhibitorExternalIds:o}=E(e);t.boothStore.highlightedByExternalIds=[...i],t.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,i){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);if(!n||!s){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}t.routeStore.selectRoute(new S(f(n),f(s),o.map(f)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),t.routeStore.selectRoute(new S(f(e),f(i)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);const i=e.map(f).filter(n=>!!n);if(!i.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of i){const s=n.layer?.name??"",r=o.get(s);r?r.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:Q(n.map(s=>[s.name,{cx:s.rect.cx,cy:s.rect.cy}]))}))}selectCurrentPosition(e,i,o){const n=d(e.x)&&d(e.y),s=d(e.lng)&&d(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),t.routeStore.selectCurrentPosition(e,i,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(i=>{const o=t.exhibitorStore.exhibitors.find(n=>n.name===i.name||n.externalId===i.externalId);o&&(o.bookmarked=i.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const i=["exhibitor","event","speaker","booth"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000702");return}const n=B("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceBookmarked(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceBookmarked(r)},speaker:{existingIds:new Set(n.speakers||[]),finder:r=>t.speakerStore.speakers.find(l=>l.name===r||l.externalId===r||l.slug===r),replacer:r=>t.speakerStore.replaceBookmarked(r)},booth:{existingIds:new Set(n.booths||[]),finder:r=>{const l=t.boothStore.findBooth(r);return l?.exhibitors.length===0?l:void 0},replacer:r=>t.boothStore.replaceBookmarked(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.bookmarked?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const i=["exhibitor","event"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000704");return}const n=B("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceVisited(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceVisited(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.visited?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}t.routeStore.setMarkers(e)}selectMarker(e,i=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),t.routeStore.selectMarker(e,i)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),t.uiState.debugCircles=e}checkRoutes(){t.routeStore.checkRoutes()}updateLayerVisibility(e,i){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),i||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),t.layerStore.updateVisibility(e,i)}getCenterCoordinates(){return t.fp.getCenterCoordinates()}exhibitorsList(){return t.exhibitorStore.exhibitors.map(e=>y(e))}boothsList(){return t.boothStore.booths.map(e=>y(e))}categoriesList(){return t.categoryStore.categories.map(e=>y(e))}selectCategory(e){if(e==null||typeof e!="string"){t.searchStore.selectSearch();return}const i=e?.toLowerCase(),o=t.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===i||s?.toLowerCase()===i);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}t.selectCategory(o)}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),M(e)}getVisibility(){return t.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),t.uiState.setVisibility(e)}findLocation(){t.routeStore.findLocation()}zoomIn(){t.uiState.zoomIn()}zoomOut(){t.uiState.zoomOut()}switchView(){t.mapboxStore.activateMapbox()}zoomTo(e,i){b("zoomTo called with selectors=%O options=%O",e,i);const o=F.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=A.safeParse(i);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,i)}getBounds(e){b("getBounds called with selectors=%O",e);const i=F.safeParse(e);if(!i.success){a("getBounds",i.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let r;s.externalId?r=t.boothStore.boothByExternalId.get(s.externalId):s.name&&(r=t.boothStore.boothByName.get(s.name.toLowerCase())),r?.rect&&o.push(r.rect)}),e.exhibitors?.forEach(s=>{let r;s.externalId?r=t.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(r=t.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),r?.booths?.forEach(l=>{l.rect&&o.push(l.rect)})}),o.length===0)return;const n=m.fromMultiple(o);return{leftTop:{x:n.x1,y:n.y1},rightBottom:{x:n.x2,y:n.y2}}}fitBounds(e,i){if(b("fitBounds called with bounds=%O options=%O",e,i),!e){t.uiState.fitBounds();return}const o=K.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=A.safeParse(i);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}let s;if(i?.padding){const r=i.padding;s=m.fromX1y1x2y2(e.leftTop.x-r,e.leftTop.y-r,e.rightBottom.x+r,e.rightBottom.y+r)}else s=m.fromX1y1x2y2(e.leftTop.x,e.leftTop.y,e.rightBottom.x,e.rightBottom.y);t.uiState.moveToRect=s}getBoothRect(e){return typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00"),x(e)?.rect}convertToGeo(e,i){if(!v?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!i){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return O(e,i,v.properties.config)}unstable_destroy(){let e=window.__efpElement.firstChild;Y(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",N),j(),G(),_(),[...document.getElementsByTagName("script")].filter(o=>o.src.indexOf("/fp.svg")>-1||o.src.indexOf("/wf.data.js")>-1||o.src.indexOf("/data.js")>-1).forEach(o=>o.remove()),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),t.fuzzySearchEngineStore.loadEngine().then(()=>(t.searchStore.selectSearch(e),t.uiState.fuzzySearchItems.map(i=>({item:y(i.item),score:i.score}))))}getFloors(){return t.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const i=this.getFloors();if(e.name){const o=i.find(n=>n.name===e.name||n.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=i.find(s=>s.index===e.index),n=o?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,i){const o=new URLSearchParams;if(o.set(U,e),i?.length){const{boothExternalIds:n,exhibitorExternalIds:s}=E(i);n.length>0&&o.set("booths",n.join(",")),s.length>0&&o.set("exhibitors",s.join(","))}this.applyParameters(o.toString())}showPathwayOnly(e,i){this.activateFloor({name:i}),t.layerStore.showPathWay(e),t.uiState.setPathwayOnlyMode(!0);const o=t.layerStore.findLayer(e),n=t.layerStore.findLayer(i),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const r=s.viewbox??s.rect;t.uiState.moveToRect=m.fromX1y1x2y2(r.x1,r.y1,r.x2,r.y2)}}hidePathways(){this.highlightBooths([]),t.layerStore.hidePathways(),t.uiState.setPathwayOnlyMode(!1)}showSearch(){t.selectSearch("")}changeLanguage(e){const i=e?.toLowerCase?.();if(!Z(i)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${J().map(n=>n.id).join(",")}`,"EFP001300");return}const o=new URLSearchParams;o.set(X,i),this.applyParameters(o.toString())}isGpsTrackingEnabled(){return t.routeStore.gpsEnabled}setGpsTrackingEnabled(e){t.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){t.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){t.routeStore.selectRoute(null),t.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),t.uiState.kioskData&&t.resetCameraFn?t.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){t.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function f(u){return typeof u=="string"?x(u):t.routeStore.getNearestBooth(u)}let k=0;function a(u,e,i){const o=`Error calling "${u}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://developer.expofp.com/guide/java-script-api-reference";if(i&&(s+=`#error-${i}`),console.error(`${o} ${n} ${s}`),t.fp.disableRuntimeAlerts)return;t.uiState.setGlobalErrorMessage({title:o,body:C(L,{children:[n," ",g("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(k);const r=8e3;k=window.setTimeout(()=>{const l=async()=>{t.uiState.globalErrorMessages.length>0&&(t.uiState.popGlobalErrorMessage(),await new Promise(h=>setTimeout(h,r/2)),l())};l()},r)}
1
+ import{jsx as g,Fragment as L,jsxs as C}from"react/jsx-runtime";import{reaction as T}from"mobx";import{createRoot as R}from"react-dom/client";import{install as I}from"resize-observer";import V from"./components/Layout";import $ from"./floorplan.loader";import{applyParameters as M,destroyHistory as j,initRouting as z}from"./services/routing";import t from"./store";import{Route as S,findBooth as x,separateExternalIds as E}from"./store/RouteStore";import{destroyUiHandlers as G}from"./store/init/init-ui";import{GaEventActions as P,destroyGtag as _,sendEventToGa as w,setConsentSettings as q}from"./tools/gtag";import N from"./tools/report-error";import{resetGlobalVariables as Y}from"./tools/reset";import H from"./tools/track-event";import{fpGeo as v}from"./data/fpGeo";import{convertLocalToGps as O,isValidPointCoords as d}from"./utils/gps";import m from"./core/Rect";import{mapEntity as y}from"./utils/mapEntity";import{LANG_KEY as X,MAX_ROUTE_WAYPOINTS as p,PATHWAY_KEY as U}from"./constants";import{getStorage as B}from"./utils/entity-storage";import{ErrorBoundary as D}from"@sentry/react";import{POISelectorsSchema as F,BoundsSchema as K,ZoomToOptionsSchema as A}from"./schemas/sdk.schemas";import W from"debug";import{optimizeWaypointOrder as Q}from"./wayfinding/core/routing/optimizeWaypointOrder";import{hasLocale as Z,getLocales as J}from"./utils/i18n";const b=W("efp:api");I();export default class ee extends ${root;init(){this.ignoreQuery||z(this.offHistory),H("load"),t.fp=this,q(this.allowConsent),w(P.Load,""),this.root=R(this.renderTarget),this.root.render(g(D,{children:g(V,{offHistory:this.offHistory,allowConsent:this.allowConsent})})),w(P.Rendered,""),T(()=>t.layerStore.layersLoaded,()=>{this.resolveReady(),t.initialized||this.onInit?.(this),t.initialized=!0})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const i=t.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));t.selectBooth(i)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null;return}const i=t.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!i?.length)return;if(typeof e=="string"){t.selectExhibitor(i[0]),t.moveToList([i[0]]);return}const o=i.flatMap(s=>s.booths.map(r=>r.layer)),{description:n}=o.reduce((s,r)=>(s.freq[r.description]=(s.freq[r.description]||0)+1,s.freq[r.description]>s.maxCount&&(s.maxCount=s.freq[r.description],s.mostFrequent=r),s),{freq:{},mostFrequent:o[0],maxCount:0}).mostFrequent;t.layerStore.updateVisibility(n,!0),t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null,t.uiState.list={type:"filter",items:i,query:{key:"exhibitors",value:i.map(s=>s.externalId).join(",")}},t.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),t.boothStore.highlightedByExternalIds=[],t.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),t.exhibitorStore.highlightedByExternalIds=[],t.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:i,exhibitorExternalIds:o}=E(e);t.boothStore.highlightedByExternalIds=[...i],t.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,i){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);if(!n||!s){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}t.routeStore.selectRoute(new S(f(n),f(s),o.map(f)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),t.routeStore.selectRoute(new S(f(e),f(i)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);const i=e.map(f).filter(n=>!!n);if(!i.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of i){const s=n.layer?.name??"",r=o.get(s);r?r.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:Q(n.map(s=>[s.name,{cx:s.rect.cx,cy:s.rect.cy}]))}))}selectCurrentPosition(e,i,o){const n=d(e.x)&&d(e.y),s=d(e.lng)&&d(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),t.routeStore.selectCurrentPosition(e,i,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(i=>{const o=t.exhibitorStore.exhibitors.find(n=>n.name===i.name||n.externalId===i.externalId);o&&(o.bookmarked=i.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const i=["exhibitor","event","speaker","booth"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000702");return}const n=B("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceBookmarked(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceBookmarked(r)},speaker:{existingIds:new Set(n.speakers||[]),finder:r=>t.speakerStore.speakers.find(l=>l.name===r||l.externalId===r||l.slug===r),replacer:r=>t.speakerStore.replaceBookmarked(r)},booth:{existingIds:new Set(n.booths||[]),finder:r=>{const l=t.boothStore.findBooth(r);return l?.exhibitors.length===0?l:void 0},replacer:r=>t.boothStore.replaceBookmarked(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.bookmarked?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const i=["exhibitor","event"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000704");return}const n=B("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceVisited(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceVisited(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.visited?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}t.routeStore.setMarkers(e)}selectMarker(e,i=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),t.routeStore.selectMarker(e,i)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),t.uiState.debugCircles=e}checkRoutes(){t.routeStore.checkRoutes()}updateLayerVisibility(e,i){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),i||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),t.layerStore.updateVisibility(e,i)}getCenterCoordinates(){return t.fp.getCenterCoordinates()}exhibitorsList(){return t.exhibitorStore.exhibitors.map(e=>y(e))}boothsList(){return t.boothStore.booths.map(e=>y(e))}categoriesList(){return t.categoryStore.categories.map(e=>y(e))}selectCategory(e){if(e==null||typeof e!="string"){t.searchStore.selectSearch();return}const i=e?.toLowerCase(),o=t.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===i||s?.toLowerCase()===i);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}t.selectCategory(o)}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),M(e)}getVisibility(){return t.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),t.uiState.setVisibility(e)}findLocation(){t.routeStore.findLocation()}zoomIn(){t.uiState.zoomIn()}zoomOut(){t.uiState.zoomOut()}switchView(){t.mapboxStore.activateMapbox()}zoomTo(e,i){b("zoomTo called with selectors=%O options=%O",e,i);const o=F.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=A.safeParse(i);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,i)}getBounds(e){b("getBounds called with selectors=%O",e);const i=F.safeParse(e);if(!i.success){a("getBounds",i.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let r;s.externalId?r=t.boothStore.boothByExternalId.get(s.externalId):s.name&&(r=t.boothStore.boothByName.get(s.name.toLowerCase())),r?.rect&&o.push(r.rect)}),e.exhibitors?.forEach(s=>{let r;s.externalId?r=t.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(r=t.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),r?.booths?.forEach(l=>{l.rect&&o.push(l.rect)})}),o.length===0)return;const n=m.fromMultiple(o);return{leftTop:{x:n.x1,y:n.y1},rightBottom:{x:n.x2,y:n.y2}}}fitBounds(e,i){if(b("fitBounds called with bounds=%O options=%O",e,i),!e){t.uiState.fitBounds();return}const o=K.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=A.safeParse(i);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}let s;if(i?.padding){const r=i.padding;s=m.fromX1y1x2y2(e.leftTop.x-r,e.leftTop.y-r,e.rightBottom.x+r,e.rightBottom.y+r)}else s=m.fromX1y1x2y2(e.leftTop.x,e.leftTop.y,e.rightBottom.x,e.rightBottom.y);t.uiState.moveToRect=s}getBoothRect(e){return typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00"),x(e)?.rect}convertToGeo(e,i){if(!v?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!i){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return O(e,i,v.properties.config)}unstable_destroy(){let e=window.__efpElement.firstChild;Y(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",N),j(),G(),_(),[...document.getElementsByTagName("script")].filter(o=>o.src.indexOf("/fp.svg")>-1||o.src.indexOf("/wf.data.js")>-1||o.src.indexOf("/data.js")>-1).forEach(o=>o.remove()),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),t.fuzzySearchEngineStore.loadEngine().then(()=>(t.searchStore.selectSearch(e),t.uiState.fuzzySearchItems.map(i=>({item:y(i.item),score:i.score}))))}getFloors(){return t.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const i=this.getFloors();if(e.name){const o=i.find(n=>n.name===e.name||n.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=i.find(s=>s.index===e.index),n=o?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,i){const o=new URLSearchParams;if(o.set(U,e),i?.length){const{boothExternalIds:n,exhibitorExternalIds:s}=E(i);n.length>0&&o.set("booths",n.join(",")),s.length>0&&o.set("exhibitors",s.join(","))}this.applyParameters(o.toString())}showPathwayOnly(e,i){this.activateFloor({name:i}),t.layerStore.showPathWay(e),t.uiState.setPathwayOnlyMode(!0);const o=t.layerStore.findLayer(e),n=t.layerStore.findLayer(i),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const r=s.viewbox??s.rect;t.uiState.moveToRect=m.fromX1y1x2y2(r.x1,r.y1,r.x2,r.y2)}}hidePathways(){this.highlightBooths([]),t.layerStore.hidePathways(),t.uiState.setPathwayOnlyMode(!1)}showSearch(){t.selectSearch("")}changeLanguage(e){const i=e?.toLowerCase?.();if(!Z(i)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${J().map(n=>n.id).join(",")}`,"EFP001300");return}const o=new URLSearchParams;o.set(X,i),this.applyParameters(o.toString())}isGpsTrackingEnabled(){return t.routeStore.gpsEnabled}setGpsTrackingEnabled(e){t.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){t.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){t.routeStore.selectRoute(null),t.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),t.uiState.kioskData&&t.resetCameraFn?t.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){t.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function f(u){return typeof u=="string"?x(u):t.routeStore.getNearestBooth(u)}let k=0;function a(u,e,i){const o=`Error calling "${u}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://developer.expofp.com/guide/java-script-api-reference";if(i&&(s+=`#error-${i}`),console.error(`${o} ${n} ${s}`),t.fp.disableRuntimeAlerts)return;t.uiState.setGlobalErrorMessage({title:o,body:C(L,{children:[n," ",g("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(k);const r=8e3;k=window.setTimeout(()=>{const l=async()=>{t.uiState.globalErrorMessages.length>0&&(t.uiState.popGlobalErrorMessage(),await new Promise(h=>setTimeout(h,r/2)),l())};l()},r)}
@@ -1,19 +1 @@
1
- const c="k5f7wyx2";let a=!1;function s(){if(document.getElementById("efp-intercom-position"))return;const e=document.createElement("style");e.id="efp-intercom-position",e.textContent=`
2
- .intercom-namespace,
3
- .intercom-lightweight-app,
4
- .intercom-app,
5
- [class*="intercom-with-namespace-"]:not(.intercom-messenger-frame) {
6
- z-index: 20 !important;
7
- }
8
- .intercom-lightweight-app-launcher,
9
- .intercom-app > [class*="intercom-with-namespace-"]:not(.intercom-messenger-frame) {
10
- right: 10px !important;
11
- bottom: 50px !important;
12
- }
13
- @media (max-width: 767px) {
14
- .intercom-lightweight-app-launcher,
15
- .intercom-app > [class*="intercom-with-namespace-"]:not(.intercom-messenger-frame) {
16
- bottom: 80px !important;
17
- }
18
- }
19
- `,document.head.appendChild(e)}export function bootIntercom(e){if(a)return;a=!0;const{subDomain:m,subscriptionStatus:r}=e,i=window;i.intercomSettings={api_base:"https://api-iam.intercom.io",app_id:c,alignment:"right",expofp_subdomain:m,expofp_subscription_status:r},s();const n=function(){n.c(arguments)};n.q=[],n.c=function(t){n.q.push(t)},i.Intercom=n;const o=()=>{const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=`https://widget.intercom.io/widget/${c}`,document.head.appendChild(t)};document.readyState==="complete"?o():window.addEventListener("load",o,!1)}
1
+ import{intercomStore as i}from"../store";const s="k5f7wyx2";let a=!1;export function bootIntercom(c){if(a)return;a=!0;const{subDomain:r,subscriptionStatus:d}=c,n=window;n.intercomSettings={api_base:"https://api-iam.intercom.io",app_id:s,alignment:"right",hide_default_launcher:!0,expofp_subdomain:r,expofp_subscription_status:d};const e=function(){e.c(arguments)};e.q=[],e.c=function(t){e.q.push(t)},n.Intercom=e,e("onUnreadCountChange",t=>i.setUnreadCount(t));const o=()=>{const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=`https://widget.intercom.io/widget/${s}`,t.onload=()=>i.setEnabled(!0),document.head.appendChild(t)};document.readyState==="complete"?o():window.addEventListener("load",o,!1)}
@@ -0,0 +1,7 @@
1
+ export default class IntercomStore {
2
+ enabled: boolean;
3
+ unreadCount: number;
4
+ setEnabled(value: boolean): void;
5
+ setUnreadCount(count: number): void;
6
+ }
7
+ //# sourceMappingURL=IntercomStore.d.ts.map
@@ -0,0 +1 @@
1
+ import{__esDecorate as n,__runInitializers as a}from"tslib";import{action as _,observable as f}from"mobx";let h=(()=>{let l=[],r,i=[],d=[],o,u=[],c=[],b,m;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[f],o=[f],b=[_],m=[_],n(this,null,b,{kind:"method",name:"setEnabled",static:!1,private:!1,access:{has:e=>"setEnabled"in e,get:e=>e.setEnabled},metadata:t},null,l),n(this,null,m,{kind:"method",name:"setUnreadCount",static:!1,private:!1,access:{has:e=>"setUnreadCount"in e,get:e=>e.setUnreadCount},metadata:t},null,l),n(null,null,r,{kind:"field",name:"enabled",static:!1,private:!1,access:{has:e=>"enabled"in e,get:e=>e.enabled,set:(e,s)=>{e.enabled=s}},metadata:t},i,d),n(null,null,o,{kind:"field",name:"unreadCount",static:!1,private:!1,access:{has:e=>"unreadCount"in e,get:e=>e.unreadCount,set:(e,s)=>{e.unreadCount=s}},metadata:t},u,c),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}enabled=(a(this,l),a(this,i,!1));unreadCount=(a(this,d),a(this,u,0));setEnabled(t){this.enabled=t}setUnreadCount(t){this.unreadCount=t}constructor(){a(this,c)}}})();export default h;
@@ -6,6 +6,7 @@ import CategoryFilterStore from "./CategoryFilterStore";
6
6
  import EventStore, { EventItem } from "./EventStore";
7
7
  import { Speaker } from "./SpeakerStore";
8
8
  import HeatmapStore from "./HeatmapStore";
9
+ import IntercomStore from "./IntercomStore";
9
10
  import LayerStore from "./LayerStore";
10
11
  import MapboxStore from "./MapboxStore";
11
12
  import RouteStore from "./RouteStore";
@@ -34,6 +35,7 @@ export default class RootStore {
34
35
  readonly toursStore: ToursStore;
35
36
  readonly mapboxStore: MapboxStore;
36
37
  readonly layerStore: LayerStore;
38
+ readonly intercomStore: IntercomStore;
37
39
  readonly eventStore: EventStore;
38
40
  readonly poiTypeStore: PoiTypeStore;
39
41
  readonly heatmapStore: HeatmapStore;
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as n}from"tslib";import{action as o,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as re}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge,{EventItem as ke}from"./EventStore";import{SpeakerItem as ve}from"./SpeakerStore";import{GaEventActions as ye}from"../tools/gtag";import h from"../utils/is-mobile";import c from"../utils/is-webview";import _e from"./HeatmapStore";import{resetLocale as be}from"../utils/i18n";import{LANGUAGE_TYPE as we}from"../constants";import xe,{LayersMode as le}from"./LayerStore";import Be from"./MapboxStore";import Ee from"./RouteStore";import Le from"./RoutePlannerStore";import Ce from"./ToursStore";import Fe from"./UIState";import Ie from"./PoiTypeStore";import{sanitizeSearch as Te}from"../utils/sanitizeText";import ze from"./FuzzySearchEngineStore";import Me from"./SessionsFilterStore";import Oe from"./SearchStore";import Ae from"./SearchButtonsStore";import Re from"./BookmarksStore";import{URLFilterManager as Pe}from"../services/URLFilterManager";import{ShortcutRegistry as Ve}from"./ShortcutRegistry";import{SessionsShortcutProvider as Ge}from"./providers/SessionsShortcutProvider";import Ne from"./SpeakerStore";import qe from"./SpeakerFilterStore";import{SpeakerShortcutProvider as je}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as Ue}from"./providers/SearchShortcutProvider";import{RendererService as We}from"../renderer";let De=(()=>{let a=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,E,L,C,F,I,T,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[o],k=[o],v=[o],y=[o],_=[o],b=[o],w=[o],x=[o],B=[o],E=[o],L=[o],C=[o],F=[o],I=[o],T=[o],z=[o],M=[o],O=[o],A=[o],R=[o],P=[o],V=[o],G=[o],N=[o],q=[o],j=[o],U=[o],W=[o],D=[o],H=[o],K=[o],Y=[o],$=[o],J=[he],Q=[o],X=[o],Z=[o],ee=[o],te=[o],ie=[o],s(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,a),s(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,a),s(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,a),s(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,a),s(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,a),s(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,a),s(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,a),s(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,a),s(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,a),s(this,null,E,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,a),s(this,null,L,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,C,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,a),s(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,a),s(this,null,I,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,a),s(this,null,T,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,a),s(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,a),s(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,a),s(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,a),s(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,a),s(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,a),s(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,a),s(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,a),s(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,a),s(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,a),s(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,a),s(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,a),s(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,a),s(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,a),s(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,a),s(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,a),s(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,a),s(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,a),s(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,a),s(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,a),s(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,a),s(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,a),s(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,i)=>{e.initialized=i}},metadata:t},d,m),s(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,i)=>{e.resetCameraFn=i}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,a);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;mapboxStore;layerStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new We;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new Ee(this),this.routePlannerStore=new Le(this),this.toursStore=new Ce(this),this.uiState=new Fe(this),this.mapboxStore=new Be(this),this.layerStore=new xe,this.eventStore=new ge(this),this.heatmapStore=new _e(this),this.poiTypeStore=new Ie(this),this.fuzzySearchEngineStore=new ze(["name","title","fullName","booths.name"]),this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Me(this),this.speakerStore=new Ne(this),this.speakerFilterStore=new qe(this),this.searchStore=new Oe(this),this.searchButtonsStore=new Ae(this),this.bookmarksStore=new Re(this),this.urlFilterManager=new Pe(this),this.shortcutRegistry=new Ve,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var i=t.booths.filter(l=>l.visible),r=t.booths.filter(l=>!l.visible);!i.length&&r.length&&this.layerStore.updateVisibility(r[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(l=>l.visible)),c||h?500:50)}selectBooth(t,e=!0){let i=Array.isArray(t)?t:[t];this.uiState.details=i[0],i.length===1&&i[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),i.length===1&&i[0].layer&&!i[0].visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i[0].layer,!0),e&&setTimeout(()=>this.moveToList(i),c||h?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||be().then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:we}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(i=>i.booths.find(r=>r.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(i=>i.booths.find(r=>r.visible)).flatMap(i=>i.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&i.layer&&!i.visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&this.moveToList([i])}},c||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:Te(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},i={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(i)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ye.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(i=>{if(i instanceof re)e.push(...i.booths.filter(r=>r.visible));else if(i instanceof oe)i.visible&&e.push(i);else if(i instanceof ke&&i.boothId){const r=this.boothStore.boothById.get(i.boothId);r?.visible&&e.push(r)}else i instanceof ve&&this.speakerStore.getEventsBySpeaker(i.id).forEach(r=>{if(!r.boothId)return;const l=this.boothStore.boothById.get(r.boothId);l?.visible&&e.push(l)})}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof re?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(i=>i.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Ge(this)),this.shortcutRegistry.register(new je(this)),this.shortcutRegistry.register(new Ue(this))}}})();export default De;
1
+ import{__esDecorate as s,__runInitializers as n}from"tslib";import{action as o,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as re}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge,{EventItem as ke}from"./EventStore";import{SpeakerItem as ve}from"./SpeakerStore";import{GaEventActions as ye}from"../tools/gtag";import h from"../utils/is-mobile";import c from"../utils/is-webview";import _e from"./HeatmapStore";import{resetLocale as be}from"../utils/i18n";import{LANGUAGE_TYPE as we}from"../constants";import xe from"./IntercomStore";import Be,{LayersMode as le}from"./LayerStore";import Ee from"./MapboxStore";import Le from"./RouteStore";import Ce from"./RoutePlannerStore";import Fe from"./ToursStore";import Ie from"./UIState";import Te from"./PoiTypeStore";import{sanitizeSearch as ze}from"../utils/sanitizeText";import Me from"./FuzzySearchEngineStore";import Oe from"./SessionsFilterStore";import Ae from"./SearchStore";import Re from"./SearchButtonsStore";import Pe from"./BookmarksStore";import{URLFilterManager as Ve}from"../services/URLFilterManager";import{ShortcutRegistry as Ge}from"./ShortcutRegistry";import{SessionsShortcutProvider as Ne}from"./providers/SessionsShortcutProvider";import qe from"./SpeakerStore";import je from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ue}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as We}from"./providers/SearchShortcutProvider";import{RendererService as De}from"../renderer";let He=(()=>{let a=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,E,L,C,F,I,T,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[o],k=[o],v=[o],y=[o],_=[o],b=[o],w=[o],x=[o],B=[o],E=[o],L=[o],C=[o],F=[o],I=[o],T=[o],z=[o],M=[o],O=[o],A=[o],R=[o],P=[o],V=[o],G=[o],N=[o],q=[o],j=[o],U=[o],W=[o],D=[o],H=[o],K=[o],Y=[o],$=[o],J=[he],Q=[o],X=[o],Z=[o],ee=[o],te=[o],ie=[o],s(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,a),s(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,a),s(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,a),s(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,a),s(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,a),s(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,a),s(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,a),s(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,a),s(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,a),s(this,null,E,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,a),s(this,null,L,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,C,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,a),s(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,a),s(this,null,I,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,a),s(this,null,T,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,a),s(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,a),s(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,a),s(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,a),s(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,a),s(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,a),s(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,a),s(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,a),s(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,a),s(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,a),s(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,a),s(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,a),s(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,a),s(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,a),s(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,a),s(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,a),s(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,a),s(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,a),s(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,a),s(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,a),s(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,a),s(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,a),s(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,i)=>{e.initialized=i}},metadata:t},d,m),s(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,i)=>{e.resetCameraFn=i}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,a);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;mapboxStore;layerStore;intercomStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new De;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new Le(this),this.routePlannerStore=new Ce(this),this.toursStore=new Fe(this),this.uiState=new Ie(this),this.mapboxStore=new Ee(this),this.layerStore=new Be,this.intercomStore=new xe,this.eventStore=new ge(this),this.heatmapStore=new _e(this),this.poiTypeStore=new Te(this),this.fuzzySearchEngineStore=new Me(["name","title","fullName","booths.name"]),this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Oe(this),this.speakerStore=new qe(this),this.speakerFilterStore=new je(this),this.searchStore=new Ae(this),this.searchButtonsStore=new Re(this),this.bookmarksStore=new Pe(this),this.urlFilterManager=new Ve(this),this.shortcutRegistry=new Ge,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var i=t.booths.filter(l=>l.visible),r=t.booths.filter(l=>!l.visible);!i.length&&r.length&&this.layerStore.updateVisibility(r[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(l=>l.visible)),c||h?500:50)}selectBooth(t,e=!0){let i=Array.isArray(t)?t:[t];this.uiState.details=i[0],i.length===1&&i[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),i.length===1&&i[0].layer&&!i[0].visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i[0].layer,!0),e&&setTimeout(()=>this.moveToList(i),c||h?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||be().then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:we}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(i=>i.booths.find(r=>r.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(i=>i.booths.find(r=>r.visible)).flatMap(i=>i.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&i.layer&&!i.visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&this.moveToList([i])}},c||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:ze(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},i={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(i)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ye.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(i=>{if(i instanceof re)e.push(...i.booths.filter(r=>r.visible));else if(i instanceof oe)i.visible&&e.push(i);else if(i instanceof ke&&i.boothId){const r=this.boothStore.boothById.get(i.boothId);r?.visible&&e.push(r)}else i instanceof ve&&this.speakerStore.getEventsBySpeaker(i.id).forEach(r=>{if(!r.boothId)return;const l=this.boothStore.boothById.get(r.boothId);l?.visible&&e.push(l)})}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof re?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(i=>i.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new Ue(this)),this.shortcutRegistry.register(new We(this))}}})();export default He;
@@ -1,5 +1,5 @@
1
1
  import { Point } from "simple-geometry";
2
- import type { RouteLine } from "../wayfinding";
2
+ import type { RouteLine } from "../wayfinding/core";
3
3
  import { Booth } from "./BoothStore";
4
4
  import { Exhibitor } from "./ExhibitorStore";
5
5
  import { Layer } from "./LayerStore";
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as v,observable as d}from"mobx";import{Point as Ye,lineLength as Fe}from"simple-geometry";import o,{boothStore as Ke,layersStore as L}from".";import{fpGeo as E}from"../data/fpGeo";import z from"../core/Rect";import{GaEventActions as Xe,sendEventToGa as He}from"../tools/gtag";import{convertGpsToLocal as Ge,isValidPointCoords as Oe,calculateRelativeBearing as Je}from"../utils/gps";import{getLayerSvg as Qe,svgArea as g}from"../data/svg";import{getGraphLines as et,boothToWaypoint as Ue,graphDataSource as Ne}from"../wayfinding";import{LayersMode as tt}from"./LayerStore";import{uiState as _}from"./index";import{calcSpeed as Ze}from"../utils/calcSpeed";import{calcTravelTime as qe}from"../utils/calcTravelTime";import{DEFAULT_UNITS as $e,ORIENTATION_GRANTED_KEY as st}from"../constants";import{areLayersEnabled as at}from"../utils/areLayersEnabled";import{distancePointToRouteOnLayer as it,findBoothInRadius as rt}from"../components/Map/drawing/config/route-snapping";import Ve from"../data";import je from"../tools/logger";const k=a=>typeof a=="string"?Number(a.replace(",",".")):a;let nt=(()=>{let a=[],n,l=[],f=[],h,R=[],S=[],P,D=[],I=[],w,A=[],M=[],B,C=[],F=[],G,O=[],U=[],N,Z=[],q=[],$,V=[],j=[],W,Y=[],K=[],X,H=[],J=[],Q,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,he,me,pe,_e,ye,ge,ke,be,ve,xe,Re,Se=[],Te=[],Le,Ee,ze,Pe,De,Ie,we=[],Ae=[],Me,Be,Ce;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[d],h=[d],P=[d],w=[d],B=[d],G=[d],N=[d],$=[d],W=[d],X=[d],Q=[d],se=[d],re=[d],le=[d],de=[v],fe=[m],he=[m],me=[v({keepAlive:!0})],pe=[v({keepAlive:!0})],_e=[m],ye=[m],ge=[v({keepAlive:!0})],ke=[v({keepAlive:!0})],be=[m],ve=[m],xe=[m],Re=[d],Le=[v],Ee=[m],ze=[m],Pe=[m],De=[m],Ie=[d],Me=[m],Be=[v({keepAlive:!0})],Ce=[m],i(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,he,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,me,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,ge,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,ke,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,ve,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,xe,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,Le,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,Ee,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,ze,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,Pe,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,Be,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(this,null,Ce,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,a),i(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},R,S),i(null,null,P,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},D,I),i(null,null,w,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},A,M),i(null,null,B,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},C,F),i(null,null,G,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},O,U),i(null,null,N,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},V,j),i(null,null,W,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},Y,K),i(null,null,X,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},H,J),i(null,null,Q,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},ne,oe),i(null,null,le,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ce,ue),i(null,null,Re,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},Se,Te),i(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},we,Ae),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,R,null));currentPosition=(r(this,S),r(this,D,null));requestCompass=(r(this,I),r(this,A,!1));iconType=(r(this,M),r(this,C,0));tempToBooth=(r(this,F),r(this,O,null));defaultFrom=(r(this,U),r(this,Z,null));focusEnabled=(r(this,q),r(this,V,!0));prevZ=(r(this,j),r(this,Y,null));markersData=(r(this,K),r(this,H,{icons:[],markers:[]}));prevMarkers=(r(this,J),r(this,ee,[]));showAccessible=(r(this,te),r(this,ae,!!Ne.getLines().find(t=>t.unaccessible)));onlyAccessible=(r(this,ie),r(this,ne,!1));currentRouteLayer=(r(this,oe),r(this,ce,null));constructor(t){r(this,Ae),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(_.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),t?.from&&t?.to&&t.from===t.to&&(t=null);let s=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&o.fp.onDirection&&o.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),_.details=t,t&&(!t.from||!t.to)&&o.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&He(Xe.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=_.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return o.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:o.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Ge(t,E.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>L.mode===tt.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Fe(s,{x:c.rect.cx,y:c.rect.cy})-Fe(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(ot),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=o.layerStore.findLayer(s?.z);if(e&&s){const u=o.rendererService.renderer;return c&&!c?.visible&&L.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(je.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return o.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>o.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,_.list.type==="route-planner"&&(_.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){clearTimeout(this.cpTimeout),t&&(t.x=k(t.x),t.y=k(t.y),t.lat=k(t.lat),t.lng=k(t.lng),at()||(t.z=null)),e=!(e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route))&&(this.focusEnabled||this.prevZ!=t?.z),this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const u=t?lt(t):null;if(!u){this.currentPosition=null;return}const p=o.layerStore.findLayer(t.z),y=new CurrentPosition(u.x,u.y,p?.name||this.currentRouteLayer?.name,Je(u),t.lat,t.lng),x=_.selectedRoute;let T=!this.routeLines?.length;if(p&&this.routeLines?.length&&(T=!!this.routeLines.find(b=>b.p0.layer===p.name||b.p1.layer===p.name)),e&&T){const b=o.rendererService.renderer;if(p&&!p?.visible&&L.updateVisibility(p,!0),!b){je.warn("Renderer is not initialized. Cannot pan to current position.");return}b.controls.panTo(y.x,y.y)}const We=E?.properties?.config?.enableExperimentalRerouting&&ct(y,this.routeLines)&&!!rt(y,Ke.booths,[x?.to]);if(x&&We){const b=o.routeStore.getNearestBooth(y);o.routeStore.selectRoute(new Route(b,x?.to),!1)}this.currentPosition=y,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(o.mapboxStore.showMapbox){_.moveToLocation=!0;return}if(o.routeStore.currentPosition){const t=o.routeStore.currentPosition,e=z.fromCxcywh(t.x,t.y,100,100);let s;if(e.intersects(g))s=e;else{const p=Math.max(g.x1,Math.min(t.x,g.x2)),y=Math.max(g.y1,Math.min(t.y,g.y2)),x=Math.min(g.w,g.h)*.3,T=z.fromCxcywh(p,y,x,x).getIntersection(g);s=z.fromMultiple([e,T])}localStorage.getItem(st)==="false"&&(o.routeStore.requestCompass=!0),_.moveToRect=s;const u=o.layerStore.findLayer(o.routeStore.currentPosition?.z);u&&L.updateVisibility(u,!0)}else o.selectBooth(o.routeStore.defaultFrom)}}routeUnits=(r(this,ue),r(this,Se,$e));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:qe(t,Ze(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=Qe(),s=(e.getAttribute("units")||$e).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=_.selectedRoute,e=this.routeDistance,s=this.routeUnits;o.fp.onDirection&&setTimeout(()=>{o.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:qe(e,Ze(s))})},200)}checkRoutes(){let t=o.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const s=t[e];for(let c=e+1;c<t.length;c++){const u=t[c];et(Ne,Ue(s),Ue(u)).length||console.warn(`No route found from ${s.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Te),r(this,we,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Ve.autoTrackingGps&&this.isGpsTrackingEnabled&&!Ve.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default nt;function ot(a){return{...a,x:k(a.x),y:k(a.y),lat:k(a.lat),lng:k(a.lng)}}function lt(a){let n=null,l=null;return E&&(n=E.properties.config),n&&a.x>=n.p0.x&&a.x<=n.p2.x&&a.y>=n.p0.y&&a.y<=n.p2.y?l={...a}:n&&Oe(a.lat)&&Oe(a.lng)?l=Ge(a,n):n||(l=a),l||null}export function findBooth(a){return o.boothStore.findBooth(a)||o.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const n=o.boothStore.boothByExternalId.get(a);if(n)return{type:"booth",entity:n};const l=o.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const n=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?n.push(f):l.push(f))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(a,n,l){return new Route(findBooth(a)??o.routeStore.defaultFrom??null,findBooth(n),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(n,l,f){this.from=n,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==n?.id&&h.id!==l?.id)}}export class CurrentPosition extends Ye{x;y;z;angle;lat;lng;constructor(n,l,f,h,R,S){super(n,l),this.x=n,this.y=l,this.z=f,this.angle=h,this.lat=R,this.lng=S}}function ct(a,n,l=10){if(!a||!n?.length)return!1;const f={layer:a.z?String(a.z):void 0,x:a.x,y:a.y},h=it(f,n);return isFinite(h)&&h>l}
1
+ import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as x,observable as d}from"mobx";import{Point as Ke,lineLength as Ge}from"simple-geometry";import n,{boothStore as Xe,layersStore as T}from".";import{fpGeo as E}from"../data/fpGeo";import z from"../core/Rect";import{GaEventActions as He,sendEventToGa as Je}from"../tools/gtag";import{convertGpsToLocal as Oe,isValidPointCoords as Ue,calculateRelativeBearing as Qe}from"../utils/gps";import{getLayerSvg as et,svgArea as k}from"../data/svg";import{createWayfindingEngine as tt}from"../wayfinding/core";import{boothToWaypoint as Ne,graphDataSource as Ze}from"../wayfinding/adapters";import{LayersMode as st}from"./LayerStore";import{uiState as g}from"./index";import{calcSpeed as qe}from"../utils/calcSpeed";import{calcTravelTime as $e}from"../utils/calcTravelTime";import{DEFAULT_UNITS as Ve,ORIENTATION_GRANTED_KEY as at}from"../constants";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{shouldReroute as rt}from"../wayfinding/core";import{findBoothInRadius as nt}from"../wayfinding/utils/findBoothInRadius";import We from"../data";import je from"../tools/logger";const b=a=>typeof a=="string"?Number(a.replace(",",".")):a;let ot=(()=>{let a=[],o,l=[],f=[],h,S=[],L=[],P,D=[],I=[],w,A=[],M=[],C,B=[],F=[],G,O=[],U=[],N,Z=[],q=[],$,V=[],W=[],j,Y=[],K=[],X,H=[],J=[],Q,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ge,ke,be,ve,xe,Re,Se=[],Le=[],Te,Ee,ze,Pe,De,Ie,we=[],Ae=[],Me,Ce,Be;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;o=[d],h=[d],P=[d],w=[d],C=[d],G=[d],N=[d],$=[d],j=[d],X=[d],Q=[d],se=[d],re=[d],le=[d],de=[x],fe=[m],me=[m],he=[x({keepAlive:!0})],pe=[x({keepAlive:!0})],_e=[m],ye=[m],ge=[x({keepAlive:!0})],ke=[x({keepAlive:!0})],be=[m],ve=[m],xe=[m],Re=[d],Te=[x],Ee=[m],ze=[m],Pe=[m],De=[m],Ie=[d],Me=[m],Ce=[x({keepAlive:!0})],Be=[m],i(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,me,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,he,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,ge,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,ke,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,ve,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,xe,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,Te,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,Ee,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,ze,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,Pe,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(this,null,Be,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,a),i(null,null,o,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},S,L),i(null,null,P,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},D,I),i(null,null,w,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},A,M),i(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},B,F),i(null,null,G,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},O,U),i(null,null,N,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},V,W),i(null,null,j,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},Y,K),i(null,null,X,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},H,J),i(null,null,Q,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},ne,oe),i(null,null,le,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ce,ue),i(null,null,Re,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},Se,Le),i(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},we,Ae),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,S,null));currentPosition=(r(this,L),r(this,D,null));requestCompass=(r(this,I),r(this,A,!1));iconType=(r(this,M),r(this,B,0));tempToBooth=(r(this,F),r(this,O,null));defaultFrom=(r(this,U),r(this,Z,null));focusEnabled=(r(this,q),r(this,V,!0));prevZ=(r(this,W),r(this,Y,null));markersData=(r(this,K),r(this,H,{icons:[],markers:[]}));prevMarkers=(r(this,J),r(this,ee,[]));showAccessible=(r(this,te),r(this,ae,!!Ze.getLines().find(t=>t.unaccessible)));onlyAccessible=(r(this,ie),r(this,ne,!1));currentRouteLayer=(r(this,oe),r(this,ce,null));constructor(t){r(this,Ae),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(g.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),t?.from&&t?.to&&t.from===t.to&&(t=null);let s=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&n.fp.onDirection&&n.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),g.details=t,t&&(!t.from||!t.to)&&n.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&Je(He.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=g.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return n.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:n.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Oe(t,E.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>T.mode===st.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Ge(s,{x:c.rect.cx,y:c.rect.cy})-Ge(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(lt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=n.layerStore.findLayer(s?.z);if(e&&s){const u=n.rendererService.renderer;return c&&!c?.visible&&T.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(je.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return n.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>n.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,g.list.type==="route-planner"&&(g.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),it()||(t.z=null));const c=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!c&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const _=t?ct(t):null;if(!_){this.currentPosition=null;return}const p=n.layerStore.findLayer(t.z),y=new CurrentPosition(_.x,_.y,p?.name||this.currentRouteLayer?.name,Qe(_),t.lat,t.lng),R=g.selectedRoute;let Fe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Fe=!!this.routeLines.find(v=>v.p0.layer===p.name||v.p1.layer===p.name)),u&&Fe){const v=n.rendererService.renderer;if(p&&!p?.visible&&T.updateVisibility(p,!0),!v){je.warn("Renderer is not initialized. Cannot pan to current position.");return}v.controls.panTo(y.x,y.y)}const Ye=E?.properties?.config?.enableExperimentalRerouting&&rt(y,this.routeLines)&&!!nt(y,Xe.booths,[R?.to]);if(e&&R&&Ye){const v=n.routeStore.getNearestBooth(y);n.routeStore.selectRoute(new Route(v,R?.to),!1)}this.currentPosition=y,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(n.mapboxStore.showMapbox){g.moveToLocation=!0;return}if(n.routeStore.currentPosition){const t=n.routeStore.currentPosition,e=z.fromCxcywh(t.x,t.y,100,100);let s;if(e.intersects(k))s=e;else{const _=Math.max(k.x1,Math.min(t.x,k.x2)),p=Math.max(k.y1,Math.min(t.y,k.y2)),y=Math.min(k.w,k.h)*.3,R=z.fromCxcywh(_,p,y,y).getIntersection(k);s=z.fromMultiple([e,R])}localStorage.getItem(at)==="false"&&(n.routeStore.requestCompass=!0),g.moveToRect=s;const u=n.layerStore.findLayer(n.routeStore.currentPosition?.z);u&&T.updateVisibility(u,!0)}else n.selectBooth(n.routeStore.defaultFrom)}}routeUnits=(r(this,ue),r(this,Se,Ve));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:$e(t,qe(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),s=(e.getAttribute("units")||Ve).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=g.selectedRoute,e=this.routeDistance,s=this.routeUnits;n.fp.onDirection&&setTimeout(()=>{n.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:$e(e,qe(s))})},200)}checkRoutes(){const t=tt(Ze),e=n.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let s=0;s<e.length;s++){const c=e[s];for(let u=s+1;u<e.length;u++){const _=e[u];t.buildRoute(Ne(c),Ne(_)).lines.length||console.warn(`No route found from ${c.name} to ${_.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Le),r(this,we,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return We.autoTrackingGps&&this.isGpsTrackingEnabled&&!We.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default ot;function lt(a){return{...a,x:b(a.x),y:b(a.y),lat:b(a.lat),lng:b(a.lng)}}function ct(a){let o=null,l=null;return E&&(o=E.properties.config),o&&a.x>=o.p0.x&&a.x<=o.p2.x&&a.y>=o.p0.y&&a.y<=o.p2.y?l={...a}:o&&Ue(a.lat)&&Ue(a.lng)?l=Oe(a,o):o||(l=a),l||null}export function findBooth(a){return n.boothStore.findBooth(a)||n.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const o=n.boothStore.boothByExternalId.get(a);if(o)return{type:"booth",entity:o};const l=n.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const o=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?o.push(f):l.push(f))}return{boothExternalIds:o,exhibitorExternalIds:l}}export function extractRoute(a,o,l){return new Route(findBooth(a)??n.routeStore.defaultFrom??null,findBooth(o),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(o,l,f){this.from=o,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==o?.id&&h.id!==l?.id)}}export class CurrentPosition extends Ke{x;y;z;angle;lat;lng;constructor(o,l,f,h,S,L){super(o,l),this.x=o,this.y=l,this.z=f,this.angle=h,this.lat=S,this.lng=L}}
@@ -9,4 +9,5 @@ export declare const layersStore: import("./LayerStore").default;
9
9
  export declare const heatmapStore: import("./HeatmapStore").default;
10
10
  export declare const searchStore: import("./SearchStore").default;
11
11
  export declare const toursStore: import("./ToursStore").default;
12
+ export declare const intercomStore: import("./IntercomStore").default;
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import{configure as o}from"mobx";import e from"./init";import r from"./RootStore";o({computedRequiresReaction:!0});const t=new r;e(t);export default t;export const uiState=t.uiState,exhibitorStore=t.exhibitorStore,boothStore=t.boothStore,categoryStore=t.categoryStore,layersStore=t.layerStore,heatmapStore=t.heatmapStore,searchStore=t.searchStore,toursStore=t.toursStore;window.__store=t;
1
+ import{configure as o}from"mobx";import e from"./init";import r from"./RootStore";o({computedRequiresReaction:!0});const t=new r;e(t);export default t;export const uiState=t.uiState,exhibitorStore=t.exhibitorStore,boothStore=t.boothStore,categoryStore=t.categoryStore,layersStore=t.layerStore,heatmapStore=t.heatmapStore,searchStore=t.searchStore,toursStore=t.toursStore,intercomStore=t.intercomStore;window.__store=t;
@@ -1,5 +1,4 @@
1
1
  import { CurrentPosition } from "../store/RouteStore";
2
- export declare function distance(lat1: number, lng1: number, lat2: number, lng2: number): number;
3
2
  export declare function bearing(lat1: number, lng1: number, lat2: number, lng2: number): number;
4
3
  export interface GpsConfig {
5
4
  p0: {