@expofp/floorplan 3.24.1 → 3.24.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-DkSGND95.js → Button-p01mffmV.js} +5 -5
- package/dist/browser/{CookieConsent-DhfpcFEJ.js → CookieConsent-BF8pB73I.js} +7 -7
- package/dist/browser/{Debug-Bv6PBvNB.js → Debug-B5hyechZ.js} +7 -7
- package/dist/browser/{Demo-B_-k6Qqi.js → Demo-knBpWccU.js} +9 -9
- package/dist/browser/{Free-DtDwuIIC.js → Free-CMDOPW7B.js} +9 -9
- package/dist/browser/{GalleryContainer-BXhCkqUc.js → GalleryContainer-Ba7QRGqJ.js} +10 -10
- package/dist/browser/{GpsLoader-Bsj-uhy6.js → GpsLoader-DOOP_ASm.js} +10 -10
- package/dist/browser/{KioskStore-DLyZ3N0i.js → KioskStore-IZgF3XDx.js} +4 -4
- package/dist/browser/{MaplibreAdapter-DopBIXXp.js → MaplibreAdapter-BfUqF5P9.js} +292 -245
- package/dist/browser/{ModalContainer-D0SGqLjg.js → ModalContainer-MRMe33uV.js} +10 -10
- package/dist/browser/{PermissionNotice-CVy-b_tR.js → PermissionNotice-DB5Ift9m.js} +6 -6
- package/dist/browser/{SetKioskMode-BRqHtBdF.js → SetKioskMode-Bg4_U0Ov.js} +8 -8
- package/dist/browser/{ShowKiosk-btUnONrL.js → ShowKiosk-_EK6VmAV.js} +10 -10
- package/dist/browser/{ViewerMenuPanel-DWet7H6A.js → ViewerMenuPanel-BostqgVg.js} +9 -9
- package/dist/browser/{add-debug-secret-listener-CsL1cJnL.js → add-debug-secret-listener-ivErN3mk.js} +1 -1
- package/dist/browser/{adopt-global-settings-C-plRh54.js → adopt-global-settings-B6w6CagP.js} +9 -9
- package/dist/browser/{boolean-editor-R0vXR01d.js → boolean-editor-CUGJZwH-.js} +9 -9
- package/dist/browser/{bootIntercom-DbymLstt.js → bootIntercom-D-rZAhCK.js} +2 -2
- package/dist/browser/{booth-by-xy-BvyLOzml.js → booth-by-xy-DzhIUI-Q.js} +6 -6
- package/dist/browser/bundle.json +65 -65
- package/dist/browser/{classnames-tSmZGiCw.js → classnames-9nzeif8D.js} +2 -2
- package/dist/browser/{client-CH5C0k0N.js → client-BsLcgFfO.js} +4 -4
- package/dist/browser/{components-Cv_C8SHY.js → components-By6WCr5d.js} +36 -36
- package/dist/browser/{debug-overlay-2ZLLeyHj.js → debug-overlay-D6b9zd48.js} +10 -10
- package/dist/browser/{debug-ui-CgWrSsg5.js → debug-ui-Da7wcC3i.js} +6 -6
- package/dist/browser/{dist-hJ1sMVRQ.js → dist-BvZjZCdR.js} +3 -3
- package/dist/browser/{dist-dbmY0g6x.js → dist-DhzSPs9e.js} +6 -6
- package/dist/browser/{dist-BwKtH_OH.js → dist-E6y2lqRa.js} +5 -5
- package/dist/browser/{efp-debug-init-BAQilDan.js → efp-debug-init-4LtPCUPY.js} +3 -3
- package/dist/browser/{enum-editor-BHGyOyVZ.js → enum-editor-BghDWgeO.js} +4 -4
- package/dist/browser/{es5-D7UpN3Xy.js → es5-B1foSeGv.js} +2 -2
- package/dist/browser/{event-not-found-BlRetvaw.js → event-not-found-CEyhr6Cq.js} +1 -1
- package/dist/browser/{exports-BROU0Tmc.js → exports-BeSO266J.js} +1 -1
- package/dist/browser/{favicon-DjqhaDT2.js → favicon-CWf1ojn0.js} +1 -1
- package/dist/browser/{fetch-retry.umd-BzQ5Uref.js → fetch-retry.umd-CWgAWfkB.js} +2 -2
- package/dist/browser/{flex-lGSSfn9B.js → flex-C64hUG-Y.js} +5 -5
- package/dist/browser/{floorplan.loader-WC96OyoL.js → floorplan.loader-BF29NpFQ.js} +10 -10
- package/dist/browser/{floorplan.ready-D_Mqv_IY.js → floorplan.ready-ByvBX6zB.js} +14 -14
- package/dist/browser/{fuse-DpqtKpE1.js → fuse-B9jyODVz.js} +2 -2
- package/dist/browser/{i18n-CZo0wHic.js → i18n-CyXUWmbq.js} +5 -5
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-C8ffhI27.js → index.module-DlRMnP0h.js} +4 -4
- package/dist/browser/{integrateKiosk-_qPUpBvp.js → integrateKiosk-CqDd_6zK.js} +4 -4
- package/dist/browser/{is-webview-DRoOZIkt.js → is-webview-nZTrftS3.js} +1 -1
- package/dist/browser/{jsx-runtime-CrDYq-Yr.js → jsx-runtime-BvehpqN1.js} +2 -2
- package/dist/browser/{kiosk-record-DWahR7lE.js → kiosk-record-3zDMdFbA.js} +1 -1
- package/dist/browser/{lib-McxhdS-r.js → lib-BWguER4h.js} +3 -3
- package/dist/browser/{loadImage-NDHAmMUd.js → loadImage-DlTxF7hO.js} +4 -4
- package/dist/browser/{logDeviceInfo-CO1m8zmo.js → logDeviceInfo-DkyoRXga.js} +9 -9
- package/dist/browser/{main-9Nq9CKJx.js → main-CQISrN-R.js} +1 -1
- package/dist/browser/{mobx-BuyEdL0-.js → mobx-CclSjvoG.js} +4 -4
- package/dist/browser/{optional-boolean-editor-BF5BcmUs.js → optional-boolean-editor-DQzKDlOi.js} +3 -3
- package/dist/browser/{optional-enum-editor-CokQm6Ba.js → optional-enum-editor-BoXlfU-Z.js} +4 -4
- package/dist/browser/{optional-string-editor-Ch3S1tL7.js → optional-string-editor-D5dIax4i.js} +4 -4
- package/dist/browser/{particles.min-DWAay96W.js → particles.min-D9wmJdXA.js} +2 -2
- package/dist/browser/{react-CpuDq-nD.js → react-6tMZPkhI.js} +2 -2
- package/dist/browser/{react-dom-C0PlJ3z7.js → react-dom-CutFn8wf.js} +3 -3
- package/dist/browser/{rolldown-runtime-B-MEr7Se.js → rolldown-runtime-dRo6A-vE.js} +1 -1
- package/dist/browser/{select-t73Dm6ZU.js → select-WMTRp4v8.js} +10 -10
- package/dist/browser/{settings-Bw5KpNVl.js → settings-DUe5ncnN.js} +2 -2
- package/dist/browser/{settings-item-DE58J3ix.js → settings-item-COWlJF9-.js} +6 -6
- package/dist/browser/{store-Dqm1Vk_v.js → store-B0pIa2x7.js} +12 -16
- package/dist/browser/{string-editor-d-XtkTex.js → string-editor-oB_Qkp2m.js} +4 -4
- package/dist/browser/{text-field-CmLS1OEo.js → text-field-eEQqOs7Q.js} +5 -5
- package/dist/browser/{theme-tfvygCpQ.js → theme-BLk06fsq.js} +8 -8
- package/dist/browser/{ui-CgLJjWkr.js → ui-DCurqY1Z.js} +8 -8
- package/dist/browser/{useRenderTarget-gD9lcSaB.js → useRenderTarget-BuFH1LJK.js} +4 -4
- package/dist/esm/components/Maplibre/MaplibreWrapper.d.ts +6 -0
- package/dist/esm/components/Maplibre/MaplibreWrapper.js +1 -1
- package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
- package/dist/esm/components/Maplibre/utils/pmtiles-range-fallback.d.ts +53 -0
- package/dist/esm/components/Maplibre/utils/pmtiles-range-fallback.js +1 -0
- package/dist/esm/components/Maplibre/utils/resolve-map-style.d.ts +1 -1
- package/dist/esm/components/Maplibre/utils/resolve-map-style.js +1 -1
- package/dist/esm/store/RouteStore.js +1 -1
- package/package.json +9 -9
|
@@ -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.24.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.24.3" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
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-dRo6A-vE.js";
|
|
10
|
+
import { t } from "./react-6tMZPkhI.js";
|
|
11
|
+
import { l as n } from "./store-B0pIa2x7.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -10,6 +10,12 @@ export declare const MAP_DIM_LAYER_ID = "expofp-map-dim";
|
|
|
10
10
|
export interface TileSourceConfig {
|
|
11
11
|
/** Maplibre style URL or inline style JSON object */
|
|
12
12
|
style: string | StyleSpecification;
|
|
13
|
+
/**
|
|
14
|
+
* The style and everything it references ship inside the plan archive. Local
|
|
15
|
+
* hosts serve those files themselves, so PMTiles archives get a source that
|
|
16
|
+
* tolerates a host without Range support.
|
|
17
|
+
*/
|
|
18
|
+
offline?: boolean;
|
|
13
19
|
}
|
|
14
20
|
export interface CameraPaddingOptions {
|
|
15
21
|
top: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as N}from"react/jsx-runtime";import"maplibre-gl/dist/maplibre-gl.css";import{Renderer as G}from"@expofp/renderer";import{addProtocol as Y,Map as k}from"maplibre-gl";import{Protocol as q}from"pmtiles";import{useEffect as E,useRef as l}from"react";import{registerPmtilesArchive as H}from"./utils/pmtiles-range-fallback";import{createStyleTransform as J}from"./utils/resolve-map-style";import{createUpdatePump as Q}from"./utils/update-pump";export const MAP_DIM_LAYER_ID="expofp-map-dim";const g="expofp-map-dim-source",V="3d-expofp";let b=null;const W=["coalesce",["get","name:en"],["get","name_en"],["get","name:latin"],["get","name"]],X={type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,-85],[180,-85],[180,85],[-180,85],[-180,-85]]]},properties:{}};function I(e){if(!e||typeof e!="object")return!1;const r=e.length;if(typeof r!="number"||r<16)return!1;const n=e[0];return typeof n=="number"&&Number.isFinite(n)}function K(e){if(I(e))return Array.from(e);const n=e?.defaultProjectionData?.mainMatrix;return I(n)?Array.from(n):(console.warn("Maplibre custom layer received an unsupported projection matrix payload.",e),null)}function h(e){return typeof e=="string"?e.includes("name"):Array.isArray(e)?e.some(r=>h(r)):!e||typeof e!="object"?!1:Object.values(e).some(r=>h(r))}function $(e){return e.type!=="symbol"||!e.id||!e.layout?!1:h(e.layout["text-field"])}function v(e){const r=e.getStyle();for(const n of r.layers??[])$(n)&&e.setLayoutProperty(n.id,"text-field",W)}function ee(){if(b)return b;const e=new q;b=e;try{Y("pmtiles",e.tile)}catch(r){console.warn("Maplibre PMTiles protocol registration failed.",r)}return e}export default function te({sceneDef:e,geoConfig:r,staticTransform:n,tileSource:w,mapOptions:O,onRendererReady:x,onMapDimLayerReady:P,onMapLoadError:M}){const m=l(null),L=l(null),a=l(null),S=l(x),A=l(P),_=l(M),C=l({sceneDef:e,geoConfig:r,staticTransform:n,tileSource:w,mapOptions:O});return E(()=>{S.current=x,A.current=P,_.current=M}),E(()=>{if(!m.current)return;const{sceneDef:d,geoConfig:i,staticTransform:F,tileSource:p,mapOptions:f}=C.current;let y=!1;const u={...d};u.rootLayer={...d.rootLayer};const T=d.rootLayer.children;u.rootLayer.children=T.filter(o=>o?.name?.toString().toLowerCase()!=="areamap"),u.background=void 0,u.staticTransform=F;const z=ee(),U=i.bounds?{bounds:i.bounds,fitBoundsOptions:{padding:i.fitPadding,bearing:i.bearing}}:{center:i.center,zoom:i.zoom},j=J(p.style,p.offline?o=>H(z,o):void 0),t=new k({container:m.current,...U,bearing:i.bearing,pitch:f?.pitch??30,maxPitch:f?.maxPitch??70,minZoom:f?.minZoom,maxZoom:f?.maxZoom,maxBounds:f?.maxBounds,bearingSnap:0,canvasContextAttributes:{antialias:!0}});i.zoomAdjustment&&t.jumpTo({zoom:t.getZoom()+i.zoomAdjustment}),L.current=t,t.once("error",o=>{t.isStyleLoaded()||_.current?.(o?.error??o)});const R=o=>{const s=o?.id;!s||t.hasImage(s)||t.addImage(s,{width:1,height:1,data:new Uint8Array(4)})};t.on("styleimagemissing",R);const Z=Q({requestFrame:()=>t.triggerRepaint()}),B={id:V,type:"custom",renderingMode:"3d",onAdd(o,s){if(y)return;const c=new G({canvas:t.getCanvas(),gl:s});if(y){c.dispose();return}c.init(u),a.current=c,S.current?.(c,t,u,()=>t.triggerRepaint())},render(o,s){if(!a.current||a.current.isDisposed)return;const c=K(s??o);c&&(a.current.render(c),Z(a.current))}},D=()=>{v(t),t.getSource(g)||t.addSource(g,{type:"geojson",data:X}),t.getLayer(MAP_DIM_LAYER_ID)||t.addLayer({id:MAP_DIM_LAYER_ID,type:"fill",source:g,paint:{"fill-color":"#000000","fill-opacity":0,"fill-opacity-transition":{duration:0,delay:0}}}),A.current?.(t),t.addLayer(B)};return t.on("style.load",D),t.setStyle(p.style,j?{transformStyle:j}:void 0),()=>{y=!0,t.off("style.load",D),t.off("styleimagemissing",R),a.current?.dispose(),a.current=null,t.remove(),L.current=null}},[]),N("div",{ref:m,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fpGeo as
|
|
1
|
+
import{fpGeo as f}from"../../../data/fpGeo.js";import u from"../../../store/index.js";import a from"../../../tools/settings.js";import{MAP_DIM_LAYER_ID as s}from"../MaplibreWrapper.js";import{resolveMapTheme as m}from"./map-theme.js";export const LIGHT_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"},DARK_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"};const c=12;export const DEFAULT_MAP_OPTIONS={pitch:30,maxPitch:70,minZoom:c},MAP_2D_OPTIONS={pitch:0,maxPitch:0,minZoom:c};export function applyMapDimValue(t,e){t?.getLayer(s)&&(t.setPaintProperty(s,"fill-opacity",p(e)),t.triggerRepaint())}function p(t){return Math.min(Math.max(t,0),1)}export function applyMapOptions(t,e,n=!1){if(!t)return;t.setMinZoom(e.minZoom??null),t.setMaxZoom(e.maxZoom??null),t.setMaxBounds(e.maxBounds??null);const o=e.pitch,r=e.maxPitch,l=t.getPitch(),i=!!(n&&o!=null&&r!=null&&r<l);r!=null&&!i&&t.setMaxPitch(e.maxPitch),!(o==null||l===o)&&(n?(t.easeTo({pitch:o,duration:300}),i&&t.once("moveend",()=>t.setMaxPitch(r))):t.jumpTo({pitch:o}))}export function getTileSource(){const t=u.fp?.maplibre??window.__efpMaplibre;return t?.style?{style:t.style,offline:t.offline}:t?.styleUrl?{style:t.styleUrl,offline:t.offline}:m(f?.properties?.config?.style,a.backgroundColor)==="dark"?DARK_TILE_SOURCE:LIGHT_TILE_SOURCE}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type Protocol, type RangeResponse, type Source } from 'pmtiles';
|
|
2
|
+
/**
|
|
3
|
+
* A PMTiles source that also works against hosts which accept a `Range` header
|
|
4
|
+
* and then answer `200` with something other than the requested slice.
|
|
5
|
+
*
|
|
6
|
+
* The Android SDK serves offline archives through `WebViewAssetLoader`, whose
|
|
7
|
+
* path handlers never see request headers: Chromium applies the range's start
|
|
8
|
+
* offset to the file stream and then streams to EOF, answering `200` with a
|
|
9
|
+
* `Content-Length` that merely echoes the request. PMTiles' own guard compares
|
|
10
|
+
* that header against the requested length and so lets it through — every tile
|
|
11
|
+
* read then silently receives the rest of the archive instead of one tile,
|
|
12
|
+
* which decodes into a mostly blank basemap and no error anywhere.
|
|
13
|
+
*
|
|
14
|
+
* So probe once, at offset 0, and decide from the status:
|
|
15
|
+
*
|
|
16
|
+
* - `206` — a well-behaved host. Everything is delegated to {@link FetchSource},
|
|
17
|
+
* which keeps its 416 retry and ETag-mismatch handling intact.
|
|
18
|
+
* - `200` — the host ignored the range, which means the body it just returned
|
|
19
|
+
* *is* the archive from byte 0. Keep it and slice locally.
|
|
20
|
+
*
|
|
21
|
+
* The body is held as a `Blob` rather than an `ArrayBuffer` so the browser can
|
|
22
|
+
* back it with a temp file instead of the JS heap — an offline basemap runs to
|
|
23
|
+
* tens of megabytes and the SDK still has to survive older Android WebViews.
|
|
24
|
+
*/
|
|
25
|
+
export declare class RangeTolerantSource implements Source {
|
|
26
|
+
private readonly url;
|
|
27
|
+
private readonly ranged;
|
|
28
|
+
/** Memoised probe: the whole archive, or `null` when ranges are honoured. */
|
|
29
|
+
private archive;
|
|
30
|
+
constructor(url: string);
|
|
31
|
+
getKey(): string;
|
|
32
|
+
getBytes(offset: number, length: number, signal?: AbortSignal, etag?: string): Promise<RangeResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Read the head of the archive and work out which kind of host this is.
|
|
35
|
+
*
|
|
36
|
+
* The probe deliberately ignores the caller's `AbortSignal`. It is memoised
|
|
37
|
+
* for the source's lifetime, so a first tile that gets cancelled mid-flight
|
|
38
|
+
* must not leave every later read awaiting a rejected promise.
|
|
39
|
+
*/
|
|
40
|
+
private probe;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Point the protocol at {@link RangeTolerantSource} for one archive URL.
|
|
44
|
+
*
|
|
45
|
+
* Registering ahead of the first tile request is what makes this take effect:
|
|
46
|
+
* `Protocol` creates a plain {@link FetchSource} for any `pmtiles://` URL it
|
|
47
|
+
* has not already been given an instance for.
|
|
48
|
+
*
|
|
49
|
+
* Only string-URL styles are covered. An inline style object carries absolute
|
|
50
|
+
* URLs the SDK never resolves, so its PMTiles sources keep the stock source.
|
|
51
|
+
*/
|
|
52
|
+
export declare function registerPmtilesArchive(protocol: Protocol, url: string): void;
|
|
53
|
+
//# sourceMappingURL=pmtiles-range-fallback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FetchSource as s,PMTiles as u}from"pmtiles";const i=16384;export class RangeTolerantSource{constructor(r){this.url=r,this.ranged=new s(r)}getKey(){return this.url}async getBytes(r,n,t,o){this.archive||(this.archive=this.probe());const a=await this.archive;return a?(c(t),{data:await h(a.slice(r,r+n))}):this.ranged.getBytes(r,n,t,o)}async probe(){let r;try{r=await fetch(this.url,{headers:{Range:`bytes=0-${i-1}`}})}catch{return null}if(r.status!==200)return null;const n=await r.blob();return n.size===i?null:n}}export function registerPmtilesArchive(e,r){e.get(r)||e.add(new u(new RangeTolerantSource(r)))}function c(e){if(e?.aborted)throw e.reason??new DOMException("The operation was aborted.","AbortError")}async function h(e){return typeof e.arrayBuffer=="function"?e.arrayBuffer():new Promise((r,n)=>{const t=new FileReader;t.onload=()=>r(t.result),t.onerror=()=>n(t.error),t.readAsArrayBuffer(e)})}
|
|
@@ -11,5 +11,5 @@ import { type StyleSpecification, type TransformStyleFunction } from 'maplibre-g
|
|
|
11
11
|
* Inline style objects have no style URL to resolve against; callers must pass
|
|
12
12
|
* already-absolute internals for those.
|
|
13
13
|
*/
|
|
14
|
-
export declare function createStyleTransform(style: string | StyleSpecification): TransformStyleFunction | undefined;
|
|
14
|
+
export declare function createStyleTransform(style: string | StyleSpecification, onPmtilesArchive?: (url: string) => void): TransformStyleFunction | undefined;
|
|
15
15
|
//# sourceMappingURL=resolve-map-style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function createStyleTransform(
|
|
1
|
+
export function createStyleTransform(l,p){if(typeof l!="string")return;const y=new URL(l,window.location.href).href,o=i=>new URL(i,y).href.replace(/%7B/g,"{").replace(/%7D/g,"}"),u=i=>{if(!i.startsWith("pmtiles://"))return o(i);const n=o(i.slice(10));return p?.(n),`pmtiles://${n}`};return(i,n)=>{const e={...n};typeof e.sprite=="string"?e.sprite=o(e.sprite):Array.isArray(e.sprite)&&(e.sprite=e.sprite.map(r=>{if(!r||typeof r!="object")return r;const t=r;return typeof t.url!="string"?r:{...t,url:o(t.url)}})),typeof e.glyphs=="string"&&(e.glyphs=o(e.glyphs));const c=e.sources;if(c){e.sources={...c};for(const[r,t]of Object.entries(c)){if(!t||typeof t!="object")continue;const s={...t};typeof s.url=="string"&&(s.url=u(s.url)),Array.isArray(s.tiles)&&(s.tiles=s.tiles.map(f=>typeof f=="string"?u(f):f)),e.sources[r]=s}}return e}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as n}from"tslib";import{Box as k,boxContainsPoint as F,pointDistance as L}from"@expofp/geometry";import{action as f,computed as b,observable as u}from"mobx";import{getName as G}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as T,ORIENTATION_GRANTED_KEY as B}from"../constants";import E from"../data";import{fpGeo as P}from"../data/fpGeo";import{getLayerSvg as U,svgArea as h}from"../data/svg";import{GaEventActions as $,sendEventToGa as V}from"../tools/gtag";import w from"../tools/logger";import{areLayersEnabled as K}from"../utils/areLayersEnabled";import{calcSpeed as D}from"../utils/calcSpeed";import{calcTravelTime as A}from"../utils/calcTravelTime";import{calculateRelativeBearing as W,convertGpsToLocal as I,isValidPointCoords as g}from"../utils/gps";import{boothToEndpoint as C,buildRoute as Z,CURRENT_LOCATION_NAME as q,CURRENT_POSITION_POINT_ID as j,isWayfindingReady as X,KIOSK_ANCHOR_POINT_ID as Y,toArbitraryPoint as M}from"../wayfinding";import c,{layersStore as R,uiState as p}from".";import{BoothBase as y}from"./BoothStore";import{LayersMode as H}from"./LayerStore";import{revealLayer as N}from"./reveal-layer.js";function m(o){return typeof o=="string"?Number(o.replace(",",".")):o}export default class i{constructor(e){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=T,this.isGpsTrackingEnabled=!0,this.rootStore=e,this.focusEnabled=!window.location.search}get canFindLocation(){return!!p.kioskData||!!this.currentPosition}selectRoute(e,t=!0,r=!1){if(t&&(p.list={type:"search",text:"",focused:!1}),e&&!e.from&&e.to){const s=this.resolveFallbackFrom();s&&(e=new Route(s,e.to,e.waypoints))}e?.from&&e?.to&&e.from===e.to&&(e=null);const l=[];e?.from&&e?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),e?.from instanceof y&&e.from.visible&&l.push(e.from),e?.to instanceof y&&e.to.visible&&(this.tempToBooth=null,l.push(e.to)),!e&&c.fp.onDirection&&c.fp.onDirection(null);const a=()=>{if(this.rootStore.moveToList(l),p.details=e,e&&(!e.from||!e.to)&&c.showOverlay(),e?.to&&e?.from){const s=J(e.from);s&&this.rootStore.layerStore.updateVisibility(s,!0)}if(!this.currentRouteLayer){const s=O(this.rootStore.layerStore,e?.from),d=O(this.rootStore.layerStore,e?.to);s?this.currentRouteLayer=s:d&&(this.currentRouteLayer=d)}t&&e?.from&&e?.to&&V($.ClickDirections,`${e?.from?"From "+e.from.name:""} ${e?.to?"To "+e.to.name:""}`)};r?a():setTimeout(a,200)}rebuildRouteFromPosition(e){const t=p.selectedRoute;t?.to&&this.selectRoute(new Route(e,t.to,t.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return M(this.currentPosition,q,j);const e=p.kioskData;return e?M({x:e.x,y:e.y,z:e.z??void 0},G(),Y):null}setStartPoint(e){const t=p.selectedRoute;if(t?.to&&!t?.from&&e){const r=new Route(e,t.to,t.waypoints);this.selectRoute(r)}}get pathLayers(){return c.routeStore.routeLines?.map(e=>e.p0.layer)?.filter((e,t,r)=>r.indexOf(e)===t).map((e,t)=>({id:t+1,layer:c.layerStore.findLayer(e)}))}getNearestBooth(e){if(!e)return null;const t=this.rootStore.layerStore.findLayer(e.z),r=P?.properties.config,l=!!(e.lat&&e.lng),a=r&&l?I(e,r):e;return!a||!g(a.x)||!g(a.y)?null:this.rootStore.boothStore.booths.filter(s=>R.mode===H.Default||!t?s.visible&&s.rect:s.rect&&(typeof e.z!="number"&&!e.z&&s.visible||t.name===s.layer?.name)).sort((s,d)=>L(a,s.rect.center)-L(a,d.rect.center))[0]||null}setMarkers(e){this.markersData.markers=(e?.markers??[]).map(Q),this.markersData.icons=e?.icons??[]}selectMarker(e,t){const r=this.markersData.markers.find(a=>a.id===e);this.markersData.markers.forEach(a=>a.active=!1),r&&(r.active=!0);const l=c.layerStore.findLayer(r?.z);if(t&&r){const a=c.rendererService.renderer;return l&&!l?.visible&&R.updateVisibility(l,!0),a?a.controls.panTo(r.x,r.y):(w.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(e=>e.active)}get layers(){const e=[];return c.routeStore.routeLines?.map(t=>t.p0.layer).forEach(t=>{e.indexOf(t)===-1&&e.push(t)}),e.map(t=>c.layerStore.layers.find(r=>r.name===t)).filter(t=>!!t)}clickRoute(e,t){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(e,t))}selectCurrentPosition(e,t=!0,r){clearTimeout(this.cpTimeout),e&&(e.x=m(e.x),e.y=m(e.y),e.lat!==void 0&&(e.lat=m(e.lat)),e.lng!==void 0&&(e.lng=m(e.lng)),K()||(e.z=void 0));const l=t&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=t&&!l&&(this.focusEnabled||this.prevZ!=e?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=e?.z?.toString()??null,this.iconType=r?1:0;const s=e?ee(e):null;if(!e||!s){this.currentPosition=null;return}const d=c.layerStore.findLayer(e.z),x=new CurrentPosition(s.x,s.y,d?.name||this.currentRouteLayer?.name,W(s),e.lat,e.lng);let S=!this.routeLines?.length;d&&this.routeLines?.length&&(S=!!this.routeLines.find(v=>v.p0.layer===d.name||v.p1.layer===d.name));const _=a&&S;this.currentPosition=x,_&&this.focusOnPosition(x,d),this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;const e=this.currentPosition??p.kioskData;e&&(this.currentPosition&&localStorage.getItem(B)==="false"&&(c.routeStore.requestCompass=!0),this.pendingReveal?.(),this.pendingReveal=N({layer:c.layerStore.findLayer(e.z),show:t=>R.updateVisibility(t,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}p.moveToRect=this.findLocationRect(e)}}))}findLocationRect(e){const t=k.fromCenter(e,{x:100,y:100});if(t.intersects(h))return t;const r=Math.max(h.min.x,Math.min(e.x,h.max.x)),l=Math.max(h.min.y,Math.min(e.y,h.max.y)),a=Math.min(h.size.width,h.size.height)*.3,s=k.fromCenter({x:r,y:l},{x:a,y:a}).intersection(h);return s?k.fromUnion(t,s):t}focusOnPosition(e,t){this.pendingReveal?.(),this.pendingReveal=N({layer:t,show:r=>R.updateVisibility(r,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}const r=c.rendererService.renderer;if(!r){w.warn("Renderer is not initialized. Cannot pan to current position.");return}r.controls.panTo(e.x,e.y)}})}get routeInfo(){const e=this.routeDistance,t=this.routeUnits;return e?{distance:`${e}${t}`,units:t,time:A(e,D(t))}:null}updateRoute(e,t){!e?.length&&!this.routeLines.length||(this.routeLines=e,this.updateRoutePoints())}updateRouteDistance(e){if(e==null)return;const t=U(),r=(t.getAttribute("units")||T).toLowerCase?.().trim(),l=t.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(e/(l?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const e=p.selectedRoute,t=this.routeDistance,r=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:z(e?.from??null),to:z(e?.to??null),lines:this.routeLines,distance:t==null?"":`${t}${r}`,units:r,time:A(t??0,D(r))})},200)}checkRoutes(){if(!X()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const e=c.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let t=0;t<e.length;t++){const r=e[t];for(let l=t+1;l<e.length;l++){const a=e[l];Z(C(r),C(a)).lines.length||console.warn(`No route found from ${r.name} to ${a.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(e){this.isGpsTrackingEnabled=e}get gpsEnabled(){return E.autoTrackingGps&&this.isGpsTrackingEnabled&&!E.enableIPS}setOnlyAccessible(e){this.onlyAccessible=e}}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([b],i.prototype,"canFindLocation",null),n([f],i.prototype,"selectRoute",null),n([f],i.prototype,"rebuildRouteFromPosition",null),n([f],i.prototype,"setStartPoint",null),n([b({keepAlive:!0})],i.prototype,"pathLayers",null),n([f],i.prototype,"setMarkers",null),n([f],i.prototype,"selectMarker",null),n([b({keepAlive:!0})],i.prototype,"selectedMarkers",null),n([b({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([b],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([b({keepAlive:!0})],i.prototype,"gpsEnabled",null),n([f],i.prototype,"setOnlyAccessible",null);function J(o){if(o)return o instanceof y?o.layer?.name:o.layer}function O(o,e){return e?e instanceof y?e.layer??null:o.findLayer(e.layer):null}function Q(o){return{...o,x:m(o.x),y:m(o.y),lat:o.lat===void 0?void 0:m(o.lat),lng:o.lng===void 0?void 0:m(o.lng)}}function ee(o){const e=P?.properties.config??null;let t=null;return e&&F({min:e.p0,max:e.p2},o)?t={...o}:e&&g(o.lat)&&g(o.lng)?t=I(o,e):e||(t=o),t||null}export function findBooth(o){return c.boothStore.findBooth(o)||c.exhibitorStore.findExhibitor(o)?.booths[0]}export function findEntityByExternalId(o){const e=c.boothStore.boothByExternalId.get(o);if(e)return{type:"booth",entity:e};const t=c.exhibitorStore.exhibitorByExternalId.get(o);if(t)return{type:"exhibitor",entity:t}}export function separateExternalIds(o){const e=[],t=[];for(const r of o){const l=findEntityByExternalId(r);l&&(l.type==="booth"?e.push(r):t.push(r))}return{boothExternalIds:e,exhibitorExternalIds:t}}export function extractRoute(o,e,t){return new Route(findBooth(o)??null,findBooth(e)??null,t?.map(r=>findBooth(r)).filter(r=>!!r))}export class Route{constructor(e,t,r){this.from=e,this.to=t,this.waypoints=r;const l=e instanceof y?e.id:void 0,a=t instanceof y?t.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(e,t,r,l,a,s){this.x=e,this.y=t,this.z=r,this.angle=l,this.lat=a,this.lng=s}}
|
|
1
|
+
import{__decorate as n}from"tslib";import{Box as k,boxContainsPoint as F,pointDistance as L}from"@expofp/geometry";import{action as f,computed as g,observable as u}from"mobx";import{getName as G}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as T,ORIENTATION_GRANTED_KEY as B}from"../constants";import E from"../data";import{fpGeo as P}from"../data/fpGeo";import{getLayerSvg as U,svgArea as h}from"../data/svg";import{GaEventActions as $,sendEventToGa as V}from"../tools/gtag";import w from"../tools/logger";import{areLayersEnabled as K}from"../utils/areLayersEnabled";import{calcSpeed as D}from"../utils/calcSpeed";import{calcTravelTime as A}from"../utils/calcTravelTime";import{calculateRelativeBearing as W,convertGpsToLocal as I,isValidPointCoords as b}from"../utils/gps";import{boothToEndpoint as C,buildRoute as Z,CURRENT_LOCATION_NAME as q,CURRENT_POSITION_POINT_ID as j,isWayfindingReady as X,KIOSK_ANCHOR_POINT_ID as Y,toArbitraryPoint as M}from"../wayfinding";import c,{layersStore as R,uiState as p}from".";import{BoothBase as y}from"./BoothStore";import{LayersMode as H}from"./LayerStore";import{revealLayer as N}from"./reveal-layer.js";function m(o){return typeof o=="string"?Number(o.replace(",",".")):o}export default class i{constructor(e){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=T,this.isGpsTrackingEnabled=!0,this.rootStore=e,this.focusEnabled=!window.location.search}get canFindLocation(){return!!p.kioskData||!!this.currentPosition}selectRoute(e,t=!0,r=!1){if(t&&(p.list={type:"search",text:"",focused:!1}),e&&!e.from&&e.to){const s=this.resolveFallbackFrom();s&&(e=new Route(s,e.to,e.waypoints))}e?.from&&e?.to&&e.from===e.to&&(e=null);const l=[];e?.from&&e?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),e?.from instanceof y&&e.from.visible&&l.push(e.from),e?.to instanceof y&&e.to.visible&&(this.tempToBooth=null,l.push(e.to)),!e&&c.fp.onDirection&&c.fp.onDirection(null);const a=()=>{if(this.rootStore.moveToList(l),p.details=e,e&&(!e.from||!e.to)&&c.showOverlay(),e?.to&&e?.from){const s=J(e.from);s&&this.rootStore.layerStore.updateVisibility(s,!0)}if(!this.currentRouteLayer){const s=O(this.rootStore.layerStore,e?.from),d=O(this.rootStore.layerStore,e?.to);s?this.currentRouteLayer=s:d&&(this.currentRouteLayer=d)}t&&e?.from&&e?.to&&V($.ClickDirections,`${e?.from?"From "+e.from.name:""} ${e?.to?"To "+e.to.name:""}`)};r?a():setTimeout(a,200)}rebuildRouteFromPosition(e){const t=p.selectedRoute;t?.to&&this.selectRoute(new Route(e,t.to,t.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return M(this.currentPosition,q,j);const e=p.kioskData;return e?M({x:e.x,y:e.y,z:e.z??void 0},G(),Y):null}setStartPoint(e){const t=p.selectedRoute;if(t?.to&&!t?.from&&e){const r=new Route(e,t.to,t.waypoints);this.selectRoute(r)}}get pathLayers(){return c.routeStore.routeLines?.map(e=>e.p0.layer)?.filter((e,t,r)=>r.indexOf(e)===t).map((e,t)=>({id:t+1,layer:c.layerStore.findLayer(e)}))}getNearestBooth(e){if(!e)return null;const t=this.rootStore.layerStore.findLayer(e.z),r=P?.properties.config,l=!!(e.lat&&e.lng),a=r&&l?I(e,r):e;return!a||!b(a.x)||!b(a.y)?null:this.rootStore.boothStore.booths.filter(s=>R.mode===H.Default||!t?s.visible&&s.rect:s.rect&&(typeof e.z!="number"&&!e.z&&s.visible||t.name===s.layer?.name)).sort((s,d)=>L(a,s.rect.center)-L(a,d.rect.center))[0]||null}setMarkers(e){this.markersData.markers=(e?.markers??[]).map(Q),this.markersData.icons=e?.icons??[]}selectMarker(e,t){const r=this.markersData.markers.find(a=>a.id===e);this.markersData.markers.forEach(a=>a.active=!1),r&&(r.active=!0);const l=c.layerStore.findLayer(r?.z);if(t&&r){const a=c.rendererService.renderer;return l&&!l?.visible&&R.updateVisibility(l,!0),a?a.controls.panTo(r.x,r.y):(w.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(e=>e.active)}get layers(){const e=[];return c.routeStore.routeLines?.map(t=>t.p0.layer).forEach(t=>{e.indexOf(t)===-1&&e.push(t)}),e.map(t=>c.layerStore.layers.find(r=>r.name===t)).filter(t=>!!t)}clickRoute(e,t){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(e,t))}selectCurrentPosition(e,t=!0,r){clearTimeout(this.cpTimeout),e&&(e.x=m(e.x),e.y=m(e.y),e.lat!==void 0&&(e.lat=m(e.lat)),e.lng!==void 0&&(e.lng=m(e.lng)),K()||(e.z=void 0));const l=t&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=t&&!l&&(this.focusEnabled||this.prevZ!=e?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=e?.z?.toString()??null,this.iconType=r?1:0;const s=e?ee(e):null;if(!e||!s){this.currentPosition=null;return}const d=c.layerStore.findLayer(e.z),x=new CurrentPosition(s.x,s.y,d?.name||this.currentRouteLayer?.name,W(s),e.lat,e.lng);let S=!this.routeLines?.length;d&&this.routeLines?.length&&(S=!!this.routeLines.find(v=>v.p0.layer===d.name||v.p1.layer===d.name));const _=a&&S;this.currentPosition=x,_&&this.focusOnPosition(x,d),this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;const e=this.currentPosition??p.kioskData;e&&(this.currentPosition&&localStorage.getItem(B)==="false"&&(c.routeStore.requestCompass=!0),this.pendingReveal?.(),this.pendingReveal=N({layer:c.layerStore.findLayer(e.z),show:t=>R.updateVisibility(t,!0),then:()=>{p.moveToRect=this.findLocationRect(e)}}))}findLocationRect(e){const t=k.fromCenter(e,{x:100,y:100});if(t.intersects(h))return t;const r=Math.max(h.min.x,Math.min(e.x,h.max.x)),l=Math.max(h.min.y,Math.min(e.y,h.max.y)),a=Math.min(h.size.width,h.size.height)*.3,s=k.fromCenter({x:r,y:l},{x:a,y:a}).intersection(h);return s?k.fromUnion(t,s):t}focusOnPosition(e,t){this.pendingReveal?.(),this.pendingReveal=N({layer:t,show:r=>R.updateVisibility(r,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}const r=c.rendererService.renderer;if(!r){w.warn("Renderer is not initialized. Cannot pan to current position.");return}r.controls.panTo(e.x,e.y)}})}get routeInfo(){const e=this.routeDistance,t=this.routeUnits;return e?{distance:`${e}${t}`,units:t,time:A(e,D(t))}:null}updateRoute(e,t){!e?.length&&!this.routeLines.length||(this.routeLines=e,this.updateRoutePoints())}updateRouteDistance(e){if(e==null)return;const t=U(),r=(t.getAttribute("units")||T).toLowerCase?.().trim(),l=t.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(e/(l?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const e=p.selectedRoute,t=this.routeDistance,r=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:z(e?.from??null),to:z(e?.to??null),lines:this.routeLines,distance:t==null?"":`${t}${r}`,units:r,time:A(t??0,D(r))})},200)}checkRoutes(){if(!X()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const e=c.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let t=0;t<e.length;t++){const r=e[t];for(let l=t+1;l<e.length;l++){const a=e[l];Z(C(r),C(a)).lines.length||console.warn(`No route found from ${r.name} to ${a.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(e){this.isGpsTrackingEnabled=e}get gpsEnabled(){return E.autoTrackingGps&&this.isGpsTrackingEnabled&&!E.enableIPS}setOnlyAccessible(e){this.onlyAccessible=e}}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 J(o){if(o)return o instanceof y?o.layer?.name:o.layer}function O(o,e){return e?e instanceof y?e.layer??null:o.findLayer(e.layer):null}function Q(o){return{...o,x:m(o.x),y:m(o.y),lat:o.lat===void 0?void 0:m(o.lat),lng:o.lng===void 0?void 0:m(o.lng)}}function ee(o){const e=P?.properties.config??null;let t=null;return e&&F({min:e.p0,max:e.p2},o)?t={...o}:e&&b(o.lat)&&b(o.lng)?t=I(o,e):e||(t=o),t||null}export function findBooth(o){return c.boothStore.findBooth(o)||c.exhibitorStore.findExhibitor(o)?.booths[0]}export function findEntityByExternalId(o){const e=c.boothStore.boothByExternalId.get(o);if(e)return{type:"booth",entity:e};const t=c.exhibitorStore.exhibitorByExternalId.get(o);if(t)return{type:"exhibitor",entity:t}}export function separateExternalIds(o){const e=[],t=[];for(const r of o){const l=findEntityByExternalId(r);l&&(l.type==="booth"?e.push(r):t.push(r))}return{boothExternalIds:e,exhibitorExternalIds:t}}export function extractRoute(o,e,t){return new Route(findBooth(o)??null,findBooth(e)??null,t?.map(r=>findBooth(r)).filter(r=>!!r))}export class Route{constructor(e,t,r){this.from=e,this.to=t,this.waypoints=r;const l=e instanceof y?e.id:void 0,a=t instanceof y?t.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(e,t,r,l,a,s){this.x=e,this.y=t,this.z=r,this.angle=l,this.lat=a,this.lng=s}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.24.
|
|
3
|
+
"version": "3.24.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"tslib": "^2.3.0",
|
|
71
71
|
"uuid": "^9.0.1",
|
|
72
72
|
"zod": "4.4.3",
|
|
73
|
-
"@expofp/config": "3.24.
|
|
74
|
-
"@expofp/debug": "3.24.
|
|
75
|
-
"@expofp/geometry": "3.24.
|
|
76
|
-
"@expofp/resolve": "3.24.
|
|
77
|
-
"@expofp/schema": "3.24.
|
|
78
|
-
"@expofp/ui": "3.24.
|
|
79
|
-
"@expofp/utils": "3.24.
|
|
80
|
-
"@expofp/wayfinding": "3.24.
|
|
73
|
+
"@expofp/config": "3.24.3",
|
|
74
|
+
"@expofp/debug": "3.24.3",
|
|
75
|
+
"@expofp/geometry": "3.24.3",
|
|
76
|
+
"@expofp/resolve": "3.24.3",
|
|
77
|
+
"@expofp/schema": "3.24.3",
|
|
78
|
+
"@expofp/ui": "3.24.3",
|
|
79
|
+
"@expofp/utils": "3.24.3",
|
|
80
|
+
"@expofp/wayfinding": "3.24.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|