@carto/ps-react-maps 1.1.1 → 1.1.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react");var De=(a=>(a.Roadmap="roadmap",a.Satellite="satellite",a.Terrain="terrain",a))(De||{}),Ae=(a=>(a.DarkMatter="dark-matter",a.Positron="positron",a.Voyager="voyager",a))(Ae||{});const br={positron:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",voyager:"https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json","dark-matter":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},q=()=>{throw new Error("You forgot to wrap your component in <MapProvider>.")},M={state:{maps:{}},references:{current:{}},actions:{setViewState:q,setBasemap:q,setResize:q,setZoom:q}},ne=h.createContext(M.state),Rr=h.createContext(M.references),ae=h.createContext(M.actions);var D=(a=>(a.SetViewState="SetViewState",a.SetBasemap="SetBasemap",a.SetResize="SetResize",a.SetZoom="SetZoom",a))(D||{});function Ie(a,{type:y,payload:_}){return{SetViewState:()=>{const{id:u,viewState:E}=_,f={...a.maps};return f[u]={...a.maps[u],viewState:E},{...a,maps:f}},SetResize:()=>{const{id:u,width:E,height:f}=_,S={...a.maps};return S[u]={...a.maps[u],viewState:{...a.maps[u].viewState,width:E,height:f}},{...a,maps:S}},SetBasemap:()=>{const{id:u,basemap:E}=_,f={...a.maps};return f[u]={...a.maps[u],basemap:E},{...a,maps:f}},SetZoom:()=>{const{id:u,zoom:E}=_,f={...a.maps};return f[u]={...a.maps[u],viewState:{...a.maps[u].viewState,zoom:E}},{...a,maps:f}}}[y]?.()??a}function Fe(){return h.useContext(ne)}function Me(){return h.useContext(ae)}function gr(a){const{maps:{[a]:y}}=Fe();return y}function hr(a){const{setBasemap:y,setResize:_,setViewState:C,setZoom:u}=Me();return{setBasemap:y.bind(null,a),setResize:_.bind(null,a),setViewState:C.bind(null,a),setZoom:u.bind(null,a)}}var te={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var je;function Er(){if(je)return W;je=1;var a=h,y=Symbol.for("react.element"),_=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,u=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function f(S,m,x){var b,w={},l=null,d=null;x!==void 0&&(l=""+x),m.key!==void 0&&(l=""+m.key),m.ref!==void 0&&(d=m.ref);for(b in m)C.call(m,b)&&!E.hasOwnProperty(b)&&(w[b]=m[b]);if(S&&S.defaultProps)for(b in m=S.defaultProps,m)w[b]===void 0&&(w[b]=m[b]);return{$$typeof:y,type:S,key:l,ref:d,props:w,_owner:u.current}}return W.Fragment=_,W.jsx=f,W.jsxs=f,W}var Y={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+J+e}}var G=!1,
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+o[
|
|
17
|
+
*/var ke;function _r(){return ke||(ke=1,process.env.NODE_ENV!=="production"&&function(){var a=h,y=Symbol.for("react.element"),_=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),S=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),j=Symbol.iterator,oe="@@iterator";function Ve(e){if(e===null||typeof e!="object")return null;var r=j&&e[j]||e[oe];return typeof r=="function"?r:null}var A=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];$e("error",e,t)}}function $e(e,r,t){{var n=A.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var c=t.map(function(i){return String(i)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var We=!1,Ye=!1,Le=!1,Be=!1,Ne=!1,ie;ie=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===E||Ne||e===u||e===x||e===b||Be||e===d||We||Ye||Le||typeof e=="object"&&e!==null&&(e.$$typeof===l||e.$$typeof===w||e.$$typeof===f||e.$$typeof===S||e.$$typeof===m||e.$$typeof===ie||e.getModuleId!==void 0))}function ze(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function se(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case _:return"Portal";case E:return"Profiler";case u:return"StrictMode";case x:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S:var r=e;return se(r)+".Consumer";case f:var t=e;return se(t._context)+".Provider";case m:return ze(e,e.render,"ForwardRef");case w:var n=e.displayName||null;return n!==null?n:P(e.type)||"Memo";case l:{var s=e,c=s._payload,i=s._init;try{return P(i(c))}catch{return null}}}return null}var k=Object.assign,V=0,ue,ce,le,fe,de,ve,pe;function me(){}me.__reactDisabledLog=!0;function qe(){{if(V===0){ue=console.log,ce=console.info,le=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:me,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function Ze(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:ue}),info:k({},e,{value:ce}),warn:k({},e,{value:le}),error:k({},e,{value:fe}),group:k({},e,{value:de}),groupCollapsed:k({},e,{value:ve}),groupEnd:k({},e,{value:pe})})}V<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=A.ReactCurrentDispatcher,J;function L(e,r,t){{if(J===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);J=n&&n[1]||""}return`
|
|
18
|
+
`+J+e}}var G=!1,B;{var Je=typeof WeakMap=="function"?WeakMap:Map;B=new Je}function ye(e,r){if(!e||G)return"";{var t=B.get(e);if(t!==void 0)return t}var n;G=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=Z.current,Z.current=null,qe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){n=O}Reflect.construct(e,[],i)}else{try{i.call()}catch(O){n=O}e.call(i.prototype)}}else{try{throw Error()}catch(O){n=O}e()}}catch(O){if(O&&n&&typeof O.stack=="string"){for(var o=O.stack.split(`
|
|
19
|
+
`),g=n.stack.split(`
|
|
20
|
+
`),v=o.length-1,p=g.length-1;v>=1&&p>=0&&o[v]!==g[p];)p--;for(;v>=1&&p>=0;v--,p--)if(o[v]!==g[p]){if(v!==1||p!==1)do if(v--,p--,p<0||o[v]!==g[p]){var T=`
|
|
21
|
+
`+o[v].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,T),T}while(v>=1&&p>=0);break}}}finally{G=!1,Z.current=c,Ze(),Error.prepareStackTrace=s}var F=e?e.displayName||e.name:"",xe=F?L(F):"";return typeof e=="function"&&B.set(e,xe),xe}function Ge(e,r,t){return ye(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ye(e,Ke(e));if(typeof e=="string")return L(e);switch(e){case x:return L("Suspense");case b:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case m:return Ge(e.render);case w:return N(e.type,r,t);case l:{var n=e,s=n._payload,c=n._init;try{return N(c(s),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,be={},Re=A.ReactDebugCurrentFrame;function z(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}function He(e,r,t,n,s){{var c=Function.call.bind(U);for(var i in e)if(c(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var g=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}o=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){o=v}o&&!(o instanceof Error)&&(z(s),R("%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",t,i,typeof o),z(null)),o instanceof Error&&!(o.message in be)&&(be[o.message]=!0,z(s),R("Failed %s type: %s",t,o.message),z(null))}}}var Xe=Array.isArray;function K(e){return Xe(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function er(e){try{return ge(e),!1}catch{return!0}}function ge(e){return""+e}function he(e){if(er(e))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),ge(e)}var $=A.ReactCurrentOwner,rr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,H;H={};function tr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nr(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=P($.current.type);H[t]||(R('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',P($.current.type),e.ref),H[t]=!0)}}function or(e,r){{var t=function(){Ee||(Ee=!0,R("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ir(e,r){{var t=function(){_e||(_e=!0,R("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var sr=function(e,r,t,n,s,c,i){var o={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ur(e,r,t,n,s){{var c,i={},o=null,g=null;t!==void 0&&(he(t),o=""+t),nr(r)&&(he(r.key),o=""+r.key),tr(r)&&(g=r.ref,ar(r,s));for(c in r)U.call(r,c)&&!rr.hasOwnProperty(c)&&(i[c]=r[c]);if(e&&e.defaultProps){var v=e.defaultProps;for(c in v)i[c]===void 0&&(i[c]=v[c])}if(o||g){var p=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&or(i,p),g&&ir(i,p)}return sr(e,o,g,s,n,$.current,i)}}var X=A.ReactCurrentOwner,Se=A.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Se.setExtraStackFrame(t)}else Se.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function Te(){{if(X.current){var e=P(X.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function cr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var Ce={};function lr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function we(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(Ce[t])return;Ce[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+P(e._owner.type)+"."),I(e),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),I(null)}}function Pe(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var n=e[t];ee(n)&&we(n,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var s=Ve(e);if(typeof s=="function"&&s!==e.entries)for(var c=s.call(e),i;!(i=c.next()).done;)ee(i.value)&&we(i.value,r)}}}function fr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===m||r.$$typeof===w))t=r.propTypes;else return;if(t){var n=P(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var s=P(r);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){I(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),I(null);break}}e.ref!==null&&(I(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}function Oe(e,r,t,n,s,c){{var i=Ue(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" 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 g=cr(s);g?o+=g:o+=Te();var v;e===null?v="null":K(e)?v="array":e!==void 0&&e.$$typeof===y?(v="<"+(P(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,o)}var p=ur(e,r,t,s,c);if(p==null)return p;if(i){var T=r.children;if(T!==void 0)if(n)if(K(T)){for(var F=0;F<T.length;F++)Pe(T[F],e);Object.freeze&&Object.freeze(T)}else R("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(T,e)}return e===C?dr(p):fr(p),p}}function vr(e,r,t){return Oe(e,r,t,!0)}function pr(e,r,t){return Oe(e,r,t,!1)}var mr=pr,yr=vr;Y.Fragment=C,Y.jsx=mr,Y.jsxs=yr}()),Y}process.env.NODE_ENV==="production"?te.exports=Er():te.exports=_r();var re=te.exports;function Sr({children:a,maps:y,externalSync:_}){const[C,u]=h.useReducer(Ie,{...M.state,maps:y.reduce((l,d)=>(l[d.id]=d,l),M.state.maps)}),E=h.useRef(y.reduce((l,d)=>(l[d.id]={instanceRef:{current:null},overlayRef:{current:null}},l),{})),f=h.useCallback((l,d,j)=>{y[0].id===l&&_?.({type:d,payload:j})},[_,y]),S=h.useCallback((l,d)=>{u({type:D.SetViewState,payload:{id:l,viewState:d}}),f(l,D.SetViewState,d)},[u,f]),m=h.useCallback((l,{height:d,width:j})=>{u({type:D.SetResize,payload:{id:l,height:d,width:j}}),f(l,D.SetResize,{height:d,width:j})},[u,f]),x=h.useCallback((l,d)=>{u({type:D.SetBasemap,payload:{id:l,basemap:d}})},[u]),b=h.useCallback((l,d)=>{u({type:D.SetZoom,payload:{id:l,zoom:d}})},[u]),w=h.useRef({setViewState:S,setBasemap:x,setResize:m,setZoom:b});return re.jsx(ae.Provider,{value:w.current,children:re.jsx(Rr.Provider,{value:E,children:re.jsx(ne.Provider,{value:C,children:a})})})}exports.CartoBasemapURL=br;exports.CartoBasemapsNames=Ae;exports.GMapsBasemap=De;exports.INITIAL_STATE=M;exports.MapActionsContext=ae;exports.MapContext=ne;exports.MapProvider=Sr;exports.reducer=Ie;exports.useMap=Fe;exports.useMapActions=Me;exports.useMapActionsByID=hr;exports.useMapByID=gr;
|
package/dist/index.js
CHANGED
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
const
|
|
1
|
+
import De, { createContext as ne, useContext as Fe, useReducer as yr, useRef as xe, useCallback as M } from "react";
|
|
2
|
+
var Rr = /* @__PURE__ */ ((a) => (a.Roadmap = "roadmap", a.Satellite = "satellite", a.Terrain = "terrain", a))(Rr || {}), gr = /* @__PURE__ */ ((a) => (a.DarkMatter = "dark-matter", a.Positron = "positron", a.Voyager = "voyager", a))(gr || {});
|
|
3
|
+
const Cr = {
|
|
4
4
|
positron: "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",
|
|
5
5
|
voyager: "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",
|
|
6
6
|
"dark-matter": "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
|
|
7
|
-
},
|
|
7
|
+
}, Z = () => {
|
|
8
8
|
throw new Error("You forgot to wrap your component in <MapProvider>.");
|
|
9
|
-
},
|
|
9
|
+
}, Y = {
|
|
10
10
|
state: {
|
|
11
11
|
maps: {}
|
|
12
12
|
// sync: false,
|
|
13
13
|
},
|
|
14
|
+
references: {
|
|
15
|
+
current: {}
|
|
16
|
+
},
|
|
14
17
|
actions: {
|
|
15
18
|
// toggleSync: stub,
|
|
16
|
-
setViewState:
|
|
17
|
-
setBasemap:
|
|
18
|
-
setResize:
|
|
19
|
-
setZoom:
|
|
19
|
+
setViewState: Z,
|
|
20
|
+
setBasemap: Z,
|
|
21
|
+
setResize: Z,
|
|
22
|
+
setZoom: Z
|
|
20
23
|
}
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
),
|
|
24
|
-
|
|
24
|
+
}, Ae = ne(
|
|
25
|
+
Y.state
|
|
26
|
+
), br = ne(Y.references), Ie = ne(
|
|
27
|
+
Y.actions
|
|
25
28
|
);
|
|
26
|
-
var
|
|
27
|
-
function
|
|
29
|
+
var k = /* @__PURE__ */ ((a) => (a.SetViewState = "SetViewState", a.SetBasemap = "SetBasemap", a.SetResize = "SetResize", a.SetZoom = "SetZoom", a))(k || {});
|
|
30
|
+
function hr(a, { type: y, payload: E }) {
|
|
28
31
|
return {
|
|
29
32
|
SetViewState: () => {
|
|
30
|
-
const { id: u, viewState:
|
|
31
|
-
return
|
|
33
|
+
const { id: u, viewState: h } = E, f = { ...a.maps };
|
|
34
|
+
return f[u] = {
|
|
32
35
|
...a.maps[u],
|
|
33
|
-
viewState:
|
|
36
|
+
viewState: h
|
|
34
37
|
}, {
|
|
35
38
|
...a,
|
|
36
|
-
maps:
|
|
39
|
+
maps: f
|
|
37
40
|
};
|
|
38
41
|
},
|
|
39
42
|
SetResize: () => {
|
|
40
|
-
const { id: u, width:
|
|
43
|
+
const { id: u, width: h, height: f } = E, _ = { ...a.maps };
|
|
41
44
|
return _[u] = {
|
|
42
45
|
...a.maps[u],
|
|
43
46
|
viewState: {
|
|
44
47
|
...a.maps[u].viewState,
|
|
45
|
-
width:
|
|
46
|
-
height:
|
|
48
|
+
width: h,
|
|
49
|
+
height: f
|
|
47
50
|
}
|
|
48
51
|
}, {
|
|
49
52
|
...a,
|
|
@@ -51,52 +54,52 @@ function br(a, { type: g, payload: E }) {
|
|
|
51
54
|
};
|
|
52
55
|
},
|
|
53
56
|
SetBasemap: () => {
|
|
54
|
-
const { id: u, basemap:
|
|
55
|
-
return
|
|
57
|
+
const { id: u, basemap: h } = E, f = { ...a.maps };
|
|
58
|
+
return f[u] = {
|
|
56
59
|
...a.maps[u],
|
|
57
|
-
basemap:
|
|
60
|
+
basemap: h
|
|
58
61
|
}, {
|
|
59
62
|
...a,
|
|
60
|
-
maps:
|
|
63
|
+
maps: f
|
|
61
64
|
};
|
|
62
65
|
},
|
|
63
66
|
SetZoom: () => {
|
|
64
|
-
const { id: u, zoom:
|
|
65
|
-
return
|
|
67
|
+
const { id: u, zoom: h } = E, f = { ...a.maps };
|
|
68
|
+
return f[u] = {
|
|
66
69
|
...a.maps[u],
|
|
67
70
|
viewState: {
|
|
68
71
|
...a.maps[u].viewState,
|
|
69
|
-
zoom:
|
|
72
|
+
zoom: h
|
|
70
73
|
}
|
|
71
74
|
}, {
|
|
72
75
|
...a,
|
|
73
|
-
maps:
|
|
76
|
+
maps: f
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
|
-
}[
|
|
77
|
-
}
|
|
78
|
-
function hr() {
|
|
79
|
-
return ke(De);
|
|
79
|
+
}[y]?.() ?? a;
|
|
80
80
|
}
|
|
81
81
|
function Er() {
|
|
82
|
-
return
|
|
82
|
+
return Fe(Ae);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
maps: { [a]: g }
|
|
87
|
-
} = hr();
|
|
88
|
-
return g;
|
|
84
|
+
function _r() {
|
|
85
|
+
return Fe(Ie);
|
|
89
86
|
}
|
|
90
87
|
function Pr(a) {
|
|
91
|
-
const {
|
|
88
|
+
const {
|
|
89
|
+
maps: { [a]: y }
|
|
90
|
+
} = Er();
|
|
91
|
+
return y;
|
|
92
|
+
}
|
|
93
|
+
function Or(a) {
|
|
94
|
+
const { setBasemap: y, setResize: E, setViewState: w, setZoom: u } = _r();
|
|
92
95
|
return {
|
|
93
|
-
setBasemap:
|
|
96
|
+
setBasemap: y.bind(null, a),
|
|
94
97
|
setResize: E.bind(null, a),
|
|
95
98
|
setViewState: w.bind(null, a),
|
|
96
99
|
setZoom: u.bind(null, a)
|
|
97
100
|
};
|
|
98
101
|
}
|
|
99
|
-
var
|
|
102
|
+
var te = { exports: {} }, $ = {};
|
|
100
103
|
/**
|
|
101
104
|
* @license React
|
|
102
105
|
* react-jsx-runtime.production.min.js
|
|
@@ -106,25 +109,25 @@ var re = { exports: {} }, M = {};
|
|
|
106
109
|
* This source code is licensed under the MIT license found in the
|
|
107
110
|
* LICENSE file in the root directory of this source tree.
|
|
108
111
|
*/
|
|
109
|
-
var
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
var a =
|
|
115
|
-
function
|
|
116
|
-
var R,
|
|
117
|
-
O !== void 0 && (
|
|
118
|
-
for (R in
|
|
119
|
-
w.call(
|
|
112
|
+
var je;
|
|
113
|
+
function Sr() {
|
|
114
|
+
if (je)
|
|
115
|
+
return $;
|
|
116
|
+
je = 1;
|
|
117
|
+
var a = De, y = Symbol.for("react.element"), E = Symbol.for("react.fragment"), w = Object.prototype.hasOwnProperty, u = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
118
|
+
function f(_, m, O) {
|
|
119
|
+
var R, T = {}, l = null, d = null;
|
|
120
|
+
O !== void 0 && (l = "" + O), m.key !== void 0 && (l = "" + m.key), m.ref !== void 0 && (d = m.ref);
|
|
121
|
+
for (R in m)
|
|
122
|
+
w.call(m, R) && !h.hasOwnProperty(R) && (T[R] = m[R]);
|
|
120
123
|
if (_ && _.defaultProps)
|
|
121
|
-
for (R in
|
|
122
|
-
|
|
123
|
-
return { $$typeof:
|
|
124
|
+
for (R in m = _.defaultProps, m)
|
|
125
|
+
T[R] === void 0 && (T[R] = m[R]);
|
|
126
|
+
return { $$typeof: y, type: _, key: l, ref: d, props: T, _owner: u.current };
|
|
124
127
|
}
|
|
125
|
-
return
|
|
128
|
+
return $.Fragment = E, $.jsx = f, $.jsxs = f, $;
|
|
126
129
|
}
|
|
127
|
-
var
|
|
130
|
+
var W = {};
|
|
128
131
|
/**
|
|
129
132
|
* @license React
|
|
130
133
|
* react-jsx-runtime.development.js
|
|
@@ -134,57 +137,57 @@ var $ = {};
|
|
|
134
137
|
* This source code is licensed under the MIT license found in the
|
|
135
138
|
* LICENSE file in the root directory of this source tree.
|
|
136
139
|
*/
|
|
137
|
-
var
|
|
138
|
-
function
|
|
139
|
-
return
|
|
140
|
-
var a =
|
|
141
|
-
function
|
|
140
|
+
var ke;
|
|
141
|
+
function wr() {
|
|
142
|
+
return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
143
|
+
var a = De, y = Symbol.for("react.element"), E = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), l = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), x = Symbol.iterator, ae = "@@iterator";
|
|
144
|
+
function Ve(e) {
|
|
142
145
|
if (e === null || typeof e != "object")
|
|
143
146
|
return null;
|
|
144
|
-
var r =
|
|
147
|
+
var r = x && e[x] || e[ae];
|
|
145
148
|
return typeof r == "function" ? r : null;
|
|
146
149
|
}
|
|
147
|
-
var
|
|
148
|
-
function
|
|
150
|
+
var D = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
151
|
+
function g(e) {
|
|
149
152
|
{
|
|
150
153
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
151
154
|
t[n - 1] = arguments[n];
|
|
152
|
-
|
|
155
|
+
Me("error", e, t);
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
|
-
function
|
|
158
|
+
function Me(e, r, t) {
|
|
156
159
|
{
|
|
157
|
-
var n =
|
|
160
|
+
var n = D.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
158
161
|
s !== "" && (r += "%s", t = t.concat([s]));
|
|
159
|
-
var
|
|
162
|
+
var c = t.map(function(i) {
|
|
160
163
|
return String(i);
|
|
161
164
|
});
|
|
162
|
-
|
|
165
|
+
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
function
|
|
168
|
-
return !!(typeof e == "string" || typeof e == "function" || e === w || e ===
|
|
168
|
+
var $e = !1, We = !1, Ye = !1, Le = !1, Ne = !1, oe;
|
|
169
|
+
oe = Symbol.for("react.module.reference");
|
|
170
|
+
function Ue(e) {
|
|
171
|
+
return !!(typeof e == "string" || typeof e == "function" || e === w || e === h || Ne || e === u || e === O || e === R || Le || e === d || $e || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === l || e.$$typeof === T || e.$$typeof === f || e.$$typeof === _ || e.$$typeof === m || // This needs to include all possible module reference object
|
|
169
172
|
// types supported by any Flight configuration anywhere since
|
|
170
173
|
// we don't know which Flight build this will end up being used
|
|
171
174
|
// with.
|
|
172
|
-
e.$$typeof ===
|
|
175
|
+
e.$$typeof === oe || e.getModuleId !== void 0));
|
|
173
176
|
}
|
|
174
|
-
function
|
|
177
|
+
function ze(e, r, t) {
|
|
175
178
|
var n = e.displayName;
|
|
176
179
|
if (n)
|
|
177
180
|
return n;
|
|
178
181
|
var s = r.displayName || r.name || "";
|
|
179
182
|
return s !== "" ? t + "(" + s + ")" : t;
|
|
180
183
|
}
|
|
181
|
-
function
|
|
184
|
+
function ie(e) {
|
|
182
185
|
return e.displayName || "Context";
|
|
183
186
|
}
|
|
184
187
|
function C(e) {
|
|
185
188
|
if (e == null)
|
|
186
189
|
return null;
|
|
187
|
-
if (typeof e.tag == "number" &&
|
|
190
|
+
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
188
191
|
return e.displayName || e.name || null;
|
|
189
192
|
if (typeof e == "string")
|
|
190
193
|
return e;
|
|
@@ -193,7 +196,7 @@ function Sr() {
|
|
|
193
196
|
return "Fragment";
|
|
194
197
|
case E:
|
|
195
198
|
return "Portal";
|
|
196
|
-
case
|
|
199
|
+
case h:
|
|
197
200
|
return "Profiler";
|
|
198
201
|
case u:
|
|
199
202
|
return "StrictMode";
|
|
@@ -206,19 +209,19 @@ function Sr() {
|
|
|
206
209
|
switch (e.$$typeof) {
|
|
207
210
|
case _:
|
|
208
211
|
var r = e;
|
|
209
|
-
return
|
|
210
|
-
case
|
|
212
|
+
return ie(r) + ".Consumer";
|
|
213
|
+
case f:
|
|
211
214
|
var t = e;
|
|
212
|
-
return
|
|
213
|
-
case
|
|
214
|
-
return
|
|
215
|
-
case
|
|
215
|
+
return ie(t._context) + ".Provider";
|
|
216
|
+
case m:
|
|
217
|
+
return ze(e, e.render, "ForwardRef");
|
|
218
|
+
case T:
|
|
216
219
|
var n = e.displayName || null;
|
|
217
220
|
return n !== null ? n : C(e.type) || "Memo";
|
|
218
|
-
case
|
|
219
|
-
var s = e,
|
|
221
|
+
case l: {
|
|
222
|
+
var s = e, c = s._payload, i = s._init;
|
|
220
223
|
try {
|
|
221
|
-
return C(i(
|
|
224
|
+
return C(i(c));
|
|
222
225
|
} catch {
|
|
223
226
|
return null;
|
|
224
227
|
}
|
|
@@ -226,18 +229,18 @@ function Sr() {
|
|
|
226
229
|
}
|
|
227
230
|
return null;
|
|
228
231
|
}
|
|
229
|
-
var
|
|
230
|
-
function
|
|
232
|
+
var j = Object.assign, I = 0, se, ue, ce, le, fe, de, ve;
|
|
233
|
+
function pe() {
|
|
231
234
|
}
|
|
232
|
-
|
|
233
|
-
function
|
|
235
|
+
pe.__reactDisabledLog = !0;
|
|
236
|
+
function Be() {
|
|
234
237
|
{
|
|
235
|
-
if (
|
|
236
|
-
|
|
238
|
+
if (I === 0) {
|
|
239
|
+
se = console.log, ue = console.info, ce = console.warn, le = console.error, fe = console.group, de = console.groupCollapsed, ve = console.groupEnd;
|
|
237
240
|
var e = {
|
|
238
241
|
configurable: !0,
|
|
239
242
|
enumerable: !0,
|
|
240
|
-
value:
|
|
243
|
+
value: pe,
|
|
241
244
|
writable: !0
|
|
242
245
|
};
|
|
243
246
|
Object.defineProperties(console, {
|
|
@@ -250,46 +253,46 @@ function Sr() {
|
|
|
250
253
|
groupEnd: e
|
|
251
254
|
});
|
|
252
255
|
}
|
|
253
|
-
|
|
256
|
+
I++;
|
|
254
257
|
}
|
|
255
258
|
}
|
|
256
|
-
function
|
|
259
|
+
function Ze() {
|
|
257
260
|
{
|
|
258
|
-
if (
|
|
261
|
+
if (I--, I === 0) {
|
|
259
262
|
var e = {
|
|
260
263
|
configurable: !0,
|
|
261
264
|
enumerable: !0,
|
|
262
265
|
writable: !0
|
|
263
266
|
};
|
|
264
267
|
Object.defineProperties(console, {
|
|
265
|
-
log:
|
|
266
|
-
value: ae
|
|
267
|
-
}),
|
|
268
|
-
info: x({}, e, {
|
|
269
|
-
value: oe
|
|
270
|
-
}),
|
|
271
|
-
warn: x({}, e, {
|
|
272
|
-
value: ie
|
|
273
|
-
}),
|
|
274
|
-
error: x({}, e, {
|
|
268
|
+
log: j({}, e, {
|
|
275
269
|
value: se
|
|
276
270
|
}),
|
|
277
|
-
|
|
271
|
+
info: j({}, e, {
|
|
278
272
|
value: ue
|
|
279
273
|
}),
|
|
280
|
-
|
|
274
|
+
warn: j({}, e, {
|
|
275
|
+
value: ce
|
|
276
|
+
}),
|
|
277
|
+
error: j({}, e, {
|
|
281
278
|
value: le
|
|
282
279
|
}),
|
|
283
|
-
|
|
284
|
-
value:
|
|
280
|
+
group: j({}, e, {
|
|
281
|
+
value: fe
|
|
282
|
+
}),
|
|
283
|
+
groupCollapsed: j({}, e, {
|
|
284
|
+
value: de
|
|
285
|
+
}),
|
|
286
|
+
groupEnd: j({}, e, {
|
|
287
|
+
value: ve
|
|
285
288
|
})
|
|
286
289
|
});
|
|
287
290
|
}
|
|
288
|
-
|
|
291
|
+
I < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
|
-
var q =
|
|
292
|
-
function
|
|
294
|
+
var q = D.ReactCurrentDispatcher, J;
|
|
295
|
+
function L(e, r, t) {
|
|
293
296
|
{
|
|
294
297
|
if (J === void 0)
|
|
295
298
|
try {
|
|
@@ -302,16 +305,16 @@ function Sr() {
|
|
|
302
305
|
` + J + e;
|
|
303
306
|
}
|
|
304
307
|
}
|
|
305
|
-
var G = !1,
|
|
308
|
+
var G = !1, N;
|
|
306
309
|
{
|
|
307
|
-
var
|
|
308
|
-
|
|
310
|
+
var qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
311
|
+
N = new qe();
|
|
309
312
|
}
|
|
310
|
-
function
|
|
313
|
+
function me(e, r) {
|
|
311
314
|
if (!e || G)
|
|
312
315
|
return "";
|
|
313
316
|
{
|
|
314
|
-
var t =
|
|
317
|
+
var t = N.get(e);
|
|
315
318
|
if (t !== void 0)
|
|
316
319
|
return t;
|
|
317
320
|
}
|
|
@@ -319,8 +322,8 @@ function Sr() {
|
|
|
319
322
|
G = !0;
|
|
320
323
|
var s = Error.prepareStackTrace;
|
|
321
324
|
Error.prepareStackTrace = void 0;
|
|
322
|
-
var
|
|
323
|
-
|
|
325
|
+
var c;
|
|
326
|
+
c = q.current, q.current = null, Be();
|
|
324
327
|
try {
|
|
325
328
|
if (r) {
|
|
326
329
|
var i = function() {
|
|
@@ -356,148 +359,148 @@ function Sr() {
|
|
|
356
359
|
} catch (P) {
|
|
357
360
|
if (P && n && typeof P.stack == "string") {
|
|
358
361
|
for (var o = P.stack.split(`
|
|
359
|
-
`),
|
|
360
|
-
`),
|
|
361
|
-
|
|
362
|
-
for (;
|
|
363
|
-
if (o[
|
|
364
|
-
if (
|
|
362
|
+
`), b = n.stack.split(`
|
|
363
|
+
`), v = o.length - 1, p = b.length - 1; v >= 1 && p >= 0 && o[v] !== b[p]; )
|
|
364
|
+
p--;
|
|
365
|
+
for (; v >= 1 && p >= 0; v--, p--)
|
|
366
|
+
if (o[v] !== b[p]) {
|
|
367
|
+
if (v !== 1 || p !== 1)
|
|
365
368
|
do
|
|
366
|
-
if (
|
|
369
|
+
if (v--, p--, p < 0 || o[v] !== b[p]) {
|
|
367
370
|
var S = `
|
|
368
|
-
` + o[
|
|
369
|
-
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
371
|
+
` + o[v].replace(" at new ", " at ");
|
|
372
|
+
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, S), S;
|
|
370
373
|
}
|
|
371
|
-
while (
|
|
374
|
+
while (v >= 1 && p >= 0);
|
|
372
375
|
break;
|
|
373
376
|
}
|
|
374
377
|
}
|
|
375
378
|
} finally {
|
|
376
|
-
G = !1, q.current =
|
|
379
|
+
G = !1, q.current = c, Ze(), Error.prepareStackTrace = s;
|
|
377
380
|
}
|
|
378
|
-
var
|
|
379
|
-
return typeof e == "function" &&
|
|
381
|
+
var A = e ? e.displayName || e.name : "", Oe = A ? L(A) : "";
|
|
382
|
+
return typeof e == "function" && N.set(e, Oe), Oe;
|
|
380
383
|
}
|
|
381
|
-
function
|
|
382
|
-
return
|
|
384
|
+
function Je(e, r, t) {
|
|
385
|
+
return me(e, !1);
|
|
383
386
|
}
|
|
384
|
-
function
|
|
387
|
+
function Ge(e) {
|
|
385
388
|
var r = e.prototype;
|
|
386
389
|
return !!(r && r.isReactComponent);
|
|
387
390
|
}
|
|
388
|
-
function
|
|
391
|
+
function U(e, r, t) {
|
|
389
392
|
if (e == null)
|
|
390
393
|
return "";
|
|
391
394
|
if (typeof e == "function")
|
|
392
|
-
return
|
|
395
|
+
return me(e, Ge(e));
|
|
393
396
|
if (typeof e == "string")
|
|
394
|
-
return
|
|
397
|
+
return L(e);
|
|
395
398
|
switch (e) {
|
|
396
399
|
case O:
|
|
397
|
-
return
|
|
400
|
+
return L("Suspense");
|
|
398
401
|
case R:
|
|
399
|
-
return
|
|
402
|
+
return L("SuspenseList");
|
|
400
403
|
}
|
|
401
404
|
if (typeof e == "object")
|
|
402
405
|
switch (e.$$typeof) {
|
|
403
|
-
case
|
|
404
|
-
return
|
|
405
|
-
case
|
|
406
|
-
return
|
|
407
|
-
case
|
|
408
|
-
var n = e, s = n._payload,
|
|
406
|
+
case m:
|
|
407
|
+
return Je(e.render);
|
|
408
|
+
case T:
|
|
409
|
+
return U(e.type, r, t);
|
|
410
|
+
case l: {
|
|
411
|
+
var n = e, s = n._payload, c = n._init;
|
|
409
412
|
try {
|
|
410
|
-
return
|
|
413
|
+
return U(c(s), r, t);
|
|
411
414
|
} catch {
|
|
412
415
|
}
|
|
413
416
|
}
|
|
414
417
|
}
|
|
415
418
|
return "";
|
|
416
419
|
}
|
|
417
|
-
var
|
|
418
|
-
function
|
|
420
|
+
var z = Object.prototype.hasOwnProperty, ye = {}, Re = D.ReactDebugCurrentFrame;
|
|
421
|
+
function B(e) {
|
|
419
422
|
if (e) {
|
|
420
|
-
var r = e._owner, t =
|
|
421
|
-
|
|
423
|
+
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
424
|
+
Re.setExtraStackFrame(t);
|
|
422
425
|
} else
|
|
423
|
-
|
|
426
|
+
Re.setExtraStackFrame(null);
|
|
424
427
|
}
|
|
425
|
-
function
|
|
428
|
+
function Ke(e, r, t, n, s) {
|
|
426
429
|
{
|
|
427
|
-
var
|
|
430
|
+
var c = Function.call.bind(z);
|
|
428
431
|
for (var i in e)
|
|
429
|
-
if (
|
|
432
|
+
if (c(e, i)) {
|
|
430
433
|
var o = void 0;
|
|
431
434
|
try {
|
|
432
435
|
if (typeof e[i] != "function") {
|
|
433
|
-
var
|
|
434
|
-
throw
|
|
436
|
+
var b = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
437
|
+
throw b.name = "Invariant Violation", b;
|
|
435
438
|
}
|
|
436
439
|
o = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
437
|
-
} catch (
|
|
438
|
-
o =
|
|
440
|
+
} catch (v) {
|
|
441
|
+
o = v;
|
|
439
442
|
}
|
|
440
|
-
o && !(o instanceof Error) && (
|
|
443
|
+
o && !(o instanceof Error) && (B(s), g("%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", t, i, typeof o), B(null)), o instanceof Error && !(o.message in ye) && (ye[o.message] = !0, B(s), g("Failed %s type: %s", t, o.message), B(null));
|
|
441
444
|
}
|
|
442
445
|
}
|
|
443
446
|
}
|
|
444
|
-
var
|
|
447
|
+
var He = Array.isArray;
|
|
445
448
|
function K(e) {
|
|
446
|
-
return
|
|
449
|
+
return He(e);
|
|
447
450
|
}
|
|
448
|
-
function
|
|
451
|
+
function Xe(e) {
|
|
449
452
|
{
|
|
450
453
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
451
454
|
return t;
|
|
452
455
|
}
|
|
453
456
|
}
|
|
454
|
-
function
|
|
457
|
+
function Qe(e) {
|
|
455
458
|
try {
|
|
456
|
-
return
|
|
459
|
+
return ge(e), !1;
|
|
457
460
|
} catch {
|
|
458
461
|
return !0;
|
|
459
462
|
}
|
|
460
463
|
}
|
|
461
|
-
function
|
|
464
|
+
function ge(e) {
|
|
462
465
|
return "" + e;
|
|
463
466
|
}
|
|
464
|
-
function
|
|
465
|
-
if (
|
|
466
|
-
return
|
|
467
|
+
function be(e) {
|
|
468
|
+
if (Qe(e))
|
|
469
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), ge(e);
|
|
467
470
|
}
|
|
468
|
-
var
|
|
471
|
+
var V = D.ReactCurrentOwner, er = {
|
|
469
472
|
key: !0,
|
|
470
473
|
ref: !0,
|
|
471
474
|
__self: !0,
|
|
472
475
|
__source: !0
|
|
473
|
-
},
|
|
476
|
+
}, he, Ee, H;
|
|
474
477
|
H = {};
|
|
475
|
-
function
|
|
476
|
-
if (
|
|
478
|
+
function rr(e) {
|
|
479
|
+
if (z.call(e, "ref")) {
|
|
477
480
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
478
481
|
if (r && r.isReactWarning)
|
|
479
482
|
return !1;
|
|
480
483
|
}
|
|
481
484
|
return e.ref !== void 0;
|
|
482
485
|
}
|
|
483
|
-
function
|
|
484
|
-
if (
|
|
486
|
+
function tr(e) {
|
|
487
|
+
if (z.call(e, "key")) {
|
|
485
488
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
486
489
|
if (r && r.isReactWarning)
|
|
487
490
|
return !1;
|
|
488
491
|
}
|
|
489
492
|
return e.key !== void 0;
|
|
490
493
|
}
|
|
491
|
-
function
|
|
492
|
-
if (typeof e.ref == "string" &&
|
|
493
|
-
var t = C(
|
|
494
|
-
H[t] || (
|
|
494
|
+
function nr(e, r) {
|
|
495
|
+
if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
|
|
496
|
+
var t = C(V.current.type);
|
|
497
|
+
H[t] || (g('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(V.current.type), e.ref), H[t] = !0);
|
|
495
498
|
}
|
|
496
499
|
}
|
|
497
|
-
function
|
|
500
|
+
function ar(e, r) {
|
|
498
501
|
{
|
|
499
502
|
var t = function() {
|
|
500
|
-
|
|
503
|
+
he || (he = !0, g("%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)", r));
|
|
501
504
|
};
|
|
502
505
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
503
506
|
get: t,
|
|
@@ -505,10 +508,10 @@ function Sr() {
|
|
|
505
508
|
});
|
|
506
509
|
}
|
|
507
510
|
}
|
|
508
|
-
function
|
|
511
|
+
function or(e, r) {
|
|
509
512
|
{
|
|
510
513
|
var t = function() {
|
|
511
|
-
|
|
514
|
+
Ee || (Ee = !0, g("%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)", r));
|
|
512
515
|
};
|
|
513
516
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
514
517
|
get: t,
|
|
@@ -516,17 +519,17 @@ function Sr() {
|
|
|
516
519
|
});
|
|
517
520
|
}
|
|
518
521
|
}
|
|
519
|
-
var
|
|
522
|
+
var ir = function(e, r, t, n, s, c, i) {
|
|
520
523
|
var o = {
|
|
521
524
|
// This tag allows us to uniquely identify this as a React Element
|
|
522
|
-
$$typeof:
|
|
525
|
+
$$typeof: y,
|
|
523
526
|
// Built-in properties that belong on the element
|
|
524
527
|
type: e,
|
|
525
528
|
key: r,
|
|
526
529
|
ref: t,
|
|
527
530
|
props: i,
|
|
528
531
|
// Record the component responsible for creating this element.
|
|
529
|
-
_owner:
|
|
532
|
+
_owner: c
|
|
530
533
|
};
|
|
531
534
|
return o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
532
535
|
configurable: !1,
|
|
@@ -545,38 +548,38 @@ function Sr() {
|
|
|
545
548
|
value: s
|
|
546
549
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
547
550
|
};
|
|
548
|
-
function
|
|
551
|
+
function sr(e, r, t, n, s) {
|
|
549
552
|
{
|
|
550
|
-
var
|
|
551
|
-
t !== void 0 && (
|
|
552
|
-
for (
|
|
553
|
-
|
|
553
|
+
var c, i = {}, o = null, b = null;
|
|
554
|
+
t !== void 0 && (be(t), o = "" + t), tr(r) && (be(r.key), o = "" + r.key), rr(r) && (b = r.ref, nr(r, s));
|
|
555
|
+
for (c in r)
|
|
556
|
+
z.call(r, c) && !er.hasOwnProperty(c) && (i[c] = r[c]);
|
|
554
557
|
if (e && e.defaultProps) {
|
|
555
|
-
var
|
|
556
|
-
for (
|
|
557
|
-
i[
|
|
558
|
+
var v = e.defaultProps;
|
|
559
|
+
for (c in v)
|
|
560
|
+
i[c] === void 0 && (i[c] = v[c]);
|
|
558
561
|
}
|
|
559
|
-
if (o ||
|
|
560
|
-
var
|
|
561
|
-
o &&
|
|
562
|
+
if (o || b) {
|
|
563
|
+
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
564
|
+
o && ar(i, p), b && or(i, p);
|
|
562
565
|
}
|
|
563
|
-
return
|
|
566
|
+
return ir(e, o, b, s, n, V.current, i);
|
|
564
567
|
}
|
|
565
568
|
}
|
|
566
|
-
var X =
|
|
567
|
-
function
|
|
569
|
+
var X = D.ReactCurrentOwner, _e = D.ReactDebugCurrentFrame;
|
|
570
|
+
function F(e) {
|
|
568
571
|
if (e) {
|
|
569
|
-
var r = e._owner, t =
|
|
570
|
-
|
|
572
|
+
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
573
|
+
_e.setExtraStackFrame(t);
|
|
571
574
|
} else
|
|
572
|
-
|
|
575
|
+
_e.setExtraStackFrame(null);
|
|
573
576
|
}
|
|
574
577
|
var Q;
|
|
575
578
|
Q = !1;
|
|
576
579
|
function ee(e) {
|
|
577
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
580
|
+
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
578
581
|
}
|
|
579
|
-
function
|
|
582
|
+
function Se() {
|
|
580
583
|
{
|
|
581
584
|
if (X.current) {
|
|
582
585
|
var e = C(X.current.type);
|
|
@@ -588,7 +591,7 @@ Check the render method of \`` + e + "`.";
|
|
|
588
591
|
return "";
|
|
589
592
|
}
|
|
590
593
|
}
|
|
591
|
-
function
|
|
594
|
+
function ur(e) {
|
|
592
595
|
{
|
|
593
596
|
if (e !== void 0) {
|
|
594
597
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
@@ -599,10 +602,10 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
599
602
|
return "";
|
|
600
603
|
}
|
|
601
604
|
}
|
|
602
|
-
var
|
|
603
|
-
function
|
|
605
|
+
var we = {};
|
|
606
|
+
function cr(e) {
|
|
604
607
|
{
|
|
605
|
-
var r =
|
|
608
|
+
var r = Se();
|
|
606
609
|
if (!r) {
|
|
607
610
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
608
611
|
t && (r = `
|
|
@@ -612,35 +615,35 @@ Check the top-level render call using <` + t + ">.");
|
|
|
612
615
|
return r;
|
|
613
616
|
}
|
|
614
617
|
}
|
|
615
|
-
function
|
|
618
|
+
function Te(e, r) {
|
|
616
619
|
{
|
|
617
620
|
if (!e._store || e._store.validated || e.key != null)
|
|
618
621
|
return;
|
|
619
622
|
e._store.validated = !0;
|
|
620
|
-
var t =
|
|
621
|
-
if (
|
|
623
|
+
var t = cr(r);
|
|
624
|
+
if (we[t])
|
|
622
625
|
return;
|
|
623
|
-
|
|
626
|
+
we[t] = !0;
|
|
624
627
|
var n = "";
|
|
625
|
-
e && e._owner && e._owner !== X.current && (n = " It was passed a child from " + C(e._owner.type) + "."),
|
|
628
|
+
e && e._owner && e._owner !== X.current && (n = " It was passed a child from " + C(e._owner.type) + "."), F(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), F(null);
|
|
626
629
|
}
|
|
627
630
|
}
|
|
628
|
-
function
|
|
631
|
+
function Ce(e, r) {
|
|
629
632
|
{
|
|
630
633
|
if (typeof e != "object")
|
|
631
634
|
return;
|
|
632
635
|
if (K(e))
|
|
633
636
|
for (var t = 0; t < e.length; t++) {
|
|
634
637
|
var n = e[t];
|
|
635
|
-
ee(n) &&
|
|
638
|
+
ee(n) && Te(n, r);
|
|
636
639
|
}
|
|
637
640
|
else if (ee(e))
|
|
638
641
|
e._store && (e._store.validated = !0);
|
|
639
642
|
else if (e) {
|
|
640
|
-
var s =
|
|
643
|
+
var s = Ve(e);
|
|
641
644
|
if (typeof s == "function" && s !== e.entries)
|
|
642
|
-
for (var
|
|
643
|
-
ee(i.value) &&
|
|
645
|
+
for (var c = s.call(e), i; !(i = c.next()).done; )
|
|
646
|
+
ee(i.value) && Te(i.value, r);
|
|
644
647
|
}
|
|
645
648
|
}
|
|
646
649
|
}
|
|
@@ -652,157 +655,166 @@ Check the top-level render call using <` + t + ">.");
|
|
|
652
655
|
var t;
|
|
653
656
|
if (typeof r == "function")
|
|
654
657
|
t = r.propTypes;
|
|
655
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
658
|
+
else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
|
|
656
659
|
// Inner props are checked in the reconciler.
|
|
657
|
-
r.$$typeof ===
|
|
660
|
+
r.$$typeof === T))
|
|
658
661
|
t = r.propTypes;
|
|
659
662
|
else
|
|
660
663
|
return;
|
|
661
664
|
if (t) {
|
|
662
665
|
var n = C(r);
|
|
663
|
-
|
|
666
|
+
Ke(t, e.props, "prop", n, e);
|
|
664
667
|
} else if (r.PropTypes !== void 0 && !Q) {
|
|
665
668
|
Q = !0;
|
|
666
669
|
var s = C(r);
|
|
667
|
-
|
|
670
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
668
671
|
}
|
|
669
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
672
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
670
673
|
}
|
|
671
674
|
}
|
|
672
|
-
function
|
|
675
|
+
function fr(e) {
|
|
673
676
|
{
|
|
674
677
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
675
678
|
var n = r[t];
|
|
676
679
|
if (n !== "children" && n !== "key") {
|
|
677
|
-
|
|
680
|
+
F(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null);
|
|
678
681
|
break;
|
|
679
682
|
}
|
|
680
683
|
}
|
|
681
|
-
e.ref !== null && (
|
|
684
|
+
e.ref !== null && (F(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
682
685
|
}
|
|
683
686
|
}
|
|
684
|
-
function
|
|
687
|
+
function Pe(e, r, t, n, s, c) {
|
|
685
688
|
{
|
|
686
|
-
var i =
|
|
689
|
+
var i = Ue(e);
|
|
687
690
|
if (!i) {
|
|
688
691
|
var o = "";
|
|
689
692
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
690
|
-
var
|
|
691
|
-
|
|
692
|
-
var
|
|
693
|
-
e === null ?
|
|
693
|
+
var b = ur(s);
|
|
694
|
+
b ? o += b : o += Se();
|
|
695
|
+
var v;
|
|
696
|
+
e === null ? v = "null" : K(e) ? v = "array" : e !== void 0 && e.$$typeof === y ? (v = "<" + (C(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, o);
|
|
694
697
|
}
|
|
695
|
-
var
|
|
696
|
-
if (
|
|
697
|
-
return
|
|
698
|
+
var p = sr(e, r, t, s, c);
|
|
699
|
+
if (p == null)
|
|
700
|
+
return p;
|
|
698
701
|
if (i) {
|
|
699
702
|
var S = r.children;
|
|
700
703
|
if (S !== void 0)
|
|
701
704
|
if (n)
|
|
702
705
|
if (K(S)) {
|
|
703
|
-
for (var
|
|
704
|
-
|
|
706
|
+
for (var A = 0; A < S.length; A++)
|
|
707
|
+
Ce(S[A], e);
|
|
705
708
|
Object.freeze && Object.freeze(S);
|
|
706
709
|
} else
|
|
707
|
-
|
|
710
|
+
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
708
711
|
else
|
|
709
|
-
|
|
712
|
+
Ce(S, e);
|
|
710
713
|
}
|
|
711
|
-
return e === w ?
|
|
714
|
+
return e === w ? fr(p) : lr(p), p;
|
|
712
715
|
}
|
|
713
716
|
}
|
|
714
|
-
function fr(e, r, t) {
|
|
715
|
-
return we(e, r, t, !0);
|
|
716
|
-
}
|
|
717
717
|
function dr(e, r, t) {
|
|
718
|
-
return
|
|
718
|
+
return Pe(e, r, t, !0);
|
|
719
719
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
function vr(e, r, t) {
|
|
721
|
+
return Pe(e, r, t, !1);
|
|
722
|
+
}
|
|
723
|
+
var pr = vr, mr = dr;
|
|
724
|
+
W.Fragment = w, W.jsx = pr, W.jsxs = mr;
|
|
725
|
+
}()), W;
|
|
723
726
|
}
|
|
724
|
-
process.env.NODE_ENV === "production" ?
|
|
725
|
-
var
|
|
726
|
-
function
|
|
727
|
+
process.env.NODE_ENV === "production" ? te.exports = Sr() : te.exports = wr();
|
|
728
|
+
var re = te.exports;
|
|
729
|
+
function xr({
|
|
727
730
|
children: a,
|
|
728
|
-
maps:
|
|
731
|
+
maps: y,
|
|
729
732
|
externalSync: E
|
|
730
733
|
}) {
|
|
731
|
-
const [w, u] =
|
|
732
|
-
...
|
|
733
|
-
maps:
|
|
734
|
-
}),
|
|
735
|
-
(
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
734
|
+
const [w, u] = yr(hr, {
|
|
735
|
+
...Y.state,
|
|
736
|
+
maps: y.reduce((l, d) => (l[d.id] = d, l), Y.state.maps)
|
|
737
|
+
}), h = xe(
|
|
738
|
+
y.reduce((l, d) => (l[d.id] = {
|
|
739
|
+
instanceRef: {
|
|
740
|
+
current: null
|
|
741
|
+
},
|
|
742
|
+
overlayRef: {
|
|
743
|
+
current: null
|
|
744
|
+
}
|
|
745
|
+
}, l), {})
|
|
746
|
+
), f = M(
|
|
747
|
+
(l, d, x) => {
|
|
748
|
+
y[0].id === l && E?.({
|
|
749
|
+
type: d,
|
|
750
|
+
payload: x
|
|
739
751
|
});
|
|
740
752
|
},
|
|
741
|
-
[E,
|
|
742
|
-
),
|
|
743
|
-
(
|
|
753
|
+
[E, y]
|
|
754
|
+
), _ = M(
|
|
755
|
+
(l, d) => {
|
|
744
756
|
u({
|
|
745
|
-
type:
|
|
757
|
+
type: k.SetViewState,
|
|
746
758
|
payload: {
|
|
747
|
-
id:
|
|
748
|
-
viewState:
|
|
759
|
+
id: l,
|
|
760
|
+
viewState: d
|
|
749
761
|
}
|
|
750
|
-
}),
|
|
762
|
+
}), f(l, k.SetViewState, d);
|
|
751
763
|
},
|
|
752
|
-
[u,
|
|
753
|
-
),
|
|
754
|
-
(
|
|
764
|
+
[u, f]
|
|
765
|
+
), m = M(
|
|
766
|
+
(l, { height: d, width: x }) => {
|
|
755
767
|
u({
|
|
756
|
-
type:
|
|
768
|
+
type: k.SetResize,
|
|
757
769
|
payload: {
|
|
758
|
-
id:
|
|
759
|
-
height:
|
|
760
|
-
width:
|
|
770
|
+
id: l,
|
|
771
|
+
height: d,
|
|
772
|
+
width: x
|
|
761
773
|
}
|
|
762
|
-
}),
|
|
774
|
+
}), f(l, k.SetResize, { height: d, width: x });
|
|
763
775
|
},
|
|
764
|
-
[u,
|
|
765
|
-
),
|
|
766
|
-
(
|
|
776
|
+
[u, f]
|
|
777
|
+
), O = M(
|
|
778
|
+
(l, d) => {
|
|
767
779
|
u({
|
|
768
|
-
type:
|
|
780
|
+
type: k.SetBasemap,
|
|
769
781
|
payload: {
|
|
770
|
-
id:
|
|
771
|
-
basemap:
|
|
782
|
+
id: l,
|
|
783
|
+
basemap: d
|
|
772
784
|
}
|
|
773
785
|
});
|
|
774
786
|
},
|
|
775
787
|
[u]
|
|
776
|
-
),
|
|
777
|
-
(
|
|
788
|
+
), R = M(
|
|
789
|
+
(l, d) => {
|
|
778
790
|
u({
|
|
779
|
-
type:
|
|
791
|
+
type: k.SetZoom,
|
|
780
792
|
payload: {
|
|
781
|
-
id:
|
|
782
|
-
zoom:
|
|
793
|
+
id: l,
|
|
794
|
+
zoom: d
|
|
783
795
|
}
|
|
784
796
|
});
|
|
785
797
|
},
|
|
786
798
|
[u]
|
|
787
|
-
),
|
|
788
|
-
setViewState:
|
|
789
|
-
setBasemap:
|
|
790
|
-
setResize:
|
|
791
|
-
setZoom:
|
|
799
|
+
), T = xe({
|
|
800
|
+
setViewState: _,
|
|
801
|
+
setBasemap: O,
|
|
802
|
+
setResize: m,
|
|
803
|
+
setZoom: R
|
|
792
804
|
});
|
|
793
|
-
return /* @__PURE__ */
|
|
805
|
+
return /* @__PURE__ */ re.jsx(Ie.Provider, { value: T.current, children: /* @__PURE__ */ re.jsx(br.Provider, { value: h, children: /* @__PURE__ */ re.jsx(Ae.Provider, { value: w, children: a }) }) });
|
|
794
806
|
}
|
|
795
807
|
export {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
+
Cr as CartoBasemapURL,
|
|
809
|
+
gr as CartoBasemapsNames,
|
|
810
|
+
Rr as GMapsBasemap,
|
|
811
|
+
Y as INITIAL_STATE,
|
|
812
|
+
Ie as MapActionsContext,
|
|
813
|
+
Ae as MapContext,
|
|
814
|
+
xr as MapProvider,
|
|
815
|
+
hr as reducer,
|
|
816
|
+
Er as useMap,
|
|
817
|
+
_r as useMapActions,
|
|
818
|
+
Or as useMapActionsByID,
|
|
819
|
+
Pr as useMapByID
|
|
808
820
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MapContextInterface } from './map-provider.types';
|
|
2
2
|
export declare const INITIAL_STATE: MapContextInterface;
|
|
3
3
|
export declare const MapContext: import("react").Context<import("./map-provider.types").MapState>;
|
|
4
|
+
export declare const MapReferencesContext: import("react").Context<import("react").MutableRefObject<import("./map-provider.types").MapReferencesState>>;
|
|
4
5
|
export declare const MapActionsContext: import("react").Context<import("./map-provider.types").MapActionsState>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { Deck } from '@deck.gl/core/typed';
|
|
1
2
|
/**
|
|
2
3
|
* Returns the current map state from the MapContext.
|
|
3
4
|
* @returns {MapContextInterface['state']} The current map state.
|
|
4
5
|
*/
|
|
5
6
|
export declare function useMap(): import("./map-provider.types").MapState;
|
|
7
|
+
export declare function useRefences(): import("react").MutableRefObject<import("./map-provider.types").MapReferencesState>;
|
|
6
8
|
/**
|
|
7
9
|
* Returns the map actions from the MapActionsContext.
|
|
8
10
|
* @returns {MapContextInterface['actions']} The map actions.
|
|
@@ -14,9 +16,16 @@ export declare function useMapActions(): import("./map-provider.types").MapActio
|
|
|
14
16
|
* @returns {MapContextInterface['state']['maps'][string]} The map with the given ID.
|
|
15
17
|
*/
|
|
16
18
|
export declare function useMapByID(id: string): import("./map-provider.types").MapsProps;
|
|
19
|
+
export declare function useMapReferencesByID(id: string): {
|
|
20
|
+
instanceRef: import("react").MutableRefObject<import("./map-provider.types").InstanceMapRef>;
|
|
21
|
+
overlayRef: import("react").MutableRefObject<import("./map-provider.types").OverlayMapRef>;
|
|
22
|
+
getDeckInstance: () => Deck | undefined;
|
|
23
|
+
getOverlayInstance: () => import("./map-provider.types").OverlayMapRef;
|
|
24
|
+
getViewState: () => any;
|
|
25
|
+
};
|
|
17
26
|
export declare function useMapActionsByID(id: string): {
|
|
18
27
|
setBasemap: (basemap: import("./map-provider.types").Basemap) => void;
|
|
19
28
|
setResize: (props: import("./map-provider.types").MapResize) => void;
|
|
20
|
-
setViewState: (viewState:
|
|
29
|
+
setViewState: (viewState: any) => void;
|
|
21
30
|
setZoom: (zoom: number) => void;
|
|
22
31
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import type { PickingInfo
|
|
2
|
+
import type { PickingInfo } from '@deck.gl/core/typed';
|
|
3
3
|
import type { GoogleMapsOverlay, GoogleMapsOverlayProps } from '@deck.gl/google-maps/typed';
|
|
4
4
|
import type { DeckGLProps, DeckGLRef } from '@deck.gl/react/typed';
|
|
5
5
|
import type { StyleSpecification } from 'maplibre-gl';
|
|
@@ -41,11 +41,16 @@ export type MapResize = {
|
|
|
41
41
|
width: number | string;
|
|
42
42
|
height: number | string;
|
|
43
43
|
};
|
|
44
|
+
export type MapReferences = {
|
|
45
|
+
instanceRef: MutableRefObject<InstanceMapRef>;
|
|
46
|
+
overlayRef: MutableRefObject<OverlayMapRef>;
|
|
47
|
+
};
|
|
48
|
+
export type MapReferencesState = Record<MapsProps['id'], MapReferences>;
|
|
44
49
|
/**
|
|
45
50
|
* Actions that can be performed on the map.
|
|
46
51
|
*/
|
|
47
52
|
export type MapActionsState = {
|
|
48
|
-
setViewState: (id: MapsProps['id'], viewState:
|
|
53
|
+
setViewState: (id: MapsProps['id'], viewState: DeckGLMapsProps['viewState']) => void;
|
|
49
54
|
setResize: (id: MapsProps['id'], props: MapResize) => void;
|
|
50
55
|
setBasemap: (id: MapsProps['id'], basemap: Basemap) => void;
|
|
51
56
|
setZoom: (id: MapsProps['id'], zoom: number) => void;
|
|
@@ -55,6 +60,7 @@ export type MapActionsState = {
|
|
|
55
60
|
*/
|
|
56
61
|
export type MapContextInterface = {
|
|
57
62
|
state: MapState;
|
|
63
|
+
references: MutableRefObject<MapReferencesState>;
|
|
58
64
|
actions: MapActionsState;
|
|
59
65
|
};
|
|
60
66
|
/**
|
|
@@ -67,9 +73,7 @@ export type Basemap = (typeof GMapsBasemap)[keyof typeof GMapsBasemap] | (typeof
|
|
|
67
73
|
export type CommonProps = {
|
|
68
74
|
id: string;
|
|
69
75
|
basemap: Basemap;
|
|
70
|
-
|
|
71
|
-
overlayRef?: MutableRefObject<OverlayMapRef>;
|
|
72
|
-
} & DeckGLProps;
|
|
76
|
+
} & DeckGLProps & Partial<MapReferences>;
|
|
73
77
|
/**
|
|
74
78
|
* Properties for the maps.
|
|
75
79
|
*/
|