@expofp/floorplan 3.13.1 → 3.13.3

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 (185) hide show
  1. package/dist/browser/{Button-CKiBkbgb.js → Button-BDBNu2fN.js} +6 -6
  2. package/dist/browser/{CookieConsent-CSTxsO7b.js → CookieConsent-BU5tkx67.js} +8 -8
  3. package/dist/browser/{Debug-VJg8Kv3w.js → Debug-DOvyBeZ2.js} +8 -8
  4. package/dist/browser/{Demo-DK7aO8n7.js → Demo-13Pj5i8q.js} +10 -10
  5. package/dist/browser/{Free-Dc9anWmM.js → Free-DY2ixs1X.js} +10 -10
  6. package/dist/browser/{Gallery-Dnm4hSmm.js → Gallery-DSFy8OUt.js} +31 -25
  7. package/dist/browser/{GpsLoader-DQmIKYxp.js → GpsLoader-IUuZFKZB.js} +22 -22
  8. package/dist/browser/{KioskStore-Do9vKaRP.js → KioskStore-DCMfDTY0.js} +6 -6
  9. package/dist/browser/{MaplibreAdapter-bY-ABtGS.js → MaplibreAdapter-BuHDh2tN.js} +161 -133
  10. package/dist/browser/{ModalContainer-DnYcW0A9.js → ModalContainer-B66h-izv.js} +11 -11
  11. package/dist/browser/{PermissionNotice-BfOksslN.js → PermissionNotice-GLC80RiL.js} +7 -7
  12. package/dist/browser/{SetKioskMode-vTpieU9t.js → SetKioskMode-BbtKKH4m.js} +10 -10
  13. package/dist/browser/{ShowKiosk-CdNxtqFI.js → ShowKiosk-Bbc1ibvf.js} +12 -12
  14. package/dist/browser/{TouchHand-B9X_pexY.js → TouchHand-BnpCI_QP.js} +5 -5
  15. package/dist/browser/{ViewerMenuPanel-Cwhfqk7r.js → ViewerMenuPanel-u4eof_k3.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-mWeM9pHG.js → add-debug-secret-listener-Dhk_JVpV.js} +1 -1
  17. package/dist/browser/{reset-all-settings-C4_ors4k.js → adopt-global-settings-D-DXuik1.js} +12 -17
  18. package/dist/browser/{boolean-editor-CGPZFexF.js → boolean-editor-Cr3udvWI.js} +46 -46
  19. package/dist/browser/{bootIntercom-CaST_jNX.js → bootIntercom-k9-F0coK.js} +3 -3
  20. package/dist/browser/{booth-by-xy-BO6naDgy.js → booth-by-xy-CfcPXRuo.js} +209 -209
  21. package/dist/browser/bundle.json +67 -70
  22. package/dist/browser/{classnames-ClEJC3j4.js → classnames-t9FqzaWX.js} +2 -2
  23. package/dist/browser/{client-DXdbQp9r.js → client-B_pxskYW.js} +9 -9
  24. package/dist/browser/{components-Bowa21U1.js → components-CUmWC2-D.js} +278 -271
  25. package/dist/browser/{debug-overlay-Y5npuuWR.js → debug-overlay-DDhRZgt_.js} +470 -464
  26. package/dist/browser/{debug-ui-D1g5i_jy.js → debug-ui-DxdcU6Kg.js} +7 -7
  27. package/dist/browser/{dist-BSvcUdys.js → dist-B8mNNnp7.js} +5 -5
  28. package/dist/browser/{dist-Cn9LPy1P.js → dist-CxhCCJRf.js} +7 -7
  29. package/dist/browser/{dist-aJ-8azal.js → dist-Pmi0eHka.js} +66 -67
  30. package/dist/browser/{efp-debug-init-Brk9OaSQ.js → efp-debug-init-Calw8mY0.js} +4 -4
  31. package/dist/browser/{enum-editor-BZ9LwkZ8.js → enum-editor-DCfrJJln.js} +5 -5
  32. package/dist/browser/{es5-XJHAF1nV.js → es5-DoQZDAdU.js} +2 -2
  33. package/dist/browser/{event-not-found-_rTvDWyj.js → event-not-found-ChDTsYTx.js} +1 -1
  34. package/dist/browser/{exports-DWUH8uau.js → exports-BX3S6XZB.js} +567 -566
  35. package/dist/browser/{favicon-5J-1eJZd.js → favicon-ClLPDK1r.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-Br7VuO9v.js → fetch-retry.umd-DzzXpi7b.js} +2 -2
  37. package/dist/browser/{flex-B3O1z4v3.js → flex-DP6WjhG4.js} +17 -17
  38. package/dist/browser/{floorplan.loader-sk15sA3u.js → floorplan.loader-D69t3BAF.js} +1381 -1307
  39. package/dist/browser/{floorplan.ready-B4ahF1S7.js → floorplan.ready-CHXz-cFn.js} +326 -335
  40. package/dist/browser/{fuse-Ci_KKUTa.js → fuse-BVXtZz6P.js} +2 -2
  41. package/dist/browser/{i18n-99DQd2vS.js → i18n-C8efqjSJ.js} +2921 -2559
  42. package/dist/browser/index.js +37 -37
  43. package/dist/browser/{index.module-DAnhLbye.js → index.module-C2y2P6lx.js} +6 -6
  44. package/dist/browser/{integrateKiosk-DZXpUrOj.js → integrateKiosk-B6woh9vx.js} +4 -4
  45. package/dist/browser/{is-webview-DpONzc0i.js → is-webview-BBrFDwGV.js} +1 -1
  46. package/dist/browser/{jsx-runtime-CaS3omHd.js → jsx-runtime-BJiMhWCh.js} +4 -4
  47. package/dist/browser/{lib-BiZuekek.js → lib-Bp05Ar7H.js} +155 -112
  48. package/dist/browser/{loadImage-CjXrDhKo.js → loadImage-BSxtVhbw.js} +5 -5
  49. package/dist/browser/{logDeviceInfo-BYL9Ek4m.js → logDeviceInfo-CKYIqDka.js} +9 -9
  50. package/dist/browser/{main-C5obpH9n.js → main-R4AfkxbT.js} +1 -1
  51. package/dist/browser/{mobx-DUuRiBpm.js → mobx-DGLsaukl.js} +5 -5
  52. package/dist/browser/{optional-boolean-editor-vmPQV7dq.js → optional-boolean-editor-BU6xH2-y.js} +4 -4
  53. package/dist/browser/{optional-enum-editor-CAafO0D2.js → optional-enum-editor-DguPalWk.js} +5 -5
  54. package/dist/browser/{optional-string-editor-CnDprvv4.js → optional-string-editor-C9Ca_jfw.js} +5 -5
  55. package/dist/browser/{particles.min-Bw-lHwaG.js → particles.min-Cnu30bUy.js} +2 -2
  56. package/dist/browser/{react-DIEnjHSI.js → react-B3i5PHk_.js} +5 -5
  57. package/dist/browser/{react-dom-CK-QaYaJ.js → react-dom-DU4GDIrZ.js} +6 -6
  58. package/dist/browser/{rolldown-runtime-Dfh5_zpq.js → rolldown-runtime-G74B3CmN.js} +1 -1
  59. package/dist/browser/select-D0rZ3mga.js +1367 -0
  60. package/dist/browser/{settings-CkTeZAPn.js → settings-D13emDUN.js} +3 -3
  61. package/dist/browser/{settings-item-Bdmu0-LD.js → settings-item-DwnQYGKx.js} +16 -16
  62. package/dist/browser/{store-C8eFtLML.js → store-Dfx4YNDt.js} +4458 -4458
  63. package/dist/browser/{string-editor-CM26hetz.js → string-editor-BM5ehAvW.js} +5 -5
  64. package/dist/browser/{text-field-CdM7a_e4.js → text-field-BxSBiSG0.js} +25 -25
  65. package/dist/browser/{theme-Byin1YOk.js → theme-Dg-nn5Fm.js} +949 -946
  66. package/dist/browser/{ui-Bso8uSzX.js → ui-D9Ao87UU.js} +11 -11
  67. package/dist/browser/{useRenderTarget-C16k6iot.js → useRenderTarget-bA5k2RxM.js} +5 -5
  68. package/dist/esm/components/AutocompleteContainer.d.ts +1 -1
  69. package/dist/esm/components/Bookmarks.d.ts +1 -1
  70. package/dist/esm/components/Bookmarks.js +1 -1
  71. package/dist/esm/components/Booth/Booth.js +1 -1
  72. package/dist/esm/components/Category.d.ts +1 -1
  73. package/dist/esm/components/Debug.d.ts +1 -1
  74. package/dist/esm/components/Debug.js +1 -1
  75. package/dist/esm/components/ErrorBoundary.d.ts +1 -1
  76. package/dist/esm/components/ErrorBoundary.js +1 -1
  77. package/dist/esm/components/Event.js +1 -1
  78. package/dist/esm/components/Exhibitor.d.ts +1 -1
  79. package/dist/esm/components/Exhibitor.js +1 -1
  80. package/dist/esm/components/Filter.d.ts +1 -1
  81. package/dist/esm/components/Filter.js +1 -1
  82. package/dist/esm/components/Gallery/GalleryBadges/GalleryBadges.js +1 -1
  83. package/dist/esm/components/Gallery/GalleryPreLoader.js +1 -1
  84. package/dist/esm/components/Kiosk/KioskStore.js +1 -1
  85. package/dist/esm/components/Kiosk/SetKiosk/SetKioskComponent.js +1 -1
  86. package/dist/esm/components/LogoOverlay.js +1 -1
  87. package/dist/esm/components/Map/Map.js +1 -1
  88. package/dist/esm/components/Map/drawing/config/BoothDrawerBase.js +1 -1
  89. package/dist/esm/components/Map/drawing/config/BoothShape.js +1 -1
  90. package/dist/esm/components/Map/drawing/config/TextFitter.js +1 -1
  91. package/dist/esm/components/Map/drawing/config/config-bg.d.ts +1 -1
  92. package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
  93. package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
  94. package/dist/esm/components/Map/drawing/config/config-booth-border.js +1 -1
  95. package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
  96. package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
  97. package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
  98. package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
  99. package/dist/esm/components/Map/traffic/UpdateQueue.js +1 -1
  100. package/dist/esm/components/Map/traffic/useBuildRoute.js +1 -1
  101. package/dist/esm/components/Menu.d.ts +1 -1
  102. package/dist/esm/components/Menu.js +1 -1
  103. package/dist/esm/components/ModalContainer.d.ts +4 -4
  104. package/dist/esm/components/RebookingNotesContainer.d.ts +1 -1
  105. package/dist/esm/components/RebookingRadioGroupContainer.d.ts +1 -1
  106. package/dist/esm/components/RoutePlanner/RoutePlannerStopItem.js +1 -1
  107. package/dist/esm/components/Schedule.js +1 -1
  108. package/dist/esm/components/Search.d.ts +1 -1
  109. package/dist/esm/components/Search.js +1 -1
  110. package/dist/esm/components/Toast/ToastContainer.d.ts +1 -1
  111. package/dist/esm/components/TourPoints.d.ts +1 -1
  112. package/dist/esm/components/Tours.js +1 -1
  113. package/dist/esm/components/Visited.d.ts +1 -1
  114. package/dist/esm/components/WayfindingTemplate.js +1 -1
  115. package/dist/esm/components/Ws.d.ts +1 -1
  116. package/dist/esm/constants.d.ts +0 -1
  117. package/dist/esm/constants.js +1 -1
  118. package/dist/esm/data/svg.js +1 -1
  119. package/dist/esm/floorplan.loader.js +1 -1
  120. package/dist/esm/floorplan.ready.js +1 -1
  121. package/dist/esm/load-dev.d.ts +1 -1
  122. package/dist/esm/renderer/HandlerRegistry.js +1 -1
  123. package/dist/esm/renderer/RendererService.js +1 -1
  124. package/dist/esm/services/URLFilterManager.js +1 -1
  125. package/dist/esm/services/url-dispatch.js +1 -1
  126. package/dist/esm/store/BaseFilterStore.js +1 -1
  127. package/dist/esm/store/BookmarksStore.js +2 -2
  128. package/dist/esm/store/BoothStore.d.ts +1 -1
  129. package/dist/esm/store/BoothStore.js +1 -1
  130. package/dist/esm/store/CategoryFilterStore.js +1 -1
  131. package/dist/esm/store/CategoryStore.d.ts +1 -1
  132. package/dist/esm/store/CategoryStore.js +1 -1
  133. package/dist/esm/store/EventStore.d.ts +2 -2
  134. package/dist/esm/store/EventStore.js +1 -1
  135. package/dist/esm/store/ExhibitorStore.d.ts +1 -1
  136. package/dist/esm/store/ExhibitorStore.js +1 -1
  137. package/dist/esm/store/FuzzySearchEngineStore.js +1 -1
  138. package/dist/esm/store/HeatmapStore.d.ts +1 -1
  139. package/dist/esm/store/HeatmapStore.js +1 -1
  140. package/dist/esm/store/IntercomStore.js +1 -1
  141. package/dist/esm/store/LayerStore.js +1 -1
  142. package/dist/esm/store/MaplibreStore.js +1 -1
  143. package/dist/esm/store/PoiTypeStore.js +1 -1
  144. package/dist/esm/store/RootStore.js +1 -1
  145. package/dist/esm/store/RoutePlannerStore.js +1 -1
  146. package/dist/esm/store/RouteStore.js +1 -1
  147. package/dist/esm/store/SearchStore.d.ts +1 -1
  148. package/dist/esm/store/SearchStore.js +1 -1
  149. package/dist/esm/store/SessionsFilterStore.js +1 -1
  150. package/dist/esm/store/ShortcutRegistry.js +1 -1
  151. package/dist/esm/store/SpeakerFilterStore.js +1 -1
  152. package/dist/esm/store/SpeakerStore.d.ts +2 -2
  153. package/dist/esm/store/SpeakerStore.js +1 -1
  154. package/dist/esm/store/SubButtonRegistry.js +1 -1
  155. package/dist/esm/store/ToursStore.js +1 -1
  156. package/dist/esm/store/UIState.d.ts +2 -3
  157. package/dist/esm/store/UIState.js +1 -1
  158. package/dist/esm/store/init/init-booths.js +1 -1
  159. package/dist/esm/store/init/init-layers.js +1 -1
  160. package/dist/esm/store/providers/SearchShortcutProvider.js +1 -1
  161. package/dist/esm/store/providers/SessionsShortcutProvider.js +1 -1
  162. package/dist/esm/store/providers/SessionsSubButtonProvider.js +1 -1
  163. package/dist/esm/store/providers/SpeakerShortcutProvider.js +1 -1
  164. package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
  165. package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
  166. package/dist/esm/store/search-buttons/SearchButtonsFilters.js +1 -1
  167. package/dist/esm/store/search-buttons/SearchButtonsState.js +1 -1
  168. package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
  169. package/dist/esm/store/search-buttons/constants.d.ts +8 -8
  170. package/dist/esm/store/types.d.ts +6 -6
  171. package/dist/esm/tools/expofpUrl.d.ts +2 -2
  172. package/dist/esm/tools/logger.js +1 -1
  173. package/dist/esm/tools/settings.js +1 -1
  174. package/dist/esm/ui/Autocomplete/Autocomplete.js +1 -1
  175. package/dist/esm/ui/EntityItem/EntityItem.js +1 -1
  176. package/dist/esm/ui/EventBadge/EventBadge.js +1 -1
  177. package/dist/esm/ui/Share/Share.js +1 -1
  178. package/dist/esm/utils/camera-map-settings.d.ts +2 -2
  179. package/dist/esm/utils/dimming.d.ts +1 -1
  180. package/dist/esm/utils/is-from-designer.d.ts +1 -1
  181. package/dist/esm/utils/silence-mobx-react-lite-warning.d.ts +1 -0
  182. package/dist/esm/utils/silence-mobx-react-lite-warning.js +1 -1
  183. package/package.json +23 -23
  184. package/dist/browser/prop-types-Bw2U3Pyj.js +0 -57
  185. package/dist/browser/select-CGbkxHY8.js +0 -1360
@@ -1 +1 @@
1
- import{applyIntents as Y,getConfig as g,parseFromUrlTolerant as D,parseIntentsFromUrl as K,parseLegacyQuery as v,serializeSelection as W}from"@expofp/config";import{Box as z}from"@expofp/geometry";import{UrlConfigSchema as Q}from"@expofp/schema";import{safeDecode as d}from"@expofp/utils";import{autorun as x,runInAction as w,when as p}from"mobx";import{recoverKioskFromUrlPrams as H}from"../components/Kiosk/recoverKioskFromUrlPrams";import{LEGACY_PREVIEW_MODE_STORAGE_KEY as j,LEGACY_VIEWER_MODE_STORAGE_KEY as N,MAP_SETTINGS_KEY as $,PREVIEW_MODE_STORAGE_KEY as M,VIEWER_MODE_STORAGE_KEY as P}from"../constants";import b from"../data";import o,{uiState as r}from"../store";import{BoothBase as B}from"../store/BoothStore";import{CurrentPosition as q,extractRoute as J}from"../store/RouteStore";import{setConsentSettings as X}from"../tools/gtag";import L from"../tools/logger";import{areLayersEnabled as Z}from"../utils/areLayersEnabled";import{cameraToMapSettings as S}from"../utils/camera-map-settings";import{handleCustomCommand as ee}from"../utils/customCommands";import{getMostFrequent as te}from"../utils/getMostFrequent";import{heatmapEnabled as oe}from"../utils/heatmap-enabled";import{hasLocale as re,setLocale as ie}from"../utils/i18n";import{isLocalStorageAvailable as T}from"../utils/localStorage";import{stripTrackingParams as se}from"../utils/trackingParams";import{rewriteMultiSlugQuery as ae}from"./multi-slug";import{currentSearch as m,disableUrlWrites as ne,initUrlSync as le,pushQuery as ce,replaceQuery as f}from"./url-sync";let k=!1;export function applyDeclarativeConfig(){U(g()),p(()=>o.layerStore.layersLoaded,()=>{const e=g().camera;Object.keys(e).length&&h(S(e));const t=g().visibility;Object.keys(t).length&&r.setVisibility(t)})}export function initUrlRouting(e){le({offHistory:e,onNavigate:E}),R(),I(),p(()=>o.layerStore.layersLoaded,()=>{o.urlFilterManager&&!o.urlFilterManager.isInitialized&&o.urlFilterManager.initialize(),E(),x(V),x(G),r.viewerMode&&(r.menu=!0)})}export function applyParameters(e=""){f("?"+d(e.toString())),o.layerStore.layersLoaded?F(e):(I(),p(()=>o.layerStore.layersLoaded,()=>F(e)))}function F(e){const t="?"+d(e),s=de(t);U(s),s.consent&&X(s.consent),s.camera&&Object.keys(s.camera).length&&h(S(s.camera)),s.visibility&&Object.keys(s.visibility).length&&r.setVisibility(s.visibility),R(),E();const i=[...s.intents??[],...K(t).intents];i.length&&Y(o.fp,i)}function I(){const e=m(),t=e.length>1?d(e.substring(1)):"";return ee(t)}function E(){k=!0;try{const e=new URLSearchParams(d(window.location.search));H(e);const{primary:t,oneShots:s}=v(m()),i=s.find(l=>l.type==="camera");if(i){const l=i.roll;h({...S(i.camera),roll:l})}else new Set(e.keys()).size||he();const c=t.type==="select"&&(!t.slug||/^t=[^&]*$/.test(t.slug))&&(r.heatmap||r.heatmapYah);!I()&&!c&&ue(t)}finally{k=!1}G(),V()}function ue(e){const t=o.fp;switch(e.type){case"kiosk":e.enabled===!0?r.kiosk=!0:e.enabled===!1&&(r.kiosk=!1,r.resetUIScale());return;case"list":t.showList(e.list);return;case"tour":t.selectTour(e.tourId);return;case"planner":t.openPlanner({items:e.items,from:e.from,fromBookmarks:e.fromBookmarks});return;case"route":{o.routeStore.setOnlyAccessible(e.accessible),o.routeStore.selectRoute(J(e.from??"",e.to??"",e.waypoints)),o.uiState.setIsMultiPointRoute(e.waypoints.length>0),e.title&&o.uiState.setRouteTitle(e.title);return}case"language":re(e.langId)&&ie(e.langId);return;case"printPdf":o.uiState.printingPdf=!0;return;case"visibility":o.uiState.setVisibility(e.hidden.reduce((s,i)=>({...s,[i]:!1}),{}));return;case"buildRoute":t.startBuildRoute();return;case"pathway":applyPathway(e);return;case"selectExhibitors":setTimeout(()=>t.selectExhibitor(e.values),250);return;case"ownedByFilters":L.log("Skipping filter parameters in dispatchFromUrl (owned by URLFilterManager)");return;case"ownedByConfig":return;case"select":t.select(e.slug);return}}export function applyPathway(e){const{pathwayId:t,boothIds:s,exhibitorIds:i,tourId:c}=e;if(c){const a=o.toursStore.getTourById(c);a&&w(()=>{o.uiState.setTourTitle(a.name),o.uiState.setTourDescription(a.description??""),o.uiState.setIsMultiPointTour(!0),o.uiState.setMultiPointTourList(a.id)})}const l=o.boothStore.booths.filter(a=>s.includes(a.externalId)),u=o.exhibitorStore.exhibitors.filter(a=>i.includes(a.externalId)).flatMap(a=>a.booths),n=[...l,...u];if(Z()){const a=te(n.map(y=>y.layer.name));a&&o.fp.activateFloor({name:a})}(s.length>0||i.length>0)&&o.fp.highlightEntities([...s,...i]),o.layerStore.showPathWay(t),n.length>0&&w(()=>{o.uiState.moveToRect=z.fromUnion(...n.map(a=>a.rect).filter(Boolean)),o.uiState.rollReset=!0})}function R(){const e=m(),{oneShots:t}=v(e);for(const i of t)fe(i);e.startsWith("?preview=")&&f("?"),m().includes("copy_exh")&&f("?");const s=se(m());s!==null&&f("?"+s),r.previewExhibitor&&f("?"+r.previewExhibitor.slug),me()}function fe(e){switch(e.type){case"heatmap":O(e.yah);return;case"blueDot":{const t=new q(e.x,e.y,o.layerStore.findLayer(e.layer??"")?.name,void 0,e.lat,e.lng);p(()=>o.layerStore.layersLoaded,()=>o.routeStore.selectCurrentPosition(t,!0,1));return}case"viewerMode":T&&(e.enabled?localStorage.setItem(P,"true"):(localStorage.removeItem(P),localStorage.removeItem(N)));return;case"previewMode":T&&(e.enabled?localStorage.setItem(M,"true"):(localStorage.removeItem(M),localStorage.removeItem(j)));return;case"uiScale":e.scale!==null?o.uiState.setUIScale(e.scale,!0):L.warn(`Invalid ui-scale parameter: ${e.raw}. Must be a number between 0.8 and 1.4.`);return;case"resetUiScale":o.uiState.resetUIScale();return;case"legacyBookmarks":{const t=e.appendExhibitorId===null?void 0:o.exhibitorStore.exhibitorById.get(e.appendExhibitorId);f(t?"?"+t.slug:"?bookmarks");return}}}function O(e){ne(),e?(r.heatmapYah=!0,r.monochrome=!0,r.hideLogoInBooth=!0,r.hideHeaderLogo=!0,r.disableBookmarked=!0):r.heatmap=!0}function me(){const e=ae(m(),t=>o.exhibitorStore.exhibitors.find(i=>i.slug===t||i.externalId===t)?.name);e!==null&&f(e)}function U(e){e.noOverlay!==void 0&&(r.hideOverlay=e.noOverlay),e.monochrome&&(r.monochrome=!0),e.hideHeaderLogo&&(r.hideHeaderLogo=!0),e.hideLogoInBooth&&(r.hideLogoInBooth=!0),e.disableFeatured&&o.exhibitorStore.exhibitors.forEach(t=>t.featured=!1),e.disableBookmarked&&(r.disableBookmarked=!0),e.disableGps&&o.routeStore.setGpsTrackingEnabled(!1),e.heatmap&&oe(e.heatmap)&&O(e.heatmap.variant==="yah")}function de(e){return D(Q,e).value}let C=null,_=null,A=null;function G(){const{selection:e,exhibitor:t,booth:s,eventItem:i}=pe(),c=o.urlFilterManager.filterSearch();if(k)return;const l=W(e)||c;m()!==l&&(t!==C||s!==_||i!==A?ce(l):f(l),C=t,_=s,A=i)}function pe(){const e=r.selectedExhibitor,t=r.selectedBooth,s=r.selectedEventItem,i=r.selectedRoute,c=r.selectedSpeaker,l=r.setKioskModeEnabled,u=r.list;let n;if(u.type==="route-planner"&&!e&&!t&&!s){const a=o.routePlannerStore;n={type:"planner",fromBookmarks:a.source==="bookmarks",items:a.items.map(y=>y.entity.slug).filter(Boolean),from:a.startPoint?.slug||void 0}}else if(i&&!r.isMultiPointRoute)n={type:"route",to:i.to instanceof B?i.to.slug:void 0,from:i.from instanceof B?i.from.slug:void 0,accessible:o.routeStore.onlyAccessible,waypoints:i.waypoints?.map(a=>a.slug)};else if(e)n={type:"slug",slug:e.slug};else if(t)n={type:"slug",slug:t.slug};else if(s)n={type:"slug",slug:s.slug};else if(c)n={type:"slug",slug:c.slug};else if(l)n={type:"none"};else switch(u.type){case"bookmarks":case"visited":case"sessions":case"exhibitors":case"speakers":case"tours":case"language":n={type:"list",list:u.type};break;case"category":n={type:"slug",slug:r.selectedCategory?.slug??""};break;case"search":n={type:"slug",slug:u.text||""};break;case"filter":n={type:"filter",key:u.query.key,value:u.query.value};break;case"multi-point-tour":n={type:"tour",tourId:u.tourId};break;default:throw new Error("Unkown list.type")}return{selection:n,exhibitor:e,booth:t,eventItem:s}}function V(){const e=r.selectedExhibitor,t=r.selectedEventItem,s=r.selectedSpeaker;let i="";e?i=e.name:t?i=t.name:s?i=s.name:r.list.type==="search"&&r.list.text?i="`"+(r.list.text||"")+"`":r.list.type==="multi-point-tour"&&r.tourTitle&&(i=r.tourTitle),i.length&&(i+=" \u2013 "),i+=b.title,b.subtitle&&(i+=" \u2013 "+b.subtitle),i+=" \u2013 Expo Floor Plan by ExpoFP",document.title=i}function h(e){try{if(r.setMapSettings(e),e.z){const t=o.layerStore.layers.find(s=>s.name===e.z);t&&o.layerStore.updateVisibility(t,!0)}}catch(t){console.error("Failed to process or save map settings.",t)}}function he(){try{const e=sessionStorage.getItem($);e&&h(JSON.parse(e))}catch(e){console.error("Failed to process or save map settings.",e)}}
1
+ import{applyIntents as G,getConfig as y,parseFromUrlTolerant as Y,parseIntentsFromUrl as K,parseLegacyQuery as x,serializeSelection as W}from"@expofp/config";import{Box as Q}from"@expofp/geometry";import{UrlConfigSchema as z}from"@expofp/schema";import{safeDecode as d}from"@expofp/utils";import{autorun as v,runInAction as w,when as p}from"mobx";import{recoverKioskFromUrlPrams as H}from"../components/Kiosk/recoverKioskFromUrlPrams";import{LEGACY_PREVIEW_MODE_STORAGE_KEY as j,LEGACY_VIEWER_MODE_STORAGE_KEY as N,PREVIEW_MODE_STORAGE_KEY as M,VIEWER_MODE_STORAGE_KEY as B}from"../constants";import g from"../data";import o,{uiState as r}from"../store";import{BoothBase as P}from"../store/BoothStore";import{CurrentPosition as $,extractRoute as q}from"../store/RouteStore";import{setConsentSettings as J}from"../tools/gtag";import L from"../tools/logger";import{areLayersEnabled as X}from"../utils/areLayersEnabled";import{cameraToMapSettings as b}from"../utils/camera-map-settings";import{handleCustomCommand as Z}from"../utils/customCommands";import{getMostFrequent as ee}from"../utils/getMostFrequent";import{heatmapEnabled as te}from"../utils/heatmap-enabled";import{hasLocale as oe,setLocale as re}from"../utils/i18n";import{isLocalStorageAvailable as R}from"../utils/localStorage";import{stripTrackingParams as ie}from"../utils/trackingParams";import{rewriteMultiSlugQuery as se}from"./multi-slug";import{currentSearch as m,disableUrlWrites as ae,initUrlSync as ne,pushQuery as le,replaceQuery as f}from"./url-sync";let S=!1;export function applyDeclarativeConfig(){O(y()),p(()=>o.layerStore.layersLoaded,()=>{const e=y().camera;Object.keys(e).length&&E(b(e));const t=y().visibility;Object.keys(t).length&&r.setVisibility(t)})}export function initUrlRouting(e){ne({offHistory:e,onNavigate:I}),F(),k(),p(()=>o.layerStore.layersLoaded,()=>{o.urlFilterManager&&!o.urlFilterManager.isInitialized&&o.urlFilterManager.initialize(),I(),v(D),v(V),r.viewerMode&&(r.menu=!0)})}export function applyParameters(e=""){f("?"+d(e.toString())),o.layerStore.layersLoaded?T(e):(k(),p(()=>o.layerStore.layersLoaded,()=>T(e)))}function T(e){const t="?"+d(e),s=me(t);O(s),s.consent&&J(s.consent),s.camera&&Object.keys(s.camera).length&&E(b(s.camera)),s.visibility&&Object.keys(s.visibility).length&&r.setVisibility(s.visibility),F(),I();const i=[...s.intents??[],...K(t).intents];i.length&&G(o.fp,i)}function k(){const e=m(),t=e.length>1?d(e.substring(1)):"";return Z(t)}function I(){S=!0;try{const e=new URLSearchParams(d(window.location.search));H(e);const{primary:t,oneShots:s}=x(m()),i=s.find(l=>l.type==="camera");if(i){const l=i.roll;E({...b(i.camera),roll:l})}const u=t.type==="select"&&(!t.slug||/^t=[^&]*$/.test(t.slug))&&(r.heatmap||r.heatmapYah);!k()&&!u&&ue(t)}finally{S=!1}V(),D()}function ue(e){const t=o.fp;switch(e.type){case"kiosk":e.enabled===!0?r.kiosk=!0:e.enabled===!1&&(r.kiosk=!1,r.resetUIScale());return;case"list":t.showList(e.list);return;case"tour":t.selectTour(e.tourId);return;case"planner":t.openPlanner({items:e.items,from:e.from,fromBookmarks:e.fromBookmarks});return;case"route":{o.routeStore.setOnlyAccessible(e.accessible),o.routeStore.selectRoute(q(e.from??"",e.to??"",e.waypoints)),o.uiState.setIsMultiPointRoute(e.waypoints.length>0),e.title&&o.uiState.setRouteTitle(e.title);return}case"language":oe(e.langId)&&re(e.langId);return;case"printPdf":o.uiState.printingPdf=!0;return;case"visibility":o.uiState.setVisibility(e.hidden.reduce((s,i)=>({...s,[i]:!1}),{}));return;case"buildRoute":t.startBuildRoute();return;case"pathway":applyPathway(e);return;case"selectExhibitors":setTimeout(()=>t.selectExhibitor(e.values),250);return;case"ownedByFilters":L.log("Skipping filter parameters in dispatchFromUrl (owned by URLFilterManager)");return;case"ownedByConfig":return;case"select":t.select(e.slug);return}}export function applyPathway(e){const{pathwayId:t,boothIds:s,exhibitorIds:i,tourId:u}=e;if(u){const a=o.toursStore.getTourById(u);a&&w(()=>{o.uiState.setTourTitle(a.name),o.uiState.setTourDescription(a.description??""),o.uiState.setIsMultiPointTour(!0),o.uiState.setMultiPointTourList(a.id)})}const l=o.boothStore.booths.filter(a=>s.includes(a.externalId)),c=o.exhibitorStore.exhibitors.filter(a=>i.includes(a.externalId)).flatMap(a=>a.booths),n=[...l,...c];if(X()){const a=ee(n.map(h=>h.layer.name));a&&o.fp.activateFloor({name:a})}(s.length>0||i.length>0)&&o.fp.highlightEntities([...s,...i]),o.layerStore.showPathWay(t),n.length>0&&w(()=>{o.uiState.moveToRect=Q.fromUnion(...n.map(a=>a.rect).filter(Boolean)),o.uiState.rollReset=!0})}function F(){const e=m(),{oneShots:t}=x(e);for(const i of t)ce(i);e.startsWith("?preview=")&&f("?"),m().includes("copy_exh")&&f("?");const s=ie(m());s!==null&&f("?"+s),r.previewExhibitor&&f("?"+r.previewExhibitor.slug),fe()}function ce(e){switch(e.type){case"heatmap":U(e.yah);return;case"blueDot":{const t=new $(e.x,e.y,o.layerStore.findLayer(e.layer??"")?.name,void 0,e.lat,e.lng);p(()=>o.layerStore.layersLoaded,()=>o.routeStore.selectCurrentPosition(t,!0,1));return}case"viewerMode":R&&(e.enabled?localStorage.setItem(B,"true"):(localStorage.removeItem(B),localStorage.removeItem(N)));return;case"previewMode":R&&(e.enabled?localStorage.setItem(M,"true"):(localStorage.removeItem(M),localStorage.removeItem(j)));return;case"uiScale":e.scale!==null?o.uiState.setUIScale(e.scale,!0):L.warn(`Invalid ui-scale parameter: ${e.raw}. Must be a number between 0.8 and 1.4.`);return;case"resetUiScale":o.uiState.resetUIScale();return;case"legacyBookmarks":{const t=e.appendExhibitorId===null?void 0:o.exhibitorStore.exhibitorById.get(e.appendExhibitorId);f(t?"?"+t.slug:"?bookmarks");return}}}function U(e){ae(),e?(r.heatmapYah=!0,r.monochrome=!0,r.hideLogoInBooth=!0,r.hideHeaderLogo=!0,r.disableBookmarked=!0):r.heatmap=!0}function fe(){const e=se(m(),t=>o.exhibitorStore.exhibitors.find(i=>i.slug===t||i.externalId===t)?.name);e!==null&&f(e)}function O(e){e.noOverlay!==void 0&&(r.hideOverlay=e.noOverlay),e.monochrome&&(r.monochrome=!0),e.hideHeaderLogo&&(r.hideHeaderLogo=!0),e.hideLogoInBooth&&(r.hideLogoInBooth=!0),e.disableFeatured&&o.exhibitorStore.exhibitors.forEach(t=>t.featured=!1),e.disableBookmarked&&(r.disableBookmarked=!0),e.disableGps&&o.routeStore.setGpsTrackingEnabled(!1),e.heatmap&&te(e.heatmap)&&U(e.heatmap.variant==="yah")}function me(e){return Y(z,e).value}let C=null,_=null,A=null;function V(){const{selection:e,exhibitor:t,booth:s,eventItem:i}=de(),u=o.urlFilterManager.filterSearch();if(S)return;const l=W(e)||u;m()!==l&&(t!==C||s!==_||i!==A?le(l):f(l),C=t,_=s,A=i)}function de(){const e=r.selectedExhibitor,t=r.selectedBooth,s=r.selectedEventItem,i=r.selectedRoute,u=r.selectedSpeaker,l=r.setKioskModeEnabled,c=r.list;let n;if(c.type==="route-planner"&&!e&&!t&&!s){const a=o.routePlannerStore;n={type:"planner",fromBookmarks:a.source==="bookmarks",items:a.items.map(h=>h.entity.slug).filter(Boolean),from:a.startPoint?.slug||void 0}}else if(i&&!r.isMultiPointRoute)n={type:"route",to:i.to instanceof P?i.to.slug:void 0,from:i.from instanceof P?i.from.slug:void 0,accessible:o.routeStore.onlyAccessible,waypoints:i.waypoints?.map(a=>a.slug)};else if(e)n={type:"slug",slug:e.slug};else if(t)n={type:"slug",slug:t.slug};else if(s)n={type:"slug",slug:s.slug};else if(u)n={type:"slug",slug:u.slug};else if(l)n={type:"none"};else switch(c.type){case"bookmarks":case"visited":case"sessions":case"exhibitors":case"speakers":case"tours":case"language":n={type:"list",list:c.type};break;case"category":n={type:"slug",slug:r.selectedCategory?.slug??""};break;case"search":n={type:"slug",slug:c.text||""};break;case"filter":n={type:"filter",key:c.query.key,value:c.query.value};break;case"multi-point-tour":n={type:"tour",tourId:c.tourId};break;default:throw new Error("Unkown list.type")}return{selection:n,exhibitor:e,booth:t,eventItem:s}}function D(){const e=r.selectedExhibitor,t=r.selectedEventItem,s=r.selectedSpeaker;let i="";e?i=e.name:t?i=t.name:s?i=s.name:r.list.type==="search"&&r.list.text?i="`"+(r.list.text||"")+"`":r.list.type==="multi-point-tour"&&r.tourTitle&&(i=r.tourTitle),i.length&&(i+=" \u2013 "),i+=g.title,g.subtitle&&(i+=" \u2013 "+g.subtitle),i+=" \u2013 Expo Floor Plan by ExpoFP",document.title=i}function E(e){try{if(r.setMapSettings(e),e.z){const t=o.layerStore.layers.find(s=>s.name===e.z);t&&o.layerStore.updateVisibility(t,!0)}}catch(t){console.error("Failed to process map settings.",t)}}
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as l}from"tslib";import{action as i,observable as F}from"mobx";let f=(()=>{let s=[],r,n=[],o=[],c,d,m,h,p,u;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[F],c=[i],d=[i],m=[i],h=[i],p=[i],u=[i],a(this,null,c,{kind:"method",name:"openFilter",static:!1,private:!1,access:{has:e=>"openFilter"in e,get:e=>e.openFilter},metadata:t},null,s),a(this,null,d,{kind:"method",name:"closeFilter",static:!1,private:!1,access:{has:e=>"closeFilter"in e,get:e=>e.closeFilter},metadata:t},null,s),a(this,null,m,{kind:"method",name:"applyFilter",static:!1,private:!1,access:{has:e=>"applyFilter"in e,get:e=>e.applyFilter},metadata:t},null,s),a(this,null,h,{kind:"method",name:"resetFilter",static:!1,private:!1,access:{has:e=>"resetFilter"in e,get:e=>e.resetFilter},metadata:t},null,s),a(this,null,p,{kind:"method",name:"clearPendingItems",static:!1,private:!1,access:{has:e=>"clearPendingItems"in e,get:e=>e.clearPendingItems},metadata:t},null,s),a(this,null,u,{kind:"method",name:"setPendingItems",static:!1,private:!1,access:{has:e=>"setPendingItems"in e,get:e=>e.setPendingItems},metadata:t},null,s),a(null,null,r,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,g)=>{e.state=g}},metadata:t},n,o),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,s);state=l(this,n,{isOpen:!1,selectedItems:[],pendingItems:[]});get publicRootStore(){return this.rootStore}constructor(t){l(this,o),this.rootStore=t}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems]}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[],this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}applyFilter(){this.state.selectedItems=[...this.state.pendingItems],this.closeFilter(),this.updateUIState()}resetFilter(){this.state.pendingItems=[]}clearPendingItems(){this.state.pendingItems=[]}setPendingItems(t){this.state.pendingItems=t}}})();export default f;
1
+ import{__decorate as e}from"tslib";import{action as s,observable as r}from"mobx";export default class t{get publicRootStore(){return this.rootStore}constructor(i){this.state={isOpen:!1,selectedItems:[],pendingItems:[]},this.rootStore=i}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems]}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[],this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}applyFilter(){this.state.selectedItems=[...this.state.pendingItems],this.closeFilter(),this.updateUIState()}resetFilter(){this.state.pendingItems=[]}clearPendingItems(){this.state.pendingItems=[]}setPendingItems(i){this.state.pendingItems=i}}e([r],t.prototype,"state",void 0),e([s],t.prototype,"openFilter",null),e([s],t.prototype,"closeFilter",null),e([s],t.prototype,"applyFilter",null),e([s],t.prototype,"resetFilter",null),e([s],t.prototype,"clearPendingItems",null),e([s],t.prototype,"setPendingItems",null);
@@ -1,2 +1,2 @@
1
- import{__esDecorate as r,__runInitializers as b}from"tslib";import u from"copy-to-clipboard";import{computed as s}from"mobx";import{t as m}from"../utils/i18n";let p=(()=>{let a=[],i,l,k,h;return class{static{const o=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[s],l=[s],k=[s],h=[s],r(this,null,i,{kind:"getter",name:"bookmarkedBooths",static:!1,private:!1,access:{has:t=>"bookmarkedBooths"in t,get:t=>t.bookmarkedBooths},metadata:o},null,a),r(this,null,l,{kind:"getter",name:"total",static:!1,private:!1,access:{has:t=>"total"in t,get:t=>t.total},metadata:o},null,a),r(this,null,k,{kind:"getter",name:"hasBookmarks",static:!1,private:!1,access:{has:t=>"hasBookmarks"in t,get:t=>t.hasBookmarks},metadata:o},null,a),r(this,null,h,{kind:"getter",name:"hasRoutableBookmarks",static:!1,private:!1,access:{has:t=>"hasRoutableBookmarks"in t,get:t=>t.hasRoutableBookmarks},metadata:o},null,a),o&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})}rootStore=b(this,a);_share;constructor(o){this.rootStore=o,this._share=this.share.bind(this)}get bookmarkedBooths(){return this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)}get total(){return this.rootStore.exhibitorStore.bookmarked.length+this.rootStore.eventStore.bookmarked.length+this.rootStore.speakerStore.bookmarked.length+this.bookmarkedBooths.length}get hasBookmarks(){return this.total>0}get hasRoutableBookmarks(){return this.rootStore.exhibitorStore.bookmarked.length>0||this.bookmarkedBooths.length>0}share(){const{exhibitorStore:o,eventStore:t,speakerStore:d}=this.rootStore,n=window.location,c=[...o.bookmarked.map(e=>e.id),...t.bookmarked.map(e=>e.id),...d.bookmarked.map(e=>e.id),...this.bookmarkedBooths.map(e=>e.id)];u(`${n.protocol}//${n.host}/?b=`+c.join("|")),alert(m("Link copied to clipboard")+`.
2
- `+m("Open it on another device to import bookmarks")+".")}}})();export default p;
1
+ import{__decorate as e}from"tslib";import l from"copy-to-clipboard";import{computed as a}from"mobx";import{t as s}from"../utils/i18n";export default class r{constructor(t){this.rootStore=t,this._share=this.share.bind(this)}get bookmarkedBooths(){return this.rootStore.boothStore.booths.filter(t=>t.exhibitors.length===0&&t.bookmarkedDirectly)}get total(){return this.rootStore.exhibitorStore.bookmarked.length+this.rootStore.eventStore.bookmarked.length+this.rootStore.speakerStore.bookmarked.length+this.bookmarkedBooths.length}get hasBookmarks(){return this.total>0}get hasRoutableBookmarks(){return this.rootStore.exhibitorStore.bookmarked.length>0||this.bookmarkedBooths.length>0}share(){const{exhibitorStore:t,eventStore:h,speakerStore:k}=this.rootStore,i=window.location,m=[...t.bookmarked.map(o=>o.id),...h.bookmarked.map(o=>o.id),...k.bookmarked.map(o=>o.id),...this.bookmarkedBooths.map(o=>o.id)];l(`${i.protocol}//${i.host}/?b=`+m.join("|")),alert(s("Link copied to clipboard")+`.
2
+ `+s("Open it on another device to import bookmarks")+".")}}e([a],r.prototype,"bookmarkedBooths",null),e([a],r.prototype,"total",null),e([a],r.prototype,"hasBookmarks",null),e([a],r.prototype,"hasRoutableBookmarks",null);
@@ -1,6 +1,6 @@
1
- import { RawPoiType, RawRegularBooth } from '@expofp/schema';
2
1
  import { Box } from '@expofp/geometry';
3
2
  import { ImageDef } from '@expofp/renderer';
3
+ import { RawPoiType, RawRegularBooth } from '@expofp/schema';
4
4
  import { PathInfo, ShapeBgDef } from '../types/drawing.types';
5
5
  import { EventItem } from './EventStore';
6
6
  import { Exhibitor } from './ExhibitorStore';
@@ -1 +1 @@
1
- import{__esDecorate as r,__runInitializers as l}from"tslib";import{pointDistance as E}from"@expofp/geometry";import{action as z,computed as s,observable as v}from"mobx";import x from"../tools/settings";import{uiState as A}from"./index";let N=(()=>{let a=[],n,h=[],d=[],c,m=[],u=[],b,g,k,p,f,_,y;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[v],c=[v],b=[s({keepAlive:!0})],g=[s({keepAlive:!0})],k=[s({keepAlive:!0})],p=[s({keepAlive:!0})],f=[s({keepAlive:!0})],_=[s],y=[z],r(this,null,b,{kind:"getter",name:"boothById",static:!1,private:!1,access:{has:e=>"boothById"in e,get:e=>e.boothById},metadata:t},null,a),r(this,null,g,{kind:"getter",name:"boothByExternalId",static:!1,private:!1,access:{has:e=>"boothByExternalId"in e,get:e=>e.boothByExternalId},metadata:t},null,a),r(this,null,k,{kind:"getter",name:"boothByName",static:!1,private:!1,access:{has:e=>"boothByName"in e,get:e=>e.boothByName},metadata:t},null,a),r(this,null,p,{kind:"getter",name:"boothBySlug",static:!1,private:!1,access:{has:e=>"boothBySlug"in e,get:e=>e.boothBySlug},metadata:t},null,a),r(this,null,f,{kind:"getter",name:"borderWidth",static:!1,private:!1,access:{has:e=>"borderWidth"in e,get:e=>e.borderWidth},metadata:t},null,a),r(this,null,_,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),r(this,null,y,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,a),r(null,null,n,{kind:"field",name:"booths",static:!1,private:!1,access:{has:e=>"booths"in e,get:e=>e.booths,set:(e,i)=>{e.booths=i}},metadata:t},h,d),r(null,null,c,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,i)=>{e.highlightedByExternalIds=i}},metadata:t},m,u),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,a);booths=l(this,h,[]);highlightedByExternalIds=(l(this,d),l(this,m,[]));get boothById(){return new Map(this.booths.map(t=>[t.id,t]))}get boothByExternalId(){return new Map(this.booths.map(t=>[t.externalId,t]))}get boothByName(){return new Map(this.booths.map(t=>[t.name.toLowerCase(),t]))}get boothBySlug(){return new Map(this.booths.map(t=>[t.slug,t]))}get borderWidth(){if(x.boothBorderWidth)return x.boothBorderWidth;if(x.EXPO==="groomexpo")return .4;const t=this.booths.filter(e=>e.rect).map(e=>e.rect.size.width+e.rect.size.height);return t.reduce((e,i)=>e+i,0)/t.length/80}constructor(t){l(this,u),this.rootStore=t}get bookmarked(){return this.booths.filter(t=>t.bookmarkedDirectly)}getNearestBooth(t){var e=null;const B=this.booths.map(o=>({lineLength:E(t,o.rect.center),name:o.name})).sort((o,D)=>o.lineLength-D.lineLength)[0];return e=this.booths.find(o=>o.name===B.name),e}getBoothAtPoint(t){return this.booths.find(e=>e.rect.containsPoint(t))}findBooth(t){return this.boothByExternalId.get(t)||this.boothByName.get(t.toLowerCase())||this.boothBySlug.get(t)}replaceBookmarked(t){const e=(t||[]).map(o=>this.boothById.get(o)).filter(o=>o),i=new Set(e),B=this.bookmarked.filter(o=>!i.has(o));for(const o of B)o.bookmarkedDirectly=!1;for(const o of e)o.bookmarkedDirectly=!0}}})();export default N;let I=(()=>{let a=[],n,h=[],d=[],c,m=[],u=[],b,g,k,p,f,_,y;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[v],c=[v],b=[s({keepAlive:!0})],g=[s({keepAlive:!0})],k=[s({keepAlive:!0})],p=[s({keepAlive:!0})],f=[s({keepAlive:!0})],_=[s({keepAlive:!0})],y=[s({keepAlive:!0})],r(this,null,b,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),r(this,null,g,{kind:"getter",name:"uiState",static:!1,private:!1,access:{has:e=>"uiState"in e,get:e=>e.uiState},metadata:t},null,a),r(this,null,k,{kind:"getter",name:"fullName",static:!1,private:!1,access:{has:e=>"fullName"in e,get:e=>e.fullName},metadata:t},null,a),r(this,null,p,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,a),r(this,null,f,{kind:"getter",name:"hover",static:!1,private:!1,access:{has:e=>"hover"in e,get:e=>e.hover},metadata:t},null,a),r(this,null,_,{kind:"getter",name:"selected",static:!1,private:!1,access:{has:e=>"selected"in e,get:e=>e.selected},metadata:t},null,a),r(this,null,y,{kind:"getter",name:"skipDim",static:!1,private:!1,access:{has:e=>"skipDim"in e,get:e=>e.skipDim},metadata:t},null,a),r(null,null,n,{kind:"field",name:"layer",static:!1,private:!1,access:{has:e=>"layer"in e,get:e=>e.layer,set:(e,i)=>{e.layer=i}},metadata:t},h,d),r(null,null,c,{kind:"field",name:"bookmarkedDirectly",static:!1,private:!1,access:{has:e=>"bookmarkedDirectly"in e,get:e=>e.bookmarkedDirectly,set:(e,i)=>{e.bookmarkedDirectly=i}},metadata:t},m,u),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}store=l(this,a);id;name;externalId;title;rect;borderWidth;borderColor;noLabels;rotate;paths;pathsWithRect;slug;error;description;exhibitors;labelColor;schedule;poiTypeId;poiType;poiIcon;meta;layer=l(this,h,void 0);bookmarkedDirectly=(l(this,d),l(this,m,!1));get bookmarked(){return A.disableBookmarked?!1:this.schedule?.some(t=>t.bookmarked)?!0:this.exhibitors.length>0?!!this.exhibitors.find(t=>t.bookmarked):this.bookmarkedDirectly}get uiState(){return this.store.rootStore.uiState}get fullName(){const t=this.meta?Object.entries(this.meta).filter(([e])=>!e.startsWith("_")).map(([e,i])=>`${e} ${i}`).join(" "):"";return`${this.name} ${t}`.replace(/\s+/g," ").trim()}get visible(){return this.layer?.visible??!0}get hover(){return this.uiState.hoveredBooths.has(this)}get selected(){return this.uiState.selectedBooths.has(this)}get skipDim(){return this.uiState.highlightedBooths.has(this.id.toString())}constructor(){l(this,u)}}})();export{I as BoothBase};export class RegularBooth extends I{buyUrl;reserveUrl;type;status;price;entity={type:"booth",variant:"regular"};size;availColor;soldColor;holdColor;onHold;reserved;shapes}export class SpecialBooth extends I{color;shapes;entity={type:"booth",variant:"special"}}
1
+ import{__decorate as o}from"tslib";import{pointDistance as d}from"@expofp/geometry";import{action as m,computed as i,observable as l}from"mobx";import p from"../tools/settings";import{uiState as b}from"./index";export default class s{get boothById(){return new Map(this.booths.map(t=>[t.id,t]))}get boothByExternalId(){return new Map(this.booths.map(t=>[t.externalId,t]))}get boothByName(){return new Map(this.booths.map(t=>[t.name.toLowerCase(),t]))}get boothBySlug(){return new Map(this.booths.map(t=>[t.slug,t]))}get borderWidth(){if(p.boothBorderWidth)return p.boothBorderWidth;if(p.EXPO==="groomexpo")return .4;const t=this.booths.filter(e=>e.rect).map(e=>e.rect.size.width+e.rect.size.height);return t.reduce((e,h)=>e+h,0)/t.length/80}constructor(t){this.booths=[],this.highlightedByExternalIds=[],this.rootStore=t}get bookmarked(){return this.booths.filter(t=>t.bookmarkedDirectly)}getNearestBooth(t){var e=null;const a=this.booths.map(r=>({lineLength:d(t,r.rect.center),name:r.name})).sort((r,u)=>r.lineLength-u.lineLength)[0];return e=this.booths.find(r=>r.name===a.name),e}getBoothAtPoint(t){return this.booths.find(e=>e.rect.containsPoint(t))}findBooth(t){return this.boothByExternalId.get(t)||this.boothByName.get(t.toLowerCase())||this.boothBySlug.get(t)}replaceBookmarked(t){const e=(t||[]).map(r=>this.boothById.get(r)).filter(r=>r),h=new Set(e),a=this.bookmarked.filter(r=>!h.has(r));for(const r of a)r.bookmarkedDirectly=!1;for(const r of e)r.bookmarkedDirectly=!0}}o([l],s.prototype,"booths",void 0),o([l],s.prototype,"highlightedByExternalIds",void 0),o([i({keepAlive:!0})],s.prototype,"boothById",null),o([i({keepAlive:!0})],s.prototype,"boothByExternalId",null),o([i({keepAlive:!0})],s.prototype,"boothByName",null),o([i({keepAlive:!0})],s.prototype,"boothBySlug",null),o([i({keepAlive:!0})],s.prototype,"borderWidth",null),o([i],s.prototype,"bookmarked",null),o([m],s.prototype,"replaceBookmarked",null);export class BoothBase{constructor(){this.bookmarkedDirectly=!1}get bookmarked(){return b.disableBookmarked?!1:this.schedule?.some(t=>t.bookmarked)?!0:this.exhibitors.length>0?!!this.exhibitors.find(t=>t.bookmarked):this.bookmarkedDirectly}get uiState(){return this.store.rootStore.uiState}get fullName(){const t=this.meta?Object.entries(this.meta).filter(([e])=>!e.startsWith("_")).map(([e,h])=>`${e} ${h}`).join(" "):"";return`${this.name} ${t}`.replace(/\s+/g," ").trim()}get visible(){return this.layer?.visible??!0}get hover(){return this.uiState.hoveredBooths.has(this)}get selected(){return this.uiState.selectedBooths.has(this)}get skipDim(){return this.uiState.highlightedBooths.has(this.id.toString())}}o([l],BoothBase.prototype,"layer",void 0),o([l],BoothBase.prototype,"bookmarkedDirectly",void 0),o([i({keepAlive:!0})],BoothBase.prototype,"bookmarked",null),o([i({keepAlive:!0})],BoothBase.prototype,"uiState",null),o([i({keepAlive:!0})],BoothBase.prototype,"fullName",null),o([i({keepAlive:!0})],BoothBase.prototype,"visible",null),o([i({keepAlive:!0})],BoothBase.prototype,"hover",null),o([i({keepAlive:!0})],BoothBase.prototype,"selected",null),o([i({keepAlive:!0})],BoothBase.prototype,"skipDim",null);export class RegularBooth extends BoothBase{constructor(){super(...arguments),this.entity={type:"booth",variant:"regular"}}}export class SpecialBooth extends BoothBase{constructor(){super(...arguments),this.entity={type:"booth",variant:"special"}}}
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as c}from"tslib";import{action as m,computed as n}from"mobx";import u from"./BaseFilterStore";let S=(()=>{let s=u,o=[],a,l,h;return class extends s{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0;a=[n],l=[n],h=[m],i(this,null,a,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:t=>"filteredExhibitors"in t,get:t=>t.filteredExhibitors},metadata:e},null,o),i(this,null,l,{kind:"getter",name:"filteredBooths",static:!1,private:!1,access:{has:t=>"filteredBooths"in t,get:t=>t.filteredBooths},metadata:e},null,o),i(this,null,h,{kind:"method",name:"resetFilter",static:!1,private:!1,access:{has:t=>"resetFilter"in t,get:t=>t.resetFilter},metadata:e},null,o),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}get filteredExhibitors(){return this.state.selectedItems.length===0?this.rootStore.exhibitorStore.exhibitors:this.rootStore.exhibitorStore.exhibitors.filter(e=>this.state.selectedItems.some(t=>e.categories.some(r=>r.id===t.id)))}get filteredBooths(){return this.rootStore.boothStore.booths.filter(e=>this.filteredExhibitors.some(t=>t.id===e.exhibitors[0]?.id))}get publicRootStore(){return this.rootStore}updateUIState(){this.rootStore.uiState.menu=!1;const e=this.state.selectedItems.map(r=>this.rootStore.categoryStore.categories.find(d=>d.id===r.id)).filter(Boolean);this.rootStore.uiState.selectedCategoryFilters=e,this.rootStore.uiState.categoryFilterOpen=!0,this.rootStore.searchStore.setFocused(!0),this.rootStore.moveToList(),this.rootStore.showMap();const t=e.map(r=>r.name);this.rootStore.urlFilterManager.setCategories(t)}getFilteredItems(){return this.rootStore.exhibitorStore.exhibitors.map(e=>({id:e.id,name:e.name}))}getMatchingExhibitorsCount(){return this.state.pendingItems.length===0?this.rootStore.exhibitorStore.exhibitors.length:this.rootStore.exhibitorStore.exhibitors.filter(e=>e.categories.some(t=>this.state.pendingItems.some(r=>r.id===t.id))).length}resetFilter(){this.state.pendingItems=[],this.state.selectedItems=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.uiState.categoryFilterOpen=!1,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.urlFilterManager.setCategories([])}constructor(){super(...arguments),c(this,o)}}})();export default S;
1
+ import{__decorate as i}from"tslib";import{action as a,computed as s}from"mobx";import l from"./BaseFilterStore";export default class r extends l{get filteredExhibitors(){return this.state.selectedItems.length===0?this.rootStore.exhibitorStore.exhibitors:this.rootStore.exhibitorStore.exhibitors.filter(t=>this.state.selectedItems.some(e=>t.categories.some(o=>o.id===e.id)))}get filteredBooths(){return this.rootStore.boothStore.booths.filter(t=>this.filteredExhibitors.some(e=>e.id===t.exhibitors[0]?.id))}get publicRootStore(){return this.rootStore}updateUIState(){this.rootStore.uiState.menu=!1;const t=this.state.selectedItems.map(o=>this.rootStore.categoryStore.categories.find(h=>h.id===o.id)).filter(Boolean);this.rootStore.uiState.selectedCategoryFilters=t,this.rootStore.uiState.categoryFilterOpen=!0,this.rootStore.searchStore.setFocused(!0),this.rootStore.moveToList(),this.rootStore.showMap();const e=t.map(o=>o.name);this.rootStore.urlFilterManager.setCategories(e)}getFilteredItems(){return this.rootStore.exhibitorStore.exhibitors.map(t=>({id:t.id,name:t.name}))}getMatchingExhibitorsCount(){return this.state.pendingItems.length===0?this.rootStore.exhibitorStore.exhibitors.length:this.rootStore.exhibitorStore.exhibitors.filter(t=>t.categories.some(e=>this.state.pendingItems.some(o=>o.id===e.id))).length}resetFilter(){this.state.pendingItems=[],this.state.selectedItems=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.uiState.categoryFilterOpen=!1,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.urlFilterManager.setCategories([])}}i([s],r.prototype,"filteredExhibitors",null),i([s],r.prototype,"filteredBooths",null),i([a],r.prototype,"resetFilter",null);
@@ -15,7 +15,7 @@ export declare class Category {
15
15
  readonly sponsorship: boolean;
16
16
  readonly exhibitors: Exhibitor[];
17
17
  readonly entity: {
18
- readonly type: "category";
18
+ readonly type: 'category';
19
19
  };
20
20
  }
21
21
  //# sourceMappingURL=CategoryStore.d.ts.map
@@ -1 +1 @@
1
- import{__esDecorate as o,__runInitializers as n}from"tslib";import{computed as i}from"mobx";let l=(()=>{let a=[],r,s;return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[i({keepAlive:!0})],s=[i],o(this,null,r,{kind:"getter",name:"categoryById",static:!1,private:!1,access:{has:t=>"categoryById"in t,get:t=>t.categoryById},metadata:e},null,a),o(this,null,s,{kind:"getter",name:"seminarsCategory",static:!1,private:!1,access:{has:t=>"seminarsCategory"in t,get:t=>t.seminarsCategory},metadata:e},null,a),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}rootStore=n(this,a);categories=[];get categoryById(){return new Map(this.categories.map(e=>[e.id,e]))}get seminarsCategory(){return this.categories.find(e=>e.slug==="seminars")}constructor(e){this.rootStore=e}}})();export default l;export class Category{store;id;name;slug;sponsorship;exhibitors;entity={type:"category"}}
1
+ import{__decorate as r}from"tslib";import{computed as o}from"mobx";export default class e{get categoryById(){return new Map(this.categories.map(t=>[t.id,t]))}get seminarsCategory(){return this.categories.find(t=>t.slug==="seminars")}constructor(t){this.categories=[],this.rootStore=t}}r([o({keepAlive:!0})],e.prototype,"categoryById",null),r([o],e.prototype,"seminarsCategory",null);export class Category{constructor(){this.entity={type:"category"}}}
@@ -38,13 +38,13 @@ export declare class EventItem {
38
38
  readonly speakers: Speaker[];
39
39
  readonly tracks: Track[];
40
40
  readonly entity: {
41
- readonly type: "event";
41
+ readonly type: 'event';
42
42
  };
43
43
  readonly slug: string;
44
44
  bookmarked: boolean;
45
45
  visited: boolean;
46
46
  constructor(id: number, externalId: string, boothId: number, name: string, description: string, startDate: string, endDate: string, logoFile?: string | undefined, speakers?: Speaker[], tracks?: Track[], entity?: {
47
- readonly type: "event";
47
+ readonly type: 'event';
48
48
  });
49
49
  get isEnded(): boolean;
50
50
  get hasSpeakers(): boolean;
@@ -1 +1 @@
1
- import{__esDecorate as o,__runInitializers as g}from"tslib";import{action as D,computed as d,observable as I}from"mobx";import{generateUniqueSlug as w}from"../tools/slug";let y=(()=>{let n=[],m,u,v,h,f,_,i,r,c,k,p;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;m=[d],u=[d],v=[d],h=[d],f=[d],_=[d],i=[d],r=[d],c=[d],k=[D],p=[D],o(this,null,m,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,n),o(this,null,u,{kind:"getter",name:"visited",static:!1,private:!1,access:{has:e=>"visited"in e,get:e=>e.visited},metadata:t},null,n),o(this,null,v,{kind:"getter",name:"tracks",static:!1,private:!1,access:{has:e=>"tracks"in e,get:e=>e.tracks},metadata:t},null,n),o(this,null,h,{kind:"getter",name:"venues",static:!1,private:!1,access:{has:e=>"venues"in e,get:e=>e.venues},metadata:t},null,n),o(this,null,f,{kind:"getter",name:"pastEvents",static:!1,private:!1,access:{has:e=>"pastEvents"in e,get:e=>e.pastEvents},metadata:t},null,n),o(this,null,_,{kind:"getter",name:"futureEvents",static:!1,private:!1,access:{has:e=>"futureEvents"in e,get:e=>e.futureEvents},metadata:t},null,n),o(this,null,i,{kind:"getter",name:"liveEvents",static:!1,private:!1,access:{has:e=>"liveEvents"in e,get:e=>e.liveEvents},metadata:t},null,n),o(this,null,r,{kind:"getter",name:"todayEvents",static:!1,private:!1,access:{has:e=>"todayEvents"in e,get:e=>e.todayEvents},metadata:t},null,n),o(this,null,c,{kind:"getter",name:"tomorrowEvents",static:!1,private:!1,access:{has:e=>"tomorrowEvents"in e,get:e=>e.tomorrowEvents},metadata:t},null,n),o(this,null,k,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,n),o(this,null,p,{kind:"method",name:"replaceVisited",static:!1,private:!1,access:{has:e=>"replaceVisited"in e,get:e=>e.replaceVisited},metadata:t},null,n),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=g(this,n);eventItems=[];constructor(t){this.rootStore=t}findByNameOrSlug(t){return this.eventItems.find(e=>e.name===t||e.slug===t||e.externalId===t)}get bookmarked(){return this.eventItems.filter(t=>t.bookmarked)}get visited(){return this.eventItems.filter(t=>t.visited)}get tracks(){const t=new Map;return this.eventItems.forEach(e=>{e.tracks.forEach(a=>{t.set(a.id,a)})}),Array.from(t.values()).sort((e,a)=>e.name.localeCompare(a.name))}getEventsByTrack(t){return this.eventItems.filter(e=>e.tracks.some(a=>a.id===t))}getEventsBySpeaker(t){return this.eventItems.filter(e=>e.speakers.some(a=>a.id===t))}get venues(){const t=new Map;return this.eventItems.forEach(e=>{if(e.boothId){const a=this.rootStore.boothStore.booths.find(l=>l.id===e.boothId);a&&t.set(a.id,a)}}),Array.from(t.values()).sort((e,a)=>e.name.localeCompare(a.name))}getEventsByVenue(t){return this.eventItems.filter(e=>e.boothId===t)}get pastEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.endDate)<t)}get futureEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.startDate)>t)}get liveEvents(){const t=new Date;return this.eventItems.filter(e=>{const a=new Date(e.startDate),l=new Date(e.endDate);return a<=t&&t<=l})}get todayEvents(){const t=new Date;return t.setHours(0,0,0,0),this.eventItems.filter(e=>{const a=new Date(e.startDate);return a.setHours(0,0,0,0),a.getTime()===t.getTime()})}get tomorrowEvents(){const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),this.eventItems.filter(e=>{const a=new Date(e.startDate);return a.setHours(0,0,0,0),a.getTime()===t.getTime()})}replaceBookmarked(t){const e=(t||[]).map(s=>this.eventItems.find(b=>b.id===s)).filter(s=>s),a=new Set(e),l=this.bookmarked.filter(s=>!a.has(s));for(const s of l)s.bookmarked=!1;for(const s of e)s.bookmarked=!0}replaceVisited(t){const e=(t||[]).map(s=>this.eventItems.find(b=>b.id===s)).filter(s=>s),a=new Set(e),l=this.visited.filter(s=>!a.has(s));for(const s of l)s.visited=!1;for(const s of e)s.visited=!0}}})();export default y;let S=(()=>{let n,m=[],u=[],v,h=[],f=[];return class{static{const i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[I],v=[I],o(null,null,n,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:r=>"bookmarked"in r,get:r=>r.bookmarked,set:(r,c)=>{r.bookmarked=c}},metadata:i},m,u),o(null,null,v,{kind:"field",name:"visited",static:!1,private:!1,access:{has:r=>"visited"in r,get:r=>r.visited,set:(r,c)=>{r.visited=c}},metadata:i},h,f),i&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}id;externalId;boothId;name;description;startDate;endDate;logoFile;speakers;tracks;entity;slug;bookmarked=g(this,m,!1);visited=(g(this,u),g(this,h,!1));constructor(i,r,c,k,p,E,t,e,a=[],l=[],s={type:"event"}){g(this,f),this.id=i,this.externalId=r,this.boothId=c,this.name=k,this.description=p,this.startDate=E,this.endDate=t,this.logoFile=e,this.speakers=a,this.tracks=l,this.entity=s,this.slug=w(k||`event-${i}`)}get isEnded(){return this.endDate&&new Date(this.endDate).getTime()<new Date().getTime()}get hasSpeakers(){return this.speakers.length>0}get hasTracks(){return this.tracks.length>0}get primaryTrack(){return this.tracks.length>0?this.tracks[0]:null}get speakerNames(){return this.speakers.map(i=>i.name).join(", ")}get trackNames(){return this.tracks.map(i=>i.name).join(", ")}}})();export{S as EventItem};
1
+ import{__decorate as o}from"tslib";import{action as m,computed as i,observable as u}from"mobx";import{generateUniqueSlug as k}from"../tools/slug";export default class n{constructor(t){this.eventItems=[],this.rootStore=t}findByNameOrSlug(t){return this.eventItems.find(e=>e.name===t||e.slug===t||e.externalId===t)}get bookmarked(){return this.eventItems.filter(t=>t.bookmarked)}get visited(){return this.eventItems.filter(t=>t.visited)}get tracks(){const t=new Map;return this.eventItems.forEach(e=>{e.tracks.forEach(r=>{t.set(r.id,r)})}),Array.from(t.values()).sort((e,r)=>e.name.localeCompare(r.name))}getEventsByTrack(t){return this.eventItems.filter(e=>e.tracks.some(r=>r.id===t))}getEventsBySpeaker(t){return this.eventItems.filter(e=>e.speakers.some(r=>r.id===t))}get venues(){const t=new Map;return this.eventItems.forEach(e=>{if(e.boothId){const r=this.rootStore.boothStore.booths.find(a=>a.id===e.boothId);r&&t.set(r.id,r)}}),Array.from(t.values()).sort((e,r)=>e.name.localeCompare(r.name))}getEventsByVenue(t){return this.eventItems.filter(e=>e.boothId===t)}get pastEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.endDate)<t)}get futureEvents(){const t=new Date;return this.eventItems.filter(e=>new Date(e.startDate)>t)}get liveEvents(){const t=new Date;return this.eventItems.filter(e=>{const r=new Date(e.startDate),a=new Date(e.endDate);return r<=t&&t<=a})}get todayEvents(){const t=new Date;return t.setHours(0,0,0,0),this.eventItems.filter(e=>{const r=new Date(e.startDate);return r.setHours(0,0,0,0),r.getTime()===t.getTime()})}get tomorrowEvents(){const t=new Date;return t.setDate(t.getDate()+1),t.setHours(0,0,0,0),this.eventItems.filter(e=>{const r=new Date(e.startDate);return r.setHours(0,0,0,0),r.getTime()===t.getTime()})}replaceBookmarked(t){const e=(t||[]).map(s=>this.eventItems.find(l=>l.id===s)).filter(s=>s),r=new Set(e),a=this.bookmarked.filter(s=>!r.has(s));for(const s of a)s.bookmarked=!1;for(const s of e)s.bookmarked=!0}replaceVisited(t){const e=(t||[]).map(s=>this.eventItems.find(l=>l.id===s)).filter(s=>s),r=new Set(e),a=this.visited.filter(s=>!r.has(s));for(const s of a)s.visited=!1;for(const s of e)s.visited=!0}}o([i],n.prototype,"bookmarked",null),o([i],n.prototype,"visited",null),o([i],n.prototype,"tracks",null),o([i],n.prototype,"venues",null),o([i],n.prototype,"pastEvents",null),o([i],n.prototype,"futureEvents",null),o([i],n.prototype,"liveEvents",null),o([i],n.prototype,"todayEvents",null),o([i],n.prototype,"tomorrowEvents",null),o([m],n.prototype,"replaceBookmarked",null),o([m],n.prototype,"replaceVisited",null);export class EventItem{constructor(t,e,r,a,s,l,p,d,v=[],c=[],f={type:"event"}){this.id=t,this.externalId=e,this.boothId=r,this.name=a,this.description=s,this.startDate=l,this.endDate=p,this.logoFile=d,this.speakers=v,this.tracks=c,this.entity=f,this.bookmarked=!1,this.visited=!1,this.slug=k(a||`event-${t}`)}get isEnded(){return this.endDate&&new Date(this.endDate).getTime()<new Date().getTime()}get hasSpeakers(){return this.speakers.length>0}get hasTracks(){return this.tracks.length>0}get primaryTrack(){return this.tracks.length>0?this.tracks[0]:null}get speakerNames(){return this.speakers.map(t=>t.name).join(", ")}get trackNames(){return this.tracks.map(t=>t.name).join(", ")}}o([u],EventItem.prototype,"bookmarked",void 0),o([u],EventItem.prototype,"visited",void 0);
@@ -78,7 +78,7 @@ export declare class Exhibitor implements Omit<RawExhibitor, 'categories' | 'boo
78
78
  readonly categories: Category[];
79
79
  readonly schedule: EventItem[];
80
80
  readonly entity: {
81
- readonly type: "exhibitor";
81
+ readonly type: 'exhibitor';
82
82
  };
83
83
  }
84
84
  //# sourceMappingURL=ExhibitorStore.d.ts.map
@@ -1 +1 @@
1
- import{__esDecorate as o,__runInitializers as s}from"tslib";import{action as R,computed as g,observable as h}from"mobx";import{buildRebookingUrl as C,getRebookingToken as U}from"../tools/rebookingUrl";import w from"../tools/settings";import q from"../utils/is-debug";export var RebookingState;(function(a){a[a.Unasked=0]="Unasked",a[a.Accepted=1]="Accepted",a[a.Rejected=2]="Rejected",a[a.Undecided=3]="Undecided"})(RebookingState||(RebookingState={}));let A=(()=>{let a=[],c,u=[],b=[],k,m=[],f=[],_,v=[],p=[],x,S,y,B,I,z,d,i,l,N;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;c=[h],k=[h],_=[h],x=[g({keepAlive:!0})],S=[g({keepAlive:!0})],y=[g({keepAlive:!0})],B=[g({keepAlive:!0})],I=[g],z=[g],d=[g({keepAlive:!0})],i=[R],l=[R],N=[R],o(this,null,x,{kind:"getter",name:"exhibitorById",static:!1,private:!1,access:{has:e=>"exhibitorById"in e,get:e=>e.exhibitorById},metadata:t},null,a),o(this,null,S,{kind:"getter",name:"exhibitorByExternalId",static:!1,private:!1,access:{has:e=>"exhibitorByExternalId"in e,get:e=>e.exhibitorByExternalId},metadata:t},null,a),o(this,null,y,{kind:"getter",name:"exhibitorByName",static:!1,private:!1,access:{has:e=>"exhibitorByName"in e,get:e=>e.exhibitorByName},metadata:t},null,a),o(this,null,B,{kind:"getter",name:"exhibitorBySlug",static:!1,private:!1,access:{has:e=>"exhibitorBySlug"in e,get:e=>e.exhibitorBySlug},metadata:t},null,a),o(this,null,I,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,a),o(this,null,z,{kind:"getter",name:"visited",static:!1,private:!1,access:{has:e=>"visited"in e,get:e=>e.visited},metadata:t},null,a),o(this,null,d,{kind:"getter",name:"advertised",static:!1,private:!1,access:{has:e=>"advertised"in e,get:e=>e.advertised},metadata:t},null,a),o(this,null,i,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,a),o(this,null,l,{kind:"method",name:"replaceVisited",static:!1,private:!1,access:{has:e=>"replaceVisited"in e,get:e=>e.replaceVisited},metadata:t},null,a),o(this,null,N,{kind:"method",name:"setRebookingState",static:!1,private:!1,access:{has:e=>"setRebookingState"in e,get:e=>e.setRebookingState},metadata:t},null,a),o(null,null,c,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,n)=>{e.highlightedByExternalIds=n}},metadata:t},u,b),o(null,null,k,{kind:"field",name:"rebookingStateChangeRequested",static:!1,private:!1,access:{has:e=>"rebookingStateChangeRequested"in e,get:e=>e.rebookingStateChangeRequested,set:(e,n)=>{e.rebookingStateChangeRequested=n}},metadata:t},m,f),o(null,null,_,{kind:"field",name:"rebookingStateSaved",static:!1,private:!1,access:{has:e=>"rebookingStateSaved"in e,get:e=>e.rebookingStateSaved,set:(e,n)=>{e.rebookingStateSaved=n}},metadata:t},v,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=s(this,a);exhibitors=[];timeout;constructor(t){s(this,p),this.rootStore=t}highlightedByExternalIds=s(this,u,[]);rebookingStateChangeRequested=(s(this,b),s(this,m,!1));rebookingStateSaved=(s(this,f),s(this,v,!1));get exhibitorById(){return new Map(this.exhibitors.map(t=>[t.id,t]))}get exhibitorByExternalId(){return new Map(this.exhibitors.map(t=>[t.externalId,t]))}get exhibitorByName(){return new Map(this.exhibitors.map(t=>[t.name.toLowerCase(),t]))}get exhibitorBySlug(){return new Map(this.exhibitors.map(t=>[t.slug,t]))}get bookmarked(){return this.exhibitors.filter(t=>t.bookmarked)}get visited(){return this.exhibitors.filter(t=>t.visited)}get advertised(){return this.exhibitors.filter(t=>t.advertise&&t.logo?.url)}replaceBookmarked(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.bookmarked.filter(r=>!n.has(r));for(const r of E)r.bookmarked=!1;for(const r of e)r.bookmarked=!0}replaceVisited(t){if(!Array.isArray(t))return;const e=(t||[]).map(r=>this.exhibitorById.get(r)).filter(r=>r),n=new Set(e),E=this.visited.filter(r=>!n.has(r));for(const r of E)r.visited=!1;for(const r of e)r.visited=!0}setRebookingState(t,e,n){clearTimeout(this.timeout),this.rebookingStateChangeRequested=!1,t.rebookingState=e,t.rebookingNote=n;const E=C("api/v1/set-rebooking-state",{rt:U(),expoKey:this.rootStore.fp.eventId});fetch(E,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoKey:w.EXPO,exhibitorId:t.id,rebookingState:e,rebookingNote:n})}).then(r=>{r.ok&&(this.rebookingStateSaved=!0),!r.ok&&!q&&(t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1)}).catch(()=>{t.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1}).finally(()=>{this.rebookingStateChangeRequested=!0,this.timeout=setTimeout(()=>{this.rebookingStateChangeRequested=!1},5e3)})}findExhibitor(t){return this.exhibitorByExternalId.get(t)||this.exhibitorByName.get(t.toLowerCase())||this.exhibitorBySlug.get(t)}}})();export default A;let T=(()=>{let a,c=[],u=[],b,k=[],m=[],f,_=[],v=[],p,x=[],S=[],y,B=[],I=[];return class{static{const d=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;a=[h],b=[h],f=[h],p=[h],y=[h],o(null,null,a,{kind:"field",name:"featured",static:!1,private:!1,access:{has:i=>"featured"in i,get:i=>i.featured,set:(i,l)=>{i.featured=l}},metadata:d},c,u),o(null,null,b,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:i=>"bookmarked"in i,get:i=>i.bookmarked,set:(i,l)=>{i.bookmarked=l}},metadata:d},k,m),o(null,null,f,{kind:"field",name:"visited",static:!1,private:!1,access:{has:i=>"visited"in i,get:i=>i.visited,set:(i,l)=>{i.visited=l}},metadata:d},_,v),o(null,null,p,{kind:"field",name:"rebookingState",static:!1,private:!1,access:{has:i=>"rebookingState"in i,get:i=>i.rebookingState,set:(i,l)=>{i.rebookingState=l}},metadata:d},x,S),o(null,null,y,{kind:"field",name:"rebookingNote",static:!1,private:!1,access:{has:i=>"rebookingNote"in i,get:i=>i.rebookingNote,set:(i,l)=>{i.rebookingNote=l}},metadata:d},B,I),d&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d})}store;id;name;externalId;featured=s(this,c,void 0);advertise=s(this,u);description;address;address2;city;state;zip;country;phone1;website;facebook;instagram;linkedin;twitter;googlePlus;xing;youtube;email;privateEmail;customButtonTitle;customButtonUrl;customButton2Title;customButton2Url;customButton3Title;customButton3Url;leadingImageUrl;leadingImageLinkUrl;videoUrl;order;logo;logoInBooth;gallery;marketMaterials;slug;bookmarked=s(this,k,void 0);visited=(s(this,m),s(this,_,void 0));rebookingState=(s(this,v),s(this,x,void 0));rebookingNote=(s(this,S),s(this,B,void 0));booths=s(this,I);categories;schedule;entity={type:"exhibitor"}}})();export{T as Exhibitor};
1
+ import{__decorate as o}from"tslib";import{action as h,computed as n,observable as a}from"mobx";import{buildRebookingUrl as l,getRebookingToken as u}from"../tools/rebookingUrl";import b from"../tools/settings";import g from"../utils/is-debug";export var RebookingState;(function(r){r[r.Unasked=0]="Unasked",r[r.Accepted=1]="Accepted",r[r.Rejected=2]="Rejected",r[r.Undecided=3]="Undecided"})(RebookingState||(RebookingState={}));export default class i{constructor(e){this.exhibitors=[],this.highlightedByExternalIds=[],this.rebookingStateChangeRequested=!1,this.rebookingStateSaved=!1,this.rootStore=e}get exhibitorById(){return new Map(this.exhibitors.map(e=>[e.id,e]))}get exhibitorByExternalId(){return new Map(this.exhibitors.map(e=>[e.externalId,e]))}get exhibitorByName(){return new Map(this.exhibitors.map(e=>[e.name.toLowerCase(),e]))}get exhibitorBySlug(){return new Map(this.exhibitors.map(e=>[e.slug,e]))}get bookmarked(){return this.exhibitors.filter(e=>e.bookmarked)}get visited(){return this.exhibitors.filter(e=>e.visited)}get advertised(){return this.exhibitors.filter(e=>e.advertise&&e.logo?.url)}replaceBookmarked(e){if(!Array.isArray(e))return;const s=(e||[]).map(t=>this.exhibitorById.get(t)).filter(t=>t),d=new Set(s),p=this.bookmarked.filter(t=>!d.has(t));for(const t of p)t.bookmarked=!1;for(const t of s)t.bookmarked=!0}replaceVisited(e){if(!Array.isArray(e))return;const s=(e||[]).map(t=>this.exhibitorById.get(t)).filter(t=>t),d=new Set(s),p=this.visited.filter(t=>!d.has(t));for(const t of p)t.visited=!1;for(const t of s)t.visited=!0}setRebookingState(e,s,d){clearTimeout(this.timeout),this.rebookingStateChangeRequested=!1,e.rebookingState=s,e.rebookingNote=d;const p=l("api/v1/set-rebooking-state",{rt:u(),expoKey:this.rootStore.fp.eventId});fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoKey:b.EXPO,exhibitorId:e.id,rebookingState:s,rebookingNote:d})}).then(t=>{t.ok&&(this.rebookingStateSaved=!0),!t.ok&&!g&&(e.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1)}).catch(()=>{e.rebookingState=RebookingState.Unasked,this.rebookingStateSaved=!1}).finally(()=>{this.rebookingStateChangeRequested=!0,this.timeout=setTimeout(()=>{this.rebookingStateChangeRequested=!1},5e3)})}findExhibitor(e){return this.exhibitorByExternalId.get(e)||this.exhibitorByName.get(e.toLowerCase())||this.exhibitorBySlug.get(e)}}o([a],i.prototype,"highlightedByExternalIds",void 0),o([a],i.prototype,"rebookingStateChangeRequested",void 0),o([a],i.prototype,"rebookingStateSaved",void 0),o([n({keepAlive:!0})],i.prototype,"exhibitorById",null),o([n({keepAlive:!0})],i.prototype,"exhibitorByExternalId",null),o([n({keepAlive:!0})],i.prototype,"exhibitorByName",null),o([n({keepAlive:!0})],i.prototype,"exhibitorBySlug",null),o([n],i.prototype,"bookmarked",null),o([n],i.prototype,"visited",null),o([n({keepAlive:!0})],i.prototype,"advertised",null),o([h],i.prototype,"replaceBookmarked",null),o([h],i.prototype,"replaceVisited",null),o([h],i.prototype,"setRebookingState",null);export class Exhibitor{constructor(){this.entity={type:"exhibitor"}}}o([a],Exhibitor.prototype,"featured",void 0),o([a],Exhibitor.prototype,"bookmarked",void 0),o([a],Exhibitor.prototype,"visited",void 0),o([a],Exhibitor.prototype,"rebookingState",void 0),o([a],Exhibitor.prototype,"rebookingNote",void 0);
@@ -1 +1 @@
1
- import{__esDecorate as l,__runInitializers as s}from"tslib";import{observable as a,runInAction as c}from"mobx";let u=(()=>{let i,t=[],r=[];return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[a],l(null,null,i,{kind:"field",name:"engine",static:!1,private:!1,access:{has:n=>"engine"in n,get:n=>n.engine,set:(n,o)=>{n.engine=o}},metadata:e},t,r),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}keys;engine=s(this,t,void 0);enginePromise=(s(this,r),null);lastCollection=null;constructor(e){this.keys=e}loadEngine(){return this.enginePromise||(this.enginePromise=this.buildEngine()),this.enginePromise}async buildEngine(){try{const{default:e}=await import("fuse.js");c(()=>{this.engine=new e([],{keys:this.keys,ignoreFieldNorm:!0,includeScore:!0,threshold:.3,ignoreLocation:!0})})}catch(e){console.error(e),this.enginePromise=null}}search(e,n){return!this.engine||!e?.length||!n?[]:(this.lastCollection!==e&&(this.engine.setCollection(e),this.lastCollection=e),this.engine.search(n))}}})();export default u;
1
+ import{__decorate as t}from"tslib";import{observable as r,runInAction as o}from"mobx";export default class n{constructor(e){this.keys=e,this.enginePromise=null,this.lastCollection=null}loadEngine(){return this.enginePromise||(this.enginePromise=this.buildEngine()),this.enginePromise}async buildEngine(){try{const{default:e}=await import("fuse.js");o(()=>{this.engine=new e([],{keys:this.keys,ignoreFieldNorm:!0,includeScore:!0,threshold:.3,ignoreLocation:!0})})}catch(e){console.error(e),this.enginePromise=null}}search(e,i){return!this.engine||!e?.length||!i?[]:(this.lastCollection!==e&&(this.engine.setCollection(e),this.lastCollection=e),this.engine.search(i))}}t([r],n.prototype,"engine",void 0);
@@ -31,7 +31,7 @@ export declare class HeatmapYah {
31
31
  readonly y: number;
32
32
  readonly z?: number | string | undefined;
33
33
  readonly entity: {
34
- readonly type: "heatmap-yah";
34
+ readonly type: 'heatmap-yah';
35
35
  };
36
36
  constructor(id: number | string, name: string, viewCount: number, x: number, y: number, z?: number | string | undefined);
37
37
  }
@@ -1 +1 @@
1
- import{__esDecorate as C,__runInitializers as p}from"tslib";import{computed as d}from"mobx";import y from"color";import k from"../tools/settings";import{getColorFromGradient as x}from"../utils/color-gradient";import{BoothBase as g}from"./BoothStore";import{Category as v}from"./CategoryStore";import{EventItem as B}from"./EventStore";import{Exhibitor as c}from"./ExhibitorStore";let b=(()=>{let s=[],r;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d({keepAlive:!0})],C(this,null,r,{kind:"getter",name:"minAndMaxClicks",static:!1,private:!1,access:{has:e=>"minAndMaxClicks"in e,get:e=>e.minAndMaxClicks},metadata:t},null,s),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}heatmapData=(p(this,s),{});forceTrack=null;get minAndMaxClicks(){const{booths:t=[],exhibitors:e=[],yah:i=[]}=this.heatmapData,o=[...t,...e,...i];if(o.length===0)return{min:0,max:0};const h=l=>l.reduce((n,a)=>(a.viewCount>n.max&&(n.max=a.viewCount),a.viewCount<n.min&&(n.min=a.viewCount),n),{min:l[0].viewCount,max:l[0].viewCount}),{min:u,max:f}=h(o);return{min:u,max:f}}getClicksByType(t){return t instanceof v?-1:t instanceof c?this.getClicksByItem(t):t instanceof HeatmapYah?this.getClicksByItem(t):t instanceof B?0:this.getClicksByItem(t)}getClicksByItem(t){return t instanceof c?this.heatmapData?.exhibitors?.find(e=>e.id===t.id)?.viewCount||0:t instanceof g?this.heatmapData?.booths?.find(e=>e.id===t.id)?.viewCount||0:t instanceof HeatmapYah&&this.heatmapData?.yah?.find(e=>e.id===t.id)?.viewCount||0}getTotalClicksByBooth(t){let e=this.getClicksByItem(t);for(const i of t.exhibitors){const o=this.getClicksByItem(i);e+=o}return e}getColorByClicks(t){const{min:e,max:i}=this.minAndMaxClicks;return x(t,e,i,k.heatmapColors)}getHeatmapColorForBooth(t){const e=this.getTotalClicksByBooth(t);return y(this.getColorByClicks(e))}}})();export default b;export class HeatmapYah{id;name;viewCount;x;y;z;entity={type:"heatmap-yah"};constructor(r,m,t,e,i,o){this.id=r,this.name=m,this.viewCount=t,this.x=e,this.y=i,this.z=o}}
1
+ import{__decorate as f}from"tslib";import C from"color";import{computed as p}from"mobx";import y from"../tools/settings";import{getColorFromGradient as k}from"../utils/color-gradient";import{BoothBase as g}from"./BoothStore";import{Category as x}from"./CategoryStore";import{EventItem as d}from"./EventStore";import{Exhibitor as l}from"./ExhibitorStore";export default class m{constructor(){this.heatmapData={},this.forceTrack=null}get minAndMaxClicks(){const{booths:t=[],exhibitors:i=[],yah:o=[]}=this.heatmapData,e=[...t,...i,...o];if(e.length===0)return{min:0,max:0};const s=h=>h.reduce((r,n)=>(n.viewCount>r.max&&(r.max=n.viewCount),n.viewCount<r.min&&(r.min=n.viewCount),r),{min:h[0].viewCount,max:h[0].viewCount}),{min:a,max:u}=s(e);return{min:a,max:u}}getClicksByType(t){return t instanceof x?-1:t instanceof l?this.getClicksByItem(t):t instanceof HeatmapYah?this.getClicksByItem(t):t instanceof d?0:this.getClicksByItem(t)}getClicksByItem(t){return t instanceof l?this.heatmapData?.exhibitors?.find(i=>i.id===t.id)?.viewCount||0:t instanceof g?this.heatmapData?.booths?.find(i=>i.id===t.id)?.viewCount||0:t instanceof HeatmapYah&&this.heatmapData?.yah?.find(i=>i.id===t.id)?.viewCount||0}getTotalClicksByBooth(t){let i=this.getClicksByItem(t);for(const o of t.exhibitors){const e=this.getClicksByItem(o);i+=e}return i}getColorByClicks(t){const{min:i,max:o}=this.minAndMaxClicks;return k(t,i,o,y.heatmapColors)}getHeatmapColorForBooth(t){const i=this.getTotalClicksByBooth(t);return C(this.getColorByClicks(i))}}f([p({keepAlive:!0})],m.prototype,"minAndMaxClicks",null);export class HeatmapYah{constructor(t,i,o,e,s,a){this.id=t,this.name=i,this.viewCount=o,this.x=e,this.y=s,this.z=a,this.entity={type:"heatmap-yah"}}}
@@ -1 +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;
1
+ import{__decorate as e}from"tslib";import{action as n,observable as r}from"mobx";export default class t{constructor(){this.enabled=!1,this.unreadCount=0}setEnabled(o){this.enabled=o}setUnreadCount(o){this.unreadCount=o}}e([r],t.prototype,"enabled",void 0),e([r],t.prototype,"unreadCount",void 0),e([n],t.prototype,"setEnabled",null),e([n],t.prototype,"setUnreadCount",null);
@@ -1 +1 @@
1
- import{__esDecorate as l,__runInitializers as d}from"tslib";import{getFpSvgJs as j}from"../data/fp-payloads";import{Box as W}from"@expofp/geometry";import{action as g,computed as h,observable as m,runInAction as D}from"mobx";import B from"../components/Map/drawing/config/config-load-layer";import N from"../tools/settings";import{areLayersEnabled as U}from"../utils/areLayersEnabled";import{shortenName as H}from"../utils/shortenName";import s from".";const X=["money2020usa","rodion2","possible2025","2025virtuosotravelweek","zscalerskofy26","gamescom2025"];export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));let C=(()=>{let i,y=[],p=[],v,b=[],_=[];return class{static{const c=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[m],v=[m],l(null,null,i,{kind:"field",name:"loaded",static:!1,private:!1,access:{has:n=>"loaded"in n,get:n=>n.loaded,set:(n,u)=>{n.loaded=u}},metadata:c},y,p),l(null,null,v,{kind:"field",name:"visible",static:!1,private:!1,access:{has:n=>"visible"in n,get:n=>n.visible,set:(n,u)=>{n.visible=u}},metadata:c},b,_),c&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:c})}basePriority;name;description;frozen;rect=null;viewbox=null;configured;childLayers=[];rootParent=null;mode;children=[];pathway;floorIndex;loaded=d(this,y,void 0);visible=(d(this,p),d(this,b,void 0));get shortName(){return H(this.description)}constructor(){d(this,_)}}})();export{C as Layer};let q=(()=>{let i=[],y,p=[],v=[],b,_=[],w=[],c,n=[],u=[],L,x=[],S=[],k,P,T,R,V,I,z,A,E,F;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;y=[m],b=[m],c=[m],L=[m],k=[h({keepAlive:!0})],P=[h({keepAlive:!0})],T=[h({keepAlive:!0})],R=[h({keepAlive:!0})],V=[h],I=[h],z=[g],A=[g],E=[g],F=[g],l(this,null,k,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,i),l(this,null,P,{kind:"getter",name:"loaded",static:!1,private:!1,access:{has:e=>"loaded"in e,get:e=>e.loaded},metadata:t},null,i),l(this,null,T,{kind:"getter",name:"rectangle",static:!1,private:!1,access:{has:e=>"rectangle"in e,get:e=>e.rectangle},metadata:t},null,i),l(this,null,R,{kind:"getter",name:"viewboxRectangle",static:!1,private:!1,access:{has:e=>"viewboxRectangle"in e,get:e=>e.viewboxRectangle},metadata:t},null,i),l(this,null,V,{kind:"getter",name:"pathwayLayers",static:!1,private:!1,access:{has:e=>"pathwayLayers"in e,get:e=>e.pathwayLayers},metadata:t},null,i),l(this,null,I,{kind:"getter",name:"floors",static:!1,private:!1,access:{has:e=>"floors"in e,get:e=>e.floors},metadata:t},null,i),l(this,null,z,{kind:"method",name:"selectFloor",static:!1,private:!1,access:{has:e=>"selectFloor"in e,get:e=>e.selectFloor},metadata:t},null,i),l(this,null,A,{kind:"method",name:"updateVisibility",static:!1,private:!1,access:{has:e=>"updateVisibility"in e,get:e=>e.updateVisibility},metadata:t},null,i),l(this,null,E,{kind:"method",name:"showPathWay",static:!1,private:!1,access:{has:e=>"showPathWay"in e,get:e=>e.showPathWay},metadata:t},null,i),l(this,null,F,{kind:"method",name:"hidePathways",static:!1,private:!1,access:{has:e=>"hidePathways"in e,get:e=>e.hidePathways},metadata:t},null,i),l(null,null,y,{kind:"field",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers,set:(e,a)=>{e.layers=a}},metadata:t},p,v),l(null,null,b,{kind:"field",name:"defaultLayer",static:!1,private:!1,access:{has:e=>"defaultLayer"in e,get:e=>e.defaultLayer,set:(e,a)=>{e.defaultLayer=a}},metadata:t},_,w),l(null,null,c,{kind:"field",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode,set:(e,a)=>{e.mode=a}},metadata:t},n,u),l(null,null,L,{kind:"field",name:"layersLoaded",static:!1,private:!1,access:{has:e=>"layersLoaded"in e,get:e=>e.layersLoaded,set:(e,a)=>{e.layersLoaded=a}},metadata:t},x,S),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}layers=(d(this,i),d(this,p,[]));defaultLayer=(d(this,v),d(this,_,void 0));mode=(d(this,w),d(this,n,void 0));layersLoaded=(d(this,u),d(this,x,!1));updateVisibilityTimeout=(d(this,S),0);selectFloorTimeout=0;get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(e=>!e.frozen).map(e=>e.viewbox??e.rect);return this.mode!==LayersMode.Radio||!t.length?null:W.fromUnion(...t)||null}get viewboxRectangle(){var t=this.visible.filter(e=>!e.frozen&&e.viewbox).map(e=>e.viewbox);return t.length&&W.fromUnion(...t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!U())return[];const t=new Set(this.layers.filter(a=>a&&!a.frozen&&!a.rootParent&&!a.pathway).concat(s.routeStore.layers.filter(a=>a&&a.mode!==LayerMode.AlwaysHidden&&a.mode!==LayerMode.AlwaysVisible))),e=Array.from(t).reverse();return e.map((a,r)=>{const o=s.routeStore.layers.length>0&&s.routeStore.layers.indexOf(a)===-1,f=s.toursStore.tourLayers.length>0&&s.toursStore.tourLayers.indexOf(a)===-1;return{layer:a,name:a.name,shortName:a.shortName,description:a.description,active:a.visible,disabled:!!(o||f),index:a.floorIndex??e.length-r-1}})}selectFloor(t){if(this.selectFloorTimeout)return;this.selectFloorTimeout=setTimeout(()=>this.selectFloorTimeout=0,500);const e=this.layers.find(r=>r.description===t.description);if(!e)return;if(this.mode===LayersMode.Radio){if(this.updateVisibility(e,!0),s.maplibreStore.showMaplibre)return;if(!!j().__fpSettings?.fpVer||X.includes(N.EXPO)){const o=e.viewbox??e.rect;s.uiState.moveToRect=o}else{const o=this.layers.indexOf(this.layers.filter(O=>!O.frozen&&O.visible)[0]),f=this.layers.indexOf(e);if(o===f)return;s.uiState.zoomBy=f<o?.95:1.05}}else this.updateVisibility(e,!e.visible);const a=s.toursStore.getTourLayerInfo(e.name)||s.toursStore.getTourLayerInfo(e.description);if(a){this.showPathWay(a.id);return}s.toursStore.stopTour()}updateVisibility(t,e){if(this.mode===LayersMode.Radio&&!e)return;const a=t instanceof C?t:this.findLayer(t);if(!a||a.visible===e){a&&s.routeStore.currentRouteLayer!==a&&(s.routeStore.currentRouteLayer=a);return}B(a,s.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(r=>!r.pathway).forEach(r=>{r.name!==a.name&&!r.frozen&&r.visible&&(r.visible=!1,r.childLayers.forEach(o=>{o.visible=!1}))}),a&&(a.visible=e,a.childLayers.forEach(r=>{r.visible=e}),e&&(s.routeStore.currentRouteLayer=a),typeof s.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const r=s.fp.getFloors();s.fp.onFloorActivated(r.find(o=>o.name===a.name))})))})}findLayer(t){if(t==null)return null;const e=this.layers.filter(r=>!r.rootParent);if(typeof t=="number"&&(a=e.filter(r=>!r.frozen)[t],a))return a;t=t.toString().toLowerCase();var a=e.find(r=>{const o=(r.name.match(/(-?[0-9]+)/)||"")[0];return t===r?.name.toLowerCase()||t===r?.description.toLowerCase()||t===r?.shortName.toLowerCase()||t===o});return!a&&!/\D/.test(t)&&(a=e.filter(r=>!r.frozen)[parseInt(t)]),a}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const e=this.findLayer(t);if(!e)throw new Error(`There is no pathway with this name. ${t}`);await B(e,s.rendererService);const a=this.getPathwayList();D(()=>{a.forEach(r=>{const o=r.name===t;r.visible=o,r.childLayers.forEach(f=>{f.visible=o})})})}catch(e){console.error("showPathWay",e)}}hidePathways(){this.getPathwayList().forEach(e=>{e.visible=!1,e.childLayers.forEach(a=>{a.visible=!1})})}}})();export default q;
1
+ import{__decorate as a}from"tslib";import{Box as y}from"@expofp/geometry";import{action as c,computed as f,observable as h,runInAction as m}from"mobx";import d from"../components/Map/drawing/config/config-load-layer";import{getFpSvgJs as v}from"../data/fp-payloads";import w from"../tools/settings";import{areLayersEnabled as b}from"../utils/areLayersEnabled";import{shortenName as g}from"../utils/shortenName";import s from".";const S=["money2020usa","rodion2","possible2025","2025virtuosotravelweek","zscalerskofy26","gamescom2025"];export var LayersMode;(function(i){i[i.Default=0]="Default",i[i.Separated=1]="Separated",i[i.Radio=2]="Radio",i[i.CheckBox=3]="CheckBox"})(LayersMode||(LayersMode={}));export var LayerMode;(function(i){i[i.Unset=0]="Unset",i[i.AlwaysVisible=1]="AlwaysVisible",i[i.AlwaysHidden=2]="AlwaysHidden",i[i.TurnedOn=3]="TurnedOn",i[i.TurnedOff=4]="TurnedOff"})(LayerMode||(LayerMode={}));export class Layer{constructor(){this.rect=null,this.viewbox=null,this.childLayers=[],this.rootParent=null,this.children=[]}get shortName(){return g(this.description)}}a([h],Layer.prototype,"loaded",void 0),a([h],Layer.prototype,"visible",void 0);export default class l{constructor(){this.layers=[],this.layersLoaded=!1,this.updateVisibilityTimeout=0,this.selectFloorTimeout=0}get visible(){return this.layers.filter(t=>t.frozen||t.visible)}get loaded(){return this.layers.filter(t=>t.loaded)}get rectangle(){var t=this.visible.filter(r=>!r.frozen).map(r=>r.viewbox??r.rect);return this.mode!==LayersMode.Radio||!t.length?null:y.fromUnion(...t)||null}get viewboxRectangle(){var t=this.visible.filter(r=>!r.frozen&&r.viewbox).map(r=>r.viewbox);return t.length&&y.fromUnion(...t)||null}get pathwayLayers(){return this.layers.filter(t=>t.pathway)}get floors(){if(!b())return[];const t=new Set(this.layers.filter(e=>e&&!e.frozen&&!e.rootParent&&!e.pathway).concat(s.routeStore.layers.filter(e=>e&&e.mode!==LayerMode.AlwaysHidden&&e.mode!==LayerMode.AlwaysVisible))),r=Array.from(t).reverse();return r.map((e,o)=>{const n=s.routeStore.layers.length>0&&s.routeStore.layers.indexOf(e)===-1,u=s.toursStore.tourLayers.length>0&&s.toursStore.tourLayers.indexOf(e)===-1;return{layer:e,name:e.name,shortName:e.shortName,description:e.description,active:e.visible,disabled:!!(n||u),index:e.floorIndex??r.length-o-1}})}selectFloor(t){if(this.selectFloorTimeout)return;this.selectFloorTimeout=setTimeout(()=>this.selectFloorTimeout=0,500);const r=this.layers.find(o=>o.description===t.description);if(!r)return;if(this.mode===LayersMode.Radio){if(this.updateVisibility(r,!0),s.maplibreStore.showMaplibre)return;if(!!v().__fpSettings?.fpVer||S.includes(w.EXPO)){const n=r.viewbox??r.rect;s.uiState.moveToRect=n}else{const n=this.layers.indexOf(this.layers.filter(p=>!p.frozen&&p.visible)[0]),u=this.layers.indexOf(r);if(n===u)return;s.uiState.zoomBy=u<n?.95:1.05}}else this.updateVisibility(r,!r.visible);const e=s.toursStore.getTourLayerInfo(r.name)||s.toursStore.getTourLayerInfo(r.description);if(e){this.showPathWay(e.id);return}s.toursStore.stopTour()}updateVisibility(t,r){if(this.mode===LayersMode.Radio&&!r)return;const e=t instanceof Layer?t:this.findLayer(t);if(!e||e.visible===r){e&&s.routeStore.currentRouteLayer!==e&&(s.routeStore.currentRouteLayer=e);return}d(e,s.rendererService).then(()=>{this.mode===LayersMode.Radio&&this.layers.filter(o=>!o.pathway).forEach(o=>{o.name!==e.name&&!o.frozen&&o.visible&&(o.visible=!1,o.childLayers.forEach(n=>{n.visible=!1}))}),e&&(e.visible=r,e.childLayers.forEach(o=>{o.visible=r}),r&&(s.routeStore.currentRouteLayer=e),typeof s.fp.onFloorActivated=="function"&&(clearTimeout(this.updateVisibilityTimeout),this.updateVisibilityTimeout=setTimeout(()=>{const o=s.fp.getFloors();s.fp.onFloorActivated(o.find(n=>n.name===e.name))})))})}findLayer(t){if(t==null)return null;const r=this.layers.filter(o=>!o.rootParent);if(typeof t=="number"&&(e=r.filter(o=>!o.frozen)[t],e))return e;t=t.toString().toLowerCase();var e=r.find(o=>{const n=(o.name.match(/(-?[0-9]+)/)||"")[0];return t===o?.name.toLowerCase()||t===o?.description.toLowerCase()||t===o?.shortName.toLowerCase()||t===n});return!e&&!/\D/.test(t)&&(e=r.filter(o=>!o.frozen)[parseInt(t)]),e}getPathwayList(){return this.layers.filter(t=>t.pathway)}async showPathWay(t){try{const r=this.findLayer(t);if(!r)throw new Error(`There is no pathway with this name. ${t}`);await d(r,s.rendererService);const e=this.getPathwayList();m(()=>{e.forEach(o=>{const n=o.name===t;o.visible=n,o.childLayers.forEach(u=>{u.visible=n})})})}catch(r){console.error("showPathWay",r)}}hidePathways(){this.getPathwayList().forEach(r=>{r.visible=!1,r.childLayers.forEach(e=>{e.visible=!1})})}}a([h],l.prototype,"layers",void 0),a([h],l.prototype,"defaultLayer",void 0),a([h],l.prototype,"mode",void 0),a([h],l.prototype,"layersLoaded",void 0),a([f({keepAlive:!0})],l.prototype,"visible",null),a([f({keepAlive:!0})],l.prototype,"loaded",null),a([f({keepAlive:!0})],l.prototype,"rectangle",null),a([f({keepAlive:!0})],l.prototype,"viewboxRectangle",null),a([f],l.prototype,"pathwayLayers",null),a([f],l.prototype,"floors",null),a([c],l.prototype,"selectFloor",null),a([c],l.prototype,"updateVisibility",null),a([c],l.prototype,"showPathWay",null),a([c],l.prototype,"hidePathways",null);
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as l}from"tslib";import{action as d,computed as r,observable as o}from"mobx";import n from"../data";import{fpGeo as y}from"../data/fpGeo";const I=import.meta.env?.VITE_EXPOFP_DISABLE_3D_TOGGLE!=="false";function z(){return typeof window>"u"||window.navigator.onLine}let B=(()=>{let a=[],p,m=[],c=[],h,f=[],u=[],b,M=[],w=[],_,v,g,O,S,V,E,k;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;p=[o],h=[o],b=[o],_=[d],v=[d],g=[d],O=[r({keepAlive:!0})],S=[r({keepAlive:!0})],V=[r({keepAlive:!0})],E=[r({keepAlive:!0})],k=[r({keepAlive:!0})],i(this,null,_,{kind:"method",name:"setOnline",static:!1,private:!1,access:{has:e=>"setOnline"in e,get:e=>e.setOnline},metadata:t},null,a),i(this,null,v,{kind:"method",name:"activateMaplibre",static:!1,private:!1,access:{has:e=>"activateMaplibre"in e,get:e=>e.activateMaplibre},metadata:t},null,a),i(this,null,g,{kind:"method",name:"deactivateMaplibre",static:!1,private:!1,access:{has:e=>"deactivateMaplibre"in e,get:e=>e.deactivateMaplibre},metadata:t},null,a),i(this,null,O,{kind:"getter",name:"hideModeSwitchButton",static:!1,private:!1,access:{has:e=>"hideModeSwitchButton"in e,get:e=>e.hideModeSwitchButton},metadata:t},null,a),i(this,null,S,{kind:"getter",name:"maplibreEnabled",static:!1,private:!1,access:{has:e=>"maplibreEnabled"in e,get:e=>e.maplibreEnabled},metadata:t},null,a),i(this,null,V,{kind:"getter",name:"useMaplibreMap",static:!1,private:!1,access:{has:e=>"useMaplibreMap"in e,get:e=>e.useMaplibreMap},metadata:t},null,a),i(this,null,E,{kind:"getter",name:"showMaplibre",static:!1,private:!1,access:{has:e=>"showMaplibre"in e,get:e=>e.showMaplibre},metadata:t},null,a),i(this,null,k,{kind:"getter",name:"isMap3d",static:!1,private:!1,access:{has:e=>"isMap3d"in e,get:e=>e.isMap3d},metadata:t},null,a),i(null,null,p,{kind:"field",name:"mapViewMode",static:!1,private:!1,access:{has:e=>"mapViewMode"in e,get:e=>e.mapViewMode,set:(e,s)=>{e.mapViewMode=s}},metadata:t},m,c),i(null,null,h,{kind:"field",name:"maplibreSelected",static:!1,private:!1,access:{has:e=>"maplibreSelected"in e,get:e=>e.maplibreSelected,set:(e,s)=>{e.maplibreSelected=s}},metadata:t},f,u),i(null,null,b,{kind:"field",name:"isOnline",static:!1,private:!1,access:{has:e=>"isOnline"in e,get:e=>e.isOnline,set:(e,s)=>{e.isOnline=s}},metadata:t},M,w),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,a);mapViewMode=l(this,m,"floorplan");maplibreSelected=(l(this,c),l(this,f,!1));isOnline=(l(this,u),l(this,M,z()));handleOnline=(l(this,w),()=>this.setOnline(!0));handleOffline=()=>this.setOnline(!1);constructor(t){this.rootStore=t,this.mapViewMode=this.getInitialViewMode(),this.maplibreSelected=this.mapViewMode!=="floorplan",typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}dispose(){typeof window>"u"||(window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline))}setOnline(t){this.isOnline=t}activateMaplibre(){this.maplibreEnabled&&(this.mapViewMode=n.allow3dView&&this.mapViewMode!=="map3d"?"map3d":"map2d",this.maplibreSelected=!0)}deactivateMaplibre(){this.mapViewMode="floorplan",this.maplibreSelected=!1}get hideModeSwitchButton(){return!this.maplibreEnabled||!n.allow3dView||I||n.hideModeSwitchButton}get maplibreEnabled(){const t=this.rootStore.fp?.maplibre??window.__efpMaplibre,e=!!t?.offline&&(!!t.style||!!t.styleUrl);return this.useMaplibreMap&&!!y?.properties?.config&&!this.rootStore.uiState.kiosk&&(this.isOnline||e)}get useMaplibreMap(){return!!n.enableExperimentalMaplibre}get showMaplibre(){return this.maplibreEnabled&&(this.mapViewMode==="map2d"||this.mapViewMode==="map3d")}get isMap3d(){return this.maplibreEnabled&&this.mapViewMode==="map3d"}getInitialViewMode(){return this.maplibreEnabled?n.allow3dView&&!n.hide3dMapDefault?"map3d":"map2d":"floorplan"}}})();export default B;
1
+ import{__decorate as i}from"tslib";import{action as n,computed as o,observable as a}from"mobx";import l from"../data";import{fpGeo as r}from"../data/fpGeo";const d=import.meta.env?.VITE_EXPOFP_DISABLE_3D_TOGGLE!=="false";function s(){return typeof window>"u"||window.navigator.onLine}export default class e{constructor(t){this.mapViewMode="floorplan",this.maplibreSelected=!1,this.isOnline=s(),this.handleOnline=()=>this.setOnline(!0),this.handleOffline=()=>this.setOnline(!1),this.rootStore=t,this.mapViewMode=this.getInitialViewMode(),this.maplibreSelected=this.mapViewMode!=="floorplan",typeof window<"u"&&(window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline))}dispose(){typeof window>"u"||(window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline))}setOnline(t){this.isOnline=t}activateMaplibre(){this.maplibreEnabled&&(this.mapViewMode=l.allow3dView&&this.mapViewMode!=="map3d"?"map3d":"map2d",this.maplibreSelected=!0)}deactivateMaplibre(){this.mapViewMode="floorplan",this.maplibreSelected=!1}get hideModeSwitchButton(){return!this.maplibreEnabled||!l.allow3dView||d||l.hideModeSwitchButton}get maplibreEnabled(){const t=this.rootStore.fp?.maplibre??window.__efpMaplibre,p=!!t?.offline&&(!!t.style||!!t.styleUrl);return this.useMaplibreMap&&!!r?.properties?.config&&!this.rootStore.uiState.kiosk&&(this.isOnline||p)}get useMaplibreMap(){return!!l.enableExperimentalMaplibre}get showMaplibre(){return this.maplibreEnabled&&(this.mapViewMode==="map2d"||this.mapViewMode==="map3d")}get isMap3d(){return this.maplibreEnabled&&this.mapViewMode==="map3d"}getInitialViewMode(){return this.maplibreEnabled?l.allow3dView&&!l.hide3dMapDefault?"map3d":"map2d":"floorplan"}}i([a],e.prototype,"mapViewMode",void 0),i([a],e.prototype,"maplibreSelected",void 0),i([a],e.prototype,"isOnline",void 0),i([n],e.prototype,"setOnline",null),i([n],e.prototype,"activateMaplibre",null),i([n],e.prototype,"deactivateMaplibre",null),i([o({keepAlive:!0})],e.prototype,"hideModeSwitchButton",null),i([o({keepAlive:!0})],e.prototype,"maplibreEnabled",null),i([o({keepAlive:!0})],e.prototype,"useMaplibreMap",null),i([o({keepAlive:!0})],e.prototype,"showMaplibre",null),i([o({keepAlive:!0})],e.prototype,"isMap3d",null);
@@ -1 +1 @@
1
- export default class t{rootStore;poiTypes=[];constructor(o){this.rootStore=o}}
1
+ export default class t{constructor(o){this.poiTypes=[],this.rootStore=o}}
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as n}from"tslib";import{action as o,computed as he,observable as se,runInAction as ae}from"mobx";import{LANGUAGE_TYPE as ne}from"../constants";import{RendererService as ce}from"../renderer";import{URLFilterManager as ue}from"../services/URLFilterManager";import{GaEventActions as de}from"../tools/gtag";import me from"../tools/logger";import{isWebGlSupported as Se}from"../utils";import{resetLocale as fe}from"../utils/i18n";import h from"../utils/is-mobile";import c from"../utils/is-webview";import{sanitizeSearch as pe}from"../utils/sanitizeText";import ge from"./BookmarksStore";import ke,{BoothBase as oe,RegularBooth as ve}from"./BoothStore";import ye from"./CategoryFilterStore";import _e,{Category as be}from"./CategoryStore";import we,{EventItem as xe}from"./EventStore";import Be,{Exhibitor as re}from"./ExhibitorStore";import Ee from"./FuzzySearchEngineStore";import Le from"./HeatmapStore";import Ce from"./IntercomStore";import Fe,{LayersMode as le}from"./LayerStore";import Ie from"./MaplibreStore";import Te from"./PoiTypeStore";import{SearchShortcutProvider as ze}from"./providers/SearchShortcutProvider";import{SessionsShortcutProvider as Me}from"./providers/SessionsShortcutProvider";import{SpeakerShortcutProvider as Oe}from"./providers/SpeakerShortcutProvider";import Ae from"./RoutePlannerStore";import Re from"./RouteStore";import Pe from"./SearchButtonsStore";import Ve from"./SearchStore";import Ge from"./SessionsFilterStore";import{ShortcutRegistry as Ne}from"./ShortcutRegistry";import qe from"./SpeakerFilterStore";import je from"./SpeakerStore";import{SpeakerItem as Ue}from"./SpeakerStore";import We from"./ToursStore";import De from"./UIState";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;maplibreStore;layerStore;intercomStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new ce;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 _e(this),this.exhibitorStore=new Be(this),this.boothStore=new ke(this),this.routeStore=new Re(this),this.routePlannerStore=new Ae(this),this.toursStore=new We(this),this.uiState=new De(this),this.maplibreStore=new Ie(this),this.layerStore=new Fe,this.intercomStore=new Ce,this.eventStore=new we(this),this.heatmapStore=new Le,this.poiTypeStore=new Te(this),this.fuzzySearchEngineStore=new Ee(["name","title","fullName","booths.name"]),this.categoryFilterStore=new ye(this),this.sessionsFilterStore=new Ge(this),this.speakerStore=new je(this),this.speakerFilterStore=new qe(this),this.searchStore=new Ve(this),this.searchButtonsStore=new Pe(this),this.bookmarksStore=new ge(this),this.urlFilterManager=new ue(this),this.shortcutRegistry=new Ne,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||fe().then(()=>{ae(()=>{this.selectSearch(""),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:ne}}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:pe(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 ve?(this.heatmapStore.forceTrack={action:de.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"&&Se&&(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 xe&&i.boothId){const r=this.boothStore.boothById.get(i.boothId);r?.visible&&e.push(r)}else i instanceof Ue&&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&&(me.log("Opening",t),t instanceof re?this.clickExhibitor(t):t instanceof be?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 Me(this)),this.shortcutRegistry.register(new Oe(this)),this.shortcutRegistry.register(new ze(this))}}})();export default He;
1
+ import{__decorate as i}from"tslib";import{action as s,computed as m,observable as u,runInAction as S}from"mobx";import{LANGUAGE_TYPE as d}from"../constants";import{RendererService as y}from"../renderer";import{URLFilterManager as b}from"../services/URLFilterManager";import{GaEventActions as w}from"../tools/gtag";import g from"../tools/logger";import{isWebGlSupported as v}from"../utils";import{resetLocale as k}from"../utils/i18n";import h from"../utils/is-mobile";import n from"../utils/is-webview";import{sanitizeSearch as x}from"../utils/sanitizeText";import B from"./BookmarksStore";import _,{BoothBase as c,RegularBooth as L}from"./BoothStore";import C from"./CategoryFilterStore";import E,{Category as T}from"./CategoryStore";import I,{EventItem as F}from"./EventStore";import M,{Exhibitor as p}from"./ExhibitorStore";import O from"./FuzzySearchEngineStore";import z from"./HeatmapStore";import R from"./IntercomStore";import A,{LayersMode as f}from"./LayerStore";import P from"./MaplibreStore";import V from"./PoiTypeStore";import{SearchShortcutProvider as G}from"./providers/SearchShortcutProvider";import{SessionsShortcutProvider as q}from"./providers/SessionsShortcutProvider";import{SpeakerShortcutProvider as N}from"./providers/SpeakerShortcutProvider";import U from"./RoutePlannerStore";import W from"./RouteStore";import j from"./SearchButtonsStore";import H from"./SearchStore";import K from"./SessionsFilterStore";import{ShortcutRegistry as Y}from"./ShortcutRegistry";import $ from"./SpeakerFilterStore";import D from"./SpeakerStore";import{SpeakerItem as J}from"./SpeakerStore";import Q from"./ToursStore";import X from"./UIState";export default class e{setResetCameraFn(t){this.resetCameraFn=t}constructor(){this.rendererService=new y,this.initialized=!1,this.categoryStore=new E(this),this.exhibitorStore=new M(this),this.boothStore=new _(this),this.routeStore=new W(this),this.routePlannerStore=new U(this),this.toursStore=new Q(this),this.uiState=new X(this),this.maplibreStore=new P(this),this.layerStore=new A,this.intercomStore=new R,this.eventStore=new I(this),this.heatmapStore=new z,this.poiTypeStore=new V(this),this.fuzzySearchEngineStore=new O(["name","title","fullName","booths.name"]),this.categoryFilterStore=new C(this),this.sessionsFilterStore=new K(this),this.speakerStore=new D(this),this.speakerFilterStore=new $(this),this.searchStore=new H(this),this.searchButtonsStore=new j(this),this.bookmarksStore=new B(this),this.urlFilterManager=new b(this),this.shortcutRegistry=new Y,this.registerShortcutProviders()}selectExhibitor(t,r=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(a=>a.visible),l=t.booths.filter(a=>!a.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),r&&setTimeout(()=>this.moveToList(t.booths.filter(a=>a.visible)),n||h?500:50)}selectBooth(t,r=!0){let o=Array.isArray(t)?t:[t];this.uiState.details=o[0],o.length===1&&o[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),o.length===1&&o[0].layer&&!o[0].visible&&this.layerStore.mode===f.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),r&&setTimeout(()=>this.moveToList(o),n||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||k().then(()=>{S(()=>{this.selectSearch(""),this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{S(()=>{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:d}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(o=>o.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(o=>o.booths.find(l=>l.visible)).flatMap(o=>o.booths)},200)}selectEventItem(t,r=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&o.layer&&!o.visible&&this.layerStore.mode===f.Radio&&this.layerStore.updateVisibility(o.layer,!0)}r&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},n||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:x(t,Object.keys(this.uiState.mapSettings).map(r=>`${r}=`)),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(r=>r.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 r={name:"",description:""},o={target:{...t,layer:t.layer||r}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof L?(this.heatmapStore.forceTrack={action:w.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"&&v&&(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 r=[];t.forEach(o=>{if(o instanceof p)r.push(...o.booths.filter(l=>l.visible));else if(o instanceof c)o.visible&&r.push(o);else if(o instanceof F&&o.boothId){const l=this.boothStore.boothById.get(o.boothId);l?.visible&&r.push(l)}else o instanceof J&&this.speakerStore.getEventsBySpeaker(o.id).forEach(l=>{if(!l.boothId)return;const a=this.boothStore.boothById.get(l.boothId);a?.visible&&r.push(a)})}),this.uiState.moveToBooths=r}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let r=this.uiState.activeListIndex+t;r=Math.max(0,Math.min(this.uiState.listItems.length-1,r)),this.uiState.activeListIndex=r}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&&(g.log("Opening",t),t instanceof p?this.clickExhibitor(t):t instanceof T?this.clickCategory(t):t instanceof c&&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(r=>t.categories.some(o=>o.id===r.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,r=!0){this.speakerStore.selectSpeaker(t,r)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new q(this)),this.shortcutRegistry.register(new N(this)),this.shortcutRegistry.register(new G(this))}}i([u],e.prototype,"initialized",void 0),i([u],e.prototype,"resetCameraFn",void 0),i([s],e.prototype,"setResetCameraFn",null),i([s],e.prototype,"selectExhibitor",null),i([s],e.prototype,"selectBooth",null),i([s],e.prototype,"reset",null),i([s],e.prototype,"selectNone",null),i([s],e.prototype,"selectBookmarks",null),i([s],e.prototype,"selectVisited",null),i([s],e.prototype,"selectLanguage",null),i([s],e.prototype,"selectCategory",null),i([s],e.prototype,"selectEventItem",null),i([s],e.prototype,"selectSearch",null),i([s],e.prototype,"clickBookmarks",null),i([s],e.prototype,"clickVisited",null),i([s],e.prototype,"clickLanguage",null),i([s],e.prototype,"clickCategory",null),i([s],e.prototype,"clickSeminars",null),i([s],e.prototype,"clickBoothInList",null),i([s],e.prototype,"clickBoothInList2",null),i([s],e.prototype,"clickBooth",null),i([s],e.prototype,"clickExhibitor2",null),i([s],e.prototype,"clickExhibitor",null),i([s],e.prototype,"showMap",null),i([s],e.prototype,"showOverlay",null),i([s],e.prototype,"toggleMapOverlay",null),i([s],e.prototype,"moveToList",null),i([s],e.prototype,"moveToExhibitor",null),i([s],e.prototype,"changeActiveListIndex",null),i([s],e.prototype,"toggleModal",null),i([s],e.prototype,"openGallery",null),i([s],e.prototype,"closeGallery",null),i([s],e.prototype,"openActiveListItem",null),i([s],e.prototype,"toggleCategoryFilter",null),i([s],e.prototype,"applyCategoryFilters",null),i([m],e.prototype,"filteredExhibitors",null),i([s],e.prototype,"selectSessions",null),i([s],e.prototype,"selectExhibitors",null),i([s],e.prototype,"selectTours",null),i([s],e.prototype,"selectSpeakers",null),i([s],e.prototype,"selectSpeaker",null),i([s],e.prototype,"resetFilters",null);
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as u}from"tslib";import{action as c,computed as d,observable as g}from"mobx";import{t as p}from"../utils/i18n";import{findBooth as Q,Route as U}from"./RouteStore";let W=(()=>{let n=[],_,S=[],b=[],y,P=[],v=[],k,x=[],R=[],B,F=[],I=[],C,w,O,z,V,E,L,A,N,M,T,j,q,D,$,G,H;return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;_=[g],y=[g],k=[g],B=[g],C=[d],w=[d],O=[d],z=[d],V=[d],E=[d],L=[d],A=[d],N=[c],M=[c],T=[c],j=[c],q=[c],D=[c],$=[c],G=[c],H=[c],a(this,null,C,{kind:"getter",name:"resolvedBooths",static:!1,private:!1,access:{has:t=>"resolvedBooths"in t,get:t=>t.resolvedBooths},metadata:e},null,n),a(this,null,w,{kind:"getter",name:"stopsCount",static:!1,private:!1,access:{has:t=>"stopsCount"in t,get:t=>t.stopsCount},metadata:e},null,n),a(this,null,O,{kind:"getter",name:"startPointBoothOptions",static:!1,private:!1,access:{has:t=>"startPointBoothOptions"in t,get:t=>t.startPointBoothOptions},metadata:e},null,n),a(this,null,z,{kind:"getter",name:"startPointAutocompleteOptions",static:!1,private:!1,access:{has:t=>"startPointAutocompleteOptions"in t,get:t=>t.startPointAutocompleteOptions},metadata:e},null,n),a(this,null,V,{kind:"getter",name:"title",static:!1,private:!1,access:{has:t=>"title"in t,get:t=>t.title},metadata:e},null,n),a(this,null,E,{kind:"getter",name:"subtitleParts",static:!1,private:!1,access:{has:t=>"subtitleParts"in t,get:t=>t.subtitleParts},metadata:e},null,n),a(this,null,L,{kind:"getter",name:"routeFloors",static:!1,private:!1,access:{has:t=>"routeFloors"in t,get:t=>t.routeFloors},metadata:e},null,n),a(this,null,A,{kind:"getter",name:"currentRouteFloor",static:!1,private:!1,access:{has:t=>"currentRouteFloor"in t,get:t=>t.currentRouteFloor},metadata:e},null,n),a(this,null,N,{kind:"method",name:"setRouteFloor",static:!1,private:!1,access:{has:t=>"setRouteFloor"in t,get:t=>t.setRouteFloor},metadata:e},null,n),a(this,null,M,{kind:"method",name:"launch",static:!1,private:!1,access:{has:t=>"launch"in t,get:t=>t.launch},metadata:e},null,n),a(this,null,T,{kind:"method",name:"launchFromBookmarks",static:!1,private:!1,access:{has:t=>"launchFromBookmarks"in t,get:t=>t.launchFromBookmarks},metadata:e},null,n),a(this,null,j,{kind:"method",name:"launchFromSlugs",static:!1,private:!1,access:{has:t=>"launchFromSlugs"in t,get:t=>t.launchFromSlugs},metadata:e},null,n),a(this,null,q,{kind:"method",name:"buildRoute",static:!1,private:!1,access:{has:t=>"buildRoute"in t,get:t=>t.buildRoute},metadata:e},null,n),a(this,null,D,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:t=>"setStartPoint"in t,get:t=>t.setStartPoint},metadata:e},null,n),a(this,null,$,{kind:"method",name:"removeItem",static:!1,private:!1,access:{has:t=>"removeItem"in t,get:t=>t.removeItem},metadata:e},null,n),a(this,null,G,{kind:"method",name:"reorderItems",static:!1,private:!1,access:{has:t=>"reorderItems"in t,get:t=>t.reorderItems},metadata:e},null,n),a(this,null,H,{kind:"method",name:"close",static:!1,private:!1,access:{has:t=>"close"in t,get:t=>t.close},metadata:e},null,n),a(null,null,_,{kind:"field",name:"items",static:!1,private:!1,access:{has:t=>"items"in t,get:t=>t.items,set:(t,o)=>{t.items=o}},metadata:e},S,b),a(null,null,y,{kind:"field",name:"startPoint",static:!1,private:!1,access:{has:t=>"startPoint"in t,get:t=>t.startPoint,set:(t,o)=>{t.startPoint=o}},metadata:e},P,v),a(null,null,k,{kind:"field",name:"source",static:!1,private:!1,access:{has:t=>"source"in t,get:t=>t.source,set:(t,o)=>{t.source=o}},metadata:e},x,R),a(null,null,B,{kind:"field",name:"excludedVisitedCount",static:!1,private:!1,access:{has:t=>"excludedVisitedCount"in t,get:t=>t.excludedVisitedCount,set:(t,o)=>{t.excludedVisitedCount=o}},metadata:e},F,I),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}rootStore=u(this,n);items=u(this,S,[]);startPoint=(u(this,b),u(this,P,null));source=(u(this,v),u(this,x,null));excludedVisitedCount=(u(this,R),u(this,F,0));constructor(e){u(this,I),this.rootStore=e}get resolvedBooths(){const e=new Map;return this.startPoint&&e.set(this.startPoint.id,this.startPoint),this.items.forEach(t=>{t.booth&&e.set(t.booth.id,t.booth)}),Array.from(e.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:e}=this.rootStore,t=this.startPointBoothOptions,o=[],r=new Set;return e.exhibitors.forEach(s=>{s.booths.forEach(l=>{r.add(l.id),o.push({value:l.id.toString(),label:`${s.name} - ${l.name}`})})}),t.filter(s=>!r.has(s.id)).forEach(s=>{o.push({value:s.id.toString(),label:s.name})}),o.sort((s,l)=>s.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?p("Bookmarks route"):""}get subtitleParts(){const{routeInfo:e}=this.rootStore.routeStore;let t;if(e?.time){const o=e.time;t=o<60?p("< 1 min"):p("~ {{n}} min",{n:Math.round(o/60)})}return{stops:p("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?p("From {{name}}",{name:this.startPoint.name}):void 0,distance:e?e.distance:void 0,travelTime:t}}get routeFloors(){const e=this.rootStore.routeStore.pathLayers;return e.map((t,o)=>{const r=e[o+1],i=t.layer?.basePriority??0,s=r?.layer?.basePriority??0,l=r?s<i?"up":"down":void 0;return{id:t.id,name:t.layer?.shortName,description:t.layer?.description,directionToNext:l}})}get currentRouteFloor(){const e=this.routeFloors,t=this.rootStore.routeStore.currentRouteLayer;if(!e.length)return;if(!t)return e[0]?{id:e[0].id,name:e[0].name}:void 0;const o=e.find(r=>r.description?.toLowerCase()===t.description?.toLowerCase());return o?{id:o.id,name:o.name}:{id:e[0].id,name:e[0].name}}setRouteFloor(e){const t=this.rootStore.routeStore.pathLayers.find(o=>o.id===e.id);t?.layer&&this.rootStore.layerStore.updateVisibility(t.layer,!0)}launch(e,t="custom",o){this.excludedVisitedCount=e.filter(i=>i.type==="exhibitor"&&i.entity.visited).length,this.items=e.filter(i=>i.type==="exhibitor"?!i.entity.visited:!0),this.source=t,this.startPoint=o!==void 0?o:this.detectStartPoint();const{uiState:r}=this.rootStore;r.list={type:"route-planner",source:t},r.details=null,r.menu=!1,this.buildRoute()}launchFromBookmarks(e){const{exhibitorStore:t,eventStore:o,boothStore:r}=this.rootStore,i=[];t.bookmarked.forEach(s=>{i.push({type:"exhibitor",entity:s,booth:s.booths[0]||null})}),r.booths.filter(s=>s.exhibitors.length===0&&s.bookmarkedDirectly).forEach(s=>{i.push({type:"booth",entity:s,booth:s})}),this.launch(i,"bookmarks",e)}launchFromSlugs(e,t){const o=this.resolveSlugs(e);this.launch(o,"custom",t)}resolveSlugs(e){const{exhibitorStore:t,eventStore:o,boothStore:r}=this.rootStore;return e.filter(Boolean).map(i=>{const s=i.toLowerCase(),l=t.exhibitors.find(f=>f.slug?.toLowerCase()===s||f.externalId?.toLowerCase()===s);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const m=Q(i);return m?{type:"booth",entity:m,booth:m}:null}).filter(i=>i!==null)}buildRoute(){const e=[];if(this.startPoint&&this.startPoint.name&&e.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&e.push(h.booth.name)}),e.length<2){this.rootStore.routeStore.updateRoute([]);return}let t;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(e);t=Array.isArray(h)?h.flatMap(K=>K?.waypoints??[]):[]}catch{t=[]}const o=new Set(e),r=new Set(t),i=e.length>0&&[...o].every(h=>r.has(h));(!t.length||!i)&&(t=e.slice()),this.reorderItemsByNames(t);const s=this.resolvedBooths;if(s.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=s[0],m=s[s.length-1],f=s.slice(1,-1),J=new U(l,m,f);this.rootStore.routeStore.selectRoute(J,!1),this.rootStore.uiState.setIsMultiPointRoute(f.length>0)}reorderItemsByNames(e){const t=this.startPoint?this.startPoint.name:null,o=new Map;this.items.forEach(i=>{const s=i.booth?i.booth.name:null;s&&(o.has(s)||o.set(s,[]),o.get(s).push(i))});const r=[];e.forEach(i=>{if(i!==t){const s=o.get(i);s&&s.length>0&&r.push(...s.splice(0))}}),this.items=r}detectStartPoint(){const{boothStore:e,poiTypeStore:t}=this.rootStore,o=["entrance","entrances"],r=t.poiTypes.find(i=>o.includes(i.name.toLowerCase()));return r&&e.booths.find(i=>i.poiTypeId===r.id)||null}setStartPoint(e){this.startPoint=e,this.buildRoute()}removeItem(e){this.items.splice(e,1),this.buildRoute()}reorderItems(e,t){const[o]=this.items.splice(e,1);this.items.splice(t,0,o),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}})();export default W;
1
+ import{__decorate as u}from"tslib";import{action as a,computed as c,observable as y}from"mobx";import{t as m}from"../utils/i18n";import{findBooth as b,Route as g}from"./RouteStore";export default class n{constructor(t){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore=t}get resolvedBooths(){const t=new Map;return this.startPoint&&t.set(this.startPoint.id,this.startPoint),this.items.forEach(o=>{o.booth&&t.set(o.booth.id,o.booth)}),Array.from(t.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:t}=this.rootStore,o=this.startPointBoothOptions,r=[],i=new Set;return t.exhibitors.forEach(e=>{e.booths.forEach(l=>{i.add(l.id),r.push({value:l.id.toString(),label:`${e.name} - ${l.name}`})})}),o.filter(e=>!i.has(e.id)).forEach(e=>{r.push({value:e.id.toString(),label:e.name})}),r.sort((e,l)=>e.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?m("Bookmarks route"):""}get subtitleParts(){const{routeInfo:t}=this.rootStore.routeStore;let o;if(t?.time){const r=t.time;o=r<60?m("< 1 min"):m("~ {{n}} min",{n:Math.round(r/60)})}return{stops:m("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?m("From {{name}}",{name:this.startPoint.name}):void 0,distance:t?t.distance:void 0,travelTime:o}}get routeFloors(){const t=this.rootStore.routeStore.pathLayers;return t.map((o,r)=>{const i=t[r+1],s=o.layer?.basePriority??0,e=i?.layer?.basePriority??0,l=i?e<s?"up":"down":void 0;return{id:o.id,name:o.layer?.shortName,description:o.layer?.description,directionToNext:l}})}get currentRouteFloor(){const t=this.routeFloors,o=this.rootStore.routeStore.currentRouteLayer;if(!t.length)return;if(!o)return t[0]?{id:t[0].id,name:t[0].name}:void 0;const r=t.find(i=>i.description?.toLowerCase()===o.description?.toLowerCase());return r?{id:r.id,name:r.name}:{id:t[0].id,name:t[0].name}}setRouteFloor(t){const o=this.rootStore.routeStore.pathLayers.find(r=>r.id===t.id);o?.layer&&this.rootStore.layerStore.updateVisibility(o.layer,!0)}launch(t,o="custom",r){this.excludedVisitedCount=t.filter(s=>s.type==="exhibitor"&&s.entity.visited).length,this.items=t.filter(s=>s.type==="exhibitor"?!s.entity.visited:!0),this.source=o,this.startPoint=r!==void 0?r:this.detectStartPoint();const{uiState:i}=this.rootStore;i.list={type:"route-planner",source:o},i.details=null,i.menu=!1,this.buildRoute()}launchFromBookmarks(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore,s=[];o.bookmarked.forEach(e=>{s.push({type:"exhibitor",entity:e,booth:e.booths[0]||null})}),i.booths.filter(e=>e.exhibitors.length===0&&e.bookmarkedDirectly).forEach(e=>{s.push({type:"booth",entity:e,booth:e})}),this.launch(s,"bookmarks",t)}launchFromSlugs(t,o){const r=this.resolveSlugs(t);this.launch(r,"custom",o)}resolveSlugs(t){const{exhibitorStore:o,eventStore:r,boothStore:i}=this.rootStore;return t.filter(Boolean).map(s=>{const e=s.toLowerCase(),l=o.exhibitors.find(d=>d.slug?.toLowerCase()===e||d.externalId?.toLowerCase()===e);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const p=b(s);return p?{type:"booth",entity:p,booth:p}:null}).filter(s=>s!==null)}buildRoute(){const t=[];if(this.startPoint&&this.startPoint.name&&t.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&t.push(h.booth.name)}),t.length<2){this.rootStore.routeStore.updateRoute([]);return}let o;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(t);o=Array.isArray(h)?h.flatMap(S=>S?.waypoints??[]):[]}catch{o=[]}const r=new Set(t),i=new Set(o),s=t.length>0&&[...r].every(h=>i.has(h));(!o.length||!s)&&(o=t.slice()),this.reorderItemsByNames(o);const e=this.resolvedBooths;if(e.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=e[0],p=e[e.length-1],d=e.slice(1,-1),f=new g(l,p,d);this.rootStore.routeStore.selectRoute(f,!1),this.rootStore.uiState.setIsMultiPointRoute(d.length>0)}reorderItemsByNames(t){const o=this.startPoint?this.startPoint.name:null,r=new Map;this.items.forEach(s=>{const e=s.booth?s.booth.name:null;e&&(r.has(e)||r.set(e,[]),r.get(e).push(s))});const i=[];t.forEach(s=>{if(s!==o){const e=r.get(s);e&&e.length>0&&i.push(...e.splice(0))}}),this.items=i}detectStartPoint(){const{boothStore:t,poiTypeStore:o}=this.rootStore,r=["entrance","entrances"],i=o.poiTypes.find(s=>r.includes(s.name.toLowerCase()));return i&&t.booths.find(s=>s.poiTypeId===i.id)||null}setStartPoint(t){this.startPoint=t,this.buildRoute()}removeItem(t){this.items.splice(t,1),this.buildRoute()}reorderItems(t,o){const[r]=this.items.splice(t,1);this.items.splice(o,0,r),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}u([y],n.prototype,"items",void 0),u([y],n.prototype,"startPoint",void 0),u([y],n.prototype,"source",void 0),u([y],n.prototype,"excludedVisitedCount",void 0),u([c],n.prototype,"resolvedBooths",null),u([c],n.prototype,"stopsCount",null),u([c],n.prototype,"startPointBoothOptions",null),u([c],n.prototype,"startPointAutocompleteOptions",null),u([c],n.prototype,"title",null),u([c],n.prototype,"subtitleParts",null),u([c],n.prototype,"routeFloors",null),u([c],n.prototype,"currentRouteFloor",null),u([a],n.prototype,"setRouteFloor",null),u([a],n.prototype,"launch",null),u([a],n.prototype,"launchFromBookmarks",null),u([a],n.prototype,"launchFromSlugs",null),u([a],n.prototype,"buildRoute",null),u([a],n.prototype,"setStartPoint",null),u([a],n.prototype,"removeItem",null),u([a],n.prototype,"reorderItems",null),u([a],n.prototype,"close",null);