@expofp/floorplan 3.2.7 → 3.2.8

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 (75) hide show
  1. package/dist/browser/{CookieConsent-C0WrwOQU.js → CookieConsent-B1LE7YfT.js} +1785 -1798
  2. package/dist/browser/{Debug-7KOvbcgu.js → Debug-DhDzWQYS.js} +9 -9
  3. package/dist/browser/{Demo-BTrpOaT8.js → Demo-D_175gLz.js} +11 -11
  4. package/dist/browser/{Free-1JPcV1Tq.js → Free-eF7PbjEi.js} +13 -13
  5. package/dist/browser/{Gallery-PP-H3fui.js → Gallery-BA-pvWo8.js} +9 -9
  6. package/dist/browser/{GpsLoader-pif05qaO.js → GpsLoader-CfS8cpM_.js} +14 -14
  7. package/dist/browser/{KioskStore-BmqfGXEW.js → KioskStore-D6ga9Qev.js} +3 -3
  8. package/dist/browser/{Mapbox-BEO3oA1E.js → Mapbox-B2UgukAw.js} +37 -37
  9. package/dist/browser/{SetKioskMode-BjyRxPem.js → SetKioskMode-DN9dYtQq.js} +17 -17
  10. package/dist/browser/{ShowKiosk-DrNFPO0o.js → ShowKiosk-NOvinyaO.js} +10 -10
  11. package/dist/browser/{ThreeComponent-CkTRDPj-.js → ThreeComponent-Dd6C-3ZE.js} +156 -156
  12. package/dist/browser/{TouchHand-BX9ElW6V.js → TouchHand-D4zCIp9f.js} +4 -4
  13. package/dist/browser/{ViewerMenuPanel-BpxIaNdU.js → ViewerMenuPanel-3gfsNYAC.js} +13 -13
  14. package/dist/browser/{add-debug-secret-listener-BV3Vlx9C.js → add-debug-secret-listener-PCn2L2xn.js} +1 -1
  15. package/dist/browser/{boolean-editor-DfkvcIH0.js → boolean-editor-C62I7paI.js} +10 -10
  16. package/dist/browser/{bootIntercom-XKKrQyNd.js → bootIntercom-CJp5myUd.js} +2 -2
  17. package/dist/browser/{box-Cy-U95_G.js → box-BllGyNzW.js} +5 -5
  18. package/dist/browser/{browser-oUjLaYcl.js → browser-hErw7TCJ.js} +2 -2
  19. package/dist/browser/bundle.json +53 -53
  20. package/dist/browser/{classnames-DpaK9tQ8.js → classnames-DZ15rBvY.js} +2 -2
  21. package/dist/browser/{client-smunwL9U.js → client-vSscuHGN.js} +4 -4
  22. package/dist/browser/{data-BVaCNE1I.js → data-Pg90oQgy.js} +44 -44
  23. package/dist/browser/{debug-overlay-CYWt6Xv8.js → debug-overlay-Cz0LzO7B.js} +11 -11
  24. package/dist/browser/{debug-ui-D63K4FZz.js → debug-ui-HOJ52C7W.js} +6 -6
  25. package/dist/browser/{dist-irw0I8ne.js → dist-B-j5Mwk6.js} +5 -5
  26. package/dist/browser/{dist-BU_A8R-K.js → dist-D1FyJZyA.js} +6 -6
  27. package/dist/browser/{dist-XBFUxmAT.js → dist-Di6V6Vgc.js} +3 -3
  28. package/dist/browser/{efp-debug-init-CPGmIrNj.js → efp-debug-init-GJ1wnZRj.js} +2 -2
  29. package/dist/browser/{enum-editor-B_JVlLVN.js → enum-editor-DDYy1Hf6.js} +11 -11
  30. package/dist/browser/{exports-C5NN5UxX.js → exports-D2FWPMfV.js} +1 -1
  31. package/dist/browser/{favicon-B0nAd4Pr.js → favicon-CLnUT7_M.js} +1 -1
  32. package/dist/browser/{fetch-retry.umd-DBq0GieJ.js → fetch-retry.umd-CsTB0zFM.js} +2 -2
  33. package/dist/browser/{flex-DOhgUp1k.js → flex-fdrXlk1E.js} +6 -6
  34. package/dist/browser/{flex.props-D8JHoC5B.js → flex.props-CKl-laU4.js} +2 -2
  35. package/dist/browser/{floorplan.loader-Cme4mipd.js → floorplan.loader-B9u5roId.js} +9 -9
  36. package/dist/browser/{floorplan.ready-C25lQjgP.js → floorplan.ready-DhqJ6xoZ.js} +12 -12
  37. package/dist/browser/{fuse-D1o3bI0m.js → fuse-BiPQjoVv.js} +2 -2
  38. package/dist/browser/index.js +12 -12
  39. package/dist/browser/{is-debug-D9BzIDdu.js → is-debug-DatwRSE7.js} +3 -3
  40. package/dist/browser/{jsx-runtime-C0zFKVvF.js → jsx-runtime-IE8skafD.js} +2 -2
  41. package/dist/browser/{lib-D2sBqUIY.js → lib-DeP5xNNM.js} +4 -4
  42. package/dist/browser/{main-GLYY8zv3.js → main-DHo0y8hQ.js} +1 -1
  43. package/dist/browser/{mobx-D5pYBM85.js → mobx-CrV9DCMJ.js} +4 -4
  44. package/dist/browser/{particles.min-egXyIDIV.js → particles.min-CvpZUl3e.js} +2 -2
  45. package/dist/browser/{prop-types-xhHzBbvi.js → prop-types-BHwYgrUd.js} +2 -2
  46. package/dist/browser/{react-CanbjT5I.js → react-B3Fm-ZS0.js} +2 -2
  47. package/dist/browser/{react-dom-wNBYs_H5.js → react-dom-CySklTOi.js} +3 -3
  48. package/dist/browser/{reset-all-settings-5oUUws5J.js → reset-all-settings-Cl74zGyE.js} +7 -7
  49. package/dist/browser/{rolldown-runtime-BKpHzyBK.js → rolldown-runtime-BAuBEODA.js} +1 -1
  50. package/dist/browser/{settings-D5qqIejY.js → settings-BIgQOlLC.js} +2 -2
  51. package/dist/browser/{settings-item-Blm7DAEt.js → settings-item-CMHd9Vr7.js} +6 -6
  52. package/dist/browser/{store-CM7rJpRZ.js → store-WG-XbhCX.js} +4261 -4354
  53. package/dist/browser/{string-editor-CLdOCbq2.js → string-editor-Cdda3m3H.js} +8 -8
  54. package/dist/browser/{theme-App4ywLP.js → theme-CEfCl0Wg.js} +8 -8
  55. package/dist/browser/{ui-BN6m_5pK.js → ui-Cxw-zCCr.js} +8 -8
  56. package/dist/esm/components/Map/Map.js +1 -1
  57. package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
  58. package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
  59. package/dist/esm/components/SearchBox.js +1 -1
  60. package/dist/esm/services/routing.js +1 -1
  61. package/dist/esm/store/BoothStore.d.ts +0 -1
  62. package/dist/esm/store/BoothStore.js +1 -1
  63. package/dist/esm/store/UIState.js +1 -1
  64. package/dist/esm/store/init/init-booths.js +1 -1
  65. package/dist/esm/tools/track-event.js +1 -1
  66. package/dist/esm/utils/customCommands.d.ts +1 -1
  67. package/dist/esm/utils/customCommands.js +1 -1
  68. package/dist/esm/wayfinding/core/rendering/computeTransitionPoints.js +1 -1
  69. package/package.json +3 -3
  70. package/dist/esm/components/Map/drawing/config/config-booth-scaled.d.ts +0 -14
  71. package/dist/esm/components/Map/drawing/config/config-booth-scaled.js +0 -1
  72. package/dist/esm/components/Map/drawing/config/config-yah.d.ts +0 -2
  73. package/dist/esm/components/Map/drawing/config/config-yah.js +0 -1
  74. package/dist/esm/utils/yah.d.ts +0 -8
  75. package/dist/esm/utils/yah.js +0 -1
@@ -1,18 +1,18 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.2.7" };
4
+ e.SENTRY_RELEASE = { id: "3.2.8" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "d6998a34-2e60-485b-acb4-511cd67af42e", e._sentryDebugIdIdentifier = "sentry-dbid-d6998a34-2e60-485b-acb4-511cd67af42e");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-BKpHzyBK.js";
10
- import { t } from "./react-CanbjT5I.js";
11
- import { t as n } from "./jsx-runtime-C0zFKVvF.js";
12
- import { E as r, c as i, l as a, o, r as s, v as c } from "./box-Cy-U95_G.js";
13
- import { t as l } from "./classnames-DpaK9tQ8.js";
14
- import { t as u } from "./flex.props-D8JHoC5B.js";
15
- import { t as d } from "./settings-item-Blm7DAEt.js";
9
+ import { r as e } from "./rolldown-runtime-BAuBEODA.js";
10
+ import { t } from "./react-B3Fm-ZS0.js";
11
+ import { t as n } from "./jsx-runtime-IE8skafD.js";
12
+ import { E as r, c as i, l as a, o, r as s, v as c } from "./box-BllGyNzW.js";
13
+ import { t as l } from "./classnames-DZ15rBvY.js";
14
+ import { t as u } from "./flex.props-CKl-laU4.js";
15
+ import { t as d } from "./settings-item-CMHd9Vr7.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@19.2._d6d76dcfd4c9de055b7c51247e12b902/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
17
17
  var f = {
18
18
  size: {
@@ -1,18 +1,18 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.2.7" };
4
+ e.SENTRY_RELEASE = { id: "3.2.8" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7ef9ec30-23fe-46ab-9eef-b60026a43ae8", e._sentryDebugIdIdentifier = "sentry-dbid-7ef9ec30-23fe-46ab-9eef-b60026a43ae8");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-BKpHzyBK.js";
10
- import { t } from "./react-CanbjT5I.js";
11
- import { t as n } from "./jsx-runtime-C0zFKVvF.js";
12
- import { t as r } from "./react-dom-wNBYs_H5.js";
13
- import { C as i, D as a, S as o, T as s, _ as c, a as l, g as u, w as d } from "./box-Cy-U95_G.js";
14
- import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-BU_A8R-K.js";
15
- import { t as y } from "./classnames-DpaK9tQ8.js";
9
+ import { r as e } from "./rolldown-runtime-BAuBEODA.js";
10
+ import { t } from "./react-B3Fm-ZS0.js";
11
+ import { t as n } from "./jsx-runtime-IE8skafD.js";
12
+ import { t as r } from "./react-dom-CySklTOi.js";
13
+ import { C as i, D as a, S as o, T as s, _ as c, a as l, g as u, w as d } from "./box-BllGyNzW.js";
14
+ import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-D1FyJZyA.js";
15
+ import { t as y } from "./classnames-DZ15rBvY.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.14__@ty_d1be9c417e0b55d219bafdc186d26ce0/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
17
17
  var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
18
18
  position: "absolute",
@@ -1,17 +1,17 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.2.7" };
4
+ e.SENTRY_RELEASE = { id: "3.2.8" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "92182a39-8df3-47fb-a7de-39aa7bf1975b", e._sentryDebugIdIdentifier = "sentry-dbid-92182a39-8df3-47fb-a7de-39aa7bf1975b");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-BKpHzyBK.js";
10
- import { i as t, r as n } from "./reset-all-settings-5oUUws5J.js";
11
- import { t as r } from "./jsx-runtime-C0zFKVvF.js";
12
- import "./settings-D5qqIejY.js";
13
- import { t as i } from "./browser-oUjLaYcl.js";
14
- import { t as a } from "./add-debug-secret-listener-BV3Vlx9C.js";
9
+ import { r as e } from "./rolldown-runtime-BAuBEODA.js";
10
+ import { i as t, r as n } from "./reset-all-settings-Cl74zGyE.js";
11
+ import { t as r } from "./jsx-runtime-IE8skafD.js";
12
+ import "./settings-BIgQOlLC.js";
13
+ import { t as i } from "./browser-hErw7TCJ.js";
14
+ import { t as a } from "./add-debug-secret-listener-PCn2L2xn.js";
15
15
  //#region ../debug/src/lib/ui/render-debug-ui.tsx
16
16
  var o = /* @__PURE__ */ e(i(), 1), s = r(), c = !1;
17
17
  function l() {
@@ -26,7 +26,7 @@ function l() {
26
26
  }
27
27
  });
28
28
  let i = async (t) => {
29
- let { DebugUi: n } = await import("./debug-ui-D63K4FZz.js"), { createRoot: i } = await import("./client-smunwL9U.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-HOJ52C7W.js"), { createRoot: i } = await import("./client-vSscuHGN.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
30
30
  document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, s.jsx)(n, {
31
31
  useDebugButtonState: r.useState,
32
32
  open: t
@@ -1 +1 @@
1
- import{jsx as S,jsxs as I,Fragment as H}from"react/jsx-runtime";import{useObserver as Y}from"mobx-react-lite";import q from"classnames";import{useEffect as J,useMemo as Q,useRef as z,useState as ee}from"react";import{observable as oe}from"mobx";import i,{boothStore as te,layersStore as R,uiState as e}from"../../store";import re from"./drawing/config/config-all";import{useReaction as d}from"../../utils/mobx";import{LayerMode as g}from"../../store/LayerStore";import p from"../../tools/settings";import{Rect as x}from"./drawing/config/Rect";import C from"../../core/Rect";import{Exhibitor as F}from"../../store/ExhibitorStore";import{BoothBase as ne}from"../../store/BoothStore";import{CurrentPosition as ie,Route as ae}from"../../store/RouteStore";import{Category as se}from"../../store/CategoryStore";import T from"../../tools/logger";import{svgArea as D}from"../../data/svg";import{configMarkers as le,getMarkerFromClick as me}from"./drawing/config/config-markers";import ce from"color";import{createWayfinding as fe}from"../../wayfinding/createWayfinding";import{createSceneDef as de}from"../../renderer";import{convertGpsToLocal as ue}from"../../utils/gps";import{fpGeo as pe}from"../../data/fpGeo";import v from"../../utils/is-debug";import{Draggable as he}from"../Draggable";import{useBuildRoute as ve}from"./traffic/useBuildRoute";import{useManageTraffic as be}from"./traffic/useManageTraffic";import{DEBUG_STORAGE_KEY as G,PATHWAY_KEY as N}from"../../constants";import O from"./booth-by-xy";import{mapRollSetting as X}from"../../renderer";import{loadLayersImages as ye}from"./drawing/config/loadBoothsImages";import{areLayersEnabled as ge}from"../../utils/areLayersEnabled";import{pickDefaultScene as A,pickDefaultScenePoint as xe}from"../../renderer/engine-core/defs";const j=Number.isFinite(p.maxZoom);export default function we(){let k={};const K="#ebebeb",h=z(),b=Q(()=>oe({moving:!1,prevLevel:i.layerStore.layers.find(o=>!o.frozen&&o.visible)}),[]),s=i.rendererService;let l;const L=z(null);let B=null,M=null;const[U,V]=ee(()=>typeof window<"u"&&window.localStorage?localStorage.getItem(G)!=="false":!0);d(()=>i.routeStore.currentRouteLayer,()=>{if(!s.scene||b.prevLevel===i.routeStore.currentRouteLayer)return;const o=s.scene.rootLayer.children.filter(r=>i.layerStore.floors.some(n=>r.name.includes(n.name)));let t=i.routeStore.currentRouteLayer.name;if(!o.find(r=>r.name===t))return;const a=o?.map(r=>(r.name===t&&(r.hidden=!1),r.name===b.prevLevel?.name&&(r.hidden=!0),r));b.prevLevel=i.routeStore.currentRouteLayer,s.update(...a)}),d(()=>e.centerMap,()=>{!e.centerMap||i.mapboxStore.showMapbox||(l.controls.resetCamera({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)}),J(()=>{if(!h.current)return;async function o(){let t={};try{if(v){const r=document.createElement("canvas").getContext("webgl2"),n=r&&r.getExtension("EXT_disjoint_timer_query_webgl2"),m=(await import("stats-gl")).default,f=new m({trackGPU:n,horizontal:!0}),u=L.current;if(!u)throw new Error("memoryInfoPanel not found.");f.dom.style.position="relative",u.style.width=`${90*(n?3:2)}px`,u.style.height="48px",u.appendChild(f.dom),t={stats:f,memoryInfoPanel:u}}}catch(a){console.error(a)}l=s.create({canvas:h.current,ui:t}),e.canvasVisibleRectPx&&(l.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx)),re(s).then(a=>{v&&console.log("Renderer settings",l);const r=ce(p.backgroundColor==="none"?K:p.backgroundColor).string("rgba");k=de(a,x.fromCoreRect(D),r),s.start(k),X(l,i.fp.enableRotation?1:0),j&&l.viewport.setMaxZoom(p.maxZoom),R.layersLoaded=!0,i.fp.onFpConfigured&&i.fp?.onFpConfigured(),B=fe(s),M=le(s),ye(s)}),l.events.addEventListener("pointer:move",({data:a})=>{if(e.setKioskModeEnabled)return;const{point:r,defs:n}=A(a),c=O(r.x,r.y),m=E(n[0]);e.hoveredBooth=c||m}),l.events.addEventListener("pointer:out",()=>{e.setKioskModeEnabled||(e.hoveredBooth=null)}),l.events.addEventListener("pointer:click",({data:a})=>{if(!e?.rootElement)return;window.__resett&&window.__resett(),e.overlayPosition==="bottom"&&e.overlaySize==="full"&&i.showMap();const{point:r,defs:n}=A(a),{x:c,y:m}=r;if(e.onGetCoordsClick){const y=i.layerStore.layers.find(w=>w.visible&&(w.mode===g.TurnedOn||w.mode===g.TurnedOff));e.onGetCoordsClick({x:c,y:m,z:y?.name||null})}if(e.setKioskModeEnabled)return;if(e.onMarkerClick){const y=me(c,m,s.scale);v&&console.log("marker",y),e.onMarkerClick(y)}const f=O(r.x,r.y),u=E(n[0]);v&&console.log("boothIdFromClientXy",f,"boothByShape",u,"pointer:click point",r),i.clickBooth(f||u)}),l.events.addEventListener("navigation:change",()=>window.__resett&&window.__resett())}return o(),i.fp.getCenterCoordinates=Z,()=>W()},[]);function W(){B?.(),M?.(),s.dispose()}function Z(){const o=h.current;if(!h.current)throw new Error("Canvas not ready");const t=xe(l.viewport.canvasToSvg({x:o.clientWidth/2,y:o.clientHeight/2})),r=i.layerStore.visible.find(n=>n.mode===g.TurnedOff||n.mode===g.TurnedOn)?.name||null;return{...t,z:r}}function E(o){return!o||!o.shape?null:te.booths.find(t=>t.shapes?.find(a=>a.shape==o.shape))}d(()=>e.zoomBy,()=>{if(!e.zoomBy||i.mapboxStore.showMapbox)return;const o=e.zoomBy;l.controls.zoomBy(o),e.zoomBy=null}),d(()=>e.dimmed,o=>{if(!s.scene)return;const t=s.scene.rootLayer;t.dim!==o&&(t.dim=o,s.update(t))}),d(()=>e.details,()=>{if(!e.onDetails)return;if(!e.details){e.onDetails(null);return}var o=e.details;if(p.EXPO==="wineparis"&&(o instanceof F&&(o=o.booths[0]),!o))return;let t=null,a=[];o instanceof F?(t="exhibitor",a=o.booths.map(n=>n.name).sort((n,c)=>n==i.routeStore.tempToBooth?.name?-1:c==i.routeStore.tempToBooth?.name?1:0)):o instanceof ne?(t="booth",a=[o.name]):o instanceof ae?(t="route",a=[o.from?.name,o.to?.name].filter(n=>!!n)):o instanceof se&&(t="category",a=o.exhibitors.map(n=>n.booths.map(c=>c.name)).flat());var r={type:t,name:o?.name,id:o?.id,externalId:o?.externalId,boothsNames:a};e.onDetails({...r,...t==="route"?{routeInfo:i.routeStore.routeInfo}:{}})}),d(()=>e.canvasVisibleRectPx,()=>{s.renderer&&(s.renderer.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx))},{fireImmediately:!0}),d(()=>e.moveToRect,()=>{!e.moveToRect||i.mapboxStore.showMapbox||(e.moveToRect&&e.moveToRect.h!==1/0&&e.moveToRect.w!==1/0&&e.moveToRect.h>0&&e.moveToRect.w>0&&_(e.moveToRect),e.moveToRect=null)}),d(()=>e.rollReset,o=>{o&&(l.controls.resetCamera({roll:!0}),e.rollReset=!1)}),d(()=>e.moveToBooths,()=>{if(T.log("this.moveToBooths",e.moveToBooths),!e.moveToBooths||i.mapboxStore.showMapbox)return;T.log("watched moveToBooths",e.moveToBooths);const o=e.moveToBooths.filter(t=>t.rect).map(t=>t.rect);o.length!==0&&(_(C.fromMultiple(o)),e.moveToBooths=null)}),d(()=>e.mapSettings,({zoomtime:o,center:t,centerxy:a,bearing:r,roll:n,z:c})=>{if(!(i.mapboxStore.showMapbox||!s.renderer))try{o&&o!==e.defaultMapSettings.zoomtime&&s.renderer.controls.configure({zoomTime:o/1e3}),i.fp.enableRotation&&X(l,n);let m;if(t){const f=t.split(",").map(Number),u=new ie(void 0,void 0,void 0,void 0,f[0],f[1]);m=ue(u,pe.properties.config)}else if(a){const f=a.split(",").map(Number);m={x:f[0],y:f[1]}}c&&i.fp.activateFloor({name:c}),(m?.x||m?.y)&&s.renderer.controls.panTo(m.x,m.y),Number.isFinite(r)&&s.renderer.controls.rollTo(r)}catch(m){T.error("Error in mapSettings reaction",m)}}),ve({enabled:R.layersLoaded&&e.buildRoute,rendererService:s});const P="routes-api.expofp.com";be({permission:R.layersLoaded,rendererService:s,dataJsonUrl:`https://${P}/v1/routes?expo=${p.EXPO}`,websocketUrl:`wss://${P}/locations?expo=${p.EXPO}`}),d(()=>i.layerStore.visible,o=>{if(!s.scene)return;const t=o.filter(n=>n.name.toLowerCase().includes(N)),r=s.scene.rootLayer.children.filter(n=>n.name.toLowerCase().includes(N));r.forEach(n=>{n.hidden=!t.find(c=>c.name===n.name)}),s.update(...r)});function _(o){let t=o;const a=$(o,D);e.kioskData&&(!ge()||i.routeStore.defaultFrom?.layer?.name===i.routeStore.currentRouteLayer?.name)&&(t=C.fromMultiple([o,C.fromXywh(e.kioskData.x,e.kioskData.y,1,1)]));const r=x.fromCoreRect(t),n={paddingPercent:a,maxZoom:j?void 0:10};if(e.shouldShiftMapRect){l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x+e.overlayWidthPx};try{l.controls.zoomTo(r,n)}finally{l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x-e.overlayWidthPx}}}else l.controls.zoomTo(r,n)}function $(o,t){return!o||!t?0:(o.w*o.h/(t.h*t.w)>.1?15:25)/100}return Y(()=>I(H,{children:[S("canvas",{style:{width:"100%",height:"100%"},ref:h,className:q({map:!0,moving:b.moving,hidden:i.mapboxStore.showMapbox}),children:"ExpoFP.com"}),v&&U&&I(he,{className:"debug-fps",children:[S("div",{ref:L}),S("button",{onClick:()=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(G,"false"),V(!1)},style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",backgroundColor:"#333",color:"#fff",border:"1px solid #555",width:"100%"},children:"Hide debug"})]})]}))}
1
+ import{jsx as S,jsxs as I,Fragment as H}from"react/jsx-runtime";import{useObserver as Y}from"mobx-react-lite";import q from"classnames";import{useEffect as J,useMemo as Q,useRef as z,useState as ee}from"react";import{observable as oe}from"mobx";import i,{boothStore as te,layersStore as R,uiState as e}from"../../store";import re from"./drawing/config/config-all";import{useReaction as d}from"../../utils/mobx";import{LayerMode as g}from"../../store/LayerStore";import p from"../../tools/settings";import{Rect as x}from"./drawing/config/Rect";import C from"../../core/Rect";import{Exhibitor as F}from"../../store/ExhibitorStore";import{BoothBase as ne}from"../../store/BoothStore";import{CurrentPosition as ie,Route as ae}from"../../store/RouteStore";import{Category as se}from"../../store/CategoryStore";import T from"../../tools/logger";import{svgArea as D}from"../../data/svg";import{configMarkers as le,getMarkerFromClick as me}from"./drawing/config/config-markers";import ce from"color";import{createWayfinding as fe}from"../../wayfinding/createWayfinding";import{createSceneDef as de}from"../../renderer";import{convertGpsToLocal as ue}from"../../utils/gps";import{fpGeo as pe}from"../../data/fpGeo";import v from"../../utils/is-debug";import{Draggable as he}from"../Draggable";import{useBuildRoute as ve}from"./traffic/useBuildRoute";import{useManageTraffic as be}from"./traffic/useManageTraffic";import{DEBUG_STORAGE_KEY as G,PATHWAY_KEY as N}from"../../constants";import O from"./booth-by-xy";import{mapRollSetting as X}from"../../renderer";import{loadLayersImages as ye}from"./drawing/config/loadBoothsImages";import{areLayersEnabled as ge}from"../../utils/areLayersEnabled";import{pickDefaultScene as A,pickDefaultScenePoint as xe}from"../../renderer/engine-core/defs";const j=Number.isFinite(p.maxZoom);export default function we(){let k={};const K="#ebebeb",h=z(),b=Q(()=>oe({moving:!1,prevLevel:i.layerStore.layers.find(o=>!o.frozen&&o.visible)}),[]),s=i.rendererService;let l;const L=z(null);let B=null,M=null;const[U,V]=ee(()=>typeof window<"u"&&window.localStorage?localStorage.getItem(G)!=="false":!0);d(()=>i.routeStore.currentRouteLayer,()=>{if(!s.scene||b.prevLevel===i.routeStore.currentRouteLayer)return;const o=s.scene.rootLayer.children.filter(r=>i.layerStore.floors.some(n=>r.name.includes(n.name)));let t=i.routeStore.currentRouteLayer.name;if(!o.find(r=>r.name===t))return;const a=o?.map(r=>(r.name===t&&(r.hidden=!1),r.name===b.prevLevel?.name&&(r.hidden=!0),r));b.prevLevel=i.routeStore.currentRouteLayer,s.update(...a)}),d(()=>e.centerMap,()=>{!e.centerMap||i.mapboxStore.showMapbox||(l.controls.resetCamera({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)}),J(()=>{if(!h.current)return;async function o(){let t={};try{if(v){const r=document.createElement("canvas").getContext("webgl2"),n=r&&r.getExtension("EXT_disjoint_timer_query_webgl2"),m=(await import("stats-gl")).default,f=new m({trackGPU:n,horizontal:!0}),u=L.current;if(!u)throw new Error("memoryInfoPanel not found.");f.dom.style.position="relative",u.style.width=`${90*(n?3:2)}px`,u.style.height="48px",u.appendChild(f.dom),t={stats:f,memoryInfoPanel:u}}}catch(a){console.error(a)}l=s.create({canvas:h.current,ui:t}),e.canvasVisibleRectPx&&(l.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx)),re(s).then(a=>{v&&console.log("Renderer settings",l);const r=ce(p.backgroundColor==="none"?K:p.backgroundColor).string("rgba");k=de(a,x.fromCoreRect(D),r),s.start(k),X(l,i.fp.enableRotation?1:0),j&&l.viewport.setMaxZoom(p.maxZoom),R.layersLoaded=!0,i.fp.onFpConfigured&&i.fp?.onFpConfigured(),B=fe(s),M=le(s),ye(s)}),l.events.addEventListener("pointer:move",({data:a})=>{if(e.setKioskModeEnabled)return;const{point:r,defs:n}=A(a),c=O(r.x,r.y),m=E(n[0]);e.hoveredBooth=c||m}),l.events.addEventListener("pointer:out",()=>{e.setKioskModeEnabled||(e.hoveredBooth=null)}),l.events.addEventListener("pointer:click",({data:a})=>{if(!e?.rootElement)return;window.__resett&&window.__resett(),e.overlayPosition==="bottom"&&e.overlaySize==="full"&&i.showMap();const{point:r,defs:n}=A(a),{x:c,y:m}=r;if(e.onGetCoordsClick){const y=i.layerStore.layers.find(w=>w.visible&&(w.mode===g.TurnedOn||w.mode===g.TurnedOff));e.onGetCoordsClick({x:c,y:m,z:y?.name||null})}if(e.setKioskModeEnabled)return;if(e.onMarkerClick){const y=me(c,m,s.scale);v&&console.log("marker",y),e.onMarkerClick(y)}const f=O(r.x,r.y),u=E(n[0]);v&&console.log("boothIdFromClientXy",f,"boothByShape",u,"pointer:click point",r),i.clickBooth(f||u)}),l.events.addEventListener("navigation:change",()=>window.__resett&&window.__resett())}return o(),i.fp.getCenterCoordinates=Z,()=>W()},[]);function W(){B?.(),M?.(),s.dispose()}function Z(){const o=h.current;if(!h.current)throw new Error("Canvas not ready");const t=xe(l.viewport.canvasToSvg({x:o.clientWidth/2,y:o.clientHeight/2})),r=i.layerStore.visible.find(n=>n.mode===g.TurnedOff||n.mode===g.TurnedOn)?.name||null;return{...t,z:r}}function E(o){return!o||!o.shape?null:te.booths.find(t=>t.shapes?.find(a=>a.shape==o.shape))}d(()=>e.zoomBy,()=>{if(!e.zoomBy||i.mapboxStore.showMapbox)return;const o=e.zoomBy;l.controls.zoomBy(o),e.zoomBy=null}),d(()=>e.dimmed,o=>{if(!s.scene)return;const t=s.scene.rootLayer;t.dim!==o&&(t.dim=o,s.update(t))}),d(()=>e.details,()=>{if(!e.onDetails)return;if(!e.details){e.onDetails(null);return}var o=e.details;if(p.EXPO==="wineparis"&&(o instanceof F&&(o=o.booths[0]),!o))return;let t=null,a=[];o instanceof F?(t="exhibitor",a=o.booths.map(n=>n.name).sort((n,c)=>n==i.routeStore.tempToBooth?.name?-1:c==i.routeStore.tempToBooth?.name?1:0)):o instanceof ne?(t="booth",a=[o.name]):o instanceof ae?(t="route",a=[o.from?.name,o.to?.name].filter(n=>!!n)):o instanceof se&&(t="category",a=o.exhibitors.map(n=>n.booths.map(c=>c.name)).flat());var r={type:t,name:o?.name,id:o?.id,externalId:o?.externalId,boothsNames:a};e.onDetails({...r,...t==="route"?{routeInfo:i.routeStore.routeInfo}:{}})}),d(()=>e.canvasVisibleRectPx,()=>{s.renderer&&(s.renderer.visibleRect=x.fromCoreRect(e.canvasVisibleRectPx))},{fireImmediately:!0}),d(()=>e.moveToRect,()=>{!e.moveToRect||i.mapboxStore.showMapbox||(e.moveToRect&&e.moveToRect.h!==1/0&&e.moveToRect.w!==1/0&&e.moveToRect.h>0&&e.moveToRect.w>0&&_(e.moveToRect),e.moveToRect=null)}),d(()=>e.rollReset,o=>{o&&(l.controls.resetCamera({roll:!0}),e.rollReset=!1)}),d(()=>e.moveToBooths,()=>{if(T.log("this.moveToBooths",e.moveToBooths),!e.moveToBooths||i.mapboxStore.showMapbox)return;T.log("watched moveToBooths",e.moveToBooths);const o=e.moveToBooths.filter(t=>t.rect).map(t=>t.rect);o.length!==0&&(_(C.fromMultiple(o)),e.moveToBooths=null)}),d(()=>e.mapSettings,({zoomtime:o,center:t,centerxy:a,bearing:r,roll:n,z:c})=>{if(!(i.mapboxStore.showMapbox||!s.renderer))try{o&&o!==e.defaultMapSettings.zoomtime&&s.renderer.controls.configure({zoomTime:o/1e3}),i.fp.enableRotation&&X(l,n);let m;if(t){const f=t.split(",").map(Number),u=new ie(void 0,void 0,void 0,void 0,f[0],f[1]);m=ue(u,pe.properties.config)}else if(a){const f=a.split(",").map(Number);m={x:f[0],y:f[1]}}c&&i.fp.activateFloor({name:c}),(m?.x||m?.y)&&s.renderer.controls.panTo(m.x,m.y),Number.isFinite(r)&&s.renderer.controls.rollTo(r)}catch(m){T.error("Error in mapSettings reaction",m)}}),ve({enabled:R.layersLoaded&&e.buildRoute,rendererService:s});const P="routes-api.expofp.com";be({permission:R.layersLoaded,rendererService:s,dataJsonUrl:`https://${P}/v1/routes?expo=${p.EXPO}`,websocketUrl:`wss://${P}/locations?expo=${p.EXPO}`}),d(()=>i.layerStore.visible,o=>{if(!s.scene)return;const t=o.filter(n=>n.name.toLowerCase().includes(N)),r=s.scene.rootLayer.children.filter(n=>n.name.toLowerCase().includes(N));r.forEach(n=>{n.hidden=!t.find(c=>c.name===n.name)}),s.update(...r)});function _(o){let t=o;const a=$(o,D);e.kioskData&&(!ge()||i.routeStore.defaultFrom?.layer?.name===i.routeStore.currentRouteLayer?.name)&&(t=C.fromMultiple([o,C.fromXywh(e.kioskData.x,e.kioskData.y,1,1)]));const r=x.fromCoreRect(t),n={paddingPercent:a,maxZoom:j?void 0:10};if(e.shouldShiftMapRect){l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x+e.overlayWidthPx},l.visibleRect=l.visibleRect;try{l.controls.zoomTo(r,n)}finally{l.visibleRect.min={...l.visibleRect.min,x:l.visibleRect.min.x-e.overlayWidthPx}}}else l.controls.zoomTo(r,n)}function $(o,t){return!o||!t?0:(o.w*o.h/(t.h*t.w)>.1?15:25)/100}return Y(()=>I(H,{children:[S("canvas",{style:{width:"100%",height:"100%"},ref:h,className:q({map:!0,moving:b.moving,hidden:i.mapboxStore.showMapbox}),children:"ExpoFP.com"}),v&&U&&I(he,{className:"debug-fps",children:[S("div",{ref:L}),S("button",{onClick:()=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(G,"false"),V(!1)},style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",backgroundColor:"#333",color:"#fff",border:"1px solid #555",width:"100%"},children:"Hide debug"})]})]}))}
@@ -1 +1 @@
1
- import c from"../../../../store";import E from"./config-load-layer";import{createLayerDef as t}from"../../../../renderer";import{WF_LINES_ANIMATED_LAYER_NAME as _,WF_LINES_LAYER_NAME as d,WF_POINTS_LAYER_NAME as p,WF_TRAIL_LAYER_NAME as y}from"../../../../wayfinding/layers";import{MARKER_LAYER_NAME as N}from"./config-markers";import R from"./config-yah";import{createTrafficLayers as Y}from"../../traffic/trafficLayers";import{PATHWAY_KEY as u}from"../../../../constants";import{configBoothsBadges as M}from"./config-booth-badge";export default function h(f){R();let{layers:r,defaultLayer:s}=c.layerStore;if(s){const o=[].concat(r),e=r.find(i=>i===s),a=r.indexOf(e);o.splice(a,1),r=[e].concat(o)}const L=r.filter(o=>!o.rootParent).map(o=>E(o,f));return Promise.all(L).then(o=>{const e=t(p,[],{dim:!1,interactive:!0}),a=t(d,[],{dim:!1}),i=t(N,[]),l=t(y,[],{dim:!1}),A=t(_,[],{dim:!1});o.forEach(m=>{m.name.toLowerCase().includes(u)&&(m.dim=!1)});const n=M(f,"root",c.boothStore.booths);return[...o.flat(),...n?[n]:[],...Y(),i,l,a,A,e]})}
1
+ import c from"../../../../store";import E from"./config-load-layer";import{createLayerDef as t}from"../../../../renderer";import{WF_LINES_ANIMATED_LAYER_NAME as _,WF_LINES_LAYER_NAME as d,WF_POINTS_LAYER_NAME as p,WF_TRAIL_LAYER_NAME as y}from"../../../../wayfinding/layers";import{MARKER_LAYER_NAME as N}from"./config-markers";import{createTrafficLayers as R}from"../../traffic/trafficLayers";import{PATHWAY_KEY as u}from"../../../../constants";import{configBoothsBadges as M}from"./config-booth-badge";export default function Y(f){let{layers:r,defaultLayer:s}=c.layerStore;if(s){const o=[].concat(r),e=r.find(i=>i===s),a=r.indexOf(e);o.splice(a,1),r=[e].concat(o)}const L=r.filter(o=>!o.rootParent).map(o=>E(o,f));return Promise.all(L).then(o=>{const e=t(p,[],{dim:!1,interactive:!0}),a=t(d,[],{dim:!1}),i=t(N,[]),l=t(y,[],{dim:!1}),A=t(_,[],{dim:!1});o.forEach(m=>{m.name.toLowerCase().includes(u)&&(m.dim=!1)});const n=M(f,"root",c.boothStore.booths);return[...o.flat(),...n?[n]:[],...R(),i,l,a,A,e]})}
@@ -1 +1 @@
1
- import U from"./config-booth-bg";import{Rect as g}from"./Rect";import W from"./config-booth-labels";import{SEPARATOR as s}from"../../../../constants";import F from"./config-booth-labels-special";import K from"./config-booth-border";import P from"./config-booth-bookmark";import Z from"../../../../tools/settings";import R,{boothStore as j,uiState as q}from"../../../../store";import z from"./config-booth-scaled";import{loadImagesInBatchesById as G}from"../../../../utils/loadImagesInBatches";import{createBoothImg as J,getImageLayerName as M,mapBoothsLogos as Q}from"./loadBoothsImages";import{degToRad as V}from"three/src/math/MathUtils";import{createImageDef as X}from"../../../../renderer";export const BOOTHS_CHUNK_SIZE=350;export default function Y(a,d,D){return(l=>{const t=d,b=[],m=[],f=[],B=[],u=[],y=M(t),L={name:y,children:[]};for(const o of l){const i=U(a,o)?.getShape();i&&b.push(...i);const n=W(a,o)?.getShape();n&&m.push(...n);const c=F(a,o)?.getShape();if(c&&f.push(...c),!Z.borderless){const e=K(a,o)?.getShape();e&&B.push(e)}const h=P(a,o)?.getShape();h&&u.push(h)}const x=m.filter(o=>o.lines),_=f.filter(o=>o.lines),w=m.filter(o=>o.source),N=f.filter(o=>o.source);if(!q.hideLogoInBooth){const o=Q(l);a.onLayerImages(y,async()=>{const i=await G(o,BOOTHS_CHUNK_SIZE),n=[];for(const[c,h]of i){const e=R.boothStore.boothById.get(c);if(!e)continue;const{bounds:{x:I,y:S,height:O,angle:T,width:A},htmlImage:C}=J(e,h),k=X(C,new g({x:I,y:S},{x:I+A,y:S+O},V(T))),E=g.fromCoreRect(e.rect,e.rotate),H=g.inflateRect(E,e.borderWidth||j.borderWidth);e.shapes.push(k),n.push({shape:k,parentRect:H})}return{layer:L,children:n}})}let p=[];l.length&&(p=[{name:`${t}${s}boothBackground`,children:b,interactive:!0},{name:`${t}${s}labels`,children:x},{name:`${t}${s}specialLabels`,children:_},{name:`${t}${s}bots`,children:w},{name:`${t}${s}specialDots`,children:N},L,{name:`${t}${s}boothsBookmark`,children:u},{name:`${t}${s}boothBorder`,children:B}]);const{defaultFrom:r}=R.routeStore,$=(d+":").split(":")[0];if(r?.layer===null||r?.layer?.name===$||r?.layer?.childLayers.find(o=>o.name===$)){const o=z(a,r);o&&p.push({name:`${t}${s}yahBooth`,children:o.getShape()})}return{name:t,children:p}})(D)}
1
+ import E from"./config-booth-bg";import{Rect as f}from"./Rect";import H from"./config-booth-labels";import{SEPARATOR as s}from"../../../../constants";import U from"./config-booth-labels-special";import W from"./config-booth-border";import _ from"./config-booth-bookmark";import K from"../../../../tools/settings";import P,{boothStore as Z,uiState as j}from"../../../../store";import{loadImagesInBatchesById as q}from"../../../../utils/loadImagesInBatches";import{createBoothImg as z,getImageLayerName as F,mapBoothsLogos as G}from"./loadBoothsImages";import{degToRad as J}from"three/src/math/MathUtils";import{createImageDef as M}from"../../../../renderer";export const BOOTHS_CHUNK_SIZE=350;export default function Q(a,I,k){return(h=>{const t=I,p=[],m=[],l=[],g=[],b=[],d=F(t),B={name:d,children:[]};for(const o of h){const r=E(a,o)?.getShape();r&&p.push(...r);const n=H(a,o)?.getShape();n&&m.push(...n);const i=U(a,o)?.getShape();if(i&&l.push(...i),!K.borderless){const e=W(a,o)?.getShape();e&&g.push(e)}const c=_(a,o)?.getShape();c&&b.push(c)}const S=m.filter(o=>o.lines),R=l.filter(o=>o.lines),D=m.filter(o=>o.source),x=l.filter(o=>o.source);if(!j.hideLogoInBooth){const o=G(h);a.onLayerImages(d,async()=>{const r=await q(o,BOOTHS_CHUNK_SIZE),n=[];for(const[i,c]of r){const e=P.boothStore.boothById.get(i);if(!e)continue;const{bounds:{x:L,y:$,height:w,angle:N,width:O},htmlImage:T}=z(e,c),y=M(T,new f({x:L,y:$},{x:L+O,y:$+w},J(N))),A=f.fromCoreRect(e.rect,e.rotate),C=f.inflateRect(A,e.borderWidth||Z.borderWidth);e.shapes.push(y),n.push({shape:y,parentRect:C})}return{layer:B,children:n}})}let u=[];return h.length&&(u=[{name:`${t}${s}boothBackground`,children:p,interactive:!0},{name:`${t}${s}labels`,children:S},{name:`${t}${s}specialLabels`,children:R},{name:`${t}${s}bots`,children:D},{name:`${t}${s}specialDots`,children:x},B,{name:`${t}${s}boothsBookmark`,children:b},{name:`${t}${s}boothBorder`,children:g}]),{name:t,children:u}})(k)}
@@ -1 +1 @@
1
- import{jsx as a,jsxs as f}from"react/jsx-runtime";import b from"classnames";import{useObserver as D}from"mobx-react-lite";import k,{useEffect as v,useRef as C,useCallback as T}from"react";import o,{searchStore as e}from"../store";import{t as i}from"../utils/i18n";import{useAutorun as l}from"../utils/mobx";import z from"../tools/debounce";import{GaEventActions as j,sendEventToGa as K}from"../tools/gtag";import{handleCustomCommand as L}from"../utils/customCommands";import{Badge as P}from"./";import"./SearchBox.scss";const G=1e3;function R({className:g}){const B=C(),p=C(null);function w(t){let s=0;switch(t.key){case"Down":case"ArrowDown":s=1;break;case"Up":case"ArrowUp":s=-1;break;case"Enter":t.preventDefault(),o.openActiveListItem();const n=c();n&&L(n.value,!0);return;case"Escape":t.preventDefault(),e.closeSearch();return}s&&(t.preventDefault(),o.changeActiveListIndex(s))}function c(){return p.current}const[I,u]=k.useState(""),[h,E]=k.useState(!1);l(()=>{E(o.uiState.kiosk&&o.uiState.inIdle)}),v(()=>{if(!h){u("");return}const t=[i("Find Companies..."),i("Find Categories..."),i("Find Sessions..."),i("Search...")];let s=0,n=0,r=!1,S;const _=()=>{const d=t[s];r?(u(d.substring(0,n-1)),n--):(u(d.substring(0,n+1)),n++);let m=r?50:100;!r&&n===d.length?(r=!0,m=2e3):r&&n===0&&(r=!1,s=(s+1)%t.length,m=500),S=setTimeout(_,m)};return _(),()=>clearTimeout(S)},[h]),l(()=>{const t=document.activeElement;o.uiState.overlaySize!=="full"&&t===c()&&!e.isFocused&&c()?.blur()}),l(()=>{o.uiState.menu&&o.uiState.kiosk&&e.setFocused(!1)}),l(()=>{const t=c(),s=document.activeElement;t&&e.isFocused&&s!==t&&!e.skipInputFocus&&t.focus()}),v(()=>{o.fuzzySearchEngineStore.loadEngine()},[]);const N=T(z(()=>{e.searchText&&K(j.Search,e.searchText),window.__resett?.()},G),[]);function y(){e.setSearchText(c()?.value||""),N()}function M(){e.setFocused(!0),window.__resett?.()}function A(){e.isFocused||(e.handleSearchAction(),setTimeout(()=>{c()?.focus()},100))}function F(){e.handleBackAction()}function x(){e.closeSearch()}return D(()=>f("div",{className:b("search-box",g,e.searchBoxClass,{"efp-semi-transparent":o.uiState.setKioskModeEnabled}),ref:B,children:[a("button",{className:b("search-box__button","search-box__button--back",{"is-mobile-details":e.isMobileDetailsMode}),onClick:F,type:"button","aria-label":e.backMode==="back"?i("Go back"):i("Main menu"),children:a("i",{className:e.backMode==="back"?"icon-chevron-left":o.uiState.viewerMode?"icon-home":"icon-menu"})}),a("div",{className:"search-box__input-wrapper",children:e.shouldShowSearchInput?a("input",{ref:p,type:"search",className:"search-box__input",placeholder:h?I:e.placeholder,"aria-label":"Search",value:e.searchText,onChange:y,onKeyDown:w,onFocus:M,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",disabled:o.uiState.setKioskModeEnabled}):f("div",{className:"search-box__title",children:[e.searchBoxIcon&&a("i",{className:b("search-box__title-icon",e.searchBoxIcon)}),f("div",{className:"search-box__title-content",children:[a("strong",{className:"search-box__title-text",children:e.searchBoxTitle}),e.searchBoxSubtitle&&a("span",{className:"search-box__title-subtitle",children:e.searchBoxSubtitle})]}),e.searchBoxBadge?a(P,{variant:"lightgray",size:"md",rounded:!0,noMargins:!0,children:e.searchBoxBadge}):null]})}),!e.shouldShowSearchInput&&e.searchBoxActions.map(t=>a("button",{className:"search-box__button search-box__button--ui-action",onClick:t.handler,type:"button","aria-label":t.label,title:t.label,children:a("i",{className:t.icon})},t.id)),a("button",{className:"search-box__button search-box__button--action",onClick:e.shouldShowSearchInput?e.shouldShowCloseButton?x:A:x,type:"button","aria-label":e.ariaLabel,children:a("i",{className:e.actionButtonIcon})})]}))}export default R;
1
+ import{jsx as a,jsxs as f}from"react/jsx-runtime";import b from"classnames";import{useObserver as D}from"mobx-react-lite";import k,{useEffect as v,useRef as C,useCallback as T}from"react";import o,{searchStore as e}from"../store";import{t as i}from"../utils/i18n";import{useAutorun as l}from"../utils/mobx";import z from"../tools/debounce";import{GaEventActions as j,sendEventToGa as K}from"../tools/gtag";import{handleCustomCommand as L}from"../utils/customCommands";import{Badge as P}from"./";import"./SearchBox.scss";const G=1e3;function R({className:g}){const B=C(),p=C(null);function w(t){let s=0;switch(t.key){case"Down":case"ArrowDown":s=1;break;case"Up":case"ArrowUp":s=-1;break;case"Enter":t.preventDefault(),o.openActiveListItem();const n=c();n&&L(n.value);return;case"Escape":t.preventDefault(),e.closeSearch();return}s&&(t.preventDefault(),o.changeActiveListIndex(s))}function c(){return p.current}const[I,u]=k.useState(""),[h,E]=k.useState(!1);l(()=>{E(o.uiState.kiosk&&o.uiState.inIdle)}),v(()=>{if(!h){u("");return}const t=[i("Find Companies..."),i("Find Categories..."),i("Find Sessions..."),i("Search...")];let s=0,n=0,r=!1,S;const _=()=>{const d=t[s];r?(u(d.substring(0,n-1)),n--):(u(d.substring(0,n+1)),n++);let m=r?50:100;!r&&n===d.length?(r=!0,m=2e3):r&&n===0&&(r=!1,s=(s+1)%t.length,m=500),S=setTimeout(_,m)};return _(),()=>clearTimeout(S)},[h]),l(()=>{const t=document.activeElement;o.uiState.overlaySize!=="full"&&t===c()&&!e.isFocused&&c()?.blur()}),l(()=>{o.uiState.menu&&o.uiState.kiosk&&e.setFocused(!1)}),l(()=>{const t=c(),s=document.activeElement;t&&e.isFocused&&s!==t&&!e.skipInputFocus&&t.focus()}),v(()=>{o.fuzzySearchEngineStore.loadEngine()},[]);const N=T(z(()=>{e.searchText&&K(j.Search,e.searchText),window.__resett?.()},G),[]);function y(){e.setSearchText(c()?.value||""),N()}function M(){e.setFocused(!0),window.__resett?.()}function A(){e.isFocused||(e.handleSearchAction(),setTimeout(()=>{c()?.focus()},100))}function F(){e.handleBackAction()}function x(){e.closeSearch()}return D(()=>f("div",{className:b("search-box",g,e.searchBoxClass,{"efp-semi-transparent":o.uiState.setKioskModeEnabled}),ref:B,children:[a("button",{className:b("search-box__button","search-box__button--back",{"is-mobile-details":e.isMobileDetailsMode}),onClick:F,type:"button","aria-label":e.backMode==="back"?i("Go back"):i("Main menu"),children:a("i",{className:e.backMode==="back"?"icon-chevron-left":o.uiState.viewerMode?"icon-home":"icon-menu"})}),a("div",{className:"search-box__input-wrapper",children:e.shouldShowSearchInput?a("input",{ref:p,type:"search",className:"search-box__input",placeholder:h?I:e.placeholder,"aria-label":"Search",value:e.searchText,onChange:y,onKeyDown:w,onFocus:M,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",disabled:o.uiState.setKioskModeEnabled}):f("div",{className:"search-box__title",children:[e.searchBoxIcon&&a("i",{className:b("search-box__title-icon",e.searchBoxIcon)}),f("div",{className:"search-box__title-content",children:[a("strong",{className:"search-box__title-text",children:e.searchBoxTitle}),e.searchBoxSubtitle&&a("span",{className:"search-box__title-subtitle",children:e.searchBoxSubtitle})]}),e.searchBoxBadge?a(P,{variant:"lightgray",size:"md",rounded:!0,noMargins:!0,children:e.searchBoxBadge}):null]})}),!e.shouldShowSearchInput&&e.searchBoxActions.map(t=>a("button",{className:"search-box__button search-box__button--ui-action",onClick:t.handler,type:"button","aria-label":t.label,title:t.label,children:a("i",{className:t.icon})},t.id)),a("button",{className:"search-box__button search-box__button--action",onClick:e.shouldShowSearchInput?e.shouldShowCloseButton?x:A:x,type:"button","aria-label":e.ariaLabel,children:a("i",{className:e.actionButtonIcon})})]}))}export default R;
@@ -1 +1 @@
1
- import{createBrowserHistory as oe}from"history";import{autorun as O,reaction as k}from"mobx";import{handleCustomCommand as A}from"../utils/customCommands";import{BUILD_ROUTE_KEY as se,KIOSK_ENABLE_KEY as F,MAP_SETTINGS_KEY as re,PREVIEW_MODE_QUERY as E,PREVIEW_MODE_STORAGE_KEY as $,SEPARATOR as R,PATHWAY_KEY as N,PLANNER_KEY as P,PLANNER_SOURCE_KEY as W,PLANNER_FROM_KEY as K,LANG_KEY as Y,UI_SCALE_PARAM_KEY as V,UI_SCALE_RESET_PARAM_KEY as H,VIEWER_MODE_QUERY as I,VIEWER_MODE_STORAGE_KEY as G,LANGUAGE_TYPE as x}from"../constants";import v from"../data";import s,{uiState as i}from"../store";import{CurrentPosition as ae,extractRoute as ie,findBooth as le}from"../store/RouteStore";import{setConsentSettings as D}from"../tools/gtag";import U from"../tools/logger";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{yahKey as ne}from"../utils/yah";import{areLayersEnabled as ce}from"../utils/areLayersEnabled";import ue from"../core/Rect";import{getMostFrequent as he}from"../utils/getMostFrequent";import{runInAction as z}from"mobx";import{recoverKioskFromUrlPrams as fe}from"../components/Kiosk/recoverKioskFromUrlPrams";import{hasLocale as de,setLocale as me}from"../utils/i18n";let m=!1,C=!1,j=null,q=null,Q=null,J;const h=oe(),_=window.location.pathname,S=[];export function getLocationHistory(){return S}function b(t){return _+t}function pe(t){m||h.push(b(t))}export function historyReplace(t){m||h.push(b(t))}function f(t){return t.replace(/=&/g,"&").replace(/=$/,"")}function X(){let t="";const l=i.selectedExhibitor,a=i.selectedBooth,e=i.selectedEventItem,o=i.selectedRoute,r=i.selectedSpeaker,n=i.setKioskModeEnabled;if(i.list.type==="route-planner"&&!l&&!a&&!e){const d=s.routePlannerStore;if(d.source==="bookmarks")t=`${P}&${W}=bookmarks`;else{const w=d.items.map(g=>g.entity.slug).filter(Boolean).join(R);t=`${P}=${w}`}const p=d.startPoint?.slug;p&&(t+=`&${K}=${p}`)}else if(o&&!i.isMultiPointRoute){const d=o.from?`:${o.from.slug}`:"",p=o.to?`:${o.to.slug}`:"",w=s.routeStore.onlyAccessible?":true":":false",g=o.waypoints?.map(u=>`:${u.slug}`).join("");t=`route${p}${d}${w}${g||""}`}else if(l)t=l.slug;else if(a)t=a.slug;else if(e)t=e.slug;else if(r)t=r.slug;else if(n)t="";else switch(i.list.type){case"bookmarks":t="bookmarks";break;case"visited":t="visited";break;case"category":t=i.selectedCategory.slug;break;case"search":t=i.list.text||"";break;case x:t=x;break;case"filter":t=`${i.list.query.key}=${i.list.query.value}`;break;case"sessions":t="sessions";break;case"exhibitors":t="exhibitors";break;case"speakers":t="speakers";break;case"tours":t="tours";break;case"multi-point-tour":t=`tour=${i.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=t?"?"+encodeURIComponent(t):"";h.location.search!==c&&(l!==j||a!==q||e!==Q?pe(c):historyReplace(c),j=l,q=a,Q=e)}function Z(){const t=i.selectedExhibitor,l=i.selectedEventItem,a=i.selectedSpeaker;let e="";t?e=t.name:l?e=l.name:a?e=a.name:i.list.type==="search"&&i.list.text?e="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(e=i.tourTitle),e.length&&(e+=" \u2013 "),e+=v.title,v.subtitle&&(e+=" \u2013 "+v.subtitle),e+=" \u2013 Expo Floor Plan by ExpoFP",document.title=e}function B(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return A(t,!1)}function y(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const l=s.boothStore.booths.find(e=>e.slug?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()?.replace(/\s+/g,"")===t?.toLowerCase()),a=new URLSearchParams(decodeURIComponent(window.location.search));if(fe(a),ge(a),!B())if(a.has("yah")){const e=a.get("yah");A(`${ne} ${e}`,!0)}else if(a.has(F)){const e=a.get(F);e==="1"?i.kiosk=!0:e==="0"&&(i.kiosk=!1,i.resetUIScale())}else if(t==="tours")s.selectTours();else if(t.startsWith("tour=")){const e=t.split("=")[1],o=s.toursStore.getTourById(e);o?s.toursStore.launchTour(o,o.name,o.description):(console.warn(`Route with id "${e}" not found`),s.selectTours())}else if(a.has(P)){const e=a.get(W),o=a.get(K),r=o?le(o):null;if(e==="bookmarks")s.routePlannerStore.launchFromBookmarks(r??void 0);else{const n=(a.get(P)||"").split(R).filter(Boolean);s.routePlannerStore.launchFromSlugs(n,r??void 0)}}else if(t.startsWith("route")){const e=t.split(R);s.routeStore.setOnlyAccessible(e[3]==="true");const o=ie(e[2],e[1],e.slice(4));s.routeStore.selectRoute(o);const n=e.slice(4).length>0;s.uiState.setIsMultiPointRoute(n);const d=new URLSearchParams(window.location.search).get("title");d&&s.uiState.setRouteTitle(d)}else if(t==="bookmarks")s.selectBookmarks();else if(t==="visited")s.selectVisited();else if(t===x)s.selectLanguage();else if(a.has(Y)){const e=a.get(Y)?.toLowerCase();de(e)&&me(e)}else if(t==="sessions")s.selectSessions();else if(t==="exhibitors")s.selectExhibitors();else if(t==="speakers")s.selectSpeakers();else if(t==="-pdf")s.uiState.printingPdf=!0;else if(t.startsWith("hide"))s.uiState.setVisibility(new URLSearchParams(t).get("hide").split(",").filter(Boolean).reduce((e,o)=>({...e,[o]:!1}),{}));else if(l)setTimeout(()=>s.selectBooth(l),250);else if(t===se)s.uiState.startBuildRoute();else if(a.get(N)){const e=a.get(N),o=a.get("booths")?.split(",")||[],r=a.get("exhibitors")?.split(",")||[],n=a.get("tour");if(n){const u=s.toursStore.getTourById(n);u&&z(()=>{s.uiState.setTourTitle(u.name),s.uiState.setTourDescription(u.description),s.uiState.setIsMultiPointTour(!0),s.uiState.setMultiPointTourList(u.id)})}const c=s.boothStore.booths,d=s.exhibitorStore.exhibitors,p=c.filter(u=>o.includes(u.externalId)),w=d.filter(u=>r.includes(u.externalId)).flatMap(u=>u.booths),g=[...p,...w];if(ce()){const u=g.map(te=>te.layer.name),M=he(u);M&&s.fp.activateFloor({name:M})}(o.length>0||r.length>0)&&s.fp.highlightEntities([...o,...r]),s.layerStore.showPathWay(e),g.length>0&&z(()=>{s.uiState.moveToRect=ue.fromMultiple(g.map(u=>u.rect).filter(Boolean)),s.uiState.rollReset=!0})}else{const e=s.eventStore.eventItems.find(o=>o.slug?.toLowerCase()===t?.toLowerCase()||o.externalId?.toLowerCase()===t?.toLowerCase());if(e)s.selectEventItem(e,!0);else{const o=s.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===t?.toLowerCase()||r.externalId?.toLowerCase()===t?.toLowerCase());if(t.startsWith("exhibitors")){const r=t.split("=")[1].split(",");setTimeout(()=>s.fp.selectExhibitor(r),250)}else if(o)setTimeout(()=>s.clickExhibitor(o),250);else if(t.includes("=")&&(t.startsWith("categories=")||t.startsWith("poiType=")))U.log("Skipping filter parameter in dispatchFromUrl:",t);else{const n=s.categoryStore.categories.find(c=>c.slug===t);if(n)s.selectCategory(n);else{const c=s.speakerStore.findBySlug(t);c?s.selectSpeaker(c,!0):t.includes("heatmap=true")||s.searchStore.selectSearch(t)}}}}C=!1,X(),Z()}function T(){const t=h.location.search;if(t.includes("heatmap")){const e=new URL(window.location.href);if(e.searchParams.get("heatmap")==="true")if(e.searchParams.get("type")==="yah"){let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmapYah=!0,s.uiState.monochrome=!0,s.uiState.hideLogoInBooth=!0,s.uiState.hideHeaderLogo=!0,s.uiState.disableBookmarked=!0}else{e.searchParams.delete("heatmap");let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmap=!0}}if(t.startsWith("?preview="))historyReplace("?");else if(t.startsWith("?b="))historyReplace("?bookmarks");else if(t.startsWith("?ba=")){const e=new URL(window.location.href),o=parseInt(e.searchParams.get("ba")),r=s.exhibitorStore.exhibitorById.get(o);historyReplace(r?"?"+r.slug:"?bookmarks")}else t.startsWith("?mapbox=false")&&(s.mapboxStore.isMapbox=!1,historyReplace("?"));if(t.includes("blue-dot")){const e=new URL(window.location.href),o=e.searchParams.get("blue-dot").split(",");if(e.searchParams.delete("blue-dot"),o.length>1){const n=s.layerStore.findLayer(o[2])?.name,c=new ae(Number(o[0])||void 0,Number(o[1])||void 0,n,void 0,Number(o[3])||void 0,Number(o[4])||void 0);s.layerStore.layersLoaded?s.routeStore.selectCurrentPosition(c,!1,1):k(()=>s.layerStore.layersLoaded,()=>{s.routeStore.selectCurrentPosition(c,!1,1)})}let r=f(e.search);historyReplace(r)}if(t.includes("copy_exh")){const e=new URL(window.location.href),o=e.searchParams.get("copy_exh");e.searchParams.delete("copy_exh"),historyReplace("?")}if(t.includes("noOverlay")){const e=new URL(window.location.href),o=e.searchParams.get("noOverlay");e.searchParams.delete("noOverlay");let r=f(e.search);o==="true"?s.uiState.hideOverlay=!0:o==="false"&&(s.uiState.hideOverlay=!1),historyReplace(r)}if(t.includes("allowConsent")){const e=new URL(window.location.href),o=e.searchParams.get("allowConsent");e.searchParams.delete("allowConsent");const r=f(e.search);o==="true"?D(!0):o==="false"&&D(!1),historyReplace(r)}if(t.includes("hideHeaderLogo")){const e=new URL(window.location.href),o=e.searchParams.get("hideHeaderLogo");e.searchParams.delete("hideHeaderLogo");const r=f(e.search);o==="true"&&(i.hideHeaderLogo=!0),historyReplace(r)}if(t.includes("hideLogoInBooth")){const e=new URL(window.location.href),o=e.searchParams.get("hideLogoInBooth");e.searchParams.delete("hideLogoInBooth");const r=f(e.search);o==="true"&&(i.hideLogoInBooth=!0),historyReplace(r)}if(t.includes("disableFeatured")){const e=new URL(window.location.href),o=e.searchParams.get("disableFeatured");e.searchParams.delete("disableFeatured");const r=f(e.search);o==="true"&&s.exhibitorStore.exhibitors.forEach(n=>n.featured=!1),historyReplace(r)}if(t.includes("disableBookmarked")){const e=new URL(window.location.href),o=e.searchParams.get("disableBookmarked");e.searchParams.delete("disableBookmarked");const r=f(e.search);o==="true"&&(i.disableBookmarked=!0),historyReplace(r)}if(t.includes("disableGps")){const e=new URL(window.location.href),o=e.searchParams.get("disableGps");e.searchParams.delete("disableGps");const r=f(e.search);o==="true"&&s.routeStore.setGpsTrackingEnabled(!1),historyReplace(r)}if(t.includes("monochrome")){const e=new URL(window.location.href),o=e.searchParams.get("monochrome");e.searchParams.delete("monochrome");const r=f(e.search);o==="true"&&(i.monochrome=!0),historyReplace(r)}if((t.startsWith("?fbclid")||t.startsWith("?_ga"))&&historyReplace("?"),t.includes(I)){const e=new URL(window.location.href),o=e.searchParams.get(I);o==="1"||o==="true"?L&&localStorage.setItem(G,"1"):(o==="0"||o==="false")&&L&&localStorage.removeItem(G),e.searchParams.delete(I),historyReplace(f(e.search))}if(t.includes(E)){const e=new URL(window.location.href),o=e.searchParams.get(E);o==="true"?L&&localStorage.setItem($,"1"):o==="false"&&L&&localStorage.removeItem($),e.searchParams.delete(E),historyReplace(f(e.search))}if(i.previewExhibitor&&historyReplace("?"+i.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let e=h.location.search;e=e.startsWith("?")?e.slice(1):e;const o=e.includes("&")?"&":"%26",n=e.split(o).map(c=>{const d=s.exhibitorStore.exhibitors.find(p=>p.slug===c||p.externalId===c);return d?d.name:c}).join("&");historyReplace("?"+n)}const l=new URLSearchParams(window.location.search);if(l.has(H)){s.uiState.resetUIScale();const e=new URL(window.location.href);e.searchParams.delete(H);let o=f(e.search);m=!0,historyReplace(o),m=!1}const a=l.get(V);if(a){const e=a.replace(",","."),o=parseFloat(e);!isNaN(o)&&o>=.8&&o<=1.4?s.uiState.setUIScale(o,!0):U.warn(`Invalid ui-scale parameter: ${a}. Must be a number between 0.8 and 1.4.`);const r=new URL(window.location.href);r.searchParams.delete(V);let n=f(r.search);m=!0,historyReplace(n),m=!1}}export function initRouting(t=!1){m=t,!m&&b(h.location.search)===_&&S.push(b(h.location.search)),J=h.listen((l,a)=>{m||(S.push(b(l.search)),U.log("history",a,l),a==="POP"&&y())}),T(),B(),k(()=>s.layerStore.layersLoaded,()=>{s.urlFilterManager&&!s.urlFilterManager.isInitialized&&s.urlFilterManager.initialize(),y(),O(Z),O(X),i.viewerMode&&(i.menu=!0)})}export function applyParameters(t=""){historyReplace("?"+decodeURIComponent(t.toString())),s.layerStore.layersLoaded?(T(),y()):(B(),k(()=>s.layerStore.layersLoaded,()=>{T(),y()}))}export function destroyHistory(){J()}export function goBack(){if(console.log("goBack"),S.length>1){S.pop();const l=S[S.length-1].replace(_,"");return m=!0,h.replace(l),m=!1,y(),!0}else return h.go(-1),!1}function ge(t){try{let l={};const a=i.defaultMapSettings;if(new Set(t.keys()).size)l=ee(Object.fromEntries(t.entries()),a);else{const e=sessionStorage.getItem(re);e&&(l=ee(JSON.parse(e),a))}if(i.setMapSettings(l),l.z){const e=s.layerStore.layers.find(o=>o.name===l.z);e&&s.layerStore.updateVisibility(e,!0)}}catch(l){console.error("Failed to process or save map settings.",l)}}function ee(t,l){const a={};for(const e in t){if(!Object.prototype.hasOwnProperty.call(l,e)||!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];typeof l[e]=="number"&&typeof o=="string"?a[e]=parseFloat(o):a[e]=o}return a}
1
+ import{createBrowserHistory as te}from"history";import{autorun as O,reaction as k}from"mobx";import{handleCustomCommand as oe}from"../utils/customCommands";import{BUILD_ROUTE_KEY as se,KIOSK_ENABLE_KEY as A,MAP_SETTINGS_KEY as re,PREVIEW_MODE_QUERY as E,PREVIEW_MODE_STORAGE_KEY as F,SEPARATOR as R,PATHWAY_KEY as N,PLANNER_KEY as P,PLANNER_SOURCE_KEY as W,PLANNER_FROM_KEY as $,LANG_KEY as K,UI_SCALE_PARAM_KEY as Y,UI_SCALE_RESET_PARAM_KEY as V,VIEWER_MODE_QUERY as I,VIEWER_MODE_STORAGE_KEY as H,LANGUAGE_TYPE as x}from"../constants";import v from"../data";import s,{uiState as i}from"../store";import{CurrentPosition as ae,extractRoute as ie,findBooth as le}from"../store/RouteStore";import{setConsentSettings as G}from"../tools/gtag";import U from"../tools/logger";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{areLayersEnabled as ne}from"../utils/areLayersEnabled";import ce from"../core/Rect";import{getMostFrequent as ue}from"../utils/getMostFrequent";import{runInAction as D}from"mobx";import{recoverKioskFromUrlPrams as he}from"../components/Kiosk/recoverKioskFromUrlPrams";import{hasLocale as fe,setLocale as de}from"../utils/i18n";let m=!1,C=!1,z=null,j=null,q=null,Q;const h=te(),_=window.location.pathname,S=[];export function getLocationHistory(){return S}function b(t){return _+t}function me(t){m||h.push(b(t))}export function historyReplace(t){m||h.push(b(t))}function f(t){return t.replace(/=&/g,"&").replace(/=$/,"")}function J(){let t="";const l=i.selectedExhibitor,a=i.selectedBooth,e=i.selectedEventItem,o=i.selectedRoute,r=i.selectedSpeaker,n=i.setKioskModeEnabled;if(i.list.type==="route-planner"&&!l&&!a&&!e){const d=s.routePlannerStore;if(d.source==="bookmarks")t=`${P}&${W}=bookmarks`;else{const w=d.items.map(g=>g.entity.slug).filter(Boolean).join(R);t=`${P}=${w}`}const p=d.startPoint?.slug;p&&(t+=`&${$}=${p}`)}else if(o&&!i.isMultiPointRoute){const d=o.from?`:${o.from.slug}`:"",p=o.to?`:${o.to.slug}`:"",w=s.routeStore.onlyAccessible?":true":":false",g=o.waypoints?.map(u=>`:${u.slug}`).join("");t=`route${p}${d}${w}${g||""}`}else if(l)t=l.slug;else if(a)t=a.slug;else if(e)t=e.slug;else if(r)t=r.slug;else if(n)t="";else switch(i.list.type){case"bookmarks":t="bookmarks";break;case"visited":t="visited";break;case"category":t=i.selectedCategory.slug;break;case"search":t=i.list.text||"";break;case x:t=x;break;case"filter":t=`${i.list.query.key}=${i.list.query.value}`;break;case"sessions":t="sessions";break;case"exhibitors":t="exhibitors";break;case"speakers":t="speakers";break;case"tours":t="tours";break;case"multi-point-tour":t=`tour=${i.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=t?"?"+encodeURIComponent(t):"";h.location.search!==c&&(l!==z||a!==j||e!==q?me(c):historyReplace(c),z=l,j=a,q=e)}function X(){const t=i.selectedExhibitor,l=i.selectedEventItem,a=i.selectedSpeaker;let e="";t?e=t.name:l?e=l.name:a?e=a.name:i.list.type==="search"&&i.list.text?e="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(e=i.tourTitle),e.length&&(e+=" \u2013 "),e+=v.title,v.subtitle&&(e+=" \u2013 "+v.subtitle),e+=" \u2013 Expo Floor Plan by ExpoFP",document.title=e}function B(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return oe(t)}function y(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const l=s.boothStore.booths.find(e=>e.slug?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()?.replace(/\s+/g,"")===t?.toLowerCase()),a=new URLSearchParams(decodeURIComponent(window.location.search));if(he(a),pe(a),!B())if(a.has(A)){const e=a.get(A);e==="1"?i.kiosk=!0:e==="0"&&(i.kiosk=!1,i.resetUIScale())}else if(t==="tours")s.selectTours();else if(t.startsWith("tour=")){const e=t.split("=")[1],o=s.toursStore.getTourById(e);o?s.toursStore.launchTour(o,o.name,o.description):(console.warn(`Route with id "${e}" not found`),s.selectTours())}else if(a.has(P)){const e=a.get(W),o=a.get($),r=o?le(o):null;if(e==="bookmarks")s.routePlannerStore.launchFromBookmarks(r??void 0);else{const n=(a.get(P)||"").split(R).filter(Boolean);s.routePlannerStore.launchFromSlugs(n,r??void 0)}}else if(t.startsWith("route")){const e=t.split(R);s.routeStore.setOnlyAccessible(e[3]==="true");const o=ie(e[2],e[1],e.slice(4));s.routeStore.selectRoute(o);const n=e.slice(4).length>0;s.uiState.setIsMultiPointRoute(n);const d=new URLSearchParams(window.location.search).get("title");d&&s.uiState.setRouteTitle(d)}else if(t==="bookmarks")s.selectBookmarks();else if(t==="visited")s.selectVisited();else if(t===x)s.selectLanguage();else if(a.has(K)){const e=a.get(K)?.toLowerCase();fe(e)&&de(e)}else if(t==="sessions")s.selectSessions();else if(t==="exhibitors")s.selectExhibitors();else if(t==="speakers")s.selectSpeakers();else if(t==="-pdf")s.uiState.printingPdf=!0;else if(t.startsWith("hide"))s.uiState.setVisibility(new URLSearchParams(t).get("hide").split(",").filter(Boolean).reduce((e,o)=>({...e,[o]:!1}),{}));else if(l)setTimeout(()=>s.selectBooth(l),250);else if(t===se)s.uiState.startBuildRoute();else if(a.get(N)){const e=a.get(N),o=a.get("booths")?.split(",")||[],r=a.get("exhibitors")?.split(",")||[],n=a.get("tour");if(n){const u=s.toursStore.getTourById(n);u&&D(()=>{s.uiState.setTourTitle(u.name),s.uiState.setTourDescription(u.description),s.uiState.setIsMultiPointTour(!0),s.uiState.setMultiPointTourList(u.id)})}const c=s.boothStore.booths,d=s.exhibitorStore.exhibitors,p=c.filter(u=>o.includes(u.externalId)),w=d.filter(u=>r.includes(u.externalId)).flatMap(u=>u.booths),g=[...p,...w];if(ne()){const u=g.map(ee=>ee.layer.name),M=ue(u);M&&s.fp.activateFloor({name:M})}(o.length>0||r.length>0)&&s.fp.highlightEntities([...o,...r]),s.layerStore.showPathWay(e),g.length>0&&D(()=>{s.uiState.moveToRect=ce.fromMultiple(g.map(u=>u.rect).filter(Boolean)),s.uiState.rollReset=!0})}else{const e=s.eventStore.eventItems.find(o=>o.slug?.toLowerCase()===t?.toLowerCase()||o.externalId?.toLowerCase()===t?.toLowerCase());if(e)s.selectEventItem(e,!0);else{const o=s.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===t?.toLowerCase()||r.externalId?.toLowerCase()===t?.toLowerCase());if(t.startsWith("exhibitors")){const r=t.split("=")[1].split(",");setTimeout(()=>s.fp.selectExhibitor(r),250)}else if(o)setTimeout(()=>s.clickExhibitor(o),250);else if(t.includes("=")&&(t.startsWith("categories=")||t.startsWith("poiType=")))U.log("Skipping filter parameter in dispatchFromUrl:",t);else{const n=s.categoryStore.categories.find(c=>c.slug===t);if(n)s.selectCategory(n);else{const c=s.speakerStore.findBySlug(t);c?s.selectSpeaker(c,!0):t.includes("heatmap=true")||s.searchStore.selectSearch(t)}}}}C=!1,J(),X()}function T(){const t=h.location.search;if(t.includes("heatmap")){const e=new URL(window.location.href);if(e.searchParams.get("heatmap")==="true")if(e.searchParams.get("type")==="yah"){let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmapYah=!0,s.uiState.monochrome=!0,s.uiState.hideLogoInBooth=!0,s.uiState.hideHeaderLogo=!0,s.uiState.disableBookmarked=!0}else{e.searchParams.delete("heatmap");let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmap=!0}}if(t.startsWith("?preview="))historyReplace("?");else if(t.startsWith("?b="))historyReplace("?bookmarks");else if(t.startsWith("?ba=")){const e=new URL(window.location.href),o=parseInt(e.searchParams.get("ba")),r=s.exhibitorStore.exhibitorById.get(o);historyReplace(r?"?"+r.slug:"?bookmarks")}else t.startsWith("?mapbox=false")&&(s.mapboxStore.isMapbox=!1,historyReplace("?"));if(t.includes("blue-dot")){const e=new URL(window.location.href),o=e.searchParams.get("blue-dot").split(",");if(e.searchParams.delete("blue-dot"),o.length>1){const n=s.layerStore.findLayer(o[2])?.name,c=new ae(Number(o[0])||void 0,Number(o[1])||void 0,n,void 0,Number(o[3])||void 0,Number(o[4])||void 0);s.layerStore.layersLoaded?s.routeStore.selectCurrentPosition(c,!1,1):k(()=>s.layerStore.layersLoaded,()=>{s.routeStore.selectCurrentPosition(c,!1,1)})}let r=f(e.search);historyReplace(r)}if(t.includes("copy_exh")){const e=new URL(window.location.href),o=e.searchParams.get("copy_exh");e.searchParams.delete("copy_exh"),historyReplace("?")}if(t.includes("noOverlay")){const e=new URL(window.location.href),o=e.searchParams.get("noOverlay");e.searchParams.delete("noOverlay");let r=f(e.search);o==="true"?s.uiState.hideOverlay=!0:o==="false"&&(s.uiState.hideOverlay=!1),historyReplace(r)}if(t.includes("allowConsent")){const e=new URL(window.location.href),o=e.searchParams.get("allowConsent");e.searchParams.delete("allowConsent");const r=f(e.search);o==="true"?G(!0):o==="false"&&G(!1),historyReplace(r)}if(t.includes("hideHeaderLogo")){const e=new URL(window.location.href),o=e.searchParams.get("hideHeaderLogo");e.searchParams.delete("hideHeaderLogo");const r=f(e.search);o==="true"&&(i.hideHeaderLogo=!0),historyReplace(r)}if(t.includes("hideLogoInBooth")){const e=new URL(window.location.href),o=e.searchParams.get("hideLogoInBooth");e.searchParams.delete("hideLogoInBooth");const r=f(e.search);o==="true"&&(i.hideLogoInBooth=!0),historyReplace(r)}if(t.includes("disableFeatured")){const e=new URL(window.location.href),o=e.searchParams.get("disableFeatured");e.searchParams.delete("disableFeatured");const r=f(e.search);o==="true"&&s.exhibitorStore.exhibitors.forEach(n=>n.featured=!1),historyReplace(r)}if(t.includes("disableBookmarked")){const e=new URL(window.location.href),o=e.searchParams.get("disableBookmarked");e.searchParams.delete("disableBookmarked");const r=f(e.search);o==="true"&&(i.disableBookmarked=!0),historyReplace(r)}if(t.includes("disableGps")){const e=new URL(window.location.href),o=e.searchParams.get("disableGps");e.searchParams.delete("disableGps");const r=f(e.search);o==="true"&&s.routeStore.setGpsTrackingEnabled(!1),historyReplace(r)}if(t.includes("monochrome")){const e=new URL(window.location.href),o=e.searchParams.get("monochrome");e.searchParams.delete("monochrome");const r=f(e.search);o==="true"&&(i.monochrome=!0),historyReplace(r)}if((t.startsWith("?fbclid")||t.startsWith("?_ga"))&&historyReplace("?"),t.includes(I)){const e=new URL(window.location.href),o=e.searchParams.get(I);o==="1"||o==="true"?L&&localStorage.setItem(H,"1"):(o==="0"||o==="false")&&L&&localStorage.removeItem(H),e.searchParams.delete(I),historyReplace(f(e.search))}if(t.includes(E)){const e=new URL(window.location.href),o=e.searchParams.get(E);o==="true"?L&&localStorage.setItem(F,"1"):o==="false"&&L&&localStorage.removeItem(F),e.searchParams.delete(E),historyReplace(f(e.search))}if(i.previewExhibitor&&historyReplace("?"+i.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let e=h.location.search;e=e.startsWith("?")?e.slice(1):e;const o=e.includes("&")?"&":"%26",n=e.split(o).map(c=>{const d=s.exhibitorStore.exhibitors.find(p=>p.slug===c||p.externalId===c);return d?d.name:c}).join("&");historyReplace("?"+n)}const l=new URLSearchParams(window.location.search);if(l.has(V)){s.uiState.resetUIScale();const e=new URL(window.location.href);e.searchParams.delete(V);let o=f(e.search);m=!0,historyReplace(o),m=!1}const a=l.get(Y);if(a){const e=a.replace(",","."),o=parseFloat(e);!isNaN(o)&&o>=.8&&o<=1.4?s.uiState.setUIScale(o,!0):U.warn(`Invalid ui-scale parameter: ${a}. Must be a number between 0.8 and 1.4.`);const r=new URL(window.location.href);r.searchParams.delete(Y);let n=f(r.search);m=!0,historyReplace(n),m=!1}}export function initRouting(t=!1){m=t,!m&&b(h.location.search)===_&&S.push(b(h.location.search)),Q=h.listen((l,a)=>{m||(S.push(b(l.search)),U.log("history",a,l),a==="POP"&&y())}),T(),B(),k(()=>s.layerStore.layersLoaded,()=>{s.urlFilterManager&&!s.urlFilterManager.isInitialized&&s.urlFilterManager.initialize(),y(),O(X),O(J),i.viewerMode&&(i.menu=!0)})}export function applyParameters(t=""){historyReplace("?"+decodeURIComponent(t.toString())),s.layerStore.layersLoaded?(T(),y()):(B(),k(()=>s.layerStore.layersLoaded,()=>{T(),y()}))}export function destroyHistory(){Q()}export function goBack(){if(console.log("goBack"),S.length>1){S.pop();const l=S[S.length-1].replace(_,"");return m=!0,h.replace(l),m=!1,y(),!0}else return h.go(-1),!1}function pe(t){try{let l={};const a=i.defaultMapSettings;if(new Set(t.keys()).size)l=Z(Object.fromEntries(t.entries()),a);else{const e=sessionStorage.getItem(re);e&&(l=Z(JSON.parse(e),a))}if(i.setMapSettings(l),l.z){const e=s.layerStore.layers.find(o=>o.name===l.z);e&&s.layerStore.updateVisibility(e,!0)}}catch(l){console.error("Failed to process or save map settings.",l)}}function Z(t,l){const a={};for(const e in t){if(!Object.prototype.hasOwnProperty.call(l,e)||!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];typeof l[e]=="number"&&typeof o=="string"?a[e]=parseFloat(o):a[e]=o}return a}
@@ -43,7 +43,6 @@ export declare abstract class BoothBase {
43
43
  readonly poiTypeId: number;
44
44
  readonly poiType: RawPoiType;
45
45
  readonly poiIcon: string;
46
- readonly yah: boolean;
47
46
  readonly meta: Record<string, string>;
48
47
  layer: Layer;
49
48
  bookmarkedDirectly: boolean;
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as l}from"tslib";import{lineLength as M,lineRectangleIntersections as C,pointInsideRectangle as L,Rect as N}from"simple-geometry";import{action as R,computed as i,observable as S}from"mobx";import E from"../tools/settings";import{uiState as j}from"./index";let O=(()=>{let o=[],c,m=[],u=[],b,g=[],k=[],y,p,f,_,v,B,x;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;c=[S],b=[S],y=[i({keepAlive:!0})],p=[i({keepAlive:!0})],f=[i({keepAlive:!0})],_=[i({keepAlive:!0})],v=[i({keepAlive:!0})],B=[i],x=[R],s(this,null,y,{kind:"getter",name:"boothById",static:!1,private:!1,access:{has:e=>"boothById"in e,get:e=>e.boothById},metadata:t},null,o),s(this,null,p,{kind:"getter",name:"boothByExternalId",static:!1,private:!1,access:{has:e=>"boothByExternalId"in e,get:e=>e.boothByExternalId},metadata:t},null,o),s(this,null,f,{kind:"getter",name:"boothByName",static:!1,private:!1,access:{has:e=>"boothByName"in e,get:e=>e.boothByName},metadata:t},null,o),s(this,null,_,{kind:"getter",name:"boothBySlug",static:!1,private:!1,access:{has:e=>"boothBySlug"in e,get:e=>e.boothBySlug},metadata:t},null,o),s(this,null,v,{kind:"getter",name:"borderWidth",static:!1,private:!1,access:{has:e=>"borderWidth"in e,get:e=>e.borderWidth},metadata:t},null,o),s(this,null,B,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,o),s(this,null,x,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,o),s(null,null,c,{kind:"field",name:"booths",static:!1,private:!1,access:{has:e=>"booths"in e,get:e=>e.booths,set:(e,r)=>{e.booths=r}},metadata:t},m,u),s(null,null,b,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,r)=>{e.highlightedByExternalIds=r}},metadata:t},g,k),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,o);booths=l(this,m,[]);highlightedByExternalIds=(l(this,u),l(this,g,[]));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(E.boothBorderWidth)return E.boothBorderWidth;if(E.EXPO==="groomexpo")return .4;const t=this.booths.filter(e=>e.rect).map(e=>e.rect.w+e.rect.h);return t.reduce((e,r)=>e+r,0)/t.length/80}constructor(t){l(this,k),this.rootStore=t}get bookmarked(){return this.booths.filter(t=>t.bookmarkedDirectly)}getNearestBooth(t){var e=null;const d=this.booths.map(a=>{const{x1:n,x2:I,y1:h,y2:D}=a.rect,A=Math.abs(I-n),z=Math.abs(D-h);return{lineLength:M(t,C({p0:t,p1:{x:a.rect.cx,y:a.rect.cy}},new N({x:n,y:h},{x:n+A,y:h},{x:n+A,y:h+z},{x:n,y:h+z}))[0]),name:a.name}}).sort((a,n)=>a.lineLength-n.lineLength)[0];return e=this.booths.find(a=>a.name===d.name),e}getBoothAtPoint(t){return this.booths.find(e=>{const{x1:r,x2:d,y1:a,y2:n}=e.rect,I=Math.abs(d-r),h=Math.abs(n-a),D=new N({x:r,y:a},{x:r+I,y:a},{x:r+I,y:a+h},{x:r,y:a+h});return L(t,D)})}findBooth(t){return this.boothByExternalId.get(t)||this.boothByName.get(t.toLowerCase())||this.boothBySlug.get(t)}replaceBookmarked(t){const e=(t||[]).map(a=>this.boothById.get(a)).filter(a=>a),r=new Set(e),d=this.bookmarked.filter(a=>!r.has(a));for(const a of d)a.bookmarkedDirectly=!1;for(const a of e)a.bookmarkedDirectly=!0}}})();export default O;let w=(()=>{let o=[],c,m=[],u=[],b,g=[],k=[],y,p,f,_,v,B,x;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;c=[S],b=[S],y=[i({keepAlive:!0})],p=[i({keepAlive:!0})],f=[i({keepAlive:!0})],_=[i({keepAlive:!0})],v=[i({keepAlive:!0})],B=[i({keepAlive:!0})],x=[i({keepAlive:!0})],s(this,null,y,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,o),s(this,null,p,{kind:"getter",name:"uiState",static:!1,private:!1,access:{has:e=>"uiState"in e,get:e=>e.uiState},metadata:t},null,o),s(this,null,f,{kind:"getter",name:"fullName",static:!1,private:!1,access:{has:e=>"fullName"in e,get:e=>e.fullName},metadata:t},null,o),s(this,null,_,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,o),s(this,null,v,{kind:"getter",name:"hover",static:!1,private:!1,access:{has:e=>"hover"in e,get:e=>e.hover},metadata:t},null,o),s(this,null,B,{kind:"getter",name:"selected",static:!1,private:!1,access:{has:e=>"selected"in e,get:e=>e.selected},metadata:t},null,o),s(this,null,x,{kind:"getter",name:"skipDim",static:!1,private:!1,access:{has:e=>"skipDim"in e,get:e=>e.skipDim},metadata:t},null,o),s(null,null,c,{kind:"field",name:"layer",static:!1,private:!1,access:{has:e=>"layer"in e,get:e=>e.layer,set:(e,r)=>{e.layer=r}},metadata:t},m,u),s(null,null,b,{kind:"field",name:"bookmarkedDirectly",static:!1,private:!1,access:{has:e=>"bookmarkedDirectly"in e,get:e=>e.bookmarkedDirectly,set:(e,r)=>{e.bookmarkedDirectly=r}},metadata:t},g,k),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}store=l(this,o);id;name;externalId;title;rect;borderWidth;borderColor;noLabels;rotate;paths;pathsWithRect;slug;error;description;exhibitors;labelColor;schedule;poiTypeId;poiType;poiIcon;yah;meta;layer=l(this,m,void 0);bookmarkedDirectly=(l(this,u),l(this,g,!1));get bookmarked(){return j.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(){let t=`${this.yah?this.title:this.name}`;const e=this.meta?Object.entries(this.meta).filter(([r])=>!r.startsWith("_")).map(([r,d])=>`${r} ${d}`).join(" "):"";return`${t} ${e}`.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,k)}}})();export{w as BoothBase};export class RegularBooth extends w{buyUrl;reserveUrl;type;status;price;entity={type:"booth",variant:"regular"};size;availColor;soldColor;holdColor;onHold;reserved;shapes}export class SpecialBooth extends w{color;shapes;entity={type:"booth",variant:"special"}}
1
+ import{__esDecorate as s,__runInitializers as l}from"tslib";import{lineLength as M,lineRectangleIntersections as C,pointInsideRectangle as L,Rect as N}from"simple-geometry";import{action as R,computed as i,observable as S}from"mobx";import E from"../tools/settings";import{uiState as j}from"./index";let O=(()=>{let o=[],d,c=[],m=[],u,b=[],g=[],k,p,y,f,_,v,B;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;d=[S],u=[S],k=[i({keepAlive:!0})],p=[i({keepAlive:!0})],y=[i({keepAlive:!0})],f=[i({keepAlive:!0})],_=[i({keepAlive:!0})],v=[i],B=[R],s(this,null,k,{kind:"getter",name:"boothById",static:!1,private:!1,access:{has:e=>"boothById"in e,get:e=>e.boothById},metadata:t},null,o),s(this,null,p,{kind:"getter",name:"boothByExternalId",static:!1,private:!1,access:{has:e=>"boothByExternalId"in e,get:e=>e.boothByExternalId},metadata:t},null,o),s(this,null,y,{kind:"getter",name:"boothByName",static:!1,private:!1,access:{has:e=>"boothByName"in e,get:e=>e.boothByName},metadata:t},null,o),s(this,null,f,{kind:"getter",name:"boothBySlug",static:!1,private:!1,access:{has:e=>"boothBySlug"in e,get:e=>e.boothBySlug},metadata:t},null,o),s(this,null,_,{kind:"getter",name:"borderWidth",static:!1,private:!1,access:{has:e=>"borderWidth"in e,get:e=>e.borderWidth},metadata:t},null,o),s(this,null,v,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,o),s(this,null,B,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,o),s(null,null,d,{kind:"field",name:"booths",static:!1,private:!1,access:{has:e=>"booths"in e,get:e=>e.booths,set:(e,r)=>{e.booths=r}},metadata:t},c,m),s(null,null,u,{kind:"field",name:"highlightedByExternalIds",static:!1,private:!1,access:{has:e=>"highlightedByExternalIds"in e,get:e=>e.highlightedByExternalIds,set:(e,r)=>{e.highlightedByExternalIds=r}},metadata:t},b,g),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=l(this,o);booths=l(this,c,[]);highlightedByExternalIds=(l(this,m),l(this,b,[]));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(E.boothBorderWidth)return E.boothBorderWidth;if(E.EXPO==="groomexpo")return .4;const t=this.booths.filter(e=>e.rect).map(e=>e.rect.w+e.rect.h);return t.reduce((e,r)=>e+r,0)/t.length/80}constructor(t){l(this,g),this.rootStore=t}get bookmarked(){return this.booths.filter(t=>t.bookmarkedDirectly)}getNearestBooth(t){var e=null;const x=this.booths.map(a=>{const{x1:n,x2:I,y1:h,y2:D}=a.rect,A=Math.abs(I-n),z=Math.abs(D-h);return{lineLength:M(t,C({p0:t,p1:{x:a.rect.cx,y:a.rect.cy}},new N({x:n,y:h},{x:n+A,y:h},{x:n+A,y:h+z},{x:n,y:h+z}))[0]),name:a.name}}).sort((a,n)=>a.lineLength-n.lineLength)[0];return e=this.booths.find(a=>a.name===x.name),e}getBoothAtPoint(t){return this.booths.find(e=>{const{x1:r,x2:x,y1:a,y2:n}=e.rect,I=Math.abs(x-r),h=Math.abs(n-a),D=new N({x:r,y:a},{x:r+I,y:a},{x:r+I,y:a+h},{x:r,y:a+h});return L(t,D)})}findBooth(t){return this.boothByExternalId.get(t)||this.boothByName.get(t.toLowerCase())||this.boothBySlug.get(t)}replaceBookmarked(t){const e=(t||[]).map(a=>this.boothById.get(a)).filter(a=>a),r=new Set(e),x=this.bookmarked.filter(a=>!r.has(a));for(const a of x)a.bookmarkedDirectly=!1;for(const a of e)a.bookmarkedDirectly=!0}}})();export default O;let w=(()=>{let o=[],d,c=[],m=[],u,b=[],g=[],k,p,y,f,_,v,B;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;d=[S],u=[S],k=[i({keepAlive:!0})],p=[i({keepAlive:!0})],y=[i({keepAlive:!0})],f=[i({keepAlive:!0})],_=[i({keepAlive:!0})],v=[i({keepAlive:!0})],B=[i({keepAlive:!0})],s(this,null,k,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,o),s(this,null,p,{kind:"getter",name:"uiState",static:!1,private:!1,access:{has:e=>"uiState"in e,get:e=>e.uiState},metadata:t},null,o),s(this,null,y,{kind:"getter",name:"fullName",static:!1,private:!1,access:{has:e=>"fullName"in e,get:e=>e.fullName},metadata:t},null,o),s(this,null,f,{kind:"getter",name:"visible",static:!1,private:!1,access:{has:e=>"visible"in e,get:e=>e.visible},metadata:t},null,o),s(this,null,_,{kind:"getter",name:"hover",static:!1,private:!1,access:{has:e=>"hover"in e,get:e=>e.hover},metadata:t},null,o),s(this,null,v,{kind:"getter",name:"selected",static:!1,private:!1,access:{has:e=>"selected"in e,get:e=>e.selected},metadata:t},null,o),s(this,null,B,{kind:"getter",name:"skipDim",static:!1,private:!1,access:{has:e=>"skipDim"in e,get:e=>e.skipDim},metadata:t},null,o),s(null,null,d,{kind:"field",name:"layer",static:!1,private:!1,access:{has:e=>"layer"in e,get:e=>e.layer,set:(e,r)=>{e.layer=r}},metadata:t},c,m),s(null,null,u,{kind:"field",name:"bookmarkedDirectly",static:!1,private:!1,access:{has:e=>"bookmarkedDirectly"in e,get:e=>e.bookmarkedDirectly,set:(e,r)=>{e.bookmarkedDirectly=r}},metadata:t},b,g),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}store=l(this,o);id;name;externalId;title;rect;borderWidth;borderColor;noLabels;rotate;paths;pathsWithRect;slug;error;description;exhibitors;labelColor;schedule;poiTypeId;poiType;poiIcon;meta;layer=l(this,c,void 0);bookmarkedDirectly=(l(this,m),l(this,b,!1));get bookmarked(){return j.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,r])=>`${e} ${r}`).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,g)}}})();export{w as BoothBase};export class RegularBooth extends w{buyUrl;reserveUrl;type;status;price;entity={type:"booth",variant:"regular"};size;availColor;soldColor;holdColor;onHold;reserved;shapes}export class SpecialBooth extends w{color;shapes;entity={type:"booth",variant:"special"}}