Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@meridian/web-sdk

Package Overview
Dependencies
Maintainers
5
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meridian/web-sdk - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# v0.7.6 (2020-05-15)
- Adds descriptions to examples page
# v0.7.5 (2020-05-11)

@@ -2,0 +6,0 @@

4

dist/web-sdk.js
!function(e,t){for(var o in t)e[o]=t[o]}(exports,function(e){var t={};function o(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(a,i,function(t){return e[t]}.bind(null,i));return a},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=5)}([function(e,t){e.exports=require("preact")},function(e,t,o){"use strict";var a,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(o(20));t.theme={fontSizeSmallest:"12px",fontSizeSmaller:"14px",fontSize:"16px",fontSizeBigger:"18px",textColor:"#1b1b1b",black:"#000",white:"#fff",almostWhite:"#fafafa",textColorBluish:"hsl(208, 17%, 42%)",brandOrange:"#ff8300",brandBlue:"hsl(203, 100%, 23%)",brandBrightBlue:"hsl(207, 65%, 46%)",buttonActiveColor:"hsl(201, 55%, 94%)",buttonHoverColor:"hsl(200, 60%, 97%)",buttonSeparatorColor:"#f0f0f0",borderColor:"#ebeef2",borderColorDarker:"#dfe1e5",borderRadius:6},t.mixins={flexRow:{display:"flex",flexDirection:"row"},flexColumn:{display:"flex",flexDirection:"column"},overflowEllipses:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},textStrokeWhite:{WebkitFontSmoothing:"antialiased",textShadow:"\n rgba(255, 255, 255, 0.75) 0 0 1px,\n rgba(255, 255, 255, 0.75) 0 0 1px,\n rgba(255, 255, 255, 0.75) 0 0 1px,\n rgba(255, 255, 255, 0.75) 0 0 1px\n "},buttonReset:{padding:0,margin:0,font:"inherit",border:0,borderRadius:0,background:"transparent",color:"inherit","&::-moz-focus-inner":{border:0}},buttonHoverActive:{"&:hover":{background:t.theme.buttonHoverColor},"&:active":{background:t.theme.buttonActiveColor}},borderBox:{boxSizing:"border-box"},focusRing:{"&:focus":{outline:0,boxShadow:`inset 0 0 0 1px ${t.theme.brandBrightBlue}`}},focusRingMenuItem:{"&:focus":{outline:0,boxShadow:`\n inset 0 0 0 1px white,\n inset 0 0 0 2px ${t.theme.brandBrightBlue}\n `}},focusOutline:{"&:focus":{outline:0,boxShadow:"0 0 0 2px currentcolor"}},focusDarken:{"&:focus":{outline:0,boxShadow:"inset 0 0 0 9999px rgba(0, 0, 0, 0.1)"}},focusNone:{"&:focus":{outline:"none"}},shadow:{boxShadow:"0 0 3px rgba(0, 0, 0, 0.25)"},rounded:{borderRadius:t.theme.borderRadius},maxRounded:{borderRadius:99999},paddingMedium:{padding:"20px"},pointer:{cursor:"pointer","&:disabled":{cursor:"default"}}};const s="undefined"!=typeof global?global:{};a=r.default(s,{key:"meridian--private-"}),t.cx=a.cx,t.keyframes=a.keyframes,t.css=a.css},function(e,t){e.exports=require("prop-types")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deprecated=function(...e){console.warn("[deprecated]",...e)};const a="https://files.meridianapps.com/meridian-web-sdk-assets/0.2.0";function i(e){return`${a}/${e}`}t.STRINGS={enDash:"–",unnamedBuilding:"Unassigned",noResultsFound:"No results found."},t.objectWithoutKey=function(e,t){const o=Object.assign({},e);return delete o[t],o},t.createSearchMatcher=function(e){return t=>t.toLowerCase().indexOf(e.toLowerCase().trim())>=0},t.getTagLabels=function(e){return(e.tags||[]).map(e=>e.name)},t.requiredParam=function(e,t){console.error(`${e}: argument \`${t}\` is required`)},t.asyncClientCall=function(e,...t){setTimeout(e,0,...t)},t.getAssetURL=i,t.getDirections=function({api:e,locationID:t,fromMapID:o,fromPlacemarkID:a,toPlacemarkID:i}){return e.axios.get(`/locations/${t}/directions`,{params:{from_map_id:o,from_placemark_id:a,to_placemark_ids:i}})},t.getPlacemarkIconURL=function(e){return i(`placemarks/${"placemark-"+e.replace(/_/g,"-")}.svg`)},t.fetchAllPaginatedData=async function(e,t){const{data:o}=await e.axios.get(t),a=o.results;let i=o.next;for(;i;){const{data:t}=await e.axios.get(i);a.push(...t.results),i=t.next}return a},t.validateEnvironment=function(e){return"staging"===e||"production"===e||"eu"===e||"development"===e||"devCloud"===e},t.fetchTagsByFloor=async function(e){return(await e.api.axios.post(t.envToTagTrackerRestURL[e.api.environment],{floor_id:e.floorID,location_id:e.locationID})).data.asset_updates},t.fetchTagsByLocation=async function(e){return(await e.api.axios.post(t.envToTagTrackerRestURL[e.api.environment],{location_id:e.locationID})).data.asset_updates},t.envToTagTrackerRestURL={development:"http://localhost:8091/api/v1/track/assets",devCloud:"https://dev-tags.meridianapps.com/api/v1/track/assets",production:"https://tags.meridianapps.com/api/v1/track/assets",eu:"https://tags-eu.meridianapps.com/api/v1/track/assets",staging:"https://staging-tags.meridianapps.com/api/v1/track/assets"},t.envToTagTrackerStreamingURL={development:"ws://localhost:8091/streams/v1/track/assets",devCloud:"wss://dev-tags.meridianapps.com/streams/v1/track/assets",production:"wss://tags.meridianapps.com/streams/v1/track/assets",eu:"wss://tags-eu.meridianapps.com/streams/v1/track/assets",staging:"wss://staging-tags.meridianapps.com/streams/v1/track/assets"},t.envToEditorRestURL={development:"http://localhost:8091/websdk/api",devCloud:"https://dev-edit.meridianapps.com/websdk/api",production:"https://edit.meridianapps.com/websdk/api",eu:"https://edit-eu.meridianapps.com/websdk/api",staging:"https://staging-edit.meridianapps.com/websdk/api"}},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=a(o(8)),l=s.css(s.mixins.shadow,s.mixins.rounded,{label:"overlay",overflow:"hidden",display:"flex",flexDirection:"column",background:s.theme.white,color:s.theme.textColor,fill:"#000",position:"absolute",margin:0,left:15,top:15,right:15,maxHeight:"calc(100vh - 30px)",zIndex:2,maxWidth:400}),c=s.css(l,{marginRight:"auto"}),d=s.css(l,{marginLeft:"auto"}),u=s.css(s.mixins.buttonReset,s.mixins.buttonHoverActive,s.mixins.focusRing,{label:"overlay-close",cursor:"pointer",position:"absolute",zIndex:2,top:10,right:10,padding:4,width:32,height:32,fontSize:11,textAlign:"center",background:s.theme.white,color:s.theme.textColor,borderRadius:"100%",fontWeight:"bold",boxShadow:"0 0 2px rgba(0, 0, 0, 0.4)"}),p=({onClick:e})=>i.h("button",{className:u,onClick:e},i.h(n.default,null));p.propTypes={onClick:r.default.func.isRequired};const h=({position:e,onCloseClicked:t,children:o})=>i.h("div",{className:"left"===e?c:d},i.h(p,{onClick:t}),o);h.propTypes={position:r.default.oneOf(["left","right"]).isRequired,children:r.default.any.isRequired,onCloseClicked:r.default.func.isRequired},t.default=h},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});
/*!
* @license
* Copyright 2018 Hewlett Packard Enterprise Development LP
* Copyright 2020 Hewlett Packard Enterprise Development LP
*

@@ -24,5 +24,5 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

*/
const i=o(0),r=a(o(6)),s=a(o(15)),n=a(o(16)),l=o(3),c=o(14),d=()=>o(36);"complete"===document.readyState?setTimeout(d,0):document.addEventListener("DOMContentLoaded",d,!1);const u={api:void 0};t.version="0.7.5",t.restrictedPanZoom=function(e){return e instanceof WheelEvent?e.shiftKey||e.altKey||e.ctrlKey||e.metaKey:!(e instanceof TouchEvent)||e.touches.length>=2},t.init=function(e){e||l.requiredParam("init","options"),e.api||l.requiredParam("init","options.api"),u.api=e.api},t.createMap=function(e,t){e||l.requiredParam("createMap","node"),t||l.requiredParam("createMap","options");let o=null;const a=e=>{o=e},r=(o,{internalUpdate:l=!0}={})=>{t=Object.assign(Object.assign({},t),o),s=i.render(i.h(n.default,Object.assign({api:u.api,update:r},t,{ref:a})),e,s),c.sendAnalyticsCodeEvent({action:"map.update",locationID:t.locationID,onTagsUpdate:Boolean(t.onTagsUpdate),tagsFilter:Boolean(t.tags&&t.tags.filter),placemarksFilter:Boolean(t.placemarks&&t.placemarks.filter),internalUpdate:l})};let s=i.render(i.h(n.default,Object.assign({api:u.api,update:r},t,{ref:a})),e);return c.sendAnalyticsCodeEvent({action:"createMap",locationID:t.locationID,onTagsUpdate:Boolean(t.onTagsUpdate),tagsFilter:Boolean(t.tags&&t.tags.filter),placemarksFilter:Boolean(t.placemarks&&t.placemarks.filter)}),{update:e=>{r(e,{internalUpdate:!1})},zoomToDefault:()=>{var e;null===(e=o)||void 0===e||e.zoomToDefault()},zoomToPoint:e=>{var t;e||l.requiredParam("map.zoomToPoint","options"),void 0===e.x&&l.requiredParam("map.zoomToPoint","options.x"),void 0===e.y&&l.requiredParam("map.zoomToPoint","options.y"),void 0===e.scale&&l.requiredParam("map.zoomToPoint","options.scale"),null===(t=o)||void 0===t||t.zoomToPoint(e.x,e.y,e.scale)}}},t.createAPI=function(e){return l.deprecated("use `new MeridianSDK.API(options)` instead of `MeridianSDK.createAPI(options)`"),e||l.requiredParam("createAPI","options"),new p(e)};class p{constructor(e){e.token||l.requiredParam("API","token"),this.token=e.token,this.environment=e.environment||"production",this.axios=r.default.create({baseURL:l.envToEditorRestURL[this.environment],headers:{Authorization:`Token ${e.token}`}})}openStream(e){e.locationID||l.requiredParam("openStream","locationID"),e.floorID||l.requiredParam("openStream","floorID");const t=new URLSearchParams;t.set("method","POST"),t.set("authorization",`Token ${this.token}`);const o=l.envToTagTrackerStreamingURL[this.environment],a=new s.default(`${o}?${t}`),i={asset_requests:[{resource_type:"FLOOR",location_id:e.locationID,resource_ids:[e.floorID]}]};return l.fetchTagsByFloor({api:this,locationID:e.locationID,floorID:e.floorID}).then(t=>{var o,a;null===(a=(o=e).onInitialTags)||void 0===a||a.call(o,t)}),a.addEventListener("open",()=>{a.send(JSON.stringify(i))}),a.addEventListener("message",t=>{var o,a;const i=JSON.parse(t.data);if(i.error)null===(a=(o=e).onException)||void 0===a||a.call(o,new Error(i.error.message));else{if(!i.result)throw new Error(`Unknown message: ${t.data}`);for(const t of i.result.asset_updates){const o=t.event_type;if("DELETE"===o)e.onTagLeave&&l.asyncClientCall(e.onTagLeave,t);else{if("UPDATE"!==o)throw new Error(`Unknown event type: ${o}`);e.onTagUpdate&&l.asyncClientCall(e.onTagUpdate,t)}}}}),a.addEventListener("error",()=>{var t,o;null===(o=(t=e).onException)||void 0===o||o.call(t,new Error("MeridianSDK.openStream connection error"))}),a.addEventListener("close",()=>{var t,o;null===(o=(t=e).onClose)||void 0===o||o.call(t)}),{close:()=>a.close()}}}t.API=p},function(e,t){e.exports=require("axios")},function(e,t){e.exports=require("lodash.groupby")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0);t.default=()=>a.h("svg",{viewBox:"0 0 36 36"},a.h("path",{d:"M19.41 18l6.36-6.36a1 1 0 0 0-1.41-1.41L18 16.59l-6.36-6.36a1 1 0 0 0-1.41 1.41L16.59 18l-6.36 6.36a1 1 0 1 0 1.41 1.41L18 19.41l6.36 6.36a1 1 0 0 0 1.41-1.41z"}))},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=s.css(s.mixins.buttonReset,s.mixins.rounded,s.mixins.focusRing,{label:"overlay-search-input",flex:"1 1 auto",marginRight:42,fontSize:16,padding:"4px 8px",paddingLeft:30,background:s.theme.borderColor,color:s.theme.black,border:0,"&::placeholder":{color:s.theme.textColorBluish}}),l=s.css({label:"overlay-search-icon",position:"absolute",zIndex:1,fill:s.theme.textColorBluish,width:16,height:16,top:18,left:18}),c=e=>i.h("svg",Object.assign({viewBox:"0 0 15 15"},e),i.h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2454 12.5741L9.55123 8.73956C10.2134 7.80246 10.5682 6.66953 10.5632 5.50756C10.5506 2.47441 8.18614 0.0175744 5.26286 5.57178e-05C3.8639 -0.00651157 2.52051 0.567712 1.53197 1.59481C0.543427 2.6219 -0.0081584 4.01655 9.12228e-05 5.46806C0.0127262 8.50148 2.37737 10.9585 5.30093 10.9761C6.42539 10.9811 7.52128 10.6088 8.42505 9.91456L8.4289 9.91156L12.1197 13.7431C12.3193 13.9603 12.6166 14.0482 12.8966 13.9728C13.1765 13.8973 13.395 13.6704 13.4675 13.3799C13.5399 13.0894 13.455 12.7809 13.2454 12.5741ZM5.29738 9.87819C2.95866 9.86423 1.06697 7.8988 1.05671 5.47219C1.0504 4.31114 1.4917 3.19564 2.28239 2.37403C3.07307 1.55242 4.14751 1.09287 5.26653 1.09769C7.60525 1.11165 9.49694 3.07709 9.5072 5.50369C9.51352 6.66475 9.07221 7.78024 8.28152 8.60186C7.49084 9.42347 6.4164 9.88302 5.29738 9.87819Z",transform:"translate(0.637695)"})),d=s.css({label:"overlay-search-bar",position:"relative",zIndex:1,flex:"0 0 auto",display:"flex",flexDirection:"column",padding:10,height:32});class u extends i.Component{constructor(e){super(e),this.input=null}componentDidMount(){this.input&&this.input.focus()}render(){const{value:e,onChange:t=(()=>{})}=this.props;return i.h("div",{className:d},i.h(c,{className:l}),i.h("input",{value:e,type:"text",placeholder:"Search",className:n,onInput:e=>{t(e.target.value)},ref:e=>{this.input=e}}))}}u.propTypes={value:r.default.string.isRequired,onChange:r.default.func},t.default=u},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0),i=o(1),r=i.keyframes`
const i=o(0),r=a(o(6)),s=a(o(15)),n=a(o(16)),l=o(3),c=o(14),d=()=>o(36);"complete"===document.readyState?setTimeout(d,0):document.addEventListener("DOMContentLoaded",d,!1);const u={api:void 0};t.version="0.7.6",t.restrictedPanZoom=function(e){return e instanceof WheelEvent?e.shiftKey||e.altKey||e.ctrlKey||e.metaKey:!(e instanceof TouchEvent)||e.touches.length>=2},t.init=function(e){e||l.requiredParam("init","options"),e.api||l.requiredParam("init","options.api"),u.api=e.api},t.createMap=function(e,t){e||l.requiredParam("createMap","node"),t||l.requiredParam("createMap","options");let o=null;const a=e=>{o=e},r=(o,{internalUpdate:l=!0}={})=>{t=Object.assign(Object.assign({},t),o),s=i.render(i.h(n.default,Object.assign({api:u.api,update:r},t,{ref:a})),e,s),c.sendAnalyticsCodeEvent({action:"map.update",locationID:t.locationID,onTagsUpdate:Boolean(t.onTagsUpdate),tagsFilter:Boolean(t.tags&&t.tags.filter),placemarksFilter:Boolean(t.placemarks&&t.placemarks.filter),internalUpdate:l})};let s=i.render(i.h(n.default,Object.assign({api:u.api,update:r},t,{ref:a})),e);return c.sendAnalyticsCodeEvent({action:"createMap",locationID:t.locationID,onTagsUpdate:Boolean(t.onTagsUpdate),tagsFilter:Boolean(t.tags&&t.tags.filter),placemarksFilter:Boolean(t.placemarks&&t.placemarks.filter)}),{update:e=>{r(e,{internalUpdate:!1})},zoomToDefault:()=>{var e;null===(e=o)||void 0===e||e.zoomToDefault()},zoomToPoint:e=>{var t;e||l.requiredParam("map.zoomToPoint","options"),void 0===e.x&&l.requiredParam("map.zoomToPoint","options.x"),void 0===e.y&&l.requiredParam("map.zoomToPoint","options.y"),void 0===e.scale&&l.requiredParam("map.zoomToPoint","options.scale"),null===(t=o)||void 0===t||t.zoomToPoint(e.x,e.y,e.scale)}}},t.createAPI=function(e){return l.deprecated("use `new MeridianSDK.API(options)` instead of `MeridianSDK.createAPI(options)`"),e||l.requiredParam("createAPI","options"),new p(e)};class p{constructor(e){e.token||l.requiredParam("API","token"),this.token=e.token,this.environment=e.environment||"production",this.axios=r.default.create({baseURL:l.envToEditorRestURL[this.environment],headers:{Authorization:`Token ${e.token}`}})}openStream(e){e.locationID||l.requiredParam("openStream","locationID"),e.floorID||l.requiredParam("openStream","floorID");const t=new URLSearchParams;t.set("method","POST"),t.set("authorization",`Token ${this.token}`);const o=l.envToTagTrackerStreamingURL[this.environment],a=new s.default(`${o}?${t}`),i={asset_requests:[{resource_type:"FLOOR",location_id:e.locationID,resource_ids:[e.floorID]}]};return l.fetchTagsByFloor({api:this,locationID:e.locationID,floorID:e.floorID}).then(t=>{var o,a;null===(a=(o=e).onInitialTags)||void 0===a||a.call(o,t)}),a.addEventListener("open",()=>{a.send(JSON.stringify(i))}),a.addEventListener("message",t=>{var o,a;const i=JSON.parse(t.data);if(i.error)null===(a=(o=e).onException)||void 0===a||a.call(o,new Error(i.error.message));else{if(!i.result)throw new Error(`Unknown message: ${t.data}`);for(const t of i.result.asset_updates){const o=t.event_type;if("DELETE"===o)e.onTagLeave&&l.asyncClientCall(e.onTagLeave,t);else{if("UPDATE"!==o)throw new Error(`Unknown event type: ${o}`);e.onTagUpdate&&l.asyncClientCall(e.onTagUpdate,t)}}}}),a.addEventListener("error",()=>{var t,o;null===(o=(t=e).onException)||void 0===o||o.call(t,new Error("MeridianSDK.openStream connection error"))}),a.addEventListener("close",()=>{var t,o;null===(o=(t=e).onClose)||void 0===o||o.call(t)}),{close:()=>a.close()}}}t.API=p},function(e,t){e.exports=require("axios")},function(e,t){e.exports=require("lodash.groupby")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0);t.default=()=>a.h("svg",{viewBox:"0 0 36 36"},a.h("path",{d:"M19.41 18l6.36-6.36a1 1 0 0 0-1.41-1.41L18 16.59l-6.36-6.36a1 1 0 0 0-1.41 1.41L16.59 18l-6.36 6.36a1 1 0 1 0 1.41 1.41L18 19.41l6.36 6.36a1 1 0 0 0 1.41-1.41z"}))},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=s.css(s.mixins.buttonReset,s.mixins.rounded,s.mixins.focusRing,{label:"overlay-search-input",flex:"1 1 auto",marginRight:42,fontSize:16,padding:"4px 8px",paddingLeft:30,background:s.theme.borderColor,color:s.theme.black,border:0,"&::placeholder":{color:s.theme.textColorBluish}}),l=s.css({label:"overlay-search-icon",position:"absolute",zIndex:1,fill:s.theme.textColorBluish,width:16,height:16,top:18,left:18}),c=e=>i.h("svg",Object.assign({viewBox:"0 0 15 15"},e),i.h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2454 12.5741L9.55123 8.73956C10.2134 7.80246 10.5682 6.66953 10.5632 5.50756C10.5506 2.47441 8.18614 0.0175744 5.26286 5.57178e-05C3.8639 -0.00651157 2.52051 0.567712 1.53197 1.59481C0.543427 2.6219 -0.0081584 4.01655 9.12228e-05 5.46806C0.0127262 8.50148 2.37737 10.9585 5.30093 10.9761C6.42539 10.9811 7.52128 10.6088 8.42505 9.91456L8.4289 9.91156L12.1197 13.7431C12.3193 13.9603 12.6166 14.0482 12.8966 13.9728C13.1765 13.8973 13.395 13.6704 13.4675 13.3799C13.5399 13.0894 13.455 12.7809 13.2454 12.5741ZM5.29738 9.87819C2.95866 9.86423 1.06697 7.8988 1.05671 5.47219C1.0504 4.31114 1.4917 3.19564 2.28239 2.37403C3.07307 1.55242 4.14751 1.09287 5.26653 1.09769C7.60525 1.11165 9.49694 3.07709 9.5072 5.50369C9.51352 6.66475 9.07221 7.78024 8.28152 8.60186C7.49084 9.42347 6.4164 9.88302 5.29738 9.87819Z",transform:"translate(0.637695)"})),d=s.css({label:"overlay-search-bar",position:"relative",zIndex:1,flex:"0 0 auto",display:"flex",flexDirection:"column",padding:10,height:32});class u extends i.Component{constructor(e){super(e),this.input=null}componentDidMount(){this.input&&this.input.focus()}render(){const{value:e,onChange:t=(()=>{})}=this.props;return i.h("div",{className:d},i.h(c,{className:l}),i.h("input",{value:e,type:"text",placeholder:"Search",className:n,onInput:e=>{t(e.target.value)},ref:e=>{this.input=e}}))}}u.propTypes={value:r.default.string.isRequired,onChange:r.default.func},t.default=u},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0),i=o(1),r=i.keyframes`
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
`,s=i.css({label:"spinner",width:22,height:22,margin:"0 auto",border:"2px rgba(227, 227, 227, 0.9) solid",borderTop:"2px #2e7cbe solid",borderRadius:"50%",animation:`${r} 600ms infinite linear`});t.default=()=>a.h("div",{className:s})},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=s.css(s.mixins.maxRounded,{label:"label",display:"inline-block",padding:"3px 8px",marginBottom:8,marginRight:8,background:"rgba(0, 0, 0, 0.035)",color:"#3b3b3b"}),l=({name:e})=>i.h("div",{className:n},e);l.propTypes={name:r.default.string.isRequired};const c=({align:e,fontSize:t})=>s.css({label:"label-list",fontSize:t,marginTop:8,marginLeft:3,textAlign:e,flex:"1 1 auto"}),d=({align:e,labels:t,fontSize:o=s.theme.fontSize})=>0===t.length?null:i.h("div",{className:c({align:e,fontSize:o})},t.map((e,t)=>i.h(l,{key:t,name:e})));d.propTypes={fontSize:r.default.string,align:r.default.oneOf(["left","right"]).isRequired,labels:r.default.arrayOf(r.default.string).isRequired},t.default=d},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0);t.default=()=>a.h("svg",{width:"72",height:"77",fill:"0",fillOpacity:"1"},a.h("path",{d:"M35.55 76.1a2.55 2.55 0 100-5.1 2.55 2.55 0 000 5.1z",fill:"#F2AF1D"}),a.h("g",{filter:"url(#MeridianWebSDK-IconYouAreHere-Filter)"},a.h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.818 61.526C19.452 59.558 10 48.846 10 35.925 10 21.607 21.607 10 35.925 10 50.243 10 61.85 21.607 61.85 35.925c0 12.92-9.45 23.632-21.816 25.601a.52.52 0 01-.301.079c-1.7 0-4.187 4.495-4.187 4.495s-1.989-3.891-3.728-4.573z",fill:"#F2AF1D"})),a.h("path",{d:"M36.5 23l3.03 9.328h9.81l-7.936 5.765 3.031 9.329-7.935-5.765-7.935 5.765 3.03-9.328-7.934-5.766h9.808L36.5 23z",fill:"#fff"}),a.h("defs",null,a.h("filter",{id:"MeridianWebSDK-IconYouAreHere-Filter",x:"0",y:"0",width:"71.85",height:"76.1","filter-units":"userSpaceOnUse",colorInterpolationFilters:"sRGB"},a.h("fe-flood",{"flood-opacity":"0",result:"BackgroundImageFix"}),a.h("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),a.h("feOffset",null),a.h("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),a.h("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),a.h("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"}))))},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=a(o(31)),n=a(o(32)),l=({selectedItem:e,kind:t,data:o,mapZoomFactor:a,disabled:r,onClick:l=(()=>{}),youAreHerePlacemarkID:c})=>"tag"===t?i.h(s.default,{isSelected:!!e&&e.mac===o.mac,mapZoomFactor:a,data:o,onClick:()=>{l(o)},disabled:r}):"placemark"===t?i.h(n.default,{isSelected:!!e&&e.id===o.id,mapZoomFactor:a,data:o,onClick:()=>{l(o)},disabled:r,youAreHerePlacemarkID:c}):null;l.propTypes={selectedItem:r.default.object,mapZoomFactor:r.default.number.isRequired,kind:r.default.string.isRequired,data:r.default.object.isRequired,onClick:r.default.func,disabled:r.default.bool,youAreHerePlacemarkID:r.default.string},t.default=l},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=a(o(6)),r=o(5),s=window.devicePixelRatio||1,n=window.screen,l=`${n.width*s}x${n.height*s}`;t.sendAnalyticsCodeEvent=async function(e){const{action:t,locationID:o,onTagsUpdate:a=!1,tagsFilter:s=!1,placemarksFilter:n=!1,internalUpdate:c=!1,youAreHerePlacemarkID:d,destinationID:u}=e,p={v:"1",tid:"UA-56747301-5",an:"MeridianSDK",ds:"app",av:r.version,uid:o,cid:o,t:"event",ec:"code",ea:t,ev:1,el:c?"internal":"external",cm1:a?1:0,cm2:s?1:0,cm3:n?1:0,cm4:d,cm5:u,ul:navigator.language,sr:l,aip:1,ua:window.navigator.userAgent,z:Math.random().toString(36).substring(7)};i.default.get("https://www.google-analytics.com/collect",{params:p})}},function(e,t){e.exports=require("reconnecting-websocket")},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(17),n=o(18),l=a(o(19)),c=a(o(21)),d=a(o(22)),u=a(o(23)),p=a(o(24)),h=a(o(25)),f=a(o(27)),m=a(o(28)),g=a(o(29)),b=a(o(33)),v=a(o(34)),k=o(3),y=o(1),x=o(3),I=o(14),D=a(o(35)),C=.5,S=250,w=-1!==window.navigator.userAgent.indexOf("MSIE ")||-1!==window.navigator.userAgent.indexOf("Trident/")||-1!==window.navigator.userAgent.indexOf("Edge/"),M=y.css({label:"map-container",display:"block",position:"relative",borderRadius:"inherit",background:"#fafafa",color:"#000",fontFamily:"inherit",textAlign:"left"}),O=y.css({label:"map-outer",borderRadius:"inherit",display:"block",overflow:"hidden"}),T=y.css({touchAction:"none"});class _ extends i.Component{constructor(e){super(e),this.updateMap=e=>{const{update:t}=this.props;t(e)},this.toggleTagListOverlay=({open:e})=>{this.setState({isTagListOverlayOpen:e})},this.toggleFloorOverlay=({open:e})=>{this.setState({isFloorOverlayOpen:e})},this.toggleErrorOverlay=({open:e,message:t="Unknown"})=>{e?this.setState(e=>({errors:[...e.errors,t],isErrorOverlayOpen:!0})):this.setState({isErrorOverlayOpen:!1,errors:[]})},this.toggleLoadingSpinner=({show:e,source:t="unknown"})=>{const{showLoadingSpinner:o}=this.state;this.setState(o=>({loadingSources:Object.assign(Object.assign({},o.loadingSources),{[t]:e})}),()=>{if(e&&!o)this.setState({showLoadingSpinner:e});else if(!e){const{loadingSources:e}=this.state;Object.keys(e).some(t=>!0===e[t])||this.setState({showLoadingSpinner:!1})}})},this.toggleMapMarkerOverlay=({open:e,selectedItem:t=null})=>{this.setState({isMapMarkerOverlayOpen:e,selectedItem:t})},this.selectFloorByID=e=>{this.updateMap({floorID:e,routeSteps:[]})},this.groupPlacemarksByID=e=>e.map(e=>this.normalizePlacemark(e)).reduce((e,t)=>(e[t.id]=t,e),{}),this.updatePlacemarks=async()=>{const{locationID:e,floorID:t,api:o}=this.props;this.toggleLoadingSpinner({show:!0,source:"placemarks"});const a=`locations/${e}/maps/${t}/placemarks`,i=await x.fetchAllPaginatedData(o,a);if(t===this.props.floorID){const e=this.groupPlacemarksByID(i);this.setState({placemarks:e},()=>{this.toggleLoadingSpinner({show:!1,source:"placemarks"})})}},this.zoomToPoint=(e,t,o)=>{const{width:a,height:i}=this.getMapRefSize(),r=s.zoomIdentity.translate(-o*e+a/2,-o*t+i/2).scale(o);this.mapSelection.transition().duration(S).call(this.zoomD3.transform,r)},this.zoomBy=e=>{this.mapSelection.transition().duration(S).call(this.zoomD3.scaleBy,e)},this.zoomIn=()=>{this.zoomBy(1+C)},this.zoomOut=()=>{this.zoomBy(1-C)},this.onClick=e=>{const t=this.mapRef.isEqualNode(e.target)||this.mapImage.isEqualNode(e.target);this.props.onMapClick&&t?(console.warn("onMapClick() is experimental, please do not use it"),setTimeout(()=>{this.props.onMapClick(e)},0)):t&&this.toggleMapMarkerOverlay({open:!1})},this.onMarkerClick=async e=>{let t=!0;const{onTagClick:o,onPlacemarkClick:a,onMarkerClick:i}=this.props,r=e.event_type?o:a,s=()=>{t=!1};await(async()=>{if(r)try{await r(e,{preventDefault:s})}catch(e){console.error(e)}if(i){console.warn("onMarkerClick() is experimental, please do not use it");try{await i(e,{preventDefault:s})}catch(e){console.error(e)}}})(),t&&this.toggleMapMarkerOverlay({open:!0,selectedItem:e})},this.onDirectionsToHereClicked=async e=>{I.sendAnalyticsCodeEvent({action:"map.directions",locationID:this.props.locationID,youAreHerePlacemarkID:this.props.youAreHerePlacemarkID,destinationID:e.id});const t=await x.getDirections({api:this.props.api,locationID:this.props.locationID,fromMapID:this.props.floorID,fromPlacemarkID:this.props.youAreHerePlacemarkID,toPlacemarkID:e.id});if(t&&t.data){const e=t.data.routes[0].steps.map(e=>e.points);this.setState({routeSteps:e,isMapMarkerOverlayOpen:!1})}},this.state={mapImageURL:null,isFloorOverlayOpen:!1,isTagListOverlayOpen:!1,isMapMarkerOverlayOpen:!1,isErrorOverlayOpen:!1,isPanningOrZooming:!1,showLoadingSpinner:!1,loadingSources:{},errors:[],mapTransform:"",mapZoomFactor:.5,floors:[],placemarks:{},svgURL:null,tagsConnection:null,tagsStatus:"Connecting",selectedItem:null,areTagsLoading:!0,allTagData:[],routeSteps:[]},this.tagsTimeout=null,this.mapSelection=null,this.mapRef=null,this.validateFloorID()}componentDidMount(){const{api:e,locationID:t}=this.props;x.validateEnvironment(e.environment)?t?(this.initializeFloors(),this.updatePlacemarks(),this.initializeTags(),this.fetchMapImageURL()):this.toggleErrorOverlay({open:!0,message:'createMap error: "options.locationID" is required'}):this.toggleErrorOverlay({open:!0,message:`API error: "${e.environment}" is not a valid environment`})}componentDidUpdate(e,t){e.floorID!==this.props.floorID&&(this.zoomToDefault(),this.validateFloorID()),e.floorID===this.props.floorID&&t.floors===this.state.floors||(this.setState({mapImageURL:null,placemarks:{}}),this.fetchMapImageURL()),e.youAreHerePlacemarkID!==this.props.youAreHerePlacemarkID&&this.setState({routeSteps:[],isMapMarkerOverlayOpen:!1})}componentWillUnmount(){this.tagsTimeout&&clearTimeout(this.tagsTimeout)}async fetchMapImageURL(){const{floorID:e}=this.props,t=this.getMapData();if(!t)return;const o=await this.props.api.axios.get(t.svg_url,{responseType:"blob"});e===this.props.floorID&&this.setState({mapImageURL:URL.createObjectURL(o.data)})}validateFloorID(){const{floorID:e}=this.props;e||this.toggleErrorOverlay({open:!0,message:'createMap error: "options.floorID" is required'})}initializeTags(){const e=async()=>{const{api:t,locationID:o}=this.props,a=await k.fetchTagsByLocation({api:t,locationID:o});this.setState({areTagsLoading:!1,allTagData:a}),this.tagsTimeout=setTimeout(e,3e5)};e()}normalizePlacemark(e){return Object.assign({kind:"placemark"},e)}async getFloors(){const{locationID:e,api:t}=this.props,o=`locations/${e}/maps`;let a;try{a=await x.fetchAllPaginatedData(t,o)}catch(e){e.response&&e.response.data&&e.response.data.detail&&this.toggleErrorOverlay({open:!0,message:e.response.data.detail})}return a&&a.length||this.toggleErrorOverlay({open:!0,message:"Floor data could not be found."}),a}getMapData(){const{floorID:e}=this.props,{floors:t}=this.state;for(const o of t)if(o.id===e)return o;return null}async initializeFloors(){this.toggleLoadingSpinner({show:!0,source:"map"});const{onFloorsUpdate:e}=this.props,t=await this.getFloors();t&&t.length>0&&this.setState({floors:t},()=>{this.zoomD3||this.addZoomBehavior(),this.zoomToDefault(),x.asyncClientCall(e,t)}),this.toggleLoadingSpinner({show:!1,source:"map"})}addZoomBehavior(){if(this.mapRef){const e=()=>{const{k:e,x:t,y:o}=s.zoomTransform(this.mapRef),a=`translate(${t}px, ${o}px) scale(${e})`;this.setState({mapTransform:a,mapZoomFactor:e,isPanningOrZooming:!0})},t=()=>{this.setState({isPanningOrZooming:!1})};this.zoomD3=s.zoom().filter(()=>this.props.shouldMapPanZoom(n.event)).scaleExtent([1/16,14]).duration(S).on("zoom",e).on("end.zoom",t),this.mapSelection=n.select(this.mapRef),this.mapSelection.call(this.zoomD3)}}zoomToDefault(){const e=this.getMapData(),t=this.getMapRefSize();e&&(this.mapSelection.call(this.zoomD3.translateTo,e.width/2,e.height/2),this.mapSelection.call(this.zoomD3.scaleTo,.5*t.width/e.width))}getMapRefSize(){return{width:this.mapRef.clientWidth,height:this.mapRef.clientHeight}}shouldShowFloors(){const{showFloorsControl:e}=this.props,{floors:t}=this.state;return e&&t.length>1}renderFloorLabel(){const e=this.getMapData();return e?i.h(d.default,{buildingName:e.group_name,floorName:e.name}):null}renderFloorOverlay(){const{floorID:e}=this.props,{isFloorOverlayOpen:t,floors:o}=this.state;return t?i.h(u.default,{currentFloorID:e,floors:o,toggleFloorOverlay:this.toggleFloorOverlay,selectFloorByID:this.selectFloorByID}):null}renderTagListOverlay(){const{locationID:e,floorID:t,api:o,tags:a}=this.props,{isTagListOverlayOpen:r,floors:s,allTagData:n,areTagsLoading:l}=this.state;return r?i.h(p.default,{onMarkerClick:this.onMarkerClick,showControlTags:Boolean(a.showControlTags),floors:s,loading:l,tags:n,tagOptions:a,updateMap:this.updateMap,api:o,locationID:e,currentFloorID:t,toggleTagListOverlay:this.toggleTagListOverlay}):null}renderMapMarkerOverlay(){const{isMapMarkerOverlayOpen:e,selectedItem:t}=this.state;return e&&t?i.h(h.default,{toggleMapMarkerOverlay:this.toggleMapMarkerOverlay,kind:"placemark"===t.kind?"placemark":"tag",item:t,youAreHerePlacemarkID:this.props.youAreHerePlacemarkID,onDirectionsToHereClicked:this.onDirectionsToHereClicked}):null}renderLoadingSpinner(){return this.state.showLoadingSpinner?i.h(f.default,null):null}renderErrorOverlay(){return this.state.isErrorOverlayOpen?i.h(m.default,{toggleErrorOverlay:this.toggleErrorOverlay,messages:this.state.errors}):null}render(){const e=this.getMapData(),{mapImageURL:t,selectedItem:o,mapTransform:a,mapZoomFactor:r,isPanningOrZooming:s,errors:n}=this.state,{showTagsControl:d,locationID:u,floorID:p,youAreHerePlacemarkID:h,api:f,tags:m,placemarks:k,width:x,height:I,onTagsUpdate:C}=this.props;return i.h("div",{className:y.cx("meridian-map-container",M,w&&T),style:{width:x,height:I}},i.h(l.default,null),i.h(c.default,{onZoomIn:this.zoomIn,onZoomOut:this.zoomOut}),this.renderLoadingSpinner(),this.renderErrorOverlay(),this.renderMapMarkerOverlay(),this.renderFloorOverlay(),this.renderTagListOverlay(),i.h(v.default,{showFloors:this.shouldShowFloors(),showTagList:d,toggleFloorOverlay:this.toggleFloorOverlay,toggleTagListOverlay:this.toggleTagListOverlay,toggleLoadingSpinner:this.toggleLoadingSpinner,toggleErrorOverlay:this.toggleErrorOverlay}),this.renderFloorLabel(),i.h("div",{ref:e=>{this.mapRef=e},className:y.cx("meridian-map-background",O),onClick:this.onClick,style:{width:x,height:I}},i.h("div",{style:{position:"relative",transform:a,transformOrigin:"0 0 0"}},i.h("img",{src:t,ref:e=>{this.mapImage=e}}),this.state.routeSteps.length>0&&i.h(D.default,{routeSteps:this.state.routeSteps,width:this.mapImage.clientWidth,height:this.mapImage.clientHeight}),!n.length&&e?i.h(b.default,{selectedItem:o,isPanningOrZooming:s,mapZoomFactor:r,locationID:u,floorID:p,youAreHerePlacemarkID:h,api:f,markers:k,onMarkerClick:this.onMarkerClick,toggleLoadingSpinner:this.toggleLoadingSpinner,placemarks:this.state.placemarks,updatePlacemarks:this.updatePlacemarks}):null,!n.length&&e?i.h(g.default,{selectedItem:o,isPanningOrZooming:s,mapZoomFactor:r,locationID:u,floorID:p,api:f,markers:m,onMarkerClick:this.onMarkerClick,onUpdate:C,toggleLoadingSpinner:this.toggleLoadingSpinner}):null)))}}t.default=_,_.propTypes={shouldMapPanZoom:r.default.func,update:r.default.func.isRequired,width:r.default.string,height:r.default.string,locationID:r.default.string.isRequired,floorID:r.default.string.isRequired,youAreHerePlacemarkID:r.default.string,api:r.default.object,showFloorsControl:r.default.bool,showTagsControl:r.default.bool,tags:r.default.shape({showControlTags:r.default.bool,filter:r.default.func,disabled:r.default.bool}),placemarks:r.default.shape({showHiddenPlacemarks:r.default.bool,filter:r.default.func,disabled:r.default.bool}),onMarkerClick:r.default.func,onTagClick:r.default.func,onPlacemarkClick:r.default.func,onMapClick:r.default.func,onTagsUpdate:r.default.func,onFloorsUpdate:r.default.func},_.defaultProps={showTagsControl:!0,showFloorsControl:!0,shouldMapPanZoom:()=>!0,width:"100%",height:"400px",placemarks:{},tags:{},onTagsUpdate:()=>{},onFloorsUpdate:()=>{}}},function(e,t){e.exports=require("d3-zoom")},function(e,t){e.exports=require("d3-selection")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0),i=o(1),r=i.css({label:"logo",display:"block",fill:"black",width:70,height:30}),s=()=>a.h("svg",{className:r,viewBox:"0 0 196.07 71.15"},a.h("path",{d:"M93.4 55.8c-8.7-.2-15.5-7.5-15.3-16.1v-5.1c-.2.3-.4.5-.7.6-.2.1-.4.1-.6.1-.3 0-.7-.1-1-.4-1.2-1-2.7-1.6-4.3-1.6h-.1c-3.5 0-6.4 2.9-6.5 6.4V54c0 .8-.7 1.5-1.5 1.5h-6.8c-.6 0-1.2-.4-1.4-1-.1.2-.2.4-.4.6-.3.2-.6.4-1 .4h-.2c-.4-.1-3.8-.5-5.9-2.5-2.6 1.6-5.7 2.5-8.7 2.5h-.2c-8.8 0-16-7.1-16.1-15.9.1-8.8 7.4-16 16.1-16h.4c8 0 14.8 6 15.9 13.7V28c0-.4.2-.8.5-1.1.3-.3.6-.4 1-.4h.1c1.5.1 2.9.5 4.3 1.1 3-2.4 6.7-3.8 10.5-3.8 2 0 4 .4 5.9 1.1.6.2 1 .8 1 1.4v.4c.1-.2.2-.3.4-.5.3-.2.6-.3.9-.3h.4c2.7.7 7.9 3.7 8 10.3v4.1c.2 3.1 2.8 5.5 5.9 5.5h.4c3.2-.2 5.7-3 5.5-6.3v-7.1-.2c.4-6.5 5.6-8.8 7.3-9.6l.3-.1c.2-.1.4-.1.6-.1h.1c.7 0 1.3.5 1.5 1.1v-6.8c0-.8.7-1.5 1.5-1.5h.2c.2 0 .4 0 .6.1l.2.1c1.7.8 6.7 3.1 7.1 9.6 2.1-.9 4.3-1.4 6.7-1.4h.2c7.3 0 13.5 4.9 15.5 11.6 2-6.7 8.2-11.6 15.5-11.6h.4c8.8 0 16 7.1 16.1 15.9v14.4c0 .4-.2.8-.5 1.1-.3.2-.6.4-1 .4h-.2c-.4-.1-3.8-.5-5.9-2.5-2.6 1.6-5.7 2.5-8.7 2.5h-.2c-7.3 0-13.5-4.9-15.5-11.6-2 6.7-8.2 11.6-15.5 11.6h-.2c-3 0-5.9-.8-8.5-2.3-2.2 1.9-5.7 2.4-6.2 2.4h-.2c-.4 0-.7-.1-1-.4-.3-.3-.5-.7-.5-1.1V41.4c-.7 8.1-7.4 14.4-15.6 14.4h-.6zM39.1 33.2c-3.5 0-6.4 2.8-6.5 6.3-.1 3.6 2.7 6.6 6.3 6.7h.1c3.6 0 6.5-2.9 6.5-6.5 0-3.5-2.8-6.4-6.3-6.5h-.1zm86.9 0c-3.5 0-6.4 2.8-6.5 6.3-.1 3.6 2.7 6.6 6.3 6.7h.1c3.6 0 6.5-2.9 6.5-6.5 0-3.5-2.8-6.4-6.3-6.5h-.1zm31.4 0c-3.5 0-6.4 2.8-6.5 6.3-.1 3.6 2.7 6.6 6.3 6.7h.1c3.6-.1 6.5-3 6.6-6.5 0-3.5-2.8-6.4-6.3-6.5h-.2z"}),a.h("path",{d:"M111.1 16.9c1.3.6 6.2 2.6 6.5 8.6v2.2c2.4-1.6 5.3-2.4 8.1-2.4h.2c8 0 14.5 6.4 14.6 14.4-.1 8-6.6 14.4-14.6 14.4h-.2c-3.1 0-6.2-1-8.7-2.8-1.7 2.4-6.1 2.9-6.1 2.9V16.9h.2m14.8 30.8c4.4 0 8.1-3.6 8.1-8 0-4.3-3.5-7.9-7.8-8h-.2c-4.3 0-7.9 3.4-8 7.8-.1 4.4 3.4 8.1 7.8 8.2h.1M108 24v16.4c-.2 7.7-6.5 13.8-14.2 13.8h-.4c-7.8-.2-14-6.7-13.8-14.6V27.4s6.8 1.7 6.8 8.9v4.2c.2 3.9 3.5 6.9 7.4 6.9h.5c4.1-.3 7.2-3.8 6.9-7.8v-7c.3-6 5.4-7.9 6.7-8.6h.1m49 1.3h.4c8 0 14.5 6.4 14.6 14.4v14.4s-4.3-.5-5.8-3c-2.6 1.9-5.8 3-9 3h-.2c-8 0-14.5-6.4-14.6-14.4.1-8 6.6-14.4 14.6-14.4m.3 22.4c4.4 0 8.1-3.6 8.1-8 0-4.3-3.5-7.9-7.8-8h-.2c-4.3 0-7.9 3.4-8 7.8-.1 4.4 3.4 8.1 7.8 8.2h.1M38.7 25.3h.4c8 0 14.5 6.4 14.6 14.4v14.4s-4.3-.5-5.8-3c-2.6 1.9-5.8 3-9 3h-.2c-8 0-14.5-6.4-14.6-14.4.1-8 6.6-14.4 14.6-14.4m.3 22.4c4.4 0 8.1-3.6 8.1-8 0-4.3-3.5-7.9-7.8-8h-.2c-4.3 0-7.9 3.4-8 7.8-.1 4.4 3.4 8.1 7.8 8.2h.1m32.4-22.4s.1 0 0 0c1.9 0 3.6.4 5.3 1v7.6c-1.5-1.3-3.4-1.9-5.3-1.9h-.1c-4.4 0-7.9 3.5-8 7.9v14.3h-6.8V28c1.6.1 3.2.6 4.6 1.4 2.8-2.7 6.5-4.1 10.3-4.1m39.7-11.4h-.1c-1.7 0-3 1.3-3 3V21h-.1c-.5 0-.9.1-1.3.3l-.3.1c-5.1 2.4-7.9 6-8.1 10.9v7.4c.2 2.4-1.7 4.5-4.1 4.7h-.3c-2.3 0-4.2-1.8-4.4-4.1v-.6-3.5c-.1-7.6-6-11-9.1-11.8-.2-.1-.5-.1-.7-.1h-.5c-.3-.4-.8-.8-1.3-.9-2-.8-4.2-1.2-6.4-1.2h-.1c-3.9 0-7.7 1.2-10.8 3.5-1.3-.5-2.6-.8-4-.8h-.2c-.8 0-1.5.3-2.1.8-.6.6-.9 1.4-.9 2.2v1.9c-3.2-4.6-8.5-7.6-14.4-7.6h-.4c-9.6 0-17.5 7.8-17.6 17.4v.1c.1 9.6 8 17.4 17.6 17.4h.2c3 0 5.9-.8 8.6-2.2 2.4 1.7 5.4 2.1 5.9 2.2h.4c.5 0 1-.1 1.4-.4.4.2.9.4 1.4.4h6.8c1.7 0 3-1.3 3-3V39.8c0-2.7 2.3-4.9 5-4.9h.2c1.2 0 2.4.4 3.4 1.2.5.4 1.1.7 1.8.7v2.8c-.1 4.6 1.6 8.9 4.7 12.3 3.2 3.3 7.4 5.2 12 5.4h.5c5.9 0 11.1-2.9 14.1-7.4v4.3c0 .9.4 1.7 1 2.2.6.5 1.3.8 2 .8h.3c.7-.1 3.7-.5 6.2-2.1 2.6 1.3 5.4 2 8.3 2h.2c6.6 0 12.5-3.7 15.5-9.2 3 5.5 8.8 9.2 15.5 9.2h.3c3 0 5.9-.8 8.6-2.2 2.4 1.7 5.4 2.1 5.9 2.2h.4c.7 0 1.4-.3 2-.8.6-.6 1-1.4 1-2.2V39.7c-.1-9.6-8-17.4-17.6-17.4h-.4c-6.6 0-12.5 3.7-15.5 9.2-3-5.5-8.8-9.2-15.5-9.2h-.2c-1.8 0-3.7.3-5.4.8-.8-3.9-3.4-6.9-7.7-8.9l-.2-.1c-.6-.1-1-.2-1.5-.2zm46.3 30.8h-.2c-2.8-.1-4.9-2.4-4.9-5.1.1-2.7 2.3-4.9 5-4.9h.1c2.7.1 4.9 2.3 4.9 5 .1 2.7-2.2 4.9-4.9 5zm-31.3 0h-.2c-2.8-.1-4.9-2.4-4.9-5.1.1-2.7 2.3-4.9 5-4.9h.1c2.7.1 4.9 2.3 4.9 5s-2.2 4.9-4.9 5zm-87 0h-.2c-1.3 0-2.6-.6-3.5-1.6-.9-1-1.4-2.2-1.4-3.6.1-2.7 2.3-4.9 5-4.9h.1c2.7.1 4.9 2.3 4.9 5 .1 2.8-2.1 5-4.9 5.1z",fill:"#fff"})),n=i.css({label:"watermark",overflow:"hidden",position:"absolute",transform:"translate(-50%, 0)",opacity:.4,zIndex:1,left:"50%",top:0});t.default=()=>a.h("div",{className:n},a.h(s,null))},function(e,t){e.exports=require("create-emotion")},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=s.css(s.mixins.shadow,s.mixins.rounded,{position:"absolute",display:"flex",flexDirection:"column",zIndex:1,right:15,bottom:15}),l=s.css(s.mixins.buttonReset,s.mixins.focusRing,s.mixins.buttonHoverActive,s.mixins.rounded,{cursor:"pointer",padding:4,width:40,height:40,border:0,fontSize:20,fontWeight:200,fill:s.theme.brandBrightBlue,background:"white"}),c=s.css(l,{borderBottomLeftRadius:0,borderBottomRightRadius:0,borderBottom:`1px solid ${s.theme.buttonSeparatorColor}`}),d=s.css(l,{borderTopLeftRadius:0,borderTopRightRadius:0}),u=({onClick:e,dir:t})=>"in"===t?i.h("button",{className:s.cx("meridian-zoom-button","meridian-zoom-button-in",c),onClick:e},i.h("svg",{viewBox:"0 0 36 36"},i.h("path",{d:"M26 17h-7v-7a1 1 0 0 0-2 0v7h-7a1 1 0 0 0 0 2h7v7a1 1 0 0 0 2 0v-7h7a1 1 0 0 0 0-2"}))):i.h("button",{className:s.cx("meridian-zoom-button","meridian-zoom-button-out",d),onClick:e},i.h("svg",{viewBox:"0 0 36 36"},i.h("path",{d:"M26 19H10a1 1 0 0 1 0-2h16a1 1 0 0 1 0 2"})));u.propTypes={zoomD3:r.default.any,dir:r.default.oneOf(["in","out"])};const p=({onZoomIn:e,onZoomOut:t})=>i.h("div",{className:s.cx("meridian-zoom-controls",n)},i.h(u,{onClick:e,dir:"in"}),i.h(u,{onClick:t,dir:"out"}));p.propTypes={onZoomIn:r.default.func,onZoomOut:r.default.func},t.default=p},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=o(3),l=s.css(s.mixins.buttonReset,s.mixins.rounded,s.mixins.overflowEllipses,{label:"floor-control",background:"rgba(0, 0, 0, 0.4)",color:"white",textShadow:"0 0 2px black",position:"absolute",zIndex:1,bottom:15,left:"50%",transform:"translate(-50%, 0)",textAlign:"center",maxWidth:300,padding:"8px 16px",border:0,fontSize:16}),c=({buildingName:e,floorName:t})=>i.h("div",{className:s.cx("meridian-floor-label",l)},e||n.STRINGS.unnamedBuilding," ",n.STRINGS.enDash," ",t);c.propTypes={buildingName:r.default.string.isRequired,floorName:r.default.string.isRequired},t.default=c},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=a(o(7)),n=a(o(4)),l=a(o(9)),c=o(1),d=o(3),u=c.css({label:"overlay-building-name",textTransform:"uppercase",fontWeight:"bold",top:0,position:"sticky",color:c.theme.brandBlue,background:c.theme.almostWhite,fontSize:c.theme.fontSizeSmaller,padding:10}),p=c.css({label:"floors-list",overflowY:"auto"}),h=c.css(c.mixins.buttonReset,c.mixins.focusRingMenuItem,c.mixins.buttonHoverActive,{label:"overlay-floor-button",padding:10,paddingLeft:20,display:"block",width:"100%",textAlign:"left"}),f=c.css({label:"overlay-floor-list-empty",padding:"60px 20px",textAlign:"center",fontSize:c.theme.fontSizeBigger,color:c.theme.textColorBluish}),m=c.css({label:"overlay-floor-button-curent-floor",color:c.theme.brandBrightBlue,fill:"currentcolor"}),g=c.css({label:"floor-checkmark",verticalAlign:"middle",marginLeft:"0.5em",width:"0.8em",height:"0.8em"}),b=()=>i.h("svg",{viewBox:"0 0 10 7",className:g},i.h("path",{d:"M3.9 7C3.7 7 3.4 6.9 3.2 6.7L0.3 3.8C-0.1 3.4 -0.1 2.8 0.3 2.4C0.7 2 1.3 2 1.7 2.4L3.9 4.6L8.2 0.3C8.6 -0.1 9.2 -0.1 9.6 0.3C10 0.7 10 1.3 9.6 1.7L4.6 6.7C4.4 6.9 4.2 7 3.9 7Z"}));class v extends i.Component{constructor(e){super(e),this.handleSearchFilterChange=e=>{this.setState({searchFilter:e.target.value})},this.state={searchFilter:""},this.searchInput=null}componentDidMount(){this.searchInput&&this.searchInput.focus()}processedFloorsByBuilding(){const{searchFilter:e}=this.state,{floors:t}=this.props,o=d.createSearchMatcher(e);return t.filter(e=>o(e.name||"")||o(e.group_name||d.STRINGS.unnamedBuilding))}renderList(){const{currentFloorID:e,toggleFloorOverlay:t,selectFloorByID:o}=this.props,a=this.processedFloorsByBuilding(),r=s.default(a,"group_name"),n=Object.keys(r).sort();""===n[0]&&n.push(n.shift());for(const e of n)r[e].sort((e,t)=>e.level-t.level);return n.length>0?i.h("div",{className:p},n.map(a=>i.h("div",{key:a},i.h("div",{className:u},a||d.STRINGS.unnamedBuilding),r[a].map(a=>i.h("button",{key:a.name,onClick:()=>{o(a.id),t({open:!1})},className:c.cx(h,a.id===e&&m)},a.name,a.id===e?i.h(b,null):null))))):i.h("div",{className:f},d.STRINGS.noResultsFound)}render(){const{searchFilter:e}=this.state,{toggleFloorOverlay:t}=this.props;return i.h(n.default,{position:"right",onCloseClicked:()=>{t({open:!1})}},i.h(l.default,{value:e,onChange:e=>{this.setState({searchFilter:e})}}),this.renderList())}}v.propTypes={toggleFloorOverlay:r.default.func.isRequired,currentFloorID:r.default.string.isRequired,floors:r.default.array.isRequired,selectFloorByID:r.default.func.isRequired},t.default=v},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=a(o(7)),n=a(o(10)),l=a(o(4)),c=a(o(9)),d=o(1),u=o(3),p=a(o(11)),h=d.css({label:"overlay-building-name",top:0,position:"sticky",textTransform:"uppercase",fontWeight:"bold",color:d.theme.brandBlue,background:d.theme.almostWhite,fontSize:d.theme.fontSizeSmaller,padding:10}),f=d.css({label:"tags-list",overflowY:"auto",flex:"1 1 auto"}),m=d.css(d.mixins.buttonReset,d.mixins.focusRingMenuItem,d.mixins.buttonHoverActive,{label:"overlay-tags-button",minHeight:56,padding:10,paddingLeft:20,display:"block",width:"100%",textAlign:"left"}),g=d.css(d.mixins.flexRow,{label:"overlay-tags-button-inner",alignItems:"center"}),b=d.css({label:"overlay-tags-button-name",flex:"1 1 auto"}),v=d.css({label:"overlay-tags-list-empty",padding:"60px 20px",textAlign:"center",fontSize:d.theme.fontSizeBigger,color:d.theme.textColorBluish});class k extends i.Component{constructor(e){super(e),this.state={searchFilter:""},this.searchInput=null}componentDidMount(){this.searchInput&&this.searchInput.focus()}getFloorToGroup(){const{floors:e}=this.props,t={};for(const o of e)t[o.id]=[o.group_name||u.STRINGS.unnamedBuilding,u.STRINGS.enDash,o.name].join(" ");return t}getOrganizedTags(e){const t=this.getFloorToGroup();return s.default(e,e=>t[e.map_id])}getSortedGroups(e){const{currentFloorID:t}=this.props,o=Object.keys(e).sort();return o.forEach((a,i)=>{if(e[a][0].map_id===t){const[e]=o.splice(i,1);o.unshift(e)}}),o}renderTagList(){const{updateMap:e,tagOptions:t,tags:o,loading:a,onMarkerClick:r,toggleTagListOverlay:s}=this.props,{searchFilter:l}=this.state;if(a)return i.h("div",{className:v},i.h(n.default,null));const c=u.createSearchMatcher(l),k=o.filter(e=>c(e.name)||c(e.mac)||u.getTagLabels(e).some(c)).filter(e=>!0===t.showControlTags||!e.is_control_tag).sort((e,t)=>e.name<t.name?-1:e.name>t.name?1:0);if(0===k.length)return i.h("div",{className:v},u.STRINGS.noResultsFound);const y=this.getOrganizedTags(k),x=this.getSortedGroups(y);return i.h("div",{className:f},x.map(o=>i.h("div",{key:o},i.h("div",{className:h},o),y[o].map(o=>i.h("button",{key:o.id,className:m,onClick:()=>{e({locationID:o.location_id,floorID:o.map_id,tags:Object.assign(Object.assign({},t),{filter:()=>!0})}),r(o),s({open:!1})}},i.h("div",{className:g},i.h("div",{className:b},o.name),i.h(p.default,{align:"right",labels:u.getTagLabels(o),fontSize:d.theme.fontSizeSmallest})))))))}render(){const{searchFilter:e}=this.state,{toggleTagListOverlay:t}=this.props;return i.h(l.default,{position:"right",onCloseClicked:()=>{t({open:!1})}},i.h(c.default,{value:e,onChange:e=>{this.setState({searchFilter:e})}}),this.renderTagList())}}k.propTypes={onMarkerClick:r.default.func.isRequired,loading:r.default.bool.isRequired,tags:r.default.arrayOf(r.default.object).isRequired,showControlTags:r.default.bool.isRequired,floors:r.default.array.isRequired,tagOptions:r.default.object.isRequired,updateMap:r.default.func.isRequired,api:r.default.object.isRequired,locationID:r.default.string.isRequired,currentFloorID:r.default.string.isRequired,toggleTagListOverlay:r.default.func.isRequired},t.default=k},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=a(o(4)),n=o(3),l=o(1),c=a(o(11)),d=a(o(26)),u=a(o(12)),p=l.css(l.mixins.buttonReset,{label:"MapMarkerOverlay-GetDirectionsButton",alignItems:"center",backgroundColor:"#EBEEF2",borderRadius:"5px",color:"#297BC0",display:"flex",fontSize:"18px",fontWeight:"bold",height:"63px",justifyContent:"center",padding:"5px 8px 5px 5px","&:hover, &:focus":{cursor:"pointer",boxShadow:"0 0 0 2px #297BC0",outline:"none"},textTransform:"uppercase",width:"100%"}),h=l.css({label:"MapMarkerOverlay-IconYouAreHere",display:"flex",alignItems:"center"}),f=l.css({label:"overlay-image",width:"100%",backgroundColor:"white",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}),m=l.css({label:"overlay-name",fontSize:24}),g=l.css({label:"overlay-content",padding:"0 20px 10px 20px"}),b=l.css({fontSize:14});function v({kind:e,item:t}){if("placemark"===e){return{backgroundSize:"70%",backgroundImage:`url('${n.getPlacemarkIconURL(t.type)}')`,backgroundColor:`#${t.color}`,height:300}}return"tag"===e&&t.image_url?{backgroundImage:`url('${t.image_url}')`,height:300}:{background:l.theme.brandBrightBlue,height:300}}const k=({kind:e,item:t,toggleMapMarkerOverlay:o,youAreHerePlacemarkID:a,onDirectionsToHereClicked:r})=>{return i.h(s.default,{position:"left",onCloseClicked:()=>{o({open:!1})}},i.h("div",{className:f,style:v({kind:e,item:t})}),i.h("div",{className:g},i.h("p",{className:m},t.name||n.STRINGS.enDash),"placemark"===e&&a?a===t.id?i.h("p",{className:h},i.h(u.default,null),"You are Here"):i.h("p",null,i.h("button",{className:p,onClick:e=>{e.preventDefault(),r(t)}},i.h(d.default,null),i.h("span",{style:{marginLeft:"5px"}},"Get Directions"))):null,"tag"===e?i.h("div",{className:b},i.h(c.default,{align:"left",labels:n.getTagLabels(t),fontSize:l.theme.fontSize}),i.h("p",null,"MAC: ",t.mac)):null))};k.propTypes={kind:r.default.oneOf(["tag","placemark"]),item:r.default.object.isRequired,toggleMapMarkerOverlay:r.default.func.isRequired,youAreHerePlacemarkID:r.default.string,onDirectionsToHereClicked:r.default.func},t.default=k},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=o(0),i=o(1).css({width:32,height:32,fill:"#297BC0"});t.default=()=>a.h("svg",{className:i,viewBox:"0 0 36 36"},a.h("path",{d:"M10.8 29a4 4 0 0 1-4-4v-9a4 4 0 0 1 4-4h7V9a1.86 1.86 0 0 1 1.8-2 2.35 2.35 0 0 1 1.54.64l7.07 6.11a2.82 2.82 0 0 1 1 2.11 2.68 2.68 0 0 1-.94 2L21.11 24a2.33 2.33 0 0 1-1.52.63 1.86 1.86 0 0 1-1.79-2.08V20h-3v5a4 4 0 0 1-4 4m0-15a2 2 0 0 0-2 2v9a2 2 0 0 0 4 0v-6a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v3.47l7.15-6.12a.68.68 0 0 0 .25-.52.8.8 0 0 0-.3-.6l-7.07-6.1V13a1 1 0 0 1-1 1h-8z"}))},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=o(1),s=a(o(10)),n=r.css({label:"loading",position:"absolute",zIndex:3,width:30,left:0,top:"45%",right:0,overflow:"hidden",margin:"0 auto",color:r.theme.textColor,textAlign:"center",pointerEvents:"none"});t.default=()=>i.h("div",{className:n},i.h(s.default,null))},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=a(o(8)),l=s.css(s.mixins.rounded,{label:"error",position:"absolute",zIndex:4,top:"35%",left:0,right:0,margin:"0 auto",minWidth:300,maxWidth:420,border:"1px solid #dfe1ef",paddingTop:15,paddingRight:20,paddingBottom:15,paddingLeft:25,background:s.theme.white,boxShadow:"0 0 1px rgba(0, 0, 0, 0.15), inset 4px 0 0 #d82e1f"}),c=s.css(s.mixins.buttonReset,{label:"close",cursor:"pointer",float:"right",width:38,height:38,marginLeft:15,padding:4,fill:"#c3c5c8","&:hover":{fill:s.theme.textColorBluish,cursor:"pointer"},"&:focus":{outline:0}}),d=({toggleErrorOverlay:e})=>i.h("button",{className:c,onClick:()=>{e({open:!1})}},i.h(n.default,null));d.propTypes={toggleErrorOverlay:r.default.func.isRequired};const u=({toggleErrorOverlay:e,messages:t=["Unknown"]})=>i.h("div",{className:l},i.h(d,{toggleErrorOverlay:e}),i.h("p",null,"Sorry, something went wrong. It might be related to:"),i.h("ul",null,t.map((e,t)=>i.h("li",{key:t},e))));u.propTypes={toggleErrorOverlay:r.default.func.isRequired,messages:r.default.array},t.default=u},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=a(o(30)),n=a(o(13)),l=o(3);class c extends i.Component{constructor(e){super(e),this.commitTagUpdates=s.default(()=>{this.setState(e=>({tagsByMAC:Object.assign(Object.assign({},e.tagsByMAC),this.tagUpdates)}),()=>{this.tagUpdates={},this.onUpdate()})},1e3),this.onUpdate=()=>{const{onUpdate:e,markers:t}=this.props,{filter:o=(()=>!0)}=t,a=this.filterControlTags(this.getTags()),i=a.filter(o);e({allTags:a,filteredTags:i})},this.state={tagsByMAC:{},connectionsByFloorID:{}},this.tagUpdates={}}componentDidMount(){const{markers:e}=this.props;e&&this.connect(this.props.floorID)}shouldComponentUpdate(e){const t=e.mapZoomFactor!==this.props.mapZoomFactor;return!(this.props.isPanningOrZooming&&!t)}componentDidUpdate(e){e.floorID!==this.props.floorID&&(this.disconnect(e.floorID),this.connect(this.props.floorID))}componentWillUnmount(){this.disconnect(this.props.floorID)}getTags(){const{tagsByMAC:e}=this.state,t=[];for(const o of Object.keys(e))t.push(e[o]);return t}removeTag(e){this.setState(t=>{const{tagsByMAC:o}=t;return{tagsByMAC:Object.keys(o).filter(t=>t!==e.mac).reduce((e,t)=>(e[t]=o[t],e),{})}})}handleTagUpdates(e){const{isPanningOrZooming:t}=this.props;this.tagUpdates=Object.assign(Object.assign({},this.tagUpdates),this.tagsByMAC(e)),t||this.commitTagUpdates()}tagsByMAC(e){return e.reduce((e,t)=>(e[t.mac]=t,e),{})}setInitialTags(e){this.setState({tagsByMAC:this.tagsByMAC(e)},()=>{this.onUpdate(),this.props.toggleLoadingSpinner({show:!1,source:"tags"})})}connect(e){const{locationID:t,api:o,toggleLoadingSpinner:a}=this.props;a({show:!0,source:"tags"});const i=o.openStream({locationID:t,floorID:e,onInitialTags:t=>{e===this.props.floorID&&this.setInitialTags(t)},onTagDisappear:t=>{e===this.props.floorID&&this.removeTag(t)},onTagUpdate:t=>{e===this.props.floorID&&this.handleTagUpdates([t])}});this.setState(t=>({connectionsByFloorID:Object.assign(Object.assign({},t.connectionsByFloorID),{[e]:i})}),()=>{this.onUpdate()})}disconnect(e){const t=this.state.connectionsByFloorID[e];t&&t.close(),this.tagUpdates={},this.setState(t=>{const o=Object.assign({},t.tagsByMAC);for(const t of Object.keys(o))o[t].map_id===e&&delete o[t];return{tagsByMAC:o,connectionsByFloorID:l.objectWithoutKey(t.connectionsByFloorID,e)}},()=>{this.onUpdate()})}filterControlTags(e){const{markers:t}=this.props;return e.filter(e=>!0===t.showControlTags||!e.is_control_tag)}filterTags(e){const{markers:t}=this.props,{filter:o=(()=>!0)}=t;return this.filterControlTags(e).filter(o)}render(){const{selectedItem:e,markers:t,onMarkerClick:o,mapZoomFactor:a}=this.props,r=this.filterTags(this.getTags()).map(r=>i.h(n.default,{selectedItem:e,mapZoomFactor:a,key:r.mac,kind:"tag",data:r,onClick:o,disabled:t.disabled}));return i.h("div",null,r)}}t.default=c,c.defaultProps={markers:{},onUpdate:()=>{}},c.propTypes={selectedItem:r.default.object,isPanningOrZooming:r.default.bool.isRequired,mapZoomFactor:r.default.number.isRequired,locationID:r.default.string.isRequired,floorID:r.default.string.isRequired,api:r.default.object,markers:r.default.shape({filter:r.default.func,showControlTags:r.default.bool,disabled:r.default.bool}),onMarkerClick:r.default.func,onUpdate:r.default.func,toggleLoadingSpinner:r.default.func.isRequired}},function(e,t){e.exports=require("lodash.throttle")},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(3),n=o(1),l=s.getAssetURL("tags/tag.svg"),c=n.css(n.mixins.shadow,n.mixins.buttonReset,n.mixins.pointer,n.mixins.focusNone,{label:"meridian-tag",width:48,height:48,borderRadius:"100%",position:"absolute",backgroundColor:"white",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",border:"2px solid white",overflow:"hidden",transition:"\n width 80ms ease,\n height 80ms ease,\n top 500ms ease,\n left 500ms ease\n ",zIndex:2}),d=n.css(c,{width:60,height:60,zIndex:3,boxShadow:"0 0 0 2px white, 0 0 4px black"}),u=({isSelected:e,data:t,mapZoomFactor:o,onClick:a=(()=>{}),disabled:r=!1})=>{const u=1/o/(o<.2?1.4:1),p=s.getTagLabels(t).map(e=>{return`meridian-tag-label-${e.replace(/ /g,"-").replace(/[^a-z0-9_-]/i,"")}`}),h=e?n.cx("meridian-tag-selected",p,d):n.cx("meridian-tag",p,c),f={left:t.x,top:t.y,transform:`translate(-50%, -50%) scale(${u})`,backgroundImage:`url('${t.image_url||l}')`};return i.h("button",{disabled:r,className:h,style:f,onClick:e=>{e.target.focus(),a()},onMouseDown:e=>{e.stopPropagation()}})};u.propTypes={isSelected:r.default.bool.isRequired,mapZoomFactor:r.default.number.isRequired,data:r.default.object.isRequired,onClick:r.default.func,disabled:r.default.bool},t.default=u},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(3),n=o(1),l=a(o(12)),c=({isSelected:e,data:t,mapZoomFactor:o,onClick:a=(()=>{}),disabled:r=!1,youAreHerePlacemarkID:c})=>{const m=`meridian-placemark-type-${t.type}`,g=!t.type||0===t.type.indexOf("label_"),b=1/o/(o<.2?1.4:1),v=e?n.cx("meridian-placemark-icon-selected",m,f):n.cx("meridian-placemark-icon",m,h),k=c&&c===t.id,y={left:t.x,top:t.y,transform:`translate(-50%, -50%) scale(${b})`};return g?i.h("div",{className:n.cx("meridian-placemark",p),style:y},i.h("div",{className:n.cx(d,u,"meridian-label","meridian-label-only")},t.name)):k?i.h("div",{className:n.cx("meridian-placemark",p),style:{left:t.x,top:t.y,transform:`translate(-45%, -50%) scale(${b})`,zIndex:3}},i.h(l.default,null),i.h("div",{className:n.cx("meridian-label",d),hidden:o<.2},"YOU ARE HERE")):i.h("div",{className:n.cx("meridian-placemark",p),style:y},i.h("button",{disabled:r,className:v,style:function(e){const t="#"+e.color;return{borderColor:t,backgroundColor:t,backgroundImage:`url('${s.getPlacemarkIconURL(e.type)}')`}}(t),onClick:e=>{e.target.focus(),a(e)},onMouseDown:e=>{e.stopPropagation()}}),i.h("div",{className:n.cx("meridian-label",d),hidden:o<.2},t.name))};c.propTypes={isSelected:r.default.bool.isRequired,mapZoomFactor:r.default.number.isRequired,data:r.default.object.isRequired,onClick:r.default.func,disabled:r.default.bool,youAreHerePlacemarkID:r.default.string};const d=n.css(n.mixins.textStrokeWhite,{label:"meridian-label",marginLeft:"50%",position:"absolute",minWidth:55,maxWidth:120,fontSize:14,textAlign:"center",paddingTop:4,color:"black",userSelect:"none",transform:"translate(-50%, 0)",fontWeight:"bold",visibility:"visible","&[hidden]":{visibility:"hidden"}}),u=n.css({label:"meridian-label-only",textTransform:"uppercase",color:"#666",fontSize:16}),p=n.css({label:"meridian-placemark",position:"absolute"}),h=n.css(n.mixins.buttonReset,n.mixins.pointer,n.mixins.focusNone,{label:"meridian-placemark-icon",transition:"width 80ms ease, height 80ms ease",display:"block",width:24,height:24,borderRadius:"100%",backgroundColor:n.theme.brandBlue,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",border:"2px solid transparent",overflow:"hidden",zIndex:1}),f=n.css(h,{zIndex:3,width:30,height:30,boxShadow:"0 0 4px black"});t.default=c},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=a(o(13));class n extends i.Component{async componentDidMount(){this.props.updatePlacemarks()}shouldComponentUpdate(e){const t=e.mapZoomFactor!==this.props.mapZoomFactor;return!(this.props.isPanningOrZooming&&!t)}componentDidUpdate(e){e.floorID!==this.props.floorID&&this.props.updatePlacemarks()}getFilterFunction(){const{markers:e}=this.props,{filter:t=(()=>!0)}=e;return t}cullMarkers(e){return e}render(){const{markers:e,onMarkerClick:t,mapZoomFactor:o,selectedItem:a,youAreHerePlacemarkID:r}=this.props,n=this.getFilterFunction(),l=Object.keys(this.props.placemarks).map(e=>this.props.placemarks[e]).filter(t=>!0===e.showHiddenPlacemarks||!t.hide_on_map).filter(n),c=this.cullMarkers(l).map(n=>i.h(s.default,{selectedItem:a,mapZoomFactor:o,key:n.id,kind:"placemark",data:n,onClick:t,disabled:e.disabled,youAreHerePlacemarkID:r}));return i.h("div",null,c)}}t.default=n,n.defaultProps={markers:{},placemarks:{}},n.propTypes={selectedItem:r.default.object,isPanningOrZooming:r.default.bool.isRequired,mapZoomFactor:r.default.number.isRequired,locationID:r.default.string.isRequired,floorID:r.default.string.isRequired,youAreHerePlacemarkID:r.default.string,api:r.default.object,markers:r.default.shape({showHiddenPlacemarks:r.default.bool,filter:r.default.func,disabled:r.default.bool}),onMarkerClick:r.default.func,placemarks:r.default.object,updatePlacemarks:r.default.func}},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1),n=s.css({label:"floor-and-tag-controls",display:"flex",flexDirection:"column",position:"absolute",zIndex:1,right:15,top:15}),l=s.css(s.mixins.buttonReset,s.mixins.shadow,s.mixins.rounded,s.mixins.buttonHoverActive,s.mixins.focusRing,{label:"control",cursor:"pointer",background:"white",padding:4,width:40,height:40,border:0,fontSize:20,fontWeight:200,fill:s.theme.brandBrightBlue}),c=s.css(l,{marginTop:10}),d=({toggleFloorOverlay:e,toggleTagListOverlay:t,showFloors:o,showTagList:a})=>i.h("div",{className:n},a?i.h("button",{className:s.cx("meridian-tag-control",l),onClick:()=>{t({open:!0})}},i.h("svg",{viewBox:"-8 -10 36 36"},i.h("path",{d:"M2 4C0.9 4 0 3.1 0 2C0 0.9 0.9 0 2 0C3.1 0 4 0.9 4 2C4 3.1 3.1 4 2 4ZM4 8C4 6.9 3.1 6 2 6C0.9 6 0 6.9 0 8C0 9.1 0.9 10 2 10C3.1 10 4 9.1 4 8ZM4 14C4 12.9 3.1 12 2 12C0.9 12 0 12.9 0 14C0 15.1 0.9 16 2 16C3.1 16 4 15.1 4 14ZM20 2C20 1.4 19.6 1 19 1H8C7.4 1 7 1.4 7 2C7 2.6 7.4 3 8 3H19C19.6 3 20 2.6 20 2ZM20 8C20 7.4 19.6 7 19 7H8C7.4 7 7 7.4 7 8C7 8.6 7.4 9 8 9H19C19.6 9 20 8.6 20 8ZM20 14C20 13.4 19.6 13 19 13H8C7.4 13 7 13.4 7 14C7 14.6 7.4 15 8 15H19C19.6 15 20 14.6 20 14Z"}))):null,o?i.h("button",{className:s.cx("meridian-floor-control",o&&a?c:l),onClick:()=>{e({open:!0})}},i.h("svg",{viewBox:"0 0 36 36"},i.h("path",{d:"M28.4 14.09a1.84 1.84 0 0 0-.62-.39l-8.48-3.33a3.61 3.61 0 0 0-1.3-.22 3.56 3.56 0 0 0-1.3.22L8.22 13.7a1.83 1.83 0 0 0-.62.39 1.24 1.24 0 0 0 0 1.82 1.85 1.85 0 0 0 .62.39l8.48 3.34a3.92 3.92 0 0 0 2.59 0l8.48-3.34a1.86 1.86 0 0 0 .62-.39 1.24 1.24 0 0 0 0-1.82m-9.83 3.68a2 2 0 0 1-1.13 0l-7-2.77 7-2.77a2 2 0 0 1 1.13 0l7 2.77zm9.83 2.32a1.24 1.24 0 0 1 0 1.82 1.86 1.86 0 0 1-.62.39l-8.47 3.33a3.92 3.92 0 0 1-2.59 0L8.22 22.3a1.85 1.85 0 0 1-.62-.39 1.24 1.24 0 0 1 0-1.82 1.83 1.83 0 0 1 .62-.39L10 19l2.73 1.08-2.34.92 7 2.77a2 2 0 0 0 1.13 0l7-2.77-2.35-.92L26 19l1.79.7a1.84 1.84 0 0 1 .62.39"}))):null);d.propTypes={showFloors:r.default.bool.isRequired,showTagList:r.default.bool.isRequired,toggleFloorOverlay:r.default.func.isRequired,toggleTagListOverlay:r.default.func.isRequired},t.default=d},function(e,t,o){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=o(0),r=a(o(2)),s=o(1);function n(e){const t=e.routeSteps.flatMap(e=>{return e.split(",").map(e=>Number(e))}),o=[];for(let e=0;e<t.length-2;e+=2){const a=t[e],i=t[e+1],r=t[e+2],s=t[e+3];o.push(`${a},${i}`),o.push(`${r},${s}`)}const a=o.join(" ");return i.h("div",{className:l},i.h("svg",{height:e.height,width:e.width},i.h("polyline",{className:c,points:a,fill:"none",stroke:"#297BC0"}),i.h("polyline",{className:d,points:a,fill:"none",stroke:"#297BC0"})))}t.default=n,n.propTypes={routeSteps:r.default.array,width:r.default.number,height:r.default.number};const l=s.css({label:"DirectionsLayer",position:"absolute",top:0,left:0}),c=s.css({strokeWidth:22,strokeOpacity:.3,strokeLinecap:"round",strokeDasharray:"4 1"}),d=s.css({strokeWidth:15,strokeOpacity:.8,strokeLinecap:"round",strokeDasharray:"4 1"})},function(e,t){e.exports=require("preact/debug")}]));
{
"name": "@meridian/web-sdk",
"private": false,
"version": "0.7.5",
"version": "0.7.6",
"description": "Web SDK for showing Aruba Meridian maps, tags, and more",

@@ -12,7 +12,5 @@ "main": "./dist/web-sdk.js",

"docs": "bash bin/docs.sh",
"prepack": "npm run build",
"build": "bash bin/build.sh",
"analyze": "webpack -p --mode production --env analyze",
"postversion": "bash bin/postversion.sh",
"postpublish": "bash bin/deploy.sh",
"postversion": "git push origin --tags && git push origin HEAD",
"test": "bash bin/test.sh"

@@ -19,0 +17,0 @@ },

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc