-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(es/minifier): Don't inline conditionally initialized vars #6751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc-bump:
- swc_ecma_minifier
@@ -643,7 +643,8 @@ impl ProgramData { | |||
if ctx.is_op_assign { | |||
e.usage_count += 1; | |||
} else if is_first { | |||
if e.ref_count == 1 | |||
if e.declared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Austaras It seems like this is required, but this change causes too many regression.
Any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being dealing with IRL issue lately. Would (hopefully) come back later next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to hear that, and no worries. It's not urgent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swc-bump:
- swc_ecma_minifier
@@ -1 +1 @@ | |||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{840:function(t,e,n){var r;!function(i,o,a,s){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),h=Math.round,p=Math.abs,f=Date.now;function d(t,e,n){return setTimeout(O(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var r;if(t){if(t.forEach)t.forEach(e,n);else if(s!==t.length)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}}function m(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}c="function"!=typeof Object.assign?function(t){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var b=m(function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&s===t[r[i]])&&(t[r[i]]=e[r[i]]),i++;return t},"extend","Use `assign`."),y=m(function(t,e){return b(t,e,!0)},"merge","Use `assign`.");function w(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&c(r,n)}function O(t,e){return function(){return t.apply(e,arguments)}}function E(t,e){return"function"==typeof t?t.apply(e&&e[0]||s,e):t}function _(t,e,n){g(S(e),function(e){t.addEventListener(e,n,!1)})}function P(t,e,n){g(S(e),function(e){t.removeEventListener(e,n,!1)})}function M(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function j(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return -1}function k(t){return Array.prototype.slice.call(t,0)}function x(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];0>T(i,a)&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}function D(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<u.length;){if((r=(n=u[o])?n+i:e)in t)return r;o++}}var C=1;function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var A="ontouchstart"in i,I=s!==D(i,"PointerEvent"),L=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N="touch",z="mouse",F=["x","y"],V=["clientX","clientY"];function B(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){E(t.options.enable,[t])&&n.handler(e)},this.init()}function Z(t,e,n){var r,i,o,a,c,u,l,h,d,v,g,m,b,y,w,O,E,_,P=n.pointers.length,j=n.changedPointers.length,S=1&e&&P-j==0;n.isFirst=!!S,n.isFinal=!!(12&e&&P-j==0),S&&(t.session={}),n.eventType=e,r=n,i=t.session,a=(o=r.pointers).length,i.firstInput||(i.firstInput=U(r)),a>1&&!i.firstMultiple?i.firstMultiple=U(r):1===a&&(i.firstMultiple=!1),c=i.firstInput,l=(u=i.firstMultiple)?u.center:c.center,h=r.center=q(o),r.timeStamp=f(),r.deltaTime=r.timeStamp-c.timeStamp,r.angle=X(l,h),r.distance=Y(l,h),d=i,g=(v=r).center,m=d.offsetDelta||{},b=d.prevDelta||{},y=d.prevInput||{},(1===v.eventType||4===y.eventType)&&(b=d.prevDelta={x:y.deltaX||0,y:y.deltaY||0},m=d.offsetDelta={x:g.x,y:g.y}),v.deltaX=b.x+(g.x-m.x),v.deltaY=b.y+(g.y-m.y),r.offsetDirection=W(r.deltaX,r.deltaY),w=H(r.deltaTime,r.deltaX,r.deltaY),r.overallVelocityX=w.x,r.overallVelocityY=w.y,r.overallVelocity=p(w.x)>p(w.y)?w.x:w.y,r.scale=u?(O=u.pointers,Y(o[0],o[1],V)/Y(O[0],O[1],V)):1,r.rotation=u?(E=u.pointers,X(o[1],o[0],V)+X(E[1],E[0],V)):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(c>25||s===a.velocity)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,h=H(c,u,l);r=h.x,i=h.y,n=p(h.x)>p(h.y)?h.x:h.y,o=W(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(i,r),_=t.element,M(r.srcEvent.target,_)&&(_=r.srcEvent.target),r.target=_,t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function U(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:q(e),deltaX:t.deltaX,deltaY:t.deltaY}}function q(t){var e=t.length;if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:h(n/e),y:h(r/e)}}function H(t,e,n){return{x:e/t||0,y:n/t||0}}function W(t,e){return t===e?1:p(t)>=p(e)?t<0?2:4:e<0?8:16}function Y(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function X(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]];return 180*Math.atan2(e[n[1]]-t[n[1]],r)/Math.PI}B.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(R(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4};function G(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,B.apply(this,arguments)}w(G,B,{handler:function(t){var e=K[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:z,srcEvent:t}))}});var $={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:N,3:"pen",4:z,5:"kinect"},Q="pointerdown",tt="pointermove pointerup pointercancel";function te(){this.evEl=Q,this.evWin=tt,B.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(Q="MSPointerDown",tt="MSPointerMove MSPointerUp MSPointerCancel"),w(te,B,{handler:function(t){var e=this.store,n=!1,r=$[t.type.toLowerCase().replace("ms","")],i=J[t.pointerType]||t.pointerType,o=T(e,t.pointerId,"pointerId");1&r&&(0===t.button||i==N)?o<0&&(e.push(t),o=e.length-1):12&r&&(n=!0),!(o<0)&&(e[o]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:i,srcEvent:t}),n&&e.splice(o,1))}});var tn={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function tr(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,B.apply(this,arguments)}function ti(t,e){var n=k(t.touches),r=k(t.changedTouches);return 12&e&&(n=x(n.concat(r),"identifier",!0)),[n,r]}w(tr,B,{handler:function(t){var e=tn[t.type];if(1===e&&(this.started=!0),this.started){var n=ti.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}});var to={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ta(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},B.apply(this,arguments)}function ts(t,e){var n=k(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=k(t.changedTouches),s=[],c=this.target;if(o=n.filter(function(t){return M(t.target,c)}),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&e&&delete r[a[i].identifier],i++;if(s.length)return[x(o.concat(s),"identifier",!0),s]}function tc(){B.apply(this,arguments);var t=O(this.handler,this);this.touch=new ta(this.manager,t),this.mouse=new G(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function tu(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,tl.call(this,e)):12&t&&tl.call(this,e)}function tl(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)},2500)}}function th(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}w(ta,B,{handler:function(t){var e=to[t.type],n=ts.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}),w(tc,B,{handler:function(t,e,n){var r=n.pointerType==N,i=n.pointerType==z;if(!i||!n.sourceCapabilities||!n.sourceCapabilities.firesTouchEvents){if(r)tu.call(this,e,n);else if(i&&th.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var tp=D(l.style,"touchAction"),tf=s!==tp,td="compute",tv="auto",tg="manipulation",tm="none",tb="pan-x",ty="pan-y",tw=function(){if(!tf)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||i.CSS.supports("touch-action",n)}),t}();function tO(t,e){this.manager=t,this.set(e)}function tE(t){var e;this.options=c({},this.defaults,t||{}),this.id=C++,this.manager=null,this.options.enable=s===(e=this.options.enable)||e,this.state=1,this.simultaneous={},this.requireFail=[]}function t_(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function tP(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function tM(t,e){var n=e.manager;return n?n.get(t):t}function tj(){tE.apply(this,arguments)}function tS(){tj.apply(this,arguments),this.pX=null,this.pY=null}function tT(){tj.apply(this,arguments)}function tk(){tE.apply(this,arguments),this._timer=null,this._input=null}function tx(){tj.apply(this,arguments)}function tD(){tj.apply(this,arguments)}function tC(){tE.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function tR(t,e){var n,r;return(e=e||{}).recognizers=(n=e.recognizers,r=tR.defaults.preset,s===n?r:n),new tA(t,e)}function tA(t,e){var n;this.options=c({},tR.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this.options.inputClass)?n:I?te:L?ta:A?tc:G)(this,Z),this.touchAction=new tO(this,this.options.touchAction),tI(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function tI(t,e){var n,r=t.element;r.style&&(g(t.options.cssProps,function(i,o){n=D(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}tO.prototype={set:function(t){t==td&&(t=this.compute()),tf&&this.manager.element.style&&tw[t]&&(this.manager.element.style[tp]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,function(e){E(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(j(t,tm))return tm;var e=j(t,tb),n=j(t,ty);return e&&n?tm:e||n?e?tb:ty:j(t,tg)?tg:tv}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented){e.preventDefault();return}var r=this.actions,i=j(r,tm)&&!tw[tm],o=j(r,ty)&&!tw[ty],a=j(r,tb)&&!tw[tb];if(i){var s=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(s&&c&&u)return}if((!a||!o)&&(i||o&&6&n||a&&24&n))return this.preventSrc(e)},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},tE.prototype={defaults:{},set:function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(v(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=tM(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return v(t,"dropRecognizeWith",this)||(t=tM(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(v(t,"requireFailure",this))return this;var e=this.requireFail;return -1===T(e,t=tM(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(v(t,"dropRequireFailure",this))return this;t=tM(t,this);var e=T(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+t_(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+t_(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=c({},t);if(!E(this.options.enable,[this,e])){this.reset(),this.state=32;return}56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},w(tj,tE,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:32}}),w(tS,tj,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(ty),24&t&&e.push(tb),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return tj.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tP(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(tT,tj,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[tm]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),w(tk,tE,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[tv]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,r&&n&&(!(12&t.eventType)||i)){if(1&t.eventType)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8}else this.reset();return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(tx,tj,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[tm]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),w(tD,tj,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return tS.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&p(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=tP(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(tC,tE,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[tg]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||Y(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=d(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=d(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))}}),tR.VERSION="2.0.7",tR.defaults={domEvents:!1,touchAction:td,enable:!0,inputTarget:null,inputClass:null,preset:[[tx,{enable:!1}],[tT,{enable:!1},["rotate"]],[tD,{direction:6}],[tS,{direction:6},["swipe"]],[tC],[tC,{event:"doubletap",taps:2},["tap"]],[tk]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},tA.prototype={set:function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e,n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var r=this.recognizers,i=n.curRecognizer;(!i||i&&8&i.state)&&(i=n.curRecognizer=null);for(var o=0;o<r.length;)e=r[o],2!==n.stopped&&(!i||e==i||e.canRecognizeWith(i))?e.recognize(t):e.reset(),!i&&14&e.state&&(i=n.curRecognizer=e),o++}},get:function(t){if(t instanceof tE)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(v(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(v(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=T(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(s!==t&&s!==e){var n=this.handlers;return g(S(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(s!==t){var n=this.handlers;return g(S(t),function(t){e?n[t]&&n[t].splice(T(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&((n=o.createEvent("Event")).initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n));var n,r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](e),i++}},destroy:function(){this.element&&tI(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(tR,{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:tA,Input:B,TouchAction:tO,TouchInput:ta,MouseInput:G,PointerEventInput:te,TouchMouseInput:tc,SingleTouchInput:tr,Recognizer:tE,AttrRecognizer:tj,Tap:tC,Pan:tS,Swipe:tD,Pinch:tT,Rotate:tx,Press:tk,on:_,off:P,each:g,merge:y,extend:b,assign:c,inherit:w,bindFn:O,prefixed:D}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=tR,s!==(r=(function(){return tR}).call(e,n,e,t))&&(t.exports=r)}(window,document,0)},3454:function(t,e,n){"use strict";var r,i;t.exports=(null===(r=n.g.process)||void 0===r?void 0:r.env)&&"object"==typeof(null===(i=n.g.process)||void 0===i?void 0:i.env)?n.g.process:n(7663)},7663:function(t){!function(){var e={162:function(t){var e,n,r,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(r){n=a}}();var c=[],u=!1,l=-1;function h(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&p())}function p(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(r=c,c=[];++l<e;)r&&r[l].run();l=-1,e=c.length}r=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(r){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}},a=!0;try{e[t](o,o.exports,r),a=!1}finally{a&&delete n[t]}return o.exports}r.ab="//";var i=r(162);t.exports=i}()},2703:function(t,e,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:function(t,e,n){t.exports=n(2703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6785:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{ZP:function(){return nr}});var s,c,u,l,h=n(7294),p=n(5697);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(c){s=!0,r=c}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}(t,e)||o(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d="undefined"!=typeof Float32Array?Float32Array:Array;function v(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function g(t,e){var n,r,i,o,a,s,c;const u=(n=[],r=e[0],i=e[1],o=e[2],a=e[3],n[0]=t[0]*r+t[4]*i+t[8]*o+t[12]*a,n[1]=t[1]*r+t[5]*i+t[9]*o+t[13]*a,n[2]=t[2]*r+t[6]*i+t[10]*o+t[14]*a,n[3]=t[3]*r+t[7]*i+t[11]*o+t[15]*a,n);return s=u,c=1/u[3],s[0]=u[0]*c,s[1]=u[1]*c,s[2]=u[2]*c,s[3]=u[3]*c,u}function m(t,e){const n=t%e;return n<0?e+n:n}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),s=new d(4),d!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0);const b=Math.log2||function(t){return Math.log(t)*Math.LOG2E};function y(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],p=e[9],f=e[10],d=e[11],v=e[12],g=e[13],m=e[14],b=e[15],y=n[0],w=n[1],O=n[2],E=n[3];return t[0]=y*r+w*s+O*h+E*v,t[1]=y*i+w*c+O*p+E*g,t[2]=y*o+w*u+O*f+E*m,t[3]=y*a+w*l+O*d+E*b,y=n[4],w=n[5],O=n[6],E=n[7],t[4]=y*r+w*s+O*h+E*v,t[5]=y*i+w*c+O*p+E*g,t[6]=y*o+w*u+O*f+E*m,t[7]=y*a+w*l+O*d+E*b,y=n[8],w=n[9],O=n[10],E=n[11],t[8]=y*r+w*s+O*h+E*v,t[9]=y*i+w*c+O*p+E*g,t[10]=y*o+w*u+O*f+E*m,t[11]=y*a+w*l+O*d+E*b,y=n[12],w=n[13],O=n[14],E=n[15],t[12]=y*r+w*s+O*h+E*v,t[13]=y*i+w*c+O*p+E*g,t[14]=y*o+w*u+O*f+E*m,t[15]=y*a+w*l+O*d+E*b,t}function w(t,e,n){var r,i,o,a,s,c,u,l,h,p,f,d,v=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*m+e[12],t[13]=e[1]*v+e[5]*g+e[9]*m+e[13],t[14]=e[2]*v+e[6]*g+e[10]*m+e[14],t[15]=e[3]*v+e[7]*g+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=r*v+s*g+h*m+e[12],t[13]=i*v+c*g+p*m+e[13],t[14]=o*v+u*g+f*m+e[14],t[15]=a*v+l*g+d*m+e[15]),t}function O(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function E(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],h=t[9],p=t[10],f=t[11],d=t[12],v=t[13],g=t[14],m=t[15],b=e[0],y=e[1],w=e[2],O=e[3],E=e[4],_=e[5],P=e[6],M=e[7],j=e[8],S=e[9],T=e[10],k=e[11],x=e[12],D=e[13],C=e[14],R=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-y)<=1e-6*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(i-w)<=1e-6*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-O)<=1e-6*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-_)<=1e-6*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-P)<=1e-6*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(u-M)<=1e-6*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(l-j)<=1e-6*Math.max(1,Math.abs(l),Math.abs(j))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(p-T)<=1e-6*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(f-k)<=1e-6*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(d-x)<=1e-6*Math.max(1,Math.abs(d),Math.abs(x))&&Math.abs(v-D)<=1e-6*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(m-R)<=1e-6*Math.max(1,Math.abs(m),Math.abs(R))}function _(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function P(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function M(t,e){if(!t)throw Error(e||"@math.gl/web-mercator: assertion failed.")}c=new d(2),d!=Float32Array&&(c[0]=0,c[1]=0),u=new d(3),d!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0);const j=Math.PI,S=j/4,T=j/180,k=180/j;function x(t){return Math.pow(2,t)}function D([t,e]){M(Number.isFinite(t)),M(Number.isFinite(e)&&e>=-90&&e<=90,"invalid latitude");const n=512*(j+Math.log(Math.tan(S+.5*(e*T))))/(2*j);return[512*(t*T+j)/(2*j),n]}function C([t,e]){const n=2*(Math.atan(Math.exp(e/512*(2*j)-j))-S);return[(t/512*(2*j)-j)*k,n*k]}function R(t){return 2*Math.atan(.5/t)*k}function A(t){return .5/Math.tan(.5*t*T)}function I(t,e,n=0){const[r,i,o]=t;if(M(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(o)){const a=g(e,[r,i,o,1]);return a}const s=g(e,[r,i,0,1]),c=g(e,[r,i,1,1]),u=s[2],l=c[2];return P([],s,c,u===l?0:((n||0)-u)/(l-u))}const L=Math.PI/180;function N(t,e,n){const{pixelUnprojectionMatrix:r}=t,i=g(r,[e,0,1,1]),o=g(r,[e,t.height,1,1]),a=n*t.distanceScales.unitsPerMeter[2],s=(a-i[2])/(o[2]-i[2]),c=P([],i,o,s),u=C(c);return u[2]=n,u}class z{constructor({width:t,height:e,latitude:n=0,longitude:r=0,zoom:i=0,pitch:o=0,bearing:a=0,altitude:s=null,fovy:c=null,position:u=null,nearZMultiplier:l=.02,farZMultiplier:h=1.01}={width:1,height:1}){t=t||1,e=e||1,null===c&&null===s?c=R(s=1.5):null===c?c=R(s):null===s&&(s=A(c));const p=x(i);s=Math.max(.75,s);const f=function({latitude:t,longitude:e,highPrecision:n=!1}){M(Number.isFinite(t)&&Number.isFinite(e));const r={},i=Math.cos(t*T),o=512/360,a=o/i,s=512/4003e4/i;if(r.unitsPerMeter=[s,s,s],r.metersPerUnit=[1/s,1/s,1/s],r.unitsPerDegree=[o,a,s],r.degreesPerUnit=[1/o,1/a,1/s],n){const c=T*Math.tan(t*T)/i,u=512/4003e4*c,l=u/a*s;r.unitsPerDegree2=[0,o*c/2,u],r.unitsPerMeter2=[l,0,l]}return r}({longitude:r,latitude:n}),d=D([r,n]);if(d[2]=0,u){var g,m,b;b=d,g=[],m=f.unitsPerMeter,g[0]=u[0]*m[0],g[1]=u[1]*m[1],g[2]=u[2]*m[2],b[0]=d[0]+g[0],b[1]=d[1]+g[1],b[2]=d[2]+g[2]}this.projectionMatrix=function({width:t,height:e,pitch:n,altitude:r,fovy:i,nearZMultiplier:o,farZMultiplier:a}){var s,c,u;const{fov:l,aspect:h,near:p,far:f}=function({width:t,height:e,fovy:n=R(1.5),altitude:r,pitch:i=0,nearZMultiplier:o=1,farZMultiplier:a=1}){void 0!==r&&(n=R(r));const s=.5*n*T,c=A(n),u=i*T,l=Math.sin(s)*c/Math.sin(Math.min(Math.max(Math.PI/2-u-s,.01),Math.PI-.01)),h=Math.sin(u)*l+c;return{fov:2*s,aspect:t/e,focalDistance:c,near:o,far:h*a}}({width:t,height:e,altitude:r,fovy:i,pitch:n,nearZMultiplier:o,farZMultiplier:a}),d=(s=[],u=1/Math.tan(l/2),s[0]=u/h,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=-1,s[12]=0,s[13]=0,s[15]=0,null!=f&&f!==1/0?(c=1/(p-f),s[10]=(f+p)*c,s[14]=2*f*p*c):(s[10]=-1,s[14]=-2*p),s);return d}({width:t,height:e,pitch:o,fovy:c,nearZMultiplier:l,farZMultiplier:h}),this.viewMatrix=function({height:t,pitch:e,bearing:n,altitude:r,scale:i,center:o=null}){var a,s,c,u,l,h,p,f,d,g,m,b,y,E,_,P,M,j,S,k,x,D,C,R,A;const I=v();return w(I,I,[0,0,-r]),a=I,c=Math.sin(s=-e*T),u=Math.cos(s),l=I[4],h=I[5],p=I[6],f=I[7],d=I[8],g=I[9],m=I[10],b=I[11],I!==a&&(a[0]=I[0],a[1]=I[1],a[2]=I[2],a[3]=I[3],a[12]=I[12],a[13]=I[13],a[14]=I[14],a[15]=I[15]),a[4]=l*u+d*c,a[5]=h*u+g*c,a[6]=p*u+m*c,a[7]=f*u+b*c,a[8]=d*u-l*c,a[9]=g*u-h*c,a[10]=m*u-p*c,a[11]=b*u-f*c,y=I,_=Math.sin(E=n*T),P=Math.cos(E),M=I[0],j=I[1],S=I[2],k=I[3],x=I[4],D=I[5],C=I[6],R=I[7],I!==y&&(y[8]=I[8],y[9]=I[9],y[10]=I[10],y[11]=I[11],y[12]=I[12],y[13]=I[13],y[14]=I[14],y[15]=I[15]),y[0]=M*P+x*_,y[1]=j*P+D*_,y[2]=S*P+C*_,y[3]=k*P+R*_,y[4]=x*P-M*_,y[5]=D*P-j*_,y[6]=C*P-S*_,y[7]=R*P-k*_,O(I,I,[i/=t,i,i]),o&&w(I,I,((A=[])[0]=-o[0],A[1]=-o[1],A[2]=-o[2],A)),I}({height:e,scale:p,center:d,pitch:o,bearing:a,altitude:s}),this.width=t,this.height=e,this.scale=p,this.latitude=n,this.longitude=r,this.zoom=i,this.pitch=o,this.bearing=a,this.altitude=s,this.fovy=c,this.center=d,this.meterOffset=u||[0,0,0],this.distanceScales=f,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 t,e,n,r,i,o,a,s,c,u,l,h,p,f,d,g,m,b,E,_,P,M,j,S,T,k,x,D,C,R;const{width:A,height:I,projectionMatrix:L,viewMatrix:N}=this,z=v();y(z,z,L),y(z,z,N),this.viewProjectionMatrix=z;const F=v();O(F,F,[A/2,-I/2,1]),w(F,F,[1,-1,0]),y(F,F,z);const V=(t=v(),e=F[0],n=F[1],r=F[2],i=F[3],o=F[4],a=F[5],s=F[6],c=F[7],u=F[8],l=F[9],h=F[10],p=F[11],f=F[12],d=F[13],g=F[14],m=F[15],b=e*a-n*o,E=e*s-r*o,_=e*c-i*o,P=n*s-r*a,M=n*c-i*a,j=r*c-i*s,S=u*d-l*f,T=u*g-h*f,k=u*m-p*f,x=l*g-h*d,D=l*m-p*d,(R=b*(C=h*m-p*g)-E*D+_*x+P*k-M*T+j*S)?(R=1/R,t[0]=(a*C-s*D+c*x)*R,t[1]=(r*D-n*C-i*x)*R,t[2]=(d*j-g*M+m*P)*R,t[3]=(h*M-l*j-p*P)*R,t[4]=(s*k-o*C-c*T)*R,t[5]=(e*C-r*k+i*T)*R,t[6]=(g*_-f*j-m*E)*R,t[7]=(u*j-h*_+p*E)*R,t[8]=(o*D-a*k+c*S)*R,t[9]=(n*k-e*D-i*S)*R,t[10]=(f*M-d*_+m*b)*R,t[11]=(l*_-u*M-p*b)*R,t[12]=(a*T-o*x-s*S)*R,t[13]=(e*x-n*T+r*S)*R,t[14]=(d*E-f*P-g*b)*R,t[15]=(u*P-l*E+h*b)*R,t):null);if(!V)throw Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=F,this.pixelUnprojectionMatrix=V}equals(t){return t instanceof z&&t.width===this.width&&t.height===this.height&&E(t.projectionMatrix,this.projectionMatrix)&&E(t.viewMatrix,this.viewMatrix)}project(t,{topLeft:e=!0}={}){const n=this.projectPosition(t),r=function(t,e){const[n,r,i=0]=t;return M(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),g(e,[n,r,i,1])}(n,this.pixelProjectionMatrix),[i,o]=r,a=e?o:this.height-o;return 2===t.length?[i,a]:[i,a,r[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,a=e?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],c=I([r,a,o],this.pixelUnprojectionMatrix,s),[u,l,h]=this.unprojectPosition(c);return Number.isFinite(o)?[u,l,h]:Number.isFinite(n)?[u,l,n]:[u,l]}projectPosition(t){const[e,n]=D(t),r=(t[2]||0)*this.distanceScales.unitsPerMeter[2];return[e,n,r]}unprojectPosition(t){const[e,n]=C(t),r=(t[2]||0)*this.distanceScales.metersPerUnit[2];return[e,n,r]}projectFlat(t){return D(t)}unprojectFlat(t){return C(t)}getMapCenterByLngLatPosition({lngLat:t,pos:e}){var n;const r=I(e,this.pixelUnprojectionMatrix),i=D(t),o=_([],i,((n=[])[0]=-r[0],n[1]=-r[1],n)),a=_([],this.center,o);return C(a)}getLocationAtPoint({lngLat:t,pos:e}){return this.getMapCenterByLngLatPosition({lngLat:t,pos:e})}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=function({width:t,height:e,bounds:n,minExtent:r=0,maxZoom:i=24,padding:o=0,offset:a=[0,0]}){const[[s,c],[u,l]]=n;if(Number.isFinite(o)){const h=o;o={top:h,bottom:h,left:h,right:h}}else M(Number.isFinite(o.top)&&Number.isFinite(o.bottom)&&Number.isFinite(o.left)&&Number.isFinite(o.right));const p=D([s,l<-85.051129?-85.051129:l>85.051129?85.051129:l]),f=D([u,c<-85.051129?-85.051129:c>85.051129?85.051129:c]),d=[Math.max(Math.abs(f[0]-p[0]),r),Math.max(Math.abs(f[1]-p[1]),r)],v=[t-o.left-o.right-2*Math.abs(a[0]),e-o.top-o.bottom-2*Math.abs(a[1])];M(v[0]>0&&v[1]>0);const g=v[0]/d[0],m=v[1]/d[1],y=(o.right-o.left)/2/g,w=(o.bottom-o.top)/2/m,O=[(f[0]+p[0])/2+y,(f[1]+p[1])/2+w],E=C(O),_=Math.min(i,b(Math.abs(Math.min(g,m))));return M(Number.isFinite(_)),{longitude:E[0],latitude:E[1],zoom:_}}(Object.assign({width:n,height:r,bounds:t},e));return new z({width:n,height:r,longitude:i,latitude:o,zoom:a})}getBounds(t){const e=this.getBoundingRegion(t),n=Math.min(...e.map(t=>t[0])),r=Math.max(...e.map(t=>t[0])),i=Math.min(...e.map(t=>t[1])),o=Math.max(...e.map(t=>t[1]));return[[n,i],[r,o]]}getBoundingRegion(t={}){return function(t,e=0){let n,r;const{width:i,height:o,unproject:a}=t,s={targetZ:e},c=a([0,o],s),u=a([i,o],s),l=t.fovy?.5*t.fovy*L:Math.atan(.5/t.altitude),h=(90-t.pitch)*L;return l>h-.01?(n=N(t,0,e),r=N(t,i,e)):(n=a([0,0],s),r=a([i,0],s)),[c,u,r,n]}(this,t.z||0)}}const F=["longitude","latitude","zoom"],V={curve:1.414,speed:1.2};function B(t,e,n){var r;n=Object.assign({},V,n);const i=n.curve,o=t.zoom,a=[t.longitude,t.latitude],s=x(o),c=e.zoom,u=[e.longitude,e.latitude],l=x(c-o),h=D(a),p=D(u),f=((r=[])[0]=p[0]-h[0],r[1]=p[1]-h[1],r),d=Math.max(t.width,t.height),v=d/l,g=Math.hypot(f[0],f[1])*s,m=Math.max(g,.01),b=i*i,y=(v*v-d*d+b*b*m*m)/(2*d*b*m),w=(v*v-d*d-b*b*m*m)/(2*v*b*m),O=Math.log(Math.sqrt(y*y+1)-y),E=Math.log(Math.sqrt(w*w+1)-w);return{startZoom:o,startCenterXY:h,uDelta:f,w0:d,u1:g,S:(E-O)/i,rho:i,rho2:b,r0:O,r1:E}}var Z=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),U="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,q=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),H="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(q):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},W=["top","right","bottom","left","width","height","size","weight"],Y="undefined"!=typeof MutationObserver,X=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){H(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,20);i=t}return s}(this.refresh.bind(this),0)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){U&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Y?(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)},t.prototype.disconnect_=function(){U&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;W.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),K=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},G=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||q},$=te(0,0,0,0);function J(t){return parseFloat(t)||0}function Q(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+J(t["border-"+n+"-width"])},0)}var tt="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof G(t).SVGGraphicsElement}:function(t){return t instanceof G(t).SVGElement&&"function"==typeof t.getBBox};function te(t,e,n,r){return{x:t,y:e,width:n,height:r}}var tn=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=te(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=function(t){if(!U)return $;if(tt(t)){var e;return te(0,0,(e=t.getBBox()).width,e.height)}return function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return $;var r=G(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=J(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=J(r.width),c=J(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Q(r,"left","right")+o),Math.round(c+a)!==n&&(c-=Q(r,"top","bottom")+a)),t!==G(t).document.documentElement){var u=Math.round(s+o)-e,l=Math.round(c+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(l)&&(c-=l)}return te(i.left,i.top,s,c)}(t)}(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),tr=function(t,e){var n,r,i,o,a,s=(n=e.x,r=e.y,i=e.width,o=e.height,K(a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:i,height:o,top:r,right:n+i,bottom:o+r,left:n}),a);K(this,{target:t,contentRect:s})},ti=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new Z,"function"!=typeof t)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof G(t).Element))throw TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new tn(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof G(t).Element))throw TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new tr(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),to="undefined"!=typeof WeakMap?new WeakMap:new Z,ta=function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=X.getInstance(),r=new ti(e,n,this);to.set(this,r)};["observe","unobserve","disconnect"].forEach(function(t){ta.prototype[t]=function(){var e;return(e=to.get(this))[t].apply(e,arguments)}});var ts=void 0!==q.ResizeObserver?q.ResizeObserver:ta;function tc(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tl(t,e,n){return e&&tu(t.prototype,e),n&&tu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}"undefined"!=typeof window?window:n.g,void 0!==n.g?n.g:window;var th="undefined"!=typeof document?document:{};function tp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tp(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function td(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return tv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tv(t,e)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function tv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var tg=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function tm(t){if(!t)return null;if("string"==typeof t)return t;t.toJS&&(t=t.toJS());var e,n={},r=td(t.layers);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.id]=i}}catch(o){r.e(o)}finally{r.f()}var a=t.layers.map(function(t){var e=n[t.ref],r=null;if("interactive"in t&&delete(r=tf({},t)).interactive,e){delete(r=r||tf({},t)).ref;var i,o=td(tg);try{for(o.s();!(i=o.n()).done;){var a=i.value;a in e&&(r[a]=e[a])}}catch(s){o.e(s)}finally{o.f()}}return r||t});return tf(tf({},t),{},{layers:a})}var tb=n(3454),ty={container:p.object,gl:p.object,mapboxApiAccessToken:p.string,mapboxApiUrl:p.string,attributionControl:p.bool,preserveDrawingBuffer:p.bool,reuseMaps:p.bool,transformRequest:p.func,mapOptions:p.object,mapStyle:p.oneOfType([p.string,p.object]),preventStyleDiffing:p.bool,visible:p.bool,asyncRender:p.bool,onLoad:p.func,onError:p.func,width:p.number,height:p.number,viewState:p.object,longitude:p.number,latitude:p.number,zoom:p.number,bearing:p.number,pitch:p.number,altitude:p.number},tw={container:th.body,mapboxApiAccessToken:function(){var t=null;if("undefined"!=typeof window&&window.location){var e=window.location.search.match(/access_token=([^&\/]*)/);t=e&&e[1]}return t||void 0===tb||(t=t||tb.env.MapboxAccessToken||tb.env.REACT_APP_MAPBOX_ACCESS_TOKEN),t||"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(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function tO(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&p.checkPropTypes(ty,t,"prop",e)}var tE=function(){function t(e){var n=this;if(tc(this,t),a(this,"props",tw),a(this,"width",0),a(this,"height",0),a(this,"_fireLoadEvent",function(){n.props.onLoad({type:"load",target:n._map})}),a(this,"_handleError",function(t){n.props.onError(t)}),!e.mapboxgl)throw Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return tl(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(tm(e.mapStyle),{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:tm(e.mapStyle),interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",this._fireLoadEvent),this._map.on("error",this._handleError)}return this}},{key:"_destroy",value:function(){this._map&&(this.props.reuseMaps&&!t.savedMap?(t.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(t){var e=this;tO(t=Object.assign({},tw,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||tw.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{configurable:!0,get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{configurable:!0,get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){tO(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);this._updateMapStyle(t,e),!e.asyncRender&&(n||r)&&this.redraw(),this.props=e}}},{key:"_updateMapStyle",value:function(t,e){t.mapStyle!==e.mapStyle&&this._map.setStyle(tm(e.mapStyle),{diff:!e.preventStyleDiffing})}},{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this._map.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,a=e.bearing,s=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:void 0===o?0:o,bearing:void 0===a?0:a,altitude:void 0===s?1.5:s}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==th)try{var e=th.createElement("div");if(e.className="mapboxgl-map",e.style.display="none",th.body.appendChild(e),!("static"!==window.getComputedStyle(e).position)){var n=th.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),th.head.appendChild(n)}}catch(r){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();a(tE,"initialized",!1),a(tE,"propTypes",ty),a(tE,"defaultProps",tw),a(tE,"savedMap",null);var t_=n(6158),tP=n.n(t_);function tM(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function tj(t,e,n){return Math.max(e,Math.min(n,t))}function tS(t,e,n){return tM(t)?t.map(function(t,r){return tS(t,e[r],n)}):n*e+(1-n)*t}function tT(t,e){if(!t)throw Error(e||"react-map-gl: assertion failed.")}function tk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tk(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tD={minZoom:0,maxZoom:24,minPitch:0,maxPitch:85},tC={pitch:0,bearing:0,altitude:1.5},tR=function(){function t(e){var n=e.width,r=e.height,i=e.latitude,o=e.longitude,a=e.zoom,s=e.bearing,c=void 0===s?tC.bearing:s,u=e.pitch,l=void 0===u?tC.pitch:u,h=e.altitude,p=void 0===h?tC.altitude:h,f=e.maxZoom,d=void 0===f?tD.maxZoom:f,v=e.minZoom,g=void 0===v?tD.minZoom:v,m=e.maxPitch,b=void 0===m?tD.maxPitch:m,y=e.minPitch,w=void 0===y?tD.minPitch:y,O=e.transitionDuration,E=e.transitionEasing,_=e.transitionInterpolator,P=e.transitionInterruption,M=e.startPanLngLat,j=e.startZoomLngLat,S=e.startRotatePos,T=e.startBearing,k=e.startPitch,x=e.startZoom;tc(this,t),tT(Number.isFinite(n),"`width` must be supplied"),tT(Number.isFinite(r),"`height` must be supplied"),tT(Number.isFinite(o),"`longitude` must be supplied"),tT(Number.isFinite(i),"`latitude` must be supplied"),tT(Number.isFinite(a),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:i,longitude:o,zoom:a,bearing:c,pitch:l,altitude:p,maxZoom:d,minZoom:g,maxPitch:b,minPitch:w,transitionDuration:O,transitionEasing:E,transitionInterpolator:_,transitionInterruption:P}),this._state={startPanLngLat:M,startZoomLngLat:j,startRotatePos:S,startBearing:T,startPitch:k,startZoom:x}}return tl(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._state.startPanLngLat||this._unproject(n);if(!r)return this;var i=f(this._calculateNewLngLat({startPanLngLat:r,pos:e}),2),o=i[0],a=i[1];return this._getUpdatedMapState({longitude:o,latitude:a})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startRotatePos:e,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e,n=t.pos,r=t.deltaAngleX,i=t.deltaAngleY,o=this._state,a=o.startRotatePos,s=o.startBearing,c=o.startPitch;return Number.isFinite(s)&&Number.isFinite(c)?(e=n?this._calculateNewPitchAndBearing(tx(tx({},this._getRotationParams(n,a)),{},{startBearing:s,startPitch:c})):{bearing:s+(void 0===r?0:r),pitch:c+(void 0===i?0:i)},this._getUpdatedMapState(e)):this}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale;tT(r>0,"`scale` must be a positive number");var i=this._state,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(e)),tT(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),c=f(new z(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),2),u=c[0],l=c[1];return this._getUpdatedMapState({zoom:s,longitude:u,latitude:l})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(e){return new t(Object.assign({},this._viewportProps,this._state,e))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=tj(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;return t.pitch=tj(a,o,i),Object.assign(t,function({width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:o=0,bearing:a=0}){(n<-180||n>180)&&(n=m(n+180,360)-180),(a<-180||a>180)&&(a=m(a+180,360)-180);const s=b(e/512);if(i<=s)i=s,r=0;else{const c=e/2/Math.pow(2,i),u=C([0,c])[1];if(r<u)r=u;else{const l=C([0,512-c])[1];r>l&&(r=l)}}return{width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:o,bearing:a}}(t)),t}},{key:"_unproject",value:function(t){var e=new z(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new z(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom;return tj(n+Math.log2(e),r.minZoom,i)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=t.startBearing,i=t.startPitch;n=tj(n,-1,1);var o=this._viewportProps,a=o.minPitch,s=o.maxPitch,c=i;return n>0?c=i+n*(s-i):n<0&&(c=i-n*(a-i)),{pitch:c,bearing:r+180*e}}},{key:"_getRotationParams",value:function(t,e){var n=t[0]-e[0],r=t[1]-e[1],i=t[1],o=e[1],a=this._viewportProps,s=a.width,c=a.height,u=0;return r>0?Math.abs(c-o)>5&&(u=r/(o-c)*1.2):r<0&&o>5&&(u=1-i/o),{deltaScaleX:n/s,deltaScaleY:u=Math.min(1,Math.max(-1,u))}}}]),t}();function tA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tA(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tL=(0,h.createContext)({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),tN=tL.Provider;tL.Provider=function(t){var e=t.value,n=t.children,r=f((0,h.useState)(null),2),i=r[0],o=r[1],a=(0,h.useContext)(tL);return e=tI(tI({setMap:o},a),{},{map:a&&a.map||i},e),h.createElement(tN,{value:e},n)};var tz="undefined"!=typeof window?h.useLayoutEffect:h.useEffect;function tF(t,e){var n=e.longitude,r=e.latitude;return t&&t.queryTerrainElevation&&t.queryTerrainElevation([n,r])||0}function tV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tB(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tV(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tV(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tZ="A valid API access token is required to use Mapbox data";function tU(t){var e=t.map,n=t.props,r=t.width,i=t.height,o=tB(tB(tB({},n),n.viewState),{},{width:r,height:i});return o.position=[0,0,tF(e,o)],new z(o)}var tq={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},tH=Object.assign({},tE.propTypes,{width:p.oneOfType([p.number,p.string]),height:p.oneOfType([p.number,p.string]),onResize:p.func,disableTokenWarning:p.bool,visible:p.bool,className:p.string,style:p.object,visibilityConstraints:p.object}),tW=Object.assign({},tE.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:tD});function tY(){return h.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},h.createElement("h3",{key:"header"},tZ),h.createElement("div",{key:"text"},"For information on setting up your basemap, read"),h.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}var tX=(0,h.forwardRef)(function(t,e){var n=f((0,h.useState)(!0),2),r=n[0],i=n[1],o=f((0,h.useState)({width:0,height:0}),2),a=o[0],s=o[1],c=(0,h.useRef)(null),u=(0,h.useRef)(null),l=(0,h.useRef)(null),p=(0,h.useRef)(null),d=(0,h.useContext)(tL);tz(function(){if(tX.supported()){var e=new tE(tB(tB(tB({},t),a),{},{mapboxgl:tP(),container:u.current,onError:function(e){401===(e.error&&e.error.status||e.status)&&r&&(console.error(tZ),i(!1)),t.onError(e)}}));c.current=e,d&&d.setMap&&d.setMap(e.getMap());var n=new ts(function(e){if(e[0].contentRect){var n=e[0].contentRect,r=n.width,i=n.height;s({width:r,height:i}),t.onResize({width:r,height:i})}});return n.observe(l.current),function(){e.finalize(),c.current=null,n.disconnect()}}},[]),tz(function(){c.current&&c.current.setProps(tB(tB({},t),a))});var v=c.current&&c.current.getMap();(0,h.useImperativeHandle)(e,function(){return{getMap:function(){return c.current&&c.current.getMap()},queryRenderedFeatures:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c.current&&c.current.getMap();return n&&n.queryRenderedFeatures(t,e)}}},[]);var g=(0,h.useCallback)(function(t){var e=t.target;e===p.current&&e.scrollTo(0,0)},[]),m=v&&h.createElement(tN,{value:tB(tB({},d),{},{viewport:d.viewport||tU(tB({map:v,props:t},a)),map:v,container:d.container||l.current})},h.createElement("div",{key:"map-overlays",className:"overlays",ref:p,style:tq,onScroll:g},t.children)),b=t.className,y=t.width,w=t.height,O=t.style,E=t.visibilityConstraints,_=Object.assign({position:"relative"},O,{width:y,height:w}),P=Object.assign({},tq,{visibility:t.visible&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tD;for(var n in e){var r,i=n.slice(0,3),o=(r=n.slice(3))[0].toLowerCase()+r.slice(1);if("min"===i&&t[o]<e[n]||"max"===i&&t[o]>e[n])return!1}return!0}(t.viewState||t,E)?"inherit":"hidden"});return h.createElement("div",{key:"map-container",ref:l,style:_},h.createElement("div",{key:"map-mapbox",ref:u,style:P,className:b}),m,!r&&!t.disableTokenWarning&&h.createElement(tY,null))});function tK(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}tX.supported=function(){return tP()&&tP().supported()},tX.propTypes=tH,tX.defaultProps=tW;var tG=function(){function t(){tc(this,t),a(this,"propNames",[])}return tl(t,[{key:"arePropsEqual",value:function(t,e){var n,r=function(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return tK(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tK(t,e)}}(t))){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}(this.propNames||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!function t(e,n){if(e===n)return!0;if(tM(e)&&tM(n)){if(e.length!==n.length)return!1;for(var r=0;r<e.length;++r)if(!t(e[r],n[r]))return!1;return!0}return 1e-7>=Math.abs(e-n)}(t[i],e[i]))return!1}}catch(o){r.e(o)}finally{r.f()}return!0}},{key:"initializeProps",value:function(t,e){return{start:t,end:e}}},{key:"interpolateProps",value:function(t,e,n){tT(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(t,e){return e.transitionDuration}}]),t}();function t$(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tJ(t,e){return(tJ=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tQ(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tJ(t,e)}function t0(t){return(t0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function t1(t,e){if(e&&("object"===t0(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return t$(t)}function t2(t){return(t2=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var t4={longitude:1,bearing:1};function t5(t){return Number.isFinite(t)||Array.isArray(t)}function t3(t,e,n){return t in t4&&Math.abs(n-e)>180&&(n=n<0?n+360:n-360),n}function t8(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return t6(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t6(t,e)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function t6(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var t9=["longitude","latitude","zoom","bearing","pitch"],t7=["latitude","longitude","zoom","width","height"],et=["bearing","pitch"],ee={speed:1.2,curve:1.414};function en(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return er(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return er(t,e)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function er(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}!function(t){tQ(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(r);if(e){var i=t2(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return t1(this,t)});function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tc(this,r),a(t$(t=n.call(this)),"propNames",t9),t.props=Object.assign({},ee,e),t}tl(r,[{key:"initializeProps",value:function(t,e){var n,r={},i={},o=t8(t7);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=t[a],c=e[a];tT(t5(s)&&t5(c),"".concat(a," must be supplied for transition")),r[a]=s,i[a]=t3(a,s,c)}}catch(u){o.e(u)}finally{o.f()}var l,h=t8(et);try{for(h.s();!(l=h.n()).done;){var p=l.value,f=t[p]||0,d=e[p]||0;r[p]=f,i[p]=t3(p,f,d)}}catch(v){h.e(v)}finally{h.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(t,e,n){var r,i=function(t,e,n,r={}){var i;const o={},{startZoom:a,startCenterXY:s,uDelta:c,w0:u,u1:l,S:h,rho:p,rho2:f,r0:d}=B(t,e,r);if(l<.01){for(const v of F){const g=t[v],m=e[v];o[v]=n*m+(1-n)*g}return o}const y=n*h,w=Math.cosh(d)/Math.cosh(d+p*y),O=u*((Math.cosh(d)*Math.tanh(d+p*y)-Math.sinh(d))/f)/l,E=a+b(1/w),P=((i=[])[0]=c[0]*O,i[1]=c[1]*O,i);_(P,P,s);const M=C(P);return o.longitude=M[0],o.latitude=M[1],o.zoom=E,o}(t,e,n,this.props),o=t8(et);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=tS(t[a],e[a],n)}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=function(t,e,n={}){let r;n=Object.assign({},V,n);const{screenSpeed:i,speed:o,maxDuration:a}=n,{S:s,rho:c}=B(t,e,n),u=1e3*s;return r=Number.isFinite(i)?u/(i/c):u/o,Number.isFinite(a)&&r>a?0:r}(t,e,this.props)),n}}])}(tG);var ei=["longitude","latitude","zoom","bearing","pitch"],eo=function(t){tQ(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(r);if(e){var i=t2(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return t1(this,t)});function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tc(this,r),t=n.call(this),Array.isArray(e)&&(e={transitionProps:e}),t.propNames=e.transitionProps||ei,e.around&&(t.around=e.around),t}return tl(r,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new z(t).unproject(this.around);Object.assign(r,e,{around:new z(e).project(i),aroundLngLat:i})}var o,a=en(this.propNames);try{for(a.s();!(o=a.n()).done;){var s=o.value,c=t[s],u=e[s];tT(t5(c)&&t5(u),"".concat(s," must be supplied for transition")),n[s]=c,r[s]=t3(s,c,u)}}catch(l){a.e(l)}finally{a.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=en(this.propNames);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=tS(t[a],e[a],n)}}catch(s){o.e(s)}finally{o.f()}if(e.around){var c=f(new z(Object.assign({},e,i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:tS(t.around,e.around,n)}),2),u=c[0],l=c[1];i.longitude=u,i.latitude=l}return i}}]),r}(tG),ea=function(){},es={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},ec={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new eo,transitionInterruption:es.BREAK,onTransitionStart:ea,onTransitionInterrupt:ea,onTransitionEnd:ea},eu=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tc(this,t),a(this,"_animationFrame",null),a(this,"_onTransitionFrame",function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()}),this.props=null,this.onViewportChange=n.onViewportChange||ea,this.onStateChange=n.onStateChange||ea,this.time=n.getTime||Date.now}return tl(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(t){var e=this.props;if(this.props=t,!e||this._shouldIgnoreViewportChange(e,t))return!1;if(this._isTransitionEnabled(t)){var n=Object.assign({},e),r=Object.assign({},t);if(this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this.state.interruption===es.SNAP_TO_END?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===es.UPDATE)){var i,o,a=this.time(),s=(a-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(a-this.state.startTime),r.transitionEasing=(o=(i=this.state.easing)(s),function(t){return 1/(1-o)*(i(t*(1-s)+s)-o)}),r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,n=t.transitionInterpolator;return(e>0||"auto"===e)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(t,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return!t||(this._isTransitionInProgress()?this.state.interruption===es.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){tT(this._isTransitionEnabled(e)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=e.transitionInterpolator,r=n.getDuration?n.getDuration(t,e):e.transitionDuration;if(0!==r){var i=e.transitionInterpolator.initializeProps(t,e),o={inTransition:!0,isZooming:t.zoom!==e.zoom,isPanning:t.longitude!==e.longitude||t.latitude!==e.latitude,isRotating:t.bearing!==e.bearing||t.pitch!==e.pitch};this.state={duration:r,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startTime:this.time(),startProps:i.start,endProps:i.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(o)}}},{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 t=this.time(),e=this.state,n=e.startTime,r=e.duration,i=e.easing,o=e.interpolator,a=e.startProps,s=e.endProps,c=!1,u=(t-n)/r;u>=1&&(u=1,c=!0),u=i(u);var l=o.interpolateProps(a,s,u),h=new tR(Object.assign({},this.props,l));this.state.propsInTransition=h.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),c&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();a(eu,"defaultProps",ec);var el=n(840),eh=n.n(el);const ep={mousedown:1,mousemove:2,mouseup:4};!function(t){const e=t.prototype.handler;t.prototype.handler=function(t){const n=this.store;t.button>0&&"pointerdown"===t.type&&!function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(n,e=>e.pointerId===t.pointerId)&&n.push(t),e.call(this,t)}}(eh().PointerEventInput),eh().MouseInput.prototype.handler=function(t){let e=ep[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};const ef=eh().Manager;var ed=eh();const ev=ed?[[ed.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[ed.Rotate,{enable:!1}],[ed.Pinch,{enable:!1}],[ed.Swipe,{enable:!1}],[ed.Pan,{threshold:0,enable:!1}],[ed.Press,{enable:!1}],[ed.Tap,{event:"doubletap",taps:2,enable:!1}],[ed.Tap,{event:"anytap",enable:!1}],[ed.Tap,{enable:!1}]]:null,eg={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},em={doubletap:["tap"]},eb={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},ey={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},ew={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"},eO={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},eE="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",e_="undefined"!=typeof window?window:n.g;void 0!==n.g?n.g:window;let eP=!1;try{const eM={get passive(){return eP=!0,!0}};e_.addEventListener("test",eM,eM),e_.removeEventListener("test",eM,eM)}catch(ej){}const eS=-1!==eE.indexOf("firefox"),{WHEEL_EVENTS:eT}=ey,ek="wheel";class ex{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.events=eT.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(e=>t.addEventListener(e,this.handleEvent,!!eP&&{passive:!1}))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===ek&&(this.options.enable=e)}handleEvent(t){if(!this.options.enable)return;let e=t.deltaY;e_.WheelEvent&&(eS&&t.deltaMode===e_.WheelEvent.DOM_DELTA_PIXEL&&(e/=e_.devicePixelRatio),t.deltaMode===e_.WheelEvent.DOM_DELTA_LINE&&(e*=40));const n={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625==0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}_onWheel(t,e,n){this.callback({type:ek,center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}const{MOUSE_EVENTS:eD}=ey,eC="pointermove",eR="pointerover",eA="pointerout",eI="pointerleave";class eL{constructor(t,e,n={}){this.element=t,this.callback=e,this.pressed=!1,this.options=Object.assign({enable:!0},n),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=eD.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===eC&&(this.enableMoveEvent=e),t===eR&&(this.enableOverEvent=e),t===eA&&(this.enableOutEvent=e),t===eI&&(this.enableLeaveEvent=e)}handleEvent(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:eR,srcEvent:t,pointerType:"mouse",target:t.target})}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:eA,srcEvent:t,pointerType:"mouse",target:t.target})}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:eI,srcEvent:t,pointerType:"mouse",target:t.target})}handleMoveEvent(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:eC,srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}const{KEY_EVENTS:eN}=ey,ez="keydown",eF="keyup";class eV{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=eN.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),t.tabIndex=n.tabIndex||0,t.style.outline="none",this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===ez&&(this.enableDownEvent=e),t===eF&&(this.enableUpEvent=e)}handleEvent(t){const e=t.target||t.srcElement;("INPUT"!==e.tagName||"text"!==e.type)&&"TEXTAREA"!==e.tagName&&(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:ez,srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:eF,srcEvent:t,key:t.key,target:t.target}))}}const eB="contextmenu";class eZ{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.handleEvent=this.handleEvent.bind(this),t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){t===eB&&(this.options.enable=e)}handleEvent(t){this.options.enable&&this.callback({type:eB,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}const eU={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4},eq={srcElement:"root",priority:0};class eH{constructor(t){this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:a}=this;n&&("object"!=typeof n||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},eq,n):eq;let s=a.get(n.srcElement);s||(s=[],a.set(n.srcElement,s));const c={type:t,handler:e,srcElement:n.srcElement,priority:n.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let u=s.length-1;for(;u>=0&&!(s[u].priority>=c.priority);)u--;s.splice(u+1,0,c)}remove(t,e){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);const a=r.get(o.srcElement);a.splice(a.indexOf(o),1),0===a.length&&r.delete(o.srcElement)}}this._active=n.some(t=>!t.passive)}handleEvent(t){if(this.isEmpty())return;const e=this._normalizeEvent(t);let n=t.srcEvent.target;for(;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}_emit(t,e){const n=this.handlersByElement.get(e);if(n){let r=!1;const i=()=>{t.handled=!0},o=()=>{t.handled=!0,r=!0},a=[];for(let s=0;s<n.length;s++){const{type:c,handler:u,once:l}=n[s];if(u(Object.assign({},t,{type:c,stopPropagation:i,stopImmediatePropagation:o})),l&&a.push(n[s]),r)break}for(let h=0;h<a.length;h++){const{type:p,handler:f}=a[h];this.remove(p,f)}}}_normalizeEvent(t){const e=this.eventManager.element;return Object.assign({},t,function(t){const e=eU[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r,which:i}=t.srcEvent;let o=!1,a=!1,s=!1;return 4!==e&&(2!==e||Number.isFinite(n))?2===e?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===e&&(o=0===r,a=1===r,s=2===r):(o=1===i,a=2===i,s=3===i),{leftButton:o,middleButton:a,rightButton:s}}(t),function(t,e){const{srcEvent:n}=t;if(!t.center&&!Number.isFinite(n.clientX))return null;const r=t.center||{x:n.clientX,y:n.clientY},i=e.getBoundingClientRect(),o=i.width/e.offsetWidth||1,a=i.height/e.offsetHeight||1,s={x:(r.x-i.left-e.clientLeft)/o,y:(r.y-i.top-e.clientTop)/a};return{center:r,offsetCenter:s}}(t,e),{handled:!1,rootElement:e})}}const eW={events:null,recognizers:null,recognizerOptions:{},Manager:ef,touchAction:"none",tabIndex:0};class eY{constructor(t=null,e={}){this.options=Object.assign({},eW,e),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(t);const{events:n}=e;n&&this.on(n)}setElement(t){if(this.element&&this.destroy(),this.element=t,!t)return;const{options:e}=this,n=e.Manager;for(const r in this.manager=new n(t,{touchAction:e.touchAction,recognizers:e.recognizers||ev}).on("hammer.input",this._onBasicInput),e.recognizers||Object.keys(eg).forEach(t=>{const e=this.manager.get(t);e&&eg[t].forEach(t=>{e.recognizeWith(t)})}),e.recognizerOptions){const i=this.manager.get(r);if(i){const o=e.recognizerOptions[r];delete o.enable,i.set(o)}}for(const[a,s]of(this.wheelInput=new ex(t,this._onOtherEvent,{enable:!1}),this.moveInput=new eL(t,this._onOtherEvent,{enable:!1}),this.keyInput=new eV(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new eZ(t,this._onOtherEvent,{enable:!1}),this.events))s.isEmpty()||(this._toggleRecognizer(s.recognizerName,!0),this.manager.on(a,s.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(t,e,n){this._addEventHandler(t,e,n,!1)}once(t,e,n){this._addEventHandler(t,e,n,!0)}watch(t,e,n){this._addEventHandler(t,e,n,!1,!0)}off(t,e){this._removeEventHandler(t,e)}_toggleRecognizer(t,e){const{manager:n}=this;if(!n)return;const r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});const i=em[t];i&&!this.options.recognizers&&i.forEach(i=>{const o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)})}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}_addEventHandler(t,e,n,r,i){if("string"!=typeof t){for(const o in n=e,t)this._addEventHandler(o,t[o],n,r,i);return}const{manager:a,events:s}=this,c=eO[t]||t;let u=s.get(c);!u&&(u=new eH(this),s.set(c,u),u.recognizerName=ew[c]||c,a&&a.on(c,u.handleEvent)),u.add(t,e,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}_removeEventHandler(t,e){if("string"!=typeof t){for(const n in t)this._removeEventHandler(n,t[n]);return}const{events:r}=this,i=eO[t]||t,o=r.get(i);if(o&&(o.remove(t,e),o.isEmpty())){const{recognizerName:a}=o;let s=!1;for(const c of r.values())if(c.recognizerName===a&&!c.isEmpty()){s=!0;break}s||this._toggleRecognizer(a,!1)}}_onBasicInput(t){const{srcEvent:e}=t,n=eb[e.type];n&&this.manager.emit(n,t)}_onOtherEvent(t){this.manager.emit(t.type,t)}}function eX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function eK(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?eX(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var eG={transitionDuration:0},e$={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new eo,transitionInterruption:es.BREAK},eJ=function(t){return 1-(1-t)*(1-t)},eQ={WHEEL:["wheel"],PAN:["panstart","panmove","panend"],PINCH:["pinchstart","pinchmove","pinchend"],TRIPLE_PAN:["tripanstart","tripanmove","tripanend"],DOUBLE_TAP:["doubletap"],KEYBOARD:["keydown"]},e0=function(){function t(){var e=this;tc(this,t),a(this,"events",[]),a(this,"scrollZoom",!0),a(this,"dragPan",!0),a(this,"dragRotate",!0),a(this,"doubleClickZoom",!0),a(this,"touchZoom",!0),a(this,"touchRotate",!1),a(this,"keyboard",!0),a(this,"_interactionState",{isDragging:!1}),a(this,"_events",{}),a(this,"_setInteractionState",function(t){Object.assign(e._interactionState,t),e.onStateChange&&e.onStateChange(e._interactionState)}),a(this,"_onTransition",function(t,n){e.onViewportChange(t,e._interactionState,n)}),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new eu({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return tl(t,[{key:"handleEvent",value:function(t){this.mapState=this.getMapState();var e=this._eventStartBlocked;switch(t.type){case"panstart":return!e&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!e&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!e&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"blockEvents",value:function(t){var e=this,n=setTimeout(function(){e._eventStartBlocked===n&&(e._eventStartBlocked=null)},t);this._eventStartBlocked=n}},{key:"updateViewport",value:function(t,e,n){var r=this.mapState instanceof tR?this.mapState.getViewportProps():this.mapState,i=eK(eK({},t.getViewportProps()),e),o=Object.keys(i).some(function(t){return r[t]!==i[t]});this._state=t.getState(),this._setInteractionState(n),o&&this.onViewportChange(i,this._interactionState,r)}},{key:"getMapState",value:function(t){return new tR(eK(eK(eK({},this.mapStateProps),this._state),t))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(t){var e=t.onViewportChange,n=t.onStateChange,r=t.eventManager,i=void 0===r?this.eventManager:r,o=t.isInteractive,a=void 0===o||o,s=t.scrollZoom,c=void 0===s?this.scrollZoom:s,u=t.dragPan,l=void 0===u?this.dragPan:u,h=t.dragRotate,p=void 0===h?this.dragRotate:h,f=t.doubleClickZoom,d=void 0===f?this.doubleClickZoom:f,v=t.touchZoom,g=void 0===v?this.touchZoom:v,m=t.touchRotate,b=void 0===m?this.touchRotate:m,y=t.keyboard,w=void 0===y?this.keyboard:y;this.onViewportChange=e,this.onStateChange=n;var O=this.mapStateProps||{},E=O.height!==t.height||O.width!==t.width;this.mapStateProps=t,E&&(this.mapState=O,this.updateViewport(new tR(t))),this._transitionManager.processViewportChange(t),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(eQ.WHEEL,a&&Boolean(c)),this.toggleEvents(eQ.PAN,a&&Boolean(l||p)),this.toggleEvents(eQ.PINCH,a&&Boolean(g||b)),this.toggleEvents(eQ.TRIPLE_PAN,a&&Boolean(b)),this.toggleEvents(eQ.DOUBLE_TAP,a&&Boolean(d)),this.toggleEvents(eQ.KEYBOARD,a&&Boolean(w)),this.scrollZoom=c,this.dragPan=l,this.dragRotate=p,this.doubleClickZoom=d,this.touchZoom=g,this.touchRotate=b,this.keyboard=w}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach(function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))})}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);this._panRotate=this.isFunctionKeyPressed(t)||t.rightButton;var n=this._panRotate?this.mapState.rotateStart({pos:e}):this.mapState.panStart({pos:e});return this.updateViewport(n,eG,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotate(t):this._onPanMove(t))}},{key:"_onPanEnd",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotateEnd(t):this._onPanMoveEnd(t))}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.mapState.pan({pos:e});return this.updateViewport(n,eG,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){if(this.dragPan){var e=this.dragPan.inertia,n=void 0===e?300:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.pan({pos:i}).panEnd();return this.updateViewport(o,eK(eK({},e$),{},{transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isPanning:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=this.getCenter(t),n=this.mapState.rotate({pos:e});return this.updateViewport(n,eG,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){if(this.dragRotate){var e=this.dragRotate.inertia,n=void 0===e?300:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.rotate({pos:i}).rotateEnd();return this.updateViewport(o,eK(eK({},e$),{},{transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isRotating:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;var e=this.scrollZoom,n=e.speed,r=e.smooth;t.preventDefault();var i=this.getCenter(t),o=t.delta,a=2/(1+Math.exp(-Math.abs(o*(void 0===n?.01:n))));o<0&&0!==a&&(a=1/a);var s=this.mapState.zoom({pos:i,scale:a});return s.getViewportProps().zoom!==this.mapStateProps.zoom&&(this.updateViewport(s,eK(eK({},e$),{},{transitionInterpolator:new eo({around:i}),transitionDuration:void 0!==r&&r?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t),n=this.mapState.zoomStart({pos:e}).rotateStart({pos:e});return this._startPinchRotation=t.rotation,this._lastPinchEvent=t,this.updateViewport(n,eG,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.isDragging()||!this.touchZoom&&!this.touchRotate)return!1;var e=this.mapState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation;e=e.rotate({deltaAngleX:this._startPinchRotation-i})}return this.updateViewport(e,eG,{isDragging:!0,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:Boolean(this.touchRotate)}),this._lastPinchEvent=t,!0}},{key:"_onPinchEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchZoom){var e=this.touchZoom.inertia,n=void 0===e?300:e,r=this._lastPinchEvent;if(n&&r&&t.scale!==r.scale){var i=this.getCenter(t),o=this.mapState.rotateEnd(),a=Math.log2(t.scale),s=(a-Math.log2(r.scale))/(t.deltaTime-r.deltaTime),c=Math.pow(2,a+s*n/2);return o=o.zoom({pos:i,scale:c}).zoomEnd(),this.updateViewport(o,eK(eK({},e$),{},{transitionInterpolator:new eo({around:i}),transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:!1}),this.blockEvents(n),!0}}var u=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(u,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(t){var e=this.getCenter(t),n=this.mapState.rotateStart({pos:e});return this.updateViewport(n,eG,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(t){if(!this.isDragging()||!this.touchRotate)return!1;var e=this.getCenter(t);e[0]-=t.deltaX;var n=this.mapState.rotate({pos:e});return this.updateViewport(n,eG,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchRotate){var e=this.touchRotate.inertia,n=void 0===e?300:e;if(n&&t.velocityY){var r=this.getCenter(t),i=[r[0],r[1]+=t.velocityY*n/2],o=this.mapState.rotate({pos:i});return this.updateViewport(o,eK(eK({},e$),{},{transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var a=this.mapState.rotateEnd();return this.updateViewport(a,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t),n=this.isFunctionKeyPressed(t),r=this.mapState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,Object.assign({},e$,{transitionInterpolator:new eo({around:e})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.keyboard,i=r.zoomSpeed,o=void 0===i?2:i,a=r.moveSpeed,s=void 0===a?100:a,c=r.rotateSpeedX,u=void 0===c?15:c,l=r.rotateSpeedY,h=void 0===l?10:l,p=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:p.zoom-Math.log2(o)-1}):this.getMapState({zoom:p.zoom-Math.log2(o)});break;case 187:e=n?this.getMapState({zoom:p.zoom+Math.log2(o)+1}):this.getMapState({zoom:p.zoom+Math.log2(o)});break;case 37:e=n?this.getMapState({bearing:p.bearing-u}):this.mapState.pan({pos:[s,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:p.bearing+u}):this.mapState.pan({pos:[-s,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:p.pitch+h}):this.mapState.pan({pos:[0,s],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:p.pitch-h}):this.mapState.pan({pos:[0,-s],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,e$)}}]),t}();function e1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function e2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?e1(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var e4=Object.assign({},tX.propTypes,{maxZoom:p.number,minZoom:p.number,maxPitch:p.number,minPitch:p.number,onViewStateChange:p.func,onViewportChange:p.func,onInteractionStateChange:p.func,transitionDuration:p.oneOfType([p.number,p.string]),transitionInterpolator:p.object,transitionInterruption:p.number,transitionEasing:p.func,onTransitionStart:p.func,onTransitionInterrupt:p.func,onTransitionEnd:p.func,scrollZoom:p.oneOfType([p.bool,p.object]),dragPan:p.oneOfType([p.bool,p.object]),dragRotate:p.oneOfType([p.bool,p.object]),doubleClickZoom:p.bool,touchZoom:p.oneOfType([p.bool,p.object]),touchRotate:p.oneOfType([p.bool,p.object]),keyboard:p.oneOfType([p.bool,p.object]),onHover:p.func,onClick:p.func,onDblClick:p.func,onContextMenu:p.func,onMouseDown:p.func,onMouseMove:p.func,onMouseUp:p.func,onTouchStart:p.func,onTouchMove:p.func,onTouchEnd:p.func,onMouseEnter:p.func,onMouseLeave:p.func,onMouseOut:p.func,onWheel:p.func,touchAction:p.string,eventRecognizerOptions:p.object,clickRadius:p.number,interactiveLayerIds:p.array,getCursor:p.func,controller:p.instanceOf(e0)}),e5=Object.assign({},tX.defaultProps,tD,eu.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(t){return t.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:function(t){var e=t.isDragging,n=t.isHovering;return e?"grabbing":n?"pointer":"grab"}});function e3(t){if(t.lngLat||!t.offsetCenter)return t;var e=t.offsetCenter,n=e.x,r=e.y;if(!Number.isFinite(n)||!Number.isFinite(r))return t;var i=[n,r];if(t.point=i,this.map){var o=this.map.unproject(i);t.lngLat=[o.lng,o.lat]}return t}function e8(t){var e=this.map;if(!e||!t)return null;var n={},r=this.props.clickRadius;this.props.interactiveLayerIds&&(n.layers=this.props.interactiveLayerIds);try{return e.queryRenderedFeatures(r?[[t[0]-r,t[1]+r],[t[0]+r,t[1]-r]]:t,n)}catch(i){return null}}function e6(t,e){var n=this.props[t];n&&n(e3.call(this,e))}function e9(t){e6.call(this,"touch"===t.pointerType?"onTouchStart":"onMouseDown",t)}function e7(t){e6.call(this,"touch"===t.pointerType?"onTouchEnd":"onMouseUp",t)}function nt(t){if(e6.call(this,"touch"===t.pointerType?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e,n=this.props,r=n.onHover,i=n.interactiveLayerIds;t=e3.call(this,t),(i||r)&&(e=e8.call(this,t.point));var o=Boolean(i&&e&&e.length>0),a=o&&!this.state.isHovering,s=!o&&this.state.isHovering;(r||a)&&(t.features=e,r&&r(t)),a&&e6.call(this,"onMouseEnter",t),s&&e6.call(this,"onMouseLeave",t),(a||s)&&this.setState({isHovering:o})}}function ne(t){var e=this.props,n=e.onClick,r=e.onNativeClick,i=e.onDblClick,o=e.doubleClickZoom,a=[],s=i||o;switch(t.type){case"anyclick":a.push(r),s||a.push(n);break;case"click":s&&a.push(n)}(a=a.filter(Boolean)).length&&((t=e3.call(this,t)).features=e8.call(this,t.point),a.forEach(function(e){return e(t)}))}var nn=(0,h.forwardRef)(function(t,e){var n,a,s=(0,h.useContext)(tL),c=(0,h.useMemo)(function(){return t.controller||new e0},[]),u=(0,h.useMemo)(function(){return new eY(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})},[]),l=(0,h.useRef)(null),p=(0,h.useRef)(null),f=(0,h.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;f.props=t,f.map=p.current&&p.current.getMap(),f.setState=function(e){f.state=e2(e2({},f.state),e),l.current.style.cursor=t.getCursor(f.state)};var d=!0,v=function(t,e,r){if(d){n=[t,e,r];return}var i=f.props,o=i.onViewStateChange,a=i.onViewportChange;Object.defineProperty(t,"position",{get:function(){return[0,0,tF(f.map,t)]}}),o&&o({viewState:t,interactionState:e,oldViewState:r}),a&&a(t,e,r)};(0,h.useImperativeHandle)(e,function(){return{getMap:p.current&&p.current.getMap,queryRenderedFeatures:p.current&&p.current.queryRenderedFeatures}},[]);var g=(0,h.useMemo)(function(){return e2(e2({},s),{},{eventManager:u,container:s.container||l.current})},[s,l.current]);g.onViewportChange=v,g.viewport=s.viewport||tU(f),f.viewport=g.viewport;var m=function(t){var e=t.isDragging,n=void 0!==e&&e;if(n!==f.state.isDragging&&f.setState({isDragging:n}),d){a=t;return}var r=f.props.onInteractionStateChange;r&&r(t)},b=function(){f.width&&f.height&&c.setOptions(e2(e2(e2({},f.props),f.props.viewState),{},{isInteractive:Boolean(f.props.onViewStateChange||f.props.onViewportChange),onViewportChange:v,onStateChange:m,eventManager:u,width:f.width,height:f.height}))};(0,h.useEffect)(function(){return u.setElement(l.current),u.on({pointerdown:e9.bind(f),pointermove:nt.bind(f),pointerup:e7.bind(f),pointerleave:e6.bind(f,"onMouseOut"),click:ne.bind(f),anyclick:ne.bind(f),dblclick:e6.bind(f,"onDblClick"),wheel:e6.bind(f,"onWheel"),contextmenu:e6.bind(f,"onContextMenu")}),function(){u.destroy()}},[]),tz(function(){if(n){var t;v.apply(void 0,function(t){if(Array.isArray(t))return i(t)}(t=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}a&&m(a)}),b();var y=t.width,w=t.height,O=t.style,E=t.getCursor,_=(0,h.useMemo)(function(){return e2(e2({position:"relative"},O),{},{width:y,height:w,cursor:E(f.state)})},[O,y,w,E,f.state]);return n&&f._child||(f._child=h.createElement(tN,{value:g},h.createElement("div",{key:"event-canvas",ref:l,style:_},h.createElement(tX,r({},t,{width:"100%",height:"100%",style:null,onResize:function(t){var e=t.width,n=t.height;f.width=e,f.height=n,b(),f.props.onResize({width:e,height:n})},ref:p}))))),d=!1,f._child});nn.supported=tX.supported,nn.propTypes=e4,nn.defaultProps=e5;var nr=nn;p.string.isRequired,p.string,p.oneOf(["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade","sky"]).isRequired,p.string,p.string,p.string;var ni={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},no={captureScroll:p.bool,captureDrag:p.bool,captureClick:p.bool,captureDoubleClick:p.bool,capturePointerMove:p.bool};function na(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,h.useContext)(tL),n=(0,h.useRef)(null),r=(0,h.useRef)({props:t,state:{},context:e,containerRef:n}).current;return r.props=t,r.context=e,(0,h.useEffect)(function(){return function(t){var e=t.containerRef.current,n=t.context.eventManager;if(e&&n){var r={wheel:function(e){var n=t.props;n.captureScroll&&e.stopPropagation(),n.onScroll&&n.onScroll(e,t)},panstart:function(e){var n=t.props;n.captureDrag&&e.stopPropagation(),n.onDragStart&&n.onDragStart(e,t)},anyclick:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onNativeClick&&n.onNativeClick(e,t)},click:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onClick&&n.onClick(e,t)},dblclick:function(e){var n=t.props;n.captureDoubleClick&&e.stopPropagation(),n.onDoubleClick&&n.onDoubleClick(e,t)},pointermove:function(e){var n=t.props;n.capturePointerMove&&e.stopPropagation(),n.onPointerMove&&n.onPointerMove(e,t)}};return n.watch(r,e),function(){n.off(r)}}}(r)},[e.eventManager]),r}function ns(t){var e=t.instance,n=na(t),r=n.context,i=n.containerRef;return e._context=r,e._containerRef=i,e._render()}var nc=function(t){tQ(i,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(i);if(e){var r=t2(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return t1(this,t)});function i(){var t;tc(this,i);for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return a(t$(t=n.call.apply(n,[this].concat(r))),"_context",{}),a(t$(t),"_containerRef",(0,h.createRef)()),a(t$(t),"_onScroll",function(t){}),a(t$(t),"_onDragStart",function(t){}),a(t$(t),"_onDblClick",function(t){}),a(t$(t),"_onClick",function(t){}),a(t$(t),"_onPointerMove",function(t){}),t}return tl(i,[{key:"_render",value:function(){throw Error("_render() not implemented")}},{key:"render",value:function(){return h.createElement(ns,r({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),i}(h.PureComponent);function nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}a(nc,"propTypes",no),a(nc,"defaultProps",ni);var nh=Object.assign({},no,{draggable:p.bool,onDrag:p.func,onDragEnd:p.func,onDragStart:p.func,offsetLeft:p.number,offsetTop:p.number}),np=Object.assign({},ni,{draggable:!1,offsetLeft:0,offsetTop:0});function nf(t){var e=t.offsetCenter;return[e.x,e.y]}function nd(t,e,n,r){var i=t[0]+e[0]-n.offsetLeft,o=t[1]+e[1]-n.offsetTop;return r.viewport.unproject([i,o])}function nv(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context,a=e.containerRef;if(n.draggable){t.stopPropagation();var s=nf(t),c=function(t,e){var n=t.center,r=n.x,i=n.y;if(e){var o=e.getBoundingClientRect();return[o.left-r,o.top-i]}return null}(t,a.current);if(i.setDragPos(s),i.setDragOffset(c),r.onDragStart&&c){var u=Object.assign({},t);u.lngLat=nd(s,c,n,o),r.onDragStart(u)}}}var ng="undefined"!=typeof window&&window.devicePixelRatio||1,nm=function(t){return Math.round(t*ng)/ng},nb=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";if(null===t)return e;var r="x"===n?t.offsetWidth:t.offsetHeight;return nm(e/100*r)/r*100};function ny(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var nw=Object.assign({},nh,{className:p.string,longitude:p.number.isRequired,latitude:p.number.isRequired,style:p.object}),nO=Object.assign({},np,{className:""});function nE(t){var e,n,r,i,o,s,c,u=(n=(e=f((0,h.useState)(null),2))[0],r=e[1],o=(i=f((0,h.useState)(null),2))[0],s=i[1],(c=na(nl(nl({},t),{},{onDragStart:nv}))).callbacks=t,c.state.dragPos=n,c.state.setDragPos=r,c.state.dragOffset=o,c.state.setDragOffset=s,(0,h.useEffect)(function(){return function(t){var e=t.context.eventManager;if(e&&t.state.dragPos){var n={panmove:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var a=nf(t);i.setDragPos(a);var s=i.dragOffset;if(r.onDrag&&s){var c=Object.assign({},t);c.lngLat=nd(a,s,n,o),r.onDrag(c)}}(e,t)},panend:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var a=i.dragPos,s=i.dragOffset;if(i.setDragPos(null),i.setDragOffset(null),r.onDragEnd&&a&&s){var c=Object.assign({},t);c.lngLat=nd(a,s,n,o),r.onDragEnd(c)}}(e,t)},pancancel:function(e){var n;return n=t.state,void(e.stopPropagation(),n.setDragPos(null),n.setDragOffset(null))}};return e.watch(n),function(){e.off(n)}}}(c)},[c.context.eventManager,Boolean(n)]),c),l=u.state,p=u.containerRef,d=t.children,v=t.className,g=t.draggable,m=t.style,b=l.dragPos,y=function(t){var e=t.props,n=t.state,r=t.context,i=e.longitude,o=e.latitude,a=e.offsetLeft,s=e.offsetTop,c=n.dragPos,u=n.dragOffset,l=r.viewport,h=r.map;if(c&&u)return[c[0]+u[0],c[1]+u[1]];var p=tF(h,{longitude:i,latitude:o}),d=f(l.project([i,o,p]),2),v=d[0],g=d[1];return[v+=a,g+=s]}(u),w=f(y,2),O=w[0],E=w[1],_="translate(".concat(nm(O),"px, ").concat(nm(E),"px)"),P=g?b?"grabbing":"grab":"auto",M=(0,h.useMemo)(function(){var t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ny(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0,transform:_,cursor:P},m);return h.createElement("div",{className:"mapboxgl-marker ".concat(v),ref:u.containerRef,style:t},d)},[d,v]),j=p.current;return j&&(j.style.transform=_,j.style.cursor=P),M}nE.defaultProps=nO,nE.propTypes=nw,h.memo(nE);var n_={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}},nP=Object.keys(n_),nM=Object.assign({},no,{className:p.string,longitude:p.number.isRequired,latitude:p.number.isRequired,altitude:p.number,offsetLeft:p.number,offsetTop:p.number,tipSize:p.number,closeButton:p.bool,closeOnClick:p.bool,anchor:p.oneOf(Object.keys(n_)),dynamicPosition:p.bool,sortByDepth:p.bool,onClose:p.func}),nj=Object.assign({},ni,{className:"",offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function nS(t){var e,n,r,i,o,a,s,c,u,l,p,d,v,g,m,b,y,w,O,E=(0,h.useRef)(null),_=na(t),P=_.context,M=_.containerRef,j=f((0,h.useState)(!1),2)[1];(0,h.useEffect)(function(){j(!0)},[E.current]),(0,h.useEffect)(function(){if(P.eventManager&&t.closeOnClick){var e=function(){return _.props.onClose()};return P.eventManager.on("anyclick",e),function(){P.eventManager.off("anyclick",e)}}},[P.eventManager,t.closeOnClick]);var S=P.viewport,T=P.map,k=t.className,x=t.longitude,D=t.latitude,C=t.tipSize,R=t.closeButton,A=t.children,I=t.altitude;void 0===I&&(I=tF(T,{longitude:x,latitude:D}));var L=S.project([x,D,I]),N=(e=E.current,r=(n=f(L,2))[0],i=n[1],o=t.anchor,a=t.dynamicPosition,s=t.tipSize,e&&a?function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.selfWidth,a=t.selfHeight,s=t.anchor,c=t.padding,u=void 0===c?0:c,l=n_[s],h=l.x,p=l.y,f=n-p*a,d=f+a,v=Math.max(0,u-f)+Math.max(0,d-i+u);if(v>0){var g=p,m=v;for(p=0;p<=1;p+=.5)d=(f=n-p*a)+a,(v=Math.max(0,u-f)+Math.max(0,d-i+u))<m&&(m=v,g=p);p=g}var b=.5;.5===p&&(h=Math.floor(h),b=1);var y=e-h*o,w=y+o,O=Math.max(0,u-y)+Math.max(0,w-r+u);if(O>0){var E=h,_=O;for(h=0;h<=1;h+=b)w=(y=e-h*o)+o,(O=Math.max(0,u-y)+Math.max(0,w-r+u))<_&&(_=O,E=h);h=E}return nP.find(function(t){var e=n_[t];return e.x===h&&e.y===p})||s}({x:r,y:i,anchor:o,padding:s,width:S.width,height:S.height,selfWidth:e.clientWidth,selfHeight:e.clientHeight}):o),z=(c=M.current,l=(u=f(L,3))[0],p=u[1],d=u[2],v=t.offsetLeft,g=t.offsetTop,m=t.sortByDepth,y=nb(c,-(100*(b=n_[N]).x)),w=nb(c,-(100*b.y),"y"),O={position:"absolute",transform:"\n translate(".concat(y,"%, ").concat(w,"%)\n translate(").concat(nm(l+v),"px, ").concat(nm(p+g),"px)\n "),display:void 0,zIndex:void 0},m&&(d>1||d<-1||l<0||l>S.width||p<0||p>S.height?O.display="none":O.zIndex=Math.floor((1-d)/2*1e5)),O),F=(0,h.useCallback)(function(t){_.props.onClose();var e=_.context.eventManager;e&&e.once("click",function(t){return t.stopPropagation()},t.target)},[]);return h.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(N," ").concat(k),style:z,ref:M},h.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:C}}),h.createElement("div",{key:"content",ref:E,className:"mapboxgl-popup-content"},R&&h.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:F},"\xd7"),A))}function nT(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nS.propTypes=nM,nS.defaultProps=nj,h.memo(nS);var nk=Object.assign({},no,{toggleLabel:p.string,className:p.string,style:p.object,compact:p.bool,customAttribution:p.oneOfType([p.string,p.arrayOf(p.string)])}),nx=Object.assign({},ni,{className:"",toggleLabel:"Toggle Attribution"});function nD(t){var e=na(t),n=e.context,r=e.containerRef,i=(0,h.useRef)(null),o=f((0,h.useState)(!1),2),s=o[0],c=o[1];(0,h.useEffect)(function(){var e,o,a,s,c,u;return n.map&&(o={customAttribution:t.customAttribution},a=n.map,s=r.current,c=i.current,(u=new(tP()).AttributionControl(o))._map=a,u._container=s,u._innerContainer=c,u._updateAttributions(),u._updateEditLink(),a.on("styledata",u._updateData),a.on("sourcedata",u._updateData),e=u),function(){return e&&void(e._map.off("styledata",e._updateData),e._map.off("sourcedata",e._updateData))}},[n.map]);var u=void 0===t.compact?n.viewport.width<=640:t.compact;(0,h.useEffect)(function(){!u&&s&&c(!1)},[u]);var l=(0,h.useCallback)(function(){return c(function(t){return!t})},[]),p=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nT(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nT(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:p,className:t.className},h.createElement("div",{ref:r,"aria-pressed":s,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(u?"mapboxgl-compact":""," ").concat(s?"mapboxgl-compact-show":"")},h.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:t.toggleLabel,onClick:l}),h.createElement("div",{ref:i,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}function nC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nD.propTypes=nk,nD.defaultProps=nx,h.memo(nD);var nR=Object.assign({},no,{className:p.string,style:p.object,container:p.object,label:p.string}),nA=Object.assign({},ni,{className:"",container:null,label:"Toggle fullscreen"});function nI(t){var e=na(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(!1),2),o=i[0],s=i[1],c=f((0,h.useState)(!1),2),u=c[0],l=c[1],p=f((0,h.useState)(null),2),d=p[0],v=p[1];(0,h.useEffect)(function(){var t=new(tP()).FullscreenControl;v(t),l(t._checkFullscreenSupport());var e=function(){var e=!t._fullscreen;t._fullscreen=e,s(e)};return th.addEventListener(t._fullscreenchange,e),function(){th.removeEventListener(t._fullscreenchange,e)}},[]);var g=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nC(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nC(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);if(!u)return null;var m=t.className,b=t.label,y=o?"shrink":"fullscreen";return h.createElement("div",{style:g,className:m},h.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},h.createElement("button",{key:y,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(y),type:"button",title:b,onClick:function(){d&&(d._container=t.container||n.container,d._onClickFullscreen())}},h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}function nL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nI.propTypes=nR,nI.defaultProps=nA,h.memo(nI);var nN=function(){},nz=Object.assign({},no,{className:p.string,style:p.object,label:p.string,disabledLabel:p.string,auto:p.bool,positionOptions:p.object,fitBoundsOptions:p.object,trackUserLocation:p.bool,showUserLocation:p.bool,showAccuracyCircle:p.bool,showUserHeading:p.bool,onViewStateChange:p.func,onViewportChange:p.func,onGeolocate:p.func}),nF=Object.assign({},ni,{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 nV(t){var e=na(t),n=e.context,r=e.containerRef,i=(0,h.useRef)(null),o=f((0,h.useState)(null),2),s=o[0],c=o[1],u=f((0,h.useState)(!1),2),p=u[0],d=u[1];(0,h.useEffect)(function(){var r;return n.map&&(void 0!==l?Promise.resolve(l):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then(function(t){return l="denied"!==t.state}):Promise.resolve(l=Boolean(window.navigator.geolocation))).then(function(o){if(d(o),i.current){var a,s,u;a=i.current,(s=new(tP()).GeolocateControl(t))._container=th.createElement("div"),s._map={on:function(){},_getUIString:function(){return""}},s._setupUI(!0),s._map=n.map,s._geolocateButton=a,u=n.eventManager,s.options.trackUserLocation&&u&&u.on("panstart",function(){"ACTIVE_LOCK"===s._watchState&&(s._watchState="BACKGROUND",a.classList.add("mapboxgl-ctrl-geolocate-background"),a.classList.remove("mapboxgl-ctrl-geolocate-active"))}),s.on("geolocate",t.onGeolocate),(r=s)._updateCamera=function(t){var n,r,i,o,a,s,c,u,l,h,p,f,d;return n=e.context,r=e.props,i=new(tP()).LngLat(t.coords.longitude,t.coords.latitude),o=t.coords.accuracy,s=[[(a=i.toBounds(o))._ne.lng,a._ne.lat],[a._sw.lng,a._sw.lat]],u=(c=n.viewport.fitBounds(s,r.fitBoundsOptions)).longitude,l=c.latitude,h=c.zoom,p=Object.assign({},n.viewport,{longitude:u,latitude:l,zoom:h}),f=Object.assign({},new tR(p).getViewportProps(),e$),d=r.onViewportChange||n.onViewportChange||nN,void((r.onViewStateChange||n.onViewStateChange||nN)({viewState:f}),d(f))},c(r)}}),function(){r&&r._clearWatch()}},[n.map]);var v=(0,h.useCallback)(function(){s&&(s.options=e.props,s.trigger())},[s]);(0,h.useEffect)(function(){t.auto&&v()},[s,t.auto]),(0,h.useEffect)(function(){s&&s._onZoom()},[n.viewport.zoom]);var g=t.className,m=t.label,b=t.disabledLabel,y=t.trackUserLocation,w=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nL(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nL(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:w,className:g},h.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},h.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:i,disabled:!p,"aria-pressed":!y,type:"button",title:p?m:b,"aria-label":p?m:b,onClick:v},h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}function nB(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nV.propTypes=nz,nV.defaultProps=nF,h.memo(nV);var nZ=function(){},nU=Object.assign({},no,{className:p.string,style:p.object,onViewStateChange:p.func,onViewportChange:p.func,showCompass:p.bool,showZoom:p.bool,zoomInLabel:p.string,zoomOutLabel:p.string,compassLabel:p.string}),nq=Object.assign({},ni,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function nH(t,e,n){var r=t.viewport,i=Object.assign({},new tR(Object.assign({},r,n)).getViewportProps(),e$),o=e.onViewportChange||t.onViewportChange||nZ;(e.onViewStateChange||t.onViewStateChange||nZ)({viewState:i}),o(i)}function nW(t,e,n,r){return h.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},r||h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function nY(t){var e,n,r,i=na(t),o=i.context,s=i.containerRef,c=t.className,u=t.showCompass,l=t.showZoom,p=t.zoomInLabel,f=t.zoomOutLabel,d=t.compassLabel,v=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nB(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nB(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:v,className:c},h.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:s},l&&nW("zoom-in",p,function(){nH(o,t,{zoom:o.viewport.zoom+1})}),l&&nW("zoom-out",f,function(){nH(o,t,{zoom:o.viewport.zoom-1})}),u&&nW("compass",d,function(){nH(o,t,{bearing:0,pitch:0})},(e=(0,h.useMemo)(function(){return o.map?function(t,e){for(var n=(t||"").split(".").map(Number),r=(e||"").split(".").map(Number),i=0;i<3;i++){var o=n[i]||0,a=r[i]||0;if(o<a)return -1;if(o>a)return 1}return 0}(o.map.version,"1.6.0")>=0?2:1:2},[o.map]),n=o.viewport.bearing,r={transform:"rotate(".concat(-n,"deg)")},2===e?h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:r}):h.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:r})))))}function nX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nY.propTypes=nU,nY.defaultProps=nq,h.memo(nY);var nK=Object.assign({},no,{className:p.string,style:p.object,maxWidth:p.number,unit:p.oneOf(["imperial","metric","nautical"])}),nG=Object.assign({},ni,{className:"",maxWidth:100,unit:"metric"});function n$(t){var e=na(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(null),2),o=i[0],s=i[1];(0,h.useEffect)(function(){if(n.map){var t=new(tP()).ScaleControl;t._map=n.map,t._container=r.current,s(t)}},[n.map]),o&&(o.options=t,o._onMove());var c=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nX(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nX(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:c,className:t.className},h.createElement("div",{ref:r,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}n$.propTypes=nK,n$.defaultProps=nG,h.memo(n$);var nJ="undefined"!=typeof window&&window.devicePixelRatio||1,nQ=Object.assign({},no,{redraw:p.func.isRequired});function n0(t){var e=na(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(null),2),o=i[0],a=i[1];(0,h.useEffect)(function(){a(r.current.getContext("2d"))},[]);var s=n.viewport,c=n.isDragging;return o&&(o.save(),o.scale(nJ,nJ),t.redraw({width:s.width,height:s.height,ctx:o,isDragging:c,project:s.project,unproject:s.unproject}),o.restore()),h.createElement("canvas",{ref:r,width:s.width*nJ,height:s.height*nJ,style:{width:"".concat(s.width,"px"),height:"".concat(s.height,"px"),position:"absolute",left:0,top:0}})}function n1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}n0.propTypes=nQ,n0.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};var n2=Object.assign({},no,{redraw:p.func.isRequired,style:p.object});function n4(t){var e=na(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?n1(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n1(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0,width:i.width,height:i.height},t.style);return h.createElement("div",{ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}function n5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}n4.propTypes=n2,n4.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};var n3=Object.assign({},no,{redraw:p.func.isRequired,style:p.object});function n8(t){var e=na(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?n5(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n5(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0},t.style);return h.createElement("svg",{width:i.width,height:i.height,ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}n8.propTypes=n3,n8.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1},tP()&&tP().setRTLTextPlugin}}]); | |||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[785],{840:function(t,e,n){var r;!function(i,o,a,s){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),h=Math.round,p=Math.abs,f=Date.now;function d(t,e,n){return setTimeout(O(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var r;if(t){if(t.forEach)t.forEach(e,n);else if(s!==t.length)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}}function m(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}c="function"!=typeof Object.assign?function(t){if(null==t)throw TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var b=m(function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&s===t[r[i]])&&(t[r[i]]=e[r[i]]),i++;return t},"extend","Use `assign`."),y=m(function(t,e){return b(t,e,!0)},"merge","Use `assign`.");function w(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&c(r,n)}function O(t,e){return function(){return t.apply(e,arguments)}}function E(t,e){return"function"==typeof t?t.apply(e&&e[0]||s,e):t}function _(t,e,n){g(S(e),function(e){t.addEventListener(e,n,!1)})}function P(t,e,n){g(S(e),function(e){t.removeEventListener(e,n,!1)})}function M(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function j(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return -1}function k(t){return Array.prototype.slice.call(t,0)}function x(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];0>T(i,a)&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}function D(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<u.length;){if((r=(n=u[o])?n+i:e)in t)return r;o++}}var C=1;function R(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var A="ontouchstart"in i,I=s!==D(i,"PointerEvent"),L=A&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N="touch",z="mouse",F=["x","y"],V=["clientX","clientY"];function B(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){E(t.options.enable,[t])&&n.handler(e)},this.init()}function Z(t,e,n){var r,i,o,a,c,u,l,h,d,v,g,m,b,y,w,O,E,_,P=n.pointers.length,j=n.changedPointers.length,S=1&e&&P-j==0;n.isFirst=!!S,n.isFinal=!!(12&e&&P-j==0),S&&(t.session={}),n.eventType=e,r=n,i=t.session,a=(o=r.pointers).length,i.firstInput||(i.firstInput=U(r)),a>1&&!i.firstMultiple?i.firstMultiple=U(r):1===a&&(i.firstMultiple=!1),c=i.firstInput,l=(u=i.firstMultiple)?u.center:c.center,h=r.center=q(o),r.timeStamp=f(),r.deltaTime=r.timeStamp-c.timeStamp,r.angle=X(l,h),r.distance=Y(l,h),d=i,g=(v=r).center,m=d.offsetDelta||{},b=d.prevDelta||{},y=d.prevInput||{},(1===v.eventType||4===y.eventType)&&(b=d.prevDelta={x:y.deltaX||0,y:y.deltaY||0},m=d.offsetDelta={x:g.x,y:g.y}),v.deltaX=b.x+(g.x-m.x),v.deltaY=b.y+(g.y-m.y),r.offsetDirection=W(r.deltaX,r.deltaY),w=H(r.deltaTime,r.deltaX,r.deltaY),r.overallVelocityX=w.x,r.overallVelocityY=w.y,r.overallVelocity=p(w.x)>p(w.y)?w.x:w.y,r.scale=u?(O=u.pointers,Y(o[0],o[1],V)/Y(O[0],O[1],V)):1,r.rotation=u?(E=u.pointers,X(o[1],o[0],V)+X(E[1],E[0],V)):0,r.maxPointers=i.prevInput?r.pointers.length>i.prevInput.maxPointers?r.pointers.length:i.prevInput.maxPointers:r.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(c>25||s===a.velocity)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,h=H(c,u,l);r=h.x,i=h.y,n=p(h.x)>p(h.y)?h.x:h.y,o=W(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(i,r),_=t.element,M(r.srcEvent.target,_)&&(_=r.srcEvent.target),r.target=_,t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function U(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:f(),pointers:e,center:q(e),deltaX:t.deltaX,deltaY:t.deltaY}}function q(t){var e=t.length;if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:h(n/e),y:h(r/e)}}function H(t,e,n){return{x:e/t||0,y:n/t||0}}function W(t,e){return t===e?1:p(t)>=p(e)?t<0?2:4:e<0?8:16}function Y(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function X(t,e,n){n||(n=F);var r=e[n[0]]-t[n[0]];return 180*Math.atan2(e[n[1]]-t[n[1]],r)/Math.PI}B.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(R(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4};function G(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,B.apply(this,arguments)}w(G,B,{handler:function(t){var e=K[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:z,srcEvent:t}))}});var $={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:N,3:"pen",4:z,5:"kinect"},Q="pointerdown",tt="pointermove pointerup pointercancel";function te(){this.evEl=Q,this.evWin=tt,B.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(Q="MSPointerDown",tt="MSPointerMove MSPointerUp MSPointerCancel"),w(te,B,{handler:function(t){var e=this.store,n=!1,r=$[t.type.toLowerCase().replace("ms","")],i=J[t.pointerType]||t.pointerType,o=T(e,t.pointerId,"pointerId");1&r&&(0===t.button||i==N)?o<0&&(e.push(t),o=e.length-1):12&r&&(n=!0),!(o<0)&&(e[o]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:i,srcEvent:t}),n&&e.splice(o,1))}});var tn={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function tr(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,B.apply(this,arguments)}function ti(t,e){var n=k(t.touches),r=k(t.changedTouches);return 12&e&&(n=x(n.concat(r),"identifier",!0)),[n,r]}w(tr,B,{handler:function(t){var e=tn[t.type];if(1===e&&(this.started=!0),this.started){var n=ti.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}});var to={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ta(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},B.apply(this,arguments)}function ts(t,e){var n=k(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=k(t.changedTouches),s=[],c=this.target;if(o=n.filter(function(t){return M(t.target,c)}),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&e&&delete r[a[i].identifier],i++;if(s.length)return[x(o.concat(s),"identifier",!0),s]}function tc(){B.apply(this,arguments);var t=O(this.handler,this);this.touch=new ta(this.manager,t),this.mouse=new G(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function tu(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,tl.call(this,e)):12&t&&tl.call(this,e)}function tl(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)},2500)}}function th(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}w(ta,B,{handler:function(t){var e=to[t.type],n=ts.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:t})}}),w(tc,B,{handler:function(t,e,n){var r=n.pointerType==N,i=n.pointerType==z;if(!i||!n.sourceCapabilities||!n.sourceCapabilities.firesTouchEvents){if(r)tu.call(this,e,n);else if(i&&th.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var tp=D(l.style,"touchAction"),tf=s!==tp,td="compute",tv="auto",tg="manipulation",tm="none",tb="pan-x",ty="pan-y",tw=function(){if(!tf)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||i.CSS.supports("touch-action",n)}),t}();function tO(t,e){this.manager=t,this.set(e)}function tE(t){var e;this.options=c({},this.defaults,t||{}),this.id=C++,this.manager=null,this.options.enable=s===(e=this.options.enable)||e,this.state=1,this.simultaneous={},this.requireFail=[]}function t_(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function tP(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function tM(t,e){var n=e.manager;return n?n.get(t):t}function tj(){tE.apply(this,arguments)}function tS(){tj.apply(this,arguments),this.pX=null,this.pY=null}function tT(){tj.apply(this,arguments)}function tk(){tE.apply(this,arguments),this._timer=null,this._input=null}function tx(){tj.apply(this,arguments)}function tD(){tj.apply(this,arguments)}function tC(){tE.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function tR(t,e){var n,r;return(e=e||{}).recognizers=(n=e.recognizers,r=tR.defaults.preset,s===n?r:n),new tA(t,e)}function tA(t,e){var n;this.options=c({},tR.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this.options.inputClass)?n:I?te:L?ta:A?tc:G)(this,Z),this.touchAction=new tO(this,this.options.touchAction),tI(this,!0),g(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function tI(t,e){var n,r=t.element;r.style&&(g(t.options.cssProps,function(i,o){n=D(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}tO.prototype={set:function(t){t==td&&(t=this.compute()),tf&&this.manager.element.style&&tw[t]&&(this.manager.element.style[tp]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,function(e){E(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(j(t,tm))return tm;var e=j(t,tb),n=j(t,ty);return e&&n?tm:e||n?e?tb:ty:j(t,tg)?tg:tv}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented){e.preventDefault();return}var r=this.actions,i=j(r,tm)&&!tw[tm],o=j(r,ty)&&!tw[ty],a=j(r,tb)&&!tw[tb];if(i){var s=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(s&&c&&u)return}if((!a||!o)&&(i||o&&6&n||a&&24&n))return this.preventSrc(e)},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},tE.prototype={defaults:{},set:function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(v(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=tM(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return v(t,"dropRecognizeWith",this)||(t=tM(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(v(t,"requireFailure",this))return this;var e=this.requireFail;return -1===T(e,t=tM(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(v(t,"dropRequireFailure",this))return this;t=tM(t,this);var e=T(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+t_(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+t_(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=c({},t);if(!E(this.options.enable,[this,e])){this.reset(),this.state=32;return}56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},w(tj,tE,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:32}}),w(tS,tj,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(ty),24&t&&e.push(tb),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return tj.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tP(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),w(tT,tj,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[tm]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),w(tk,tE,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[tv]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,r&&n&&(!(12&t.eventType)||i)){if(1&t.eventType)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},e.time,this);else if(4&t.eventType)return 8}else this.reset();return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),w(tx,tj,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[tm]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),w(tD,tj,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return tS.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&p(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=tP(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),w(tC,tE,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[tg]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||Y(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=d(function(){this.state=8,this.tryEmit()},e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=d(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))}}),tR.VERSION="2.0.7",tR.defaults={domEvents:!1,touchAction:td,enable:!0,inputTarget:null,inputClass:null,preset:[[tx,{enable:!1}],[tT,{enable:!1},["rotate"]],[tD,{direction:6}],[tS,{direction:6},["swipe"]],[tC],[tC,{event:"doubletap",taps:2},["tap"]],[tk]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},tA.prototype={set:function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e,n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var r=this.recognizers,i=n.curRecognizer;(!i||i&&8&i.state)&&(i=n.curRecognizer=null);for(var o=0;o<r.length;)e=r[o],2!==n.stopped&&(!i||e==i||e.canRecognizeWith(i))?e.recognize(t):e.reset(),!i&&14&e.state&&(i=n.curRecognizer=e),o++}},get:function(t){if(t instanceof tE)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(v(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(v(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=T(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(s!==t&&s!==e){var n=this.handlers;return g(S(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(s!==t){var n=this.handlers;return g(S(t),function(t){e?n[t]&&n[t].splice(T(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&((n=o.createEvent("Event")).initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n));var n,r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](e),i++}},destroy:function(){this.element&&tI(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(tR,{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:tA,Input:B,TouchAction:tO,TouchInput:ta,MouseInput:G,PointerEventInput:te,TouchMouseInput:tc,SingleTouchInput:tr,Recognizer:tE,AttrRecognizer:tj,Tap:tC,Pan:tS,Swipe:tD,Pinch:tT,Rotate:tx,Press:tk,on:_,off:P,each:g,merge:y,extend:b,assign:c,inherit:w,bindFn:O,prefixed:D}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=tR,s!==(r=(function(){return tR}).call(e,n,e,t))&&(t.exports=r)}(window,document,0)},3454:function(t,e,n){"use strict";var r,i;t.exports=(null===(r=n.g.process)||void 0===r?void 0:r.env)&&"object"==typeof(null===(i=n.g.process)||void 0===i?void 0:i.env)?n.g.process:n(7663)},7663:function(t){!function(){var e={162:function(t){var e,n,r,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(r){n=a}}();var c=[],u=!1,l=-1;function h(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&p())}function p(){if(!u){var t=s(h);u=!0;for(var e=c.length;e;){for(r=c,c=[];++l<e;)r&&r[l].run();l=-1,e=c.length}r=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(r){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||u||s(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}},a=!0;try{e[t](o,o.exports,r),a=!1}finally{a&&delete n[t]}return o.exports}r.ab="//";var i=r(162);t.exports=i}()},2703:function(t,e,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:function(t,e,n){t.exports=n(2703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6785:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{ZP:function(){return nr}});var s,c,u,l,h=n(7294),p=n(5697);function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],a=!0,s=!1;try{for(i=i.call(t);!(a=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(c){s=!0,r=c}finally{try{a||null==i.return||i.return()}finally{if(s)throw r}}return o}}(t,e)||o(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d="undefined"!=typeof Float32Array?Float32Array:Array;function v(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function g(t,e){var n,r,i,o,a,s,c;const u=(n=[],r=e[0],i=e[1],o=e[2],a=e[3],n[0]=t[0]*r+t[4]*i+t[8]*o+t[12]*a,n[1]=t[1]*r+t[5]*i+t[9]*o+t[13]*a,n[2]=t[2]*r+t[6]*i+t[10]*o+t[14]*a,n[3]=t[3]*r+t[7]*i+t[11]*o+t[15]*a,n);return s=u,c=1/u[3],s[0]=u[0]*c,s[1]=u[1]*c,s[2]=u[2]*c,s[3]=u[3]*c,u}function m(t,e){const n=t%e;return n<0?e+n:n}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}),s=new d(4),d!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0);const b=Math.log2||function(t){return Math.log(t)*Math.LOG2E};function y(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],p=e[9],f=e[10],d=e[11],v=e[12],g=e[13],m=e[14],b=e[15],y=n[0],w=n[1],O=n[2],E=n[3];return t[0]=y*r+w*s+O*h+E*v,t[1]=y*i+w*c+O*p+E*g,t[2]=y*o+w*u+O*f+E*m,t[3]=y*a+w*l+O*d+E*b,y=n[4],w=n[5],O=n[6],E=n[7],t[4]=y*r+w*s+O*h+E*v,t[5]=y*i+w*c+O*p+E*g,t[6]=y*o+w*u+O*f+E*m,t[7]=y*a+w*l+O*d+E*b,y=n[8],w=n[9],O=n[10],E=n[11],t[8]=y*r+w*s+O*h+E*v,t[9]=y*i+w*c+O*p+E*g,t[10]=y*o+w*u+O*f+E*m,t[11]=y*a+w*l+O*d+E*b,y=n[12],w=n[13],O=n[14],E=n[15],t[12]=y*r+w*s+O*h+E*v,t[13]=y*i+w*c+O*p+E*g,t[14]=y*o+w*u+O*f+E*m,t[15]=y*a+w*l+O*d+E*b,t}function w(t,e,n){var r,i,o,a,s,c,u,l,h,p,f,d,v=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*m+e[12],t[13]=e[1]*v+e[5]*g+e[9]*m+e[13],t[14]=e[2]*v+e[6]*g+e[10]*m+e[14],t[15]=e[3]*v+e[7]*g+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=r*v+s*g+h*m+e[12],t[13]=i*v+c*g+p*m+e[13],t[14]=o*v+u*g+f*m+e[14],t[15]=a*v+l*g+d*m+e[15]),t}function O(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function E(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],c=t[6],u=t[7],l=t[8],h=t[9],p=t[10],f=t[11],d=t[12],v=t[13],g=t[14],m=t[15],b=e[0],y=e[1],w=e[2],O=e[3],E=e[4],_=e[5],P=e[6],M=e[7],j=e[8],S=e[9],T=e[10],k=e[11],x=e[12],D=e[13],C=e[14],R=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-y)<=1e-6*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(i-w)<=1e-6*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-O)<=1e-6*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-_)<=1e-6*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(c-P)<=1e-6*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(u-M)<=1e-6*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(l-j)<=1e-6*Math.max(1,Math.abs(l),Math.abs(j))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(p-T)<=1e-6*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(f-k)<=1e-6*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(d-x)<=1e-6*Math.max(1,Math.abs(d),Math.abs(x))&&Math.abs(v-D)<=1e-6*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(m-R)<=1e-6*Math.max(1,Math.abs(m),Math.abs(R))}function _(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function P(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function M(t,e){if(!t)throw Error(e||"@math.gl/web-mercator: assertion failed.")}c=new d(2),d!=Float32Array&&(c[0]=0,c[1]=0),u=new d(3),d!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0);const j=Math.PI,S=j/4,T=j/180,k=180/j;function x(t){return Math.pow(2,t)}function D([t,e]){M(Number.isFinite(t)),M(Number.isFinite(e)&&e>=-90&&e<=90,"invalid latitude");const n=512*(j+Math.log(Math.tan(S+.5*(e*T))))/(2*j);return[512*(t*T+j)/(2*j),n]}function C([t,e]){const n=2*(Math.atan(Math.exp(e/512*(2*j)-j))-S);return[(t/512*(2*j)-j)*k,n*k]}function R(t){return 2*Math.atan(.5/t)*k}function A(t){return .5/Math.tan(.5*t*T)}function I(t,e,n=0){const[r,i,o]=t;if(M(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(o)){const a=g(e,[r,i,o,1]);return a}const s=g(e,[r,i,0,1]),c=g(e,[r,i,1,1]),u=s[2],l=c[2];return P([],s,c,u===l?0:((n||0)-u)/(l-u))}const L=Math.PI/180;function N(t,e,n){const{pixelUnprojectionMatrix:r}=t,i=g(r,[e,0,1,1]),o=g(r,[e,t.height,1,1]),a=n*t.distanceScales.unitsPerMeter[2],s=(a-i[2])/(o[2]-i[2]),c=P([],i,o,s),u=C(c);return u[2]=n,u}class z{constructor({width:t,height:e,latitude:n=0,longitude:r=0,zoom:i=0,pitch:o=0,bearing:a=0,altitude:s=null,fovy:c=null,position:u=null,nearZMultiplier:l=.02,farZMultiplier:h=1.01}={width:1,height:1}){t=t||1,e=e||1,null===c&&null===s?c=R(s=1.5):null===c?c=R(s):null===s&&(s=A(c));const p=x(i);s=Math.max(.75,s);const f=function({latitude:t,longitude:e,highPrecision:n=!1}){M(Number.isFinite(t)&&Number.isFinite(e));const r={},i=Math.cos(t*T),o=512/360,a=o/i,s=512/4003e4/i;if(r.unitsPerMeter=[s,s,s],r.metersPerUnit=[1/s,1/s,1/s],r.unitsPerDegree=[o,a,s],r.degreesPerUnit=[1/o,1/a,1/s],n){const c=T*Math.tan(t*T)/i,u=512/4003e4*c,l=u/a*s;r.unitsPerDegree2=[0,o*c/2,u],r.unitsPerMeter2=[l,0,l]}return r}({longitude:r,latitude:n}),d=D([r,n]);if(d[2]=0,u){var g,m,b;b=d,g=[],m=f.unitsPerMeter,g[0]=u[0]*m[0],g[1]=u[1]*m[1],g[2]=u[2]*m[2],b[0]=d[0]+g[0],b[1]=d[1]+g[1],b[2]=d[2]+g[2]}this.projectionMatrix=function({width:t,height:e,pitch:n,altitude:r,fovy:i,nearZMultiplier:o,farZMultiplier:a}){var s,c,u;const{fov:l,aspect:h,near:p,far:f}=function({width:t,height:e,fovy:n=R(1.5),altitude:r,pitch:i=0,nearZMultiplier:o=1,farZMultiplier:a=1}){void 0!==r&&(n=R(r));const s=.5*n*T,c=A(n),u=i*T,l=Math.sin(s)*c/Math.sin(Math.min(Math.max(Math.PI/2-u-s,.01),Math.PI-.01)),h=Math.sin(u)*l+c;return{fov:2*s,aspect:t/e,focalDistance:c,near:o,far:h*a}}({width:t,height:e,altitude:r,fovy:i,pitch:n,nearZMultiplier:o,farZMultiplier:a}),d=(s=[],u=1/Math.tan(l/2),s[0]=u/h,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=-1,s[12]=0,s[13]=0,s[15]=0,null!=f&&f!==1/0?(c=1/(p-f),s[10]=(f+p)*c,s[14]=2*f*p*c):(s[10]=-1,s[14]=-2*p),s);return d}({width:t,height:e,pitch:o,fovy:c,nearZMultiplier:l,farZMultiplier:h}),this.viewMatrix=function({height:t,pitch:e,bearing:n,altitude:r,scale:i,center:o=null}){var a,s,c,u,l,h,p,f,d,g,m,b,y,E,_,P,M,j,S,k,x,D,C,R,A;const I=v();return w(I,I,[0,0,-r]),a=I,c=Math.sin(s=-e*T),u=Math.cos(s),l=I[4],h=I[5],p=I[6],f=I[7],d=I[8],g=I[9],m=I[10],b=I[11],I!==a&&(a[0]=I[0],a[1]=I[1],a[2]=I[2],a[3]=I[3],a[12]=I[12],a[13]=I[13],a[14]=I[14],a[15]=I[15]),a[4]=l*u+d*c,a[5]=h*u+g*c,a[6]=p*u+m*c,a[7]=f*u+b*c,a[8]=d*u-l*c,a[9]=g*u-h*c,a[10]=m*u-p*c,a[11]=b*u-f*c,y=I,_=Math.sin(E=n*T),P=Math.cos(E),M=I[0],j=I[1],S=I[2],k=I[3],x=I[4],D=I[5],C=I[6],R=I[7],I!==y&&(y[8]=I[8],y[9]=I[9],y[10]=I[10],y[11]=I[11],y[12]=I[12],y[13]=I[13],y[14]=I[14],y[15]=I[15]),y[0]=M*P+x*_,y[1]=j*P+D*_,y[2]=S*P+C*_,y[3]=k*P+R*_,y[4]=x*P-M*_,y[5]=D*P-j*_,y[6]=C*P-S*_,y[7]=R*P-k*_,O(I,I,[i/=t,i,i]),o&&w(I,I,((A=[])[0]=-o[0],A[1]=-o[1],A[2]=-o[2],A)),I}({height:e,scale:p,center:d,pitch:o,bearing:a,altitude:s}),this.width=t,this.height=e,this.scale=p,this.latitude=n,this.longitude=r,this.zoom=i,this.pitch=o,this.bearing=a,this.altitude=s,this.fovy=c,this.center=d,this.meterOffset=u||[0,0,0],this.distanceScales=f,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 t,e,n,r,i,o,a,s,c,u,l,h,p,f,d,g,m,b,E,_,P,M,j,S,T,k,x,D,C,R;const{width:A,height:I,projectionMatrix:L,viewMatrix:N}=this,z=v();y(z,z,L),y(z,z,N),this.viewProjectionMatrix=z;const F=v();O(F,F,[A/2,-I/2,1]),w(F,F,[1,-1,0]),y(F,F,z);const V=(t=v(),e=F[0],n=F[1],r=F[2],i=F[3],o=F[4],a=F[5],s=F[6],c=F[7],u=F[8],l=F[9],h=F[10],p=F[11],f=F[12],d=F[13],g=F[14],m=F[15],b=e*a-n*o,E=e*s-r*o,_=e*c-i*o,P=n*s-r*a,M=n*c-i*a,j=r*c-i*s,S=u*d-l*f,T=u*g-h*f,k=u*m-p*f,x=l*g-h*d,D=l*m-p*d,(R=b*(C=h*m-p*g)-E*D+_*x+P*k-M*T+j*S)?(R=1/R,t[0]=(a*C-s*D+c*x)*R,t[1]=(r*D-n*C-i*x)*R,t[2]=(d*j-g*M+m*P)*R,t[3]=(h*M-l*j-p*P)*R,t[4]=(s*k-o*C-c*T)*R,t[5]=(e*C-r*k+i*T)*R,t[6]=(g*_-f*j-m*E)*R,t[7]=(u*j-h*_+p*E)*R,t[8]=(o*D-a*k+c*S)*R,t[9]=(n*k-e*D-i*S)*R,t[10]=(f*M-d*_+m*b)*R,t[11]=(l*_-u*M-p*b)*R,t[12]=(a*T-o*x-s*S)*R,t[13]=(e*x-n*T+r*S)*R,t[14]=(d*E-f*P-g*b)*R,t[15]=(u*P-l*E+h*b)*R,t):null);if(!V)throw Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=F,this.pixelUnprojectionMatrix=V}equals(t){return t instanceof z&&t.width===this.width&&t.height===this.height&&E(t.projectionMatrix,this.projectionMatrix)&&E(t.viewMatrix,this.viewMatrix)}project(t,{topLeft:e=!0}={}){const n=this.projectPosition(t),r=function(t,e){const[n,r,i=0]=t;return M(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),g(e,[n,r,i,1])}(n,this.pixelProjectionMatrix),[i,o]=r,a=e?o:this.height-o;return 2===t.length?[i,a]:[i,a,r[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,a=e?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],c=I([r,a,o],this.pixelUnprojectionMatrix,s),[u,l,h]=this.unprojectPosition(c);return Number.isFinite(o)?[u,l,h]:Number.isFinite(n)?[u,l,n]:[u,l]}projectPosition(t){const[e,n]=D(t),r=(t[2]||0)*this.distanceScales.unitsPerMeter[2];return[e,n,r]}unprojectPosition(t){const[e,n]=C(t),r=(t[2]||0)*this.distanceScales.metersPerUnit[2];return[e,n,r]}projectFlat(t){return D(t)}unprojectFlat(t){return C(t)}getMapCenterByLngLatPosition({lngLat:t,pos:e}){var n;const r=I(e,this.pixelUnprojectionMatrix),i=D(t),o=_([],i,((n=[])[0]=-r[0],n[1]=-r[1],n)),a=_([],this.center,o);return C(a)}getLocationAtPoint({lngLat:t,pos:e}){return this.getMapCenterByLngLatPosition({lngLat:t,pos:e})}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=function({width:t,height:e,bounds:n,minExtent:r=0,maxZoom:i=24,padding:o=0,offset:a=[0,0]}){const[[s,c],[u,l]]=n;if(Number.isFinite(o)){const h=o;o={top:h,bottom:h,left:h,right:h}}else M(Number.isFinite(o.top)&&Number.isFinite(o.bottom)&&Number.isFinite(o.left)&&Number.isFinite(o.right));const p=D([s,l<-85.051129?-85.051129:l>85.051129?85.051129:l]),f=D([u,c<-85.051129?-85.051129:c>85.051129?85.051129:c]),d=[Math.max(Math.abs(f[0]-p[0]),r),Math.max(Math.abs(f[1]-p[1]),r)],v=[t-o.left-o.right-2*Math.abs(a[0]),e-o.top-o.bottom-2*Math.abs(a[1])];M(v[0]>0&&v[1]>0);const g=v[0]/d[0],m=v[1]/d[1],y=(o.right-o.left)/2/g,w=(o.bottom-o.top)/2/m,O=[(f[0]+p[0])/2+y,(f[1]+p[1])/2+w],E=C(O),_=Math.min(i,b(Math.abs(Math.min(g,m))));return M(Number.isFinite(_)),{longitude:E[0],latitude:E[1],zoom:_}}(Object.assign({width:n,height:r,bounds:t},e));return new z({width:n,height:r,longitude:i,latitude:o,zoom:a})}getBounds(t){const e=this.getBoundingRegion(t),n=Math.min(...e.map(t=>t[0])),r=Math.max(...e.map(t=>t[0])),i=Math.min(...e.map(t=>t[1])),o=Math.max(...e.map(t=>t[1]));return[[n,i],[r,o]]}getBoundingRegion(t={}){return function(t,e=0){let n,r;const{width:i,height:o,unproject:a}=t,s={targetZ:e},c=a([0,o],s),u=a([i,o],s),l=t.fovy?.5*t.fovy*L:Math.atan(.5/t.altitude),h=(90-t.pitch)*L;return l>h-.01?(n=N(t,0,e),r=N(t,i,e)):(n=a([0,0],s),r=a([i,0],s)),[c,u,r,n]}(this,t.z||0)}}const F=["longitude","latitude","zoom"],V={curve:1.414,speed:1.2};function B(t,e,n){var r;n=Object.assign({},V,n);const i=n.curve,o=t.zoom,a=[t.longitude,t.latitude],s=x(o),c=e.zoom,u=[e.longitude,e.latitude],l=x(c-o),h=D(a),p=D(u),f=((r=[])[0]=p[0]-h[0],r[1]=p[1]-h[1],r),d=Math.max(t.width,t.height),v=d/l,g=Math.hypot(f[0],f[1])*s,m=Math.max(g,.01),b=i*i,y=(v*v-d*d+b*b*m*m)/(2*d*b*m),w=(v*v-d*d-b*b*m*m)/(2*v*b*m),O=Math.log(Math.sqrt(y*y+1)-y),E=Math.log(Math.sqrt(w*w+1)-w);return{startZoom:o,startCenterXY:h,uDelta:f,w0:d,u1:g,S:(E-O)/i,rho:i,rho2:b,r0:O,r1:E}}var Z=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),U="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,q=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),H="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(q):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},W=["top","right","bottom","left","width","height","size","weight"],Y="undefined"!=typeof MutationObserver,X=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){H(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,20);i=t}return s}(this.refresh.bind(this),0)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){U&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Y?(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)},t.prototype.disconnect_=function(){U&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;W.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),K=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},G=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||q},$=te(0,0,0,0);function J(t){return parseFloat(t)||0}function Q(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+J(t["border-"+n+"-width"])},0)}var tt="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof G(t).SVGGraphicsElement}:function(t){return t instanceof G(t).SVGElement&&"function"==typeof t.getBBox};function te(t,e,n,r){return{x:t,y:e,width:n,height:r}}var tn=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=te(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=function(t){if(!U)return $;if(tt(t)){var e;return te(0,0,(e=t.getBBox()).width,e.height)}return function(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return $;var r=G(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=J(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=J(r.width),c=J(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Q(r,"left","right")+o),Math.round(c+a)!==n&&(c-=Q(r,"top","bottom")+a)),t!==G(t).document.documentElement){var u=Math.round(s+o)-e,l=Math.round(c+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(l)&&(c-=l)}return te(i.left,i.top,s,c)}(t)}(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),tr=function(t,e){var n,r,i,o,a,s=(n=e.x,r=e.y,i=e.width,o=e.height,K(a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:i,height:o,top:r,right:n+i,bottom:o+r,left:n}),a);K(this,{target:t,contentRect:s})},ti=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new Z,"function"!=typeof t)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof G(t).Element))throw TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new tn(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof G(t).Element))throw TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new tr(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),to="undefined"!=typeof WeakMap?new WeakMap:new Z,ta=function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=X.getInstance(),r=new ti(e,n,this);to.set(this,r)};["observe","unobserve","disconnect"].forEach(function(t){ta.prototype[t]=function(){var e;return(e=to.get(this))[t].apply(e,arguments)}});var ts=void 0!==q.ResizeObserver?q.ResizeObserver:ta;function tc(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tl(t,e,n){return e&&tu(t.prototype,e),n&&tu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}"undefined"!=typeof window?window:n.g,void 0!==n.g?n.g:window;var th="undefined"!=typeof document?document:{};function tp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tp(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function td(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return tv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tv(t,e)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function tv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var tg=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function tm(t){if(!t)return null;if("string"==typeof t)return t;t.toJS&&(t=t.toJS());var e,n={},r=td(t.layers);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.id]=i}}catch(o){r.e(o)}finally{r.f()}var a=t.layers.map(function(t){var e=n[t.ref],r=null;if("interactive"in t&&delete(r=tf({},t)).interactive,e){delete(r=r||tf({},t)).ref;var i,o=td(tg);try{for(o.s();!(i=o.n()).done;){var a=i.value;a in e&&(r[a]=e[a])}}catch(s){o.e(s)}finally{o.f()}}return r||t});return tf(tf({},t),{},{layers:a})}var tb=n(3454),ty={container:p.object,gl:p.object,mapboxApiAccessToken:p.string,mapboxApiUrl:p.string,attributionControl:p.bool,preserveDrawingBuffer:p.bool,reuseMaps:p.bool,transformRequest:p.func,mapOptions:p.object,mapStyle:p.oneOfType([p.string,p.object]),preventStyleDiffing:p.bool,visible:p.bool,asyncRender:p.bool,onLoad:p.func,onError:p.func,width:p.number,height:p.number,viewState:p.object,longitude:p.number,latitude:p.number,zoom:p.number,bearing:p.number,pitch:p.number,altitude:p.number},tw={container:th.body,mapboxApiAccessToken:function(){var t=null;if("undefined"!=typeof window&&window.location){var e=window.location.search.match(/access_token=([^&\/]*)/);t=e&&e[1]}return t||void 0===tb||(t=t||tb.env.MapboxAccessToken||tb.env.REACT_APP_MAPBOX_ACCESS_TOKEN),t||"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(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function tO(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&p.checkPropTypes(ty,t,"prop",e)}var tE=function(){function t(e){var n=this;if(tc(this,t),a(this,"props",tw),a(this,"width",0),a(this,"height",0),a(this,"_fireLoadEvent",function(){n.props.onLoad({type:"load",target:n._map})}),a(this,"_handleError",function(t){n.props.onError(t)}),!e.mapboxgl)throw Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return tl(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(tm(e.mapStyle),{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:tm(e.mapStyle),interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",this._fireLoadEvent),this._map.on("error",this._handleError)}return this}},{key:"_destroy",value:function(){this._map&&(this.props.reuseMaps&&!t.savedMap?(t.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(t){var e=this;tO(t=Object.assign({},tw,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||tw.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{configurable:!0,get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{configurable:!0,get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{configurable:!0,get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){tO(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);this._updateMapStyle(t,e),!e.asyncRender&&(n||r)&&this.redraw(),this.props=e}}},{key:"_updateMapStyle",value:function(t,e){t.mapStyle!==e.mapStyle&&this._map.setStyle(tm(e.mapStyle),{diff:!e.preventStyleDiffing})}},{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this._map.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,a=e.bearing,s=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:void 0===o?0:o,bearing:void 0===a?0:a,altitude:void 0===s?1.5:s}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if(void 0!==th)try{var e=th.createElement("div");if(e.className="mapboxgl-map",e.style.display="none",th.body.appendChild(e),!("static"!==window.getComputedStyle(e).position)){var n=th.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),th.head.appendChild(n)}}catch(r){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();a(tE,"initialized",!1),a(tE,"propTypes",ty),a(tE,"defaultProps",tw),a(tE,"savedMap",null);var t_=n(6158),tP=n.n(t_);function tM(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function tj(t,e,n){return Math.max(e,Math.min(n,t))}function tS(t,e,n){return tM(t)?t.map(function(t,r){return tS(t,e[r],n)}):n*e+(1-n)*t}function tT(t,e){if(!t)throw Error(e||"react-map-gl: assertion failed.")}function tk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tx(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tk(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tD={minZoom:0,maxZoom:24,minPitch:0,maxPitch:85},tC={pitch:0,bearing:0,altitude:1.5},tR=function(){function t(e){var n=e.width,r=e.height,i=e.latitude,o=e.longitude,a=e.zoom,s=e.bearing,c=void 0===s?tC.bearing:s,u=e.pitch,l=void 0===u?tC.pitch:u,h=e.altitude,p=void 0===h?tC.altitude:h,f=e.maxZoom,d=void 0===f?tD.maxZoom:f,v=e.minZoom,g=void 0===v?tD.minZoom:v,m=e.maxPitch,b=void 0===m?tD.maxPitch:m,y=e.minPitch,w=void 0===y?tD.minPitch:y,O=e.transitionDuration,E=e.transitionEasing,_=e.transitionInterpolator,P=e.transitionInterruption,M=e.startPanLngLat,j=e.startZoomLngLat,S=e.startRotatePos,T=e.startBearing,k=e.startPitch,x=e.startZoom;tc(this,t),tT(Number.isFinite(n),"`width` must be supplied"),tT(Number.isFinite(r),"`height` must be supplied"),tT(Number.isFinite(o),"`longitude` must be supplied"),tT(Number.isFinite(i),"`latitude` must be supplied"),tT(Number.isFinite(a),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:i,longitude:o,zoom:a,bearing:c,pitch:l,altitude:p,maxZoom:d,minZoom:g,maxPitch:b,minPitch:w,transitionDuration:O,transitionEasing:E,transitionInterpolator:_,transitionInterruption:P}),this._state={startPanLngLat:M,startZoomLngLat:j,startRotatePos:S,startBearing:T,startPitch:k,startZoom:x}}return tl(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._state.startPanLngLat||this._unproject(n);if(!r)return this;var i=f(this._calculateNewLngLat({startPanLngLat:r,pos:e}),2),o=i[0],a=i[1];return this._getUpdatedMapState({longitude:o,latitude:a})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startRotatePos:e,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e,n=t.pos,r=t.deltaAngleX,i=t.deltaAngleY,o=this._state,a=o.startRotatePos,s=o.startBearing,c=o.startPitch;return Number.isFinite(s)&&Number.isFinite(c)?(e=n?this._calculateNewPitchAndBearing(tx(tx({},this._getRotationParams(n,a)),{},{startBearing:s,startPitch:c})):{bearing:s+(void 0===r?0:r),pitch:c+(void 0===i?0:i)},this._getUpdatedMapState(e)):this}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale;tT(r>0,"`scale` must be a positive number");var i=this._state,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(n)||this._unproject(e)),tT(a,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var s=this._calculateNewZoom({scale:r,startZoom:o||0}),c=f(new z(Object.assign({},this._viewportProps,{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),2),u=c[0],l=c[1];return this._getUpdatedMapState({zoom:s,longitude:u,latitude:l})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(e){return new t(Object.assign({},this._viewportProps,this._state,e))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=tj(r,n,e);var i=t.maxPitch,o=t.minPitch,a=t.pitch;return t.pitch=tj(a,o,i),Object.assign(t,function({width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:o=0,bearing:a=0}){(n<-180||n>180)&&(n=m(n+180,360)-180),(a<-180||a>180)&&(a=m(a+180,360)-180);const s=b(e/512);if(i<=s)i=s,r=0;else{const c=e/2/Math.pow(2,i),u=C([0,c])[1];if(r<u)r=u;else{const l=C([0,512-c])[1];r>l&&(r=l)}}return{width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:o,bearing:a}}(t)),t}},{key:"_unproject",value:function(t){var e=new z(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new z(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom;return tj(n+Math.log2(e),r.minZoom,i)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=t.startBearing,i=t.startPitch;n=tj(n,-1,1);var o=this._viewportProps,a=o.minPitch,s=o.maxPitch,c=i;return n>0?c=i+n*(s-i):n<0&&(c=i-n*(a-i)),{pitch:c,bearing:r+180*e}}},{key:"_getRotationParams",value:function(t,e){var n=t[0]-e[0],r=t[1]-e[1],i=t[1],o=e[1],a=this._viewportProps,s=a.width,c=a.height,u=0;return r>0?Math.abs(c-o)>5&&(u=r/(o-c)*1.2):r<0&&o>5&&(u=1-i/o),{deltaScaleX:n/s,deltaScaleY:u=Math.min(1,Math.max(-1,u))}}}]),t}();function tA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tI(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tA(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tL=(0,h.createContext)({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),tN=tL.Provider;tL.Provider=function(t){var e=t.value,n=t.children,r=f((0,h.useState)(null),2),i=r[0],o=r[1],a=(0,h.useContext)(tL);return e=tI(tI({setMap:o},a),{},{map:a&&a.map||i},e),h.createElement(tN,{value:e},n)};var tz="undefined"!=typeof window?h.useLayoutEffect:h.useEffect;function tF(t,e){var n=e.longitude,r=e.latitude;return t&&t.queryTerrainElevation&&t.queryTerrainElevation([n,r])||0}function tV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tB(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tV(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tV(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var tZ="A valid API access token is required to use Mapbox data";function tU(t){var e=t.map,n=t.props,r=t.width,i=t.height,o=tB(tB(tB({},n),n.viewState),{},{width:r,height:i});return o.position=[0,0,tF(e,o)],new z(o)}var tq={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},tH=Object.assign({},tE.propTypes,{width:p.oneOfType([p.number,p.string]),height:p.oneOfType([p.number,p.string]),onResize:p.func,disableTokenWarning:p.bool,visible:p.bool,className:p.string,style:p.object,visibilityConstraints:p.object}),tW=Object.assign({},tE.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:tD});function tY(){return h.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},h.createElement("h3",{key:"header"},tZ),h.createElement("div",{key:"text"},"For information on setting up your basemap, read"),h.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}var tX=(0,h.forwardRef)(function(t,e){var n=f((0,h.useState)(!0),2),r=n[0],i=n[1],o=f((0,h.useState)({width:0,height:0}),2),a=o[0],s=o[1],c=(0,h.useRef)(null),u=(0,h.useRef)(null),l=(0,h.useRef)(null),p=(0,h.useRef)(null),d=(0,h.useContext)(tL);tz(function(){if(tX.supported()){var e=new tE(tB(tB(tB({},t),a),{},{mapboxgl:tP(),container:u.current,onError:function(e){401===(e.error&&e.error.status||e.status)&&r&&(console.error(tZ),i(!1)),t.onError(e)}}));c.current=e,d&&d.setMap&&d.setMap(e.getMap());var n=new ts(function(e){if(e[0].contentRect){var n=e[0].contentRect,r=n.width,i=n.height;s({width:r,height:i}),t.onResize({width:r,height:i})}});return n.observe(l.current),function(){e.finalize(),c.current=null,n.disconnect()}}},[]),tz(function(){c.current&&c.current.setProps(tB(tB({},t),a))});var v=c.current&&c.current.getMap();(0,h.useImperativeHandle)(e,function(){return{getMap:function(){return c.current&&c.current.getMap()},queryRenderedFeatures:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=c.current&&c.current.getMap();return n&&n.queryRenderedFeatures(t,e)}}},[]);var g=(0,h.useCallback)(function(t){var e=t.target;e===p.current&&e.scrollTo(0,0)},[]),m=v&&h.createElement(tN,{value:tB(tB({},d),{},{viewport:d.viewport||tU(tB({map:v,props:t},a)),map:v,container:d.container||l.current})},h.createElement("div",{key:"map-overlays",className:"overlays",ref:p,style:tq,onScroll:g},t.children)),b=t.className,y=t.width,w=t.height,O=t.style,E=t.visibilityConstraints,_=Object.assign({position:"relative"},O,{width:y,height:w}),P=Object.assign({},tq,{visibility:t.visible&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tD;for(var n in e){var r,i=n.slice(0,3),o=(r=n.slice(3))[0].toLowerCase()+r.slice(1);if("min"===i&&t[o]<e[n]||"max"===i&&t[o]>e[n])return!1}return!0}(t.viewState||t,E)?"inherit":"hidden"});return h.createElement("div",{key:"map-container",ref:l,style:_},h.createElement("div",{key:"map-mapbox",ref:u,style:P,className:b}),m,!r&&!t.disableTokenWarning&&h.createElement(tY,null))});function tK(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}tX.supported=function(){return tP()&&tP().supported()},tX.propTypes=tH,tX.defaultProps=tW;var tG=function(){function t(){tc(this,t),a(this,"propNames",[])}return tl(t,[{key:"arePropsEqual",value:function(t,e){var n,r=function(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return tK(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tK(t,e)}}(t))){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}(this.propNames||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!function t(e,n){if(e===n)return!0;if(tM(e)&&tM(n)){if(e.length!==n.length)return!1;for(var r=0;r<e.length;++r)if(!t(e[r],n[r]))return!1;return!0}return 1e-7>=Math.abs(e-n)}(t[i],e[i]))return!1}}catch(o){r.e(o)}finally{r.f()}return!0}},{key:"initializeProps",value:function(t,e){return{start:t,end:e}}},{key:"interpolateProps",value:function(t,e,n){tT(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(t,e){return e.transitionDuration}}]),t}();function t$(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tJ(t,e){return(tJ=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function tQ(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tJ(t,e)}function t0(t){return(t0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function t1(t,e){if(e&&("object"===t0(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return t$(t)}function t2(t){return(t2=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var t4={longitude:1,bearing:1};function t5(t){return Number.isFinite(t)||Array.isArray(t)}function t3(t,e,n){return t in t4&&Math.abs(n-e)>180&&(n=n<0?n+360:n-360),n}function t8(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return t6(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t6(t,e)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function t6(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var t9=["longitude","latitude","zoom","bearing","pitch"],t7=["latitude","longitude","zoom","width","height"],et=["bearing","pitch"],ee={speed:1.2,curve:1.414};function en(t,e){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return er(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return er(t,e)}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function er(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}!function(t){tQ(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(r);if(e){var i=t2(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return t1(this,t)});function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tc(this,r),a(t$(t=n.call(this)),"propNames",t9),t.props=Object.assign({},ee,e),t}tl(r,[{key:"initializeProps",value:function(t,e){var n,r={},i={},o=t8(t7);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=t[a],c=e[a];tT(t5(s)&&t5(c),"".concat(a," must be supplied for transition")),r[a]=s,i[a]=t3(a,s,c)}}catch(u){o.e(u)}finally{o.f()}var l,h=t8(et);try{for(h.s();!(l=h.n()).done;){var p=l.value,f=t[p]||0,d=e[p]||0;r[p]=f,i[p]=t3(p,f,d)}}catch(v){h.e(v)}finally{h.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(t,e,n){var r,i=function(t,e,n,r={}){var i;const o={},{startZoom:a,startCenterXY:s,uDelta:c,w0:u,u1:l,S:h,rho:p,rho2:f,r0:d}=B(t,e,r);if(l<.01){for(const v of F){const g=t[v],m=e[v];o[v]=n*m+(1-n)*g}return o}const y=n*h,w=Math.cosh(d)/Math.cosh(d+p*y),O=u*((Math.cosh(d)*Math.tanh(d+p*y)-Math.sinh(d))/f)/l,E=a+b(1/w),P=((i=[])[0]=c[0]*O,i[1]=c[1]*O,i);_(P,P,s);const M=C(P);return o.longitude=M[0],o.latitude=M[1],o.zoom=E,o}(t,e,n,this.props),o=t8(et);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=tS(t[a],e[a],n)}}catch(s){o.e(s)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=function(t,e,n={}){let r;n=Object.assign({},V,n);const{screenSpeed:i,speed:o,maxDuration:a}=n,{S:s,rho:c}=B(t,e,n),u=1e3*s;return r=Number.isFinite(i)?u/(i/c):u/o,Number.isFinite(a)&&r>a?0:r}(t,e,this.props)),n}}])}(tG);var ei=["longitude","latitude","zoom","bearing","pitch"],eo=function(t){tQ(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(r);if(e){var i=t2(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return t1(this,t)});function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return tc(this,r),t=n.call(this),Array.isArray(e)&&(e={transitionProps:e}),t.propNames=e.transitionProps||ei,e.around&&(t.around=e.around),t}return tl(r,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new z(t).unproject(this.around);Object.assign(r,e,{around:new z(e).project(i),aroundLngLat:i})}var o,a=en(this.propNames);try{for(a.s();!(o=a.n()).done;){var s=o.value,c=t[s],u=e[s];tT(t5(c)&&t5(u),"".concat(s," must be supplied for transition")),n[s]=c,r[s]=t3(s,c,u)}}catch(l){a.e(l)}finally{a.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=en(this.propNames);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=tS(t[a],e[a],n)}}catch(s){o.e(s)}finally{o.f()}if(e.around){var c=f(new z(Object.assign({},e,i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:tS(t.around,e.around,n)}),2),u=c[0],l=c[1];i.longitude=u,i.latitude=l}return i}}]),r}(tG),ea=function(){},es={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},ec={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new eo,transitionInterruption:es.BREAK,onTransitionStart:ea,onTransitionInterrupt:ea,onTransitionEnd:ea},eu=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tc(this,t),a(this,"_animationFrame",null),a(this,"_onTransitionFrame",function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()}),this.props=null,this.onViewportChange=n.onViewportChange||ea,this.onStateChange=n.onStateChange||ea,this.time=n.getTime||Date.now}return tl(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(t){var e=this.props;if(this.props=t,!e||this._shouldIgnoreViewportChange(e,t))return!1;if(this._isTransitionEnabled(t)){var n=Object.assign({},e),r=Object.assign({},t);if(this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this.state.interruption===es.SNAP_TO_END?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===es.UPDATE)){var i,o,a=this.time(),s=(a-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(a-this.state.startTime),r.transitionEasing=(o=(i=this.state.easing)(s),function(t){return 1/(1-o)*(i(t*(1-s)+s)-o)}),r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,n=t.transitionInterpolator;return(e>0||"auto"===e)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(t,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return!t||(this._isTransitionInProgress()?this.state.interruption===es.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){tT(this._isTransitionEnabled(e)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=e.transitionInterpolator,r=n.getDuration?n.getDuration(t,e):e.transitionDuration;if(0!==r){var i=e.transitionInterpolator.initializeProps(t,e),o={inTransition:!0,isZooming:t.zoom!==e.zoom,isPanning:t.longitude!==e.longitude||t.latitude!==e.latitude,isRotating:t.bearing!==e.bearing||t.pitch!==e.pitch};this.state={duration:r,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startTime:this.time(),startProps:i.start,endProps:i.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(o)}}},{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 t=this.time(),e=this.state,n=e.startTime,r=e.duration,i=e.easing,o=e.interpolator,a=e.startProps,s=e.endProps,c=!1,u=(t-n)/r;u>=1&&(u=1,c=!0),u=i(u);var l=o.interpolateProps(a,s,u),h=new tR(Object.assign({},this.props,l));this.state.propsInTransition=h.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),c&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();a(eu,"defaultProps",ec);var el=n(840),eh=n.n(el);const ep={mousedown:1,mousemove:2,mouseup:4};!function(t){const e=t.prototype.handler;t.prototype.handler=function(t){const n=this.store;t.button>0&&"pointerdown"===t.type&&!function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(n,e=>e.pointerId===t.pointerId)&&n.push(t),e.call(this,t)}}(eh().PointerEventInput),eh().MouseInput.prototype.handler=function(t){let e=ep[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};const ef=eh().Manager;var ed=eh();const ev=ed?[[ed.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[ed.Rotate,{enable:!1}],[ed.Pinch,{enable:!1}],[ed.Swipe,{enable:!1}],[ed.Pan,{threshold:0,enable:!1}],[ed.Press,{enable:!1}],[ed.Tap,{event:"doubletap",taps:2,enable:!1}],[ed.Tap,{event:"anytap",enable:!1}],[ed.Tap,{enable:!1}]]:null,eg={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},em={doubletap:["tap"]},eb={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},ey={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},ew={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"},eO={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},eE="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",e_="undefined"!=typeof window?window:n.g;void 0!==n.g?n.g:window;let eP=!1;try{const eM={get passive(){return eP=!0,!0}};e_.addEventListener("test",eM,eM),e_.removeEventListener("test",eM,eM)}catch(ej){}const eS=-1!==eE.indexOf("firefox"),{WHEEL_EVENTS:eT}=ey,ek="wheel";class ex{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.events=eT.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(e=>t.addEventListener(e,this.handleEvent,!!eP&&{passive:!1}))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===ek&&(this.options.enable=e)}handleEvent(t){if(!this.options.enable)return;let e=t.deltaY;e_.WheelEvent&&(eS&&t.deltaMode===e_.WheelEvent.DOM_DELTA_PIXEL&&(e/=e_.devicePixelRatio),t.deltaMode===e_.WheelEvent.DOM_DELTA_LINE&&(e*=40));const n={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625==0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}_onWheel(t,e,n){this.callback({type:ek,center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}const{MOUSE_EVENTS:eD}=ey,eC="pointermove",eR="pointerover",eA="pointerout",eI="pointerleave";class eL{constructor(t,e,n={}){this.element=t,this.callback=e,this.pressed=!1,this.options=Object.assign({enable:!0},n),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=eD.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===eC&&(this.enableMoveEvent=e),t===eR&&(this.enableOverEvent=e),t===eA&&(this.enableOutEvent=e),t===eI&&(this.enableLeaveEvent=e)}handleEvent(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:eR,srcEvent:t,pointerType:"mouse",target:t.target})}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:eA,srcEvent:t,pointerType:"mouse",target:t.target})}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:eI,srcEvent:t,pointerType:"mouse",target:t.target})}handleMoveEvent(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:eC,srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}const{KEY_EVENTS:eN}=ey,ez="keydown",eF="keyup";class eV{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=eN.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),t.tabIndex=n.tabIndex||0,t.style.outline="none",this.events.forEach(e=>t.addEventListener(e,this.handleEvent))}destroy(){this.events.forEach(t=>this.element.removeEventListener(t,this.handleEvent))}enableEventType(t,e){t===ez&&(this.enableDownEvent=e),t===eF&&(this.enableUpEvent=e)}handleEvent(t){const e=t.target||t.srcElement;("INPUT"!==e.tagName||"text"!==e.type)&&"TEXTAREA"!==e.tagName&&(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:ez,srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:eF,srcEvent:t,key:t.key,target:t.target}))}}const eB="contextmenu";class eZ{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.handleEvent=this.handleEvent.bind(this),t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){t===eB&&(this.options.enable=e)}handleEvent(t){this.options.enable&&this.callback({type:eB,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}const eU={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4},eq={srcElement:"root",priority:0};class eH{constructor(t){this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:a}=this;n&&("object"!=typeof n||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},eq,n):eq;let s=a.get(n.srcElement);s||(s=[],a.set(n.srcElement,s));const c={type:t,handler:e,srcElement:n.srcElement,priority:n.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let u=s.length-1;for(;u>=0&&!(s[u].priority>=c.priority);)u--;s.splice(u+1,0,c)}remove(t,e){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);const a=r.get(o.srcElement);a.splice(a.indexOf(o),1),0===a.length&&r.delete(o.srcElement)}}this._active=n.some(t=>!t.passive)}handleEvent(t){if(this.isEmpty())return;const e=this._normalizeEvent(t);let n=t.srcEvent.target;for(;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}_emit(t,e){const n=this.handlersByElement.get(e);if(n){let r=!1;const i=()=>{t.handled=!0},o=()=>{t.handled=!0,r=!0},a=[];for(let s=0;s<n.length;s++){const{type:c,handler:u,once:l}=n[s];if(u(Object.assign({},t,{type:c,stopPropagation:i,stopImmediatePropagation:o})),l&&a.push(n[s]),r)break}for(let h=0;h<a.length;h++){const{type:p,handler:f}=a[h];this.remove(p,f)}}}_normalizeEvent(t){const e=this.eventManager.element;return Object.assign({},t,function(t){const e=eU[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r,which:i}=t.srcEvent;let o=!1,a=!1,s=!1;return 4!==e&&(2!==e||Number.isFinite(n))?2===e?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===e&&(o=0===r,a=1===r,s=2===r):(o=1===i,a=2===i,s=3===i),{leftButton:o,middleButton:a,rightButton:s}}(t),function(t,e){const{srcEvent:n}=t;if(!t.center&&!Number.isFinite(n.clientX))return null;const r=t.center||{x:n.clientX,y:n.clientY},i=e.getBoundingClientRect(),o=i.width/e.offsetWidth||1,a=i.height/e.offsetHeight||1,s={x:(r.x-i.left-e.clientLeft)/o,y:(r.y-i.top-e.clientTop)/a};return{center:r,offsetCenter:s}}(t,e),{handled:!1,rootElement:e})}}const eW={events:null,recognizers:null,recognizerOptions:{},Manager:ef,touchAction:"none",tabIndex:0};class eY{constructor(t=null,e={}){this.options=Object.assign({},eW,e),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(t);const{events:n}=e;n&&this.on(n)}setElement(t){if(this.element&&this.destroy(),this.element=t,!t)return;const{options:e}=this,n=e.Manager;for(const r in this.manager=new n(t,{touchAction:e.touchAction,recognizers:e.recognizers||ev}).on("hammer.input",this._onBasicInput),e.recognizers||Object.keys(eg).forEach(t=>{const e=this.manager.get(t);e&&eg[t].forEach(t=>{e.recognizeWith(t)})}),e.recognizerOptions){const i=this.manager.get(r);if(i){const o=e.recognizerOptions[r];delete o.enable,i.set(o)}}for(const[a,s]of(this.wheelInput=new ex(t,this._onOtherEvent,{enable:!1}),this.moveInput=new eL(t,this._onOtherEvent,{enable:!1}),this.keyInput=new eV(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new eZ(t,this._onOtherEvent,{enable:!1}),this.events))s.isEmpty()||(this._toggleRecognizer(s.recognizerName,!0),this.manager.on(a,s.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(t,e,n){this._addEventHandler(t,e,n,!1)}once(t,e,n){this._addEventHandler(t,e,n,!0)}watch(t,e,n){this._addEventHandler(t,e,n,!1,!0)}off(t,e){this._removeEventHandler(t,e)}_toggleRecognizer(t,e){const{manager:n}=this;if(!n)return;const r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});const i=em[t];i&&!this.options.recognizers&&i.forEach(i=>{const o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)})}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}_addEventHandler(t,e,n,r,i){if("string"!=typeof t){for(const o in n=e,t)this._addEventHandler(o,t[o],n,r,i);return}const{manager:a,events:s}=this,c=eO[t]||t;let u=s.get(c);!u&&(u=new eH(this),s.set(c,u),u.recognizerName=ew[c]||c,a&&a.on(c,u.handleEvent)),u.add(t,e,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}_removeEventHandler(t,e){if("string"!=typeof t){for(const n in t)this._removeEventHandler(n,t[n]);return}const{events:r}=this,i=eO[t]||t,o=r.get(i);if(o&&(o.remove(t,e),o.isEmpty())){const{recognizerName:a}=o;let s=!1;for(const c of r.values())if(c.recognizerName===a&&!c.isEmpty()){s=!0;break}s||this._toggleRecognizer(a,!1)}}_onBasicInput(t){const{srcEvent:e}=t,n=eb[e.type];n&&this.manager.emit(n,t)}_onOtherEvent(t){this.manager.emit(t.type,t)}}function eX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function eK(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?eX(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var eG={transitionDuration:0},e$={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new eo,transitionInterruption:es.BREAK},eJ=function(t){return 1-(1-t)*(1-t)},eQ={WHEEL:["wheel"],PAN:["panstart","panmove","panend"],PINCH:["pinchstart","pinchmove","pinchend"],TRIPLE_PAN:["tripanstart","tripanmove","tripanend"],DOUBLE_TAP:["doubletap"],KEYBOARD:["keydown"]},e0=function(){function t(){var e=this;tc(this,t),a(this,"events",[]),a(this,"scrollZoom",!0),a(this,"dragPan",!0),a(this,"dragRotate",!0),a(this,"doubleClickZoom",!0),a(this,"touchZoom",!0),a(this,"touchRotate",!1),a(this,"keyboard",!0),a(this,"_interactionState",{isDragging:!1}),a(this,"_events",{}),a(this,"_setInteractionState",function(t){Object.assign(e._interactionState,t),e.onStateChange&&e.onStateChange(e._interactionState)}),a(this,"_onTransition",function(t,n){e.onViewportChange(t,e._interactionState,n)}),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new eu({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return tl(t,[{key:"handleEvent",value:function(t){this.mapState=this.getMapState();var e=this._eventStartBlocked;switch(t.type){case"panstart":return!e&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!e&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!e&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"blockEvents",value:function(t){var e=this,n=setTimeout(function(){e._eventStartBlocked===n&&(e._eventStartBlocked=null)},t);this._eventStartBlocked=n}},{key:"updateViewport",value:function(t,e,n){var r=this.mapState instanceof tR?this.mapState.getViewportProps():this.mapState,i=eK(eK({},t.getViewportProps()),e),o=Object.keys(i).some(function(t){return r[t]!==i[t]});this._state=t.getState(),this._setInteractionState(n),o&&this.onViewportChange(i,this._interactionState,r)}},{key:"getMapState",value:function(t){return new tR(eK(eK(eK({},this.mapStateProps),this._state),t))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(t){var e=t.onViewportChange,n=t.onStateChange,r=t.eventManager,i=void 0===r?this.eventManager:r,o=t.isInteractive,a=void 0===o||o,s=t.scrollZoom,c=void 0===s?this.scrollZoom:s,u=t.dragPan,l=void 0===u?this.dragPan:u,h=t.dragRotate,p=void 0===h?this.dragRotate:h,f=t.doubleClickZoom,d=void 0===f?this.doubleClickZoom:f,v=t.touchZoom,g=void 0===v?this.touchZoom:v,m=t.touchRotate,b=void 0===m?this.touchRotate:m,y=t.keyboard,w=void 0===y?this.keyboard:y;this.onViewportChange=e,this.onStateChange=n;var O=this.mapStateProps||{},E=O.height!==t.height||O.width!==t.width;this.mapStateProps=t,E&&(this.mapState=O,this.updateViewport(new tR(t))),this._transitionManager.processViewportChange(t),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(eQ.WHEEL,a&&Boolean(c)),this.toggleEvents(eQ.PAN,a&&Boolean(l||p)),this.toggleEvents(eQ.PINCH,a&&Boolean(g||b)),this.toggleEvents(eQ.TRIPLE_PAN,a&&Boolean(b)),this.toggleEvents(eQ.DOUBLE_TAP,a&&Boolean(d)),this.toggleEvents(eQ.KEYBOARD,a&&Boolean(w)),this.scrollZoom=c,this.dragPan=l,this.dragRotate=p,this.doubleClickZoom=d,this.touchZoom=g,this.touchRotate=b,this.keyboard=w}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach(function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))})}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);this._panRotate=this.isFunctionKeyPressed(t)||t.rightButton;var n=this._panRotate?this.mapState.rotateStart({pos:e}):this.mapState.panStart({pos:e});return this.updateViewport(n,eG,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotate(t):this._onPanMove(t))}},{key:"_onPanEnd",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotateEnd(t):this._onPanMoveEnd(t))}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.mapState.pan({pos:e});return this.updateViewport(n,eG,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){if(this.dragPan){var e=this.dragPan.inertia,n=void 0===e?300:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.pan({pos:i}).panEnd();return this.updateViewport(o,eK(eK({},e$),{},{transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isPanning:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=this.getCenter(t),n=this.mapState.rotate({pos:e});return this.updateViewport(n,eG,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){if(this.dragRotate){var e=this.dragRotate.inertia,n=void 0===e?300:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.rotate({pos:i}).rotateEnd();return this.updateViewport(o,eK(eK({},e$),{},{transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isRotating:!0}),!0}}var a=this.mapState.panEnd();return this.updateViewport(a,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;var e=this.scrollZoom,n=e.speed,r=e.smooth;t.preventDefault();var i=this.getCenter(t),o=t.delta,a=2/(1+Math.exp(-Math.abs(o*(void 0===n?.01:n))));o<0&&0!==a&&(a=1/a);var s=this.mapState.zoom({pos:i,scale:a});return s.getViewportProps().zoom!==this.mapStateProps.zoom&&(this.updateViewport(s,eK(eK({},e$),{},{transitionInterpolator:new eo({around:i}),transitionDuration:void 0!==r&&r?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t),n=this.mapState.zoomStart({pos:e}).rotateStart({pos:e});return this._startPinchRotation=t.rotation,this._lastPinchEvent=t,this.updateViewport(n,eG,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.isDragging()||!this.touchZoom&&!this.touchRotate)return!1;var e=this.mapState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation;e=e.rotate({deltaAngleX:this._startPinchRotation-i})}return this.updateViewport(e,eG,{isDragging:!0,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:Boolean(this.touchRotate)}),this._lastPinchEvent=t,!0}},{key:"_onPinchEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchZoom){var e=this.touchZoom.inertia,n=void 0===e?300:e,r=this._lastPinchEvent;if(n&&r&&t.scale!==r.scale){var i=this.getCenter(t),o=this.mapState.rotateEnd(),a=Math.log2(t.scale),s=(a-Math.log2(r.scale))/(t.deltaTime-r.deltaTime),c=Math.pow(2,a+s*n/2);return o=o.zoom({pos:i,scale:c}).zoomEnd(),this.updateViewport(o,eK(eK({},e$),{},{transitionInterpolator:new eo({around:i}),transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:!1}),this.blockEvents(n),!0}}var u=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(u,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(t){var e=this.getCenter(t),n=this.mapState.rotateStart({pos:e});return this.updateViewport(n,eG,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(t){if(!this.isDragging()||!this.touchRotate)return!1;var e=this.getCenter(t);e[0]-=t.deltaX;var n=this.mapState.rotate({pos:e});return this.updateViewport(n,eG,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchRotate){var e=this.touchRotate.inertia,n=void 0===e?300:e;if(n&&t.velocityY){var r=this.getCenter(t),i=[r[0],r[1]+=t.velocityY*n/2],o=this.mapState.rotate({pos:i});return this.updateViewport(o,eK(eK({},e$),{},{transitionDuration:n,transitionEasing:eJ}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var a=this.mapState.rotateEnd();return this.updateViewport(a,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t),n=this.isFunctionKeyPressed(t),r=this.mapState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,Object.assign({},e$,{transitionInterpolator:new eo({around:e})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.keyboard,i=r.zoomSpeed,o=void 0===i?2:i,a=r.moveSpeed,s=void 0===a?100:a,c=r.rotateSpeedX,u=void 0===c?15:c,l=r.rotateSpeedY,h=void 0===l?10:l,p=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:p.zoom-Math.log2(o)-1}):this.getMapState({zoom:p.zoom-Math.log2(o)});break;case 187:e=n?this.getMapState({zoom:p.zoom+Math.log2(o)+1}):this.getMapState({zoom:p.zoom+Math.log2(o)});break;case 37:e=n?this.getMapState({bearing:p.bearing-u}):this.mapState.pan({pos:[s,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:p.bearing+u}):this.mapState.pan({pos:[-s,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:p.pitch+h}):this.mapState.pan({pos:[0,s],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:p.pitch-h}):this.mapState.pan({pos:[0,-s],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,e$)}}]),t}();function e1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function e2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?e1(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e1(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var e4=Object.assign({},tX.propTypes,{maxZoom:p.number,minZoom:p.number,maxPitch:p.number,minPitch:p.number,onViewStateChange:p.func,onViewportChange:p.func,onInteractionStateChange:p.func,transitionDuration:p.oneOfType([p.number,p.string]),transitionInterpolator:p.object,transitionInterruption:p.number,transitionEasing:p.func,onTransitionStart:p.func,onTransitionInterrupt:p.func,onTransitionEnd:p.func,scrollZoom:p.oneOfType([p.bool,p.object]),dragPan:p.oneOfType([p.bool,p.object]),dragRotate:p.oneOfType([p.bool,p.object]),doubleClickZoom:p.bool,touchZoom:p.oneOfType([p.bool,p.object]),touchRotate:p.oneOfType([p.bool,p.object]),keyboard:p.oneOfType([p.bool,p.object]),onHover:p.func,onClick:p.func,onDblClick:p.func,onContextMenu:p.func,onMouseDown:p.func,onMouseMove:p.func,onMouseUp:p.func,onTouchStart:p.func,onTouchMove:p.func,onTouchEnd:p.func,onMouseEnter:p.func,onMouseLeave:p.func,onMouseOut:p.func,onWheel:p.func,touchAction:p.string,eventRecognizerOptions:p.object,clickRadius:p.number,interactiveLayerIds:p.array,getCursor:p.func,controller:p.instanceOf(e0)}),e5=Object.assign({},tX.defaultProps,tD,eu.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(t){return t.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:function(t){var e=t.isDragging,n=t.isHovering;return e?"grabbing":n?"pointer":"grab"}});function e3(t){if(t.lngLat||!t.offsetCenter)return t;var e=t.offsetCenter,n=e.x,r=e.y;if(!Number.isFinite(n)||!Number.isFinite(r))return t;var i=[n,r];if(t.point=i,this.map){var o=this.map.unproject(i);t.lngLat=[o.lng,o.lat]}return t}function e8(t){var e=this.map;if(!e||!t)return null;var n={},r=this.props.clickRadius;this.props.interactiveLayerIds&&(n.layers=this.props.interactiveLayerIds);try{return e.queryRenderedFeatures(r?[[t[0]-r,t[1]+r],[t[0]+r,t[1]-r]]:t,n)}catch(i){return null}}function e6(t,e){var n=this.props[t];n&&n(e3.call(this,e))}function e9(t){e6.call(this,"touch"===t.pointerType?"onTouchStart":"onMouseDown",t)}function e7(t){e6.call(this,"touch"===t.pointerType?"onTouchEnd":"onMouseUp",t)}function nt(t){if(e6.call(this,"touch"===t.pointerType?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e,n=this.props,r=n.onHover,i=n.interactiveLayerIds;t=e3.call(this,t),(i||r)&&(e=e8.call(this,t.point));var o=Boolean(i&&e&&e.length>0),a=o&&!this.state.isHovering,s=!o&&this.state.isHovering;(r||a)&&(t.features=e,r&&r(t)),a&&e6.call(this,"onMouseEnter",t),s&&e6.call(this,"onMouseLeave",t),(a||s)&&this.setState({isHovering:o})}}function ne(t){var e=this.props,n=e.onClick,r=e.onNativeClick,i=e.onDblClick,o=e.doubleClickZoom,a=[],s=i||o;switch(t.type){case"anyclick":a.push(r),s||a.push(n);break;case"click":s&&a.push(n)}(a=a.filter(Boolean)).length&&((t=e3.call(this,t)).features=e8.call(this,t.point),a.forEach(function(e){return e(t)}))}var nn=(0,h.forwardRef)(function(t,e){var n,a,s=(0,h.useContext)(tL),c=(0,h.useMemo)(function(){return t.controller||new e0},[]),u=(0,h.useMemo)(function(){return new eY(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})},[]),l=(0,h.useRef)(null),p=(0,h.useRef)(null),f=(0,h.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;f.props=t,f.map=p.current&&p.current.getMap(),f.setState=function(e){f.state=e2(e2({},f.state),e),l.current.style.cursor=t.getCursor(f.state)};var d=!0,v=function(t,e,r){if(d){n=[t,e,r];return}var i=f.props,o=i.onViewStateChange,a=i.onViewportChange;Object.defineProperty(t,"position",{get:function(){return[0,0,tF(f.map,t)]}}),o&&o({viewState:t,interactionState:e,oldViewState:r}),a&&a(t,e,r)};(0,h.useImperativeHandle)(e,function(){return{getMap:p.current&&p.current.getMap,queryRenderedFeatures:p.current&&p.current.queryRenderedFeatures}},[]);var g=(0,h.useMemo)(function(){return e2(e2({},s),{},{eventManager:u,container:s.container||l.current})},[s,l.current]);g.onViewportChange=v,g.viewport=s.viewport||tU(f),f.viewport=g.viewport;var m=function(t){var e=t.isDragging,n=void 0!==e&&e;if(n!==f.state.isDragging&&f.setState({isDragging:n}),d){a=t;return}var r=f.props.onInteractionStateChange;r&&r(t)},b=function(){f.width&&f.height&&c.setOptions(e2(e2(e2({},f.props),f.props.viewState),{},{isInteractive:Boolean(f.props.onViewStateChange||f.props.onViewportChange),onViewportChange:v,onStateChange:m,eventManager:u,width:f.width,height:f.height}))};(0,h.useEffect)(function(){return u.setElement(l.current),u.on({pointerdown:e9.bind(f),pointermove:nt.bind(f),pointerup:e7.bind(f),pointerleave:e6.bind(f,"onMouseOut"),click:ne.bind(f),anyclick:ne.bind(f),dblclick:e6.bind(f,"onDblClick"),wheel:e6.bind(f,"onWheel"),contextmenu:e6.bind(f,"onContextMenu")}),function(){u.destroy()}},[]),tz(function(){if(n){var t;v.apply(void 0,function(t){if(Array.isArray(t))return i(t)}(t=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}a&&m(a)}),b();var y=t.width,w=t.height,O=t.style,E=t.getCursor,_=(0,h.useMemo)(function(){return e2(e2({position:"relative"},O),{},{width:y,height:w,cursor:E(f.state)})},[O,y,w,E,f.state]);return n&&f._child||(f._child=h.createElement(tN,{value:g},h.createElement("div",{key:"event-canvas",ref:l,style:_},h.createElement(tX,r({},t,{width:"100%",height:"100%",style:null,onResize:function(t){var e=t.width,n=t.height;f.width=e,f.height=n,b(),f.props.onResize({width:e,height:n})},ref:p}))))),d=!1,f._child});nn.supported=tX.supported,nn.propTypes=e4,nn.defaultProps=e5;var nr=nn;p.string.isRequired,p.string,p.oneOf(["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade","sky"]).isRequired,p.string,p.string,p.string;var ni={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},no={captureScroll:p.bool,captureDrag:p.bool,captureClick:p.bool,captureDoubleClick:p.bool,capturePointerMove:p.bool};function na(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,h.useContext)(tL),n=(0,h.useRef)(null),r=(0,h.useRef)({props:t,state:{},context:e,containerRef:n}).current;return r.props=t,r.context=e,(0,h.useEffect)(function(){return function(t){var e=t.containerRef.current,n=t.context.eventManager;if(e&&n){var r={wheel:function(e){var n=t.props;n.captureScroll&&e.stopPropagation(),n.onScroll&&n.onScroll(e,t)},panstart:function(e){var n=t.props;n.captureDrag&&e.stopPropagation(),n.onDragStart&&n.onDragStart(e,t)},anyclick:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onNativeClick&&n.onNativeClick(e,t)},click:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onClick&&n.onClick(e,t)},dblclick:function(e){var n=t.props;n.captureDoubleClick&&e.stopPropagation(),n.onDoubleClick&&n.onDoubleClick(e,t)},pointermove:function(e){var n=t.props;n.capturePointerMove&&e.stopPropagation(),n.onPointerMove&&n.onPointerMove(e,t)}};return n.watch(r,e),function(){n.off(r)}}}(r)},[e.eventManager]),r}function ns(t){var e=t.instance,n=na(t),r=n.context,i=n.containerRef;return e._context=r,e._containerRef=i,e._render()}var nc=function(t){tQ(i,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=t2(i);if(e){var r=t2(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return t1(this,t)});function i(){var t;tc(this,i);for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return a(t$(t=n.call.apply(n,[this].concat(r))),"_context",{}),a(t$(t),"_containerRef",(0,h.createRef)()),a(t$(t),"_onScroll",function(t){}),a(t$(t),"_onDragStart",function(t){}),a(t$(t),"_onDblClick",function(t){}),a(t$(t),"_onClick",function(t){}),a(t$(t),"_onPointerMove",function(t){}),t}return tl(i,[{key:"_render",value:function(){throw Error("_render() not implemented")}},{key:"render",value:function(){return h.createElement(ns,r({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),i}(h.PureComponent);function nu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nu(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nu(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}a(nc,"propTypes",no),a(nc,"defaultProps",ni);var nh=Object.assign({},no,{draggable:p.bool,onDrag:p.func,onDragEnd:p.func,onDragStart:p.func,offsetLeft:p.number,offsetTop:p.number}),np=Object.assign({},ni,{draggable:!1,offsetLeft:0,offsetTop:0});function nf(t){var e=t.offsetCenter;return[e.x,e.y]}function nd(t,e,n,r){var i=t[0]+e[0]-n.offsetLeft,o=t[1]+e[1]-n.offsetTop;return r.viewport.unproject([i,o])}function nv(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context,a=e.containerRef;if(n.draggable){t.stopPropagation();var s=nf(t),c=function(t,e){var n=t.center,r=n.x,i=n.y;if(e){var o=e.getBoundingClientRect();return[o.left-r,o.top-i]}return null}(t,a.current);if(i.setDragPos(s),i.setDragOffset(c),r.onDragStart&&c){var u=Object.assign({},t);u.lngLat=nd(s,c,n,o),r.onDragStart(u)}}}var ng="undefined"!=typeof window&&window.devicePixelRatio||1,nm=function(t){return Math.round(t*ng)/ng},nb=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";if(null===t)return e;var r="x"===n?t.offsetWidth:t.offsetHeight;return nm(e/100*r)/r*100};function ny(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}var nw=Object.assign({},nh,{className:p.string,longitude:p.number.isRequired,latitude:p.number.isRequired,style:p.object}),nO=Object.assign({},np,{className:""});function nE(t){var e,n,r,i,o,s,c,u=(n=(e=f((0,h.useState)(null),2))[0],r=e[1],o=(i=f((0,h.useState)(null),2))[0],s=i[1],(c=na(nl(nl({},t),{},{onDragStart:nv}))).callbacks=t,c.state.dragPos=n,c.state.setDragPos=r,c.state.dragOffset=o,c.state.setDragOffset=s,(0,h.useEffect)(function(){return function(t){var e=t.context.eventManager;if(e&&t.state.dragPos){var n={panmove:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var a=nf(t);i.setDragPos(a);var s=i.dragOffset;if(r.onDrag&&s){var c=Object.assign({},t);c.lngLat=nd(a,s,n,o),r.onDrag(c)}}(e,t)},panend:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var a=i.dragPos,s=i.dragOffset;if(i.setDragPos(null),i.setDragOffset(null),r.onDragEnd&&a&&s){var c=Object.assign({},t);c.lngLat=nd(a,s,n,o),r.onDragEnd(c)}}(e,t)},pancancel:function(e){var n;return n=t.state,void(e.stopPropagation(),n.setDragPos(null),n.setDragOffset(null))}};return e.watch(n),function(){e.off(n)}}}(c)},[c.context.eventManager,Boolean(n)]),c),l=u.state,p=u.containerRef,d=t.children,v=t.className,g=t.draggable,m=t.style,b=l.dragPos,y=function(t){var e=t.props,n=t.state,r=t.context,i=e.longitude,o=e.latitude,a=e.offsetLeft,s=e.offsetTop,c=n.dragPos,u=n.dragOffset,l=r.viewport,h=r.map;if(c&&u)return[c[0]+u[0],c[1]+u[1]];var p=tF(h,{longitude:i,latitude:o}),d=f(l.project([i,o,p]),2),v=d[0],g=d[1];return[v+=a,g+=s]}(u),w=f(y,2),O=w[0],E=w[1],_="translate(".concat(nm(O),"px, ").concat(nm(E),"px)"),P=g?b?"grabbing":"grab":"auto",M=(0,h.useMemo)(function(){var t=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ny(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ny(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0,transform:_,cursor:P},m);return h.createElement("div",{className:"mapboxgl-marker ".concat(v),ref:u.containerRef,style:t},d)},[d,v]),j=p.current;return j&&(j.style.transform=_,j.style.cursor=P),M}nE.defaultProps=nO,nE.propTypes=nw,h.memo(nE);var n_={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}},nP=Object.keys(n_),nM=Object.assign({},no,{className:p.string,longitude:p.number.isRequired,latitude:p.number.isRequired,altitude:p.number,offsetLeft:p.number,offsetTop:p.number,tipSize:p.number,closeButton:p.bool,closeOnClick:p.bool,anchor:p.oneOf(Object.keys(n_)),dynamicPosition:p.bool,sortByDepth:p.bool,onClose:p.func}),nj=Object.assign({},ni,{className:"",offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function nS(t){var e,n,r,i,o,a,s,c,u,l,p,d,v,g,m,b,y,w,O,E=(0,h.useRef)(null),_=na(t),P=_.context,M=_.containerRef,j=f((0,h.useState)(!1),2)[1];(0,h.useEffect)(function(){j(!0)},[E.current]),(0,h.useEffect)(function(){if(P.eventManager&&t.closeOnClick){var e=function(){return _.props.onClose()};return P.eventManager.on("anyclick",e),function(){P.eventManager.off("anyclick",e)}}},[P.eventManager,t.closeOnClick]);var S=P.viewport,T=P.map,k=t.className,x=t.longitude,D=t.latitude,C=t.tipSize,R=t.closeButton,A=t.children,I=t.altitude;void 0===I&&(I=tF(T,{longitude:x,latitude:D}));var L=S.project([x,D,I]),N=(e=E.current,r=(n=f(L,2))[0],i=n[1],o=t.anchor,a=t.dynamicPosition,s=t.tipSize,e&&a?function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.selfWidth,a=t.selfHeight,s=t.anchor,c=t.padding,u=void 0===c?0:c,l=n_[s],h=l.x,p=l.y,f=n-p*a,d=f+a,v=Math.max(0,u-f)+Math.max(0,d-i+u);if(v>0){var g=p,m=v;for(p=0;p<=1;p+=.5)d=(f=n-p*a)+a,(v=Math.max(0,u-f)+Math.max(0,d-i+u))<m&&(m=v,g=p);p=g}var b=.5;.5===p&&(h=Math.floor(h),b=1);var y=e-h*o,w=y+o,O=Math.max(0,u-y)+Math.max(0,w-r+u);if(O>0){var E=h,_=O;for(h=0;h<=1;h+=b)w=(y=e-h*o)+o,(O=Math.max(0,u-y)+Math.max(0,w-r+u))<_&&(_=O,E=h);h=E}return nP.find(function(t){var e=n_[t];return e.x===h&&e.y===p})||s}({x:r,y:i,anchor:o,padding:s,width:S.width,height:S.height,selfWidth:e.clientWidth,selfHeight:e.clientHeight}):o),z=(c=M.current,l=(u=f(L,3))[0],p=u[1],d=u[2],v=t.offsetLeft,g=t.offsetTop,m=t.sortByDepth,y=nb(c,-(100*(b=n_[N]).x)),w=nb(c,-(100*b.y),"y"),O={position:"absolute",transform:"\n translate(".concat(y,"%, ").concat(w,"%)\n translate(").concat(nm(l+v),"px, ").concat(nm(p+g),"px)\n "),display:void 0,zIndex:void 0},m&&(d>1||d<-1||l<0||l>S.width||p<0||p>S.height?O.display="none":O.zIndex=Math.floor((1-d)/2*1e5)),O),F=(0,h.useCallback)(function(t){_.props.onClose();var e=_.context.eventManager;e&&e.once("click",function(t){return t.stopPropagation()},t.target)},[]);return h.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(N," ").concat(k),style:z,ref:M},h.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:C}}),h.createElement("div",{key:"content",ref:E,className:"mapboxgl-popup-content"},R&&h.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:F},"\xd7"),A))}function nT(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nS.propTypes=nM,nS.defaultProps=nj,h.memo(nS);var nk=Object.assign({},no,{toggleLabel:p.string,className:p.string,style:p.object,compact:p.bool,customAttribution:p.oneOfType([p.string,p.arrayOf(p.string)])}),nx=Object.assign({},ni,{className:"",toggleLabel:"Toggle Attribution"});function nD(t){var e=na(t),n=e.context,r=e.containerRef,i=(0,h.useRef)(null),o=f((0,h.useState)(!1),2),s=o[0],c=o[1];(0,h.useEffect)(function(){var e,o,a,s,c,u;return n.map&&(o={customAttribution:t.customAttribution},a=n.map,s=r.current,c=i.current,(u=new(tP()).AttributionControl(o))._map=a,u._container=s,u._innerContainer=c,u._updateAttributions(),u._updateEditLink(),a.on("styledata",u._updateData),a.on("sourcedata",u._updateData),e=u),function(){var t;return e&&void((t=e)._map.off("styledata",t._updateData),t._map.off("sourcedata",t._updateData))}},[n.map]);var u=void 0===t.compact?n.viewport.width<=640:t.compact;(0,h.useEffect)(function(){!u&&s&&c(!1)},[u]);var l=(0,h.useCallback)(function(){return c(function(t){return!t})},[]),p=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nT(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nT(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:p,className:t.className},h.createElement("div",{ref:r,"aria-pressed":s,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(u?"mapboxgl-compact":""," ").concat(s?"mapboxgl-compact-show":"")},h.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:t.toggleLabel,onClick:l}),h.createElement("div",{ref:i,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}function nC(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nD.propTypes=nk,nD.defaultProps=nx,h.memo(nD);var nR=Object.assign({},no,{className:p.string,style:p.object,container:p.object,label:p.string}),nA=Object.assign({},ni,{className:"",container:null,label:"Toggle fullscreen"});function nI(t){var e=na(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(!1),2),o=i[0],s=i[1],c=f((0,h.useState)(!1),2),u=c[0],l=c[1],p=f((0,h.useState)(null),2),d=p[0],v=p[1];(0,h.useEffect)(function(){var t=new(tP()).FullscreenControl;v(t),l(t._checkFullscreenSupport());var e=function(){var e=!t._fullscreen;t._fullscreen=e,s(e)};return th.addEventListener(t._fullscreenchange,e),function(){th.removeEventListener(t._fullscreenchange,e)}},[]);var g=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nC(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nC(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);if(!u)return null;var m=t.className,b=t.label,y=o?"shrink":"fullscreen";return h.createElement("div",{style:g,className:m},h.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},h.createElement("button",{key:y,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(y),type:"button",title:b,onClick:function(){d&&(d._container=t.container||n.container,d._onClickFullscreen())}},h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}function nL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nI.propTypes=nR,nI.defaultProps=nA,h.memo(nI);var nN=function(){},nz=Object.assign({},no,{className:p.string,style:p.object,label:p.string,disabledLabel:p.string,auto:p.bool,positionOptions:p.object,fitBoundsOptions:p.object,trackUserLocation:p.bool,showUserLocation:p.bool,showAccuracyCircle:p.bool,showUserHeading:p.bool,onViewStateChange:p.func,onViewportChange:p.func,onGeolocate:p.func}),nF=Object.assign({},ni,{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 nV(t){var e=na(t),n=e.context,r=e.containerRef,i=(0,h.useRef)(null),o=f((0,h.useState)(null),2),s=o[0],c=o[1],u=f((0,h.useState)(!1),2),p=u[0],d=u[1];(0,h.useEffect)(function(){var r;return n.map&&(void 0!==l?Promise.resolve(l):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then(function(t){return l="denied"!==t.state}):Promise.resolve(l=Boolean(window.navigator.geolocation))).then(function(o){if(d(o),i.current){var a,s,u;a=i.current,(s=new(tP()).GeolocateControl(t))._container=th.createElement("div"),s._map={on:function(){},_getUIString:function(){return""}},s._setupUI(!0),s._map=n.map,s._geolocateButton=a,u=n.eventManager,s.options.trackUserLocation&&u&&u.on("panstart",function(){"ACTIVE_LOCK"===s._watchState&&(s._watchState="BACKGROUND",a.classList.add("mapboxgl-ctrl-geolocate-background"),a.classList.remove("mapboxgl-ctrl-geolocate-active"))}),s.on("geolocate",t.onGeolocate),(r=s)._updateCamera=function(t){var n,r,i,o,a,s,c,u,l,h,p,f,d;return n=e.context,r=e.props,i=new(tP()).LngLat(t.coords.longitude,t.coords.latitude),o=t.coords.accuracy,s=[[(a=i.toBounds(o))._ne.lng,a._ne.lat],[a._sw.lng,a._sw.lat]],u=(c=n.viewport.fitBounds(s,r.fitBoundsOptions)).longitude,l=c.latitude,h=c.zoom,p=Object.assign({},n.viewport,{longitude:u,latitude:l,zoom:h}),f=Object.assign({},new tR(p).getViewportProps(),e$),d=r.onViewportChange||n.onViewportChange||nN,void((r.onViewStateChange||n.onViewStateChange||nN)({viewState:f}),d(f))},c(r)}}),function(){r&&r._clearWatch()}},[n.map]);var v=(0,h.useCallback)(function(){s&&(s.options=e.props,s.trigger())},[s]);(0,h.useEffect)(function(){t.auto&&v()},[s,t.auto]),(0,h.useEffect)(function(){s&&s._onZoom()},[n.viewport.zoom]);var g=t.className,m=t.label,b=t.disabledLabel,y=t.trackUserLocation,w=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nL(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nL(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:w,className:g},h.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},h.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:i,disabled:!p,"aria-pressed":!y,type:"button",title:p?m:b,"aria-label":p?m:b,onClick:v},h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}function nB(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nV.propTypes=nz,nV.defaultProps=nF,h.memo(nV);var nZ=function(){},nU=Object.assign({},no,{className:p.string,style:p.object,onViewStateChange:p.func,onViewportChange:p.func,showCompass:p.bool,showZoom:p.bool,zoomInLabel:p.string,zoomOutLabel:p.string,compassLabel:p.string}),nq=Object.assign({},ni,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function nH(t,e,n){var r=t.viewport,i=Object.assign({},new tR(Object.assign({},r,n)).getViewportProps(),e$),o=e.onViewportChange||t.onViewportChange||nZ;(e.onViewStateChange||t.onViewStateChange||nZ)({viewState:i}),o(i)}function nW(t,e,n,r){return h.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},r||h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function nY(t){var e,n,r,i=na(t),o=i.context,s=i.containerRef,c=t.className,u=t.showCompass,l=t.showZoom,p=t.zoomInLabel,f=t.zoomOutLabel,d=t.compassLabel,v=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nB(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nB(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:v,className:c},h.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:s},l&&nW("zoom-in",p,function(){nH(o,t,{zoom:o.viewport.zoom+1})}),l&&nW("zoom-out",f,function(){nH(o,t,{zoom:o.viewport.zoom-1})}),u&&nW("compass",d,function(){nH(o,t,{bearing:0,pitch:0})},(e=(0,h.useMemo)(function(){return o.map?function(t,e){for(var n=(t||"").split(".").map(Number),r=(e||"").split(".").map(Number),i=0;i<3;i++){var o=n[i]||0,a=r[i]||0;if(o<a)return -1;if(o>a)return 1}return 0}(o.map.version,"1.6.0")>=0?2:1:2},[o.map]),n=o.viewport.bearing,r={transform:"rotate(".concat(-n,"deg)")},2===e?h.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:r}):h.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:r})))))}function nX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}nY.propTypes=nU,nY.defaultProps=nq,h.memo(nY);var nK=Object.assign({},no,{className:p.string,style:p.object,maxWidth:p.number,unit:p.oneOf(["imperial","metric","nautical"])}),nG=Object.assign({},ni,{className:"",maxWidth:100,unit:"metric"});function n$(t){var e=na(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(null),2),o=i[0],s=i[1];(0,h.useEffect)(function(){if(n.map){var t=new(tP()).ScaleControl;t._map=n.map,t._container=r.current,s(t)}},[n.map]),o&&(o.options=t,o._onMove());var c=(0,h.useMemo)(function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nX(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nX(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute"},t.style)},[t.style]);return h.createElement("div",{style:c,className:t.className},h.createElement("div",{ref:r,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}n$.propTypes=nK,n$.defaultProps=nG,h.memo(n$);var nJ="undefined"!=typeof window&&window.devicePixelRatio||1,nQ=Object.assign({},no,{redraw:p.func.isRequired});function n0(t){var e=na(t),n=e.context,r=e.containerRef,i=f((0,h.useState)(null),2),o=i[0],a=i[1];(0,h.useEffect)(function(){a(r.current.getContext("2d"))},[]);var s=n.viewport,c=n.isDragging;return o&&(o.save(),o.scale(nJ,nJ),t.redraw({width:s.width,height:s.height,ctx:o,isDragging:c,project:s.project,unproject:s.unproject}),o.restore()),h.createElement("canvas",{ref:r,width:s.width*nJ,height:s.height*nJ,style:{width:"".concat(s.width,"px"),height:"".concat(s.height,"px"),position:"absolute",left:0,top:0}})}function n1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}n0.propTypes=nQ,n0.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};var n2=Object.assign({},no,{redraw:p.func.isRequired,style:p.object});function n4(t){var e=na(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?n1(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n1(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0,width:i.width,height:i.height},t.style);return h.createElement("div",{ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}function n5(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}n4.propTypes=n2,n4.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};var n3=Object.assign({},no,{redraw:p.func.isRequired,style:p.object});function n8(t){var e=na(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?n5(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):n5(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({position:"absolute",left:0,top:0},t.style);return h.createElement("svg",{width:i.width,height:i.height,ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}n8.propTypes=n3,n8.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1},tP()&&tP().setRTLTextPlugin}}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should remove these tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give the new snapshot output of #6750?
It's let current_component;
try {
!function(component) {
let parent = current_component;
current_component = component, parent.m();
}({
m () {
console.log("call m()");
}
});
} catch (e) {
console.log('PASS');
} |
I'll add a snapshot test |
Description:
Related issue: