@expofp/floorplan 3.45.4 → 3.45.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/browser/{Button-CftScIdx.js → Button-DT-Jfwrb.js} +5 -5
  2. package/dist/browser/{CookieConsent-ByS7cPh9.js → CookieConsent-D6nxm_ph.js} +7 -7
  3. package/dist/browser/{Debug-CDb2j0OF.js → Debug-DC9ghW5V.js} +7 -7
  4. package/dist/browser/{DebugTools-jdOEpl8C.js → DebugTools-Y0aycjKM.js} +6 -6
  5. package/dist/browser/{Demo-CTLfudbP.js → Demo-CgC4OvVd.js} +9 -9
  6. package/dist/browser/{Free-C5QMNYRI.js → Free-BdhGlQwB.js} +10 -10
  7. package/dist/browser/{GalleryContainer-BUhs_oBk.js → GalleryContainer-Do8X13Mq.js} +11 -11
  8. package/dist/browser/{GpsLoader-BSWIXvfs.js → GpsLoader-CBEyj1G4.js} +13 -13
  9. package/dist/browser/{KioskStore-BC-gl1wE.js → KioskStore-DhtR-5Hr.js} +9 -9
  10. package/dist/browser/{LayerStore-CONC-3Gj.js → LayerStore-CWxa5hfz.js} +761 -744
  11. package/dist/browser/{MaplibreAdapter-BXKE5rxG.js → MaplibreAdapter-C5lXCMGf.js} +17 -17
  12. package/dist/browser/{ModalContainer-BpM9aPfz.js → ModalContainer-DiM4OG67.js} +10 -10
  13. package/dist/browser/{PermissionNotice-BM5kQYe7.js → PermissionNotice-DaqnuHln.js} +6 -6
  14. package/dist/browser/{RouteStore-C7okfu9_.js → RouteStore-DHDpmHzr.js} +9 -9
  15. package/dist/browser/{SetKioskMode-DabqQvMH.js → SetKioskMode-D_5Us9Gn.js} +11 -11
  16. package/dist/browser/{ShowKiosk-DvOBEV0v.js → ShowKiosk-Ca6BaYA4.js} +10 -10
  17. package/dist/browser/{UIState-Ce9F8YFe.js → UIState-ClHYIJ2L.js} +12 -12
  18. package/dist/browser/{ViewerMenuPanel-FsMuHE9m.js → ViewerMenuPanel-BWrEOvZt.js} +10 -10
  19. package/dist/browser/{add-debug-secret-listener-DEPSZS-A.js → add-debug-secret-listener-BECnIMzo.js} +1 -1
  20. package/dist/browser/{adopt-global-settings-ptJCSHgd.js → adopt-global-settings-U-KbyxMd.js} +9 -9
  21. package/dist/browser/{boolean-editor-C_RdXFiI.js → boolean-editor-CYMx87em.js} +9 -9
  22. package/dist/browser/{bootIntercom-CnpSeS09.js → bootIntercom-O5O0bdiC.js} +2 -2
  23. package/dist/browser/bundle.json +85 -85
  24. package/dist/browser/{camera-events-BYUTGOGy.js → camera-events-DSCuSH25.js} +1 -1
  25. package/dist/browser/{classnames-I5odALD0.js → classnames-YcGXWNfg.js} +2 -2
  26. package/dist/browser/{client-TnBerOtS.js → client-BcPpS_Gj.js} +5 -5
  27. package/dist/browser/{components-CEGOfvRn.js → components-DyXkVj-h.js} +48 -48
  28. package/dist/browser/{create-live-plan-msjLUPAb.js → create-live-plan-DEVM8pOp.js} +13 -13
  29. package/dist/browser/{debug-context-8s7JYsHP.js → debug-context-CNBgUWR8.js} +5 -5
  30. package/dist/browser/{debug-overlay-BEEAevvE.js → debug-overlay-B__pFwQg.js} +10 -10
  31. package/dist/browser/{debug-ui-BWDU1_DK.js → debug-ui-BaE8MZQX.js} +6 -6
  32. package/dist/browser/{dist-B7taugxI.js → dist-C1NaWqk4.js} +5 -5
  33. package/dist/browser/{dist-BL9v1eQu.js → dist-Cx8u0gjK.js} +3 -3
  34. package/dist/browser/{dist-Dg8H-fF9.js → dist-wOC6gYFh.js} +6 -6
  35. package/dist/browser/{efp-debug-init-3uYSkVQl.js → efp-debug-init-CozbueIl.js} +3 -3
  36. package/dist/browser/{enum-editor-DiE-Q-gC.js → enum-editor-CkiQPgZv.js} +4 -4
  37. package/dist/browser/{es5-D2KUWXXM.js → es5-B__Ovz45.js} +2 -2
  38. package/dist/browser/{event-head-DXLhGPVQ.js → event-head-C_inMpbD.js} +1 -1
  39. package/dist/browser/{event-not-found-ClTL2wLx.js → event-not-found-Z2mJBZE3.js} +3 -3
  40. package/dist/browser/{event-scoped-cache-CcA_qeS6.js → event-scoped-cache-aJgjSj-3.js} +2 -2
  41. package/dist/browser/{expofpUrl-BTeumhPB.js → expofpUrl-jBUlvkwz.js} +1 -1
  42. package/dist/browser/{exports-BezdpCeZ.js → exports-CvUYw1h6.js} +1 -1
  43. package/dist/browser/{favicon-eEoLTD6j.js → favicon-BkDrYTmU.js} +1 -1
  44. package/dist/browser/{fetch-retry.umd-o-6hecKO.js → fetch-retry.umd-2B2pCUIS.js} +2 -2
  45. package/dist/browser/{flex-DC-YFhOp.js → flex-3lSivw8z.js} +5 -5
  46. package/dist/browser/{floorplan.loader-BMR6104c.js → floorplan.loader-CDl2dZZx.js} +12 -12
  47. package/dist/browser/{floorplan.ready-DxP00yOP.js → floorplan.ready-C_1nb6xR.js} +23 -23
  48. package/dist/browser/{framing-rect-B28m3lJd.js → framing-rect-3gPjaM3T.js} +235 -227
  49. package/dist/browser/{freeBanner-CxeeG1v1.js → freeBanner-CnrBc9Tl.js} +2 -2
  50. package/dist/browser/{fuse-CM3BvYBC.js → fuse-B7V1lkoA.js} +2 -2
  51. package/dist/browser/{i18n-CyzfIlqQ.js → i18n-2_QFqpgv.js} +6 -6
  52. package/dist/browser/index.js +17 -17
  53. package/dist/browser/{index.module-D9cgjYhA.js → index.module-L0xt0u3p.js} +4 -4
  54. package/dist/browser/{init-ui-7k8cHFZw.js → init-ui-DbSF-9yC.js} +9 -9
  55. package/dist/browser/{integrateKiosk-DUFIUi05.js → integrateKiosk-D0FDyLHF.js} +5 -5
  56. package/dist/browser/{is-debug-BAIQHfxq.js → is-debug-DDKN4CIF.js} +4 -4
  57. package/dist/browser/{is-own-domain-C_JX2ZHR.js → is-own-domain-DNvxb9Ph.js} +1 -1
  58. package/dist/browser/{is-webview-BU0Pek8w.js → is-webview-cTH4yz8f.js} +1 -1
  59. package/dist/browser/{jsx-runtime-CtimPtPq.js → jsx-runtime-DQgnuS-I.js} +2 -2
  60. package/dist/browser/{kiosk-mode-CV-M1Zz8.js → kiosk-mode-Bdb_6yEJ.js} +3 -3
  61. package/dist/browser/{kiosk-record-Du4IFKBR.js → kiosk-record-JAEq8SV6.js} +1 -1
  62. package/dist/browser/{kioskApi-BVRzmuDX.js → kioskApi-1dS8REP7.js} +7 -7
  63. package/dist/browser/{lib-n3_ONTp3.js → lib--J2yQXt6.js} +3 -3
  64. package/dist/browser/{loadImage-DqAC23xl.js → loadImage-BJzAyAlv.js} +1 -1
  65. package/dist/browser/{logDeviceInfo-B47wOFn-.js → logDeviceInfo-BaJPElii.js} +9 -9
  66. package/dist/browser/{mobx-BxS2198S.js → mobx-vWymcZuV.js} +4 -4
  67. package/dist/browser/{mobx.module-DBXspHzN.js → mobx.module-BOCLFB5I.js} +1 -1
  68. package/dist/browser/{optional-boolean-editor-DusM7rb0.js → optional-boolean-editor-ZncW2HBw.js} +3 -3
  69. package/dist/browser/{optional-enum-editor-BKyAfZ8e.js → optional-enum-editor-Dkzs9jDN.js} +4 -4
  70. package/dist/browser/{optional-string-editor-sA0aHiGB.js → optional-string-editor-DC9PMUWB.js} +4 -4
  71. package/dist/browser/{particles.min-B7kv19nN.js → particles.min-eC5xdOrB.js} +2 -2
  72. package/dist/browser/{react-Cohf8rUU.js → react-DqPP-mkq.js} +2 -2
  73. package/dist/browser/{react-dom-tyj4-_-C.js → react-dom-BkVzoZWO.js} +3 -3
  74. package/dist/browser/{rolldown-runtime-Bcr_gA0_.js → rolldown-runtime-DUb2xvRc.js} +1 -1
  75. package/dist/browser/{scene-BBPTWEUE.js → scene-BaiC3jfV.js} +3 -3
  76. package/dist/browser/{scheduler-CrY9mG_c.js → scheduler-NBuuaWIe.js} +2 -2
  77. package/dist/browser/{select-D19r5W1a.js → select-Cxf-YiNA.js} +10 -10
  78. package/dist/browser/{settings-D4-jxTxB.js → settings-D74eG9h8.js} +2 -2
  79. package/dist/browser/{settings-item-CIt7SQG4.js → settings-item-DUUbKec_.js} +6 -6
  80. package/dist/browser/{store-CjCKsoXy.js → store-nyclu8mO.js} +2 -2
  81. package/dist/browser/{string-editor-D8F1eTpQ.js → string-editor-CINOmY_C.js} +4 -4
  82. package/dist/browser/{text-field-BYYweuSY.js → text-field-DORaOVht.js} +5 -5
  83. package/dist/browser/{theme-q6cCoTLz.js → theme-DyFm9MGz.js} +8 -8
  84. package/dist/browser/{ui-CYUl2cf1.js → ui-DsCU3FV6.js} +8 -8
  85. package/dist/browser/{useRenderTarget-Bqdt8QZX.js → useRenderTarget-D8DmceME.js} +4 -4
  86. package/dist/browser/{viewport-D4MnXYrN.js → viewport-DbRvshkB.js} +3 -3
  87. package/dist/browser/{wayfinding-CulSEPiv.js → wayfinding-DBvGTAdW.js} +414 -395
  88. package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
  89. package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
  90. package/dist/esm/utils/loadLayerImages.d.ts +6 -11
  91. package/dist/esm/utils/loadLayerImages.js +1 -1
  92. package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
  93. package/package.json +10 -10
@@ -1 +1 @@
1
- import{getConfig as x}from"@expofp/config";import{degToRad as C,Rect as T}from"@expofp/geometry";import{resolve as v}from"@expofp/resolve";import{BOOTHS_PAINTER_MARKER as D,SEPARATOR as s}from"../../../../constants";import{getFpPaths as F}from"../../../../data/fp-payloads";import{createImageDef as G,createLayerDef as h}from"../../../../engine/defs";import m,{boothStore as H,uiState as k}from"../../../../store";import K from"../../../../store/init/init-booths";import{getChildLayers as Y}from"../../../../store/init/init-layers";import{LayersMode as J}from"../../../../store/LayerStore";import{chunkArray as U}from"../../../../utils";import{loadLayerImages as Z}from"../../../../utils/loadLayerImages";import j,{BG_LAYER_NAME as $,FG_LAYER_NAME as E}from"./config-bg";import q,{BOOTHS_CHUNK_SIZE as z}from"./config-booths";import{configOutdoorPoiLayer as Q}from"./config-outdoor-poi";import{registerLayerImages as V}from"./layer-images";import{createModelDefFromElement as W}from"./layer-models";import{getImageLayerName as X,getLayerGraphics as ee,getModelLayerName as oe}from"./loadBoothsImages";function re(e){return e.childLayers.length?e.childLayers:Y(e,e.basePriority,15).layers}async function R(e,i){const r=[],n=K(m,e);if(Q(e,n))return e.loaded=!0,e.configured=!0,e.children=[],h(e.name,[],{hidden:!0});const a=await j(e),c=[],S=U(n,z),d=H.booths.filter(o=>o.rect&&(!o.layer||o.layer===e||o.layer.childLayers.includes(e))&&o.exhibitors.find(t=>!!t.logoInBooth&&!!t.logo?.url)&&!k.hideLogoInBooth),I=new Map(d.map(o=>[o,o.noLabels]));d.forEach(o=>o.noLabels=!0),n.length&&S.forEach((o,t)=>{c.push(q(`${e.name}${s}${D}${s}${t}`,o))});for(const[o,t]of I)o.noLabels=t;e.loaded=!0;const g=a.children.find(o=>o.name===$),l=a.children.find(o=>o.name===E),u=X(e.name),{icons:f,models:A}=ee(e),p={name:u,children:[]},y={name:oe(e.name),children:A.map(W)};f.length&&V(u,async()=>{const o=await Z(f),t=[];for(const M of o){const{bounds:{x:L,y:b,height:P,angle:N,width:_},source:w}=M,O=T.fromMinMax({x:L,y:b},{x:L+_,y:b+P},C(N));t.push(G(w,O))}return{layer:p,children:t}}),g&&r.push({...g,name:`${a.name}${s}${$}`}),c.length&&r.push(...c),l&&r.push({...l,name:`${a.name}${s}${E}`}),f.length&&r.push(p),y.children.length&&r.push(y);const B=await Promise.all(e.childLayers.sort((o,t)=>o.basePriority-t.basePriority).map(o=>R(o,!0)));return r.push(...B),e.children=r,e.configured=!0,h(e.name,r,{hidden:!i})}export default async function te(e){if(e.configured)return h(e.name,e.children,{hidden:!e.visible});if(m.layerStore.mode!==J.Default&&!F(e.name)&&!e.rootParent)try{const n=x().fpSvgLayerJsRefs[e.name];n&&await v(n)}catch(n){console.warn(`Layer data not loaded: ${e.name}`,n)}const i=re(e);i.length&&(e.childLayers=i);const{layers:r}=m.layerStore;return m.layerStore.layers=[...r,...i.filter(n=>!r.some(a=>a.name===n.name))],R(e,e.visible)}
1
+ import{getConfig as R}from"@expofp/config";import{resolve as N}from"@expofp/resolve";import{BOOTHS_PAINTER_MARKER as _,SEPARATOR as s}from"../../../../constants";import{getFpPaths as M}from"../../../../data/fp-payloads";import{createImageDef as w,createLayerDef as h}from"../../../../engine/defs";import m,{boothStore as O,uiState as C}from"../../../../store";import v from"../../../../store/init/init-booths";import{getChildLayers as D}from"../../../../store/init/init-layers";import{LayersMode as T}from"../../../../store/LayerStore";import{chunkArray as F}from"../../../../utils";import{loadLayerImages as G}from"../../../../utils/loadLayerImages";import H,{BG_LAYER_NAME as y,FG_LAYER_NAME as b}from"./config-bg";import k,{BOOTHS_CHUNK_SIZE as x}from"./config-booths";import{configOutdoorPoiLayer as K}from"./config-outdoor-poi";import{registerLayerImages as Y}from"./layer-images";import{createModelDefFromElement as J}from"./layer-models";import{getImageLayerName as U,getLayerGraphics as Z,getModelLayerName as j}from"./loadBoothsImages";function q(e){return e.childLayers.length?e.childLayers:D(e,e.basePriority,15).layers}async function $(e,i){const r=[],n=v(m,e);if(K(e,n))return e.loaded=!0,e.configured=!0,e.children=[],h(e.name,[],{hidden:!0});const a=await H(e),c=[],E=F(n,x),d=O.booths.filter(o=>o.rect&&(!o.layer||o.layer===e||o.layer.childLayers.includes(e))&&o.exhibitors.find(t=>!!t.logoInBooth&&!!t.logo?.url)&&!C.hideLogoInBooth),S=new Map(d.map(o=>[o,o.noLabels]));d.forEach(o=>o.noLabels=!0),n.length&&E.forEach((o,t)=>{c.push(k(`${e.name}${s}${_}${s}${t}`,o))});for(const[o,t]of S)o.noLabels=t;e.loaded=!0;const l=a.children.find(o=>o.name===y),u=a.children.find(o=>o.name===b),g=U(e.name),{icons:f,models:A}=Z(e),p={name:g,children:[]},L={name:j(e.name),children:A.map(J)};f.length&&Y(g,async()=>{const o=await G(f),t=[];for(const{bounds:I,source:P}of o)t.push(w(P,I));return{layer:p,children:t}}),l&&r.push({...l,name:`${a.name}${s}${y}`}),c.length&&r.push(...c),u&&r.push({...u,name:`${a.name}${s}${b}`}),f.length&&r.push(p),L.children.length&&r.push(L);const B=await Promise.all(e.childLayers.sort((o,t)=>o.basePriority-t.basePriority).map(o=>$(o,!0)));return r.push(...B),e.children=r,e.configured=!0,h(e.name,r,{hidden:!i})}export default async function z(e){if(e.configured)return h(e.name,e.children,{hidden:!e.visible});if(m.layerStore.mode!==T.Default&&!M(e.name)&&!e.rootParent)try{const n=R().fpSvgLayerJsRefs[e.name];n&&await N(n)}catch(n){console.warn(`Layer data not loaded: ${e.name}`,n)}const i=q(e);i.length&&(e.childLayers=i);const{layers:r}=m.layerStore;return m.layerStore.layers=[...r,...i.filter(n=>!r.some(a=>a.name===n.name))],$(e,e.visible)}
@@ -1 +1 @@
1
- import{degToRad as Ce,lineAngle as fe,pointDistance as he}from"@expofp/geometry";import{update as W}from"@expofp/renderer";import{useEffect as ve,useRef as S}from"react";import _e from"../../../tools/base-runtime-url";import{loadImage as Fe}from"../../../utils/loadImage";import{mapCamera as ge}from"../camera";import{createCanvas as me,createImageCanvas as Pe,getBounds as Y,imageCanvasCssSize as Ne}from"../drawing/config/canvases";import{getRouteLayerRegex as De,getRouteStopLayerRegex as Oe,TRAFFIC_VEHICLES as re}from"./trafficLayers";import{UpdateQueue as He}from"./UpdateQueue";const ce=2,Ve=ce*3.5,J=ce*12,K=J*.7,We=8,se=2,pe=.6,we=8,ze="transport_locations",ke=150,Ge="#a4aab6",Ie=1e3,Ye=2e4,ye=500;export function useManageTraffic({permission:e,scene:n,dataJsonUrl:r,websocketUrl:a}){const t=S(1),o=S(new Map),c=S(new Map),s=S(null),f=S(null),d=S(0),M=S(1),b=S(new He),T=S(new Map),y=S(Ie),m=S(new Map),E=S(void 0);ve(()=>{if(!e||!n)return;let l=!1,_;const R=n.rootLayer.children,p=c.current,w=o.current,I=b.current;async function Re(){try{let u;try{const i=await fetch(r,{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(l||!u||u.disabled||u.error)return;t.current=xe(ge()?.state().pixelSize??1);const z=new Map(u.routes.map(({id:i,color:h})=>[i,h])),C=new Map;z.forEach(i=>{C.set(i,je({radius:Ve,color:i,scale:window.devicePixelRatio}))});const U=De(),j=R.filter(i=>U.test(i.name)),X=Oe(),q=R.filter(i=>X.test(i.name));u.routes.slice(0,j.length).forEach(({id:i,color:h,path:g,stops:O,hiddenPoints:L},k)=>{T.current.set(i,g);const x=j[k];if(x){const H=new Map(L?.map(P=>[le(P),P])??[]);for(let P=1;P<g.length;P++){const A=g[P-1],V=g[P];H.has(le(A))||H.has(le(V))||x.children.push({points:{p0:A,p1:V},color:h,width:ce})}x.children.length&&I.add(()=>W(x))}const v=q[k],F=C.get(h);v&&F&&O?.length&&(O.forEach(H=>{v.children.push({source:F,bounds:Y(H.x,H.y,...$(F),t.current)})}),v.children.length&&I.add(()=>W(v)))});const D=R.find(i=>i.name===re);if(!D){console.warn(`useManageTraffic: the scene has no "${re}" layer`);return}const B=new Map;D.onScale=({pixelSize:i})=>{t.current=xe(i);const h=[];for(const g of q){const O=g.children;for(const L of O){const k=L.source;L.bounds=Y(L.bounds.center.x,L.bounds.center.y,...$(k),t.current,L.bounds.rotation),h.push(L)}}for(const g of o.current.values()){const O=g.source;g.bounds=Y(g.bounds.center.x,g.bounds.center.y,...$(O),t.current,g.bounds.rotation),h.push(g)}return h},I.add(()=>W(D)),z.forEach((i,h)=>{B.set(h,Me({id:h,width:J,height:J,color:i,scale:window.devicePixelRatio}))});const Ae=Me({id:"orphan",width:J,height:J,color:Ge,scale:window.devicePixelRatio});let Q=null;try{const i=await Fe(`${_e}icons/bus-white.svg`);if(l)return;Q=Pe(i,K,K,window.devicePixelRatio);const{width:h,height:g}=Ne(i,K,K);ne.set(Q,[h,g])}catch(i){console.error(i)}f.current=i=>{try{const h=JSON.parse(i.data);if(h.type!==ze)return;const g=i.timeStamp||performance.now();M.current=Math.round(g-d.current),d.current=g;const O=Math.max(M.current??ye,ye),L=D.children;let k=!1;h.data.forEach(({id:x,x:v,y:F,route_id:H,hidden:P})=>{p.has(x)&&(p.get(x)?.(),p.delete(x));const A=w.get(x),V=w.get(ae(x))??null;if(P&&A&&V){A.hidden=!0,V.hidden=!0,I.add(()=>W(A,V));return}if(m.current.set(x,performance.now()),!A){const G=B.get(H)??Ae,N={source:G,bounds:Y(v,F,...$(G),t.current,0)};if(w.set(x,N),Q){const Z=ae(x),de={source:Q,bounds:Y(v,F,...$(Q),t.current,0)};Q.setAttribute("id",Z),w.set(Z,de),L.push(N,de)}else L.push(N);k=!0;return}const be=A.bounds.center,oe=Be(be,{x:v,y:F},T.current.get(H));if(oe.reduce((G,N,Z)=>Z===0?G:G+ie(oe[Z-1],N),0)>=ke||document.hidden)Se({updateQueue:I,vehicle:A,vehicleFinery:V,x:v,y:F,scale:t.current,angle:Ue(A.bounds.center,{x:v,y:F})});else{const G=Qe(oe,O,N=>{Se({updateQueue:I,vehicle:A,vehicleFinery:V,x:N.x,y:N.y,scale:t.current,angle:N.angle})});p.set(x,G)}}),k&&I.add(()=>W(D))}catch(h){console.error("handleSocketMessage",h)}},d.current=performance.now(),te(),window.addEventListener("online",ue),Le(u.config?(Number(u.config.vehicle_inactive_interval)||20)*1e3:Ye)}catch(u){console.warn(u)}}Re();function te(){l||s.current?.readyState===WebSocket.OPEN||s.current?.readyState===WebSocket.CONNECTING||(s.current=new WebSocket(a),s.current.onmessage=f.current,s.current.onopen=()=>{y.current=Ie},s.current.onclose=()=>{if(l||!navigator.onLine)return;_=window.setTimeout(te,y.current);const u=3e4;y.current=Math.min(y.current*2,u)})}function ue(){te()}function Le(u){clearInterval(E.current),!l&&(E.current=window.setInterval(()=>{const z=performance.now(),C=[],U=[];m.current.forEach((j,X)=>{if(z-j<u)return;const q=w.get(X);q&&(q.hidden=!0,U.push(q),C.push(X));const D=ae(X),B=w.get(D);B&&(B.hidden=!0,U.push(B),C.push(D))}),U.length&&I.add(()=>W(...U)),C.forEach(j=>m.current.delete(j))},u))}return()=>{l=!0,clearTimeout(_);const u=s.current;u&&(u.onopen=null,u.onmessage=null,u.onclose=null,u.close(),s.current=null),f.current=null;const z=R.find(C=>C.name===re);z&&(z.onScale=void 0),p.forEach(C=>C?.()),p.clear(),w.clear(),I.destroy(),window.removeEventListener("online",ue),clearInterval(E.current)}},[e,n,r,a])}function $(e){const n=ne.get(e);if(!n)throw new Error("useManageTraffic: an icon was drawn without a recorded CSS size");return n}function Ee(e){return e*2}function $e(e,n){const r=n*pe,a=we*2;return[n+se+r/2+a,e+r+se+a]}function xe(e){return Math.min(e||1,We)}function Ue(e,n){return fe(e,n)}function je({radius:e,scale:n,color:r}){const a=Math.ceil(e*2*n),t=me(a,a,n);ne.set(t,[Ee(e),Ee(e)]);const o=t.getContext("2d");o.imageSmoothingEnabled=!1;const c=a/2,s=e*.78,f=e*.33;return o.translate(c,c),o.scale(n,n),o.beginPath(),o.arc(0,0,e,0,2*Math.PI),o.fillStyle="#FFFFFF",o.fill(),o.beginPath(),o.arc(0,0,s,0,2*Math.PI),o.fillStyle=r,o.fill(),o.beginPath(),o.arc(0,0,f,0,2*Math.PI),o.fillStyle="#FFFFFF",o.fill(),t}function Me({id:e,width:n,height:r,color:a,scale:t}){const o=se*t,c=n/2*t,s=r*t,f=pe,d=.01,M=s*f,b=s,T=we*t,y=b+o+M/2+T*2,m=c*2+M+o+T*2,E=me(y,m,t);ne.set(E,$e(n,r)),E.setAttribute("id",e);const l=E.getContext("2d"),_=y/2,R=m/2;l.save(),l.translate(_,R),l.rotate(-Math.PI/2),l.translate(-_,-R);const p=_,w=R-b/2+c,I=w+M;return l.shadowColor="rgba(16, 24, 40, 0.2)",l.shadowBlur=T/2,l.beginPath(),l.arc(p,w,c,Math.PI,0,!1),l.bezierCurveTo(p+c,w+s*.3,p+d*c,I,p,I),l.bezierCurveTo(p-d*c,I,p-c,w+s*.3,p-c,w),l.closePath(),l.fillStyle=a,l.fill(),l.strokeStyle="#FFFFFF",l.lineWidth=o,l.stroke(),l.restore(),E}function ie(e,n){return he(e,n)}function ae(e){return`${e}_finery`}function Se({updateQueue:e,vehicle:n,vehicleFinery:r,x:a,y:t,scale:o,angle:c}){const s=n.source;if(n.bounds=Y(a,t,...$(s),o,c),n.hidden=!1,r){const f=ge()?.state().roll??0,d=r.source;r.bounds=Y(a,t,...$(d),o,Ce(f)),r.hidden=!1,e.add(()=>W(r,n))}else e.add(()=>W(n))}function ee(e,n,r){return{x:e.x+(n.x-e.x)*r,y:e.y+(n.y-e.y)*r}}function Te(e,n){let r=1/0,a={index:0,t:0};for(let t=0;t<n.length-1;t++){const o=n[t],c=n[t+1],s=c.x-o.x,f=c.y-o.y,d=s*s+f*f,M=d?((e.x-o.x)*s+(e.y-o.y)*f)/d:0,b=Math.max(0,Math.min(1,M)),T=ee(o,c,b),y=ie(e,T);y<r&&(r=y,a={index:t,t:b})}return a}function qe(e,n,r){const a=ie(e,n),t=Math.max(2,Math.ceil(a/r)+1),o=[];for(let c=0;c<t;c++){const s=c/(t-1),f=ee(e,n,s);o.push(f)}return o}function Be(e,n,r){if(!r||!r.length)return qe(e,n,10);const a=Te(e,r),t=Te(n,r),o=[],c=s=>o.push(s);a.index+1<r.length?c(ee(r[a.index],r[a.index+1],a.t)):c(r[a.index]);for(let s=a.index+1;s<=t.index&&s<r.length;s++)c(r[s]);return t.index+1<r.length?c(ee(r[t.index],r[t.index+1],t.t)):c(r[t.index]),o}function Qe(e,n,r,a){if(e.length<2)return()=>{};let t=null,o;const c=[];let s=0;for(let d=0;d<e.length-1;d++){const M=he(e[d],e[d+1]);c.push(M),s+=M}const f=d=>{t||(t=d);const M=d-t,b=Math.min(M/n,1),T=b*s;let y=0,m=0;for(;m<c.length&&y+c[m]<T;)y+=c[m],m++;m>=c.length&&(m=c.length-1);const E=e[m],l=e[Math.min(m+1,e.length-1)],_=c[m]||0,R=_===0?0:(T-y)/_,p=E.x+(l.x-E.x)*R,w=E.y+(l.y-E.y)*R,I=fe(E,l);r({x:p,y:w,angle:I}),b<1?o=requestAnimationFrame(f):a&&a()};return o=requestAnimationFrame(f),()=>{o&&cancelAnimationFrame(o)}}function le(e){return`${e.x},${e.y}`}const ne=new WeakMap;
1
+ import{lineAngle as fe,pointDistance as he,Rect as be}from"@expofp/geometry";import{update as z}from"@expofp/renderer";import{useEffect as Ce,useRef as S}from"react";import _e from"../../../tools/base-runtime-url";import{loadImage as ve}from"../../../utils/loadImage";import{mapCamera as Pe}from"../camera";import{createCanvas as ge,createImageCanvas as Fe,getBounds as B,imageCanvasCssSize as Ne}from"../drawing/config/canvases";import{getRouteLayerRegex as De,getRouteStopLayerRegex as Oe,TRAFFIC_VEHICLES as ce}from"./trafficLayers";import{UpdateQueue as He}from"./UpdateQueue";const se=2,Ve=se*3.5,J=se*12,K=J*.7,ze=8,ie=2,me=.6,pe=8,We="transport_locations",ke=150,Ge="#a4aab6",we=1e3,Ue=2e4,Ie=500;export function useManageTraffic({permission:e,scene:t,dataJsonUrl:n,websocketUrl:a}){const o=S(1),r=S(new Map),c=S(new Map),s=S(null),f=S(null),d=S(0),w=S(1),b=S(new He),R=S(new Map),E=S(we),m=S(new Map),x=S(void 0);Ce(()=>{if(!e||!t)return;let u=!1,v;const T=t.rootLayer.children,p=c.current,I=r.current,y=b.current;async function Re(){try{let l;try{const i=await fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok||i.status===204)return;l=await i.json()}catch(i){console.warn("useManageTraffic failed to get JSON",i)}if(u||!l||l.disabled||l.error)return;o.current=Ee(Pe()?.state().pixelSize??1);const W=new Map(l.routes.map(({id:i,color:h})=>[i,h])),C=new Map;W.forEach(i=>{C.set(i,je({radius:Ve,color:i,scale:window.devicePixelRatio}))});const U=De(),Y=T.filter(i=>U.test(i.name)),X=Oe(),$=T.filter(i=>X.test(i.name));l.routes.slice(0,Y.length).forEach(({id:i,color:h,path:g,stops:O,hiddenPoints:L},k)=>{R.current.set(i,g);const M=Y[k];if(M){const H=new Map(L?.map(F=>[le(F),F])??[]);for(let F=1;F<g.length;F++){const A=g[F-1],V=g[F];H.has(le(A))||H.has(le(V))||M.children.push({points:{p0:A,p1:V},color:h,width:se})}M.children.length&&y.add(()=>z(M))}const _=$[k],P=C.get(h);_&&P&&O?.length&&(O.forEach(H=>{_.children.push({source:P,bounds:B(H.x,H.y,...Q(P),o.current)})}),_.children.length&&y.add(()=>z(_)))});const D=T.find(i=>i.name===ce);if(!D){console.warn(`useManageTraffic: the scene has no "${ce}" layer`);return}const j=new Map;D.onScale=({pixelSize:i})=>{o.current=Ee(i);const h=[];for(const g of $){const O=g.children;for(const L of O){const k=L.source;L.bounds=B(L.bounds.center.x,L.bounds.center.y,...Q(k),o.current,L.bounds.rotation),h.push(L)}}for(const g of r.current.values()){const O=g.source;g.bounds=B(g.bounds.center.x,g.bounds.center.y,...Q(O),o.current,g.bounds.rotation),h.push(g)}return h},y.add(()=>z(D)),W.forEach((i,h)=>{j.set(h,xe({id:h,width:J,height:J,color:i,scale:window.devicePixelRatio}))});const Le=xe({id:"orphan",width:J,height:J,color:Ge,scale:window.devicePixelRatio});let q=null;try{const i=await ve(`${_e}icons/bus-white.svg`);if(u)return;q=Fe(i,K,K,window.devicePixelRatio);const{width:h,height:g}=Ne(i,K,K);ne.set(q,[h,g])}catch(i){console.error(i)}f.current=i=>{try{const h=JSON.parse(i.data);if(h.type!==We)return;const g=i.timeStamp||performance.now();w.current=Math.round(g-d.current),d.current=g;const O=Math.max(w.current??Ie,Ie),L=D.children;let k=!1;h.data.forEach(({id:M,x:_,y:P,route_id:H,hidden:F})=>{p.has(M)&&(p.get(M)?.(),p.delete(M));const A=I.get(M),V=I.get(ue(M))??null;if(F&&A&&V){A.hidden=!0,V.hidden=!0,y.add(()=>z(A,V));return}if(m.current.set(M,performance.now()),!A){const G=j.get(H)??Le,N={source:G,bounds:B(_,P,...Q(G),o.current,0)};if(I.set(M,N),q){const Z=ue(M),re={source:q,bounds:B(_,P,...Q(q),o.current,0)};qe(re),q.setAttribute("id",Z),I.set(Z,re),L.push(N,re)}else L.push(N);k=!0;return}const Ae=A.bounds.center,oe=Qe(Ae,{x:_,y:P},R.current.get(H));if(oe.reduce((G,N,Z)=>Z===0?G:G+ae(oe[Z-1],N),0)>=ke||document.hidden)Me({updateQueue:y,vehicle:A,vehicleFinery:V,x:_,y:P,scale:o.current,angle:$e(A.bounds.center,{x:_,y:P})});else{const G=Xe(oe,O,N=>{Me({updateQueue:y,vehicle:A,vehicleFinery:V,x:N.x,y:N.y,scale:o.current,angle:N.angle})});p.set(M,G)}}),k&&y.add(()=>z(D))}catch(h){console.error("handleSocketMessage",h)}},d.current=performance.now(),te(),window.addEventListener("online",de),Te(l.config?(Number(l.config.vehicle_inactive_interval)||20)*1e3:Ue)}catch(l){console.warn(l)}}Re();function te(){u||s.current?.readyState===WebSocket.OPEN||s.current?.readyState===WebSocket.CONNECTING||(s.current=new WebSocket(a),s.current.onmessage=f.current,s.current.onopen=()=>{E.current=we},s.current.onclose=()=>{if(u||!navigator.onLine)return;v=window.setTimeout(te,E.current);const l=3e4;E.current=Math.min(E.current*2,l)})}function de(){te()}function Te(l){clearInterval(x.current),!u&&(x.current=window.setInterval(()=>{const W=performance.now(),C=[],U=[];m.current.forEach((Y,X)=>{if(W-Y<l)return;const $=I.get(X);$&&($.hidden=!0,U.push($),C.push(X));const D=ue(X),j=I.get(D);j&&(j.hidden=!0,U.push(j),C.push(D))}),U.length&&y.add(()=>z(...U)),C.forEach(Y=>m.current.delete(Y))},l))}return()=>{u=!0,clearTimeout(v);const l=s.current;l&&(l.onopen=null,l.onmessage=null,l.onclose=null,l.close(),s.current=null),f.current=null;const W=T.find(C=>C.name===ce);W&&(W.onScale=void 0),p.forEach(C=>C?.()),p.clear(),I.clear(),y.destroy(),window.removeEventListener("online",de),clearInterval(x.current)}},[e,t,n,a])}function Q(e){const t=ne.get(e);if(!t)throw new Error("useManageTraffic: an icon was drawn without a recorded CSS size");return t}function ye(e){return e*2}function Ye(e,t){const n=t*me,a=pe*2;return[t+ie+n/2+a,e+n+ie+a]}function Ee(e){return Math.min(e||1,ze)}function $e(e,t){return fe(e,t)}function je({radius:e,scale:t,color:n}){const a=Math.ceil(e*2*t),o=ge(a,a,t);ne.set(o,[ye(e),ye(e)]);const r=o.getContext("2d");r.imageSmoothingEnabled=!1;const c=a/2,s=e*.78,f=e*.33;return r.translate(c,c),r.scale(t,t),r.beginPath(),r.arc(0,0,e,0,2*Math.PI),r.fillStyle="#FFFFFF",r.fill(),r.beginPath(),r.arc(0,0,s,0,2*Math.PI),r.fillStyle=n,r.fill(),r.beginPath(),r.arc(0,0,f,0,2*Math.PI),r.fillStyle="#FFFFFF",r.fill(),o}function xe({id:e,width:t,height:n,color:a,scale:o}){const r=ie*o,c=t/2*o,s=n*o,f=me,d=.01,w=s*f,b=s,R=pe*o,E=b+r+w/2+R*2,m=c*2+w+r+R*2,x=ge(E,m,o);ne.set(x,Ye(t,n)),x.setAttribute("id",e);const u=x.getContext("2d"),v=E/2,T=m/2;u.save(),u.translate(v,T),u.rotate(-Math.PI/2),u.translate(-v,-T);const p=v,I=T-b/2+c,y=I+w;return u.shadowColor="rgba(16, 24, 40, 0.2)",u.shadowBlur=R/2,u.beginPath(),u.arc(p,I,c,Math.PI,0,!1),u.bezierCurveTo(p+c,I+s*.3,p+d*c,y,p,y),u.bezierCurveTo(p-d*c,y,p-c,I+s*.3,p-c,I),u.closePath(),u.fillStyle=a,u.fill(),u.strokeStyle="#FFFFFF",u.lineWidth=r,u.stroke(),u.restore(),x}function ae(e,t){return he(e,t)}function ue(e){return`${e}_finery`}function qe(e){e.onRoll=({roll:t})=>{const{bounds:n}=e;if(t!==n.rotation)return n.rotate(t-n.rotation,n),[e]}}function Me({updateQueue:e,vehicle:t,vehicleFinery:n,x:a,y:o,scale:r,angle:c}){const s=t.source;if(t.bounds=B(a,o,...Q(s),r,c),t.hidden=!1,n){const{size:f,rotation:d,elevation:w}=n.bounds;n.bounds=new be({x:a,y:o},f,d,w),n.hidden=!1,e.add(()=>z(n,t))}else e.add(()=>z(t))}function ee(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Se(e,t){let n=1/0,a={index:0,t:0};for(let o=0;o<t.length-1;o++){const r=t[o],c=t[o+1],s=c.x-r.x,f=c.y-r.y,d=s*s+f*f,w=d?((e.x-r.x)*s+(e.y-r.y)*f)/d:0,b=Math.max(0,Math.min(1,w)),R=ee(r,c,b),E=ae(e,R);E<n&&(n=E,a={index:o,t:b})}return a}function Be(e,t,n){const a=ae(e,t),o=Math.max(2,Math.ceil(a/n)+1),r=[];for(let c=0;c<o;c++){const s=c/(o-1),f=ee(e,t,s);r.push(f)}return r}function Qe(e,t,n){if(!n||!n.length)return Be(e,t,10);const a=Se(e,n),o=Se(t,n),r=[],c=s=>r.push(s);a.index+1<n.length?c(ee(n[a.index],n[a.index+1],a.t)):c(n[a.index]);for(let s=a.index+1;s<=o.index&&s<n.length;s++)c(n[s]);return o.index+1<n.length?c(ee(n[o.index],n[o.index+1],o.t)):c(n[o.index]),r}function Xe(e,t,n,a){if(e.length<2)return()=>{};let o=null,r;const c=[];let s=0;for(let d=0;d<e.length-1;d++){const w=he(e[d],e[d+1]);c.push(w),s+=w}const f=d=>{o||(o=d);const w=d-o,b=Math.min(w/t,1),R=b*s;let E=0,m=0;for(;m<c.length&&E+c[m]<R;)E+=c[m],m++;m>=c.length&&(m=c.length-1);const x=e[m],u=e[Math.min(m+1,e.length-1)],v=c[m]||0,T=v===0?0:(R-E)/v,p=x.x+(u.x-x.x)*T,I=x.y+(u.y-x.y)*T,y=fe(x,u);n({x:p,y:I,angle:y}),b<1?r=requestAnimationFrame(f):a&&a()};return r=requestAnimationFrame(f),()=>{r&&cancelAnimationFrame(r)}}function le(e){return`${e.x},${e.y}`}const ne=new WeakMap;
@@ -1,3 +1,4 @@
1
+ import { Rect } from '@expofp/geometry';
1
2
  import { type Booth } from '../store/BoothStore';
2
3
  /** One `<image>` from a layer's drawing: where it sits, and the pixels to draw there. */
3
4
  export interface LayerImage {
@@ -14,21 +15,15 @@ export interface LayerImage {
14
15
  * onto the main thread.
15
16
  */
16
17
  source: Blob;
17
- /** Placement read off the SVG element: top-left, size, and rotation in degrees. */
18
- bounds: {
19
- x: number;
20
- y: number;
21
- width: number;
22
- height: number;
23
- angle: number;
24
- };
18
+ /** Placement on the plan: the image fitted into the element's box, rotated as the element is. */
19
+ bounds: Rect;
25
20
  }
26
21
  /**
27
22
  * Loads a layer's drawing images as bytes.
28
23
  *
29
- * The placement comes from the SVG element, not from the file. Nothing here needs the image's
30
- * intrinsic size, so a raster image is never decoded. Avoiding that decode on the main thread is
31
- * the reason for this change.
24
+ * The image is fitted into its element's box like SVG `xMidYMid meet`. The designer writes the
25
+ * file's pixel size into the href query as `w` and `h`. An href without a valid size is measured
26
+ * by decoding the image, and if that fails too, the image fills the box.
32
27
  *
33
28
  * Most of these hrefs are inline `data:image/webp;base64` URLs, not file references. The
34
29
  * converter embeds designer graphics directly in the drawing payload. In a real plan, the first
@@ -1 +1 @@
1
- import{loadBlob as e}from"./loadBlob";import{isSvgBlob as u,svgToPngBlob as i}from"./rasterize-svg";export async function loadLayerImages(a){const t=new Map,r=n=>{let l=t.get(n);return l||(l=s(n),t.set(n,l)),l};return(await Promise.all(a.map(async n=>{const l=n.getAttribute("xlink:href")??n.getAttribute("href"),o=l?await r(l):null;return o?{bounds:{x:n.x.animVal.value,y:n.y.animVal.value,width:n.width.animVal.value,height:n.height.animVal.value,angle:n.transform?.animVal[0]?.angle??0},source:o,booth:null}:null}))).filter(n=>n!==null)}async function s(a){const t=await e(a);return t?u(t)?i(t):t:null}
1
+ import{Box as u,degToRad as h,Rect as m}from"@expofp/geometry";import{blobImageSize as f}from"./blob-image-size.js";import{loadBlob as d}from"./loadBlob";import{isSvgBlob as g,svgToPngBlob as w}from"./rasterize-svg";export async function loadLayerImages(n){const t=new Map,e=r=>{let o=t.get(r);return o||(o=b(r),t.set(r,o)),o};return(await Promise.all(n.map(async r=>{const o=r.getAttribute("xlink:href")??r.getAttribute("href"),a=o?await e(o):null;if(!a)return null;const l=y(u.fromSvg(r),a.size),c=r.transform?.animVal[0]?.angle??0;return{bounds:m.fromMinMax(l.min,l.max,h(c)),source:a.source,booth:null}}))).filter(r=>r!==null)}async function b(n){const t=await d(n);if(!t)return null;const e=g(t)?await w(t):t;return e?{source:e,size:p(n)??await f(e)}:null}function p(n){let t;try{({searchParams:t}=new URL(n))}catch{return null}const e=Number(t.get("w")),i=Number(t.get("h"));return s(e)&&s(i)?{width:e,height:i}:null}function s(n){return Number.isFinite(n)&&n>0}function y(n,t){if(!t?.width||!t.height||!n.size.width||!n.size.height)return n;const e=Math.min(n.size.width/t.width,n.size.height/t.height);return u.fromCenter(n.center,{x:t.width*e,y:t.height*e})}
@@ -1 +1 @@
1
- import{comparer as E,reaction as c}from"mobx";import{boothToEndpoint as h,CURRENT_LOCATION_NAME as x,CURRENT_POSITION_POINT_ID as m,positionInput as T,toArbitraryPoint as b}from"./adapters";const A=s=>"rect"in s?h(s):s;export function bindMobxReactions({wayfinding:s,kioskHandler:C,yahHandler:R,stores:{routeStore:n,uiState:i,layerStore:l}}){const f=[];function a(){const o=i.selectedRoute,t=o?.from?A(o.from):null,e=o?.to?A(o.to):null;if(!t||!e){s.clearRoute();return}s.setRoute({from:t,to:e,waypoints:o?.waypoints?.map(h),accessible:n.onlyAccessible})===!1&&console.error(new Error(`Route not found: (${t.x},${t.y}) \u2192 (${e.x},${e.y})`))}function u(){const o=n.currentPosition,t=n.iconType!==0,e=i.selectedRoute,p=!!(e?.from&&e?.to),y=t&&!p;if(!o){s.setPosition(null),R(null);return}const d=T(o);y?(s.setPosition(null),R({x:d.x,y:d.y,layer:d.layer})):(R(null),s.setPosition(d))}function F(){const o=n.currentPosition,t=i.selectedRoute;if(!o||!t?.to)return;const e=!t.from,y=t.from?.id===m&&s.shouldReroute(T(o));!e&&!y||n.rebuildRouteFromPosition(b(o,x,m))}function P(){const o=l.floors.find(t=>t.active)?.name;C(i.kioskData??null,o,l.mode)}function I(){const o=i.selectedRoute,t=n.currentPosition;if(!o?.to||!t||o.from?.id!==m||n.routeLines.length>0)return;const e=t.z!=null?String(t.z):"";o.from.x===t.x&&o.from.y===t.y&&o.from.layer===e||n.rebuildRouteFromPosition(b(t,x,m))}f.push(c(()=>l.layersLoaded,()=>{a(),u()}),c(()=>[i.selectedRoute,n.onlyAccessible],()=>{a(),u()}),c(()=>n.currentPosition,()=>{u()}),c(()=>{const o=n.currentPosition;return o?{x:o.x,y:o.y,z:o.z}:null},()=>{F(),I()},{equals:E.structural}),c(()=>[i.kioskData,l.floors.find(o=>o.active)],()=>P()));let r=null;const N=c(()=>[n.currentRouteLayer,i.getRouteNextFloor],()=>{l.layersLoaded&&(r!==null&&clearTimeout(r),r=setTimeout(()=>{s.notifyFloorChanged(),u(),r=null},0))});return f.push(()=>{r!==null&&clearTimeout(r),N()}),a(),u(),P(),()=>{for(const o of f)o();f.length=0}}
1
+ import{comparer as x,reaction as c}from"mobx";import{boothToEndpoint as T,CURRENT_LOCATION_NAME as h,CURRENT_POSITION_POINT_ID as m,positionInput as b,toArbitraryPoint as A}from"./adapters";const C=s=>"rect"in s?T(s):s;export function bindMobxReactions({wayfinding:s,kioskHandler:F,yahHandler:R,stores:{routeStore:n,uiState:i,layerStore:l}}){const f=[];function a(){const o=i.selectedRoute,t=o?.from?C(o.from):null,e=o?.to?C(o.to):null;if(!t||!e){s.clearRoute();return}s.setRoute({from:t,to:e,waypoints:o?.waypoints?.map(T),accessible:n.onlyAccessible})===!1&&console.error(new Error(`Route not found: (${t.x},${t.y}) \u2192 (${e.x},${e.y})`))}function u(){const o=n.currentPosition,t=n.iconType!==0,e=i.selectedRoute,p=!!(e?.from&&e?.to),y=t&&!p;if(!o){s.setPosition(null),R(null);return}const d=b(o);y?(s.setPosition(null),R({x:d.x,y:d.y,layer:d.layer})):(R(null),s.setPosition(d))}function I(){const o=n.currentPosition,t=i.selectedRoute;if(!o||!t?.to)return;const e=!t.from,y=t.from?.id===m&&s.shouldReroute(b(o));!e&&!y||n.rebuildRouteFromPosition(A(o,h,m))}function P(){const o=l.floors.find(t=>t.active)?.name;F(i.kioskData??null,o,l.mode)}function N(){const o=i.selectedRoute,t=n.currentPosition;if(!o?.to||!t||o.from?.id!==m||n.routeLines.length>0)return;const e=t.z!=null?String(t.z):"";o.from.x===t.x&&o.from.y===t.y&&o.from.layer===e||n.rebuildRouteFromPosition(A(t,h,m))}f.push(c(()=>l.layersLoaded,()=>{a(),u()}),c(()=>[i.selectedRoute,n.onlyAccessible],()=>{a(),u()}),c(()=>{const o=n.currentPosition;return o?{x:o.x,y:o.y,z:o.z,angle:o.angle,iconType:n.iconType}:null},()=>{u()},{equals:x.structural}),c(()=>{const o=n.currentPosition;return o?{x:o.x,y:o.y,z:o.z}:null},()=>{I(),N()},{equals:x.structural}),c(()=>[i.kioskData,l.floors.find(o=>o.active)],()=>P()));let r=null;const z=c(()=>[n.currentRouteLayer,i.getRouteNextFloor],()=>{l.layersLoaded&&(r!==null&&clearTimeout(r),r=setTimeout(()=>{s.notifyFloorChanged(),u(),r=null},0))});return f.push(()=>{r!==null&&clearTimeout(r),z()}),a(),u(),P(),()=>{for(const o of f)o();f.length=0}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.45.4",
3
+ "version": "3.45.6",
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.45.4",
73
- "@expofp/debug": "3.45.4",
74
- "@expofp/geometry": "3.45.4",
75
- "@expofp/renderer": "3.45.4",
76
- "@expofp/resolve": "3.45.4",
77
- "@expofp/schema": "3.45.4",
78
- "@expofp/ui": "3.45.4",
79
- "@expofp/utils": "3.45.4",
80
- "@expofp/wayfinding": "3.45.4"
72
+ "@expofp/config": "3.45.6",
73
+ "@expofp/debug": "3.45.6",
74
+ "@expofp/geometry": "3.45.6",
75
+ "@expofp/renderer": "3.45.6",
76
+ "@expofp/resolve": "3.45.6",
77
+ "@expofp/schema": "3.45.6",
78
+ "@expofp/ui": "3.45.6",
79
+ "@expofp/utils": "3.45.6",
80
+ "@expofp/wayfinding": "3.45.6"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@babel/plugin-proposal-decorators": "^8.0.2",