1(this["webpackJsonpisobar-sino-website-v2"]=this["webpackJsonpisobar-sino-website-v2"]||[]).push([[12],{1108:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={MARKER_ID_CONFLICT:"Marker \u7684 id \u5c5e\u6027\u91cd\u590d",MARKER_ID_REQUIRED:"\u6bcf\u4e00\u4e2a Marker \u5fc5\u9700\u6709\u4e00\u4e2a id \u5c5e\u6027",MAP_INSTANCE_REQUIRED:"\u6ca1\u6709\u5730\u56fe\u5b9e\u4f8b\uff1b\u7ec4\u4ef6\u5fc5\u987b\u4f5c\u4e3a Map \u7684\u5b50\u7ec4\u4ef6\u4f7f\u7528",CIRCLE_INSTANCE_REQUIRED:"",CIRCLE_CENTER_REQUIRED:"Circle \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e center \u5c5e\u6027",CIRCLE_RADIUS_REQUIRED:"Circle \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e radius \u5c5e\u6027",SRC_REQUIRED:"GroundImage \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e src \u5c5e\u6027",BOUNDS_REQUIRED:"GroundImage \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e bounds \u5c5e\u6027",WINDOW_POSITION_REQUIRED:"InfoWindow \u7ec4\u4ef6\u5fc5\u9700\u8bbe\u7f6e position \u5c5e\u6027",INVALID_AMAP_PLUGIN:"plugins \u5c5e\u6027\u4e0d\u6b63\u786e\uff1b\u76ee\u524d\u652f\u6301\u7684\u63d2\u4ef6\u6709'Scale', 'ToolBar', 'MapType', 'OverView'"},r=function(e){return e in o?o[e]:e},i={error:function(e){throw new Error(r(e))},warning:function(e){console.warn(r(e))},optimize:function(e){console.log("%c"+r(e),"color:#d4d483;border-left: 2px solid #d4d483;padding-left: 4px;")}};t.default=i},1113:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=s(n(0)),a=s(n(1315));function s(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){return function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.instanceCreated=!1,t.myMapComponent=null,t.registeredEvents=[],t.onInstanceCreated=t.onInstanceCreated.bind(t),t}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),r(n,[{key:"onInstanceCreated",value:function(){if(this.instanceCreated=!0,"events"in this.props){var e=this.myMapComponent.instance;this.props.events.created&&this.props.events.created(e)}this.reactivePropChange(this.props,!1)}},{key:"createEventsProxy",value:function(e){var t=this,n=this.myMapComponent.instance,o=Object.keys(e.events||{});o.length&&o.forEach((function(e){-1===t.registeredEvents.indexOf(e)&&(t.registeredEvents.push(e),n.on(e,function(e){return function(){if(t.props.events&&e in t.props.events){for(var n=arguments.length,o=Array(n),r=0;r<n;r++)o[r]=arguments[r];t.props.events[e].apply(null,o)}}}(e)))}))}},{key:"componentWillReceiveProps",value:function(e){this.reactivePropChange(e,!0)}},{key:"reactivePropChange",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.instanceCreated)return!1;var o=this.myMapComponent,r=o.setterMap,i=void 0===r?{}:r,s=o.converterMap,u=void 0===s?{}:s,l=o.instance,c=void 0===l?{}:l,p=Object.keys(e);p.length&&p.forEach((function(o){if("events"===o)return t.createEventsProxy(e);var r=!0;if(n&&(r=t.detectPropChange(o,e,t.props)),!r)return!1;var s=e[o];if(o in u&&(s=u[o](e[o])),o in i)i[o](s);else{var l="set"+(0,a.default)(o);l in c&&c[l](s)}}))}},{key:"detectPropChange",value:function(e,t,n){return t[e]!==n[e]}},{key:"render",value:function(){var t=this;return i.default.createElement(e,o({onInstanceCreated:this.onInstanceCreated,ref:function(e){t.myMapComponent=e}},this.props))}},{key:"componentWillUnmount",value:function(){var e=this.myMapComponent.instance;e&&("destroy"in e&&setTimeout((function(){e.destroy()}
1),10),"hide"in e&&e.hide(),"__map__"in this.props&&"setMap"in e&&e.setMap(null))}}]),n}(i.default.Component)}},1118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="undefined"!==typeof window,r=t.toLnglat=function(e){if(!e)return e;if("getLng"in e&&"getLat"in e)return e;var t=0,n=0;return"[object Array]"==={}.toString.call(e)?(t=e[0],n=e[1]):"lng"in e&&"lat"in e?(t=e.lng,n=e.lat):"longitude"in e&&"latitude"in e&&(t=e.longitude,n=e.latitude),o?new window.AMap.LngLat(t,n):null},i=t.toPixel=function(e){if(!e)return e;if("getX"in e&&"getY"in e)return e;var t=0,n=0;return"[object Array]"==={}.toString.call(e)?(t=e[0],n=e[1]):"x"in e&&"y"in e&&(t=e.x,n=e.y),o?new window.AMap.Pixel(t,n):null},a=t.toSize=function(e){return e?"getWidth"in e?e:o?new window.AMap.Size(e.width,e.height):null:e};t.default={toLnglat:r,toPixel:i,toSize:a}},1150:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){return!!e&&"function"===typeof e}},1166:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=s(n(0)),i=s(n(1113)),a=s(n(1108));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__&&e.__poly__){var o=n;n.setterMap={active:function(e){o.toggleActive(e)}},n.map=e.__map__,n.poly=e.__poly__,n.editorActive=!1,n.createEditorInstance().then((function(){n.props.onInstanceCreated&&n.props.onInstanceCreated()}))}else a.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"toggleActive",value:function(e){e?this.editorActive||this.activeEditor():this.editorActive&&this.inactiveEditor()}},{key:"activeEditor",value:function(){this.polyEditor&&(this.editorActive=!0,this.polyEditor.open())}},{key:"inactiveEditor",value:function(){this.editorActive=!1,this.polyEditor&&this.polyEditor.close()}},{key:"createEditorInstance",value:function(){var e=this;return this.polyEditor?Promise.resolve(this.polyEditor):new Promise((function(t){e.map.plugin(["AMap.PolyEditor"],(function(){e.polyEditor=new window.AMap.PolyEditor(e.map,e.poly),t(e.polyEditor)}))}))}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.polyEditor}}]),t}(r.default.Component);t.default=(0,i.default)(u)},1212:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderMarkerComponent=t.getPropValue=t.MarkerAllProps=t.MarkerConfigurableProps=void 0;var o=n(1118),r=s(n(0)),i=n(60),a=s(n(1150));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.MarkerConfigurableProps=["position","offset","icon","content","draggable","visible","zIndex","angle","animation","shadow","title","clickable","extData","label"],l=t.MarkerAllProps=u.concat(["topWhenClick","bubble","raiseOnDrag","cursor","autoRotation","shape"]);t.getPropValue=function(e,t){return-1===l.indexOf(e)?null:"position"===e?(0,o.toLnglat)(t):"offset"===e?(0,o.toPixel)(t):t},t.renderMarkerComponent=function(e,t){var n=e;(0,a.default)(e)&&(n=e(t.getExtData()));n&&(0,i.render)(r.default.createElement("div",null,n),t.getContent())}},1310:function(e,t,n){"use strict";var o=Object.prototype.hasOwnProperty,r="~";function i(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,o,i){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new a(n,o||e,i),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function u(e,t){0===--e._eventsCount?e._events=new i:delete e._events[t]}function l(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),l.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)o.call(e,t)&&n.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},l.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},l.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],p=arguments.length;
1if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,o),!0;case 5:return c.fn.call(c.context,t,n,o,i),!0;case 6:return c.fn.call(c.context,t,n,o,i,a),!0}for(l=1,u=new Array(p-1);l<p;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,h=c.length;for(l=0;l<h;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),p){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,o);break;default:if(!u)for(f=1,u=new Array(p-1);f<p;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},l.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return u(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||u(this,i);else{for(var s=0,l=[],c=a.length;s<c;s++)(a[s].fn!==t||o&&!a[s].once||n&&a[s].context!==n)&&l.push(a[s]);l.length?this._events[i]=1===l.length?l[0]:l:u(this,i)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&u(this,t)):(this._events=new i,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l},1311:function(e,t,n){"use strict";function o(e,t){this.x=e,this.y=t}e.exports=o,o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),o=t*this.x-n*this.y,r=n*this.x+t*this.y;return this.x=o,this.y=r,this},_rotateAround:function(e,t){var n=Math.cos(e),o=Math.sin(e),r=t.x+n*(this.x-t.x)-o*(this.y-t.y),i=t.y+o*(this.x-t.x)+n*(this.y-t.y);return this.x=r,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e}},1312:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MouseTool=t.Marker=t.GroundImage=t.InfoWindow=t.PolyEditor=t.Polyline=t.Polygon=t.CircleEditor=t.Circle=t.Markers=t.Map=void 0;var o=d(n(1313)),r=d(n(1316)),i=d(n(1317)),a=d(n(1318)),s=d(n(1319)),u=d(n(1320)),l=d(n(1321)),c=d(n(1322)),p=d(n(1323)),f=d(n(1166)),h=d(n(1324));
1function d(e){return e&&e.__esModule?e:{default:e}}t.Map=o.default,t.Markers=i.default,t.Circle=a.default,t.CircleEditor=p.default,t.Polygon=s.default,t.Polyline=u.default,t.PolyEditor=f.default,t.InfoWindow=l.default,t.GroundImage=c.default,t.Marker=r.default,t.MouseTool=h.default,t.default={Map:o.default,Markers:i.default,Circle:a.default,CircleEditor:p.default,Polygon:s.default,Polyline:u.default,PolyEditor:f.default,InfoWindow:l.default,GroundImage:c.default,Marker:r.default,MouseTool:h.default}},1313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=p(n(0)),a=p(n(1314)),s=p(n(1150)),u=p(n(1108)),l=n(1118),c=p(n(1113));function p(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}var h=i.default.Component,d=i.default.Children,m={width:"100%",height:"100%"},v={width:"100%",height:"100%",position:"relative"},_=["animateEnable","doubleClickZoom","dragEnable","isHotspot","jogEnable","keyboardEnable","resizeEnable","rotateEnable","scrollWheel","touchZoom","zoomEnable"],g=["view","zooms","showIndoorMap","indoorMap","expandZoomRange","showBuildingBlock","viewMode","pitchEnable","buildingAnimation","skyColor"],y=["layers","zoom","center","labelzIndex","mapStyle","features","cursor","pitch"].concat(_,g),w={MapType:{showRoad:!1,showTraffic:!1,defaultType:0},ToolBar:{position:"RB",noIpLocate:!0,locate:!0,liteStyle:!0,autoPosition:!1},OverView:{},ControlBar:{}},C=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.state={mapLoaded:!1};var o=n;return n.setterMap={zoom:function(e){o.map.setZoom(e)},cursor:function(e){o.map.setDefaultCursor(e)},labelzIndex:function(e){o.map.setlabelzIndex(e)}},n.converterMap={center:l.toLnglat},"undefined"!==typeof window&&(n.pluginMap={},new a.default({key:e.amapkey,useAMapUI:e.useAMapUI,version:e.version,protocol:e.protocol}).load().then((function(){n.createInstance(),n.state.mapLoaded||n.setState({mapLoaded:!0})}))),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentWillReceiveProps",value:function(e){this.state.mapLoaded&&this.updateMapProps(this.props,e)}},{key:"renderChildren",value:function(){var e=this;return d.map(this.props.children,(function(t){if(t){var n=t.type;return n.preventAmap||"string"===typeof n?t:i.default.cloneElement(t,{__map__:e.map})}return t}))}},{key:"createInstance",value:function(){if(!this.map){var e=this.buildCreateOptions();this.map=new window.AMap.Map(this.mapWrapper,e),this.setPlugins(this.props),this.props.onInstanceCreated&&this.props.onInstanceCreated()}}},{key:"buildCreateOptions",value:function(){var e=this,t=this.props,n={};return y.forEach((function(o){o in t&&(n[o]=e.getSetterValue(o,t))})),n}},{key:"updateMapProps",value:function(e,t){var n=this,o={},r=!1,i=!1;_.forEach((function(a){a in t&&(i=!0,n.detectPropChanged(a,e,t)&&(r=!0,o[a]=t[a]))})),r&&this.map.setStatus(o),i&&"status"in t&&u.default.warning("\u4ee5\u4e0b\u8fd9\u4e9b\u5c5e\u6027\u53ef\u4ee5\u5355\u72ec\u63d0\u4f9b\u8fdb\u884c\u914d\u7f6e\uff0c\u4e5f\u53ef\u4ee5\u7edf\u4e00\u4f5c\u4e3a\u2018status\u2019\u5c5e\u6027\u914d\u7f6e\uff1b\u4f46\u662f\u8bf7\u4e0d\u8981\u540c\u65f6\u4f7f\u7528\u8fd9\u4e24\u79cd\u65b9\u5f0f\u3002\n\uff08"+_.join(", ")+"\uff09"),g.forEach((function(o){o in t&&n.detectPropChanged(o,e,t)&&u.default.warning("'"+o+"' \u662f\u4e00\u4e2a\u9759\u6001\u5c5e\u6027\uff0c\u5730\u56fe\u5b9e\u4f8b\u521b\u5efa\u6210\u529f\u540e\u65e0\u6cd5\u4fee\u6539")})),this.setPlugins(t)}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t[e]):t[e]}},{key:"detectPropChanged",value:function(e,t,n){return t[e]!==n[e]}},{key:"setPlugins",value:function(e){var t=this,n=["Scale","ToolBar","MapType","OverView","ControlBar"];if("plugins"in e){var o=e.plugins;o&&o.length&&o.forEach((function(e){var o=void 0,r=void 0,i=void 0;"string"===typeof e?(o=e,r=null,i=!0):(o=e.name,i=!("visible"in(r=e.options||{}))||"boolean"!==typeof r.visible||r.visible,delete r.visible);var a=n.indexOf(o);-1===a?u.default.warning("\u6ca1\u6709 \u2018"+o+"\u2019 \u8fd9\u4e2a\u63d2\u4ef6\uff0c\u8bf7\u68c0\u67e5\u662f\u5426\u62fc\u5199\u9519\u8bef"):i&&(n.splice(a,1),t.installPlugin(o,r))}))}this.removeOrDisablePlugins(n)}},{key:"removeOrDisablePlugins",value:function(e){var t=this;e&&e.length&&e.forEach((function(e){e in t.pluginMap&&("ControlBar"===e?(t.map.removeControl(t.pluginMap[e]),delete t.pluginMap[e]):t.pluginMap[e].hide())}))}},{key:"installPlugin",value:function(e,t){switch(t=t||{},e){case"Scale":case"ToolBar":case"OverView":case"MapType":this.setMapPlugin(e,t);break;case"ControlBar":this.setControlBar(t)}}},{key:"setMapPlugin",value:function(e,t){var n=this;if(this.pluginMap[e])this.pluginMap[e].show();else{var r=t.onCreated,i=f(t,["onCreated"]),a=o({},w[e],i);this.map.plugin(["AMap."+e],(function(){n.pluginMap[e]=new window.AMap[e](a),n.map.addControl(n.pluginMap[e]),(0,s.default)(r)&&r(n.pluginMap[e])}))}}},{key:"setControlBar",value:function(e){var t=this;if(this.pluginMap.ControlBar);else{var n=e.onCreated,r=f(e,["onCreated"]),i=o({},w.ControlBar,r);this.map.plugin(["AMap.ControlBar"],(function(){t.pluginMap.ControlBar=new window.AMap.ControlBar(i),t.map.addControl(t.pluginMap.ControlBar),(0,s.default)(n)&&n(t.pluginMap.ControlBar)}))}}},{key:"render",value:function(){var e=this;return i.default.createElement("div",{style:v},i.default.createElement("div",{ref:function(t){e.mapWrapper=t},style:m},this.state.mapLoaded?null:this.props.loading||null),i.default.createElement("div",null,this.state.mapLoaded?this.renderChildren():null))}},{key:"instance",get:function(){return this.map}}]),t}(h);t.default=(0,c.default)(C)},1314:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i={v:"1.4.0",hostAndPath:"webapi.amap.com/maps",key:"f97efc35164149d0c0f299e7a8adb3d2",callback:"__amap_init_callback",useAMapUI:!1},a=null,s=null,u=!1,l=function(){function e(t){var n=t.key,r=t.useAMapUI,a=t.version,s=t.protocol;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=o({},i,{useAMapUI:r,protocol:s}),"undefined"!==typeof window&&(n?this.config.key=n:"amapkey"in window&&(this.config.key=window.amapkey)),a&&(this.config.v=a),this.protocol=s||window.location.protocol,-1===this.protocol.indexOf(":")&&(this.protocol+=":")}return r(e,[{key:"getScriptSrc",value:function(e){return this.protocol+"//"+e.hostAndPath+"?v="+e.v+"&key="+e.key+"&callback="+e.callback}},{key:"buildScriptTag",value:function(e){var t=document.createElement("script");return t.type="text/javascript",t.async=!0,t.defer=!0,t.src=e,t}},{key:"getAmapuiPromise",value:function(){var e=this.buildScriptTag(this.protocol+"//webapi.amap.com/ui/1.0/main-async.js"),t=new Promise((function(t){e.onload=function(){t()}}));return document.body.appendChild(e),t}},{key:"getMainPromise",value:function(){var e=this,t=this.buildScriptTag(this.getScriptSrc(this.config)),n=new Promise((function(t){window[e.config.callback]=function(){t(),delete window[e.config.callback]}}));return document.body.appendChild(t),n}},{key:"load",value:function(){if("undefined"===typeof window)return null;var e=this.config.useAMapUI;return a=a||this.getMainPromise(),e&&(s=s||this.getAmapuiPromise()),new Promise((function(t){a.then((function(){e&&s?s.then((function(){window.initAMapUI&&!u&&(window.initAMapUI(),"function"===typeof e&&e(),u=!0),t()})):t()}))}))}}]),e}();t.default=l},1315:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){return e[0].toUpperCase()+e.slice(1,e.length)}},1316:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=p(n(0)),a=n(60),s=p(n(1108)),u=p(n(1113)),l=n(1212),c=n(1118);function p(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.marker&&o.marker.show():o.marker&&o.marker.hide()},zIndex:function(e){o.marker&&o.marker.setzIndex(e)}},n.converterMap={position:c.toLnglat,offset:c.toPixel},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.createMarker(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){this.map&&this.refreshMarkerLayout(e)}},{key:"createMarker",value:function(e){var t,n=this.buildCreateOptions(e);this.marker=new window.AMap.Marker(n),this.marker.render=(t=this.marker,function(e){(0,l.renderMarkerComponent)(e,t)}),this.props.onInstanceCreated&&this.props.onInstanceCreated(),this.setMarkerLayout(e),this.setChildComponent(e)}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return l.MarkerAllProps.forEach((function(o){o in e&&(n[o]=t.getSetterParam(o,e[o]))}
1)),n.map=this.map,n}},{key:"setMarkerLayout",value:function(e){("render"in e||"children"in e&&e.children)&&(this.createContentWrapper(),"className"in e&&e.className&&(this.contentWrapper.className=e.className))}},{key:"createContentWrapper",value:function(){this.contentWrapper=document.createElement("div"),this.marker.setContent(this.contentWrapper)}},{key:"setChildComponent",value:function(e){if(this.contentWrapper)if("className"in e&&e.className&&(this.contentWrapper.className=e.className),"render"in e)(0,l.renderMarkerComponent)(e.render,this.marker);else if("children"in e){var t=e.children;"undefined"!==("undefined"===typeof t?"undefined":o(t))&&this.contentWrapper&&(0,a.render)(i.default.createElement("div",null,t),this.contentWrapper)}}},{key:"refreshMarkerLayout",value:function(e){this.setChildComponent(e)}},{key:"getSetterParam",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.marker}}]),t}(i.default.Component);t.default=(0,u.default)(f)},1317:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=l(n(0)),i=n(60),a=l(n(1150)),s=l(n(1108)),u=n(1212);function l(e){return e&&e.__esModule?e:{default:e}}if("undefined"!==typeof window){var c=document.head||document.getElementsByTagName("head")[0],p=document.createElement("style");p.type="text/css",p.textContent=".amap_markers_pop_window{\n padding: 10px;\n border: 1px solid #ddd;\n border-radius: 8px;\n background: #fff;\n position: relative;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n}\n.amap_markers_pop_window::before{\n content: ' ';\n display: block;\n position: absolute;\n bottom: -12px;\n left: 50%;\n margin-left: -7px;\n width: 0;\n height: 0;\n border-top: 12px solid #ddd;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n}\n.amap_markers_pop_window::after{\n content: ' ';\n display: block;\n position: absolute;\n bottom: -11px;\n left: 50%;\n margin-left: -6px;\n width: 0;\n height: 0;\n border-top: 11px solid #fff;\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n}\n.amap_markers_pop_window_item{\n cursor:pointer;\n width: 40px;\n height: 50px;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n}\n.amap_markers_pop_window_item span{\n pointer-events: none;\n}\n.amap_markers_window_overflow_warning{\n text-align: center;\n width: 100%;\n margin: 5px 0;\n color: #666;\n}",c.appendChild(p)}var f=r.default.Component,h=[],d=[],m=["gridSize","minClusterSize","maxZoom","averageCenter","styles","zoomOnClick","renderCluserMarker"],v=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!==typeof window&&(e.__map__?(n.map=e.__map__,n.element=n.map.getContainer(),n.markersCache=h,n.useCluster=null,n.markerIDCache=d,n.resetOffset=new window.AMap.Pixel(-12.8,-(46*.8-2)),n.hoverOffset=new window.AMap.Pixel(-46*.8/2,-(66*.8-2)),n.createMarkers(e)):s.default.warning("MAP_INSTANCE_REQUIRED")),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"createMarkers",value:function(e){var t=this,n=e.markers||[],o=[],r={};
1n.length&&n.forEach((function(n,i){var s=t.buildCreateOptions(e,n,i);s.map=t.map;var l=null;if((0,a.default)(e.render)){var c=e.render(n);if(!1!==c){var p=document.createElement("div");p.setAttribute("__react_amap__","1"),l=p,r[i]=c}}if(!l){l=document.createElement("div");var f=document.createElement("img");f.src="//webapi.amap.com/theme/v1.3/markers/n/mark_bs.png",l.appendChild(f)}s.content=l;var h=new window.AMap.Marker(s);h.on("click",(function(e){t.onMarkerClick(e)})),h.on("mouseover",(function(e){t.onMarkerHover(e)})),h.on("mouseout",(function(e){t.onMarkerHoverOut(e)})),h.render=function(e){return function(t){return(0,u.renderMarkerComponent)(t,e)}}(h),t.bindMarkerEvents(h),o.push(h)})),this.markersCache=o,this.markerReactChildDOM=r,this.exposeMarkerInstance(),this.checkClusterSettings(e)}},{key:"checkClusterSettings",value:function(e){var t=this;if(e.useCluster)this.loadClusterPlugin(e.useCluster).then((function(e){e.setMarkers(t.markersCache)}));else if(this.mapCluster){var n=this.mapCluster.getMarkers();
1this.mapCluster.clearMarkers(),n.forEach((function(e){e.setMap(t.map)}))}}},{key:"componentDidMount",value:function(){this.map&&this.setMarkerChild()}},{key:"setMarkerChild",value:function(){var e=this;Object.keys(this.markerReactChildDOM).forEach((function(t){var n=e.markersCache[t].getContent(),o=e.markerReactChildDOM[t];e.renderMarkerChild(n,o)}))}},{key:"renderMarkerChild",value:function(e,t){(0,i.render)(r.default.createElement("div",null,t),e)}},{key:"buildCreateOptions",value:function(e,t,n){var o={},r=["extData"];return u.MarkerAllProps.forEach((function(i){if(i in t&&-1===r.indexOf(i))o[i]=(0,u.getPropValue)(i,t[i]);else if(i in e)if((0,a.default)(e[i])){var s=e[i].call(null,t,n);o[i]=(0,u.getPropValue)(i,s)}else o[i]=(0,u.getPropValue)(i,e[i])})),o.extData=t,o}},{key:"componentWillReceiveProps",value:function(e){this.map&&this.refreshMarkersLayout(e)}},{key:"refreshMarkersLayout",value:function(e){var t=e.markers!==this.props.markers,n=!!this.props.useCluster!==!!e.useCluster;t&&(this.markersCache.length&&this.markersCache.forEach((function(e){e&&(e.setMap(null),e=null)})),this.markersCache=h,this.createMarkers(e),this.setMarkerChild()),(t||n)&&this.markersWindow&&this.markersWindow.close(),n&&this.checkClusterSettings(e)}},{key:"loadClusterPlugin",value:function(e){var t=this;if(this.mapCluster)return Promise.resolve(this.mapCluster);var n="boolean"===typeof e?{}:e;return new Promise((function(e){t.map.plugin(["AMap.MarkerClusterer"],(function(){e(t.createClusterPlugin(n))}))}))}},{key:"createClusterPlugin",value:function(e){var t={},n={minClusterSize:2,zoomOnClick:!1,maxZoom:18,gridSize:60,averageCenter:!0};m.forEach((function(o){t[o]=o in e?e[o]:n[o]})),this.mapCluster=new window.AMap.MarkerClusterer(this.map,[],t);var o={};return"events"in e&&"created"in(o=e.events)&&o.created(this.mapCluster),this.initClusterMarkerWindow(),this.bindClusterEvent(o),this.mapCluster}},{key:"onMarkerClick",value:function(e){var t=e.target;this.triggerMarkerClick(e,t)}},{key:"onMarkerHover",value:function(e){e.target.setTop(!0),this.setMarkerHovered(e,e.target)}},{key:"onMarkerHoverOut",value:function(e){e.target.setTop(!1),this.setMarkerHoverOut(e,e.target)}},{key:"onWindowMarkerClick",value:function(e){var t=e.markerRef;this.triggerMarkerClick(null,t)}},{key:"onWindowMarkerHover",value:function(e){var t=e.markerRef;this.setMarkerHovered(null,t)}},{key:"onWindowMarkerHoverOut",value:function(e){var t=e.markerRef;this.setMarkerHoverOut(null,t)}},{key:"setMarkerHovered",value:function(e,t){this.triggerMarkerHover(e,t)}},{key:"setMarkerHoverOut",value:function(e,t){this.triggerMarkerHoverOut(e,t)}},{key:"triggerMarkerClick",value:function(e,t){var n=this.props.events||{};(0,a.default)(n.click)&&n.click(e,t)}},{key:"triggerMarkerHover",value:function(e,t){var n=this.props.events||{};(0,a.default)(n.mouseover)&&n.mouseover(e,t)}},{key:"triggerMarkerHoverOut",value:function(e,t){var n=this.props.events||{};(0,a.default)(n.mouseout)&&n.mouseout(e,t)}},{key:"initClusterMarkerWindow",value:function(){this.markersWindow=new window.AMap.InfoWindow({isCustom:!0,autoMove:!0,closeWhenClickMap:!0,content:"<span>loading...</span>",showShadow:!1,offset:new window.AMap.Pixel(0,-20)}),this.markersDOM=document.createElement("div"),this.markersDOM.className="amap_markers_pop_window",this.markersWindow.setContent(this.markersDOM)}},{key:"bindClusterEvent",value:function(e){var t=this;this.mapCluster.on("click",(function(n){if(t.props.useCluster&&t.props.useCluster.zoomOnClick);else{var o=!0;(0,a.default)(e.click)&&(o=e.click(n)),!1!==o&&t.showMarkersInfoWindow(n)}}))}},{key:"showMarkersInfoWindow",value:function(e){var t=this,n=e.lnglat,o=e.markers;if(this.markersDOM.innerHTML="",o&&o.length){var r=o.length;if(r>42&&(o=o.slice(0,42)),o.forEach((function(e){var n=e.getContent(),o=document.createElement("div");o.className="window_marker_item",o.appendChild(n),o.markerRef=e,o.addEventListener("click",t.onWindowMarkerClick.bind(t,o),!0),o.addEventListener("mouseover",t.onWindowMarkerHover.bind(t,o),!0),o.addEventListener("mouseout",t.onWindowMarkerHoverOut.bind(t,o),!0),t.markersDOM.appendChild(o)})),r>42){var i=document.createElement("div");i.className="amap_markers_window_overflow_warning",i.innerText="\u66f4\u591a\u5750\u6807\u8bf7\u653e\u5927\u5730\u56fe\u67e5\u7
170b",this.markersDOM.appendChild(i)}}this.markersWindow.open(this.map,n)}},{key:"exposeMarkerInstance",value:function(){if("events"in this.props){var e=this.props.events||{};(0,a.default)(e.created)&&e.created(this.markersCache)}}},{key:"bindMarkerEvents",value:function(e){var t=this.props.events||{},n=Object.keys(t),o=["click","mouseover","mouseout","created"];n.length&&n.forEach((function(n){-1===o.indexOf(n)&&e.on(n,t[n])}))}},{key:"render",value:function(){return null}}]),t}(f);t.default=v},1318:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=u(n(0)),i=u(n(1113)),a=u(n(1108)),s=n(1118);function u(e){return e&&e.__esModule?e:{default:e}}var l=["center","radius","draggable","extData","visible","style"].concat(["zIndex","bubble"]),c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){o.mapCircle&&(e?o.mapCircle.show():o.mapCircle.hide())},style:function(e){o.mapCircle&&o.mapCircle.setOptions(e)}},n.converterMap={center:s.toLnglat},n.state={loaded:!1},n.map=e.__map__,n.element=n.map.getContainer(),n.createInstance(e).then((function(){n.setState({loaded:!0}),n.props.onInstanceCreated&&n.props.onInstanceCreated()}))}else a.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"createInstance",value:function(e){var t=this.buildCreateOptions(e);return t.map=this.map,this.mapCircle=new window.AMap.Circle(t),Promise.resolve(this.mapCircle)}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return l.forEach((function(o){o in e&&("style"===o&&void 0!==e.style?Object.keys(e.style).forEach((function(t){n[t]=e.style[t]})):n[o]=t.getSetterValue(o,e))})),n}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t[e]):t[e]}},{key:"renderEditor",value:function(e){return e?1!==r.default.Children.count(e)?null:r.default.cloneElement(r.default.Children.only(e),{__circle__:this.mapCircle,__map__:this.map,__ele__:this.element}):null}},{key:"render",value:function(){return this.state.loaded?this.renderEditor(this.props.children):null}},{key:"instance",get:function(){return this.mapCircle}}]),t}(r.default.Component);t.default=(0,i.default)(c)},1319:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=c(r),a=c(n(1113)),s=c(n(1108)),u=c(n(1166)),l=n(1118);function c(e){return e&&e.__esModule?e:{default:e}}var p=["path","draggable","extData","style","visible"].concat(["zIndex","bubble"]),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.polygon&&o.polygon.show():o.polygon&&o.polygon.hide()},style:function(e){o.polygon.setOptions(e)}},n.converterMap={path:function(e){return o.buildPathValue(e)}},n.state={loaded:!1},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.initMapPolygon(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"initMapPolygon",value:function(e){var t=this.buildCreateOptions(e);t.map=this.map,this.polygon=new window.AMap.Polygon(t),this.setState({loaded:!0}),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return p.forEach((function(o){o in e&&("style"===o&&e.style?Object.keys(e.style).forEach((function(t){n[t]=e.style[t]})):"visible"!==o&&(n[o]=t.getSetterValue(o,e[o])))})),n}},{key:"detectPropChanged",value:function(e,t){return this.props[e]!==t[e]}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"buildPathValue",value:function(e){var t=this;if(e.length){var n=e[0];if("number"===typeof n[0])return e.map((function(e){return(0,l.toLnglat)(e)}));if("getLng"in n)return e;if("longitude"in n||"lng"in n)return e.map((function(e){return(0,l.toLnglat)(e)}));if("length"in n&&n.length)return e.map((function(e){return t.buildPathValue(e)}))}return[]}},{key:"renderEditor",value:function(e){if(!e)return null;if(1!==i.default.Children.count(e))return null;var t=i.default.Children.only(e);
1return t.type===u.default?i.default.cloneElement(t,{__poly__:this.polygon,__map__:this.map}):null}},{key:"render",value:function(){return this.state.loaded?this.renderEditor(this.props.children):null}},{key:"instance",get:function(){return this.polygon}}]),t}(r.Component);t.default=(0,a.default)(f)},1320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=l(n(0)),i=l(n(1113)),a=l(n(1108)),s=l(n(1166)),u=n(1118);function l(e){return e&&e.__esModule?e:{default:e}}var c=r.default.Component,p=["path","extData","draggable","visible","style"].concat(["zIndex","bubble","showDir"]),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.polyline&&o.polyline.show():o.polyline&&o.polyline.hide()},style:function(e){o.polyline.setOptions(e)}},n.converterMap={path:function(e){return o.buildPathValue(e)}},n.state={loaded:!1},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.createMapPolyline(e)}),13)}else a.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"createMapPolyline",value:function(e){var t=this.buildCreateOptions(e);t.map=this.map,this.polyline=new window.AMap.Polyline(t),this.setState({loaded:!0}),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return p.forEach((function(o){o in e&&("style"===o&&e.style?Object.keys(e.style).forEach((function(t){n[t]=e.style[t]})):"visible"!==o&&(n[o]=t.getSetterValue(o,e[o])))})),n}},{key:"detectPropChanged",value:function(e,t){return this.props[e]!==t[e]}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"buildPathValue",value:function(e){return e.length?"getLng"in e[0]?e:e.map((function(e){return(0,u.toLnglat)(e)})):e}},{key:"renderEditor",value:function(e){if(!e)return null;if(1!==r.default.Children.count(e))return null;var t=r.default.Children.only(e);return t.type===s.default?r.default.cloneElement(t,{__poly__:this.polyline,__map__:this.map}):null}},{key:"render",value:function(){return this.state.loaded?this.renderEditor(this.props.children):null}},{key:"instance",get:function(){return this.polyline}}]),t}(c);t.default=(0,i.default)(f)},1321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=l(n(0)),i=n(60),a=l(n(1113)),s=l(n(1108)),u=n(1118);function l(e){return e&&e.__esModule?e:{default:e}}var c=r.default.Component,p=["content","position","size","visible","offset"].concat(["isCustom","autoMove","closeWhenClickMap","showShadow"]),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?(o.showWindow(),o.setClassName(o.props),o.setChild(o.props)):o.closeWindow()}}
1,n.converterMap={size:u.toSize,offset:u.toPixel,position:u.toLnglat},n.map=e.__map__,n.isCustom=!0,setTimeout((function(){n.createInfoWindow(e)}),13)}else s.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillReceiveProps",value:function(e){this.map&&this.refreshWindowLayout(e)}},{key:"createInfoWindow",value:function(e){var t=this.buildCreateOptions(e);this.infoWindow=new window.AMap.InfoWindow(t),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"refreshWindowLayout",value:function(e){this.setChild(e),this.setClassName(e)}},{key:"checkPropChanged",value:function(e,t){return this.props[e]!==t[e]}},{key:"showWindow",value:function(){this.infoWindow.open(this.map,this.infoWindow.getPosition())}},{key:"closeWindow",value:function(){this.infoWindow.close()}},{key:"buildCreateOptions",value:function(e){var t=this,n={};return n.isCustom="isCustom"in e&&!!e.isCustom,"content"in e?n.content=e.content:(this.infoDOM=document.createElement("div"),n.content=this.infoDOM),p.forEach((function(o){o in e&&-1===["visible","isCustom","content"].indexOf(o)&&(n[o]=t.getSetterValue(o,e[o]))})),n}},{key:"getSetterValue",value:function(e,t){return e in this.converterMap?this.converterMap[e](t):t}},{key:"setChild",value:function(e){var t=e.children;this.infoDOM&&t?(0,i.render)(r.default.createElement("div",null,t),this.infoDOM):e.children&&console.warn("\u56e0\u4e3a\u4f60\u8bbe\u7f6e isCustom \u4e3a true\uff0cInfoWindow \u7684 Children \u88ab\u5ffd\u7565")}},{key:"setClassName",value:function(e){if(this.infoDOM){var t="";"className"in e&&e.className?t+=e.className:!0===e.isCustom&&(t+="amap_markers_pop_window"),this.infoDOM.className=t}}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.infoWindow}}]),t}(c);t.default=(0,a.default)(f)},1322:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=s(n(0)),i=s(n(1113)),a=s(n(1108));function s(e){return e&&e.__esModule?e:{default:e}}var u=!1,l=1,c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if("undefined"!==typeof window)if(e.__map__){var o=n;n.setterMap={visible:function(e){e?o.image&&o.image.show():o.image&&o.image.hide()},src:function(e){o.image.setImageUrl(e)}},n.converterMap={bounds:function(e){return o.buildBounds(e)}},n.map=e.__map__,n.element=n.map.getContainer(),setTimeout((function(){n.createGroundImage(e)}),13)}else a.default.warning("MAP_INSTANCE_REQUIRED");return n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"checkPropsChanged",value:function(e,t){return this.props[t]!==e[t]}},{key:"createGroundImage",value:function(e){var t=void 0,n=void 0,o=void 0,r=void 0;"src"in e?t=e.src:a.default.warning("SRC_REQUIRED",!0),"bounds"in e?n=this.buildBounds(e.bounds):a.default.warning("BOUNDS_REQUIRED",!0),r="clickable"in e?e.clickable:u,o="opacity"in e?e.opacity:l,this.image=new window.AMap.GroundImage(t,n,{map:this.map,clickable:r,opacity:o}),this.props.onInstanceCreated&&this.props.onInstanceCreated()}},{key:"buildBounds",value:function(e){return e?"getSouthWest"in e?e:new window.AMap.Bounds(new window.AMap.LngLat(e.sw.longitude,e.sw.latitude),new window.AMap.LngLat(e.ne.longitude,e.ne.latitude)):e}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.image}}]),t}(r.default.Component);t.default=(0,i.default)(c)},1323:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=s(n(0)),i=s(n(1108)),a=s(n(1150));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!==typeof window&&(e.__map__&&e.__circle__?(n.map=e.__map__,n.element=n.map.getContainer(),n.circle=e.__circle__,n.editorActive=!1,n.onPropsUpdate(e)):i.default.warning("CIRCLE_INSTANCE_REQUIRED")),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
1(t,e),o(t,[{key:"componentWillReceiveProps",value:function(e){this.map&&this.onPropsUpdate(e)}},{key:"onPropsUpdate",value:function(e){"active"in e&&!1===e.active?this.toggleActive(!1,e):this.toggleActive(!0,e)}},{key:"toggleActive",value:function(e,t){e?this.editorActive||this.activeEditor(t):this.editorActive&&this.inactiveEditor()}},{key:"activeEditor",value:function(e){var t=this;this.loadCircleEditor(e).then((function(e){t.editorActive=!0,e.open()}))}},{key:"inactiveEditor",value:function(){this.editorActive=!1,this.circleEditor&&this.circleEditor.close()}},{key:"loadCircleEditor",value:function(e){var t=this;return this.circleEditor?Promise.resolve(this.circleEditor):new Promise((function(n){t.map.plugin(["AMap.CircleEditor"],(function(){n(t.createEditorInstance(e))}))}))}},{key:"createEditorInstance",value:function(e){this.circleEditor=new window.AMap.CircleEditor(this.map,this.circle);var t=this.exposeEditorInstance(e);return t&&this.bindEditorEvents(t),this.circleEditor}},{key:"exposeEditorInstance",value:function(e){if("events"in e){var t=e.events||{};return(0,a.default)(t.created)&&t.created(this.circleEditor),delete t.created,t}return!1}},{key:"bindEditorEvents",value:function(e){var t=this,n=Object.keys(e);n.length&&n.forEach((function(n){t.circleEditor.on(n,e[n])}))}},{key:"render",value:function(){return null}}]),t}(r.default.Component);t.default=u},1324:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=s(n(0)),i=s(n(1113)),a=s(n(1108));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!==typeof window&&(e.__map__?(n.map=e.__map__,n.loadToolInstance().then((function(){n.props.onInstanceCreated&&n.props.onInstanceCreated()}))):a.default.warning("MAP_INSTANCE_REQUIRED")),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(){return!1}},{key:"loadToolInstance",value:function(){var e=this;return new Promise((function(t){e.map.plugin(["AMap.MouseTool"],(function(){e.tool=new window.AMap.MouseTool(e.map),t()}))}))}},{key:"render",value:function(){return null}},{key:"instance",get:function(){return this.tool}}]),t}(r.default.Component);t.default=(0,i.default)(u)},1513:function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(24),a=n.n(i),s=n(60),u=n.n(s),l=n(1310),c=n.n(l),p=n(2),f=n(3),h=function(){return Object(f.a)((function e(t){var n=t.apiKey,o=t.channel,r=t.client,i=t.id,a=void 0===i?"__googleMapsScriptId":i,s=t.libraries,u=void 0===s?[]:s,l=t.language,c=t.region,f=t.version,h=t.mapIds,d=t.nonce,m=t.retries,v=void 0===m?3:m,_=t.url,g=void 0===_?"https://maps.googleapis.com/maps/api/js":_;if(Object(p.a)(this,e),this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.version=f,this.apiKey=n,this.channel=o,this.client=r,this.id=a||"__googleMapsScriptId",this.libraries=u,this.language=l,this.region=c,this.mapIds=h,this.nonce=d,this.retries=v,this.url=g,e.instance){if(!function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!==r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!==r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!==r--;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}(this.options,e.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(e.instance.options)));return e.instance}e.instance=this}),[{key:"options",get:function(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url}}},{key:"createUrl",value:function(){var e=this.url;return e+="?callback=".concat(this.CALLBACK),this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),e}},{key:"load",value:function(){return this.loadPromise()}},{key:"loadPromise",value:function(){var e=this;return new Promise((function(t,n){e.loadCallback((function(e){e?n(e):t()}))}))}},{key:"loadCallback",value:function(e){this.callbacks.push(e),this.execute()}},{key:"setScript",value:function(){if(document.getElementById(this.id))this.callback();else{var e=this.createUrl(),t=document.createElement("script");t.id=this.id,t.type="text/javascript",t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}}},{key:"deleteScript",value:function(){var e=document.getElementById(this.id);e&&e.remove()}},{key:"resetIfRetryingFailed",value:function(){var e=this.retries+1;this.done&&!this.loading&&this.errors.length>=e&&(this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[])}},{key:"loadErrorCallback",value:function(e){var t=this;if(this.errors.push(e),this.errors.length<=this.retries){var n=this.errors.length*Math.pow(2,this.errors.length);console.log("Failed to load Google Maps script, retrying in ".concat(n," ms.")),setTimeout((function(){t.deleteScript(),t.setScript()}),n)}else this.onerrorEvent=e,this.callback()}},{key:"setCallback",value:function(){window.__googleMapsCallback=this.callback.bind(this)}},{key:"callback",value:function(){var e=this;this.done=!0,this.loading=!1,this.callbacks.forEach((function(t){t(e.onerrorEvent)})),this.callbacks=[]}},{key:"execute",value:function(){window.google&&window.google.maps&&window.google.maps.version&&(console.warn("Aborted attempt to load Google Maps JS with @googlemaps/js-api-loader.This may result in undesirable behavior as script parameters may not match."),this.callback()),this.resetIfRetryingFailed(),this.done?this.callback():this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}])}(),d=n(1311),m=n.n(d);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var y={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},w=function(e){function t(){return e.apply(this,arguments)||this}_(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(){return!1},n.render=function(){return r.a.createElement("div",{ref:this.props.registerChild,style:y})},t}(o.Component),C=function(e){function t(t){var n;return(n=e.call(this)||this).gmapInstance=t,n}_(t,e);var n=t.prototype;return n.getChildren=function(){return this.gmapInstance.props.children},n.getMousePosition=function(){return this.gmapInstance.mouse_}
1,n.getUpdateCounter=function(){return this.gmapInstance.updateCounter_},n.dispose=function(){this.gmapInstance=null,this.removeAllListeners()},t}(c.a),b=function(e,t){for(var n=v({},e),o=0;o<t.length;o++){var r=t[o];r in n&&delete n[r]}return n},M=Object.prototype.hasOwnProperty;function k(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function O(e,t){if(k(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var r=0;r<n.length;r++)if(!M.call(t,n[r])||!k(e[n[r]],t[n[r]]))return!1;return!0}var E={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},P={width:0,height:0,left:0,top:0,backgroundColor:"transparent",position:"absolute"},x=function(e){function t(t){var n;return(n=e.call(this,t)||this)._getState=function(){return{children:n.props.dispatcher.getChildren(),updateCounter:n.props.dispatcher.getUpdateCounter()}},n._onChangeHandler=function(){if(n.dimensionsCache_){var e=(n.state.children||[]).length,t=n._getState();n.setState(t,(function(){return(t.children||[]).length!==e&&n._onMouseChangeHandler()}))}},n._onChildClick=function(){n.props.onChildClick&&n.hoverChildProps_&&n.props.onChildClick(n.hoverKey_,n.hoverChildProps_)},n._onChildMouseDown=function(){n.props.onChildMouseDown&&n.hoverChildProps_&&n.props.onChildMouseDown(n.hoverKey_,n.hoverChildProps_)},n._onChildMouseEnter=function(e,t){n.dimensionsCache_&&(n.props.onChildMouseEnter&&n.props.onChildMouseEnter(e,t),n.hoverChildProps_=t,n.hoverKey_=e,n.setState({hoverKey:e}))},n._onChildMouseLeave=function(){if(n.dimensionsCache_){var e=n.hoverKey_;null!=e&&(n.props.onChildMouseLeave&&n.props.onChildMouseLeave(e,n.hoverChildProps_),n.hoverKey_=null,n.hoverChildProps_=null,n.setState({hoverKey:null}))}},n._onMouseAllow=function(e){e||n._onChildMouseLeave(),n.allowMouse_=e},n._onMouseChangeHandler=function(){n.allowMouse_&&n._onMouseChangeHandlerRaf()},n._onMouseChangeHandlerRaf=function(){if(n.dimensionsCache_){var e=n.props.dispatcher.getMousePosition();if(e){var t=[],o=n.props.getHoverDistance();if(r.a.Children.forEach(n.state.children,(function(r,i){if(r&&(void 0!==r.props.latLng||void 0!==r.props.lat||void 0!==r.props.lng)){var a=null!=r.key?r.key:i,s=n.props.distanceToMouse(n.dimensionsCache_[a],e,r.props);s<o&&t.push({key:a,dist:s,props:r.props})}})),t.length){t.sort((function(e,t){return e.dist-t.dist}));var i=t[0].key,a=t[0].props;n.hoverKey_!==i&&(n._onChildMouseLeave(),n._onChildMouseEnter(i,a))}else n._onChildMouseLeave()}else n._onChildMouseLeave()}},n._getDimensions=function(e){return n.dimensionsCache_[e]},n.dimensionsCache_={},n.hoverKey_=null,n.hoverChildProps_=null,n.allowMouse_=!0,n.state=v({},n._getState(),{hoverKey:null}),n}_(t,e);var n=t.prototype;return n.componentDidMount=function(){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.props.dispatcher.on("kON_MDOWN",this._onChildMouseDown)},n.shouldComponentUpdate=function(e,t){return!0===this.props.experimental?!O(this.props,e)||!O(b(this.state,["hoverKey"]),b(t,["hoverKey"])):!O(this.props,e)||!O(this.state,t)},n.componentWillUnmount=function(){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.props.dispatcher.removeListener("kON_MDOWN",this._onChildMouseDown),this.dimensionsCache_=null},n.render=function(){var e=this,t=this.props.style||E;this.dimensionsCache_={};var n=r.a.Children.map(this.state.children,(function(t,n){if(t){if(void 0===t.props.latLng&&void 0===t.props.lat&&void 0===t.props.lng)return r.a.cloneElement(t,{$geoService:e.props.geoService,$onMouseAllow:e._onMouseAllow,$prerender:e.props.prerender});var o=void 0!==t.props.latLng?t.props.latLng:{lat:t.props.lat,lng:t.props.lng},i=e.props.insideMapPanes?e.props.geoService.fromLatLngToDivPixel(o):e.props.geoService.fromLatLngToCenterPixel(o),a={left:i.x,top:i.y};if(void 0!==t.props.seLatLng||void 0!==t.props.seLat&&void 0!==t.props.seLng){var s=void 0!==t.props.seLatLng?t.props.seLatLng:{lat:t.props.seLat,lng:t.props.seLng},u=e.props.insideMapPanes?e.props.geoService.fromLatLngToDivPixel(s):e.props.geoService.fromLatLngToCenterPixel(s);a.width=u.x-i.x,a.height=u.y-i.y}var l=e.props.geoService.fromLatLngToContainerPixel(o),c=null!=t.key?t.key:n;return e.dimensionsCache_[c]=v({x:l.x,y:l.y},o),r.a.createElement("div",{key:c,style:v({},P,a),className:t.props.$markerHolderClassName},r.a.cloneElement(t,{$hover:c===e.state.hoverKey,$getDimensions:e._getDimensions,$dimensionKey:c,$geoService:e.props.geoService,$onMouseAllow:e._onMouseAllow,$prerender:e.props.prerender}))}}));return r.a.createElement("div",{style:t},n)},t}(o.Component);x.propTypes={geoService:a.a.any,style:a.a.any,distanceToMouse:a.a.func,dispatcher:a.a.any,onChildClick:a.a.func,onChildMouseDown:a.a.func,onChildMouseLeave:a.a.func,onChildMouseEnter:a.a.func,getHoverDistance:a.a.func,insideMapPanes:a.a.bool,prerender:a.a.bool},x.defaultProps={insideMapPanes:!1,prerender:!1};var L={width:"50%",height:"50%",left:"50%",top:"50%",margin:0,padding:0,position:"absolute"};function S(e){return r.a.createElement("div",{style:L},r.a.createElement(x,v({},e,{prerender:!0})))}var I,A,T,j=new Promise((function(e){T=e})),D=function(e,t){if(!e)return j;if(A)return A;e.libraries||(e.libraries=[]);var n=[].concat(e.libraries);if(t&&(0!==n.length&&n.includes("visualization")||n.push("visualization"),console.warn("heatmapLibrary will be deprecated
1in the future. Please use { libraries: ['visualization'] } in bootstrapURLKeys property instead")),"undefined"==typeof window)throw new Error("google map cannot be loaded outside browser env");var o=e.key,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t.indexOf(n=i[o])>=0||(r[n]=e[n]);return r}(e,["key"]);return I||(I=new h(v({apiKey:o||""},r,{libraries:n}))),A=I.load().then((function(){return T(window.google.maps),window.google.maps})),T(A),A};function z(e,t,n){var o=n-t;return e===n?e:((e-t)%o+o)%o+t}var N=function(){function e(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t}return e.prototype.wrap=function(){return new e(this.lat,z(this.lng,-180,180))},e}();N.convert=function(e){return e instanceof N?e:Array.isArray(e)?new N(e[0],e[1]):"lng"in e&&"lat"in e?new N(e.lat,e.lng):e};var R=function(){function e(e,t,n){this.tileSize=e||512,this._minZoom=t||0,this._maxZoom=n||52,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this.zoom=0,this.center=new N(0,0),this.angle=0}var t,n=e.prototype;return n.zoomScale=function(e){return Math.pow(2,e)},n.scaleZoom=function(e){return Math.log(e)/Math.LN2},n.project=function(e,t){return new m.a(this.lngX(e.lng,t),this.latY(e.lat,t))},n.unproject=function(e,t){return new N(this.yLat(e.y,t),this.xLng(e.x,t))},n.lngX=function(e,t){return(180+e)*(t||this.worldSize)/360},n.latY=function(e,t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))*(t||this.worldSize)/360},n.xLng=function(e,t){return 360*e/(t||this.worldSize)-180},n.yLat=function(e,t){return 360/Math.PI*Math.atan(Math.exp((180-360*e/(t||this.worldSize))*Math.PI/180))-90},n.locationPoint=function(e){var t=this.project(e);return this.centerPoint._sub(this.point._sub(t)._rotate(this.angle))},n.pointLocation=function(e){var t=this.centerPoint._sub(e)._rotate(-this.angle);return this.unproject(this.point.sub(t))},(t=[{key:"minZoom",get:function(){return this._minZoom},set:function(e){this._minZoom=e,this.zoom=Math.max(this.zoom,e)}},{key:"maxZoom",get:function(){return this._maxZoom},set:function(e){this._maxZoom=e,this.zoom=Math.min(this.zoom,e)}},{key:"worldSize",get:function(){return this.tileSize*this.scale}},{key:"centerPoint",get:function(){return new m.a(0,0)}},{key:"size",get:function(){return new m.a(this.width,this.height)}},{key:"bearing",get:function(){return-this.angle/Math.PI*180},set:function(e){this.angle=-z(e,-180,180)*Math.PI/180}},{key:"zoom",get:function(){return this._zoom},set:function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom}},{key:"x",get:function(){return this.lngX(this.center.lng)}},{key:"y",get:function(){return this.latY(this.center.lat)}},{key:"point",get:function(){return new m.a(this.x,this.y)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,t),e}(),W=function(){function e(e){this.hasSize_=!1,this.hasView_=!1,this.transform_=new R(e||512)}var t=e.prototype;return t.setView=function(e,t,n){this.transform_.center=N.convert(e),this.transform_.zoom=+t,this.transform_.bearing=+n,this.hasView_=!0},t.setViewSize=function(e,t){this.transform_.width=e,this.transform_.height=t,this.hasSize_=!0},t.setMapCanvasProjection=function(e,t){this.maps_=e,this.mapCanvasProjection_=t},t.canProject=function(){return this.hasSize_&&this.hasView_},t.hasSize=function(){return this.hasSize_},t.fromLatLngToCenterPixel=function(e){return this.transform_.locationPoint(N.convert(e))},t.fromLatLngToDivPixel=function(e){if(this.mapCanvasProjection_){var t=new this.maps_.LatLng(e.lat,e.lng);return this.mapCanvasProjection_.fromLatLngToDivPixel(t)}return this.fromLatLngToCenterPixel(e)},t.fromLatLngToContainerPixel=function(e){if(this.mapCanvasProjection_){var t=new this.maps_.LatLng(e.lat,e.lng);return this.mapCanvasProjection_.fromLatLngToContainerPixel(t)}var n=this.fromLatLngToCenterPixel(e);return n.x-=this.transform_.worldSize*Math.round(n.x/this.transform_.worldSize),n.x+=this.transform_.width/2,n.y+=this.transform_.height/2,n},t.fromContainerPixelToLatLng=function(e){if(this.mapCanvasProjection_){var t=this.mapCanvasProjection_.fromContainerPixelToLatLng(e);return{lat:t.lat(),lng:t.lng()}}var n=v({},e);n.x-=this.transform_.width/2,n.y-=this.transform_.height/2;var o=this.transform_.pointLocation(m.a.convert(n));return o.lng-=360*Math.round(o.lng/360),o},t.getWidth=function(){return this.transform_.width},t.getHeight=function(){return this.transform_.height},t.getZoom=function(){return this.transform_.zoom},t.getCenter=function(){return this.transform_.pointLocation({x:0,y:0})},t.getBounds=function(e,t){var n=e&&e[0]||0,o=e&&e[1]||0,r=e&&e[2]||0,i=e&&e[3]||0;if(this.getWidth()-o-i>0&&this.getHeight()-n-r>0){var a=this.transform_.pointLocation(m.a.convert({x:i-this.getWidth()/2,y:n-this.getHeight()/2})),s=this.transform_.pointLocation(m.a.convert({x:this.getWidth()/2-o,y:this.getHeight()/2-r})),u=[a.lat,a.lng,s.lat,s.lng,s.lat,a.lng,a.lat,s.lng];return t&&(u=u.map((function(e){return Math.round(e*t)/t}))),u}return[0,0,0,0]},e}();function U(e){if(window.requestAnimationFrame)return window.requestAnimationFrame(e);var t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return t?t(e):window.setTimeout(e,1e3/60)}var H=Math.log2?Math.log2:function(e){return Math.log(e)/Math.LN2};function B(e,t){return Object.keys(e).reduce((function(n,o){return t(e[o])&&(n[o]=e[o]),n}),{})}var Z=function(e){if(null!==e&&"object"==typeof e){if(0===Object.keys(e).length)return!0}else if(null==e||""===e)return!0;return!1},V=Object.prototype.toString;function K(e){return"number"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Number]"===V.call(e)}var G=null;function F(){if(G)return G;if("undefined"!=typeof navigator){var e=navigator.userAgent.indexOf("MSIE")>-1,t=navigator.userAgent.indexOf("Firefox")>-1,n=navigator.userAgent.toLowerCase().indexOf("op")>-1,o=navigator.userAgent.indexOf("Chrome")>-1,r=navigator.userAgent.indexOf("Safari")>-1;return o&&r&&(r=!1),o&&n&&(o=!1),G={isExplorer:e,isFirefox:t,isOpera:n,isChrome:o,isSafari:r}}return G={isChrome:!0,isExplorer:!1,isFirefox:!1,isOpera:!1,isSafari:!1}}var Q=function(e){return Function.prototype.toString.call(e)};function q(e){if(!e||"object"!=typeof e)return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&Q(n)===Q(Object)}function $(e,t,n,o){e.addEventListener(t,n,function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}()?{capture:o,passive:!0}:o)}var J,X=!("undefined"==typeof window||!window.document||!window.document.createElement);J=X?window:"undefined"!=typeof self?self:void 0;var Y,ee="undefined"!=typeof document&&document.attachEvent,te=!1;if(X&&!ee){var ne=function(){var e=J.requestAnimationFrame||J.mozRequestAnimationFrame||J.webkitRequestAnimationFrame||function(e){return J.setTimeout(e,20)};return function(t){return e(t)}}(),oe=(Y=J.cancelAnimationFrame||J.mozCancelAnimationFrame||J.webkitCancelAnimationFrame||J.clearTimeout,function(e){return Y(e)}),re=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,o=t.lastElementChild,r=n.firstElementChild;o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight,r.style.width=n.offsetWidth+1+"px",r.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},ie=function(e){var t=this;re(this),this.__resizeRAF__&&oe(this.__resizeRAF__),this.__resizeRAF__=ne((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))},ae=!1,se="",ue="animationstart",le="Webkit Moz O ms".split(" "),ce="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" ");if(X){var pe=document.createElement("fakeelement");
1if(void 0!==pe.style.animationName&&(ae=!0),!1===ae)for(var fe=0;fe<le.length;fe++)if(void 0!==pe.style[le[fe]+"AnimationName"]){se="-"+le[fe].toLowerCase()+"-",ue=ce[fe],ae=!0;break}}var he="resizeanim",de="@"+se+"keyframes "+he+" { from { opacity: 0; } to { opacity: 0; } } ",me=se+"animation: 1ms "+he+"; "}var ve=void 0!==u.a.createPortal,_e=ve?u.a.createPortal:u.a.unstable_renderSubtreeIntoContainer,ge=function(e){return q(e)?e:{lat:e[0],lng:e[1]}},ye=function(e,t){return t<e?e:t},we=function(e){function t(t){var n;if((n=e.call(this,t)||this)._getMinZoom=function(){if(n.geoService_.getWidth()>0||n.geoService_.getHeight()>0){var e=Math.ceil(n.geoService_.getWidth()/256)+2,t=Math.ceil(n.geoService_.getHeight()/256)+2,o=Math.max(e,t);return Math.ceil(H(o))}return 3},n._computeMinZoom=function(e){return Z(e)?n._getMinZoom():e},n._mapDomResizeCallback=function(){if(n.resetSizeOnIdle_=!0,n.maps_){var e=n.props.center||n.props.defaultCenter,t=n.map_.getCenter();n.maps_.event.trigger(n.map_,"resize"),n.map_.setCenter(n.props.resetBoundsOnResize?e:t)}},n._setLayers=function(e){e.forEach((function(e){n.layers_[e]=new n.maps_[e],n.layers_[e].setMap(n.map_)}))},n._renderPortal=function(){return r.a.createElement(x,{experimental:n.props.experimental,onChildClick:n._onChildClick,onChildMouseDown:n._onChildMouseDown,onChildMouseEnter:n._onChildMouseEnter,onChildMouseLeave:n._onChildMouseLeave,geoService:n.geoService_,insideMapPanes:!0,distanceToMouse:n.props.distanceToMouse,getHoverDistance:n._getHoverDistance,dispatcher:n.markersDispatcher_})},n._initMap=function(){if(!n.initialized_){n.initialized_=!0;var e=ge(n.props.center||n.props.defaultCenter);n.geoService_.setView(e,n.props.zoom||n.props.defaultZoom,0),n._onBoundsChanged();var t=v({},n.props.apiKey&&{key:n.props.apiKey},n.props.bootstrapURLKeys);n.props.googleMapLoader(t,n.props.heatmapLibrary).then((function(e){if(n.mounted_){var t,o,r=n.geoService_.getCenter(),i={zoom:n.props.zoom||n.props.defaultZoom,center:new e.LatLng(r.lat,r.lng)};n.props.heatmap.positions&&(Object.assign(g(n),{heatmap:(t=e,o=n.props.heatmap,new t.visualization.HeatmapLayer({data:o.positions.reduce((function(e,n){var o=n.weight,r=void 0===o?1:o;return e.push({location:new t.LatLng(n.lat,n.lng),weight:r}),e}),[])}))}),function(e,t){var n=t.options,o=void 0===n?{}:n;Object.keys(o).map((function(t){return e.set(t,o[t])}))}(n.heatmap,n.props.heatmap));var a=B(e,q),s="function"==typeof n.props.options?n.props.options(a):n.props.options,l=!Z(n.props.draggable)&&{draggable:n.props.draggable},c=n._computeMinZoom(s.minZoom);n.minZoom_=c;var p=v({},{overviewMapControl:!1,streetViewControl:!1,rotateControl:!0,mapTypeControl:!1,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}],minZoom:3},{minZoom:c},s,i);n.defaultDraggableOption_=Z(p.draggable)?n.defaultDraggableOption_:p.draggable;var f=v({},p,l);f.minZoom=ye(f.minZoom,c);var h=new e.Map(u.a.findDOMNode(n.googleMapDom_),f);n.map_=h,n.maps_=e,n._setLayers(n.props.layerTypes);var d=e.version.match(/^3\.(\d+)\./),m=d&&Number(d[1]),_=g(n),y=Object.assign(new e.OverlayView,{onAdd:function(){var t="undefined"!=typeof screen?screen.width+"px":"2000px",n="undefined"!=typeof screen?screen.height+"px":"2000px",o=document.createElement("div");if(o.style.backgroundColor="transparent",o.style.position="absolute",o.style.left="0px",o.style.top="0px",o.style.width=t,o.style.height=n,_.props.overlayViewDivStyle){var r=_.props.overlayViewDivStyle;"object"==typeof r&&Object.keys(r).forEach((function(e){o.style[e]=r[e]}))}this.getPanes().overlayMouseTarget.appendChild(o),_.geoService_.setMapCanvasProjection(e,y.getProjection()),ve?_.setState({overlay:o}):_e(_,_._renderPortal(),o,(function(){return _.setState({overlay:o})}))},onRemove:function(){var e=_.state.overlay;e&&!ve&&u.a.unmountComponentAtNode(e),_.setState({overlay:null})},draw:function(){if(_.updateCounter_++,_._onBoundsChanged(h,e,!_.props.debounced),_.googleApiLoadedCalled_||(_._onGoogleApiLoaded({map:h,maps:e,ref:_.googleMapDom_}),_.googleApiLoadedCalled_=!0),_.mouse_){var t=_.geoService_.fromContainerPixelToLatLng(_.mouse_);_.mouse_.lat=t.lat,_.mouse_.lng=t.lng}_._onChildMouseMove(),_.markersDispatcher_&&(_.markersDispatcher_.emit("kON_CHANGE"),_.fireMouseEventOnIdle_&&_.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE"))}});n.overlay_=y,y.setMap(h),n.props.heatmap.positions&&n.heatmap.setMap(h),n.props.onTilesLoaded&&e.event.addListener(h,"tilesloaded",(function(){_._onTilesLoaded()})),e.event.addListener(h,"zoom_changed",(function(){_.geoService_.getZoom()!==h.getZoom()&&(_.zoomAnimationInProgress_||(_.zoomAnimationInProgress_=!0,_._onZoomAnimationStart(h.zoom)),m<32)&&((new Date).getTime()-n.zoomControlClickTime_<300?U((function(){return U((function(){_.updateCounter_++,_._onBoundsChanged(h,e)}))})):(_.updateCounter_++,_._onBoundsChanged(h,e)))})),e.event.addListener(h,"idle",(function(){if(n.resetSizeOnIdle_){n._setVie
1wSize();var t=n._computeMinZoom(s.minZoom);t!==n.minZoom_&&(n.minZoom_=t,h.setOptions({minZoom:t})),n.resetSizeOnIdle_=!1}_.zoomAnimationInProgress_&&(_.zoomAnimationInProgress_=!1,_._onZoomAnimationEnd(h.zoom)),_.updateCounter_++,_._onBoundsChanged(h,e),_.dragTime_=0,_.markersDispatcher_&&_.markersDispatcher_.emit("kON_CHANGE")})),e.event.addListener(h,"mouseover",(function(){_.mouseInMap_=!0})),e.event.addListener(h,"click",(function(){_.mouseInMap_=!0})),e.event.addListener(h,"mouseout",(function(){_.mouseInMap_=!1,_.mouse_=null,_.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE")})),e.event.addListener(h,"drag",(function(){_.dragTime_=(new Date).getTime(),_._onDrag(h)})),e.event.addListener(h,"dragend",(function(){var t=e.event.addListener(h,"idle",(function(){e.event.removeListener(t),_._onDragEnd(h)}))})),e.event.addListener(h,"maptypeid_changed",(function(){_._onMapTypeIdChange(h.getMapTypeId())}))}})).catch((function(e){throw n._onGoogleApiLoaded({map:null,maps:null,ref:n.googleMapDom_}),console.error(e),e}))}},n._onGoogleApiLoaded=function(){var e;n.props.onGoogleApiLoaded&&(e=n.props).onGoogleApiLoaded.apply(e,arguments)},n._getHoverDistance=function(){return n.props.hoverDistance},n._onDrag=function(){var e;return n.props.onDrag&&(e=n.props).onDrag.apply(e,arguments)},n._onDragEnd=function(){var e;return n.props.onDragEnd&&(e=n.props).onDragEnd.apply(e,arguments)},n._onMapTypeIdChange=function(){var e;return n.props.onMapTypeIdChange&&(e=n.props).onMapTypeIdChange.apply(e,arguments)},n._onZoomAnimationStart=function(){var e;return n.props.onZoomAnimationStart&&(e=n.props).onZoomAnimationStart.apply(e,arguments)},n._onZoomAnimationEnd=function(){var e;return n.props.onZoomAnimationEnd&&(e=n.props).onZoomAnimationEnd.apply(e,arguments)},n._onTilesLoaded=function(){return n.props.onTilesLoaded&&n.props.onTilesLoaded()},n._onChildClick=function(){var e;if(n.props.onChildClick)return(e=n.props).onChildClick.apply(e,arguments)},n._onChildMouseDown=function(e,t){n.childMouseDownArgs_=[e,t],n.props.onChildMouseDown&&n.props.onChildMouseDown(e,t,v({},n.mouse_))},n._onChildMouseUp=function(){var e;n.childMouseDownArgs_&&(n.props.onChildMouseUp&&(e=n.props).onChildMouseUp.apply(e,n.childMouseDownArgs_.concat([v({},n.mouse_)])),n.childMouseDownArgs_=null,n.childMouseUpTime_=(new Date).getTime())},n._onChildMouseMove=function(){var e;n.childMouseDownArgs_&&n.props.onChildMouseMove&&(e=n.props).onChildMouseMove.apply(e,n.childMouseDownArgs_.concat([v({},n.mouse_)]))},n._onChildMouseEnter=function(){var e;if(n.props.onChildMouseEnter)return(e=n.props).onChildMouseEnter.apply(e,arguments)},n._onChildMouseLeave=function(){var e;if(n.props.onChildMouseLeave)return(e=n.props).onChildMouseLeave.apply(e,arguments)},n._setViewSize=function(){if(n.mounted_){if(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement)n.geoService_.setViewSize(window.innerWidth,window.innerHeight);else{var e=u.a.findDOMNode(n.googleMapDom_);n.geoService_.setViewSize(e.clientWidth,e.clientHeight)}n._onBoundsChanged()}},n._onWindowResize=function(){n.resetSizeOnIdle_=!0},n._onMapMouseMove=function(e){if(n.mouseInMap_){var t=(new Date).getTime();t-n.mouseMoveTime_>50&&(n.boundingRect_=e.currentTarget.getBoundingClientRect()),n.mouseMoveTime_=t;var o=e.clientX-n.boundingRect_.left,r=e.clientY-n.boundingRect_.top;n.mouse_||(n.mouse_={x:0,y:0,lat:0,lng:0}),n.mouse_.x=o,n.mouse_.y=r;var i=n.geoService_.fromContainerPixelToLatLng(n.mouse_);n.mouse_.lat=i.lat,n.mouse_.lng=i.lng,n._onChildMouseMove(),t-n.dragTime_<100?n.fireMouseEventOnIdle_=!0:(n.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE"),n.fireMouseEventOnIdle_=!1)}},n._onClick=function(){var e;return n.props.onClick&&!n.childMouseDownArgs_&&(new Date).getTime()-n.childMouseUpTime_>300&&0===n.dragTime_&&(e=n.props).onClick.apply(e,arguments)},n._onMapClick=function(e){n.markersDispatcher_&&(n._onMapMouseMove(e),(new Date).getTime()-n.dragTime_>100&&(n.mouse_&&n._onClick(v({},n.mouse_,{event:e})),n.markersDispatcher_.emit("kON_CLICK",e)))},n._onMapMouseDownNative=function(e){n.mouseInMap_&&n._onMapMouseDown(e)},n._onMapMouseDown=function(e){n.markersDispatcher_&&(new Date).getTime()-n.dragTime_>100&&(n._onMapMouseMove(e),n.markersDispatcher_.emit("kON_MDOWN",e))},n._onMapMouseDownCapture=function(){F().isChrome&&(n.zoomControlClickTime_=(new Date).getTime())},n._onKeyDownCapture=function(){F().isChrome&&(n.zoomControlClickTime_=(new Date).getTime())},n._isCenterDefined=function(e){return e&&(q(e)&&K(e.lat)&&K(e.lng)||2===e.length&&K(e[0])&&K(e[1]))},n._onBoundsChanged=function(e,t,o){if(e){var r=e.getCenter();n.geoService_.setView([r.lat(),r.lng()],e.getZoom(),0)}if((n.props.onChange||n.props.onBoundsChange)&&n.geoService_.canProject()){var i=n.geoService_.getZoom(),a=n.geoService_.getBounds(),s=n.geoService_.getCenter();if(!function(e,t,n){if(e&&t){for(var o=0;o!==e.length;++o)if(Math.abs(e[o]-t[o])>1e-5)return!1;return!0}return!1}(a,n.prevBounds_)&&!1!==o){var u=n.geoService_.getBounds(n.props.margin);n.props.onBoundsChange&&n.props.onBoundsChange(n.centerIsObject_?v({},s):[s.lat,s.lng],i,a,u),n.props.onChange&&n.props.onChange({center:v({},s),zoom:i,bounds:{nw:{lat:a[0],lng:a[1]},se:{lat:a[2],lng:a[3]},sw:{lat:a[4],lng:a[5]},ne:{lat:a[6],lng:a[7]}},marginBounds:{nw:{lat:u[0],lng:u[1]},se:{lat:u[2],lng:u[3]},sw:{lat:u[4],lng:u[5]},ne:{lat:u[6],lng:u[7]}},size:n.geoService_.hasSize()?{width:n.geoService_.getWidth(),height:n.geoService_.getHeight()}:{width:0,height:0}}),n.prevBounds_=a}}},n._registerChild=function(e){n.googleMapDom_=e},n.mounted_=!1,n.initialized_=!1,n.googleApiLoadedCalled_=!1,n.map_=null,n.maps_=null,n.prevBounds_=null,n.heatmap=null,n.layers_={},n.mouse_=null,n.mouseMoveTime_=0,n.boundingRect_=null,n.mouseInMap_=!0,n.dragTime_=0,n.fireMouseEventOnIdle_=!1,n.updateCounter_=0,n.markersDispatcher_=new C(g(n)),n.geoService_=new W(256),n.centerIsObject_=q(n.props.center),n.minZ
1oom_=3,n.defaultDraggableOption_=!0,n.zoomControlClickTime_=0,n.childMouseDownArgs_=null,n.childMouseUpTime_=0,n.googleMapDom_=null,n._isCenterDefined(n.props.center||n.props.defaultCenter)){var o=ge(n.props.center||n.props.defaultCenter);n.geoService_.setView(o,n.props.zoom||n.props.defaultZoom,0)}return n.zoomAnimationInProgress_=!1,n.state={overlay:null},n}_(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;this.mounted_=!0,$(window,"resize",this._onWindowResize,!1),$(window,"keydown",this._onKeyDownCapture,!0);var t=u.a.findDOMNode(this.googleMapDom_);t&&$(t,"mousedown",this._onMapMouseDownNative,!0),$(window,"mouseup",this._onChildMouseUp,!1);var n=v({},this.props.apiKey&&{key:this.props.apiKey},this.props.bootstrapURLKeys);this.props.googleMapLoader(n,this.props.heatmapLibrary),setTimeout((function(){e._setViewSize(),e._isCenterDefined(e.props.center||e.props.defaultCenter)&&e._initMap()}),0,this),this.props.resetBoundsOnResize&&function(e,t){if(void 0===e.parentNode){var n=document.createElement("div");e.parentNode=n}e=e.parentNode,ee?e.attachEvent("onresize",t):(e.__resizeTriggers__||("static"==getComputedStyle(e).position&&(e.style.position="relative"),function(){if(!te){var e=(de||"")+".resize-triggers { "+(me||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),te=!0}}(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',e.appendChild(e.__resizeTriggers__),re(e),$(e,"scroll",ie,!0),ue&&e.__resizeTriggers__.addEventListener(ue,(function(t){t.animationName==he&&re(e)}))),e.__resizeListeners__.push(t))}(t,this._mapDomResizeCallback)},n.shouldComponentUpdate=function(e,t){return!O(b(this.props,["draggable"]),b(e,["draggable"]))||!O(this.state,t)},n.componentDidUpdate=function(e){var t=this;if(!this._isCenterDefined(e.center)&&this._isCenterDefined(this.props.center)&&setTimeout((function(){return t._initMap()}),0),this.map_){var n=this.geoService_.getCenter();if(this._isCenterDefined(this.props.center)){var o=ge(this.props.center),r=this._isCenterDefined(e.center)?ge(e.center):null;(!r||Math.abs(o.lat-r.lat)+Math.abs(o.lng-r.lng)>1e-5)&&Math.abs(o.lat-n.lat)+Math.abs(o.lng-n.lng)>1e-5&&this.map_.panTo({lat:o.lat,lng:o.lng})}if(Z(this.props.zoom)||Math.abs(this.props.zoom-e.zoom)>0&&this.map_.setZoom(this.props.zoom),!Z(e.draggable)&&Z(this.props.draggable)?this.map_.setOptions({draggable:this.defaultDraggableOption_}):O(e.draggable,this.props.draggable)||this.map_.setOptions({draggable:this.props.draggable}),!Z(this.props.options)&&!O(e.options,this.props.options)){var i=B(this.maps_,q),a="function"==typeof this.props.options?this.props.options(i):this.props.options;if("minZoom"in(a=b(a,["zoom","center","draggable"]))){var s=this._computeMinZoom(a.minZoom);a.minZoom=ye(a.minZoom,s)}this.map_.setOptions(a)}O(this.props.layerTypes,e.layerTypes)||(Object.keys(this.layers_).forEach((function(e){t.layers_[e].setMap(null),delete t.layers_[e]})),this._setLayers(this.props.layerTypes)),this.heatmap&&!O(this.props.heatmap.positions,e.heatmap.positions)&&this.heatmap.setData(this.props.heatmap.positions.map((function(e){return{location:new t.maps_.LatLng(e.lat,e.lng),weight:e.weight}}))),this.heatmap&&!O(this.props.heatmap.options,e.heatmap.options)&&Object.keys(this.props.heatmap.options).forEach((function(e){t.heatmap.set(e,t.props.heatmap.options[e])}))}this.markersDispatcher_.emit("kON_CHANGE"),O(this.props.hoverDistance,e.hoverDistance)||this.markersDispatcher_.emit("kON_MOUSE_POSITION_CHANGE")},n.componentWillUnmount=function(){this.mounted_=!1;var e,t,n=u.a.findDOMNode(this.googleMapDom_);n&&n.removeEventListener("mousedown",this._onMapMouseDownNative,!0),window.removeEventListener("resize",this._onWindowResize),window.removeEventListener("keydown",this._onKeyDownCapture),window.removeEventListener("mouseup",this._onChildMouseUp,!1),this.props.resetBoundsOnResize&&(t=this._mapDomResizeCallback,e=(e=n).parentNode,ee?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",ie),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))),this.overlay_&&this.overlay_.setMap(null),this.maps_&&this.map_&&this.props.shouldUnregisterMapOnUnmount&&(this.map_.setOptions({scrollwheel:!1}),this.maps_.event.clearInstanceListeners(this.map_)),this.props.shouldUnregisterMapOnUnmount&&(this.map_=null,this.maps_=null),this.markersDispatcher_.dispose(),this.resetSizeOnIdle_=!1,this.props.shouldUnregisterMapOnUnmount&&(delete this.map_,delete this.markersDispatcher_)},n.render=function(){var e=this.state.overlay,t=e?null:r.a.createElement(S,{experimental:this.props.experimental,onChildClick:this._onChildClick,onChildMouseDown:this._onChildMouseDown,onChildMouseEnter:this._onChildMouseEnter,onChildMouseLeave:this._onChildMouseLeave,geoService:this.geoService_,insideMapPanes:!1,distanceToMouse:this.props.distanceToMouse,getHoverDistance:this._getHoverDistance,dispatcher:this.markersDispatcher_});return r.a.createElement("div",{style:this.props.style,onMouseMove:this._onMapMouseMove,onMouseDownCapture:this._onMapMouseDownCapture,onClick:this._onMapClick},r.a.createElement(w,{registerChild:this._registerChild}),ve&&e&&_e(this._renderPortal(),e),t)},t}(o.Component);
1we.propTypes={apiKey:a.a.string,bootstrapURLKeys:a.a.any,defaultCenter:a.a.oneOfType([a.a.array,a.a.shape({lat:a.a.number,lng:a.a.number})]),center:a.a.oneOfType([a.a.array,a.a.shape({lat:a.a.number,lng:a.a.number})]),defaultZoom:a.a.number,zoom:a.a.number,onBoundsChange:a.a.func,onChange:a.a.func,onClick:a.a.func,onChildClick:a.a.func,onChildMouseDown:a.a.func,onChildMouseUp:a.a.func,onChildMouseMove:a.a.func,onChildMouseEnter:a.a.func,onChildMouseLeave:a.a.func,onZoomAnimationStart:a.a.func,onZoomAnimationEnd:a.a.func,onDrag:a.a.func,onDragEnd:a.a.func,onMapTypeIdChange:a.a.func,onTilesLoaded:a.a.func,options:a.a.any,distanceToMouse:a.a.func,hoverDistance:a.a.number,debounced:a.a.bool,margin:a.a.array,googleMapLoader:a.a.any,onGoogleApiLoaded:a.a.func,yesIWantToUseGoogleMapApiInternals:a.a.bool,draggable:a.a.bool,style:a.a.any,resetBoundsOnResize:a.a.bool,layerTypes:a.a.arrayOf(a.a.string),shouldUnregisterMapOnUnmount:a.a.bool},we.defaultProps={distanceToMouse:function(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))},hoverDistance:30,debounced:!0,options:function(){return{overviewMapControl:!1,streetViewControl:!1,rotateControl:!0,mapTypeControl:!1,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}],minZoom:3}},googleMapLoader:D,yesIWantToUseGoogleMapApiInternals:!1,style:{width:"100%",height:"100%",margin:0,padding:0,position:"relative"},layerTypes:[],heatmap:{},heatmapLibrary:!1,shouldUnregisterMapOnUnmount:!0},we.googleMapLoader=D;t.a=we}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.