UNPKG

@react-google-maps/api

Version:
24 lines (22 loc) 150 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-dom");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var o,i=s(e),r=n(e),a=n(t),l=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}}),p={};var u,c,d={}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function h(){return u||(u=1,"production"!==process.env.NODE_ENV&&function(){var e=i.default,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator;var f=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];L("error",e,s)}function L(e,t,s){var n=f.ReactDebugCurrentFrame.getStackAddendum();""!==n&&(t+="%s",s=s.concat([n]));var o=s.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var b;function x(e){return e.displayName||"Context"}function C(e){if(null==e)return null;if("number"==typeof e.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case n:return"Fragment";case s:return"Portal";case r:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return x(e)+".Consumer";case a:return x(e._context)+".Provider";case p:return function(e,t,s){var n=e.displayName;if(n)return n;var o=t.displayName||t.name||"";return""!==o?s+"("+o+")":s}(e,e.render,"ForwardRef");case h:var t=e.displayName||null;return null!==t?t:C(e.type)||"Memo";case g:var i=e,d=i._payload,m=i._init;try{return C(m(d))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var M,k,E,S,w,P,O,I=Object.assign,D=0;function _(){}_.__reactDisabledLog=!0;var R,j=f.ReactCurrentDispatcher;function T(e,t,s){if(void 0===R)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);R=n&&n[1]||""}return"\n"+R+e}var B,U=!1,z="function"==typeof WeakMap?WeakMap:Map;function A(e,t){if(!e||U)return"";var s,n=B.get(e);if(void 0!==n)return n;U=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=j.current,j.current=null,function(){if(0===D){M=console.log,k=console.info,E=console.warn,S=console.error,w=console.group,P=console.groupCollapsed,O=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}D++}();try{if(t){var r=function(){throw Error()};if(Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(r,[])}catch(e){s=e}Reflect.construct(e,[],r)}else{try{r.call()}catch(e){s=e}e.call(r.prototype)}}else{try{throw Error()}catch(e){s=e}e()}}catch(t){if(t&&s&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),l=s.stack.split("\n"),p=a.length-1,u=l.length-1;p>=1&&u>=0&&a[p]!==l[u];)u--;for(;p>=1&&u>=0;p--,u--)if(a[p]!==l[u]){if(1!==p||1!==u)do{if(p--,--u<0||a[p]!==l[u]){var c="\n"+a[p].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),"function"==typeof e&&B.set(e,c),c}}while(p>=1&&u>=0);break}}}finally{U=!1,j.current=o,function(){if(0==--D){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:M}),info:I({},e,{value:k}),warn:I({},e,{value:E}),error:I({},e,{value:S}),group:I({},e,{value:w}),groupCollapsed:I({},e,{value:P}),groupEnd:I({},e,{value:O})})}D<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var d=e?e.displayName||e.name:"",h=d?T(d):"";return"function"==typeof e&&B.set(e,h),h}function N(e,t,s){if(null==e)return"";if("function"==typeof e)return A(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return T(e);switch(e){case u:return T("Suspense");case c:return T("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case p:return A(e.render,!1);case h:return N(e.type,t,s);case g:var o=e,i=o._payload,r=o._init;try{return N(r(i),t,s)}catch(e){}}return""}B=new z;var W=Object.prototype.hasOwnProperty,V={},Z=f.ReactDebugCurrentFrame;function F(e){if(e){var t=e._owner,s=N(e.type,e._source,t?t.type:null);Z.setExtraStackFrame(s)}else Z.setExtraStackFrame(null)}var H=Array.isArray;function $(e){return H(e)}function G(e){return""+e}function K(e){if(function(e){try{return G(e),!1}catch(e){return!0}}(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),G(e)}var Y,q,J,X=f.ReactCurrentOwner,Q={key:!0,ref:!0,__self:!0,__source:!0};J={};function ee(e,s,n,o,i){var r,a={},l=null,p=null;for(r in void 0!==n&&(K(n),l=""+n),function(e){if(W.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(s)&&(K(s.key),l=""+s.key),function(e){if(W.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(s)&&(p=s.ref,function(e,t){if("string"==typeof e.ref&&X.current&&t&&X.current.stateNode!==t){var s=C(X.current.type);J[s]||(y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(X.current.type),e.ref),J[s]=!0)}}(s,i)),s)W.call(s,r)&&!Q.hasOwnProperty(r)&&(a[r]=s[r]);if(e&&e.defaultProps){var u=e.defaultProps;for(r in u)void 0===a[r]&&(a[r]=u[r])}if(l||p){var c="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var s=function(){Y||(Y=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}(a,c),p&&function(e,t){var s=function(){q||(q=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}(a,c)}return function(e,s,n,o,i,r,a){var l={$$typeof:t,type:e,key:s,ref:n,props:a,_owner:r,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,p,i,o,X.current,a)}var te,se=f.ReactCurrentOwner,ne=f.ReactDebugCurrentFrame;function oe(e){if(e){var t=e._owner,s=N(e.type,e._source,t?t.type:null);ne.setExtraStackFrame(s)}else ne.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function re(){if(se.current){var e=C(se.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function le(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var s=function(e){var t=re();if(!t){var s="string"==typeof e?e:e.displayName||e.name;s&&(t="\n\nCheck the top-level render call using <"+s+">.")}return t}(t);if(!ae[s]){ae[s]=!0;var n="";e&&e._owner&&e._owner!==se.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),oe(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,n),oe(null)}}}function pe(e,t){if("object"==typeof e)if($(e))for(var s=0;s<e.length;s++){var n=e[s];ie(n)&&le(n,t)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=v&&e[v]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,r=o.call(e);!(i=r.next()).done;)ie(i.value)&&le(i.value,t)}}function ue(e){var t,s=e.type;if(null!=s&&"string"!=typeof s){if("function"==typeof s)t=s.propTypes;else{if("object"!=typeof s||s.$$typeof!==p&&s.$$typeof!==h)return;t=s.propTypes}if(t){var n=C(s);!function(e,t,s,n,o){var i=Function.call.bind(W);for(var r in e)if(i(e,r)){var a=void 0;try{if("function"!=typeof e[r]){var l=Error((n||"React class")+": "+s+" type `"+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[r]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[r](t,r,n,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(F(o),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",s,r,typeof a),F(null)),a instanceof Error&&!(a.message in V)&&(V[a.message]=!0,F(o),y("Failed %s type: %s",s,a.message),F(null))}}(t,e.props,"prop",n,e)}else if(void 0!==s.PropTypes&&!te){te=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",C(s)||"Unknown")}"function"!=typeof s.getDefaultProps||s.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ce(e,s,i,d,v,f){var L=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===r||e===o||e===u||e===c||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!L){var x="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(x+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var M,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(v);x+=k||re(),null===e?M="null":$(e)?M="array":void 0!==e&&e.$$typeof===t?(M="<"+(C(e.type)||"Unknown")+" />",x=" Did you accidentally export a JSX literal instead of a component?"):M=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",M,x)}var E=ee(e,s,i,v,f);if(null==E)return E;if(L){var S=s.children;if(void 0!==S)if(d)if($(S)){for(var w=0;w<S.length;w++)pe(S[w],e);Object.freeze&&Object.freeze(S)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else pe(S,e)}return e===n?function(e){for(var t=Object.keys(e.props),s=0;s<t.length;s++){var n=t[s];if("children"!==n&&"key"!==n){oe(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),oe(null);break}}null!==e.ref&&(oe(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),oe(null))}(E):ue(E),E}var de=function(e,t,s){return ce(e,t,s,!1)},he=function(e,t,s){return ce(e,t,s,!0)};d.Fragment=n,d.jsx=de,d.jsxs=he}()),d}c=l,"production"===process.env.NODE_ENV?c.exports=function(){if(o)return p;o=1;var e=i.default,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,s,o){var i,l={},p=null,u=null;for(i in void 0!==o&&(p=""+o),void 0!==s.key&&(p=""+s.key),void 0!==s.ref&&(u=s.ref),s)n.call(s,i)&&!a.hasOwnProperty(i)&&(l[i]=s[i]);if(e&&e.defaultProps)for(i in s=e.defaultProps)void 0===l[i]&&(l[i]=s[i]);return{$$typeof:t,type:e,key:p,ref:u,props:l,_owner:r.current}}return p.Fragment=s,p.jsx=l,p.jsxs=l,p}():c.exports=h();var g=process.env.NODE_ENV,m=function(e,t,s,n,o,i,r,a){if("production"!==g&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[s,n,o,i,r,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return p[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}};const v=e.createContext(null);function f(){m(!!e.useContext,"useGoogleMap is React hook and requires React version 16.8+");const t=e.useContext(v);return m(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function y(e,t,s,n){const o={};var i,r;return i=e,r=(e,i)=>{const r=s[i];r!==t[i]&&(o[i]=r,e(n,r))},Object.keys(i).forEach((e=>r(i[e],e))),o}function L(e,t,s){const n=(o=s,i=function(s,n,o){return"function"==typeof e[o]&&s.push(google.maps.event.addListener(t,n,e[o])),s},r=[],Object.keys(o).reduce((function(e,t){return i(e,o[t],t)}),r));var o,i,r;return n}function b(e){google.maps.event.removeListener(e)}function x(e=[]){e.forEach(b)}function C({updaterMap:e,eventMap:t,prevProps:s,nextProps:n,instance:o}){const i=L(n,o,t);return y(e,s,n,o),i}const M={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},k={extraMapTypes(e,t){t.forEach((function(t,s){e.mapTypes.set(String(s),t)}))},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};e.memo((function({children:t,options:s,id:n,mapContainerStyle:o,mapContainerClassName:i,center:r,onClick:a,onDblClick:p,onDrag:u,onDragEnd:c,onDragStart:d,onMouseMove:h,onMouseOut:g,onMouseOver:m,onMouseDown:f,onMouseUp:y,onRightClick:L,onCenterChanged:b,onLoad:x,onUnmount:C}){const[M,k]=e.useState(null),E=e.useRef(null),[S,w]=e.useState(null),[P,O]=e.useState(null),[I,D]=e.useState(null),[_,R]=e.useState(null),[j,T]=e.useState(null),[B,U]=e.useState(null),[z,A]=e.useState(null),[N,W]=e.useState(null),[V,Z]=e.useState(null),[F,H]=e.useState(null),[$,G]=e.useState(null),[K,Y]=e.useState(null);return e.useEffect((()=>{s&&null!==M&&M.setOptions(s)}),[M,s]),e.useEffect((()=>{null!==M&&void 0!==r&&M.setCenter(r)}),[M,r]),e.useEffect((()=>{M&&p&&(null!==P&&google.maps.event.removeListener(P),O(google.maps.event.addListener(M,"dblclick",p)))}),[p]),e.useEffect((()=>{M&&c&&(null!==I&&google.maps.event.removeListener(I),D(google.maps.event.addListener(M,"dragend",c)))}),[p]),e.useEffect((()=>{M&&d&&(null!==_&&google.maps.event.removeListener(_),R(google.maps.event.addListener(M,"dragstart",d)))}),[d]),e.useEffect((()=>{M&&f&&(null!==j&&google.maps.event.removeListener(j),T(google.maps.event.addListener(M,"mousedown",f)))}),[f]),e.useEffect((()=>{M&&h&&(null!==B&&google.maps.event.removeListener(B),U(google.maps.event.addListener(M,"mousemove",h)))}),[h]),e.useEffect((()=>{M&&g&&(null!==z&&google.maps.event.removeListener(z),A(google.maps.event.addListener(M,"mouseout",g)))}),[g]),e.useEffect((()=>{M&&m&&(null!==N&&google.maps.event.removeListener(N),W(google.maps.event.addListener(M,"mouseover",m)))}),[m]),e.useEffect((()=>{M&&y&&(null!==V&&google.maps.event.removeListener(V),Z(google.maps.event.addListener(M,"mouseup",y)))}),[y]),e.useEffect((()=>{M&&L&&(null!==F&&google.maps.event.removeListener(F),H(google.maps.event.addListener(M,"rightclick",L)))}),[L]),e.useEffect((()=>{M&&a&&(null!==$&&google.maps.event.removeListener($),G(google.maps.event.addListener(M,"click",a)))}),[a]),e.useEffect((()=>{M&&u&&(null!==K&&google.maps.event.removeListener(K),Y(google.maps.event.addListener(M,"drag",u)))}),[u]),e.useEffect((()=>{M&&b&&(null!==S&&google.maps.event.removeListener(S),w(google.maps.event.addListener(M,"center_changed",b)))}),[a]),e.useEffect((()=>{const e=null===E.current?null:new google.maps.Map(E.current,s);return k(e),null!==e&&x&&x(e),()=>{null!==e&&C&&C(e)}}),[]),l.exports.jsx("div",Object.assign({id:n,ref:E,style:o,className:i},{children:l.exports.jsx(v.Provider,Object.assign({value:M},{children:null!==M?t:l.exports.jsx(l.exports.Fragment,{})}))}))}));class E extends e.PureComponent{constructor(){super(...arguments),this.state={map:null},this.registeredEvents=[],this.mapRef=null,this.getInstance=()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options),this.panTo=e=>{const t=this.getInstance();t&&t.panTo(e)},this.setMapCallback=()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)},this.getRef=e=>{this.mapRef=e}}componentDidMount(){const e=this.getInstance();this.registeredEvents=C({updaterMap:k,eventMap:M,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)}componentDidUpdate(e){null!==this.state.map&&(x(this.registeredEvents),this.registeredEvents=C({updaterMap:k,eventMap:M,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),x(this.registeredEvents))}render(){return l.exports.jsx("div",Object.assign({id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},{children:l.exports.jsx(v.Provider,Object.assign({value:this.state.map},{children:null!==this.state.map?this.props.children:l.exports.jsx(l.exports.Fragment,{})}))}))}} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function S(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(s[n[o]]=e[n[o]])}return s}function w(e,t,s,n){return new(s||(s=Promise))((function(o,i){function r(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))}const P="undefined"!=typeof document;function O({url:e,id:t,nonce:s}){return P?new Promise((function(n,o){const i=document.getElementById(t),r=window;if(i){const s=i.getAttribute("data-state");if(i.src===e&&"error"!==s){if("ready"===s)return n(t);{const e=r.initMap,s=i.onerror;return r.initMap=function(){e&&e(),n(t)},void(i.onerror=function(e){s&&s(e),o(e)})}}i.remove()}const a=document.createElement("script");a.type="text/javascript",a.src=e,a.id=t,a.async=!0,a.nonce=s,a.onerror=function(e){a.setAttribute("data-state","error"),o(e)},r.initMap=function(){a.setAttribute("data-state","ready"),n(t)},document.head.appendChild(a)})).catch((e=>{throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}function I(e){const t=e.href;return!(!t||0!==t.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))||("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",!0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",!0):"style"===e.tagName.toLowerCase()&&!e.styleSheet&&!e.innerHTML)}function D(){const e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(s,n){I(s)||Reflect.apply(t,e,[s,n])};const s=e.appendChild.bind(e);e.appendChild=function(t){I(t)||Reflect.apply(s,e,[t])}}function _({googleMapsApiKey:e,googleMapsClientId:t,version:s="weekly",language:n,region:o,libraries:i,channel:r,mapIds:a,authReferrerPolicy:l}){const p=[];return m(e&&t||!(e&&t),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?p.push(`key=${e}`):t&&p.push(`client=${t}`),s&&p.push(`v=${s}`),n&&p.push(`language=${n}`),o&&p.push(`region=${o}`),i&&i.length&&p.push(`libraries=${i.sort().join(",")}`),r&&p.push(`channel=${r}`),a&&a.length&&p.push(`map_ids=${a.join(",")}`),l&&p.push(`auth_referrer_policy=${l}`),p.push("callback=initMap"),`https://maps.googleapis.com/maps/api/js?${p.join("&")}`}let R=!1;function j(){return l.exports.jsx("div",{children:"Loading..."})}const T={id:"script-loader",version:"weekly"};class B extends e.PureComponent{constructor(){super(...arguments),this.check=e.createRef(),this.state={loaded:!1},this.cleanupCallback=()=>{delete window.google.maps,this.injectScript()},this.isCleaningUp=()=>w(this,void 0,void 0,(function*(){return new Promise((function(e){if(R){if(P){const t=window.setInterval((function(){R||(window.clearInterval(t),e())}),1)}}else e()}))})),this.cleanup=()=>{R=!0;const e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"==typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))},this.injectScript=()=>{this.props.preventGoogleFontsLoading&&D(),m(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id);O({id:this.props.id,nonce:this.props.nonce,url:_(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((e=>{this.props.onError&&this.props.onError(e),console.error(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this.props.googleMapsApiKey||"-"}) or Client ID (${this.props.googleMapsClientId||"-"}) to <LoadScript />\n Otherwise it is a Network issue.\n `)}))}}componentDidMount(){if(P){if(window.google&&window.google.maps&&!R)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),P&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(P){this.cleanup();const e=()=>{this.check.current||(delete window.google,R=!1)};window.setTimeout(e,1),this.props.onUnmount&&this.props.onUnmount()}}render(){return l.exports.jsxs(l.exports.Fragment,{children:[l.exports.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||l.exports.jsx(j,{})]})}}let U;function z({id:t=T.id,version:s=T.version,nonce:n,googleMapsApiKey:o,googleMapsClientId:i,language:r,region:a,libraries:l,preventGoogleFontsLoading:p,channel:u,mapIds:c,authReferrerPolicy:d}){const h=e.useRef(!1),[g,v]=e.useState(!1),[f,y]=e.useState(void 0);e.useEffect((function(){return h.current=!0,()=>{h.current=!1}}),[]),e.useEffect((function(){P&&p&&D()}),[p]),e.useEffect((function(){g&&m(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[g]);const L=_({version:s,googleMapsApiKey:o,googleMapsClientId:i,language:r,region:a,libraries:l,channel:u,mapIds:c,authReferrerPolicy:d});e.useEffect((function(){function e(){h.current&&(v(!0),U=L)}P&&(window.google&&window.google.maps&&U===L?e():O({id:t,url:L,nonce:n}).then(e).catch((function(e){h.current&&y(e),console.warn(`\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${o||"-"}) or Client ID (${i||"-"})\n Otherwise it is a Network issue.\n `),console.error(e)})))}),[t,L,n]);const b=e.useRef();return e.useEffect((function(){b.current&&l!==b.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),b.current=l}),[l]),{isLoaded:g,loadError:f,url:L}}B.defaultProps=T;const A=l.exports.jsx(j,{});var N=e.memo((function(t){var{loadingElement:s,onLoad:n,onError:o,onUnmount:i,children:r}=t,a=S(t,["loadingElement","onLoad","onError","onUnmount","children"]);const{isLoaded:l,loadError:p}=z(a);return e.useEffect((function(){l&&"function"==typeof n&&n()}),[l,n]),e.useEffect((function(){p&&"function"==typeof o&&o(p)}),[p,o]),e.useEffect((function(){return()=>{i&&i()}}),[i]),l?r:s||A})),W=function e(t,s){if(t===s)return!0;if(t&&s&&"object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=s.length)return!1;for(o=n;0!=o--;)if(!e(t[o],s[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(s,i[o]))return!1;for(o=n;0!=o--;){var r=i[o];if(!e(t[r],s[r]))return!1}return!0}return t!=t&&s!=s};var V;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(V||(V={}));class Z{constructor({apiKey:e,authReferrerPolicy:t,channel:s,client:n,id:o="__googleMapsScriptId",language:i,libraries:r=[],mapIds:a,nonce:l,region:p,retries:u=3,url:c="https://maps.googleapis.com/maps/api/js",version:d}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=s,this.client=n,this.id=o||"__googleMapsScriptId",this.language=i,this.libraries=r,this.mapIds=a,this.nonce=l,this.region=p,this.retries=u,this.url=c,this.version=d,Z.instance){if(!W(this.options,Z.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Z.instance.options)}`);return Z.instance}Z.instance=this}get options(){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,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?V.FAILURE:this.done?V.SUCCESS:this.loading?V.LOADING:V.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+=`?callback=${this.CALLBACK}`,this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((s=>{s?t(s.error):e(window.google)}))}))}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const 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)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}const F={},H={options(e,t){e.setOptions(t)}};const $=e.memo((function({options:t,onLoad:s,onUnmount:n}){const o=e.useContext(v),[i,r]=e.useState(null);return e.useEffect((()=>{null!==i&&i.setMap(o)}),[o]),e.useEffect((()=>{t&&null!==i&&i.setOptions(t)}),[i,t]),e.useEffect((()=>{const e=new google.maps.TrafficLayer(Object.assign(Object.assign({},t||{}),{map:o}));return r(e),s&&s(e),()=>{null!==i&&(n&&n(i),i.setMap(null))}}),[]),null}));class G extends e.PureComponent{constructor(){super(...arguments),this.state={trafficLayer:null},this.setTrafficLayerCallback=()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)},this.registeredEvents=[]}componentDidMount(){const e=new google.maps.TrafficLayer(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=C({updaterMap:H,eventMap:F,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)}componentDidUpdate(e){null!==this.state.trafficLayer&&(x(this.registeredEvents),this.registeredEvents=C({updaterMap:H,eventMap:F,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),x(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}G.contextType=v;const K=e.memo((function({onLoad:t,onUnmount:s}){const n=e.useContext(v),[o,i]=e.useState(null);return e.useEffect((()=>{null!==o&&o.setMap(n)}),[n]),e.useEffect((()=>{const e=new google.maps.BicyclingLayer;return i(e),e.setMap(n),t&&t(e),()=>{null!==e&&(s&&s(e),e.setMap(null))}}),[]),null}));class Y extends e.PureComponent{constructor(){super(...arguments),this.state={bicyclingLayer:null},this.setBicyclingLayerCallback=()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}}componentDidMount(){const e=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:e})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}Y.contextType=v;const q=e.memo((function({onLoad:t,onUnmount:s}){const n=e.useContext(v),[o,i]=e.useState(null);return e.useEffect((()=>{null!==o&&o.setMap(n)}),[n]),e.useEffect((()=>{const e=new google.maps.TransitLayer;return i(e),e.setMap(n),t&&t(e),()=>{null!==o&&(s&&s(o),this.state.transitLayer.setMap(null))}}),[]),null}));class J extends e.PureComponent{constructor(){super(...arguments),this.state={transitLayer:null},this.setTransitLayerCallback=()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}}componentDidMount(){const e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}J.contextType=v;const X={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},Q={drawingMode(e,t){e.setDrawingMode(t)},options(e,t){e.setOptions(t)}};const ee=e.memo((function({options:t,drawingMode:s,onCircleComplete:n,onMarkerComplete:o,onOverlayComplete:i,onPolygonComplete:r,onPolylineComplete:a,onRectangleComplete:l,onLoad:p,onUnmount:u}){const c=e.useContext(v),[d,h]=e.useState(null),[g,f]=e.useState(null),[y,L]=e.useState(null),[b,x]=e.useState(null),[C,M]=e.useState(null),[k,E]=e.useState(null),[S,w]=e.useState(null);return e.useEffect((()=>{null!==d&&d.setMap(c)}),[c]),e.useEffect((()=>{t&&null!==d&&d.setOptions(t)}),[d,t]),e.useEffect((()=>{s&&null!==d&&d.setDrawingMode(s)}),[d,s]),e.useEffect((()=>{d&&n&&(null!==g&&google.maps.event.removeListener(g),f(google.maps.event.addListener(d,"circlecomplete",n)))}),[d,n]),e.useEffect((()=>{d&&o&&(null!==y&&google.maps.event.removeListener(y),L(google.maps.event.addListener(d,"markercomplete",o)))}),[d,o]),e.useEffect((()=>{d&&i&&(null!==b&&google.maps.event.removeListener(b),x(google.maps.event.addListener(d,"overlaycomplete",i)))}),[d,i]),e.useEffect((()=>{d&&r&&(null!==C&&google.maps.event.removeListener(C),M(google.maps.event.addListener(d,"polygoncomplete",r)))}),[d,r]),e.useEffect((()=>{d&&a&&(null!==k&&google.maps.event.removeListener(k),E(google.maps.event.addListener(d,"polylinecomplete",a)))}),[d,a]),e.useEffect((()=>{d&&l&&(null!==S&&google.maps.event.removeListener(S),w(google.maps.event.addListener(d,"rectanglecomplete",l)))}),[d,l]),e.useEffect((()=>{m(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);const e=new google.maps.drawing.DrawingManager(Object.assign(Object.assign({},t||{}),{map:c}));return s&&e.setDrawingMode(s),n&&f(google.maps.event.addListener(e,"circlecomplete",n)),o&&L(google.maps.event.addListener(e,"markercomplete",o)),i&&x(google.maps.event.addListener(e,"overlaycomplete",i)),r&&M(google.maps.event.addListener(e,"polygoncomplete",r)),a&&E(google.maps.event.addListener(e,"polylinecomplete",a)),l&&w(google.maps.event.addListener(e,"rectanglecomplete",l)),h(e),p&&p(e),()=>{null!==d&&(g&&google.maps.event.removeListener(g),y&&google.maps.event.removeListener(y),b&&google.maps.event.removeListener(b),C&&google.maps.event.removeListener(C),k&&google.maps.event.removeListener(k),S&&google.maps.event.removeListener(S),u&&u(d),d.setMap(null))}}),[]),null}));class te extends e.PureComponent{constructor(e){super(e),this.registeredEvents=[],this.state={drawingManager:null},this.setDrawingManagerCallback=()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)},m(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){const e=new google.maps.drawing.DrawingManager(Object.assign(Object.assign({},this.props.options||{}),{map:this.context}));this.registeredEvents=C({updaterMap:Q,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)}componentDidUpdate(e){null!==this.state.drawingManager&&(x(this.registeredEvents),this.registeredEvents=C({updaterMap:Q,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),x(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}te.contextType=v;const se={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},ne={animation(e,t){e.setAnimation(t)},clickable(e,t){e.setClickable(t)},cursor(e,t){e.setCursor(t)},draggable(e,t){e.setDraggable(t)},icon(e,t){e.setIcon(t)},label(e,t){e.setLabel(t)},map(e,t){e.setMap(t)},opacity(e,t){e.setOpacity(t)},options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},shape(e,t){e.setShape(t)},title(e,t){e.setTitle(t)},visible(e,t){e.setVisible(t)},zIndex(e,t){e.setZIndex(t)}},oe={};const ie=e.memo((function({position:t,options:s,clusterer:n,noClustererRedraw:o,children:i,draggable:r,visible:a,animation:p,clickable:u,cursor:c,icon:d,label:h,opacity:g,shape:m,title:f,zIndex:y,onClick:L,onDblClick:b,onDrag:x,onDragEnd:C,onDragStart:M,onMouseOut:k,onMouseOver:E,onMouseUp:S,onMouseDown:w,onRightClick:P,onClickableChanged:O,onCursorChanged:I,onAnimationChanged:D,onDraggableChanged:_,onFlatChanged:R,onIconChanged:j,onPositionChanged:T,onShapeChanged:B,onTitleChanged:U,onVisibleChanged:z,onZindexChanged:A,onLoad:N,onUnmount:W}){const V=e.useContext(v),[Z,F]=e.useState(null),[H,$]=e.useState(null),[G,K]=e.useState(null),[Y,q]=e.useState(null),[J,X]=e.useState(null),[Q,ee]=e.useState(null),[te,se]=e.useState(null),[ne,ie]=e.useState(null),[re,ae]=e.useState(null),[le,pe]=e.useState(null),[ue,ce]=e.useState(null),[de,he]=e.useState(null),[ge,me]=e.useState(null),[ve,fe]=e.useState(null),[ye,Le]=e.useState(null),[be,xe]=e.useState(null),[Ce,Me]=e.useState(null),[ke,Ee]=e.useState(null),[Se,we]=e.useState(null),[Pe,Oe]=e.useState(null),[Ie,De]=e.useState(null),[_e,Re]=e.useState(null);e.useEffect((()=>{null!==Z&&Z.setMap(V)}),[V]),e.useEffect((()=>{void 0!==s&&null!==Z&&Z.setOptions(s)}),[Z,s]),e.useEffect((()=>{void 0!==r&&null!==Z&&Z.setDraggable(r)}),[Z,r]),e.useEffect((()=>{t&&null!==Z&&Z.setPosition(t)}),[Z,t]),e.useEffect((()=>{void 0!==a&&null!==Z&&Z.setVisible(a)}),[Z,a]),e.useEffect((()=>{p&&null!==Z&&Z.setAnimation(p)}),[Z,p]),e.useEffect((()=>{Z&&b&&(null!==H&&google.maps.event.removeListener(H),$(google.maps.event.addListener(Z,"dblclick",b)))}),[b]),e.useEffect((()=>{Z&&C&&(null!==G&&google.maps.event.removeListener(G),K(google.maps.event.addListener(Z,"dragend",C)))}),[b]),e.useEffect((()=>{Z&&M&&(null!==Y&&google.maps.event.removeListener(Y),q(google.maps.event.addListener(Z,"dragstart",M)))}),[M]),e.useEffect((()=>{Z&&w&&(null!==J&&google.maps.event.removeListener(J),X(google.maps.event.addListener(Z,"mousedown",w)))}),[w]),e.useEffect((()=>{Z&&k&&(null!==Q&&google.maps.event.removeListener(Q),ee(google.maps.event.addListener(Z,"mouseout",k)))}),[k]),e.useEffect((()=>{Z&&E&&(null!==te&&google.maps.event.removeListener(te),se(google.maps.event.addListener(Z,"mouseover",E)))}),[E]),e.useEffect((()=>{Z&&S&&(null!==ne&&google.maps.event.removeListener(ne),ie(google.maps.event.addListener(Z,"mouseup",S)))}),[S]),e.useEffect((()=>{Z&&P&&(null!==re&&google.maps.event.removeListener(re),ae(google.maps.event.addListener(Z,"rightclick",P)))}),[P]),e.useEffect((()=>{Z&&L&&(null!==le&&google.maps.event.removeListener(le),pe(google.maps.event.addListener(Z,"click",L)))}),[L]),e.useEffect((()=>{Z&&x&&(null!==ue&&google.maps.event.removeListener(ue),ce(google.maps.event.addListener(Z,"drag",x)))}),[x]),e.useEffect((()=>{Z&&O&&(null!==de&&google.maps.event.removeListener(de),he(google.maps.event.addListener(Z,"clickable_changed",O)))}),[O]),e.useEffect((()=>{Z&&I&&(null!==ge&&google.maps.event.removeListener(ge),me(google.maps.event.addListener(Z,"cursor_changed",I)))}),[I]),e.useEffect((()=>{Z&&D&&(null!==ve&&google.maps.event.removeListener(ve),fe(google.maps.event.addListener(Z,"animation_changed",D)))}),[D]),e.useEffect((()=>{Z&&_&&(null!==ye&&google.maps.event.removeListener(ye),Le(google.maps.event.addListener(Z,"draggable_changed",_)))}),[_]),e.useEffect((()=>{Z&&R&&(null!==be&&google.maps.event.removeListener(be),xe(google.maps.event.addListener(Z,"flat_changed",R)))}),[R]),e.useEffect((()=>{Z&&j&&(null!==Ce&&google.maps.event.removeListener(Ce),Me(google.maps.event.addListener(Z,"icon_changed",j)))}),[j]),e.useEffect((()=>{Z&&T&&(null!==ke&&google.maps.event.removeListener(ke),Ee(google.maps.event.addListener(Z,"position_changed",T)))}),[T]),e.useEffect((()=>{Z&&B&&(null!==Se&&google.maps.event.removeListener(Se),we(google.maps.event.addListener(Z,"shape_changed",B)))}),[B]),e.useEffect((()=>{Z&&U&&(null!==Pe&&google.maps.event.removeListener(Pe),Oe(google.maps.event.addListener(Z,"title_changed",U)))}),[U]),e.useEffect((()=>{Z&&z&&(null!==Ie&&google.maps.event.removeListener(Ie),De(google.maps.event.addListener(Z,"visible_changed",z)))}),[z]),e.useEffect((()=>{Z&&A&&(null!==_e&&google.maps.event.removeListener(_e),Re(google.maps.event.addListener(Z,"zindex_changed",A)))}),[A]),e.useEffect((()=>{const e=Object.assign(Object.assign(Object.assign({},s||oe),n?oe:{map:V}),{position:t}),i=new google.maps.Marker(e);return n?n.addMarker(i,!!o):i.setMap(V),t&&i.setPosition(t),void 0!==a&&i.setVisible(a),void 0!==r&&i.setDraggable(r),void 0!==u&&i.setClickable(u),"string"==typeof c&&i.setCursor(c),d&&i.setIcon(d),void 0!==h&&i.setLabel(h),void 0!==g&&i.setOpacity(g),m&&i.setShape(m),"string"==typeof f&&i.setTitle(f),"number"==typeof y&&i.setZIndex(y),b&&$(google.maps.event.addListener(i,"dblclick",b)),C&&K(google.maps.event.addListener(i,"dragend",C)),M&&q(google.maps.event.addListener(i,"dragstart",M)),w&&X(google.maps.event.addListener(i,"mousedown",w)),k&&ee(google.maps.event.addListener(i,"mouseout",k)),E&&se(google.maps.event.addListener(i,"mouseover",E)),S&&ie(google.maps.event.addListener(i,"mouseup",S)),P&&ae(google.maps.event.addListener(i,"rightclick",P)),L&&pe(google.maps.event.addListener(i,"click",L)),x&&ce(google.maps.event.addListener(i,"drag",x)),O&&he(google.maps.event.addListener(i,"clickable_changed",O)),I&&me(google.maps.event.addListener(i,"cursor_changed",I)),D&&fe(google.maps.event.addListener(i,"animation_changed",D)),_&&Le(google.maps.event.addListener(i,"draggable_changed",_)),R&&xe(google.maps.event.addListener(i,"flat_changed",R)),j&&Me(google.maps.event.addListener(i,"icon_changed",j)),T&&Ee(google.maps.event.addListener(i,"position_changed",T)),B&&we(google.maps.event.addListener(i,"shape_changed",B)),U&&Oe(google.maps.event.addListener(i,"title_changed",U)),z&&De(google.maps.event.addListener(i,"visible_changed",z)),A&&Re(google.maps.event.addListener(i,"zindex_changed",A)),F(i),N&&N(i),()=>{null!==H&&google.maps.event.removeListener(H),null!==G&&google.maps.event.removeListener(G),null!==Y&&google.maps.event.removeListener(Y),null!==J&&google.maps.event.removeListener(J),null!==Q&&google.maps.event.removeListener(Q),null!==te&&google.maps.event.removeListener(te),null!==ne&&google.maps.event.removeListener(ne),null!==re&&google.maps.event.removeListener(re),null!==le&&google.maps.event.removeListener(le),null!==de&&google.maps.event.removeListener(de),null!==ge&&google.maps.event.removeListener(ge),null!==ve&&google.maps.event.removeListener(ve),null!==ye&&google.maps.event.removeListener(ye),null!==be&&google.maps.event.removeListener(be),null!==Ce&&google.maps.event.removeListener(Ce),null!==ke&&google.maps.event.removeListener(ke),null!==Pe&&google.maps.event.removeListener(Pe),null!==Ie&&google.maps.event.removeListener(Ie),null!==_e&&google.maps.event.removeListener(_e),W&&W(i),n?n.removeMarker(i,!!o):i&&i.setMap(null)}}),[]);const je=e.useMemo((()=>i?e.Children.map(i,(t=>{if(!e.isValidElement(t))return t;const s=t;return e.cloneElement(s,{anchor:Z})})):null),[i,Z]);return l.exports.jsx(l.exports.Fragment,{children:je})||null}));class re extends e.PureComponent{constructor(){super(...arguments),this.registeredEvents=[]}componentDidMount(){const e=Object.assign(Object.assign(Object.assign({},this.props.options||oe),this.props.clusterer?oe:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(e),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=C({updaterMap:ne,eventMap:se,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)}componentDidUpdate(e){this.marker&&(x(this.registeredEvents),this.registeredEvents=C({updaterMap:ne,eventMap:se,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),x(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){let t=null;return this.props.children&&(t=e.Children.map(this.props.children,(t=>{if(!e.isValidElement(t))return t;let s=t;return e.cloneElement(s,{anchor:this.marker})}))),t||null}}re.contextType=v;var ae=function(){function e(t,s){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=s,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.