swc/crates/swc_ecma_minifier/tests/full/feedback-mapbox/785-e1932cc99ac3bb67/output.js
Donny/강동윤 0371c41b7c
fix(es/minifier): Fix mapbox (#3463)
swc_ecma_minifier:
 - `mangler`: Handle the identifiers of class expressions correctly.
2022-02-07 13:43:00 +09:00

2 lines
131 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{840:function(a,b,c){var d;!function(e,f,g,h){"use strict";var i,j=["","webkit","Moz","MS","ms","o"],k=f.createElement("div"),l=Math.round,m=Math.abs,n=Date.now;function o(a,b,c){return setTimeout(v(a,c),b)}function p(a,b,c){return!!Array.isArray(a)&&(q(a,c[b],c),!0)}function q(a,b,c){var d;if(a)if(a.forEach)a.forEach(b,c);else if(h!==a.length)for(d=0;d<a.length;)b.call(c,a[d],d,a),d++;else for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a)}function r(a,b,c){var d="DEPRECATED METHOD: "+b+"\n"+c+" AT \n";return function(){var b=new Error("get-stack-trace"),c=b&&b.stack?b.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=e.console&&(e.console.warn||e.console.log);return f&&f.call(e.console,d,c),a.apply(this,arguments)}}i="function"!=typeof Object.assign?function(a){if(a===h||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(d!==h&&null!==d)for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}return b}:Object.assign;var s=r(function(a,b,c){for(var d=Object.keys(b),e=0;e<d.length;)(!c||c&&h===a[d[e]])&&(a[d[e]]=b[d[e]]),e++;return a},"extend","Use `assign`."),t=r(function(a,b){return s(a,b,!0)},"merge","Use `assign`.");function u(a,b,c){var d,e=b.prototype;(d=a.prototype=Object.create(e)).constructor=a,d._super=e,c&&i(d,c)}function v(a,b){return function(){return a.apply(b,arguments)}}function w(a,b){return"function"==typeof a?a.apply(b?b[0]||h:h,b):a}function x(a,b){return a===h?b:a}function y(a,b,c){q(C(b),function(b){a.addEventListener(b,c,!1)})}function z(a,b,c){q(C(b),function(b){a.removeEventListener(b,c,!1)})}function A(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function B(a,b){return a.indexOf(b)> -1}function C(a){return a.trim().split(/\s+/g)}function D(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b|| !c&&a[d]===b)return d;d++}return -1}function E(a){return Array.prototype.slice.call(a,0)}function F(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];0>D(e,g)&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function G(a,b){for(var c,d,e=b[0].toUpperCase()+b.slice(1),f=0;f<j.length;){if((d=(c=j[f])?c+e:b)in a)return d;f++}}var H=1;function I(a){var b=a.ownerDocument||a;return b.defaultView||b.parentWindow||e}var J="ontouchstart"in e,K=h!==G(e,"PointerEvent"),L=J&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),M="touch",N="mouse",O=["x","y"],P=["clientX","clientY"];function Q(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){w(a.options.enable,[a])&&c.handler(b)},this.init()}function R(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=1&b&&d-e==0;c.isFirst=!!f,c.isFinal=!!(12&b&&d-e==0),f&&(a.session={}),c.eventType=b,S(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function S(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=V(b)),e>1&&!c.firstMultiple?c.firstMultiple=V(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=W(d);b.timeStamp=n(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=$(h,i),b.distance=Z(h,i),T(c,b),b.offsetDirection=Y(b.deltaX,b.deltaY);var j=X(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=m(j.x)>m(j.y)?j.x:j.y,b.scale=g?aa(g.pointers,d):1,b.rotation=g?_(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,U(c,b);var k=a.element;A(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function T(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(1===b.eventType||4===f.eventType)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function U(a,b){var c,d,e,f,g=a.lastInterval||b,i=b.timeStamp-g.timeStamp;if(8!=b.eventType&&(i>25||h===g.velocity)){var j=b.deltaX-g.deltaX,k=b.deltaY-g.deltaY,l=X(i,j,k);d=l.x,e=l.y,c=m(l.x)>m(l.y)?l.x:l.y,f=Y(j,k),a.lastInterval=b}else c=g.velocity,d=g.velocityX,e=g.velocityY,f=g.direction;b.velocity=c,b.velocityX=d,b.velocityY=e,b.direction=f}function V(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:l(a.pointers[c].clientX),clientY:l(a.pointers[c].clientY)},c++;return{timeStamp:n(),pointers:b,center:W(b),deltaX:a.deltaX,deltaY:a.deltaY}}function W(a){var b=a.length;if(1===b)return{x:l(a[0].clientX),y:l(a[0].clientY)};for(var c=0,d=0,e=0;e<b;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:l(c/b),y:l(d/b)}}function X(a,b,c){return{x:b/a||0,y:c/a||0}}function Y(a,b){return a===b?1:m(a)>=m(b)?a<0?2:4:b<0?8:16}function Z(a,b,c){c||(c=O);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function $(a,b,c){c||(c=O);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function _(a,b){return $(b[1],b[0],P)+$(a[1],a[0],P)}function aa(a,b){return Z(b[0],b[1],P)/Z(a[0],a[1],P)}Q.prototype={handler:function(){},init:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(I(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&z(this.element,this.evEl,this.domHandler),this.evTarget&&z(this.target,this.evTarget,this.domHandler),this.evWin&&z(I(this.element),this.evWin,this.domHandler)}};var ba={mousedown:1,mousemove:2,mouseup:4};function ca(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,Q.apply(this,arguments)}u(ca,Q,{handler:function(a){var b=ba[a.type];1&b&&0===a.button&&(this.pressed=!0),2&b&&1!==a.which&&(b=4),this.pressed&&(4&b&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:N,srcEvent:a}))}});var da={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ea={2:M,3:"pen",4:N,5:"kinect"},fa="pointerdown",ga="pointermove pointerup pointercancel";function ha(){this.evEl=fa,this.evWin=ga,Q.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(fa="MSPointerDown",ga="MSPointerMove MSPointerUp MSPointerCancel"),u(ha,Q,{handler:function(a){var b=this.store,c=!1,d=da[a.type.toLowerCase().replace("ms","")],e=ea[a.pointerType]||a.pointerType,f=D(b,a.pointerId,"pointerId");1&d&&(0===a.button||e==M)?f<0&&(b.push(a),f=b.length-1):12&d&&(c=!0),!(f<0)&&(b[f]=a,this.callback(this.manager,d,{pointers:b,changedPointers:[a],pointerType:e,srcEvent:a}),c&&b.splice(f,1))}});var ia={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ja(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Q.apply(this,arguments)}function ka(a,b){var c=E(a.touches),d=E(a.changedTouches);return 12&b&&(c=F(c.concat(d),"identifier",!0)),[c,d]}u(ja,Q,{handler:function(a){var b=ia[a.type];if(1===b&&(this.started=!0),this.started){var c=ka.call(this,a,b);12&b&&c[0].length-c[1].length==0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:M,srcEvent:a})}}});var la={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ma(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},Q.apply(this,arguments)}function na(a,b){var c=E(a.touches),d=this.targetIds;if(3&b&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=E(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return A(a.target,i)}),1===b)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),12&b&&delete d[g[e].identifier],e++;if(h.length)return[F(f.concat(h),"identifier",!0),h]}function oa(){Q.apply(this,arguments);var a=v(this.handler,this);this.touch=new ma(this.manager,a),this.mouse=new ca(this.manager,a),this.primaryTouch=null,this.lastTouches=[]}function pa(a,b){1&a?(this.primaryTouch=b.changedPointers[0].identifier,qa.call(this,b)):12&a&&qa.call(this,b)}function qa(a){var b=a.changedPointers[0];if(b.identifier===this.primaryTouch){var c={x:b.clientX,y:b.clientY};this.lastTouches.push(c);var d=this.lastTouches;setTimeout(function(){var a=d.indexOf(c);a> -1&&d.splice(a,1)},2500)}}function ra(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d<this.lastTouches.length;d++){var e=this.lastTouches[d],f=Math.abs(b-e.x),g=Math.abs(c-e.y);if(f<=25&&g<=25)return!0}return!1}u(ma,Q,{handler:function(a){var b=la[a.type],c=na.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:M,srcEvent:a})}}),u(oa,Q,{handler:function(a,b,c){var d=c.pointerType==M,e=c.pointerType==N;if(!e||!c.sourceCapabilities||!c.sourceCapabilities.firesTouchEvents){if(d)pa.call(this,b,c);else if(e&&ra.call(this,c))return;this.callback(a,b,c)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var sa=G(k.style,"touchAction"),ta=sa!==h,ua="compute",va="auto",wa="manipulation",xa="none",ya="pan-x",za="pan-y",Aa=function(){if(!ta)return!1;var a={},b=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(c){a[c]=!b||e.CSS.supports("touch-action",c)}),a}();function Ba(a,b){this.manager=a,this.set(b)}function Ca(a){this.options=i({},this.defaults,a||{}),this.id=H++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Da(a){return 16&a?"cancel":8&a?"end":4&a?"move":2&a?"start":""}function Ea(a){return 16==a?"down":8==a?"up":2==a?"left":4==a?"right":""}function Fa(a,b){var c=b.manager;return c?c.get(a):a}function Ga(){Ca.apply(this,arguments)}function Ha(){Ga.apply(this,arguments),this.pX=null,this.pY=null}function Ia(){Ga.apply(this,arguments)}function Ja(){Ca.apply(this,arguments),this._timer=null,this._input=null}function Ka(){Ga.apply(this,arguments)}function La(){Ga.apply(this,arguments)}function Ma(){Ca.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Na(a,b){return(b=b||{}).recognizers=x(b.recognizers,Na.defaults.preset),new Oa(a,b)}function Oa(a,b){var c;this.options=i({},Na.defaults,b||{}),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=a,c=this,this.input=new(c.options.inputClass||(K?ha:(L?ma:(J?oa:ca))))(c,R),this.touchAction=new Ba(this,this.options.touchAction),Pa(this,!0),q(this.options.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function Pa(a,b){var c,d=a.element;!!d.style&&(q(a.options.cssProps,function(e,f){c=G(d.style,f),b?(a.oldCssProps[c]=d.style[c],d.style[c]=e):d.style[c]=a.oldCssProps[c]||""}),b||(a.oldCssProps={}))}Ba.prototype={set:function(a){a==ua&&(a=this.compute()),ta&&this.manager.element.style&&Aa[a]&&(this.manager.element.style[sa]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return q(this.manager.recognizers,function(b){w(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),(function(a){if(B(a,xa))return xa;var b=B(a,ya),c=B(a,za);return b&&c?xa:b||c?b?ya:za:B(a,wa)?wa:va})(a.join(" "))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented){b.preventDefault();return}var d=this.actions,e=B(d,xa)&&!Aa[xa],f=B(d,za)&&!Aa[za],g=B(d,ya)&&!Aa[ya];if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}if((!g||!f)&&(e||f&&6&c||g&&24&c))return this.preventSrc(b)},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}},Ca.prototype={defaults:{},set:function(a){return i(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(p(a,"recognizeWith",this))return this;var b=this.simultaneous;return b[(a=Fa(a,this)).id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return p(a,"dropRecognizeWith",this)||(a=Fa(a,this),delete this.simultaneous[a.id]),this},requireFailure:function(a){if(p(a,"requireFailure",this))return this;var b=this.requireFail;return -1===D(b,a=Fa(a,this))&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(p(a,"dropRequireFailure",this))return this;a=Fa(a,this);var b=D(this.requireFail,a);return b> -1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){var b=this,c=this.state;function d(c){b.manager.emit(c,a)}c<8&&d(b.options.event+Da(c)),d(b.options.event),a.additionalEvent&&d(a.additionalEvent),c>=8&&d(b.options.event+Da(c))},tryEmit:function(a){if(this.canEmit())return this.emit(a);this.state=32},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(33&this.requireFail[a].state))return!1;a++}return!0},recognize:function(a){var b=i({},a);if(!w(this.options.enable,[this,b])){this.reset(),this.state=32;return}56&this.state&&(this.state=1),this.state=this.process(b),30&this.state&&this.tryEmit(b)},process:function(a){},getTouchAction:function(){},reset:function(){}},u(Ga,Ca,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=6&b,e=this.attrTest(a);return d&&(8&c||!e)?16|b:d||e?4&c?8|b:2&b?4|b:2:32}}),u(Ha,Ga,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var a=this.options.direction,b=[];return 6&a&&b.push(za),24&a&&b.push(ya),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(6&b.direction?(e=0===f?1:f<0?2:4,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?1:g<0?8:16,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Ga.prototype.attrTest.call(this,a)&&(2&this.state|| !(2&this.state)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=Ea(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),u(Ia,Ga,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xa]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||2&this.state)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),u(Ja,Ca,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[va]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime>b.time;if(this._input=a,d&&c&&(!(12&a.eventType)||e)){if(1&a.eventType)this.reset(),this._timer=o(function(){this.state=8,this.tryEmit()},b.time,this);else if(4&a.eventType)return 8}else this.reset();return 32},reset:function(){clearTimeout(this._timer)},emit:function(a){8===this.state&&(a&&4&a.eventType?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=n(),this.manager.emit(this.options.event,this._input)))}}),u(Ka,Ga,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xa]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||2&this.state)}}),u(La,Ga,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ha.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return 30&c?b=a.overallVelocity:6&c?b=a.overallVelocityX:24&c&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&m(b)>this.options.velocity&&4&a.eventType},emit:function(a){var b=Ea(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),u(Ma,Ca,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[wa]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime<b.time;if(this.reset(),1&a.eventType&&0===this.count)return this.failTimeout();if(d&&e&&c){if(4!=a.eventType)return this.failTimeout();var f=!this.pTime||a.timeStamp-this.pTime<b.interval,g=!this.pCenter||Z(this.pCenter,a.center)<b.posThreshold;if(this.pTime=a.timeStamp,this.pCenter=a.center,g&&f?this.count+=1:this.count=1,this._input=a,0==this.count%b.taps)return this.hasRequireFailures()?(this._timer=o(function(){this.state=8,this.tryEmit()},b.interval,this),2):8}return 32},failTimeout:function(){return this._timer=o(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Na.VERSION="2.0.7",Na.defaults={domEvents:!1,touchAction:ua,enable:!0,inputTarget:null,inputClass:null,preset:[[Ka,{enable:!1}],[Ia,{enable:!1},["rotate"]],[La,{direction:6}],[Ha,{direction:6},["swipe"]],[Ma],[Ma,{event:"doubletap",taps:2},["tap"]],[Ja]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Oa.prototype={set:function(a){return i(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?2:1},recognize:function(a){var b,c=this.session;if(!c.stopped){this.touchAction.preventDefaults(a);var d=this.recognizers,e=c.curRecognizer;(!e||e&&8&e.state)&&(e=c.curRecognizer=null);for(var f=0;f<d.length;)b=d[f],2!==c.stopped&&(!e||b==e||b.canRecognizeWith(e))?b.recognize(a):b.reset(),!e&&14&b.state&&(e=c.curRecognizer=b),f++}},get:function(a){if(a instanceof Ca)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(p(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(p(a,"remove",this))return this;if(a=this.get(a)){var b=this.recognizers,c=D(b,a);-1!==c&&(b.splice(c,1),this.touchAction.update())}return this},on:function(a,b){if(a!==h&&b!==h){var c=this.handlers;return q(C(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this}},off:function(a,b){if(a!==h){var c=this.handlers;return q(C(a),function(a){b?c[a]&&c[a].splice(D(c[a],b),1):delete c[a]}),this}},emit:function(a,b){this.options.domEvents&&(c=a,d=b,(e=f.createEvent("Event")).initEvent(c,!0,!0),e.gesture=d,d.target.dispatchEvent(e));var c,d,e,g=this.handlers[a]&&this.handlers[a].slice();if(g&&g.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var h=0;h<g.length;)g[h](b),h++}},destroy:function(){this.element&&Pa(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},i(Na,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Oa,Input:Q,TouchAction:Ba,TouchInput:ma,MouseInput:ca,PointerEventInput:ha,TouchMouseInput:oa,SingleTouchInput:ja,Recognizer:Ca,AttrRecognizer:Ga,Tap:Ma,Pan:Ha,Swipe:La,Pinch:Ia,Rotate:Ka,Press:Ja,on:y,off:z,each:q,merge:t,extend:s,assign:i,inherit:u,bindFn:v,prefixed:G}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=Na,h!==(d=(function(){return Na}).call(b,c,b,a))&&(a.exports=d)}(window,document,"Hammer")},3454:function(a,b,c){"use strict";var d,e;a.exports=(null===(d=c.g.process)|| void 0===d?void 0:d.env)&&"object"==typeof(null===(e=c.g.process)|| void 0===e?void 0:e.env)?c.g.process:c(7663)},7663:function(a){!function(){var b={162:function(a){var b,c,d,e=a.exports={};function f(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}function h(a){if(b===setTimeout)return setTimeout(a,0);if((b===f||!b)&&setTimeout)return b=setTimeout,setTimeout(a,0);try{return b(a,0)}catch(c){try{return b.call(null,a,0)}catch(d){return b.call(this,a,0)}}}!function(){try{b="function"==typeof setTimeout?setTimeout:f}catch(a){b=f}try{c="function"==typeof clearTimeout?clearTimeout:g}catch(d){c=g}}();var i=[],j=!1,k=-1;function l(){j&&d&&(j=!1,d.length?i=d.concat(i):k=-1,i.length&&m())}function m(){if(!j){var a=h(l);j=!0;for(var b=i.length;b;){for(d=i,i=[];++k<b;)d&&d[k].run();k=-1,b=i.length}d=null,j=!1,(function(a){if(c===clearTimeout)return clearTimeout(a);if((c===g||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(a);try{c(a)}catch(b){try{return c.call(null,a)}catch(d){return c.call(this,a)}}})(a)}}function n(a,b){this.fun=a,this.array=b}function o(){}e.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];i.push(new n(a,b)),1!==i.length||j||h(m)},n.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=o,e.addListener=o,e.once=o,e.off=o,e.removeListener=o,e.removeAllListeners=o,e.emit=o,e.prependListener=o,e.prependOnceListener=o,e.listeners=function(a){return[]},e.binding=function(a){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(a){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}}},c={};function d(a){var e=c[a];if(void 0!==e)return e.exports;var f=c[a]={exports:{}},g=!0;try{b[a](f,f.exports,d),g=!1}finally{g&&delete c[a]}return f.exports}d.ab="//";var e=d(162);a.exports=e}()},2703:function(a,b,c){"use strict";var d=c(414);function e(){}function f(){}f.resetWarningCache=e,a.exports=function(){function a(a,b,c,e,f,g){if(g!==d){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function b(){return a}a.isRequired=a;var c={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:b,element:a,elementType:a,instanceOf:b,node:a,objectOf:b,oneOf:b,oneOfType:b,shape:b,exact:b,checkPropTypes:f,resetWarningCache:e};return c.PropTypes=c,c}},5697:function(a,b,c){a.exports=c(2703)()},414:function(a){"use strict";a.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6785:function(a,b,c){"use strict";function d(){return(d=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a}).apply(this,arguments)}function e(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}function f(a,b){if(a){if("string"==typeof a)return e(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return e(a,b)}}function g(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}c.d(b,{ZP:function(){return Yg}});var h,i=c(7294),j=c(5697);function k(a,b){return(function(a){if(Array.isArray(a))return a})(a)||(function(a,b){var c,d,e=null==a?null:"undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(null!=e){var f=[],g=!0,h=!1;try{for(e=e.call(a);!(g=(c=e.next()).done)&&(f.push(c.value),!b||f.length!==b);g=!0);}catch(i){h=!0,d=i}finally{try{g||null==e.return||e.return()}finally{if(h)throw d}}return f}})(a,b)||f(a,b)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}var l,m="undefined"!=typeof Float32Array?Float32Array:Array;function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(a,b){var c,d,e,f,g,h,i,j,k,l;const m=(c=[],d=b,e=a,f=d[0],g=d[1],h=d[2],i=d[3],c[0]=e[0]*f+e[4]*g+e[8]*h+e[12]*i,c[1]=e[1]*f+e[5]*g+e[9]*h+e[13]*i,c[2]=e[2]*f+e[6]*g+e[10]*h+e[14]*i,c[3]=e[3]*f+e[7]*g+e[11]*h+e[15]*i,c);return j=m,k=m,l=1/m[3],j[0]=k[0]*l,j[1]=k[1]*l,j[2]=k[2]*l,j[3]=k[3]*l,m}function p(a,b){const c=a%b;return c<0?b+c:c}function q(a,b,c){return c*b+(1-c)*a}function r(a,b,c){return a<b?b:a>c?c:a}Math.PI,Math.hypot||(Math.hypot=function(){for(var a=0,b=arguments.length;b--;)a+=arguments[b]*arguments[b];return Math.sqrt(a)}),l=new m(4),m!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0,l[3]=0);const s=Math.log2||function(a){return Math.log(a)*Math.LOG2E};function t(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7],l=b[8],m=b[9],n=b[10],o=b[11],p=b[12],q=b[13],r=b[14],s=b[15],t=c[0],u=c[1],v=c[2],w=c[3];return a[0]=t*d+u*h+v*l+w*p,a[1]=t*e+u*i+v*m+w*q,a[2]=t*f+u*j+v*n+w*r,a[3]=t*g+u*k+v*o+w*s,t=c[4],u=c[5],v=c[6],w=c[7],a[4]=t*d+u*h+v*l+w*p,a[5]=t*e+u*i+v*m+w*q,a[6]=t*f+u*j+v*n+w*r,a[7]=t*g+u*k+v*o+w*s,t=c[8],u=c[9],v=c[10],w=c[11],a[8]=t*d+u*h+v*l+w*p,a[9]=t*e+u*i+v*m+w*q,a[10]=t*f+u*j+v*n+w*r,a[11]=t*g+u*k+v*o+w*s,t=c[12],u=c[13],v=c[14],w=c[15],a[12]=t*d+u*h+v*l+w*p,a[13]=t*e+u*i+v*m+w*q,a[14]=t*f+u*j+v*n+w*r,a[15]=t*g+u*k+v*o+w*s,a}function u(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p=c[0],q=c[1],r=c[2];return b===a?(a[12]=b[0]*p+b[4]*q+b[8]*r+b[12],a[13]=b[1]*p+b[5]*q+b[9]*r+b[13],a[14]=b[2]*p+b[6]*q+b[10]*r+b[14],a[15]=b[3]*p+b[7]*q+b[11]*r+b[15]):(d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],i=b[5],j=b[6],k=b[7],l=b[8],m=b[9],n=b[10],o=b[11],a[0]=d,a[1]=e,a[2]=f,a[3]=g,a[4]=h,a[5]=i,a[6]=j,a[7]=k,a[8]=l,a[9]=m,a[10]=n,a[11]=o,a[12]=d*p+h*q+l*r+b[12],a[13]=e*p+i*q+m*r+b[13],a[14]=f*p+j*q+n*r+b[14],a[15]=g*p+k*q+o*r+b[15]),a}function v(a,b,c){var d=c[0],e=c[1],f=c[2];return a[0]=b[0]*d,a[1]=b[1]*d,a[2]=b[2]*d,a[3]=b[3]*d,a[4]=b[4]*e,a[5]=b[5]*e,a[6]=b[6]*e,a[7]=b[7]*e,a[8]=b[8]*f,a[9]=b[9]*f,a[10]=b[10]*f,a[11]=b[11]*f,a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15],a}function w(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],i=a[6],j=a[7],k=a[8],l=a[9],m=a[10],n=a[11],o=a[12],p=a[13],q=a[14],r=a[15],s=b[0],t=b[1],u=b[2],v=b[3],w=b[4],x=b[5],y=b[6],z=b[7],A=b[8],B=b[9],C=b[10],D=b[11],E=b[12],F=b[13],G=b[14],H=b[15];return Math.abs(c-s)<=1e-6*Math.max(1,Math.abs(c),Math.abs(s))&&Math.abs(d-t)<=1e-6*Math.max(1,Math.abs(d),Math.abs(t))&&Math.abs(e-u)<=1e-6*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(f-v)<=1e-6*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(g-w)<=1e-6*Math.max(1,Math.abs(g),Math.abs(w))&&Math.abs(h-x)<=1e-6*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(i-y)<=1e-6*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(j-z)<=1e-6*Math.max(1,Math.abs(j),Math.abs(z))&&Math.abs(k-A)<=1e-6*Math.max(1,Math.abs(k),Math.abs(A))&&Math.abs(l-B)<=1e-6*Math.max(1,Math.abs(l),Math.abs(B))&&Math.abs(m-C)<=1e-6*Math.max(1,Math.abs(m),Math.abs(C))&&Math.abs(n-D)<=1e-6*Math.max(1,Math.abs(n),Math.abs(D))&&Math.abs(o-E)<=1e-6*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(p-F)<=1e-6*Math.max(1,Math.abs(p),Math.abs(F))&&Math.abs(q-G)<=1e-6*Math.max(1,Math.abs(q),Math.abs(G))&&Math.abs(r-H)<=1e-6*Math.max(1,Math.abs(r),Math.abs(H))}function x(a,b,c){return a[0]=b[0]+c[0],a[1]=b[1]+c[1],a}function y(a,b,c,d){var e=b[0],f=b[1];return a[0]=e+d*(c[0]-e),a[1]=f+d*(c[1]-f),a}function z(a,b){if(!a)throw new Error(b||"@math.gl/web-mercator: assertion failed.")}mc=new m(2),m!=Float32Array&&(mc[0]=0,mc[1]=0),nc=new m(3),m!=Float32Array&&(nc[0]=0,nc[1]=0,nc[2]=0);const A=Math.PI,B=A/4,C=A/180,D=180/A;function E(a){return Math.pow(2,a)}function F([a,b]){return z(Number.isFinite(a)),z(Number.isFinite(b)&&b>= -90&&b<=90,"invalid latitude"),[512*(a*C+A)/(2*A),512*(A+Math.log(Math.tan(B+.5*(b*C))))/(2*A)]}function G([a,b]){return[(a/512*(2*A)-A)*D,2*(Math.atan(Math.exp(b/512*(2*A)-A))-B)*D]}function H(a){return 2*Math.atan(.5/a)*D}function I(a){return .5/Math.tan(.5*a*C)}function J(a,b,c=0){const[d,e,f]=a;if(z(Number.isFinite(d)&&Number.isFinite(e),"invalid pixel coordinate"),Number.isFinite(f)){const g=o(b,[d,e,f,1]);return g}const h=o(b,[d,e,0,1]),i=o(b,[d,e,1,1]),j=h[2],k=i[2];return y([],h,i,j===k?0:((c||0)-j)/(k-j))}const K=Math.PI/180;function L(a,b,c){const{pixelUnprojectionMatrix:d}=a,e=o(d,[b,0,1,1]),f=o(d,[b,a.height,1,1]),g=c*a.distanceScales.unitsPerMeter[2],h=(g-e[2])/(f[2]-e[2]),i=y([],e,f,h),j=G(i);return j[2]=c,j}class M{constructor({width:N,height:O,latitude:P=0,longitude:Q=0,zoom:R=0,pitch:S=0,bearing:T=0,altitude:U=null,fovy:V=null,position:W=null,nearZMultiplier:X=.02,farZMultiplier:Y=1.01}={width:1,height:1}){N=N||1,O=O||1,null===V&&null===U?V=H(U=1.5):null===V?V=H(U):null===U&&(U=I(V));const Z=E(R);U=Math.max(.75,U);const $=function({latitude:a,longitude:b,highPrecision:c=!1}){z(Number.isFinite(a)&&Number.isFinite(b));const d={},e=Math.cos(a*C),f=1.4222222222222223/e,g=12790407194604047e-21/e;if(d.unitsPerMeter=[g,g,g],d.metersPerUnit=[1/g,1/g,1/g],d.unitsPerDegree=[1.4222222222222223,f,g],d.degreesPerUnit=[.703125,1/f,1/g],c){const h=C*Math.tan(a*C)/e,i=1.4222222222222223*h/2,j=12790407194604047e-21*h,k=j/f*g;d.unitsPerDegree2=[0,i,j],d.unitsPerMeter2=[k,0,k]}return d}({longitude:Q,latitude:P}),_=F([Q,P]);if(_[2]=0,W){var aa,ba,ca,da,ea,fa;da=_,ea=_,aa=[],ba=W,ca=$.unitsPerMeter,aa[0]=ba[0]*ca[0],aa[1]=ba[1]*ca[1],aa[2]=ba[2]*ca[2],fa=aa,da[0]=ea[0]+fa[0],da[1]=ea[1]+fa[1],da[2]=ea[2]+fa[2]}this.projectionMatrix=(function({width:a,height:b,pitch:c,altitude:d,fovy:e,nearZMultiplier:f,farZMultiplier:g}){var h,i,j,k,l,m,n;const{fov:o,aspect:p,near:q,far:r}=function({width:a,height:b,fovy:c=H(1.5),altitude:d,pitch:e=0,nearZMultiplier:f=1,farZMultiplier:g=1}){void 0!==d&&(c=H(d));const h=.5*c*C,i=I(c),j=e*C;return{fov:2*h,aspect:a/b,focalDistance:i,near:f,far:(Math.sin(j)*(Math.sin(h)*i/Math.sin(Math.min(Math.max(Math.PI/2-j-h,.01),Math.PI-.01)))+i)*g}}({width:a,height:b,altitude:d,fovy:e,pitch:c,nearZMultiplier:f,farZMultiplier:g}),s=(h=[],i=o,j=p,k=q,l=r,n=1/Math.tan(i/2),h[0]=n/j,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=n,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[11]=-1,h[12]=0,h[13]=0,h[15]=0,null!=l&&l!==1/0?(m=1/(k-l),h[10]=(l+k)*m,h[14]=2*l*k*m):(h[10]=-1,h[14]=-2*k),h);return s})({width:N,height:O,pitch:S,fovy:V,nearZMultiplier:X,farZMultiplier:Y}),this.viewMatrix=(function({height:a,pitch:b,bearing:c,altitude:d,scale:e,center:f=null}){var g,h,i,j,k,l,m,o,p,q,r,s,t,w,x,y,z,A,B,D,E,F,G,H,I,J,K,L;const M=n();return u(M,M,[0,0,-d]),g=M,h=M,i=-b*C,j=Math.sin(i),k=Math.cos(i),l=h[4],m=h[5],o=h[6],p=h[7],q=h[8],r=h[9],s=h[10],t=h[11],h!==g&&(g[0]=h[0],g[1]=h[1],g[2]=h[2],g[3]=h[3],g[12]=h[12],g[13]=h[13],g[14]=h[14],g[15]=h[15]),g[4]=l*k+q*j,g[5]=m*k+r*j,g[6]=o*k+s*j,g[7]=p*k+t*j,g[8]=q*k-l*j,g[9]=r*k-m*j,g[10]=s*k-o*j,g[11]=t*k-p*j,w=M,x=M,y=c*C,z=Math.sin(y),A=Math.cos(y),B=x[0],D=x[1],E=x[2],F=x[3],G=x[4],H=x[5],I=x[6],J=x[7],x!==w&&(w[8]=x[8],w[9]=x[9],w[10]=x[10],w[11]=x[11],w[12]=x[12],w[13]=x[13],w[14]=x[14],w[15]=x[15]),w[0]=B*A+G*z,w[1]=D*A+H*z,w[2]=E*A+I*z,w[3]=F*A+J*z,w[4]=G*A-B*z,w[5]=H*A-D*z,w[6]=I*A-E*z,w[7]=J*A-F*z,v(M,M,[e/=a,e,e]),f&&u(M,M,(K=[],L=f,K[0]=-L[0],K[1]=-L[1],K[2]=-L[2],K)),M})({height:O,scale:Z,center:_,pitch:S,bearing:T,altitude:U}),this.width=N,this.height=O,this.scale=Z,this.latitude=P,this.longitude=Q,this.zoom=R,this.pitch=S,this.bearing=T,this.altitude=U,this.fovy=V,this.center=_,this.meterOffset=W||[0,0,0],this.distanceScales=$,this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}_initMatrices(){var ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka;const{width:La,height:Ma,projectionMatrix:Na,viewMatrix:Oa}=this,Pa=n();t(Pa,Pa,Na),t(Pa,Pa,Oa),this.viewProjectionMatrix=Pa;const Qa=n();v(Qa,Qa,[La/2,-Ma/2,1]),u(Qa,Qa,[1,-1,0]),t(Qa,Qa,Pa);const Ra=(ga=n(),ia=(ha=Qa)[0],ja=ha[1],ka=ha[2],la=ha[3],ma=ha[4],na=ha[5],oa=ha[6],pa=ha[7],qa=ha[8],ra=ha[9],sa=ha[10],ta=ha[11],ua=ha[12],va=ha[13],wa=ha[14],xa=ha[15],ya=ia*na-ja*ma,za=ia*oa-ka*ma,Aa=ia*pa-la*ma,Ba=ja*oa-ka*na,Ca=ja*pa-la*na,Da=ka*pa-la*oa,Ea=qa*va-ra*ua,Fa=qa*wa-sa*ua,Ga=qa*xa-ta*ua,Ha=ra*wa-sa*va,Ia=ra*xa-ta*va,Ja=sa*xa-ta*wa,Ka=ya*Ja-za*Ia+Aa*Ha+Ba*Ga-Ca*Fa+Da*Ea,Ka?(Ka=1/Ka,ga[0]=(na*Ja-oa*Ia+pa*Ha)*Ka,ga[1]=(ka*Ia-ja*Ja-la*Ha)*Ka,ga[2]=(va*Da-wa*Ca+xa*Ba)*Ka,ga[3]=(sa*Ca-ra*Da-ta*Ba)*Ka,ga[4]=(oa*Ga-ma*Ja-pa*Fa)*Ka,ga[5]=(ia*Ja-ka*Ga+la*Fa)*Ka,ga[6]=(wa*Aa-ua*Da-xa*za)*Ka,ga[7]=(qa*Da-sa*Aa+ta*za)*Ka,ga[8]=(ma*Ia-na*Ga+pa*Ea)*Ka,ga[9]=(ja*Ga-ia*Ia-la*Ea)*Ka,ga[10]=(ua*Ca-va*Aa+xa*ya)*Ka,ga[11]=(ra*Aa-qa*Ca-ta*ya)*Ka,ga[12]=(na*Fa-ma*Ha-oa*Ea)*Ka,ga[13]=(ia*Ha-ja*Fa+ka*Ea)*Ka,ga[14]=(va*za-ua*Ba-wa*ya)*Ka,ga[15]=(qa*Ba-ra*za+sa*ya)*Ka,ga):null);if(!Ra)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=Qa,this.pixelUnprojectionMatrix=Ra}equals(Sa){return Sa instanceof M&&Sa.width===this.width&&Sa.height===this.height&&w(Sa.projectionMatrix,this.projectionMatrix)&&w(Sa.viewMatrix,this.viewMatrix)}project(Ta,{topLeft:Ua=!0}={}){const Va=this.projectPosition(Ta),Wa=function(a,b){const[c,d,e=0]=a;return z(Number.isFinite(c)&&Number.isFinite(d)&&Number.isFinite(e)),o(b,[c,d,e,1])}(Va,this.pixelProjectionMatrix),[Xa,Ya]=Wa,Za=Ua?Ya:this.height-Ya;return 2===Ta.length?[Xa,Za]:[Xa,Za,Wa[2]]}unproject($a,{topLeft:_a=!0,targetZ:ab}={}){const[bb,cb,db]=$a,eb=_a?cb:this.height-cb,fb=ab&&ab*this.distanceScales.unitsPerMeter[2],gb=J([bb,eb,db],this.pixelUnprojectionMatrix,fb),[hb,ib,jb]=this.unprojectPosition(gb);return Number.isFinite(db)?[hb,ib,jb]:Number.isFinite(ab)?[hb,ib,ab]:[hb,ib]}projectPosition(kb){const[lb,mb]=F(kb),nb=(kb[2]||0)*this.distanceScales.unitsPerMeter[2];return[lb,mb,nb]}unprojectPosition(ob){const[pb,qb]=G(ob),rb=(ob[2]||0)*this.distanceScales.metersPerUnit[2];return[pb,qb,rb]}projectFlat(sb){return F(sb)}unprojectFlat(tb){return G(tb)}getMapCenterByLngLatPosition({lngLat:ub,pos:vb}){var wb,xb;const yb=J(vb,this.pixelUnprojectionMatrix),zb=F(ub),Ab=x([],zb,(wb=[],xb=yb,wb[0]=-xb[0],wb[1]=-xb[1],wb)),Bb=x([],this.center,Ab);return G(Bb)}getLocationAtPoint({lngLat:Cb,pos:Db}){return this.getMapCenterByLngLatPosition({lngLat:Cb,pos:Db})}fitBounds(Eb,Fb={}){const{width:Gb,height:Hb}=this,{longitude:Ib,latitude:Jb,zoom:Kb}=function({width:a,height:b,bounds:c,minExtent:d=0,maxZoom:e=24,padding:f=0,offset:g=[0,0]}){const[[h,i],[j,k]]=c;if(Number.isFinite(f)){const l=f;f={top:l,bottom:l,left:l,right:l}}else z(Number.isFinite(f.top)&&Number.isFinite(f.bottom)&&Number.isFinite(f.left)&&Number.isFinite(f.right));const m=F([h,r(k,-85.051129,85.051129)]),n=F([j,r(i,-85.051129,85.051129)]),o=[Math.max(Math.abs(n[0]-m[0]),d),Math.max(Math.abs(n[1]-m[1]),d)],p=[a-f.left-f.right-2*Math.abs(g[0]),b-f.top-f.bottom-2*Math.abs(g[1])];z(p[0]>0&&p[1]>0);const q=p[0]/o[0],t=p[1]/o[1],u=(f.right-f.left)/2/q,v=(f.bottom-f.top)/2/t,w=[(n[0]+m[0])/2+u,(n[1]+m[1])/2+v],x=G(w),y=Math.min(e,s(Math.abs(Math.min(q,t))));return z(Number.isFinite(y)),{longitude:x[0],latitude:x[1],zoom:y}}(Object.assign({width:Gb,height:Hb,bounds:Eb},Fb));return new M({width:Gb,height:Hb,longitude:Ib,latitude:Jb,zoom:Kb})}getBounds(Lb){const Mb=this.getBoundingRegion(Lb),Nb=Math.min(...Mb.map(a=>a[0])),Ob=Math.max(...Mb.map(a=>a[0])),Pb=Math.min(...Mb.map(a=>a[1])),Qb=Math.max(...Mb.map(a=>a[1]));return[[Nb,Pb],[Ob,Qb]]}getBoundingRegion(Rb={}){return(function(a,b=0){const{width:c,height:d,unproject:e}=a,f={targetZ:b},g=e([0,d],f),h=e([c,d],f);let i,j;const k=a.fovy?.5*a.fovy*K:Math.atan(.5/a.altitude),l=(90-a.pitch)*K;return k>l-.01?(i=L(a,0,b),j=L(a,c,b)):(i=e([0,0],f),j=e([c,0],f)),[g,h,j,i]})(this,Rb.z||0)}}const Sb=["longitude","latitude","zoom"],Tb={curve:1.414,speed:1.2};function Ub(a,b,c){var d,e,f,g,h,i;c=Object.assign({},Tb,c);const j=c.curve,k=a.zoom,l=[a.longitude,a.latitude],m=E(k),n=b.zoom,o=[b.longitude,b.latitude],p=E(n-k),q=F(l),r=F(o),s=(d=[],e=r,f=q,d[0]=e[0]-f[0],d[1]=e[1]-f[1],d),t=Math.max(a.width,a.height),u=t/p,v=(h=(g=s)[0],i=g[1],Math.hypot(h,i)*m),w=Math.max(v,.01),x=j*j,y=(u*u-t*t+x*x*w*w)/(2*t*x*w),z=(u*u-t*t-x*x*w*w)/(2*u*x*w),A=Math.log(Math.sqrt(y*y+1)-y),B=Math.log(Math.sqrt(z*z+1)-z);return{startZoom:k,startCenterXY:q,uDelta:s,w0:t,u1:v,S:(B-A)/j,rho:j,rho2:x,r0:A,r1:B}}var Vb=function(){if("undefined"!=typeof Map)return Map;function a(a,b){var c=-1;return a.some(function(a,d){return a[0]===b&&(c=d,!0)}),c}return(function(){function b(){this.__entries__=[]}return Object.defineProperty(b.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),b.prototype.get=function(b){var c=a(this.__entries__,b),d=this.__entries__[c];return d&&d[1]},b.prototype.set=function(b,c){var d=a(this.__entries__,b);~d?this.__entries__[d][1]=c:this.__entries__.push([b,c])},b.prototype.delete=function(b){var c=this.__entries__,d=a(c,b);~d&&c.splice(d,1)},b.prototype.has=function(b){return!!~a(this.__entries__,b)},b.prototype.clear=function(){this.__entries__.splice(0)},b.prototype.forEach=function(a,b){void 0===b&&(b=null);for(var c=0,d=this.__entries__;c<d.length;c++){var e=d[c];a.call(b,e[1],e[0])}},b})()}(),Wb="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Xb=void 0!==c.g&&c.g.Math===Math?c.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Yb="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Xb):function(a){return setTimeout(function(){return a(Date.now())},1e3/60)},Zb=["top","right","bottom","left","width","height","size","weight"],$b="undefined"!=typeof MutationObserver,_b=function(){function a(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(function(a,b){var c=!1,d=!1,e=0;function f(){c&&(c=!1,a()),d&&h()}function g(){Yb(f)}function h(){var a=Date.now();if(c){if(a-e<2)return;d=!0}else c=!0,d=!1,setTimeout(g,20);e=a}return h})(this.refresh.bind(this),20)}return a.prototype.addObserver=function(a){~this.observers_.indexOf(a)||this.observers_.push(a),this.connected_||this.connect_()},a.prototype.removeObserver=function(a){var b=this.observers_,c=b.indexOf(a);~c&&b.splice(c,1),!b.length&&this.connected_&&this.disconnect_()},a.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},a.prototype.updateObservers_=function(){var a=this.observers_.filter(function(a){return a.gatherActive(),a.hasActive()});return a.forEach(function(a){return a.broadcastActive()}),a.length>0},a.prototype.connect_=function(){!Wb||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$b?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},a.prototype.disconnect_=function(){Wb&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},a.prototype.onTransitionEnd_=function(a){var b=a.propertyName,c=void 0===b?"":b;Zb.some(function(a){return!!~c.indexOf(a)})&&this.refresh()},a.getInstance=function(){return this.instance_||(this.instance_=new a()),this.instance_},a.instance_=null,a}(),ac=function(a,b){for(var c=0,d=Object.keys(b);c<d.length;c++){var e=d[c];Object.defineProperty(a,e,{value:b[e],enumerable:!1,writable:!1,configurable:!0})}return a},bc=function(a){return a&&a.ownerDocument&&a.ownerDocument.defaultView||Xb},cc=gc(0,0,0,0);function dc(a){return parseFloat(a)||0}function ec(a){for(var b=[],c=1;c<arguments.length;c++)b[c-1]=arguments[c];return b.reduce(function(b,c){return b+dc(a["border-"+c+"-width"])},0)}var fc="undefined"!=typeof SVGGraphicsElement?function(a){return a instanceof bc(a).SVGGraphicsElement}:function(a){return a instanceof bc(a).SVGElement&&"function"==typeof a.getBBox};function gc(a,b,c,d){return{x:a,y:b,width:c,height:d}}var hc=function(){function a(a){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=gc(0,0,0,0),this.target=a}return a.prototype.isActive=function(){var a=function(a){if(!Wb)return cc;if(fc(a)){var b;return gc(0,0,(b=a.getBBox()).width,b.height)}return(function(a){var b=a.clientWidth,c=a.clientHeight;if(!b&&!c)return cc;var d,e=bc(a).getComputedStyle(a),f=function a(b){for(var c={},d=0,e=["top","right","bottom","left"];d<e.length;d++){var f=e[d],g=b["padding-"+f];c[f]=dc(g)}return c}(e),g=f.left+f.right,h=f.top+f.bottom,i=dc(e.width),j=dc(e.height);if("border-box"===e.boxSizing&&(Math.round(i+g)!==b&&(i-=ec(e,"left","right")+g),Math.round(j+h)!==c&&(j-=ec(e,"top","bottom")+h)),(d=a)!==bc(d).document.documentElement){var k=Math.round(i+g)-b,l=Math.round(j+h)-c;1!==Math.abs(k)&&(i-=k),1!==Math.abs(l)&&(j-=l)}return gc(f.left,f.top,i,j)})(a)}(this.target);return this.contentRect_=a,a.width!==this.broadcastWidth||a.height!==this.broadcastHeight},a.prototype.broadcastRect=function(){var a=this.contentRect_;return this.broadcastWidth=a.width,this.broadcastHeight=a.height,a},a}(),ic=function(a,b){var c,d,e,f,g,h,i=(d=(c=b).x,e=c.y,f=c.width,g=c.height,h=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),ac(h,{x:d,y:e,width:f,height:g,top:e,right:d+f,bottom:g+e,left:d}),h);ac(this,{target:a,contentRect:i})},jc=function(){function a(a,b,c){if(this.activeObservations_=[],this.observations_=new Vb(),"function"!=typeof a)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=a,this.controller_=b,this.callbackCtx_=c}return a.prototype.observe=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(a instanceof bc(a).Element))throw new TypeError("parameter 1 is not of type \"Element\".");var b=this.observations_;b.has(a)||(b.set(a,new hc(a)),this.controller_.addObserver(this),this.controller_.refresh())}},a.prototype.unobserve=function(a){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(a instanceof bc(a).Element))throw new TypeError("parameter 1 is not of type \"Element\".");var b=this.observations_;!!b.has(a)&&(b.delete(a),b.size||this.controller_.removeObserver(this))}},a.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},a.prototype.gatherActive=function(){var a=this;this.clearActive(),this.observations_.forEach(function(b){b.isActive()&&a.activeObservations_.push(b)})},a.prototype.broadcastActive=function(){if(this.hasActive()){var a=this.callbackCtx_,b=this.activeObservations_.map(function(a){return new ic(a.target,a.broadcastRect())});this.callback_.call(a,b,a),this.clearActive()}},a.prototype.clearActive=function(){this.activeObservations_.splice(0)},a.prototype.hasActive=function(){return this.activeObservations_.length>0},a}(),kc="undefined"!=typeof WeakMap?new WeakMap():new Vb(),lc=function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var c=_b.getInstance(),d=new jc(b,c,this);kc.set(this,d)}return a}();["observe","unobserve","disconnect"].forEach(function(a){lc.prototype[a]=function(){var b;return(b=kc.get(this))[a].apply(b,arguments)}});var mc,nc,oc=void 0!==Xb.ResizeObserver?Xb.ResizeObserver:lc;function pc(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function qc(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function rc(a,b,c){return b&&qc(a.prototype,b),c&&qc(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}"undefined"!=typeof window||c.g,void 0!==c.g&&c.g;var sc="undefined"!=typeof document?document:{};function tc(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function uc(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?tc(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):tc(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}function vc(a,b){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(e=wc(a))||b&&a&&"number"==typeof a.length){e&&(a=e);var c=0,d=function(){};return{s:d,n:function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}function wc(a,b){if(a){if("string"==typeof a)return xc(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return xc(a,b)}}function xc(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}var yc=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function zc(a){if(!a)return null;if("string"==typeof a)return a;a.toJS&&(a=a.toJS());var b,c={},d=vc(a.layers);try{for(d.s();!(b=d.n()).done;){var e=b.value;c[e.id]=e}}catch(f){d.e(f)}finally{d.f()}var g=a.layers.map(function(a){var b=c[a.ref],d=null;if("interactive"in a&&delete(d=uc({},a)).interactive,b){delete(d=d||uc({},a)).ref;var e,f=vc(yc);try{for(f.s();!(e=f.n()).done;){var g=e.value;g in b&&(d[g]=b[g])}}catch(h){f.e(h)}finally{f.f()}}return d||a});return uc(uc({},a),{},{layers:g})}var Ac=c(3454),Bc={container:j.object,gl:j.object,mapboxApiAccessToken:j.string,mapboxApiUrl:j.string,attributionControl:j.bool,preserveDrawingBuffer:j.bool,reuseMaps:j.bool,transformRequest:j.func,mapOptions:j.object,mapStyle:j.oneOfType([j.string,j.object]),preventStyleDiffing:j.bool,visible:j.bool,asyncRender:j.bool,onLoad:j.func,onError:j.func,width:j.number,height:j.number,viewState:j.object,longitude:j.number,latitude:j.number,zoom:j.number,bearing:j.number,pitch:j.number,altitude:j.number},Cc={container:sc.body,mapboxApiAccessToken:function(){var a=null;if("undefined"!=typeof window&&window.location){var b=window.location.search.match(/access_token=([^&\/]*)/);a=b&&b[1]}return a|| void 0===Ac||(a=a||Ac.env.MapboxAccessToken||Ac.env.REACT_APP_MAPBOX_ACCESS_TOKEN),a||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",preventStyleDiffing:!1,visible:!0,asyncRender:!1,onLoad:function(){},onError:function(a){a&&console.error(a.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function Dc(a){var b=arguments.length>1&& void 0!==arguments[1]?arguments[1]:"component";a.debug&&j.checkPropTypes(Bc,a,"prop",b)}var Ec=function(){function a(b){var c=this;if(pc(this,a),g(this,"props",Cc),g(this,"width",0),g(this,"height",0),g(this,"_fireLoadEvent",function(){c.props.onLoad({type:"load",target:c._map})}),g(this,"_handleError",function(a){c.props.onError(a)}),!b.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=b.mapboxgl,a.initialized||(a.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(b)}return rc(a,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(a){return this._update(this.props,a),this}},{key:"redraw",value:function(){var a=this._map;a.style&&(a._frame&&(a._frame.cancel(),a._frame=null),a._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(b){this._map=a.savedMap;var c=this._map.getContainer(),d=b.container;for(d.classList.add("mapboxgl-map");c.childNodes.length>0;)d.appendChild(c.childNodes[0]);this._map._container=d,a.savedMap=null,b.mapStyle&&this._map.setStyle(zc(b.mapStyle),{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(b){if(b.reuseMaps&&a.savedMap)this._reuse(b);else{if(b.gl){var c=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=c,b.gl}}var d={container:b.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:zc(b.mapStyle),interactive:!1,trackResize:!1,attributionControl:b.attributionControl,preserveDrawingBuffer:b.preserveDrawingBuffer};b.transformRequest&&(d.transformRequest=b.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},d,b.mapOptions)),this._map.once("load",this._fireLoadEvent),this._map.on("error",this._handleError)}return this}},{key:"_destroy",value:function(){this._map&&(this.props.reuseMaps&&!a.savedMap?(a.savedMap=this._map,this._map.off("load",this._fireLoadEvent),this._map.off("error",this._handleError),this._map.off("styledata",this._fireLoadEvent)):this._map.remove(),this._map=null)}},{key:"_initialize",value:function(a){var b=this;Dc(a=Object.assign({},Cc,a),"Mapbox"),this.mapboxgl.accessToken=a.mapboxApiAccessToken||Cc.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=a.mapboxApiUrl,this._create(a);var c=a.container;Object.defineProperty(c,"offsetWidth",{configurable:!0,get:function(){return b.width}}),Object.defineProperty(c,"clientWidth",{configurable:!0,get:function(){return b.width}}),Object.defineProperty(c,"offsetHeight",{configurable:!0,get:function(){return b.height}}),Object.defineProperty(c,"clientHeight",{configurable:!0,get:function(){return b.height}});var d=this._map.getCanvas();d&&(d.style.outline="none"),this._updateMapViewport({},a),this._updateMapSize({},a),this.props=a}},{key:"_update",value:function(a,b){if(this._map){Dc(b=Object.assign({},this.props,b),"Mapbox");var c=this._updateMapViewport(a,b),d=this._updateMapSize(a,b);this._updateMapStyle(a,b),!b.asyncRender&&(c||d)&&this.redraw(),this.props=b}}},{key:"_updateMapStyle",value:function(a,b){a.mapStyle!==b.mapStyle&&this._map.setStyle(zc(b.mapStyle),{diff:!b.preventStyleDiffing})}},{key:"_updateMapSize",value:function(a,b){var c=a.width!==b.width||a.height!==b.height;return c&&(this.width=b.width,this.height=b.height,this._map.resize()),c}},{key:"_updateMapViewport",value:function(a,b){var c=this._getViewState(a),d=this._getViewState(b),e=d.latitude!==c.latitude||d.longitude!==c.longitude||d.zoom!==c.zoom||d.pitch!==c.pitch||d.bearing!==c.bearing||d.altitude!==c.altitude;return e&&(this._map.jumpTo(this._viewStateToMapboxProps(d)),d.altitude!==c.altitude&&(this._map.transform.altitude=d.altitude)),e}},{key:"_getViewState",value:function(a){var b=a.viewState||a,c=b.longitude,d=b.latitude,e=b.zoom,f=b.pitch,g=b.bearing,h=b.altitude;return{longitude:c,latitude:d,zoom:e,pitch:void 0===f?0:f,bearing:void 0===g?0:g,altitude:void 0===h?1.5:h}}},{key:"_checkStyleSheet",value:function(){var a=arguments.length>0&& void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==sc)try{var b=sc.createElement("div");if(b.className="mapboxgl-map",b.style.display="none",sc.body.appendChild(b),!("static"!==window.getComputedStyle(b).position)){var c=sc.createElement("link");c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(a,"/mapbox-gl.css")),sc.head.appendChild(c)}}catch(d){}}},{key:"_viewStateToMapboxProps",value:function(a){return{center:[a.longitude,a.latitude],zoom:a.zoom,bearing:a.bearing,pitch:a.pitch}}}]),a}();g(Ec,"initialized",!1),g(Ec,"propTypes",Bc),g(Ec,"defaultProps",Cc),g(Ec,"savedMap",null);var Fc=c(6158),Gc=c.n(Fc);function Hc(a){return Array.isArray(a)||ArrayBuffer.isView(a)}function Ic(a,b){if(a===b)return!0;if(Hc(a)&&Hc(b)){if(a.length!==b.length)return!1;for(var c=0;c<a.length;++c)if(!Ic(a[c],b[c]))return!1;return!0}return 1e-7>=Math.abs(a-b)}function Jc(a,b,c){return Math.max(b,Math.min(c,a))}function Kc(a,b,c){return Hc(a)?a.map(function(a,d){return Kc(a,b[d],c)}):c*b+(1-c)*a}function Lc(a,b){if(!a)throw new Error(b||"react-map-gl: assertion failed.")}function Mc(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Nc(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Mc(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Mc(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}var Oc={minZoom:0,maxZoom:24,minPitch:0,maxPitch:85},Pc={pitch:0,bearing:0,altitude:1.5},Qc=function(){function a(b){var c=b.width,d=b.height,e=b.latitude,f=b.longitude,g=b.zoom,h=b.bearing,i=void 0===h?Pc.bearing:h,j=b.pitch,k=void 0===j?Pc.pitch:j,l=b.altitude,m=void 0===l?Pc.altitude:l,n=b.maxZoom,o=void 0===n?Oc.maxZoom:n,p=b.minZoom,q=void 0===p?Oc.minZoom:p,r=b.maxPitch,s=void 0===r?Oc.maxPitch:r,t=b.minPitch,u=void 0===t?Oc.minPitch:t,v=b.transitionDuration,w=b.transitionEasing,x=b.transitionInterpolator,y=b.transitionInterruption,z=b.startPanLngLat,A=b.startZoomLngLat,B=b.startRotatePos,C=b.startBearing,D=b.startPitch,E=b.startZoom;pc(this,a),Lc(Number.isFinite(c),"`width` must be supplied"),Lc(Number.isFinite(d),"`height` must be supplied"),Lc(Number.isFinite(f),"`longitude` must be supplied"),Lc(Number.isFinite(e),"`latitude` must be supplied"),Lc(Number.isFinite(g),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:c,height:d,latitude:e,longitude:f,zoom:g,bearing:i,pitch:k,altitude:m,maxZoom:o,minZoom:q,maxPitch:s,minPitch:u,transitionDuration:v,transitionEasing:w,transitionInterpolator:x,transitionInterruption:y}),this._state={startPanLngLat:z,startZoomLngLat:A,startRotatePos:B,startBearing:C,startPitch:D,startZoom:E}}return rc(a,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"panStart",value:function(a){var b=a.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(b)})}},{key:"pan",value:function(a){var b=a.pos,c=a.startPos,d=this._state.startPanLngLat||this._unproject(c);if(!d)return this;var e=k(this._calculateNewLngLat({startPanLngLat:d,pos:b}),2),f=e[0],g=e[1];return this._getUpdatedMapState({longitude:f,latitude:g})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(a){var b=a.pos;return this._getUpdatedMapState({startRotatePos:b,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(a){var b,c=a.pos,d=a.deltaAngleX,e=a.deltaAngleY,f=this._state,g=f.startRotatePos,h=f.startBearing,i=f.startPitch;return Number.isFinite(h)&&Number.isFinite(i)?(b=c?this._calculateNewPitchAndBearing(Nc(Nc({},this._getRotationParams(c,g)),{},{startBearing:h,startPitch:i})):{bearing:h+(void 0===d?0:d),pitch:i+(void 0===e?0:e)},this._getUpdatedMapState(b)):this}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(a){var b=a.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(b),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(a){var b=a.pos,c=a.startPos,d=a.scale;Lc(d>0,"`scale` must be a positive number");var e=this._state,f=e.startZoom,g=e.startZoomLngLat;Number.isFinite(f)||(f=this._viewportProps.zoom,g=this._unproject(c)||this._unproject(b)),Lc(g,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var h=this._calculateNewZoom({scale:d,startZoom:f||0}),i=new M(Object.assign({},this._viewportProps,{zoom:h})),j=i.getMapCenterByLngLatPosition({lngLat:g,pos:b}),l=k(j,2),m=l[0],n=l[1];return this._getUpdatedMapState({zoom:h,longitude:m,latitude:n})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(b){return new a(Object.assign({},this._viewportProps,this._state,b))}},{key:"_applyConstraints",value:function(a){var b=a.maxZoom,c=a.minZoom,d=a.zoom;a.zoom=Jc(d,c,b);var e=a.maxPitch,f=a.minPitch,g=a.pitch;return a.pitch=Jc(g,f,e),Object.assign(a,function({width:a,height:b,longitude:c,latitude:d,zoom:e,pitch:f=0,bearing:g=0}){(c< -180||c>180)&&(c=p(c+180,360)-180),(g< -180||g>180)&&(g=p(g+180,360)-180);const h=s(b/512);if(e<=h)e=h,d=0;else{const i=b/2/Math.pow(2,e),j=G([0,i])[1];if(d<j)d=j;else{const k=G([0,512-i])[1];d>k&&(d=k)}}return{width:a,height:b,longitude:c,latitude:d,zoom:e,pitch:f,bearing:g}}(a)),a}},{key:"_unproject",value:function(a){var b=new M(this._viewportProps);return a&&b.unproject(a)}},{key:"_calculateNewLngLat",value:function(a){var b=a.startPanLngLat,c=a.pos,d=new M(this._viewportProps);return d.getMapCenterByLngLatPosition({lngLat:b,pos:c})}},{key:"_calculateNewZoom",value:function(a){var b=a.scale,c=a.startZoom,d=this._viewportProps,e=d.maxZoom,f=d.minZoom;return Jc(c+Math.log2(b),f,e)}},{key:"_calculateNewPitchAndBearing",value:function(a){var b=a.deltaScaleX,c=a.deltaScaleY,d=a.startBearing,e=a.startPitch;c=Jc(c,-1,1);var f=this._viewportProps,g=f.minPitch,h=f.maxPitch,i=e;return c>0?i=e+c*(h-e):c<0&&(i=e-c*(g-e)),{pitch:i,bearing:d+180*b}}},{key:"_getRotationParams",value:function(a,b){var c=a[0]-b[0],d=a[1]-b[1],e=a[1],f=b[1],g=this._viewportProps,h=g.width,i=g.height,j=0;return d>0?Math.abs(i-f)>5&&(j=d/(f-i)*1.2):d<0&&f>5&&(j=1-e/f),{deltaScaleX:c/h,deltaScaleY:j=Math.min(1,Math.max(-1,j))}}}]),a}();function Rc(a){return a[0].toLowerCase()+a.slice(1)}function Sc(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Tc(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Sc(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Sc(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}var Uc=(0,i.createContext)({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),Vc=Uc.Provider;Uc.Provider=function(a){var b=a.value,c=a.children,d=k((0,i.useState)(null),2),e=d[0],f=d[1],g=(0,i.useContext)(Uc);return b=Tc(Tc({setMap:f},g),{},{map:g&&g.map||e},b),i.createElement(Vc,{value:b},c)};var Wc=Uc,Xc="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function Yc(a,b){var c=b.longitude,d=b.latitude;return a&&a.queryTerrainElevation?a.queryTerrainElevation([c,d])||0:0}function Zc(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function $c(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Zc(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Zc(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}var _c="A valid API access token is required to use Mapbox data";function ad(a){var b=a.map,c=a.props,d=a.width,e=a.height,f=$c($c($c({},c),c.viewState),{},{width:d,height:e});return f.position=[0,0,Yc(b,f)],new M(f)}var bd={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},cd=Object.assign({},Ec.propTypes,{width:j.oneOfType([j.number,j.string]),height:j.oneOfType([j.number,j.string]),onResize:j.func,disableTokenWarning:j.bool,visible:j.bool,className:j.string,style:j.object,visibilityConstraints:j.object}),dd=Object.assign({},Ec.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:Oc});function ed(){return i.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},i.createElement("h3",{key:"header"},_c),i.createElement("div",{key:"text"},"For information on setting up your basemap, read"),i.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}var fd=(0,i.forwardRef)(function(a,b){var c=k((0,i.useState)(!0),2),d=c[0],e=c[1],f=k((0,i.useState)({width:0,height:0}),2),g=f[0],h=f[1],j=(0,i.useRef)(null),l=(0,i.useRef)(null),m=(0,i.useRef)(null),n=(0,i.useRef)(null),o=(0,i.useContext)(Wc);Xc(function(){if(fd.supported()){var b=new Ec($c($c($c({},a),g),{},{mapboxgl:Gc(),container:l.current,onError:function(b){401===(b.error&&b.error.status||b.status)&&d&&(console.error(_c),e(!1)),a.onError(b)}}));j.current=b,o&&o.setMap&&o.setMap(b.getMap());var c=new oc(function(b){if(b[0].contentRect){var c=b[0].contentRect,d=c.width,e=c.height;h({width:d,height:e}),a.onResize({width:d,height:e})}});return c.observe(m.current),function(){b.finalize(),j.current=null,c.disconnect()}}},[]),Xc(function(){j.current&&j.current.setProps($c($c({},a),g))});var p=j.current&&j.current.getMap();(0,i.useImperativeHandle)(b,function(){var a;return a=j,{getMap:function(){return a.current&&a.current.getMap()},queryRenderedFeatures:function(b){var c=arguments.length>1&& void 0!==arguments[1]?arguments[1]:{},d=a.current&&a.current.getMap();return d&&d.queryRenderedFeatures(b,c)}}},[]);var q=(0,i.useCallback)(function(a){var b=a.target;b===n.current&&b.scrollTo(0,0)},[]),r=p&&i.createElement(Vc,{value:$c($c({},o),{},{viewport:o.viewport||ad($c({map:p,props:a},g)),map:p,container:o.container||m.current})},i.createElement("div",{key:"map-overlays",className:"overlays",ref:n,style:bd,onScroll:q},a.children)),s=a.className,t=a.width,u=a.height,v=a.style,w=a.visibilityConstraints,x=Object.assign({position:"relative"},v,{width:t,height:u}),y=a.visible&&function(a){var b=arguments.length>1&& void 0!==arguments[1]?arguments[1]:Oc;for(var c in b){var d=c.slice(0,3),e=Rc(c.slice(3));if("min"===d&&a[e]<b[c])return!1;if("max"===d&&a[e]>b[c])return!1}return!0}(a.viewState||a,w),z=Object.assign({},bd,{visibility:y?"inherit":"hidden"});return i.createElement("div",{key:"map-container",ref:m,style:x},i.createElement("div",{key:"map-mapbox",ref:l,style:z,className:s}),r,!d&&!a.disableTokenWarning&&i.createElement(ed,null))});fd.supported=function(){return Gc()&&Gc().supported()},fd.propTypes=cd,fd.defaultProps=dd;var gd=fd;function hd(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}var id=function(){function a(){pc(this,a),g(this,"propNames",[])}return rc(a,[{key:"arePropsEqual",value:function(a,b){var c,d=function(a,b){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(e=(function(a,b){if(a){if("string"==typeof a)return hd(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return hd(a,b)}})(a))||0){e&&(a=e);var c=0,d=function(){};return{s:d,n:function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}(this.propNames||[]);try{for(d.s();!(c=d.n()).done;){var e=c.value;if(!Ic(a[e],b[e]))return!1}}catch(f){d.e(f)}finally{d.f()}return!0}},{key:"initializeProps",value:function(a,b){return{start:a,end:b}}},{key:"interpolateProps",value:function(a,b,c){Lc(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(a,b){return b.transitionDuration}}]),a}();function jd(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function kd(a,b){return(kd=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a})(a,b)}function ld(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&kd(a,b)}function md(a){return(md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function nd(a,b){if(b&&("object"===md(b)||"function"==typeof b))return b;if(void 0!==b)throw new TypeError("Derived constructors may only return object or undefined");return jd(a)}function od(a){return(od=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(a)}var pd={longitude:1,bearing:1};function qd(a){return Number.isFinite(a)||Array.isArray(a)}function rd(a,b,c){return a in pd&&Math.abs(c-b)>180&&(c=c<0?c+360:c-360),c}function sd(a,b){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(e=td(a))||b&&a&&"number"==typeof a.length){e&&(a=e);var c=0,d=function(){};return{s:d,n:function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}function td(a,b){if(a){if("string"==typeof a)return ud(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return ud(a,b)}}function ud(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}var vd=["longitude","latitude","zoom","bearing","pitch"],wd=["latitude","longitude","zoom","width","height"],xd=["bearing","pitch"],yd={speed:1.2,curve:1.414};function zd(a,b){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(e=Ad(a))||b&&a&&"number"==typeof a.length){e&&(a=e);var c=0,d=function(){};return{s:d,n:function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}},e:function(a){throw a},f:d}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var e,f,g=!0,h=!1;return{s:function(){e=a[Symbol.iterator]()},n:function(){var a=e.next();return g=a.done,a},e:function(a){h=!0,f=a},f:function(){try{g||null==e.return||e.return()}finally{if(h)throw f}}}}function Ad(a,b){if(a){if("string"==typeof a)return Bd(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c)return Array.from(a);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return Bd(a,b)}}function Bd(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=new Array(b);c<b;c++)d[c]=a[c];return d}!function(a){ld(e,a);var b,c,d=(b=e,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,d=od(b);if(c){var e=od(this).constructor;a=Reflect.construct(d,arguments,e)}else a=d.apply(this,arguments);return nd(this,a)});function e(){var a,b=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{};return pc(this,e),g(jd(a=d.call(this)),"propNames",vd),a.props=Object.assign({},yd,b),a}rc(e,[{key:"initializeProps",value:function(a,b){var c,d={},e={},f=sd(wd);try{for(f.s();!(c=f.n()).done;){var g=c.value,h=a[g],i=b[g];Lc(qd(h)&&qd(i),"".concat(g," must be supplied for transition")),d[g]=h,e[g]=rd(g,h,i)}}catch(j){f.e(j)}finally{f.f()}var k,l=sd(xd);try{for(l.s();!(k=l.n()).done;){var m=k.value,n=a[m]||0,o=b[m]||0;d[m]=n,e[m]=rd(m,n,o)}}catch(p){l.e(p)}finally{l.f()}return{start:d,end:e}}},{key:"interpolateProps",value:function(a,b,c){var d,e=function(a,b,c,d={}){var e,f,g;const h={},{startZoom:i,startCenterXY:j,uDelta:k,w0:l,u1:m,S:n,rho:o,rho2:p,r0:r}=Ub(a,b,d);if(m<.01){for(const t of Sb){const u=a[t],v=b[t];h[t]=q(u,v,c)}return h}const w=c*n,y=i+s(1/(Math.cosh(r)/Math.cosh(r+o*w))),z=(e=[],f=k,g=l*((Math.cosh(r)*Math.tanh(r+o*w)-Math.sinh(r))/p)/m,e[0]=f[0]*g,e[1]=f[1]*g,e);x(z,z,j);const A=G(z);return h.longitude=A[0],h.latitude=A[1],h.zoom=y,h}(a,b,c,this.props),f=sd(xd);try{for(f.s();!(d=f.n()).done;){var g=d.value;e[g]=Kc(a[g],b[g],c)}}catch(h){f.e(h)}finally{f.f()}return e}},{key:"getDuration",value:function(a,b){var c=b.transitionDuration;return"auto"===c&&(c=(function(a,b,c={}){c=Object.assign({},Tb,c);const{screenSpeed:d,speed:e,maxDuration:f}=c,{S:g,rho:h}=Ub(a,b,c),i=1e3*g;let j;return j=Number.isFinite(d)?i/(d/h):i/e,Number.isFinite(f)&&j>f?0:j})(a,b,this.props)),c}}])}(id);var Cd=["longitude","latitude","zoom","bearing","pitch"],Dd=function(a){ld(e,a);var b,c,d=(b=e,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,d=od(b);if(c){var e=od(this).constructor;a=Reflect.construct(d,arguments,e)}else a=d.apply(this,arguments);return nd(this,a)});function e(){var a,b=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{};return pc(this,e),a=d.call(this),Array.isArray(b)&&(b={transitionProps:b}),a.propNames=b.transitionProps||Cd,b.around&&(a.around=b.around),a}return rc(e,[{key:"initializeProps",value:function(a,b){var c={},d={};if(this.around){c.around=this.around;var e=new M(a).unproject(this.around);Object.assign(d,b,{around:new M(b).project(e),aroundLngLat:e})}var f,g=zd(this.propNames);try{for(g.s();!(f=g.n()).done;){var h=f.value,i=a[h],j=b[h];Lc(qd(i)&&qd(j),"".concat(h," must be supplied for transition")),c[h]=i,d[h]=rd(h,i,j)}}catch(k){g.e(k)}finally{g.f()}return{start:c,end:d}}},{key:"interpolateProps",value:function(a,b,c){var d,e={},f=zd(this.propNames);try{for(f.s();!(d=f.n()).done;){var g=d.value;e[g]=Kc(a[g],b[g],c)}}catch(h){f.e(h)}finally{f.f()}if(b.around){var i=k(new M(Object.assign({},b,e)).getMapCenterByLngLatPosition({lngLat:b.aroundLngLat,pos:Kc(a.around,b.around,c)}),2),j=i[0],l=i[1];e.longitude=j,e.latitude=l}return e}}]),e}(id),Ed=function(){},Fd={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},Gd={transitionDuration:0,transitionEasing:function(a){return a},transitionInterpolator:new Dd(),transitionInterruption:Fd.BREAK,onTransitionStart:Ed,onTransitionInterrupt:Ed,onTransitionEnd:Ed},Hd=function(){function a(){var b=this,c=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{};pc(this,a),g(this,"_animationFrame",null),g(this,"_onTransitionFrame",function(){b._animationFrame=requestAnimationFrame(b._onTransitionFrame),b._updateViewport()}),this.props=null,this.onViewportChange=c.onViewportChange||Ed,this.onStateChange=c.onStateChange||Ed,this.time=c.getTime||Date.now}return rc(a,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(a){var b=this.props;if(this.props=a,!b||this._shouldIgnoreViewportChange(b,a))return!1;if(this._isTransitionEnabled(a)){var c=Object.assign({},b),d=Object.assign({},a);if(this._isTransitionInProgress()&&(b.onTransitionInterrupt(),this.state.interruption===Fd.SNAP_TO_END?Object.assign(c,this.state.endProps):Object.assign(c,this.state.propsInTransition),this.state.interruption===Fd.UPDATE)){var e,f,g,h=this.time(),i=(h-this.state.startTime)/this.state.duration;d.transitionDuration=this.state.duration-(h-this.state.startTime),g=(e=this.state.easing)(f=i),d.transitionEasing=function(a){return 1/(1-g)*(e(a*(1-f)+f)-g)},d.transitionInterpolator=c.transitionInterpolator}return d.onTransitionStart(),this._triggerTransition(c,d),!0}return this._isTransitionInProgress()&&(b.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(a){var b=a.transitionDuration,c=a.transitionInterpolator;return(b>0||"auto"===b)&&Boolean(c)}},{key:"_isUpdateDueToCurrentTransition",value:function(a){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(a,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(a,b){return!a||(this._isTransitionInProgress()?this.state.interruption===Fd.IGNORE||this._isUpdateDueToCurrentTransition(b):!this._isTransitionEnabled(b)||b.transitionInterpolator.arePropsEqual(a,b))}},{key:"_triggerTransition",value:function(a,b){Lc(this._isTransitionEnabled(b)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var c=b.transitionInterpolator,d=c.getDuration?c.getDuration(a,b):b.transitionDuration;if(0!==d){var e=b.transitionInterpolator.initializeProps(a,b),f={inTransition:!0,isZooming:a.zoom!==b.zoom,isPanning:a.longitude!==b.longitude||a.latitude!==b.latitude,isRotating:a.bearing!==b.bearing||a.pitch!==b.pitch};this.state={duration:d,easing:b.transitionEasing,interpolator:b.transitionInterpolator,interruption:b.transitionInterruption,startTime:this.time(),startProps:e.start,endProps:e.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(f)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var a=this.time(),b=this.state,c=b.startTime,d=b.duration,e=b.easing,f=b.interpolator,g=b.startProps,h=b.endProps,i=!1,j=(a-c)/d;j>=1&&(j=1,i=!0),j=e(j);var k=f.interpolateProps(g,h,j),l=new Qc(Object.assign({},this.props,k));this.state.propsInTransition=l.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),i&&(this._endTransition(),this.props.onTransitionEnd())}}]),a}();g(Hd,"defaultProps",Gd);var Id=c(840),Jd=c.n(Id);const Kd={mousedown:1,mousemove:2,mouseup:4};!function(a){const b=a.prototype.handler;a.prototype.handler=function(a){const c=this.store;a.button>0&&"pointerdown"===a.type&& !function(a,b){for(let c=0;c<a.length;c++)if(b(a[c]))return!0;return!1}(c,b=>b.pointerId===a.pointerId)&&c.push(a),b.call(this,a)}}(Jd().PointerEventInput),Jd().MouseInput.prototype.handler=function(a){let b=Kd[a.type];1&b&&a.button>=0&&(this.pressed=!0),2&b&&0===a.which&&(b=4),this.pressed&&(4&b&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:"mouse",srcEvent:a}))};const Ld=Jd().Manager;var Md=Jd();const Nd=Md?[[Md.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[Md.Rotate,{enable:!1}],[Md.Pinch,{enable:!1}],[Md.Swipe,{enable:!1}],[Md.Pan,{threshold:0,enable:!1}],[Md.Press,{enable:!1}],[Md.Tap,{event:"doubletap",taps:2,enable:!1}],[Md.Tap,{event:"anytap",enable:!1}],[Md.Tap,{enable:!1}]]:null,Od={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Pd={doubletap:["tap"]},Qd={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Rd={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},Sd={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},Td={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},Ud="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Vd="undefined"!=typeof window?window:c.g;void 0!==c.g&&c.g;let Wd=!1;try{const Xd={get passive(){return Wd=!0,!0}};Vd.addEventListener("test",Xd,Xd),Vd.removeEventListener("test",Xd,Xd)}catch(Yd){}const Zd=-1!==Ud.indexOf("firefox"),{WHEEL_EVENTS:$d}=Rd,_d="wheel";class ae{constructor(be,ce,de={}){this.element=be,this.callback=ce,this.options=Object.assign({enable:!0},de),this.events=$d.concat(de.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(a=>be.addEventListener(a,this.handleEvent,!!Wd&&{passive:!1}))}destroy(){this.events.forEach(a=>this.element.removeEventListener(a,this.handleEvent))}enableEventType(ee,fe){ee===_d&&(this.options.enable=fe)}handleEvent(ge){if(!this.options.enable)return;let he=ge.deltaY;Vd.WheelEvent&&(Zd&&ge.deltaMode===Vd.WheelEvent.DOM_DELTA_PIXEL&&(he/=Vd.devicePixelRatio),ge.deltaMode===Vd.WheelEvent.DOM_DELTA_LINE&&(he*=40));const ie={x:ge.clientX,y:ge.clientY};0!==he&&he%4.000244140625==0&&(he=Math.floor(he/4.000244140625)),ge.shiftKey&&he&&(he*=.25),this._onWheel(ge,-he,ie)}_onWheel(je,ke,le){this.callback({type:_d,center:le,delta:ke,srcEvent:je,pointerType:"mouse",target:je.target})}}const{MOUSE_EVENTS:me}=Rd,ne="pointermove",oe="pointerover",pe="pointerout",qe="pointerleave";class re{constructor(se,te,ue={}){this.element=se,this.callback=te,this.pressed=!1,this.options=Object.assign({enable:!0},ue),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=me.concat(ue.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(a=>se.addEventListener(a,this.handleEvent))}destroy(){this.events.forEach(a=>this.element.removeEventListener(a,this.handleEvent))}enableEventType(ve,we){ve===ne&&(this.enableMoveEvent=we),ve===oe&&(this.enableOverEvent=we),ve===pe&&(this.enableOutEvent=we),ve===qe&&(this.enableLeaveEvent=we)}handleEvent(xe){this.handleOverEvent(xe),this.handleOutEvent(xe),this.handleLeaveEvent(xe),this.handleMoveEvent(xe)}handleOverEvent(ye){this.enableOverEvent&&"mouseover"===ye.type&&this.callback({type:oe,srcEvent:ye,pointerType:"mouse",target:ye.target})}handleOutEvent(ze){this.enableOutEvent&&"mouseout"===ze.type&&this.callback({type:pe,srcEvent:ze,pointerType:"mouse",target:ze.target})}handleLeaveEvent(Ae){this.enableLeaveEvent&&"mouseleave"===Ae.type&&this.callback({type:qe,srcEvent:Ae,pointerType:"mouse",target:Ae.target})}handleMoveEvent(Be){if(this.enableMoveEvent)switch(Be.type){case"mousedown":Be.button>=0&&(this.pressed=!0);break;case"mousemove":0===Be.which&&(this.pressed=!1),this.pressed||this.callback({type:ne,srcEvent:Be,pointerType:"mouse",target:Be.target});break;case"mouseup":this.pressed=!1;break;default:}}}const{KEY_EVENTS:Ce}=Rd,De="keydown",Ee="keyup";class Fe{constructor(Ge,He,Ie={}){this.element=Ge,this.callback=He,this.options=Object.assign({enable:!0},Ie),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=Ce.concat(Ie.events||[]),this.handleEvent=this.handleEvent.bind(this),Ge.tabIndex=Ie.tabIndex||0,Ge.style.outline="none",this.events.forEach(a=>Ge.addEventListener(a,this.handleEvent))}destroy(){this.events.forEach(a=>this.element.removeEventListener(a,this.handleEvent))}enableEventType(Je,Ke){Je===De&&(this.enableDownEvent=Ke),Je===Ee&&(this.enableUpEvent=Ke)}handleEvent(Le){const Me=Le.target||Le.srcElement;("INPUT"!==Me.tagName||"text"!==Me.type)&&"TEXTAREA"!==Me.tagName&&(this.enableDownEvent&&"keydown"===Le.type&&this.callback({type:De,srcEvent:Le,key:Le.key,target:Le.target}),this.enableUpEvent&&"keyup"===Le.type&&this.callback({type:Ee,srcEvent:Le,key:Le.key,target:Le.target}))}}const Ne="contextmenu";class Oe{constructor(Pe,Qe,Re={}){this.element=Pe,this.callback=Qe,this.options=Object.assign({enable:!0},Re),this.handleEvent=this.handleEvent.bind(this),Pe.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(Se,Te){Se===Ne&&(this.options.enable=Te)}handleEvent(Ue){this.options.enable&&this.callback({type:Ne,center:{x:Ue.clientX,y:Ue.clientY},srcEvent:Ue,pointerType:"mouse",target:Ue.target})}}const Ve={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4},We={srcElement:"root",priority:0};class Xe{constructor(Ye){this.eventManager=Ye,this.handlers=[],this.handlersByElement=new Map(),this.handleEvent=this.handleEvent.bind(this),this._active=!1}isEmpty(){return!this._active}add(Ze,$e,_e,af=!1,bf=!1){const{handlers:cf,handlersByElement:df}=this;_e&&("object"!=typeof _e||_e.addEventListener)&&(_e={srcElement:_e}),_e=_e?Object.assign({},We,_e):We;let ef=df.get(_e.srcElement);ef||(ef=[],df.set(_e.srcElement,ef));const ff={type:Ze,handler:$e,srcElement:_e.srcElement,priority:_e.priority};af&&(ff.once=!0),bf&&(ff.passive=!0),cf.push(ff),this._active=this._active||!ff.passive;let gf=ef.length-1;for(;gf>=0;){if(ef[gf].priority>=ff.priority)break;gf--}ef.splice(gf+1,0,ff)}remove(hf,jf){const{handlers:kf,handlersByElement:lf}=this;for(let mf=kf.length-1;mf>=0;mf--){const nf=kf[mf];if(nf.type===hf&&nf.handler===jf){kf.splice(mf,1);const of=lf.get(nf.srcElement);of.splice(of.indexOf(nf),1),0===of.length&&lf.delete(nf.srcElement)}}this._active=kf.some(a=>!a.passive)}handleEvent(pf){if(this.isEmpty())return;const qf=this._normalizeEvent(pf);let rf=pf.srcEvent.target;for(;rf&&rf!==qf.rootElement;){if(this._emit(qf,rf),qf.handled)return;rf=rf.parentNode}this._emit(qf,"root")}_emit(sf,tf){const uf=this.handlersByElement.get(tf);if(uf){let vf=!1;const wf=()=>{sf.handled=!0},xf=()=>{sf.handled=!0,vf=!0},yf=[];for(let zf=0;zf<uf.length;zf++){const{type:Af,handler:Bf,once:Cf}=uf[zf];if(Bf(Object.assign({},sf,{type:Af,stopPropagation:wf,stopImmediatePropagation:xf})),Cf&&yf.push(uf[zf]),vf)break}for(let Df=0;Df<yf.length;Df++){const{type:Ef,handler:Ff}=yf[Df];this.remove(Ef,Ff)}}}_normalizeEvent(Gf){const Hf=this.eventManager.element;return Object.assign({},Gf,function(a){const b=Ve[a.srcEvent.type];if(!b)return null;const{buttons:c,button:d,which:e}=a.srcEvent;let f=!1,g=!1,h=!1;return 4!==b&&(2!==b||Number.isFinite(c))?2===b?(f=Boolean(1&c),g=Boolean(4&c),h=Boolean(2&c)):1===b&&(f=0===d,g=1===d,h=2===d):(f=1===e,g=2===e,h=3===e),{leftButton:f,middleButton:g,rightButton:h}}(Gf),function(a,b){const{srcEvent:c}=a;if(!a.center&&!Number.isFinite(c.clientX))return null;const d=a.center||{x:c.clientX,y:c.clientY},e=b.getBoundingClientRect(),f=e.width/b.offsetWidth||1,g=e.height/b.offsetHeight||1,h={x:(d.x-e.left-b.clientLeft)/f,y:(d.y-e.top-b.clientTop)/g};return{center:d,offsetCenter:h}}(Gf,Hf),{handled:!1,rootElement:Hf})}}class If{constructor(Jf=null,Kf={}){this.options=Object.assign({},{events:null,recognizers:null,recognizerOptions:{},Manager:Ld,touchAction:"none",tabIndex:0},Kf),this.events=new Map(),this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(Jf);const{events:Lf}=Kf;Lf&&this.on(Lf)}setElement(Mf){if(this.element&&this.destroy(),this.element=Mf,!Mf)return;const{options:Nf}=this,Of=Nf.Manager;for(const Pf in this.manager=new Of(Mf,{touchAction:Nf.touchAction,recognizers:Nf.recognizers||Nd}).on("hammer.input",this._onBasicInput),Nf.recognizers||Object.keys(Od).forEach(a=>{const b=this.manager.get(a);b&&Od[a].forEach(a=>{b.recognizeWith(a)})}),Nf.recognizerOptions){const Qf=this.manager.get(Pf);if(Qf){const Rf=Nf.recognizerOptions[Pf];delete Rf.enable,Qf.set(Rf)}}for(const[Sf,Tf]of(this.wheelInput=new ae(Mf,this._onOtherEvent,{enable:!1}),this.moveInput=new re(Mf,this._onOtherEvent,{enable:!1}),this.keyInput=new Fe(Mf,this._onOtherEvent,{enable:!1,tabIndex:Nf.tabIndex}),this.contextmenuInput=new Oe(Mf,this._onOtherEvent,{enable:!1}),this.events))Tf.isEmpty()||(this._toggleRecognizer(Tf.recognizerName,!0),this.manager.on(Sf,Tf.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(Uf,Vf,Wf){this._addEventHandler(Uf,Vf,Wf,!1)}once(Xf,Yf,Zf){this._addEventHandler(Xf,Yf,Zf,!0)}watch($f,_f,ag){this._addEventHandler($f,_f,ag,!1,!0)}off(bg,cg){this._removeEventHandler(bg,cg)}_toggleRecognizer(dg,eg){const{manager:fg}=this;if(!fg)return;const gg=fg.get(dg);if(gg&&gg.options.enable!==eg){gg.set({enable:eg});const hg=Pd[dg];hg&&!this.options.recognizers&&hg.forEach(a=>{const b=fg.get(a);eg?(b.requireFailure(dg),gg.dropRequireFailure(a)):b.dropRequireFailure(dg)})}this.wheelInput.enableEventType(dg,eg),this.moveInput.enableEventType(dg,eg),this.keyInput.enableEventType(dg,eg),this.contextmenuInput.enableEventType(dg,eg)}_addEventHandler(ig,jg,kg,lg,mg){if("string"!=typeof ig){for(const ng in kg=jg,ig)this._addEventHandler(ng,ig[ng],kg,lg,mg);return}const{manager:og,events:pg}=this,qg=Td[ig]||ig;let rg=pg.get(qg);!rg&&(rg=new Xe(this),pg.set(qg,rg),rg.recognizerName=Sd[qg]||qg,og&&og.on(qg,rg.handleEvent)),rg.add(ig,jg,kg,lg,mg),rg.isEmpty()||this._toggleRecognizer(rg.recognizerName,!0)}_removeEventHandler(sg,tg){if("string"!=typeof sg){for(const ug in sg)this._removeEventHandler(ug,sg[ug]);return}const{events:vg}=this,wg=Td[sg]||sg,xg=vg.get(wg);if(xg&&(xg.remove(sg,tg),xg.isEmpty())){const{recognizerName:yg}=xg;let zg=!1;for(const Ag of vg.values())if(Ag.recognizerName===yg&&!Ag.isEmpty()){zg=!0;break}zg||this._toggleRecognizer(yg,!1)}}_onBasicInput(Bg){const{srcEvent:Cg}=Bg,Dg=Qd[Cg.type];Dg&&this.manager.emit(Dg,Bg)}_onOtherEvent(Eg){this.manager.emit(Eg.type,Eg)}}function Fg(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Gg(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Fg(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Fg(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}var Hg={transitionDuration:0},Ig={transitionDuration:300,transitionEasing:function(a){return a},transitionInterpolator:new Dd(),transitionInterruption:Fd.BREAK},Jg=function(a){return 1-(1-a)*(1-a)},Kg={WHEEL:["wheel"],PAN:["panstart","panmove","panend"],PINCH:["pinchstart","pinchmove","pinchend"],TRIPLE_PAN:["tripanstart","tripanmove","tripanend"],DOUBLE_TAP:["doubletap"],KEYBOARD:["keydown"]},Lg=function(){function a(){var b=this;pc(this,a),g(this,"events",[]),g(this,"scrollZoom",!0),g(this,"dragPan",!0),g(this,"dragRotate",!0),g(this,"doubleClickZoom",!0),g(this,"touchZoom",!0),g(this,"touchRotate",!1),g(this,"keyboard",!0),g(this,"_interactionState",{isDragging:!1}),g(this,"_events",{}),g(this,"_setInteractionState",function(a){Object.assign(b._interactionState,a),b.onStateChange&&b.onStateChange(b._interactionState)}),g(this,"_onTransition",function(a,c){b.onViewportChange(a,b._interactionState,c)}),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new Hd({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return rc(a,[{key:"handleEvent",value:function(a){this.mapState=this.getMapState();var b=this._eventStartBlocked;switch(a.type){case"panstart":return!b&&this._onPanStart(a);case"panmove":return this._onPan(a);case"panend":return this._onPanEnd(a);case"pinchstart":return!b&&this._onPinchStart(a);case"pinchmove":return this._onPinch(a);case"pinchend":return this._onPinchEnd(a);case"tripanstart":return!b&&this._onTriplePanStart(a);case"tripanmove":return this._onTriplePan(a);case"tripanend":return this._onTriplePanEnd(a);case"doubletap":return this._onDoubleTap(a);case"wheel":return this._onWheel(a);case"keydown":return this._onKeyDown(a);default:return!1}}},{key:"getCenter",value:function(a){var b=a.offsetCenter,c=b.x,d=b.y;return[c,d]}},{key:"isFunctionKeyPressed",value:function(a){var b=a.srcEvent;return Boolean(b.metaKey||b.altKey||b.ctrlKey||b.shiftKey)}},{key:"blockEvents",value:function(a){var b=this,c=setTimeout(function(){b._eventStartBlocked===c&&(b._eventStartBlocked=null)},a);this._eventStartBlocked=c}},{key:"updateViewport",value:function(a,b,c){var d=this.mapState instanceof Qc?this.mapState.getViewportProps():this.mapState,e=Gg(Gg({},a.getViewportProps()),b),f=Object.keys(e).some(function(a){return d[a]!==e[a]});this._state=a.getState(),this._setInteractionState(c),f&&this.onViewportChange(e,this._interactionState,d)}},{key:"getMapState",value:function(a){return new Qc(Gg(Gg(Gg({},this.mapStateProps),this._state),a))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(a){var b=a.onViewportChange,c=a.onStateChange,d=a.eventManager,e=void 0===d?this.eventManager:d,f=a.isInteractive,g=void 0===f||f,h=a.scrollZoom,i=void 0===h?this.scrollZoom:h,j=a.dragPan,k=void 0===j?this.dragPan:j,l=a.dragRotate,m=void 0===l?this.dragRotate:l,n=a.doubleClickZoom,o=void 0===n?this.doubleClickZoom:n,p=a.touchZoom,q=void 0===p?this.touchZoom:p,r=a.touchRotate,s=void 0===r?this.touchRotate:r,t=a.keyboard,u=void 0===t?this.keyboard:t;this.onViewportChange=b,this.onStateChange=c;var v=this.mapStateProps||{},w=v.height!==a.height||v.width!==a.width;this.mapStateProps=a,w&&(this.mapState=v,this.updateViewport(new Qc(a))),this._transitionManager.processViewportChange(a),this.eventManager!==e&&(this.eventManager=e,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(Kg.WHEEL,g&&Boolean(i)),this.toggleEvents(Kg.PAN,g&&Boolean(k||m)),this.toggleEvents(Kg.PINCH,g&&Boolean(q||s)),this.toggleEvents(Kg.TRIPLE_PAN,g&&Boolean(s)),this.toggleEvents(Kg.DOUBLE_TAP,g&&Boolean(o)),this.toggleEvents(Kg.KEYBOARD,g&&Boolean(u)),this.scrollZoom=i,this.dragPan=k,this.dragRotate=m,this.doubleClickZoom=o,this.touchZoom=q,this.touchRotate=s,this.keyboard=u}},{key:"toggleEvents",value:function(a,b){var c=this;this.eventManager&&a.forEach(function(a){c._events[a]!==b&&(c._events[a]=b,b?c.eventManager.on(a,c.handleEvent):c.eventManager.off(a,c.handleEvent))})}},{key:"_onPanStart",value:function(a){var b=this.getCenter(a);this._panRotate=this.isFunctionKeyPressed(a)||a.rightButton;var c=this._panRotate?this.mapState.rotateStart({pos:b}):this.mapState.panStart({pos:b});return this.updateViewport(c,Hg,{isDragging:!0}),!0}},{key:"_onPan",value:function(a){return!!this.isDragging()&&(this._panRotate?this._onPanRotate(a):this._onPanMove(a))}},{key:"_onPanEnd",value:function(a){return!!this.isDragging()&&(this._panRotate?this._onPanRotateEnd(a):this._onPanMoveEnd(a))}},{key:"_onPanMove",value:function(a){if(!this.dragPan)return!1;var b=this.getCenter(a),c=this.mapState.pan({pos:b});return this.updateViewport(c,Hg,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(a){if(this.dragPan){var b=this.dragPan.inertia,c=void 0===b?300:b;if(c&&a.velocity){var d=this.getCenter(a),e=[d[0]+a.velocityX*c/2,d[1]+a.velocityY*c/2],f=this.mapState.pan({pos:e}).panEnd();return this.updateViewport(f,Gg(Gg({},Ig),{},{transitionDuration:c,transitionEasing:Jg}),{isDragging:!1,isPanning:!0}),!0}}var g=this.mapState.panEnd();return this.updateViewport(g,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(a){if(!this.dragRotate)return!1;var b=this.getCenter(a),c=this.mapState.rotate({pos:b});return this.updateViewport(c,Hg,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(a){if(this.dragRotate){var b=this.dragRotate.inertia,c=void 0===b?300:b;if(c&&a.velocity){var d=this.getCenter(a),e=[d[0]+a.velocityX*c/2,d[1]+a.velocityY*c/2],f=this.mapState.rotate({pos:e}).rotateEnd();return this.updateViewport(f,Gg(Gg({},Ig),{},{transitionDuration:c,transitionEasing:Jg}),{isDragging:!1,isRotating:!0}),!0}}var g=this.mapState.panEnd();return this.updateViewport(g,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(a){if(!this.scrollZoom)return!1;var b=this.scrollZoom,c=b.speed,d=b.smooth;a.preventDefault();var e=this.getCenter(a),f=a.delta,g=2/(1+Math.exp(-Math.abs(f*(void 0===c?.01:c))));f<0&&0!==g&&(g=1/g);var h=this.mapState.zoom({pos:e,scale:g});return h.getViewportProps().zoom!==this.mapStateProps.zoom&&(this.updateViewport(h,Gg(Gg({},Ig),{},{transitionInterpolator:new Dd({around:e}),transitionDuration:void 0!==d&&d?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(a){var b=this.getCenter(a),c=this.mapState.zoomStart({pos:b}).rotateStart({pos:b});return this._startPinchRotation=a.rotation,this._lastPinchEvent=a,this.updateViewport(c,Hg,{isDragging:!0}),!0}},{key:"_onPinch",value:function(a){if(!this.isDragging())return!1;if(!this.touchZoom&&!this.touchRotate)return!1;var b=this.mapState;if(this.touchZoom){var c=a.scale,d=this.getCenter(a);b=b.zoom({pos:d,scale:c})}if(this.touchRotate){var e=a.rotation;b=b.rotate({deltaAngleX:this._startPinchRotation-e})}return this.updateViewport(b,Hg,{isDragging:!0,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:Boolean(this.touchRotate)}),this._lastPinchEvent=a,!0}},{key:"_onPinchEnd",value:function(a){if(!this.isDragging())return!1;if(this.touchZoom){var b=this.touchZoom.inertia,c=void 0===b?300:b,d=this._lastPinchEvent;if(c&&d&&a.scale!==d.scale){var e=this.getCenter(a),f=this.mapState.rotateEnd(),g=Math.log2(a.scale),h=(g-Math.log2(d.scale))/(a.deltaTime-d.deltaTime),i=Math.pow(2,g+h*c/2);return f=f.zoom({pos:e,scale:i}).zoomEnd(),this.updateViewport(f,Gg(Gg({},Ig),{},{transitionInterpolator:new Dd({around:e}),transitionDuration:c,transitionEasing:Jg}),{isDragging:!1,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:!1}),this.blockEvents(c),!0}}var j=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(j,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(a){var b=this.getCenter(a),c=this.mapState.rotateStart({pos:b});return this.updateViewport(c,Hg,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(a){if(!this.isDragging())return!1;if(!this.touchRotate)return!1;var b=this.getCenter(a);b[0]-=a.deltaX;var c=this.mapState.rotate({pos:b});return this.updateViewport(c,Hg,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(a){if(!this.isDragging())return!1;if(this.touchRotate){var b=this.touchRotate.inertia,c=void 0===b?300:b;if(c&&a.velocityY){var d=this.getCenter(a),e=[d[0],d[1]+=a.velocityY*c/2],f=this.mapState.rotate({pos:e});return this.updateViewport(f,Gg(Gg({},Ig),{},{transitionDuration:c,transitionEasing:Jg}),{isDragging:!1,isRotating:!0}),this.blockEvents(c),!1}}var g=this.mapState.rotateEnd();return this.updateViewport(g,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(a){if(!this.doubleClickZoom)return!1;var b=this.getCenter(a),c=this.isFunctionKeyPressed(a),d=this.mapState.zoom({pos:b,scale:c?.5:2});return this.updateViewport(d,Object.assign({},Ig,{transitionInterpolator:new Dd({around:b})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(a){if(!this.keyboard)return!1;var b,c=this.isFunctionKeyPressed(a),d=this.keyboard,e=d.zoomSpeed,f=void 0===e?2:e,g=d.moveSpeed,h=void 0===g?100:g,i=d.rotateSpeedX,j=void 0===i?15:i,k=d.rotateSpeedY,l=void 0===k?10:k,m=this.mapStateProps;switch(a.srcEvent.keyCode){case 189:b=c?this.getMapState({zoom:m.zoom-Math.log2(f)-1}):this.getMapState({zoom:m.zoom-Math.log2(f)});break;case 187:b=c?this.getMapState({zoom:m.zoom+Math.log2(f)+1}):this.getMapState({zoom:m.zoom+Math.log2(f)});break;case 37:b=c?this.getMapState({bearing:m.bearing-j}):this.mapState.pan({pos:[h,0],startPos:[0,0]});break;case 39:b=c?this.getMapState({bearing:m.bearing+j}):this.mapState.pan({pos:[-h,0],startPos:[0,0]});break;case 38:b=c?this.getMapState({pitch:m.pitch+l}):this.mapState.pan({pos:[0,h],startPos:[0,0]});break;case 40:b=c?this.getMapState({pitch:m.pitch-l}):this.mapState.pan({pos:[0,-h],startPos:[0,0]});break;default:return!1}return this.updateViewport(b,Ig)}}]),a}();function Mg(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function Ng(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Mg(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Mg(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}var Og=Object.assign({},gd.propTypes,{maxZoom:j.number,minZoom:j.number,maxPitch:j.number,minPitch:j.number,onViewStateChange:j.func,onViewportChange:j.func,onInteractionStateChange:j.func,transitionDuration:j.oneOfType([j.number,j.string]),transitionInterpolator:j.object,transitionInterruption:j.number,transitionEasing:j.func,onTransitionStart:j.func,onTransitionInterrupt:j.func,onTransitionEnd:j.func,scrollZoom:j.oneOfType([j.bool,j.object]),dragPan:j.oneOfType([j.bool,j.object]),dragRotate:j.oneOfType([j.bool,j.object]),doubleClickZoom:j.bool,touchZoom:j.oneOfType([j.bool,j.object]),touchRotate:j.oneOfType([j.bool,j.object]),keyboard:j.oneOfType([j.bool,j.object]),onHover:j.func,onClick:j.func,onDblClick:j.func,onContextMenu:j.func,onMouseDown:j.func,onMouseMove:j.func,onMouseUp:j.func,onTouchStart:j.func,onTouchMove:j.func,onTouchEnd:j.func,onMouseEnter:j.func,onMouseLeave:j.func,onMouseOut:j.func,onWheel:j.func,touchAction:j.string,eventRecognizerOptions:j.object,clickRadius:j.number,interactiveLayerIds:j.array,getCursor:j.func,controller:j.instanceOf(Lg)}),Pg=Object.assign({},gd.defaultProps,Oc,Hd.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(a){return a.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:function(a){var b=a.isDragging,c=a.isHovering;return b?"grabbing":c?"pointer":"grab"}});function Qg(a){if(a.lngLat||!a.offsetCenter)return a;var b=a.offsetCenter,c=b.x,d=b.y;if(!Number.isFinite(c)||!Number.isFinite(d))return a;var e=[c,d];if(a.point=e,this.map){var f=this.map.unproject(e);a.lngLat=[f.lng,f.lat]}return a}function Rg(a){var b=this.map;if(!b||!a)return null;var c={},d=this.props.clickRadius;this.props.interactiveLayerIds&&(c.layers=this.props.interactiveLayerIds);try{return b.queryRenderedFeatures(d?[[a[0]-d,a[1]+d],[a[0]+d,a[1]-d]]:a,c)}catch(e){return null}}function Sg(a,b){var c=this.props[a];c&&c(Qg.call(this,b))}function Tg(a){Sg.call(this,"touch"===a.pointerType?"onTouchStart":"onMouseDown",a)}function Ug(a){Sg.call(this,"touch"===a.pointerType?"onTouchEnd":"onMouseUp",a)}function Vg(a){if(Sg.call(this,"touch"===a.pointerType?"onTouchMove":"onMouseMove",a),!this.state.isDragging){var b,c=this.props,d=c.onHover,e=c.interactiveLayerIds;a=Qg.call(this,a),(e||d)&&(b=Rg.call(this,a.point));var f=Boolean(e&&b&&b.length>0),g=f&&!this.state.isHovering,h=!f&&this.state.isHovering;(d||g)&&(a.features=b,d&&d(a)),g&&Sg.call(this,"onMouseEnter",a),h&&Sg.call(this,"onMouseLeave",a),(g||h)&&this.setState({isHovering:f})}}function Wg(a){var b=this.props,c=b.onClick,d=b.onNativeClick,e=b.onDblClick,f=b.doubleClickZoom,g=[],h=e||f;switch(a.type){case"anyclick":g.push(d),h||g.push(c);break;case"click":h&&g.push(c);break;default:}(g=g.filter(Boolean)).length&&((a=Qg.call(this,a)).features=Rg.call(this,a.point),g.forEach(function(b){return b(a)}))}var Xg=(0,i.forwardRef)(function(a,b){var c,g,h=(0,i.useContext)(Wc),j=(0,i.useMemo)(function(){return a.controller||new Lg()},[]),k=(0,i.useMemo)(function(){return new If(null,{touchAction:a.touchAction,recognizerOptions:a.eventRecognizerOptions})},[]),l=(0,i.useRef)(null),m=(0,i.useRef)(null),n=(0,i.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;n.props=a,n.map=m.current&&m.current.getMap(),n.setState=function(b){n.state=Ng(Ng({},n.state),b),l.current.style.cursor=a.getCursor(n.state)};var o=!0,p=function(a,b,d){if(o){c=[a,b,d];return}var e=n.props,f=e.onViewStateChange,g=e.onViewportChange;Object.defineProperty(a,"position",{get:function(){return[0,0,Yc(n.map,a)]}}),f&&f({viewState:a,interactionState:b,oldViewState:d}),g&&g(a,b,d)};(0,i.useImperativeHandle)(b,function(){var a;return{getMap:(a=m).current&&a.current.getMap,queryRenderedFeatures:a.current&&a.current.queryRenderedFeatures}},[]);var q=(0,i.useMemo)(function(){return Ng(Ng({},h),{},{eventManager:k,container:h.container||l.current})},[h,l.current]);q.onViewportChange=p,q.viewport=h.viewport||ad(n),n.viewport=q.viewport;var r=function(a){var b=a.isDragging,c=void 0!==b&&b;if(c!==n.state.isDragging&&n.setState({isDragging:c}),o){g=a;return}var d=n.props.onInteractionStateChange;d&&d(a)},s=function(){n.width&&n.height&&j.setOptions(Ng(Ng(Ng({},n.props),n.props.viewState),{},{isInteractive:Boolean(n.props.onViewStateChange||n.props.onViewportChange),onViewportChange:p,onStateChange:r,eventManager:k,width:n.width,height:n.height}))},t=function(a){var b=a.width,c=a.height;n.width=b,n.height=c,s(),n.props.onResize({width:b,height:c})};(0,i.useEffect)(function(){return k.setElement(l.current),k.on({pointerdown:Tg.bind(n),pointermove:Vg.bind(n),pointerup:Ug.bind(n),pointerleave:Sg.bind(n,"onMouseOut"),click:Wg.bind(n),anyclick:Wg.bind(n),dblclick:Sg.bind(n,"onDblClick"),wheel:Sg.bind(n,"onWheel"),contextmenu:Sg.bind(n,"onContextMenu")}),function(){k.destroy()}},[]),Xc(function(){if(c){var a;p.apply(void 0,function(a){if(Array.isArray(a))return e(a)}(a=c)||function(a){if("undefined"!=typeof Symbol&&null!=a[Symbol.iterator]||null!=a["@@iterator"])return Array.from(a)}(a)||f(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}g&&r(g)}),s();var u=a.width,v=a.height,w=a.style,x=a.getCursor,y=(0,i.useMemo)(function(){return Ng(Ng({position:"relative"},w),{},{width:u,height:v,cursor:x(n.state)})},[w,u,v,x,n.state]);return c&&n._child||(n._child=i.createElement(Vc,{value:q},i.createElement("div",{key:"event-canvas",ref:l,style:y},i.createElement(gd,d({},a,{width:"100%",height:"100%",style:null,onResize:t,ref:m}))))),o=!1,n._child});Xg.supported=gd.supported,Xg.propTypes=Og,Xg.defaultProps=Pg;var Yg=Xg;function Zg(a,b){if(a===b)return!0;if(!a||!b)return!1;if(Array.isArray(a)){if(!Array.isArray(b)||a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(!Zg(a[c],b[c]))return!1;return!0}if(Array.isArray(b))return!1;if("object"===md(a)&&"object"===md(b)){var d=Object.keys(a),e=Object.keys(b);if(d.length!==e.length)return!1;for(var f=0,g=d;f<g.length;f++){var h=g[f];if(!b.hasOwnProperty(h))return!1;if(!Zg(a[h],b[h]))return!1}return!0}return!1}function $g(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}var _g={type:j.string.isRequired,id:j.string},ah=0;function bh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function ch(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?bh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):bh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}(function(a){var b=(0,i.useContext)(Wc),c=(0,i.useRef)({id:a.id,type:a.type}),d=(0,i.useState)(0),e=k(d,2),f=e[1],h=(0,i.useMemo)(function(){return a.id||"jsx-source-".concat(ah++)},[]),j=b.map;(0,i.useEffect)(function(){if(j){var a=function(){return f(function(a){return a+1})};return j.on("styledata",a),function(){j.off("styledata",a),requestAnimationFrame(function(){j.style&&j.style._loaded&&j.getSource(h)&&j.removeSource(h)})}}},[j,h]);var l=j&&j.style&&j.getSource(h);return l?(function(a,b,c){Lc(b.id===c.id,"source id changed"),Lc(b.type===c.type,"source type changed");var d="",e=0;for(var f in b)"children"!==f&&"id"!==f&&!Zg(c[f],b[f])&&(d=f,e++);if(e){var g=b.type;if("geojson"===g)a.setData(b.data);else if("image"===g)a.updateImage({url:b.url,coordinates:b.coordinates});else if(("canvas"===g||"video"===g)&&1===e&&"coordinates"===d)a.setCoordinates(b.coordinates);else if("vector"===g&&a.setUrl)switch(d){case"url":a.setUrl(b.url);break;case"tiles":a.setTiles(b.tiles);break;default:}else console.warn("Unable to update <Source> prop: ".concat(d))}})(l,a,c.current):l=(function(a,b,c){if(a.style&&a.style._loaded){var d=function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?$g(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):$g(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}({},c);return delete d.id,delete d.children,a.addSource(b,d),a.getSource(b)}return null})(j,h,a),c.current=a,l&&i.Children.map(a.children,function(a){return a&&(0,i.cloneElement)(a,{source:h})})||null}).propTypes=_g;var dh={type:j.oneOf(["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade","sky"]).isRequired,id:j.string,source:j.string,beforeId:j.string},eh=0;(function(a){var b=(0,i.useContext)(Wc),c=(0,i.useRef)({id:a.id,type:a.type}),d=(0,i.useState)(0),e=k(d,2),f=e[1],g=(0,i.useMemo)(function(){return a.id||"jsx-layer-".concat(eh++)},[]),h=b.map;(0,i.useEffect)(function(){if(h){var a=function(){return f(function(a){return a+1})};return h.on("styledata",a),function(){h.off("styledata",a),h.style&&h.style._loaded&&h.removeLayer(g)}}},[h]);var j=h&&h.style&&h.getLayer(g);return j?(function(a,b,c,d){Lc(c.id===d.id,"layer id changed"),Lc(c.type===d.type,"layer type changed");try{!function(a,b,c,d){var e=c.layout,f=void 0===e?{}:e,g=c.paint,h=void 0===g?{}:g,i=c.filter,j=c.minzoom,k=c.maxzoom,l=c.beforeId,m=function(a,b){if(null==a)return{};var c,d,e=function(a,b){if(null==a)return{};var c,d,e={},f=Object.keys(a);for(d=0;d<f.length;d++)c=f[d],b.indexOf(c)>=0||(e[c]=a[c]);return e}(a,b);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(a);for(d=0;d<f.length;d++)c=f[d],!(b.indexOf(c)>=0)&&Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}return e}(c,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(l!==d.beforeId&&a.moveLayer(b,l),f!==d.layout){var n=d.layout||{};for(var o in f)Zg(f[o],n[o])||a.setLayoutProperty(b,o,f[o]);for(var p in n)f.hasOwnProperty(p)||a.setLayoutProperty(b,p,void 0)}if(h!==d.paint){var q=d.paint||{};for(var r in h)Zg(h[r],q[r])||a.setPaintProperty(b,r,h[r]);for(var s in q)h.hasOwnProperty(s)||a.setPaintProperty(b,s,void 0)}for(var t in Zg(i,d.filter)||a.setFilter(b,i),(j!==d.minzoom||k!==d.maxzoom)&&a.setLayerZoomRange(b,j,k),m)Zg(m[t],d[t])||a.setLayerProperty(b,t,m[t])}(a,b,c,d)}catch(e){console.warn(e)}})(h,g,a,c.current):(function(a,b,c){if(a.style&&a.style._loaded){var d=ch(ch({},c),{},{id:b});delete d.beforeId,a.addLayer(d,c.beforeId)}})(h,g,a),c.current=a,null}).propTypes=dh;var fh={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},gh={captureScroll:j.bool,captureDrag:j.bool,captureClick:j.bool,captureDoubleClick:j.bool,capturePointerMove:j.bool};function hh(){var a=arguments.length>0&& void 0!==arguments[0]?arguments[0]:{},b=(0,i.useContext)(Wc),c=(0,i.useRef)(null),d=(0,i.useRef)({props:a,state:{},context:b,containerRef:c}),e=d.current;return e.props=a,e.context=b,(0,i.useEffect)(function(){return(function(a){var b=a.containerRef.current,c=a.context.eventManager;if(b&&c){var d={wheel:function(b){var c=a.props;c.captureScroll&&b.stopPropagation(),c.onScroll&&c.onScroll(b,a)},panstart:function(b){var c=a.props;c.captureDrag&&b.stopPropagation(),c.onDragStart&&c.onDragStart(b,a)},anyclick:function(b){var c=a.props;c.captureClick&&b.stopPropagation(),c.onNativeClick&&c.onNativeClick(b,a)},click:function(b){var c=a.props;c.captureClick&&b.stopPropagation(),c.onClick&&c.onClick(b,a)},dblclick:function(b){var c=a.props;c.captureDoubleClick&&b.stopPropagation(),c.onDoubleClick&&c.onDoubleClick(b,a)},pointermove:function(b){var c=a.props;c.capturePointerMove&&b.stopPropagation(),c.onPointerMove&&c.onPointerMove(b,a)}};return c.watch(d,b),function(){c.off(d)}}})(e)},[b.eventManager]),e}function ih(a){var b=a.instance,c=hh(a),d=c.context,e=c.containerRef;return b._context=d,b._containerRef=e,b._render()}var jh=function(a){ld(f,a);var b,c,e=(b=f,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}(),function(){var a,d=od(b);if(c){var e=od(this).constructor;a=Reflect.construct(d,arguments,e)}else a=d.apply(this,arguments);return nd(this,a)});function f(){var a;pc(this,f);for(var b=arguments.length,c=new Array(b),d=0;d<b;d++)c[d]=arguments[d];return g(jd(a=e.call.apply(e,[this].concat(c))),"_context",{}),g(jd(a),"_containerRef",(0,i.createRef)()),g(jd(a),"_onScroll",function(a){}),g(jd(a),"_onDragStart",function(a){}),g(jd(a),"_onDblClick",function(a){}),g(jd(a),"_onClick",function(a){}),g(jd(a),"_onPointerMove",function(a){}),a}return rc(f,[{key:"_render",value:function(){throw new Error("_render() not implemented")}},{key:"render",value:function(){return i.createElement(ih,d({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),f}(i.PureComponent);function kh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function lh(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?kh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):kh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}g(jh,"propTypes",gh),g(jh,"defaultProps",fh);var mh=Object.assign({},gh,{draggable:j.bool,onDrag:j.func,onDragEnd:j.func,onDragStart:j.func,offsetLeft:j.number,offsetTop:j.number}),nh=Object.assign({},fh,{draggable:!1,offsetLeft:0,offsetTop:0});function oh(a){var b=a.offsetCenter,c=b.x,d=b.y;return[c,d]}function ph(a,b,c,d){var e=a[0]+b[0]-c.offsetLeft,f=a[1]+b[1]-c.offsetTop;return d.viewport.unproject([e,f])}function qh(a,b){var c=b.props,d=b.callbacks,e=b.state,f=b.context,g=b.containerRef,h=c.draggable;if(h){a.stopPropagation();var i=oh(a),j=function(a,b){var c=a.center,d=c.x,e=c.y;if(b){var f=b.getBoundingClientRect();return[f.left-d,f.top-e]}return null}(a,g.current);if(e.setDragPos(i),e.setDragOffset(j),d.onDragStart&&j){var k=Object.assign({},a);k.lngLat=ph(i,j,c,f),d.onDragStart(k)}}}var rh="undefined"!=typeof window&&window.devicePixelRatio||1,sh=function(a){return Math.round(a*rh)/rh},th=function(a,b){var c=arguments.length>2&& void 0!==arguments[2]?arguments[2]:"x";if(null===a)return b;var d="x"===c?a.offsetWidth:a.offsetHeight;return sh(b/100*d)/d*100};function uh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}var vh=Object.assign({},mh,{className:j.string,longitude:j.number.isRequired,latitude:j.number.isRequired,style:j.object}),wh=Object.assign({},nh,{className:""});function xh(a){var b,c,d,e,f,h,j,l,m=(b=a,d=(c=k((0,i.useState)(null),2))[0],e=c[1],f=k((0,i.useState)(null),2),h=f[0],j=f[1],l=hh(lh(lh({},b),{},{onDragStart:qh})),l.callbacks=b,l.state.dragPos=d,l.state.setDragPos=e,l.state.dragOffset=h,l.state.setDragOffset=j,(0,i.useEffect)(function(){return(function(a){var b=a.context.eventManager;if(b&&a.state.dragPos){var c={panmove:function(b){return(function(a,b){var c=b.props,d=b.callbacks,e=b.state,f=b.context;a.stopPropagation();var g=oh(a);e.setDragPos(g);var h=e.dragOffset;if(d.onDrag&&h){var i=Object.assign({},a);i.lngLat=ph(g,h,c,f),d.onDrag(i)}})(b,a)},panend:function(b){return(function(a,b){var c=b.props,d=b.callbacks,e=b.state,f=b.context;a.stopPropagation();var g=e.dragPos,h=e.dragOffset;if(e.setDragPos(null),e.setDragOffset(null),d.onDragEnd&&g&&h){var i=Object.assign({},a);i.lngLat=ph(g,h,c,f),d.onDragEnd(i)}})(b,a)},pancancel:function(b){var c,d;return c=b,d=a.state,void(c.stopPropagation(),d.setDragPos(null),d.setDragOffset(null))}};return b.watch(c),function(){b.off(c)}}})(l)},[l.context.eventManager,Boolean(d)]),l),n=m.state,o=m.containerRef,p=a.children,q=a.className,r=a.draggable,s=a.style,t=n.dragPos,u=function(a){var b=a.props,c=a.state,d=a.context,e=b.longitude,f=b.latitude,g=b.offsetLeft,h=b.offsetTop,i=c.dragPos,j=c.dragOffset,l=d.viewport,m=d.map;if(i&&j)return[i[0]+j[0],i[1]+j[1]];var n=Yc(m,{longitude:e,latitude:f}),o=k(l.project([e,f,n]),2),p=o[0],q=o[1];return[p+=g,q+=h]}(m),v=k(u,2),w=v[0],x=v[1],y="translate(".concat(sh(w),"px, ").concat(sh(x),"px)"),z=r?t?"grabbing":"grab":"auto",A=(0,i.useMemo)(function(){var a=function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?uh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):uh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}({position:"absolute",left:0,top:0,transform:y,cursor:z},s);return i.createElement("div",{className:"mapboxgl-marker ".concat(q),ref:m.containerRef,style:a},p)},[p,q]),B=o.current;return B&&(B.style.transform=y,B.style.cursor=z),A}xh.defaultProps=wh,xh.propTypes=vh,i.memo(xh);var yh={top:{x:.5,y:0},"top-left":{x:0,y:0},"top-right":{x:1,y:0},bottom:{x:.5,y:1},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5}},zh=Object.keys(yh),Ah=Object.assign({},gh,{className:j.string,longitude:j.number.isRequired,latitude:j.number.isRequired,altitude:j.number,offsetLeft:j.number,offsetTop:j.number,tipSize:j.number,closeButton:j.bool,closeOnClick:j.bool,anchor:j.oneOf(Object.keys(yh)),dynamicPosition:j.bool,sortByDepth:j.bool,onClose:j.func}),Bh=Object.assign({},fh,{className:"",offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function Ch(a){var b=(0,i.useRef)(null),c=hh(a),d=c.context,e=c.containerRef,f=k((0,i.useState)(!1),2)[1];(0,i.useEffect)(function(){f(!0)},[b.current]),(0,i.useEffect)(function(){if(d.eventManager&&a.closeOnClick){var b=function(){return c.props.onClose()};return d.eventManager.on("anyclick",b),function(){d.eventManager.off("anyclick",b)}}},[d.eventManager,a.closeOnClick]);var g=d.viewport,h=d.map,j=a.className,l=a.longitude,m=a.latitude,n=a.tipSize,o=a.closeButton,p=a.children,q=a.altitude;void 0===q&&(q=Yc(h,{longitude:l,latitude:m}));var r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q=g.project([l,m,q]),R=(r=a,s=g,t=b.current,v=(u=k(Q,2))[0],w=u[1],x=r.anchor,y=r.dynamicPosition,z=r.tipSize,t&&y?function(a){var b=a.x,c=a.y,d=a.width,e=a.height,f=a.selfWidth,g=a.selfHeight,h=a.anchor,i=a.padding,j=void 0===i?0:i,k=yh[h],l=k.x,m=k.y,n=c-m*g,o=n+g,p=Math.max(0,j-n)+Math.max(0,o-e+j);if(p>0){var q=m,r=p;for(m=0;m<=1;m+=.5)o=(n=c-m*g)+g,p=Math.max(0,j-n)+Math.max(0,o-e+j),p<r&&(r=p,q=m);m=q}var s=.5;.5===m&&(l=Math.floor(l),s=1);var t=b-l*f,u=t+f,v=Math.max(0,j-t)+Math.max(0,u-d+j);if(v>0){var w=l,x=v;for(l=0;l<=1;l+=s)u=(t=b-l*f)+f,v=Math.max(0,j-t)+Math.max(0,u-d+j),v<x&&(x=v,w=l);l=w}return zh.find(function(a){var b=yh[a];return b.x===l&&b.y===m})||h}({x:v,y:w,anchor:x,padding:z,width:s.width,height:s.height,selfWidth:t.clientWidth,selfHeight:t.clientHeight}):x),S=(A=a,B=g,C=e.current,D=Q,E=R,G=(F=k(D,3))[0],H=F[1],I=F[2],J=A.offsetLeft,K=A.offsetTop,L=A.sortByDepth,M=yh[E],N=th(C,-(100*M.x)),O=th(C,-(100*M.y),"y"),P={position:"absolute",transform:"\n translate(".concat(N,"%, ").concat(O,"%)\n translate(").concat(sh(G+J),"px, ").concat(sh(H+K),"px)\n "),display:void 0,zIndex:void 0},L&&(I>1||I< -1||G<0||G>B.width||H<0||H>B.height?P.display="none":P.zIndex=Math.floor((1-I)/2*1e5)),P),T=(0,i.useCallback)(function(a){c.props.onClose();var b=c.context.eventManager;b&&b.once("click",function(a){return a.stopPropagation()},a.target)},[]);return i.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(R," ").concat(j),style:S,ref:e},i.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:n}}),i.createElement("div",{key:"content",ref:b,className:"mapboxgl-popup-content"},o&&i.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:T},"\xd7"),p))}function Dh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Ch.propTypes=Ah,Ch.defaultProps=Bh,i.memo(Ch);var Eh=Object.assign({},gh,{toggleLabel:j.string,className:j.string,style:j.object,compact:j.bool,customAttribution:j.oneOfType([j.string,j.arrayOf(j.string)])}),Fh=Object.assign({},fh,{className:"",toggleLabel:"Toggle Attribution"});function Gh(a){var b=hh(a),c=b.context,d=b.containerRef,e=(0,i.useRef)(null),f=k((0,i.useState)(!1),2),h=f[0],j=f[1];(0,i.useEffect)(function(){var b,f,g,h,i,j;return c.map&&(b=(f={customAttribution:a.customAttribution},g=c.map,h=d.current,i=e.current,(j=new(Gc()).AttributionControl(f))._map=g,j._container=h,j._innerContainer=i,j._updateAttributions(),j._updateEditLink(),g.on("styledata",j._updateData),g.on("sourcedata",j._updateData),j)),function(){var a;return b&&void((a=b)._map.off("styledata",a._updateData),a._map.off("sourcedata",a._updateData))}},[c.map]);var l=void 0===a.compact?c.viewport.width<=640:a.compact;(0,i.useEffect)(function(){!l&&h&&j(!1)},[l]);var m=(0,i.useCallback)(function(){return j(function(a){return!a})},[]),n=(0,i.useMemo)(function(){return(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Dh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Dh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a})({position:"absolute"},a.style)},[a.style]);return i.createElement("div",{style:n,className:a.className},i.createElement("div",{ref:d,"aria-pressed":h,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(l?"mapboxgl-compact":""," ").concat(h?"mapboxgl-compact-show":"")},i.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:a.toggleLabel,onClick:m}),i.createElement("div",{ref:e,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}function Hh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Gh.propTypes=Eh,Gh.defaultProps=Fh,i.memo(Gh);var Ih=Object.assign({},gh,{className:j.string,style:j.object,container:j.object,label:j.string}),Jh=Object.assign({},fh,{className:"",container:null,label:"Toggle fullscreen"});function Kh(a){var b=hh(a),c=b.context,d=b.containerRef,e=k((0,i.useState)(!1),2),f=e[0],h=e[1],j=(0,i.useState)(!1),l=k(j,2),m=l[0],n=l[1],o=(0,i.useState)(null),p=k(o,2),q=p[0],r=p[1];(0,i.useEffect)(function(){var a=new(Gc()).FullscreenControl();r(a),n(a._checkFullscreenSupport());var b=function(){var b=!a._fullscreen;a._fullscreen=b,h(b)};return sc.addEventListener(a._fullscreenchange,b),function(){sc.removeEventListener(a._fullscreenchange,b)}},[]);var s=(0,i.useMemo)(function(){return(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Hh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Hh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a})({position:"absolute"},a.style)},[a.style]);if(!m)return null;var t=a.className,u=a.label,v=f?"shrink":"fullscreen";return i.createElement("div",{style:s,className:t},i.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:d},i.createElement("button",{key:v,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(v),type:"button",title:u,onClick:function(){q&&(q._container=a.container||c.container,q._onClickFullscreen())}},i.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}function Lh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Kh.propTypes=Ih,Kh.defaultProps=Jh,i.memo(Kh);var Mh=function(){},Nh=Object.assign({},gh,{className:j.string,style:j.object,label:j.string,disabledLabel:j.string,auto:j.bool,positionOptions:j.object,fitBoundsOptions:j.object,trackUserLocation:j.bool,showUserLocation:j.bool,showAccuracyCircle:j.bool,showUserHeading:j.bool,onViewStateChange:j.func,onViewportChange:j.func,onGeolocate:j.func}),Oh=Object.assign({},fh,{className:"",label:"Find My Location",disabledLabel:"Location Not Available",auto:!1,positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0,showUserHeading:!1,showAccuracyCircle:!0,onGeolocate:function(){}});function Ph(a){var b=hh(a),c=b.context,d=b.containerRef,e=(0,i.useRef)(null),f=k((0,i.useState)(null),2),j=f[0],l=f[1],m=k((0,i.useState)(!1),2),n=m[0],o=m[1];(0,i.useEffect)(function(){var d;return c.map&&(void 0!==h?Promise.resolve(h):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then(function(a){return h="denied"!==a.state}):(h=Boolean(window.navigator.geolocation),Promise.resolve(h))).then(function(f){if(o(f),e.current){var g,h,i,j,k;(d=(g=c,h=a,i=e.current,(j=new(Gc()).GeolocateControl(h))._container=sc.createElement("div"),j._map={on:function(){},_getUIString:function(){return""}},j._setupUI(!0),j._map=g.map,j._geolocateButton=i,k=g.eventManager,j.options.trackUserLocation&&k&&k.on("panstart",function(){"ACTIVE_LOCK"===j._watchState&&(j._watchState="BACKGROUND",i.classList.add("mapboxgl-ctrl-geolocate-background"),i.classList.remove("mapboxgl-ctrl-geolocate-active"))}),j.on("geolocate",h.onGeolocate),j))._updateCamera=function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;return c=a,e=(d=b).context,f=d.props,g=c,h=new(Gc()).LngLat(g.coords.longitude,g.coords.latitude),i=g.coords.accuracy,j=h.toBounds(i),k=[[j._ne.lng,j._ne.lat],[j._sw.lng,j._sw.lat]],l=e.viewport.fitBounds(k,f.fitBoundsOptions),m=l.longitude,n=l.latitude,o=l.zoom,p=Object.assign({},e.viewport,{longitude:m,latitude:n,zoom:o}),q=new Qc(p),r=Object.assign({},q.getViewportProps(),Ig),s=f.onViewportChange||e.onViewportChange||Mh,t=f.onViewStateChange||e.onViewStateChange||Mh,void(t({viewState:r}),s(r))},l(d)}}),function(){d&&d._clearWatch()}},[c.map]);var p=(0,i.useCallback)(function(){j&&(j.options=b.props,j.trigger())},[j]);(0,i.useEffect)(function(){a.auto&&p()},[j,a.auto]),(0,i.useEffect)(function(){j&&j._onZoom()},[c.viewport.zoom]);var q=a.className,r=a.label,s=a.disabledLabel,t=a.trackUserLocation,u=(0,i.useMemo)(function(){return(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Lh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Lh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a})({position:"absolute"},a.style)},[a.style]);return i.createElement("div",{style:u,className:q},i.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:d},i.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:e,disabled:!n,"aria-pressed":!t,type:"button",title:n?r:s,"aria-label":n?r:s,onClick:p},i.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}function Qh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Ph.propTypes=Nh,Ph.defaultProps=Oh,i.memo(Ph);var Rh=function(){},Sh=Object.assign({},gh,{className:j.string,style:j.object,onViewStateChange:j.func,onViewportChange:j.func,showCompass:j.bool,showZoom:j.bool,zoomInLabel:j.string,zoomOutLabel:j.string,compassLabel:j.string}),Th=Object.assign({},fh,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function Uh(a,b,c){var d=a.viewport,e=new Qc(Object.assign({},d,c)),f=Object.assign({},e.getViewportProps(),Ig),g=b.onViewportChange||a.onViewportChange||Rh,h=b.onViewStateChange||a.onViewStateChange||Rh;h({viewState:f}),g(f)}function Vh(a,b,c,d){return i.createElement("button",{key:a,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(a),type:"button",title:b,onClick:c},d||i.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function Wh(a){var b,c,d,e,f=hh(a),h=f.context,j=f.containerRef,k=a.className,l=a.showCompass,m=a.showZoom,n=a.zoomInLabel,o=a.zoomOutLabel,p=a.compassLabel,q=(0,i.useMemo)(function(){return(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Qh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Qh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a})({position:"absolute"},a.style)},[a.style]);return i.createElement("div",{style:q,className:k},i.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:j},m&&Vh("zoom-in",n,function(){Uh(h,a,{zoom:h.viewport.zoom+1})}),m&&Vh("zoom-out",o,function(){Uh(h,a,{zoom:h.viewport.zoom-1})}),l&&Vh("compass",p,function(){Uh(h,a,{bearing:0,pitch:0})},(b=h,c=(0,i.useMemo)(function(){return b.map?(function(a,b){for(var c=(a||"").split(".").map(Number),d=(b||"").split(".").map(Number),e=0;e<3;e++){var f=c[e]||0,g=d[e]||0;if(f<g)return -1;if(f>g)return 1}return 0})(b.map.version,"1.6.0")>=0?2:1:2},[b.map]),d=b.viewport.bearing,e={transform:"rotate(".concat(-d,"deg)")},2===c?i.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:e}):i.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:e})))))}function Xh(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}Wh.propTypes=Sh,Wh.defaultProps=Th,i.memo(Wh);var Yh=Object.assign({},gh,{className:j.string,style:j.object,maxWidth:j.number,unit:j.oneOf(["imperial","metric","nautical"])}),Zh=Object.assign({},fh,{className:"",maxWidth:100,unit:"metric"});function $h(a){var b=hh(a),c=b.context,d=b.containerRef,e=k((0,i.useState)(null),2),f=e[0],h=e[1];(0,i.useEffect)(function(){if(c.map){var a=new(Gc()).ScaleControl();a._map=c.map,a._container=d.current,h(a)}},[c.map]),f&&(f.options=a,f._onMove());var j=(0,i.useMemo)(function(){return(function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?Xh(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):Xh(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a})({position:"absolute"},a.style)},[a.style]);return i.createElement("div",{style:j,className:a.className},i.createElement("div",{ref:d,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}$h.propTypes=Yh,$h.defaultProps=Zh,i.memo($h);var _h="undefined"!=typeof window&&window.devicePixelRatio||1,ai=Object.assign({},gh,{redraw:j.func.isRequired});function bi(a){var b=hh(a),c=b.context,d=b.containerRef,e=k((0,i.useState)(null),2),f=e[0],g=e[1];(0,i.useEffect)(function(){g(d.current.getContext("2d"))},[]);var h=c.viewport,j=c.isDragging;return f&&(f.save(),f.scale(_h,_h),a.redraw({width:h.width,height:h.height,ctx:f,isDragging:j,project:h.project,unproject:h.unproject}),f.restore()),i.createElement("canvas",{ref:d,width:h.width*_h,height:h.height*_h,style:{width:"".concat(h.width,"px"),height:"".concat(h.height,"px"),position:"absolute",left:0,top:0}})}function ci(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}bi.propTypes=ai,bi.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};var di=Object.assign({},gh,{redraw:j.func.isRequired,style:j.object});function ei(a){var b=hh(a),c=b.context,d=b.containerRef,e=c.viewport,f=c.isDragging,h=function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?ci(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):ci(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}({position:"absolute",left:0,top:0,width:e.width,height:e.height},a.style);return i.createElement("div",{ref:d,style:h},a.redraw({width:e.width,height:e.height,isDragging:f,project:e.project,unproject:e.unproject}))}function fi(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}ei.propTypes=di,ei.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};var gi=Object.assign({},gh,{redraw:j.func.isRequired,style:j.object});function hi(a){var b=hh(a),c=b.context,d=b.containerRef,e=c.viewport,f=c.isDragging,h=function(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{};b%2?fi(Object(c),!0).forEach(function(b){g(a,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(c)):fi(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}return a}({position:"absolute",left:0,top:0},a.style);return i.createElement("svg",{width:e.width,height:e.height,ref:d,style:h},a.redraw({width:e.width,height:e.height,isDragging:f,project:e.project,unproject:e.unproject}))}hi.propTypes=gi,hi.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1},Gc()&&Gc().setRTLTextPlugin}}])