= 0){\r\n\r\n if (bb.id.indexOf(str) >= 0)\r\n found = true;\r\n else\r\n toDelIdx=i;\r\n break;\r\n }\r\n }\r\n\r\n\t\r\n if (toDelIdx>=0){\r\n Highcharts.getOptions().exporting.buttons.contextButton.menuItems.splice(toDelIdx,1);\r\n\r\n\t}\r\n\r\n\r\n return found;\r\n\r\n\r\n},\r\n\r\n\r\n\r\n\r\nclearMyHiChartsButtons: function (){\r\n\t\r\n\t\r\n\tvar len = Highcharts.getOptions().exporting.buttons.contextButton.menuItems.length;\r\n\t\r\n\tif (len > 6)\r\n\t\tHighcharts.getOptions().exporting.buttons.contextButton.menuItems.splice(6,len-6);\r\n\t\r\n\t\r\n\t\r\n}\r\n\r\n\r\n\r\n}\r\n\r\nmodule.exports = BGTools;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","import invariant from 'invariant';\n\nvar noop = function noop() {};\n\nfunction readOnlyPropType(handler, name) {\n return function (props, propName) {\n if (props[propName] !== undefined) {\n if (!props[handler]) {\n return new Error(\"You have provided a `\" + propName + \"` prop to `\" + name + \"` \" + (\"without an `\" + handler + \"` handler prop. This will render a read-only field. \") + (\"If the field should be mutable use `\" + defaultKey(propName) + \"`. \") + (\"Otherwise, set `\" + handler + \"`.\"));\n }\n }\n };\n}\n\nexport function uncontrolledPropTypes(controlledValues, displayName) {\n var propTypes = {};\n Object.keys(controlledValues).forEach(function (prop) {\n // add default propTypes for folks that use runtime checks\n propTypes[defaultKey(prop)] = noop;\n\n if (process.env.NODE_ENV !== 'production') {\n var handler = controlledValues[prop];\n !(typeof handler === 'string' && handler.trim().length) ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop) : invariant(false) : void 0;\n propTypes[prop] = readOnlyPropType(handler, displayName);\n }\n });\n return propTypes;\n}\nexport function isProp(props, prop) {\n return props[prop] !== undefined;\n}\nexport function defaultKey(key) {\n return 'default' + key.charAt(0).toUpperCase() + key.substr(1);\n}\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nexport function canAcceptRef(component) {\n return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\n\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n\nimport { useCallback, useRef, useState } from 'react';\nimport * as Utils from './utils';\n\nfunction useUncontrolledProp(propValue, defaultValue, handler) {\n var wasPropRef = useRef(propValue !== undefined);\n\n var _useState = useState(defaultValue),\n stateValue = _useState[0],\n setState = _useState[1];\n\n var isProp = propValue !== undefined;\n var wasProp = wasPropRef.current;\n wasPropRef.current = isProp;\n /**\n * If a prop switches from controlled to Uncontrolled\n * reset its value to the defaultValue\n */\n\n if (!isProp && wasProp && stateValue !== defaultValue) {\n setState(defaultValue);\n }\n\n return [isProp ? propValue : stateValue, useCallback(function (value) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (handler) handler.apply(void 0, [value].concat(args));\n setState(value);\n }, [handler])];\n}\n\nexport { useUncontrolledProp };\nexport default function useUncontrolled(props, config) {\n return Object.keys(config).reduce(function (result, fieldName) {\n var _extends2;\n\n var _ref = result,\n defaultValue = _ref[Utils.defaultKey(fieldName)],\n propsValue = _ref[fieldName],\n rest = _objectWithoutPropertiesLoose(_ref, [Utils.defaultKey(fieldName), fieldName].map(_toPropertyKey));\n\n var handlerName = config[fieldName];\n\n var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),\n value = _useUncontrolledProp[0],\n handler = _useUncontrolledProp[1];\n\n return _extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));\n }, props);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _bootstrapTable = require('./src/bootstrap-table');\n\nvar _bootstrapTable2 = _interopRequireDefault(_bootstrapTable);\n\nvar _contexts = require('./src/contexts');\n\nvar _contexts2 = _interopRequireDefault(_contexts);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = (0, _contexts2.default)(_bootstrapTable2.default);","/**\r\n * Vaki Aquaculture Systems Ltd. Copyright 2015, all rights reserved.\r\n *\r\n * Language: JavaScript, ES5\r\n *\r\n * Authors:\r\n * - Jón Rúnar Helgason, jonrh@jonrh.is\r\n * - Atli Guðlaugsson, atli@vaki.is\r\n */\r\n\r\n\"use strict\";\r\n\r\n\r\n\r\n\r\nvar Reflux = require(\"reflux\");\r\nvar Immutable = require(\"immutable\");\r\nvar FilterStore = require(\"./FilterStore.js\");\r\nvar UserDataStore = require(\"./UserDataStore.js\");\r\nvar NavBarStore = require(\"./NavBarStore.js\");\r\nvar Actions = require(\"./../actions/Actions.js\");\r\nvar VakiAPI = require(\"./../webservice/VakiAPI.js\");\r\nvar TranslateStore = require(\"./TranslateStore.js\");\r\nvar ParMan = require(\"./ParMan.js\");\r\nvar Spinner = require(\"./../utils/Spinner.jsx\")\r\nvar moment = require(\"moment\");\r\n//BGXXX var createKeyframe = require('create-keyframe');\r\n//BGXXX var insertCSS = require('insert-styles');\r\n\r\nvar t = TranslateStore.getTranslate();\r\n\r\nvar _dashboardData = Immutable.Map({});\r\nvar obj = Immutable.Map({ OrganisationList: undefined });\r\nvar _allboardsData = Immutable.Map(obj);\r\nvar _showAllOrgs = false;\r\n\r\nconst _showAllOrgs_ID = \"DBS_showAllOrgs\";\r\n\r\nvar mapp = null;\r\nvar mappCenter = null;\r\n\r\nvar timerPar = null;\r\n\r\nvar UtilData = [];\r\n\r\nvar UtilsTempShortCnt = 0;\r\n\r\n\r\n\r\n\r\nvar cntDbg = 0;\r\n\r\n\r\nvar hidingMsg = false;\r\n\r\n\r\nvar DashboardStore = Reflux.createStore({\r\n init: function () {\r\n this.listenTo(Actions.apiNewDashboardData, this.onApiNewDashboardData);\r\n this.listenTo(Actions.dashShowAllOrgs, this.onShowAllOrgs);\r\n this.listenTo(Actions.apiNewDashboardList, this.onNewDashboardList);\r\n this.listenTo(Actions.dashboardToggleMap, this.onToggleMap);\r\n\r\n this.listenTo(Actions.dashboardLoadAllDashboards, this.fetchAllDashboards);\r\n\r\n this.listenTo(Actions.apiGetFarmUtilizations, this.onGotFarmUtilizations);\r\n this.listenTo(Actions.dashboardShowPopsUtil, this.showPopsUtil);\r\n this.listenTo(Actions.dashboardShowCurrOrg, this.onShowCurrOrg);\r\n this.listenTo(Actions.addComment, this.onNewComment);\r\n\r\n this.listenTo(Actions.dashboardHideStartupMsg, this.onHideMsg);\r\n\r\n this.listenTo(Actions.dashCheckOrgListAge, this.checkOrgListAge);\r\n\r\n // this.listenTo(Actions.farmClick, this.onFarmClick);\r\n this.listenTo(Actions.dashFarmClickedOnAllOrgs, this.onFarmClickedOnAllOrgs);\r\n\r\n\r\n\r\n\r\n\r\n this.data = Immutable.Map({\r\n dashboardData: _dashboardData,\r\n allboardsData: null, //_allboardsData,\r\n allBoardsDataUpdated: new Date('1944-06-17T12:00:00'),\r\n showMap: false,\r\n showCurrOrg: false,\r\n showMsg: true\r\n \r\n\r\n });\r\n\r\n this.FetchingUtils = [];\r\n\r\n this.map = null;\r\n this.markers = [];\r\n // _showAllOrgs = NavBarStore.showAllOrgs();\r\n \r\n \r\n \r\n\r\n },\r\n\r\n\r\n\r\n\r\n checkOrgListAge: function () {\r\n\r\n var v = this.data.get(\"allboardsData\");\r\n if (!v)\r\n return;\r\n\r\n var updtTime = this.data.get(\"allboardsDataUpdated\");\r\n\r\n var msUpdt = new Date() - updtTime;\r\n \r\n if (msUpdt > (30*60*1000) && (_showAllOrgs || this.data.get(\"showCurrOrg\") )) { //More than half an hour and orgs visible\r\n VakiAPI.getDashboardList();\r\n }\r\n\r\n\r\n\r\n },\r\n\r\n\r\n onHideMsg: function () {\r\n\r\n var elND = document.getElementById(\"TheCallout\");\r\n\r\n if (elND && !hidingMsg) {\r\n hidingMsg = true;\r\n var endFunc = function () { console.log(\"End Hiding\"); document.getElementById(\"CO_overlay\").style.display = \"none\"; hidingMsg = false; };\r\n \r\n\r\n elND.addEventListener(\"webkitAnimationEnd\", endFunc);\r\n \r\n elND.addEventListener(\"animationend\", endFunc);\r\n\r\n\r\n var elND = document.getElementById(\"ShowNewDash\");\r\n\r\n\r\n var box = document.getElementById(\"TheCallout\");\r\n\r\n\r\n\r\n/*BGXXX\r\n var keyframeObj = createKeyframe({\r\n\r\n 100: {\r\n left: \"-1000px\"\r\n \r\n\r\n }\r\n });\r\n\r\n\r\n box.style.animationName = keyframeObj.name;\r\n\r\n insertCSS(keyframeObj.css, { id: keyframeObj.name })\r\n\r\n*/\r\n } else {\r\n\r\n\r\n this.data = this.data.set(\"showMsg\", false);\r\n }\r\n\r\n\r\n this.trigger(this.data);\r\n },\r\n\r\n showMsg: function () {\r\n var show = this.data.get(\"showMsg\");\r\n return show;\r\n\r\n },\r\n\r\n isOldDash: function () {\r\n var b = window.localStorage.getItem(\"TheLatestDashUsed\") == \"1\";\r\n return b;\r\n },\r\n\r\n\r\n fetchUtilData: function () {\r\n\r\n var a = this.data.get(\"allboardsData\");\r\n a = a.get (\"OrganisationList\");\r\n\r\n var numOrgs = a.length;\r\n if (!a)\r\n return;\r\n for (var i = 0; i < numOrgs; i++) {\r\n\r\n for (var j = 0; j < a[i].DashboardList.length; j++) {\r\n if (a[i].UtilData == null) {\r\n \r\n \r\n \r\n\r\n var pops = a[i].DashboardList[j].PopulationStatusList;\r\n var popIDs = [];\r\n for (var k = 0; k < pops.length; k++) {\r\n popIDs.push(pops[k].PopulationID);\r\n }\r\n\r\n VakiAPI.GetFarmUtilizations({ FarmID: a[i].DashboardList[j].FarmID, pops: popIDs.join() });\r\n return;\r\n\r\n }\r\n\r\n \r\n }\r\n }\r\n\r\n\r\n\r\n },\r\n\r\n\r\n\r\n /*\r\n public class UtilizationSummary\r\n {\r\n public int itemID = 0;\r\n public int day7Summary = 0;\r\n public int day30Summary = 0;\r\n }\r\n\r\n public class FarmUtilizations{\r\n public UtilizationSummary farmUtil = new UtilizationSummary();\r\n public List
\";\r\n }\r\n }\r\n\r\n\r\n var locDataOK = true;\r\n\r\n if (locList.length == 0) {\r\n mapMsg = t(\"dashboard.novalidloc\");\r\n\r\n theDiv.style[\"display\"] = 'none';\r\n\r\n locDataOK = false;\r\n }\r\n\r\n if (locDataOK && locList.length < numFarms) {\r\n mapMsg = t(\"dashboard.notallwithvalidloc\") + \"
\" + noLocFarms;\r\n\r\n }\r\n\r\n\r\n\r\n if (locDataOK) {\r\n var centerLoc = locList[0];\r\n theDiv.style[\"display\"] = 'block';\r\n\r\n var selFarmLoc = FilterStore.getSelectedFarm().FarmLocation;\r\n\r\n\r\n if (!(selFarmLoc.Lon == 0 && selFarmLoc.Lat == 0)\r\n && (Math.abs(selFarmLoc.Lon) <= 180)\r\n && (Math.abs(selFarmLoc.Lat) <= 90)) {\r\n centerLoc = selFarmLoc;\r\n }\r\n\r\n\r\n\r\n var mapOptions = {\r\n zoom: 9,\r\n center: new google.maps.LatLng(centerLoc.Lat, centerLoc.Lon),\r\n mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n fullscreenControl: true,\r\n scaleControl: true\r\n }\r\n\r\n mappCenter = mapOptions.center;\r\n\r\n //***************\r\n if (navigator.appVersion.indexOf(\"Trident\") != -1 || navigator.appVersion.indexOf(\"Edge\") != -1 || navigator.appVersion.indexOf(\"MSIE \") != -1) {\r\n //Seems to need this for IE browsers\r\n this.map = null;\r\n }\r\n //*****************\r\n\r\n\r\n\r\n if (this.map == null) {\r\n\r\n\r\n theDiv.innerHTML = '';\r\n this.map = new google.maps.Map(document.getElementById('inner_map_div'), mapOptions);\r\n mapp = this.map;\r\n } else {\r\n try {\r\n this.map.setOptions(mapOptions);\r\n\r\n theDiv.innerHTML = '';\r\n theDiv.appendChild(this.map.getDiv())\r\n } catch (e) {\r\n console.log(\"Exception in showMap: \" + e)\r\n\r\n }\r\n\r\n /*\r\n var bounds = this.map.getBounds();\r\n \r\n var NE = bounds.getNorthEast();\r\n var SW = bounds.getSouthWest();\r\n \r\n \r\n if ((NE.lat() == SW.lat()) && (NE.lng() == SW.lng())) {\r\n \r\n //Happens when map has been hidden, window resized and map shown again\r\n setTimeout(function(){\r\n google.maps.event.trigger(mapp,'resize')\r\n mapp.setCenter (mappCenter)\r\n }, 50);\r\n }\r\n */\r\n\r\n }\r\n\r\n var infowindow = new google.maps.InfoWindow();\r\n var marker, i;\r\n var selIndex = -1;\r\n for (i = 0; i < locList.length; i++) {\r\n var color = \"82E0AA\";\r\n var zIdx = 0;\r\n if (locList[i].Name == FilterStore.getSelectedFarm().Name) {\r\n color = \"EC7063\";\r\n zIdx = 1;\r\n } else if (!locList[i].Active) {\r\n color = \"E5E7E9\";\r\n }\r\n\r\n /*\r\n icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=' + this.getIDLetter(locList[i].Name)+'|'+color+'|000000',\r\n */\r\n\r\n marker = new google.maps.Marker({\r\n position: new google.maps.LatLng(locList[i].Lat, locList[i].Lon),\r\n map: this.map,\r\n\r\n icon: 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=' + this.getIDLetter(locList[i].Name) + '|' + color + '|000000',\r\n\r\n zIndex: google.maps.Marker.MAX_ZINDEX + zIdx\r\n });\r\n google.maps.event.addListener(marker, 'click', (function (marker, i) {\r\n return function () {\r\n infowindow.setContent(locList[i].Name);\r\n infowindow.open(this.map, marker);\r\n }\r\n })(marker, i));\r\n\r\n\r\n\r\n\r\n\r\n\r\n this.markers.push(marker);\r\n }\r\n if (this.markers.length > 1) {\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i = 0; i < this.markers.length; i++) {\r\n bounds.extend(this.markers[i].getPosition());\r\n }\r\n this.map.fitBounds(bounds);\r\n }\r\n\r\n\r\n }\r\n\r\n if (mapMsg != \"\") {\r\n msgDiv.style[\"display\"] = 'block';\r\n msgDiv.innerHTML = mapMsg;\r\n } else {\r\n msgDiv.style[\"display\"] = 'none';\r\n }\r\n\r\n\r\n },\r\n\r\n\r\n onToggleMap: function () {\r\n\r\n var show = this.data.get(\"showMap\");\r\n\r\n\r\n show = !show;\r\n this.data = this.data.set(\"showMap\", show);\r\n\r\n if (show && this.map)\r\n this.notifyMount(); //Same issue here\r\n\r\n\r\n this.trigger(this.data);\r\n\r\n },\r\n\r\n\r\n\r\n\r\n\r\n getCurrentOrgDash: function () {\r\n var d = null;\r\n var oid = FilterStore.getSelectedOrgID();\r\n if (this.data) {\r\n var dl = this.data.get(\"allboardsData\");\r\n\r\n if (dl) {\r\n\r\n var orgs = dl.get(\"OrganisationList\")\r\n\r\n\r\n if (orgs) {\r\n\r\n var len = orgs.length;\r\n for (var i in orgs) {\r\n if (orgs[i].OrganisationID == oid) {\r\n\r\n d = orgs[i];\r\n break;\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n return d;\r\n },\r\n\r\n onApiNewDashboardData: function (newDashboardData) {\r\n\r\n\r\n this.setUpComments(newDashboardData);\r\n var immutableData = Immutable.Map(newDashboardData);\r\n this.data = this.data.set(\"dashboardData\", immutableData);\r\n\r\n \r\n\r\n if (!this.data.get(\"allboardsData\") || !this.data.get(\"allboardsData\").get(\"OrganisationList\")) {\r\n this.fetchAllDashboards();\r\n\r\n }\r\n\r\n this.trigger(this.data);\r\n },\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n getFarmUtilization: function (farm, def) {\r\n\r\n\r\n var FarmID = farm.FarmID;\r\n\r\n var len = UtilData.length;\r\n\r\n \r\n\r\n\r\n var i = 0;\r\n for (i = len - 1; i >= 0; i--) {\r\n if (UtilData[i].farmUtil.itemID == FarmID)\r\n break;\r\n }\r\n\r\n\r\n\r\n if (farm.UtilData == null) {\r\n return def;\r\n } else {\r\n var ret = farm.UtilData.farmUtil.day7Summary + \" / \" + farm.UtilData.farmUtil.day30Summary;\r\n\r\n return ret;\r\n\r\n }\r\n },\r\n\r\n\r\n onNewDashboardList: function(newDashboardList) {\r\n\r\n\r\n\r\n var numOrgs = newDashboardList.length;\r\n\r\n for (var i= 0; i