From 079af608318bbfaf16f29699b3b3cfc2f4229fbe Mon Sep 17 00:00:00 2001 From: cybice Date: Thu, 24 Sep 2015 21:47:06 +0300 Subject: [PATCH] Update: build to support windows (i think) --- .babelrc | 3 +- dist/GoogleMapReact.js | 7407 ++++++++++++++++++++++++++++++++++++ dist/GoogleMapReact.min.js | 7 + package.json | 8 +- scripts/build.sh | 13 - webpack.config.base.js | 31 + webpack.config.dev.js | 12 + webpack.config.js | 38 - webpack.config.prod.js | 18 + 9 files changed, 7483 insertions(+), 54 deletions(-) create mode 100644 dist/GoogleMapReact.js create mode 100644 dist/GoogleMapReact.min.js delete mode 100755 scripts/build.sh create mode 100644 webpack.config.base.js create mode 100644 webpack.config.dev.js delete mode 100644 webpack.config.js create mode 100644 webpack.config.prod.js diff --git a/.babelrc b/.babelrc index ce840ab..bcd01b8 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "stage": 0 + "stage": 0, + "loose": "all", } \ No newline at end of file diff --git a/dist/GoogleMapReact.js b/dist/GoogleMapReact.js new file mode 100644 index 0000000..2744419 --- /dev/null +++ b/dist/GoogleMapReact.js @@ -0,0 +1,7407 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("react"), require("react-dom")); + else if(typeof define === 'function' && define.amd) + define(["react", "react-dom"], factory); + else if(typeof exports === 'object') + exports["GoogleMapReact"] = factory(require("react"), require("react-dom")); + else + root["GoogleMapReact"] = factory(root["React"], root["ReactDOM"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_8__, __WEBPACK_EXTERNAL_MODULE_93__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _google_mapJs = __webpack_require__(21); + + var _google_mapJs2 = _interopRequireDefault(_google_mapJs); + + exports['default'] = _google_mapJs2['default']; + module.exports = exports['default']; + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isObject; + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + var getLength = __webpack_require__(77), + isLength = __webpack_require__(6); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + module.exports = isArrayLike; + + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + module.exports = isObjectLike; + + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + var isNative = __webpack_require__(82); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + module.exports = getNative; + + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + module.exports = isLength; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + + exports['default'] = proxyReactComponents; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _reactProxy = __webpack_require__(91); + + var _globalWindow = __webpack_require__(86); + + var _globalWindow2 = _interopRequireDefault(_globalWindow); + + var componentProxies = undefined; + if (_globalWindow2['default'].__reactComponentProxies) { + componentProxies = _globalWindow2['default'].__reactComponentProxies; + } else { + componentProxies = {}; + Object.defineProperty(_globalWindow2['default'], '__reactComponentProxies', { + configurable: true, + enumerable: false, + writable: false, + value: componentProxies + }); + } + + function proxyReactComponents(_ref) { + var filename = _ref.filename; + var components = _ref.components; + var imports = _ref.imports; + var locals = _ref.locals; + + var _imports = _slicedToArray(imports, 1); + + var React = _imports[0]; + + var _locals = _slicedToArray(locals, 1); + + var hot = _locals[0].hot; + + if (!React.Component) { + throw new Error('imports[0] for react-transform-hmr does not look like React.'); + } + + if (!hot || typeof hot.accept !== 'function') { + throw new Error('locals[0] does not appear to be a `module` object with Hot Module ' + 'replacement API enabled. You should disable react-transform-hmr in ' + 'production by using `env` section in Babel configuration. See the ' + 'example in README: https://github.com/gaearon/react-transform-hmr'); + } + + if (Object.keys(components).some(function (key) { + return !components[key].isInFunction; + })) { + hot.accept(function (err) { + if (err) { + console.warn('[React Transform HMR] There was an error updating ' + filename + ':'); + console.error(err); + } + }); + } + + var forceUpdate = (0, _reactProxy.getForceUpdate)(React); + + return function wrapWithProxy(ReactClass, uniqueId) { + var _components$uniqueId = components[uniqueId]; + var _components$uniqueId$isInFunction = _components$uniqueId.isInFunction; + var isInFunction = _components$uniqueId$isInFunction === undefined ? false : _components$uniqueId$isInFunction; + var _components$uniqueId$displayName = _components$uniqueId.displayName; + var displayName = _components$uniqueId$displayName === undefined ? uniqueId : _components$uniqueId$displayName; + + if (isInFunction) { + return ReactClass; + } + + var globalUniqueId = filename + '$' + uniqueId; + if (componentProxies[globalUniqueId]) { + (function () { + console.info('[React Transform HMR] Patching ' + displayName); + var instances = componentProxies[globalUniqueId].update(ReactClass); + setTimeout(function () { + return instances.forEach(forceUpdate); + }); + })(); + } else { + componentProxies[globalUniqueId] = (0, _reactProxy.createProxy)(ReactClass); + } + + return componentProxies[globalUniqueId].get(); + }; + } + + module.exports = exports['default']; + +/***/ }, +/* 8 */ +/***/ function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_8__; + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + module.exports = isIndex; + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(2), + isObjectLike = __webpack_require__(3); + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + module.exports = isArguments; + + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(5), + isLength = __webpack_require__(6), + isObjectLike = __webpack_require__(3); + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + module.exports = isArray; + + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module) {'use strict'; + + var _reactTransformHmr2 = __webpack_require__(7); + + var _reactTransformHmr3 = _interopRequireDefault(_reactTransformHmr2); + + var _react = __webpack_require__(8); + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var _react2 = _interopRequireDefault(_react); + + var _reactPureRenderFunction = __webpack_require__(18); + + var _reactPureRenderFunction2 = _interopRequireDefault(_reactPureRenderFunction); + + var _components = { + _$GoogleMapMarkers: { + displayName: 'GoogleMapMarkers' + } + }; + + var _reactComponentWrapper = _reactTransformHmr3['default']({ + filename: '/home/ice/ext/cinarra/cnr-frontend/fireball/app/tmp/google-map-react/src/google_map_markers.js', + components: _components, + locals: [module], + imports: [_react] + }); + + function _wrapComponent(uniqueId) { + return function (ReactClass) { + return _reactComponentWrapper(ReactClass, uniqueId); + }; + } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var mainStyle = { + width: '100%', + height: '100%', + left: 0, + top: 0, + margin: 0, + padding: 0, + position: 'absolute' + }; + + var style = { + width: 0, + height: 0, + left: 0, + top: 0, + backgroundColor: 'transparent', + position: 'absolute' + }; + + var GoogleMapMarkers = (function (_Component) { + _inherits(GoogleMapMarkers, _Component); + + _createClass(GoogleMapMarkers, null, [{ + key: 'propTypes', + value: { + geoService: _react.PropTypes.any, + style: _react.PropTypes.any, + distanceToMouse: _react.PropTypes.func, + dispatcher: _react.PropTypes.any, + onChildClick: _react.PropTypes.func, + onChildMouseLeave: _react.PropTypes.func, + onChildMouseEnter: _react.PropTypes.func, + hoverDistance: _react.PropTypes.number, + projectFromLeftTop: _react.PropTypes.bool + }, + enumerable: true + }, { + key: 'defaultProps', + value: { + projectFromLeftTop: false + }, + enumerable: true + }]); + + function GoogleMapMarkers(props) { + var _this = this; + + _classCallCheck(this, _GoogleMapMarkers); + + _Component.call(this, props); + this.shouldComponentUpdate = _reactPureRenderFunction2['default']; + + this._getState = function () { + return { + children: _this.props.dispatcher.getChildren(), + updateCounter: _this.props.dispatcher.getUpdateCounter() + }; + }; + + this._onChangeHandler = function () { + if (!_this.dimesionsCache_) { + return; + } + + var state = _this._getState(); + _this.setState(state); + }; + + this._onChildClick = function () { + if (_this.props.onChildClick) { + if (_this.hoverChildProps_) { + var hoverKey = _this.hoverKey_; + var childProps = _this.hoverChildProps_; + // click works only on hovered item + _this.props.onChildClick(hoverKey, childProps); + } + } + }; + + this._onChildMouseEnter = function (hoverKey, childProps) { + if (!_this.dimesionsCache_) { + return; + } + + if (_this.props.onChildMouseEnter) { + _this.props.onChildMouseEnter(hoverKey, childProps); + } + + _this.hoverChildProps_ = childProps; + _this.hoverKey_ = hoverKey; + _this.setState({ hoverKey: hoverKey }); + }; + + this._onChildMouseLeave = function () { + if (!_this.dimesionsCache_) { + return; + } + + var hoverKey = _this.hoverKey_; + var childProps = _this.hoverChildProps_; + + if (hoverKey !== undefined && hoverKey !== null) { + if (_this.props.onChildMouseLeave) { + _this.props.onChildMouseLeave(hoverKey, childProps); + } + + _this.hoverKey_ = null; + _this.hoverChildProps_ = null; + _this.setState({ hoverKey: null }); + } + }; + + this._onMouseAllow = function (value) { + if (!value) { + _this._onChildMouseLeave(); + } + + _this.allowMouse_ = value; + }; + + this._onMouseChangeHandler = function () { + if (_this.allowMouse_) { + _this._onMouseChangeHandler_raf(); + } + }; + + this._onMouseChangeHandler_raf = function () { + if (!_this.dimesionsCache_) { + return; + } + + var mp = _this.props.dispatcher.getMousePosition(); + + if (mp) { + (function () { + var distances = []; + + _react2['default'].Children.forEach(_this.state.children, function (child, childIndex) { + var childKey = child.key !== undefined && child.key !== null ? child.key : childIndex; + var dist = _this.props.distanceToMouse(_this.dimesionsCache_[childKey], mp, child.props); + if (dist < _this.props.hoverDistance) { + distances.push({ + key: childKey, + dist: dist, + props: child.props + }); + } + }); + + if (distances.length) { + distances.sort(function (a, b) { + return a.dist - b.dist; + }); + var hoverKey = distances[0].key; + var childProps = distances[0].props; + + if (_this.hoverKey_ !== hoverKey) { + _this._onChildMouseLeave(); + + _this._onChildMouseEnter(hoverKey, childProps); + } + } else { + _this._onChildMouseLeave(); + } + })(); + } else { + _this._onChildMouseLeave(); + } + }; + + this._getDimensions = function (key) { + var childKey = key; + return _this.dimesionsCache_[childKey]; + }; + + this.props.dispatcher.on('kON_CHANGE', this._onChangeHandler); + this.props.dispatcher.on('kON_MOUSE_POSITION_CHANGE', this._onMouseChangeHandler); + this.props.dispatcher.on('kON_CLICK', this._onChildClick); + + this.dimesionsCache_ = {}; + this.hoverKey_ = null; + this.hoverChildProps_ = null; + this.allowMouse_ = true; + + this.state = _extends({}, this._getState(), { hoverKey: null }); + } + + GoogleMapMarkers.prototype.componentWillUnmount = function componentWillUnmount() { + this.props.dispatcher.removeListener('kON_CHANGE', this._onChangeHandler); + this.props.dispatcher.removeListener('kON_MOUSE_POSITION_CHANGE', this._onMouseChangeHandler); + this.props.dispatcher.removeListener('kON_CLICK', this._onChildClick); + + this.dimesionsCache_ = null; + }; + + GoogleMapMarkers.prototype.render = function render() { + var _this2 = this; + + var mainElementStyle = this.props.style || mainStyle; + + this.dimesionsCache_ = {}; + + var markers = _react2['default'].Children.map(this.state.children, function (child, childIndex) { + var pt = _this2.props.geoService.project({ lat: child.props.lat, lng: child.props.lng }, _this2.props.projectFromLeftTop); + var stylePtPos = { + left: pt.x, + top: pt.y + }; + + var dx = 0; + var dy = 0; + + if (!_this2.props.projectFromLeftTop) { + // center projection + if (_this2.props.geoService.hasSize()) { + dx = _this2.props.geoService.getWidth() / 2; + dy = _this2.props.geoService.getHeight() / 2; + } + } + + // to prevent rerender on child element i need to pass const params $getDimensions and $dimensionKey instead of dimension object + var childKey = child.key !== undefined && child.key !== null ? child.key : childIndex; + _this2.dimesionsCache_[childKey] = { x: pt.x + dx, y: pt.y + dy, lat: child.props.lat, lng: child.props.lng }; + + return _react2['default'].createElement( + 'div', + { key: childKey, style: _extends({}, style, stylePtPos) }, + _react2['default'].cloneElement(child, { + $hover: childKey === _this2.state.hoverKey, + $getDimensions: _this2._getDimensions, + $dimensionKey: childKey, + $geoService: _this2.props.geoService, + $onMouseAllow: _this2._onMouseAllow + }) + ); + }); + + return _react2['default'].createElement( + 'div', + { style: mainElementStyle }, + markers + ); + }; + + var _GoogleMapMarkers = GoogleMapMarkers; + GoogleMapMarkers = _wrapComponent('_$GoogleMapMarkers')(GoogleMapMarkers) || GoogleMapMarkers; + return GoogleMapMarkers; + })(_react.Component); + + exports['default'] = GoogleMapMarkers; + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module))) + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + module.exports = LatLng; + + var wrap = __webpack_require__(14).wrap; + + function LatLng(lat, lng) { + if (isNaN(lat) || isNaN(lng)) { + throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')'); + } + this.lat = +lat; + this.lng = +lng; + } + + LatLng.prototype.wrap = function () { + return new LatLng(this.lat, wrap(this.lng, -180, 180)); + }; + + // constructs LatLng from an array if necessary + + LatLng.convert = function (a) { + if (a instanceof LatLng) { + return a; + } + if (Array.isArray(a)) { + return new LatLng(a[0], a[1]); + } + return a; + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.wrap = function (n, min, max) { + var d = max - min; + return n === max ? n : ((n - min) % d + d) % d + min; + }; + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.1.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var getNative = __webpack_require__(39), + isArguments = __webpack_require__(40), + isArray = __webpack_require__(41); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeKeys = getNative(Object, 'keys'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keys; + + +/***/ }, +/* 16 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + module.exports = isArguments; + + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = Point; + + function Point(x, y) { + this.x = x; + this.y = y; + } + + Point.prototype = { + clone: function() { return new Point(this.x, this.y); }, + + add: function(p) { return this.clone()._add(p); }, + sub: function(p) { return this.clone()._sub(p); }, + mult: function(k) { return this.clone()._mult(k); }, + div: function(k) { return this.clone()._div(k); }, + rotate: function(a) { return this.clone()._rotate(a); }, + matMult: function(m) { return this.clone()._matMult(m); }, + unit: function() { return this.clone()._unit(); }, + perp: function() { return this.clone()._perp(); }, + round: function() { return this.clone()._round(); }, + + mag: function() { + return Math.sqrt(this.x * this.x + this.y * this.y); + }, + + equals: function(p) { + return this.x === p.x && + this.y === p.y; + }, + + dist: function(p) { + return Math.sqrt(this.distSqr(p)); + }, + + distSqr: function(p) { + var dx = p.x - this.x, + dy = p.y - this.y; + return dx * dx + dy * dy; + }, + + angle: function() { + return Math.atan2(this.y, this.x); + }, + + angleTo: function(b) { + return Math.atan2(this.y - b.y, this.x - b.x); + }, + + angleWith: function(b) { + return this.angleWithSep(b.x, b.y); + }, + + // Find the angle of the two vectors, solving the formula for the cross product a x b = |a||b|sin(θ) for θ. + angleWithSep: function(x, y) { + return Math.atan2( + this.x * y - this.y * x, + this.x * x + this.y * y); + }, + + _matMult: function(m) { + var x = m[0] * this.x + m[1] * this.y, + y = m[2] * this.x + m[3] * this.y; + this.x = x; + this.y = y; + return this; + }, + + _add: function(p) { + this.x += p.x; + this.y += p.y; + return this; + }, + + _sub: function(p) { + this.x -= p.x; + this.y -= p.y; + return this; + }, + + _mult: function(k) { + this.x *= k; + this.y *= k; + return this; + }, + + _div: function(k) { + this.x /= k; + this.y /= k; + return this; + }, + + _unit: function() { + this._div(this.mag()); + return this; + }, + + _perp: function() { + var y = this.y; + this.y = this.x; + this.x = -y; + return this; + }, + + _rotate: function(angle) { + var cos = Math.cos(angle), + sin = Math.sin(angle), + x = cos * this.x - sin * this.y, + y = sin * this.x + cos * this.y; + this.x = x; + this.y = y; + return this; + }, + + _round: function() { + this.x = Math.round(this.x); + this.y = Math.round(this.y); + return this; + } + }; + + // constructs Point from an array if necessary + Point.convert = function (a) { + if (a instanceof Point) { + return a; + } + if (Array.isArray(a)) { + return new Point(a[0], a[1]); + } + return a; + }; + + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = shouldPureComponentUpdate; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _shallowEqual = __webpack_require__(60); + + var _shallowEqual2 = _interopRequireDefault(_shallowEqual); + + function shouldPureComponentUpdate(nextProps, nextState) { + return !(0, _shallowEqual2['default'])(this.props, nextProps) || !(0, _shallowEqual2['default'])(this.state, nextState); + } + + module.exports = exports['default']; + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + module.exports = restParam; + + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(5), + isArrayLike = __webpack_require__(2), + isObject = __webpack_require__(1), + shimKeys = __webpack_require__(80); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeKeys = getNative(Object, 'keys'); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + module.exports = keys; + + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module) {'use strict'; + + var _reactTransformHmr2 = __webpack_require__(7); + + var _reactTransformHmr3 = _interopRequireDefault(_reactTransformHmr2); + + var _react = __webpack_require__(8); + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var _react2 = _interopRequireDefault(_react); + + var _utilsReact_versionJs = __webpack_require__(30); + + var _reactPureRenderFunction = __webpack_require__(18); + + var _reactPureRenderFunction2 = _interopRequireDefault(_reactPureRenderFunction); + + var _marker_dispatcherJs = __webpack_require__(24); + + var _marker_dispatcherJs2 = _interopRequireDefault(_marker_dispatcherJs); + + var _google_map_mapJs = __webpack_require__(22); + + var _google_map_mapJs2 = _interopRequireDefault(_google_map_mapJs); + + var _google_map_markersJs = __webpack_require__(12); + + var _google_map_markersJs2 = _interopRequireDefault(_google_map_markersJs); + + var _google_map_markers_prerenderJs = __webpack_require__(23); + + var _google_map_markers_prerenderJs2 = _interopRequireDefault(_google_map_markers_prerenderJs); + + var _utilsLoadersGoogle_map_loaderJs = __webpack_require__(29); + + var _utilsLoadersGoogle_map_loaderJs2 = _interopRequireDefault(_utilsLoadersGoogle_map_loaderJs); + + var _utilsDetectJs = __webpack_require__(26); + + var _utilsDetectJs2 = _interopRequireDefault(_utilsDetectJs); + + var _utilsGeoJs = __webpack_require__(27); + + var _utilsGeoJs2 = _interopRequireDefault(_utilsGeoJs); + + var _utilsArray_helperJs = __webpack_require__(25); + + var _utilsArray_helperJs2 = _interopRequireDefault(_utilsArray_helperJs); + + var _lodashIsfunction = __webpack_require__(42); + + var _lodashIsfunction2 = _interopRequireDefault(_lodashIsfunction); + + var _lodashIsplainobject = __webpack_require__(44); + + var _lodashIsplainobject2 = _interopRequireDefault(_lodashIsplainobject); + + var _lodashPick = __webpack_require__(48); + + var _lodashPick2 = _interopRequireDefault(_lodashPick); + + var _lodashAssign = __webpack_require__(32); + + var _lodashAssign2 = _interopRequireDefault(_lodashAssign); + + var _lodashIsnumber = __webpack_require__(43); + + var _lodashIsnumber2 = _interopRequireDefault(_lodashIsnumber); + + var _components = { + _$GoogleMap: { + displayName: 'GoogleMap' + } + }; + + var _reactComponentWrapper = _reactTransformHmr3['default']({ + filename: '/home/ice/ext/cinarra/cnr-frontend/fireball/app/tmp/google-map-react/src/google_map.js', + components: _components, + locals: [module], + imports: [_react] + }); + + function _wrapComponent(uniqueId) { + return function (ReactClass) { + return _reactComponentWrapper(ReactClass, uniqueId); + }; + } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var ReactDOM = _utilsReact_versionJs.isReact14(_react2['default']) ? __webpack_require__(93) : _react2['default']; + + var kEPS = 0.00001; + var K_GOOGLE_TILE_SIZE = 256; + + function defaultOptions_() /*maps*/{ + return { + overviewMapControl: false, + streetViewControl: false, + rotateControl: true, + mapTypeControl: false, + // disable poi + styles: [{ featureType: 'poi', elementType: 'labels', stylers: [{ visibility: 'off' }] }], + minZoom: 3 // i need to dynamically calculate possible zoom value + }; + } + + var style = { + width: '100%', + height: '100%', + margin: 0, + padding: 0, + position: 'relative' + }; + + var GoogleMap = (function (_Component) { + _inherits(GoogleMap, _Component); + + _createClass(GoogleMap, null, [{ + key: 'propTypes', + value: { + apiKey: _react.PropTypes.string, + center: _react.PropTypes.array.isRequired, + zoom: _react.PropTypes.number.isRequired, + onBoundsChange: _react.PropTypes.func, + onChildClick: _react.PropTypes.func, + onChildMouseEnter: _react.PropTypes.func, + onChildMouseLeave: _react.PropTypes.func, + options: _react.PropTypes.any, + distanceToMouse: _react.PropTypes.func, + hoverDistance: _react.PropTypes.number, + debounced: _react.PropTypes.bool, + margin: _react.PropTypes.array, + googleMapLoader: _react.PropTypes.any + }, + enumerable: true + }, { + key: 'defaultProps', + value: { + distanceToMouse: function distanceToMouse(pt, mousePos /*, markerProps*/) { + var x = pt.x; + var y = pt.y; // - 20; + return Math.sqrt((x - mousePos.x) * (x - mousePos.x) + (y - mousePos.y) * (y - mousePos.y)); + }, + hoverDistance: 30, + debounced: true, + options: defaultOptions_, + googleMapLoader: _utilsLoadersGoogle_map_loaderJs2['default'] + }, + enumerable: true + }]); + + function GoogleMap(props) { + var _this = this; + + _classCallCheck(this, _GoogleMap); + + _Component.call(this, props); + this.shouldComponentUpdate = _reactPureRenderFunction2['default']; + + this._initMap = function () { + var center = _this.props.center; + _this.geoService_.setView(center, _this.props.zoom, 0); + + _this._onBoundsChanged(); // now we can calculate map bounds center etc... + + _this.props.googleMapLoader(_this.props.apiKey).then(function (maps) { + if (!_this.mounted_) { + return; + } + + var centerLatLng = _this.geoService_.getCenter(); + + var propsOptions = { + zoom: _this.props.zoom, + center: new maps.LatLng(centerLatLng.lat, centerLatLng.lng) + }; + + // prevent to exapose full api + // next props must be exposed (console.log(Object.keys(pick(maps, isPlainObject)))) + // "Animation", "ControlPosition", "MapTypeControlStyle", "MapTypeId", + // "NavigationControlStyle", "ScaleControlStyle", "StrokePosition", "SymbolPath", "ZoomControlStyle", + // "event", "DirectionsStatus", "DirectionsTravelMode", "DirectionsUnitSystem", "DistanceMatrixStatus", + // "DistanceMatrixElementStatus", "ElevationStatus", "GeocoderLocationType", "GeocoderStatus", "KmlLayerStatus", + // "MaxZoomStatus", "StreetViewStatus", "TransitMode", "TransitRoutePreference", "TravelMode", "UnitSystem" + var mapPlainObjects = _lodashPick2['default'](maps, _lodashIsplainobject2['default']); + var options = _lodashIsfunction2['default'](_this.props.options) ? _this.props.options(mapPlainObjects) : _this.props.options; + var defaultOptions = defaultOptions_(mapPlainObjects); + + var mapOptions = _extends({}, defaultOptions, options, propsOptions); + + var map = new maps.Map(ReactDOM.findDOMNode(_this.refs.google_map_dom), mapOptions); + _this.map_ = map; + _this.maps_ = maps; + + // render in overlay + var this_ = _this; + var overlay = _this.overlay_ = _lodashAssign2['default'](new maps.OverlayView(), { + onAdd: function onAdd() { + var K_MAX_WIDTH = typeof screen !== 'undefined' ? screen.width + 'px' : '2000px'; + var K_MAX_HEIGHT = typeof screen !== 'undefined' ? screen.height + 'px' : '2000px'; + + var div = document.createElement('div'); + this.div = div; + div.style.backgroundColor = 'transparent'; + div.style.position = 'absolute'; + div.style.left = '0px'; + div.style.top = '0px'; + div.style.width = K_MAX_WIDTH; // prevents some chrome draw defects + div.style.height = K_MAX_HEIGHT; + + var panes = this.getPanes(); + panes.overlayMouseTarget.appendChild(div); + + ReactDOM.render(_react2['default'].createElement(_google_map_markersJs2['default'], { + onChildClick: this_._onChildClick, + onChildMouseEnter: this_._onChildMouseEnter, + onChildMouseLeave: this_._onChildMouseLeave, + geoService: this_.geoService_, + projectFromLeftTop: true, + distanceToMouse: this_.props.distanceToMouse, + hoverDistance: this_.props.hoverDistance, + dispatcher: this_.markersDispatcher_ }), div, function () { + // remove prerendered markers + this_.setState({ overlayCreated: true }); + }); + }, + + onRemove: function onRemove() { + _react2['default'].unmountComponentAtNode(this.div); + }, + + draw: function draw() { + var div = overlay.div; + var overlayProjection = overlay.getProjection(); + var bounds = map.getBounds(); + var ne = bounds.getNorthEast(); + var sw = bounds.getSouthWest(); + var ptx = overlayProjection.fromLatLngToDivPixel(new maps.LatLng(ne.lat(), sw.lng())); + + // need round for safari still can't find what need for firefox + var ptxRounded = _utilsDetectJs2['default']().isSafari ? { x: Math.round(ptx.x), y: Math.round(ptx.y) } : { x: ptx.x, y: ptx.y }; + + this_.updateCounter_++; + this_._onBoundsChanged(map, maps, !this_.props.debounced); + + div.style.left = ptxRounded.x + 'px'; + div.style.top = ptxRounded.y + 'px'; + if (this_.markersDispatcher_) { + this_.markersDispatcher_.emit('kON_CHANGE'); + } + } + }); + + overlay.setMap(map); + + maps.event.addListener(map, 'zoom_changed', function () { + // recalc position at zoom start + if (this_.geoService_.getZoom() !== map.getZoom()) { + this_.updateCounter_++; + this_._onBoundsChanged(map, maps); + } + }); + + maps.event.addListener(map, 'idle', function () { + if (_this.resetSizeOnIdle_) { + _this._setViewSize(); + _this.resetSizeOnIdle_ = false; + } + + var div = overlay.div; + var overlayProjection = overlay.getProjection(); + var bounds = map.getBounds(); + var ne = bounds.getNorthEast(); + var sw = bounds.getSouthWest(); + var ptx = overlayProjection.fromLatLngToDivPixel(new maps.LatLng(ne.lat(), sw.lng())); + // need round for safari still can't find what need for firefox + var ptxRounded = _utilsDetectJs2['default']().isSafari ? { x: Math.round(ptx.x), y: Math.round(ptx.y) } : { x: ptx.x, y: ptx.y }; + + this_.updateCounter_++; + this_._onBoundsChanged(map, maps); + + this_.dragTime_ = 0; + div.style.left = ptxRounded.x + 'px'; + div.style.top = ptxRounded.y + 'px'; + if (this_.markersDispatcher_) { + this_.markersDispatcher_.emit('kON_CHANGE'); + if (this_.fireMouseEventOnIdle_) { + this_.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE'); + } + } + }); + + maps.event.addListener(map, 'mouseover', function () { + // has advantage over div MouseLeave + this_.mouseInMap_ = true; + }); + + maps.event.addListener(map, 'mouseout', function () { + // has advantage over div MouseLeave + this_.mouseInMap_ = false; + this_.mouse_ = null; + this_.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE'); + }); + + maps.event.addListener(map, 'drag', function () { + this_.dragTime_ = new Date().getTime(); + }); + })['catch'](function (e) { + console.error(e); // eslint-disable-line no-console + throw e; + }); + }; + + this._onChildClick = function () { + if (_this.props.onChildClick) { + var _props; + + return (_props = _this.props).onChildClick.apply(_props, arguments); + } + }; + + this._onChildMouseEnter = function () { + if (_this.props.onChildMouseEnter) { + var _props2; + + return (_props2 = _this.props).onChildMouseEnter.apply(_props2, arguments); + } + }; + + this._onChildMouseLeave = function () { + if (_this.props.onChildMouseLeave) { + var _props3; + + return (_props3 = _this.props).onChildMouseLeave.apply(_props3, arguments); + } + }; + + this._setViewSize = function () { + var mapDom = ReactDOM.findDOMNode(_this.refs.google_map_dom); + _this.geoService_.setViewSize(mapDom.clientWidth, mapDom.clientHeight); + _this._onBoundsChanged(); + }; + + this._onWindowResize = function () { + _this.resetSizeOnIdle_ = true; + }; + + this._onBoundsChanged = function (map, maps, callExtBoundsChange) { + if (map) { + var gmC = map.getCenter(); + _this.geoService_.setView([gmC.lat(), gmC.lng()], map.getZoom(), 0); + } + + if (_this.props.onBoundsChange && _this.geoService_.canProject()) { + var zoom = _this.geoService_.getZoom(); + var bounds = _this.geoService_.getBounds(); + var centerLatLng = _this.geoService_.getCenter(); + + if (!_utilsArray_helperJs2['default'](bounds, _this.prevBounds_, kEPS)) { + if (callExtBoundsChange !== false) { + var marginBounds = _this.geoService_.getBounds(_this.props.margin); + _this.props.onBoundsChange([centerLatLng.lat, centerLatLng.lng], zoom, bounds, marginBounds); + _this.prevBounds_ = bounds; + } + } + // uncomment for strange bugs + if (true) { + // compare with google calculations + if (map) { + var locBounds = map.getBounds(); + var ne = locBounds.getNorthEast(); + var sw = locBounds.getSouthWest(); + + var gmC = map.getCenter(); + // compare with google map + + if (!_utilsArray_helperJs2['default']([centerLatLng.lat, centerLatLng.lng], [gmC.lat(), gmC.lng()], kEPS)) { + console.info('GoogleMap center not eq:', [centerLatLng.lat, centerLatLng.lng], [gmC.lat(), gmC.lng()]); // eslint-disable-line no-console + } + + if (!_utilsArray_helperJs2['default'](bounds, [ne.lat(), sw.lng(), sw.lat(), ne.lng()], kEPS)) { + // this is normal if this message occured on resize + console.info('GoogleMap bounds not eq:', '\n', bounds, '\n', [ne.lat(), sw.lng(), sw.lat(), ne.lng()]); // eslint-disable-line no-console + } + } + } + } + }; + + this._onMouseMove = function (e) { + if (!_this.mouseInMap_) return; + + var currTime = new Date().getTime(); + var K_RECALC_CLIENT_RECT_MS = 3000; + + if (currTime - _this.mouseMoveTime_ > K_RECALC_CLIENT_RECT_MS) { + _this.boundingRect_ = e.currentTarget.getBoundingClientRect(); + } + _this.mouseMoveTime_ = currTime; + + var mousePosX = e.clientX - _this.boundingRect_.left; + var mousePosY = e.clientY - _this.boundingRect_.top; + + if (!_this.mouse_) { + _this.mouse_ = { x: 0, y: 0, lat: 0, lng: 0 }; + } + var K_IDLE_TIMEOUT = 100; + + _this.mouse_.x = mousePosX; + _this.mouse_.y = mousePosY; + + var latLng = _this.geoService_.unproject(_this.mouse_, true); + _this.mouse_.lat = latLng.lat; + _this.mouse_.lng = latLng.lng; + + if (currTime - _this.dragTime_ < K_IDLE_TIMEOUT) { + _this.fireMouseEventOnIdle_ = true; + } else { + _this.markersDispatcher_.emit('kON_MOUSE_POSITION_CHANGE'); + _this.fireMouseEventOnIdle_ = false; + } + }; + + this._onMapClick = function () { + if (_this.markersDispatcher_) { + var K_IDLE_TIMEOUT = 100; + var currTime = new Date().getTime(); + if (currTime - _this.dragTime_ > K_IDLE_TIMEOUT) { + _this.markersDispatcher_.emit('kON_CLICK'); + } + } + }; + + this._isCenterDefined = function (center) { + return center && center.length === 2 && _lodashIsnumber2['default'](center[0]) && _lodashIsnumber2['default'](center[1]); + }; + + this.mounted_ = false; + + this.map_ = null; + this.maps_ = null; + this.prevBounds_ = null; + + this.mouse_ = null; + this.mouseMoveTime_ = 0; + this.boundingRect_ = null; + this.mouseInMap_ = true; + + this.dragTime_ = 0; + this.fireMouseEventOnIdle_ = false; + this.updateCounter_ = 0; + + this.markersDispatcher_ = new _marker_dispatcherJs2['default'](this); + this.geoService_ = new _utilsGeoJs2['default'](K_GOOGLE_TILE_SIZE); + if (this._isCenterDefined(this.props.center)) { + this.geoService_.setView(this.props.center, this.props.zoom, 0); + } + + this.state = { + overlayCreated: false + }; + } + + GoogleMap.prototype.componentDidMount = function componentDidMount() { + var _this2 = this; + + this.mounted_ = true; + window.addEventListener('resize', this._onWindowResize); + + setTimeout(function () { + // to detect size + _this2._setViewSize(); + if (_this2._isCenterDefined(_this2.props.center)) { + _this2._initMap(); + } else { + _this2.props.googleMapLoader(_this2.props.apiKey); // начать подгружать можно уже сейчас + } + }, 0, this); + }; + + GoogleMap.prototype.componentWillUnmount = function componentWillUnmount() { + this.mounted_ = false; + + window.removeEventListener('resize', this._onWindowResize); + + if (this.overlay_) { + // this triggers overlay_.onRemove(), which will unmount the + this.overlay_.setMap(null); + } + + if (this.maps_ && this.map_) { + this.maps_.event.clearInstanceListeners(this.map_); + } + + this.map_ = null; + this.maps_ = null; + this.markersDispatcher_.dispose(); + + this.resetSizeOnIdle_ = false; + + delete this.map_; + delete this.markersDispatcher_; + }; + + GoogleMap.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var _this3 = this; + + if (!this._isCenterDefined(this.props.center) && this._isCenterDefined(nextProps.center)) { + setTimeout(function () { + return _this3._initMap(); + }, 0); + } + + if (this.map_) { + var centerLatLng = this.geoService_.getCenter(); + if (nextProps.center) { + if (Math.abs(nextProps.center[0] - centerLatLng.lat) + Math.abs(nextProps.center[1] - centerLatLng.lng) > kEPS) { + this.map_.panTo({ lat: nextProps.center[0], lng: nextProps.center[1] }); + } + } + + // if zoom chaged by user + if (Math.abs(nextProps.zoom - this.props.zoom) > 0) { + this.map_.setZoom(nextProps.zoom); + } + } + }; + + GoogleMap.prototype.componentDidUpdate = function componentDidUpdate() { + this.markersDispatcher_.emit('kON_CHANGE'); + }; + + GoogleMap.prototype.render = function render() { + var mapMarkerPrerender = !this.state.overlayCreated ? _react2['default'].createElement(_google_map_markers_prerenderJs2['default'], { + onChildClick: this._onChildClick, + onChildMouseEnter: this._onChildMouseEnter, + onChildMouseLeave: this._onChildMouseLeave, + geoService: this.geoService_, + projectFromLeftTop: false, + distanceToMouse: this.props.distanceToMouse, + hoverDistance: this.props.hoverDistance, + dispatcher: this.markersDispatcher_ }) : null; + + return _react2['default'].createElement( + 'div', + { style: style, onMouseMove: this._onMouseMove, onClick: this._onMapClick }, + _react2['default'].createElement(_google_map_mapJs2['default'], { ref: 'google_map_dom' }), + mapMarkerPrerender + ); + }; + + var _GoogleMap = GoogleMap; + GoogleMap = _wrapComponent('_$GoogleMap')(GoogleMap) || GoogleMap; + return GoogleMap; + })(_react.Component); + + exports['default'] = GoogleMap; + module.exports = exports['default']; + /*render markers before map load done*/ + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module))) + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module) {'use strict'; + + var _reactTransformHmr2 = __webpack_require__(7); + + var _reactTransformHmr3 = _interopRequireDefault(_reactTransformHmr2); + + var _react = __webpack_require__(8); + + exports.__esModule = true; + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var _react2 = _interopRequireDefault(_react); + + var _components = { + _$GoogleMapMap: { + displayName: 'GoogleMapMap' + } + }; + + var _reactComponentWrapper = _reactTransformHmr3['default']({ + filename: '/home/ice/ext/cinarra/cnr-frontend/fireball/app/tmp/google-map-react/src/google_map_map.js', + components: _components, + locals: [module], + imports: [_react] + }); + + function _wrapComponent(uniqueId) { + return function (ReactClass) { + return _reactComponentWrapper(ReactClass, uniqueId); + }; + } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var style = { + width: '100%', + height: '100%', + left: 0, + top: 0, + margin: 0, + padding: 0, + position: 'absolute' + }; + + var GoogleMapMap = (function (_Component) { + _inherits(GoogleMapMap, _Component); + + function GoogleMapMap(props) { + _classCallCheck(this, _GoogleMapMap); + + _Component.call(this, props); + } + + GoogleMapMap.prototype.shouldComponentUpdate = function shouldComponentUpdate() { + return false; // disable react on this div + }; + + GoogleMapMap.prototype.render = function render() { + return _react2['default'].createElement('div', { style: style }); + }; + + var _GoogleMapMap = GoogleMapMap; + GoogleMapMap = _wrapComponent('_$GoogleMapMap')(GoogleMapMap) || GoogleMapMap; + return GoogleMapMap; + })(_react.Component); + + exports['default'] = GoogleMapMap; + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module))) + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module) {'use strict'; + + var _reactTransformHmr2 = __webpack_require__(7); + + var _reactTransformHmr3 = _interopRequireDefault(_reactTransformHmr2); + + var _react = __webpack_require__(8); + + exports.__esModule = true; + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var _react2 = _interopRequireDefault(_react); + + var _google_map_markersJs = __webpack_require__(12); + + var _google_map_markersJs2 = _interopRequireDefault(_google_map_markersJs); + + var _components = { + _$GoogleMapMarkersPrerender: { + displayName: 'GoogleMapMarkersPrerender' + } + }; + + var _reactComponentWrapper = _reactTransformHmr3['default']({ + filename: '/home/ice/ext/cinarra/cnr-frontend/fireball/app/tmp/google-map-react/src/google_map_markers_prerender.js', + components: _components, + locals: [module], + imports: [_react] + }); + + function _wrapComponent(uniqueId) { + return function (ReactClass) { + return _reactComponentWrapper(ReactClass, uniqueId); + }; + } + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var style = { + width: '50%', + height: '50%', + left: '50%', + top: '50%', + // backgroundColor: 'red', + margin: 0, + padding: 0, + position: 'absolute' + // opacity: 0.3 + }; + + var GoogleMapMarkersPrerender = (function (_Component) { + _inherits(GoogleMapMarkersPrerender, _Component); + + function GoogleMapMarkersPrerender(props) { + _classCallCheck(this, _GoogleMapMarkersPrerender); + + _Component.call(this, props); + } + + GoogleMapMarkersPrerender.prototype.render = function render() { + return _react2['default'].createElement( + 'div', + { style: style }, + _react2['default'].createElement(_google_map_markersJs2['default'], this.props) + ); + }; + + var _GoogleMapMarkersPrerender = GoogleMapMarkersPrerender; + GoogleMapMarkersPrerender = _wrapComponent('_$GoogleMapMarkersPrerender')(GoogleMapMarkersPrerender) || GoogleMapMarkersPrerender; + return GoogleMapMarkersPrerender; + })(_react.Component); + + exports['default'] = GoogleMapMarkersPrerender; + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)(module))) + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var _eventemitter3 = __webpack_require__(31); + + var _eventemitter32 = _interopRequireDefault(_eventemitter3); + + var MarkerDispatcher = (function (_EventEmitter) { + _inherits(MarkerDispatcher, _EventEmitter); + + function MarkerDispatcher(gmapInstance) { + _classCallCheck(this, MarkerDispatcher); + + _EventEmitter.call(this); + this.gmapInstance = gmapInstance; + } + + MarkerDispatcher.prototype.getChildren = function getChildren() { + return this.gmapInstance.props.children; + }; + + MarkerDispatcher.prototype.getMousePosition = function getMousePosition() { + return this.gmapInstance.mouse_; + }; + + MarkerDispatcher.prototype.getUpdateCounter = function getUpdateCounter() { + return this.gmapInstance.updateCounter_; + }; + + MarkerDispatcher.prototype.dispose = function dispose() { + this.gmapInstance = null; + this.removeAllListeners(); + }; + + return MarkerDispatcher; + })(_eventemitter32['default']); + + exports['default'] = MarkerDispatcher; + module.exports = exports['default']; + +/***/ }, +/* 25 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports["default"] = isArraysEqualEps; + + function isArraysEqualEps(arrayA, arrayB, eps) { + if (arrayA && arrayB) { + for (var i = 0; i !== arrayA.length; ++i) { + if (Math.abs(arrayA[i] - arrayB[i]) > eps) { + return false; + } + } + return true; + } + return false; + } + + module.exports = exports["default"]; + +/***/ }, +/* 26 */ +/***/ function(module, exports) { + + // code here http://stackoverflow.com/questions/5899783/detect-safari-chrome-ie-firefox-opera-with-user-agent + 'use strict'; + + exports.__esModule = true; + exports['default'] = detectBrowser; + var detectBrowserResult_ = null; + + function detectBrowser() { + if (detectBrowserResult_) { + return detectBrowserResult_; + } + + if (typeof navigator !== 'undefined') { + var isExplorer = navigator.userAgent.indexOf('MSIE') > -1; + var isFirefox = navigator.userAgent.indexOf('Firefox') > -1; + var isOpera = navigator.userAgent.toLowerCase().indexOf('op') > -1; + + var isChrome = navigator.userAgent.indexOf('Chrome') > -1; + var isSafari = navigator.userAgent.indexOf('Safari') > -1; + + if (isChrome && isSafari) { + isSafari = false; + } + + if (isChrome && isOpera) { + isChrome = false; + } + + detectBrowserResult_ = { isExplorer: isExplorer, isFirefox: isFirefox, isOpera: isOpera, isChrome: isChrome, isSafari: isSafari }; + return detectBrowserResult_; + } + + detectBrowserResult_ = { isChrome: true, isExplorer: false, isFirefox: false, isOpera: false, isSafari: false }; + return detectBrowserResult_; + } + + module.exports = exports['default']; + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _lib_geoLat_lngJs = __webpack_require__(13); + + var _lib_geoLat_lngJs2 = _interopRequireDefault(_lib_geoLat_lngJs); + + var _pointGeometry = __webpack_require__(17); + + var _pointGeometry2 = _interopRequireDefault(_pointGeometry); + + var _lib_geoTransformJs = __webpack_require__(28); + + var _lib_geoTransformJs2 = _interopRequireDefault(_lib_geoTransformJs); + + var Geo = (function () { + function Geo(tileSize) { + _classCallCheck(this, Geo); + + // left_top view пользует гугл + // super(); + this.hasSize_ = false; + this.hasView_ = false; + this.transform_ = new _lib_geoTransformJs2['default'](tileSize || 512); + } + + Geo.prototype.setView = function setView(center, zoom, bearing) { + this.transform_.center = _lib_geoLat_lngJs2['default'].convert(center); + this.transform_.zoom = +zoom; + this.transform_.bearing = +bearing; + this.hasView_ = true; + }; + + Geo.prototype.setViewSize = function setViewSize(width, height) { + this.transform_.width = width; + this.transform_.height = height; + this.hasSize_ = true; + }; + + Geo.prototype.canProject = function canProject() { + return this.hasSize_ && this.hasView_; + }; + + Geo.prototype.hasSize = function hasSize() { + return this.hasSize_; + }; + + Geo.prototype.unproject = function unproject(ptXY, viewFromLeftTop) { + var ptRes = undefined; + if (viewFromLeftTop) { + var ptxy = _extends({}, ptXY); + ptxy.x -= this.transform_.width / 2; + ptxy.y -= this.transform_.height / 2; + ptRes = this.transform_.pointLocation(_pointGeometry2['default'].convert(ptxy)); + } else { + ptRes = this.transform_.pointLocation(_pointGeometry2['default'].convert(ptXY)); + } + + ptRes.lng -= 360 * Math.round(ptRes.lng / 360); // convert 2 google format + return ptRes; + }; + + Geo.prototype.project = function project(ptLatLng, viewFromLeftTop) { + if (viewFromLeftTop) { + var pt = this.transform_.locationPoint(_lib_geoLat_lngJs2['default'].convert(ptLatLng)); + pt.x -= this.transform_.worldSize * Math.round(pt.x / this.transform_.worldSize); + + pt.x += this.transform_.width / 2; + pt.y += this.transform_.height / 2; + + return pt; + } + + return this.transform_.locationPoint(_lib_geoLat_lngJs2['default'].convert(ptLatLng)); + }; + + Geo.prototype.getWidth = function getWidth() { + return this.transform_.width; + }; + + Geo.prototype.getHeight = function getHeight() { + return this.transform_.height; + }; + + Geo.prototype.getZoom = function getZoom() { + return this.transform_.zoom; + }; + + Geo.prototype.getCenter = function getCenter() { + var ptRes = this.transform_.pointLocation({ x: 0, y: 0 }); + + return ptRes; + }; + + Geo.prototype.getBounds = function getBounds(margins, roundFactor) { + var bndT = margins && margins[0] || 0; + var bndR = margins && margins[1] || 0; + var bndB = margins && margins[2] || 0; + var bndL = margins && margins[3] || 0; + + if (this.getWidth() - bndR - bndL > 0 && this.getHeight() - bndT - bndB > 0) { + var topLeftCorner = this.unproject({ x: bndL - this.getWidth() / 2, y: bndT - this.getHeight() / 2 }); + var bottomRightCorner = this.unproject({ x: this.getWidth() / 2 - bndR, y: this.getHeight() / 2 - bndB }); + + var res = [topLeftCorner.lat, topLeftCorner.lng, bottomRightCorner.lat, bottomRightCorner.lng]; + + if (roundFactor) { + res = res.map(function (r) { + return Math.round(r * roundFactor) / roundFactor; + }); + } + return res; + } + + return [0, 0, 0, 0]; + }; + + return Geo; + })(); + + exports['default'] = Geo; + module.exports = exports['default']; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var LatLng = __webpack_require__(13); + var Point = __webpack_require__(17); + var wrap = __webpack_require__(14).wrap; + + // A single transform, generally used for a single tile to be scaled, rotated, and zoomed. + + function Transform(tileSize, minZoom, maxZoom) { + this.tileSize = tileSize || 512; // constant + + this._minZoom = minZoom || 0; + this._maxZoom = maxZoom || 52; + + this.latRange = [-85.05113, 85.05113]; + + this.width = 0; + this.height = 0; + this.zoom = 0; + this.center = new LatLng(0, 0); + this.angle = 0; + } + + Transform.prototype = Object.defineProperties({ + + zoomScale: function zoomScale(zoom) { + return Math.pow(2, zoom); + }, + scaleZoom: function scaleZoom(scale) { + return Math.log(scale) / Math.LN2; + }, + + project: function project(latlng, worldSize) { + return new Point(this.lngX(latlng.lng, worldSize), this.latY(latlng.lat, worldSize)); + }, + + unproject: function unproject(point, worldSize) { + return new LatLng(this.yLat(point.y, worldSize), this.xLng(point.x, worldSize)); + }, + + // lat/lon <-> absolute pixel coords convertion + lngX: function lngX(lon, worldSize) { + return (180 + lon) * (worldSize || this.worldSize) / 360; + }, + // latitude to absolute y coord + latY: function latY(lat, worldSize) { + var y = 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)); + return (180 - y) * (worldSize || this.worldSize) / 360; + }, + + xLng: function xLng(x, worldSize) { + return x * 360 / (worldSize || this.worldSize) - 180; + }, + yLat: function yLat(y, worldSize) { + var y2 = 180 - y * 360 / (worldSize || this.worldSize); + return 360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90; + }, + + locationPoint: function locationPoint(latlng) { + var p = this.project(latlng); + return this.centerPoint._sub(this.point._sub(p)._rotate(this.angle)); + }, + + pointLocation: function pointLocation(p) { + var p2 = this.centerPoint._sub(p)._rotate(-this.angle); + return this.unproject(this.point.sub(p2)); + } + + }, { + minZoom: { + get: function get() { + return this._minZoom; + }, + set: function set(zoom) { + this._minZoom = zoom; + this.zoom = Math.max(this.zoom, zoom); + }, + configurable: true, + enumerable: true + }, + maxZoom: { + get: function get() { + return this._maxZoom; + }, + set: function set(zoom) { + this._maxZoom = zoom; + this.zoom = Math.min(this.zoom, zoom); + }, + configurable: true, + enumerable: true + }, + worldSize: { + get: function get() { + return this.tileSize * this.scale; + }, + configurable: true, + enumerable: true + }, + centerPoint: { + get: function get() { + return new Point(0, 0); // this.size._div(2); + }, + configurable: true, + enumerable: true + }, + size: { + get: function get() { + return new Point(this.width, this.height); + }, + configurable: true, + enumerable: true + }, + bearing: { + get: function get() { + return -this.angle / Math.PI * 180; + }, + set: function set(bearing) { + this.angle = -wrap(bearing, -180, 180) * Math.PI / 180; + }, + configurable: true, + enumerable: true + }, + zoom: { + get: function get() { + return this._zoom; + }, + set: function set(zoom) { + zoom = Math.min(Math.max(zoom, this.minZoom), this.maxZoom); + this._zoom = zoom; + this.scale = this.zoomScale(zoom); + this.tileZoom = Math.floor(zoom); + this.zoomFraction = zoom - this.tileZoom; + }, + configurable: true, + enumerable: true + }, + x: { + get: function get() { + return this.lngX(this.center.lng); + }, + configurable: true, + enumerable: true + }, + y: { + get: function get() { + return this.latY(this.center.lat); + }, + configurable: true, + enumerable: true + }, + point: { + get: function get() { + return new Point(this.x, this.y); + }, + configurable: true, + enumerable: true + } + }); + + module.exports = Transform; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var $script_ = null; + + var _loadPromise = undefined; + + // TODO add libraries language and other map options + module.exports = function googleMapLoader(apiKey) { + if (!$script_) { + $script_ = __webpack_require__(61); + } + + if (_loadPromise) { + return _loadPromise; + } + + _loadPromise = new Promise(function (resolve, reject) { + if (typeof window === 'undefined') { + reject(new Error('google map cannot be loaded outside browser env')); + return; + } + + if (window.google && window.google.maps) { + resolve(window.google.maps); + return; + } + + if (typeof window._$_google_map_initialize_$_ !== 'undefined') { + reject(new Error('google map initialization error')); + } + + window._$_google_map_initialize_$_ = function () { + delete window._$_google_map_initialize_$_; + resolve(window.google.maps); + }; + + var apiKeyString = apiKey ? '&key=' + apiKey : ''; + + $script_('https://maps.googleapis.com/maps/api/js?callback=_$_google_map_initialize_$_' + apiKeyString, function () { + if (typeof window.google === 'undefined') { + reject(new Error('google map initialization error (not loaded)')); + } + }); + }); + + return _loadPromise; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.isReact14 = isReact14; + + function isReact14(React) { + var version = React.version; + + if (typeof version !== 'string') { + return false; + } + + var sections = version.split('.'); + var major = parseInt(sections[0], 10); + var minor = parseInt(sections[1], 10); + + return major === 0 && minor > 13; + } + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + // + // We store our EE objects in a plain object whose properties are event names. + // If `Object.create(null)` is not supported we prefix the event names with a + // `~` to make sure that the built-in object properties are not overridden or + // used as an attack vector. + // We also assume that `Object.create(null)` is available when the event name + // is an ES6 Symbol. + // + var prefix = typeof Object.create !== 'function' ? '~' : false; + + /** + * Representation of a single EventEmitter function. + * + * @param {Function} fn Event handler to be called. + * @param {Mixed} context Context for function execution. + * @param {Boolean} once Only emit once + * @api private + */ + function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; + } + + /** + * Minimal EventEmitter interface that is molded against the Node.js + * EventEmitter interface. + * + * @constructor + * @api public + */ + function EventEmitter() { /* Nothing to set */ } + + /** + * Holds the assigned EventEmitters by name. + * + * @type {Object} + * @private + */ + EventEmitter.prototype._events = undefined; + + /** + * Return a list of assigned event listeners. + * + * @param {String} event The events that should be listed. + * @param {Boolean} exists We only need to know if there are listeners. + * @returns {Array|Boolean} + * @api public + */ + EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events && this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; + }; + + /** + * Emit an event to all registered event listeners. + * + * @param {String} event The name of the event. + * @returns {Boolean} Indication if we've emitted an event. + * @api public + */ + EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events || !this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if ('function' === typeof listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; + }; + + /** + * Register a new EventListener for the given event. + * + * @param {String} event Name of the event. + * @param {Functon} fn Callback function. + * @param {Mixed} context The context of the function. + * @api public + */ + EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; + + if (!this._events) this._events = prefix ? {} : Object.create(null); + if (!this._events[evt]) this._events[evt] = listener; + else { + if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [ + this._events[evt], listener + ]; + } + + return this; + }; + + /** + * Add an EventListener that's only called once. + * + * @param {String} event Name of the event. + * @param {Function} fn Callback function. + * @param {Mixed} context The context of the function. + * @api public + */ + EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; + + if (!this._events) this._events = prefix ? {} : Object.create(null); + if (!this._events[evt]) this._events[evt] = listener; + else { + if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [ + this._events[evt], listener + ]; + } + + return this; + }; + + /** + * Remove event listeners. + * + * @param {String} event The event we want to remove. + * @param {Function} fn The listener that we need to find. + * @param {Mixed} context Only remove listeners matching this context. + * @param {Boolean} once Only remove once listeners. + * @api public + */ + EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events || !this._events[evt]) return this; + + var listeners = this._events[evt] + , events = []; + + if (fn) { + if (listeners.fn) { + if ( + listeners.fn !== fn + || (once && !listeners.once) + || (context && listeners.context !== context) + ) { + events.push(listeners); + } + } else { + for (var i = 0, length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) { + this._events[evt] = events.length === 1 ? events[0] : events; + } else { + delete this._events[evt]; + } + + return this; + }; + + /** + * Remove all listeners or only the listeners for the specified event. + * + * @param {String} event The event want to remove all listeners for. + * @api public + */ + EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + if (!this._events) return this; + + if (event) delete this._events[prefix ? prefix + event : event]; + else this._events = prefix ? {} : Object.create(null); + + return this; + }; + + // + // Alias methods names because people roll like that. + // + EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + EventEmitter.prototype.addListener = EventEmitter.prototype.on; + + // + // This function doesn't apply anymore. + // + EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; + }; + + // + // Expose the prefix. + // + EventEmitter.prefixed = prefix; + + // + // Expose the module. + // + if (true) { + module.exports = EventEmitter; + } + + +/***/ }, +/* 32 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseAssign = __webpack_require__(33), + createAssigner = __webpack_require__(35), + keys = __webpack_require__(15); + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it is invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + module.exports = assign; + + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseCopy = __webpack_require__(34), + keys = __webpack_require__(15); + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + module.exports = baseAssign; + + +/***/ }, +/* 34 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + module.exports = baseCopy; + + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.1.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var bindCallback = __webpack_require__(36), + isIterateeCall = __webpack_require__(37), + restParam = __webpack_require__(38); + + /** + * Creates a function that assigns properties of source object(s) to a given + * destination object. + * + * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + module.exports = createAssigner; + + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = bindCallback; + + +/***/ }, +/* 37 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.9 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isIterateeCall; + + +/***/ }, +/* 38 */ +/***/ function(module, exports) { + + /** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + module.exports = restParam; + + +/***/ }, +/* 39 */ +/***/ function(module, exports) { + + /** + * lodash 3.9.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = getNative; + + +/***/ }, +/* 40 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + module.exports = isArguments; + + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isArray; + + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.6 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var funcTag = '[object Function]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = isFunction; + + +/***/ }, +/* 43 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.2 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var numberTag = '[object Number]'; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified + * as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isNumber(8.4); + * // => true + * + * _.isNumber(NaN); + * // => true + * + * _.isNumber('8.4'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); + } + + module.exports = isNumber; + + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.2.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseFor = __webpack_require__(45), + isArguments = __webpack_require__(16), + keysIn = __webpack_require__(46); + + /** `Object#toString` result references. */ + var objectTag = '[object Object]'; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + module.exports = isPlainObject; + + +/***/ }, +/* 45 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = baseFor; + + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.0.8 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var isArguments = __webpack_require__(16), + isArray = __webpack_require__(47); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keysIn; + + +/***/ }, +/* 47 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isArray; + + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.1.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.2 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseFlatten = __webpack_require__(49), + bindCallback = __webpack_require__(52), + pickByArray = __webpack_require__(53), + pickByCallback = __webpack_require__(54), + restParam = __webpack_require__(59); + + /** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it is invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ + var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); + }); + + module.exports = pick; + + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.1.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var isArguments = __webpack_require__(50), + isArray = __webpack_require__(51); + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + module.exports = baseFlatten; + + +/***/ }, +/* 50 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + module.exports = isArguments; + + +/***/ }, +/* 51 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isArray; + + +/***/ }, +/* 52 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = bindCallback; + + +/***/ }, +/* 53 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ + function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = pickByArray; + + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.0.0 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.7.0 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var baseFor = __webpack_require__(55), + keysIn = __webpack_require__(56); + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * A specialized version of `_.pick` that picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ + function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; + } + + module.exports = pickByCallback; + + +/***/ }, +/* 55 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.2 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + module.exports = baseFor; + + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * lodash 3.0.8 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + var isArguments = __webpack_require__(57), + isArray = __webpack_require__(58); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keysIn; + + +/***/ }, +/* 57 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Native method references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + module.exports = isArguments; + + +/***/ }, +/* 58 */ +/***/ function(module, exports) { + + /** + * lodash 3.0.4 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** `Object#toString` result references. */ + var arrayTag = '[object Array]', + funcTag = '[object Function]'; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeIsArray = getNative(Array, 'isArray'); + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isArray; + + +/***/ }, +/* 59 */ +/***/ function(module, exports) { + + /** + * lodash 3.6.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + module.exports = restParam; + + +/***/ }, +/* 60 */ +/***/ function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports['default'] = shallowEqual; + + function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) { + return false; + } + + // Test for A's keys different from B. + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + for (var i = 0; i < keysA.length; i++) { + if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { + return false; + } + } + + return true; + } + + module.exports = exports['default']; + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * $script.js JS loader & dependency manager + * https://github.com/ded/script.js + * (c) Dustin Diaz 2014 | License MIT + */ + + (function (name, definition) { + if (typeof module != 'undefined' && module.exports) module.exports = definition() + else if (true) !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) + else this[name] = definition() + })('$script', function () { + var doc = document + , head = doc.getElementsByTagName('head')[0] + , s = 'string' + , f = false + , push = 'push' + , readyState = 'readyState' + , onreadystatechange = 'onreadystatechange' + , list = {} + , ids = {} + , delay = {} + , scripts = {} + , scriptpath + , urlArgs + + function every(ar, fn) { + for (var i = 0, j = ar.length; i < j; ++i) if (!fn(ar[i])) return f + return 1 + } + function each(ar, fn) { + every(ar, function (el) { + return !fn(el) + }) + } + + function $script(paths, idOrDone, optDone) { + paths = paths[push] ? paths : [paths] + var idOrDoneIsDone = idOrDone && idOrDone.call + , done = idOrDoneIsDone ? idOrDone : optDone + , id = idOrDoneIsDone ? paths.join('') : idOrDone + , queue = paths.length + function loopFn(item) { + return item.call ? item() : list[item] + } + function callback() { + if (!--queue) { + list[id] = 1 + done && done() + for (var dset in delay) { + every(dset.split('|'), loopFn) && !each(delay[dset], loopFn) && (delay[dset] = []) + } + } + } + setTimeout(function () { + each(paths, function loading(path, force) { + if (path === null) return callback() + + if (!force && !/^https?:\/\//.test(path) && scriptpath) { + path = (path.indexOf('.js') === -1) ? scriptpath + path + '.js' : scriptpath + path; + } + + if (scripts[path]) { + if (id) ids[id] = 1 + return (scripts[path] == 2) ? callback() : setTimeout(function () { loading(path, true) }, 0) + } + + scripts[path] = 1 + if (id) ids[id] = 1 + create(path, callback) + }) + }, 0) + return $script + } + + function create(path, fn) { + var el = doc.createElement('script'), loaded + el.onload = el.onerror = el[onreadystatechange] = function () { + if ((el[readyState] && !(/^c|loade/.test(el[readyState]))) || loaded) return; + el.onload = el[onreadystatechange] = null + loaded = 1 + scripts[path] = 2 + fn() + } + el.async = 1 + el.src = urlArgs ? path + (path.indexOf('?') === -1 ? '?' : '&') + urlArgs : path; + head.insertBefore(el, head.lastChild) + } + + $script.get = create + + $script.order = function (scripts, id, done) { + (function callback(s) { + s = scripts.shift() + !scripts.length ? $script(s, id, done) : $script(s, callback) + }()) + } + + $script.path = function (p) { + scriptpath = p + } + $script.urlArgs = function (str) { + urlArgs = str; + } + $script.ready = function (deps, ready, req) { + deps = deps[push] ? deps : [deps] + var missing = []; + !each(deps, function (dep) { + list[dep] || missing[push](dep); + }) && every(deps, function (dep) {return list[dep]}) ? + ready() : !function (key) { + delay[key] = delay[key] || [] + delay[key][push](ready) + req && req(missing) + }(deps.join('|')) + return $script + } + + $script.done = function (idOrDone) { + $script([null], idOrDone) + } + + return $script + }); + + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + var baseDifference = __webpack_require__(68), + baseFlatten = __webpack_require__(69), + isArrayLike = __webpack_require__(2), + isObjectLike = __webpack_require__(3), + restParam = __webpack_require__(19); + + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ + var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; + }); + + module.exports = difference; + + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {var cachePush = __webpack_require__(74), + getNative = __webpack_require__(5); + + /** Native method references. */ + var Set = getNative(global, 'Set'); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeCreate = getNative(Object, 'create'); + + /** + * + * Creates a cache object to store unique values. + * + * @private + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var length = values ? values.length : 0; + + this.data = { 'hash': nativeCreate(null), 'set': new Set }; + while (length--) { + this.push(values[length]); + } + } + + // Add functions to the `Set` cache. + SetCache.prototype.push = cachePush; + + module.exports = SetCache; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 64 */ +/***/ function(module, exports) { + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + module.exports = arrayPush; + + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + var keys = __webpack_require__(20); + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + module.exports = assignWith; + + +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { + + var baseCopy = __webpack_require__(67), + keys = __webpack_require__(20); + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + module.exports = baseAssign; + + +/***/ }, +/* 67 */ +/***/ function(module, exports) { + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + module.exports = baseCopy; + + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + var baseIndexOf = __webpack_require__(70), + cacheIndexOf = __webpack_require__(73), + createCache = __webpack_require__(76); + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** + * The base implementation of `_.difference` which accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values) { + var length = array ? array.length : 0, + result = []; + + if (!length) { + return result; + } + var index = -1, + indexOf = baseIndexOf, + isCommon = true, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, + valuesLength = values.length; + + if (cache) { + indexOf = cacheIndexOf; + isCommon = false; + values = cache; + } + outer: + while (++index < length) { + var value = array[index]; + + if (isCommon && value === value) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === value) { + continue outer; + } + } + result.push(value); + } + else if (indexOf(values, value, 0) < 0) { + result.push(value); + } + } + return result; + } + + module.exports = baseDifference; + + +/***/ }, +/* 69 */ +/***/ function(module, exports, __webpack_require__) { + + var arrayPush = __webpack_require__(64), + isArguments = __webpack_require__(10), + isArray = __webpack_require__(11), + isArrayLike = __webpack_require__(2), + isObjectLike = __webpack_require__(3); + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + module.exports = baseFlatten; + + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + var indexOfNaN = __webpack_require__(78); + + /** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + module.exports = baseIndexOf; + + +/***/ }, +/* 71 */ +/***/ function(module, exports) { + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + module.exports = baseProperty; + + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + var identity = __webpack_require__(85); + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + module.exports = bindCallback; + + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(1); + + /** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; + } + + module.exports = cacheIndexOf; + + +/***/ }, +/* 74 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(1); + + /** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ + function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } + } + + module.exports = cachePush; + + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + var bindCallback = __webpack_require__(72), + isIterateeCall = __webpack_require__(79), + restParam = __webpack_require__(19); + + /** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + module.exports = createAssigner; + + +/***/ }, +/* 76 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(global) {var SetCache = __webpack_require__(63), + getNative = __webpack_require__(5); + + /** Native method references. */ + var Set = getNative(global, 'Set'); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeCreate = getNative(Object, 'create'); + + /** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ + function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; + } + + module.exports = createCache; + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { + + var baseProperty = __webpack_require__(71); + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + module.exports = getLength; + + +/***/ }, +/* 78 */ +/***/ function(module, exports) { + + /** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ + function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; + } + + module.exports = indexOfNaN; + + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + var isArrayLike = __webpack_require__(2), + isIndex = __webpack_require__(9), + isObject = __webpack_require__(1); + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + module.exports = isIterateeCall; + + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + var isArguments = __webpack_require__(10), + isArray = __webpack_require__(11), + isIndex = __webpack_require__(9), + isLength = __webpack_require__(6), + keysIn = __webpack_require__(84); + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + module.exports = shimKeys; + + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(1); + + /** `Object#toString` result references. */ + var funcTag = '[object Function]'; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 which returns 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + module.exports = isFunction; + + +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { + + var isFunction = __webpack_require__(81), + isObjectLike = __webpack_require__(3); + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + module.exports = isNative; + + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + var assignWith = __webpack_require__(65), + baseAssign = __webpack_require__(66), + createAssigner = __webpack_require__(75); + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it's invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + module.exports = assign; + + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + var isArguments = __webpack_require__(10), + isArray = __webpack_require__(11), + isIndex = __webpack_require__(9), + isLength = __webpack_require__(6), + isObject = __webpack_require__(1); + + /** Used for native method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + module.exports = keysIn; + + +/***/ }, +/* 85 */ +/***/ function(module, exports) { + + /** + * This method returns the first argument provided to it. + * + * @static + * @memberOf _ + * @category Utility + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'user': 'fred' }; + * + * _.identity(object) === object; + * // => true + */ + function identity(value) { + return value; + } + + module.exports = identity; + + +/***/ }, +/* 86 */ +/***/ function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {if (typeof window !== "undefined") { + module.exports = window; + } else if (typeof global !== "undefined") { + module.exports = global; + } else if (typeof self !== "undefined"){ + module.exports = self; + } else { + module.exports = {}; + } + + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }, +/* 87 */ +/***/ function(module, exports) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of React source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * Original: + * https://github.com/facebook/react/blob/6508b1ad273a6f371e8d90ae676e5390199461b4/src/isomorphic/classic/class/ReactClass.js#L650-L713 + */ + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = bindAutoBindMethods; + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + + var componentName = component.constructor.displayName, + _bind = boundMethod.bind; + + boundMethod.bind = function (newThis) { + var args = Array.prototype.slice.call(arguments, 1); + if (newThis !== component && newThis !== null) { + console.warn('bind(): React component methods may only be bound to the ' + 'component instance. See ' + componentName); + } else if (!args.length) { + console.warn('bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See ' + componentName); + return boundMethod; + } + + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + + return reboundMethod; + }; + + return boundMethod; + } + + function bindAutoBindMethods(component) { + for (var autoBindKey in component.__reactAutoBindMap) { + if (!component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { + return; + } + + // Tweak: skip methods that are already bound. + // This is to preserve method reference in case it is used + // as a subscription handler that needs to be detached later. + if (component.hasOwnProperty(autoBindKey) && component[autoBindKey].__reactBoundContext === component) { + continue; + } + + var method = component.__reactAutoBindMap[autoBindKey]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + ; + module.exports = exports['default']; + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = proxyClass; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _createPrototypeProxy = __webpack_require__(89); + + var _createPrototypeProxy2 = _interopRequireDefault(_createPrototypeProxy); + + var _bindAutoBindMethods = __webpack_require__(87); + + var _bindAutoBindMethods2 = _interopRequireDefault(_bindAutoBindMethods); + + var _deleteUnknownAutoBindMethods = __webpack_require__(90); + + var _deleteUnknownAutoBindMethods2 = _interopRequireDefault(_deleteUnknownAutoBindMethods); + + function proxyClass(InitialClass) { + // Prevent double wrapping. + // Given a proxy class, return the existing proxy managing it. + if (Object.prototype.hasOwnProperty.call(InitialClass, '__reactPatchProxy')) { + return InitialClass.__reactPatchProxy; + } + + var prototypeProxy = (0, _createPrototypeProxy2['default'])(); + var CurrentClass = undefined; + + // Create a proxy constructor with matching name + var ProxyClass = new Function('getCurrentClass', 'return function ' + (InitialClass.name || 'ProxyClass') + '() {\n return getCurrentClass().apply(this, arguments);\n }')(function () { + return CurrentClass; + }); + + // Point proxy constructor to the proxy prototype + ProxyClass.prototype = prototypeProxy.get(); + + function update(_x) { + var _again = true; + + _function: while (_again) { + var NextClass = _x; + mountedInstances = undefined; + _again = false; + + if (typeof NextClass !== 'function') { + throw new Error('Expected a constructor.'); + } + + // Prevent proxy cycles + if (Object.prototype.hasOwnProperty.call(NextClass, '__reactPatchProxy')) { + _x = NextClass.__reactPatchProxy.__getCurrent(); + _again = true; + continue _function; + } + + // Save the next constructor so we call it + CurrentClass = NextClass; + + // Update the prototype proxy with new methods + var mountedInstances = prototypeProxy.update(NextClass.prototype); + + // Set up the constructor property so accessing the statics work + ProxyClass.prototype.constructor = ProxyClass; + + // Naïvely proxy static methods and properties + ProxyClass.prototype.constructor.__proto__ = NextClass; + + // Try to infer displayName + ProxyClass.displayName = NextClass.name || NextClass.displayName; + + // We might have added new methods that need to be auto-bound + mountedInstances.forEach(_bindAutoBindMethods2['default']); + mountedInstances.forEach(_deleteUnknownAutoBindMethods2['default']); + + // Let the user take care of redrawing + return mountedInstances; + } + }; + + function get() { + return ProxyClass; + } + + function getCurrent() { + return CurrentClass; + } + + update(InitialClass); + + var proxy = { get: get, update: update }; + + Object.defineProperty(proxy, '__getCurrent', { + configurable: false, + writable: false, + enumerable: false, + value: getCurrent + }); + + Object.defineProperty(ProxyClass, '__reactPatchProxy', { + configurable: false, + writable: false, + enumerable: false, + value: proxy + }); + + return proxy; + } + + module.exports = exports['default']; + +/***/ }, +/* 89 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = createPrototypeProxy; + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + + var _lodashObjectAssign = __webpack_require__(83); + + var _lodashObjectAssign2 = _interopRequireDefault(_lodashObjectAssign); + + var _lodashArrayDifference = __webpack_require__(62); + + var _lodashArrayDifference2 = _interopRequireDefault(_lodashArrayDifference); + + function createPrototypeProxy() { + var proxy = {}; + var current = null; + var mountedInstances = []; + + /** + * Creates a proxied toString() method pointing to the current version's toString(). + */ + function proxyToString(name) { + // Wrap to always call the current version + return function toString() { + if (typeof current[name] === 'function') { + return current[name].toString(); + } else { + return ''; + } + }; + } + + /** + * Creates a proxied method that calls the current version, whenever available. + */ + function proxyMethod(name) { + // Wrap to always call the current version + var proxiedMethod = function proxiedMethod() { + if (typeof current[name] === 'function') { + return current[name].apply(this, arguments); + } + }; + + // Copy properties of the original function, if any + (0, _lodashObjectAssign2['default'])(proxiedMethod, current[name]); + proxiedMethod.toString = proxyToString(name); + + return proxiedMethod; + } + + /** + * Augments the original componentDidMount with instance tracking. + */ + function proxiedComponentDidMount() { + mountedInstances.push(this); + if (typeof current.componentDidMount === 'function') { + return current.componentDidMount.apply(this, arguments); + } + } + proxiedComponentDidMount.toString = proxyToString('componentDidMount'); + + /** + * Augments the original componentWillUnmount with instance tracking. + */ + function proxiedComponentWillUnmount() { + var index = mountedInstances.indexOf(this); + // Unless we're in a weird environment without componentDidMount + if (index !== -1) { + mountedInstances.splice(index, 1); + } + if (typeof current.componentWillUnmount === 'function') { + return current.componentWillUnmount.apply(this, arguments); + } + } + proxiedComponentWillUnmount.toString = proxyToString('componentWillUnmount'); + + /** + * Defines a property on the proxy. + */ + function defineProxyProperty(name, descriptor) { + Object.defineProperty(proxy, name, descriptor); + } + + /** + * Defines a property, attempting to keep the original descriptor configuration. + */ + function defineProxyPropertyWithValue(name, value) { + var _ref = Object.getOwnPropertyDescriptor(current, name) || {}; + + var _ref$enumerable = _ref.enumerable; + var enumerable = _ref$enumerable === undefined ? false : _ref$enumerable; + var _ref$writable = _ref.writable; + var writable = _ref$writable === undefined ? true : _ref$writable; + + defineProxyProperty(name, { + configurable: true, + enumerable: enumerable, + writable: writable, + value: value + }); + } + + /** + * Creates an auto-bind map mimicking the original map, but directed at proxy. + */ + function createAutoBindMap() { + if (!current.__reactAutoBindMap) { + return; + } + + var __reactAutoBindMap = {}; + for (var _name in current.__reactAutoBindMap) { + if (current.__reactAutoBindMap.hasOwnProperty(_name)) { + __reactAutoBindMap[_name] = proxy[_name]; + } + } + + return __reactAutoBindMap; + } + + /** + * Applies the updated prototype. + */ + function update(next) { + // Save current source of truth + current = next; + + // Find changed property names + var currentNames = Object.getOwnPropertyNames(current); + var previousName = Object.getOwnPropertyNames(proxy); + var addedNames = (0, _lodashArrayDifference2['default'])(currentNames, previousName); + var removedNames = (0, _lodashArrayDifference2['default'])(previousName, currentNames); + + // Remove properties and methods that are no longer there + removedNames.forEach(function (name) { + delete proxy[name]; + }); + + // Copy every descriptor + currentNames.forEach(function (name) { + var descriptor = Object.getOwnPropertyDescriptor(current, name); + if (typeof descriptor.value === 'function') { + // Functions require additional wrapping so they can be bound later + defineProxyPropertyWithValue(name, proxyMethod(name)); + } else { + // Other values can be copied directly + defineProxyProperty(name, descriptor); + } + }); + + // Track mounting and unmounting + defineProxyPropertyWithValue('componentDidMount', proxiedComponentDidMount); + defineProxyPropertyWithValue('componentWillUnmount', proxiedComponentWillUnmount); + defineProxyPropertyWithValue('__reactAutoBindMap', createAutoBindMap()); + + // Set up the prototype chain + proxy.__proto__ = next; + + return mountedInstances; + } + + /** + * Returns the up-to-date proxy prototype. + */ + function get() { + return proxy; + } + + return { + update: update, + get: get + }; + } + + ; + module.exports = exports['default']; + +/***/ }, +/* 90 */ +/***/ function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + exports['default'] = deleteUnknownAutoBindMethods; + function shouldDeleteClassicInstanceMethod(component, name) { + if (component.__reactAutoBindMap.hasOwnProperty(name)) { + // It's a known autobound function, keep it + return false; + } + + if (component[name].__reactBoundArguments !== null) { + // It's a function bound to specific args, keep it + return false; + } + + // It's a cached bound method for a function + // that was deleted by user, so we delete it from component. + return true; + } + + function shouldDeleteModernInstanceMethod(component, name) { + var prototype = component.constructor.prototype; + + var prototypeDescriptor = Object.getOwnPropertyDescriptor(prototype, name); + + if (!prototypeDescriptor || !prototypeDescriptor.get) { + // This is definitely not an autobinding getter + return false; + } + + if (prototypeDescriptor.get().length !== component[name].length) { + // The length doesn't match, bail out + return false; + } + + // This seems like a method bound using an autobinding getter on the prototype + // Hopefully we won't run into too many false positives. + return true; + } + + function shouldDeleteInstanceMethod(component, name) { + var descriptor = Object.getOwnPropertyDescriptor(component, name); + if (typeof descriptor.value !== 'function') { + // Not a function, or something fancy: bail out + return; + } + + if (component.__reactAutoBindMap) { + // Classic + return shouldDeleteClassicInstanceMethod(component, name); + } else { + // Modern + return shouldDeleteModernInstanceMethod(component, name); + } + } + + /** + * Deletes autobound methods from the instance. + * + * For classic React classes, we only delete the methods that no longer exist in map. + * This means the user actually deleted them in code. + * + * For modern classes, we delete methods that exist on prototype with the same length, + * and which have getters on prototype, but are normal values on the instance. + * This is usually an indication that an autobinding decorator is being used, + * and the getter will re-generate the memoized handler on next access. + */ + + function deleteUnknownAutoBindMethods(component) { + var names = Object.getOwnPropertyNames(component); + + names.forEach(function (name) { + if (shouldDeleteInstanceMethod(component, name)) { + delete component[name]; + } + }); + } + + module.exports = exports['default']; + +/***/ }, +/* 91 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, '__esModule', { + value: true + }); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + var _createClassProxy = __webpack_require__(88); + + exports.createProxy = _interopRequire(_createClassProxy); + + var _reactDeepForceUpdate = __webpack_require__(92); + + exports.getForceUpdate = _interopRequire(_reactDeepForceUpdate); + +/***/ }, +/* 92 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports["default"] = getForceUpdate; + function traverseRenderedChildren(internalInstance, callback, argument) { + callback(internalInstance, argument); + + if (internalInstance._renderedComponent) { + traverseRenderedChildren(internalInstance._renderedComponent, callback, argument); + } else { + for (var key in internalInstance._renderedChildren) { + if (internalInstance._renderedChildren.hasOwnProperty(key)) { + traverseRenderedChildren(internalInstance._renderedChildren[key], callback, argument); + } + } + } + } + + function setPendingForceUpdate(internalInstance) { + if (internalInstance._pendingForceUpdate === false) { + internalInstance._pendingForceUpdate = true; + } + } + + function forceUpdateIfPending(internalInstance, React) { + if (internalInstance._pendingForceUpdate === true) { + var publicInstance = internalInstance._instance; + React.Component.prototype.forceUpdate.call(publicInstance); + } + } + + function getForceUpdate(React) { + return function (instance) { + var internalInstance = instance._reactInternalInstance; + traverseRenderedChildren(internalInstance, setPendingForceUpdate); + traverseRenderedChildren(internalInstance, forceUpdateIfPending, React); + }; + } + + module.exports = exports["default"]; + +/***/ }, +/* 93 */ +/***/ function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_93__; + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/dist/GoogleMapReact.min.js b/dist/GoogleMapReact.min.js new file mode 100644 index 0000000..735d944 --- /dev/null +++ b/dist/GoogleMapReact.min.js @@ -0,0 +1,7 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.GoogleMapReact=e(require("react"),require("react-dom")):t.GoogleMapReact=e(t.React,t.ReactDOM)}(this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(21),i=r(o);e.default=i.default,t.exports=e.default},function(t,e){function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t){return null!=t&&i(o(t))}var o=n(77),i=n(6);t.exports=r},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){function r(t,e){var n=null==t?void 0:t[e];return o(n)?n:void 0}var o=n(82);t.exports=r},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&r>=t}var r=9007199254740991;t.exports=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=t.filename,n=t.components,r=t.imports,o=t.locals,a=i(r,1),c=a[0],l=i(o,1),f=l[0].hot;if(!c.Component)throw new Error("imports[0] for react-transform-hmr does not look like React.");if(!f||"function"!=typeof f.accept)throw new Error("locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr");Object.keys(n).some(function(t){return!n[t].isInFunction})&&f.accept(function(t){t&&(console.warn("[React Transform HMR] There was an error updating "+e+":"),console.error(t))});var p=u.getForceUpdate(c);return function(t,r){var o=n[r],i=o.isInFunction,a=void 0===i?!1:i,c=o.displayName,l=void 0===c?r:c;if(a)return t;var f=e+"$"+r;return s[f]?!function(){console.info("[React Transform HMR] Patching "+l);var e=s[f].update(t);setTimeout(function(){return e.forEach(p)})}():s[f]=u.createProxy(t),s[f].get()}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(c){o=!0,i=c}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=o;var u=n(91),a=n(86),c=r(a),s=void 0;c.default.__reactComponentProxies?s=c.default.__reactComponentProxies:(s={},Object.defineProperty(c.default,"__reactComponentProxies",{configurable:!0,enumerable:!1,writable:!1,value:s})),t.exports=e.default},function(e,n){e.exports=t},function(t,e){function n(t,e){return t="number"==typeof t||r.test(t)?+t:-1,e=null==e?o:e,t>-1&&t%1==0&&e>t}var r=/^\d+$/,o=9007199254740991;t.exports=n},function(t,e,n){function r(t){return i(t)&&o(t)&&a.call(t,"callee")&&!c.call(t,"callee")}var o=n(2),i=n(3),u=Object.prototype,a=u.hasOwnProperty,c=u.propertyIsEnumerable;t.exports=r},function(t,e,n){var r=n(5),o=n(6),i=n(3),u="[object Array]",a=Object.prototype,c=a.toString,s=r(Array,"isArray"),l=s||function(t){return i(t)&&o(t.length)&&c.call(t)==u};t.exports=l},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return function(e){return y(e,t)}}function u(t){return t&&t.__esModule?t:{"default":t}}var a=n(7),c=u(a),s=n(8);e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e-1&&t%1==0&&e>t}function u(t){return"number"==typeof t&&t>-1&&t%1==0&&_>=t}function a(t){for(var e=s(t),n=e.length,r=n&&t.length,o=!!r&&u(r)&&(p(t)||f(t)),a=-1,c=[];++a0;++r-1&&t%1==0&&l>=t}function u(t){return n(t)&&o(t)&&c.call(t,"callee")&&!s.call(t,"callee")}var a=Object.prototype,c=a.hasOwnProperty,s=a.propertyIsEnumerable,l=9007199254740991,f=r("length");t.exports=u},function(t,e){"use strict";function n(t,e){this.x=t,this.y=e}t.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,o=n*this.x+e*this.y;return this.x=r,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return!u.default(this.props,t)||!u.default(this.state,e)}e.__esModule=!0,e.default=o;var i=n(60),u=r(i);t.exports=e.default},function(t,e){function n(t,e){if("function"!=typeof t)throw new TypeError(r);return e=o(void 0===e?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=o(n.length-e,0),u=Array(i);++rn&&(o.boundingRect_=t.currentTarget.getBoundingClientRect()),o.mouseMoveTime_=e;var r=t.clientX-o.boundingRect_.left,i=t.clientY-o.boundingRect_.top;o.mouse_||(o.mouse_={x:0,y:0,lat:0,lng:0});var u=100;o.mouse_.x=r,o.mouse_.y=i;var a=o.geoService_.unproject(o.mouse_,!0);o.mouse_.lat=a.lat,o.mouse_.lng=a.lng,e-o.dragTime_t&&o.markersDispatcher_.emit("kON_CLICK")}},this._isCenterDefined=function(t){return t&&2===t.length&&H.default(t[0])&&H.default(t[1])},this.mounted_=!1,this.map_=null,this.maps_=null,this.prevBounds_=null,this.mouse_=null,this.mouseMoveTime_=0,this.boundingRect_=null,this.mouseInMap_=!0,this.dragTime_=0,this.fireMouseEventOnIdle_=!1,this.updateCounter_=0,this.markersDispatcher_=new g.default(this),this.geoService_=new T.default(K),this._isCenterDefined(this.props.center)&&this.geoService_.setView(this.props.center,this.props.zoom,0),this.state={overlayCreated:!1}}o(e,t),p(e,null,[{key:"propTypes",value:{apiKey:l.PropTypes.string,center:l.PropTypes.array.isRequired,zoom:l.PropTypes.number.isRequired,onBoundsChange:l.PropTypes.func,onChildClick:l.PropTypes.func,onChildMouseEnter:l.PropTypes.func,onChildMouseLeave:l.PropTypes.func,options:l.PropTypes.any,distanceToMouse:l.PropTypes.func,hoverDistance:l.PropTypes.number,debounced:l.PropTypes.bool,margin:l.PropTypes.array,googleMapLoader:l.PropTypes.any},enumerable:!0},{key:"defaultProps",value:{distanceToMouse:function(t,e){var n=t.x,r=t.y;return Math.sqrt((n-e.x)*(n-e.x)+(r-e.y)*(r-e.y))},hoverDistance:30,debounced:!0,options:a,googleMapLoader:j.default},enumerable:!0}]),e.prototype.componentDidMount=function(){var t=this;this.mounted_=!0,window.addEventListener("resize",this._onWindowResize),setTimeout(function(){t._setViewSize(),t._isCenterDefined(t.props.center)?t._initMap():t.props.googleMapLoader(t.props.apiKey)},0,this)},e.prototype.componentWillUnmount=function(){this.mounted_=!1,window.removeEventListener("resize",this._onWindowResize),this.overlay_&&this.overlay_.setMap(null),this.maps_&&this.map_&&this.maps_.event.clearInstanceListeners(this.map_),this.map_=null,this.maps_=null,this.markersDispatcher_.dispose(),this.resetSizeOnIdle_=!1,delete this.map_,delete this.markersDispatcher_},e.prototype.componentWillReceiveProps=function(t){var e=this;if(!this._isCenterDefined(this.props.center)&&this._isCenterDefined(t.center)&&setTimeout(function(){return e._initMap()},0),this.map_){var n=this.geoService_.getCenter();t.center&&Math.abs(t.center[0]-n.lat)+Math.abs(t.center[1]-n.lng)>Z&&this.map_.panTo({lat:t.center[0],lng:t.center[1]}),Math.abs(t.zoom-this.props.zoom)>0&&this.map_.setZoom(t.zoom)}},e.prototype.componentDidUpdate=function(){this.markersDispatcher_.emit("kON_CHANGE")},e.prototype.render=function(){var t=this.state.overlayCreated?null:h.default.createElement(C.default,{onChildClick:this._onChildClick,onChildMouseEnter:this._onChildMouseEnter,onChildMouseLeave:this._onChildMouseLeave,geoService:this.geoService_,projectFromLeftTop:!1,distanceToMouse:this.props.distanceToMouse,hoverDistance:this.props.hoverDistance,dispatcher:this.markersDispatcher_});return h.default.createElement("div",{style:V,onMouseMove:this._onMouseMove,onClick:this._onMapClick},h.default.createElement(b.default,{ref:"google_map_dom"}),t)};var n=e;return e=i("_$GoogleMap")(e)||e}(l.Component);e.default=q,t.exports=e.default}).call(e,n(4)(t))},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return function(e){return p(e,t)}}function u(t){return t&&t.__esModule?t:{"default":t}}var a=n(7),c=u(a),s=n(8);e.__esModule=!0;var l=u(s),f={_$GoogleMapMap:{displayName:"GoogleMapMap"}},p=c.default({filename:"/home/ice/ext/cinarra/cnr-frontend/fireball/app/tmp/google-map-react/src/google_map_map.js",components:f,locals:[t],imports:[s]}),h={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},d=function(t){function e(e){r(this,n),t.call(this,e)}o(e,t),e.prototype.shouldComponentUpdate=function(){return!1},e.prototype.render=function(){return l.default.createElement("div",{style:h})};var n=e;return e=i("_$GoogleMapMap")(e)||e}(s.Component);e.default=d,t.exports=e.default}).call(e,n(4)(t))},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return function(e){return d(e,t)}}function u(t){return t&&t.__esModule?t:{"default":t}}var a=n(7),c=u(a),s=n(8);e.__esModule=!0;var l=u(s),f=n(12),p=u(f),h={_$GoogleMapMarkersPrerender:{displayName:"GoogleMapMarkersPrerender"}},d=c.default({filename:"/home/ice/ext/cinarra/cnr-frontend/fireball/app/tmp/google-map-react/src/google_map_markers_prerender.js",components:h,locals:[t],imports:[s]}),v={width:"50%",height:"50%",left:"50%",top:"50%",margin:0,padding:0,position:"absolute"},y=function(t){function e(e){r(this,n),t.call(this,e)}o(e,t),e.prototype.render=function(){return l.default.createElement("div",{style:v},l.default.createElement(p.default,this.props))};var n=e;return e=i("_$GoogleMapMarkersPrerender")(e)||e}(s.Component);e.default=y,t.exports=e.default}).call(e,n(4)(t))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var u=n(31),a=r(u),c=function(t){function e(n){o(this,e),t.call(this),this.gmapInstance=n}return i(e,t),e.prototype.getChildren=function(){return this.gmapInstance.props.children},e.prototype.getMousePosition=function(){return this.gmapInstance.mouse_},e.prototype.getUpdateCounter=function(){return this.gmapInstance.updateCounter_},e.prototype.dispose=function(){this.gmapInstance=null,this.removeAllListeners()},e}(a.default);e.default=c,t.exports=e.default},function(t,e){"use strict";function n(t,e,n){if(t&&e){for(var r=0;r!==t.length;++r)if(Math.abs(t[r]-e[r])>n)return!1;return!0}return!1}e.__esModule=!0,e.default=n,t.exports=e.default},function(t,e){"use strict";function n(){if(r)return r;if("undefined"!=typeof navigator){var t=navigator.userAgent.indexOf("MSIE")>-1,e=navigator.userAgent.indexOf("Firefox")>-1,n=navigator.userAgent.toLowerCase().indexOf("op")>-1,o=navigator.userAgent.indexOf("Chrome")>-1,i=navigator.userAgent.indexOf("Safari")>-1;return o&&i&&(i=!1),o&&n&&(o=!1),r={isExplorer:t,isFirefox:e,isOpera:n,isChrome:o,isSafari:i}}return r={isChrome:!0,isExplorer:!1,isFirefox:!1,isOpera:!1,isSafari:!1}}e.__esModule=!0,e.default=n;var r=null;t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e0&&this.getHeight()-n-o>0){var u=this.unproject({x:i-this.getWidth()/2,y:n-this.getHeight()/2}),a=this.unproject({x:this.getWidth()/2-r,y:this.getHeight()/2-o}),c=[u.lat,u.lng,a.lat,a.lng];return e&&(c=c.map(function(t){return Math.round(t*e)/e})),c}return[0,0,0,0]},t}();e.default=p,t.exports=e.default},function(t,e,n){"use strict";function r(t,e,n){this.tileSize=t||512,this._minZoom=e||0,this._maxZoom=n||52,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this.zoom=0,this.center=new o(0,0),this.angle=0}var o=n(13),i=n(17),u=n(14).wrap;r.prototype=Object.defineProperties({zoomScale:function(t){return Math.pow(2,t)},scaleZoom:function(t){return Math.log(t)/Math.LN2},project:function(t,e){return new i(this.lngX(t.lng,e),this.latY(t.lat,e))},unproject:function(t,e){return new o(this.yLat(t.y,e),this.xLng(t.x,e))},lngX:function(t,e){return(180+t)*(e||this.worldSize)/360},latY:function(t,e){var n=180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360));return(180-n)*(e||this.worldSize)/360},xLng:function(t,e){return 360*t/(e||this.worldSize)-180},yLat:function(t,e){var n=180-360*t/(e||this.worldSize);return 360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90},locationPoint:function(t){var e=this.project(t);return this.centerPoint._sub(this.point._sub(e)._rotate(this.angle))},pointLocation:function(t){var e=this.centerPoint._sub(t)._rotate(-this.angle);return this.unproject(this.point.sub(e))}},{minZoom:{get:function(){return this._minZoom},set:function(t){this._minZoom=t,this.zoom=Math.max(this.zoom,t)},configurable:!0,enumerable:!0},maxZoom:{get:function(){return this._maxZoom},set:function(t){this._maxZoom=t,this.zoom=Math.min(this.zoom,t)},configurable:!0,enumerable:!0},worldSize:{get:function(){return this.tileSize*this.scale},configurable:!0,enumerable:!0},centerPoint:{get:function(){return new i(0,0)},configurable:!0,enumerable:!0},size:{get:function(){return new i(this.width,this.height)},configurable:!0,enumerable:!0},bearing:{get:function(){return-this.angle/Math.PI*180},set:function(t){this.angle=-u(t,-180,180)*Math.PI/180},configurable:!0,enumerable:!0},zoom:{get:function(){return this._zoom},set:function(t){t=Math.min(Math.max(t,this.minZoom),this.maxZoom),this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom},configurable:!0,enumerable:!0},x:{get:function(){return this.lngX(this.center.lng)},configurable:!0,enumerable:!0},y:{get:function(){return this.latY(this.center.lat)},configurable:!0,enumerable:!0},point:{get:function(){return new i(this.x,this.y)},configurable:!0,enumerable:!0}}),t.exports=r},function(t,e,n){"use strict";var r=null,o=void 0;t.exports=function(t){return r||(r=n(61)),o?o:o=new Promise(function(e,n){if("undefined"==typeof window)return void n(new Error("google map cannot be loaded outside browser env"));if(window.google&&window.google.maps)return void e(window.google.maps);"undefined"!=typeof window._$_google_map_initialize_$_&&n(new Error("google map initialization error")),window._$_google_map_initialize_$_=function(){delete window._$_google_map_initialize_$_,e(window.google.maps)};var o=t?"&key="+t:"";r("https://maps.googleapis.com/maps/api/js?callback=_$_google_map_initialize_$_"+o,function(){"undefined"==typeof window.google&&n(new Error("google map initialization error (not loaded)"))})})}},function(t,e){"use strict";function n(t){var e=t.version;if("string"!=typeof e)return!1;var n=e.split("."),r=parseInt(n[0],10),o=parseInt(n[1],10); +return 0===r&&o>13}e.__esModule=!0,e.isReact14=n},function(t,e,n){"use strict";function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){}var i="function"!=typeof Object.create?"~":!1;o.prototype._events=void 0,o.prototype.listeners=function(t,e){var n=i?i+t:t,r=this._events&&this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,u=r.length,a=new Array(u);u>o;o++)a[o]=r[o].fn;return a},o.prototype.emit=function(t,e,n,r,o,u){var a=i?i+t:t;if(!this._events||!this._events[a])return!1;var c,s,l=this._events[a],f=arguments.length;if("function"==typeof l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,o),!0;case 6:return l.fn.call(l.context,e,n,r,o,u),!0}for(s=1,c=new Array(f-1);f>s;s++)c[s-1]=arguments[s];l.fn.apply(l.context,c)}else{var p,h=l.length;for(s=0;h>s;s++)switch(l[s].once&&this.removeListener(t,l[s].fn,void 0,!0),f){case 1:l[s].fn.call(l[s].context);break;case 2:l[s].fn.call(l[s].context,e);break;case 3:l[s].fn.call(l[s].context,e,n);break;default:if(!c)for(p=1,c=new Array(f-1);f>p;p++)c[p-1]=arguments[p];l[s].fn.apply(l[s].context,c)}}return!0},o.prototype.on=function(t,e,n){var o=new r(e,n||this),u=i?i+t:t;return this._events||(this._events=i?{}:Object.create(null)),this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],o]:this._events[u].push(o):this._events[u]=o,this},o.prototype.once=function(t,e,n){var o=new r(e,n||this,!0),u=i?i+t:t;return this._events||(this._events=i?{}:Object.create(null)),this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],o]:this._events[u].push(o):this._events[u]=o,this},o.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events||!this._events[o])return this;var u=this._events[o],a=[];if(e)if(u.fn)(u.fn!==e||r&&!u.once||n&&u.context!==n)&&a.push(u);else for(var c=0,s=u.length;s>c;c++)(u[c].fn!==e||r&&!u[c].once||n&&u[c].context!==n)&&a.push(u[c]);return a.length?this._events[o]=1===a.length?a[0]:a:delete this._events[o],this},o.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[i?i+t:t]:this._events=i?{}:Object.create(null),this):this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=i,t.exports=o},function(t,e,n){function r(t,e,n){for(var r=-1,o=u(e),i=o.length;++r2?n[u-2]:void 0,c=u>2?n[2]:void 0,s=u>1?n[u-1]:void 0;for("function"==typeof a?(a=o(a,s,5),u-=2):(a="function"==typeof s?s:void 0,u-=a?1:0),c&&i(n[0],n[1],c)&&(a=3>u?void 0:a,u=1);++r-1&&t%1==0&&e>t}function i(t,e,n){if(!a(n))return!1;var i=typeof e;if("number"==i?r(n)&&o(e,n.length):"string"==i&&e in n){var u=n[e];return t===t?t===u:u!==u}return!1}function u(t){return"number"==typeof t&&t>-1&&t%1==0&&s>=t}function a(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var c=/^\d+$/,s=9007199254740991,l=n("length");t.exports=i},function(t,e){function n(t,e){if("function"!=typeof t)throw new TypeError(r);return e=o(void 0===e?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=o(n.length-e,0),u=Array(i);++r-1&&t%1==0&&l>=t}function u(t){return n(t)&&o(t)&&c.call(t,"callee")&&!s.call(t,"callee")}var a=Object.prototype,c=a.hasOwnProperty,s=a.propertyIsEnumerable,l=9007199254740991,f=r("length");t.exports=u},function(t,e){function n(t){return!!t&&"object"==typeof t}function r(t,e){var n=null==t?void 0:t[e];return a(n)?n:void 0}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&_>=t}function i(t){return u(t)&&d.call(t)==s}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:i(t)?v.test(p.call(t)):n(t)&&l.test(t)}var c="[object Array]",s="[object Function]",l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,h=f.hasOwnProperty,d=f.toString,v=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),_=9007199254740991,g=y||function(t){return n(t)&&o(t.length)&&d.call(t)==c};t.exports=g},function(t,e){function n(t){return r(t)&&u.call(t)==o}function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var o="[object Function]",i=Object.prototype,u=i.toString;t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}function r(t){return"number"==typeof t||n(t)&&u.call(t)==o}var o="[object Number]",i=Object.prototype,u=i.toString;t.exports=r},function(t,e,n){function r(t){return!!t&&"object"==typeof t}function o(t,e){return u(t,e,c)}function i(t){var e;if(!r(t)||p.call(t)!=s||a(t)||!f.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var n;return o(t,function(t,e){n=e}),void 0===n||f.call(t,n)}var u=n(45),a=n(16),c=n(46),s="[object Object]",l=Object.prototype,f=l.hasOwnProperty,p=l.toString;t.exports=i},function(t,e){function n(t){return function(e,n,o){for(var i=r(e),u=o(e),a=u.length,c=t?a:-1;t?c--:++c-1&&t%1==0&&e>t}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&p>=t}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){if(null==t)return[];i(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(c(t)||a(t))&&e||0;for(var n=t.constructor,u=-1,s="function"==typeof n&&n.prototype===t,l=Array(e),p=e>0;++u-1&&t%1==0&&_>=t}function i(t){return u(t)&&d.call(t)==s}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:i(t)?v.test(p.call(t)):n(t)&&l.test(t)}var c="[object Array]",s="[object Function]",l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,h=f.hasOwnProperty,d=f.toString,v=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),_=9007199254740991,g=y||function(t){return n(t)&&o(t.length)&&d.call(t)==c};t.exports=g},function(t,e,n){var r=n(49),o=n(52),i=n(53),u=n(54),a=n(59),c=a(function(t,e){return null==t?{}:"function"==typeof e[0]?u(t,o(e[0],e[1],3)):i(t,r(e))});t.exports=c},function(t,e,n){function r(t){return!!t&&"object"==typeof t}function o(t,e){for(var n=-1,r=e.length,o=t.length;++n-1&&t%1==0&&f>=t}var s=n(50),l=n(51),f=9007199254740991,p=u("length");t.exports=i},function(t,e){function n(t){return!!t&&"object"==typeof t}function r(t){return function(e){return null==e?void 0:e[t]}}function o(t){return null!=t&&i(f(t))}function i(t){return"number"==typeof t&&t>-1&&t%1==0&&l>=t}function u(t){return n(t)&&o(t)&&c.call(t,"callee")&&!s.call(t,"callee")}var a=Object.prototype,c=a.hasOwnProperty,s=a.propertyIsEnumerable,l=9007199254740991,f=r("length");t.exports=u},function(t,e){function n(t){return!!t&&"object"==typeof t}function r(t,e){var n=null==t?void 0:t[e];return a(n)?n:void 0}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&_>=t}function i(t){return u(t)&&d.call(t)==s}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:i(t)?v.test(p.call(t)):n(t)&&l.test(t)}var c="[object Array]",s="[object Function]",l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,h=f.hasOwnProperty,d=f.toString,v=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),_=9007199254740991,g=y||function(t){return n(t)&&o(t.length)&&d.call(t)==c};t.exports=g},function(t,e){function n(t,e,n){if("function"!=typeof t)return r;if(void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,o){return t.call(e,n,r,o)};case 4:return function(n,r,o,i){return t.call(e,n,r,o,i)};case 5:return function(n,r,o,i,u){return t.call(e,n,r,o,i,u)}}return function(){return t.apply(e,arguments)}}function r(t){return t}t.exports=n},function(t,e){function n(t,e){t=r(t);for(var n=-1,o=e.length,i={};++n-1&&t%1==0&&e>t}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&p>=t}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function u(t){if(null==t)return[];i(t)||(t=Object(t));var e=t.length;e=e&&o(e)&&(c(t)||a(t))&&e||0;for(var n=t.constructor,u=-1,s="function"==typeof n&&n.prototype===t,l=Array(e),p=e>0;++u-1&&t%1==0&&l>=t}function u(t){return n(t)&&o(t)&&c.call(t,"callee")&&!s.call(t,"callee")}var a=Object.prototype,c=a.hasOwnProperty,s=a.propertyIsEnumerable,l=9007199254740991,f=r("length");t.exports=u},function(t,e){function n(t){return!!t&&"object"==typeof t}function r(t,e){var n=null==t?void 0:t[e];return a(n)?n:void 0}function o(t){return"number"==typeof t&&t>-1&&t%1==0&&_>=t}function i(t){return u(t)&&d.call(t)==s}function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function a(t){return null==t?!1:i(t)?v.test(p.call(t)):n(t)&&l.test(t)}var c="[object Array]",s="[object Function]",l=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,h=f.hasOwnProperty,d=f.toString,v=RegExp("^"+p.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),_=9007199254740991,g=y||function(t){return n(t)&&o(t.length)&&d.call(t)==c};t.exports=g},function(t,e){function n(t,e){if("function"!=typeof t)throw new TypeError(r);return e=o(void 0===e?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,i=o(n.length-e,0),u=Array(i);++rn;++n)if(!e(t[n]))return c;return 1}function e(e,n){t(e,function(t){return!n(t)})}function n(i,u,a){function c(t){return t.call?t():p[t]}function l(){if(!--g){p[_]=1,y&&y();for(var n in d)t(n.split("|"),c)&&!e(d[n],c)&&(d[n]=[])}}i=i[s]?i:[i];var f=u&&u.call,y=f?u:a,_=f?i.join(""):u,g=i.length;return setTimeout(function(){e(i,function t(e,n){return null===e?l():(n||/^https?:\/\//.test(e)||!o||(e=-1===e.indexOf(".js")?o+e+".js":o+e),v[e]?(_&&(h[_]=1),2==v[e]?l():setTimeout(function(){t(e,!0)},0)):(v[e]=1,_&&(h[_]=1),void r(e,l)))})},0),n}function r(t,e){var n,r=u.createElement("script");r.onload=r.onerror=r[f]=function(){r[l]&&!/^c|loade/.test(r[l])||n||(r.onload=r[f]=null,n=1,v[t]=2,e())},r.async=1,r.src=i?t+(-1===t.indexOf("?")?"?":"&")+i:t,a.insertBefore(r,a.lastChild)}var o,i,u=document,a=u.getElementsByTagName("head")[0],c=!1,s="push",l="readyState",f="onreadystatechange",p={},h={},d={},v={};return n.get=r,n.order=function(t,e,r){!function o(i){i=t.shift(),t.length?n(i,o):n(i,e,r)}()},n.path=function(t){o=t},n.urlArgs=function(t){i=t},n.ready=function(r,o,i){r=r[s]?r:[r];var u=[];return!e(r,function(t){p[t]||u[s](t)})&&t(r,function(t){return p[t]})?o():!function(t){d[t]=d[t]||[],d[t][s](o),i&&i(u)}(r.join("|")),n},n.done=function(t){n([null],t)},n})},function(t,e,n){var r=n(68),o=n(69),i=n(2),u=n(3),a=n(19),c=a(function(t,e){return u(t)&&i(t)?r(t,o(e,!1,!0)):[]});t.exports=c},function(t,e,n){(function(e){function r(t){var e=t?t.length:0;for(this.data={hash:a(null),set:new u};e--;)this.push(t[e])}var o=n(74),i=n(5),u=i(e,"Set"),a=i(Object,"create");r.prototype.push=o,t.exports=r}).call(e,function(){return this}())},function(t,e){function n(t,e){for(var n=-1,r=e.length,o=t.length;++n=a?u(e):null,p=e.length;f&&(s=i,l=!1,e=f);t:for(;++c2?n[u-2]:void 0,c=u>2?n[2]:void 0,s=u>1?n[u-1]:void 0;for("function"==typeof a?(a=o(a,s,5),u-=2):(a="function"==typeof s?s:void 0,u-=a?1:0),c&&i(n[0],n[1],c)&&(a=3>u?void 0:a,u=1);++r0;++r"}}function e(e){var n=function(){return"function"==typeof p[e]?p[e].apply(this,arguments):void 0};return u.default(n,p[e]),n.toString=t(e),n}function n(){return h.push(this),"function"==typeof p.componentDidMount?p.componentDidMount.apply(this,arguments):void 0}function r(){var t=h.indexOf(this);return-1!==t&&h.splice(t,1),"function"==typeof p.componentWillUnmount?p.componentWillUnmount.apply(this,arguments):void 0}function o(t,e){Object.defineProperty(f,t,e)}function i(t,e){var n=Object.getOwnPropertyDescriptor(p,t)||{},r=n.enumerable,i=void 0===r?!1:r,u=n.writable,a=void 0===u?!0:u;o(t,{configurable:!0,enumerable:i,writable:a,value:e})}function a(){if(p.__reactAutoBindMap){var t={};for(var e in p.__reactAutoBindMap)p.__reactAutoBindMap.hasOwnProperty(e)&&(t[e]=f[e]);return t}}function s(t){p=t;var u=Object.getOwnPropertyNames(p),s=Object.getOwnPropertyNames(f),l=(c.default(u,s),c.default(s,u));return l.forEach(function(t){delete f[t]}),u.forEach(function(t){var n=Object.getOwnPropertyDescriptor(p,t);"function"==typeof n.value?i(t,e(t)):o(t,n)}),i("componentDidMount",n),i("componentWillUnmount",r),i("__reactAutoBindMap",a()),f.__proto__=t,h}function l(){return f}var f={},p=null,h=[];return n.toString=t("componentDidMount"),r.toString=t("componentWillUnmount"),{update:s,get:l}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=n(83),u=r(i),a=n(62),c=r(a);t.exports=e.default},function(t,e){"use strict";function n(t,e){return t.__reactAutoBindMap.hasOwnProperty(e)?!1:null!==t[e].__reactBoundArguments?!1:!0}function r(t,e){var n=t.constructor.prototype,r=Object.getOwnPropertyDescriptor(n,e);return r&&r.get?r.get().length!==t[e].length?!1:!0:!1}function o(t,e){var o=Object.getOwnPropertyDescriptor(t,e);if("function"==typeof o.value)return t.__reactAutoBindMap?n(t,e):r(t,e)}function i(t){var e=Object.getOwnPropertyNames(t);e.forEach(function(e){o(t,e)&&delete t[e]})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t.default:t}Object.defineProperty(e,"__esModule",{value:!0});var o=n(88);e.createProxy=r(o);var i=n(92);e.getForceUpdate=r(i)},function(t,e){"use strict";function n(t,e,r){if(e(t,r),t._renderedComponent)n(t._renderedComponent,e,r);else for(var o in t._renderedChildren)t._renderedChildren.hasOwnProperty(o)&&n(t._renderedChildren[o],e,r)}function r(t){t._pendingForceUpdate===!1&&(t._pendingForceUpdate=!0)}function o(t,e){if(t._pendingForceUpdate===!0){var n=t._instance;e.Component.prototype.forceUpdate.call(n)}}function i(t){return function(e){var i=e._reactInternalInstance;n(i,r),n(i,o,t)}}e.__esModule=!0,e.default=i,t.exports=e.default},function(t,n){t.exports=e}])}); \ No newline at end of file diff --git a/package.json b/package.json index 60c275b..18f9586 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,11 @@ "description": "isomorphic google map react component, allows render react components on the google map", "main": "lib/index", "scripts": { - "build": "./scripts/build.sh", - "prepublish": "npm run build", + "build:lib": "babel ./src -d lib --ignore '__tests__'", + "build:umd": "webpack src/index.js dist/GoogleMapReact.js --config webpack.config.dev.js", + "build:umd:min": "webpack src/index.js dist/GoogleMapReact.min.js --config webpack.config.prod.js", + "clean": "rimraf lib dist", + "prepublish": "npm run clean && npm run build:lib && npm run build:umd && npm run build:umd:min", "eyetest": "babel-node ./src/__tests__/eye_test.js", "es5eyetest": "node ./lib/__tests__/eye_test.js" }, @@ -48,6 +51,7 @@ "babel-loader": "^5.3.2", "react": "^0.14.0-rc1", "react-dom": "^0.14.0-rc1", + "rimraf": "^2.4.3", "webpack": "^1.12.2" } } diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100755 index 00b1264..0000000 --- a/scripts/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -babel=`npm bin`/babel -webpack=`npm bin`/webpack -build_dir=lib - -rm -rf $build_dir - -$babel ./src -d $build_dir --ignore "__tests__" --loose all - -NODE_ENV=production $webpack src/index.js $build_dir/umd/GoogleMapReact.js -NODE_ENV=production $webpack -p src/index.js $build_dir/umd/GoogleMapReact.min.js - -#echo "gzipped, the global build is `gzip -c $build_dir/umd/GoogleMapReact.min.js | wc -c | sed -e 's/^[[:space:]]*//'` bytes" diff --git a/webpack.config.base.js b/webpack.config.base.js new file mode 100644 index 0000000..acd2089 --- /dev/null +++ b/webpack.config.base.js @@ -0,0 +1,31 @@ +var webpack = require('webpack'); + +var reactExternal = { + root: 'React', + commonjs2: 'react', + commonjs: 'react', + amd: 'react' +}; + +var reactDomExternal = { + root: 'ReactDOM', + commonjs2: 'react-dom', + commonjs: 'react-dom', + amd: 'react-dom' +}; + +module.exports = { + output: { + library: 'GoogleMapReact', + libraryTarget: 'umd' + }, + externals: { + 'react': reactExternal, + 'react-dom': reactDomExternal, + }, + module: { + loaders: [ + { test: /\.js$/, exclude: /node_modules/, loader: 'babel' } + ] + }, +}; diff --git a/webpack.config.dev.js b/webpack.config.dev.js new file mode 100644 index 0000000..bf2c1a9 --- /dev/null +++ b/webpack.config.dev.js @@ -0,0 +1,12 @@ +var webpack = require('webpack'); +var baseConfig = require('./webpack.config.base'); + +var config = Object.create(baseConfig); +config.plugins = [ + new webpack.optimize.OccurenceOrderPlugin(), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify('development') + }) +]; + +module.exports = config; diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 4dae701..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,38 +0,0 @@ -var webpack = require('webpack'); - -module.exports = { - - output: { - library: 'GoogleMapReact', - libraryTarget: 'umd' - }, - - externals: [ - { - "react": { - root: "React", - commonjs2: "react", - commonjs: "react", - amd: "react" - } - } - ], - - module: { - loaders: [ - { test: /\.js$/, exclude: /node_modules/, loader: 'babel?loose=all' } - ] - }, - - node: { - Buffer: false - }, - - plugins: [ - new webpack.optimize.OccurenceOrderPlugin(), - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) - }) - ] - -}; diff --git a/webpack.config.prod.js b/webpack.config.prod.js new file mode 100644 index 0000000..5651b2b --- /dev/null +++ b/webpack.config.prod.js @@ -0,0 +1,18 @@ +var webpack = require('webpack'); +var baseConfig = require('./webpack.config.base'); + +var config = Object.create(baseConfig); +config.plugins = [ + new webpack.optimize.OccurenceOrderPlugin(), + new webpack.DefinePlugin({ + 'process.env.NODE_ENV': JSON.stringify('production') + }), + new webpack.optimize.UglifyJsPlugin({ + compressor: { + screw_ie8: true, + warnings: false + } + }) +]; + +module.exports = config;