@expofp/floorplan 3.30.0 → 3.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-CtLPpS0B.js → Button-Zxrsl7_L.js} +5 -5
- package/dist/browser/{CookieConsent-qcNbV6oo.js → CookieConsent-BHPlLMdB.js} +7 -7
- package/dist/browser/{Debug-7pyi5lC7.js → Debug-CqHF7Ui7.js} +8 -8
- package/dist/browser/{DebugTools-D6MakMFa.js → DebugTools-DVIQiwOF.js} +6 -6
- package/dist/browser/{Demo-BHQ6BWuD.js → Demo-CTPQwjin.js} +10 -10
- package/dist/browser/{Free--d5egC62.js → Free-BN8DnixI.js} +10 -10
- package/dist/browser/{GalleryContainer-nbQ6RNk7.js → GalleryContainer-R9pRm1yT.js} +10 -10
- package/dist/browser/{GpsLoader-BJZZnDGE.js → GpsLoader-DY9QSSSB.js} +11 -11
- package/dist/browser/{KioskStore-C-Ha84_n.js → KioskStore-uv260o-I.js} +6 -6
- package/dist/browser/{MaplibreAdapter-Bo0rF52J.js → MaplibreAdapter-1WunjDYc.js} +824 -824
- package/dist/browser/{ModalContainer-CP1hP4TP.js → ModalContainer-Dpq2q9kp.js} +11 -11
- package/dist/browser/{PermissionNotice-CogpdrIp.js → PermissionNotice-BMglbCjv.js} +7 -7
- package/dist/browser/{SetKioskMode-CLPHEIxv.js → SetKioskMode-BqhffCFe.js} +10 -10
- package/dist/browser/{ShowKiosk-D_q8C4Nr.js → ShowKiosk-CSzg-3PN.js} +11 -11
- package/dist/browser/{ViewerMenuPanel-CymDinXs.js → ViewerMenuPanel-DYcOfmvC.js} +22 -22
- package/dist/browser/{add-debug-secret-listener-BgrIpqdV.js → add-debug-secret-listener-Do7AJQ-B.js} +1 -1
- package/dist/browser/{adopt-global-settings-DNoeRJtC.js → adopt-global-settings-CUq7CaWO.js} +9 -9
- package/dist/browser/{boolean-editor-DcFZCtfq.js → boolean-editor-QNRg7mv9.js} +9 -9
- package/dist/browser/{bootIntercom-DGm0-qrx.js → bootIntercom-DNmECjIb.js} +3 -3
- package/dist/browser/bundle.json +69 -69
- package/dist/browser/{camera-events-CcewxKY5.js → camera-events-D-1cgSrw.js} +1 -1
- package/dist/browser/{classnames-CtSXz0js.js → classnames-B_d2JNXt.js} +2 -2
- package/dist/browser/{client-DlH0b6aw.js → client-Bi66nh-4.js} +5 -5
- package/dist/browser/{components-Dx6cpab4.js → components-BWzDaly-.js} +1170 -983
- package/dist/browser/{debug-context-Cjmnzg3u.js → debug-context-DcVFe_Lc.js} +5 -5
- package/dist/browser/{debug-overlay-DonwvLwe.js → debug-overlay-BRwTLlVL.js} +10 -10
- package/dist/browser/{debug-ui-PgwhPHHP.js → debug-ui-C0sCYhBI.js} +6 -6
- package/dist/browser/{dimming-TYIWyLrc.js → dimming-CoGADDvw.js} +236 -234
- package/dist/browser/{dist-DtjjLmZ0.js → dist-CL4lGmQ7.js} +6 -6
- package/dist/browser/{dist-C7ShhntP.js → dist-DRk_kZKE.js} +5 -5
- package/dist/browser/{dist-D1D62gaR.js → dist-DXvqqBfz.js} +3 -3
- package/dist/browser/{efp-debug-init-DKE8cNyV.js → efp-debug-init-qLhKaNXN.js} +3 -3
- package/dist/browser/{enum-editor-CSc_yWg7.js → enum-editor-Ced7jQUo.js} +4 -4
- package/dist/browser/{es5-CbsscoEF.js → es5-CtwPM82h.js} +2 -2
- package/dist/browser/{event-not-found-DC-MB7az.js → event-not-found-BJjV15mx.js} +1 -1
- package/dist/browser/{exports-CqMLi1pn.js → exports-B5pk0udX.js} +1 -1
- package/dist/browser/{favicon-BH5XnDv9.js → favicon-RMbXtA1H.js} +1 -1
- package/dist/browser/{fetch-retry.umd-DWl09AgW.js → fetch-retry.umd-ByYo1XFL.js} +2 -2
- package/dist/browser/{flex-CC4jmZ-J.js → flex-CQhKN_F2.js} +5 -5
- package/dist/browser/{floorplan.loader-BG5RQBob.js → floorplan.loader-7eeXMIBw.js} +10 -10
- package/dist/browser/{floorplan.ready-QlSmZMAj.js → floorplan.ready-DU8FaeTN.js} +18 -18
- package/dist/browser/{fuse-By5SED55.js → fuse-DIFfBV5K.js} +2 -2
- package/dist/browser/{i18n-BCIfmbUi.js → i18n-BhKie60p.js} +5 -5
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-B6LUx2-2.js → index.module-Cfh6T1sl.js} +4 -4
- package/dist/browser/{integrateKiosk-CREO-tu9.js → integrateKiosk-B6hctdem.js} +5 -5
- package/dist/browser/{is-webview-DaA-z3m1.js → is-webview-95gKBmNA.js} +1 -1
- package/dist/browser/{jsx-runtime-2z2znmc1.js → jsx-runtime-iavSqS3n.js} +2 -2
- package/dist/browser/{kiosk-record-BPfOT1ip.js → kiosk-record-CfjEW7WB.js} +1 -1
- package/dist/browser/{lib-CACFAagC.js → lib-CIZx-v0G.js} +3 -3
- package/dist/browser/{loadImage-D8vy0Mv-.js → loadImage-DW14-NrZ.js} +4 -4
- package/dist/browser/{logDeviceInfo-DfnLjBvH.js → logDeviceInfo-C0H4zpF1.js} +9 -9
- package/dist/browser/{mobx-DHMEvdyY.js → mobx-D_lfMZGC.js} +4 -4
- package/dist/browser/{optional-boolean-editor-DXhkgcnx.js → optional-boolean-editor-gLxb1EfH.js} +3 -3
- package/dist/browser/{optional-enum-editor-CLz8Tl9q.js → optional-enum-editor-Df_RvQ-w.js} +4 -4
- package/dist/browser/{optional-string-editor-BOfh7J4B.js → optional-string-editor-CZlXCy_b.js} +4 -4
- package/dist/browser/{particles.min-B5vL2pb7.js → particles.min-BmhrldLm.js} +2 -2
- package/dist/browser/{react-BgBw9jbh.js → react-Brvhg-xh.js} +2 -2
- package/dist/browser/{react-dom-CnC72DLX.js → react-dom-6jF-UVR3.js} +3 -3
- package/dist/browser/{rolldown-runtime-DtkWy_tj.js → rolldown-runtime-k8xrJES4.js} +1 -1
- package/dist/browser/{scheduler--CR00YC_.js → scheduler-C87k6FXk.js} +2 -2
- package/dist/browser/{select-CZrP-h2-.js → select-EAJIc_L6.js} +10 -10
- package/dist/browser/{settings-lkI4iHuB.js → settings-CR-KWdwH.js} +2 -2
- package/dist/browser/{settings-item-DLBfNwUk.js → settings-item-uJSoUoiz.js} +6 -6
- package/dist/browser/{store-CqbDYCfW.js → store-NHdnYbrz.js} +103 -99
- package/dist/browser/{string-editor-pESFWbET.js → string-editor-gLsfuXuu.js} +4 -4
- package/dist/browser/{text-field-C5iLAXHr.js → text-field-CFNebSVw.js} +5 -5
- package/dist/browser/{theme-CY6T-QhX.js → theme-DU1fheT_.js} +8 -8
- package/dist/browser/{ui-BN6XW7ip.js → ui-DyeTcwQr.js} +8 -8
- package/dist/browser/{useRenderTarget-CyJc23ib.js → useRenderTarget-pX44x65X.js} +5 -5
- package/dist/browser/{viewport-Bcui6W6f.js → viewport-NsKO0_TX.js} +3 -3
- package/dist/esm/components/AutocompleteContainer.d.ts +1 -1
- package/dist/esm/components/AutocompleteContainer.js +1 -1
- package/dist/esm/components/Map/traffic/useManageTraffic.d.ts +1 -1
- package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
- package/dist/esm/components/Maplibre/useCameraReactions.js +1 -1
- package/dist/esm/components/OverlayContainer.js +1 -1
- package/dist/esm/components/SearchBox.js +1 -1
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +2 -0
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/test/store-harness.d.ts +19 -0
- package/dist/esm/test/store-harness.js +1 -0
- package/package.json +10 -10
|
@@ -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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.31.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "cbb5c555-77ff-4375-8420-80c8ae476dcf", e._sentryDebugIdIdentifier = "sentry-dbid-cbb5c555-77ff-4375-8420-80c8ae476dcf");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime-
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-k8xrJES4.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-qLhKaNXN.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-CUq7CaWO.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-iavSqS3n.js";
|
|
13
|
+
import "./settings-CR-KWdwH.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-Do7AJQ-B.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
|
|
17
17
|
function d() {
|
|
@@ -26,7 +26,7 @@ function d() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let o = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-C0sCYhBI.js"), { createRoot: i } = await import("./client-Bi66nh-4.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.jsx)(n, {
|
|
31
31
|
useDebugButtonState: r.useState,
|
|
32
32
|
open: t
|
|
@@ -1,14 +1,14 @@
|
|
|
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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.31.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7407e64e-4c4e-4bfb-b2ef-80063ad22998", e._sentryDebugIdIdentifier = "sentry-dbid-7407e64e-4c4e-4bfb-b2ef-80063ad22998");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { l as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-k8xrJES4.js";
|
|
10
|
+
import { t } from "./react-Brvhg-xh.js";
|
|
11
|
+
import { l as n } from "./store-NHdnYbrz.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.31.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "30d5a1aa-2d79-4710-91d1-937109f43b1a", e._sentryDebugIdIdentifier = "sentry-dbid-30d5a1aa-2d79-4710-91d1-937109f43b1a");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { c as e, vt as t } from "./store-
|
|
9
|
+
import { c as e, vt as t } from "./store-NHdnYbrz.js";
|
|
10
10
|
//#region src/components/Map/viewport.ts
|
|
11
11
|
function n(e) {
|
|
12
12
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type AutocompleteProps } from '@expofp/ui';
|
|
2
|
-
declare const AutocompleteContainer: import("react").FunctionComponent<Omit<AutocompleteProps<import("@expofp/ui").AutocompleteOptionObject>, "ariaLabel" | "clearLabel" | "noOptionsLabel" | "renderTarget">>;
|
|
2
|
+
declare const AutocompleteContainer: import("react").FunctionComponent<Omit<AutocompleteProps<import("@expofp/ui").AutocompleteOptionObject>, "ariaLabel" | "clearLabel" | "inline" | "noOptionsLabel" | "renderTarget">>;
|
|
3
3
|
export default AutocompleteContainer;
|
|
4
4
|
//# sourceMappingURL=AutocompleteContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Autocomplete as a}from"@expofp/ui";import{observer as m}from"mobx-react-lite";import{t as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Autocomplete as a}from"@expofp/ui";import{observer as m}from"mobx-react-lite";import i from"../store";import{t as o}from"../utils/i18n";import{useRenderTarget as n}from"../utils/useRenderTarget";const p=m(r=>{const e=n();return t(a,{...r,renderTarget:e,inline:i.uiState.overlayBottom,noOptionsLabel:o("No options"),ariaLabel:o("Search options"),clearLabel:o("Clear")})});export default p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{degToRad as
|
|
1
|
+
import{degToRad as Me,lineAngle as ae,pointDistance as le}from"@expofp/geometry";import{update as W}from"@expofp/renderer";import{useEffect as Le,useRef as R}from"react";import{getBounds as k}from"../../../engine/canvases";import Re from"../../../tools/base-runtime-url";import{loadImage as Se}from"../../../utils/loadImage";import{mapCamera as ue}from"../camera";import{createImageCanvas as be}from"../drawing/config/canvases";import{getRouteLayerRegex as ve,getRouteStopLayerRegex as Te,TRAFFIC_VEHICLES as te}from"./trafficLayers";import{UpdateQueue as Ae}from"./UpdateQueue";const ne=2,Fe=ne*3.5,Z=ne*12,de=Z*.7,Pe=8,Ce="transport_locations",_e=150,Ne="#a4aab6",he=1e3,De=2e4,fe=500;export function useManageTraffic({permission:t,scene:r,dataJsonUrl:n,websocketUrl:a}){const e=R(window.devicePixelRatio),s=R(new Map),o=R(new Map),c=R(null),w=R(null),d=R(0),M=R(1),T=R(new Ae),S=R(new Map),x=R(he),f=R(new Map),p=R(void 0);Le(()=>{if(!t||!r)return;let l=!1,P;const b=r.rootLayer.children,g=o.current,y=s.current,I=T.current;async function ye(){try{let u;try{const i=await fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok||i.status===204)return;u=await i.json()}catch(i){console.warn("useManageTraffic failed to get JSON",i)}if(!u||u.disabled||u.error)return;e.current=ge(ue()?.state().pixelSize??window.devicePixelRatio);const N=new Map(u.routes.map(({id:i,color:m})=>[i,m])),Y=new Map;N.forEach(i=>{Y.set(i,Ve({radius:Fe,color:i,scale:window.devicePixelRatio}))});const $=ve(),z=b.filter(i=>$.test(i.name)),G=Te(),U=b.filter(i=>G.test(i.name));u.routes.slice(0,z.length).forEach(({id:i,color:m,path:h,stops:B,hiddenPoints:L},Q)=>{S.current.set(i,h);const E=z[Q];if(E){const O=new Map(L?.map(C=>[ce(C),C])??[]);for(let C=1;C<h.length;C++){const v=h[C-1],V=h[C];O.has(ce(v))||O.has(ce(V))||E.children.push({points:{p0:v,p1:V},color:m,width:ne})}E.children.length&&I.add(()=>W(E))}const A=U[Q],F=Y.get(m);A&&F&&B?.length&&(B.forEach(O=>{A.children.push({source:F,bounds:k(O.x,O.y,F.width,F.height,e.current)})}),A.children.length&&I.add(()=>W(A)))});const D=b.find(i=>i.name===te);if(!D){console.warn(`useManageTraffic: the scene has no "${te}" layer`);return}const j=new Map;D.onScale=({pixelSize:i})=>{e.current=ge(i);const m=[];for(const h of U){const B=h.children;for(const L of B)L.bounds=k(L.bounds.center.x,L.bounds.center.y,L.source.width,L.source.height,e.current,L.bounds.rotation),m.push(L)}for(const h of s.current.values())h.bounds=k(h.bounds.center.x,h.bounds.center.y,h.source.width,h.source.height,e.current,h.bounds.rotation),m.push(h);return m},I.add(()=>W(D)),N.forEach((i,m)=>{j.set(m,me({id:m,width:Z,height:Z,color:i,scale:window.devicePixelRatio}))});const xe=me({id:"orphan",width:Z,height:Z,color:Ne,scale:window.devicePixelRatio});let q=null;try{const i=await Se(`${Re}icons/bus-white.svg`);q=be(i,de,de,window.devicePixelRatio)}catch(i){console.error(i)}w.current=i=>{try{const m=JSON.parse(i.data);if(m.type!==Ce)return;const h=i.timeStamp||performance.now();M.current=Math.round(h-d.current),d.current=h;const B=Math.max(M.current??fe,fe),L=D.children;let Q=!1;m.data.forEach(({id:E,x:A,y:F,route_id:O,hidden:C})=>{g.has(E)&&(g.get(E)?.(),g.delete(E));const v=y.get(E),V=y.get(re(E))??null;if(C&&v&&V){v.hidden=!0,V.hidden=!0,I.add(()=>W(v,V));return}if(f.current.set(E,performance.now()),!v){const H=j.get(O)??xe,_={source:H,bounds:k(A,F,H.width,H.height,e.current,0)};if(y.set(E,_),q){const X=re(E),ie={source:q,bounds:k(A,F,q.width,q.height,e.current,0)};q.setAttribute("id",X),y.set(X,ie),L.push(_,ie)}else L.push(_);Q=!0;return}const Ee=v.bounds.center,ee=We(Ee,{x:A,y:F},S.current.get(O));if(ee.reduce((H,_,X)=>X===0?H:H+oe(ee[X-1],_),0)>=_e||document.hidden)we({updateQueue:I,vehicle:v,vehicleFinery:V,x:A,y:F,scale:e.current,angle:Oe(v.bounds.center,{x:A,y:F})});else{const H=ke(ee,B,_=>{we({updateQueue:I,vehicle:v,vehicleFinery:V,x:_.x,y:_.y,scale:e.current,angle:_.angle})});g.set(E,H)}}),Q&&I.add(()=>W(D))}catch(m){console.error("handleSocketMessage",m)}},d.current=performance.now(),K(),window.addEventListener("online",se),Ie(u.config?(Number(u.config.vehicle_inactive_interval)||20)*1e3:De)}catch(u){console.warn(u)}}ye();function K(){l||c.current?.readyState===WebSocket.OPEN||c.current?.readyState===WebSocket.CONNECTING||(c.current=new WebSocket(a),c.current.onmessage=w.current,c.current.onopen=()=>{x.current=he},c.current.onclose=()=>{if(l||!navigator.onLine)return;P=window.setTimeout(K,x.current);const u=3e4;x.current=Math.min(x.current*2,u)})}function se(){K()}function Ie(u){clearInterval(p.current),p.current=window.setInterval(()=>{const N=performance.now(),Y=[],$=[];f.current.forEach((z,G)=>{if(N-z<u)return;const U=y.get(G);U&&(U.hidden=!0,$.push(U),Y.push(G));const D=re(G),j=y.get(D);j&&(j.hidden=!0,$.push(j),Y.push(D))}),$.length&&I.add(()=>W(...$)),Y.forEach(z=>f.current.delete(z))},u)}return()=>{l=!0,clearTimeout(P),c.current?.close(),c.current=null;const u=b.find(N=>N.name===te);u&&(u.onScale=void 0),g.forEach(N=>N?.()),g.clear(),y.clear(),I.destroy(),window.removeEventListener("online",se),clearInterval(p.current)}},[t,r,n,a])}function ge(t){return Math.min(t||window.devicePixelRatio,Pe)}function Oe(t,r){return ae(t,r)}function Ve({radius:t,scale:r,color:n}){const a=document.createElement("canvas"),e=a.getContext("2d");e.imageSmoothingEnabled=!1;const s=Math.ceil(t*2*r),o=s/2,c=t*.78,w=t*.33;return a.width=s,a.height=s,e.translate(o,o),e.scale(r,r),e.beginPath(),e.arc(0,0,t,0,2*Math.PI),e.fillStyle="#FFFFFF",e.fill(),e.beginPath(),e.arc(0,0,c,0,2*Math.PI),e.fillStyle=n,e.fill(),e.beginPath(),e.arc(0,0,w,0,2*Math.PI),e.fillStyle="#FFFFFF",e.fill(),a}function me({id:t,width:r,height:n,color:a,scale:e}){const s=2*e,o=r/2*e,c=n*e,w=.6,d=.01,M=c*w,T=c,S=8*e,x=T+s+M/2+S*2,f=o*2+M+s+S*2,p=document.createElement("canvas");p.setAttribute("id",t),p.width=x,p.height=f;const l=p.getContext("2d"),P=x/2,b=f/2;l.save(),l.translate(P,b),l.rotate(-Math.PI/2),l.translate(-P,-b);const g=P,y=b-T/2+o,I=y+M;return l.shadowColor="rgba(16, 24, 40, 0.2)",l.shadowBlur=S/2,l.beginPath(),l.arc(g,y,o,Math.PI,0,!1),l.bezierCurveTo(g+o,y+c*.3,g+d*o,I,g,I),l.bezierCurveTo(g-d*o,I,g-o,y+c*.3,g-o,y),l.closePath(),l.fillStyle=a,l.fill(),l.strokeStyle="#FFFFFF",l.lineWidth=s,l.stroke(),l.restore(),p}function oe(t,r){return le(t,r)}function re(t){return`${t}_finery`}function we({updateQueue:t,vehicle:r,vehicleFinery:n,x:a,y:e,scale:s,angle:o}){if(r.bounds=k(a,e,r.source.width,r.source.height,s,o),r.hidden=!1,n){const c=ue()?.state().roll??0;n.bounds=k(a,e,n.source.width,n.source.height,s,Me(c)),n.hidden=!1,t.add(()=>W(n,r))}else t.add(()=>W(r))}function J(t,r,n){return{x:t.x+(r.x-t.x)*n,y:t.y+(r.y-t.y)*n}}function pe(t,r){let n=1/0,a={index:0,t:0};for(let e=0;e<r.length-1;e++){const s=r[e],o=r[e+1],c=o.x-s.x,w=o.y-s.y,d=c*c+w*w,M=d?((t.x-s.x)*c+(t.y-s.y)*w)/d:0,T=Math.max(0,Math.min(1,M)),S=J(s,o,T),x=oe(t,S);x<n&&(n=x,a={index:e,t:T})}return a}function He(t,r,n){const a=oe(t,r),e=Math.max(2,Math.ceil(a/n)+1),s=[];for(let o=0;o<e;o++){const c=o/(e-1),w=J(t,r,c);s.push(w)}return s}function We(t,r,n){if(!n||!n.length)return He(t,r,10);const a=pe(t,n),e=pe(r,n),s=[],o=c=>s.push(c);a.index+1<n.length?o(J(n[a.index],n[a.index+1],a.t)):o(n[a.index]);for(let c=a.index+1;c<=e.index&&c<n.length;c++)o(n[c]);return e.index+1<n.length?o(J(n[e.index],n[e.index+1],e.t)):o(n[e.index]),s}function ke(t,r,n,a){if(t.length<2)return()=>{};let e=null,s;const o=[];let c=0;for(let d=0;d<t.length-1;d++){const M=le(t[d],t[d+1]);o.push(M),c+=M}const w=d=>{e||(e=d);const M=d-e,T=Math.min(M/r,1),S=T*c;let x=0,f=0;for(;f<o.length&&x+o[f]<S;)x+=o[f],f++;f>=o.length&&(f=o.length-1);const p=t[f],l=t[Math.min(f+1,t.length-1)],P=o[f]||0,b=P===0?0:(S-x)/P,g=p.x+(l.x-p.x)*b,y=p.y+(l.y-p.y)*b,I=ae(p,l);n({x:g,y,angle:I}),T<1?s=requestAnimationFrame(w):a&&a()};return s=requestAnimationFrame(w),()=>{s&&cancelAnimationFrame(s)}}function ce(t){return`${t.x},${t.y}`}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Box as h}from"@expofp/geometry";import{svgArea as
|
|
1
|
+
import{Box as h}from"@expofp/geometry";import{svgArea as f,svgAreaExplicit as y}from"../../data/svg";import u,{uiState as s}from"../../store";import{convertLocalToGps as T}from"../../utils/gps";import{useReaction as l}from"../../utils/mobx";import{expandRectByPercent as b,getVenueFitMarginPercent as v,resolveVenueFitRect as x}from"../../utils/scene-bounds";import{fitMapToLocalRect as d,getVisibleRectFitPadding as O,isLngLatInVisibleViewport as M}from"./utils/geo-config";const a=s,S=15,g=24,L=20;function R(e){return b(e,v(e,f)).expand(L)}function B(e,r){return Math.min(Math.max(r,e.getMinZoom()),e.getMaxZoom())}function I(e,r,m){if(m.length!==1)return!1;const o=m[0]?.id,t=u.poiMarkerStore.markers.find(c=>c.boothId===o);if(!t)return!1;const n=T(t.center.x,t.center.y,r.gpsConfig),i=O(g);return M(e,n,i)||e.easeTo({center:n,zoom:B(e,S),bearing:r.bearing,duration:500,essential:!0}),!0}export function useCameraReactions(e,r,m){l(()=>a.moveToBooths,o=>{const t=e.current;if(!o||!t||!r)return;const n=o.filter(c=>c.rect);if(n.length===0)return;if(I(t,r,n)){a.moveToBooths=null;return}const i=h.fromUnion(...n.map(c=>c.rect));d(t,R(i),r),a.moveToBooths=null}),l(()=>a.moveToRect,o=>{const t=e.current;!o||!t||!r||(d(t,o,r,{paddingPercent:a.moveToRectPaddingPercent}),a.moveToRect=null,a.moveToRectPaddingPercent=null)}),l(()=>a.zoomBy,o=>{const t=e.current;!o||!t||(t.flyTo({zoom:t.getZoom()+(o>1?.5:-.5),animate:!0,duration:500}),a.zoomBy=null)}),l(()=>[s.moveToLocation,u.maplibreStore.cameraPort,u.routeStore.currentPosition],([o])=>{if(!o)return;const t=e.current,n=u.routeStore.currentPosition;if(!n){s.moveToLocation=!1;return}if(!t)return;const{lng:i,lat:c}=n,P=typeof i=="number"&&Number.isFinite(i)&&typeof c=="number"&&Number.isFinite(c);s.moveToLocation=!1;let p;if(P)p=[i,c];else{if(!r)return;p=T(n.x,n.y,r.gpsConfig)}t.flyTo({center:p,animate:!0,duration:1e3})}),l(()=>s.centerMap,o=>{const t=e.current;if(!o||!t||!r)return;if(!(s.list.type==="search"&&!s.list.text)){const{rect:i}=x({layerViewbox:u.layerStore.viewboxRectangle,explicitArea:y?f:null,layerRectangle:u.layerStore.rectangle,sceneDef:m,svgArea:f});d(t,i,r)}s.centerMap=!1})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as y}from"react/jsx-runtime";import{Overlay as u}from"@expofp/ui";import S from"classnames";import{observer as h}from"mobx-react-lite";import{useCallback as s,useMemo as l}from"react";import{overlayStore as a,uiState as e}from"../store";import{t as k}from"../utils/i18n";import C from"./Bookmarks";import g from"./Booth/Booth";import z from"./Category";import b from"./Event";import O from"./Exhibitor";import x from"./Filter";import M from"./Language";import P from"./Menu";import w from"./OverlayParticles";import j from"./RoutePlanner/RoutePlanner";import A from"./Search";import F from"./Sessions";import B from"./Speaker";import E from"./Speakers";import R from"./TourPoints";import _ from"./Tours";import I from"./Visited";import K from"./Wayfinding";const N=h(({isGDPR:m,consent:n})=>{const c=s(r=>{e.desiredOverlaySize=r},[]),p=s(r=>{e.setOverlayScrolled(r)},[]),d=e.overlaySize,f=l(()=>[e.list.type,e.details],[e.list.type,e.details]),v=l(()=>{const r={"-backdrop":e.canvasStarted&&e.shouldUseBackdrop&&!e.dimmed&&!e.galleryActive,"-no-transition":e.dimmed,"-gallery-active":e.galleryActive,collapsed:e.overlayCollapsed,kiosk:e.kiosk,start:e.overlayPosition==="left",bottom:e.overlayPosition!=="left",...e.overlaySize&&{[e.overlaySize]:!0}},t=S(r),i=e.overlayInterfaceClasses.join(" ");return i?`${t} ${i}`:t},[e.canvasStarted,e.shouldUseBackdrop,e.dimmed,e.galleryActive,e.overlayCollapsed,e.kiosk,e.inIdle,e.setKioskModeEnabled,e.overlayPosition,e.overlaySize,e.overlayInterfaceClasses]);return y(u,{open:e.isOverlayOpen,size:d,particles:e.isFeaturedExhibitorActive?o(w,{}):null,className:v,mediumSizeMultiplier:a.mediumSizeMultiplier,fullSizeOffset:a.fullSizeOffset,disableDrag:e.viewerMode&&e.menu,forceFull:e.viewerMode&&e.menu,scrollResetKey:f,noContentLabel:k("No content"),onChangeSize:c,onScrollStateChange:p,onScrollActivity:()=>window.__resett?.(),children:[o(P,{isGDPR:m,consent:n}),o(A,{}),o(O,{}),o(g,{}),o(C,{}),o(I,{}),o(M,{}),o(z,{}),o(K,{}),o(x,{}),o(F,{showFilters:!0}),o(E,{showFilters:!0}),o(_,{}),o(R,{}),o(j,{}),o(b,{}),o(B,{})]})});export default N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o,jsxs as b}from"react/jsx-runtime";import"./SearchBox.scss";import f from"classnames";import{useObserver as D}from"mobx-react-lite";import k,{useCallback as T,useEffect as v,useRef as C}from"react";import a,{searchStore as e}from"../store";import z from"../tools/debounce";import{GaEventActions as j,sendEventToGa as K}from"../tools/gtag";import{handleCustomCommand as L}from"../utils/customCommands";import{t as i}from"../utils/i18n";import{useAutorun as l}from"../utils/mobx";import{Badge as P}from"./";const G=1e3;function R({className:g}){const I=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(),a.openActiveListItem();const n=c();n&&L(n.value);return;case"Escape":t.preventDefault(),e.closeSearch();return}s&&(t.preventDefault(),a.changeActiveListIndex(s))}function c(){return p.current}const[B,u]=k.useState(""),[h,E]=k.useState(!1);l(()=>{E(a.uiState.kiosk&&a.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;a.uiState.overlaySize!=="full"&&t===c()&&!e.isFocused&&c()?.blur()}),l(()=>{a.uiState.menu&&a.uiState.kiosk&&e.setFocused(!1)}),l(()=>{const t=c(),s=document.activeElement;t&&e.isFocused&&s!==t&&!e.skipInputFocus&&t.focus()}),v(()=>{a.fuzzySearchEngineStore.loadEngine()},[]);const N=T(z(()=>{e.searchText&&K(j.Search,e.searchText),window.__resett?.()},G),[]);function M(){e.setSearchText(c()?.value||""),N()}function y(){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(()=>b("div",{className:f("search-box",g,e.searchBoxClass,{"efp-semi-transparent":a.uiState.setKioskModeEnabled}),"data-interface":a.uiState.activeInterfaceId,ref:I,children:[o("button",{className:f("search-box__button","search-box__button--back",{"is-mobile-details":e.isMobileDetailsMode,"search-box__button--home":e.backMode!=="back"&&a.uiState.viewerMode}),onClick:F,type:"button","aria-label":e.backMode==="back"?i("Go back"):i("Main menu"),children:o("i",{className:e.backMode==="back"?"icon-chevron-left":a.uiState.viewerMode?"icon-home-solid":"icon-menu"})}),o("div",{className:"search-box__input-wrapper",children:e.shouldShowSearchInput?o("input",{ref:p,type:"search",className:"search-box__input",placeholder:h?B:e.placeholder,"aria-label":"Search",value:e.searchText,onChange:M,onKeyDown:w,onFocus:y,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",disabled:a.uiState.setKioskModeEnabled}):b("div",{className:"search-box__title",children:[e.searchBoxIcon&&o("i",{className:f("search-box__title-icon",e.searchBoxIcon)}),b("div",{className:"search-box__title-content",children:[o("strong",{className:"search-box__title-text",children:e.searchBoxTitle}),e.searchBoxSubtitle&&o("span",{className:"search-box__title-subtitle",children:e.searchBoxSubtitle})]}),e.searchBoxBadge?o(P,{variant:"lightgray",size:"md",rounded:!0,noMargins:!0,children:e.searchBoxBadge}):null]})}),!e.shouldShowSearchInput&&e.searchBoxActions.map(t=>o("button",{className:"search-box__button search-box__button--ui-action",onClick:t.handler,type:"button","aria-label":t.label,title:t.label,children:o("i",{className:t.icon})},t.id)),o("button",{className:"search-box__button search-box__button--action",onClick:e.shouldShowSearchInput?e.shouldShowCloseButton?x:A:x,type:"button","aria-label":e.ariaLabel,children:o("i",{className:e.actionButtonIcon})})]}))}export default R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as n}from"tslib";import{Box as x,boxContainsPoint as G,pointDistance as L}from"@expofp/geometry";import{action as f,computed as g,observable as u}from"mobx";import{getName as B}from"../components/Kiosk/SetKiosk";import{mapCamera as T}from"../components/Map/camera";import{DEFAULT_UNITS as E,ORIENTATION_GRANTED_KEY as U}from"../constants";import P from"../data";import{fpGeo as w}from"../data/fpGeo";import{getLayerSvg as $,svgArea as m}from"../data/svg";import{GaEventActions as V,sendEventToGa as K}from"../tools/gtag";import D from"../tools/logger";import{areLayersEnabled as W}from"../utils/areLayersEnabled";import{calcSpeed as A}from"../utils/calcSpeed";import{calcTravelTime as I}from"../utils/calcTravelTime";import{calculateRelativeBearing as Z,convertGpsToLocal as C,isValidPointCoords as b}from"../utils/gps";import{boothToEndpoint as M,buildRoute as q,CURRENT_LOCATION_NAME as j,CURRENT_POSITION_POINT_ID as X,isWayfindingReady as Y,KIOSK_ANCHOR_POINT_ID as H,toArbitraryPoint as N}from"../wayfinding";import c,{layersStore as R,uiState as p}from".";import{BoothBase as y}from"./BoothStore";import{LayersMode as J}from"./LayerStore";import{revealLayer as O}from"./reveal-layer.js";function d(o){return typeof o=="string"?Number(o.replace(",",".")):o}export default class i{constructor(t){this.routeLines=[],this.routeDistance=null,this.currentPosition=null,this.requestCompass=!1,this.iconType=0,this.tempToBooth=null,this.focusEnabled=!0,this.prevZ=null,this.markersData={icons:[],markers:[]},this.prevMarkers=[],this.pendingReveal=null,this.showAccessible=!1,this.onlyAccessible=!1,this.currentRouteLayer=null,this.currentRouteExhibitor=null,this.routeUnits=E,this.isGpsTrackingEnabled=!0,this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!p.kioskData||!!this.currentPosition}selectRoute(t,e=!0,r=!1){if(e&&(p.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const s=this.resolveFallbackFrom();s&&(t=new Route(s,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);const l=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof y&&t.from.visible&&l.push(t.from),t?.to instanceof y&&t.to.visible&&(this.tempToBooth=null,l.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const a=()=>{if(this.rootStore.moveToList(l),p.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const s=Q(t.from);s&&this.rootStore.layerStore.updateVisibility(s,!0)}if(!this.currentRouteLayer){const s=_(this.rootStore.layerStore,t?.from),h=_(this.rootStore.layerStore,t?.to);s?this.currentRouteLayer=s:h&&(this.currentRouteLayer=h)}e&&t?.from&&t?.to&&K(V.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};r?a():setTimeout(a,200)}rebuildRouteFromPosition(t){const e=p.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return N(this.currentPosition,j,X);const t=p.kioskData;return t?N({x:t.x,y:t.y,z:t.z??void 0},B(),H):null}setStartPoint(t){const e=p.selectedRoute;if(e?.to&&!e?.from&&t){const r=new Route(t,e.to,e.waypoints);this.selectRoute(r)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,r)=>r.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;const e=this.rootStore.layerStore.findLayer(t.z),r=w?.properties.config,l=!!(t.lat&&t.lng),a=r&&l?C(t,r):t;return!a||!b(a.x)||!b(a.y)?null:this.rootStore.boothStore.booths.filter(s=>R.mode===J.Default||!e?s.visible&&s.rect:s.rect&&(typeof t.z!="number"&&!t.z&&s.visible||e.name===s.layer?.name)).sort((s,h)=>L(a,s.rect.center)-L(a,h.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(tt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const r=this.markersData.markers.find(a=>a.id===t);this.markersData.markers.forEach(a=>a.active=!1),r&&(r.active=!0);const l=c.layerStore.findLayer(r?.z);if(e&&r){l&&!l?.visible&&R.updateVisibility(l,!0);const a=T();return a?a.api.panTo({x:r.x,y:r.y}):(D.warn("Map camera is not mounted. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){const t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(r=>r.name===e)).filter(e=>!!e)}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=!1,p.list.type==="route-planner"&&(p.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,r){clearTimeout(this.cpTimeout),t&&(t.x=d(t.x),t.y=d(t.y),t.lat!==void 0&&(t.lat=d(t.lat)),t.lng!==void 0&&(t.lng=d(t.lng)),W()||(t.z=void 0));const l=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=e&&!l&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString()??null,this.iconType=r?1:0;const s=t?et(t):null;if(!t||!s){this.currentPosition=null;return}const h=c.layerStore.findLayer(t.z),k=new CurrentPosition(s.x,s.y,h?.name||this.currentRouteLayer?.name,Z(s),t.lat,t.lng);let v=!this.routeLines?.length;h&&this.routeLines?.length&&(v=!!this.routeLines.find(S=>S.p0.layer===h.name||S.p1.layer===h.name));const F=a&&v;this.currentPosition=k,F&&this.focusOnPosition(k,h),this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;const t=this.currentPosition??p.kioskData;t&&(this.currentPosition&&localStorage.getItem(U)==="false"&&(c.routeStore.requestCompass=!0),this.pendingReveal?.(),this.pendingReveal=O({layer:c.layerStore.findLayer(t.z),show:e=>R.updateVisibility(e,!0),then:()=>{p.moveToRect=this.findLocationRect(t)}}))}findLocationRect(t){const e=x.fromCenter(t,{x:100,y:100});if(e.intersects(m))return e;const r=Math.max(m.min.x,Math.min(t.x,m.max.x)),l=Math.max(m.min.y,Math.min(t.y,m.max.y)),a=Math.min(m.size.width,m.size.height)*.3,s=x.fromCenter({x:r,y:l},{x:a,y:a}).intersection(m);return s?x.fromUnion(e,s):e}focusOnPosition(t,e){this.pendingReveal?.(),this.pendingReveal=O({layer:e,show:r=>R.updateVisibility(r,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}const r=T();if(r){r.api.panTo({x:t.x,y:t.y});return}D.warn("Map camera is not mounted. Cannot pan to current position.")}})}get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:I(t,A(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=$(),r=(e.getAttribute("units")||E).toLowerCase?.().trim(),l=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(l?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const t=p.selectedRoute,e=this.routeDistance,r=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:z(t?.from??null),to:z(t?.to??null),lines:this.routeLines,distance:e==null?"":`${e}${r}`,units:r,time:I(e??0,A(r))})},200)}checkRoutes(){if(!Y()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const r=t[e];for(let l=e+1;l<t.length;l++){const a=t[l];q(M(r),M(a)).lines.length||console.warn(`No route found from ${r.name} to ${a.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return P.autoTrackingGps&&this.isGpsTrackingEnabled&&!P.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}n([u],i.prototype,"routeLines",void 0),n([u],i.prototype,"routeDistance",void 0),n([u],i.prototype,"currentPosition",void 0),n([u],i.prototype,"requestCompass",void 0),n([u],i.prototype,"iconType",void 0),n([u],i.prototype,"tempToBooth",void 0),n([u],i.prototype,"focusEnabled",void 0),n([u],i.prototype,"prevZ",void 0),n([u],i.prototype,"markersData",void 0),n([u],i.prototype,"prevMarkers",void 0),n([u],i.prototype,"showAccessible",void 0),n([u],i.prototype,"onlyAccessible",void 0),n([u],i.prototype,"currentRouteLayer",void 0),n([u],i.prototype,"currentRouteExhibitor",void 0),n([g],i.prototype,"canFindLocation",null),n([f],i.prototype,"selectRoute",null),n([f],i.prototype,"rebuildRouteFromPosition",null),n([f],i.prototype,"setStartPoint",null),n([g({keepAlive:!0})],i.prototype,"pathLayers",null),n([f],i.prototype,"setMarkers",null),n([f],i.prototype,"selectMarker",null),n([g({keepAlive:!0})],i.prototype,"selectedMarkers",null),n([g({keepAlive:!0})],i.prototype,"layers",null),n([f],i.prototype,"clickRoute",null),n([f],i.prototype,"selectCurrentPosition",null),n([f],i.prototype,"findLocation",null),n([u],i.prototype,"routeUnits",void 0),n([g],i.prototype,"routeInfo",null),n([f],i.prototype,"updateRoute",null),n([f],i.prototype,"updateRouteDistance",null),n([f],i.prototype,"updateRoutePoints",null),n([f],i.prototype,"checkRoutes",null),n([u],i.prototype,"isGpsTrackingEnabled",void 0),n([f],i.prototype,"setGpsTrackingEnabled",null),n([g({keepAlive:!0})],i.prototype,"gpsEnabled",null),n([f],i.prototype,"setOnlyAccessible",null);function Q(o){if(o)return o instanceof y?o.layer?.name:o.layer}function _(o,t){return t?t instanceof y?t.layer??null:o.findLayer(t.layer):null}function tt(o){return{...o,x:d(o.x),y:d(o.y),lat:o.lat===void 0?void 0:d(o.lat),lng:o.lng===void 0?void 0:d(o.lng)}}function et(o){const t=w?.properties.config??null;let e=null;return t&&G({min:t.p0,max:t.p2},o)?e={...o}:t&&b(o.lat)&&b(o.lng)?e=C(o,t):t||(e=o),e||null}export function findBooth(o){return c.boothStore.findBooth(o)||c.exhibitorStore.findExhibitor(o)?.booths[0]}export function findEntityByExternalId(o){const t=c.boothStore.boothByExternalId.get(o);if(t)return{type:"booth",entity:t};const e=c.exhibitorStore.exhibitorByExternalId.get(o);if(e)return{type:"exhibitor",entity:e}}export function separateExternalIds(o){const t=[],e=[];for(const r of o){const l=findEntityByExternalId(r);l&&(l.type==="booth"?t.push(r):e.push(r))}return{boothExternalIds:t,exhibitorExternalIds:e}}export function extractRoute(o,t,e){return new Route(findBooth(o)??null,findBooth(t)??null,e?.map(r=>findBooth(r)).filter(r=>!!r))}export class Route{constructor(t,e,r){this.from=t,this.to=e,this.waypoints=r;const l=t instanceof y?t.id:void 0,a=e instanceof y?e.id:void 0;this.waypoints=r?.filter(s=>s&&s.id!==l&&s.id!==a)}}function z(o){return o?o instanceof y?{id:o.id,name:o.name,externalId:o.externalId,layer:{name:o.layer?.name,description:o.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:o.name,externalId:void 0,layer:{name:o.layer,description:void 0}}:null}export class CurrentPosition{constructor(t,e,r,l,a,s){this.x=t,this.y=e,this.z=r,this.angle=l,this.lat=a,this.lng=s}}
|
|
1
|
+
import{__decorate as n}from"tslib";import{Box as x,boxContainsPoint as G,pointDistance as L}from"@expofp/geometry";import{action as f,computed as g,observable as u}from"mobx";import{getName as B}from"../components/Kiosk/SetKiosk";import{mapCamera as T}from"../components/Map/camera";import{DEFAULT_UNITS as E,ORIENTATION_GRANTED_KEY as U}from"../constants";import P from"../data";import{fpGeo as w}from"../data/fpGeo";import{getLayerSvg as $,svgArea as h}from"../data/svg";import{GaEventActions as V,sendEventToGa as K}from"../tools/gtag";import D from"../tools/logger";import{areLayersEnabled as W}from"../utils/areLayersEnabled";import{calcSpeed as A}from"../utils/calcSpeed";import{calcTravelTime as I}from"../utils/calcTravelTime";import{calculateRelativeBearing as Z,convertGpsToLocal as C,isValidPointCoords as b}from"../utils/gps";import{boothToEndpoint as M,buildRoute as q,CURRENT_LOCATION_NAME as j,CURRENT_POSITION_POINT_ID as X,isWayfindingReady as Y,KIOSK_ANCHOR_POINT_ID as H,toArbitraryPoint as N}from"../wayfinding";import c,{layersStore as R,uiState as p}from".";import{BoothBase as y}from"./BoothStore";import{LayersMode as J}from"./LayerStore";import{revealLayer as O}from"./reveal-layer.js";function d(o){return typeof o=="string"?Number(o.replace(",",".")):o}export default class i{constructor(t){this.routeLines=[],this.routeDistance=null,this.currentPosition=null,this.requestCompass=!1,this.iconType=0,this.tempToBooth=null,this.focusEnabled=!0,this.prevZ=null,this.markersData={icons:[],markers:[]},this.prevMarkers=[],this.pendingReveal=null,this.showAccessible=!1,this.onlyAccessible=!1,this.currentRouteLayer=null,this.currentRouteExhibitor=null,this.routeUnits=E,this.isGpsTrackingEnabled=!0,this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!p.kioskData||!!this.currentPosition}selectRoute(t,e=!0,r=!1){if(e&&(p.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const s=this.resolveFallbackFrom();s&&(t=new Route(s,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);const l=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof y&&t.from.visible&&l.push(t.from),t?.to instanceof y&&t.to.visible&&(this.tempToBooth=null,l.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const a=f(()=>{if(this.rootStore.moveToList(l),p.details=t,t&&(!t.from||!t.to)&&p.overlayBottom&&(p.desiredOverlaySize="medium"),t?.to&&t?.from){const s=Q(t.from);s&&this.rootStore.layerStore.updateVisibility(s,!0)}if(!this.currentRouteLayer){const s=_(this.rootStore.layerStore,t?.from),m=_(this.rootStore.layerStore,t?.to);s?this.currentRouteLayer=s:m&&(this.currentRouteLayer=m)}e&&t?.from&&t?.to&&K(V.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)});r?a():setTimeout(a,200)}rebuildRouteFromPosition(t){const e=p.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return N(this.currentPosition,j,X);const t=p.kioskData;return t?N({x:t.x,y:t.y,z:t.z??void 0},B(),H):null}setStartPoint(t){const e=p.selectedRoute;if(e?.to&&!e?.from&&t){const r=new Route(t,e.to,e.waypoints);this.selectRoute(r)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,r)=>r.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;const e=this.rootStore.layerStore.findLayer(t.z),r=w?.properties.config,l=!!(t.lat&&t.lng),a=r&&l?C(t,r):t;return!a||!b(a.x)||!b(a.y)?null:this.rootStore.boothStore.booths.filter(s=>R.mode===J.Default||!e?s.visible&&s.rect:s.rect&&(typeof t.z!="number"&&!t.z&&s.visible||e.name===s.layer?.name)).sort((s,m)=>L(a,s.rect.center)-L(a,m.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(tt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const r=this.markersData.markers.find(a=>a.id===t);this.markersData.markers.forEach(a=>a.active=!1),r&&(r.active=!0);const l=c.layerStore.findLayer(r?.z);if(e&&r){l&&!l?.visible&&R.updateVisibility(l,!0);const a=T();return a?a.api.panTo({x:r.x,y:r.y}):(D.warn("Map camera is not mounted. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){const t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(r=>r.name===e)).filter(e=>!!e)}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=!1,p.list.type==="route-planner"&&(p.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,r){clearTimeout(this.cpTimeout),t&&(t.x=d(t.x),t.y=d(t.y),t.lat!==void 0&&(t.lat=d(t.lat)),t.lng!==void 0&&(t.lng=d(t.lng)),W()||(t.z=void 0));const l=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=e&&!l&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString()??null,this.iconType=r?1:0;const s=t?et(t):null;if(!t||!s){this.currentPosition=null;return}const m=c.layerStore.findLayer(t.z),k=new CurrentPosition(s.x,s.y,m?.name||this.currentRouteLayer?.name,Z(s),t.lat,t.lng);let v=!this.routeLines?.length;m&&this.routeLines?.length&&(v=!!this.routeLines.find(S=>S.p0.layer===m.name||S.p1.layer===m.name));const F=a&&v;this.currentPosition=k,F&&this.focusOnPosition(k,m),this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;const t=this.currentPosition??p.kioskData;t&&(this.currentPosition&&localStorage.getItem(U)==="false"&&(c.routeStore.requestCompass=!0),this.pendingReveal?.(),this.pendingReveal=O({layer:c.layerStore.findLayer(t.z),show:e=>R.updateVisibility(e,!0),then:()=>{p.moveToRect=this.findLocationRect(t)}}))}findLocationRect(t){const e=x.fromCenter(t,{x:100,y:100});if(e.intersects(h))return e;const r=Math.max(h.min.x,Math.min(t.x,h.max.x)),l=Math.max(h.min.y,Math.min(t.y,h.max.y)),a=Math.min(h.size.width,h.size.height)*.3,s=x.fromCenter({x:r,y:l},{x:a,y:a}).intersection(h);return s?x.fromUnion(e,s):e}focusOnPosition(t,e){this.pendingReveal?.(),this.pendingReveal=O({layer:e,show:r=>R.updateVisibility(r,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}const r=T();if(r){r.api.panTo({x:t.x,y:t.y});return}D.warn("Map camera is not mounted. Cannot pan to current position.")}})}get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:I(t,A(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=$(),r=(e.getAttribute("units")||E).toLowerCase?.().trim(),l=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(l?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const t=p.selectedRoute,e=this.routeDistance,r=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:z(t?.from??null),to:z(t?.to??null),lines:this.routeLines,distance:e==null?"":`${e}${r}`,units:r,time:I(e??0,A(r))})},200)}checkRoutes(){if(!Y()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const r=t[e];for(let l=e+1;l<t.length;l++){const a=t[l];q(M(r),M(a)).lines.length||console.warn(`No route found from ${r.name} to ${a.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return P.autoTrackingGps&&this.isGpsTrackingEnabled&&!P.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}n([u],i.prototype,"routeLines",void 0),n([u],i.prototype,"routeDistance",void 0),n([u],i.prototype,"currentPosition",void 0),n([u],i.prototype,"requestCompass",void 0),n([u],i.prototype,"iconType",void 0),n([u],i.prototype,"tempToBooth",void 0),n([u],i.prototype,"focusEnabled",void 0),n([u],i.prototype,"prevZ",void 0),n([u],i.prototype,"markersData",void 0),n([u],i.prototype,"prevMarkers",void 0),n([u],i.prototype,"showAccessible",void 0),n([u],i.prototype,"onlyAccessible",void 0),n([u],i.prototype,"currentRouteLayer",void 0),n([u],i.prototype,"currentRouteExhibitor",void 0),n([g],i.prototype,"canFindLocation",null),n([f],i.prototype,"selectRoute",null),n([f],i.prototype,"rebuildRouteFromPosition",null),n([f],i.prototype,"setStartPoint",null),n([g({keepAlive:!0})],i.prototype,"pathLayers",null),n([f],i.prototype,"setMarkers",null),n([f],i.prototype,"selectMarker",null),n([g({keepAlive:!0})],i.prototype,"selectedMarkers",null),n([g({keepAlive:!0})],i.prototype,"layers",null),n([f],i.prototype,"clickRoute",null),n([f],i.prototype,"selectCurrentPosition",null),n([f],i.prototype,"findLocation",null),n([u],i.prototype,"routeUnits",void 0),n([g],i.prototype,"routeInfo",null),n([f],i.prototype,"updateRoute",null),n([f],i.prototype,"updateRouteDistance",null),n([f],i.prototype,"updateRoutePoints",null),n([f],i.prototype,"checkRoutes",null),n([u],i.prototype,"isGpsTrackingEnabled",void 0),n([f],i.prototype,"setGpsTrackingEnabled",null),n([g({keepAlive:!0})],i.prototype,"gpsEnabled",null),n([f],i.prototype,"setOnlyAccessible",null);function Q(o){if(o)return o instanceof y?o.layer?.name:o.layer}function _(o,t){return t?t instanceof y?t.layer??null:o.findLayer(t.layer):null}function tt(o){return{...o,x:d(o.x),y:d(o.y),lat:o.lat===void 0?void 0:d(o.lat),lng:o.lng===void 0?void 0:d(o.lng)}}function et(o){const t=w?.properties.config??null;let e=null;return t&&G({min:t.p0,max:t.p2},o)?e={...o}:t&&b(o.lat)&&b(o.lng)?e=C(o,t):t||(e=o),e||null}export function findBooth(o){return c.boothStore.findBooth(o)||c.exhibitorStore.findExhibitor(o)?.booths[0]}export function findEntityByExternalId(o){const t=c.boothStore.boothByExternalId.get(o);if(t)return{type:"booth",entity:t};const e=c.exhibitorStore.exhibitorByExternalId.get(o);if(e)return{type:"exhibitor",entity:e}}export function separateExternalIds(o){const t=[],e=[];for(const r of o){const l=findEntityByExternalId(r);l&&(l.type==="booth"?t.push(r):e.push(r))}return{boothExternalIds:t,exhibitorExternalIds:e}}export function extractRoute(o,t,e){return new Route(findBooth(o)??null,findBooth(t)??null,e?.map(r=>findBooth(r)).filter(r=>!!r))}export class Route{constructor(t,e,r){this.from=t,this.to=e,this.waypoints=r;const l=t instanceof y?t.id:void 0,a=e instanceof y?e.id:void 0;this.waypoints=r?.filter(s=>s&&s.id!==l&&s.id!==a)}}function z(o){return o?o instanceof y?{id:o.id,name:o.name,externalId:o.externalId,layer:{name:o.layer?.name,description:o.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:o.name,externalId:void 0,layer:{name:o.layer,description:void 0}}:null}export class CurrentPosition{constructor(t,e,r,l,a,s){this.x=t,this.y=e,this.z=r,this.angle=l,this.lat=a,this.lng=s}}
|
|
@@ -212,6 +212,8 @@ export default class UIState {
|
|
|
212
212
|
get routeQRCodeUrl(): string;
|
|
213
213
|
get isFeaturedExhibitorActive(): boolean;
|
|
214
214
|
get activeInterfaceData(): InterfaceMetadata | null;
|
|
215
|
+
/** Id of the screen the search box heads — lets custom CSS target one header. */
|
|
216
|
+
get activeInterfaceId(): string | undefined;
|
|
215
217
|
get searchBoxConfig(): {
|
|
216
218
|
mode: string;
|
|
217
219
|
title?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{Box as ot,Point as it}from"@expofp/geometry";import{action as d,computed as n,observable as a}from"mobx";import{setKioskUrlParams as st}from"../components/Kiosk/kioskUrlParam";import{mapScene as rt}from"../components/Map/scene";import{LANGUAGE_TYPE as E,LEGACY_PREVIEW_MODE_STORAGE_KEY as lt,LEGACY_UI_SCALE_STORAGE_KEY as U,LEGACY_VIEWER_MODE_STORAGE_KEY as at,MOBILE_BREAKPOINT as nt,PREVIEW_MODE_STORAGE_KEY as ht,UI_SCALE_STORAGE_KEY as H,VIEWER_MODE_STORAGE_KEY as ct,VISIBILITY_STORAGE_KEY as $}from"../constants";import k from"../data";import{svgArea as _,svgAreaExplicit as pt}from"../data/svg";import{readFreeBannerDismissed as dt}from"../tools/freeBanner";import{hasUserConsent as ut}from"../tools/gtag";import{hasHtmlTags as W}from"../tools/has-html-tags";import ft from"../tools/logger";import L from"../tools/settings";import{stripHtml as j}from"../tools/strip-html";import{remsToPixels as F}from"../utils";import X from"../utils/browser";import{getLocale as yt,getLocales as mt,t as S}from"../utils/i18n";import{isLocalStorageAvailable as B}from"../utils/localStorage";import{getResponsiveClass as gt}from"../utils/responsiveClass";import{sanitizeStr as Z}from"../utils/sanitizeText";import{fitRectIsFraming as St,getVenueFitMarginPercent as vt,resolveVenueFitRect as bt}from"../utils/scene-bounds";import{uiState as w}from".";import{BoothBase as I,RegularBooth as A,SpecialBooth as V}from"./BoothStore";import{EventItem as O}from"./EventStore";import{Exhibitor as x}from"./ExhibitorStore";import{findEntityByExternalId as It,Route as M}from"./RouteStore";import{SpeakerItem as K}from"./SpeakerStore";const xt=["dimensions25"];export default class t{setSelectedCategoryFilters(o){this.selectedCategoryFilters=o}resetCategoryFilter(){this.selectedCategoryFilters=[],this.categoryFilterOpen=!1}setSearchClearMode(o){this.searchClearMode=o}setRouteTitle(o){this.routeTitle=o}setRouteDescription(o){this.routeDescription=o}setIsMultiPointRoute(o){this.isMultiPointRoute=o}setTourTitle(o){this.tourTitle=o}setTourDescription(o){this.tourDescription=o}setIsMultiPointTour(o){this.isMultiPointTour=o}setPathwayOnlyMode(o){this.pathwayOnlyMode=o}setMultiPointTourList(o){this.list={type:"multi-point-tour",tourId:o}}get activePathwayLayers(){return this.list?.type==="multi-point-tour"?this.rootStore.toursStore.getTourById(this.list.tourId)?.layers?.map(s=>s.id)||[]:[]}get highlightedBooths(){const o=new Set(this.rootStore.exhibitorStore.highlightedByExternalIds),s=new Set(this.rootStore.boothStore.highlightedByExternalIds),i=new Set([this.rootStore.exhibitorStore.exhibitors.filter(r=>o.has(r.externalId)).flatMap(r=>r.booths.filter(l=>l instanceof A)).map(r=>r.id.toString()),this.rootStore.boothStore.booths.filter(r=>s.has(r.externalId)).map(r=>r.id.toString())].flat());if(this.list?.type==="search"&&this.list?.text?.trim().length){i.clear();const r=this.fuzzySearchItems.filter(l=>l.score===0).map(l=>l.item);r.length?D(r,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(l=>i.add(l.id.toString())):this.listBooths.forEach(l=>i.add(l.id.toString()))}if(this.list?.type==="filter"&&(i.clear(),this.list.items.flatMap(r=>r.booths.filter(l=>l instanceof A)).forEach(r=>i.add(r.id.toString()))),this.categoryFilterOpen&&this.selectedCategoryFilters.length>0?(i.clear(),this.selectedCategoryFilters.forEach(r=>{r.exhibitors.flatMap(l=>l.booths).forEach(l=>i.add(l.id.toString()))})):this.list?.type==="category"&&(i.clear(),this.list.category.exhibitors.flatMap(r=>r.booths).forEach(r=>i.add(r.id.toString()))),this.list?.type==="bookmarks"&&(i.clear(),D(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="visited"&&(i.clear(),D(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="exhibitors"){i.clear();const r=this.list.text?.toLowerCase().trim();let l=this.rootStore.exhibitorStore.exhibitors;r&&(l=l.filter(u=>u.name.toLowerCase().includes(r))),l.flatMap(u=>u.booths.filter(g=>g instanceof A)).forEach(u=>i.add(u.id.toString()))}if(this.selectedPoiTypeFilters.length>0&&(i.clear(),this.selectedPoiTypeFilters.forEach(r=>{this.rootStore.boothStore.booths.filter(l=>l.poiTypeId===r.id).forEach(l=>i.add(l.id.toString()))})),this.details instanceof M&&(i.clear(),this.details.from instanceof I&&i.add(this.details.from.id.toString()),this.details.to instanceof I&&i.add(this.details.to.id.toString()),this.details.waypoints?.forEach(r=>i.add(r.id.toString()))),this.details instanceof I&&(i.clear(),i.add(this.details.id.toString())),this.details instanceof x&&(i.clear(),this.details.booths.filter(r=>r instanceof A).forEach(r=>i.add(r.id.toString()))),this.details instanceof O){const r=this.details;if(r.boothId){i.clear();const l=this.rootStore.boothStore.booths.find(u=>u.id===r.boothId);l&&i.add(l.id.toString())}}return i}constructor(o){this.interfaceMetadata=Object.freeze([{id:"menu",className:"efp-overlay-menu",priority:80,isActive:()=>this.menu,searchBoxConfig:()=>({mode:"interface",title:S("Menu")})},{id:"exhibitor",className:"efp-overlay-exhibitor",priority:70,isActive:()=>this.details instanceof x,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"booth",className:"efp-overlay-booth",priority:70,isActive:()=>this.details instanceof I,searchBoxConfig:()=>{const s=this.details;return{mode:"details",title:s.title||s.name}}},{id:"event",className:"efp-overlay-event",priority:70,isActive:()=>this.details instanceof O,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"route",className:"efp-overlay-route",priority:70,isActive:()=>this.details instanceof M,searchBoxConfig:()=>({mode:"details",title:S("Directions")})},{id:"search",className:"efp-overlay-search",priority:60,isActive:()=>!this.details&&!this.menu&&this.list.type==="search"&&(this.rootStore.fp.alwaysShowSidebar&&!this.overlayOnDemand||this.heatmap||this.searchFocused||this.list.text.length>0||this.searchClearMode),searchBoxConfig:()=>({mode:"search",title:S("Search")})},{id:"exhibitors",className:"efp-overlay-exhibitors",priority:50,isActive:()=>this.list.type==="exhibitors"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Exhibitors")})},{id:"filter",className:"efp-overlay-filter",priority:50,isActive:()=>this.list.type==="filter"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Filter")})},{id:"bookmarks",className:"efp-overlay-bookmarks",priority:50,isActive:()=>this.list.type==="bookmarks"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Bookmarks"),badge:this.rootStore.bookmarksStore.total})},{id:"visited",className:"efp-overlay-visited",priority:50,isActive:()=>this.list.type==="visited"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Visited"),badge:this.rootStore.exhibitorStore.visited.length})},{id:E,className:"efp-overlay-language",priority:50,isActive:()=>this.list.type===E,searchBoxConfig:()=>({mode:"interface",title:S("Language")})},{id:"category",className:"efp-overlay-category",priority:50,isActive:()=>!w.menu&&!!w.selectedCategory,searchBoxConfig:()=>({mode:"interface",title:this.list.type==="category"&&this.list.category?.name||S("Categories")})},{id:"sessions",className:"efp-overlay-sessions",priority:50,isActive:()=>this.list.type==="sessions"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Sessions"),subtitle:this.selectedTrack?this.selectedTrack.name:void 0})},{id:"speakers",className:"efp-overlay-speakers",priority:50,isActive:()=>this.list.type==="speakers"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Speakers")})},{id:"speaker",className:"efp-overlay-speaker",priority:50,isActive:()=>this.details instanceof K,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"tours",className:"efp-overlay-tours",priority:50,isActive:()=>this.list.type==="tours"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Guided Tours")})},{id:"multi-point-wayfinding",className:"efp-overlay-multi-point",priority:75,isActive:()=>!!(this.isMultiPointRoute&&this.selectedRoute&&this.list.type!=="route-planner"),searchBoxConfig:()=>({mode:"interface",title:this.routeTitle||S("Multi-point route")})},{id:"multi-point-tour",className:"efp-overlay-multi-point-tour",priority:75,isActive:()=>this.list.type==="multi-point-tour"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:this.tourTitle||S("Multi-point route")})},{id:"route-planner",className:"efp-overlay-route-planner",priority:76,isActive:()=>this.list.type==="route-planner"&&(!this.details||this.details instanceof M),searchBoxConfig:()=>({mode:"interface",title:S("Route planner")})}].sort((s,i)=>i.priority-s.priority)),this.list={type:"search",text:"",focused:!1},this.details=null,this.hoveredExhibitor=null,this.hoveredBooth=null,this.zoomBy=null,this.rollReset=!1,this.moveToBooths=null,this.moveToRect=null,this.moveToRectPaddingPercent=null,this.moveToLocation=!1,this.menu=!1,this.searchFocused=!1,this.searchClearMode=!1,this.printingPdf=!1,this.screenSize=new it(window.innerWidth,window.innerHeight),this.overlayShowsAll=!1,this.centerMap=!1,this.zoomAfTransformK=1,this.activeListIndex=-1,this.devicePixelRatio=window.devicePixelRatio,this.previewExhibitor=null,this.wsStarted=!1,this.canvasStarted=!1,this.kiosk=!1,this.inIdle=!1,this.modalActive={share:!1},this.galleryActive=!1,this.hideOverlay=!1,this.searchButtonsOverride=null,this.hideCookieConsent=!!ut(),this.hideHeaderLogo=!1,this.hideLogoInBooth=!1,this.disableBookmarked=!1,this.hideLanguage=!1,this.monochrome=!1,this.heatmap=!1,this.heatmapYah=!1,this.rootElement=null,this.debugCircles=[],this.mapControlsHidden=!1,this.floorsControlHidden=!1,this.hideFreeOrDemo=!1,this.freeBannerDismissed=dt(sessionStorage),this.currentBanner=null,this.sceneDefReady=!1,this.categoryFilterOpen=!1,this.selectedCategoryFilters=[],this.selectedPoiTypeFilters=[],this.selectedTrack=null,this.subButtonsVisible=!1,this.searchBoxMode="search",this.searchBoxTitle="",this.isMultiPointRoute=!1,this.isMultiPointTour=!1,this.pathwayOnlyMode=!1,this.isOverlayScrolled=!1,this.listScrollTop=0,this.listScrollItemId=null,this.listScrollIndex=0,this.scrollPositions=new Map,this.scrollItemIds=new Map,this._customUIScale=null,this.searchFilterHeightPx=54,this.searchInputHeightPx=54,this.overlayUISizePx=390,this.overlayKioskSizePx=450,this.overlayMediumHeightRems=10,this.forceDim=!1,this.mapSettings={...this.defaultMapSettings},this.forceShowDetails=!1,this.buildRoute=!1,this.globalErrorMessages=[],this.minUIScale=.8,this.maxUIScale=1.4,this.setKioskModeEnabled=!1,this.kioskData=null,this.rootStore=o,this.initializeUIScale()}get rtl(){const o=yt();return o==="ar"||o==="he"}get noOverlay(){return this.rootStore.fp.noOverlay||this.hideOverlay}get overlayOnDemand(){return this.noOverlay&&this.searchButtonsOverride===!0}get overlayHiddenNow(){return this.noOverlay&&!(this.overlayOnDemand&&this.isOverlayOpen)}get onBoothClick(){return this.rootStore.fp.onBoothClick}get onMarkerClick(){return this.rootStore.fp.onMarkerClick}get onBookmarkClick(){return this.rootStore.fp.onBookmarkClick}get onVisitedClick(){return this.rootStore.fp.onVisitedClick}get onCategoryClick(){return this.rootStore.fp.onCategoryClick}get onDirection(){return this.rootStore.fp.onDirection}get onDetails(){return this.rootStore.fp.onDetails}get onExhibitorCustomButtonClick(){return this.rootStore.fp.onExhibitorCustomButtonClick}get onGetCoordsClick(){return this.rootStore.fp.onGetCoordsClick}get selectedExhibitor(){return this.details instanceof x?this.details:null}get selectedBooth(){return this.details instanceof I?this.details:null}get selectedCategory(){return this.list.type==="category"?this.list.category:null}get selectedRoute(){return this.details instanceof M?this.details:null}get selectedSpeaker(){return this.details instanceof K?this.details:null}get uiScale(){return this._customUIScale!==null?this._customUIScale:this.kiosk?1.2:1}get isGuidedToursActive(){return this.rootStore.toursStore.isActive}get getRouteNextFloor(){const o=this.rootStore.routeStore.pathLayers,s=this.rootStore.routeStore.currentRouteLayer?.name;if(!s)return null;const i=o.findIndex(c=>c.layer?.name===s);return i===-1?null:o[i+1]?.layer?.name??null}get headerHeightRem(){return 0}get headerHeightPx(){return F(this.headerHeightRem)}get overlayPosition(){return this.screenSize.width>nt||this.kiosk?"left":"bottom"}get overlayCollapsed(){return this.kiosk&&this.overlayPosition==="left"&&!this.searchFocused&&!this.menu&&!this.details&&!this.selectedCategory&&!this.selectedExhibitor&&this.list.type!=="bookmarks"&&this.list.type!==E&&!this.list.text?.length}get overlaySize(){return this.overlayLeft?"full":this.desiredOverlaySize}get overlayBottom(){return this.overlayPosition==="bottom"}get overlayLeft(){return this.overlayPosition==="left"}get overlayWidthPx(){return this.overlayHiddenNow?0:this.overlayLeft?this.kiosk?this.overlayKioskSizePx:this.overlayUISizePx:F(this.screenSize.width)}get wsImageHeightPx(){return 44}get wsPaddingPx(){return F(.25)}get wsOccupiedHeightPx(){return this.wsShown?this.wsImageHeightPx+this.wsPaddingPx*2:0}get wsShown(){return!this.hideHeaderLogo&&this.rootStore.exhibitorStore.advertised.length>0}get wsDesktopPosition(){return L.EXPO==="cbresupplypartner"?"bottom":"top"}get wsPosition(){return this.overlayBottom?"top":this.wsDesktopPosition}get responsiveClass(){return gt(this.screenSize.width)}get mapVisibleTop(){return(this.wsPosition==="top"?this.wsOccupiedHeightPx:0)+this.headerHeightPx}get mapVisibleBottom(){return this.overlayLeft||this.overlayHiddenNow?this.wsPosition==="bottom"?this.wsOccupiedHeightPx:0:F(this.overlayMediumHeightRems)}get mapVisibleStart(){return 0}get searchActionsHeightPx(){return this.overlayPosition==="bottom"?this.searchInputHeightPx+this.searchFilterHeightPx:this.searchInputHeightPx}get shouldShowSearchButtons(){return this.rootStore.searchButtonsStore.hasAnySearchButtons&&!this.details&&!this.menu&&![E,"filter"].includes(this.list.type)}get shouldShowMobileToggle(){const o=this.list.type==="route-planner";return this.overlayPosition==="bottom"&&(o||!this.details&&!this.menu&&this.list.type!==E&&this.list.type!=="bookmarks"&&this.list.type!=="sessions")}get mobileToggleIsListMode(){return!this.isOverlayOpen||this.overlaySize!=="full"}get canvasVisibleRectPx(){const o=this.screenSize;return ot.fromMinMax({x:w.rtl?0:this.mapVisibleStart,y:this.mapVisibleTop+this.searchActionsHeightPx},{x:w.rtl?o.width-this.mapVisibleStart:o.width,y:o.height-this.mapVisibleBottom})}get shouldShiftMapRect(){return this.overlayPosition==="left"&&(this.details||this.hasAppliedFilters||this.selectedRoute)}get hasAppliedFilters(){return this.selectedCategoryFilters.length>0||this.selectedPoiTypeFilters.length>0}get canvasVisibleRectPt(){return this.canvasVisibleRectPx.scale(this.devicePixelRatio,{x:0,y:0})}get canvasSizePt(){return this.screenSize.multiply(this.devicePixelRatio)}get shouldUseBackdrop(){if(w.overlayCollapsed)return!1;if(B&&localStorage.getItem("forcebackdrop")==="1")return!0;if(this.overlayBottom||this.selectedExhibitor?.leadingImageUrl&&!this.selectedExhibitor?.leadingImageLinkUrl)return!1;const o=X.satisfies({safari:">=13"}),s=X.satisfies({chrome:">=77"});return/(android)/i.test(navigator.userAgent)?!1:o||s&&w.canvasSizePt.height*w.canvasSizePt.width<3e6}setForceDim(o){this.forceDim=o}get dimmed(){return this.forceDim||this.pathwayOnlyMode?!0:this.highlightedBooths.size>0||this.list?.type==="search"&&this.list?.text?.trim().length>0||this.list?.type==="exhibitors"}get defaultSearchItems(){const{exhibitorStore:o,categoryStore:s,boothStore:i,heatmapStore:c}=this.rootStore;let r=o.exhibitors;const l=s.categories.filter(f=>f.exhibitors.length),u=i.booths;this.selectedPoiTypeFilters.length>0&&(r=r.filter(f=>f.booths.some(y=>this.selectedPoiTypeFilters.some(v=>y.poiTypeId===v.id))));let g=[];const C=!this.selectedCategoryFilters.length&&k.showCategories?l.filter(f=>xt.includes(L.EXPO)?!f.name.includes("/"):!0):[],T=u.filter(f=>f instanceof V);return this.selectedCategoryFilters.length>0?g=[...r]:(k.showCompaniesAndBooths&&(g=g.concat(r)),k.showOtherSpaces&&(g=g.concat(T))),this.heatmap?[...r,...u].sort((y,v)=>c.getClicksByType(v)-c.getClicksByType(y)):this.heatmapYah?c.heatmapData?.yah?.sort((f,y)=>c.getClicksByType(y)-c.getClicksByType(f))||[]:r.length===0?u:[...C,...g.sort((f,y)=>{const v=f instanceof x&&f.featured!==void 0,z=y instanceof x&&y.featured!==void 0;if(v!==z)return v?-1:1;const R=f instanceof V&&f.title?f.title:f.name,N=y instanceof V&&y.title?y.title:y.name;return R.localeCompare(N,void 0,{sensitivity:"base",numeric:!0})})]}get searchItems(){if(this.list.type!=="search")return[];const o=this.list.text?.trim().toLowerCase()||"",{exhibitorStore:s,boothStore:i,eventStore:c,speakerStore:r,heatmapStore:l}=this.rootStore;let u=s.exhibitors;const g=i.booths,C=c.eventItems,T=r.speakers;if(this.selectedCategoryFilters.length>0&&(u=u.filter(h=>this.selectedCategoryFilters.some(p=>h.categories.some(m=>m.id===p.id)))),this.selectedPoiTypeFilters.length>0&&(u=u.filter(h=>h.booths.some(p=>this.selectedPoiTypeFilters.some(m=>p.poiTypeId===m.id)))),!o)return this.defaultSearchItems;const f=[o.replace(/&[^&=]+=[^&]+/g,"")];if(this.heatmapYah)return(l.heatmapData.yah??[]).filter(p=>Number.isNaN(Number(o))?p:p.viewCount>=Number(o)).sort((p,m)=>l.getClicksByType(m)-l.getClicksByType(p));const y=[],v=new Set,z=new Set,R=new Set,N=new Set;function G(h){return h?h.replace(/[!@#$%^*\-.,()^#$%:?_+'"/]/g," ").replace(/\s\s+/g," "):""}function b(h,p){return!h||!p?!1:G(h).toLowerCase().includes(G(p).toLowerCase())}function Y(h,p){return h?b(h,p)||b(k.levelTerm+" "+h,p):!1}u.forEach(h=>{f.some(p=>b(h.name,p)||h.booths.some(m=>!p&&b(m.name,p)||Y(m.layer?.name??null,p)))&&v.add(h)}),this.selectedCategoryFilters.length>0&&g.forEach(h=>{(this.heatmap||!(h instanceof A)||!Array.from(v).find(m=>m.booths.includes(h)))&&f.some(m=>b(h.title||"",m)||b(h.name,m)||b(h.fullName,m)||Y(h.layer?.name??null,m))&&z.add(h)});const q=C,tt=T;if(q.forEach(h=>{f.some(p=>b(h.name||"",p)||b(h.description||"",p))&&R.add(h)}),tt.forEach(h=>{f.some(p=>b(h.name,p)||b(h.company,p)||b(h.jobTitle,p))&&N.add(h)}),y.push(...R),y.push(...v),this.heatmap)return y.sort((h,p)=>l.getClicksByType(p)-l.getClicksByType(h));const et=new Map(y.map(h=>[h.id,h]));return y.map(h=>{if(!h.name)return null;const p=Z(h instanceof I&&h.fullName.toLowerCase()||h.name.toLowerCase()),m=p.indexOf(Z(o));if(m===-1)return null;const Q={id:h.id,position:m,lowerCaseName:p,featured:!1};return h instanceof x&&(Q.featured=h.featured),Q}).filter(h=>!!h).sort((h,p)=>(h.featured||p.featured)&&h.featured!==p.featured?h.featured?-1:1:h.position!==p.position?h.position-p.position:h.lowerCaseName.localeCompare(p.lowerCaseName)||String(h.id).localeCompare(String(p.id))).map(({id:h})=>et.get(h)).filter(h=>!!h)}get searchList(){return[...this.rootStore.eventStore.eventItems,...this.rootStore.speakerStore.speakers,...this.rootStore.categoryStore.categories.filter(o=>o.exhibitors.length),...this.rootStore.exhibitorStore.exhibitors,...this.rootStore.boothStore.booths]}get foundInDescription(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return[];const s=this.fuzzySearchItems.map(({item:l})=>l),i=new Set(s.map(l=>l.name)),c=this.categoryFilteredSearchList.filter(l=>!i.has(l.name)),r=[];for(const l of c){const u=J(l);if(!u)continue;const C=(W(u)?j(u):u).toLowerCase().indexOf(o);C!==-1&&r.push({item:l,pos:C})}return r.sort((l,u)=>l.pos-u.pos),r.map(l=>l.item)}get foundInDescriptionStruct(){const o={};if(this.list?.type!=="search")return o;const s=this.list?.text?.trim().toLowerCase();return this.foundInDescription.forEach(i=>{let c=J(i);if(!c)return;W(c)&&(c=j(c));const r=c.toLowerCase().indexOf(s);if(r===-1)return;const l=3,u=r>l?r-l:0,g=c.substring(u).trim();o[i.id]=r>0?`...${g}`:g}),o}get categoryFilteredSearchList(){return this.selectedCategoryFilters.length===0?this.searchList:this.searchList.filter(o=>o instanceof x&&this.selectedCategoryFilters.some(s=>o.categories.some(i=>i.id===s.id)))}get fuzzySearchItems(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return this.defaultSearchItems.map(r=>({item:r,score:0,matches:[]}));const s=this.rootStore.fuzzySearchEngineStore.search(this.categoryFilteredSearchList,o),i=[],c=[];for(const r of s){const l=r.item,u=l.entity.type,g=u==="booth"?l:null,C=u==="exhibitor"?l:null,T=[l.name?.toLowerCase()??"",g?.title?.toLowerCase()??"",g?.fullName?.toLowerCase()??"",...C?.booths?.map(y=>y.name?.toLowerCase()??"")??[]];let f=1/0;for(const y of T){const v=y.indexOf(o);v!==-1&&v<f&&(f=v)}f!==1/0?i.push({result:{item:l,score:0},pos:f}):c.push(r)}return i.sort((r,l)=>r.pos-l.pos),[...i.map(r=>r.result),...c]}get listItems(){if(this.details instanceof M&&this.list.type!=="multi-point-tour")return[this.details.from,this.details.to].filter(o=>o instanceof I);switch(this.list.type){case"search":{let o=!(this.heatmap||this.heatmapYah)&&this.rootStore.fuzzySearchEngineStore.engine?this.fuzzySearchItems.map(({item:s})=>s).concat(this.foundInDescription):this.searchItems;return o=o.filter(s=>s.entity.type==="booth"?!s.exhibitors.length:!0),this.hasAppliedFilters?o.filter(s=>{if(this.selectedCategoryFilters.length>0&&s instanceof x&&!this.selectedCategoryFilters.some(i=>s.categories.some(c=>c.id===i.id)))return!1;if(this.selectedPoiTypeFilters.length>0){if(s instanceof x&&!s.booths.some(i=>this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))||s instanceof I&&!this.selectedPoiTypeFilters.some(i=>s.poiTypeId===i.id))return!1;if(s instanceof O&&s.boothId){const i=this.rootStore.boothStore.booths.find(c=>c.id===s.boothId);if(!i||!this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))return!1}}return!0}):o}case"bookmarks":return[...this.rootStore.exhibitorStore.bookmarked,...this.rootStore.eventStore.bookmarked,...this.rootStore.speakerStore.bookmarked,...this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)];case"visited":return[...this.rootStore.exhibitorStore.visited,...this.rootStore.eventStore.visited];case"category":return this.list.category.exhibitors;case E:return mt();case"filter":return this.list.items;case"sessions":return this.rootStore.eventStore.eventItems;case"exhibitors":{const o=this.rootStore.exhibitorStore.exhibitors,s=this.list.text?.toLowerCase().trim();return s?o.filter(i=>i.name.toLowerCase().includes(s)):o}case"multi-point-tour":{const o=this.rootStore.toursStore.getTourById(this.list.tourId);return o?!o.points||o.points.length===0?[]:o.points.map(s=>{const i=parseInt(s);if(!isNaN(i)){const r=this.rootStore.boothStore.boothById.get(i);if(r)return r}return It(s)?.entity||null}).filter(s=>!!s):[]}case"route-planner":return this.rootStore.routePlannerStore.resolvedBooths}throw new Error("Unknown list.type")}get listBooths(){return D(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems)}get selectedBooths(){let o=[];this.selectedExhibitor?o=this.selectedExhibitor.booths:this.selectedBooth&&(o=[this.selectedBooth]);const s=this.selectedRoute,i=[s?.from,s?.to,...s?.waypoints??[]].filter(c=>c instanceof I);return o.push(...i),new Set(o)}get hoveredBooths(){let o=[];return this.hoveredBooth?o=[this.hoveredBooth]:this.hoveredExhibitor&&(o=this.hoveredExhibitor.booths),new Set(o)}get visibility(){return{controls:!this.mapControlsHidden,levels:!this.floorsControlHidden,header:this.wsShown,overlay:!this.hideOverlay,searchButtons:this.searchButtonsOverride??!this.hideOverlay}}setVisibility(o){const s=["controls","levels","header","overlay"],i={...s.reduce((r,l)=>({...r,[l]:!0}),{}),...s.filter(r=>r in o).reduce((r,l)=>({...r,[l]:o[l]}),{})},c=typeof o.searchButtons=="boolean"?o.searchButtons:null;B&&(Object.values(i).every(Boolean)&&c===null?localStorage.removeItem($):localStorage.setItem($,JSON.stringify(c===null?i:{...i,searchButtons:c}))),this.mapControlsHidden=!i.controls,this.floorsControlHidden=!i.levels,this.hideHeaderLogo=!i.header,this.hideFreeOrDemo=!i.header,this.hideOverlay=!i.overlay,this.searchButtonsOverride=c}toggleMapOverlay(){this.overlayPosition==="bottom"&&this.overlaySize==="full"?this.desiredOverlaySize="medium":this.overlayPosition==="bottom"&&this.overlaySize!=="full"&&(this.desiredOverlaySize="full")}changeZoom(o){this.zoomBy=o}zoomIn(){this.changeZoom(1.5)}zoomOut(){this.changeZoom(.66)}fitBounds(){const{rect:o,source:s}=bt({layerViewbox:this.rootStore.layerStore.viewboxRectangle,explicitArea:pt?_:null,layerRectangle:this.rootStore.layerStore.rectangle,sceneDef:rt()??null,svgArea:_});this.moveToRect=o,this.moveToRectPaddingPercent=St(s)?0:vt(o,_),this.rollReset=!0}get previewMode(){const o=B?localStorage.getItem(ht)??localStorage.getItem(lt):null;return o==="true"||o==="1"||this.rootStore.fp.previewMode}get viewerMode(){const o=B?localStorage.getItem(ct)??localStorage.getItem(at):null;return o==="true"||o==="1"||this.rootStore.fp.viewerMode}get selectedEventItem(){return this.details instanceof O?this.details:null}get defaultMapSettings(){return{zoomtime:500,center:void 0,centerxy:void 0,z:void 0,bearing:0,roll:1}}setMapSettings(o){const s={};for(const i of Object.keys(o)){const c=o[i];c!=null&&(i==="zoomtime"?s.zoomtime=Math.min(Math.max(o.zoomtime||this.mapSettings.zoomtime||0,500),5e3):Object.assign(s,{[i]:c}))}this.mapSettings={...this.mapSettings,...s}}resetMapSettings(){this.mapSettings={...this.defaultMapSettings}}get baseQRCodeUrl(){return`https://${L.EXPO}.expofp.com`}get viewMapOnPhoneQRCodeUrl(){if(k?.customKioskQrCodeUrl)return k.customKioskQrCodeUrl;const o=new URL(this.baseQRCodeUrl);o.search=window.location.search;const s=o.toString();return console.log("View Map On Phone QR Code Url",s),s}get routeQRCodeUrl(){const o=new URL(this.baseQRCodeUrl),s=this.selectedRoute?.from,i=this.selectedRoute?.to,c=s instanceof I?s.slug:"",r=i instanceof I?i.slug:"";o.search=`?route%3A${encodeURIComponent(r)}%3A${encodeURIComponent(c)}%3Afalse`,st(o.searchParams,this.kioskData);const l=o.toString();return console.log("Route QR Code Url",l),l}get isFeaturedExhibitorActive(){return this.details instanceof x&&!!this.details.featured}get activeInterfaceData(){for(const o of this.interfaceMetadata)if(o.isActive())return o;return null}get searchBoxConfig(){const o=this.activeInterfaceData;return!o||!o.searchBoxConfig?{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}:o.searchBoxConfig()||{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}}get searchBoxActions(){return this.activeInterfaceData?.actions?.()??[]}get overlayInterfaceClasses(){const o=[],s=this.activeInterfaceData;return s&&(o.push(s.className),s.additionalClasses&&o.push(...s.additionalClasses())),this.details&&o.push("overlay-has-details"),this.list.type&&o.push(`overlay-list-${this.list.type}`),this.isFeaturedExhibitorActive&&o.push("overlay-exhibitor-featured"),o}get isOverlayOpen(){return this.noOverlay&&!this.overlayOnDemand?!1:this.activeInterfaceData!==null}setOverlayScrolled(o){this.isOverlayScrolled=o}setListScrollTop(o,s){this.listScrollTop=s,this.scrollPositions.set(o,s)}setListScrollItemId(o,s){this.listScrollItemId=s,this.scrollItemIds.set(o,s)}getListScrollTop(o){return this.scrollPositions.get(o)||0}getListScrollItemId(o){return this.scrollItemIds.get(o)||null}clearListScroll(o){this.scrollPositions.delete(o),this.scrollItemIds.delete(o),this.list.type===o&&(this.listScrollTop=0,this.listScrollItemId=null)}get bannerType(){return this.hideFreeOrDemo||this.heatmap?null:L.EXPO==="expo"?"demo":k.expoFpAd||k.isTrial?"free":null}get isBannerVisible(){return this.bannerType!==null}setCurrentBanner(o){this.currentBanner=o}setForceShowDetails(o){this.forceShowDetails=o}get showRouteInstantly(){return!!(this.kiosk&&!this.forceShowDetails)}startBuildRoute(){this.rootStore.selectSearch(""),this.mapControlsHidden=!0,this.floorsControlHidden=!0,this.hideHeaderLogo=!0,this.hideFreeOrDemo=!0,this.hideOverlay=!0,this.hideCookieConsent=!0,this.buildRoute=!0}setGlobalErrorMessage(o){this.globalErrorMessages.push(o)}popGlobalErrorMessage(){this.globalErrorMessages.pop()}initializeUIScale(){if(new URLSearchParams(window.location.search).get("kiosk")!=="0"&&B){const s=localStorage.getItem(H)??localStorage.getItem(U);if(s){const i=parseFloat(s);!isNaN(i)&&i>=.8&&i<=1.4&&(this._customUIScale=i)}}}setUIScale(o,s=!0){if(o===void 0||isNaN(o)||o<this.minUIScale||o>this.maxUIScale){ft.warn(`Invalid ui-scale value: ${o}. Must be between ${this.minUIScale} and ${this.maxUIScale}.`);return}this._customUIScale=o,s&&B&&(localStorage.setItem(H,o.toString()),localStorage.removeItem(U))}resetUIScale(){this._customUIScale=null,B&&(localStorage.removeItem(H),localStorage.removeItem(U))}enableSetKioskMode(o){this.setKioskModeEnabled=o}setKioskData(o){this.kioskData=o}}e([a.struct],t.prototype,"list",void 0),e([a.ref],t.prototype,"details",void 0),e([a.ref],t.prototype,"hoveredExhibitor",void 0),e([a.ref],t.prototype,"hoveredBooth",void 0),e([a],t.prototype,"zoomBy",void 0),e([a],t.prototype,"rollReset",void 0),e([a],t.prototype,"moveToBooths",void 0),e([a],t.prototype,"moveToRect",void 0),e([a],t.prototype,"moveToRectPaddingPercent",void 0),e([a],t.prototype,"moveToLocation",void 0),e([a],t.prototype,"menu",void 0),e([a],t.prototype,"searchFocused",void 0),e([a],t.prototype,"searchClearMode",void 0),e([a],t.prototype,"printingPdf",void 0),e([a.struct],t.prototype,"screenSize",void 0),e([a],t.prototype,"desiredOverlaySize",void 0),e([a],t.prototype,"overlayShowsAll",void 0),e([a],t.prototype,"centerMap",void 0),e([a],t.prototype,"zoomAfTransformK",void 0),e([a],t.prototype,"activeListIndex",void 0),e([a],t.prototype,"devicePixelRatio",void 0),e([a],t.prototype,"wsStarted",void 0),e([a],t.prototype,"canvasStarted",void 0),e([a],t.prototype,"kiosk",void 0),e([a],t.prototype,"inIdle",void 0),e([a],t.prototype,"modalActive",void 0),e([a],t.prototype,"galleryActive",void 0),e([a],t.prototype,"hideOverlay",void 0),e([a],t.prototype,"searchButtonsOverride",void 0),e([a],t.prototype,"hideCookieConsent",void 0),e([a],t.prototype,"hideHeaderLogo",void 0),e([a],t.prototype,"hideLogoInBooth",void 0),e([a],t.prototype,"disableBookmarked",void 0),e([a],t.prototype,"hideLanguage",void 0),e([a],t.prototype,"monochrome",void 0),e([a],t.prototype,"heatmap",void 0),e([a],t.prototype,"heatmapYah",void 0),e([a],t.prototype,"debugCircles",void 0),e([a],t.prototype,"mapControlsHidden",void 0),e([a],t.prototype,"floorsControlHidden",void 0),e([a],t.prototype,"hideFreeOrDemo",void 0),e([a],t.prototype,"freeBannerDismissed",void 0),e([a],t.prototype,"currentBanner",void 0),e([a],t.prototype,"sceneDefReady",void 0),e([a],t.prototype,"categoryFilterOpen",void 0),e([a],t.prototype,"selectedCategoryFilters",void 0),e([a],t.prototype,"selectedPoiTypeFilters",void 0),e([a],t.prototype,"selectedTrack",void 0),e([a],t.prototype,"subButtonsVisible",void 0),e([a],t.prototype,"searchBoxMode",void 0),e([a],t.prototype,"searchBoxTitle",void 0),e([a],t.prototype,"searchBoxSubtitle",void 0),e([a],t.prototype,"routeTitle",void 0),e([a],t.prototype,"routeDescription",void 0),e([a],t.prototype,"isMultiPointRoute",void 0),e([a],t.prototype,"tourTitle",void 0),e([a],t.prototype,"tourDescription",void 0),e([a],t.prototype,"isMultiPointTour",void 0),e([a],t.prototype,"pathwayOnlyMode",void 0),e([a],t.prototype,"isOverlayScrolled",void 0),e([a],t.prototype,"listScrollTop",void 0),e([a],t.prototype,"listScrollItemId",void 0),e([a],t.prototype,"listScrollIndex",void 0),e([a],t.prototype,"_customUIScale",void 0),e([d],t.prototype,"setSelectedCategoryFilters",null),e([d],t.prototype,"resetCategoryFilter",null),e([d],t.prototype,"setSearchClearMode",null),e([d],t.prototype,"setRouteTitle",null),e([d],t.prototype,"setRouteDescription",null),e([d],t.prototype,"setIsMultiPointRoute",null),e([d],t.prototype,"setTourTitle",null),e([d],t.prototype,"setTourDescription",null),e([d],t.prototype,"setIsMultiPointTour",null),e([d],t.prototype,"setPathwayOnlyMode",null),e([d],t.prototype,"setMultiPointTourList",null),e([n],t.prototype,"activePathwayLayers",null),e([n],t.prototype,"highlightedBooths",null),e([n],t.prototype,"rtl",null),e([n({keepAlive:!0})],t.prototype,"noOverlay",null),e([n],t.prototype,"overlayOnDemand",null),e([n],t.prototype,"overlayHiddenNow",null),e([n({keepAlive:!0})],t.prototype,"selectedExhibitor",null),e([n({keepAlive:!0})],t.prototype,"selectedBooth",null),e([n({keepAlive:!0})],t.prototype,"selectedCategory",null),e([n({keepAlive:!0})],t.prototype,"selectedRoute",null),e([n({keepAlive:!0})],t.prototype,"selectedSpeaker",null),e([n({keepAlive:!0})],t.prototype,"uiScale",null),e([n({keepAlive:!0})],t.prototype,"isGuidedToursActive",null),e([n({keepAlive:!0})],t.prototype,"getRouteNextFloor",null),e([n],t.prototype,"headerHeightRem",null),e([n],t.prototype,"headerHeightPx",null),e([n],t.prototype,"overlayPosition",null),e([n],t.prototype,"overlayCollapsed",null),e([n],t.prototype,"overlaySize",null),e([n],t.prototype,"overlayBottom",null),e([n],t.prototype,"overlayLeft",null),e([n],t.prototype,"overlayWidthPx",null),e([n({keepAlive:!0})],t.prototype,"wsImageHeightPx",null),e([n],t.prototype,"wsPaddingPx",null),e([n],t.prototype,"wsOccupiedHeightPx",null),e([n({keepAlive:!0})],t.prototype,"wsShown",null),e([n],t.prototype,"wsDesktopPosition",null),e([n],t.prototype,"wsPosition",null),e([n],t.prototype,"responsiveClass",null),e([n],t.prototype,"mapVisibleTop",null),e([n],t.prototype,"mapVisibleBottom",null),e([n],t.prototype,"mapVisibleStart",null),e([n],t.prototype,"searchActionsHeightPx",null),e([n],t.prototype,"shouldShowSearchButtons",null),e([n],t.prototype,"shouldShowMobileToggle",null),e([n],t.prototype,"mobileToggleIsListMode",null),e([n],t.prototype,"canvasVisibleRectPx",null),e([n],t.prototype,"shouldShiftMapRect",null),e([n],t.prototype,"hasAppliedFilters",null),e([n],t.prototype,"canvasVisibleRectPt",null),e([n],t.prototype,"canvasSizePt",null),e([n({keepAlive:!0})],t.prototype,"shouldUseBackdrop",null),e([a],t.prototype,"forceDim",void 0),e([d],t.prototype,"setForceDim",null),e([n],t.prototype,"dimmed",null),e([n],t.prototype,"defaultSearchItems",null),e([n],t.prototype,"searchItems",null),e([n],t.prototype,"searchList",null),e([n],t.prototype,"foundInDescription",null),e([n],t.prototype,"foundInDescriptionStruct",null),e([n],t.prototype,"categoryFilteredSearchList",null),e([n],t.prototype,"fuzzySearchItems",null),e([n],t.prototype,"listItems",null),e([n({keepAlive:!0})],t.prototype,"listBooths",null),e([n({keepAlive:!0})],t.prototype,"selectedBooths",null),e([n({keepAlive:!0})],t.prototype,"hoveredBooths",null),e([n],t.prototype,"visibility",null),e([d],t.prototype,"setVisibility",null),e([d],t.prototype,"toggleMapOverlay",null),e([d],t.prototype,"changeZoom",null),e([d],t.prototype,"zoomIn",null),e([d],t.prototype,"zoomOut",null),e([d],t.prototype,"fitBounds",null),e([n({keepAlive:!0})],t.prototype,"selectedEventItem",null),e([a],t.prototype,"mapSettings",void 0),e([d],t.prototype,"setMapSettings",null),e([d],t.prototype,"resetMapSettings",null),e([n],t.prototype,"baseQRCodeUrl",null),e([n],t.prototype,"viewMapOnPhoneQRCodeUrl",null),e([n],t.prototype,"routeQRCodeUrl",null),e([n],t.prototype,"isFeaturedExhibitorActive",null),e([n],t.prototype,"activeInterfaceData",null),e([n],t.prototype,"searchBoxConfig",null),e([n],t.prototype,"searchBoxActions",null),e([n],t.prototype,"overlayInterfaceClasses",null),e([n],t.prototype,"isOverlayOpen",null),e([d],t.prototype,"setOverlayScrolled",null),e([d],t.prototype,"setListScrollTop",null),e([d],t.prototype,"setListScrollItemId",null),e([d],t.prototype,"getListScrollTop",null),e([d],t.prototype,"getListScrollItemId",null),e([d],t.prototype,"clearListScroll",null),e([n],t.prototype,"bannerType",null),e([n],t.prototype,"isBannerVisible",null),e([d],t.prototype,"setCurrentBanner",null),e([a],t.prototype,"forceShowDetails",void 0),e([d],t.prototype,"setForceShowDetails",null),e([n],t.prototype,"showRouteInstantly",null),e([a],t.prototype,"buildRoute",void 0),e([d],t.prototype,"startBuildRoute",null),e([a],t.prototype,"globalErrorMessages",void 0),e([d],t.prototype,"setGlobalErrorMessage",null),e([d],t.prototype,"popGlobalErrorMessage",null),e([d],t.prototype,"initializeUIScale",null),e([d],t.prototype,"setUIScale",null),e([d],t.prototype,"resetUIScale",null),e([a],t.prototype,"setKioskModeEnabled",void 0),e([d],t.prototype,"enableSetKioskMode",null),e([a],t.prototype,"kioskData",void 0),e([d],t.prototype,"setKioskData",null);function J(P){return"description"in P&&typeof P.description=="string"?P.description:void 0}function D(P,o,s=[]){const i=[];return P.forEach(c=>{if(c instanceof x)i.push(...c.booths);else if(c instanceof I)i.push(c);else if(c instanceof O){const r=o.find(l=>l.id===c.boothId);c.boothId&&r&&i.push(r)}else c instanceof K&&s.filter(r=>r.speakers.some(l=>l.id===c.id)&&r.boothId).forEach(r=>{const l=o.find(u=>u.id===r.boothId);l&&i.push(l)})}),new Set(i.filter(Boolean))}
|
|
1
|
+
import{__decorate as e}from"tslib";import{Box as ot,Point as it}from"@expofp/geometry";import{action as d,computed as n,observable as a}from"mobx";import{setKioskUrlParams as st}from"../components/Kiosk/kioskUrlParam";import{mapScene as rt}from"../components/Map/scene";import{LANGUAGE_TYPE as E,LEGACY_PREVIEW_MODE_STORAGE_KEY as lt,LEGACY_UI_SCALE_STORAGE_KEY as U,LEGACY_VIEWER_MODE_STORAGE_KEY as at,MOBILE_BREAKPOINT as nt,PREVIEW_MODE_STORAGE_KEY as ht,UI_SCALE_STORAGE_KEY as H,VIEWER_MODE_STORAGE_KEY as ct,VISIBILITY_STORAGE_KEY as $}from"../constants";import k from"../data";import{svgArea as _,svgAreaExplicit as pt}from"../data/svg";import{readFreeBannerDismissed as dt}from"../tools/freeBanner";import{hasUserConsent as ut}from"../tools/gtag";import{hasHtmlTags as W}from"../tools/has-html-tags";import ft from"../tools/logger";import L from"../tools/settings";import{stripHtml as j}from"../tools/strip-html";import{remsToPixels as D}from"../utils";import X from"../utils/browser";import{getLocale as yt,getLocales as mt,t as v}from"../utils/i18n";import{isLocalStorageAvailable as B}from"../utils/localStorage";import{getResponsiveClass as gt}from"../utils/responsiveClass";import{sanitizeStr as Z}from"../utils/sanitizeText";import{fitRectIsFraming as vt,getVenueFitMarginPercent as St,resolveVenueFitRect as bt}from"../utils/scene-bounds";import{uiState as w}from".";import{BoothBase as I,RegularBooth as A,SpecialBooth as V}from"./BoothStore";import{EventItem as O}from"./EventStore";import{Exhibitor as x}from"./ExhibitorStore";import{findEntityByExternalId as It,Route as M}from"./RouteStore";import{SpeakerItem as K}from"./SpeakerStore";const xt=["dimensions25"];export default class t{setSelectedCategoryFilters(o){this.selectedCategoryFilters=o}resetCategoryFilter(){this.selectedCategoryFilters=[],this.categoryFilterOpen=!1}setSearchClearMode(o){this.searchClearMode=o}setRouteTitle(o){this.routeTitle=o}setRouteDescription(o){this.routeDescription=o}setIsMultiPointRoute(o){this.isMultiPointRoute=o}setTourTitle(o){this.tourTitle=o}setTourDescription(o){this.tourDescription=o}setIsMultiPointTour(o){this.isMultiPointTour=o}setPathwayOnlyMode(o){this.pathwayOnlyMode=o}setMultiPointTourList(o){this.list={type:"multi-point-tour",tourId:o}}get activePathwayLayers(){return this.list?.type==="multi-point-tour"?this.rootStore.toursStore.getTourById(this.list.tourId)?.layers?.map(s=>s.id)||[]:[]}get highlightedBooths(){const o=new Set(this.rootStore.exhibitorStore.highlightedByExternalIds),s=new Set(this.rootStore.boothStore.highlightedByExternalIds),i=new Set([this.rootStore.exhibitorStore.exhibitors.filter(r=>o.has(r.externalId)).flatMap(r=>r.booths.filter(l=>l instanceof A)).map(r=>r.id.toString()),this.rootStore.boothStore.booths.filter(r=>s.has(r.externalId)).map(r=>r.id.toString())].flat());if(this.list?.type==="search"&&this.list?.text?.trim().length){i.clear();const r=this.fuzzySearchItems.filter(l=>l.score===0).map(l=>l.item);r.length?F(r,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(l=>i.add(l.id.toString())):this.listBooths.forEach(l=>i.add(l.id.toString()))}if(this.list?.type==="filter"&&(i.clear(),this.list.items.flatMap(r=>r.booths.filter(l=>l instanceof A)).forEach(r=>i.add(r.id.toString()))),this.categoryFilterOpen&&this.selectedCategoryFilters.length>0?(i.clear(),this.selectedCategoryFilters.forEach(r=>{r.exhibitors.flatMap(l=>l.booths).forEach(l=>i.add(l.id.toString()))})):this.list?.type==="category"&&(i.clear(),this.list.category.exhibitors.flatMap(r=>r.booths).forEach(r=>i.add(r.id.toString()))),this.list?.type==="bookmarks"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="visited"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="exhibitors"){i.clear();const r=this.list.text?.toLowerCase().trim();let l=this.rootStore.exhibitorStore.exhibitors;r&&(l=l.filter(u=>u.name.toLowerCase().includes(r))),l.flatMap(u=>u.booths.filter(g=>g instanceof A)).forEach(u=>i.add(u.id.toString()))}if(this.selectedPoiTypeFilters.length>0&&(i.clear(),this.selectedPoiTypeFilters.forEach(r=>{this.rootStore.boothStore.booths.filter(l=>l.poiTypeId===r.id).forEach(l=>i.add(l.id.toString()))})),this.details instanceof M&&(i.clear(),this.details.from instanceof I&&i.add(this.details.from.id.toString()),this.details.to instanceof I&&i.add(this.details.to.id.toString()),this.details.waypoints?.forEach(r=>i.add(r.id.toString()))),this.details instanceof I&&(i.clear(),i.add(this.details.id.toString())),this.details instanceof x&&(i.clear(),this.details.booths.filter(r=>r instanceof A).forEach(r=>i.add(r.id.toString()))),this.details instanceof O){const r=this.details;if(r.boothId){i.clear();const l=this.rootStore.boothStore.booths.find(u=>u.id===r.boothId);l&&i.add(l.id.toString())}}return i}constructor(o){this.interfaceMetadata=Object.freeze([{id:"menu",className:"efp-overlay-menu",priority:80,isActive:()=>this.menu,searchBoxConfig:()=>({mode:"interface",title:v("Menu")})},{id:"exhibitor",className:"efp-overlay-exhibitor",priority:70,isActive:()=>this.details instanceof x,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"booth",className:"efp-overlay-booth",priority:70,isActive:()=>this.details instanceof I,searchBoxConfig:()=>{const s=this.details;return{mode:"details",title:s.title||s.name}}},{id:"event",className:"efp-overlay-event",priority:70,isActive:()=>this.details instanceof O,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"route",className:"efp-overlay-route",priority:70,isActive:()=>this.details instanceof M,searchBoxConfig:()=>({mode:"details",title:v("Directions")})},{id:"search",className:"efp-overlay-search",priority:60,isActive:()=>!this.details&&!this.menu&&this.list.type==="search"&&(this.rootStore.fp.alwaysShowSidebar&&!this.overlayOnDemand||this.heatmap||this.searchFocused||this.list.text.length>0||this.searchClearMode),searchBoxConfig:()=>({mode:"search",title:v("Search")})},{id:"exhibitors",className:"efp-overlay-exhibitors",priority:50,isActive:()=>this.list.type==="exhibitors"&&!this.details,searchBoxConfig:()=>({mode:"search",title:v("Exhibitors")})},{id:"filter",className:"efp-overlay-filter",priority:50,isActive:()=>this.list.type==="filter"&&!this.details,searchBoxConfig:()=>({mode:"search",title:v("Filter")})},{id:"bookmarks",className:"efp-overlay-bookmarks",priority:50,isActive:()=>this.list.type==="bookmarks"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:v("Bookmarks"),badge:this.rootStore.bookmarksStore.total})},{id:"visited",className:"efp-overlay-visited",priority:50,isActive:()=>this.list.type==="visited"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:v("Visited"),badge:this.rootStore.exhibitorStore.visited.length})},{id:E,className:"efp-overlay-language",priority:50,isActive:()=>this.list.type===E,searchBoxConfig:()=>({mode:"interface",title:v("Language")})},{id:"category",className:"efp-overlay-category",priority:50,isActive:()=>!w.menu&&!!w.selectedCategory,searchBoxConfig:()=>({mode:"interface",title:this.list.type==="category"&&this.list.category?.name||v("Categories")})},{id:"sessions",className:"efp-overlay-sessions",priority:50,isActive:()=>this.list.type==="sessions"&&!this.details,searchBoxConfig:()=>({mode:"search",title:v("Sessions"),subtitle:this.selectedTrack?this.selectedTrack.name:void 0})},{id:"speakers",className:"efp-overlay-speakers",priority:50,isActive:()=>this.list.type==="speakers"&&!this.details,searchBoxConfig:()=>({mode:"search",title:v("Speakers")})},{id:"speaker",className:"efp-overlay-speaker",priority:50,isActive:()=>this.details instanceof K,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"tours",className:"efp-overlay-tours",priority:50,isActive:()=>this.list.type==="tours"&&!this.details,searchBoxConfig:()=>({mode:"search",title:v("Guided Tours")})},{id:"multi-point-wayfinding",className:"efp-overlay-multi-point",priority:75,isActive:()=>!!(this.isMultiPointRoute&&this.selectedRoute&&this.list.type!=="route-planner"),searchBoxConfig:()=>({mode:"interface",title:this.routeTitle||v("Multi-point route")})},{id:"multi-point-tour",className:"efp-overlay-multi-point-tour",priority:75,isActive:()=>this.list.type==="multi-point-tour"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:this.tourTitle||v("Multi-point route")})},{id:"route-planner",className:"efp-overlay-route-planner",priority:76,isActive:()=>this.list.type==="route-planner"&&(!this.details||this.details instanceof M),searchBoxConfig:()=>({mode:"interface",title:v("Route planner")})}].sort((s,i)=>i.priority-s.priority)),this.list={type:"search",text:"",focused:!1},this.details=null,this.hoveredExhibitor=null,this.hoveredBooth=null,this.zoomBy=null,this.rollReset=!1,this.moveToBooths=null,this.moveToRect=null,this.moveToRectPaddingPercent=null,this.moveToLocation=!1,this.menu=!1,this.searchFocused=!1,this.searchClearMode=!1,this.printingPdf=!1,this.screenSize=new it(window.innerWidth,window.innerHeight),this.overlayShowsAll=!1,this.centerMap=!1,this.zoomAfTransformK=1,this.activeListIndex=-1,this.devicePixelRatio=window.devicePixelRatio,this.previewExhibitor=null,this.wsStarted=!1,this.canvasStarted=!1,this.kiosk=!1,this.inIdle=!1,this.modalActive={share:!1},this.galleryActive=!1,this.hideOverlay=!1,this.searchButtonsOverride=null,this.hideCookieConsent=!!ut(),this.hideHeaderLogo=!1,this.hideLogoInBooth=!1,this.disableBookmarked=!1,this.hideLanguage=!1,this.monochrome=!1,this.heatmap=!1,this.heatmapYah=!1,this.rootElement=null,this.debugCircles=[],this.mapControlsHidden=!1,this.floorsControlHidden=!1,this.hideFreeOrDemo=!1,this.freeBannerDismissed=dt(sessionStorage),this.currentBanner=null,this.sceneDefReady=!1,this.categoryFilterOpen=!1,this.selectedCategoryFilters=[],this.selectedPoiTypeFilters=[],this.selectedTrack=null,this.subButtonsVisible=!1,this.searchBoxMode="search",this.searchBoxTitle="",this.isMultiPointRoute=!1,this.isMultiPointTour=!1,this.pathwayOnlyMode=!1,this.isOverlayScrolled=!1,this.listScrollTop=0,this.listScrollItemId=null,this.listScrollIndex=0,this.scrollPositions=new Map,this.scrollItemIds=new Map,this._customUIScale=null,this.searchFilterHeightPx=54,this.searchInputHeightPx=54,this.overlayUISizePx=390,this.overlayKioskSizePx=450,this.overlayMediumHeightRems=10,this.forceDim=!1,this.mapSettings={...this.defaultMapSettings},this.forceShowDetails=!1,this.buildRoute=!1,this.globalErrorMessages=[],this.minUIScale=.8,this.maxUIScale=1.4,this.setKioskModeEnabled=!1,this.kioskData=null,this.rootStore=o,this.initializeUIScale()}get rtl(){const o=yt();return o==="ar"||o==="he"}get noOverlay(){return this.rootStore.fp.noOverlay||this.hideOverlay}get overlayOnDemand(){return this.noOverlay&&this.searchButtonsOverride===!0}get overlayHiddenNow(){return this.noOverlay&&!(this.overlayOnDemand&&this.isOverlayOpen)}get onBoothClick(){return this.rootStore.fp.onBoothClick}get onMarkerClick(){return this.rootStore.fp.onMarkerClick}get onBookmarkClick(){return this.rootStore.fp.onBookmarkClick}get onVisitedClick(){return this.rootStore.fp.onVisitedClick}get onCategoryClick(){return this.rootStore.fp.onCategoryClick}get onDirection(){return this.rootStore.fp.onDirection}get onDetails(){return this.rootStore.fp.onDetails}get onExhibitorCustomButtonClick(){return this.rootStore.fp.onExhibitorCustomButtonClick}get onGetCoordsClick(){return this.rootStore.fp.onGetCoordsClick}get selectedExhibitor(){return this.details instanceof x?this.details:null}get selectedBooth(){return this.details instanceof I?this.details:null}get selectedCategory(){return this.list.type==="category"?this.list.category:null}get selectedRoute(){return this.details instanceof M?this.details:null}get selectedSpeaker(){return this.details instanceof K?this.details:null}get uiScale(){return this._customUIScale!==null?this._customUIScale:this.kiosk?1.2:1}get isGuidedToursActive(){return this.rootStore.toursStore.isActive}get getRouteNextFloor(){const o=this.rootStore.routeStore.pathLayers,s=this.rootStore.routeStore.currentRouteLayer?.name;if(!s)return null;const i=o.findIndex(c=>c.layer?.name===s);return i===-1?null:o[i+1]?.layer?.name??null}get headerHeightRem(){return 0}get headerHeightPx(){return D(this.headerHeightRem)}get overlayPosition(){return this.screenSize.width>nt||this.kiosk?"left":"bottom"}get overlayCollapsed(){return this.kiosk&&this.overlayPosition==="left"&&!this.searchFocused&&!this.menu&&!this.details&&!this.selectedCategory&&!this.selectedExhibitor&&this.list.type!=="bookmarks"&&this.list.type!==E&&!this.list.text?.length}get overlaySize(){return this.overlayLeft?"full":this.desiredOverlaySize}get overlayBottom(){return this.overlayPosition==="bottom"}get overlayLeft(){return this.overlayPosition==="left"}get overlayWidthPx(){return this.overlayHiddenNow?0:this.overlayLeft?this.kiosk?this.overlayKioskSizePx:this.overlayUISizePx:D(this.screenSize.width)}get wsImageHeightPx(){return 44}get wsPaddingPx(){return D(.25)}get wsOccupiedHeightPx(){return this.wsShown?this.wsImageHeightPx+this.wsPaddingPx*2:0}get wsShown(){return!this.hideHeaderLogo&&this.rootStore.exhibitorStore.advertised.length>0}get wsDesktopPosition(){return L.EXPO==="cbresupplypartner"?"bottom":"top"}get wsPosition(){return this.overlayBottom?"top":this.wsDesktopPosition}get responsiveClass(){return gt(this.screenSize.width)}get mapVisibleTop(){return(this.wsPosition==="top"?this.wsOccupiedHeightPx:0)+this.headerHeightPx}get mapVisibleBottom(){return this.overlayLeft||this.overlayHiddenNow?this.wsPosition==="bottom"?this.wsOccupiedHeightPx:0:D(this.overlayMediumHeightRems)}get mapVisibleStart(){return 0}get searchActionsHeightPx(){return this.overlayPosition==="bottom"?this.searchInputHeightPx+this.searchFilterHeightPx:this.searchInputHeightPx}get shouldShowSearchButtons(){return this.rootStore.searchButtonsStore.hasAnySearchButtons&&!this.details&&!this.menu&&![E,"filter"].includes(this.list.type)}get shouldShowMobileToggle(){const o=this.list.type==="route-planner";return this.overlayPosition==="bottom"&&(o||!this.details&&!this.menu&&this.list.type!==E&&this.list.type!=="bookmarks"&&this.list.type!=="sessions")}get mobileToggleIsListMode(){return!this.isOverlayOpen||this.overlaySize!=="full"}get canvasVisibleRectPx(){const o=this.screenSize;return ot.fromMinMax({x:w.rtl?0:this.mapVisibleStart,y:this.mapVisibleTop+this.searchActionsHeightPx},{x:w.rtl?o.width-this.mapVisibleStart:o.width,y:o.height-this.mapVisibleBottom})}get shouldShiftMapRect(){return this.overlayPosition==="left"&&(this.details||this.hasAppliedFilters||this.selectedRoute)}get hasAppliedFilters(){return this.selectedCategoryFilters.length>0||this.selectedPoiTypeFilters.length>0}get canvasVisibleRectPt(){return this.canvasVisibleRectPx.scale(this.devicePixelRatio,{x:0,y:0})}get canvasSizePt(){return this.screenSize.multiply(this.devicePixelRatio)}get shouldUseBackdrop(){if(w.overlayCollapsed)return!1;if(B&&localStorage.getItem("forcebackdrop")==="1")return!0;if(this.overlayBottom||this.selectedExhibitor?.leadingImageUrl&&!this.selectedExhibitor?.leadingImageLinkUrl)return!1;const o=X.satisfies({safari:">=13"}),s=X.satisfies({chrome:">=77"});return/(android)/i.test(navigator.userAgent)?!1:o||s&&w.canvasSizePt.height*w.canvasSizePt.width<3e6}setForceDim(o){this.forceDim=o}get dimmed(){return this.forceDim||this.pathwayOnlyMode?!0:this.highlightedBooths.size>0||this.list?.type==="search"&&this.list?.text?.trim().length>0||this.list?.type==="exhibitors"}get defaultSearchItems(){const{exhibitorStore:o,categoryStore:s,boothStore:i,heatmapStore:c}=this.rootStore;let r=o.exhibitors;const l=s.categories.filter(f=>f.exhibitors.length),u=i.booths;this.selectedPoiTypeFilters.length>0&&(r=r.filter(f=>f.booths.some(y=>this.selectedPoiTypeFilters.some(S=>y.poiTypeId===S.id))));let g=[];const C=!this.selectedCategoryFilters.length&&k.showCategories?l.filter(f=>xt.includes(L.EXPO)?!f.name.includes("/"):!0):[],T=u.filter(f=>f instanceof V);return this.selectedCategoryFilters.length>0?g=[...r]:(k.showCompaniesAndBooths&&(g=g.concat(r)),k.showOtherSpaces&&(g=g.concat(T))),this.heatmap?[...r,...u].sort((y,S)=>c.getClicksByType(S)-c.getClicksByType(y)):this.heatmapYah?c.heatmapData?.yah?.sort((f,y)=>c.getClicksByType(y)-c.getClicksByType(f))||[]:r.length===0?u:[...C,...g.sort((f,y)=>{const S=f instanceof x&&f.featured!==void 0,z=y instanceof x&&y.featured!==void 0;if(S!==z)return S?-1:1;const R=f instanceof V&&f.title?f.title:f.name,N=y instanceof V&&y.title?y.title:y.name;return R.localeCompare(N,void 0,{sensitivity:"base",numeric:!0})})]}get searchItems(){if(this.list.type!=="search")return[];const o=this.list.text?.trim().toLowerCase()||"",{exhibitorStore:s,boothStore:i,eventStore:c,speakerStore:r,heatmapStore:l}=this.rootStore;let u=s.exhibitors;const g=i.booths,C=c.eventItems,T=r.speakers;if(this.selectedCategoryFilters.length>0&&(u=u.filter(h=>this.selectedCategoryFilters.some(p=>h.categories.some(m=>m.id===p.id)))),this.selectedPoiTypeFilters.length>0&&(u=u.filter(h=>h.booths.some(p=>this.selectedPoiTypeFilters.some(m=>p.poiTypeId===m.id)))),!o)return this.defaultSearchItems;const f=[o.replace(/&[^&=]+=[^&]+/g,"")];if(this.heatmapYah)return(l.heatmapData.yah??[]).filter(p=>Number.isNaN(Number(o))?p:p.viewCount>=Number(o)).sort((p,m)=>l.getClicksByType(m)-l.getClicksByType(p));const y=[],S=new Set,z=new Set,R=new Set,N=new Set;function G(h){return h?h.replace(/[!@#$%^*\-.,()^#$%:?_+'"/]/g," ").replace(/\s\s+/g," "):""}function b(h,p){return!h||!p?!1:G(h).toLowerCase().includes(G(p).toLowerCase())}function Y(h,p){return h?b(h,p)||b(k.levelTerm+" "+h,p):!1}u.forEach(h=>{f.some(p=>b(h.name,p)||h.booths.some(m=>!p&&b(m.name,p)||Y(m.layer?.name??null,p)))&&S.add(h)}),this.selectedCategoryFilters.length>0&&g.forEach(h=>{(this.heatmap||!(h instanceof A)||!Array.from(S).find(m=>m.booths.includes(h)))&&f.some(m=>b(h.title||"",m)||b(h.name,m)||b(h.fullName,m)||Y(h.layer?.name??null,m))&&z.add(h)});const q=C,tt=T;if(q.forEach(h=>{f.some(p=>b(h.name||"",p)||b(h.description||"",p))&&R.add(h)}),tt.forEach(h=>{f.some(p=>b(h.name,p)||b(h.company,p)||b(h.jobTitle,p))&&N.add(h)}),y.push(...R),y.push(...S),this.heatmap)return y.sort((h,p)=>l.getClicksByType(p)-l.getClicksByType(h));const et=new Map(y.map(h=>[h.id,h]));return y.map(h=>{if(!h.name)return null;const p=Z(h instanceof I&&h.fullName.toLowerCase()||h.name.toLowerCase()),m=p.indexOf(Z(o));if(m===-1)return null;const Q={id:h.id,position:m,lowerCaseName:p,featured:!1};return h instanceof x&&(Q.featured=h.featured),Q}).filter(h=>!!h).sort((h,p)=>(h.featured||p.featured)&&h.featured!==p.featured?h.featured?-1:1:h.position!==p.position?h.position-p.position:h.lowerCaseName.localeCompare(p.lowerCaseName)||String(h.id).localeCompare(String(p.id))).map(({id:h})=>et.get(h)).filter(h=>!!h)}get searchList(){return[...this.rootStore.eventStore.eventItems,...this.rootStore.speakerStore.speakers,...this.rootStore.categoryStore.categories.filter(o=>o.exhibitors.length),...this.rootStore.exhibitorStore.exhibitors,...this.rootStore.boothStore.booths]}get foundInDescription(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return[];const s=this.fuzzySearchItems.map(({item:l})=>l),i=new Set(s.map(l=>l.name)),c=this.categoryFilteredSearchList.filter(l=>!i.has(l.name)),r=[];for(const l of c){const u=J(l);if(!u)continue;const C=(W(u)?j(u):u).toLowerCase().indexOf(o);C!==-1&&r.push({item:l,pos:C})}return r.sort((l,u)=>l.pos-u.pos),r.map(l=>l.item)}get foundInDescriptionStruct(){const o={};if(this.list?.type!=="search")return o;const s=this.list?.text?.trim().toLowerCase();return this.foundInDescription.forEach(i=>{let c=J(i);if(!c)return;W(c)&&(c=j(c));const r=c.toLowerCase().indexOf(s);if(r===-1)return;const l=3,u=r>l?r-l:0,g=c.substring(u).trim();o[i.id]=r>0?`...${g}`:g}),o}get categoryFilteredSearchList(){return this.selectedCategoryFilters.length===0?this.searchList:this.searchList.filter(o=>o instanceof x&&this.selectedCategoryFilters.some(s=>o.categories.some(i=>i.id===s.id)))}get fuzzySearchItems(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return this.defaultSearchItems.map(r=>({item:r,score:0,matches:[]}));const s=this.rootStore.fuzzySearchEngineStore.search(this.categoryFilteredSearchList,o),i=[],c=[];for(const r of s){const l=r.item,u=l.entity.type,g=u==="booth"?l:null,C=u==="exhibitor"?l:null,T=[l.name?.toLowerCase()??"",g?.title?.toLowerCase()??"",g?.fullName?.toLowerCase()??"",...C?.booths?.map(y=>y.name?.toLowerCase()??"")??[]];let f=1/0;for(const y of T){const S=y.indexOf(o);S!==-1&&S<f&&(f=S)}f!==1/0?i.push({result:{item:l,score:0},pos:f}):c.push(r)}return i.sort((r,l)=>r.pos-l.pos),[...i.map(r=>r.result),...c]}get listItems(){if(this.details instanceof M&&this.list.type!=="multi-point-tour")return[this.details.from,this.details.to].filter(o=>o instanceof I);switch(this.list.type){case"search":{let o=!(this.heatmap||this.heatmapYah)&&this.rootStore.fuzzySearchEngineStore.engine?this.fuzzySearchItems.map(({item:s})=>s).concat(this.foundInDescription):this.searchItems;return o=o.filter(s=>s.entity.type==="booth"?!s.exhibitors.length:!0),this.hasAppliedFilters?o.filter(s=>{if(this.selectedCategoryFilters.length>0&&s instanceof x&&!this.selectedCategoryFilters.some(i=>s.categories.some(c=>c.id===i.id)))return!1;if(this.selectedPoiTypeFilters.length>0){if(s instanceof x&&!s.booths.some(i=>this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))||s instanceof I&&!this.selectedPoiTypeFilters.some(i=>s.poiTypeId===i.id))return!1;if(s instanceof O&&s.boothId){const i=this.rootStore.boothStore.booths.find(c=>c.id===s.boothId);if(!i||!this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))return!1}}return!0}):o}case"bookmarks":return[...this.rootStore.exhibitorStore.bookmarked,...this.rootStore.eventStore.bookmarked,...this.rootStore.speakerStore.bookmarked,...this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)];case"visited":return[...this.rootStore.exhibitorStore.visited,...this.rootStore.eventStore.visited];case"category":return this.list.category.exhibitors;case E:return mt();case"filter":return this.list.items;case"sessions":return this.rootStore.eventStore.eventItems;case"exhibitors":{const o=this.rootStore.exhibitorStore.exhibitors,s=this.list.text?.toLowerCase().trim();return s?o.filter(i=>i.name.toLowerCase().includes(s)):o}case"multi-point-tour":{const o=this.rootStore.toursStore.getTourById(this.list.tourId);return o?!o.points||o.points.length===0?[]:o.points.map(s=>{const i=parseInt(s);if(!isNaN(i)){const r=this.rootStore.boothStore.boothById.get(i);if(r)return r}return It(s)?.entity||null}).filter(s=>!!s):[]}case"route-planner":return this.rootStore.routePlannerStore.resolvedBooths}throw new Error("Unknown list.type")}get listBooths(){return F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems)}get selectedBooths(){let o=[];this.selectedExhibitor?o=this.selectedExhibitor.booths:this.selectedBooth&&(o=[this.selectedBooth]);const s=this.selectedRoute,i=[s?.from,s?.to,...s?.waypoints??[]].filter(c=>c instanceof I);return o.push(...i),new Set(o)}get hoveredBooths(){let o=[];return this.hoveredBooth?o=[this.hoveredBooth]:this.hoveredExhibitor&&(o=this.hoveredExhibitor.booths),new Set(o)}get visibility(){return{controls:!this.mapControlsHidden,levels:!this.floorsControlHidden,header:this.wsShown,overlay:!this.hideOverlay,searchButtons:this.searchButtonsOverride??!this.hideOverlay}}setVisibility(o){const s=["controls","levels","header","overlay"],i={...s.reduce((r,l)=>({...r,[l]:!0}),{}),...s.filter(r=>r in o).reduce((r,l)=>({...r,[l]:o[l]}),{})},c=typeof o.searchButtons=="boolean"?o.searchButtons:null;B&&(Object.values(i).every(Boolean)&&c===null?localStorage.removeItem($):localStorage.setItem($,JSON.stringify(c===null?i:{...i,searchButtons:c}))),this.mapControlsHidden=!i.controls,this.floorsControlHidden=!i.levels,this.hideHeaderLogo=!i.header,this.hideFreeOrDemo=!i.header,this.hideOverlay=!i.overlay,this.searchButtonsOverride=c}toggleMapOverlay(){this.overlayPosition==="bottom"&&this.overlaySize==="full"?this.desiredOverlaySize="medium":this.overlayPosition==="bottom"&&this.overlaySize!=="full"&&(this.desiredOverlaySize="full")}changeZoom(o){this.zoomBy=o}zoomIn(){this.changeZoom(1.5)}zoomOut(){this.changeZoom(.66)}fitBounds(){const{rect:o,source:s}=bt({layerViewbox:this.rootStore.layerStore.viewboxRectangle,explicitArea:pt?_:null,layerRectangle:this.rootStore.layerStore.rectangle,sceneDef:rt()??null,svgArea:_});this.moveToRect=o,this.moveToRectPaddingPercent=vt(s)?0:St(o,_),this.rollReset=!0}get previewMode(){const o=B?localStorage.getItem(ht)??localStorage.getItem(lt):null;return o==="true"||o==="1"||this.rootStore.fp.previewMode}get viewerMode(){const o=B?localStorage.getItem(ct)??localStorage.getItem(at):null;return o==="true"||o==="1"||this.rootStore.fp.viewerMode}get selectedEventItem(){return this.details instanceof O?this.details:null}get defaultMapSettings(){return{zoomtime:500,center:void 0,centerxy:void 0,z:void 0,bearing:0,roll:1}}setMapSettings(o){const s={};for(const i of Object.keys(o)){const c=o[i];c!=null&&(i==="zoomtime"?s.zoomtime=Math.min(Math.max(o.zoomtime||this.mapSettings.zoomtime||0,500),5e3):Object.assign(s,{[i]:c}))}this.mapSettings={...this.mapSettings,...s}}resetMapSettings(){this.mapSettings={...this.defaultMapSettings}}get baseQRCodeUrl(){return`https://${L.EXPO}.expofp.com`}get viewMapOnPhoneQRCodeUrl(){if(k?.customKioskQrCodeUrl)return k.customKioskQrCodeUrl;const o=new URL(this.baseQRCodeUrl);o.search=window.location.search;const s=o.toString();return console.log("View Map On Phone QR Code Url",s),s}get routeQRCodeUrl(){const o=new URL(this.baseQRCodeUrl),s=this.selectedRoute?.from,i=this.selectedRoute?.to,c=s instanceof I?s.slug:"",r=i instanceof I?i.slug:"";o.search=`?route%3A${encodeURIComponent(r)}%3A${encodeURIComponent(c)}%3Afalse`,st(o.searchParams,this.kioskData);const l=o.toString();return console.log("Route QR Code Url",l),l}get isFeaturedExhibitorActive(){return this.details instanceof x&&!!this.details.featured}get activeInterfaceData(){for(const o of this.interfaceMetadata)if(o.isActive())return o;return null}get activeInterfaceId(){return this.activeInterfaceData?.id}get searchBoxConfig(){const o=this.activeInterfaceData;return!o||!o.searchBoxConfig?{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}:o.searchBoxConfig()||{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}}get searchBoxActions(){return this.activeInterfaceData?.actions?.()??[]}get overlayInterfaceClasses(){const o=[],s=this.activeInterfaceData;return s&&(o.push(s.className),s.additionalClasses&&o.push(...s.additionalClasses())),this.details&&o.push("overlay-has-details"),this.list.type&&o.push(`overlay-list-${this.list.type}`),this.isFeaturedExhibitorActive&&o.push("overlay-exhibitor-featured"),o}get isOverlayOpen(){return this.noOverlay&&!this.overlayOnDemand?!1:this.activeInterfaceData!==null}setOverlayScrolled(o){this.isOverlayScrolled=o}setListScrollTop(o,s){this.listScrollTop=s,this.scrollPositions.set(o,s)}setListScrollItemId(o,s){this.listScrollItemId=s,this.scrollItemIds.set(o,s)}getListScrollTop(o){return this.scrollPositions.get(o)||0}getListScrollItemId(o){return this.scrollItemIds.get(o)||null}clearListScroll(o){this.scrollPositions.delete(o),this.scrollItemIds.delete(o),this.list.type===o&&(this.listScrollTop=0,this.listScrollItemId=null)}get bannerType(){return this.hideFreeOrDemo||this.heatmap?null:L.EXPO==="expo"?"demo":k.expoFpAd||k.isTrial?"free":null}get isBannerVisible(){return this.bannerType!==null}setCurrentBanner(o){this.currentBanner=o}setForceShowDetails(o){this.forceShowDetails=o}get showRouteInstantly(){return!!(this.kiosk&&!this.forceShowDetails)}startBuildRoute(){this.rootStore.selectSearch(""),this.mapControlsHidden=!0,this.floorsControlHidden=!0,this.hideHeaderLogo=!0,this.hideFreeOrDemo=!0,this.hideOverlay=!0,this.hideCookieConsent=!0,this.buildRoute=!0}setGlobalErrorMessage(o){this.globalErrorMessages.push(o)}popGlobalErrorMessage(){this.globalErrorMessages.pop()}initializeUIScale(){if(new URLSearchParams(window.location.search).get("kiosk")!=="0"&&B){const s=localStorage.getItem(H)??localStorage.getItem(U);if(s){const i=parseFloat(s);!isNaN(i)&&i>=.8&&i<=1.4&&(this._customUIScale=i)}}}setUIScale(o,s=!0){if(o===void 0||isNaN(o)||o<this.minUIScale||o>this.maxUIScale){ft.warn(`Invalid ui-scale value: ${o}. Must be between ${this.minUIScale} and ${this.maxUIScale}.`);return}this._customUIScale=o,s&&B&&(localStorage.setItem(H,o.toString()),localStorage.removeItem(U))}resetUIScale(){this._customUIScale=null,B&&(localStorage.removeItem(H),localStorage.removeItem(U))}enableSetKioskMode(o){this.setKioskModeEnabled=o}setKioskData(o){this.kioskData=o}}e([a.struct],t.prototype,"list",void 0),e([a.ref],t.prototype,"details",void 0),e([a.ref],t.prototype,"hoveredExhibitor",void 0),e([a.ref],t.prototype,"hoveredBooth",void 0),e([a],t.prototype,"zoomBy",void 0),e([a],t.prototype,"rollReset",void 0),e([a],t.prototype,"moveToBooths",void 0),e([a],t.prototype,"moveToRect",void 0),e([a],t.prototype,"moveToRectPaddingPercent",void 0),e([a],t.prototype,"moveToLocation",void 0),e([a],t.prototype,"menu",void 0),e([a],t.prototype,"searchFocused",void 0),e([a],t.prototype,"searchClearMode",void 0),e([a],t.prototype,"printingPdf",void 0),e([a.struct],t.prototype,"screenSize",void 0),e([a],t.prototype,"desiredOverlaySize",void 0),e([a],t.prototype,"overlayShowsAll",void 0),e([a],t.prototype,"centerMap",void 0),e([a],t.prototype,"zoomAfTransformK",void 0),e([a],t.prototype,"activeListIndex",void 0),e([a],t.prototype,"devicePixelRatio",void 0),e([a],t.prototype,"wsStarted",void 0),e([a],t.prototype,"canvasStarted",void 0),e([a],t.prototype,"kiosk",void 0),e([a],t.prototype,"inIdle",void 0),e([a],t.prototype,"modalActive",void 0),e([a],t.prototype,"galleryActive",void 0),e([a],t.prototype,"hideOverlay",void 0),e([a],t.prototype,"searchButtonsOverride",void 0),e([a],t.prototype,"hideCookieConsent",void 0),e([a],t.prototype,"hideHeaderLogo",void 0),e([a],t.prototype,"hideLogoInBooth",void 0),e([a],t.prototype,"disableBookmarked",void 0),e([a],t.prototype,"hideLanguage",void 0),e([a],t.prototype,"monochrome",void 0),e([a],t.prototype,"heatmap",void 0),e([a],t.prototype,"heatmapYah",void 0),e([a],t.prototype,"debugCircles",void 0),e([a],t.prototype,"mapControlsHidden",void 0),e([a],t.prototype,"floorsControlHidden",void 0),e([a],t.prototype,"hideFreeOrDemo",void 0),e([a],t.prototype,"freeBannerDismissed",void 0),e([a],t.prototype,"currentBanner",void 0),e([a],t.prototype,"sceneDefReady",void 0),e([a],t.prototype,"categoryFilterOpen",void 0),e([a],t.prototype,"selectedCategoryFilters",void 0),e([a],t.prototype,"selectedPoiTypeFilters",void 0),e([a],t.prototype,"selectedTrack",void 0),e([a],t.prototype,"subButtonsVisible",void 0),e([a],t.prototype,"searchBoxMode",void 0),e([a],t.prototype,"searchBoxTitle",void 0),e([a],t.prototype,"searchBoxSubtitle",void 0),e([a],t.prototype,"routeTitle",void 0),e([a],t.prototype,"routeDescription",void 0),e([a],t.prototype,"isMultiPointRoute",void 0),e([a],t.prototype,"tourTitle",void 0),e([a],t.prototype,"tourDescription",void 0),e([a],t.prototype,"isMultiPointTour",void 0),e([a],t.prototype,"pathwayOnlyMode",void 0),e([a],t.prototype,"isOverlayScrolled",void 0),e([a],t.prototype,"listScrollTop",void 0),e([a],t.prototype,"listScrollItemId",void 0),e([a],t.prototype,"listScrollIndex",void 0),e([a],t.prototype,"_customUIScale",void 0),e([d],t.prototype,"setSelectedCategoryFilters",null),e([d],t.prototype,"resetCategoryFilter",null),e([d],t.prototype,"setSearchClearMode",null),e([d],t.prototype,"setRouteTitle",null),e([d],t.prototype,"setRouteDescription",null),e([d],t.prototype,"setIsMultiPointRoute",null),e([d],t.prototype,"setTourTitle",null),e([d],t.prototype,"setTourDescription",null),e([d],t.prototype,"setIsMultiPointTour",null),e([d],t.prototype,"setPathwayOnlyMode",null),e([d],t.prototype,"setMultiPointTourList",null),e([n],t.prototype,"activePathwayLayers",null),e([n],t.prototype,"highlightedBooths",null),e([n],t.prototype,"rtl",null),e([n({keepAlive:!0})],t.prototype,"noOverlay",null),e([n],t.prototype,"overlayOnDemand",null),e([n],t.prototype,"overlayHiddenNow",null),e([n({keepAlive:!0})],t.prototype,"selectedExhibitor",null),e([n({keepAlive:!0})],t.prototype,"selectedBooth",null),e([n({keepAlive:!0})],t.prototype,"selectedCategory",null),e([n({keepAlive:!0})],t.prototype,"selectedRoute",null),e([n({keepAlive:!0})],t.prototype,"selectedSpeaker",null),e([n({keepAlive:!0})],t.prototype,"uiScale",null),e([n({keepAlive:!0})],t.prototype,"isGuidedToursActive",null),e([n({keepAlive:!0})],t.prototype,"getRouteNextFloor",null),e([n],t.prototype,"headerHeightRem",null),e([n],t.prototype,"headerHeightPx",null),e([n],t.prototype,"overlayPosition",null),e([n],t.prototype,"overlayCollapsed",null),e([n],t.prototype,"overlaySize",null),e([n],t.prototype,"overlayBottom",null),e([n],t.prototype,"overlayLeft",null),e([n],t.prototype,"overlayWidthPx",null),e([n({keepAlive:!0})],t.prototype,"wsImageHeightPx",null),e([n],t.prototype,"wsPaddingPx",null),e([n],t.prototype,"wsOccupiedHeightPx",null),e([n({keepAlive:!0})],t.prototype,"wsShown",null),e([n],t.prototype,"wsDesktopPosition",null),e([n],t.prototype,"wsPosition",null),e([n],t.prototype,"responsiveClass",null),e([n],t.prototype,"mapVisibleTop",null),e([n],t.prototype,"mapVisibleBottom",null),e([n],t.prototype,"mapVisibleStart",null),e([n],t.prototype,"searchActionsHeightPx",null),e([n],t.prototype,"shouldShowSearchButtons",null),e([n],t.prototype,"shouldShowMobileToggle",null),e([n],t.prototype,"mobileToggleIsListMode",null),e([n],t.prototype,"canvasVisibleRectPx",null),e([n],t.prototype,"shouldShiftMapRect",null),e([n],t.prototype,"hasAppliedFilters",null),e([n],t.prototype,"canvasVisibleRectPt",null),e([n],t.prototype,"canvasSizePt",null),e([n({keepAlive:!0})],t.prototype,"shouldUseBackdrop",null),e([a],t.prototype,"forceDim",void 0),e([d],t.prototype,"setForceDim",null),e([n],t.prototype,"dimmed",null),e([n],t.prototype,"defaultSearchItems",null),e([n],t.prototype,"searchItems",null),e([n],t.prototype,"searchList",null),e([n],t.prototype,"foundInDescription",null),e([n],t.prototype,"foundInDescriptionStruct",null),e([n],t.prototype,"categoryFilteredSearchList",null),e([n],t.prototype,"fuzzySearchItems",null),e([n],t.prototype,"listItems",null),e([n({keepAlive:!0})],t.prototype,"listBooths",null),e([n({keepAlive:!0})],t.prototype,"selectedBooths",null),e([n({keepAlive:!0})],t.prototype,"hoveredBooths",null),e([n],t.prototype,"visibility",null),e([d],t.prototype,"setVisibility",null),e([d],t.prototype,"toggleMapOverlay",null),e([d],t.prototype,"changeZoom",null),e([d],t.prototype,"zoomIn",null),e([d],t.prototype,"zoomOut",null),e([d],t.prototype,"fitBounds",null),e([n({keepAlive:!0})],t.prototype,"selectedEventItem",null),e([a],t.prototype,"mapSettings",void 0),e([d],t.prototype,"setMapSettings",null),e([d],t.prototype,"resetMapSettings",null),e([n],t.prototype,"baseQRCodeUrl",null),e([n],t.prototype,"viewMapOnPhoneQRCodeUrl",null),e([n],t.prototype,"routeQRCodeUrl",null),e([n],t.prototype,"isFeaturedExhibitorActive",null),e([n],t.prototype,"activeInterfaceData",null),e([n],t.prototype,"activeInterfaceId",null),e([n],t.prototype,"searchBoxConfig",null),e([n],t.prototype,"searchBoxActions",null),e([n],t.prototype,"overlayInterfaceClasses",null),e([n],t.prototype,"isOverlayOpen",null),e([d],t.prototype,"setOverlayScrolled",null),e([d],t.prototype,"setListScrollTop",null),e([d],t.prototype,"setListScrollItemId",null),e([d],t.prototype,"getListScrollTop",null),e([d],t.prototype,"getListScrollItemId",null),e([d],t.prototype,"clearListScroll",null),e([n],t.prototype,"bannerType",null),e([n],t.prototype,"isBannerVisible",null),e([d],t.prototype,"setCurrentBanner",null),e([a],t.prototype,"forceShowDetails",void 0),e([d],t.prototype,"setForceShowDetails",null),e([n],t.prototype,"showRouteInstantly",null),e([a],t.prototype,"buildRoute",void 0),e([d],t.prototype,"startBuildRoute",null),e([a],t.prototype,"globalErrorMessages",void 0),e([d],t.prototype,"setGlobalErrorMessage",null),e([d],t.prototype,"popGlobalErrorMessage",null),e([d],t.prototype,"initializeUIScale",null),e([d],t.prototype,"setUIScale",null),e([d],t.prototype,"resetUIScale",null),e([a],t.prototype,"setKioskModeEnabled",void 0),e([d],t.prototype,"enableSetKioskMode",null),e([a],t.prototype,"kioskData",void 0),e([d],t.prototype,"setKioskData",null);function J(P){return"description"in P&&typeof P.description=="string"?P.description:void 0}function F(P,o,s=[]){const i=[];return P.forEach(c=>{if(c instanceof x)i.push(...c.booths);else if(c instanceof I)i.push(c);else if(c instanceof O){const r=o.find(l=>l.id===c.boothId);c.boothId&&r&&i.push(r)}else c instanceof K&&s.filter(r=>r.speakers.some(l=>l.id===c.id)&&r.boothId).forEach(r=>{const l=o.find(u=>u.id===r.boothId);l&&i.push(l)})}),new Set(i.filter(Boolean))}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Builds store instances under jsdom. Specs using this helper must
|
|
3
|
+
* declare `// @vitest-environment jsdom` (a forgotten pragma surfaces as
|
|
4
|
+
* `HTMLCanvasElement is not defined` from inside this file). Every stub below
|
|
5
|
+
* exists because removing it breaks the import or the constructor — nothing is
|
|
6
|
+
* mocked pre-emptively.
|
|
7
|
+
*/
|
|
8
|
+
type UIStateInstance = InstanceType<typeof import('../store/UIState.js').default>;
|
|
9
|
+
/** Constructs a `UIState` on a fake `RootStore`. `overrides` extends that fake. */
|
|
10
|
+
export declare function createUIState(overrides?: Record<string, unknown>): Promise<import("../store/UIState.js").default>;
|
|
11
|
+
/** Constructs a `RouteStore` next to a real `UIState`; route-side siblings are faked. */
|
|
12
|
+
export declare function createRouteStore(overrides?: Record<string, unknown>): Promise<{
|
|
13
|
+
routeStore: import("../store/RouteStore.js").default;
|
|
14
|
+
uiState: UIStateInstance;
|
|
15
|
+
rootStore: Record<string, unknown>;
|
|
16
|
+
Route: typeof import("../store/RouteStore.js").Route;
|
|
17
|
+
}>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=store-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{setConfig as u}from"@expofp/config";import{vi as t}from"vitest";let a={};async function s(o={}){f();const{default:e}=await import("../store/UIState.js"),r={fp:{},...o};return r.uiState=a=new e(r),r}export async function createUIState(o={}){return(await s(o)).uiState}export async function createRouteStore(o={}){const e=await s({fp:{},moveToList:t.fn(),showMap:t.fn(),layerStore:{layers:[],updateVisibility:t.fn(),findLayer:t.fn(()=>null)},...o}),{default:r,Route:i}=await import("../store/RouteStore.js"),n=new r(e);return e.routeStore=n,{routeStore:n,uiState:e.uiState,rootStore:e,Route:i}}function f(){window.__efpEvent="demo",HTMLCanvasElement.prototype.getContext=(()=>new Proxy({},{get:()=>()=>{}})),t.doMock("../store/index.js",()=>({get uiState(){return a}})),t.doMock("../data/svg.js",()=>({svgArea:()=>null,svgAreaExplicit:()=>null})),t.doMock("../tools/gtag.js",()=>({hasUserConsent:()=>!1,sendEventToGa:t.fn(),GaEventActions:{}})),u({fpSvgJsRef:{},fpSvgLayerJsRefs:{}})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"tslib": "^2.3.0",
|
|
70
70
|
"uuid": "^9.0.1",
|
|
71
71
|
"zod": "4.4.3",
|
|
72
|
-
"@expofp/config": "3.
|
|
73
|
-
"@expofp/debug": "3.
|
|
74
|
-
"@expofp/geometry": "3.
|
|
75
|
-
"@expofp/renderer": "3.
|
|
76
|
-
"@expofp/resolve": "3.
|
|
77
|
-
"@expofp/schema": "3.
|
|
78
|
-
"@expofp/ui": "3.
|
|
79
|
-
"@expofp/utils": "3.
|
|
80
|
-
"@expofp/wayfinding": "3.
|
|
72
|
+
"@expofp/config": "3.31.1",
|
|
73
|
+
"@expofp/debug": "3.31.1",
|
|
74
|
+
"@expofp/geometry": "3.31.1",
|
|
75
|
+
"@expofp/renderer": "3.31.1",
|
|
76
|
+
"@expofp/resolve": "3.31.1",
|
|
77
|
+
"@expofp/schema": "3.31.1",
|
|
78
|
+
"@expofp/ui": "3.31.1",
|
|
79
|
+
"@expofp/utils": "3.31.1",
|
|
80
|
+
"@expofp/wayfinding": "3.31.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|