/** *version:1.0.141 *build_time:2021-06-08 17:25:57 *git_version:4a515cc2bbf1b1597c430235e6c261539a741cef **/ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["egis-2d"]=e():t["egis-2d"]=e()}(window,function(){return m=[function(t,e,n){var i;void 0===(i=function(t,e,n){function r(){}var i=1e4;function o(t,e){var n=e.prototype,i=t.prototype;for(var r in n)i[r]=n[r];i.uber=n,function(t){t.extend=function(t){var e=this,n="function"==typeof t.initialize?t.initialize:function(t){e.call(this,t||{})};for(var i in o(n,this),t)t.hasOwnProperty(i)&&"prototype"!==i&&"initialize"!=i&&(n.prototype[i]=t[i]);return n}}(t)}return r.extend2=function(t,e){o(t,e)},r.extend=function(n,t){var e="function"==typeof t.initialize?t.initialize:function(t){var e=t||{};n.call(this,e)};for(var i in r.extend2(e,n),t)t.hasOwnProperty(i)&&"prototype"!==i&&"initialize"!=i&&(e.prototype[i]=t[i]);return e},r.isArray=function(t){return!!t&&t.constructor==Array},r.newId=function(){return i++},r.destroyObject=function(t){!function t(e){if(null!=e&&e instanceof Object)for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(null!=i){if(i instanceof Array){for(var r=0;rr.x&&(t=r.x),er.y&&(miny=r.y),maxyr.z&&(minz=r.z),maxz=t.y?-Math.PI/2:Math.PI/2:Math.atan2(t.y-e.y,e.x-t.x))<0&&(n+=2*Math.PI),180*n/Math.PI}function o(t,e,n,i,r){var o,a,s,l,u,h;0==U&&(U=1),o=t,a=e,n[r]=t,i[r]=e,r++;for(var c=1;c<=U;c++)s=1/parseFloat(U*parseFloat(c)),o=t+F*(l=s*s*(3-2*s))+j*(u=s*(s-1)*(s-1))+q*(h=s*s*(s-1)),a=e+G*l+V*u+B*h,n[r]=o,i[r]=a,r++}function h(t,e){if(Math.abs(t.x-e.x)=t.y&&e.x>=t.x?i+Math.PI:e.y>=t.y&&e.x=t.x&&(n=Math.PI-i),n)},I=function(t,e,n){if(2==e)return L(t,n);for(var i=0,r=f(e),o=0;o<=e-t;o++){i+=(o%2==0?1:-1)*f(e+1)*Math.pow(n+e-t-o,e)}return i/r},L=function(t,e){return 0==t?Math.pow(e-1,2)/2:1==t?(-2*Math.pow(e,2)+2*e+1)/2:2==t?Math.pow(e,2)/2:0},R=function(t,e,n,i,r){var o=E(t,e),a=0;a="left"==r?o+n:o-n;var s=i*Math.cos(a),l=i*Math.sin(a);return null==e?null:new O({x:e.x+s,y:e.y+l})};return{calculationCircleR:function(t,e,n){if(3857==n){var i=0,r=t.x-e.x,o=t.y-e.y;i=Math.pow(r*r+o*o,.5)}else{i=0;var a=t.y*Math.PI,s=e.y*Math.PI,l=a-s,u=(t.x-e.x)*Math.PI;i=6378.137*(i=2*Math.asin(Math.sqrt(Math.pow(Math.sin(l/2),2)+Math.cos(a)*Math.cos(s)*Math.pow(Math.sin(u/2),2))))*1e3}return i},circleRadiusChange:function(t,e,n,i){return e.y=t.y,e.x=t.x-n,e},calculationElipseLengthWide:function(t,e,n){return[Math.abs(t.x-e.x),Math.abs(t.y-e.y)]},calculationElipseLength:function(t,e,n,i){return e.x=t.x+n,e},calculationElipseWide:function(t,e,n,i){return e.y=t.y-n,e},calculationRecLengthWide:function(t,e,n,i){return[_(t,e),r(t,e,n)]},calculationRecLength:function(t,e,n,i){},calculationRecWide:function(t,e,n,i){return e.y=t.y-n,e},calculationSectorRadiusAngle:function(t,e,n,i){return[Math.abs(t.x-e.x),360-180/Math.PI*getAngleOfThreePoints(e,t,n)]},calculationSectorRadius:function(t,e,n,i){},calculationSectorAngle:function(t,e,n,i){},getDistance:r,scalePoint:function(t,e,n){return new O({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n})},vertex:function(t,e,n,i,r,o){var a,s,l=o||90,u=c(t,e)+l;360pti0.x&&(h=0-h),a=r-1,f=pti0.x,d=pti0.y,y=pti.x,c=(d-pti.y)/(f-y),p=h/Math.sqrt(1+c*c),o=new O({x:f+p,y:d+p*c}),h+_(t[r-1],o);break}return[o,i=i?-1:a]},baseLength:x,wholeDistance:g,midPoint:l,polarAngle360:v,getPolarPointOfCenterPoint:w,calInterPoints:t,computePoint:function(t,e,n,i,r,o){var a,s;for(o[0]=0,a=o[1]=0;a<=e;a++)s=A(a,n,t,i),o[0]=o[0]+r[a][0]*s,o[1]=o[1]+r[a][1]*s},blend:A,computeIntervals:function(t,e,n){var i;for(i=0;i<=e+n;i++)i=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(t,e,n,i,r){for(var o=[e,n];o.length;)if(!((n=o.pop())-(e=o.pop())<=i)){var a=e+Math.ceil((n-e)/i/2)*i;l=r,function t(e,n,i,r,o){for(;ithis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},t.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,f(n,this.toBBox),f(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},t.prototype._splitRoot=function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},t.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,a,s,l,u,h=1/0,c=1/0,p=e;p<=n-e;p++){var f=g(t,0,p,this.toBBox),d=g(t,p,n,this.toBBox),y=(r=f,o=d,a=Math.max(r.minX,o.minX),s=Math.max(r.minY,o.minY),l=Math.min(r.maxX,o.maxX),u=Math.min(r.maxY,o.maxY),Math.max(0,l-a)*Math.max(0,u-s)),m=v(f)+v(d);y=i.length){var r=[];L.forEach(function(t,e){if(1!==e&&!this.findTouch(i,e-2)){var n=t.out;r.push(n)}},this),r.forEach(this.cancelOut,this)}},touchstart:function(t){this.vacuumTouches(t),this.setPrimaryTouch(t.changedTouches[0]),this.dedupSynthMouse(t),this.scrolling||this.processTouches(t,this.overDown)},overDown:function(t){L.set(t.pointerId,{target:t.target,out:t,outTarget:t.target}),h.enterOver(t),h.down(t)},touchforcechange:function(t){this.touchmove(t)},touchmove:function(t){this.scrolling||(this.shouldScroll(t)?(this.scrolling=!0,this.touchcancel(t)):("touchforcechange"!==t.type&&t.preventDefault(),this.processTouches(t,this.moveOverOut)))},moveOverOut:function(t){var e=t,n=L.get(e.pointerId);if(n){var i=n.out,r=n.outTarget;h.move(e),i&&r!==e.target&&(i.relatedTarget=e.target,e.relatedTarget=r,i.target=r,e.target?(h.leaveOut(i),h.enterOver(e)):(e.target=r,e.relatedTarget=null,this.cancelOut(e))),n.out=e,n.outTarget=e.target}},touchend:function(t){this.dedupSynthMouse(t),this.processTouches(t,this.upOut)},upOut:function(t){this.scrolling||(h.up(t),h.leaveOut(t)),this.cleanUpPointer(t)},touchcancel:function(t){this.processTouches(t,this.cancelOut)},cancelOut:function(t){h.cancel(t),h.leaveOut(t),this.cleanUpPointer(t)},cleanUpPointer:function(t){L.delete(t.pointerId),this.removePrimaryPointer(t)},dedupSynthMouse:function(t){var e=T.lastTouches,n=t.changedTouches[0];if(this.isPrimaryTouch(n)){var i={x:n.clientX,y:n.clientY};e.push(i);var r=function(t,e){var n=t.indexOf(e);-1>>0):4294967296*(e>>>0)+(t>>>0)}function l(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;t<=r;r--)n.buf[r+i]=n.buf[r]}function u(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function _(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=_(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+4294967296*v(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+4294967296*_(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:function(t,e,n){var i,r,o=n.buf;if(r=o[n.pos++],i=(112&r)>>4,r<128)return s(t,i,e);if(r=o[n.pos++],i|=(127&r)<<3,r<128)return s(t,i,e);if(r=o[n.pos++],i|=(127&r)<<10,r<128)return s(t,i,e);if(r=o[n.pos++],i|=(127&r)<<17,r<128)return s(t,i,e);if(r=o[n.pos++],i|=(127&r)<<24,r<128)return s(t,i,e);if(r=o[n.pos++],i|=(1&r)<<31,r<128)return s(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return 12<=(this.pos=t)-e&&o?function(t,e,n){return o.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var i="",r=e;r>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),r+=h}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var n=a(this);for(t=t||[];this.pos>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(127>>=7)|(127>>=7)|(127>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,r,o=0;o>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;128<=n&&l(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n>1,h=-7,c=n?r-1:0,p=n?-1:1,f=t[e+c];for(c+=p,o=f&(1<<-h)-1,f>>=-h,h+=s;0>=-h,h+=i;0>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(e+=1<=a+c?p/l:p*Math.pow(2,1-c))*l&&(a++,l/=2),h<=a+c?(s=0,a=h):1<=a+c?(s=(e*l-1)*Math.pow(2,r),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,r),a=0));8<=r;t[n+f]=255&s,f+=d,s/=256,r-=8);for(a=a<this._maxQueueLength;)this._queue.shift().callback(null,null)},i.prototype._dispatch=function(){if(0===this._running&&0>>0,r=0;r=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}var Wt=function(r){function t(t){var e=this,n=v({},t);delete n.source,(e=r.call(this,n)||this).mapPrecomposeKey_=null,e.mapRenderKey_=null,e.sourceChangeKey_=null,e.renderer_=null,t.render&&(e.render=t.render),t.map&&e.setMap(t.map),e.addEventListener(W(Ot),e.handleSourcePropertyChange_);var i=t.source?t.source:null;return e.setSource(i),e}return Bt(t,r),t.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},t.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},t.prototype.getSource=function(){return this.get(Ot)||null},t.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Gt},t.prototype.handleSourceChange_=function(){this.changed()},t.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(_(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=x(t,R,this.handleSourceChange_,this)),this.changed()},t.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},t.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return n.renderFrame(t,e)},t.prototype.setMap=function(t){this.mapPrecomposeKey_&&(_(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(_(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=x(t,Dt,function(t){t.frameState.layerStatesArray.push(this.getLayerState(!1))},this),this.mapRenderKey_=x(this,R,t.render,t),this.changed())},t.prototype.setSource=function(t){this.set(Ot,t)},t.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},t.prototype.hasRenderer=function(){return!!this.renderer_},t.prototype.createRenderer=function(){return null},t.prototype.disposeInternal=function(){this.setSource(null),r.prototype.disposeInternal.call(this)},t}(zt),Zt=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();function Xt(t){this.updateElement_(t.frameState)}var Ht=function(c){function t(t){var e=this,n=t||{};(e=c.call(this,{element:document.createElement("div"),render:n.render||Xt,target:n.target})||this).ulElement_=document.createElement("ul"),e.collapsed_=void 0===n.collapsed||n.collapsed,e.overrideCollapsible_=void 0!==n.collapsible,e.collapsible_=void 0===n.collapsible||n.collapsible,e.collapsible_||(e.collapsed_=!1);var i=void 0!==n.className?n.className:"ol-attribution",r=void 0!==n.tipLabel?n.tipLabel:"Attributions",o=void 0!==n.collapseLabel?n.collapseLabel:"»";"string"==typeof o?(e.collapseLabel_=document.createElement("span"),e.collapseLabel_.textContent=o):e.collapseLabel_=o;var a=void 0!==n.label?n.label:"i";"string"==typeof a?(e.label_=document.createElement("span"),e.label_.textContent=a):e.label_=a;var s=e.collapsible_&&!e.collapsed_?e.collapseLabel_:e.label_,l=document.createElement("button");l.setAttribute("type","button"),l.title=r,l.appendChild(s),l.addEventListener(N,e.handleClick_.bind(e),!1);var u=i+" ol-unselectable ol-control"+(e.collapsed_&&e.collapsible_?" ol-collapsed":"")+(e.collapsible_?"":" ol-uncollapsible"),h=e.element;return h.className=u,h.appendChild(e.ulElement_),h.appendChild(l),e.renderedAttributions_=[],e.renderedVisible_=!0,e}return Zt(t,c),t.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],i=t.layerStatesArray,r=0,o=i.length;rt[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Oe(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function Ne(t,e,n,i,r){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Xe(t){return t[2]this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},t.prototype.disposeInternal=function(){this.relayedListenerKey_&&(_(this.relayedListenerKey_),this.relayedListenerKey_=null),this.pointerdownListenerKey_&&(_(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(_),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},t}(L),ii="layergroup",ri="size",oi="target",ai="view",si=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,y(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){K(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;0<=t;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,n=this.priorities_,i=e.length,r=e[t],o=n[t],a=t;t>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=lo))break;n[e]=n[a],i[e]=i[a],e=a}n[e]=r,i[e]=o},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,r=this.elements_,o=this.priorities_,a=0,s=r.length;for(e=0;ee?i:new Array(1+e-r).join("0")+i}function wi(t,e){for(var n=(""+t).split("."),i=(""+e).split("."),r=0;r=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]||Lr(t,e,n,i,function(t,e){return function(t,e,n){var i=!1,r=Ce(t,e),o=Ce(t,n);if(r===fe||o===fe)i=!0;else{var a=t[0],s=t[1],l=t[2],u=t[3],h=e[0],c=e[1],p=n[0],f=n[1],d=(f-c)/(p-h),y=void 0,m=void 0;o&de&&!(r&de)&&(i=(y=p-(f-u)/d)>=a&&y<=l),i||!(o&ye)||r&ye||(i=(m=f-(p-l)*d)>=s&&m<=u),i||!(o&me)||r&me||(i=(y=p-(f-s)/d)>=a&&y<=l),i||!(o&ge)||r&ge||(i=(m=f-(p-a)*d)>=s&&m<=u)}return i}(r,t,e)}))}function Or(t,e,n,i,r){if(!function(t,e,n,i,r){return!!(Rr(t,e,n,i,r)||Tr(t,e,n,i,r[0],r[1])||Tr(t,e,n,i,r[0],r[3])||Tr(t,e,n,i,r[2],r[1])||Tr(t,e,n,i,r[2],r[3]))}(t,e,n[0],i,r))return!1;if(1===n.length)return!0;for(var o=1,a=n.length;oa&&lthis.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=so(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var r=so(t,e,n);this.cache_[r]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function so(t,e,n){return e+":"+t+":"+(n?st(n):"null")}var lo,uo=new ao,ho=function(){function t(){}return t.prototype.drawCustom=function(t,e,n){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),co=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),po=function(n){function t(t){var e=n.call(this)||this;return e.highWaterMark=void 0!==t?t:2048,e.count_=0,e.entries_={},e.oldest_=null,e.newest_=null,e}return co(t,n),t.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent("clear")},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return K(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return K(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){K(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(L),fo=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),yo=function(r){function t(t){var e=r.call(this,t)||this;return e.consumers={},e}return fo(t,r),t.prototype.clear=function(){this.consumers={},r.prototype.clear.call(this)},t.prototype.get=function(t,e){var n=r.prototype.get.call(this,t),i=dt(e);return i in this.consumers||(this.consumers[i]={}),this.consumers[i][t]=!0,n},t.prototype.prune=function(){t:for(;this.canExpireCache();){var t=this.peekLastKey();for(var e in this.consumers)if(t in this.consumers[e])break t;var n=this.pop();for(var e in n.width=0,n.height=0,this.consumers)delete this.consumers[e][t]}},t.prototype.release=function(t){delete this.consumers[dt(t)]},t}(po),mo=[],go=[0,0,0,0],vo=new yo,xo={},_o=null,wo={},bo=function(){var s,l,u=xo,h=["monospace","serif"],c=h.length,p="wmytzilWMYTZIL@#/&?$%10";function f(t,e,n){for(var i=Po(),r=!0,o=0;od[2])&&(p=[m+y*Math.ceil((d[0]-m)/y),t[1]]),i&&f.push([-y,0],[y,0])}var g,v=e.layerStatesArray,x=v.length;this.declutterTree_&&(g=this.declutterTree_.all().map(function(t){return t.value}));for(var _=[],w=0;w=this.minWidth_)break;++f}p=this.scaleBar_?this.createScaleBar(h,u,s):u.toFixed(c<0?-c:0)+" "+s,this.renderedHTML_!=p&&(this.innerElement_.innerHTML=p,this.renderedHTML_=p),this.renderedWidth_!=h&&(this.innerElement_.style.width=h+"px",this.renderedWidth_=h),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},t.prototype.createScaleBar=function(t,e,n){for(var i="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,a="#ffffff",s=0;s
'+this.createMarker("relative",s)+(s%2==0||2===this.scaleBarSteps_?this.createStepText(s,t,!1,e,n):"")+""),s===this.scaleBarSteps_-1&&r.push(this.createStepText(s+1,t,!0,e,n)),a="#ffffff"===a?"#000000":"#ffffff";return'
'+(this.scaleBarText_?'
'+i+"
":"")+r.join("")+"
"},t.prototype.createMarker=function(t,e){return'
'},t.prototype.createStepText=function(t,e,n,i,r){var o=(0===t?0:Math.round(i/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'
'+o+"
"},t.prototype.getScaleForResolution=function(){var t=this.getMap().getView().getResolution(),e=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*e*39.37*(25.4/.28)},t}(St),ba=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Pa=function(f){function t(t){var e=this,n=t||{};e=f.call(this,{element:document.createElement("div"),target:n.target})||this;var i=void 0!==n.className?n.className:"ol-zoom",r=void 0!==n.delta?n.delta:1,o=void 0!==n.zoomInLabel?n.zoomInLabel:"+",a=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",s=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",l=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=i+"-in",u.setAttribute("type","button"),u.title=s,u.appendChild("string"==typeof o?document.createTextNode(o):o),u.addEventListener(N,e.handleClick_.bind(e,r),!1);var h=document.createElement("button");h.className=i+"-out",h.setAttribute("type","button"),h.title=l,h.appendChild("string"==typeof a?document.createTextNode(a):a),h.addEventListener(N,e.handleClick_.bind(e,-r),!1);var c=i+" ol-unselectable ol-control",p=e.element;return p.className=c,p.appendChild(u),p.appendChild(h),e.duration_=void 0!==n.duration?n.duration:250,e}return ba(t,f),t.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},t.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var n=e.getZoom();if(void 0!==n){var i=e.getConstrainedZoom(n+t);0>1)],e))<0?o=n+1:(a=n,s=!i);return s?o:~o}(p,m);if(g<0){var v=(m-p[-g-2])/(p[-g-1]-p[-g-2]),x=e+(-g-2)*i;a=rt(t[x],t[x+i],v),s=rt(t[x+1],t[x+i+1],v)}else a=t[e+g*i],s=t[e+g*i+1]}return o?(o[0]=a,o[1]=s,o):[a,s]}function rs(t,e,n,i,r,o){if(n==e)return null;var a;if(r>1;r>3)?n.readString():2===t?n.readFloat():3===t?n.readDouble():4===t?n.readVarint64():5===t?n.readVarint():6===t?n.readSVarint():7===t?n.readBoolean():null;e.values.push(i)}}function rf(t,e,n){if(1==t)e.id=n.readVarint();else if(2==t)for(var i=n.readVarint()+n.pos;n.pos>3}a--,1===o||2===o?(s+=t.readSVarint(),l+=t.readSVarint(),1===o&&h>1):r>>1}return e}(t),r=0,o=i.length;r>=5;return e=t+63,n+=String.fromCharCode(e)}var bf=function(i){function t(t){var e=i.call(this)||this,n=t||{};return e.dataProjection=xn("EPSG:4326"),e.factor_=n.factor?n.factor:1e5,e.geometryLayout_=n.geometryLayout?n.geometryLayout:Di,e}return mf(t,i),t.prototype.readFeatureFromText=function(t,e){var n=this.readGeometryFromText(t,e);return new Ba(n)},t.prototype.readFeaturesFromText=function(t,e){return[this.readFeatureFromText(t,e)]},t.prototype.readGeometryFromText=function(t,e){var n=ir(this.geometryLayout_),i=vf(t,n,this.factor_);yf(i,0,i.length,n,i);var r=yr(i,0,i.length,n);return Qa(new ss(r,this.geometryLayout_),!1,this.adaptOptions(e))},t.prototype.writeFeatureText=function(t,e){var n=t.getGeometry();return n?this.writeGeometryText(n,e):(K(!1,40),"")},t.prototype.writeFeaturesText=function(t,e){return this.writeFeatureText(t[0],e)},t.prototype.writeGeometryText=function(t,e){var n=(t=Qa(t,!0,this.adaptOptions(e))).getFlatCoordinates(),i=t.getStride();return yf(n,0,n.length,i,n),gf(n,i,this.factor_)},t}(rh),Pf=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Sf=function(i){function t(t){var e=i.call(this)||this,n=t||{};return e.layerName_=n.layerName,e.layers_=n.layers?n.layers:null,e.dataProjection=xn(n.dataProjection?n.dataProjection:"EPSG:4326"),e}return Pf(t,i),t.prototype.readFeaturesFromObject=function(t,e){if("Topology"!=t.type)return[];var n=t,i=void 0,r=null,o=null;n.transform&&(r=(i=n.transform).scale,o=i.translate);var a=n.arcs;i&&function(t,e,n){for(var i=0,r=t.length;i=e[0]||t[1]<=e[1]&&t[3]>=e[1]||ke(t,this.intersectsCoordinate.bind(this))}return!1},t.prototype.setCenter=function(t){var e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],i=t.slice();i[e]=i[0]+n;for(var r=1;r=this.minArea_},t.prototype.getGeometry=function(){return this.box_.getGeometry()},t.prototype.handleDragEvent=function(t){ja(t)&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new em("boxdrag",t.coordinate,t)))},t.prototype.handleUpEvent=function(t){return!ja(t)||(this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new em("boxend",t.coordinate,t))),!1)},t.prototype.handleDownEvent=function(t){return!(!ja(t)||!Na(t)||!this.condition_(t)||(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new em("boxstart",t.coordinate,t)),0))},t}(Jy),im=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();function rm(t){return Da(t)&&Va(t)}var om=function(i){function t(t){var e=i.call(this,{stopDown:P})||this,n=t||{};return e.kinetic_=n.kinetic,e.lastCentroid=null,e.lastPointersCount_,e.panning_=!1,e.condition_=n.condition?n.condition:rm,e.noKinetic_=!1,e}return im(t,i),t.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=Ky(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var i=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],r=t.map.getView();Ai(i,r.getResolution()),Ti(i,r.getRotation()),r.adjustCenterInternal(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length},t.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0!==this.targetPointers.length)return this.kinetic_&&this.kinetic_.begin(),!(this.lastCentroid=null);if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=n.getCenterInternal(),a=e.getPixelFromCoordinateInternal(o),s=e.getCoordinateFromPixelInternal([a[0]-i*Math.cos(r),a[1]-i*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(s),duration:500,easing:Ni})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1},t.prototype.handleDownEvent=function(t){if(0this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},t.prototype.createFill=function(t,e){var n=t.fillStyle,i=[wm.SET_FILL_STYLE,n];return"string"!=typeof n&&n instanceof CanvasGradient&&e?i.push(e):i.push(!0),i},t.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},t.prototype.createStroke=function(t){return[wm.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},t.prototype.updateFillStyle=function(t,e,n){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t,n)),t.currentFillStyle=i)},t.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,i=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;t.currentStrokeStyle==n&&t.currentLineCap==i&&(r==t.currentLineDash||kt(t.currentLineDash,r))&&t.currentLineDashOffset==o&&t.currentLineJoin==a&&t.currentLineWidth==s&&t.currentMiterLimit==l||(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=l)},t.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[wm.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},t.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=_e(this.maxExtent),0t&&(mm?[v,o]:[d,y]}var Lm=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Rm={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Om={Circle:Em,Default:Pm,Image:Cm,LineString:Tm,Polygon:Em,Text:function(o){function t(t,e,n,i){var r=o.call(this,t,e,n,i)||this;return r.declutterGroups_,r.labels_=null,r.text_="",r.textOffsetX_=0,r.textOffsetY_=0,r.textRotateWithView_=void 0,r.textRotation_=0,r.textFillState_=null,r.fillStates={},r.textStrokeState_=null,r.strokeStates={},r.textState_={},r.textStates={},r.textKey_="",r.fillKey_="",r.strokeKey_="",vo.prune(),r}return Lm(t,o),t.prototype.finish=function(){var t=o.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},t.prototype.drawText=function(t,e){var n=this.textFillState_,i=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(n||i)){var o,a,s=this.coordinates.length,l=t.getType(),u=null,h=2,c=2;if("line"===r.placement){if(!Ze(this.getBufferedMaxExtent(),t.getExtent()))return;var p=void 0;if(u=t.getFlatCoordinates(),c=t.getStride(),l==re.LINE_STRING)p=[u.length];else if(l==re.MULTI_LINE_STRING)p=t.getEnds();else if(l==re.POLYGON)p=t.getEnds().slice(0,1);else if(l==re.MULTI_POLYGON){var f=t.getEndss();for(p=[],o=0,a=f.length;ot[n-i],y=r.length,m=t[e],g=t[e+1],v=t[e+=i],x=t[e+1],_=0,w=Math.sqrt(Math.pow(v-m,2)+Math.pow(x-g,2)),b=!1,P=0;PMath.PI?-2*Math.PI:E<-Math.PI?2*Math.PI:0,Math.abs(E)>a)return null}p=A;var I=T/w,L=rt(m,v,I),R=rt(g,x,I);f[c]=[L,R,C/2,A,S],o+=C}return b?f:[[f[0][0],f[0][1],f[0][2],f[0][3],r]]}var zm=n(0),Dm=n.n(zm),Fm=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Gm=[1/0,1/0,-1/0,-1/0],jm=[1,0,0,1,0,0],Vm=[],qm=[],Bm=[],Um=[],Wm=function(o){function t(t,e,n,i){var r=o.call(this)||this;return r.overlaps=n,r.pixelRatio=e,r.resolution=t,r.alignFill_,r.declutterItems=[],r.instructions=i.instructions,r.coordinates=i.coordinates,r.coordinateCache_={},r.renderedTransform_=[1,0,0,1,0,0],r.hitDetectionInstructions=i.hitDetectionInstructions,r.pixelCoordinates_=null,r.viewRotation_=0,r.fillStates=i.fillStates||{},r.strokeStates=i.strokeStates||{},r.textStates=i.textStates||{},r.widths_={},r}return Fm(t,o),t.prototype.disposeInternal=function(){vo.release(this),o.prototype.disposeInternal.call(this)},t.prototype.getTextImage=function(t,e,n,i){var r,o=i+e+t+n+this.pixelRatio;if(!vo.containsKey(o)){var a=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,l=this.textStates[e],u=this.pixelRatio,h=l.scale*u,c=Rm[l.textAlign||"center"],p=i&&a.lineWidth?a.lineWidth:0,f=t.split("\n"),d=f.length,y=[],m=function(t,e,n){for(var i=e.length,r=0,o=0;oi.width?i.width-u:d,_=s+h>i.height?i.height-h:s,w=y[3]+x*p+y[1],b=y[0]+_*p+y[2],P=e-y[3],S=n-y[0];!v&&0===c||(Vm[0]=P,Um[0]=P,Vm[1]=S,qm[1]=S,qm[0]=P+w,Bm[0]=qm[0],Bm[1]=S+b,Um[1]=Bm[1]);var C=null;if(0!==c){var M=e+r,T=n+o;C=Ki(jm,M,T,1,1,c,-M,-T),Hi(jm,Vm),Hi(jm,qm),Hi(jm,Bm),Hi(jm,Um),Te(Math.min(Vm[0],qm[0],Bm[0],Um[0]),Math.min(Vm[1],qm[1],Bm[1],Um[1]),Math.max(Vm[0],qm[0],Bm[0],Um[0]),Math.max(Vm[1],qm[1],Bm[1],Um[1]),Gm)}else Te(P,S,P+w,S+b,Gm);var A=t.canvas,E=g?g[2]*p/2:0,I=Gm[0]-E<=A.width&&0<=Gm[2]+E&&Gm[1]-E<=A.height&&0<=Gm[3]+E;if(f&&(e=Math.round(e),n=Math.round(n)),a){if(!I&&1==a[4])return;Re(a,Gm);var L=I?[t,C?C.slice(0):null,l,i,u,h,x,_,e,n,p]:null;L&&(v&&L.push(m,g,Vm,qm,Bm,Um),a.push(L))}else I&&(v&&this.replayTextBackground_(t,Vm,qm,Bm,Um,m,g),Lo(t,C,l,i,u,h,x,_,e,n,p))},t.prototype.fill_=function(t){if(this.alignFill_ instanceof Array){var e=Hi(this.renderedTransform_,[this.alignFill_[0],this.alignFill_[3]]);t.save(),t.translate(e[0],e[1]),t.rotate(this.viewRotation_)}if("boolean"==typeof this.alignFill_){var n=Hi(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(n[0]%i,n[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.renderDeclutter=function(t,e,n,i){if(t&&5m[2];){T=C*++M;var E=this.getRenderTransform(p,f,y,n,l,u,T);s.execute(o,E,y,w,void 0,P),S-=C}}if(P){var I=t.viewHints;Jm(P,o,y,1,!(I[0]||I[1]),t.declutterItems)}v&&o.restore(),this.postRender(o,t);var L=i.opacity,R=this.container;return L!==parseFloat(R.style.opacity)&&(R.style.opacity=1===L?"":L),this.container},t.prototype.getFeatures=function(g){return new Promise(function(m,t){this.hitDetectionImageData_||this.animatingOrInteracting_?m(rg(g,this.renderedFeatures_,this.hitDetectionImageData_)):requestAnimationFrame(function(){var t=[this.context.canvas.width,this.context.canvas.height];Hi(this.pixelTransform,t);var e=this.renderedCenter_,n=this.renderedResolution_,i=this.renderedRotation_,r=this.renderedProjection_,o=this.renderedExtent_,a=this.getLayer(),s=[],l=t[0]/2,u=t[1]/2;s.push(this.getRenderTransform(e,n,i,.5,l,u,0).slice());var h=a.getSource(),c=r.getExtent();if(h.getWrapX()&&r.canWrapX()&&!Pe(c,o)){for(var p=o[0],f=We(c),d=0,y=void 0;pc[2];)y=f*++d,s.push(this.getRenderTransform(e,n,i,.5,l,u,y).slice()),p-=f}this.hitDetectionImageData_=ig(t,s,this.renderedFeatures_,a.getStyleFunction(),o,n,i),m(rg(g,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}.bind(this))},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){if(this.replayGroup_){var o=e.viewState.resolution,a=e.viewState.rotation,s=this.getLayer(),l={};return this.replayGroup_.forEachFeatureAtCoordinate(t,o,a,n,function(t){var e=dt(t);if(!(e in l))return l[e]=!0,i(t,s)},s.getDeclutter()?r:null)}},t.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},t.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},t.prototype.prepareFrame=function(t){var r=this.getLayer(),e=r.getSource(),n=t.viewHints[0],i=t.viewHints[1],o=r.getUpdateWhileAnimating(),a=r.getUpdateWhileInteracting();if(!this.dirty_&&!o&&n||!a&&i)return this.animatingOrInteracting_=!0;this.animatingOrInteracting_=!1;var s=t.extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=r.getRevision(),f=r.getRenderBuffer(),d=r.getRenderOrder();void 0===d&&(d=Uo);var y=l.center.slice(),m=xe(s,f*h),g=l.projection.getExtent();if(e.getWrapX()&&l.projection.canWrapX()&&!Pe(g,t.extent)){var v=We(g),x=Math.max(We(m)/2,v);m[0]=g[0]-x,m[2]=g[2]+x;var _=Math.floor((y[0]-g[0])/v);y[0]-=_*v}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&Pe(this.renderedExtent_,m))return!(this.replayGroupChanged=!1);this.replayGroup_&&this.replayGroup_.dispose(),this.replayGroup_=null,this.dirty_=!1;var w,b=new Nm(Zo(h,c),m,h,c,r.getDeclutter()),P=Nn();P?(e.loadFeatures(Dn(m,u),h,P),w=Mn(P,u)):e.loadFeatures(m,h,u);var S=Wo(h,c),C=function(t){var e,n=t.getStyleFunction()||r.getStyleFunction();if(n&&(e=n(t,h)),e){var i=this.renderFeature(t,S,e,b,w);this.dirty_=this.dirty_||i}}.bind(this),M=Dn(m,u),T=e.getFeaturesInExtent(M);d&&T.sort(d);for(var A=0,E=T.length;A=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===Qn.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t),n=!1):this.freehand_&&t.type===Qn.POINTERDOWN?n=!1:e?(n=t.type===Qn.POINTERMOVE)&&this.freehand_?n=this.handlePointerMove_(t):("mouse"==t.pointerEvent.pointerType||t.type===Qn.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t):t.type===Qn.DBLCLICK&&(n=!1),s.prototype.handleEvent.call(this,t)&&n},t.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new ti(Qn.POINTERMOVE,t.map,t.pointerEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},t.prototype.handleUpEvent=function(t){var e=!0;this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);var n="Circle"===this.mode_;return this.shouldHandle_?(this.finishCoordinate_?this.freehand_||n?this.finishDrawing():this.atFinish_(t)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t):(this.startDrawing_(t),this.mode_===bg&&this.finishDrawing()),e=!1):this.freehand_&&(this.finishCoordinate_=null,this.abortDrawing_()),!e&&this.stopClick_&&t.stopPropagation(),e},t.prototype.handlePointerMove_=function(t){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,n=t.pixel,i=e[0]-n[0],r=e[1]-n[1],o=i*i+r*r;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return!0}return this.finishCoordinate_?this.modifyDrawing_(t):this.createOrUpdateSketchPoint_(t),!0},t.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var n=!1,i=[this.finishCoordinate_];if(this.mode_===Pg)n=this.sketchCoords_.length>this.minPoints_;else if(this.mode_===Sg){var r=this.sketchCoords_;n=r[0].length>this.minPoints_,i=[r[0][0],r[0][r[0].length-2]]}if(n)for(var o=t.map,a=0,s=i.length;a=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(i.slice()),this.geometryFunction_(n,r)):this.mode_===Sg&&((n=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(i.slice()),e&&(this.finishCoordinate_=n[0]),this.geometryFunction_(this.sketchCoords_,r)),this.updateSketchFeatures_(),e&&this.finishDrawing()},t.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry();this.mode_===Pg?((t=this.sketchCoords_).splice(-2,1),this.geometryFunction_(t,e),2<=t.length&&(this.finishCoordinate_=t[t.length-2].slice())):this.mode_===Sg&&((t=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e)),0===t.length&&(this.finishCoordinate_=null),this.updateSketchFeatures_()}},t.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,n=t.getGeometry();this.mode_===Pg?(e.pop(),this.geometryFunction_(e,n)):this.mode_===Sg&&(e[0].pop(),this.geometryFunction_(e,n),e=n.getCoordinates()),this.type_===re.MULTI_POINT?t.setGeometry(new cs([e])):this.type_===re.MULTI_LINE_STRING?t.setGeometry(new us([e])):this.type_===re.MULTI_POLYGON&&t.setGeometry(new ds([e])),this.dispatchEvent(new Cg("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},t.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return t&&(this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0)),t},t.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var n=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=n.slice(),this.sketchCoords_.push(n.slice()),this.updateSketchFeatures_(),this.dispatchEvent(new Cg("drawstart",this.sketchFeature_))},t.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},t.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing_(),this.overlay_.setMap(e?t:null)},t}(Jy),Tg=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Ag=function(n){function t(t){var e=n.call(this,"extentchanged")||this;return e.extent=t,e}return Tg(t,n),t}(E);function Eg(e){return function(t){return ve([e,t])}}function Ig(e,n){return e[0]==n[0]?function(t){return ve([e,[t[0],n[1]]])}:e[1]==n[1]?function(t){return ve([e,[n[0],t[1]]])}:null}var Lg=function(r){function t(t){var n,e=this,i=t||{};return(e=r.call(this,i)||this).extent_=null,e.pointerHandler_=null,e.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,e.snappedToVertex_=!1,e.extentFeature_=null,e.vertexFeature_=null,t=t||{},e.extentOverlay_=new lg({source:new _g({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.boxStyle?t.boxStyle:(n=Zh(),function(t,e){return n[re.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.vertexOverlay_=new lg({source:new _g({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.pointerStyle?t.pointerStyle:function(){var n=Zh();return function(t,e){return n[re.POINT]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),t.extent&&e.setExtent(t.extent),e}return Tg(t,r),t.prototype.snapToVertex_=function(t,e){var n=e.getCoordinateFromPixelInternal(t),i=this.getExtentInternal();if(i){var r=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(i);r.sort(function(t,e){return Li(n,t)-Li(n,e)});var o=r[0],a=Pi(n,o),s=e.getPixelFromCoordinateInternal(a);if(Ii(t,s)<=this.pixelTolerance_){var l=e.getPixelFromCoordinateInternal(o[0]),u=e.getPixelFromCoordinateInternal(o[1]),h=Ei(s,l),c=Ei(s,u),p=Math.sqrt(Math.min(h,c));return this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(a=cn&&(t.index+=r)})},t}(Jy),Kg=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Jg=function(i){function t(t){var e=this,n=t||{};return(e=i.call(this,n)||this).totalDelta_=0,e.lastDelta_=0,e.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,e.duration_=void 0!==n.duration?n.duration:800,e.timeout_=void 0!==n.timeout?n.timeout:300,e.useAnchor_=void 0===n.useAnchor||n.useAnchor,e.condition_=n.condition?n.condition:Oa,e.lastAnchor_=null,e.startTime_=void 0,e.timeoutId_,e.mode_=void 0,e.trackpadEventGap_=400,e.trackpadTimeoutId_,e.trackpadDeltaPerZoom_=300,e}return Kg(t,i),t.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,Math.sign(this.lastDelta_),this.lastAnchor_)},t.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==F)return!0;t.preventDefault();var e,n=t.map,i=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==F&&(e=i.deltaY,Xn&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=Kn),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();if(void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?"trackpad":"wheel"),"trackpad"===this.mode_){var o=n.getView();return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):o.beginInteraction(),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.trackpadEventGap_),o.adjustZoom(-e/this.trackpadDeltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1}this.totalDelta_+=e;var a=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),a),!1},t.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations(),Gy(e,-J(this.totalDelta_,-this.maxDelta_,this.maxDelta_),this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},t.prototype.setMouseAnchor=function(t){(this.useAnchor_=t)||(this.lastAnchor_=null)},t}(jy),Qg=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),$g=function(r){function t(t){var e=this,n=t||{},i=n;return i.stopDown||(i.stopDown=P),(e=r.call(this,i)||this).anchor_=null,e.lastAngle_=void 0,e.rotating_=!1,e.rotationDelta_=0,e.threshold_=void 0!==n.threshold?n.threshold:.3,e.duration_=void 0!==n.duration?n.duration:250,e}return Qg(t,r),t.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],r=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==yi){var l=a.getViewport().getBoundingClientRect(),u=Ky(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=a.getCoordinateFromPixelInternal(u),this.rotating_&&(a.render(),s.adjustRotationInternal(e,this.anchor_))}},t.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2&&(t.map.getView().endInteraction(this.duration_),1))},t.prototype.handleDownEvent=function(t){if(2<=this.targetPointers.length){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},t}(Jy),tv=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),ev=function(r){function t(t){var e=this,n=t||{},i=n;return i.stopDown||(i.stopDown=P),(e=r.call(this,i)||this).anchor_=null,e.duration_=void 0!==n.duration?n.duration:400,e.lastDistance_=void 0,e.lastScaleDelta_=1,e}return tv(t,r),t.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],r=n.clientX-i.clientX,o=n.clientY-i.clientY,a=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,l=s.getView();1!=e&&(this.lastScaleDelta_=e);var u=s.getViewport().getBoundingClientRect(),h=Ky(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=s.getCoordinateFromPixelInternal(h),s.render(),l.adjustResolutionInternal(e,this.anchor_)},t.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),n=1t;)n-=3;var i=this.points_[2+e]-this.points_[n+2];if(i<1e3/60)return!1;var r=this.points_[e]-this.points_[n],o=this.points_[1+e]-this.points_[n+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}();function yv(t){var e=t||{},n=new Y,i=new dv(-.005,.05,100);return void 0!==e.altShiftDragRotate&&!e.altShiftDragRotate||n.push(new sm),void 0!==e.doubleClickZoom&&!e.doubleClickZoom||n.push(new By({delta:e.zoomDelta,duration:e.zoomDuration})),void 0!==e.dragPan&&!e.dragPan||n.push(new om({condition:e.onFocusOnly?Ra:void 0,kinetic:i})),void 0!==e.pinchRotate&&!e.pinchRotate||n.push(new $g),void 0!==e.pinchZoom&&!e.pinchZoom||n.push(new ev({duration:e.zoomDuration})),void 0!==e.keyboard&&!e.keyboard||(n.push(new Fg),n.push(new Vg({delta:e.zoomDelta,duration:e.zoomDuration}))),void 0!==e.mouseWheelZoom&&!e.mouseWheelZoom||n.push(new Jg({condition:e.onFocusOnly?Ra:void 0,duration:e.zoomDuration})),void 0!==e.shiftDragZoom&&!e.shiftDragZoom||n.push(new pm({duration:e.zoomDuration})),n}var mv=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),gv=function(n){function t(t){var e=t||{};return n.call(this,e)||this}return mv(t,n),t}(Wt),vv="preload",xv="useInterimTilesOnError",_v=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),wv=function(r){function t(t){var e=this,n=t||{},i=v({},n);return delete i.preload,delete i.useInterimTilesOnError,(e=r.call(this,i)||this).setPreload(void 0!==n.preload?n.preload:0),e.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),e}return _v(t,r),t.prototype.getPreload=function(){return this.get(vv)},t.prototype.setPreload=function(t){this.set(vv,t)},t.prototype.getUseInterimTilesOnError=function(){return this.get(xv)},t.prototype.setUseInterimTilesOnError=function(t){this.set(xv,t)},t}(Wt);function bv(t,e,n){for(var i,r,o,a,s,l,u=[],h=t(0),c=t(1),p=e(h),f=e(c),d=[c,h],y=[f,p],m=[1,0],g={},v=1e5;0<--v&&0this.featurePool_.length;)s=new Ba,this.featurePool_.push(s);var u=i.getFeaturesCollection();u.clear();var h,c,p,f=0;for(h=0,c=this.meridians_.length;hthis.size_[0]||e>=this.size_[1])return Xv[0]=0,Xv[1]=0,Xv[2]=0,Xv[3]=0,Xv;this.readAll();var n=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return Xv[0]=this.data_[4*n],Xv[1]=this.data_[4*n+1],Xv[2]=this.data_[4*n+2],Xv[3]=this.data_[4*n+3],Xv},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),Yv=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Kv=function(s){function t(t,e){var n=this,i=e.uniforms||{},r=[1,0,0,1,0,0];if(i.u_projectionMatrix=r,(n=s.call(this,t,{uniforms:i,postProcesses:e.postProcesses})||this).sourceRevision_=-1,n.verticesBuffer_=new Lv(34962,35048),n.hitVerticesBuffer_=new Lv(34962,35048),n.indicesBuffer_=new Lv(34963,35048),n.program_=n.helper.getProgram(e.fragmentShader,e.vertexShader),n.getShaderCompileErrors())throw new Error(n.getShaderCompileErrors());if(n.hitDetectionEnabled_=!(!e.hitFragmentShader||!e.hitVertexShader),n.hitProgram_=n.hitDetectionEnabled_&&n.helper.getProgram(e.hitFragmentShader,e.hitVertexShader),n.getShaderCompileErrors())throw new Error(n.getShaderCompileErrors());var o=e.attributes?e.attributes.map(function(t){return{name:"a_"+t.name,size:1,type:Dv.FLOAT}}):[];n.attributes=[{name:"a_position",size:2,type:Dv.FLOAT},{name:"a_index",size:1,type:Dv.FLOAT}].concat(o),n.hitDetectionAttributes=[{name:"a_position",size:2,type:Dv.FLOAT},{name:"a_index",size:1,type:Dv.FLOAT},{name:"a_hitColor",size:4,type:Dv.FLOAT},{name:"a_featureUid",size:1,type:Dv.FLOAT}].concat(o),n.customAttributes=e.attributes?e.attributes:[],n.previousExtent_=[1/0,1/0,-1/0,-1/0],n.currentTransform_=r,n.renderTransform_=[1,0,0,1,0,0],n.invertRenderTransform_=[1,0,0,1,0,0],n.renderInstructions_=new Float32Array(0),n.hitRenderInstructions_=new Float32Array(0),n.hitRenderTarget_=n.hitDetectionEnabled_&&new Hv(n.helper),n.worker_=new Worker(Zv),n.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===qv){var n=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=n,Ji(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):this.renderInstructions_=new Float32Array(t.data.renderInstructions),this.getLayer().changed()}}.bind(n)),n.featureCache_={},n.featureCount_=0;var a=n.getLayer().getSource();return n.sourceListenKeys_=[x(a,dg,n.handleSourceFeatureAdded_,n),x(a,yg,n.handleSourceFeatureChanged_,n),x(a,mg,n.handleSourceFeatureDelete_,n)],a.forEachFeature(function(t){this.featureCache_[dt(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(n)),n}return Yv(t,s),t.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[dt(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},t.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[dt(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},t.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[dt(e)],this.featureCount_--},t.prototype.renderFrame=function(t){var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e),this.helper.finalizeDraw(t);var n=this.helper.getCanvas(),i=t.layerStatesArray[t.layerIndex].opacity;return i!==parseFloat(n.style.opacity)&&(n.style.opacity=i),this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),n},t.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource(),i=t.viewState,r=!t.viewHints[0]&&!t.viewHints[1],o=!Le(this.previousExtent_,t.extent),a=this.sourceRevision_this.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function lx(t,e,n,i,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=n,r.maxY=i,r):new sx(t,e,n,i)}var ux=sx,hx=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),cx=function(i){function t(t){var e=i.call(this,t)||this;return e.extentChanged=!0,e.renderedExtent_=null,e.renderedPixelRatio,e.renderedProjection=null,e.renderedRevision,e.renderedTiles=[],e.newTiles_=!1,e.tmpExtent=[1/0,1/0,-1/0,-1/0],e.tmpTileRange_=new ux(0,0,0,0),e}return hx(t,i),t.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return 2==n||4==n||3==n&&!i},t.prototype.getTile=function(t,e,n,i){var r=i.pixelRatio,o=i.viewState.projection,a=this.getLayer(),s=a.getSource().getTile(t,e,n,r,o);return 3==s.getState()&&(a.getUseInterimTilesOnError()?0e)throw new Error("At most "+e+" arguments were expected, got "+t.length+" instead")}function Wx(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function Zx(t,e){if(!function(e){try{return Math.log2(e)%1==0}catch(t){return Math.log(e)%1==0}}(e))throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function Xx(r){return{getReturnType:function(t){return Ix},toGlsl:function(t,e){qx(e,2);for(var n=31,i=0;i"]={getReturnType:function(t){return Ix},toGlsl:function(t,e){return qx(e,2),Gx(e),"("+Dx(t,e[0])+" > "+Dx(t,e[1])+")"}},Rx[">="]={getReturnType:function(t){return Ix},toGlsl:function(t,e){return qx(e,2),Gx(e),"("+Dx(t,e[0])+" >= "+Dx(t,e[1])+")"}},Rx["<"]={getReturnType:function(t){return Ix},toGlsl:function(t,e){return qx(e,2),Gx(e),"("+Dx(t,e[0])+" < "+Dx(t,e[1])+")"}},Rx["<="]={getReturnType:function(t){return Ix},toGlsl:function(t,e){return qx(e,2),Gx(e),"("+Dx(t,e[0])+" <= "+Dx(t,e[1])+")"}},Rx["=="]=Xx("=="),Rx["!="]=Xx("!="),Rx["!"]={getReturnType:function(t){return Ix},toGlsl:function(t,e){return qx(e,1),Vx(e[0]),"(!"+Dx(t,e[0])+")"}},Rx.between={getReturnType:function(t){return Ix},toGlsl:function(t,e){qx(e,3),Gx(e);var n=Dx(t,e[1]),i=Dx(t,e[2]),r=Dx(t,e[0]);return"("+r+" >= "+n+" && "+r+" <= "+i+")"}},Rx.array={getReturnType:function(t){return Lx},toGlsl:function(e,t){Bx(t,2),Ux(t,4),Gx(t);var n=t.map(function(t){return Dx(e,t,Tx)});return"vec"+t.length+"("+n.join(", ")+")"}},Rx.color={getReturnType:function(t){return Ex},toGlsl:function(n,t){Bx(t,3),Ux(t,4),Gx(t);var e=t;3===t.length&&e.push(1);var i=t.map(function(t,e){return Dx(n,t,Tx)+(e<3?" / 255.0":"")});return"vec"+t.length+"("+i.join(", ")+")"}},Rx.interpolate={getReturnType:function(t){for(var e=Ex|Tx,n=3;nt)throw new Error("Tile load sequence violation");this.state=t,this.changed()},t.prototype.load=function(){s()},t.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var i=e-n+1e3/60;return i>=this.transition_?1:Oi(i/this.transition_)},t.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},t.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},t}(L),c_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();function p_(){var t=xt(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var f_=function(s){function t(t,e,n,i,r,o){var a=s.call(this,t,e,o)||this;return a.crossOrigin_=i,a.src_=n,a.image_=new Image,null!==i&&(a.image_.crossOrigin=i),a.unlisten_=null,a.tileLoadFunction_=r,a}return c_(t,s),t.prototype.disposeInternal=function(){1==this.state&&(this.unlistenImage_(),this.image_=p_()),this.interimTile&&this.interimTile.dispose(),s.prototype.disposeInternal.call(this)},t.prototype.getImage=function(){return this.image_},t.prototype.getKey=function(){return this.src_},t.prototype.handleImageError_=function(){this.state=3,this.unlistenImage_(),this.image_=p_(),this.changed()},t.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()},t.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Th(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},t.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},t}(h_),d_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),y_=function(e){function t(t){return e.call(this,t)||this}return d_(t,e),t.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().dispose()},t.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var e=function(t){return t.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(e_(t.tileCoord)),t.dispose())}.bind(this))}},t}(po);function m_(t,e,n,i){var r=An(n,e,t),o=_n(e,i,n),a=e.getMetersPerUnit();void 0!==a&&(o*=a);var s=t.getMetersPerUnit();void 0!==s&&(o/=s);var l=t.getExtent();if(!l||be(l,r)){var u=_n(t,o,r)/o;isFinite(u)&&0this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-nthis.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var v=[(e[0]+n[0])/2,(e[1]+n[1])/2],x=this.transformInv_(v),_=[(i[0]+t[0])/2,(i[1]+t[1])/2],w=this.transformInv_(_);this.addQuad_(t,e,v,_,r,o,x,w,l-1),this.addQuad_(_,v,n,i,w,x,a,s,l-1)}else{var b=[(t[0]+e[0])/2,(t[1]+e[1])/2],P=this.transformInv_(b),S=[(n[0]+i[0])/2,(n[1]+i[1])/2],C=this.transformInv_(S);this.addQuad_(t,b,S,i,r,P,C,s,l-1),this.addQuad_(b,e,n,S,P,o,a,C,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,n,i,r,a,s),this.addTriangle_(t,e,n,r,o,a)}},t.prototype.calculateSourceExtent=function(){var r=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(t,e,n){var i=t.source;Oe(r,i[0]),Oe(r,i[1]),Oe(r,i[2])}),r},t.prototype.getTriangles=function(){return this.triangles_},t}(),__=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),w_=function(C){function t(t,e,n,i,r,o,a,s,l,u,h){var c=C.call(this,r,0)||this;c.renderEdges_=void 0!==h&&h,c.pixelRatio_=a,c.gutter_=s,c.canvas_=null,c.sourceTileGrid_=e,c.targetTileGrid_=i,c.wrappedTileCoord_=o||r,c.sourceTiles_=[],c.sourcesListenerKeys_=null,c.sourceZ_=0;var p=i.getTileCoordExtent(c.wrappedTileCoord_),f=c.targetTileGrid_.getExtent(),d=c.sourceTileGrid_.getExtent(),y=f?qe(p,f):p;if(0===ze(y))return c.state=4,c;var m=t.getExtent();m&&(d=d?qe(d,m):m);var g=i.getResolution(c.wrappedTileCoord_[0]),v=m_(t,n,Ge(y),g);if(!isFinite(v)||v<=0)return c.state=4,c;var x=void 0!==u?u:.5;if(c.triangulation_=new x_(t,n,y,d,v*x),0===c.triangulation_.getTriangles().length)return c.state=4,c;c.sourceZ_=e.getZForResolution(v);var _=c.triangulation_.calculateSourceExtent();if(d&&(t.canWrapX()?(_[1]=J(_[1],d[1],d[3]),_[3]=J(_[3],d[1],d[3])):_=qe(_,d)),ze(_)){for(var w=e.getTileRangeForExtentAndZ(_,c.sourceZ_),b=w.minX;b<=w.maxX;b++)for(var P=w.minY;P<=w.maxY;P++){var S=l(c.sourceZ_,b,P,a);S&&c.sourceTiles_.push(S)}0===c.sourceTiles_.length&&(c.state=4)}else c.state=4;return c}return __(t,C),t.prototype.disposeInternal=function(){1==this.state&&this.unlistenSources_(),C.prototype.disposeInternal.call(this)},t.prototype.getImage=function(){return this.canvas_},t.prototype.reproject_=function(){var i=[];if(this.sourceTiles_.forEach(function(t,e,n){t&&2==t.getState()&&i.push({extent:this.sourceTileGrid_.getTileCoordExtent(t.tileCoord),image:t.getImage()})}.bind(this)),(this.sourceTiles_.length=0)===i.length)this.state=3;else{var t=this.wrappedTileCoord_[0],e=this.targetTileGrid_.getTileSize(t),n="number"==typeof e?e:e[0],r="number"==typeof e?e:e[1],o=this.targetTileGrid_.getResolution(t),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=v_(n,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,s,this.triangulation_,i,this.gutter_,this.renderEdges_),this.state=2}this.changed()},t.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var o=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(n,t,e){var i=n.getState();if(0==i||1==i){o++;var r=x(n,R,function(t){var e=n.getState();2!=e&&3!=e&&4!=e||(_(r),0==--o&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}.bind(this)),this.sourceTiles_.forEach(function(t,e,n){0==t.getState()&&t.load()}),0===o&&setTimeout(this.reproject_.bind(this),0)}},t.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(_),this.sourcesListenerKeys_=null},t}(h_),b_=[0,0,0],P_=function(){function t(t){var i,r,e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,K((i=this.resolutions_,r=function(t,e){return e-t},i.every(function(t,e){if(0===e)return!0;var n=r(i[e-1],t);return!(0=this.minZoom;){if(e(s,2===this.zoomFactor_?lx(r=Math.floor(r/2),r,o=Math.floor(o/2),o,n):this.getTileRangeForExtentAndZ(a,s,n)))return!0;--s}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]n||n>e.getMaxZoom())return!1;var o,a=e.getExtent();return!(o=a?e.getTileRangeForExtentAndZ(a,n):e.getFullTileRange(n))||o.containsXY(i,r)}(t,i)?t:null},t.prototype.clear=function(){this.tileCache.clear()},t.prototype.refresh=function(){this.clear(),l.prototype.refresh.call(this)},t.prototype.useTile=function(t,e,n,i){},t}(fg),L_=function(i){function t(t,e){var n=i.call(this,t)||this;return n.tile=e,n}return E_(t,i),t}(E),R_=I_,O_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),N_=function(n){function t(t){var e=n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return e.generateTileUrlFunction_=!t.tileUrlFunction,e.tileLoadFunction=t.tileLoadFunction,e.tileUrlFunction=t.tileUrlFunction?t.tileUrlFunction.bind(e):a_,e.urls=null,t.urls?e.setUrls(t.urls):t.url&&e.setUrl(t.url),e.tileLoadingKeys_={},e}return O_(t,n),t.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},t.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},t.prototype.getUrls=function(){return this.urls},t.prototype.handleTileChange=function(t){var e,n=t.target,i=dt(n),r=n.getState();1==r?(this.tileLoadingKeys_[i]=!0,e="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=3==r?"tileloaderror":2==r||5==r?"tileloadend":void 0),null!=e&&this.dispatchEvent(new L_(e,n))},t.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},t.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},t.prototype.setUrl=function(t){var e=s_(t);this.urls=e,this.setUrls(e)},t.prototype.setUrls=function(t){var e=(this.urls=t).join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(r_(t,this.tileGrid),e):this.setKey(e)},t.prototype.useTile=function(t,e,n){var i=t_(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)},t}(R_),k_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();function z_(t,e){t.getImage().src=e}var D_=function(n){function t(t){var e=n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:z_,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return e.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,e.tileClass=void 0!==t.tileClass?t.tileClass:f_,e.tileCacheForProjection={},e.tileGridForProjection={},e.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,e.renderReprojectionEdges_=!1,e}return k_(t,n),t.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},t.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);for(var i in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[i];r.expireCache(r==n?e:{})}},t.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Cn(this.getProjection(),t)?0:this.getGutter()},t.prototype.getGutter=function(){return 0},t.prototype.getOpaque=function(t){return!(this.getProjection()&&t&&!Cn(this.getProjection(),t))&&n.prototype.getOpaque.call(this,t)},t.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Cn(e,t)){var n=dt(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=S_(t)),this.tileGridForProjection[n]}return this.tileGrid},t.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Cn(e,t))return this.tileCache;var n=dt(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new y_(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},t.prototype.createTile_=function(t,e,n,i,r,o){var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,r),l=s?this.tileUrlFunction(s,i,r):void 0,u=new this.tileClass(a,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(R,this.handleTileChange.bind(this)),u},t.prototype.getTile=function(t,e,n,i,r){var o=this.getProjection();if(o&&r&&!Cn(o,r)){var a=this.getTileCacheForProjection(r),s=[t,e,n],l=void 0,u=e_(s);a.containsKey(u)&&(l=a.get(u));var h=this.getKey();if(l&&l.key==h)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(s,r),d=new w_(o,c,r,p,s,f,this.getTilePixelRatio(i),this.getGutter(),function(t,e,n,i){return this.getTileInternal(t,e,n,i,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return d.key=h,l?(d.interimTile=l,d.refreshInterimChain(),a.replace(u,d)):a.set(u,d),d}return this.getTileInternal(t,e,n,i,o||r)},t.prototype.getTileInternal=function(t,e,n,i,r){var o=null,a=t_(t,e,n),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var l=o;o=this.createTile_(t,e,n,i,r,s),0==l.getState()?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,n,i,r,s),this.tileCache.set(a,o);return o},t.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},t.prototype.setTileGridForProjection=function(t,e){var n=xn(t);if(n){var i=dt(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}},t}(N_),F_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),G_=function(i){function t(t){var e=this,n=void 0!==t.hidpi&&t.hidpi;return(e=i.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:xn("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:jt,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:n?2:1,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition})||this).hidpi_=n,e.culture_=void 0!==t.culture?t.culture:"en-us",e.maxZoom_=void 0!==t.maxZoom?t.maxZoom:-1,e.apiKey_=t.key,e.imagerySet_=t.imagerySet,l_("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+e.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+e.apiKey_+"&c="+e.culture_,e.handleImageryMetadataResponse.bind(e),void 0,"jsonp"),e}return F_(t,i),t.prototype.getApiKey=function(){return this.apiKey_},t.prototype.getImagerySet=function(){return this.imagerySet_},t.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var i=t.resourceSets[0].resources[0],e=-1==this.maxZoom_?i.zoomMax:this.maxZoom_,n=A_(this.getProjection()),r=this.hidpi_?2:1,o=i.imageWidth==i.imageHeight?i.imageWidth/r:[i.imageWidth/r,i.imageHeight/r],a=C_({extent:n,minZoom:i.zoomMin,maxZoom:e,tileSize:o});this.tileGrid=a;var s=this.culture_,l=this.hidpi_;if(this.tileUrlFunction=o_(i.imageUrlSubdomains.map(function(t){var r=[0,0,0],o=i.imageUrl.replace("{subdomain}",t).replace("{culture}",s);return function(t,e,n){if(t){$x(t[0],t[1],t[2],r);var i=o;return l&&(i+="&dpi=d1&device=mobile"),i.replace("{quadkey}",function(t){var e,n,i=t[0],r=new Array(i),o=1<>=1;return r.join("")}(r))}}})),i.imageryProviders){var h=Mn(xn("EPSG:4326"),this.getProjection());this.setAttributions(function(s){var l=[],t=s.viewState,e=this.getTileGrid(),n=e.getZForResolution(t.resolution,this.zDirection),u=e.getTileCoordForCoordAndZ(t.center,n)[0];return i.imageryProviders.map(function(t){for(var e=!1,n=t.coverageAreas,i=0,r=n.length;i=o.zoomMin&&u<=o.zoomMax){var a=o.bbox;if(Ze(Ye([a[1],a[0],a[3],a[2]],h),s.extent)){e=!0;break}}}e&&l.push(t.attribution)}),l.push('Terms of Use'),l}.bind(this))}this.setState(Vt)}else this.setState(qt)},t}(D_),j_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),V_=function(r){function t(t){var e=t||{},n=void 0!==e.projection?e.projection:"EPSG:3857",i=void 0!==e.tileGrid?e.tileGrid:C_({extent:A_(n),maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});return r.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,opaque:e.opaque,projection:n,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this}return j_(t,r),t}(D_),q_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),B_=function(n){function t(t){var e=n.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,wrapX:t.wrapX})||this;return e.account_=t.account,e.mapId_=t.map||"",e.config_=t.config||{},e.templateCache_={},e.initializeMap_(),e}return q_(t,n),t.prototype.getConfig=function(){return this.config_},t.prototype.updateConfig=function(t){v(this.config_,t),this.initializeMap_()},t.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},t.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var n=new XMLHttpRequest;n.addEventListener("load",this.handleInitResponse_.bind(this,t)),n.addEventListener("error",this.handleInitError_.bind(this)),n.open("POST",e),n.setRequestHeader("Content-type","application/json"),n.send(JSON.stringify(this.config_))}},t.prototype.handleInitResponse_=function(t,e){var n=e.target;if(!n.status||200<=n.status&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.setState(qt)}this.applyTemplate_(i),this.templateCache_[t]=i,this.setState(Vt)}else this.setState(qt)},t.prototype.handleInitError_=function(t){this.setState(qt)},t.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},t}(V_),U_=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),W_=function(n){function t(t){var e=n.call(this,{attributions:t.attributions,wrapX:t.wrapX})||this;return e.resolution=void 0,e.distance=void 0!==t.distance?t.distance:20,e.features=[],e.geometryFunction=t.geometryFunction||function(t){var e=t.getGeometry();return K(e.getType()==re.POINT,10),e},e.source=t.source,e.source.addEventListener(R,e.refresh.bind(e)),e}return U_(t,n),t.prototype.getDistance=function(){return this.distance},t.prototype.getSource=function(){return this.source},t.prototype.loadFeatures=function(t,e,n){this.source.loadFeatures(t,e,n),e!==this.resolution&&(this.clear(),this.resolution=e,this.cluster(),this.addFeatures(this.features))},t.prototype.setDistance=function(t){this.distance=t,this.refresh()},t.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},t.prototype.cluster=function(){if(void 0!==this.resolution)for(var t=[1/(this.features.length=0),1/0,-1/0,-1/0],e=this.distance*this.resolution,n=this.source.getFeatures(),i={},r=0,o=n.length;r>=1,f>>=1;break;default:K(!1,53)}c.push([1,1]),c.reverse();for(var d=[1],y=[0],m=1,g=c.length;mStamen Design, under CC BY 3.0.',vw],Ew={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},Iw={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Lw=function(a){function t(t){var e=t.layer.indexOf("-"),n=-1==e?t.layer:t.layer.slice(0,e),i=Iw[n],r=Ew[t.layer],o=void 0!==t.url?t.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+t.layer+"/{z}/{x}/{y}."+r.extension;return a.call(this,{attributions:Aw,cacheSize:t.cacheSize,crossOrigin:"anonymous",maxZoom:null!=t.maxZoom?t.maxZoom:i.maxZoom,minZoom:null!=t.minZoom?t.minZoom:i.minZoom,opaque:r.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:o,wrapX:t.wrapX})||this}return Tw(t,a),t}(V_),Rw=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();function Ow(t,e,n){var i=this.getTileGrid();if(!((i=i||this.getTileGridForProjection(n)).getResolutions().length<=t[0])){1==e||this.hidpi_||(e=1);var r=i.getTileCoordExtent(t,this.tmpExtent_),o=to(i.getTileSize(t[0]),this.tmpSize);1!=e&&(o=$r(o,e,this.tmpSize));var a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return v(a,this.params_),this.getRequestUrl_(t,o,r,e,n,a)}}var Nw=function(i){function t(t){var e=this,n=t||{};return(e=i.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,tileUrlFunction:Ow,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).params_=n.params||{},e.hidpi_=void 0===n.hidpi||n.hidpi,e.tmpExtent_=[1/0,1/0,-1/0,-1/0],e.setKey(e.getKeyForParams_()),e}return Rw(t,i),t.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},t.prototype.getParams=function(){return this.params_},t.prototype.getRequestUrl_=function(t,e,n,i,r,o){var a=this.urls;if(a){var s=r.getCode().split(":").pop();return o.SIZE=e[0]+","+e[1],o.BBOX=n.join(","),o.BBOXSR=s,o.IMAGESR=s,o.DPI=Math.round(o.DPI?o.DPI*i:90*i),rw((1==a.length?a[0]:a[it(n_(t),a.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},t.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},t.prototype.updateParams=function(t){v(this.params_,t),this.setKey(this.getKeyForParams_())},t}(D_),kw=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),zw=function(r){function t(t,e,n){var i=r.call(this,t,2)||this;return i.tileSize_=e,i.text_=n,i.canvas_=null,i}return kw(t,r),t.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,e=xt(t[0],t[1]);return e.strokeStyle="grey",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="grey",e.strokeStyle="white",e.textAlign="center",e.textBaseline="middle",e.font="24px sans-serif",e.lineWidth=4,e.strokeText(this.text_,t[0]/2,t[1]/2,t[0]),e.fillText(this.text_,t[0]/2,t[1]/2,t[0]),this.canvas_=e.canvas,e.canvas},t.prototype.load=function(){},t}(h_),Dw=function(n){function t(t){var e=t||{};return n.call(this,{opaque:!1,projection:e.projection,tileGrid:e.tileGrid,wrapX:void 0===e.wrapX||e.wrapX,zDirection:e.zDirection})||this}return kw(t,n),t.prototype.getTile=function(t,e,n){var i=t_(t,e,n);if(this.tileCache.containsKey(i))return this.tileCache.get(i);var r=to(this.tileGrid.getTileSize(t)),o=[t,e,n],a=this.getTileCoordForTileUrlFunction(o),s=void 0;s=a?"z:"+a[0]+" x:"+a[1]+" y:"+a[2]:"none";var l=new zw(o,r,s);return this.tileCache.set(i,l),l},t}(V_),Fw=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Gw=function(i){function t(t){var e=i.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:xn("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:jt,tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition})||this;if(e.tileJSON_=null,e.tileSize_=t.tileSize,t.url)if(t.jsonp)l_(t.url,e.handleTileJSONResponse.bind(e),e.handleTileJSONError.bind(e));else{var n=new XMLHttpRequest;n.addEventListener("load",e.onXHRLoad_.bind(e)),n.addEventListener("error",e.onXHRError_.bind(e)),n.open("GET",t.url),n.send()}else t.tileJSON?e.handleTileJSONResponse(t.tileJSON):K(!1,51);return e}return Fw(t,i),t.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||200<=e.status&&e.status<300){var n=void 0;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(n)}else this.handleTileJSONError()},t.prototype.onXHRError_=function(t){this.handleTileJSONError()},t.prototype.getTileJSON=function(){return this.tileJSON_},t.prototype.handleTileJSONResponse=function(e){var t,n=xn("EPSG:4326"),i=this.getProjection();if(void 0!==e.bounds){var r=Mn(n,i);t=Ye(e.bounds,r)}var o=e.minzoom||0,a=e.maxzoom||22,s=C_({extent:A_(i),maxZoom:a,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=s,this.tileUrlFunction=r_(e.tiles,s),void 0!==e.attribution&&!this.getAttributions()){var l=void 0!==t?t:n.getExtent();this.setAttributions(function(t){return Ze(l,t.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState(Vt)},t.prototype.handleTileJSONError=function(){this.setState(qt)},t}(D_),jw=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}();function Vw(t,e,n){var i=this.getTileGrid();if(!((i=i||this.getTileGridForProjection(n)).getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var r=i.getResolution(t[0]),o=i.getTileCoordExtent(t,this.tmpExtent_),a=to(i.getTileSize(t[0]),this.tmpSize),s=this.gutter_;0!==s&&(a=Qr(a,s,this.tmpSize),o=xe(o,r*s,o)),1!=e&&(a=$r(a,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return v(l,this.params_),this.getRequestUrl_(t,a,o,e,n,l)}}var qw=function(o){function t(t){var e=this,n=t||{},i=n.params||{},r=!("TRANSPARENT"in i)||i.TRANSPARENT;return(e=o.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,opaque:!r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction,tileUrlFunction:Vw,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this).gutter_=void 0!==n.gutter?n.gutter:0,e.params_=i,e.v13_=!0,e.serverType_=n.serverType,e.hidpi_=void 0===n.hidpi||n.hidpi,e.tmpExtent_=[1/0,1/0,-1/0,-1/0],e.updateV13_(),e.setKey(e.getKeyForParams_()),e}return jw(t,o),t.prototype.getFeatureInfoUrl=function(t,e,n,i){var r=xn(n),o=this.getProjection(),a=this.getTileGrid(),s=(a=a||this.getTileGridForProjection(r)).getZForResolution(e,this.zDirection),l=a.getTileCoordForCoordAndZ(t,s);if(!(a.getResolutions().length<=l[0])){var u=a.getResolution(l[0]),h=a.getTileCoordExtent(l,this.tmpExtent_),c=to(a.getTileSize(l[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=Qr(c,p,this.tmpSize),h=xe(h,u*p,h)),o&&o!==r&&(u=m_(o,r,t,u),h=En(h,r,o),t=An(t,r,o));var f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};v(f,this.params_,i);var d=Math.floor((t[0]-h[0])/u),y=Math.floor((h[3]-t[1])/u);return f[this.v13_?"I":"X"]=d,f[this.v13_?"J":"Y"]=y,this.getRequestUrl_(l,c,h,1,o||r,f)}},t.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var n={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(Array.isArray(i)&&1!==i.length)return;n.LAYER=i}if(void 0!==t){var r=this.getProjection()?this.getProjection().getMetersPerUnit():1;n.SCALE=t*r*39.37*(25.4/.28)}return v(n,e),rw(this.urls[0],n)}},t.prototype.getGutter=function(){return this.gutter_},t.prototype.getParams=function(){return this.params_},t.prototype.getRequestUrl_=function(t,e,n,i,r,o){var a=this.urls;if(a){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case fw:case"qgis":o.DPI=90*i;break;default:K(!1,52)}var l=r.getAxisOrientation(),u=n;if(this.v13_&&"ne"==l.substr(0,2)){var h=void 0;h=n[0],u[0]=n[1],u[1]=h,h=n[2],u[2]=n[3],u[3]=h}return o.BBOX=u.join(","),rw(1==a.length?a[0]:a[it(n_(t),a.length)],o)}},t.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},t.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},t.prototype.updateParams=function(t){v(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},t.prototype.updateV13_=function(){var t=this.params_.VERSION||"1.3.0";this.v13_=0<=wi(t,"1.3")},t}(D_),Bw=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Uw=function(s){function t(t,e,n,i,r,o){var a=s.call(this,t,e)||this;return a.src_=n,a.extent_=i,a.preemptive_=r,a.grid_=null,a.keys_=null,a.data_=null,a.jsonp_=o,a}return Bw(t,s),t.prototype.getImage=function(){return null},t.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),n=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),i=this.grid_[Math.floor((1-n)*this.grid_.length)];if("string"!=typeof i)return null;var r=i.charCodeAt(Math.floor(e*i.length));93<=r&&r--,35<=r&&r--;var o=null;if((r-=32)in this.keys_){var a=this.keys_[r];o=this.data_&&a in this.data_?this.data_[a]:a}return o},t.prototype.forDataAtCoordinate=function(e,n,t){0==this.state&&!0===t?(d(this,R,function(t){n(this.getData(e))},this),this.loadInternal_()):!0===t?setTimeout(function(){n(this.getData(e))}.bind(this),0):n(this.getData(e))},t.prototype.getKey=function(){return this.src_},t.prototype.handleError_=function(){this.state=3,this.changed()},t.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=4,this.changed()},t.prototype.loadInternal_=function(){if(0==this.state)if(this.state=1,this.jsonp_)l_(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},t.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||200<=e.status&&e.status<300){var n=void 0;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(n)}else this.handleError_()},t.prototype.onXHRError_=function(t){this.handleError_()},t.prototype.load=function(){this.preemptive_&&this.loadInternal_()},t}(h_),Ww=function(i){function t(t){var e=i.call(this,{projection:xn("EPSG:3857"),state:jt})||this;if(e.preemptive_=void 0===t.preemptive||t.preemptive,e.tileUrlFunction_=a_,e.template_=void 0,e.jsonp_=t.jsonp||!1,t.url)if(e.jsonp_)l_(t.url,e.handleTileJSONResponse.bind(e),e.handleTileJSONError.bind(e));else{var n=new XMLHttpRequest;n.addEventListener("load",e.onXHRLoad_.bind(e)),n.addEventListener("error",e.onXHRError_.bind(e)),n.open("GET",t.url),n.send()}else t.tileJSON?e.handleTileJSONResponse(t.tileJSON):K(!1,51);return e}return Bw(t,i),t.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||200<=e.status&&e.status<300){var n=void 0;try{n=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(n)}else this.handleTileJSONError()},t.prototype.onXHRError_=function(t){this.handleTileJSONError()},t.prototype.getTemplate=function(){return this.template_},t.prototype.forDataAtCoordinateAndResolution=function(t,e,n,i){if(this.tileGrid){var r=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,r);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,n,i)}else!0===i?setTimeout(function(){n(null)},0):n(null)},t.prototype.handleTileJSONError=function(){this.setState(qt)},t.prototype.handleTileJSONResponse=function(e){var t,n=xn("EPSG:4326"),i=this.getProjection();if(void 0!==e.bounds){var r=Mn(n,i);t=Ye(e.bounds,r)}var o=e.minzoom||0,a=e.maxzoom||22,s=C_({extent:A_(i),maxZoom:a,minZoom:o});this.tileGrid=s,this.template_=e.template;var l=e.grids;if(l){if(this.tileUrlFunction_=r_(l,s),void 0!==e.attribution){var u=void 0!==t?t:n.getExtent();this.setAttributions(function(t){return Ze(u,t.extent)?[e.attribution]:null})}this.setState(Vt)}else this.setState(qt)},t.prototype.getTile=function(t,e,n,i,r){var o=t_(t,e,n);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,n],s=this.getTileCoordForTileUrlFunction(a,r),l=this.tileUrlFunction_(s,i,r),u=new Uw(a,void 0!==l?0:4,void 0!==l?l:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return this.tileCache.set(o,u),u},t.prototype.useTile=function(t,e,n){var i=t_(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)},t}(R_),Zw=function(){var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};return function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}}(),Xw=function(s){function t(t,e,n,i,r,o){var a=s.call(this,t,e,{transition:0})||this;return a.context_={},a.executorGroups={},a.loadingSourceTiles=0,a.errorSourceTileKeys={},a.hitDetectionImageData=null,a.replayState_={},a.wantedResolution,a.getSourceTiles=r.bind(a,a),a.removeSourceTiles_=o,a.sourceTileGrid_=i,a.sourceTileListenerKeys=[],a.sourceZ=-1,a.hifi=!1,a.wrappedTileCoord=n,a}return Zw(t,s),t.prototype.disposeInternal=function(){for(var t in this.sourceTileListenerKeys.forEach(_),this.sourceTileListenerKeys.length=0,this.removeSourceTiles_(this),this.context_){var e=this.context_[t].canvas;e.width=0,e.height=0}for(var t in this.executorGroups)for(var n=this.executorGroups[t],i=0,r=n.length;it.minx?t.minx:this.minx,this.miny=this.miny>t.miny?t.miny:this.miny,this.minz=this.minz>t.minz?t.minz:this.minz,this.maxx=this.maxx>t.maxx?this.maxx:t.maxx,this.maxy=this.maxy>t.maxy?this.maxy:t.maxy,this.maxz=this.maxz>t.maxz?this.maxz:t.maxz,this.spatialReference=t.spatialReference,this},h.prototype.intersect=function(t){return isNaN(this.minx)&&(this.minx=Number.MAX_VALUE),isNaN(this.miny)&&(this.miny=Number.MAX_VALUE),isNaN(this.minz)&&(this.minz=Number.MAX_VALUE),isNaN(this.maxx)&&(this.maxx=-Number.MAX_VALUE),isNaN(this.maxy)&&(this.maxy=-Number.MAX_VALUE),isNaN(this.maxz)&&(this.maxz=-Number.MAX_VALUE),new h({minx:this.minx>t.minx?this.minx:t.minx,miny:this.miny>t.miny?this.miny:t.miny,minz:this.minz>t.minz?this.minz:t.minz,maxx:this.maxx>t.maxx?t.maxx:this.maxx,maxy:(this.maxy,t.maxy,t.maxy),maxz:this.maxz>t.maxz?t.maxz:this.maxz,spatialReference:this.spatialReference})},h.prototype.asWkt=function(t){var e=[],n=this;e.push({x:n.minx,y:n.miny}),e.push({x:n.minx,y:n.maxy}),e.push({x:n.maxx,y:n.maxy}),e.push({x:n.maxx,y:n.miny}),e.push({x:n.minx,y:n.miny});var i=n.points2WKT(e,t);return"polygon({0})".replace("{0}",i)},h.prototype.grid=function(t,e,n){var i=this.width(),r=this.height(),o=this.depth();t=t||i,e=e||r,n=n||o;var a,s,l,u,h=Math.ceil(i/t),c=Math.ceil(r/e),p=Math.ceil(o/n),f=new Map,d=this.minz,y=this.minz+n,m=this.constructor;h!=h&&(h=1),c!=c&&(c=1),p!=p&&(p=1);for(var g=0;g>>0,e=Math.max(0,Math.min(f,u)),i=[],n=u-e+1,r=[],o=v(),e)for(l=o.progress,s=function(t){r.push(t),--n||(a=s=x,o.reject(r))},a=function(t){i.push(t),--e||(a=s=x,o.resolve(i))},h=0;h>>0,n=[],a=v(),i)for(r=function(t,e){g(t,s).then(function(t){n[e]=t,--i||a.resolve(n)},a.reject)},o=0;o>>0,(n=arguments).length<=1)for(;;){if(o in e){i=e[o++];break}if(++o>=r)throw new TypeError}else i=n[1];for(;or.x&&(t=r.x),er.y&&(miny=r.y),maxyr.z&&(minz=r.z),maxz{0}{1}'},r.prototype.setContentFun=function(t){this.content='{0}
'.replace("{0}",t)},r.prototype.pieceTemplate=function(t){for(var e,n="",i=t.length,r=this.creatTemplate(),o=0;o=this.maxcps&&this.endDraw(s)}},u.prototype.onMouseMove=function(t,e,n,i,r,o,a){if(this.isDraw&&1<=this.pushNum&&this.pushNum<99){this.onSetPosition(r,o);var s=this.onGeneralPoint(this.mapx,this.mapy,this.mapz,n,i);this.drawing(s)}this.cursor="crosshair",this.setCursor(this.cursor)},u.prototype.onMouseClick=function(t,e,n,i,r,o,a){},u.prototype.onDblclick=function(t){},u.prototype.entryDraw=function(t,e,n,i,r){this.onSetPosition(e,n);var o=this.onGeneralPoint(this.mapx,this.mapy,this.mapz,i,r);0==t?0==this.pushNum?this.beginDraw(o):1<=this.pushNum&&this.pushNum<99&&this.pauseDraw(o,[i,r]):this.endDraw()},u.prototype.onGeneralPoint=function(){return new r({x:this.mapx,y:this.mapy,z:this.mapz,spatialReference:this.srid})},u.prototype.onSetPosition=function(t,e){this.mapx=t,this.mapy=e},u.prototype.beginDraw=function(t){if(this.templateElement){this.map.stopDbClick(),this.isDraw=!0,this.pushNum++,this.drawElement=this.templateElement.copy();var e=this.drawElement.geometry;this.geoBuilder.build(e,t,1,this.pushNum),this.drawLayer.add(this.drawElement),this.pushNum==this.maxcps&&this.endDraw(),this.onBeginDraw()}},u.prototype.pauseDraw=function(t,e){this.pushNum++;var n=this.drawElement.geometry;this.atFinish(e)?this.endDraw():(this.geoBuilder.build(n,t,2,this.pushNum),this.drawLayer.update(this.drawElement),this.pushNum>=this.maxcps&&this.endDraw(),this.onPauseDraw())},u.prototype.drawing=function(t){var e=this.drawElement.geometry;this.geoBuilder.build(e,t,3,this.pushNum),this.drawLayer.update(this.drawElement),this.onDrawing(this.drawElement)},u.prototype.deactivate=function(){u.prototype.uber.deactivate(),this.isDraw&&(this.drawLayer.clear(),this.isDraw=!1,this.finishCoordinate=null,this.pushNum=0,this.map.resumeDbClick(),this.notify()),this.map.resumeDragPan()},u.prototype.endDraw=function(){if(this.isDraw=!1,this.drawElement){var t=this.drawElement.geometry;t.normalize(),this.geoBuilder.build(t,null,4,this.pushNum),this.drawLayer.remove(this.drawElement),this.canContinue?(this.onEndDraw(this.drawElement),this.drawElement=this.templateElement.copy()):(this.activeCommand(this.activeCommandName,null),this.onEndDraw(this.drawElement),this.drawElement=null),this.finishCoordinate=null,this.pushNum=0,this.map.resumeDbClick(),this.notify()}},u.prototype.atFinish=function(t){var e=!1;if(this.finishCoordinate){var n=t[0]-this.finishCoordinate[0],i=t[1]-this.finishCoordinate[1];e=Math.sqrt(n*n+i*i)<12}return this.finishCoordinate=t,e&&(this.finishCoordinate=null),e},u.prototype.onBeginDraw=function(){},u.prototype.onDrawing=function(t){},u.prototype.onPauseDraw=function(){},u.prototype.onEndDraw=function(t){},s.exports=u}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(53),n(15),n,e,t],void 0===(r=function(t,n,i,e,r,o){function a(t){var e=t||{};n.call(this,e),this.borderColor=null==e.borderColor?new i({a:153,r:19,g:181,b:177}):e.borderColor,this.borderThickness=null==e.borderThickness?1:e.borderThickness,this.style=null==e.style?5:e.style,this.opacity=null==e.opacity?1:e.opacity,this.$type="FillSymbol,http://www.Gs.com"}return t.extend2(a,n),a.prototype.copy=function(){return new a({borderColor:this.borderColor.copy(),borderThickness:this.borderThickness,opacity:this.opacity,style:this.style})},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(22),n,e,t],void 0===(r=function(t,n,e,i,r){function o(t){var e=t||{};n.call(this,e)}return t.extend2(o,n),o.prototype.numGeometries=function(){return 0},o.prototype.geometryN=function(t){return null},o.prototype.addGeometry=function(t){},o.prototype.insertGeometry=function(t,e){},o.prototype.removeGeometry=function(t){},o.prototype.removeAllGeometry=function(){},o.prototype.indexOfGeometry=function(t){},o.prototype.isGeometryEmpty=function(){},o.prototype.getGeometryCount=function(){},o.prototype.getGeometry=function(t){},r.exports=o}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(8),n(29),n,e,t],void 0===(r=function(t,e,n,i,r,o){function a(t){var e=t||{};n.call(this,e),this.$type="LinearRing,http://www.Gs.com"}return t.extend2(a,n),a.prototype.getGeometryType=function(){return e.LinearRing},a.prototype.copy=function(){for(var t=new a,e=0,n=this.points.length;e=this.gap&&(this.gapCount=0,1===this.initialCount&&!0===this.loop&&this.index>=this.count&&(this.index=0),this.index>this.count?this.stop():this.doUpdate(this.index++,this.count)))},o.prototype.doStart=function(){},o.prototype.doUpdate=function(t,e){},o.prototype.doStop=function(){},r.exports=o}.apply(e,i))||(t.exports=r)},function(t,e,n){var i;void 0===(i=function(t,e,n){function r(){this.attributes=[],this.$type="AttributeSet,http://www.Gs.com"}return r.prototype.copy=function(){for(var t=new r(this),e=0,n=this.attributes.length;er.x&&(t=r.x),er.y&&(miny=r.y),maxyr.z&&(minz=r.z),maxz(i=1))return i;for(;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function p(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function d(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function m(t,e,n){var i={};for(var r in t)i[r]=e.call(n||this,t[r],r,t);return i}function g(t,e,n){var i={};for(var r in t)e.call(n||this,t[r],r,t)&&(i[r]=t[r]);return i}function v(t){return Array.isArray(t)?t.map(v):"object"==typeof t&&t?m(t,v):t}var x={};function ct(t){x[t]||("undefined"!=typeof console&&console.warn(t),x[t]=!0)}function _(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}function w(t){for(var e=0,n=0,i=t.length,r=i-1,o=void 0,a=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,e,n,i){var r=n||i;return o[e]=!r||r.toLowerCase(),""}),o["max-age"]){var e=parseInt(o["max-age"],10);isNaN(e)?delete o["max-age"]:o["max-age"]=e}return o}var S=null;function C(t){if(null==S){var e=t.navigator?t.navigator.userAgent:null;S=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return S}function M(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var T,A,E,I,L=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),R=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,O=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,N={now:L,frame:function(t){var e=R(t);return{cancel:function(){return O(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var n=self.document.createElement("canvas"),i=n.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return n.width=t.width,n.height=t.height,i.drawImage(t,0,0,t.width,t.height),i.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return(T=T||self.document.createElement("a")).href=t,T.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==A&&(A=self.matchMedia("(prefers-reduced-motion: reduce)")),A.matches)}},k={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16,CRS:"EPSG:4490"},z={supported:!1,testSupport:function(t){!D&&I&&(F?G(t):E=t)}},D=!1,F=!1;function G(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;z.supported=!0}catch(t){}t.deleteTexture(e),D=!0}function j(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()}self.document&&((I=self.document.createElement("img")).onload=function(){E&&G(E),F=!(E=null)},I.onerror=function(){D=!0,E=null},I.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var V="01";function q(t){return 0===t.indexOf("mapbox:")}j.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",V,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},j.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},j.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},j.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var n=X(t);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},j.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var n=X(t);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},j.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var n=X(t);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||e)},j.prototype.normalizeSpriteURL=function(t,e,n,i){var r=X(t);return q(t)?(r.path="/styles/v1"+r.path+"/sprite"+e+n,this._makeAPIURL(r,this._customAccessToken||i)):(r.path+=""+e+n,H(r))},j.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var i=X(t);i.path=i.path.replace(/(\.(png|jpg)\d*)(?=$)/,(2<=N.devicePixelRatio||512===e?"@2x":"")+(z.supported?".webp":"$1")),i.path=i.path.replace(/^.+\/v4\//,"/"),i.path="/v4"+i.path;var n=this._customAccessToken||function(){for(var t=0,e=i.params;tDate.now()&&!n["no-cache"]}(t);n.delete(r),e&&n.put(r,t.clone()),i(null,t,e)}).catch(i)}).catch(i)}(a,n):n(null,null),{cancel:function(){l=!0,s||e.abort()}}}(t,e);if(b()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var n;return function(e,n){var i=new self.XMLHttpRequest;for(var t in i.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(i.responseType="arraybuffer"),e.headers)i.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(i.responseType="text",i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=function(){n(new Error(i.statusText))},i.onload=function(){if((200<=i.status&&i.status<300||0===i.status)&&null!==i.response){var t=i.response;if("json"===e.type)try{t=JSON.parse(i.response)}catch(t){return n(t)}n(null,t,i.getResponseHeader("Cache-Control"),i.getResponseHeader("Expires"))}else n(new xt(i.statusText,i.status,e.url))},i.send(e.body),{cancel:function(){return i.abort()}}}(t,e)}function Pt(t,e){return bt(f(t,{type:"arrayBuffer"}),e)}var St,Ct,Mt=function(t,e){return bt(f(t,{method:"POST"}),e)};St=[],Ct=0;var Tt=function(s,l){if(z.supported&&(s.headers||(s.headers={}),s.headers.accept="image/webp,*/*"),Ct>=k.MAX_PARALLEL_IMAGE_REQUESTS){var t={requestParameters:s,callback:l,cancelled:!1,cancel:function(){this.cancelled=!0}};return St.push(t),t}function u(){if(!e)for(e=!0,Ct--;St.length&&Ct":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},zt=function(t,e,n,i){this.message=(t?t+": ":"")+n,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function Dt(t){var e=t.value;return e?[new zt(t.key,e,"constants have been deprecated as of v8")]:[]}function Ft(t){for(var e=[],n=arguments.length-1;0":"value"===t.itemType.kind?"array":"array<"+e+">"}var ie=[Wt,Zt,Xt,Ht,Yt,$t,Kt,ee(Jt),te];function re(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!re(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var n=0,i=ie;n>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&0<=(e=parseInt(n.substr(1),16))&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var i=n.indexOf("("),r=n.indexOf(")");if(-1!==i&&r+1===n.length){var o=n.substr(0,i),a=n.substr(i+1,r-(i+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=m(a.pop());case"rgb":return 3!==a.length?null:[y(a[0]),y(a[1]),y(a[2]),s];case"hsla":if(4!==a.length)return null;s=m(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=m(a[1]),h=m(a[2]),c=h<=.5?h*(u+1):h+u-h*u,p=2*h-c;return[d(255*g(p,c,l+1/3)),d(255*g(p,c,l)),d(255*g(p,c,l-1/3)),s];default:return null}}return null}}catch(t){}}).parseCSSColor,le=function(t,e,n,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=n,this.a=i};le.parse=function(t){if(t){if(t instanceof le)return t;if("string"==typeof t){var e=se(t);if(e)return new le(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},le.prototype.toString=function(){var t=this.toArray(),e=t[1],n=t[2],i=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(n)+","+i+")"},le.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},le.black=new le(0,0,0,1),le.white=new le(1,1,1,1),le.transparent=new le(0,0,0,0),le.red=new le(1,0,0,1);var ue=function(t,e,n){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};function he(t,e,n,i,r){this.text=t,this.image=e,this.scale=n,this.fontStack=i,this.textColor=r}ue.prototype.compare=function(t,e){return this.collator.compare(t,e)},ue.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ce=function(t){this.sections=t};ce.fromString=function(t){return new ce([new he(t,null,null,null,null)])},ce.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length})},ce.factory=function(t){return t instanceof ce?t:ce.fromString(t)},ce.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(t){return t.text}).join("")},ce.prototype.serialize=function(){for(var t=["format"],e=0,n=this.sections;e>3}if(r--,1===i||2===i)o+=t.readSVarint(),a+=t.readSVarint(),1===i&&(e&&s.push(e),e=[]),e.push(new W(o,a));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&s.push(e),s},Ie.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,n=1,i=0,r=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(i--,1===n||2===n)(r+=t.readSVarint())>3;e=1==i?t.readString():2==i?t.readFloat():3==i?t.readDouble():4==i?t.readVarint64():5==i?t.readVarint():6==i?t.readSVarint():7==i?t.readBoolean():null}return e}(n))}function ze(t,e,n){if(3===t){var i=new Oe(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}Ne.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Ee(this._pbf,e,this.extent,this._keys,this._values)};var De=Ee,Fe={VectorTile:function(t,e){this.layers=t.readFields(ze,{},e)},VectorTileFeature:De,VectorTileLayer:Oe};function Ge(t,e,n){return Math.min(n,Math.max(e,t))}var je={"EPSG:3857":{zoomOffset:0,yFromLat:function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360},latFromY:function(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90},getMaxLat:function(){return 85.051129},project:function(t,e,n,i,r){return[360*(t+n)/r-180,360/Math.PI*Math.atan(Math.exp((180-360*(e+i)/r)*Math.PI/180))-90]},projectY:function(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:1=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Ze(t,e){for(var n=!1,i=0,r=e.length;il[1]!=h[1]>l[1]&&l[0]<(h[0]-u[0])*(l[1]-u[1])/(h[1]-u[1])+u[0]&&(n=!n)}var l,u,h,c,p,f,d,y,m,g;return n}function Xe(t,e){for(var n=0;nn[2]){var r=.5*i,o=t[0]-n[0]>r?-i:n[0]-t[0]>r?i:0;0===o&&(o=t[0]-n[2]>r?-i:n[2]-t[0]>r?i:0),t[0]+=o}Ue(e,t)}function en(t,e,n,i){for(var r=Math.pow(2,i.z)*Be,o=[i.x*Be,i.y*Be],a=[],s=0,l=t;s=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var h=e.parse(s,u,r);if(!h)return null;r=r||h.type,i.push([a,h])}return new cn(r,n,i)},cn.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);var r=e.length;return i>=e[r-1]?n[r-1].evaluate(t):n[hn(e,i)].evaluate(t)},cn.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var y=e.parse(p,d,u);if(!y)return null;u=u||y.type,l.push([c,y])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new En(u,n,i,r,l):e.error("Type "+ne(u)+" is not interpolatable.")},En.prototype.evaluate=function(t){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return n[0].evaluate(t);var r=e.length;if(i>=e[r-1])return n[r-1].evaluate(t);var o=hn(e,i),a=En.interpolationFactor(this.interpolation,i,e[o],e[o+1]),s=n[o].evaluate(t),l=n[o+1].evaluate(t);return"interpolate"===this.operator?fn[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?Tn.reverse(Tn.interpolate(Tn.forward(s),Tn.forward(l),a)):Mn.reverse(Mn.interpolate(Mn.forward(s),Mn.forward(l),a))},En.prototype.eachChild=function(t){t(this.input);for(var e=0,n=this.outputs;e=n.length)throw new ve("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new ve("Array index must be an integer, but found "+e+" instead.");return n[e]},On.prototype.eachChild=function(t){t(this.index),t(this.input)},On.prototype.outputDefined=function(){return!1},On.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]},Nn.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Jt),i=e.parse(t[2],2,Jt);return n&&i?oe(n.type,[Ht,Xt,Zt,Wt,Jt])?new Nn(n,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+ne(n.type)+" instead"):null},Nn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!n)return!1;if(!ae(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+ne(ye(e))+" instead.");if(!ae(n,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+ne(ye(n))+" instead.");return 0<=n.indexOf(e)},Nn.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Nn.prototype.outputDefined=function(){return!0},Nn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]},kn.parse=function(t,e){if(t.length<=2||5<=t.length)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1,Jt),i=e.parse(t[2],2,Jt);if(!n||!i)return null;if(!oe(n.type,[Ht,Xt,Zt,Wt,Jt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+ne(n.type)+" instead");if(4!==t.length)return new kn(n,i);var r=e.parse(t[3],3,Zt);return r?new kn(n,i,r):null},kn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),n=this.haystack.evaluate(t);if(!ae(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+ne(ye(e))+" instead.");if(!ae(n,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+ne(ye(n))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(t);return n.indexOf(e,i)}return n.indexOf(e)},kn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},kn.prototype.outputDefined=function(){return!1},kn.prototype.serialize=function(){if(null==this.fromIndex||void 0===this.fromIndex)return["index-of",this.needle.serialize(),this.haystack.serialize()];var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]},zn.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var n,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var r={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,ye(p)))return null}else n=ye(p);if(void 0!==r[String(p)])return u.error("Branch labels must be unique.");r[String(p)]=o.length}var f=e.parse(l,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,Jt);if(!d)return null;var y=e.parse(t[t.length-1],t.length-1,i);return y?"value"!==d.type.kind&&e.concat(1).checkSubtype(n,d.type)?null:new zn(n,i,d,r,o,y):null},zn.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ye(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},zn.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},zn.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},zn.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],n=[],i={},r=0,o=Object.keys(this.cases).sort();r",function(t,e,n){return n=",function(t,e,n){return n<=e},function(t,e,n,i){return 0<=i.compare(e,n)});function Yn(t){this.type=Zt,this.input=t}qn.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var n=e.parse(t[1],1,Zt);if(!n)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var r=null;if(i.locale&&!(r=e.parse(i.locale,1,Xt)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,Xt)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,Zt)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,Zt))?null:new qn(n,r,o,a,s)},qn.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},qn.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},qn.prototype.outputDefined=function(){return!1},qn.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]},Yn.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var n=e.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+ne(n.type)+" instead."):new Yn(n):null},Yn.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ve("Expected value to be of type string or array, but found "+ne(ye(e))+" instead.")},Yn.prototype.eachChild=function(t){t(this.input)},Yn.prototype.outputDefined=function(){return!1},Yn.prototype.serialize=function(){var e=["length"];return this.eachChild(function(t){e.push(t.serialize())}),e};var Kn={"==":Bn,"!=":Un,">":Zn,"<":Wn,">=":Hn,"<=":Xn,array:xe,at:On,boolean:xe,case:Dn,coalesce:Ln,collator:Ae,format:we,image:be,in:Nn,"index-of":kn,interpolate:En,"interpolate-hcl":En,"interpolate-lab":En,length:Yn,let:Rn,literal:ge,match:zn,number:xe,"number-format":qn,object:xe,slice:Fn,step:cn,string:xe,"to-boolean":Pe,"to-color":Pe,"to-number":Pe,"to-string":Pe,var:ln,within:rn};function Jn(t,e){var n=e[0],i=e[1],r=e[2],o=e[3];n=n.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);var a=o?o.evaluate(t):1,s=fe(n,i,r,a);if(s)throw new ve(s);return new le(n/255*a,i/255*a,r/255*a,a)}function Qn(t,e){return t in e}function $n(t,e){var n=e[t];return void 0===n?null:n}function ti(t){return{type:t}}function ei(t){return{result:"success",value:t}}function ni(t){return{result:"error",value:t}}function ii(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ri(t){return!!t.expression&&-1=t.stops[i-1][0])return t.stops[i-1][1];var r=hn(t.stops.map(function(t){return t[0]}),n);return t.stops[r][1]}function pi(t,e,n){var i=void 0!==t.base?t.base:1;if("number"!==ai(n))return ui(t.default,e.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(n<=t.stops[0][0])return t.stops[0][1];if(n>=t.stops[r-1][0])return t.stops[r-1][1];var o,a,s,l,u,h=hn(t.stops.map(function(t){return t[0]}),n),c=(o=n,a=i,s=t.stops[h][0],l=t.stops[h+1][0]-s,u=o-s,0==l?0:1===a?u/l:(Math.pow(a,u)-1)/(Math.pow(a,l)-1)),p=t.stops[h][1],f=t.stops[h+1][1],d=fn[e.type]||li;if(t.colorSpace&&"rgb"!==t.colorSpace){var y=An[t.colorSpace];d=function(t,e){return y.reverse(y.interpolate(y.forward(t),y.forward(e),c))}}return"function"==typeof p.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=p.evaluate.apply(void 0,t),i=f.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==i)return d(n,i,c)}}:d(p,f,c)}function fi(t,e,n){return"color"===e.type?n=le.parse(n):"formatted"===e.type?n=ce.fromString(n.toString()):"resolvedImage"===e.type?n=pe.fromString(n.toString()):ai(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),ui(n,t.default,e.default)}Te.register(Kn,{error:[{kind:"error"},[Xt],function(t,e){throw new ve(e[0].evaluate(t))}],typeof:[Xt,[Jt],function(t,e){return ne(ye(e[0].evaluate(t)))}],"to-rgba":[ee(Zt,4),[Yt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Yt,[Zt,Zt,Zt],Jn],rgba:[Yt,[Zt,Zt,Zt,Zt],Jn],has:{type:Ht,overloads:[[[Xt],function(t,e){return Qn(e[0].evaluate(t),t.properties())}],[[Xt,Kt],function(t,e){var n=e[1];return Qn(e[0].evaluate(t),n.evaluate(t))}]]},get:{type:Jt,overloads:[[[Xt],function(t,e){return $n(e[0].evaluate(t),t.properties())}],[[Xt,Kt],function(t,e){var n=e[1];return $n(e[0].evaluate(t),n.evaluate(t))}]]},"feature-state":[Jt,[Xt],function(t,e){return $n(e[0].evaluate(t),t.featureState||{})}],properties:[Kt,[],function(t){return t.properties()}],"geometry-type":[Xt,[],function(t){return t.geometryType()}],id:[Jt,[],function(t){return t.id()}],zoom:[Zt,[],function(t){return t.globals.zoom}],"heatmap-density":[Zt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Zt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Jt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Zt,ti(Zt),function(t,e){for(var n=0,i=0,r=e;i":[Ht,[Xt,Jt],function(t,e){var n=e[0],i=e[1],r=t.properties()[n.value],o=i.value;return typeof r==typeof o&&o":[Ht,[Jt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&r=":[Ht,[Xt,Jt],function(t,e){var n=e[0],i=e[1],r=t.properties()[n.value],o=i.value;return typeof r==typeof o&&o<=r}],"filter-id->=":[Ht,[Jt],function(t,e){var n=e[0],i=t.id(),r=n.value;return typeof i==typeof r&&r<=i}],"filter-has":[Ht,[Jt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ht,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ht,[ee(Xt)],function(t,e){return 0<=e[0].value.indexOf(t.geometryType())}],"filter-id-in":[Ht,[ee(Jt)],function(t,e){return 0<=e[0].value.indexOf(t.id())}],"filter-in-small":[Ht,[Xt,ee(Jt)],function(t,e){var n=e[0];return 0<=e[1].value.indexOf(t.properties()[n.value])}],"filter-in-large":[Ht,[Xt,ee(Jt)],function(t,e){var n=e[0],i=e[1];return function(t,e,n,i){for(;n<=i;){var r=n+i>>1;if(e[r]===t)return!0;e[r]>t?i=r-1:n=1+r}return!1}(t.properties()[n.value],i.value,0,i.value.length-1)}],all:{type:Ht,overloads:[[[Ht,Ht],function(t,e){var n=e[1];return e[0].evaluate(t)&&n.evaluate(t)}],[ti(Ht),function(t,e){for(var n=0,i=e;ni.maximum?[new zt(e,n,n+" is greater than the maximum value "+i.maximum)]:[]}function Si(t){var a,s,r,l=t.valueSpec,u=Gt(t.value.type),h={},e="categorical"!==u&&void 0===t.value.property,n=!e,o="array"===ai(t.value.stops)&&"array"===ai(t.value.stops[0])&&"object"===ai(t.value.stops[0][0]),i=wi({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===u)return[new zt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],n=t.value;return e=e.concat(bi({key:t.key,value:n,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===ai(n)&&0===n.length&&e.push(new zt(t.key,n,"array must have at least one stop")),e},default:function(t){return Zi({key:t.key,value:t.value,valueSpec:l,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===u&&e&&i.push(new zt(t.key,t.value,'missing required property "property"')),"identity"===u||t.value.stops||i.push(new zt(t.key,t.value,'missing required property "stops"')),"exponential"===u&&t.valueSpec.expression&&!oi(t.valueSpec)&&i.push(new zt(t.key,t.value,"exponential functions not supported")),8<=t.styleSpec.$version&&(n&&!ii(t.valueSpec)?i.push(new zt(t.key,t.value,"property functions not supported")):e&&!ri(t.valueSpec)&&i.push(new zt(t.key,t.value,"zoom functions not supported"))),"categorical"!==u&&!o||void 0!==t.value.property||i.push(new zt(t.key,t.value,'"property" property is required')),i;function c(t){var e=[],n=t.value,i=t.key;if("array"!==ai(n))return[new zt(i,n,"array expected, "+ai(n)+" found")];if(2!==n.length)return[new zt(i,n,"array length 2 expected, length "+n.length+" found")];if(o){if("object"!==ai(n[0]))return[new zt(i,n,"object expected, "+ai(n[0])+" found")];if(void 0===n[0].zoom)return[new zt(i,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new zt(i,n,"object stop key must have value")];if(r&&r>Gt(n[0].zoom))return[new zt(i,n[0].zoom,"stop zoom values must appear in ascending order")];Gt(n[0].zoom)!==r&&(r=Gt(n[0].zoom),s=void 0,h={}),e=e.concat(wi({key:i+"[0]",value:n[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Pi,value:p}}))}else e=e.concat(p({key:i+"[0]",value:n[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},n));return yi(jt(n[1]))?e.concat([new zt(i+"[1]",n[1],"expressions are not allowed in function stops.")]):e.concat(Zi({key:i+"[1]",value:n[1],valueSpec:l,style:t.style,styleSpec:t.styleSpec}))}function p(t,e){var n=ai(t.value),i=Gt(t.value),r=null!==t.value?t.value:e;if(a){if(n!==a)return[new zt(t.key,r,n+" stop domain type must match previous stop domain type "+a)]}else a=n;if("number"!==n&&"string"!==n&&"boolean"!==n)return[new zt(t.key,r,"stop domain value must be a number, string, or boolean")];if("number"===n||"categorical"===u)return"categorical"!==u||"number"!==n||isFinite(i)&&Math.floor(i)===i?"categorical"!==u&&"number"===n&&void 0!==s&&i":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,n=t.slice(1);e"===n||"<="===n||">="===n?Ri(t[1],t[2],n):"any"===n?(e=t.slice(1),["any"].concat(e.map(Li))):"all"===n?["all"].concat(t.slice(1).map(Li)):"none"===n?["all"].concat(t.slice(1).map(Li).map(ki)):"in"===n?Oi(t[1],t.slice(2)):"!in"===n?ki(Oi(t[1],t.slice(2))):"has"===n?Ni(t[1]):"!has"===n?ki(Ni(t[1])):"within"!==n||t}function Ri(t,e,n){switch(t){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,t,e]}}function Oi(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return 200":case">=":2<=n.length&&"$type"===Gt(n[1])&&a.push(new zt(i,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&a.push(new zt(i,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":2<=n.length&&"string"!==(r=ai(n[1]))&&a.push(new zt(i+"[1]",n[1],"string expected, "+r+" found"));for(var s=2;s=h[0+f]&&i>=h[1+f])?(a[p]=!0,o.push(u[p])):a[p]=!1}}},rr.prototype._forEachCell=function(t,e,n,i,r,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),h=this._convertToCellCoord(n),c=this._convertToCellCoord(i),p=l;p<=h;p++)for(var f=u;f<=c;f++){var d=this.d*f+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(f),this._convertFromCellCoord(p+1),this._convertFromCellCoord(f+1)))&&r.call(this,t,e,n,i,d,o,a,s))return}},rr.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},rr.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},rr.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ir+this.cells.length+1+1,n=0,i=0;in?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoomthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}},Lr.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Lr.prototype.possiblyEvaluate=function(t,e,n){return this.property.possiblyEvaluate(this,t,e,n)},Rr.prototype.transitioned=function(t,e){return new Nr(this.property,this.value,e,f({},t.transition,this.transition),t.now)},Rr.prototype.untransitioned=function(){return new Nr(this.property,this.value,null,{},0)},Or.prototype.getValue=function(t){return v(this._values[t].value.value)},Or.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Rr(this._values[t].property)),this._values[t].value=new Lr(this._values[t].property,null===e?void 0:v(e))},Or.prototype.getTransition=function(t){return v(this._values[t].transition)},Or.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Rr(this._values[t].property)),this._values[t].transition=v(e)||void 0},Or.prototype.serialize=function(){for(var t={},e=0,n=Object.keys(this._values);ethis.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(ii.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},Ur.prototype.interpolate=function(t){return t},Ur);function Ur(){qr.apply(this,arguments)}function Wr(t){this.specification=t}function Zr(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var n=t[e];n.specification.overridable&&this.overridableProperties.push(e);var i=this.defaultPropertyValues[e]=new Lr(n,void 0),r=this.defaultTransitionablePropertyValues[e]=new Rr(n);this.defaultTransitioningPropertyValues[e]=r.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}}function Xr(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}function Hr(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}Vr.prototype.possiblyEvaluate=function(t,e,n,i){if(void 0!==t.value){if("constant"!==t.expression.kind)return this._calculate(t.expression.evaluate(new Ar(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ar(Math.floor(e.zoom),e)),t.expression.evaluate(new Ar(Math.floor(e.zoom+1),e)),e);var r=t.expression.evaluate(e,null,{},n,i);return this._calculate(r,r,r,e)}},Vr.prototype._calculate=function(t,e,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:n,to:e}},Vr.prototype.interpolate=function(t){return t},Wr.prototype.possiblyEvaluate=function(t,e,n,i){return!!t.expression.evaluate(e,null,{},n,i)},Wr.prototype.interpolate=function(){return!1},lr("DataDrivenProperty",jr),lr("DataConstantProperty",Gr),lr("CrossFadedDataDrivenProperty",Br),lr("CrossFadedProperty",Vr),lr("ColorRampProperty",Wr);var Yr,Kr=(Qr.__proto__=Yr=Lt,((Qr.prototype=Object.create(Yr&&Yr.prototype)).constructor=Qr).prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},Qr.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},Qr.prototype.setLayoutProperty=function(t,e,n){void 0===n&&(n={}),null!=e&&this._validate(tr,"layers."+this.id+".layout."+t,t,e,n)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},Qr.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},Qr.prototype.setPaintProperty=function(t,e,n){if(void 0===n&&(n={}),null!=e&&this._validate($i,"layers."+this.id+".paint."+t,t,e,n))return!1;if(y(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],r="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),a=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||r||this._handleOverridablePaintPropertyUpdate(t,a,s)},Qr.prototype._handleSpecialPaintPropertyUpdate=function(t){},Qr.prototype._handleOverridablePaintPropertyUpdate=function(t,e,n){return!1},Qr.prototype.isHidden=function(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility},Qr.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},Qr.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},Qr.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},Qr.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),g(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},Qr.prototype._validate=function(t,e,n,i,r){return void 0===r&&(r={}),(!r||!1!==r.validate)&&er(this,t.call(Ji,{key:e,layerType:this.type,objectKey:n,value:i,styleSpec:kt,style:{glyphs:!0,sprite:!0}}))},Qr.prototype.is3D=function(){return!1},Qr.prototype.isTileClipped=function(){return!1},Qr.prototype.hasOffscreenPass=function(){return!1},Qr.prototype.resize=function(){},Qr.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Dr&&ii(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},Qr),Jr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};function Qr(t,e){if(Yr.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=(t=t).metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),e.layout&&(this._unevaluatedLayout=new zr(e.layout)),e.paint)){for(var n in this._transitionablePaint=new Or(e.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Fr(e.paint)}}function $r(t,r){void 0===r&&(r=1);var o=0,a=0;return{members:t.map(function(t){var e=Jr[t.type].BYTES_PER_ELEMENT,n=o=to(o,Math.max(r,e)),i=t.components||1;return a=Math.max(a,e),o+=e*i,{name:t.name,type:t.type,components:i,offset:n}}),size:to(o,Math.max(a,r)),alignment:r}}function to(t,e){return Math.ceil(t/e)*e}Hr.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Hr.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Hr.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Hr.prototype.clear=function(){this.length=0},Hr.prototype.resize=function(t){this.reserve(t),this.length=t},Hr.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Hr.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var eo,no=(io.__proto__=eo=Hr,((io.prototype=Object.create(eo&&eo.prototype)).constructor=io).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},io.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},io.prototype.emplace=function(t,e,n){var i=2*t;return this.int16[0+i]=e,this.int16[1+i]=n,t},io);function io(){eo.apply(this,arguments)}no.prototype.bytesPerElement=4,lr("StructArrayLayout2i4",no);var ro,oo=(ao.__proto__=ro=Hr,((ao.prototype=Object.create(ro&&ro.prototype)).constructor=ao).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},ao.prototype.emplaceBack=function(t,e,n,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n,i)},ao.prototype.emplace=function(t,e,n,i,r){var o=4*t;return this.int16[0+o]=e,this.int16[1+o]=n,this.int16[2+o]=i,this.int16[3+o]=r,t},ao);function ao(){ro.apply(this,arguments)}oo.prototype.bytesPerElement=8,lr("StructArrayLayout4i8",oo);var so,lo=(uo.__proto__=so=Hr,((uo.prototype=Object.create(so&&so.prototype)).constructor=uo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},uo.prototype.emplaceBack=function(t,e,n,i,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,i,r,o)},uo.prototype.emplace=function(t,e,n,i,r,o,a){var s=6*t;return this.int16[0+s]=e,this.int16[1+s]=n,this.int16[2+s]=i,this.int16[3+s]=r,this.int16[4+s]=o,this.int16[5+s]=a,t},uo);function uo(){so.apply(this,arguments)}lo.prototype.bytesPerElement=12,lr("StructArrayLayout2i4i12",lo);var ho,co=(po.__proto__=ho=Hr,((po.prototype=Object.create(ho&&ho.prototype)).constructor=po).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},po.prototype.emplaceBack=function(t,e,n,i,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,i,r,o)},po.prototype.emplace=function(t,e,n,i,r,o,a){var s=4*t,l=8*t;return this.int16[0+s]=e,this.int16[1+s]=n,this.uint8[4+l]=i,this.uint8[5+l]=r,this.uint8[6+l]=o,this.uint8[7+l]=a,t},po);function po(){ho.apply(this,arguments)}co.prototype.bytesPerElement=8,lr("StructArrayLayout2i4ub8",co);var fo,yo=(mo.__proto__=fo=Hr,((mo.prototype=Object.create(fo&&fo.prototype)).constructor=mo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},mo.prototype.emplaceBack=function(t,e,n,i,r,o,a,s,l,u){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,n,i,r,o,a,s,l,u)},mo.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,h){var c=9*t,p=18*t;return this.uint16[0+c]=e,this.uint16[1+c]=n,this.uint16[2+c]=i,this.uint16[3+c]=r,this.uint16[4+c]=o,this.uint16[5+c]=a,this.uint16[6+c]=s,this.uint16[7+c]=l,this.uint8[16+p]=u,this.uint8[17+p]=h,t},mo);function mo(){fo.apply(this,arguments)}yo.prototype.bytesPerElement=18,lr("StructArrayLayout8ui2ub18",yo);var go,vo=(xo.__proto__=go=Hr,((xo.prototype=Object.create(go&&go.prototype)).constructor=xo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},xo.prototype.emplaceBack=function(t,e,n,i,r,o,a,s,l,u,h,c){var p=this.length;return this.resize(p+1),this.emplace(p,t,e,n,i,r,o,a,s,l,u,h,c)},xo.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,h,c,p){var f=12*t;return this.int16[0+f]=e,this.int16[1+f]=n,this.int16[2+f]=i,this.int16[3+f]=r,this.uint16[4+f]=o,this.uint16[5+f]=a,this.uint16[6+f]=s,this.uint16[7+f]=l,this.int16[8+f]=u,this.int16[9+f]=h,this.int16[10+f]=c,this.int16[11+f]=p,t},xo);function xo(){go.apply(this,arguments)}vo.prototype.bytesPerElement=24,lr("StructArrayLayout4i4ui4i24",vo);var _o,wo=(bo.__proto__=_o=Hr,((bo.prototype=Object.create(_o&&_o.prototype)).constructor=bo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},bo.prototype.emplaceBack=function(t,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},bo.prototype.emplace=function(t,e,n,i){var r=3*t;return this.float32[0+r]=e,this.float32[1+r]=n,this.float32[2+r]=i,t},bo);function bo(){_o.apply(this,arguments)}wo.prototype.bytesPerElement=12,lr("StructArrayLayout3f12",wo);var Po,So=(Co.__proto__=Po=Hr,((Co.prototype=Object.create(Po&&Po.prototype)).constructor=Co).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},Co.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Co.prototype.emplace=function(t,e){return this.uint32[1*t+0]=e,t},Co);function Co(){Po.apply(this,arguments)}So.prototype.bytesPerElement=4,lr("StructArrayLayout1ul4",So);var Mo,To=(Ao.__proto__=Mo=Hr,((Ao.prototype=Object.create(Mo&&Mo.prototype)).constructor=Ao).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},Ao.prototype.emplaceBack=function(t,e,n,i,r,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,n,i,r,o,a,s,l)},Ao.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u){var h=10*t,c=5*t;return this.int16[0+h]=e,this.int16[1+h]=n,this.int16[2+h]=i,this.int16[3+h]=r,this.int16[4+h]=o,this.int16[5+h]=a,this.uint32[3+c]=s,this.uint16[8+h]=l,this.uint16[9+h]=u,t},Ao);function Ao(){Mo.apply(this,arguments)}To.prototype.bytesPerElement=20,lr("StructArrayLayout6i1ul2ui20",To);var Eo,Io=(Lo.__proto__=Eo=Hr,((Lo.prototype=Object.create(Eo&&Eo.prototype)).constructor=Lo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Lo.prototype.emplaceBack=function(t,e,n,i,r,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,n,i,r,o)},Lo.prototype.emplace=function(t,e,n,i,r,o,a){var s=6*t;return this.int16[0+s]=e,this.int16[1+s]=n,this.int16[2+s]=i,this.int16[3+s]=r,this.int16[4+s]=o,this.int16[5+s]=a,t},Lo);function Lo(){Eo.apply(this,arguments)}Io.prototype.bytesPerElement=12,lr("StructArrayLayout2i2i2i12",Io);var Ro,Oo=(No.__proto__=Ro=Hr,((No.prototype=Object.create(Ro&&Ro.prototype)).constructor=No).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},No.prototype.emplaceBack=function(t,e,n,i,r){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,n,i,r)},No.prototype.emplace=function(t,e,n,i,r,o){var a=4*t,s=8*t;return this.float32[0+a]=e,this.float32[1+a]=n,this.float32[2+a]=i,this.int16[6+s]=r,this.int16[7+s]=o,t},No);function No(){Ro.apply(this,arguments)}Oo.prototype.bytesPerElement=16,lr("StructArrayLayout2f1f2i16",Oo);var ko,zo=(Do.__proto__=ko=Hr,((Do.prototype=Object.create(ko&&ko.prototype)).constructor=Do).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Do.prototype.emplaceBack=function(t,e,n,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n,i)},Do.prototype.emplace=function(t,e,n,i,r){var o=12*t,a=3*t;return this.uint8[0+o]=e,this.uint8[1+o]=n,this.float32[1+a]=i,this.float32[2+a]=r,t},Do);function Do(){ko.apply(this,arguments)}zo.prototype.bytesPerElement=12,lr("StructArrayLayout2ub2f12",zo);var Fo,Go=(jo.__proto__=Fo=Hr,((jo.prototype=Object.create(Fo&&Fo.prototype)).constructor=jo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},jo.prototype.emplaceBack=function(t,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},jo.prototype.emplace=function(t,e,n,i){var r=3*t;return this.uint16[0+r]=e,this.uint16[1+r]=n,this.uint16[2+r]=i,t},jo);function jo(){Fo.apply(this,arguments)}Go.prototype.bytesPerElement=6,lr("StructArrayLayout3ui6",Go);var Vo,qo=(Bo.__proto__=Vo=Hr,((Bo.prototype=Object.create(Vo&&Vo.prototype)).constructor=Bo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Bo.prototype.emplaceBack=function(t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m){var g=this.length;return this.resize(g+1),this.emplace(g,t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m)},Bo.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m,g){var v=24*t,x=12*t,_=48*t;return this.int16[0+v]=e,this.int16[1+v]=n,this.uint16[2+v]=i,this.uint16[3+v]=r,this.uint32[2+x]=o,this.uint32[3+x]=a,this.uint32[4+x]=s,this.uint16[10+v]=l,this.uint16[11+v]=u,this.uint16[12+v]=h,this.float32[7+x]=c,this.float32[8+x]=p,this.uint8[36+_]=f,this.uint8[37+_]=d,this.uint8[38+_]=y,this.uint32[10+x]=m,this.int16[22+v]=g,t},Bo);function Bo(){Vo.apply(this,arguments)}qo.prototype.bytesPerElement=48,lr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",qo);var Uo,Wo=(Zo.__proto__=Uo=Hr,((Zo.prototype=Object.create(Uo&&Uo.prototype)).constructor=Zo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Zo.prototype.emplaceBack=function(t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m,g,v,x,_,w,b,P,S,C,M,T){var A=this.length;return this.resize(A+1),this.emplace(A,t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m,g,v,x,_,w,b,P,S,C,M,T)},Zo.prototype.emplace=function(t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m,g,v,x,_,w,b,P,S,C,M,T,A){var E=34*t,I=17*t;return this.int16[0+E]=e,this.int16[1+E]=n,this.int16[2+E]=i,this.int16[3+E]=r,this.int16[4+E]=o,this.int16[5+E]=a,this.int16[6+E]=s,this.int16[7+E]=l,this.uint16[8+E]=u,this.uint16[9+E]=h,this.uint16[10+E]=c,this.uint16[11+E]=p,this.uint16[12+E]=f,this.uint16[13+E]=d,this.uint16[14+E]=y,this.uint16[15+E]=m,this.uint16[16+E]=g,this.uint16[17+E]=v,this.uint16[18+E]=x,this.uint16[19+E]=_,this.uint16[20+E]=w,this.uint16[21+E]=b,this.uint16[22+E]=P,this.uint32[12+I]=S,this.float32[13+I]=C,this.float32[14+I]=M,this.float32[15+I]=T,this.float32[16+I]=A,t},Zo);function Zo(){Uo.apply(this,arguments)}Wo.prototype.bytesPerElement=68,lr("StructArrayLayout8i15ui1ul4f68",Wo);var Xo,Ho=(Yo.__proto__=Xo=Hr,((Yo.prototype=Object.create(Xo&&Xo.prototype)).constructor=Yo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},Yo.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},Yo.prototype.emplace=function(t,e){return this.float32[1*t+0]=e,t},Yo);function Yo(){Xo.apply(this,arguments)}Ho.prototype.bytesPerElement=4,lr("StructArrayLayout1f4",Ho);var Ko,Jo=(Qo.__proto__=Ko=Hr,((Qo.prototype=Object.create(Ko&&Ko.prototype)).constructor=Qo).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},Qo.prototype.emplaceBack=function(t,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},Qo.prototype.emplace=function(t,e,n,i){var r=3*t;return this.int16[0+r]=e,this.int16[1+r]=n,this.int16[2+r]=i,t},Qo);function Qo(){Ko.apply(this,arguments)}Jo.prototype.bytesPerElement=6,lr("StructArrayLayout3i6",Jo);var $o,ta=(ea.__proto__=$o=Hr,((ea.prototype=Object.create($o&&$o.prototype)).constructor=ea).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},ea.prototype.emplaceBack=function(t,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,n)},ea.prototype.emplace=function(t,e,n,i){var r=4*t;return this.uint32[2*t+0]=e,this.uint16[2+r]=n,this.uint16[3+r]=i,t},ea);function ea(){$o.apply(this,arguments)}ta.prototype.bytesPerElement=8,lr("StructArrayLayout1ul2ui8",ta);var na,ia=(ra.__proto__=na=Hr,((ra.prototype=Object.create(na&&na.prototype)).constructor=ra).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},ra.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},ra.prototype.emplace=function(t,e,n){var i=2*t;return this.uint16[0+i]=e,this.uint16[1+i]=n,t},ra);function ra(){na.apply(this,arguments)}ia.prototype.bytesPerElement=4,lr("StructArrayLayout2ui4",ia);var oa,aa=(sa.__proto__=oa=Hr,((sa.prototype=Object.create(oa&&oa.prototype)).constructor=sa).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},sa.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},sa.prototype.emplace=function(t,e){return this.uint16[1*t+0]=e,t},sa);function sa(){oa.apply(this,arguments)}aa.prototype.bytesPerElement=2,lr("StructArrayLayout1ui2",aa);var la,ua=(ha.__proto__=la=Hr,((ha.prototype=Object.create(la&&la.prototype)).constructor=ha).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},ha.prototype.emplaceBack=function(t,e){var n=this.length;return this.resize(n+1),this.emplace(n,t,e)},ha.prototype.emplace=function(t,e,n){var i=2*t;return this.float32[0+i]=e,this.float32[1+i]=n,t},ha);function ha(){la.apply(this,arguments)}ua.prototype.bytesPerElement=8,lr("StructArrayLayout2f8",ua);var ca,pa=(fa.__proto__=ca=Hr,((fa.prototype=Object.create(ca&&ca.prototype)).constructor=fa).prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},fa.prototype.emplaceBack=function(t,e,n,i){var r=this.length;return this.resize(r+1),this.emplace(r,t,e,n,i)},fa.prototype.emplace=function(t,e,n,i,r){var o=4*t;return this.float32[0+o]=e,this.float32[1+o]=n,this.float32[2+o]=i,this.float32[3+o]=r,t},fa);function fa(){ca.apply(this,arguments)}pa.prototype.bytesPerElement=16,lr("StructArrayLayout4f16",pa);var da=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new W(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(Xr);da.prototype.size=20;var ya,ma=((ya=To)&&(ga.__proto__=ya),((ga.prototype=Object.create(ya&&ya.prototype)).constructor=ga).prototype.get=function(t){return new da(this,t)},ga);function ga(){ya.apply(this,arguments)}lr("CollisionBoxArray",ma);var va=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,n),e}(Xr);va.prototype.size=48;var xa,_a=((xa=qo)&&(wa.__proto__=xa),((wa.prototype=Object.create(xa&&xa.prototype)).constructor=wa).prototype.get=function(t){return new va(this,t)},wa);function wa(){xa.apply(this,arguments)}lr("PlacedSymbolArray",_a);var ba=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,n),e}(Xr);ba.prototype.size=68;var Pa,Sa=((Pa=Wo)&&(Ca.__proto__=Pa),((Ca.prototype=Object.create(Pa&&Pa.prototype)).constructor=Ca).prototype.get=function(t){return new ba(this,t)},Ca);function Ca(){Pa.apply(this,arguments)}lr("SymbolInstanceArray",Sa);var Ma,Ta=((Ma=Ho)&&(Aa.__proto__=Ma),((Aa.prototype=Object.create(Ma&&Ma.prototype)).constructor=Aa).prototype.getoffsetX=function(t){return this.float32[1*t+0]},Aa);function Aa(){Ma.apply(this,arguments)}lr("GlyphOffsetArray",Ta);var Ea,Ia=((Ea=Jo)&&(La.__proto__=Ea),((La.prototype=Object.create(Ea&&Ea.prototype)).constructor=La).prototype.getx=function(t){return this.int16[3*t+0]},La.prototype.gety=function(t){return this.int16[3*t+1]},La.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},La);function La(){Ea.apply(this,arguments)}lr("SymbolLineVertexArray",Ia);var Ra=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,n),e}(Xr);Ra.prototype.size=8;var Oa,Na=((Oa=ta)&&(ka.__proto__=Oa),((ka.prototype=Object.create(Oa&&Oa.prototype)).constructor=ka).prototype.get=function(t){return new Ra(this,t)},ka);function ka(){Oa.apply(this,arguments)}function za(t){void 0===t&&(t=[]),this.segments=t}lr("FeatureIndexArray",Na);var Da=$r([{name:"a_pos",components:2,type:"Int16"}],4).members;function Fa(t,e){return 256*(t=s(Math.floor(t),0,255))+s(Math.floor(e),0,255)}za.prototype.prepareSegment=function(t,e,n,i){var r=this.segments[this.segments.length-1];return za.MAX_VERTEX_ARRAY_LENGTHza.MAX_VERTEX_ARRAY_LENGTH||r.sortKey!==i)&&(r={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==i&&(r.sortKey=i),this.segments.push(r)),r},za.prototype.get=function(){return this.segments},za.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=t.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}}),Va=e(function(t){t.exports=function(t,e){for(var n,i=t.length,r=e^i,o=0;4<=i;)n=1540483477*(65535&(n=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:r^=(255&t.charCodeAt(o+2))<<16;case 2:r^=(255&t.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0}}),qa=ja,Ba=Va;function Ua(){this.ids=[],this.positions=[],this.indexed=!1}qa.murmur3=ja,qa.murmur2=Ba,Ua.prototype.add=function(t,e,n,i){this.ids.push(Za(t)),this.positions.push(e,n,i)},Ua.prototype.getPositions=function(t){for(var e=Za(t),n=0,i=this.ids.length-1;n>1;this.ids[r]>=e?i=r:n=1+r}for(var o=[];this.ids[n]===e;)o.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return o},Ua.serialize=function(t,e){var n=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,n,i,r){for(;i>1],a=i-1,s=r+1;;){for(;e[++a]o;);if(s<=a)break;Xa(e,a,s),Xa(n,3*a,3*s),Xa(n,3*a+1,3*s+1),Xa(n,3*a+2,3*s+2)}s-iTs.max||a.yTs.max)&&(ct("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=s(a.x,Ts.min,Ts.max),a.y=s(a.y,Ts.min,Ts.max))}return n}function Es(t,e,n,i,r){t.emplaceBack(2*e+(i+1)/2,2*n+(r+1)/2)}function Is(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new no,this.indexArray=new Go,this.segments=new za,this.programConfigurations=new Ss(Da,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})}function Ls(t,e){for(var n=0;ne.y!=(r=n[l]).y>e.y&&e.x<(r.x-i.x)*(e.y-i.y)/(r.y-i.y)+i.x&&(o=!o);return o}function Fs(t,e){for(var n=!1,i=0,r=t.length-1;ie.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function Gs(t,e,n){var i=n[0],r=n[2];if(t.xr.x&&e.x>r.x||t.yr.y&&e.y>r.y)return!1;var o=_(t,e,n[0]);return o!==_(t,e,n[1])||o!==_(t,e,n[2])||o!==_(t,e,n[3])}function js(t,e,n){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:n.programConfigurations.get(e.id).getMaxValue(t)}function Vs(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function qs(t,e,n,i,r){if(!e[0]&&!e[1])return t;var o=W.convert(e)._mult(r);"viewport"===n&&o._rotate(-i);for(var a=[],s=0;st.width||r.height>t.height||n.x>t.width-r.width||n.y>t.height-r.height)throw new RangeError("out of range source coordinates for image copy");if(r.width>e.width||r.height>e.height||i.x>e.width-r.width||i.y>e.height-r.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l80*n){i=o=t[0],r=a=t[1];for(var d=n;do.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,l=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,u=Ol(r.x=u&&p&&p.z<=h;){if(c!==t.prev&&c!==t.next&&kl(r.x,r.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=zl(c.prev,c,c.next))return!1;if(c=c.prevZ,p!==t.prev&&p!==t.next&&kl(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=zl(p.prev,p,p.next))return!1;p=p.nextZ}for(;c&&c.z>=u;){if(c!==t.prev&&c!==t.next&&kl(r.x,r.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=zl(c.prev,c,c.next))return!1;c=c.prevZ}for(;p&&p.z<=h;){if(p!==t.prev&&p!==t.next&&kl(r.x,r.y,o.x,o.y,a.x,a.y,p.x,p.y)&&0<=zl(p.prev,p,p.next))return!1;p=p.nextZ}return!0}function El(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!Dl(r,o)&&Fl(r,i,i.next,o)&&Vl(r,o)&&Vl(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),Ul(i),Ul(i.next),i=t=o),i=i.next}while(i!==t);return Cl(i)}function Il(t,e,n,i,r,o){var a,s,l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&(s=u,(a=l).next.i!==s.i&&a.prev.i!==s.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Fl(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(a,s)&&(Vl(a,s)&&Vl(s,a)&&function(t,e){for(var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),(n=n.next)!==t;);return i}(a,s)&&(zl(a.prev,a,s.prev)||zl(a,s.prev,s))||Dl(a,s)&&0=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&a=i.x&&i.x>=p&&r!==i.x&&kl(on.x||i.x===n.x&&(h=i,zl((u=n).prev,u,h.prev)<0&&zl(h.next,u,u.next)<0)))&&(n=i,d=l)),(i=i.next)!==c;);return n}(t,e)){var n=ql(e,t);Cl(e,e.next),Cl(n,n.next)}}function Ol(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Nl(t){for(var e=t,n=t;(e.x=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function jl(t){return 0Ms})||N.every(function(t){return t.y<0})||N.every(function(t){return t.y>Ms})))for(var y=0,m=0;mMs)||R.y===O.y&&(R.y<0||R.y>Ms))){c.vertexLength+4>za.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=g.sub(v)._perp()._unit(),_=v.dist(g);32768za.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===ou[t.type]){for(var b=[],P=[],S=c.vertexLength,C=0,M=s;C_u/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,n,i,r,o))},mu.prototype.addHalfVertex=function(t,e,n,i,r,o,a){var s=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((t.x<<1)+(i?1:0),(t.y<<1)+(r?1:0),Math.round(63*e)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6);var l=a.vertexLength++;0<=this.e1&&0<=this.e2&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),r?this.e2=l:this.e1=l},mu.prototype.updateScaledDistance=function(){this.scaledDistance=0>1,h=-7,c=n?r-1:0,p=n?-1:1,f=t[e+c];for(c+=p,o=f&(1<<-h)-1,f>>=-h,h+=s;0>=-h,h+=i;0>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(e+=1<=a+c?p/l:p*Math.pow(2,1-c))*l&&(a++,l/=2),h<=a+c?(s=0,a=h):1<=a+c?(s=(e*l-1)*Math.pow(2,r),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,r),a=0));8<=r;t[n+f]=255&s,f+=d,s/=256,r-=8);for(a=a<":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Gu=24,ju=Vu;function Vu(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Vu.Varint=0,Vu.Fixed64=1,Vu.Bytes=2,Vu.Fixed32=5;var qu="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Bu(t){return t.type===Vu.Bytes?t.readVarint()+t.pos:t.pos+1}function Uu(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Wu(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;t<=r;r--)n.buf[r+i]=n.buf[r]}function Zu(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function ih(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Vu.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=eh(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=ih(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=eh(this.buf,this.pos)+4294967296*eh(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=eh(this.buf,this.pos)+4294967296*ih(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=zu(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=zu(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:function(t,e,n){var i,r,o=n.buf;if(i=(112&(r=o[n.pos++]))>>4,r<128)return Uu(t,i,e);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return Uu(t,i,e);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return Uu(t,i,e);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return Uu(t,i,e);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return Uu(t,i,e);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return Uu(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t,e,n,i=this.readVarint()+this.pos,c=this.pos;return 12<=(this.pos=i)-c&&qu?(t=this.buf,e=c,n=i,qu.decode(t.subarray(e,n))):function(t,e,n){for(var i="",r=c;r>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),r+=h}return i}(this.buf,0,i)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Vu.Bytes)return t.push(this.readVarint(e));var n=Bu(this);for(t=t||[];this.pos>>=7,l.buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,s>>>=7,l.buf[l.pos++]=127&s|128,l.buf[l.pos]=127&(s>>>=7),a=(7&(r=i))<<4,(o=e).buf[o.pos++]|=a|((r>>>=3)?128:0),r&&(o.buf[o.pos++]=127&r|((r>>>=7)?128:0),r&&(o.buf[o.pos++]=127&r|((r>>>=7)?128:0),r&&(o.buf[o.pos++]=127&r|((r>>>=7)?128:0),r&&(o.buf[o.pos++]=127&r|((r>>>=7)?128:0),r&&(o.buf[o.pos++]=127&r)))))}(0,this):(this.realloc(4),this.buf[this.pos++]=127&u|(127>>=7)|(127>>=7)|(127>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,r,o=0;o>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;128<=n&&Wu(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),Du(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Du(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;nf.w||c.h>f.h)){if(c.x=f.x,c.y=f.y,l=Math.max(l,c.y+c.h),s=Math.max(s,c.x+c.w),c.w===f.w&&c.h===f.h){var d=a.pop();pi;)u-=l.shift().angleDelta;if(r=i&&c.x>=i||(h.x>=i?h=new W(i,h.y+(i-h.x)/(c.x-h.x)*(c.y-h.y))._round():c.x>=i&&(c=new W(i,h.y+(i-h.x)/(c.x-h.x)*(c.y-h.y))._round()),h.y>=r&&c.y>=r||(h.y>=r?h=new W(h.x+(r-h.y)/(c.y-h.y)*(c.x-h.x),r)._round():c.y>=r&&(c=new W(h.x+(r-h.y)/(c.y-h.y)*(c.x-h.x),r)._round()),l&&h.equals(l[l.length-1])||o.push(l=[h]),l.push(c)))))}return o}var qh=ch;function Bh(S,C,M,t){function e(t,e){return t+e[1]-e[0]}var n=[],T=S.image,A=T.pixelRatio,i=T.paddedRect.w-2*qh,r=T.paddedRect.h-2*qh,E=S.right-S.left,I=S.bottom-S.top,o=T.stretchX||[[0,i]],a=T.stretchY||[[0,r]],L=o.reduce(e,0),R=a.reduce(e,0),s=i-L,l=r-R,O=0,N=L,k=0,z=R,D=0,F=s,G=0,j=l;if(T.content&&t){var u=T.content;O=Uh(o,0,u[0]),k=Uh(a,0,u[1]),N=Uh(o,u[0],u[2]),z=Uh(a,u[1],u[3]),D=u[0]-O,G=u[1]-k,F=u[2]-u[0]-N,j=u[3]-u[1]-z}function h(t,e,n,i){var r=Zh(t.stretch-O,N,E,S.left),o=Xh(t.fixed-D,F,t.stretch,L),a=Zh(e.stretch-k,z,I,S.top),s=Xh(e.fixed-G,j,e.stretch,R),l=Zh(n.stretch-O,N,E,S.left),u=Xh(n.fixed-D,F,n.stretch,L),h=Zh(i.stretch-k,z,I,S.top),c=Xh(i.fixed-G,j,i.stretch,R),p=new W(r,a),f=new W(l,a),d=new W(l,h),y=new W(r,h),m=new W(o/A,s/A),g=new W(u/A,c/A),v=C*Math.PI/180;if(v){var x=Math.sin(v),_=Math.cos(v),w=[_,-x,x,_];p._matMult(w),f._matMult(w),y._matMult(w),d._matMult(w)}var b=t.stretch+t.fixed,P=e.stretch+e.fixed;return{tl:p,tr:f,bl:y,br:d,tex:{x:T.paddedRect.x+qh+b,y:T.paddedRect.y+qh+P,w:n.stretch+n.fixed-b,h:i.stretch+i.fixed-P},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:m,pixelOffsetBR:g,minFontScaleX:F/A/E,minFontScaleY:j/A/I,isSDF:M}}if(t&&(T.stretchX||T.stretchY))for(var c=Wh(o,s,L),p=Wh(a,l,R),f=0;f>1)-1;0<=n;n--)this._down(n)};function Kh(t,e){return to)&&(o=u.x),(!l||u.y>a)&&(a=u.y)}var h=Math.min(o-i,a-r),c=h/2,p=new Yh([],Qh);if(0===h)return new W(i,r);for(var f=i;fy.d||!y.d)&&(y=g,n&&console.log("found best %d after %d probes",Math.round(1e4*g.d)/1e4,m)),g.max-y.d<=e||(p.push(new $h(g.p.x-(c=g.h/2),g.p.y-c,c,t)),p.push(new $h(g.p.x+c,g.p.y-c,c,t)),p.push(new $h(g.p.x-c,g.p.y+c,c,t)),p.push(new $h(g.p.x+c,g.p.y+c,c,t)),m+=4)}return n&&(console.log("num probes: "+m),console.log("best distance: "+y.d)),y.p}function Qh(t,e){return e.max-t.max}function $h(t,e,n,i){this.p=new W(t,e),this.h=n,this.d=function(t,e){for(var n=!1,i=1/0,r=0;rt.y!=h.y>t.y&&t.x<(h.x-u.x)*(t.y-u.y)/(h.y-u.y)+u.x&&(n=!n),i=Math.min(i,zs(t,u,h))}return(n?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}Yh.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Yh.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,0>1,o=e[r];if(0<=n(i,o))break;e[t]=o,t=r}e[t]=i},Yh.prototype._down=function(t){for(var e=this.data,n=this.compare,i=this.length>>1,r=e[t];trc&&ct(t.layerIds[0]+': Value for "text-size" is >= '+ic+'. Reduce your "text-size".'):"composite"===m.kind&&((g=[Lh*f.compositeTextSizes[0].evaluate(a,{},d),Lh*f.compositeTextSizes[1].evaluate(a,{},d)])[0]>rc||g[1]>rc)&&ct(t.layerIds[0]+': Value for "text-size" is >= '+ic+'. Reduce your "text-size".'),t.addSymbols(t.text,y,g,s,o,a,u,e,l.lineStartIndex,l.lineLength,p,d);for(var v=0,x=h;v",targetMapId:i,sourceMapId:o.mapId})}}},Vc.prototype.receive=function(t){var e=t.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[n];var i=this.cancelCallbacks[n];delete this.cancelCallbacks[n],i&&i()}else b()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)},Vc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Vc.prototype.processTask=function(n,t){var i=this;if(""===t.type){var e=this.callbacks[n];delete this.callbacks[n],e&&(t.error?e(fr(t.error)):e(null,fr(t.data)))}else{var r=!1,o=C(this.globalScope)?void 0:[],a=t.hasCallback?function(t,e){r=!0,delete i.cancelCallbacks[n],i.target.postMessage({id:n,type:"",sourceMapId:i.mapId,error:t?pr(t):null,data:pr(e,o)},o)}:function(t){r=!0},s=null,l=fr(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+t.type));!r&&s&&s.cancel&&(this.cancelCallbacks[n]=s.cancel)}},Vc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)},Bc.prototype.setNorthEast=function(t){return this._ne=t instanceof Uc?new Uc(t.lng,t.lat):Uc.convert(t),this},Bc.prototype.setSouthWest=function(t){return this._sw=t instanceof Uc?new Uc(t.lng,t.lat):Uc.convert(t),this},Bc.prototype.extend=function(t){var e,n,i=this._sw,r=this._ne;if(t instanceof Uc)n=e=t;else{if(!(t instanceof Bc))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Bc.convert(t)):this.extend(Uc.convert(t)):this;if(n=t._ne,!(e=t._sw)||!n)return this}return i||r?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),r.lng=Math.max(n.lng,r.lng),r.lat=Math.max(n.lat,r.lat)):(this._sw=new Uc(e.lng,e.lat),this._ne=new Uc(n.lng,n.lat)),this},Bc.prototype.getCenter=function(){return new Uc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Bc.prototype.getSouthWest=function(){return this._sw},Bc.prototype.getNorthEast=function(){return this._ne},Bc.prototype.getNorthWest=function(){return new Uc(this.getWest(),this.getNorth())},Bc.prototype.getSouthEast=function(){return new Uc(this.getEast(),this.getSouth())},Bc.prototype.getWest=function(){return this._sw.lng},Bc.prototype.getSouth=function(){return this._sw.lat},Bc.prototype.getEast=function(){return this._ne.lng},Bc.prototype.getNorth=function(){return this._ne.lat},Bc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Bc.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Bc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Bc.prototype.contains=function(t){var e=Uc.convert(t),n=e.lng,i=e.lat,r=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(r=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&r},Bc.convert=function(t){return!t||t instanceof Bc?t:new Bc(t)};var Uc=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,90, lat: }, an object {lon: , lat: }, or an array of [, ]")};var Wc=2*Math.PI*6371008.8;function Zc(t){return Wc*Math.cos(t*Math.PI/180)}function Xc(t){return(180+t)/360}function Hc(t){return e=t,Ve.getProjection(k.CRS).yFromLat(e);var e}function Yc(t,e){return t/Zc(e)}function Kc(t){return e=t,Ve.getProjection(k.CRS).latFromY(e);var e}function Jc(t,e,n){void 0===n&&(n=0),this.x=+t,this.y=+e,this.z=+n}function Qc(t,e,n){this.z=t,this.x=e,this.y=n,this.key=ep(0,t,t,e,n)}function $c(t,e){this.wrap=t,this.canonical=e,this.key=ep(t,e.z,e.z,e.x,e.y)}function tp(t,e,n,i,r){this.overscaledZ=t,this.wrap=e,this.canonical=new Qc(n,+i,+r),this.key=ep(e,t,n,i,r)}function ep(t,e,n,i,r){(t*=2)<0&&(t=-1*t-1);var o=1<this.canonical.z?new tp(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new tp(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},tp.prototype.calculateScaledKey=function(t,e){var n=this.canonical.z-t;return t>this.canonical.z?ep(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):ep(this.wrap*+e,t,t,this.canonical.x>>n,this.canonical.y>>n)},tp.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},tp.prototype.children=function(t){if(this.overscaledZ>=t)return[new tp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new tp(e,this.wrap,e,n,i),new tp(e,this.wrap,e,1+n,i),new tp(e,this.wrap,e,n,1+i),new tp(e,this.wrap,e,1+n,1+i)]},tp.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},np.prototype._unpackMapbox=function(t,e,n){return(256*t*256+256*e+n)/10-1e4},np.prototype._unpackTerrarium=function(t,e,n){return 256*t+e+n/256-32768},np.prototype.getPixels=function(){return new hl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},np.prototype.backfillBorder=function(t,e,n){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,r=e*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(e){case-1:i=r-1;break;case 1:r=i+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-n*this.dim,u=o;u=s.x&&r>=s.y)return!0}var l=[new W(e,n),new W(e,r),new W(i,r),new W(i,n)];if(2i)r=!1;else if(e)if(this.expirationTimelt&&(t.getActor().send("enforceCacheSizeLimit",st),yt=0)},t.clamp=s,t.clearTileCache=function(t){var e=self.caches.delete(at);t&&e.catch(t).then(function(){return t()})},t.clipLine=Vh,t.clone=function(t){var e=new Ws(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=v,t.clone$2=function(t){var e=new Ws(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Nu,t.config=k,t.create=function(){var t=new Ws(16);return Ws!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new Ws(9);return Ws!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new Ws(4);return Ws!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=mi,t.createLayout=$r,t.createStyleLayer=function(t){return"custom"===t.type?new Ec(t):new Ic[t.type](t)},t.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=r*l-o*s,t[1]=o*a-i*l,t[2]=i*s-r*a,t},t.deepEqual=function t(e,n){if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var i=0;i=Ms||e.y<0||e.y>=Ms||function(t,e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m,g,v,x,_,w,b,P,S){var C,M,T,A,E,I=t.addToLineVertexArray(e,n),L=0,R=0,O=0,N=0,k=-1,z=-1,D={},F=qa(""),G=0,j=0;if(j=void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(G=(C=s.layout.get("text-offset").evaluate(_,{},P).map(function(t){return t*Gu}))[0],C[1]):(G=s.layout.get("text-radial-offset").evaluate(_,{},P)*Gu,tc),t.allowVerticalPlacement&&i.vertical){var V=s.layout.get("text-rotate").evaluate(_,{},P)+90;A=new Hh(l,e,u,h,c,i.vertical,p,f,d,V),a&&(E=new Hh(l,e,u,h,c,a,m,g,d,V))}if(r){var q=s.layout.get("icon-rotate").evaluate(_,{}),B="none"!==s.layout.get("icon-text-fit"),U=Bh(r,q,b,B),W=a?Bh(a,q,b,B):void 0;T=new Hh(l,e,u,h,c,r,m,g,!1,q),L=4*U.length;var Z=t.iconSizeData,X=null;"source"===Z.kind?(X=[Lh*s.layout.get("icon-size").evaluate(_,{})])[0]>rc&&ct(t.layerIds[0]+': Value for "icon-size" is >= '+ic+'. Reduce your "icon-size".'):"composite"===Z.kind&&((X=[Lh*w.compositeIconSizes[0].evaluate(_,{},P),Lh*w.compositeIconSizes[1].evaluate(_,{},P)])[0]>rc||X[1]>rc)&&ct(t.layerIds[0]+': Value for "icon-size" is >= '+ic+'. Reduce your "icon-size".'),t.addSymbols(t.icon,U,X,x,v,_,!1,e,I.lineStartIndex,I.lineLength,-1,P),k=t.icon.placedSymbolArray.length-1,W&&(R=4*W.length,t.addSymbols(t.icon,W,X,x,v,_,yh.vertical,e,I.lineStartIndex,I.lineLength,-1,P),z=t.icon.placedSymbolArray.length-1)}for(var H in i.horizontal){var Y=i.horizontal[H];if(!M){F=qa(Y.text);var K=s.layout.get("text-rotate").evaluate(_,{},P);M=new Hh(l,e,u,h,c,Y,p,f,d,K)}var J=1===Y.positionedLines.length;if(O+=oc(t,e,Y,o,s,d,_,y,I,i.vertical?yh.horizontal:yh.horizontalOnly,J?Object.keys(i.horizontal):[H],D,k,w,P),J)break}function Q(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e}i.vertical&&(N+=oc(t,e,i.vertical,o,s,d,_,y,I,yh.vertical,["vertical"],D,z,w,P));var $=M?M.boxStartIndex:t.collisionBoxArray.length,tt=M?M.boxEndIndex:t.collisionBoxArray.length,et=A?A.boxStartIndex:t.collisionBoxArray.length,nt=A?A.boxEndIndex:t.collisionBoxArray.length,it=T?T.boxStartIndex:t.collisionBoxArray.length,rt=T?T.boxEndIndex:t.collisionBoxArray.length,ot=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=-1<(st=Q(E,st=Q(T,st=Q(A,st=Q(M,st)))))?1:0;lt&&(st*=S/Gu),t.glyphOffsetArray.length>=yc.MAX_GLYPHS&&ct("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,_.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,0<=D.right?D.right:-1,0<=D.center?D.center:-1,0<=D.left?D.left:-1,D.vertical||-1,k,z,F,$,tt,et,nt,it,rt,ot,at,u,O,N,L,R,lt,0,p,G,j,st)}(n,e,t,r,o,a,p,n.layers[0],n.collisionBoxArray,i.index,i.sourceLayerIndex,n.index,I,N,D,u,R,k,F,T,i,s,h,c,l)}if(o&&"none"!==V&&(n.allowVerticalPlacement&&r.vertical&&(p=Th(o,r.vertical,V,M.get("icon-text-fit-padding"),T,E)),A&&(o=Th(o,A,V,M.get("icon-text-fit-padding"),T,E))),"line"===G)for(var B=0,U=Vh(i.geometry,0,0,Ms,Ms);B=C.maxzoom||"none"!==C.visibility&&(R(S,this.zoom,r),(p[C.id]=C.createBucket({index:s.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:g,sourceID:this.source})).populate(v,f,this.tileID.canonical),s.bucketLayerIDs.push(S.map(function(t){return t.id})))}}}var M=I.mapObject(f.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(M).length?n.send("getGlyphs",{uid:this.uid,stacks:M},function(t,e){l||(l=t,u=e,E.call(i))}):u={};var T=Object.keys(f.iconDependencies);T.length?n.send("getImages",{icons:T,source:this.source,tileID:this.tileID,type:"icons"},function(t,e){l||(l=t,h=e,E.call(i))}):h={};var A=Object.keys(f.patternDependencies);function E(){if(l)return o(l);if(u&&h&&c){var t=new L(u),e=new I.ImageAtlas(h,c);for(var n in p){var i=p[n];i instanceof I.SymbolBucket?(R(i.layers,this.zoom,r),I.performSymbolLayout(i,u,t.positions,h,e.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):i.hasPattern&&(i instanceof I.LineBucket||i instanceof I.FillBucket||i instanceof I.FillExtrusionBucket)&&(R(i.layers,this.zoom,r),i.addFeatures(f,this.tileID.canonical,e.patternPositions))}this.status="done",o(null,{buckets:I.values(p).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:e,glyphMap:this.returnDependencies?u:null,iconMap:this.returnDependencies?h:null,glyphPositions:this.returnDependencies?t.positions:null})}}A.length?n.send("getImages",{icons:A,source:this.source,tileID:this.tileID,type:"patterns"},function(t,e){l||(l=t,c=e,E.call(i))}):c={},E.call(this)},i.prototype.loadTile=function(t,a){var s=this,l=t.uid;this.loading||(this.loading={});var u=!!(t&&t.request&&t.request.collectResourceTiming)&&new I.RequestPerformance(t.request),h=this.loading[l]=new e(t);h.abort=this.loadVectorData(t,function(t,e){if(delete s.loading[l],t||!e)return h.status="done",s.loaded[l]=h,a(t);var n=e.rawData,i={};e.expires&&(i.expires=e.expires),e.cacheControl&&(i.cacheControl=e.cacheControl);var r={};if(u){var o=u.finish();o&&(r.resourceTiming=JSON.parse(JSON.stringify(o)))}h.vectorTile=e.vectorTile,h.parse(e.vectorTile,s.layerIndex,s.availableImages,s.actor,function(t,e){if(t||!e)return a(t);a(null,I.extend({rawTileData:n.slice(0)},e,i,r))}),s.loaded=s.loaded||{},s.loaded[l]=h})},i.prototype.reloadTile=function(t,i){var r=this,e=this.loaded,n=t.uid,o=this;if(e&&e[n]){var a=e[n];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,e){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,r.availableImages,o.actor,n)),i(t,e)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},i.prototype.abortTile=function(t,e){var n=this.loading,i=t.uid;n&&n[i]&&n[i].abort&&(n[i].abort(),delete n[i]),e()},i.prototype.removeTile=function(t,e){var n=this.loaded,i=t.uid;n&&n[i]&&delete n[i],e()};var s=I.window.ImageBitmap;function u(t,e){if(0!==t.length){a(t[0],e);for(var n=1;n>31}function C(t,e){for(var n=t.loadGeometry(),i=t.type,r=0,o=0,a=n.length,s=0;s>1;!function t(e,n,i,r,o,a){for(;rp&&T(e,n,r,o);fp;)d--}n[2*r+a]===p?T(e,n,r,d):T(e,n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}(e,n,s,r,o,a%2),t(e,n,i,r,s-1,a+1),t(e,n,i,1+s,o,a+1)}}(a,s,i,0,a.length-1,0)}function z(t){F=t.crs,this.options=B(Object.create(D),t),this.trees=new Array(this.options.maxZoom+1)}m.fromVectorTileJs=x,m.fromGeojsonVt=function(t,e){e=e||{};var n={};for(var i in t)n[i]=new f(t[i].features,e),n[i].name=i,n[i].version=e.version,n[i].extent=e.extent;return x({layers:n})},m.GeoJSONWrapper=g,k.prototype.range=function(t,e,n,i){return function(t,e,n,i,r,o,a){for(var s,l,u=[0,t.length-1,0],h=[];u.length;){var c=u.pop(),p=u.pop(),f=u.pop();if(p-f<=a)for(var d=f;d<=p;d++)l=e[2*d+1],(s=e[2*d])>=n&&s<=r&&i<=l&&l<=o&&h.push(t[d]);else{var y=Math.floor((f+p)/2);l=e[2*y+1],(s=e[2*y])>=n&&s<=r&&i<=l&&l<=o&&h.push(t[y]);var m=(c+1)%2;(0===c?n<=s:i<=l)&&(u.push(f),u.push(y-1),u.push(m)),(0===c?s<=r:l<=o)&&(u.push(y+1),u.push(p),u.push(m))}}return h}(this.ids,this.coords,t,e,n,i,this.nodeSize)};var D={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:(k.prototype.within=function(t,e,n){return function(t,e,n,i,r,o){for(var a=[0,t.length-1,0],s=[],l=r*r;a.length;){var u=a.pop(),h=a.pop(),c=a.pop();if(h-c<=o)for(var p=c;p<=h;p++)E(e[2*p],e[2*p+1],n,i)<=l&&s.push(t[p]);else{var f=Math.floor((c+h)/2),d=e[2*f],y=e[2*f+1];E(d,y,n,i)<=l&&s.push(t[f]);var m=(u+1)%2;(0===u?n-r<=d:i-r<=y)&&(a.push(c),a.push(f-1),a.push(m)),(0===u?d<=n+r:y<=i+r)&&(a.push(f+1),a.push(h),a.push(m))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)},!1),generateId:!1,reduce:null,map:function(t){return t}},F="";function G(t){return{type:"Feature",id:t.id,properties:j(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,I.hs.getProjection(F).yFromLat(e))]}};var e,n}function j(t){var e=t.numPoints,n=1e4<=e?Math.round(e/1e3)+"k":1e3<=e?Math.round(e/100)/10+"k":e;return B(B({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function V(t){return t/360+.5}function q(t){return I.hs.getProjection(F).projectY(t)}function B(t,e){for(var n in e)t[n]=e[n];return t}function U(t){return t.x}function W(t){return t.y}function Z(t,e,n,i,r,o){var a=r-n,s=o-i;if(0!==a||0!==s){var l=((t-n)*a+(e-i)*s)/(a*a+s*s);1>5},z.prototype._getOriginZoom=function(t){return(t-this.points.length)%32};var Y="";function K(t,e,n,i){if(e.geometry){var r=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<>1,l=i-n,u=e[n],h=e[n+1],c=e[i],p=e[i+1],f=n+3;f=(n/=e)&&a=n&&v<=i&&st(u,f,d,y),w=u.length-3,o&&3<=w&&(u[w]!==u[0]||u[w+1]!==u[1])&&st(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,n,i,r,o){for(var a=0;aa.maxX&&(a.maxX=h),c>a.maxY&&(a.maxY=c)}return a}function yt(t,e,n,i){var r=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;sa)&&(n.numSimplified++,s.push(e[l]),s.push(e[l+1])),n.numPoints++;r&&function(t,e){for(var n=0,i=0,r=t.length,o=r-2;i 65535 not supported"));else if(o.ranges[a])n(null,{stack:i,id:r,glyph:e});else{var s=o.requests[a];s||(s=o.requests[a]=[],v.loadGlyphRange(i,a,l.url,l.requestManager,function(t,e){if(e){for(var n in e)l._doesCharSupportLocalGlyph(+n)||(o.glyphs[+n]=e[+n]);o.ranges[a]=!0}for(var i=0,r=s;ithis.height)return vt.warnOnce("LineAtlas out of space"),null;for(var r=0,o=0;o=n&&t.x=i&&t.ye.end(0)?this.fire(new vt.ErrorEvent(new vt.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+e.start(0)+" and "+e.end(0)+"-second mark."))):this.video.currentTime=t}},Z.prototype.getVideo=function(){return this.video},Z.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},Z.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,e=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=vt.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE),e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,this.video)):(this.texture=new vt.Texture(t,this.video,e.RGBA),this.texture.bind(e.LINEAR,e.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},Z.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},Z.prototype.hasTransition=function(){return this.video&&!this.video.paused},Z),B=(W.__proto__=E=V,((W.prototype=Object.create(E&&E.prototype)).constructor=W).prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof vt.window.HTMLCanvasElement?this.options.canvas:vt.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new vt.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},W.prototype.getCanvas=function(){return this.canvas},W.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},W.prototype.onRemove=function(){this.pause()},W.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var e=this.map.painter.context,n=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=vt.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new vt.Texture(e,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var r=this.tiles[i];"loaded"!==r.state&&(r.state="loaded",r.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this._playing},W.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];tthis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},tt.prototype.has=function(t){return t.wrapped().key in this.data},tt.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},tt.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},tt.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},tt.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},tt.prototype.remove=function(t,e){if(!this.has(t))return this;var n=t.wrapped().key,i=void 0===e?0:this.data[n].indexOf(e),r=this.data[n][i];return this.data[n].splice(i,1),r.timeout&&clearTimeout(r.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(r.value),this.order.splice(this.order.indexOf(n),1),this},tt.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},tt.prototype.filter=function(t){var e=[];for(var n in this.data)for(var i=0,r=this.data[n];in)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){i[a.key]=a;break}}}},un.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var n=this._loadedParentTiles[t.key];return n&&n.tileID.overscaledZ>=e?n:null}for(var i=t.overscaledZ-1;e<=i;i--){var r=t.scaledTo(i),o=this._getLoadedTile(r);if(o)return o}},un.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},un.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,n=Math.ceil(t.height/this._source.tileSize)+1,i=Math.floor(e*n*5),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(r)},un.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var n={};for(var i in this._tiles){var r=this._tiles[i];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+e),n[r.tileID.key]=r}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},un.prototype.update=function(t){var e=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var n;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(t){return new vt.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)}):(n=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter(function(t){return e._source.hasTile(t)}))):n=[];var i=t.coveringZoomLevel(this._source),r=Math.max(i-un.maxOverzooming,this._source.minzoom),o=Math.max(i+un.maxUnderzooming,this._source.minzoom),a=this._updateRetainedTiles(n,i);if(cn(this._source.type)){for(var s={},l={},u=0,h=Object.keys(a);uthis._source.maxzoom){var y=f.children(this._source.maxzoom)[0],m=this.getTile(y);if(m&&m.hasData()){n[y.key]=y;continue}}else{var g=f.children(this._source.maxzoom);if(n[g[0].key]&&n[g[1].key]&&n[g[2].key]&&n[g[3].key])continue}for(var v=d.wasRequested(),x=f.overscaledZ-1;r<=x;--x){var _=f.scaledTo(x);if(i[_.key])break;if(i[_.key]=!0,!(d=this.getTile(_))&&v&&(d=this._addTile(_)),d&&(n[_.key]=_,v=d.wasRequested(),d.hasData()))break}}}return n},un.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],n=void 0,i=this._tiles[t].tileID;0=vt.browser.now())return!0}return!1},un.prototype.setFeatureState=function(t,e,n){this._state.updateState(t=t||"_geojsonTileLayer",e,n)},un.prototype.removeFeatureState=function(t,e,n){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,n)},un.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},un.prototype.setDependencies=function(t,e,n){var i=this._tiles[t];i&&i.setDependencies(e,n)},un.prototype.reloadTilesForDependencies=function(e,n){for(var t in this._tiles)this._tiles[t].hasDependency(e,n)&&this._reloadTile(t,"reloading");this._cache.filter(function(t){return!t.hasDependency(e,n)})},un);function un(t,e,n){var i=this;sn.call(this),this.id=t,this.dispatcher=n,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(i._sourceLoaded=!0),i._sourceLoaded&&!i._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(i.reload(),i.transform&&i.update(i.transform))}),this.on("error",function(){i._sourceErrored=!0}),this._source=function(t,e,n,i){var r=new U[e.type](t,e,n,i);if(r.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+r.id);return vt.bindAll(["load","abort","unload","serialize","prepare"],r),r}(t,e,n,this),this._tiles={},this._cache=new tt(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new vt.SourceFeatureState}function hn(t,e){var n=Math.abs(2*t.wrap)-+(t.wrap<0),i=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||i-n||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function cn(t){return"raster"===t||"image"===t||"video"===t}function pn(){return new vt.window.Worker(Oa.workerUrl)}ln.maxOverzooming=10,ln.maxUnderzooming=3;var fn="mapboxgl_preloaded_worker_pool",dn=function(){this.active={}};dn.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length=-u[0]&&h<=u[0]&&c>=-u[1]&&c<=u[1]){var P=Rn(n.transform.cameraToCenterDistance,b[3]),S=vt.evaluateSizeForFeature(p,f,w),C=a?S/P:S*P,M=new vt.Point(w.anchorX,w.anchorY),T=Ln(M,r).point,A={},E=zn(w,C,!1,s,e,r,o,t.glyphOffsetArray,m,y,T,M,A,v);x=E.useVertical,(E.notEnoughRoom||x||E.needsFlipping&&zn(w,C,!0,s,e,r,o,t.glyphOffsetArray,m,y,T,M,A,v).notEnoughRoom)&&jn(w.numGlyphs,y)}else jn(w.numGlyphs,y)}}i?t.text.dynamicLayoutVertexBuffer.updateData(y):t.icon.dynamicLayoutVertexBuffer.updateData(y)}function Nn(t,e,n,i,r,o,a,s,l,u,h){var c=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(c-1),m=Fn(t*d,n,i,r,o,a,s.segment,p,f,l,u,h);if(!m)return null;var g=Fn(t*y,n,i,r,o,a,s.segment,p,f,l,u,h);return g?{first:m,last:g}:null}function kn(t,e,n,i){return t===vt.WritingMode.horizontal&&Math.abs(n.y-e.y)>Math.abs(n.x-e.x)*i?{useVertical:!0}:(t===vt.WritingMode.vertical?e.yn.x)?{needsFlipping:!0}:null}function zn(t,e,n,i,r,o,a,s,l,u,h,c,p,f){var d,y=e/24,m=t.lineOffsetX*y,g=t.lineOffsetY*y;if(1this.width||i<0||e>this.height)return!r&&[];var a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=i){if(r)return!0;for(var s=0;sthis.width||l<0||s>this.height)return!i&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:i,circle:{x:t,y:e,radius:n},seenUids:{box:{},circle:{}}},r),i?0=h[0+d]&&i>=h[1+d]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:h[d],y1:h[1+d],x2:h[2+d],y2:h[3+d]})}}}var y=this.circleCells[r];if(null!==y)for(var m=this.circles,g=0,v=y;g=S.x&&z.x<=C.x&&k.y>=S.y&&z.y<=C.y?[E]:z.xC.x||z.yC.y?[]:vt.clipLine([E],S.x,S.y,C.x,C.y)}for(var F=0,G=N;F=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},qn.prototype.isInsideGrid=function(t,e,n,i){return 0<=n&&t=g.length,c,k,n,a);if(h&&(s=h.placedGlyphBoxes)&&s.box&&s.box.length){p=!0,f=h.shift;break}}return s};m(function(){return x(d,r.iconBox,vt.WritingMode.horizontal)},function(){var t=r.verticalTextBox;return k.allowVerticalPlacement&&!(o&&o.box&&o.box.length)&&0t},Qn.prototype.setStale=function(){this.stale=!0};var ti=Math.pow(2,25),ei=Math.pow(2,24),ni=Math.pow(2,17),ii=Math.pow(2,16),ri=Math.pow(2,9),oi=Math.pow(2,8),ai=Math.pow(2,1);function si(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,n=Math.floor(127*t.opacity);return n*ti+e*ei+n*ni+e*ii+n*ri+e*oi+n*ai+e}function li(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}var ui=0;function hi(t,e,n,i,r,o,a){this.placement=new Qn(t,r,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=n,this._showCollisionBoxes=i,this._done=!1}function ci(t,e,n){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var i=0;is)){if(this._inProgressLayer||(this._inProgressLayer=new li(a)),this._inProgressLayer.continuePlacement(n[a.source],this.placement,this._showCollisionBoxes,a,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},hi.prototype.commit=function(t){return this.placement.commit(t),this.placement};var pi=512/vt.EXTENT/2;function fi(){this.maxCrossTileID=0}function di(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}function yi(){this.layerIndexes={},this.crossTileIDs=new fi,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}function mi(t,e){return vt.emitValidationErrors(t,e&&e.filter(function(t){return"source.canvas"!==t.identifier}))}ci.prototype.getScaledCoordinates=function(t,e){var n=pi/Math.pow(2,e.canonical.z-this.tileID.canonical.z);return{x:Math.floor((e.canonical.x*vt.EXTENT+t.anchorX)*n),y:Math.floor((e.canonical.y*vt.EXTENT+t.anchorY)*n)}},ci.prototype.findMatches=function(t,e,n){for(var i=this.tileID.canonical.zt.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,r)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,r)}}for(var h=0;h 0.5) {\r\ngl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;\r\n}\r\nif (v_notUsed > 0.5) {gl_FragColor*=.1;\r\n}\r\n}","attribute vec2 a_pos;\r\nattribute vec2 a_anchor_pos;\r\nattribute vec2 a_extrude;\r\nattribute vec2 a_placed;\r\nattribute vec2 a_shift;\r\nuniform mat4 u_matrix;\r\nuniform vec2 u_extrude_scale;\r\nuniform float u_camera_to_center_distance;\r\nvarying float v_placed;\r\nvarying float v_notUsed;\r\nvoid main() {\r\nvec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);\r\nhighp float camera_to_anchor_distance=projectedPoint.w;\r\nhighp float collision_perspective_ratio=clamp(\r\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);\r\ngl_Position=u_matrix*vec4(a_pos,0.0,1.0);\r\ngl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;\r\nv_placed=a_placed.x;\r\nv_notUsed=a_placed.y;\r\n}"),Ri=Ki("varying float v_radius;\r\nvarying vec2 v_extrude;\r\nvarying float v_perspective_ratio;\r\nvarying float v_collision;\r\nvoid main() {\r\nfloat alpha=0.5*min(v_perspective_ratio,1.0);\r\nfloat stroke_radius=0.9*max(v_perspective_ratio,1.0);\r\nfloat distance_to_center=length(v_extrude);\r\nfloat distance_to_edge=abs(distance_to_center-v_radius);\r\nfloat opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);\r\nvec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);\r\ngl_FragColor=color*alpha*opacity_t;\r\n}","attribute vec2 a_pos;\r\nattribute float a_radius;\r\nattribute vec2 a_flags;\r\nuniform mat4 u_matrix;\r\nuniform mat4 u_inv_matrix;\r\nuniform vec2 u_viewport_size;\r\nuniform float u_camera_to_center_distance;\r\nvarying float v_radius;\r\nvarying vec2 v_extrude;\r\nvarying float v_perspective_ratio;\r\nvarying float v_collision;\r\nvec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);\r\nvec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);\r\nrayStart.xyz/=rayStart.w;\r\nrayEnd.xyz /=rayEnd.w;\r\nhighp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);\r\nreturn mix(rayStart.xyz,rayEnd.xyz,t);\r\n}\r\nvoid main() {\r\nvec2 quadCenterPos=a_pos;\r\nfloat radius=a_radius;\r\nfloat collision=a_flags.x;\r\nfloat vertexIdx=a_flags.y;\r\nvec2 quadVertexOffset=vec2(\r\nmix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));\r\nvec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);\r\nvec4 clipPos=u_matrix*vec4(tilePos,1.0);\r\nhighp float camera_to_anchor_distance=clipPos.w;\r\nhighp float collision_perspective_ratio=clamp(\r\n0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;\r\nv_radius=radius;\r\nv_extrude=quadVertexExtent*padding_factor;\r\nv_perspective_ratio=collision_perspective_ratio;\r\nv_collision=collision;\r\ngl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);\r\n}"),Oi=Ki("uniform highp vec4 u_color;\r\nuniform sampler2D u_overlay;\r\nvarying vec2 v_uv;\r\nvoid main() {\r\nvec4 overlay_color=texture2D(u_overlay,v_uv);\r\ngl_FragColor=mix(u_color,overlay_color,overlay_color.a);\r\n}","attribute vec2 a_pos;\r\nvarying vec2 v_uv;\r\nuniform mat4 u_matrix;\r\nuniform float u_overlay_scale;\r\nvoid main() {v_uv=a_pos/8192.0;\r\ngl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);\r\n}"),Ni=Ki("#pragma mapbox: define highp vec4 color\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 color\r\n#pragma mapbox: initialize lowp float opacity\r\ngl_FragColor=color*opacity;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","attribute vec2 a_pos;\r\nuniform mat4 u_matrix;\r\n#pragma mapbox: define highp vec4 color\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 color\r\n#pragma mapbox: initialize lowp float opacity\r\ngl_Position=u_matrix*vec4(a_pos,0,1);\r\n}"),ki=Ki("varying vec2 v_pos;\r\n#pragma mapbox: define highp vec4 outline_color\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 outline_color\r\n#pragma mapbox: initialize lowp float opacity\r\nfloat dist=length(v_pos-gl_FragCoord.xy);\r\nfloat alpha=1.0-smoothstep(0.0,1.0,dist);\r\ngl_FragColor=outline_color*(alpha*opacity);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","attribute vec2 a_pos;\r\nuniform mat4 u_matrix;\r\nuniform vec2 u_world;\r\nvarying vec2 v_pos;\r\n#pragma mapbox: define highp vec4 outline_color\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 outline_color\r\n#pragma mapbox: initialize lowp float opacity\r\ngl_Position=u_matrix*vec4(a_pos,0,1);\r\nv_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\r\n}"),zi=Ki("uniform vec2 u_texsize;\r\nuniform sampler2D u_image;\r\nuniform float u_fade;\r\nvarying vec2 v_pos_a;\r\nvarying vec2 v_pos_b;\r\nvarying vec2 v_pos;\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nvec2 imagecoord=mod(v_pos_a,1.0);\r\nvec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);\r\nvec4 color1=texture2D(u_image,pos);\r\nvec2 imagecoord_b=mod(v_pos_b,1.0);\r\nvec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);\r\nvec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);\r\nfloat alpha=1.0-smoothstep(0.0,1.0,dist);\r\ngl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nuniform vec2 u_world;\r\nuniform vec2 u_pixel_coord_upper;\r\nuniform vec2 u_pixel_coord_lower;\r\nuniform vec3 u_scale;\r\nattribute vec2 a_pos;\r\nvarying vec2 v_pos_a;\r\nvarying vec2 v_pos_b;\r\nvarying vec2 v_pos;\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\n#pragma mapbox: define lowp float pixel_ratio_from\r\n#pragma mapbox: define lowp float pixel_ratio_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\n#pragma mapbox: initialize lowp float pixel_ratio_from\r\n#pragma mapbox: initialize lowp float pixel_ratio_to\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nfloat tileRatio=u_scale.x;\r\nfloat fromScale=u_scale.y;\r\nfloat toScale=u_scale.z;\r\ngl_Position=u_matrix*vec4(a_pos,0,1);\r\nvec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;\r\nvec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\r\nv_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);\r\nv_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);\r\nv_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;\r\n}"),Di=Ki("uniform vec2 u_texsize;\r\nuniform float u_fade;\r\nuniform sampler2D u_image;\r\nvarying vec2 v_pos_a;\r\nvarying vec2 v_pos_b;\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nvec2 imagecoord=mod(v_pos_a,1.0);\r\nvec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);\r\nvec4 color1=texture2D(u_image,pos);\r\nvec2 imagecoord_b=mod(v_pos_b,1.0);\r\nvec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);\r\nvec4 color2=texture2D(u_image,pos2);\r\ngl_FragColor=mix(color1,color2,u_fade)*opacity;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nuniform vec2 u_pixel_coord_upper;\r\nuniform vec2 u_pixel_coord_lower;\r\nuniform vec3 u_scale;\r\nattribute vec2 a_pos;\r\nvarying vec2 v_pos_a;\r\nvarying vec2 v_pos_b;\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\n#pragma mapbox: define lowp float pixel_ratio_from\r\n#pragma mapbox: define lowp float pixel_ratio_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\n#pragma mapbox: initialize lowp float pixel_ratio_from\r\n#pragma mapbox: initialize lowp float pixel_ratio_to\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nfloat tileZoomRatio=u_scale.x;\r\nfloat fromScale=u_scale.y;\r\nfloat toScale=u_scale.z;\r\nvec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;\r\nvec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\r\ngl_Position=u_matrix*vec4(a_pos,0,1);\r\nv_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);\r\nv_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);\r\n}"),Fi=Ki("varying vec4 v_color;\r\nvoid main() {\r\ngl_FragColor=v_color;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nuniform vec3 u_lightcolor;\r\nuniform lowp vec3 u_lightpos;\r\nuniform lowp float u_lightintensity;\r\nuniform float u_vertical_gradient;\r\nuniform lowp float u_opacity;\r\nattribute vec2 a_pos;\r\nattribute vec4 a_normal_ed;\r\nvarying vec4 v_color;\r\n#pragma mapbox: define highp float base\r\n#pragma mapbox: define highp float height\r\n#pragma mapbox: define highp vec4 color\r\nvoid main() {\r\n#pragma mapbox: initialize highp float base\r\n#pragma mapbox: initialize highp float height\r\n#pragma mapbox: initialize highp vec4 color\r\nvec3 normal=a_normal_ed.xyz;\r\nbase=max(0.0,base);\r\nheight=max(0.0,height);\r\nfloat t=mod(normal.x,2.0);\r\ngl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;\r\nv_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);\r\ncolor+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=(\r\n(1.0-u_vertical_gradient)+\n(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));\r\n}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);\r\nv_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);\r\nv_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);\r\nv_color*=u_opacity;\r\n}"),Gi=Ki("uniform vec2 u_texsize;\r\nuniform float u_fade;\r\nuniform sampler2D u_image;\r\nvarying vec2 v_pos_a;\r\nvarying vec2 v_pos_b;\r\nvarying vec4 v_lighting;\r\n#pragma mapbox: define lowp float base\r\n#pragma mapbox: define lowp float height\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\n#pragma mapbox: define lowp float pixel_ratio_from\r\n#pragma mapbox: define lowp float pixel_ratio_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float base\r\n#pragma mapbox: initialize lowp float height\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\n#pragma mapbox: initialize lowp float pixel_ratio_from\r\n#pragma mapbox: initialize lowp float pixel_ratio_to\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nvec2 imagecoord=mod(v_pos_a,1.0);\r\nvec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);\r\nvec4 color1=texture2D(u_image,pos);\r\nvec2 imagecoord_b=mod(v_pos_b,1.0);\r\nvec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);\r\nvec4 color2=texture2D(u_image,pos2);\r\nvec4 mixedColor=mix(color1,color2,u_fade);\r\ngl_FragColor=mixedColor*v_lighting;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nuniform vec2 u_pixel_coord_upper;\r\nuniform vec2 u_pixel_coord_lower;\r\nuniform float u_height_factor;\r\nuniform vec3 u_scale;\r\nuniform float u_vertical_gradient;\r\nuniform lowp float u_opacity;\r\nuniform vec3 u_lightcolor;\r\nuniform lowp vec3 u_lightpos;\r\nuniform lowp float u_lightintensity;\r\nattribute vec2 a_pos;\r\nattribute vec4 a_normal_ed;\r\nvarying vec2 v_pos_a;\r\nvarying vec2 v_pos_b;\r\nvarying vec4 v_lighting;\r\n#pragma mapbox: define lowp float base\r\n#pragma mapbox: define lowp float height\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\n#pragma mapbox: define lowp float pixel_ratio_from\r\n#pragma mapbox: define lowp float pixel_ratio_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float base\r\n#pragma mapbox: initialize lowp float height\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\n#pragma mapbox: initialize lowp float pixel_ratio_from\r\n#pragma mapbox: initialize lowp float pixel_ratio_to\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nfloat tileRatio=u_scale.x;\r\nfloat fromScale=u_scale.y;\r\nfloat toScale=u_scale.z;\r\nvec3 normal=a_normal_ed.xyz;\r\nfloat edgedistance=a_normal_ed.w;\r\nvec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;\r\nvec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\r\nbase=max(0.0,base);\r\nheight=max(0.0,height);\r\nfloat t=mod(normal.x,2.0);\r\nfloat z=t > 0.0 ? height : base;\r\ngl_Position=u_matrix*vec4(a_pos,z,1);\r\nvec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\r\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);\r\nv_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);\r\nv_lighting=vec4(0.0,0.0,0.0,1.0);\r\nfloat directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);\r\ndirectional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);\r\nif (normal.y !=0.0) {directional*=(\r\n(1.0-u_vertical_gradient)+\n(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));\r\n}\r\nv_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));\r\nv_lighting*=u_opacity;\r\n}"),ji=Ki("#ifdef GL_ES\r\nprecision highp float;\r\n#endif\r\nuniform sampler2D u_image;\r\nvarying vec2 v_pos;\r\nuniform vec2 u_dimension;\r\nuniform float u_zoom;\r\nuniform float u_maxzoom;\r\nuniform vec4 u_unpack;\r\nfloat getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;\r\ndata.a=-1.0;\r\nreturn dot(data,u_unpack)/4.0;\r\n}\r\nvoid main() {\r\nvec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);\r\nfloat b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);\r\nfloat c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);\r\nfloat d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);\r\nfloat e=getElevation(v_pos,0.0);\r\nfloat f=getElevation(v_pos+vec2(epsilon.x,0),0.0);\r\nfloat g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);\r\nfloat h=getElevation(v_pos+vec2(0,epsilon.y),0.0);\r\nfloat i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\r\nvec2 deriv=vec2(\r\n(c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c)\r\n)/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);\r\ngl_FragColor=clamp(vec4(\r\nderiv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nuniform vec2 u_dimension;\r\nattribute vec2 a_pos;\r\nattribute vec2 a_texture_pos;\r\nvarying vec2 v_pos;\r\nvoid main() {\r\ngl_Position=u_matrix*vec4(a_pos,0,1);\r\nhighp vec2 epsilon=1.0/u_dimension;\r\nfloat scale=(u_dimension.x-2.0)/u_dimension.x;\r\nv_pos=(a_texture_pos/8192.0)*scale+epsilon;\r\n}"),Vi=Ki("uniform sampler2D u_image;\r\nvarying vec2 v_pos;\r\nuniform vec2 u_latrange;\r\nuniform vec2 u_light;\r\nuniform vec4 u_shadow;\r\nuniform vec4 u_highlight;\r\nuniform vec4 u_accent;\r\n#define PI 3.141592653589793\r\nvoid main() {\r\nvec4 pixel=texture2D(u_image,v_pos);\r\nvec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);\r\nfloat aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);\r\nfloat intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;\r\nfloat maxValue=0.5*PI;\r\nfloat scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);\r\nfloat shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);\r\nvec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);\r\ngl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nattribute vec2 a_pos;\r\nattribute vec2 a_texture_pos;\r\nvarying vec2 v_pos;\r\nvoid main() {\r\ngl_Position=u_matrix*vec4(a_pos,0,1);\r\nv_pos=a_texture_pos/8192.0;\r\n}"),qi=Ki("uniform lowp float u_device_pixel_ratio;\r\nvarying vec2 v_width2;\r\nvarying vec2 v_normal;\r\nvarying float v_gamma_scale;\r\n#pragma mapbox: define highp vec4 color\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 color\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;\r\nfloat alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\r\ngl_FragColor=color*(alpha*opacity);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","\n#define scale 0.015873016\r\nattribute vec2 a_pos_normal;\r\nattribute vec4 a_data;\r\nuniform mat4 u_matrix;\r\nuniform mediump float u_ratio;\r\nuniform vec2 u_units_to_pixels;\r\nuniform lowp float u_device_pixel_ratio;\r\nvarying vec2 v_normal;\r\nvarying vec2 v_width2;\r\nvarying float v_gamma_scale;\r\nvarying highp float v_linesofar;\r\n#pragma mapbox: define highp vec4 color\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define mediump float gapwidth\r\n#pragma mapbox: define lowp float offset\r\n#pragma mapbox: define mediump float width\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 color\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump float gapwidth\r\n#pragma mapbox: initialize lowp float offset\r\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;\r\nvec2 a_extrude=a_data.xy-128.0;\r\nfloat a_direction=mod(a_data.z,4.0)-1.0;\r\nv_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;\r\nvec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;\r\nnormal.y=normal.y*2.0-1.0;\r\nv_normal=normal;gapwidth=gapwidth/2.0;\r\nfloat halfwidth=width/2.0;\r\noffset=-1.0*offset;\r\nfloat inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);\r\nfloat outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;\r\nmediump float t=1.0-abs(u);\r\nmediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);\r\nvec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);\r\ngl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);\r\nfloat extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);\r\nv_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\r\nv_width2=vec2(outset,inset);\r\n}"),Bi=Ki("uniform lowp float u_device_pixel_ratio;\r\nuniform sampler2D u_image;\r\nvarying vec2 v_width2;\r\nvarying vec2 v_normal;\r\nvarying float v_gamma_scale;\r\nvarying highp float v_lineprogress;\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;\r\nfloat alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));\r\ngl_FragColor=color*(alpha*opacity);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\r\nattribute vec2 a_pos_normal;\r\nattribute vec4 a_data;\r\nuniform mat4 u_matrix;\r\nuniform mediump float u_ratio;\r\nuniform lowp float u_device_pixel_ratio;\r\nuniform vec2 u_units_to_pixels;\r\nvarying vec2 v_normal;\r\nvarying vec2 v_width2;\r\nvarying float v_gamma_scale;\r\nvarying highp float v_lineprogress;\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define mediump float gapwidth\r\n#pragma mapbox: define lowp float offset\r\n#pragma mapbox: define mediump float width\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump float gapwidth\r\n#pragma mapbox: initialize lowp float offset\r\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;\r\nvec2 a_extrude=a_data.xy-128.0;\r\nfloat a_direction=mod(a_data.z,4.0)-1.0;\r\nv_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;\r\nvec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;\r\nnormal.y=normal.y*2.0-1.0;\r\nv_normal=normal;gapwidth=gapwidth/2.0;\r\nfloat halfwidth=width/2.0;\r\noffset=-1.0*offset;\r\nfloat inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);\r\nfloat outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;\r\nmediump float t=1.0-abs(u);\r\nmediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);\r\nvec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);\r\ngl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);\r\nfloat extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);\r\nv_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\r\nv_width2=vec2(outset,inset);\r\n}"),Ui=Ki("uniform lowp float u_device_pixel_ratio;\r\nuniform vec2 u_texsize;\r\nuniform float u_fade;\r\nuniform mediump vec3 u_scale;\r\nuniform sampler2D u_image;\r\nvarying vec2 v_normal;\r\nvarying vec2 v_width2;\r\nvarying float v_linesofar;\r\nvarying float v_gamma_scale;\r\nvarying float v_width;\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\n#pragma mapbox: define lowp float pixel_ratio_from\r\n#pragma mapbox: define lowp float pixel_ratio_to\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\n#pragma mapbox: initialize lowp float pixel_ratio_from\r\n#pragma mapbox: initialize lowp float pixel_ratio_to\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\r\nvec2 pattern_tl_a=pattern_from.xy;\r\nvec2 pattern_br_a=pattern_from.zw;\r\nvec2 pattern_tl_b=pattern_to.xy;\r\nvec2 pattern_br_b=pattern_to.zw;\r\nfloat tileZoomRatio=u_scale.x;\r\nfloat fromScale=u_scale.y;\r\nfloat toScale=u_scale.z;\r\nvec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;\r\nvec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\r\nvec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);\r\nvec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);\r\nfloat aspect_a=display_size_a.y/v_width;\r\nfloat aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;\r\nfloat alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\r\nfloat x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);\r\nfloat x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);\r\nfloat y=0.5*v_normal.y+0.5;\r\nvec2 texel_size=1.0/u_texsize;\r\nvec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));\r\nvec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));\r\nvec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);\r\ngl_FragColor=color*alpha*opacity;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\r\nattribute vec2 a_pos_normal;\r\nattribute vec4 a_data;\r\nuniform mat4 u_matrix;\r\nuniform vec2 u_units_to_pixels;\r\nuniform mediump float u_ratio;\r\nuniform lowp float u_device_pixel_ratio;\r\nvarying vec2 v_normal;\r\nvarying vec2 v_width2;\r\nvarying float v_linesofar;\r\nvarying float v_gamma_scale;\r\nvarying float v_width;\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp float offset\r\n#pragma mapbox: define mediump float gapwidth\r\n#pragma mapbox: define mediump float width\r\n#pragma mapbox: define lowp float floorwidth\r\n#pragma mapbox: define lowp vec4 pattern_from\r\n#pragma mapbox: define lowp vec4 pattern_to\r\n#pragma mapbox: define lowp float pixel_ratio_from\r\n#pragma mapbox: define lowp float pixel_ratio_to\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize lowp float offset\r\n#pragma mapbox: initialize mediump float gapwidth\r\n#pragma mapbox: initialize mediump float width\r\n#pragma mapbox: initialize lowp float floorwidth\r\n#pragma mapbox: initialize mediump vec4 pattern_from\r\n#pragma mapbox: initialize mediump vec4 pattern_to\r\n#pragma mapbox: initialize lowp float pixel_ratio_from\r\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;\r\nvec2 a_extrude=a_data.xy-128.0;\r\nfloat a_direction=mod(a_data.z,4.0)-1.0;\r\nfloat a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;\r\nnormal.y=normal.y*2.0-1.0;\r\nv_normal=normal;gapwidth=gapwidth/2.0;\r\nfloat halfwidth=width/2.0;\r\noffset=-1.0*offset;\r\nfloat inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);\r\nfloat outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;\r\nmediump float t=1.0-abs(u);\r\nmediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);\r\nvec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);\r\ngl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);\r\nfloat extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);\r\nv_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\r\nv_linesofar=a_linesofar;\r\nv_width2=vec2(outset,inset);\r\nv_width=floorwidth;\r\n}"),Wi=Ki("uniform lowp float u_device_pixel_ratio;\r\nuniform sampler2D u_image;\r\nuniform float u_sdfgamma;\r\nuniform float u_mix;\r\nvarying vec2 v_normal;\r\nvarying vec2 v_width2;\r\nvarying vec2 v_tex_a;\r\nvarying vec2 v_tex_b;\r\nvarying float v_gamma_scale;\r\n#pragma mapbox: define highp vec4 color\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define mediump float width\r\n#pragma mapbox: define lowp float floorwidth\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 color\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump float width\r\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;\r\nfloat alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);\r\nfloat sdfdist_a=texture2D(u_image,v_tex_a).a;\r\nfloat sdfdist_b=texture2D(u_image,v_tex_b).a;\r\nfloat sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);\r\nalpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);\r\ngl_FragColor=color*(alpha*opacity);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\r\nattribute vec2 a_pos_normal;\r\nattribute vec4 a_data;\r\nuniform mat4 u_matrix;\r\nuniform mediump float u_ratio;\r\nuniform lowp float u_device_pixel_ratio;\r\nuniform vec2 u_patternscale_a;\r\nuniform float u_tex_y_a;\r\nuniform vec2 u_patternscale_b;\r\nuniform float u_tex_y_b;\r\nuniform vec2 u_units_to_pixels;\r\nvarying vec2 v_normal;\r\nvarying vec2 v_width2;\r\nvarying vec2 v_tex_a;\r\nvarying vec2 v_tex_b;\r\nvarying float v_gamma_scale;\r\n#pragma mapbox: define highp vec4 color\r\n#pragma mapbox: define lowp float blur\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define mediump float gapwidth\r\n#pragma mapbox: define lowp float offset\r\n#pragma mapbox: define mediump float width\r\n#pragma mapbox: define lowp float floorwidth\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 color\r\n#pragma mapbox: initialize lowp float blur\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize mediump float gapwidth\r\n#pragma mapbox: initialize lowp float offset\r\n#pragma mapbox: initialize mediump float width\r\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;\r\nvec2 a_extrude=a_data.xy-128.0;\r\nfloat a_direction=mod(a_data.z,4.0)-1.0;\r\nfloat a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;\r\nvec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;\r\nnormal.y=normal.y*2.0-1.0;\r\nv_normal=normal;gapwidth=gapwidth/2.0;\r\nfloat halfwidth=width/2.0;\r\noffset=-1.0*offset;\r\nfloat inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);\r\nfloat outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;\r\nmediump float t=1.0-abs(u);\r\nmediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);\r\nvec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);\r\ngl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);\r\nfloat extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);\r\nv_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\r\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);\r\nv_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);\r\nv_width2=vec2(outset,inset);\r\n}"),Zi=Ki("uniform float u_fade_t;\r\nuniform float u_opacity;\r\nuniform sampler2D u_image0;\r\nuniform sampler2D u_image1;\r\nvarying vec2 v_pos0;\r\nvarying vec2 v_pos1;\r\nuniform float u_brightness_low;\r\nuniform float u_brightness_high;\r\nuniform float u_saturation_factor;\r\nuniform float u_contrast_factor;\r\nuniform vec3 u_spin_weights;\r\nvoid main() {vec4 color0=texture2D(u_image0,v_pos0);\r\nvec4 color1=texture2D(u_image1,v_pos1);\r\nif (color0.a > 0.0) {\r\ncolor0.rgb=color0.rgb/color0.a;\r\n}\r\nif (color1.a > 0.0) {\r\ncolor1.rgb=color1.rgb/color1.a;\r\n}\r\nvec4 color=mix(color0,color1,u_fade_t);\r\ncolor.a*=u_opacity;\r\nvec3 rgb=color.rgb;rgb=vec3(\r\ndot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;\r\nrgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);\r\nvec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);\r\ngl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","uniform mat4 u_matrix;\r\nuniform vec2 u_tl_parent;\r\nuniform float u_scale_parent;\r\nuniform float u_buffer_scale;\r\nattribute vec2 a_pos;\r\nattribute vec2 a_texture_pos;\r\nvarying vec2 v_pos0;\r\nvarying vec2 v_pos1;\r\nvoid main() {\r\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;\r\nv_pos1=(v_pos0*u_scale_parent)+u_tl_parent;\r\n}"),Xi=Ki("uniform sampler2D u_texture;\r\nvarying vec2 v_tex;\r\nvarying float v_fade_opacity;\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float opacity\r\nlowp float alpha=opacity*v_fade_opacity;\r\ngl_FragColor=texture2D(u_texture,v_tex)*alpha;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","const float PI=3.141592653589793;\r\nattribute vec4 a_pos_offset;\r\nattribute vec4 a_data;\r\nattribute vec4 a_pixeloffset;\r\nattribute vec3 a_projected_pos;\r\nattribute float a_fade_opacity;\r\nuniform bool u_is_size_zoom_constant;\r\nuniform bool u_is_size_feature_constant;\r\nuniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;\r\nuniform highp float u_pitch;\r\nuniform bool u_rotate_symbol;\r\nuniform highp float u_aspect_ratio;\r\nuniform float u_fade_change;\r\nuniform mat4 u_matrix;\r\nuniform mat4 u_label_plane_matrix;\r\nuniform mat4 u_coord_matrix;\r\nuniform bool u_is_text;\r\nuniform bool u_pitch_with_map;\r\nuniform vec2 u_texsize;\r\nvarying vec2 v_tex;\r\nvarying float v_fade_opacity;\r\n#pragma mapbox: define lowp float opacity\r\nvoid main() {\r\n#pragma mapbox: initialize lowp float opacity\r\nvec2 a_pos=a_pos_offset.xy;\r\nvec2 a_offset=a_pos_offset.zw;\r\nvec2 a_tex=a_data.xy;\r\nvec2 a_size=a_data.zw;\r\nfloat a_size_min=floor(a_size[0]*0.5);\r\nvec2 a_pxoffset=a_pixeloffset.xy;\r\nvec2 a_minFontScale=a_pixeloffset.zw/256.0;\r\nhighp float segment_angle=-a_projected_pos[2];\r\nfloat size;\r\nif (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\r\nsize=mix(a_size_min,a_size[1],u_size_t)/128.0;\r\n} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\r\nsize=a_size_min/128.0;\r\n} else {\r\nsize=u_size;\r\n}\r\nvec4 projectedPoint=u_matrix*vec4(a_pos,0,1);\r\nhighp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\r\ncamera_to_anchor_distance/u_camera_to_center_distance :\r\nu_camera_to_center_distance/camera_to_anchor_distance;\r\nhighp float perspective_ratio=clamp(\r\n0.5+0.5*distance_ratio,0.0,4.0);\r\nsize*=perspective_ratio;\r\nfloat fontScale=u_is_text ? size/24.0 : size;\r\nhighp float symbol_rotation=0.0;\r\nif (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);\r\nvec2 a=projectedPoint.xy/projectedPoint.w;\r\nvec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;\r\nsymbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);\r\n}\r\nhighp float angle_sin=sin(segment_angle+symbol_rotation);\r\nhighp float angle_cos=cos(segment_angle+symbol_rotation);\r\nmat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);\r\nvec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);\r\ngl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);\r\nv_tex=a_tex/u_texsize;\r\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);\r\nfloat fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;\r\nv_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));\r\n}"),Hi=Ki("#define SDF_PX 8.0\r\nuniform bool u_is_halo;\r\nuniform sampler2D u_texture;\r\nuniform highp float u_gamma_scale;\r\nuniform lowp float u_device_pixel_ratio;\r\nuniform bool u_is_text;\r\nvarying vec2 v_data0;\r\nvarying vec3 v_data1;\r\n#pragma mapbox: define highp vec4 fill_color\r\n#pragma mapbox: define highp vec4 halo_color\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp float halo_width\r\n#pragma mapbox: define lowp float halo_blur\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 fill_color\r\n#pragma mapbox: initialize highp vec4 halo_color\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize lowp float halo_width\r\n#pragma mapbox: initialize lowp float halo_blur\r\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;\r\nvec2 tex=v_data0.xy;\r\nfloat gamma_scale=v_data1.x;\r\nfloat size=v_data1.y;\r\nfloat fade_opacity=v_data1[2];\r\nfloat fontScale=u_is_text ? size/24.0 : size;\r\nlowp vec4 color=fill_color;\r\nhighp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);\r\nlowp float buff=(256.0-64.0)/256.0;\r\nif (u_is_halo) {\r\ncolor=halo_color;\r\ngamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);\r\nbuff=(6.0-halo_width/fontScale)/SDF_PX;\r\n}\r\nlowp float dist=texture2D(u_texture,tex).a;\r\nhighp float gamma_scaled=gamma*gamma_scale;\r\nhighp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);\r\ngl_FragColor=color*(alpha*opacity*fade_opacity);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","const float PI=3.141592653589793;\r\nattribute vec4 a_pos_offset;\r\nattribute vec4 a_data;\r\nattribute vec4 a_pixeloffset;\r\nattribute vec3 a_projected_pos;\r\nattribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;\r\nuniform bool u_is_size_feature_constant;\r\nuniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;\r\nuniform mat4 u_label_plane_matrix;\r\nuniform mat4 u_coord_matrix;\r\nuniform bool u_is_text;\r\nuniform bool u_pitch_with_map;\r\nuniform highp float u_pitch;\r\nuniform bool u_rotate_symbol;\r\nuniform highp float u_aspect_ratio;\r\nuniform highp float u_camera_to_center_distance;\r\nuniform float u_fade_change;\r\nuniform vec2 u_texsize;\r\nvarying vec2 v_data0;\r\nvarying vec3 v_data1;\r\n#pragma mapbox: define highp vec4 fill_color\r\n#pragma mapbox: define highp vec4 halo_color\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp float halo_width\r\n#pragma mapbox: define lowp float halo_blur\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 fill_color\r\n#pragma mapbox: initialize highp vec4 halo_color\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize lowp float halo_width\r\n#pragma mapbox: initialize lowp float halo_blur\r\nvec2 a_pos=a_pos_offset.xy;\r\nvec2 a_offset=a_pos_offset.zw;\r\nvec2 a_tex=a_data.xy;\r\nvec2 a_size=a_data.zw;\r\nfloat a_size_min=floor(a_size[0]*0.5);\r\nvec2 a_pxoffset=a_pixeloffset.xy;\r\nhighp float segment_angle=-a_projected_pos[2];\r\nfloat size;\r\nif (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\r\nsize=mix(a_size_min,a_size[1],u_size_t)/128.0;\r\n} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\r\nsize=a_size_min/128.0;\r\n} else {\r\nsize=u_size;\r\n}\r\nvec4 projectedPoint=u_matrix*vec4(a_pos,0,1);\r\nhighp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\r\ncamera_to_anchor_distance/u_camera_to_center_distance :\r\nu_camera_to_center_distance/camera_to_anchor_distance;\r\nhighp float perspective_ratio=clamp(\r\n0.5+0.5*distance_ratio,0.0,4.0);\r\nsize*=perspective_ratio;\r\nfloat fontScale=u_is_text ? size/24.0 : size;\r\nhighp float symbol_rotation=0.0;\r\nif (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);\r\nvec2 a=projectedPoint.xy/projectedPoint.w;\r\nvec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;\r\nsymbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);\r\n}\r\nhighp float angle_sin=sin(segment_angle+symbol_rotation);\r\nhighp float angle_cos=cos(segment_angle+symbol_rotation);\r\nmat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);\r\nvec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);\r\ngl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);\r\nfloat gamma_scale=gl_Position.w;\r\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);\r\nfloat fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;\r\nfloat interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));\r\nv_data0=a_tex/u_texsize;\r\nv_data1=vec3(gamma_scale,size,interpolated_fade_opacity);\r\n}"),Yi=Ki("#define SDF_PX 8.0\r\n#define SDF 1.0\r\n#define ICON 0.0\r\nuniform bool u_is_halo;\r\nuniform sampler2D u_texture;\r\nuniform sampler2D u_texture_icon;\r\nuniform highp float u_gamma_scale;\r\nuniform lowp float u_device_pixel_ratio;\r\nvarying vec4 v_data0;\r\nvarying vec4 v_data1;\r\n#pragma mapbox: define highp vec4 fill_color\r\n#pragma mapbox: define highp vec4 halo_color\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp float halo_width\r\n#pragma mapbox: define lowp float halo_blur\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 fill_color\r\n#pragma mapbox: initialize highp vec4 halo_color\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize lowp float halo_width\r\n#pragma mapbox: initialize lowp float halo_blur\r\nfloat fade_opacity=v_data1[2];\r\nif (v_data1.w==ICON) {\r\nvec2 tex_icon=v_data0.zw;\r\nlowp float alpha=opacity*fade_opacity;\r\ngl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\nreturn;\r\n}\r\nvec2 tex=v_data0.xy;\r\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;\r\nfloat gamma_scale=v_data1.x;\r\nfloat size=v_data1.y;\r\nfloat fontScale=size/24.0;\r\nlowp vec4 color=fill_color;\r\nhighp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);\r\nlowp float buff=(256.0-64.0)/256.0;\r\nif (u_is_halo) {\r\ncolor=halo_color;\r\ngamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);\r\nbuff=(6.0-halo_width/fontScale)/SDF_PX;\r\n}\r\nlowp float dist=texture2D(u_texture,tex).a;\r\nhighp float gamma_scaled=gamma*gamma_scale;\r\nhighp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);\r\ngl_FragColor=color*(alpha*opacity*fade_opacity);\r\n#ifdef OVERDRAW_INSPECTOR\r\ngl_FragColor=vec4(1.0);\r\n#endif\r\n}","const float PI=3.141592653589793;\r\nattribute vec4 a_pos_offset;\r\nattribute vec4 a_data;\r\nattribute vec3 a_projected_pos;\r\nattribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;\r\nuniform bool u_is_size_feature_constant;\r\nuniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;\r\nuniform mat4 u_label_plane_matrix;\r\nuniform mat4 u_coord_matrix;\r\nuniform bool u_is_text;\r\nuniform bool u_pitch_with_map;\r\nuniform highp float u_pitch;\r\nuniform bool u_rotate_symbol;\r\nuniform highp float u_aspect_ratio;\r\nuniform highp float u_camera_to_center_distance;\r\nuniform float u_fade_change;\r\nuniform vec2 u_texsize;\r\nuniform vec2 u_texsize_icon;\r\nvarying vec4 v_data0;\r\nvarying vec4 v_data1;\r\n#pragma mapbox: define highp vec4 fill_color\r\n#pragma mapbox: define highp vec4 halo_color\r\n#pragma mapbox: define lowp float opacity\r\n#pragma mapbox: define lowp float halo_width\r\n#pragma mapbox: define lowp float halo_blur\r\nvoid main() {\r\n#pragma mapbox: initialize highp vec4 fill_color\r\n#pragma mapbox: initialize highp vec4 halo_color\r\n#pragma mapbox: initialize lowp float opacity\r\n#pragma mapbox: initialize lowp float halo_width\r\n#pragma mapbox: initialize lowp float halo_blur\r\nvec2 a_pos=a_pos_offset.xy;\r\nvec2 a_offset=a_pos_offset.zw;\r\nvec2 a_tex=a_data.xy;\r\nvec2 a_size=a_data.zw;\r\nfloat a_size_min=floor(a_size[0]*0.5);\r\nfloat is_sdf=a_size[0]-2.0*a_size_min;\r\nhighp float segment_angle=-a_projected_pos[2];\r\nfloat size;\r\nif (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\r\nsize=mix(a_size_min,a_size[1],u_size_t)/128.0;\r\n} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\r\nsize=a_size_min/128.0;\r\n} else {\r\nsize=u_size;\r\n}\r\nvec4 projectedPoint=u_matrix*vec4(a_pos,0,1);\r\nhighp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\r\ncamera_to_anchor_distance/u_camera_to_center_distance :\r\nu_camera_to_center_distance/camera_to_anchor_distance;\r\nhighp float perspective_ratio=clamp(\r\n0.5+0.5*distance_ratio,0.0,4.0);\r\nsize*=perspective_ratio;\r\nfloat fontScale=size/24.0;\r\nhighp float symbol_rotation=0.0;\r\nif (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);\r\nvec2 a=projectedPoint.xy/projectedPoint.w;\r\nvec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;\r\nsymbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);\r\n}\r\nhighp float angle_sin=sin(segment_angle+symbol_rotation);\r\nhighp float angle_cos=cos(segment_angle+symbol_rotation);\r\nmat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);\r\nvec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);\r\ngl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);\r\nfloat gamma_scale=gl_Position.w;\r\nvec2 fade_opacity=unpack_opacity(a_fade_opacity);\r\nfloat fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;\r\nfloat interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));\r\nv_data0.xy=a_tex/u_texsize;\r\nv_data0.zw=a_tex/u_texsize_icon;\r\nv_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);\r\n}");function Ki(t,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,s={};return{fragmentSource:t=t.replace(n,function(t,e,n,i,r){return s[r]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+r+"\nvarying "+n+" "+i+" "+r+";\n#else\nuniform "+n+" "+i+" u_"+r+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+r+"\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n"}),vertexSource:e=e.replace(n,function(t,e,n,i,r){var o="float"===i?"vec2":"vec4",a=r.match(/color/)?"color":o;return s[r]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+r+"\nuniform lowp float u_"+r+"_t;\nattribute "+n+" "+o+" a_"+r+";\nvarying "+n+" "+i+" "+r+";\n#else\nuniform "+n+" "+i+" u_"+r+";\n#endif\n":"vec4"==a?"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+r+" = a_"+r+";\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+r+" = unpack_mix_"+a+"(a_"+r+", u_"+r+"_t);\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+r+"\nuniform lowp float u_"+r+"_t;\nattribute "+n+" "+o+" a_"+r+";\n#else\nuniform "+n+" "+i+" u_"+r+";\n#endif\n":"vec4"==a?"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+n+" "+i+" "+r+" = a_"+r+";\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+r+"\n "+n+" "+i+" "+r+" = unpack_mix_"+a+"(a_"+r+", u_"+r+"_t);\n#else\n "+n+" "+i+" "+r+" = u_"+r+";\n#endif\n"})}}function Ji(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}var Qi=Object.freeze({__proto__:null,prelude:Si,background:Ci,backgroundPattern:Mi,circle:Ti,clippingMask:Ai,heatmap:Ei,heatmapTexture:Ii,collisionBox:Li,collisionCircle:Ri,debug:Oi,fill:Ni,fillOutline:ki,fillOutlinePattern:zi,fillPattern:Di,fillExtrusion:Fi,fillExtrusionPattern:Gi,hillshadePrepare:ji,hillshade:Vi,line:qi,lineGradient:Bi,linePattern:Ui,lineSDF:Wi,raster:Zi,symbolIcon:Xi,symbolSDF:Hi,symbolTextAndIcon:Yi});function $i(t,e,n,i,r){var o=t.gl;this.program=o.createProgram();var a=n?n.defines():[];r&&a.push("#define OVERDRAW_INSPECTOR;");var s=a.concat(Si.fragmentSource,e.fragmentSource).join("\n"),l=a.concat(Si.vertexSource,e.vertexSource).join("\n"),u=o.createShader(o.FRAGMENT_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(u,s),o.compileShader(u),o.attachShader(this.program,u);var h=o.createShader(o.VERTEX_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(h,l),o.compileShader(h),o.attachShader(this.program,h);for(var c=n?n.layoutAttributes:[],p=0;p>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}function er(t,e,n,i){var r=e.style.light,o=r.properties.get("position"),a=[o.x,o.y,o.z],s=vt.create$1();"viewport"===r.properties.get("anchor")&&vt.fromRotation(s,-e.transform.angle),vt.transformMat3(a,a,s);var l=r.properties.get("color");return{u_matrix:t,u_lightpos:a,u_lightintensity:r.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+n,u_opacity:i}}function nr(t){return{u_matrix:t}}function ir(t,e,n,i){return vt.extend(nr(t),tr(n,e,i))}function rr(t,e,n,i){var r,o,a=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var s=Bn(n,1,a.zoom);r=!0,o=[s,s]}else r=!1,o=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+r,u_device_pixel_ratio:vt.browser.devicePixelRatio,u_extrude_scale:o}}function or(t){return{u_matrix:t}}function ar(t,e,n){var i=t.transform;return{u_matrix:cr(t,e,n),u_ratio:1/Bn(e,1,i.zoom),u_device_pixel_ratio:vt.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}}Ji.prototype.bind=function(t,e,n,i,r,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==i.length,u=0;!l&&uMath.abs(t.tileID.overscaledZ-h),p=c&&t.refreshedUponExpiration?1:vt.clamp(c?s:1-l,0,1);return t.refreshedUponExpiration&&1<=s&&(t.refreshedUponExpiration=!1),e?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var Tr=new vt.Color(1,0,0,1),Ar=new vt.Color(0,1,0,1),Er=new vt.Color(0,0,1,1),Ir=new vt.Color(1,0,1,1),Lr=new vt.Color(0,1,1,1);function Rr(t,e,n,i){Nr(t,0,e+n/2,t.transform.width,n,i)}function Or(t,e,n,i){Nr(t,e-n/2,0,n,t.transform.height,i)}function Nr(t,e,n,i,r,o){var a=t.context,s=a.gl;s.enable(s.SCISSOR_TEST),s.scissor(e*vt.browser.devicePixelRatio,n*vt.browser.devicePixelRatio,i*vt.browser.devicePixelRatio,r*vt.browser.devicePixelRatio),a.clear({color:o}),s.disable(s.SCISSOR_TEST)}function kr(t,e,n){var i=t.context,r=i.gl,o=n.posMatrix,a=t.useProgram("debug"),s=en.disabled,l=nn.disabled,u=t.colorModeForRenderPass();i.activeTexture.set(r.TEXTURE0),t.emptyTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE),a.draw(i,r.LINE_STRIP,s,l,u,on.disabled,sr(o,vt.Color.red),"$debug",t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var h=e.getTileByID(n.key).latestRawTileData,c=Math.floor((h&&h.byteLength||0)/1024),p=e.getTile(n).tileSize,f=512/Math.min(p,512)*(n.overscaledZ/t.transform.zoom)*.5,d=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(d+=" => "+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var n=t.debugOverlayCanvas,i=t.context.gl,r=t.debugOverlayCanvas.getContext("2d");r.clearRect(0,0,n.width,n.height),r.shadowColor="white",r.shadowBlur=2,r.lineWidth=1.5,r.strokeStyle="white",r.textBaseline="top",r.font="bold 36px Open Sans, sans-serif",r.fillText(e,5,5),r.strokeText(e,5,5),t.debugOverlayTexture.update(n),t.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}(t,d+" "+c+"kb"),a.draw(i,r.TRIANGLES,s,l,rn.alphaBlended,on.disabled,sr(o,vt.Color.transparent,f),"$debug",t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}function zr(t,e){this.context=new an(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=ln.maxUnderzooming+ln.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new yi,this.gpuTimers={}}var Dr={symbol:function(t,e,n,i,r){if("translucent"===t.renderPass){var o=nn.disabled,a=t.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(t,e,n,i,r,o,a){for(var s=e.transform,l="map"===r,u="map"===o,h=0,c=t;h>16,w>>16],u_pixel_coord_lower:[65535&_,65535&w]}),{u_matrix:i,u_opacity:r})):{u_matrix:G,u_opacity:P,u_color:b};O.draw(S,C.TRIANGLES,L,I,R,on.disabled,j,n.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,n){for(var i=0;ithis.max[s]-this.min[s])return 0}return 1},jr.prototype.interpolate=function(t,e,n){return null!=e.top&&null!=t.top&&(this.top=vt.number(t.top,e.top,n)),null!=e.bottom&&null!=t.bottom&&(this.bottom=vt.number(t.bottom,e.bottom,n)),null!=e.left&&null!=t.left&&(this.left=vt.number(t.left,e.left,n)),null!=e.right&&null!=t.right&&(this.right=vt.number(t.right,e.right,n)),this},jr.prototype.getCenter=function(t,e){var n=vt.clamp((this.left+t-this.right)/2,0,t),i=vt.clamp((this.top+e-this.bottom)/2,0,e);return new vt.Point(n,i)},jr.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},jr.prototype.clone=function(){return new jr(this.top,this.bottom,this.left,this.right)},jr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var qr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};function Br(t){var e,n,i,r;this._hashName=t&&encodeURIComponent(t),vt.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),n=!1,i=null,r=function(){i=null,n&&(e(),i=setTimeout(r,300),n=!1)},function(){return n=!0,i||r(),i})}function Ur(t){this._map=t,this.clear()}Vr.prototype.clone=function(){var t=new Vr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},qr.minZoom.get=function(){return this._minZoom},qr.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},qr.maxZoom.get=function(){return this._maxZoom},qr.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},qr.minPitch.get=function(){return this._minPitch},qr.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},qr.maxPitch.get=function(){return this._maxPitch},qr.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},qr.renderWorldCopies.get=function(){return this._renderWorldCopies},qr.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},qr.worldSize.get=function(){return this.tileSize*this.scale},qr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},qr.size.get=function(){return new vt.Point(this.width,this.height)},qr.bearing.get=function(){return-this.angle/Math.PI*180},qr.bearing.set=function(t){var e=-vt.wrap(t,-180,180)*Math.PI/180;this.angle!==e&&(this._unmodified=!1,this.angle=e,this._calcMatrices(),this.rotationMatrix=vt.create$2(),vt.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},qr.pitch.get=function(){return this._pitch/Math.PI*180},qr.pitch.set=function(t){var e=vt.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==e&&(this._unmodified=!1,this._pitch=e,this._calcMatrices())},qr.fov.get=function(){return this._fov/Math.PI*180},qr.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},qr.zoom.get=function(){return this._zoom},qr.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},qr.center.get=function(){return this._center},qr.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},qr.padding.get=function(){return this._edgeInsets.toJSON()},qr.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},qr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Vr.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Vr.prototype.interpolatePadding=function(t,e,n){this._unmodified=!1,this._edgeInsets.interpolate(t,e,n),this._constrain(),this._calcMatrices()},Vr.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Vr.prototype.getVisibleUnwrappedCoordinates=function(t){var e=[new vt.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new vt.Point(0,0)),i=this.pointCoordinate(new vt.Point(this.width,0)),r=this.pointCoordinate(new vt.Point(this.width,this.height)),o=this.pointCoordinate(new vt.Point(0,this.height)),a=Math.floor(Math.min(n.x,i.x,r.x,o.x)),s=Math.floor(Math.max(n.x,i.x,r.x,o.x)),l=a-1;l<=s+1;l++)0!==l&&e.push(new vt.UnwrappedTileID(l,t));return e},Vr.prototype.coveringTiles=function(t){var e=this.coveringZoomLevel(t),n=e;if(void 0!==t.minzoom&&et.maxzoom&&(e=t.maxzoom);var i=vt.MercatorCoordinate.fromLngLat(this.center),r=Math.pow(2,e),o=[r*i.x,r*i.y,0],a=Fr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,e),s=t.minzoom||0;function l(t){return{aabb:new Gr([t*r,0,0],[(t+1)*r,r,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}}this.pitch<=60&&this._edgeInsets.top<.1&&(s=e);var u=[],h=[],c=e,p=t.reparseOverscaled?n:e;if(this._renderWorldCopies)for(var f=1;f<=3;f++)u.push(l(-f)),u.push(l(f));for(u.push(l(0));03+(1<=s)h.push({tileID:new vt.OverscaledTileID(d.zoom===c?p:d.zoom,d.wrap,d.zoom,y,m),distanceSq:vt.sqrLen([o[0]-.5-y,o[1]-.5-m])});else for(var b=0;b<4;b++){var P=(y<<1)+b%2,S=(m<<1)+(b>>1);u.push({aabb:d.aabb.quadrant(b),zoom:d.zoom+1,x:P,y:S,wrap:d.wrap,fullyVisible:g})}}return h.sort(function(t,e){return t.distanceSq-e.distanceSq}).map(function(t){return t.tileID})},Vr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},qr.unmodified.get=function(){return this._unmodified},Vr.prototype.zoomScale=function(t){return Math.pow(2,t)},Vr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Vr.prototype.project=function(t){var e=vt.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new vt.Point(vt.mercatorXfromLng(t.lng)*this.worldSize,vt.mercatorYfromLat(e)*this.worldSize)},Vr.prototype.unproject=function(t){return new vt.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},qr.point.get=function(){return this.project(this.center)},Vr.prototype.setLocationAtPoint=function(t,e){var n=this.pointCoordinate(e),i=this.pointCoordinate(this.centerPoint),r=this.locationCoordinate(t),o=new vt.MercatorCoordinate(r.x-(n.x-i.x),r.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},Vr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Vr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Vr.prototype.locationCoordinate=function(t){return vt.MercatorCoordinate.fromLngLat(t)},Vr.prototype.coordinateLocation=function(t){return t.toLngLat()},Vr.prototype.pointCoordinate=function(t){var e=[t.x,t.y,0,1],n=[t.x,t.y,1,1];vt.transformMat4(e,e,this.pixelMatrixInverse),vt.transformMat4(n,n,this.pixelMatrixInverse);var i=e[3],r=n[3],o=e[1]/i,a=n[1]/r,s=e[2]/i,l=n[2]/r,u=s==l?0:(0-s)/(l-s);return new vt.MercatorCoordinate(vt.number(e[0]/i,n[0]/r,u)/this.worldSize,vt.number(o,a,u)/this.worldSize)},Vr.prototype.coordinatePoint=function(t){var e=[t.x*this.worldSize,t.y*this.worldSize,0,1];return vt.transformMat4(e,e,this.pixelMatrix),new vt.Point(e[0]/e[3],e[1]/e[3])},Vr.prototype.getBounds=function(){return(new vt.LngLatBounds).extend(this.pointLocation(new vt.Point(0,0))).extend(this.pointLocation(new vt.Point(this.width,0))).extend(this.pointLocation(new vt.Point(this.width,this.height))).extend(this.pointLocation(new vt.Point(0,this.height)))},Vr.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new vt.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Vr.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Vr.prototype.calculatePosMatrix=function(t,e){void 0===e&&(e=!1);var n=t.key,i=e?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var r=t.canonical,o=this.worldSize/this.zoomScale(r.z),a=r.x+Math.pow(2,r.z)*t.wrap,s=vt.identity(new Float64Array(16));return vt.translate(s,s,[a*o,r.y*o,0]),vt.scale(s,s,[o/vt.EXTENT,o/vt.EXTENT,1]),vt.multiply(s,e?this.alignedProjMatrix:this.projMatrix,s),i[n]=new Float32Array(s),i[n]},Vr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Vr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,e,n,i,r=-90,o=90,a=-180,s=180,l=this.size,u=this._unmodified;if(this.latRange){var h=this.latRange;r=vt.mercatorYfromLat(h[1])*this.worldSize,t=(o=vt.mercatorYfromLat(h[0])*this.worldSize)-r=this._clickTolerance||this._map.fire(new $r(t.type,this._map,t))},Qr.prototype.dblclick=function(t){return this._firePreventable(new $r(t.type,this._map,t))},Qr.prototype.mouseover=function(t){this._map.fire(new $r(t.type,this._map,t))},Qr.prototype.mouseout=function(t){this._map.fire(new $r(t.type,this._map,t))},Qr.prototype.touchstart=function(t){return this._firePreventable(new to(t.type,this._map,t))},Qr.prototype.touchmove=function(t){this._map.fire(new to(t.type,this._map,t))},Qr.prototype.touchend=function(t){this._map.fire(new to(t.type,this._map,t))},Qr.prototype.touchcancel=function(t){this._map.fire(new to(t.type,this._map,t))},Qr.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Qr.prototype.isEnabled=function(){return!0},Qr.prototype.isActive=function(){return!1},Qr.prototype.enable=function(){},Qr.prototype.disable=function(){},no.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},no.prototype.mousemove=function(t){this._map.fire(new $r(t.type,this._map,t))},no.prototype.mousedown=function(){this._delayContextMenu=!0},no.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new $r("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},no.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new $r(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},no.prototype.isEnabled=function(){return!0},no.prototype.isActive=function(){return!1},no.prototype.enable=function(){},no.prototype.disable=function(){},io.prototype.isEnabled=function(){return!!this._enabled},io.prototype.isActive=function(){return!!this._active},io.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},io.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},io.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(x.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},io.prototype.mousemoveWindow=function(t,e){if(this._active){var n=e;if(!(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),n.length===this.numTouches&&(this.centroid=function(t){for(var e=new vt.Point(0,0),n=0,i=t;nMath.abs(t.x)}function Lo(){var t=No;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep}var Ro,Oo=(ko.__proto__=Ro=_o,((ko.prototype=Object.create(Ro&&Ro.prototype)).constructor=ko).prototype.reset=function(){Ro.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},ko.prototype._start=function(t){Io((this._lastPoints=t)[0].sub(t[1]))&&(this._valid=!1)},ko.prototype._move=function(t,e,n){var i=t[0].sub(this._lastPoints[0]),r=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,r,n.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+r.y)/2*-.5}},ko.prototype.gestureBeginsVertically=function(t,e,n){if(void 0!==this._valid)return this._valid;var i=2<=t.mag(),r=2<=e.mag();if(i||r){if(!i||!r)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;var o=0t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=l!==p,this._pitching=f!==u,this._padding=!a.isPaddingEqual(d),this._prepareEase(r,!1),this._ease(function(t){var e=t*O,n=1/L(e);a.zoom=1===t?c:s+a.scaleZoom(n),o._rotating&&(a.bearing=vt.number(l,p,t)),o._pitching&&(a.pitch=vt.number(u,f,t)),o._padding&&(a.interpolatePadding(h,d,t),m=a.centerPoint.add(y));var i=1===t?g:a.unproject(v.add(x.mult(R(e))).mult(n));a.setLocationAtPoint(a.renderWorldCopies?i.wrap():i,m),o._fireMoveEvents(r)},function(){return o._afterEase(r)},t),this},$o.prototype.isEasing=function(){return!!this._easeFrameId},$o.prototype.stop=function(){return this._stop()},$o.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,e)}if(!t){var i=this.handlers;i&&i.stop()}return this},$o.prototype._ease=function(t,e,n){!1===n.animate||0===n.duration?(t(1),e()):(this._easeStart=vt.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=e,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$o.prototype._renderFrameCallback=function(){var t=Math.min((vt.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$o.prototype._normalizeBearing=function(t,e){t=vt.wrap(t,-180,180);var n=Math.abs(t-e);return Math.abs(t-360-e)t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&60=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},t.prototype.getMaxZoom=function(){return this.transform.maxZoom},t.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(0<=t&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},t.prototype.getMaxPitch=function(){return this.transform.maxPitch},t.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},t.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},t.prototype.project=function(t){return this.transform.locationPoint(vt.LngLat.convert(t))},t.prototype.unproject=function(t){return this.transform.pointLocation(vt.Point.convert(t))},t.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},t.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},t.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},t.prototype._createDelegatedListener=function(n,i,r){var t,o=this;if("mouseenter"===n||"mouseover"===n){var a=!1;return{layer:i,listener:r,delegates:{mousemove:function(t){var e=o.getLayer(i)?o.queryRenderedFeatures(t.point,{layers:[i]}):[];e.length?a||(a=!0,r.call(o,new $r(n,o,t.originalEvent,{features:e}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"!==n&&"mouseout"!==n)return{layer:i,listener:r,delegates:(t={},t[n]=function(t){var e=o.getLayer(i)?o.queryRenderedFeatures(t.point,{layers:[i]}):[];e.length&&(t.features=e,r.call(o,t),delete t.features)},t)};var e=!1;return{layer:i,listener:r,delegates:{mousemove:function(t){(o.getLayer(i)?o.queryRenderedFeatures(t.point,{layers:[i]}):[]).length?e=!0:e&&(e=!1,r.call(o,new $r(n,o,t.originalEvent)))},mouseout:function(t){e&&(e=!1,r.call(o,new $r(n,o,t.originalEvent)))}}}},t.prototype.on=function(t,e,n){if(void 0===n)return u.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,n);for(var r in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(r,i.delegates[r]);return this},t.prototype.once=function(t,e,n){if(void 0===n)return u.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,n);for(var r in i.delegates)this.once(r,i.delegates[r]);return this},t.prototype.off=function(o,a,s){var l=this;return void 0===s?u.prototype.off.call(this,o,a):(this._delegatedListeners&&this._delegatedListeners[o]&&function(t){for(var e=t[o],n=0;nn.center.lng?t.lng-=360:t.lng+=360}return t}ca.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),x.disableDrag()},ca.prototype.move=function(t,e){var n=this.map,i=this.mouseRotate.mousemoveWindow(t,e);if(i&&i.bearingDelta&&n.setBearing(n.getBearing()+i.bearingDelta),this.mousePitch){var r=this.mousePitch.mousemoveWindow(t,e);r&&r.pitchDelta&&n.setPitch(n.getPitch()+r.pitchDelta)}},ca.prototype.off=function(){var t=this.element;x.removeEventListener(t,"mousedown",this.mousedown),x.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),x.removeEventListener(t,"touchmove",this.touchmove),x.removeEventListener(t,"touchend",this.touchend),x.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},ca.prototype.offTemp=function(){x.enableDrag(),x.removeEventListener(vt.window,"mousemove",this.mousemove),x.removeEventListener(vt.window,"mouseup",this.mouseup)},ca.prototype.mousedown=function(t){this.down(vt.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),x.mousePos(this.element,t)),x.addEventListener(vt.window,"mousemove",this.mousemove),x.addEventListener(vt.window,"mouseup",this.mouseup)},ca.prototype.mousemove=function(t){this.move(t,x.mousePos(this.element,t))},ca.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},ca.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},ca.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=x.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},ca.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||n.latitudee.getNorth())},Ca.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},Ca.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new vt.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new vt.Event("geolocate",t)),this._finish()}},Ca.prototype._updateCamera=function(t){var e=new vt.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,i=this._map.getBearing(),r=vt.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(e.toBounds(n),r,{geolocateSource:!0})},Ca.prototype._updateMarker=function(t){if(t){var e=new vt.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(e).addTo(this._map),this._userLocationDotMarker.setLngLat(e).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},Ca.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),n=this._map.unproject([1,t]),i=e.distanceTo(n),r=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=r+"px",this._circleElement.style.height=r+"px"},Ca.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},Ca.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&ba)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new vt.Event("error",t)),this._finish()}},Ca.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},Ca.prototype._setupUI=function(t){var e=this;if(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),!(this._geolocateButton.type="button")===t){vt.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{var i=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new xa(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(t){t.geolocateSource||"ACTIVE_LOCK"!==e._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(e._watchState="BACKGROUND",e._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),e._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),e.fire(new vt.Event("trackuserlocationend")))})},Ca.prototype.trigger=function(){if(!this._setup)return vt.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new vt.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":wa--,ba=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new vt.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new vt.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ba=1<++wa?(t={maximumAge:6e5,timeout:0},!0):(t=this.options.positionOptions,!1),this._geolocationWatchID=vt.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else vt.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},Ca.prototype._clearWatch=function(){vt.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},Ca),Sa={maxWidth:100,unit:"metric"};function Ca(t){ga.call(this),this.options=vt.extend({},_a,t),vt.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}function Ma(t,e){var n=this;if(va.call(this),(t instanceof vt.window.HTMLElement||e)&&(t=vt.extend({element:t},e)),vt.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._draggable=t&&t.draggable||!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&"auto"!==t.pitchAlignment?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=vt.Point.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=x.create("div"),this._element.setAttribute("aria-label","Map marker");var i=x.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var r=x.createNS("http://www.w3.org/2000/svg","g");r.setAttributeNS(null,"stroke","none"),r.setAttributeNS(null,"stroke-width","1"),r.setAttributeNS(null,"fill","none"),r.setAttributeNS(null,"fill-rule","evenodd");var o=x.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"fill-rule","nonzero");var a=x.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"transform","translate(3.0, 29.0)"),a.setAttributeNS(null,"fill","#000000");for(var s=0,l=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];sthis._map.transform.height-s?["bottom"]:[],n.xthis._map.transform.width-a/2&&o.push("right"),i=0===o.length?"bottom":o.join("-")}var l=n.add(r[i]).round();x.setTransform(this._container,fa[i]+" translate("+l.x+"px,"+l.y+"px)"),da(this._container,i,"popup")}},Na.prototype._onClose=function(){this.remove()},Na),Oa={version:vt.version,supported:n,setRTLTextPlugin:vt.setRTLTextPlugin,getRTLTextPluginStatus:vt.getRTLTextPluginStatus,Map:sa,NavigationControl:ua,GeolocateControl:Pa,AttributionControl:Ko,ScaleControl:ya,FullscreenControl:Ea,Popup:Ra,Marker:xa,Style:wi,LngLat:vt.LngLat,LngLatBounds:vt.LngLatBounds,Point:vt.Point,MercatorCoordinate:vt.MercatorCoordinate,Evented:vt.Evented,config:vt.config,prewarm:function(){gn().acquire(fn)},clearPrewarmedResources:function(){var t=yn;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(fn),yn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return vt.config.ACCESS_TOKEN},set accessToken(t){vt.config.ACCESS_TOKEN=t},get baseApiUrl(){return vt.config.API_URL},set baseApiUrl(t){vt.config.API_URL=t},get workerCount(){return dn.workerCount},set workerCount(t){dn.workerCount=t},get maxParallelImageRequests(){return vt.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){vt.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){vt.clearTileCache(t)},workerUrl:""};function Na(t){Ia.call(this),this.options=vt.extend(Object.create(La),t),vt.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Oa}),a}()},function(t,e,n){var i;void 0===(i=function(t,e,n){function i(){}i.setCookie=function(t,e,n,i){if(t){i=i||"/";var r=new Date;r.setTime(r.getTime()+1e3*n);var o="expires="+r.toUTCString();document.cookie="{name}={value};expires={expires};path={path}".replace("{name}",t).replace("{value}",escape(e)).replace("{expires}",o).replace("{path}",i)}},i.getCookie=function(t){var e,n=new RegExp("(^|)"+t+"=([^;]*)(;|$)");return(e=document.cookie.match(n))?unescape(e[2]):null},i.deleteCookie=function(t){var e=new Date;e.setTime(e.getTime()-1);var n=this.getCookie(t);n&&this.setCookie(t,n,-1)},n.exports=i}.apply(e,[n,e,t]))||(t.exports=i)},function(t,e,n){var i,r;i=[n(0),n(19),n,e,t],void 0===(r=function(t,n,e,i,r){function o(t){var e=t||{};n.call(this,e),this._interval=e.interval,this._playing=!1,this._paused=!1}return t.extend2(o,n),o.prototype.start=function(i){this._playing=!0,this._paused=!1;var t=i.length,r=this;this._animater=function(t,e,n,i){var r={timer:null,index:0,count:e,isPause:!1,interval:t,play:function(){var t=function(){r.isPause||(r.index"+value+" and "):"string"==typeof l[u].value&&(i="["+o+" = '"+l[u].value+"']",r+=o+"<>'"+value+"' and "),t[i]=y.toGeoStyle(l[u].symbol,n);r=r.substr(0,r.length-4)+"]",t[r]=y.toGeoStyle(s,n);break;case"ClassBreaksRenderer":o=e.fieldName;var h=e.classfications,c=h[0].endValue,p=h[0].startValue;for(u=0;u= "+h[u].startValue+" and "+o+" <= "+h[u].endValue+"]":"string"==typeof h[u].startValue&&"string"==typeof h[u].endValue&&(i="["+o+" >= '"+h[u].startValue+"' and "+o+" <= '"+h[u].endValue+"']"),t[i]=y.toGeoStyle(h[u].symbol,n)}t[r="["+o+" > "+c+" or "+o+" < "+p+"]"]=y.toGeoStyle(s,n)}}return t}(l,this._currentRender,r),a.features=s,o.type="geojson",o.style=l,o.geoJson=a,o.renderAsSvg=!0,o},I.prototype.enableFormat=function(){return!(!1===this.visible||0===this.opacity||0===this.features.length||!this._currentRender)},I.prototype.unRender=function(t){if(t){t.unRender();var e=this.featureRenders.indexOf(t);this.featureRenders.splice(e,1)}else{for(var n=0;nMath.PI&&(l-=2*Math.PI),o=Math.sin(u),s=Math.cos(u),a=o*o,r=this.a/Math.sqrt(1-this.es*a),e=(r+h)*s*Math.cos(l),n=(r+h)*s*Math.sin(l),i=(r*(1-this.es)+h)*o,t.x=e,t.y=n,t.z=i,0},geocentric_to_geodetic:function(t){var e,n,i,r,o,a,s,l,u,h,c,p,f,d,y,m,g=t.x,v=t.y,x=t.z?t.z:0;if(e=Math.sqrt(g*g+v*v),n=Math.sqrt(g*g+v*v+x*x),e/this.a<1e-12){if(d=0,n/this.a<1e-12)return y=w,void(m=-this.b)}else d=Math.atan2(v,g);for(i=x/n,r=e/n,o=1/Math.sqrt(1-this.es*(2-this.es)*r*r),l=r*(1-this.es)*o,u=i*o,f=0;f++,s=this.a/Math.sqrt(1-this.es*u*u),m=e*l+x*u-s*(1-this.es*u*u),a=this.es*s/(s+m),o=1/Math.sqrt(1-a*(2-a)*r*r),p=(c=i*o)*l-(h=r*(1-a)*o)*u,l=h,u=c,1e-242*E*this.a)return;return n=e/this.a,i=Math.sin(n),r=Math.cos(n),o=this.long0,Math.abs(e)<=I?a=this.lat0:(a=P(r*this.sin_p12+t.y*i*this.cos_p12/e),s=Math.abs(this.lat0)-E,o=A(Math.abs(s)<=I?0<=this.lat0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*i,e*this.cos_p12*r-t.y*this.sin_p12*i))),t.x=o,t.y=a,t}return l=R(this.es),u=O(this.es),h=N(this.es),c=k(this.es),Math.abs(this.sin_p12-1)<=I?(p=this.a*L(l,u,h,c,E),e=Math.sqrt(t.x*t.x+t.y*t.y),a=S((p-e)/this.a,l,u,h,c),o=A(this.long0+Math.atan2(t.x,-1*t.y))):Math.abs(this.sin_p12+1)<=I?(p=this.a*L(l,u,h,c,E),e=Math.sqrt(t.x*t.x+t.y*t.y),a=S((e-p)/this.a,l,u,h,c),o=A(this.long0+Math.atan2(t.x,t.y))):(e=Math.sqrt(t.x*t.x+t.y*t.y),y=Math.atan2(t.x,t.y),f=z(this.a,this.e,this.sin_p12),m=Math.cos(y),g=this.e*this.cos_p12*m,v=-g*g/(1-this.es),x=3*this.es*(1-v)*this.sin_p12*this.cos_p12*m/(1-this.es),w=(_=e/f)-v*(1+v)*Math.pow(_,3)/6-x*(1+3*v)*Math.pow(_,4)/24,b=1-v*w*w/2-_*w*w*w/6,d=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*m),o=A(this.long0+Math.asin(Math.sin(y)*Math.sin(w)/Math.cos(d))),a=Math.atan((1-this.es*b*this.sin_p12/Math.sin(d))*Math.tan(d)/(1-this.es))),t.x=o,t.y=a,t},n.names=["Azimuthal_Equidistant","aeqd"]},{"../common/adjust_lon":5,"../common/asinz":6,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],41:[function(t,e,n){var f=t("../common/mlfn"),i=t("../common/e0fn"),r=t("../common/e1fn"),o=t("../common/e2fn"),a=t("../common/e3fn"),d=t("../common/gN"),y=t("../common/adjust_lon"),m=t("../common/adjust_lat"),g=t("../common/imlfn"),v=Math.PI/2;n.init=function(){this.sphere||(this.e0=i(this.es),this.e1=r(this.es),this.e2=o(this.es),this.e3=a(this.es),this.ml0=this.a*f(this.e0,this.e1,this.e2,this.e3,this.lat0))},n.forward=function(t){var e,n,i=t.x,r=t.y;if(i=y(i-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(r)*Math.sin(i)),n=this.a*(Math.atan2(Math.tan(r),Math.cos(i))-this.lat0);else{var o=Math.sin(r),a=Math.cos(r),s=d(this.a,this.e,o),l=Math.tan(r)*Math.tan(r),u=i*Math.cos(r),h=u*u,c=this.es*a*a/(1-this.es),p=this.a*f(this.e0,this.e1,this.e2,this.e3,r);e=s*u*(1-h*l*(1/6-(8-l+8*c)*h/120)),n=p-this.ml0+s*o/a*h*(.5+(5-l+6*c)*h/24)}return t.x=e+this.x0,t.y=n+this.y0,t},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,n,i=t.x/this.a,r=t.y/this.a;if(this.sphere){var o=r+this.lat0;e=Math.asin(Math.sin(o)*Math.cos(i)),n=Math.atan2(Math.tan(i),Math.cos(o))}else{var a=this.ml0/this.a+r,s=g(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-v)<=1e-10)return t.x=this.long0,t.y=v,r<0&&(t.y*=-1),t;var l=d(this.a,this.e,Math.sin(s)),u=l*l*l/this.a/this.a*(1-this.es),h=Math.pow(Math.tan(s),2),c=i*this.a/l,p=c*c;e=s-l*Math.tan(s)/u*c*c*(.5-(1+3*h)*c*c/24),n=c*(1-p*(h/3+(1+3*h)*h*p/15))/Math.cos(s)}return t.x=y(n+this.long0),t.y=m(e),t},n.names=["Cassini","Cassini_Soldner","cass"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/gN":11,"../common/imlfn":12,"../common/mlfn":14}],42:[function(t,e,n){var s=t("../common/adjust_lon"),l=t("../common/qsfnz"),i=t("../common/msfnz"),r=t("../common/iqsfnz");n.init=function(){this.sphere||(this.k0=i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},n.forward=function(t){var e,n,i=t.x,r=t.y,o=s(i-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var a=l(this.e,Math.sin(r));e=this.x0+this.a*this.k0*o,n=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=n,t},n.inverse=function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=s(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=r(this.e,2*t.y*this.k0/this.a),e=s(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},n.names=["cea"]},{"../common/adjust_lon":5,"../common/iqsfnz":13,"../common/msfnz":15,"../common/qsfnz":20}],43:[function(t,e,n){var o=t("../common/adjust_lon"),a=t("../common/adjust_lat");n.init=function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},n.forward=function(t){var e=t.x,n=t.y,i=o(e-this.long0),r=a(n-this.lat0);return t.x=this.x0+this.a*i*this.rc,t.y=this.y0+this.a*r,t},n.inverse=function(t){var e=t.x,n=t.y;return t.x=o(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=a(this.lat0+(n-this.y0)/this.a),t},n.names=["Equirectangular","Equidistant_Cylindrical","eqc"]},{"../common/adjust_lat":4,"../common/adjust_lon":5}],44:[function(t,e,n){var i=t("../common/e0fn"),r=t("../common/e1fn"),o=t("../common/e2fn"),a=t("../common/e3fn"),s=t("../common/msfnz"),l=t("../common/mlfn"),u=t("../common/adjust_lon"),h=t("../common/adjust_lat"),c=t("../common/imlfn");n.init=function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=i(this.es),this.e1=r(this.es),this.e2=o(this.es),this.e3=a(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=s(this.e,this.sinphi,this.cosphi),this.ml1=l(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=s(this.e,this.sinphi,this.cosphi),this.ml2=l(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=l(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},n.forward=function(t){var e,n=t.x,i=t.y;if(this.sphere)e=this.a*(this.g-i);else{var r=l(this.e0,this.e1,this.e2,this.e3,i);e=this.a*(this.g-r)}var o=this.ns*u(n-this.long0),a=this.x0+e*Math.sin(o),s=this.y0+this.rh-e*Math.cos(o);return t.x=a,t.y=s,t},n.inverse=function(t){var e,n,i,r;t.x-=this.x0,t.y=this.rh-t.y+this.y0,e=0<=this.ns?(n=Math.sqrt(t.x*t.x+t.y*t.y),1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),-1);var o=0;if(0!==n&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere)return r=u(this.long0+o/this.ns),i=h(this.g-n/this.a),t.x=r,t.y=i,t;var a=this.g-n/this.a;return i=c(a,this.e0,this.e1,this.e2,this.e3),r=u(this.long0+o/this.ns),t.x=r,t.y=i,t},n.names=["Equidistant_Conic","eqdc"]},{"../common/adjust_lat":4,"../common/adjust_lon":5,"../common/e0fn":7,"../common/e1fn":8,"../common/e2fn":9,"../common/e3fn":10,"../common/imlfn":12,"../common/mlfn":14,"../common/msfnz":15}],45:[function(t,e,n){var o=Math.PI/4,a=t("../common/srat"),s=Math.PI/2;n.init=function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+o)/(Math.pow(Math.tan(.5*this.lat0+o),this.C)*a(this.e*t,this.ratexp))},n.forward=function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+o),this.C)*a(this.e*Math.sin(n),this.ratexp))-s,t.x=this.C*e,t},n.inverse=function(t){for(var e=t.x/this.C,n=t.y,i=Math.pow(Math.tan(.5*n+o)/this.K,1/this.C),r=20;0Math.PI&&(i=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,1o.length+a.length+4)for(var s=function(t,e,n){for(var i=[],r=0,o=t.length;r
',id:"PanoImage",className:"pano_tooltip",offset:t.offset||[-8,-42],stopEvent:!1}),(c=this).controlClickFun=function(){c.map.setCursor(c.cursor),c.toolTipWare.add(c.toolTip,!0),c.toolTipWare.show("PanoImage",!1),c.toolTip.content='
',function(e){e.on("mousemove",c.mouseMove),e.on("click",c.mouseClick),c._rightClick=function(t){t&&t.preventDefault(),e.un("mousemove",c.mouseMove),e.setCursor("default"),c.toolTipWare.remove("PanoImage"),e.un("click",c.mouseClick),e.map.getViewport().removeEventListener("contextmenu",c._rightClick),c._cancelEvent.raiseEvent()},c._cancel&&e.map.getViewport().addEventListener("contextmenu",c._rightClick)}(c.map)},this._hidePanoDiv=document.createElement("div"),this._hidePanoDiv.className="Hide_pano",this._hidePanoDiv.title="退出全景",this._hidePanoDiv.onclick=function(){c.map.getMapControl().getViewport().parentNode.style.display="block",c.map.panoContainer.style.display="none",c.map.panoContainer.innerHTML="",c._pano=null,c._exitEvent.raiseEvent()},this._enterEvent=new o,this._exitEvent=new o,this._cancelEvent=new o}var c;return t(u.prototype,{heading:{get:function(){return this._heading},set:function(t){this._heading=t}},pitch:{get:function(){return this._pitch},set:function(t){this._pitch=t}},navigationControl:{get:function(){return this._navigationControl},set:function(t){this._navigationControl=t}},linksControl:{get:function(){return this._linksControl},set:function(t){this._linksControl=t}},cancel:{get:function(){return this._cancel},set:function(t){this._cancel=t}}}),u.prototype.mouseMove=function(t,e,n,i,r,o,a){var s=c.toolTip.content.indexOf("c._lastScreenX?c.toolTip.content=c.toolTip.content.replace(l,'
'):n')),c._lastScreenX=n,c._lastScreenY=i;var u=new h({x:r,y:o,spatialReference:c.map.getSrid()});c.toolTip.anchor=u},u.prototype.mouseClick=function(t,e,n,i,r,o,a){this._lastScreenX=n,this._lastScreenY=i;var s=new h({x:r,y:o,spatialReference:c.map.getSrid()});this.toolTip.anchor=s},u.prototype.addEnterEvent=function(t){this._enterEvent.addEventListener(t,this)},u.prototype.removeEnterEvent=function(t){this._enterEvent.removeEventListener(t,this)},u.prototype.addExitEvent=function(t){this._exitEvent.addEventListener(t,this)},u.prototype.removeExitEvent=function(t){this._exitEvent.removeEventListener(t,this)},u.prototype.addCancelEvent=function(t){this._cancelEvent.addEventListener(t,this)},u.prototype.removeCancelEvent=function(t){this._cancelEvent.removeEventListener(t,this)},l.exports=u}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(305),n,e,t],void 0===(r=function(t,e,n,i,r){function o(t){e.call(this,t),this.container={},this.elements=[],this.IdContainer={},this.tooltips=[],this.excluseLayerIds=t.excluseLayerIds||[],this.map=t.map.map,this.lastTip=null,t.baseUrl;var s=this;this.createContainer=function(e){var n=document.createElement("div");function i(){for(var t=0,e=s.elements.length;tt[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=t.minX&&e.maxY>=t.minY}function dt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function yt(t,e,n,i,r){for(var o,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=i||(o=e+Math.ceil((n-e)/i/2)*i,Po(t,o,e,n,r),a.push(e,o,o,n))}function mt(t,e){return t(e={exports:{}},e.exports),e.exports}function gt(t,e){if(!(this instanceof gt))return new gt(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||function(t,e){return t>1)-1;0<=n;n--)this._down(n)}function vt(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;for(var i,r=function(t){for(var e=t[0],n=t[0],i=t[0],r=t[0],o=0;oi[0]&&(i=a),a[1]r[1]&&(r=a)}var s=[e,n,i,r],l=s.slice();for(o=0;o1&&Lo(i[o[u-2]],i[o[u-1]],l)<=0;)u-=1,o.pop();for(o.push(s),u=a.length;u>1&&Lo(i[a[u-2]],i[a[u-1]],l)>=0;)u-=1,a.pop();a.push(s)}e=new Array(a.length+o.length-2);for(var h=0,c=(n=0,o.length);n0;--p)e[h++]=a[p];return e}(l),h=[];for(o=0;o=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function wt(t,e,n){for(var i=Math.min(t[0],e[0]),r=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),a=Math.max(t[1],e[1]),s=n.search({minX:i,minY:r,maxX:o,maxY:a}),l=0;l=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===a&&(o=[o]);for(var l=0,u=!1;lt[1]!=u>t[1]&&t[0]<(l-a)*(t[1]-s)/(u-s)+a&&(i=!i)}return i}function It(t,e){var n=[];return T(e,function(e){S(t,function(t){At(t,e)&&n.push(t)})}),B(n)}function Lt(t,n){if("FeatureCollection"!==t.type)throw new Error("points must be a FeatureCollection");var o=!1;return B(function(t){if(t.length<3)return[];t.sort(Ot);for(var e,n,i,r,o,a,s=t.length-1,l=t[s].x,u=t[0].x,h=t[s].y,c=h;s--;)t[s].yc&&(c=t[s].y);var p,f=u-l,d=c-h,y=dv[p].r?(x.push(v[p]),v.splice(p,1)):(d=t[s].y-v[p].y,f*f+d*d>v[p].r||(_.push(v[p].a,v[p].b,v[p].b,v[p].c,v[p].c,v[p].a),v.splice(p,1)));for(Nt(_),p=_.length;p;)n=_[--p],e=_[--p],i=t[s],r=n.x-e.x,o=n.y-e.y,a=2*(r*(i.y-n.y)-o*(i.x-n.x)),1e-12a&&(r=n[0],n[0]=n[o],n[o]=r,a=i);return n})}}function Vt(t,e,n){for(var i,r=e+(n---e>>1);es&&(s=e),nl&&(l=n)}function i(t){t.forEach(n)}function r(t){t.forEach(i)}var o=1/0,a=1/0,s=-1/0,l=-1/0,u={GeometryCollection:function(t){t.geometries.forEach(e)},Point:function(t){n(t.coordinates)},MultiPoint:function(t){t.coordinates.forEach(n)},LineString:function(t){i(t.arcs)},MultiLineString:function(t){t.arcs.forEach(i)},Polygon:function(t){t.arcs.forEach(i)},MultiPolygon:function(t){t.arcs.forEach(r)}};for(var h in t)e(t[h]);return s>=o&&l>=a?[o,a,s,l]:void 0}(t=function(t){var e,n={};for(e in t)n[e]=qt(t[e]);return n}(t)),a=e>0&&o&&function(t,e,n){function i(t){return[Math.round((t[0]-c)*f),Math.round((t[1]-p)*d)]}function r(t,e){for(var n,i,r,o,a,s=-1,l=0,u=t.length,h=new Array(u);++s=Math.abs(h)?0=kt(t.slice(0,2),[e,r])){var o=(n+r)/2;return[e,o-(i-e)/2,i,o+(i-e)/2]}var a=(e+i)/2;return[a-(r-n)/2,n,a+(r-n)/2,r]}function oe(t,e,n,i){if(!W(i=i||{}))throw new Error("options is invalid");var r=i.units,o=i.properties,a=X(t),s=v(a[0]),l=v(a[1]),u=v(n),h=y(e,r),c=Math.asin(Math.sin(l)*Math.cos(h)+Math.cos(l)*Math.sin(h)*Math.cos(u));return j([f(s+Math.atan2(Math.sin(u)*Math.sin(h)*Math.cos(l),Math.cos(h)-Math.sin(l)*Math.sin(c))),f(c)],o)}function ae(t,e,n){var i=(n=n||{}).steps||64,r=n.properties;if(!t)throw new Error("center is required");if(!e)throw new Error("radius is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof i)throw new Error("steps must be a number");i=i||64,r=r||t.properties||{};for(var o=[],a=0;a=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&a=i.x&&i.x>=h&&r!==i.x&&me(on.x)&&_e(i,t)&&(n=i,p=l),i=i.next;return n}(t,e)){var n=we(e,t);fe(n,n.next)}}(u[r],n),n=fe(n,n.next);return n}(t,e,p,n)),t.length>80*n){i=o=t[0],r=a=t[1];for(var d=n;do.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,h=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,c=ye(s,l,e,n,i),p=ye(u,h,e,n,i),f=t.nextZ;f&&f.z<=p;){if(f!==t.prev&&f!==t.next&&me(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&0<=ge(f.prev,f,f.next))return!1;f=f.nextZ}for(f=t.prevZ;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&me(r.x,r.y,o.x,o.y,a.x,a.y,f.x,f.y)&&0<=ge(f.prev,f,f.next))return!1;f=f.prevZ}return!0}(t,i,r,o):function(t){var e=t.prev,n=t,i=t.next;if(0<=ge(e,n,i))return!1;for(var r=t.next.next;r!==t.prev;){if(me(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&0<=ge(r.prev,r,r.next))return!1;r=r.next}return!0}(t))e.push(s.i/n),e.push(t.i/n),e.push(l.i/n),Pe(t),t=l.next,h=l.next;else if((t=l)===h){a?1===a?u(t=function(t,e,n){var i=t;do{var r=i.prev,o=i.next.next;!ve(r,o)&&xe(r,i,i.next,o)&&_e(r,o)&&_e(o,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(o.i/n),Pe(i),Pe(i.next),i=t=o),i=i.next}while(i!==t);return i}(t,e,n),e,n,i,r,o,2):2===a&&function(t,e,n,i,r,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&function(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&xe(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&_e(t,e)&&_e(e,t)&&function(t,e){for(var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),(n=n.next)!==t;);return i}(t,e)}(a,s)){var l=we(a,s);return a=fe(a,a.next),l=fe(l,l.next),u(a,e,n,i,r,o),u(l,e,n,i,r,o)}s=s.next}a=a.next}while(a!==t)}(t,e,n,i,r,o):u(fe(t),e,n,i,r,o,1);break}}}(p,f,n,i,r,u),f}function pe(t,e,n,i,r){var o,a;if(r===0=t.minX&&e.maxY>=t.minY}function je(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ve(t,e,n,i,r){for(var o,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=i||(Ae(t,o=e+Math.ceil((n-e)/i/2)*i,e,n,r),a.push(e,o,o,n))}function qe(t){var e=Ie(t);return e.insert=function(t){if(Array.isArray(t)){var e=t;(t=Be(e)).bbox=e}else t.bbox=t.bbox?t.bbox:Ue(t);return Ie.prototype.insert.call(this,t)},e.load=function(t){var n=[];return Array.isArray(t)?t.forEach(function(t){var e=Be(t);e.bbox=t,n.push(e)}):S(t,function(t){t.bbox=t.bbox?t.bbox:Ue(t),n.push(t)}),Ie.prototype.load.call(this,n)},e.remove=function(t){if(Array.isArray(t)){var e=t;(t=Be(e)).bbox=e}return Ie.prototype.remove.call(this,t)},e.clear=function(){return Ie.prototype.clear.call(this)},e.search=function(t){return{type:"FeatureCollection",features:Ie.prototype.search.call(this,this.toBBox(t))}},e.collides=function(t){return Ie.prototype.collides.call(this,this.toBBox(t))},e.all=function(){return{type:"FeatureCollection",features:Ie.prototype.all.call(this)}},e.toJSON=function(){return Ie.prototype.toJSON.call(this)},e.fromJSON=function(t){return Ie.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;return{minX:(e=t.bbox?t.bbox:Array.isArray(t)&&4===t.length?t:Ue(t))[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}function Be(t){var e=[t[0],t[1]],n=[t[0],t[3]],i=[t[2],t[3]];return{type:"Feature",bbox:t,properties:{},geometry:{type:"Polygon",coordinates:[[e,[t[2],t[1]],i,n,e]]}}}function Ue(t){var e=[1/0,1/0,-1/0,-1/0];return b(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2] line1 must only contain 2 coordinates");if(2!==i.length)throw new Error(" line2 must only contain 2 coordinates");var r=n[0][0],o=n[0][1],a=n[1][0],s=n[1][1],l=i[0][0],u=i[0][1],h=i[1][0],c=i[1][1],p=(c-u)*(a-r)-(h-l)*(s-o),f=(h-l)*(o-u)-(c-u)*(r-l),d=(a-r)*(o-u)-(s-o)*(r-l);if(0==p)return null;var y=f/p,m=d/p;return 0<=y&&y<=1&&0<=m&&m<=1?j([r+y*(a-r),o+y*(s-o)]):null}function He(t,p,f){if(!W(f=f||{}))throw new Error("options is invalid");var e=t.geometry?t.geometry.type:t.type;if("LineString"!==e&&"MultiLineString"!==e)throw new Error("lines must be LineString or MultiLineString");var d=j([1/0,1/0],{dist:1/0}),y=0;return E(t,function(t){for(var e=k(t),n=0;nMath.PI&&(r-=2*Math.PI),r<-Math.PI&&(r+=2*Math.PI);var o=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(f(Math.atan2(r,o))+360)%360}function Je(t,e,n){if(!W(n=n||{}))throw new Error("options is invalid");var i=n.units;if(!t)throw new Error("from point is required");if(!e)throw new Error("to point is required");var r=X(t),o=X(e);return o[0]+=180Math.PI&&(s-=2*Math.PI);var l=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),u=1e-11n&&(i[0]=n),i[0]<-n&&(i[0]=-n),i[1]>n&&(i[1]=n),i[1]<-n&&(i[1]=-n),i}function nn(t){var e=180/Math.PI;return[t[0]*e/6378137,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/6378137)))*e]}function rn(t,e,r){if(!W(r=r||{}))throw new Error("options is invalid");if(!t)throw new Error("pt is required");if(Array.isArray(t)?t=j(t):"Point"===t.type?t=G(t):F(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=q(e):"LineString"===e.type?e=G(e):F(e,"LineString","line");var o=1/0,a=t.geometry.coordinates;return L(e,function(t){var e=t.geometry.coordinates[0],n=t.geometry.coordinates[1],i=function(t,e,n,i){var r=i.mercator,o=!0!==r?kt(e,t,i):on(e,t,i),a=p(!0!==r?se(e,t):Ye(e,t)),s=p(!0!==r?se(e,n):Ye(e,n)),l=Math.abs(a-s);if(90=Math.abs(f)?0=Math.abs(f)?0=Math.abs(f)?0=Math.abs(f)?0e[0]||t[2]e[1]||t[3] is required");if("number"!=typeof n)throw new Error(" must be a number");if("number"!=typeof i)throw new Error(" must be a number");!1!==r&&void 0!==r||(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,n);return b(t,function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var i=0;ie[2]&&(n|=2),t[1]e[3]&&(n|=8),n}function Dn(t,e){for(var n=[],i=0;iMath.PI/2&&(u=0=Math.abs(a)?0e[0]||t[2]e[1]||t[3]=Math.abs(s)?0=Math.abs(s)?0=r)return}else l=[y,n];o=[y,r]}else{if(l){if(l[1]=r)return}else l=[(n-s)/a,n];o=[(r-s)/a,r]}else{if(l){if(l[1]=i)return}else l=[e,a*e+s];o=[i,a*i+s]}else{if(l){if(l[0]Os)s=s.L;else{if(!((r=o-function(t,e){var n=t.N;if(n)return Zi(n,e);var i=t.site;return i[1]===e?i[0]:1/0}(s,a))>Os)){-OsOs||Math.abs(r[0][1]-r[1][1])>Os)||delete Is[o]}(a,s,l,u),function(t,e,n,i){var r,o,a,s,l,u,h,c,p,f,d,y,m,g,v=As.length,x=!0;for(r=0;rOs||Math.abs(y-p)>Os)&&(l.splice(s,0,Is.push(ki(a,f,Math.abs(d-t)M}function d(t,e,n){var i=[1,0,0],r=Fr(zr(t),zr(e)),o=Dr(r,r),a=r[0],s=o-a*a;if(!s)return!n&&t;var l=M*o/s,u=-M*a/s,h=Fr(i,r),c=jr(i,l);Gr(c,jr(r,u));var p=h,f=Dr(c,p),d=Dr(p,p),y=f*f-d*(Dr(c,c)-1);if(!(y<0)){var m=xf(y),g=jr(p,(-f-m)/d);if(Gr(g,c),g=kr(g),!n)return g;var v,x=t[0],_=e[0],w=t[1],b=e[1];_0^g[1]<(pf(g[0]-x)af^(x<=g[0]&&g[0]<=_)){var C=jr(p,(-f+m)/d);return Gr(C,c),[g,kr(C)]}}}function y(t,e){var n=m?r:af-r,i=0;return t<-n?i|=1:t>n&&(i|=2),e<-n?i|=4:e>n&&(i|=8),i}var M=yf(r),m=M>0,g=pf(M)>of;return jf(f,function(s){var l,u,h,c,p;return{lineStart:function(){c=h=!1,p=1},point:function(t,e){var n,i=[t,e],r=f(t,e),o=m?r?0:y(t,e):r?y(t+(t<0?af:-af),e):0;if(!l&&(c=h=r)&&s.lineStart(),r!==h&&(!(n=d(l,i))||Tf(l,n)||Tf(i,n))&&(i[0]+=of,i[1]+=of,r=f(i[0],i[1])),r!==h)p=0,r?(s.lineStart(),n=d(i,l),s.point(n[0],n[1])):(n=d(l,i),s.point(n[0],n[1]),s.lineEnd()),l=n;else if(g&&l&&m^r){var a;o&u||!(a=d(i,l,!0))||(p=0,m?(s.lineStart(),s.point(a[0][0],a[0][1]),s.point(a[1][0],a[1][1]),s.lineEnd()):(s.point(a[1][0],a[1][1]),s.lineEnd(),s.lineStart(),s.point(a[0][0],a[0][1])))}!r||l&&Tf(l,i)||s.point(i[0],i[1]),l=i,h=r,u=o},lineEnd:function(){h&&s.lineEnd(),l=null},clean:function(){return p|(c&&h)<<1}}},function(t,e,n,i){!function(t,e,n,i,r,o){if(n){var a=yf(e),s=vf(e),l=i*n;null==r?(r=e+i*uf,o=e-l/2):(r=Xr(a,r),o=Xr(a,o),(i>0?ro)&&(r+=i*uf));for(var u,h=r;i>0?h>o:hthis._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=dt(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,ot(n,this.toBBox),ot(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=dt([t,e]),this.data.height=t.height+1,this.data.leaf=!1,ot(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,a,s,l,u,h;for(l=u=1/0,i=e;i<=n-e;i++)a=function(t,e){var n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}(r=at(t,0,i,this.toBBox),o=at(t,i,n,this.toBBox)),s=ht(r)+ht(o),a>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function p(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],n=0;n>1,o=e[r];if(0<=n(i,o))break;e[t]=o,t=r}e[t]=i},_down:function(t){for(var e=this.data,n=this.compare,i=this.length>>1,r=e[t];t=o)throw new Error("full hashmap");i=u[n=n+1&c]}return u[n]=t,h[n]=e},maybeSet:function(t,e){for(var n=a(t)&c,i=u[n],r=0;i!=l;){if(s(i,t))return h[n];if(++r>=o)throw new Error("full hashmap");i=u[n=n+1&c]}return u[n]=t,h[n]=e},get:function(t,e){for(var n=a(t)&c,i=u[n],r=0;i!=l;){if(s(i,t))return h[n];if(++r>=o)break;i=u[n=n+1&c]}return e},keys:function(){for(var t=[],e=0,n=u.length;e>7^Wo[2]^Wo[3])},Xo=function(t){var e,n,i,r=function(t){function e(t,e,n,i){if(p[n]!==t){p[n]=t;var r=f[n];if(r>=0){var o=d[n];r===e&&o===i||r===i&&o===e||(++m,y[n]=1)}else f[n]=e,d[n]=i}}function r(t){return Zo(l[t])}function o(t,e){return qo(l[t],l[e])}var n,i,a,s,l=t.coordinates,u=t.lines,h=t.rings,c=function(){for(var t=Vo(1.4*l.length,r,o,Int32Array,-1,Int32Array),e=new Int32Array(l.length),n=0,i=l.length;n=r)throw new Error("full hashset");n=l[e=e+1&u]}return l[e]=t,!0},has:function(t){for(var e=o(t)&u,n=l[e],i=0;n!=s;){if(a(n,t))return!0;if(++i>=r)break;n=l[e=e+1&u]}return!1},values:function(){for(var t=[],e=0,n=l.length;et&&(e.push(i),n=r)}return e},Yo.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},Yo.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(1<=n)return this.points[this.length-1];var i=Math.floor((this.points.length-1)*n);return function(t,e,n,i,r){var o=function(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}(t);return{x:r.x*o[0]+i.x*o[1]+n.x*o[2]+e.x*o[3],y:r.y*o[0]+i.y*o[1]+n.y*o[2]+e.y*o[3],z:r.z*o[0]+i.z*o[1]+n.z*o[2]+e.z*o[3]}}((this.length-1)*n-i,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])};var Ko=ce,Jo=ce;ce.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(Ce(t,0,o,n));if(r)for(var s=0,l=e.length;sthis._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=je(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,Le(n,this.toBBox),Le(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=je([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Le(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,a,s,l,u,h;for(l=u=1/0,i=e;i<=n-e;i++)a=function(t,e){var n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}(r=Re(t,0,i,this.toBBox),o=Re(t,i,n,this.toBBox)),s=ze(r)+ze(o),a=1||u<=0||h>=1||h<=0)){var c=l,p=!m[c];p&&(m[c]=!0),f?y.push(f(l,t,e,r,o,u,n,i,a,s,h,p)):y.push(l)}}}function n(t,e){var n,i,r,o,a=d[t][e],s=d[t][e+1];return a[0]d[e.isect].coord?-1:1}),c=[];0p){var w=parseFloat(n[x-1][0]),b=parseFloat(n[x-1][1]),P=parseFloat(n[x][0]),S=parseFloat(n[x][1]);if(-180h&&n[x-1][0]<180){v.push([180,n[x][1]]),x++,v.push([n[x][0],n[x][1]]);continue}if(wh?180:-180,A]),(v=[]).push([n[x-1][0]>h?-180:180,A]),g.push(v)}else v=[],g.push(v);v.push([_,n[x][1]])}else v.push([n[x][0],n[x][1]])}}else{var E=[];g.push(E);for(var I=0;I "+this.to.id+" }"},os.prototype.toLineString=function(){return q([this.from.coordinates,this.to.coordinates])},os.prototype.compareTo=function(t){return si(t.from.coordinates,t.to.coordinates,this.to.coordinates)};var as=function(){this.edges=[],this.polygon=void 0,this.envelope=void 0},ss={length:{configurable:!0}};as.prototype.push=function(t){this[this.edges.length]=t,this.edges.push(t),this.polygon=this.envelope=void 0},as.prototype.get=function(t){return this.edges[t]},ss.length.get=function(){return this.edges.length},as.prototype.forEach=function(t){this.edges.forEach(t)},as.prototype.map=function(t){return this.edges.map(t)},as.prototype.some=function(t){return this.edges.some(t)},as.prototype.isValid=function(){return!0},as.prototype.isHole=function(){var i=this,t=this.edges.reduce(function(t,e,n){return e.from.coordinates[1]>i.edges[t].from.coordinates[1]&&(t=n),t},0),e=(0===t?this.length:t)-1,n=(t+1)%this.length,r=si(this.edges[e].from.coordinates,this.edges[t].from.coordinates,this.edges[n].from.coordinates);return 0===r?this.edges[e].from.coordinates[0]>this.edges[n].from.coordinates[0]:0=this.minPts&&(e=this._mergeArrays(e,r))}1!==this._assigned[i]&&this._addToCluster(i,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],n=0;n=this.minPts)return n},e.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],i=0,r=this.dataset.length;i0;i.length0;){var s=t[Math.floor(Math.random()*o)],l=a?s.join("_"):""+s;n[l]||(n[l]=!0,i.push(s))}if(i.length0,a=t[Math.floor(Math.random()*r)];for(o&&a.join("_"),i.push(a);i.length>1)-1,i=this.content[n];if(!(this.scoreFunction(e)=n)return null;for(var i=a-l.site[0],r=s-l.site[1],c=i*i+r*r;l=u.cells[e=h],h=null,l.halfedges.forEach(function(t){var e=u.edges[t],n=e.left;if(n!==l.site&&n||(n=e.right)){var i=a-n[0],r=s-n[1],o=i*i+r*r;oe.x?1:this.ye.y?1:0},Us.prototype.clone=function(){},Us.prototype.copy=function(){return new Us(this)},Us.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},Us.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},Us.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},Us.prototype.hashCode=function(){var t=17;return t=37*(t=37*t+Us.hashCode(this.x))+Us.hashCode(this.y)},Us.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},Us.prototype.interfaces_=function(){return[Vs,qs,pr]},Us.prototype.getClass=function(){return Us},Us.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=Gs.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},Ws.DimensionalComparator.get=function(){return Zs},Ws.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},Ws.NULL_ORDINATE.get=function(){return Gs.NaN},Ws.X.get=function(){return 0},Ws.Y.get=function(){return 1},Ws.Z.get=function(){return 2},Object.defineProperties(Us,Ws);var Zs=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new Fs("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};Zs.prototype.compare=function(t,e){var n=t,i=e,r=Zs.compare(n.x,i.x);if(0!==r)return r;var o=Zs.compare(n.y,i.y);return 0!==o?o:this._dimensionsToTest<=2?0:Zs.compare(n.z,i.z)},Zs.prototype.interfaces_=function(){return[Bs]},Zs.prototype.getClass=function(){return Zs},Zs.compare=function(t,e){return tt?1:0},tl.isNaN=function(t){return Number.isNaN(t)};var el=function(){};el.isWhitespace=function(t){return t<=32&&0<=t||127===t},el.toUpperCase=function(t){return t.toUpperCase()};var nl=function t(){if(this._hi=0,(this._lo=0)===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var i=arguments[0];t.call(this,t.parse(i))}}else if(2===arguments.length){var r=arguments[0],o=arguments[1];this.init(r,o)}},il={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};nl.prototype.le=function(t){return(this._hi=s-l&&(p=!1),!p)break}return e[0]=i,a.toString()},nl.prototype.sqr=function(){return this.multiply(this)},nl.prototype.doubleValue=function(){return this._hi+this._lo},nl.prototype.subtract=function(){if(arguments[0]instanceof nl){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},nl.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},nl.prototype.isZero=function(){return 0===this._hi&&0===this._lo},nl.prototype.selfSubtract=function(){if(arguments[0]instanceof nl){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},nl.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},nl.prototype.min=function(t){return this.le(t)?this:t},nl.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof nl){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,a=null,s=null,l=null,u=null,h=null,c=null;return l=this._hi/n,c=(r=(u=nl.SPLIT*l)-(r=u-l))*(a=(c=nl.SPLIT*n)-(a=c-n))-(h=l*n)+r*(s=n-a)+(o=l-r)*a+o*s,u=(this._hi-h-c+this._lo-l*i)/n,c=l+u,this._hi=c,this._lo=l-c+u,this}},nl.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},nl.prototype.divide=function(){if(arguments[0]instanceof nl){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,a=null,s=null,l=null;return n=(o=this._hi/t._hi)-(e=(a=nl.SPLIT*o)-(e=a-o)),l=e*(i=(l=nl.SPLIT*t._hi)-(i=l-t._hi))-(s=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,a=(this._hi-s-l+this._lo-o*t._lo)/t._hi,new nl(l=o+a,o-l+a)}if("number"==typeof arguments[0]){var u=arguments[0];return Gs.isNaN(u)?nl.createNaN():nl.copy(this).selfDivide(u,0)}},nl.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},nl.prototype.pow=function(t){if(0===t)return nl.valueOf(1);var e=new nl(this),n=nl.valueOf(1),i=Math.abs(t);if(1e._hi?1:this._loe._lo?1:0},nl.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},nl.prototype.setValue=function(){if(arguments[0]instanceof nl){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},nl.prototype.max=function(t){return this.ge(t)?this:t},nl.prototype.sqrt=function(){if(this.isZero())return nl.valueOf(0);if(this.isNegative())return nl.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=nl.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},nl.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof nl){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,a=null,s=null;return r=this._hi+e,a=r-this._hi,o=r-a,o=e-a+(this._hi-o),s=o+this._lo,i=s+(r-(n=r+s)),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var l=arguments[0],u=arguments[1],h=null,c=null,p=null,f=null,d=null,y=null,m=null;f=this._hi+l,c=this._lo+u,d=f-(y=f-this._hi),p=c-(m=c-this._lo);var g=(h=f+(y=(d=l-y+(this._hi-d))+c))+(y=(p=u-m+(this._lo-p))+(y+(f-h))),v=y+(h-g);return this._hi=g,this._lo=v,this}},nl.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof nl){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,a=null,s=null,l=null,u=null;r=(l=nl.SPLIT*this._hi)-this._hi,u=nl.SPLIT*n,r=l-r,o=this._hi-r,a=u-n;var h=(l=this._hi*n)+(u=r*(a=u-a)-l+r*(s=n-a)+o*a+o*s+(this._hi*i+this._lo*n)),c=u+(r=l-h);return this._hi=h,this._lo=c,this}},nl.prototype.selfSqr=function(){return this.selfMultiply(this)},nl.prototype.floor=function(){if(this.isNaN())return nl.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new nl(t,e)},nl.prototype.negate=function(){return this.isNaN()?this:new nl(-this._hi,-this._lo)},nl.prototype.clone=function(){},nl.prototype.multiply=function(){if(arguments[0]instanceof nl){var t=arguments[0];return t.isNaN()?nl.createNaN():nl.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return Gs.isNaN(e)?nl.createNaN():nl.copy(this).selfMultiply(e,0)}},nl.prototype.isNaN=function(){return Gs.isNaN(this._hi)},nl.prototype.intValue=function(){return Math.trunc(this._hi)},nl.prototype.toString=function(){var t=nl.magnitude(this._hi);return-3<=t&&t<=20?this.toStandardNotation():this.toSciNotation()},nl.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+nl.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){var o=i-n.length;r=n+nl.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+r:r},nl.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,a=null,s=null;e=(r=1/this._hi)-(t=(o=nl.SPLIT*r)-(t=o-r)),n=(s=nl.SPLIT*this._hi)-this._hi;var l=r+(o=(1-(a=r*this._hi)-(s=t*(n=s-n)-a+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new nl(l,r-l+o)},nl.prototype.toSciNotation=function(){if(this.isZero())return nl.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=nl.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var r="";1t._hi||this._hi===t._hi)&&this._lo>t._lo},nl.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},nl.prototype.trunc=function(){return this.isNaN()?nl.NaN:this.isPositive()?this.floor():this.ceil()},nl.prototype.signum=function(){return 0t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},pl.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof pl){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||ithis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(nthis._maxx&&(this._maxx=n),ithis._maxy&&(this._maxy=i))}},pl.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},pl.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},pl.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},pl.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},pl.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},pl.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return ethis._maxx||this._miny>this._maxy)&&this.setToNull()}},pl.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof pl){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof Us){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},pl.prototype.centre=function(){return this.isNull()?null:new Us((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},pl.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof Us){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof pl){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];rt._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},pl.prototype.hashCode=function(){var t=17;return t=37*(t=37*(t=37*(t=37*t+Us.hashCode(this._minx))+Us.hashCode(this._maxx))+Us.hashCode(this._miny))+Us.hashCode(this._maxy)},pl.prototype.interfaces_=function(){return[Vs,pr]},pl.prototype.getClass=function(){return pl},pl.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),l=Math.max(o.x,a.x),u=Math.min(i.x,r.x),h=Math.max(i.x,r.x);return!(lthis.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},bl.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},bl.prototype.setPrecisionModel=function(t){this._precisionModel=t},bl.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;en.y&&(n=o,i=r)}for(var a=i;(a-=1)<0&&(a=e),t[a].equals2D(n)&&a!==i;);for(var s=i;t[s=(s+1)%e].equals2D(n)&&s!==i;);var l=t[a],u=t[s];if(l.equals2D(n)||u.equals2D(n)||l.equals2D(u))return!1;var h=Tl.computeOrientation(l,n,u);return 0===h?l.x>u.x:0=this.size())throw new Vl;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=t?e:[]},Xl.indexOf=function(t,e){for(var n=0;n=t.length&&(i=0),ni.length)return 1;if(0===n.length)return 0;var r=Xl.compare(n,i);return Xl.isEqualReversed(n,i)?0:r},Kl.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.lengthi.length)return 1;if(0===n.length)return 0;for(var r=Xl.increasingDirection(n),o=Xl.increasingDirection(i),a=0= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(mu),Pu=function(n){function i(){n.apply(this,arguments)}n&&(i.__proto__=n),(i.prototype=Object.create(n&&n.prototype)).constructor=i;var t={serialVersionUID:{configurable:!0}};return i.prototype.getSortIndex=function(){return Il.SORTINDEX_MULTIPOLYGON},i.prototype.equalsExact=function(){if(2!==arguments.length)return n.prototype.equalsExact.apply(this,arguments);var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&n.prototype.equalsExact.call(this,t,e)},i.prototype.getBoundaryDimension=function(){return 1},i.prototype.getDimension=function(){return 2},i.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n=this.size())throw new Error;return this.array_[t]},Mr.prototype.push=function(t){return this.array_.push(t),t},Mr.prototype.pop=function(t){if(0===this.array_.length)throw new Cr;return this.array_.pop()},Mr.prototype.peek=function(){if(0===this.array_.length)throw new Cr;return this.array_[this.array_.length-1]},Mr.prototype.empty=function(){return 0===this.array_.length},Mr.prototype.isEmpty=function(){return this.empty()},Mr.prototype.search=function(t){return this.array_.indexOf(t)},Mr.prototype.size=function(){return this.array_.length},Mr.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;ethis._minCoord.y&&n.y>this._minCoord.y&&i===Tl.CLOCKWISE&&(r=!0),r&&(this._minIndex=this._minIndex-1)},Hu.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Zu.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Hu.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Hu.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}wl.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Zu.LEFT&&(this._orientedDe=this._minDe.getSym())},Hu.prototype.interfaces_=function(){return[]},Hu.prototype.getClass=function(){return Hu};var Yu=function(n){function i(t,e){n.call(this,i.msgWithCoord(t,e)),this.pt=e?new Us(e):null,this.name="TopologyException"}return n&&(i.__proto__=n),((i.prototype=Object.create(n&&n.prototype)).constructor=i).prototype.getCoordinate=function(){return this.pt},i.prototype.interfaces_=function(){return[]},i.prototype.getClass=function(){return i},i.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},i}(xl),Ku=function(){this.array_=[]};Ku.prototype.addLast=function(t){this.array_.push(t)},Ku.prototype.removeFirst=function(){return this.array_.shift()},Ku.prototype.isEmpty=function(){return 0===this.array_.length};var Ju=function(){this._finder=null,this._dirEdgeList=new Ul,this._nodes=new Ul,this._rightMostCoord=null,this._env=null,this._finder=new Hu};Ju.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Ju.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ju.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Yu("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Ju.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Zu.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ju.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ju.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();1<=e.getDepth(Zu.RIGHT)&&e.getDepth(Zu.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ju.prototype.computeDepths=function(t){var e=new $l,n=new Ku,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(n.addLast(s),e.add(s))}}}},Ju.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Ju.prototype.getEnvelope=function(){if(null===this._env){for(var t=new pl,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;ithis.location.length){var e=new Array(3).fill(null);e[Zu.ON]=this.location[Zu.ON],e[Zu.LEFT]=Hs.NONE,e[Zu.RIGHT]=Hs.NONE,this.location=e}for(var n=0;nthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},th.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o=n.x?i.y>=n.y?ah.NE:ah.SE:i.y>=n.y?ah.NW:ah.SW}},sh.NE.get=function(){return 0},sh.NW.get=function(){return 1},sh.SW.get=function(){return 2},sh.SE.get=function(){return 3},Object.defineProperties(ah,sh);var lh=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this._edge=r,this.init(o,a),this._label=s}};lh.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrantwh.area(this._boundable2)?this.expand(this._boundable1,this._boundable2,t,e):this.expand(this._boundable2,this._boundable1,t,e),null;if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new Fs("neither boundable is composite")},wh.prototype.isLeaves=function(){return!(wh.isComposite(this._boundable1)||wh.isComposite(this._boundable2))},wh.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},wh.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),a=new wh(o,e,this._itemDistance);a.getDistance()>32),n=Gs.doubleToLongBits(this.p1.x);return n^=31*Gs.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},kh.prototype.interfaces_=function(){return[Vs,pr]},kh.prototype.getClass=function(){return kh},kh.midPoint=function(t,e){return new Us((t.x+e.x)/2,(t.y+e.y)/2)},zh.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(kh,zh);var Dh=function(){this.tempEnv1=new pl,this.tempEnv2=new pl,this._overlapSeg1=new kh,this._overlapSeg2=new kh};Dh.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},Dh.prototype.interfaces_=function(){return[]},Dh.prototype.getClass=function(){return Dh};var Fh=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};Fh.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},Fh.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var i=ah.quadrant(t[n],t[n+1]),r=e+1;rn.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.SegmentOverlapAction.get=function(){return Bh},Object.defineProperties(t,n),t}(Vh),Bh=function(a){function t(){a.call(this),this._si=null;var t=arguments[0];this._si=t}return a&&(t.__proto__=a),((t.prototype=Object.create(a&&a.prototype)).constructor=t).prototype.overlap=function(){if(4!==arguments.length)return a.prototype.overlap.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3],r=t.getContext(),o=n.getContext();this._si.processIntersections(r,e,o,i)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Dh),Uh=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},Wh={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Uh.prototype.getEndCapStyle=function(){return this._endCapStyle},Uh.prototype.isSingleSided=function(){return this._isSingleSided},Uh.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Uh.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Uh.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Uh.JOIN_ROUND&&(this._quadrantSegments=Uh.DEFAULT_QUADRANT_SEGMENTS)},Uh.prototype.getJoinStyle=function(){return this._joinStyle},Uh.prototype.setJoinStyle=function(t){this._joinStyle=t},Uh.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Uh.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Uh.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Uh.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Uh.prototype.getMitreLimit=function(){return this._mitreLimit},Uh.prototype.setMitreLimit=function(t){this._mitreLimit=t},Uh.prototype.setSingleSided=function(t){this._isSingleSided=t},Uh.prototype.interfaces_=function(){return[]},Uh.prototype.getClass=function(){return Uh},Uh.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Wh.CAP_ROUND.get=function(){return 1},Wh.CAP_FLAT.get=function(){return 2},Wh.CAP_SQUARE.get=function(){return 3},Wh.JOIN_ROUND.get=function(){return 1},Wh.JOIN_MITRE.get=function(){return 2},Wh.JOIN_BEVEL.get=function(){return 3},Wh.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Wh.DEFAULT_MITRE_LIMIT.get=function(){return 5},Wh.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Uh,Wh);var Zh=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Tl.COUNTERCLOCKWISE,this._inputLine=t||null},Xh={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Zh.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[n];return!!this.isConcave(r,o,a)&&!!this.isShallow(r,o,a,i)&&this.isShallowSampled(r,o,t,n,i)},Zh.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;nMath.PI;)t-=Kh.PI_TIMES_2;for(;t<=-Math.PI;)t+=Kh.PI_TIMES_2;return t},Kh.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},Kh.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return 0Math.PI&&(n=2*Math.PI-n),n},Kh.toRadians=function(t){return t*Math.PI/180},Kh.getTurn=function(t,e){var n=Math.sin(e-t);return 0Math.PI?r-Kh.PI_TIMES_2:r},Jh.PI_TIMES_2.get=function(){return 2*Math.PI},Jh.PI_OVER_2.get=function(){return Math.PI/2},Jh.PI_OVER_4.get=function(){return Math.PI/4},Jh.COUNTERCLOCKWISE.get=function(){return Tl.COUNTERCLOCKWISE},Jh.CLOCKWISE.get=function(){return Tl.CLOCKWISE},Jh.NONE.get=function(){return Tl.COLLINEAR},Object.defineProperties(Kh,Jh);var Qh=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new kh,this._seg1=new kh,this._offset0=new kh,this._offset1=new kh,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new Sl,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),8<=n.getQuadrantSegments()&&n.getJoinStyle()===Uh.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},$h={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Qh.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=Tl.computeOrientation(this._s0,this._s1,this._s2),i=n===Tl.CLOCKWISE&&this._side===Zu.LEFT||n===Tl.COUNTERCLOCKWISE&&this._side===Zu.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Qh.prototype.addLineEndCap=function(t,e){var n=new kh(t,e),i=new kh;this.computeOffsetSegment(n,Zu.LEFT,this._distance,i);var r=new kh;this.computeOffsetSegment(n,Zu.RIGHT,this._distance,r);var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Uh.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,s+Math.PI/2,s-Math.PI/2,Tl.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case Uh.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case Uh.CAP_SQUARE:var l=new Us;l.x=Math.abs(this._distance)*Math.cos(s),l.y=Math.abs(this._distance)*Math.sin(s);var u=new Us(i.p1.x+l.x,i.p1.y+l.y),h=new Us(r.p1.x+l.x,r.p1.y+l.y);this._segList.addPt(u),this._segList.addPt(h)}},Qh.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Qh.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=cl.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof ul))throw t;o=new Us(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Qh.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,a=e.y-t.y,s=Math.atan2(a,o),l=n.x-t.x,u=n.y-t.y,h=Math.atan2(u,l);i===Tl.CLOCKWISE?s<=h&&(s+=2*Math.PI):h<=s&&(s-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,s,h,i,r),this._segList.addPt(n)},Qh.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)r.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(Ks(arguments[2],Bl)&&arguments[0]instanceof Us&&arguments[1]instanceof uh){for(var o=arguments[0],a=arguments[1],s=arguments[2],l=a.getEdge().getCoordinates(),u=0;uthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||Tl.computeOrientation(this._seg.p0,this._seg.p1,o)===Tl.RIGHT)){var h=a.getDepth(Zu.LEFT);this._seg.p0.equals(l[u])||(h=a.getDepth(Zu.RIGHT));var c=new ic(this._seg,h);s.add(c)}}else if(Ks(arguments[2],Bl)&&arguments[0]instanceof Us&&Ks(arguments[1],Bl))for(var p=arguments[0],f=arguments[1],d=arguments[2],y=f.iterator();y.hasNext();){var m=y.next();m.isForward()&&this.findStabbedSegments(p,m,d)}},ec.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:_h.min(e)._leftDepth},ec.prototype.interfaces_=function(){return[]},ec.prototype.getClass=function(){return ec},nc.DepthSegment.get=function(){return ic},Object.defineProperties(ec,nc);var ic=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new kh(t),this._leftDepth=e};ic.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n?n:0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},ic.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},ic.prototype.toString=function(){return this._upwardSeg.toString()},ic.prototype.interfaces_=function(){return[Vs]},ic.prototype.getClass=function(){return ic};var rc=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};rc.prototype.area=function(){return rc.area(this.p0,this.p1,this.p2)},rc.prototype.signedArea=function(){return rc.signedArea(this.p0,this.p1,this.p2)},rc.prototype.interpolateZ=function(t){if(null===t)throw new Fs("Supplied point is null.");return rc.interpolateZ(t,this.p0,this.p1,this.p2)},rc.prototype.longestSideLength=function(){return rc.longestSideLength(this.p0,this.p1,this.p2)},rc.prototype.isAcute=function(){return rc.isAcute(this.p0,this.p1,this.p2)},rc.prototype.circumcentre=function(){return rc.circumcentre(this.p0,this.p1,this.p2)},rc.prototype.area3D=function(){return rc.area3D(this.p0,this.p1,this.p2)},rc.prototype.centroid=function(){return rc.centroid(this.p0,this.p1,this.p2)},rc.prototype.inCentre=function(){return rc.inCentre(this.p0,this.p1,this.p2)},rc.prototype.interfaces_=function(){return[]},rc.prototype.getClass=function(){return rc},rc.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},rc.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},rc.det=function(t,e,n,i){return t*i-e*n},rc.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,a=n.x-r,s=i.x-r,l=n.y-o,u=i.y-o,h=a*u-s*l,c=t.x-r,p=t.y-o,f=(u*c-s*p)/h,d=(-l*c+a*p)/h;return e.z+f*(n.z-e.z)+d*(i.z-e.z)},rc.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),a=i;return a=bu.MINIMUM_VALID_SIZE&&Tl.isCCW(t)&&(o=r,a=i,n=Zu.opposite(n));var s=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(s,o,a)},oc.prototype.add=function(t){if(t.isEmpty())return null;t instanceof _u?this.addPolygon(t):t instanceof mu?this.addLineString(t):t instanceof vu?this.addPoint(t):t instanceof wu?this.addCollection(t):t instanceof hu?this.addCollection(t):t instanceof Pu?this.addCollection(t):t instanceof uu&&this.addCollection(t)},oc.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},oc.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new fr;var t=this._parent.getGeometryN(this._index++);return t instanceof uu?(this._subcollectionIterator=new sc(t),this._subcollectionIterator.next()):t},sc.prototype.remove=function(){throw new Error(this.getClass().getName())},sc.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},sc.prototype.interfaces_=function(){return[ql]},sc.prototype.getClass=function(){return sc},sc.isAtomic=function(t){return!(t instanceof uu)};var lc=function(){this._geom=null;var t=arguments[0];this._geom=t};lc.prototype.locate=function(t){return lc.locate(t,this._geom)},lc.prototype.interfaces_=function(){return[ac]},lc.prototype.getClass=function(){return lc},lc.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&Tl.isPointInRing(t,e.getCoordinates())},lc.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!lc.isPointInRing(t,n))return!1;for(var i=0;ie&&(i=1),this._depth[t][n]=i}}},_c.prototype.getDelta=function(t){return this._depth[t][Zu.RIGHT]-this._depth[t][Zu.LEFT]},_c.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?Hs.EXTERIOR:Hs.INTERIOR},_c.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},_c.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==Hs.EXTERIOR&&i!==Hs.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=_c.depthAtLocation(i):this._depth[e][n]+=_c.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===Hs.INTERIOR&&this._depth[r][o]++}},_c.prototype.interfaces_=function(){return[]},_c.prototype.getClass=function(){return _c},_c.depthAtLocation=function(t){return t===Hs.EXTERIOR?0:t===Hs.INTERIOR?1:_c.NULL_VALUE},wc.NULL_VALUE.get=function(){return-1},Object.defineProperties(_c,wc);var bc=function(i){function a(){if(i.call(this),this.pts=null,this._env=null,this.eiList=new gc(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new _c,this._depthDelta=0,1===arguments.length){var t=arguments[0];a.call(this,t,null)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.pts=e,this._label=n}}return i&&(a.__proto__=i),((a.prototype=Object.create(i&&i.prototype)).constructor=a).prototype.getDepth=function(){return this._depth},a.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new a(t,$u.toLineLabel(this._label))},a.prototype.isIsolated=function(){return this._isIsolated},a.prototype.getCoordinates=function(){return this.pts},a.prototype.setIsolated=function(t){this._isIsolated=t},a.prototype.setName=function(t){this._name=t},a.prototype.equals=function(t){if(!(t instanceof a))return!1;var e=t;if(this.pts.length!==e.pts.length)return!1;for(var n=!0,i=!0,r=this.pts.length,o=0;oi||this._maxyo;if(a)return!1;var s=this.intersectsToleranceSquare(t,e);return wl.isTrue(!(a&&s),"Found bad envelope test"),s},Tc.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new Us(this._maxx,this._maxy),this._corner[1]=new Us(this._minx,this._maxy),this._corner[2]=new Us(this._minx,this._miny),this._corner[3]=new Us(this._maxx,this._miny)},Tc.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},Tc.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},Tc.prototype.getCoordinate=function(){return this._originalPt},Tc.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},Tc.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=Tc.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new pl(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},Tc.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))))},Tc.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper()||n&&i||t.equals(this._pt)||e.equals(this._pt)))))},Tc.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},Tc.prototype.interfaces_=function(){return[]},Tc.prototype.getClass=function(){return Tc},Ac.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(Tc,Ac);var Ec=function(){this.tempEnv1=new pl,this.selectedSegment=new kh};Ec.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},Ec.prototype.interfaces_=function(){return[]},Ec.prototype.getClass=function(){return Ec};var Ic=function(){this._index=null;var t=arguments[0];this._index=t},Lc={HotPixelSnapAction:{configurable:!0}};Ic.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new Rc(e,n,i);return this._index.query(r,{interfaces_:function(){return[mh]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},Ic.prototype.interfaces_=function(){return[]},Ic.prototype.getClass=function(){return Ic},Lc.HotPixelSnapAction.get=function(){return Rc},Object.defineProperties(Ic,Lc);var Rc=function(i){function t(){i.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._hotPixel=t,this._parentEdge=e,this._hotPixelVertexIndex=n}return i&&(t.__proto__=i),((t.prototype=Object.create(i&&i.prototype)).constructor=t).prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(2!==arguments.length)return i.prototype.select.apply(this,arguments);var t=arguments[0],e=arguments[1],n=t.getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ec),Oc=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Ul};Oc.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[i],s=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;lthis._distance&&this.initialize(e,n,i)}},Dc.prototype.interfaces_=function(){return[]},Dc.prototype.getClass=function(){return Dc};var Fc=function(){};Fc.prototype.interfaces_=function(){return[]},Fc.prototype.getClass=function(){return Fc},Fc.computeDistance=function(){if(arguments[2]instanceof Dc&&arguments[0]instanceof mu&&arguments[1]instanceof Us)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),r=new kh,o=0;othis._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;othis._minDistance)return null;for(var c=l.getCoordinates(),p=u.getCoordinates(),f=0;fthis._distance&&this.initialize(e,n,i)}},Jc.prototype.interfaces_=function(){return[]},Jc.prototype.getClass=function(){return Jc};var Qc=function(){};Qc.prototype.interfaces_=function(){return[]},Qc.prototype.getClass=function(){return Qc},Qc.computeDistance=function(){if(arguments[2]instanceof Jc&&arguments[0]instanceof mu&&arguments[1]instanceof Us)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new kh,r=t.getCoordinates(),o=0;on){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+vl.toLineString(r[0],r[1])+")"}},ip.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=ip.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(0=t.size()-2},lp.prototype.hasIntersection=function(){return null!==this._interiorIntersection},lp.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},lp.prototype.interfaces_=function(){return[dc]},lp.prototype.getClass=function(){return lp},lp.createAllIntersectionsFinder=function(t){var e=new lp(t);return e.setFindAllIntersections(!0),e},lp.createAnyIntersectionFinder=function(t){return new lp(t)},lp.createIntersectionCounter=function(t){var e=new lp(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var up=function(){this._li=new Sl,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};up.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},up.prototype.getIntersections=function(){return this._segInt.getIntersections()},up.prototype.isValid=function(){return this.execute(),this._isValid},up.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},up.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new lp(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new qh;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},up.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Yu(this.getErrorMessage(),this._segInt.getInteriorIntersection())},up.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+vl.toLineString(t[0],t[1])+" and "+vl.toLineString(t[2],t[3])},up.prototype.interfaces_=function(){return[]},up.prototype.getClass=function(){return up},up.computeIntersections=function(t){var e=new up(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var hp=function t(){this._nv=null;var e=arguments[0];this._nv=new up(t.toSegmentStrings(e))};hp.prototype.checkValid=function(){this._nv.checkValid()},hp.prototype.interfaces_=function(){return[]},hp.prototype.getClass=function(){return hp},hp.toSegmentStrings=function(t){for(var e=new Ul,n=t.iterator();n.hasNext();){var i=n.next();e.add(new sp(i.getCoordinates(),i))}return e},hp.checkValid=function(t){new hp(t).checkValid()};var cp=function(t){this._mapOp=t};cp.prototype.map=function(t){for(var e=new Ul,n=0;n>52},xp.zeroLowerBits=function(t,e){return t&~((1<e._xValue?1:this._eventTypee._eventType?1:0},Tp.prototype.getInsertEvent=function(){return this._insertEvent},Tp.prototype.isInsert=function(){return this._eventType===Tp.INSERT},Tp.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},Tp.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Tp.prototype.interfaces_=function(){return[Vs]},Tp.prototype.getClass=function(){return Tp},Ap.INSERT.get=function(){return 1},Ap.DELETE.get=function(){return 2},Object.defineProperties(Tp,Ap);var Ep=function(){};Ep.prototype.interfaces_=function(){return[]},Ep.prototype.getClass=function(){return Ep};var Ip=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};Ip.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(Ip.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},Ip.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ip.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ip.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ip.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},Ip.prototype.hasProperIntersection=function(){return this._hasProper},Ip.prototype.hasIntersection=function(){return this._hasIntersection},Ip.prototype.isDone=function(){return this._isDone},Ip.prototype.isBoundaryPoint=function(t,e){return!(null===e||!this.isBoundaryPointInternal(t,e[0])&&!this.isBoundaryPointInternal(t,e[1]))},Ip.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ip.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=n.getCoordinates()[i],s=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ip.prototype.interfaces_=function(){return[]},Ip.prototype.getClass=function(){return Ip},Ip.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Lp=function(t){function e(){t.call(this),this.events=new Ul,this.nOverlaps=null}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.prepareEvents=function(){_h.sort(this.events);for(var t=0;te||this._max=t.size()?null:t.get(e)},$p.union=function(t){return new $p(t).union()},tf.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties($p,tf);var ef=function(){};ef.prototype.interfaces_=function(){return[]},ef.prototype.getClass=function(){return ef},ef.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Zp.createEmptyResult(Zp.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Cp.overlayOp(t,e,Zp.UNION)};var nf=function(){return new Ar};Ar.prototype={constructor:Ar,reset:function(){this.s=this.t=0},add:function(t){Er(rf,t,this.t),Er(this,rf.s,this.s),this.s?this.t+=rf.t:this.s=rf.t},valueOf:function(){return this.s}};var rf=new Ar,of=1e-6,af=Math.PI,sf=af/2,lf=af/4,uf=2*af,hf=180/af,cf=af/180,pf=Math.abs,ff=Math.atan,df=Math.atan2,yf=Math.cos,mf=Math.exp,gf=Math.log,vf=Math.sin,xf=Math.sqrt,_f=Math.tan,wf={Feature:function(t,e){Rr(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++iof?ff((vf(e)*(o=yf(i))*vf(n)-vf(i)*(r=yf(e))*vf(t))/(r*o*a)):(e+i)/2}(a,s,t,e),r.point(l,s),r.lineEnd(),r.lineStart(),r.point(n,s),o=0),r.point(a=t,s=e),l=n},lineEnd:function(){r.lineEnd(),a=s=NaN},clean:function(){return 2-o}}},function(t,e,n,i){var r;if(null==t)r=n*sf,i.point(-af,r),i.point(0,r),i.point(af,r),i.point(af,0),i.point(af,-r),i.point(0,-r),i.point(-af,-r),i.point(-af,0),i.point(-af,r);else if(pf(t[0]-e[0])>of){var o=t[0]2?e[2]*cf:0),t.invert=function(t){return t=e.invert(t[0]*cf,t[1]*cf),t[0]*=hf,t[1]*=hf,t},t}(a.rotate()).invert([0,0]));return h(null==c?[[e[0]-t,e[1]-t],[e[0]+t,e[1]+t]]:n===no?[[Math.max(e[0]-t,c),i],[Math.min(e[0]+t,r),o]]:[[c,Math.max(e[1]-t,i)],[r,Math.min(e[1]+t,o)]])}var i,r,o,a=eo(n),s=a.center,l=a.scale,u=a.translate,h=a.clipExtent,c=null;return a.scale=function(t){return arguments.length?(l(t),e()):l()},a.translate=function(t){return arguments.length?(u(t),e()):u()},a.center=function(t){return arguments.length?(s(t),e()):s()},a.clipExtent=function(t){return arguments.length?(null==t?c=i=r=o=null:(c=+t[0][0],i=+t[0][1],r=+t[1][0],o=+t[1][1]),e()):null==c?null:[[c,i],[r,o]]},e()}(io),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2a;)i=Math.floor((o+1)*Math.random()),n=r[i],r[i]=r[o],r[o]=n;return r.slice(a)}(t.features,e))},t.envelope=ie,t.square=re,t.circle=ae,t.midpoint=function(t,e){return oe(t,kt(t,e)/2,se(t,e))},t.center=le,t.centerOfMass=function t(e,n){switch(J(e)){case"Point":return e;case"Polygon":var i=[];b(e,function(t){i.push(t)});var r,o,a,s,l,u,h,c,p=ue(e,n),f=p.geometry.coordinates,d=0,y=0,m=0,g=i.map(function(t){return[t[0]-f[0],t[1]-f[1]]});for(r=0;r is required");if("boolean"!=typeof n)throw new Error(" must be a boolean");if("boolean"!=typeof i)throw new Error(" must be a boolean");!1===i&&(t=zt(t));var r=[];switch(t.type){case"GeometryCollection":return T(t,function(t){Yn(t,n)}),t;case"FeatureCollection":return S(t,function(t){S(Yn(t,n),function(t){r.push(t)})}),B(r)}return Yn(t,n)},t.isobands=function(t,e,n){if(!W(n=n||{}))throw new Error("options is invalid");var i=n.zProperty||"elevation",r=n.commonProperties||{},o=n.breaksProperties||[];if(H(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks is not an Array");if(!W(r))throw new Error("commonProperties is not an Object");if(!Array.isArray(o))throw new Error("breaksProperties is not an Array");var a=function(e,t){if(!W(t=t||{}))throw new Error("options is invalid");var n=t.zProperty||"elevation",i=t.flip,r=t.flags;H(e,"Point","input must contain Points");for(var o=function(t,n){var i={};return S(e,function(t){var e=k(t)[1];i[e]||(i[e]=[]),i[e].push(t)}),Object.keys(i).map(function(t){return i[t].sort(function(t,e){return k(t)[0]-k(e)[0]})}).sort(function(t,e){return n?k(t[0])[1]-k(e[0])[1]:k(e[0])[1]-k(t[0])[1]})}(0,i),a=[],s=0;sr&&(n=r),!1!==i&&void 0!==i||(t=zt(t));var o=M(t),a=o.slice(0,n),s=Ps(o,n,a),l={};return s.centroids.forEach(function(t,e){l[e]=t}),S(t,function(t,e){var n=s.idxs[e];t.properties.cluster=n,t.properties.centroid=l[n]}),t},t.pointToLineDistance=rn,t.booleanParallel=function(t,e){if(!t)throw new Error("line1 is required");if(!e)throw new Error("line2 is required");if("LineString"!==bi(t,"line1"))throw new Error("line1 must be a LineString");if("LineString"!==bi(e,"line2"))throw new Error("line2 must be a LineString");for(var n=We(Yt(t)).features,i=We(Yt(e)).features,r=0;ra[a.length-1])e-=a.length;else{var n=function(i,t){var r,o;if(!Array.isArray(t))throw new Error("Get closest expects an array as second argument");return t.forEach(function(t,e){var n=t-i;0<=n&&(void 0===o||nthis.max&&(t=this.max),t{1}".replace("{0}",this.textStyle.toStyle()).replace("{1}",this.text)},a.prototype.getPatternType=function(){return e.TextLabel},a.prototype.format=function(){},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i;void 0===(i=function(t,e,n){function i(t){this.color=t.color,this.fontFamily=t.fontFamily,this.fontSize=t.fontSize,this.fontStyle=t.fontStyle,this.fontWeight=t.fontWeight}return i.prototype.toStyle=function(){return function(t,e){for(var n=t,i=0;i".replace("{0}",this.source).replace("{1}",this.width).replace("{2}",this.height).replace("{3}","opacity:"+this.opacity)},a.prototype.getPatternType=function(){return e.PictureLabel};var s={name:"",icons:[]};return a.prototype.format=function(){var t=When.defer(),e=JSON.parse(JSON.stringify(s));return e.icons.push(this.source),t.resolve({legend:e}),t.promise},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(21),n(69),n(39),n,e,t],void 0===(r=function(t,n,i,e,r,o,a){function s(t){var e=t||{};i.call(this,e),this.source=e.source,this.height=e.height,this.width=e.width,this.opacity=e.opacity}t.extend2(s,i),s.prototype.toHtml=function(){return"".replace("{0}",this.source).replace("{1}",this.width).replace("{2}",this.height).replace("{3}","opacity:"+this.opacity)},s.prototype.getPatternType=function(){return e.NorthArrow};var l={graphic:""};return s.prototype.format=function(){var t=n.defer(),e=JSON.parse(JSON.stringify(l));return e.graphic=this.source,t.resolve({northArrowDef:e}),t.promise},a.exports=s}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(21),n(69),n(39),n,e,t],void 0===(r=function(t,n,i,e,r,o,a){function s(t){var e=t||{};i.call(this,e),this.scale=e.scale,this.unit=e.unit,this.height=e.height,this.width=e.width,this.align=e.align||"left",this.verticalAlign=e.verticalAlign||"top",this.type=e.type||"bar_sub",this.intervals=e.intervals||5,this.background=e.background,this.typeSource=e.typeSource,this.unit=e.unit,this.lockUnits=e.lockUnits||!1,this.orientation=e.orientation}t.extend2(s,i),s.prototype.toHtml=function(){return"".replace("{0}",this.typeSource)},s.prototype.getPatternType=function(){return e.ScaleBar};var l={align:"left",verticalAlign:"top",intervals:5,type:"bar_sub",unit:"km",lockUnits:!0,orientation:""};return s.prototype.format=function(){var t=n.defer(),e=JSON.parse(JSON.stringify(l));return e.align=this.align,e.verticalAlign=this.verticalAlign,e.type=this.type,e.intervals=this.intervals,e.unit=this.unit,e.lockUnits=this.lockUnits,e.orientation=this.orientation,t.resolve({scalebar:e}),t.promise},a.exports=s}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(21),n(69),n(39),n,e,t],void 0===(r=function(t,e,n,i,r,o,a){function s(t){var e=t||{};n.call(this,e),this.column=e.column,this.height=e.height,this.width=e.width,this.contentStyle=e.contentStyle,this.titleStyle=e.titleStyle,this.legend=e.legend}t.extend2(s,n),s.prototype.toHtml=function(){this.column>=this.legend.getCount()&&(this.column=this.legend.getCount());for(var t=this.titleStyle.toStyle(),e=this.contentStyle.toStyle(),n=''.replace("{3}",this.legend.name).replace("{2}",t).replace("{1}",this.height).replace("{0}",this.width),i=this.legend.getCount()%this.column,r=(this.legend.getCount()-i)/this.column,o=0;o{0}'.replace("{0}",l.svg.innerHTML).replace("{1}",e).replace("{2}",l.content)}n+=a+=""}for(a="",o=0;o{0}'.replace("{0}",l.svg.innerHTML).replace("{1}",e).replace("{2}",l.content)}return n+=a+="",n+="
{3}
{2}
{2}
"},s.prototype.getPatternType=function(){return i.LegendLabel};var l={name:"",icons:[]};return s.prototype.format=function(){var i=e.defer(),r=JSON.parse(JSON.stringify(l)),o=document.createElement("div");return o.innerHTML=this.toHtml(),document.body.appendChild(o),html2canvas(o,{allowTaint:!0,taintTest:!1,onrendered:function(t){var e=t.toDataURL("image/png",1);document.body.removeChild(o),o.style.display="none";var n={legend:r};n.legend.icons.push(e),n.legend.name="",i.resolve(n)}}),i.promise},a.exports=s}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(42),n,e,t],void 0===(r=function(t,e,n,i,r){function o(t){t=t||{},e.call(this,t),this.layerIds=t.layerIds,this.map=null,this.tooltipWare=null,this.selectionSet=null}return t.extend2(o,e),o.prototype.isEnabled=function(){if(!this.map)return!1;for(var t=0,e=0;this.layerIds&&et.x&&(e=t.x),nt.y&&(miny=t.y),maxyt&&(minz=t)})),new i({minx:e,miny:miny,minz:minz,maxx:n,maxy:maxy,maxz:maxz,spatialReference:this.spatialReference})},s.prototype.copy=function(){var e,n,i=[];return this.positions.forEach(function(t){i.push(t.copy())}),this.minHeights instanceof Array?(e=[],this.minHeights.forEach(function(t){e.push(t)})):e=this.minHeights,this.maxHeights instanceof Array?(n=[],this.maxHeights.forEach(function(t){n.push(t)})):n=this.maxHeights,new s({positions:i,maxHeights:n,minHeights:e,spatialReference:this.spatialReference})},s.prototype.asWkt=function(t){},a.exports=s}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(8),n(29),n,e,t],void 0===(r=function(t,e,n,i,r,o){function a(t){var e=t||{};n.call(this,e),this.$type="ExtrudedLine,http://www.Gs.com"}return t.extend2(a,n),a.prototype.getGeometryType=function(){return e.ExtrudedLine},a.prototype.copy=function(){var t=new a;t.spatialReference=this.spatialReference;for(var e=0,n=this.points.length;ethis.level},a.prototype.take=function(t){var e=this.newUrl+function(t){{if(0<=t.indexOf("?")){var e=t.indexOf("?");return t=t.substring(e,t.length)}e=t.indexOf("wmts");return t=t.substring(e+4,t.length)}}(t)+"&address="+function(t){{if(0<=t.indexOf("?")){var e=t.indexOf("?");return t=t.substring(0,e)}e=t.indexOf("wmts");return t=t.substring(0,e+4)}}(t)+"&token="+this.token;return e=e.replace("format=","Format=").replace("tilematrix=","TileMatrix=").replace("tilecol=","TileCol=").replace("tilerow=","TileRow=")},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(25),n(115),n(61),n(116),n(259),n,e,t],void 0===(r=function(e,n,i,r,o,t,a,s){function l(){}return l.createProperty=function(t){return e.GeometryBegin<=t&&e.GeometryEnd>=t?new n:i.None<=t&&i.Boolean>=t?new r:e.ElementBegin<=t&&e.ElementEnd>=t?new o:void 0},s.exports=l}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(35),n(77),n,e,t],void 0===(r=function(t,e,n,i,r,o){function a(t){t=t||{},n.call(this,t),this.element=t.element||null,this.$type="ElementProperty,http://www.Gs.com"}return t.extend2(a,n),a.prototype.setValue=function(t){this.element=t},a.prototype.getValue=function(){return this.element},a.prototype.copy=function(){return new a({changed:this.changed,element:null!==this.element?this.element.copy():null})},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(55),n(152),n(54),n(9),n(111),n(20),n(10),n(23),n,e,t],void 0===(r=function(t,u,a,s,e,n,h,i,r,o,l,c){function p(t){var e=t||{};a.call(this,e),this.glStyle=e.glStyle;var n=this;if(e.transformRequest)this._transformRequest=e.transformRequest;else{var i,r=/http:\/\/(\d+\.\d+\.\d+\.\d+(:\d+)*)|https:\/\/(\d+\.\d+\.\d+\.\d+(:\d+)*)|(^((http:\/\/)|(https:\/\/))?([_a-zA-Z0-9]([_a-zA-Z0-9\-]{0,61}[_a-zA-Z0-9])?\.)+[a-zA-Z]{2,6})/,o=r.exec(this.glStyle);null!==o&&Array.isArray(o)&&(i=o[0]),this._transformRequest=function(t,e){return"Style"===e?{url:t,headers:{Authorization:n._token}}:{url:void 0!==i?t.replace(r,i):t,headers:{Authorization:n._token}}}}this._options=e,this.setVisible(this.visible),this.isChangedStyle=void 0!==e.isChangedStyle&&e.isChangedStyle}return t.extend2(p,a),p.prototype.loadStyle=function(t,e){this._glMap.setStyle(t,{diff:e})},p.prototype.getStyle=function(){return this._glMap.getStyle()},p.prototype.setLayoutProperty=function(t,e,n){this._glMap.setLayoutProperty(t,e,n)},p.prototype.setPaintProperty=function(t,e,n){this._glMap.setPaintProperty(t,e,n)},p.prototype.showLayers=function(r,o){var t=this;function e(){if(!0===o){if(Array.isArray(r))for(var t=0,e=r.length;tthis.freeTolerance}return e&&(this.firstFreeCoordinate=t),e}.call(this,[n,i])||this.entryDraw(t,r,o));else if(1<=this.pushNum){var s=new h({x:r,y:o,z:this.mapz,spatialReference:this.srid});this.drawing(s)}},p.prototype.onPosition3d=function(t,e,n){this.pickZ&&(this.mapz=n)},p.prototype.entryDraw=function(t,e,n){var i=new h({x:e,y:n,z:this.mapz,spatialReference:this.srid});this.isEndDraw=!1,0==t||-1===t&&this.isDraw?0==this.pushNum?this.beginDraw(i):1==this.pushNum&&this.pauseDraw(i):this.endDraw(null)},p.prototype.beginDraw=function(t){this.map.stopDbClick();var e=new Date;this.plotElement=this.plotElementTemplate.copy(),this.plotElement.id=s.newGuid();var n=null,i=null,r=null;n=2!=e.getHours().toString().length?"0"+e.getHours().toString():e.getHours().toString(),i=2!=e.getMinutes().toString().length?"0"+e.getMinutes().toString():e.getMinutes().toString(),r=2!=e.getSeconds().toString().length?"0"+e.getSeconds().toString():e.getSeconds().toString(),this.plotElement.name=this.name+"_"+n+i+r;var o=this.plotElement.plot;o.addControlPoint(t),this.drawElement&&this.plotLayer.add(this.drawElement),this.plotLayer.add(this.plotElement),this.pushNum++,o.controlPointCount()==this.plotElement.algorithm.maxCpt&&this.endDraw(t);var a=this.plotElement.algorithm.getStepDes(1);this.OnStepDesCallback(a)},p.prototype.pauseDraw=function(t){var e=this.map.getPixelFromCoordinate([t.x,t.y,t.z]),n=this.plotElement.algorithm;if(this.atFinish(e)&&!this.freeDraw){var i=n.maxCpt,r=this.plotElement.algorithm.getStepDes(i);return this.OnStepDesCallback(r),void this.endDraw(null)}var o=this.plotElement.plot;if(o.addControlPoint(t),(i=o.controlPointCount())=e.minCpt){for(var n=this.plotElement.plot,i=e.createGeometries(n.copy(),t),r=0;r=n){if(d._cachedSymbols.hasOwnProperty(e))return d._cachedSymbols[e];i=d.legendOptions[e].color;break}var r=f.fromHex(i);r.a=155;var o=new p({borderColor:r,fillColor:r});return d._cachedSymbols[e]=o}n=t.getValue(this.fieldName);for(var a=0,s=this.classfications.length;a=n){var u=l.symbol;return y.call(this,u,t,n,0)}}return y.call(this,this.symbol,t,n,0)},a.prototype.renderSymbol=function(t,e){return y.call(this,e,t,"",1)},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i;void 0===(i=function(t,e,n){function i(){}return i.prototype.toImage=function(t,e,n){},n.exports=i}.apply(e,[n,e,t]))||(t.exports=i)},function(t,e,n){var i,r;i=[n(0),n(197),n(41),n(51),n,e,t],void 0===(r=function(t,e,o,n,i,r,a){function s(t){t=t||{},this.fillColor=t.fillColor,this.shadowBlur=void 0===t.shadowBlur?20:t.shadowBlur,this.shadowColor=t.shadowColor,this.size=void 0===t.size?10:t.size,this.maxWeight=void 0===t.maxWeight?100:t.maxWeight,this.minWeight=void 0===t.minWeight?0:t.minWeight,this.shadow=void 0===t.shadow||t.shadow,this.intensity=new e({max:this.maxWeight,min:this.minWeight,minSize:this.minSize,maxSize:this.maxSize,stops:t.stopCollection}),this.fieldName=t.fieldName,this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}t.extend2(s,n),s.prototype.canRender=function(){return!0};var l={};return s.prototype.render=function(t){var e=t.getValue(this.fieldName),n=l[e];if(!n){var i=2*this.size,r=2*this.size;this.canvas.width=this.canvas.height=2*this.size,this.context.clearRect(0,0,i,r),this.shadow&&(this.context.shadowColor=this.shadowColor.toHex(),this.context.shadowBlur=this.shadowBlur),this.context.beginPath(),this.context.fillStyle=this.intensity.getColor(e).toHex(),this.context.arc(this.size,this.size,this.size,0,2*Math.PI),this.context.fill(),n=new o({width:i,height:r,scale:1,offsetX:this.size,offsetY:this.size,source:this.canvas.toDataURL()}),l[e]=n}return n},a.exports=s}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(51),n(84),n(85),n(105),n(34),n(63),n,e,t],void 0===(r=function(t,e,s,l,n,u,h,i,r,o){function a(t){t=t||{},e.call(this,t),this.symbol=t.symbol,this.showLabel=t.showLabel||!1,this.labelField=t.labelField,this.fieldName=t.fieldName,this.convertor=new n,this.infos=[],this._cachedSymbols={},this.$type="UniqueValueRenderer,http://www.Gs.com"}function c(t,e,n,i){if(this.showLabel){var r=e.getValue(this.labelField)+"",o=r+"_"+n+"_"+i;if(!this._cachedSymbols.hasOwnProperty(o)){var a,s=t.copy();(this._cachedSymbols[o]=s)instanceof u?a=s:s instanceof h&&(a=s.textSymbol),a.text=r}return this._cachedSymbols[o]}return t}return t.extend2(a,e),a.prototype.canRender=function(){return!0},a.prototype.createLegend=function(t,e){var n=new s,i=null;if(0".replace("{0}",this.source)},s.prototype.getPatternType=function(){return e.PictureLegend};var l={name:"",icons:[]};return s.prototype.format=function(){var t=n.defer(),e=JSON.parse(JSON.stringify(l));return e.icons.push(this.source),t.resolve({legend:e}),t.promise},a.exports=s}.apply(e,i))||(t.exports=r)},function(t,e,n){var i;void 0===(i=function(t,e,n){function i(){this.builder=null}return i.prototype.setBuilder=function(t){this.builder=t},i.prototype.build=function(t){if(this.builder)return this.builder.build(t)},n.exports=i}.apply(e,[n,e,t]))||(t.exports=i)},function(t,e,n){var i;void 0===(i=function(t,e,n){function i(){this.tool=null,this.layers=[],this.cursor=null,this.events=function(){var t={click:[],mousemove:[],mousedown:[],mouseup:[],dblclick:[],extentchanged:[],resize:[],resolutionchanged:[],tick:[]};return t}()}return i.prototype.init=function(t){},i.prototype.addLayer=function(t){this.layers.push(t)},i.prototype.getExtent=function(){},i.prototype.removeLayer=function(t){var e=this.layers.indexOf(t);0>>6)+a(128|63&e):a(224|e>>>12&15)+a(128|e>>>6&63)+a(128|63&e)}var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return a(240|e>>>18&7)+a(128|e>>>12&63)+a(128|e>>>6&63)+a(128|63&e)},s=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(t){return t.replace(s,i)},u=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(1>>18),r.charAt(n>>>12&63),2<=e?"=":r.charAt(n>>>6&63),1<=e?"=":r.charAt(63&n)];return i.join("")},h=e.btoa?function(t){return e.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,u)},c=function(t){return h(l(t))},p=function(t,e){return e?c(String(t)).replace(/[+\/]/g,function(t){return"+"==t?"-":"_"}).replace(/=/g,""):c(String(t))},f=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),d=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return a(55296+(n>>>10))+a(56320+(1023&n));case 3:return a((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return a((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},y=function(t){return t.replace(f,d)},m=function(t){var e=t.length,n=e%4,i=(0>>16),a(i>>>8&255),a(255&i)];return r.length-=[0,0,2,1][n],r.join("")},g=e.atob?function(t){return e.atob(t)}:function(t){return t.replace(/\S{1,4}/g,m)},v=function(t){return y(g(t))},x=function(t){return v(String(t).replace(/[-_]/g,function(t){return"-"==t?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))};if(e.Base64={VERSION:"2.5.1",atob:function(t){return g(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},btoa:h,fromBase64:x,toBase64:p,utob:l,encode:p,encodeURI:function(t){return p(t,!0)},btou:y,decode:x,noConflict:function(){var t=e.Base64;return e.Base64=n,t},__buffer__:t},"function"==typeof Object.defineProperty){var _=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};e.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",_(function(){return x(this)})),Object.defineProperty(String.prototype,"toBase64",_(function(t){return p(this,t)})),Object.defineProperty(String.prototype,"toBase64URI",_(function(){return p(this,!0)}))}}return e.Meteor&&(Base64=e.Base64),w.exports&&(w.exports.Base64=e.Base64),e.Base64}(e)}).call(this,e(493))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,n){var i,r;i=[n(0),n(19),n(11),n,e,t],void 0===(r=function(t,n,e,i,r,o){function a(t){var e=t||{};n.call(this,e)}return t.extend2(a,n),a.prototype.getLayerType=function(){return e.ModelLayer},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(19),n(11),n,e,t],void 0===(r=function(t,n,e,i,r,o){function a(t){var e=t||{};n.call(this,e)}return t.extend2(a,n),a.prototype.getLayerType=function(){return e.ModelLayer},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(19),n(11),n,e,t],void 0===(r=function(t,n,e,i,r,o){function a(t){var e=t||{};n.call(this,e)}return t.extend2(a,n),a.prototype.getLayerType=function(){return e.ParticleLayer},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e){},function(t,e,n){var i,r;i=[n(0),n(94),n(11),n,e,t],void 0===(r=function(t,n,e,i,r,o){function a(t){var e=t||{};n.call(this,e)}return t.extend2(a,n),a.prototype.getLayerType=function(){return e.TerrainLayer},o.exports=a}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(55),n(260),n(54),n(9),n(111),n(20),n(10),n(23),n,e,t],void 0===(r=function(t,e,n,i,r,o,a,s,l,u,h,c){function p(t){var e=t||{};n.call(this,e),this.depth=e.depth||0,this.layers=[],this.sourceIdMap={}}return t.extend2(p,n),p.prototype.init=function(){p.prototype.uber.init.call(this);var n=this;this._glMap.on("load",function(){n.layers=n.getStyle().layers,n.layers.forEach(function(t){var e=t.metadata.key;n.sourceIdMap[e]?n.sourceIdMap[e].push(t.id):n.sourceIdMap[e]=[t.id]}),console.log(n.layers),n.onload(n._glMap)}),this.map.on("extentchanged",function(){var t=n.map.getZoomLevel();console.log(t);var e=n.depth;(e=t<4?0:t<7?1:t<8?2:t<10?3:4)!=n.depth&&n.changeDepth(e)})},p.prototype.onload=function(t){console.log(t)},p.prototype.changeDepth=function(t){var e;e=this.getIdsByDepth(this.depth),this.hiddenLayers(e,!0),e=this.getIdsByDepth(t),this.hiddenLayers(e,!1);var n=0==t?0:1==t?4:2==t?7:3==t?8:10;this.map.zoomTo(n),this.depth=t},p.prototype.hiddenLayers=function(t,e){for(var n=0;n * wind-layer v0.1.1 * build-time: 2020-1-14 18:17 * LICENSE: MIT * (c) 2017-2020 https://sakitam-fdd.github.io/wind-layer */ t.exports=function(r){"use strict";var c=function(h){void 0===h&&(h={}),this.params=h;var f=this;f.canvas=h.canvas;var e=["rgb(36,104, 180)","rgb(60,157, 194)","rgb(128,205,193 )","rgb(151,218,168 )","rgb(198,231,181)","rgb(238,247,217)","rgb(255,238,159)","rgb(252,217,125)","rgb(255,182,100)","rgb(252,150,75)","rgb(250,112,52)","rgb(245,64,32)","rgb(237,45,28)","rgb(220,24,32)","rgb(180,0,35)"],n=function(t){t.projection||(t.projection="EPSG:4326"),f.MIN_VELOCITY_INTENSITY=t.minVelocity||0,f.MAX_VELOCITY_INTENSITY=t.maxVelocity||10,f.VELOCITY_SCALE=(t.velocityScale||.005)*(Math.pow(window.devicePixelRatio,1/3)||1),f.MAX_PARTICLE_AGE=t.particleAge||90,f.PARTICLE_LINE_WIDTH=t.lineWidth||1,f.PARTICLE_MULTIPLIER=t.particleMultiplier||1/300,f.PARTICLE_REDUCTION=Math.pow(window.devicePixelRatio,1/3)||1.6,f.FRAME_RATE=t.frameRate||16,f.COLOR_SCALE=t.colorScale||e,f.DEVICEPIXELRATIO=t.devicePixelRatio||1,f.map=t.map};n(h),window.FRAME_TIME=1e3/f.FRAME_RATE;var d,y,l,m,g,v,x,u,c,p,a=[NaN,NaN,null],o=f.params.data,r=function(t,e,n,i,r,o){var a=1-t,s=1-e,l=a*s,u=t*s,h=a*e,c=t*e,p=n[0]*l+i[0]*u+r[0]*h+o[0]*c,f=n[1]*l+i[1]*u+r[1]*h+o[1]*c;return[p,f,Math.sqrt(p*p+f*f)]},_=function(t){var e=null,n=null;return t.forEach(function(t){switch(t.header.parameterCategory+","+t.header.parameterNumber){case"1,2":case"2,2":e=t;break;case"1,3":case"2,3":n=t}}),function(t,e){var n=t.data,i=e.data;return{header:t.header,data:function(t){return[n[t],i[t]]},interpolate:r}}(e,n)},w=function(t,e){if(!y)return null;var n,i=P(t-m,360)/v,r=(g-e)/x,o=Math.floor(i),a=o+1,s=Math.floor(r),l=s+1;if(n=y[s]){var u=n[o],h=n[a];if(b(u)&&b(h)&&(n=y[l])){var c=n[o],p=n[a];if(b(c)&&b(p))return d.interpolate(i-o,r-s,u,h,c,p)}}return null},b=function(t){return null!=t},P=function(t,e){return t-e*Math.floor(t/e)},S=function(t,e,n,i,r,o,a,s){var l=a[0]*o,u=a[1]*o,h=C(t,e,n,i,r,s);return a[0]=h[0]*l+h[2]*u,a[1]=h[1]*l+h[3]*u,a},C=function(t,e,n,i,r,o){var a=2*Math.PI,s="EPSG:4326"===f.params.projection?5:Math.pow(10,-5.2),l=e<0?s:-s,u=n<0?s:-s,h=A(n,e+l,o),c=A(n+u,e,o),p=Math.cos(n/360*a);return[(h[0]-i)/l/p,(h[1]-r)/l/p,(c[0]-i)/u,(c[1]-r)/u]},M=function(i,r,t){function o(t,e){var n=i[Math.round(t)];return n&&n[Math.round(e)]||a}o.release=function(){i=[]},o.randomize=function(t){for(var e,n,i=0;e=Math.round(Math.floor(Math.random()*r.width)+r.x),n=Math.round(Math.floor(Math.random()*r.height)+r.y),null===o(e,n)[2]&&i++<30;);return t.x=e,t.y=n,t},t(r,o)},s=function(t){return t/180*Math.PI},T=function(t,e,n){var i=f.map.getCoordinateFromPixel([t,e]);return[i[0],i[1]]},A=function(t,e,n){var i=f.map.getPixelFromCoordinate([e,t]);return[i[0],i[1]]},E=function(i,s){var l=function(e,n){return f.COLOR_SCALE.indexFor=function(t){return Math.max(0,Math.min(f.COLOR_SCALE.length-1,Math.round((t-e)/(n-e)*(f.COLOR_SCALE.length-1))))},f.COLOR_SCALE}(f.MIN_VELOCITY_INTENSITY,f.MAX_VELOCITY_INTENSITY),u=l.map(function(){return[]}),t=Math.round(i.width*i.height*f.PARTICLE_MULTIPLIER);/android|blackberry|iemobile|ipad|iphone|ipod|opera mini|webos/i.test(navigator.userAgent)&&(t*=f.PARTICLE_REDUCTION);for(var r=[],e=0;eFRAME_TIME&&(a=e-n%FRAME_TIME,u.forEach(function(t){t.length=0}),r.forEach(function(t){t.age>f.MAX_PARTICLE_AGE&&(s.randomize(t).age=0);var e=t.x,n=t.y,i=s(e,n),r=i[2];if(null===r)t.age=f.MAX_PARTICLE_AGE;else{var o=e+i[0],a=n+i[1];null!==s(o,a)[2]?(t.xt=o,t.yt=a,u[l.indexFor(r)].push(t)):(t.x=o,t.y=a)}t.age+=1}),o.globalCompositeOperation="destination-in",o.fillRect(i.x,i.y,f.canvas.width,f.canvas.height),o.globalCompositeOperation="lighter",o.globalAlpha=.9,u.forEach(function(t,e){0=360,o=0;o1e3){setTimeout(t,25);return}}M(p,l,n)})()}(t,function(t,e,n){var i=t[0],r=t[1],o=Math.round(i[0]),a=Math.max(Math.floor(i[1],0),0),s=Math.min(Math.ceil(r[0],e),e-1),l=Math.min(Math.ceil(r[1],n),n-1);return{x:o,y:a,xMax:e,yMax:l,width:e,height:n}}(e,n,i),r,function(t,e){R.field=e,E(t,e)})})},L=function(){R.field&&R.field.release(),p&&cancelAnimationFrame(p)},R={params:f.params,start:I,stop:L,update:function(t,e,n,i,r){if(delete f.params.data,f.params.data=t,r){I(e,n,i,r)}},shift:function(t,e){var n=f.canvas,i=n.width,r=n.height,o=n.getContext("2d");if(i>t&&r>e){var a=function(t,e){return Math.max(0,Math.min(t,e))};var s=o.getImageData(a(i,-t),a(r,-e),a(i,i-t),a(r,r-e));o.clearRect(0,0,i,r);o.putImageData(s,a(i,t),a(r,e));for(var l=0,u=particles.length;l0?e=-e:Math.abs(e)}var i=Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),r,o=Math.atan2(t/i,e/i)*180/Math.PI+180;if(n==="bearingCW"||n==="meteoCCW"){o+=180;if(o>=360){o-=360}}return o}(e[0],e[1],this.options.angleConvention||"bearingCCW"),speed:function(t,e,n){var i=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));if(n==="k/h"){return a(i)}else if(n==="kt"){return o(i)}else{return i}}(e[0],e[1],this.options.speedUnit)}:void 0},t.prototype.clearWind=function(){var t=this.getMap();t&&(this.$Windy&&this.$Windy.stop(),this.isClear=!0,this._cloneLayer=this,t.removeLayer(this),this.changed(),this.getMap().renderSync())},t.prototype.removeLayer=function(){var t=this.getMap();t&&(this.$Windy&&this.$Windy.stop(),this.un("postrender",this.redraw,this),t.removeLayer(this),delete this._canvas,delete this.$Windy,delete this._cloneLayer)},t.prototype.setMap=function(t){this.set("originMap",t)},t.prototype.getMap=function(){return this.get("originMap")},t.prototype._getProjectionCode=function(){var t="",e=this.getMap();return t=e?"EPSG:4490"===(t=e.getView()&&e.getView().getProjection().getCode())?"EPSG:4326":t:"EPSG:3857"},t.prototype.updateParams=function(t){if(this.options=Object.assign(this.options,t),this.$Windy){var e=this.options,n=e.minVelocity,i=e.maxVelocity,r=e.velocityScale,o=e.particleAge,a=e.lineWidth,s=e.particleMultiplier,l=e.colorScale,u=e.map;this.$Windy&&(this.$Windy.updateParams({minVelocity:n,maxVelocity:i,velocityScale:r,particleAge:o,lineWidth:a,particleMultiplier:s,colorScale:l,devicePixelRatio:this.options.devicePixelRatio,map:u}),this.getMap()&&this._canvas&&this.data&&this.renderWind(this._canvas))}return this},t.prototype.getParams=function(){return this.$Windy&&this.$Windy.getParams()},t}(r.layer.Image)}(n(9))},function(t,e,n){var i;void 0===(i=function(t,e,n){function i(t){var e=t||{};this.name=e.name,this.items=e.items}return i.prototype.contains=function(t){for(var e=0;e
',n&&(f.toolTip.content=f.toolTip.content.replace("
",""+n+"
")),f.toolTipWare.update(f.toolTip)},r.onerror=function(){console.error("error")}}else f.toolTip.content='
',f.toolTipWare.update(f.toolTip)})})},f._waitTime),f.toolTipWare.update(f.toolTip)},p.prototype.mouseClick=function(t,e,n,i,r,o,a){p.prototype.uber.mouseClick.call(f,t,e,n,i,r,o,a);var s=f.toolTip.anchor;s=f._projectService.transform(s,3857);var l="http://pcsv0.map.bdimg.com/?qt=qsdata&x={0}&y={1}&r=50&action=1",u=h.smerc2bmerc([s.x,s.y]);l=l.replace("{0}",u[0]).replace("{1}",u[1]),fetch(l).then(function(t){t.json().then(function(t){if(t.content){var e=t.content[0].ID;f._pano||(f._pano=new window.BMap.Panorama(f.map.panoContainer.id),f._pano.setPov({heading:f._heading,pitch:f._pitch}),f._pano.setOptions({navigationControl:f._navigationControl,linksControl:f._linksControl})),f.map.getMapControl().getViewport().parentNode.style.display="none",f.map.panoContainer.style.display="block",f.map.panoContainer.appendChild(f._hidePanoDiv),f._pano.setId(e),f._rightClick(),f._enterEvent.raiseEvent(s)}})})},c.exports=p}.apply(e,i))||(t.exports=r)},function(module,exports){window.TILE_VERSION={ditu:{normal:{version:"088",updateDate:"20210223"},satellite:{version:"009",updateDate:"20210223"},normalTraffic:{version:"081",updateDate:"20210223"},satelliteTraffic:{version:"083",updateDate:"20210223"},mapJS:{version:"104",updateDate:"20210223"},satelliteStreet:{version:"083",updateDate:"20210223"},earthVector:{version:"001",updateDate:"20210223"}},webapp:{high_normal:{version:"001",updateDate:"20210223"},lower_normal:{version:"002",updateDate:"20210223"}},api_for_mobile:{vector:{version:"002",updateDate:"20210223"},vectorIcon:{version:"002",updateDate:"20210223"}}},function(){if(null!=window.BMAP_AUTHENTIC_KEY){var l=void 0,p=!0,q=null,t=!1,fa,ga=[],ja,A=ja=A||{version:"1.3.4"};A.da="$BAIDU$",window[A.da]=window[A.da]||{},A.object=A.object||{},A.extend=A.object.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},A.U=A.U||{},A.U.fa=function(t){return"string"==typeof t||t instanceof String?document.getElementById(t):t&&t.nodeName&&(1==t.nodeType||9==t.nodeType)?t:q},A.fa=A.Ic=A.U.fa,A.U.aa=function(t){return(t=A.U.fa(t))===q||(t.style.display="none"),t},A.aa=A.U.aa,A.lang=A.lang||{},A.lang.Eg=function(t){return"[object String]"==Object.prototype.toString.call(t)},A.Eg=A.lang.Eg,A.lang.jE=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return t;for(var n in e)return t;return p},A.jE=A.lang.jE,A.U.Zj=function(t){return A.lang.Eg(t)?document.getElementById(t):t},A.Zj=A.U.Zj,A.U.getElementsByClassName=function(t,e){var n;if(t.getElementsByClassName)n=t.getElementsByClassName(e);else{(i=t)==q&&(i=document),n=[];var i,r,o,a=(i=i.getElementsByTagName("*")).length,s=RegExp("(^|\\s)"+e+"(\\s|$)");for(o=r=0;re&&(n.qc=e)},setMinZoom:function(t){(t=Math.round(t))>this.M.qc&&(t=this.M.qc),this.M.PO=t,this.wJ()},setMaxZoom:function(t){(t=Math.round(t))t.qc&&this.Xc(t.qc);var e=new P("onzoomspanchange");e.kc=t.kc,e.qc=t.qc,this.dispatchEvent(e)},i4:x("KB"),getKey:function(){return ra},E_:function(e){function n(t){i.a0=t,nb(D.td+"custom/v2/mapstyle","version=4&ak="+ra+"&"+"is_all=true&is_new=1&styles="+encodeURIComponent(i.EF(t,o)),window[r+"cb"])}var i=this,r=this.da;D.Cq("cus.fire","count","z_setmapstylev2count"),this.By(t),this.M.cZ=p,window.MPC_Mgr&&window.MPC_Mgr[i.da]&&window.MPC_Mgr[i.da].close(),i.M.um=t,this.addEventListener("hidecopyright",function(){i.vk.aa(),i.M.Vo=!!e.customEditor,i.M.Vo===t&&i.jF(new N(1,1))}),i.vk&&i.vk.aa(),this.M.Vo=!!e.customEditor,this.M.a6=!!e.sharing,this.M.G5=!!e.preview,this.M.Vo===t&&this.jF(new N(1,1)),Wa.load("hotspot",function(){i.Qu()},p),window[r+"zoomRegion"]={},window.L6=[],window[r+"zoomStyleBody"]=[],window[r+"zoomFrontStyle"]={};var o=this.la();if(A.extend({},e),window[r+"cb"]=function(t){0===(t=JSON.parse(t)).status&&(3===t.data.style.length?(window[r+"_bmap_baseFs"]=t.data.style,window[r+"StyleBody"]=t.data.style[2]):window[r+"StyleBody"]=t.data.style,i.KO(),i.EY())},e.styleId){var a="jsapi";e.sharing?a="sharing":e.preview&&(a="preview"),this.zX(e.styleId,a,n)}else n(e.styleJson);window.iconSetInfo_high||qa(D.url.proto+D.url.domain.TILE_ONLINE_URLS[0]+"/sty/icons_na2x.js?udt=20190108&v=001&from=jsapi")},zX:function(t,e,n){var i=this,r=this.da,o=(1e5*Math.random()).toFixed(0);window[r+"_cbk_si_phpui"+o]=function(t){var e=[];t.result&&0===t.result.error&&t.content&&0===t.content.status&&(e=i.ky(t.content.data.json)),n&&n(e)},window[r+"_cbk_si_api"+o]=function(t){var e=[];0===t.status&&(e=t.info?i.ky(t.info.json):i.ky(t.data.json)),n&&n(e)};var a="/apiconsole/custommap/";switch(e){case"jsapi":a=D.td+"?qt=custom_map&v=3.0",a+="&style_id="+t+"&type=publish&ak="+ra,a+="&callback="+r+"_cbk_si_phpui"+o;break;case"sharing":a=a+"getSharingJson?styleid="+t+"&type=edit&ck="+r+"_cbk_si_api"+o;break;case"preview":a=a+"getJson?styleid="+t+"&type=edit&ck="+r+"_cbk_si_api"+o}qa(a)},aW:function(){Array.prototype.map||(Array.prototype.map=function(t,e){var n,i,r;this==q&&ba(new TypeError(" this is null or not defined"));var o=Object(this),a=o.length>>>0;for("[object Function]"!=Object.prototype.toString.call(t)&&ba(new TypeError(t+" is not a function")),e&&(n=e),i=Array(a),r=0;r=this.M.TF&&this.ya()===Pa&&this.la()<=18,n=t;try{document.createElement("canvas").getContext("2d"),n=p}catch(e){n=t}return e&&n},getCurrentCity:function(){return{name:this.lh,code:this.hs}},bt:function(){return this.W.eo(),this.W},BY:function(e){Pa.setMaxZoom(e.maxZoom||19);var n=new P("oninitindoorlayer");n.af=e,this.dispatchEvent(n),this.M.yg=t},EY:function(t){if(this.M.yg){var e=new P("onupdatestyles");this.dispatchEvent(e)}else(e=new P("oninitindoorlayer")).af=t,this.dispatchEvent(e),this.M.yg=p,this.M.yk=p},By:function(t){this.M.LE=t,this.ef.Kb||(this.ef.Kb=this.ef.Cj[0].Kb),this.ef.Kb.parentElement.style.display=t?"block":"none"},VN:function(t){this.ef.lg.style.display=t?"block":"none"},setPanorama:function(t){this.W=t,this.W.oF(this)},EF:function(t,e){for(var n=this.da,i={featureType:"t",elementType:"e",visibility:"v",color:"c",lightness:"l",saturation:"s",weight:"w",level:"z",hue:"h",fontsize:"f"},r={all:"all",geometry:"g","geometry.fill":"g.f","geometry.stroke":"g.s",labels:"l","labels.text.fill":"l.t.f","labels.text.stroke":"l.t.s","labels.text":"l.t","labels.icon":"l.i","geometry.topfill":"g.f"},o=[],a=this.Ua.rf();a<=this.Ua.Ze();a++)window[n+"zoomFrontStyle"][a]={};window[n+"zoomFrontStyle"].main={};var s;for(a=0;s=t[a];a++)if(!this.NY(s)){e=this.tX(s,e),"land"!==s.featureType&&"all"!==s.featureType&&"background"!==s.featureType||"string"!=typeof s.elementType||"geometry"!==s.elementType&&"geometry.fill"!==s.elementType&&"all"!==s.elementType||!s.stylers||(s.stylers.color&&(window[n+"zoomFrontStyle"][e].bmapLandColor=s.stylers.color),s.stylers.visibility&&"off"===s.stylers.visibility&&(window[n+"zoomFrontStyle"][e].bmapLandColor="#00000000")),"railway"===s.featureType&&"string"==typeof s.elementType&&s.stylers&&(s.stylers.color&&("geometry"===s.elementType&&(window[n+"zoomFrontStyle"][e].bmapRailwayFillColor=s.stylers.color,window[n+"zoomFrontStyle"][e].bmapRailwayStrokeColor=s.stylers.color),"geometry.fill"===s.elementType&&(window[n+"zoomFrontStyle"][e].bmapRailwayFillColor=s.stylers.color),"geometry.stroke"===s.elementType&&(window[n+"zoomFrontStyle"][e].bmapRailwayStrokeColor=s.stylers.color)),s.stylers.visibility&&(window[n+"zoomFrontStyle"][e].bmapRailwayVisibility=s.stylers.visibility)),"roadarrow"===s.featureType&&"labels.icon"===s.elementType&&s.stylers&&(window[n+"zoomFrontStyle"][e].bmapRoadarrowVisibility=s.stylers.visibility);var l={};for(var u in A.extend(l,s),s=l.stylers,delete l.stylers,A.extend(l,s),s=[],i)if(l[u]&&!this.JY(u))if("elementType"===u)s.push(i[u]+":"+r[l[u]]);else{switch(l[u]){case"poilabel":l[u]="poi";break;case"districtlabel":l[u]="label"}s.push(i[u]+":"+l[u])}2this.Gg.lng&&t.lngthis.Gg.lat&&t.latpc?2:nc},yc.prototype.normalize=function(t,e,n,i){n"),this.Wa==t&&A.U.aa(this.R),this.R},Or:function(){this.wc(this.m.anchor)},wc:function(e){(this.v2||!ab(e)||isNaN(e)||et&&this.Da[e].Uj--;this.Ke.splice(t,1)}},cd:x("R"),show:function(){this.Ph!=p&&(this.Ph=p)},aa:function(){this.Ph!=t&&(this.Ph=t)},v_:function(t){t&&(this.m.cursor=t)},getItem:function(t){return this.Pf[t]}});var Qc=I.ua+"menu_zoom_in.png",Rc=I.ua+"menu_zoom_out.png";A.lang.xa(Sc,A.lang.Ja,"MenuItem"),A.object.extend(Sc.prototype,{za:function(t,e){this.P=t,this.Kh=e},remove:function(){this.P=this.Kh=q},fu:function(t){t&&(this.ih=t+"")},Wb:function(t){t&&(this.m.Km=t)},cd:x("R"),enable:function(){this.Nh=p},disable:function(){this.Nh=t}}),A.object.extend(jb.prototype,{Aj:function(){return!this.Xl||!this.Hl},Ub:function(e){return e instanceof jb&&!this.Aj()?this.Ae().Ub(e.Ae())&&this.sf().Ub(e.sf()):t},Ae:x("Xl"),sf:x("Hl"),GV:function(e){return e instanceof jb&&!this.Aj()&&!e.Aj()?e.Te>this.Te&&e.Nethis.ee&&e.beMath.max(this.Te,this.Ne)||Math.max(t.ee,t.be)Math.max(this.ee,this.be))return q;var e=Math.max(this.Te,t.Te),n=Math.min(this.Ne,t.Ne),i=Math.max(this.ee,t.ee);t=Math.min(this.be,t.be);return new jb(new Q(e,i),new Q(n,t))},ns:function(e){return!(e instanceof Q||e instanceof L)||this.Aj()?t:e.lng>=this.Te&&e.lng<=this.Ne&&e.lat>=this.ee&&e.lat<=this.be},extend:function(t){if(t instanceof Q||t instanceof L){var e=t.lng;t=t.lat;this.Xl||(this.Xl=new Q(0,0)),this.Hl||(this.Hl=new Q(0,0)),(!this.Te||this.Te>e)&&(this.Xl.lng=this.Te=e),(!this.Ne||this.Net)&&(this.Xl.lat=this.ee=t),(!this.be||this.be=this.yG[i]){n=this.uP[i];break}return new L((t=this.sK(t,n)).lng,t.lat)},Ya:function(t){if(t===q||t===l||180=this.Lu[i]){n=this.vG[i];break}if(!n)for(i=0;i'),n.push(e),n.push(""),this.ca=Fb(this.map.Wf().DE,n.join(""))},initialize:function(t){return this.map=t,this.Oj(),this.ca&&A.V(this.ca,J()?"touchstart":"mousedown",function(t){na(t)}),this.ca},draw:function(){var t=this.map.cf(this.K.point);this.K.Ga=new N(-Math.round(this.K.width/2)-Math.round(this.K.Vx),-Math.round(this.K.height/2)-Math.round(this.K.Vx)),this.ca.style.left=t.x+this.K.Ga.width+"px",this.ca.style.top=t.y+this.K.Ga.height+"px"},ma:function(){return this.K.point},V1:function(){return this.map.no(this.ma())},va:function(t){this.K.point=t,this.draw()},w_:function(t,e){this.K.width=Math.round(t),this.K.height=Math.round(e),this.ca&&(this.ca.style.width=this.K.width+"px",this.ca.style.height=this.K.height+"px",this.draw())}}),A.extend(ad.prototype,{UN:function(t){t&&(this.imageUrl=t)},N_:function(t){t&&(this.printImageUrl=t)},He:function(t){t&&(this.size=new N(t.width,t.height))},wc:function(t){t&&(this.anchor=new N(t.width,t.height))},au:function(t){t&&(this.imageOffset=new N(t.width,t.height))},B_:function(t){t&&(this.infoWindowAnchor=new N(t.width,t.height))},y_:function(t){t&&(this.imageSize=new N(t.width,t.height))},toString:ea("Icon")}),A.extend(bd.prototype,{setPath:ca("iB"),setAnchor:function(t){this.Mi=this.style.anchor=t},setRotation:function(t){this.style.rotation=t},setScale:function(t){this.style.scale=t},setStrokeWeight:function(t){this.style.tc=t},setStrokeColor:function(t){t=A.ks.rC(t,this.style.zd),this.style.strokeColor=t},setStrokeOpacity:function(t){this.style.zd=t},setFillOpacity:function(t){this.style.zg=t},setFillColor:function(t){this.style.fillColor=t}}),A.lang.xa(dd,A.lang.Ja,"InfoWindow"),A.extend(dd.prototype,{setWidth:function(t){!t&&0!=t||isNaN(t)||t<0||(0!=t&&(t<220&&(t=220),730this.OA;)e-=this.iI;for(;eb[0]||m<=b[0]||y>b[1]||o<=b[1]))&&this.Hx(w)}for(_=-r.offsetX+r.width/2,w=-r.offsetY+r.height/2,u.Kb&&(u.Kb.style.left=Math.ceil(g+_)-a[0]+"px",u.Kb.style.top=Math.ceil(v+w)-a[1]+"px",u.Kb.style.WebkitTransform="translate3d(0,0,0)"),g=[],r.KB=[];fthis.OA},Ue:function(t){var e=this,n=t.target;if(e.map.Vd(),n.vn&&this.map.Ue(n.vn),n.Rx){for(t=0;ty&&(y=x.ie+x.width),x.je+x.height>m&&(m=x.je+x.height)):(f=x.ie,d=x.je,y=x.ie+x.width,m=x.je+x.height)}}else"line"===c.type?(f=c.Zf,d=c.$f,y=c.ui,m=c.vi):"biaopai"===c.type&&(f=(m=c.x5).ie,d=m.je,y=m.ie+m.width,m=m.je+m.height);f!==l&&(c.Zf=f,c.$f=d,c.ui=y,c.vi=m,i.push(c))}for(i.sort(function(t,e){return e.uy-t.uy||e.Zf-t.Zf||e.$f-t.$f}),o=0,a=i.length;os.ui-r||h.vi-rs.vi-r||h.WJ.push(u);for(o=0,a=i.length;o>>=0,ee[e]="rgba("+(255&t)+","+(t>>8&255)+","+(t>>16&255)+","+(t>>24&255)/255+")"),ee[e]},qN:function(t){6===(t=t.replace("#","")).length&&(t+="ff");for(var e="rgba(",n=0;n<8;n+=2)e=n<6?e+(parseInt(t.slice(n,n+2),16)+","):e+(parseInt(t.slice(n,n+2),16)/255+")");return e},Uc:function(t,e){var n;return de[t]||((n=t.toString(2)).length<8&&(n=Array(8-n.length+1).join("0")+n),de[t]=n),"1"===(n=de[t])[e-ge[e].start]},Vm:function(t,e,n){var i=[],r=(e=Math.pow(2,e-ge[e].Sc)/100,t[0]*e),o=t[1]*e;i[i.length]=r,i[i.length]=n-o;for(var a=2;at.Zf&&et.$f&&n]*>/g,"")).replace(/[ | ]* /g," ")},fb.DZ=function(t){return t.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g,"$1,$2;")},fb.EZ=function(t,e){return t.replace(RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig"),"$1")};var xe=2,ye=6,ze=8,Ae=2,Be=3,Ce=6,De=0,Ee="bt",Fe="nav",Ge="walk",Ke="bl",Le="bsl",Me="ride",Ne=15,Oe=18;D.I=window.Instance=A.lang.Tc,A.extend(Pe.prototype,{Ba:function(){this.za()},za:function(){this.tV(),this.cb.innerHTML=this.SV()},tV:function(){isNaN(parseInt(this.page))&&(this.page=1),isNaN(parseInt(this.Od))&&(this.Od=1),this.page<1&&(this.page=1),this.Od<1&&(this.Od=1),this.page>this.Od&&(this.page=this.Od),this.page=parseInt(this.page),this.Od=parseInt(this.Od)},W3:function(){location.search.match(RegExp("[?&]?"+this.UJ+"=([^&]*)[&$]?","gi")),this.page=RegExp.$1},SV:function(){var t=[],e=this.page-1,n=this.page+1;if(t.push('

'),!(e<1)){var i;if(this.page>=this.bg)t.push('首页'.replace("{temp1}","BMap.I('"+this.da+"').toPage(1);"));t.push('上一页'.replace("{temp2}","BMap.I('"+this.da+"').toPage("+e+");"))}if(this.pagethis.page+i?this.page+i:this.Od;i=this.page-i-r}for(this.page>this.Od-this.bg&&this.page>=this.bg&&(i=this.Od-this.bg+1,e=this.Od),r=i;r<=e;r++)0'+r+""):1<=r&&r<=this.Od&&(i='['+r+"]",t.push(i.replace("{temp3}","BMap.I('"+this.da+"').toPage("+r+");"))));return n>this.Od||t.push('下一页'.replace("{temp4}","BMap.I('"+this.da+"').toPage("+n+");")),t.push("

"),t.join("")},toPage:function(t){t=t||1,"function"==typeof this.eK&&(this.eK(t),this.page=t),this.update&&this.Ba()}}),A.xa(hb,Y,"LocalSearch"),hb.rq=10,hb.s1=1,hb.Dn=100,hb.oG=2e3,hb.xG=1e5,A.extend(hb.prototype,{search:function(t,e){this.Qa.push({method:"search",arguments:[t,e]})},bn:function(t,e,n){this.Qa.push({method:"searchInBounds",arguments:[t,e,n]})},Wp:function(t,e,n,i){this.Qa.push({method:"searchNearby",arguments:[t,e,n,i]})},we:function(){delete this.Ka,delete this.Se,delete this.ka,delete this.ra,this.La=-1,this.Va(),this.m.na.Aa&&(this.m.na.Aa.innerHTML="")},Hm:u(),aD:function(){this.m.na.Yt=p},HC:function(){this.m.na.Yt=t},gn:function(t){this.m.Qk="number"!=typeof t||isNaN(t)?hb.rq:t<1?hb.rq:t>hb.Dn?hb.rq:t},tf:function(){return this.m.Qk},toString:ea("LocalSearch")});var Qe=hb.prototype;V(Qe,{clearResults:Qe.we,setPageCapacity:Qe.gn,getPageCapacity:Qe.tf,gotoPage:Qe.Hm,searchNearby:Qe.Wp,searchInBounds:Qe.bn,search:Qe.search,enableFirstResultSelection:Qe.aD,disableFirstResultSelection:Qe.HC}),A.xa(Re,Y,"BaseRoute"),A.extend(Re.prototype,{we:u()}),Se.Dn=100,Se.pP=[0,1,0,0,0,0,0,0,2,0,0,0,1,1,1],Se.qP=[0,3,4,0,0,0,5],A.xa(Se,Re,"TransitRoute"),A.extend(Se.prototype,{hn:function(t){this.m.Pd=0<=t&&t<=5?t:0},nF:function(t){this.m.Mm=0<=t&&t<=2?t:0},sF:function(t){this.m.nn=0<=t&&t<=2?t:0},yA:function(t,e){this.Qa.push({method:"_internalSearch",arguments:[t,e]})},search:function(t,e){this.Qa.push({method:"search",arguments:[t,e]})},gn:function(t){"string"==typeof t&&(t=parseInt(t,10),isNaN(t))?this.m.Qk=Se.Dn:this.m.Qk="number"!=typeof t?Se.Dn:1<=t&&t<=Se.Dn?Math.round(t):Se.Dn},toString:ea("TransitRoute"),k2:function(t){return t.replace(/\(.*\)/,"")}});var Te=Se.prototype;V(Te,{_internalSearch:Te.yA}),Ue.FP=" 环岛 无属性道路 主路 高速连接路 交叉点内路段 连接道路 停车场内部道路 服务区内部道路 桥 步行街 辅路 匝道 全封闭道路 未定义交通区域 POI连接路 隧道 步行道 公交专用道 提前右转道".split(" "),A.xa(Ue,Re,"DWRoute"),A.extend(Ue.prototype,{search:function(t,e,n){this.Qa.push({method:"search",arguments:[t,e,n]})}}),A.xa(Ve,Ue,"DrivingRoute"),Ve.prototype.hn=function(t){this.m.Pd=0<=t&&t<=5?t:0},A.xa(We,Ue,"WalkingRoute"),A.xa(Xe,Ue,"TruckRoute"),Xe.prototype.hn=function(t){this.m.Pd=0<=t&&t<=5?t:0},A.xa(Ye,Ue,"RidingRoute"),A.lang.xa(Ze,A.lang.Ja,"RouteAddr");var $e=navigator.userAgent;/ipad|iphone|ipod|iph/i.test($e);var af=/android/i.test($e);A.extend(bf.prototype,{ON:function(t,e,n){var i=this;Wa.load("route",function(){i.Dd(t,e,n)})}}),A.xa(cf,A.lang.Ja,"Geocoder"),A.extend(cf.prototype,{Dm:function(t,e,n){this.Qa.push({method:"getPoint",arguments:[t,e,n]})},Am:function(t,e,n){this.Qa.push({method:"getLocation",arguments:[t,e,n]})},toString:ea("Geocoder")});var df=cf.prototype,Xa;V(df,{getPoint:df.Dm,getLocation:df.Am}),A.extend(Geolocation.prototype,{getCurrentPosition:function(t,e){this.ue.push({method:"getCurrentPosition",arguments:arguments})},getStatus:function(){return xe},enableSDKLocation:function(){J()&&(this.M.Ii=p)},disableSDKLocation:function(){this.M.Ii=t}}),A.xa(ef,A.lang.Ja,"LocalCity"),A.extend(ef.prototype,{get:function(t){this.Qa.push({method:"get",arguments:[t]})},toString:ea("LocalCity")}),A.xa(ff,A.lang.Ja,"Boundary"),A.extend(ff.prototype,{get:function(t,e){this.Qa.push({method:"get",arguments:[t,e]})},toString:ea("Boundary")}),gf.zv=I.ua+"iw_plus.gif",gf.yS=I.ua+"iw_minus.gif",gf.oU=I.ua+"stop_icon.png",A.xa(gf,Y),A.extend(gf.prototype,{getBusList:function(t){this.Qa.push({method:"getBusList",arguments:[t]})},getBusLine:function(t){this.Qa.push({method:"getBusLine",arguments:[t]})},setGetBusListCompleteCallback:function(t){this.m.eN=t||u()},setGetBusLineCompleteCallback:function(t){this.m.dN=t||u()},setBusListHtmlSetCallback:function(t){this.m.bN=t||u()},setBusLineHtmlSetCallback:function(t){this.m.aN=t||u()},setPolylinesSetCallback:function(t){this.m.ME=t||u()}}),A.xa(hf,Y,"Autocomplete"),A.extend(hf.prototype,{Vi:u(),show:u(),aa:u(),tF:function(t){this.fb.types=t},fn:function(t){this.md.src=t},search:ca("gj"),Ay:ca("WH"),eu:function(t){this.fb.Mt=t}});var kf=4,lf=1,mf=5,jf=0;A.lang.xa(Ra,A.lang.Ja,"Panorama"),A.extend(Ra.prototype,{RP:function(){var t=this,e=this.Gf=H("div");e.className="pano_close",e.style.cssText="z-index: 1201;display: none",e.title="退出全景",e.onclick=function(){t.aa()},this.R.appendChild(e);var n=this.jr=H("a");n.className="pano_pc_indoor_exit",n.style.cssText="z-index: 1201;display: none",n.innerHTML='出口',n.title="退出室内景",n.onclick=function(){t.fp()},this.R.appendChild(n),window.ActiveXObject&&!document.addEventListener&&(e.style.backgroundColor="rgb(37,37,37)",n.style.backgroundColor="rgb(37,37,37)")},fp:u(),BT:function(t){var e,n;e=t.style,"absolute"!=(n=Za(t).position)&&"relative"!=n&&(e.position="relative",e.zIndex=0),"absolute"!==n&&"relative"!==n||((t=Za(t).zIndex)&&"auto"!==t||(e.zIndex=0))},BX:x("co"),Zb:x("hb"),aY:x("hw"),eO:x("hw"),ma:x("Mb"),Na:x("Oa"),la:x("Rc"),Bg:x("Wg"),Y3:function(){return this.g2||[]},R3:x("WS"),dt:x("Pe"),Dy:function(t){t!==this.Pe&&(this.Pe=t,this.dispatchEvent(new P("onscene_type_changed")))},dO:function(t){t!==mf&&(mf=t)},ZN:function(t){t!==kf&&(kf=t)},Gc:function(t,e,n){"object"==typeof e&&(n=e,e=l),t!=this.hb&&(this.Bl=this.hb,this.Cl=this.Mb,this.hb=t,this.Pe=e||"street",this.Mb=q,n&&n.pov&&this.xd(n.pov))},va:function(t){t.Ub(this.Mb)||(this.Bl=this.hb,this.Cl=this.Mb,this.Mb=t,this.hb=q)},xd:function(t){if(t){t=this.Oa.pitch;var e=this.Oa.heading;e=this.AC(e);t>this.fk?t=this.fk:t"),r.push(""+n+"外景"),r.push("
进入全景>>"),r.push(""),r.push(t),r.join("")},aS:function(t,e){var n=90-180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI;return n<0&&(n+=360),n},yL:function(t,e,n,i,r){var o={panoId:t,panoHeading:e||0,panoPitch:n||0,width:i,height:r};return(Af.Mu+"?qt=pr3d&fovy=75&quality=80&panoid={panoId}&heading={panoHeading}&pitch={panoPitch}&width={width}&height={height}").replace(/\{(.*?)\}/g,function(t,e){return o[e]})}});var Bf=document,Cf=Math,Df=Bf.createElement("div").style,Ef;t:{for(var Ff=["t","webkitT","MozT","msT","OT"],Gf,Hf=0,If=Ff.length;Hfthis[t+"ScrollbarMaxScroll"]&&(n=this.options.nD?this[t+"ScrollbarMaxScroll"]:((n=this[t+"ScrollbarIndicatorSize"]-Cf.round(3*(n-this[t+"ScrollbarMaxScroll"])))<8&&(n=8),this[t+"ScrollbarIndicator"].style["h"==t?"width":"height"]=n+"px",this[t+"ScrollbarMaxScroll"]+(this[t+"ScrollbarIndicatorSize"]-n))),this[t+"ScrollbarWrapper"].style[Qf]="0",this[t+"ScrollbarWrapper"].style.opacity=e&&this.options.Gx?"0":"1",this[t+"ScrollbarIndicator"].style[Lf]="translate("+("h"==t?n+"px,0)":"0,"+n+"px)")+fg)},EQ:function(e){if(e.wR===p)return this.OB=e.target,this.gx=Date.now(),p;if(this.OB&&this.gx){if(600this.options.mq&&(e=2*this.options.mq*Math.pow(.5,this.options.mq/e)),this.Dp=e/this.scale,r=this.hy-this.hy*this.Dp+this.x,o=this.iy-this.iy*this.Dp+this.y,this.Rb.style[Lf]="translate("+r+"px,"+o+"px) scale("+e+")"+fg,this.options.mN&&this.options.mN.call(this,t)):(this.zh=e.pageX,this.Ah=e.pageY,(0this.vf||o=this.vf||0<=this.vd?this.vf:this.vd),this.JC+=n,this.KC+=i,this.uw=Cf.abs(this.JC),this.vw=Cf.abs(this.KC),this.uw<6&&this.vw<6||(this.options.AE&&(this.uw>this.vw+5?(o=this.y,i=0):this.vw>this.uw+5&&(r=this.x,n=0)),this.yh=p,this.Cr(r,o),this.EC=0r.vf&&i>r.vf||r.y=this.vf||0i.options.mq&&(n=i.options.mq),n!=i.scale&&(!i.Uy&&i.options.Lp&&i.options.Lp.call(i,t),i.Uy++,i.zoom(t.pageX,t.pageY,n,400),setTimeout(function(){i.Uy--,!i.Uy&&i.options.Kp&&i.options.Kp.call(i,t)},400))):(e=i.x+e,n=i.y+n,0i.vf?n=i.vf:n=u+i.time?(a.Cr(i.x,i.y),a.gm=t,a.options.vZ&&a.options.vZ.call(a),a.AB()):(n=(n-u)/i.time-1,r=Cf.sqrt(1-n*n),n=(i.x-s)*r+s,e=(i.y-l)*r+l,a.Cr(n,e),a.gm&&(a.$B=dg(o)))})()):a.po(400))},uJ:function(t){t+="ms",this.Rb.style[Nf]=t,this.ni&&(this.jY.style[Nf]=t),this.Gi&&(this.Q0.style[Nf]=t)},jI:function(t,e,n,i,r){var o=(e=Cf.abs(t)/e)*e/.0012;return 0=this.bf[n]){r=n;break}for(r==this.vC&&0=this.xf[n]){r=n;break}return r==this.wC&&0this.zn),this.ni=this.wp&&this.options.ni,this.Gi=this.tn&&this.options.Gi&&this.Vp>this.zn,t=this.jk(this.yn),this.YF=-t.left,this.ZF=-t.top,"string"==typeof this.options.lu)for(this.bf=[],this.xf=[],t=0,e=(n=this.Rb.querySelectorAll(this.options.lu)).length;t=this.qe;)this.bf[e]=i,i-=this.Du,e++;for(this.qe%this.Du&&(this.bf[this.bf.length]=this.qe-this.bf[this.bf.length-1]+this.bf[this.bf.length-1]),e=i=0,this.xf=[];i>=this.vd;)this.xf[e]=i,i-=this.zn,e++;this.vd%this.zn&&(this.xf[this.xf.length]=this.vd-this.xf[this.xf.length-1]+this.xf[this.xf.length-1])}this.Rv("h"),this.Rv("v"),this.il||(this.Rb.style[Nf]="0",this.po(400))},scrollTo:function(t,e,n,i){var r=t;for(this.stop(),r.length||(r=[{x:t,y:e,time:n,YZ:i}]),t=0,e=r.length;tthis.vf?this.vf:this.y'+t[n].data+"";return e},lL:function(t){for(var e="",n=0,i=t.length;n'+t[n].data+"";return e},yX:function(t){for(var e,n,i,r,o=[],a=this.kg.height,s=this.kg.width,l=0;l'+r+''+r+"",3===recoType?Ya()?(this.Sz=e,this.OW=i,t.splice(l,1),l--):(e=''+r+'
',o.push(e)):o.push(e);return o.join("")},QX:function(e){var n=this,i=this.W.Zb();i&&this.Ul.yx(i,function(t){n.W.Zb()===i&&e(t)})},wc:function(t){(!ab(t)||isNaN(t)||t',this.mg=this.Sv.children[0],this.Ir=this.Sv.children[1],this.R.appendChild(this.Sv),this.mg.children[0].style.marginTop=this.Ir.children[0].style.marginTop=this.mg.offsetHeight/2-this.mg.children[0].offsetHeight/2+"px"},bC:function(){var t=this;A.V(this.mg,"click",function(){t.scrollTo(t.hh.offsetLeft+t.ko)}),A.V(this.Ir,"click",function(){t.scrollTo(t.hh.offsetLeft-t.ko)})},xU:function(){A.U.rc(this.mg,"pano_arrow_disable"),A.U.rc(this.Ir,"pano_arrow_disable");var t=this.hh.offsetLeft;t>=this.Dv&&A.U.ib(this.mg,"pano_arrow_disable"),t-this.ko<=this.NA&&A.U.ib(this.Ir,"pano_arrow_disable")},scrollTo:function(e){(e=ethis.Dv&&(e=this.Dv);var n=this.hh.offsetLeft,i=this;new yb({Nc:60,dc:zb.Ls,duration:300,Ba:function(t){i.hh.style.left=n+(e-n)*t+"px"},finish:function(){i.xU()}})}},D.Map=Oa,D.Hotspot=mb,D.MapType=ne,D.Point=Q,D.Pixel=R,D.Size=N,D.Bounds=jb,D.TileLayer=wd,D.Projection=Tc,D.MercatorProjection=T,D.PerspectiveProjection=lb,D.Copyright=function(t,e,n){this.id=t,this.jb=e,this.content=n},D.Overlay=Wc,D.Label=ed,D.GroundOverlay=fd,D.PointCollection=jd,D.Marker=W,D.CanvasLayer=md,D.Icon=ad,D.IconSequence=cd,D.Symbol=bd,D.Polyline=qd,D.Polygon=pd,D.InfoWindow=dd,D.Circle=rd,D.Control=Ec,D.NavigationControl=ob,D.GeolocationControl=Ic,D.OverviewMapControl=qb,D.CopyrightControl=Jc,D.ScaleControl=pb,D.MapTypeControl=rb,D.CityListControl=Kc,D.PanoramaControl=Mc,D.TrafficLayer=Dd,D.CustomLayer=sb,D.ContextMenu=Pc,D.MenuItem=Sc,D.LocalSearch=hb,D.TransitRoute=Se,D.DrivingRoute=Ve,D.TruckRoute=Xe,D.WalkingRoute=We,D.RidingRoute=Ye,D.Autocomplete=hf,D.RouteSearch=bf,D.Geocoder=cf,D.LocalCity=ef,D.Geolocation=Geolocation,D.Convertor=Vc,D.BusLineSearch=gf,D.Boundary=ff,D.Panorama=Ra,D.PanoramaLabel=pf,D.PanoramaService=Oc,D.PanoramaCoverageLayer=Nc,D.PanoramaFlashInterface=yf,V(window,{BMap:D,_jsload2:function(t,e){ja.Ly.OY&&ja.Ly.set(t,e),Wa.rV(t,e)},BMAP_API_VERSION:"2.0"});var mg=Oa.prototype;V(mg,{getBounds:mg.le,getCenter:mg.Qb,getMapType:mg.ya,getSize:mg.zb,setSize:mg.He,getViewport:mg.ht,getZoom:mg.la,centerAndZoom:mg.ud,panTo:mg.zi,panBy:mg.Kg,setCenter:mg.zf,setCurrentCity:mg.kF,setMapType:mg.Og,setViewport:mg.Pg,setZoom:mg.Xc,highResolutionEnabled:mg.Ix,zoomTo:mg.Rg,zoomIn:mg.$F,zoomOut:mg.aG,addHotspot:mg.QB,removeHotspot:mg.$Z,clearHotspots:mg.Ow,checkResize:mg.uV,addControl:mg.ds,removeControl:mg.DN,getContainer:mg.Ta,addContextMenu:mg.bm,removeContextMenu:mg.Pp,addOverlay:mg.Ra,removeOverlay:mg.Jb,clearOverlays:mg.lK,openInfoWindow:mg.Vc,closeInfoWindow:mg.Mc,pointToOverlayPixel:mg.cf,overlayPixelToPoint:mg.oN,getInfoWindow:mg.qh,getOverlays:mg.vx,getPanes:function(){return{floatPane:this.ce.oD,markerMouseTarget:this.ce.DE,floatShadow:this.ce.bL,labelPane:this.ce.vE,markerPane:this.ce.NM,markerShadow:this.ce.OM,mapPane:this.ce.Gt,vertexPane:this.ce.UO}},addTileLayer:mg.Ue,removeTileLayer:mg.cg,pixelToPoint:mg.bc,pointToPixel:mg.vc,setFeatureStyle:mg.X5,selectBaseElement:mg.Q5,setMapStyle:mg.bu,enable3DBuilding:mg.ap,disable3DBuilding:mg.hW,getPanorama:mg.bt,initIndoorLayer:mg.BY,setNormalMapDisplay:mg.By,setMapStyleV2:mg.E_,setBMapCopyrightOffset:mg.jF,getVectorContainer:mg.eY}),V(window,{BMAP_COORD_BD09:5,BMAP_COORD_GCJ02:3});var ng=ne.prototype;V(ng,{getTileLayer:ng.ZX,getMinZoom:ng.rf,getMaxZoom:ng.Ze,getProjection:ng.uj,getTextColor:ng.Gm,getTips:ng.ft}),V(window,{BMAP_NORMAL_MAP:Pa,BMAP_PERSPECTIVE_MAP:Sa,BMAP_SATELLITE_MAP:cb,BMAP_HYBRID_MAP:Ua});var og=T.prototype;V(og,{lngLatToPoint:og.Hg,pointToLngLat:og.Ej});var pg=lb.prototype;V(pg,{lngLatToPoint:pg.Hg,pointToLngLat:pg.Ej});var qg=jb.prototype;V(qg,{equals:qg.Ub,containsPoint:qg.ns,containsBounds:qg.GV,intersects:qg.ot,extend:qg.extend,getCenter:qg.Qb,isEmpty:qg.Aj,getSouthWest:qg.Ae,getNorthEast:qg.sf,toSpan:qg.LF});var rg=Wc.prototype;V(rg,{isVisible:rg.Uc,show:rg.show,hide:rg.aa}),Wc.getZIndex=Wc.Kk;var sg=kb.prototype;V(sg,{openInfoWindow:sg.Vc,closeInfoWindow:sg.Mc,enableMassClear:sg.qj,disableMassClear:sg.jW,show:sg.show,hide:sg.aa,getMap:sg.sx,addContextMenu:sg.bm,removeContextMenu:sg.Pp});var tg=W.prototype;V(tg,{setIcon:tg.Wb,getIcon:tg.lp,setPosition:tg.va,getPosition:tg.ma,setOffset:tg.Rd,getOffset:tg.sj,getLabel:tg.Ys,setLabel:tg.Fj,setTitle:tg.Hc,setTop:tg.Di,enableDragging:tg.jc,disableDragging:tg.Bs,setZIndex:tg.cq,getMap:tg.sx,setAnimation:tg.dn,setShadow:tg.Ey,hide:tg.aa,setRotation:tg.Zp,getRotation:tg.CL}),V(window,{BMAP_ANIMATION_DROP:1,BMAP_ANIMATION_BOUNCE:2});var ug=ed.prototype;V(ug,{setStyle:ug.Td,setStyles:ug.Ci,setContent:ug.Pc,setPosition:ug.va,getPosition:ug.ma,setOffset:ug.Rd,getOffset:ug.sj,setTitle:ug.Hc,setZIndex:ug.cq,getMap:ug.sx,getContent:ug.Dk});var vg=ad.prototype;V(vg,{setImageUrl:vg.UN,setSize:vg.He,setAnchor:vg.wc,setImageOffset:vg.au,setImageSize:vg.y_,setInfoWindowAnchor:vg.B_,setPrintImageUrl:vg.N_});var wg=dd.prototype;V(wg,{redraw:wg.re,setTitle:wg.Hc,setContent:wg.Pc,getContent:wg.Dk,getPosition:wg.ma,enableMaximize:wg.oh,disableMaximize:wg.$w,isOpen:wg.eb,setMaxContent:wg.cu,maximize:wg.Zx,enableAutoPan:wg.Ms});var xg=Zc.prototype;V(xg,{getPath:xg.$e,setPath:xg.Sd,setPositionAt:xg.jn,getStrokeColor:xg.WX,setStrokeWeight:xg.bq,getStrokeWeight:xg.FL,setStrokeOpacity:xg.$p,getStrokeOpacity:xg.XX,setFillOpacity:xg.$t,getFillOpacity:xg.rX,setStrokeStyle:xg.aq,getStrokeStyle:xg.EL,getFillColor:xg.qX,getBounds:xg.le,enableEditing:xg.pf,disableEditing:xg.iW,getEditing:xg.nX,getGeodesicPath:xg.uX});var yg=rd.prototype;V(yg,{setCenter:yg.zf,getCenter:yg.Qb,getRadius:yg.AL,setRadius:yg.Af});var zg=pd.prototype;V(zg,{getPath:zg.$e,setPath:zg.Sd,setPositionAt:zg.jn});var Ag=mb.prototype;V(Ag,{getPosition:Ag.ma,setPosition:Ag.va,getText:Ag.SD,setText:Ag.fu}),Q.prototype.equals=Q.prototype.Ub,R.prototype.equals=R.prototype.Ub,N.prototype.equals=N.prototype.Ub,V(window,{BMAP_ANCHOR_TOP_LEFT:Fc,BMAP_ANCHOR_TOP_RIGHT:Gc,BMAP_ANCHOR_BOTTOM_LEFT:Hc,BMAP_ANCHOR_BOTTOM_RIGHT:3});var Bg=Ec.prototype;V(Bg,{setAnchor:Bg.wc,getAnchor:Bg.vD,setOffset:Bg.Rd,getOffset:Bg.sj,show:Bg.show,hide:Bg.aa,isVisible:Bg.Uc,toString:Bg.toString});var Cg=ob.prototype;V(Cg,{getType:Cg.up,setType:Cg.kn}),V(window,{BMAP_NAVIGATION_CONTROL_LARGE:0,BMAP_NAVIGATION_CONTROL_SMALL:1,BMAP_NAVIGATION_CONTROL_PAN:2,BMAP_NAVIGATION_CONTROL_ZOOM:3});var Dg=qb.prototype;V(Dg,{changeView:Dg.ve,setSize:Dg.He,getSize:Dg.zb});var Eg=pb.prototype;V(Eg,{getUnit:Eg.dY,setUnit:Eg.uF}),V(window,{BMAP_UNIT_METRIC:"metric",BMAP_UNIT_IMPERIAL:"us"});var Fg=Jc.prototype;V(Fg,{addCopyright:Fg.Aw,removeCopyright:Fg.XE,getCopyright:Fg.xm,getCopyrightCollection:Fg.CD}),V(window,{BMAP_MAPTYPE_CONTROL_HORIZONTAL:Lc,BMAP_MAPTYPE_CONTROL_DROPDOWN:1,BMAP_MAPTYPE_CONTROL_MAP:2});var Gg=wd.prototype;V(Gg,{getMapType:Gg.ya,getCopyright:Gg.xm,isTransparentPng:Gg.At});var Hg=Pc.prototype;V(Hg,{addItem:Hg.es,addSeparator:Hg.TB,removeSeparator:Hg.$E});var Ig=Sc.prototype;V(Ig,{setText:Ig.fu});var Jg=Y.prototype;V(Jg,{getStatus:Jg.Em,setSearchCompleteCallback:Jg.eu,getPageCapacity:Jg.tf,setPageCapacity:Jg.gn,setLocation:Jg.fn,disableFirstResultSelection:Jg.HC,enableFirstResultSelection:Jg.aD,gotoPage:Jg.Hm,searchNearby:Jg.Wp,searchInBounds:Jg.bn,search:Jg.search}),V(window,{BMAP_STATUS_SUCCESS:0,BMAP_STATUS_CITY_LIST:1,BMAP_STATUS_UNKNOWN_LOCATION:xe,BMAP_STATUS_UNKNOWN_ROUTE:3,BMAP_STATUS_INVALID_KEY:4,BMAP_STATUS_INVALID_REQUEST:5,BMAP_STATUS_PERMISSION_DENIED:ye,BMAP_STATUS_SERVICE_UNAVAILABLE:7,BMAP_STATUS_TIMEOUT:ze}),V(window,{BMAP_POI_TYPE_NORMAL:0,BMAP_POI_TYPE_BUSSTOP:1,BMAP_POI_TYPE_BUSLINE:2,BMAP_POI_TYPE_SUBSTOP:3,BMAP_POI_TYPE_SUBLINE:4}),V(window,{BMAP_TRANSIT_POLICY_RECOMMEND:0,BMAP_TRANSIT_POLICY_LEAST_TIME:4,BMAP_TRANSIT_POLICY_LEAST_TRANSFER:1,BMAP_TRANSIT_POLICY_LEAST_WALKING:2,BMAP_TRANSIT_POLICY_AVOID_SUBWAYS:3,BMAP_TRANSIT_POLICY_FIRST_SUBWAYS:5,BMAP_LINE_TYPE_BUS:0,BMAP_LINE_TYPE_SUBWAY:1,BMAP_LINE_TYPE_FERRY:2,BMAP_LINE_TYPE_TRAIN:3,BMAP_LINE_TYPE_AIRPLANE:4,BMAP_LINE_TYPE_COACH:5}),V(window,{BMAP_TRANSIT_TYPE_POLICY_TRAIN:0,BMAP_TRANSIT_TYPE_POLICY_AIRPLANE:1,BMAP_TRANSIT_TYPE_POLICY_COACH:2}),V(window,{BMAP_INTERCITY_POLICY_LEAST_TIME:0,BMAP_INTERCITY_POLICY_EARLY_START:1,BMAP_INTERCITY_POLICY_CHEAP_PRICE:2}),V(window,{BMAP_TRANSIT_TYPE_IN_CITY:0,BMAP_TRANSIT_TYPE_CROSS_CITY:1}),V(window,{BMAP_TRANSIT_PLAN_TYPE_ROUTE:0,BMAP_TRANSIT_PLAN_TYPE_LINE:1});var Kg=Re.prototype;V(Kg,{clearResults:Kg.we}),Te=Se.prototype,V(Te,{setPolicy:Te.hn,toString:Te.toString,setPageCapacity:Te.gn,setIntercityPolicy:Te.nF,setTransitTypePolicy:Te.sF}),V(Xe.prototype,{setPolicy:Xe.hn,toString:Xe.toString,setPageCapacity:Xe.gn,setIntercityPolicy:Xe.nF,setTransitTypePolicy:Xe.sF}),V(window,{BMAP_DRIVING_POLICY_DEFAULT:0,BMAP_DRIVING_POLICY_AVOID_HIGHWAYS:3,BMAP_DRIVING_POLICY_AVOID_CONGESTION:5,BMAP_DRIVING_POLICY_FIRST_HIGHWAYS:4}),V(window,{BMAP_MODE_DRIVING:"driving",BMAP_MODE_TRANSIT:"transit",BMAP_MODE_WALKING:"walking",BMAP_MODE_NAVIGATION:"navigation"});var Lg=bf.prototype;V(Lg,{routeCall:Lg.ON}),V(window,{BMAP_HIGHLIGHT_STEP:1,BMAP_HIGHLIGHT_ROUTE:2}),V(window,{BMAP_ROUTE_TYPE_DRIVING:Be,BMAP_ROUTE_TYPE_WALKING:Ae,BMAP_ROUTE_TYPE_RIDING:Ce}),V(window,{BMAP_ROUTE_STATUS_NORMAL:De,BMAP_ROUTE_STATUS_EMPTY:1,BMAP_ROUTE_STATUS_ADDRESS:2});var Mg=Ve.prototype;V(Mg,{setPolicy:Mg.hn});var Ng=hf.prototype;V(Ng,{show:Ng.show,hide:Ng.aa,setTypes:Ng.tF,setLocation:Ng.fn,search:Ng.search,setInputValue:Ng.Ay}),V(sb.prototype,{});var Og=ff.prototype;V(Og,{get:Og.get}),V(Nc.prototype,{}),V(window,{BMAP_POINT_DENSITY_HIGH:200,BMAP_POINT_DENSITY_MEDIUM:Gd,BMAP_POINT_DENSITY_LOW:50}),V(window,{BMAP_POINT_SHAPE_STAR:1,BMAP_POINT_SHAPE_WATERDROP:2,BMAP_POINT_SHAPE_CIRCLE:gd,BMAP_POINT_SHAPE_SQUARE:4,BMAP_POINT_SHAPE_RHOMBUS:5}),V(window,{BMAP_POINT_SIZE_TINY:1,BMAP_POINT_SIZE_SMALLER:2,BMAP_POINT_SIZE_SMALL:3,BMAP_POINT_SIZE_NORMAL:hd,BMAP_POINT_SIZE_BIG:5,BMAP_POINT_SIZE_BIGGER:6,BMAP_POINT_SIZE_HUGE:7}),V(window,{BMap_Symbol_SHAPE_CAMERA:11,BMap_Symbol_SHAPE_WARNING:12,BMap_Symbol_SHAPE_SMILE:13,BMap_Symbol_SHAPE_CLOCK:14,BMap_Symbol_SHAPE_POINT:9,BMap_Symbol_SHAPE_PLANE:10,BMap_Symbol_SHAPE_CIRCLE:1,BMap_Symbol_SHAPE_RECTANGLE:2,BMap_Symbol_SHAPE_RHOMBUS:3,BMap_Symbol_SHAPE_STAR:4,BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW:5,BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW:6,BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW:7,BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW:8}),V(window,{BMAP_CONTEXT_MENU_ICON_ZOOMIN:Qc,BMAP_CONTEXT_MENU_ICON_ZOOMOUT:Rc}),V(window,{BMAP_SYS_DRAWER:Na,BMAP_SVG_DRAWER:1,BMAP_VML_DRAWER:2,BMAP_CANVAS_DRAWER:3,BMAP_SVG_DRAWER_FIRST:4}),D.OU(),D.V0()}function ba(t){throw t}function u(){return function(){}}function ca(e){return function(t){this[e]=t}}function x(t){return function(){return this[t]}}function ea(t){return function(){return t}}function ha(t){return function(){return ga[t].apply(this,arguments)}}function ia(t,e){return ga[t]=e}function ma(t,e){if(t.domEvent=e=window.event||e,t.clientX=e.clientX||e.pageX,t.clientY=e.clientY||e.pageY,t.offsetX=e.offsetX||e.layerX,t.offsetY=e.offsetY||e.layerY,t.screenX=e.screenX,t.screenY=e.screenY,t.ctrlKey=e.ctrlKey||e.metaKey,t.shiftKey=e.shiftKey,t.altKey=e.altKey,e.touches){t.touches=[];for(var n=0;n=t.Qz?(bb(t.m.Ba)&&t.m.Ba(t.m.dc(1)),bb(t.m.finish)&&t.m.finish(),0>4,n=(15&n)<<4|(i=Nb.indexOf(t.charAt(s++)))>>2,o=(3&i)<<6|(a=Nb.indexOf(t.charAt(s++))),r+=String.fromCharCode(e),64!=i&&(r+=String.fromCharCode(n)),64!=a&&(r+=String.fromCharCode(o)),s';var n=e.firstChild;return n.style?(n.style.behavior="url(#default#VML)",n=n?"object"==typeof n.adj:p,e.parentNode.removeChild(e),n):t}function Rb(){return!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape","1.1")}function Sb(){return!!H("canvas").getContext}function U(t){return t*Math.PI/180}function Tb(e,r,n){r.EE||(r.EE=[],r.handle={}),r.EE.push({filter:n,Rs:e}),r.addEventListener||(r.addEventListener=function(t,e){r.attachEvent("on"+t,e)}),r.handle.click||(r.addEventListener("click",function(n){for(var i=n.target||n.srcElement;i!=r;)Ub(r.EE,function(t,e){RegExp(e.filter).test(i.getAttribute("filter"))&&e.Rs.call(i,n,i.getAttribute("filter"))}),i=i.parentNode},t),r.handle.click=p)}function Ub(t,e){for(var n=0,i=t.length;n=n[o]&&e.lng<=n[o+1]&&e.lat>=i[o]&&e.lat<=i[o+1])return p;return t}function tc(t){var e=t.lng,n=t.lat;t=Math.sqrt(e*e+n*n)+Math.sin(n*gc*jc)*hc,e=Math.atan2(n,e)+Math.cos(e*gc*jc)*ic;return{lng:t*Math.cos(e)+kc,lat:t*Math.sin(e)+lc}}function uc(t){var e=vc,n={},i=t.lng,r=t.lat,o=1,a=t.lng,s=t.lat,u=i-o,h=0,c=r+o,p=0,f=i-o,d=0,y=r-o,m=0,g=i+o,v=0,x=r-o,_=0,w=i+o,b=0,P=r+o,S=0;c=u=0;if(xc(u=(c=wc(e,i,r)).lng,c=c.lat,a,s)<=1e-6)return n.lng=i,n.lat=r,n;for(;;){if(f=u=i-o,x=y=r-o,w=g=i+o,P=c=r+o,h=(i=wc(e,u,c)).lng,p=i.lat,d=(i=wc(e,f,y)).lng,m=i.lat,v=(i=wc(e,g,x)).lng,_=i.lat,b=(i=wc(e,w,P)).lng,S=i.lat,i=xc(h,p,a,s),h=xc(d,m,a,s),d=xc(v,_,a,s),b=xc(b,S,a,s),i<1e-6)return n.lng=u,n.lat=c,n;if(h<1e-6)return n.lng=f,n.lat=y,n;if(d<1e-6)return n.lng=g,n.lat=x,n;if(b<1e-6)return n.lng=w,n.lat=P,n;if(xc(u=(c=wc(e,i=(u*(v=1/i)+f*(h=1/h)+g*(d=1/d)+w*(b=1/b))/(v+h+d+b),r=(c*v+y*h+x*d+P*b)/(v+h+d+b))).lng,c=c.lat,a,s)<=1e-6)return n.lng=i,n.lat=r,n;if((o*=.6)<1e-6){t:{for(n=(t.lng+.03-(t.lng-.03))/1e-4+.5,o=(t.lat+.03-(t.lat-.03))/1e-4+.5,a=t.lng*rc,s=t.lat*rc,u=a-(y=1e-4*rc),c=a+y,f=s-y,g=s+y,v=h=d=b=l,w=h=y=x=d=b=0,e(t),v=l,P=0;P<=n;P++){for(i=0;i<=o;i++)if(v=e(l),b=l.lng*rc,d=l.lat*rc,h=v.lng*rc,v=v.lat*rc,!(hWb[2]+.4||t.lat>Wb[3]+.4)return e.lng=t.lng,e.lat=t.lat,e;if(sc(t,ec,fc))return tc(t);e=0;var n=mc,i=0,r=new yc,o=0;for(i=0;it.lat&&0pc||Math.abs(c-0)>pc?(s=u*l-s*h,{lng:(c*(l=c*t.lng-a*t.lat)-a*s)/(u=a*a-c*c),lat:-(a*l+c*s)/u}):i.mu,l=-(c=180),u=-(s=90),u=i.mu,h=i.ex,c=u.lng=c&&a.lng<=u&&a.lat>=s?(i=t.lat*jc,c=t.lng*jc,s=a.lat*jc,a=a.lng*jc,(i=(l=Math.cos(i)*Math.cos(s))*Math.cos(c)*Math.cos(a)+l*Math.sin(c)*Math.sin(a)+Math.sin(i)*Math.sin(s))<-1?i=-1:1Xb[2]+.4||t.lat>Xb[3]+.4)return e.lng=t.lng,e.lat=t.lat,e;if(sc(t,Zb,$b)){e=t.lng-kc;var n=t.lat-lc;t=Math.sqrt(e*e+n*n)-Math.sin(n*gc*jc)*hc,e=Math.atan2(n,e)-Math.cos(e*gc*jc)*ic;return{lng:t*Math.cos(e),lat:t*Math.sin(e)}}return n=vc(t),t.lng===n.lng&&t.lat===n.lng?(e.lng=t.lng,e.lat=t.lat,e):uc(t)}function $a(t,e){if(3===e&&t instanceof Q){var n=vc(t);return new L(n.lng,n.lat)}return t}function eb(t,e){if(3===e&&t instanceof L){var n=Cc(t);return new Q(n.lng,n.lat)}return 5===e&&t instanceof L?new Q(t.lng,t.lat):t}function qa(e,n){if(n){var i=(1e5*Math.random()).toFixed(0);D._rd["_cbk"+i]=function(t){n&&n(t),delete D._rd["_cbk"+i]},e+="&callback=BMap._rd._cbk"+i}e=e+"&v=3.0&seckey="+pa;var r=H("script",{type:"text/javascript"});r.charset="utf-8",r.src=e,r.addEventListener?r.addEventListener("load",function(t){(t=t.target).parentNode.removeChild(t)},t):r.attachEvent&&r.attachEvent("onreadystatechange",function(){var t=window.event.srcElement;!t||"loaded"!=t.readyState&&"complete"!=t.readyState||t.parentNode.removeChild(t)}),setTimeout(function(){document.getElementsByTagName("head")[0].appendChild(r),r=q},1)}function Qgq(t){return Tgq&&!!Sgq[Rgq+t+"_"+Dc[t]]}function Wa(){}function R(t,e){this.x=t||0,this.y=e||0,this.x=this.x,this.y=this.y}function N(t,e){this.width=t||0,this.height=e||0}function nb(t,e,n){var i=new XMLHttpRequest;i.open("POST",t,p),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.timeout=1e4,i.ontimeout=u(),i.onreadystatechange=function(){4===this.readyState&&200===this.status&&n&&n(i.responseText)},i.send(e)}function mb(t,e){t&&(this.Mb=t,this.da="spot"+mb.da++,e=e||{},this.ih=e.text||"",this.Iv=e.offsets?e.offsets.slice(0):[5,5,5,5],this.IB=e.userData||q,this.Qh=e.minZoom||q,this.Nf=e.maxZoom||q)}function Ec(){this.P=q,this.Nb="control",this.Wa=this.$J=p}function ob(e){Ec.call(this),e=e||{},this.m={Mg:t,yF:e.showZoomInfo||p,anchor:e.anchor,Ga:e.offset,type:e.type,HW:e.enableGeolocation||t},this.defaultAnchor=J()?3:Fc,this.defaultOffset=new N(10,10),this.wc(e.anchor),this.kn(e.type),this.Ef()}function Ic(e){Ec.call(this),e=e||{},this.m={anchor:e.anchor||Hc,Ga:e.offset||new N(10,30),R_:e.showAddressBar!==t,f3:e.enableAutoLocation||t,JM:e.locationIcon||q};var n=this;this.Uu=1200,n.O0=[],this.ue=[],Wa.load("geoctrl",function(){!function t(){if(0!==n.ue.length){var e=n.ue.shift();n[e.method].apply(n,e.arguments),t()}}(),n.XP()}),Ta(Ma)}function Jc(e){Ec.call(this),e=e||{},this.m={Mg:t,anchor:e.anchor,Ga:e.offset},this.gc=[],this.defaultAnchor=Hc,this.defaultOffset=new N(5,2),this.wc(e.anchor),this.$J=t,this.Ef()}function qb(e){Ec.call(this),e=e||{},this.m={Mg:t,size:e.size||new N(150,150),padding:5,eb:e.isOpen===p?p:t,g1:4,Ga:e.offset,anchor:e.anchor},this.defaultAnchor=3,this.defaultOffset=new N(0,0),this.Hq=this.Iq=13,this.wc(e.anchor),this.He(this.m.size),this.Ef()}function Kc(e){Ec.call(this),e=e||{},this.defaultAnchor=Fc,this.pV=e.canCheckSize===t?t:p,this.lj="",this.defaultOffset=new N(10,10),this.onChangeBefore=[],this.onChangeAfter=[],this.onChangeSuccess=[],this.m={Mg:t,Ga:e.offset||this.defaultOffset,anchor:e.anchor||this.defaultAnchor,expand:!!e.expand},e.onChangeBefore&&bb(e.onChangeBefore)&&this.onChangeBefore.push(e.onChangeBefore),e.onChangeAfter&&bb(e.onChangeAfter)&&this.onChangeAfter.push(e.onChangeAfter),e.onChangeSuccess&&bb(e.onChangeSuccess)&&this.onChangeSuccess.push(e.onChangeSuccess),this.wc(e.anchor),this.Ef()}function pb(e){Ec.call(this),e=e||{},this.m={Mg:t,color:"black",hd:"metric",Ga:e.offset},this.defaultAnchor=Hc,this.defaultOffset=new N(81,18),this.wc(e.anchor),this.Zh={metric:{name:"metric",pK:1,dM:1e3,IO:"米",JO:"公里"},us:{name:"us",pK:3.2808,dM:5280,IO:"英尺",JO:"英里"}},this.Zh[this.m.hd]||(this.m.hd="metric"),this.TI=q,this.oI={},this.Ef()}function rb(e){Ec.call(this),e=e||{},this.defaultAnchor=Gc,this.defaultOffset=new N(10,10),this.m={Mg:t,vh:[Pa,cb,Ua,Sa],$V:["B_DIMENSIONAL_MAP","B_SATELLITE_MAP","B_NORMAL_MAP"],type:e.type||Lc,Ga:e.offset||this.defaultOffset,LW:p},this.wc(e.anchor),"[object Array]"==Object.prototype.toString.call(e.mapTypes)&&(this.m.vh=e.mapTypes.slice(0)),this.Ef()}function Mc(e){Ec.call(this),e=e||{},this.m={Mg:t,Ga:e.offset,anchor:e.anchor},this.Wi=t,this.gw=q,this.yI=new Nc({Ye:"api"}),this.zI=new Oc(q,{Ye:"api"}),this.defaultAnchor=Gc,this.defaultOffset=new N(10,10),this.wc(e.anchor),this.Ef(),Ta(ya)}function Pc(e){A.lang.Ja.call(this),this.m={cb:q,cursor:"default"},this.m=A.extend(this.m,e),this.Nb="contextmenu",this.P=q,this.Da=[],this.Pf=[],this.Ke=[],this.Vw=this.ss=q,this.Ph=t;var n=this;Wa.load("menu",function(){n.ob()})}function Sc(t,e,n){if(t&&bb(e)){A.lang.Ja.call(this),this.m={width:100,id:"",Km:""},n=n||{},this.m.width=1*n.width?n.width:100,this.m.id=n.id?n.id:"",this.m.Km=n.iconUrl?n.iconUrl:"",this.ih=t+"",this.vz=e,this.P=q,this.Nb="menuitem",this.Vr=this.yv=this.R=this.Kh=q,this.Nh=p;var i=this;Wa.load("menu",function(){i.ob()})}}function jb(t,e){t&&!e&&(e=t),this.Ne=this.be=this.Te=this.ee=this.Xl=this.Hl=q,t&&(this.Xl=new Q(t.lng,t.lat),this.Hl=new Q(e.lng,e.lat),this.Te=t.lng,this.ee=t.lat,this.Ne=e.lng,this.be=e.lat)}function Q(t,e){isNaN(t)&&(t=Pb(t),t=isNaN(t)?0:t),db(t)&&(t=parseFloat(t)),isNaN(e)&&(e=Pb(e),e=isNaN(e)?0:e),db(e)&&(e=parseFloat(e)),this.lng=t,this.lat=e}function L(t,e){isNaN(t)&&(t=Pb(t),t=isNaN(t)?0:t),db(t)&&(t=parseFloat(t)),isNaN(e)&&(e=Pb(e),e=isNaN(e)?0:e),db(e)&&(e=parseFloat(e)),this.lng=t,this.lat=e,this.Ye="inner"}function Tc(){}function Uc(){}function Vc(){this.Qa=[];var t=this;Wa.load("convertor",function(){t.VP()})}function T(){}function lb(){this.lj="bj"}function Wc(){this.Nb="overlay"}function kb(){A.lang.Ja.call(this),Wc.call(this),this.map=q,this.Wa=p,this.Fb=q,this.kH=0}function Xc(){this.map=q,this.ta={},this.Je=[]}function Zc(e){kb.call(this),e=e||{},this.K={strokeColor:e.strokeColor||"#3a6bdb",tc:e.strokeWeight||5,zd:e.strokeOpacity||.65,strokeStyle:e.strokeStyle||"solid",qj:e.enableMassClear===t?t:p,Hk:q,Cm:q,pf:e.enableEditing===p?p:t,SM:5,M0:t,mf:e.enableClicking===t?t:p,oi:e.icons&&0 "+t)}if(e<5)return uf=t}i=document.createElement("canvas"),e=q;try{e=i.getContext("webgl")}catch(e){uf=t}return uf=e===q?t:p}function vf(){if("boolean"==typeof wf)return wf;if(wf=p,A.platform.mE)return p;var e=navigator.userAgent;return-1
',n&&(f.toolTip.content=f.toolTip.content.replace("
",""+n+"
")),f.toolTipWare.update(f.toolTip)},r.onerror=function(){console.error("error")}}else f.toolTip.content='
',f.toolTipWare.update(f.toolTip)})},f._waitTime),f.toolTipWare.update(f.toolTip)},p.prototype.mouseClick=function(t,e,n,i,r,o,a){p.prototype.uber.mouseClick.call(f,t,e,n,i,r,o,a);var s=f.toolTip.anchor;s=f._projectService.transform(s,4326);var l=h.ll2gcj02([s.x,s.y]),u=new qq.maps.LatLng(l[1],l[0]);f.pano_service.getPano(u,50,function(t){if(t&&t.svid){var e=t.svid;f._pano||(f._pano=new qq.maps.Panorama(document.getElementById(f.map.panoContainer.id)),f._pano.setPov({heading:f._heading,pitch:f._pitch}),f._pano.setOptions({disableCompass:!f._navigationControl,disableMove:!f._linksControl,photoTimeControl:!0})),f.map.getMapControl().getViewport().parentNode.style.display="none",f.map.panoContainer.style.display="block",f.map.panoContainer.appendChild(f._hidePanoDiv),f._pano.setPano(e),f._rightClick(),f._enterEvent.raiseEvent(s)}})},c.exports=p}.apply(e,i))||(t.exports=r)},function(module,exports){window.qq=window.qq||{},qq.maps=qq.maps||{},window.soso||(window.soso=qq),soso.maps||(soso.maps=qq.maps),function(){qq.maps.__load=function(t){delete qq.maps.__load,t([["2.4.128",window.TMAP_AUTHENTIC_KEY,0],["https://3gimg.qq.com/","lightmap/api_v2/2/4/128/mods/","https://3gimg.qq.com/lightmap/api_v2/2/4/128/theme/",!0],[1,18,34.519469,104.461761,4],[1583912978062,"https://pr.map.qq.com/pingd","https://pr.map.qq.com/pingd"],["https://apis.map.qq.com/jsapi","https://apikey.map.qq.com/mkey/index.php/mkey/check","https://sv.map.qq.com/xf","https://sv.map.qq.com/boundinfo","https://sv.map.qq.com/rarp","https://apis.map.qq.com/api/proxy/search","https://apis.map.qq.com/api/proxy/routes/","https://confinfo.map.qq.com/confinfo","https://overseactrl.map.qq.com"],[[null,["https://rt0.map.gtimg.com/tile","https://rt1.map.gtimg.com/tile","https://rt2.map.gtimg.com/tile","https://rt3.map.gtimg.com/tile"],"png",[256,256],3,19,"114",!0,!1],[null,["https://m0.map.gtimg.com/hwap","https://m1.map.gtimg.com/hwap","https://m2.map.gtimg.com/hwap","https://m3.map.gtimg.com/hwap"],"png",[128,128],3,18,"110",!1,!1],[null,["https://p0.map.gtimg.com/sateTiles","https://p1.map.gtimg.com/sateTiles","https://p2.map.gtimg.com/sateTiles","https://p3.map.gtimg.com/sateTiles"],"jpg",[256,256],1,19,"101",!1,!1],[null,["https://rt0.map.gtimg.com/tile","https://rt1.map.gtimg.com/tile","https://rt2.map.gtimg.com/tile","https://rt3.map.gtimg.com/tile"],"png",[256,256],1,19,"",!1,!1],[null,["https://sv0.map.qq.com/hlrender/","https://sv1.map.qq.com/hlrender/","https://sv2.map.qq.com/hlrender/","https://sv3.map.qq.com/hlrender/"],"png",[256,256],1,19,"",!1,!1],[null,["https://rtt2.map.qq.com/rtt/","https://rtt2a.map.qq.com/rtt/","https://rtt2b.map.qq.com/rtt/","https://rtt2c.map.qq.com/rtt/"],"png",[256,256],1,19,"",!1,!1],null,[["https://rt0.map.gtimg.com/vector/","https://rt1.map.gtimg.com/vector/","https://rt2.map.gtimg.com/vector/","https://rt3.map.gtimg.com/vector/"],[256,256],3,18,"114",["https://rt0.map.gtimg.com/icons/","https://rt1.map.gtimg.com/icons/","https://rt2.map.gtimg.com/icons/","https://rt3.map.gtimg.com/icons/"],[]],null],["https://s.map.qq.com/TPano/v1.1.2/TPano.js","map.qq.com/",""]],e)};var e=(new Date).getTime()}(),function(){"use strict";if(window.TMAP_AUTHENTIC_KEY){var Vl=function(t){(t=t||window.event).cancelBubble=!0,t.stopPropagation&&t.stopPropagation()},wd=function(t){(t=t||window.event).returnValue=!1,t.preventDefault&&t.preventDefault()},Ef=function(t){return wd(t),Vl(t),!1},Wl=Object.prototype.hasOwnProperty,Fg=function(t,e){return Wl.call(t,e)},Gg=function(t){for(var e in t)if(Fg(t,e))return!1;return!0},xi=function(t,e,n){var i=[],r=t.length;for(n=n||r,e=e||0;et.maxX||t.minX<=n||t.maxX>=e:t.minX>t.maxX?t.minX<=n||t.maxX>=e:t.minX<=n&&t.maxX>=e)},jb.contains=function(t){-180==t&&(t=180);var e=this.minX,n=this.maxX;return this.minX>this.maxX?(e<=t||t<=n)&&!this.isEmpty():e<=t&&t<=n},jb.extend=function(t){this.contains(t)||(this.isEmpty()?this.minX=this.maxX=t:this.distance(t,this.minX)this.maxX&&(t=Hf(t,-180,180)),t},jb.distance=function(t,e){var n=e-t;return 0<=n?n:e+180-(t-180)};var Vb=ai.prototype;Vb.isEmpty=function(){return this.minY>this.maxY},Vb.intersects=function(t){var e=this.minY,n=this.maxY;return e<=t.minY?t.minY<=n&&t.minY<=t.maxY:e<=t.maxY&&e<=n},Vb.contains=function(t){return t>=this.minY&&t<=this.maxY},Vb.extend=function(t){this.isEmpty()?this.maxY=this.minY=t:tthis.maxY&&(this.maxY=t)},Vb.equals=function(t){return this.isEmpty()?t.isEmpty():Math.abs(t.minY-this.minY)+Math.abs(this.maxY-t.maxY)<=1e-9},Vb.center=function(){return(this.maxY+this.minY)/2};var Jn=6===Na||7===Na||8===Na,y=$a[5],cm=$a[4][7],Yd=function(t){return t/(Math.PI/180)},ga=F.prototype;ga.getX=function(){return this.x},ga.getY=function(){return this.y},ga.toString=function(){return this.x+", "+this.y},ga.equals=function(t){return!!t&&(t.x==this.x&&t.y==this.y)},ga.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},ga.minus=function(t){return new F(this.x-t.x,this.y-t.y)},ga.plus=function(t){return new F(this.x+t.x,this.y+t.y)},ga.divide=function(t){return new F(this.x/t,this.y/t)},ga.multiply=function(t){return new F(this.x*t,this.y*t)},ga.dotProduct=function(t){return this.x*t.x+this.y*t.y},ga.crossProduct=function(t){return this.x*t.y-this.y*t.x},ga.clone=function(){return new F(this.x,this.y)},ga.getVectorLength=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};var $c=null,If=function(t,e,n,i){return n=Math.pow(2,n),($c=$c||new F(0,0)).x=e.x/n,$c.y=e.y/n,t.fromPointToLatLng($c,i)},zd=function(t,e,n){return(t=t.fromLatLngToPoint(e))&&(n=Math.pow(2,n),t.x*=n,t.y*=n),t};lc.prototype.stop=function(){this.__event__&&Ef(this.__event__)};var ya=function(t){return"[object Array]"==Object.prototype.toString.call(t)},f=function(t,e){function n(){}n.prototype=e.prototype,t.prototype=new n},dc=d,ak=lc,dm=function(t){if(Object.keys)return Object.keys(t);var n=[];return W(t,function(t,e){n.push(e)}),n},Lg={},Xe={},bi={},ob=h.prototype;ob.get=function(t){if(e=Sb(this)[t]){t=e.targetKey;var e=e.target,n=Lg[t]||(Lg[t]="get"+Ff(t));return e[n]?e[n]():e.get(t)}return this[t]},ob.set=function(t,e){if((n=Sb(this)).hasOwnProperty(t)){var n=(i=n[t]).targetKey,i=i.target,r=Xe[n]||(Xe[n]="set"+Ff(n));i[r]?i[r](e):i.set(n,e)}else this[t]=e,nd(this,t)},ob.notify=function(t){var e=Sb(this);e.hasOwnProperty(t)?(t=e[t]).target.notify(t.targetKey):nd(this,t)},ob.setValues=function(t){for(var e in t){var n=t[e],i=Xe[e]||(Xe[e]="set"+Ff(e));this[i]?this[i](n):this.set(e,n)}},ob.setOptions=ob.setValues,ob.changed=function(t){return function(){}},ob.bindTo=function(t,e,n,i){n=n||t;var r=this;r.unbind(t,!0),od(r)[t]=dc.addListener(e,Ke(n.toLowerCase()),function(){nd(r,t)}),bk(r,t,e,n,i)},ob.bindsTo=function(t,e,n,i){n=n||[];for(var r=0,o=(t=ya(t)?t:dm(t)).length;r :"+e)},Sg=function(t,e){am.set(t,e)},Tg=function(t,e,n){var i={};n&&W(n,function(t,e){i[e]=t}),e&&W(e,function(t,e){i[e]=t}),t.setValues(i)},mk=0,$e=Rd.prototype;$e.insert=function(t){var e=this.items,n=this.hash(t);e[n]||(++this.length,e[n]=t,d.trigger(this,"insert",t))},$e.remove=function(t){var e=this.items,n=this.hash(t);e[n]&&(--this.length,delete e[n],d.trigger(this,"remove",t))},$e.contains=function(t){return!!this.items[this.hash(t)]},$e.forEach=function(t){var e,n=this.items;for(e in n)n.hasOwnProperty(e)&&t.call(this,n[e])};var u=function(){var e=arguments,n=e.length;return function(){for(var t=0;t=n.lat&&t.lat<=i.lat&&e.lng>=n.lng&&t.lng<=i.lng):this.lat.contains(t.getLat())&&this.lng.contains(t.getLng())},Fb.extend=function(t){if(this.isEmpty()){var e=t.getLat();t=t.getLng(),this.lat=new Pe(e,e),this.lng=new Nc(t,t)}else this.lat.extend(t.getLat()),this.lng.extend(t.getLng());return this},Fb.union=function(t){if(!t.isEmpty())return this.extend(t.getNorthEast()),this.extend(t.getSouthWest()),this},Fb.equals=function(t){return!!t&&(this.lat.equals(t.lat)&&this.lng.equals(t.lng))},Fb.clone=function(){return new Ab(this.getSouthWest(),this.getNorthEast())},Fb.toString=function(){return this.getSouthWest()+", "+this.getNorthEast()},Fb.toUrlValue=function(){return this.getSouthWest().toUrlValue()+","+this.getNorthEast().toUrlValue()};var gi=Tb,Mf=p,kg=Ja,vk=Rd,Dk=function(e){var n=window.setTimeout(e,1e3);im.send(null,cm,function(t){t&&t.info&&0===t.error&&(t=t.info,y[0]&&t["1d"]&&(y[0][6]=t["1d"],y[3][6]=t["1d"]),y[1]&&t["2d"]&&(y[1][6]=t["2d"]),y[7]&&t.vt&&(y[7][4]=t.vt),y[2]&&t.sat&&(y[2][6]=t.sat)),e(),clearTimeout(n)},e)},yk=bd,tk=Mc,uk=qd,xk=W,rk=$d,qk=oc,sf=U,Mf=p,lg=d,sk=Tg,Ck=Kn,Ak=Sg,Ek=function(t){t.setOffsetCenter=function(t){var e=this.getMapCenterOffset()||new ca(0,0),n=this.getZoom(),i=t;(Number(e.width)||Number(e.height))&&(e=new F((t=zd(ue,t,n)).x-e.width,t.y-e.height),i=If(ue,e,n)),this.setCenter(i)},t.getOffsetCenter=function(){var t=this.getMapCenterOffset()||new ca(0,0),e=this.getCenter(),n=this.getZoom();return 0==t.width&&0==t.height?e:(t=new F((e=zd(ue,e,n)).x+t.width,e.y+t.height),If(ue,t,n))}},Bk=Qd,tf={mapTypeId:tb.ROADMAP,mapStyleId:kg.DEFAULT,maxZoom:lm,minZoom:km,disableDefaultUI:!1,boundary:null,autoResize:!0,resizeKeepCenter:!0,mapZoomType:af.DEFAULT,mapZoomOffset:new F(0,0),projectionMode:"mercator",scale:1};ve[0]&&ve[1]&&(tf.center=new Mf(ve[0],ve[1]),tf.zoom=jm),f(sb,h);var Gb=sb.prototype;da(sb.prototype,["projection",null,"bounds",null,"boundary",u(V(Ab),D),"center",V(Mf),"zoom",G,"mapTypeId",sf,"mapStyleId",sf,"mapCenterOffset",V(ca)]),Gb._=function(){return this.V},Gb.getContainer=function(){return this.container},Gb.panBy=Rc("panby"),Gb.panTo=Rc("panto"),Gb.flyTo=Rc("fly_to"),Gb.zoomBy=function(t){var e=this.getZoom();G(e)&&this.setZoom(e+t)},Gb.zoomTo=function(t){this.setZoom(t)},Gb.fitBounds=Rc("fitbounds"),Gb.panToBounds=Rc("pantolatlngbounds"),f(Sc,h),Sc.prototype.map_changed=function(){var e=this;T.$require("oy",function(t){t(e)})},da(Sc.prototype,["map",u(V(sb),D),"panes",null,"projection",null]),Nb.fromHex=function(t,e){"#"===t.substring(0,1)&&(t=t.substr(1));var n=3===t.length?1:2,i=t.substr(0,n),r=t.substr(n,n),o=t.substr(2*n,n);return 1==n&&(i+=i,r+=r,o+=o),new Nb(i=parseInt(i,16),r=parseInt(r,16),o=parseInt(o,16),e||1)};var yc=Nb.prototype;yc.toRGB=function(){return"rgb("+[this.red,this.green,this.blue].join()+")"},yc.toRGBA=function(){return"rgba("+[this.red,this.green,this.blue,this.alpha].join()+")"},yc.toHex=function(){return"#"+(16777216+(this.red<<16)+(this.green<<8)+this.blue).toString(16).slice(1).toUpperCase()},yc.toInt=function(){return this.red<<16|this.green<<8|this.blue},yc.toString=function(){return this.toRGBA()},yc.clone=function(){return new Nb(this.red,this.green,this.blue,this.alpha)};var Hk=Eb,ec=Tb,Gk=ad,Fk=g,ng=ya,mg=V(ec),Va=Nb;f(Tc,Sc),Tc.prototype.getPath=function(){return this.get("path")},Tc.prototype.setPath=function(t){t=uf(t)||new ec,this.is2Dim=mg(t.getAt(0)),this.set("path",t)},Tc.prototype.getBounds=function(){var t=this.getPath(),e=this.is2Dim,n=null;if(t&&t.getLength()){var i=[],r=[];t.forEach(function(t){e?t.forEach(function(t){i.push(t.getLng()),r.push(t.getLat())}):(i.push(t.getLng()),r.push(t.getLat()))});var o=Math.min.apply(Math,i),a=Math.min.apply(Math,r);t=Math.max.apply(Math,i),n=Math.max.apply(Math,r),n=new Ab(o=new p(a,o),t=new p(n,t))}return n},da(Tc.prototype,["map",u(V(sb),D),"visible",ja,"simplify",ja,"clickable",ja,"editable",ja,"cursor",U,"zIndex",G,"geodesic",ja,"strokeDashStyle",u(U,D),"strokeColor",u(V(Va),U,D),"strokeWeight",u(G),"fillColor",u(V(Va),U,D),"strokeLinecap",U]);var hi=Tc;f(og,hi);var ii=Tc;f(pg,ii);var Ik=ad,vc=Nb,Jk=Eb;f(Qe,Sc),da(Qe.prototype,["map",u(V(sb),D),"visible",ja,"editable",ja,"center",u(V(p),D),"radius",u(G,D),"cursor",u(U,D),"zIndex",u(G,D),"fillColor",u(V(vc),U,D),"strokeColor",u(V(vc),U,D),"strokeWeight",G,"strokeDashStyle",u(U,D)]);var mm=/-./g,nm=function(t){return t.charAt(1).toUpperCase()},Ki={};Ki.float=Na?"styleFloat":"cssFloat";var om=(nYq=Ki,nYq=nYq||{},function(t){return Fg(nYq,t)?nYq[t]:nYq[t]=function(t){return t.replace(mm,nm)}(t)}),P=function(t,e,n){t.style[om(e)]=n},bf=5==aa||6==aa,Ad=Ye[1],ta=Ye[0],Hb=function(){var t=Wd,e=Ad,n=bf,i=(n=4==(o=ta)&&n,e=4==o&&4==aa&&534<=e,3==o&&4==aa),r=2==o&&0=t.duration&&(e=t.duration,n=!0),t.set("current",e),t.onEnterFrame(e),n?t.stop():t.status||(t.status=1),t._frameDuration=+Qa()-o}});var e=+Qa()-i;g(r,function(t){t._startTime&&(t.onExitFrame(t._frameDuration,e),delete t._frameDuration)})}},nYq;f(qg,h);var Bd=qg.prototype;Bd.start=function(){function t(){e.onStart(),e.status=0,Vg.add(e),delete e._delayTimer}this.stop(!0);var e=this;this.delay?e._delayTimer=window.setTimeout(t,e.delay):t()},Bd.stop=function(t){this._delayTimer&&(window.clearTimeout(this._delayTimer),delete this._delayTimer),Vg.remove(this),this.status=-1,t||this.onEnd()},Bd.getStatus=function(){return this.status},Bd.onStart=function(){},Bd.onEnterFrame=function(){},Bd.onExitFrame=function(){},Bd.onEnd=function(){};var Wg=function(t){if(t=t||window.event,Na)t=[t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft),t.clientY+(document.documentElement.scrollTop||document.body.scrollTop)];else if(t.touches){var e=null;0=t;g(n,function(t){t.isClustered=i,e.markerCluster.setMarkerDisplay(t,!i)}),this.isCluster=i,this.updateIcon()},Ib.updateCenter=function(t){var e=this.get("center");if(e){if(this.markerCluster.get("averageCenter")){var n=this.markers.length;this.set("center",new p((e.lat*(n-1)+t.lat)/n,(e.lng*(n-1)+t.lng)/n))}}else this.set("center",t)},Ib.updateIcon=function(){var t=(i=this.markerCluster.getStyles()).length,e=this.markerCluster.getCalculator(this.markers,t),n=Math.max(0,e.index-1),i=(t=i[n=Math.min(t-1,n)]).icon;e=(t=t.text).content.replace(/\{(\w+)\}/g,e.text),e=new df(e,t.offset);this.icon.set("decoration",e),this.icon.set("icon",i),this.icon.set("map",this.isCluster?this.map:null),this.icon.set("position",this.isCluster?this.center:null)},Ib.isMarkerAlreadyAdded=function(t){return-1!==cf(this.markers,t)},Ib.getMarkers=function(){return this.markers},Ib.getBounds=function(){var t=this.get("center");if(!t)return null;var e={},n=new Ab(t,t);return g(this.markers,function(t){n.extend(t.get("position"))}),e.info=n.lat.maxY==n.lat.minY&&n.lng.maxX==n.lng.minX?-1:0,e.bounds=n,e};var I={};I.event=d,I.MVCObject=h,I.MVCArray=Tb,I.LatLng=p,I.LatLngBounds=Ab,I.Size=ca,I.Point=F,I.Color=Nb,I.Map=sb,I.MapTypeId=tb,I.MapZoomType=af,I.MapTypeRegistry=Mc,I.MapStyleId=Ja,I.MapStyleRegistry=qd,I.ImageMapType=se,I.Overlay=Sc,I.Marker=Ud,I.MarkerImage=xe,I.MarkerShape=um,I.MarkerAnimation=zm,I.MarkerDecoration=df,I.Cluster=Vd,I.MarkerCluster=Af,I.Polyline=Xc,I.Polygon=zf,I.Circle=qi,I.InfoWindow=Ve,I.Label=yf,I.GroundOverlay=xf,I.ControlPosition=bd,I.Control=re,I.ALIGN={TOP_LEFT:5,TOP:2,TOP_RIGHT:3,LEFT:4,CENTER:13,RIGHT:8,BOTTOM_LEFT:10,BOTTOM:11,BOTTOM_RIGHT:12,isTop:function(t){return t<3},isMiddle:function(t){return 2=e&&n++}),n},ha.draw=function(){if(this.ready){var e=this,t=e.get("map"),n=t.get("zoom"),i=e.get("maxZoom");if(i&&i<\/script>',r=Ne.createElement("iframe");r.style.display="none",n.appendChild(r);var o=r.contentDocument;r.onload=function(){1!=o.z&&e&&e(),r.onload=null,n.removeChild(this)};try{o.write(i),o.close()}catch(t){}n=null}function hk(t,e,n,i,r,o){var a=Ne.createElement("script");Oe.push({name:t,sender:a}),a.setAttribute("type","text/javascript"),a.setAttribute("charset",r||"GBK"),a.async=!0;var s=null,l=!1;a[Me]=function(){ik.test(this.readyState)&&(Pd(t),s?n&&n(s):l||i&&i())},qe[t]=function(t){s=t},a.onerror=function(){l=!0,i&&i(),Pd(t)},r=o||["output=jsonp","pf=jsapi","ref=jsapi"],o?(o=r.pop(),r.push(o+hg+"."+t)):(r.push("cb="+hg+"."+t),ei&&r.unshift("key="+ei)),o=e+(-1===e.indexOf("?")?"?":"&")+r.join("&"),a.src=o,jk&&gk(e,function(){a.onerror()}),(e=document.getElementsByTagName("head")[0]).insertBefore(a,e.firstChild),e=null}function Pd(t){if(t){for(var e=0,n=Oe.length,i=null;em[1].y?f<0?G.calculatePoints(f,m[2],d/3,a,o):G.calculatePoints(f,m[2],d/3,o,a):f<0?G.calculatePoints(f,m[2],d/3,o,a):G.calculatePoints(f,m[2],d/3,a,o),f=(m[1].y-m[2].y)/(m[1].x-m[2].x+1),d=V(m[2],m[1])+1,m[1].y>m[2].y?f<0?G.calculatePoints(f,m[0],d/3,l,s):G.calculatePoints(f,m[0],d/3,s,l):f<0?G.calculatePoints(f,m[0],d/3,s,l):G.calculatePoints(f,m[0],d/3,l,s),f=(m[2].y-m[0].y)/(m[2].x-m[0].x+1),d=V(m[2],m[0])+1,m[2].y>m[0].y?f<0?G.calculatePoints(f,m[1],d/3,r,p):G.calculatePoints(f,m[1],d/3,p,r):f<0?G.calculatePoints(f,m[1],d/3,p,r):G.calculatePoints(f,m[1],d/3,r,p),h.x=(m[0].x+m[1].x)/2,h.y=(m[0].y+m[1].y)/2,f=(m[0].y-m[1].y)/(m[0].x-m[1].x+1),d=V(m[1],m[0])+1,m[0].y>m[1].y?f<0?G.calculatePoints(f,h,d/6,u,c):G.calculatePoints(f,h,d/6,c,u):f<0?G.calculatePoints(f,h,d/6,c,u):G.calculatePoints(f,h,d/6,u,c);var S=new Array;S[0]=m[0],S[1]=l,S[2]=u,S[3]=h;var C=new Array;C[0]=h,C[1]=c,C[2]=p,C[3]=m[1];var M=new Array;M[0]=m[1],M[1]=r,M[2]=o,M[3]=m[2];var T=new Array;T[0]=m[2],T[1]=a,T[2]=s,T[3]=m[0];var A=new N,E=new F,I=new z,L=new D,R=j(S),O=R.length;for(_=0;_m[1].y?f<0?k.calculatePoints(f,m[2],d/3,a,o):k.calculatePoints(f,m[2],d/3,o,a):f<0?k.calculatePoints(f,m[2],d/3,o,a):k.calculatePoints(f,m[2],d/3,a,o),f=(m[1].y-m[2].y)/(m[1].x-m[2].x+1),d=D(m[2],m[1])+1,m[1].y>m[2].y?f<0?k.calculatePoints(f,m[0],d/3,l,s):k.calculatePoints(f,m[0],d/3,s,l):f<0?k.calculatePoints(f,m[0],d/3,s,l):k.calculatePoints(f,m[0],d/3,l,s),f=(m[2].y-m[0].y)/(m[2].x-m[0].x+1),d=D(m[2],m[0])+1,m[2].y>m[0].y?f<0?k.calculatePoints(f,m[1],d/3,r,p):k.calculatePoints(f,m[1],d/3,p,r):f<0?k.calculatePoints(f,m[1],d/3,p,r):k.calculatePoints(f,m[1],d/3,r,p),h.x=(m[0].x+m[1].x)/2,h.y=(m[0].y+m[1].y)/2,f=(m[0].y-m[1].y)/(m[0].x-m[1].x+1),d=D(m[1],m[0])+1,m[0].y>m[1].y?f<0?k.calculatePoints(f,h,d/6,u,c):k.calculatePoints(f,h,d/6,c,u):f<0?k.calculatePoints(f,h,d/6,c,u):k.calculatePoints(f,h,d/6,u,c);var S=new Array;S[0]=m[0],S[1]=l,S[2]=u,S[3]=h;var C=new Array;C[0]=h,C[1]=c,C[2]=p,C[3]=m[1];var M=new Array;M[0]=m[1],M[1]=r,M[2]=o,M[3]=m[2];var T=new Array;T[0]=m[2],T[1]=a,T[2]=s,T[3]=m[0];var A=new R,E=new N,I=z(S),L=I.length;for(_=0;_m[1].y?f<0?X.calculatePoints(f,m[2],d/3,a,o):X.calculatePoints(f,m[2],d/3,o,a):f<0?X.calculatePoints(f,m[2],d/3,o,a):X.calculatePoints(f,m[2],d/3,a,o),f=(m[1].y-m[2].y)/(m[1].x-m[2].x+1),d=Y(m[2],m[1])+1,m[1].y>m[2].y?f<0?X.calculatePoints(f,m[0],d/3,l,s):X.calculatePoints(f,m[0],d/3,s,l):f<0?X.calculatePoints(f,m[0],d/3,s,l):X.calculatePoints(f,m[0],d/3,l,s),f=(m[2].y-m[0].y)/(m[2].x-m[0].x+1),d=Y(m[2],m[0])+1,m[2].y>m[0].y?f<0?X.calculatePoints(f,m[1],d/3,r,p):X.calculatePoints(f,m[1],d/3,p,r):f<0?X.calculatePoints(f,m[1],d/3,p,r):X.calculatePoints(f,m[1],d/3,r,p),h.x=(m[0].x+m[1].x)/2,h.y=(m[0].y+m[1].y)/2,f=(m[0].y-m[1].y)/(m[0].x-m[1].x+1),d=Y(m[1],m[0])+1,m[0].y>m[1].y?f<0?X.calculatePoints(f,h,d/6,u,c):X.calculatePoints(f,h,d/6,c,u):f<0?X.calculatePoints(f,h,d/6,c,u):X.calculatePoints(f,h,d/6,u,c);var S=new Array;S[0]=m[0],S[1]=l,S[2]=u,S[3]=h;var C=new Array;C[0]=h,C[1]=c,C[2]=p,C[3]=m[1];var M=new Array;M[0]=m[1],M[1]=r,M[2]=o,M[3]=m[2];var T=new Array;T[0]=m[2],T[1]=a,T[2]=s,T[3]=m[0];var A=new q,E=new Z,I=new U,L=new W,R=H(S),O=R.length;for(_=0;_g[1].y?f<0?z.calculatePoints(f,g[2],d/3,a,o):z.calculatePoints(f,g[2],d/3,o,a):f<0?z.calculatePoints(f,g[2],d/3,o,a):z.calculatePoints(f,g[2],d/3,a,o),f=(g[1].y-g[2].y)/(g[1].x-g[2].x+y),d=F(g[2],g[1])+y,g[1].y>g[2].y?f<0?z.calculatePoints(f,g[0],d/3,l,s):z.calculatePoints(f,g[0],d/3,s,l):f<0?z.calculatePoints(f,g[0],d/3,s,l):z.calculatePoints(f,g[0],d/3,l,s),f=(g[2].y-g[0].y)/(g[2].x-g[0].x+y),d=F(g[2],g[0])+y,g[2].y>g[0].y?f<0?z.calculatePoints(f,g[1],d/3,r,p):z.calculatePoints(f,g[1],d/3,p,r):f<0?z.calculatePoints(f,g[1],d/3,p,r):z.calculatePoints(f,g[1],d/3,r,p),h.x=(g[0].x+g[1].x)/2,h.y=(g[0].y+g[1].y)/2,f=(g[0].y-g[1].y)/(g[0].x-g[1].x+y),d=F(g[1],g[0])+y,g[0].y>g[1].y?f<0?z.calculatePoints(f,h,d/6,u,c):z.calculatePoints(f,h,d/6,c,u):f<0?z.calculatePoints(f,h,d/6,c,u):z.calculatePoints(f,h,d/6,u,c);var C=new Array;C[0]=g[0],C[1]=l,C[2]=u,C[3]=h;var M=new Array;M[0]=h,M[1]=c,M[2]=p,M[3]=g[1];var T=new Array;T[0]=g[1],T[1]=r,T[2]=o,T[3]=g[2];var A=new Array;A[0]=g[2],A[1]=a,A[2]=s,A[3]=g[0];var E=new O,I=new k,L=D(C),R=L.length;for(w=0;wg[1].y?f<0?D.calculatePoints(f,g[2],d/3,a,o):D.calculatePoints(f,g[2],d/3,o,a):f<0?D.calculatePoints(f,g[2],d/3,o,a):D.calculatePoints(f,g[2],d/3,a,o),f=(g[1].y-g[2].y)/(g[1].x-g[2].x+m),d=G(g[2],g[1])+m,g[1].y>g[2].y?f<0?D.calculatePoints(f,g[0],d/3,l,s):D.calculatePoints(f,g[0],d/3,s,l):f<0?D.calculatePoints(f,g[0],d/3,s,l):D.calculatePoints(f,g[0],d/3,l,s),f=(g[2].y-g[0].y)/(g[2].x-g[0].x+m),d=G(g[2],g[0])+m,g[2].y>g[0].y?f<0?D.calculatePoints(f,g[1],d/3,r,p):D.calculatePoints(f,g[1],d/3,p,r):f<0?D.calculatePoints(f,g[1],d/3,p,r):D.calculatePoints(f,g[1],d/3,r,p),h.x=(g[0].x+g[1].x)/2,h.y=(g[0].y+g[1].y)/2,f=(g[0].y-g[1].y)/(g[0].x-g[1].x+m),d=G(g[1],g[0])+m,g[0].y>g[1].y?f<0?D.calculatePoints(f,h,d/6,u,c):D.calculatePoints(f,h,d/6,c,u):f<0?D.calculatePoints(f,h,d/6,c,u):D.calculatePoints(f,h,d/6,u,c);var C=new Array;C[0]=g[0],C[1]=l,C[2]=u,C[3]=h;var M=new Array;M[0]=h,M[1]=c,M[2]=p,M[3]=g[1];var T=new Array;T[0]=g[1],T[1]=r,T[2]=o,T[3]=g[2];var A=new Array;A[0]=g[2],A[1]=a,A[2]=s,A[3]=g[0];var E=new O,I=new z,L=F(C),R=L.length;this.bzPoints=[];for(w=0;wg[1].y?f<0?k.calculatePoints(f,g[2],d/3,a,o):k.calculatePoints(f,g[2],d/3,o,a):f<0?k.calculatePoints(f,g[2],d/3,o,a):k.calculatePoints(f,g[2],d/3,a,o),f=(g[1].y-g[2].y)/(g[1].x-g[2].x+m),d=D(g[2],g[1])+m,g[1].y>g[2].y?f<0?k.calculatePoints(f,g[0],d/3,l,s):k.calculatePoints(f,g[0],d/3,s,l):f<0?k.calculatePoints(f,g[0],d/3,s,l):k.calculatePoints(f,g[0],d/3,l,s),f=(g[2].y-g[0].y)/(g[2].x-g[0].x+m),d=D(g[2],g[0])+m,g[2].y>g[0].y?f<0?k.calculatePoints(f,g[1],d/3,r,p):k.calculatePoints(f,g[1],d/3,p,r):f<0?k.calculatePoints(f,g[1],d/3,p,r):k.calculatePoints(f,g[1],d/3,r,p),h.x=(g[0].x+g[1].x)/2,h.y=(g[0].y+g[1].y)/2,f=(g[0].y-g[1].y)/(g[0].x-g[1].x+m),d=D(g[1],g[0])+m,g[0].y>g[1].y?f<0?k.calculatePoints(f,h,d/6,u,c):k.calculatePoints(f,h,d/6,c,u):f<0?k.calculatePoints(f,h,d/6,c,u):k.calculatePoints(f,h,d/6,u,c);var C=new Array;C[0]=g[0],C[1]=l,C[2]=u,C[3]=h;var M=new Array;M[0]=h,M[1]=c,M[2]=p,M[3]=g[1];var T=new Array;T[0]=g[1],T[1]=r,T[2]=o,T[3]=g[2];var A=new Array;A[0]=g[2],A[1]=a,A[2]=s,A[3]=g[0];var E=new R;this.drawLine=new N;var I=z(C),L=I.length;this.bzPoints=[];for(w=0;wm[1].y?f<0?D.calculatePoints(f,m[2],d/3,a,o):D.calculatePoints(f,m[2],d/3,o,a):f<0?D.calculatePoints(f,m[2],d/3,o,a):D.calculatePoints(f,m[2],d/3,a,o),f=(m[1].y-m[2].y)/(m[1].x-m[2].x+v),d=G(m[2],m[1])+v,m[1].y>m[2].y?f<0?D.calculatePoints(f,m[0],d/3,l,s):D.calculatePoints(f,m[0],d/3,s,l):f<0?D.calculatePoints(f,m[0],d/3,s,l):D.calculatePoints(f,m[0],d/3,l,s),f=(m[2].y-m[0].y)/(m[2].x-m[0].x+v),d=G(m[2],m[0])+v,m[2].y>m[0].y?f<0?D.calculatePoints(f,m[1],d/3,r,p):D.calculatePoints(f,m[1],d/3,p,r):f<0?D.calculatePoints(f,m[1],d/3,p,r):D.calculatePoints(f,m[1],d/3,r,p),h.x=(m[0].x+m[1].x)/2,h.y=(m[0].y+m[1].y)/2,f=(m[0].y-m[1].y)/(m[0].x-m[1].x+v),d=G(m[1],m[0])+v,m[0].y>m[1].y?f<0?D.calculatePoints(f,h,d/6,u,c):D.calculatePoints(f,h,d/6,c,u):f<0?D.calculatePoints(f,h,d/6,c,u):D.calculatePoints(f,h,d/6,u,c);var C=new Array;C[0]=m[0],C[1]=l,C[2]=u,C[3]=h;var M=new Array;M[0]=h,M[1]=c,M[2]=p,M[3]=m[1];var T=new Array;T[0]=m[1],T[1]=r,T[2]=o,T[3]=m[2];var A=new Array;A[0]=m[2],A[1]=a,A[2]=s,A[3]=m[0];var E=new O,I=new z,L=F(C),R=L.length;this.bzPoints=[];for(w=0;w=_.dotValue){if(0==_.dotValue)return;var n=Math.floor(e/_.dotValue),i=t.getGeometry(),r=[],o=new m;if(o.add(new y({name:"shape",dataType:v.Point})),i instanceof d)for(var a=0;a=a.Int&&o.dataType<=a.Boolean&&(e.push({value:t.getValue(o.name),name:o.alias}),this.options.colors?this.options.colors.constructor===Array&&(n.push({name:o.alias,color:this.options.colors[r]||"#000"}),i.push(o.alias)):(n.push(o.alias),i.push(o.alias)))}return{data:{tooltip:this.options.tooltip||{},grid:this.options.grid||{top:"1%"},xAxis:this.options.xAxis||{data:i,boundaryGap:!1,axisLabel:{interval:0,rotate:-90}},yAxis:{show:!1,type:"value"},series:[{type:"bar",name:this.options.name||"",data:e,itemStyle:{normal:{color:function(t){return s.options.colors[t.dataIndex]},barBorderColor:this.options.itemStyle.barBorderColor,barBorderRadius:this.options.itemStyle.barBorderRadius,barBorderWidth:this.options.itemStyle.barBorderWidth,label:this.options.itemStyle.label}},barCategoryGap:this.options.barCategoryGap,barMinHeight:this.options.barMinHeight,barMaxWidth:this.options.barMaxWidth,barWidth:this.options.barWidth}]},legend:n}},r.exports=o}.apply(e,i))||(t.exports=r)},function(t,e,n){t.exports=function(n){function i(t){if(r[t])return r[t].exports;var e=r[t]={exports:{},id:t,loaded:!1};return n[t].call(e.exports,e,e.exports,i),e.loaded=!0,e.exports}var r={};return i.m=n,i.c=r,i.p="",i(0)}([function(t,e,n){t.exports=n(2),n(85),n(79),n(90),n(163),n(196),n(176),n(34),n(187),n(182),n(181),n(166),n(188),n(204)},function(t,e,n){function a(t){if("object"!=typeof t||null===t)return t;var e=t;if(t instanceof Array){e=[];for(var n=0,i=t.length;nMath.abs(o[1])?0=o.length&&o.push({option:t})}}),o},h.isIdInner=function(t){return u.isObject(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")},t.exports=h},function(t,e,n){"use strict";function i(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i}var r=n(5),o=n(19),a=r.applyTransform,s=Math.min,l=Math.abs,u=Math.max;i.prototype={constructor:i,union:function(t){var e=s(t.x,this.x),n=s(t.y,this.y);this.width=u(t.x+t.width,this.x+this.width)-e,this.height=u(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:function(){var e=[],n=[];return function(t){t&&(e[0]=this.x,e[1]=this.y,n[0]=this.x+this.width,n[1]=this.y+this.height,a(e,e,t),a(n,n,t),this.x=s(e[0],n[0]),this.y=s(e[1],n[1]),this.width=l(n[0]-e[0]),this.height=l(n[1]-e[1]))}}(),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,i=o.create();return o.translate(i,i,[-this.x,-this.y]),o.scale(i,i,[e,n]),o.translate(i,i,[t.x,t.y]),i},intersect:function(t){var e=this.x,n=this.x+this.width,i=this.y,r=this.y+this.height,o=t.x,a=t.x+t.width,s=t.y,l=t.y+t.height;return!(n=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new i(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},t.exports=i},function(t,e,n){function l(t,e){return"{"+t+(null==e?"":e)+"}"}function u(t){return t<10?"0"+t:t}var h=n(1),c=n(4),p=["a","b","c","d","e","f","g"];t.exports={normalizeCssArray:function(t){var e=t.length;return"number"==typeof t?[t,t,t,t]:2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},addCommas:function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1/g,">").replace(/"/g,""").replace(/'/g,"'")},formatTpl:function(t,e){h.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars,r=0;r';return e?s+u(this.name)+" : "+r:u(this.name)+"
"+s+(o?u(o)+" : "+r:r)},restoreData:function(){this._data=this._dataBeforeProcessed.cloneShallow()}});l.mixin(a,r.dataFormatMixin),t.exports=a},function(f,t,d){(function(t){function c(t){return w.isArray(t)||(t=[t]),t}function v(t,e){var n=t.dimensions,i=new h(w.map(n,t.getDimensionInfo,t),t.hostModel);u(i,t,t._wrappedMethods);for(var r=i._storage={},o=t._storage,a=0;a=i.maxIterations){t+=i.ellipsis;break}var a=0===r?u(t,n,i):Math.floor(t.length*n/o);if(a>4|(3840&s)>>8,240&s|(240&s)>>4,15&s|(15&s)<<4,1]}if(7===e.length){var s=parseInt(e.substr(1),16);if(!(0<=s&&s<=16777215))return;return[(16711680&s)>>16,(65280&s)>>8,255&s,1]}}}}function d(t){var e=(parseFloat(t[0])%360+360)%360/360,n=u(t[1]),i=u(t[2]),r=i<=.5?i*(n+1):i+n-i*n,o=2*i-r,a=[h(255*s(o,r,e+1/3)),h(255*s(o,r,e)),h(255*s(o,r,e-1/3))];return 4===t.length&&(a[3]=t[3]),a}function o(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0==l)n=e=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),1e.length&&(this._expandData(),e=this.data);for(var n=0;n=e[0]&&t<=e[1]},o.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},o.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},o.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},o.getExtent=function(){return this._extent.slice()},o.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},o.getTicksLabels=function(){for(var t=[],e=this.getTicks(),n=0;ne[1]&&(e[1]=t[1]),o.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval||this.niceTicks(),this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice()},getTicks:function(){this._interval||this.niceTicks();var t=this._interval,e=this._extent,n=[];if(t){var i=this._niceExtent;e[0]i[1]&&n.push(e[1])}return n},getTicksLabels:function(){for(var t=[],e=this.getTicks(),n=0;nl[1]?-1:1,h=["start"===r?l[0]-u*s:"end"===r?l[1]+u*s:(l[0]+l[1])/2,"middle"===r?t.labelOffset+o*s:0];i="middle"===r?M(t,t.rotation,o):function(t,e,n){var i,r,o=p(-t.rotation),a=n[0]>n[1],s="start"===e&&!a||"start"!==e&&a;return i=f(o-E/2)?(r=s?"bottom":"top","center"):f(o-1.5*E)?(r=s?"top":"bottom","center"):(r="middle",o<1.5*E&&E/2e);n++);n=Math.min(n-1,u-2)}I=e;var i=y[(E=n)+1]-y[n];if(0!=i)if(S=(e-y[n])/i,l)if(M=m[n],C=m[0===n?n:n-1],T=m[u-2e[1]&&i.reverse(),t<0&&i[0]+tn[1]&&(t=n[1]-i[1]),t}return t&&("rigid"===i?(t=o(t,e,n),e[0]+=t,e[1]+=t):(t=o(t,e[r],n),e[r]+=t,"push"===i&&e[0]>e[1]&&(e[1-r]=e[r]))),e}},function(t,e,n){var i=n(1),r={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameTextStyle:{},nameGap:15,silent:!0,axisLine:{show:!0,onZero:!0,lineStyle:{color:"#333",width:1,type:"solid"}},axisTick:{show:!0,inside:!1,length:5,lineStyle:{color:"#333",width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{color:"#333",fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},o=i.merge({boundaryGap:!0,axisTick:{interval:"auto"},axisLabel:{interval:"auto"}},r),a=i.defaults({boundaryGap:[0,0],splitNumber:5},r),s=i.defaults({scale:!0,min:"dataMin",max:"dataMax"},a),l=i.defaults({},a);l.scale=!0,t.exports={categoryAxis:o,valueAxis:a,timeAxis:s,logAxis:l}},,function(t,e,n){var s=n(16);t.exports=function(t,o,a){function e(e){var i=[o,"normal","color"],t=a.get("color"),r=e.getData(),n=e.get(i)||t[e.seriesIndex%t.length];r.setVisual("color",n),a.isSeriesFiltered(e)||("function"!=typeof n||n instanceof s||r.each(function(t){r.setItemVisual(t,"color",n(e.getDataParams(t)))}),r.each(function(t){var e=r.getItemModel(t),n=e.get(i,!0);null!=n&&r.setItemVisual(t,"color",n)}))}t?a.eachSeriesByType(t,e):a.eachSeries(e)}},function(t,e){t.exports=function(t,e,n,i,r,o){if(ee[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function T(t){return 0<=t?1:-1}function l(t,e){return null!=e.dataIndex?e.dataIndex:null!=e.name?t.indexOfName(e.name):void 0}function A(t,e,n){return"polar"===t.type?function(t,e,n){var i=t.getAngleAxis(),r=t.getRadiusAxis().getExtent(),o=i.getExtent(),a=Math.PI/180,s=new d.Sector({shape:{cx:t.cx,cy:t.cy,r0:r[0],r:r[1],startAngle:-o[0]*a,endAngle:-o[1]*a,clockwise:i.inverse}});return e&&(s.shape.endAngle=-o[0]*a,d.initProps(s,{shape:{endAngle:-o[1]*a}},n)),s}(t,e,n):function(t,e,n){var i=c(t.getAxis("x")),r=c(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),a=i[0],s=r[0],l=i[1]-a,u=r[1]-s;n.get("clipOverflow")||(o?(s-=u,u*=3):(a-=l,l*=3));var h=new d.Rect({shape:{x:a,y:s,width:l,height:u}});return e&&(h.shape[o?"width":"height"]=0,d.initProps(h,{shape:{width:l,height:u}},n)),h}(t,e,n)}var E=n(1),i=n(38),u=n(47),f=n(88),d=n(3),r=n(89),h=n(25);t.exports=h.extend({type:"line",init:function(){var t=new d.Group,e=new i;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle.normal"),s=t.getModel("areaStyle.normal"),l=o.mapArray(o.getItemLayout,!0),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,p=this._polyline,f=this._polygon,d=this._lineGroup,y=t.get("animation"),m=!s.isEmpty(),g=function(o,a){var s=o.getBaseAxis(),t=o.getOtherAxis(s),l=s.onZero?0:t.scale.getExtent()[0],u=t.dim,h="x"===u||"radius"===u?1:0;return a.mapArray([u],function(t,e){for(var n,i=a.stackedOn;i&&T(i.get(u,e))===T(t);){n=i;break}var r=[];return r[h]=a.get(s.dim,e),r[1-h]=n?n.get(u,e,!0):l,o.dataToPoint(r)},!0)}(i,o),v=t.get("showSymbol"),x=v&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(o,i),_=this._data;_&&_.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),_.setItemGraphicEl(e,null))}),v||c.remove(),r.add(d),p&&h.type===i.type?(m&&!f?f=this._newPolygon(l,g,i,y):f&&!m&&(d.remove(f),f=this._polygon=null),d.setClipPath(A(i,!1,t)),v&&c.updateData(o,x),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),C(this._stackedOnPoints,g)&&C(this._points,l)||(y?this._updateAnimation(o,g,i,n):(p.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:g})))):(v&&c.updateData(o,x),p=this._newPolyline(l,i,y),m&&(f=this._newPolygon(l,g,i,y)),d.setClipPath(A(i,!0,t))),p.setStyle(E.defaults(a.getLineStyle(),{stroke:o.getVisual("color"),lineJoin:"bevel"}));var w=t.get("smooth");if(w=M(t.get("smooth")),p.setShape({smooth:w,smoothMonotone:t.get("smoothMonotone")}),f){var b=o.stackedOn,P=0;if(f.style.opacity=.7,f.setStyle(E.defaults(s.getAreaStyle(),{fill:o.getVisual("color"),lineJoin:"bevel"})),b){var S=b.hostModel;P=M(S.get("smooth"))}f.setShape({smooth:w,stackedOnSmooth:P,smoothMonotone:t.get("smoothMonotone")})}this._data=o,this._coordSys=i,this._stackedOnPoints=g,this._points=l},highlight:function(t,e,n,i){var r=t.getData(),o=l(r,i);if(null!=o&&0<=o){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);(a=new u(r,o,n)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else h.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),o=l(r,i);if(null!=o&&0<=o){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else h.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new r.Polyline({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new r.Polygon({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_getSymbolIgnoreFunc:function(t,e){var n=e.getAxesByScale("ordinal")[0];return n&&n.isLabelIgnored?E.bind(n.isLabelIgnored,n):void 0},_updateAnimation:function(t,e,n,i){var r=this._polyline,o=this._polygon,a=t.hostModel,s=f(this._data,t,this._stackedOnPoints,e,this._coordSys,n);r.shape.points=s.current,d.updateProps(r,{shape:{points:s.next}},a),o&&(o.setShape({points:s.current,stackedOnPoints:s.stackedOnCurrent}),d.updateProps(o,{shape:{points:s.next,stackedOnPoints:s.stackedOnNext}},a));for(var l=[],u=s.status,h=0;hi[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}var i=n(6),w=n(5),b=w.min,P=w.max,S=w.scaleAndAdd,C=w.copy,M=[],T=[],A=[];t.exports={Polyline:i.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null},style:{fill:null,stroke:"#000"},buildPath:function(t,e){for(var n=e.points,i=0,r=n.length,o=c(n,e.smoothConstraint);io[r].y+o[r].height)return void l(r,n/2);l(e-1,n/2)}function l(t,e){for(var n=t;0<=n&&(o[n].y-=e,!(0o[n-1].y+o[n-1].height));n--);}function u(t,e,n,i,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?d.push(o[y]):f.push(o[y]);u(f,!1,t,e,n,i),u(d,!0,t,e,n,i)}var O=n(17);t.exports=function(M,T,t,e){var A,E,I=M.getData(),L=[],R=!1;I.each(function(t){var e,n,i,r,o=I.getItemLayout(t),a=I.getItemModel(t),s=a.getModel("label.normal"),l=s.get("position")||a.get("label.emphasis.position"),u=a.getModel("labelLine.normal"),h=u.get("length"),c=u.get("length2"),p=(o.startAngle+o.endAngle)/2,f=Math.cos(p),d=Math.sin(p);A=o.cx,E=o.cy;var y="inside"===l||"inner"===l;if("center"===l)e=o.cx,n=o.cy,r="center";else{var m=(y?(o.r+o.r0)/2*f:o.r*f)+A,g=(y?(o.r+o.r0)/2*d:o.r*d)+E;if(e=m+3*f,n=g+3*d,!y){var v=m+f*(h+T-o.r),x=g+d*(h+T-o.r),_=v+(f<0?-1:1)*c,w=x;e=_+(f<0?-5:5),i=[[m,g],[v,x],[_,n=w]]}r=y?"center":0e&&(e=t[n]);return e},min:function(t){for(var e=1/0,n=0;n>>1;t[r][2]i[0]){for(a=0;at);a++);o=n[i[a]]}if(i.splice(a+1,0,t),o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);n[t]=e}else _("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i=_[i=0]+t&&a<=_[1]+t?h:0}if(o){var l=i;i=y(r),r=y(l)}else i=y(i),r=y(r);rMath.PI/2&&d<1.5*Math.PI&&(h=-h),c+=h)}}return c}function r(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;h=this._maxSize&&0')}}catch(t){i=function(t){return a.createElement("<"+t+' xmlns="'+r+'" class="zrvml">')}}t.exports={doc:a,initVML:function(){if(!s){s=!0;var t=a.styleSheets;t.length<31?a.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}},createNode:i}}},,function(t,e,n){function i(t,e,n){d.call(this),this.type=t,this.zr=e,this.opt=y.clone(n),this.group=new m.Group,this._containerRect=null,this._track=[],this._dragging,this._cover,this._disabled=!0,this._handlers={mousedown:g(a,this),mousemove:g(s,this),mouseup:g(l,this)},v(S,function(t){this.zr.on(t,this._handlers[t])},this)}function o(t,e){var n=this.group.transformCoordToLocal(t,e);return!this._containerRect||this._containerRect.contain(n[0],n[1])}function r(t){var e=t.event;e.preventDefault&&e.preventDefault()}function a(t){if(!(this._disabled||t.target&&t.target.draggable)){r(t);var e=t.offsetX,n=t.offsetY;o.call(this,e,n)&&(this._dragging=!0,this._track=[[e,n]])}}function s(t){this._dragging&&!this._disabled&&(r(t),u.call(this,t))}function l(t){this._dragging&&!this._disabled&&(r(t),u.call(this,t,!0),this._dragging=!1,this._track=[])}function u(t,e){var n=t.offsetX,i=t.offsetY;if(o.call(this,n,i)){this._track.push([n,i]);var r=function(){var t=this._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],i=e[0]-n[0],r=e[1]-n[1];return w(i*i+r*r,.5)>P}.call(this)?C[this.type].getRanges.call(this):[];h.call(this,r),this.trigger("selected",y.clone(r)),e&&this.trigger("selectEnd",y.clone(r))}}function h(t){var e=C[this.type];t&&t.length?(this._cover||(this._cover=e.create.call(this),this.group.add(this._cover)),e.update.call(this,t)):(this.group.remove(this._cover),this._cover=null),function(t){t.traverse(function(t){t.z=b})}(this.group)}function c(){var t=this.group,e=t.parent;e&&e.remove(t)}function p(){var t=this.opt;return new m.Rect({style:{stroke:t.stroke,fill:t.fill,lineWidth:t.lineWidth,opacity:t.opacity}})}function f(){var t=function(){return y.map(this._track,function(t){return this.group.transformCoordToLocal(t[0],t[1])},this)}.call(this),e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}var d=n(21),y=n(1),m=n(3),g=y.bind,v=y.each,x=Math.min,_=Math.max,w=Math.pow,b=1e4,P=2,S=["mousedown","mousemove","mouseup"];i.prototype={constructor:i,enable:function(t,e){this._disabled=!1,c.call(this),this._containerRect=!1!==e?e||t.getBoundingRect():null,t.add(this.group)},update:function(t){h.call(this,t&&y.clone(t))},disable:function(){this._disabled=!0,c.call(this)},dispose:function(){this.disable(),v(S,function(t){this.zr.off(t,this._handlers[t])},this)}},y.mixin(i,d);var C={line:{create:p,getRanges:function(){var t=f.call(this),e=x(t[0][0],t[1][0]),n=_(t[0][0],t[1][0]);return[[e,n]]},update:function(t){var e=t[0],n=this.opt.width;this._cover.setShape({x:e[0],y:-n/2,width:e[1]-e[0],height:n})}},rect:{create:p,getRanges:function(){var t=f.call(this),e=[x(t[1][0],t[0][0]),x(t[1][1],t[0][1])],n=[_(t[1][0],t[0][0]),_(t[1][1],t[0][1])];return[[[e[0],n[0]],[e[1],n[1]]]]},update:function(t){var e=t[0];this._cover.setShape({x:e[0][0],y:e[1][0],width:e[0][1]-e[0][0],height:e[1][1]-e[1][0]})}}};t.exports=i},function(t,e,n){function i(){this.group=new r.Group,this._symbolEl=new s({silent:!0})}var r=n(3),o=n(24),a=n(1),s=r.extendShape({shape:{points:null,sizes:null},symbolProxy:null,buildPath:function(t,e){for(var n=e.points,i=e.sizes,r=this.symbolProxy,o=r.shape,a=0;at.get("largeThreshold")?r:o;(this._symbolDraw=s).updateData(i),a.add(s.group),a.remove(s===r?o.group:r.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)}})},function(t,e,n){n(101),n(39),n(40),n(172),n(173),n(168),n(169),n(99),n(98)},function(t,e,n){function i(e,r,t){var n=t.getAxisModel(),o=n.axis.scale,a=[0,100],s=[e.start,e.end],l=[];return function(i,r,o){h(["min","max"],function(t,e){var n=r.get(t,!0);null!=n&&(n+"").toLowerCase()!=="data"+t&&(i[e]=o.parse(n))}),r.get("scale",!0)||(0i[1]&&(i[1]=e[1])})},this),i}(this._dimName,this.getTargetSeriesModels()),n=i(t.option,e,this);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,r(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,r(this,!0))},filterData:function(t){function i(t){return t>=n[0]&&t<=n[1]}if(t===this._dataZoomModel){var r=this._dimName,e=this.getTargetSeriesModels(),o=t.get("filterMode"),n=this._valueWindow,a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(o="empty"),h(e,function(e){var n=e.getData();n&&h(e.coordDimToDataDim(r),function(t){"empty"===o?e.setData(n.map(t,function(t){return i(t)?t:NaN})):n.filterSelf(t,i)})})}}},t.exports=a},function(t,e,n){t.exports=n(39).extend({type:"dataZoom.inside",defaultOption:{zoomLock:!1}})},function(t,e,n){function h(t,e,n){var i=e.axis,r=n.rect,o={};return"x"===i.dim?(o.pixel=t[0],o.pixelLength=r.width,o.pixelStart=r.x,o.signal=i.inverse?1:-1):(o.pixel=t[1],o.pixelLength=r.height,o.pixelStart=r.y,o.signal=i.inverse?-1:1),o}var i=n(40),a=n(1),s=n(71),l=n(174),u=a.bind,c=i.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(n,t,i,e){c.superApply(this,"render",arguments),l.shouldRecordRange(e,n.id)&&(this._range=n.getPercentRange());var r=this.getTargetInfo().cartesians,o=a.map(r,function(t){return l.generateCoordId(t.model)});a.each(r,function(t){var e=t.model;l.register(i,{coordId:l.generateCoordId(e),allCoordIds:o,coordinateSystem:e.coordinateSystem,dataZoomId:n.id,throttleRage:n.get("throttle",!0),panGetRange:u(this._onPan,this,t),zoomGetRange:u(this._onZoom,this,t)})},this)},remove:function(){l.unregister(this.api,this.dataZoomModel.id),c.superApply(this,"remove",arguments),this._range=null},dispose:function(){l.unregister(this.api,this.dataZoomModel.id),c.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,n,i){return this._range=function(t,e,n,i){e=e.slice();var r=i.axisModels[0];if(r){var o=h(t,r,n),a=o.signal*(e[1]-e[0])*o.pixel/o.pixelLength;return s(a,e,[0,100],"rigid"),e}}([n,i],this._range,e,t)},_onZoom:function(t,e,n,i,r){var o=this.dataZoomModel;return o.option.zoomLock?this._range:this._range=function(t,e,n,i,r){n=n.slice();var o,a,s=r.axisModels[0];if(s){var l=h(e,s,i),u=(l.pixel-l.pixelStart)/l.pixelLength*(n[1]-n[0])+n[0];return t=Math.max(t,0),n[0]=(n[0]-u)*t+u,n[1]=(n[1]-u)*t+u,a=[0,100],(o=n)[0]<=a[1]||(o[0]=a[1]),o[1]<=a[1]||(o[1]=a[1]),o[0]>=a[0]||(o[0]=a[0]),o[1]>=a[0]||(o[1]=a[0]),o}}(1/n,[i,r],this._range,e,t)}});t.exports=c},function(t,e,n){var i=n(39);t.exports=i.extend({type:"dataZoom.select"})},function(t,e,n){t.exports=n(40).extend({type:"dataZoom.select"})},function(t,e,n){var i=n(39),r=(n(11),n(1),i.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackgroundColor:"#ddd",fillerColor:"rgba(47,69,84,0.15)",handleColor:"rgba(148,164,165,0.95)",handleSize:10,labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}},mergeOption:function(t){r.superApply(this,"mergeOption",arguments)}}));t.exports=r},function(t,e,n){var l=n(1),f=n(3),r=n(126),i=n(40),o=f.Rect,a=n(4),d=a.linearMap,s=n(11),u=n(71),h=a.asc,c=l.bind,p=Math.round,y=Math.max,m=l.each,g="horizontal",v=["line","bar","candlestick","scatter"],x=i.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._halfHandleSize,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){return x.superApply(this,"render",arguments),r.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this._halfHandleSize=p(t.get("handleSize")/2),!1===this.dataZoomModel.get("show")?void this.group.removeAll():(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),void this._updateView())},remove:function(){x.superApply(this,"remove",arguments),r.clear(this,"_dispatchZoomAction")},dispose:function(){x.superApply(this,"dispose",arguments),r.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new f.Group;this._renderBackground(),this._renderDataShadow(),this._renderHandle(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},r=this._orient===g?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},o=s.getLayoutParams(t.option);l.each(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=s.getLayoutRect(o,i,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==g||r?n===g&&r?{scale:a?[-1,1]:[-1,-1]}:"vertical"!==n||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.position[0]=e.x-s.x,t.position[1]=e.y-s.y},_getViewExtent:function(){var t=this._halfHandleSize,e=y(this._size[0],4*t),n=[t,e-t];return n},_renderBackground:function(){var t=this.dataZoomModel,e=this._size;this._displayables.barGroup.add(new o({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")}}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim,o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s=[0,e[1]],l=[0,e[0]],u=[[e[0],0],[0,0]],h=l[1]/(i.count()-1),c=0,p=Math.round(i.count()/e[0]);i.each([r],function(t,e){if(0"+(r?a(r)+" : ":"")+i},getRawDataArray:function(){return this.option.data},getData:function(){return this._data},setData:function(t){this._data=t}};v.defaults(S,r.dataFormatMixin),n(2).extendComponentView({type:"markLine",init:function(){this._markLineMap={}},render:function(t,n,i){var e=this._markLineMap;for(var r in e)e[r].__keep=!1;for(var r in n.eachSeries(function(t){var e=t.markLineModel;e&&this._renderSeriesML(t,e,n,i)},this),e)e[r].__keep||this.group.remove(e[r].group)},updateLayout:function(t,e,l){e.eachSeries(function(r){var t=r.markLineModel;if(t){var o=t.getData(),a=t.__from,s=t.__to;a.each(function(t){var e=o.getItemModel(t),n=e.get("type"),i=e.get("valueIndex");g(a,t,!0,n,i,r,l),g(s,t,!1,n,i,r,l)}),o.each(function(t){o.setItemLayout(t,[a.getItemLayout(t),s.getItemLayout(t)])}),this._markLineMap[r.name].updateLayout()}},this)},_renderSeriesML:function(a,n,t,s){function r(t,e,n,i,r){var o=t.getItemModel(e);g(t,e,n,i,r,a,s),t.setItemVisual(e,{symbolSize:o.get("symbolSize")||y[n?0:1],symbol:o.get("symbol",!0)||d[n?0:1],color:o.get("itemStyle.normal.color")||l.getVisual("color")})}var e=a.coordinateSystem,i=a.name,l=a.getData(),o=this._markLineMap,u=o[i];u=u||(o[i]=new b),this.group.add(u.group);var h=function(t,n,e){var i;i=t?v.map(t&&t.dimensions,function(t){var e=n.getData().getDimensionInfo(n.coordDimToDataDim(t)[0])||{};return e.name=t,e}):[{name:"value",type:"float"}];var r=new x(i,e),o=new x(i,e),a=new x([],e),s=v.map(e.get("data"),v.curry(P,n,t,e));t&&(s=v.filter(s,v.curry(m,t)));var l=t?w.dimValueGetter:function(t){return t.value};return r.initData(v.map(s,function(t){return t[0]}),null,l),o.initData(v.map(s,function(t){return t[1]}),null,l),a.initData(v.map(s,function(t){return t[2]})),{from:r,to:o,line:a}}(e,a,n),c=h.from,p=h.to,f=h.line;n.__from=c,n.__to=p,v.extend(n,S),n.setData(f);var d=n.get("symbol"),y=n.get("symbolSize");v.isArray(d)||(d=[d,d]),"number"==typeof y&&(y=[y,y]),h.from.each(function(t){var e=f.getItemModel(t),n=e.get("type"),i=e.get("valueIndex");r(c,t,!0,n,i),r(p,t,!1,n,i)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.normal.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),p.getItemLayout(t)])}),u.updateData(f,c,p),h.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=n})}),u.__keep=!0}})},function(t,e,n){var a=n(7),s=n(2).extendComponentModel({type:"markPoint",dependencies:["series","grid","polar"],init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},mergeOption:function(t,r,e,o){e||r.eachSeries(function(t){var e=t.get("markPoint"),n=t.markPointModel;if(e&&e.data){if(n)n.mergeOption(e,r,!0);else{o&&a.defaultEmphasis(e.label,["position","show","textStyle","distance","formatter"]);var i={seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0};n=new s(e,this,r,i)}t.markPointModel=n}else t.markPointModel=null},this)},defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2},emphasis:{}}}});t.exports=s},function(t,e,n){function u(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,n=s.getItemModel(t),i=n.getShallow("x"),r=n.getShallow("y");if(null!=i&&null!=r)e=[p.parsePercent(i,u.getWidth()),p.parsePercent(r,u.getHeight())];else if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(h){var o=s.get(h.dimensions[0],t),a=s.get(h.dimensions[1],t);e=h.dataToPoint([o,a])}s.setItemLayout(t,e)})}var h=n(38),c=n(1),i=n(9),r=n(7),p=n(4),o=i.addCommas,a=i.encodeHTML,f=n(14),d=n(104),y={getRawDataArray:function(){return this.option.data},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=c.isArray(n)?c.map(n,o).join(", "):o(n),r=e.getName(t);return this.name+"
"+(r?a(r)+" : ":"")+i},getData:function(){return this._data},setData:function(t){this._data=t}};c.defaults(y,r.dataFormatMixin),n(2).extendComponentView({type:"markPoint",init:function(){this._symbolDrawMap={}},render:function(t,e,n){var i=this._symbolDrawMap;for(var r in i)i[r].__keep=!1;for(var r in e.eachSeries(function(t){var e=t.markPointModel;e&&this._renderSeriesMP(t,e,n)},this),i)i[r].__keep||(i[r].remove(),this.group.remove(i[r].group))},updateLayout:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(u(e.getData(),t,n),this._symbolDrawMap[t.name].updateLayout(e))},this)},_renderSeriesMP:function(t,i,e){var n=t.coordinateSystem,r=t.name,o=t.getData(),a=this._symbolDrawMap,s=a[r];s=s||(a[r]=new h);var l=function(t,n,e){var i;i=t?c.map(t&&t.dimensions,function(t){var e=n.getData().getDimensionInfo(n.coordDimToDataDim(t)[0])||{};return e.name=t,e}):[{name:"value",type:"float"}];var r=new f(i,e),o=c.map(e.get("data"),c.curry(d.dataTransform,n));return t&&(o=c.filter(o,c.curry(d.dataFilter,t))),r.initData(o,null,t?d.dimValueGetter:function(t){return t.value}),r}(n,t,i);c.mixin(i,y),i.setData(l),u(i.getData(),t,e),l.each(function(t){var e=l.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),l.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.normal.color")||o.getVisual("color"),symbol:e.getShallow("symbol")})}),s.updateData(l),this.group.add(s.group),l.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),s.__keep=!0}})},function(t,e,n){"use strict";var i=n(2),x=n(3),_=n(11);i.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),i.extendComponentView({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=new x.Text({style:{text:t.get("text"),textFont:r.getFont(),fill:r.getTextColor(),textBaseline:"top"},z2:10}),l=s.getBoundingRect(),u=t.get("subtext"),h=new x.Text({style:{text:u,textFont:o.getFont(),fill:o.getTextColor(),y:l.height+t.get("itemGap"),textBaseline:"top"},z2:10}),c=t.get("link"),p=t.get("sublink");s.silent=!c,h.silent=!p,c&&s.on("click",function(){window.open(c,"_"+t.get("target"))}),p&&h.on("click",function(){window.open(p,"_"+t.get("subtarget"))}),i.add(s),u&&i.add(h);var f=i.getBoundingRect(),d=t.getBoxLayoutParams();d.width=f.width,d.height=f.height;var y=_.getLayoutRect(d,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?y.x+=y.width:"center"===a&&(y.x+=y.width/2)),i.position=[y.x,y.y],s.setStyle("textAlign",a),h.setStyle("textAlign",a),f=i.getBoundingRect();var m=y.margin,g=t.getItemStyle(["color","opacity"]);g.fill=t.get("backgroundColor");var v=new x.Rect({shape:{x:f.x-m[3],y:f.y-m[0],width:f.width+m[1]+m[3],height:f.height+m[0]+m[2]},style:g,silent:!0});x.subPixelOptimizeRect(v),i.add(v)}}})},function(t,e,n){n(189),n(190),n(195),n(193),n(191),n(192),n(194)},function(t,e,n){var i=n(29),r=n(1),o=n(2).extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){o.superApply(this,"mergeDefaultAndTheme",arguments),r.each(this.option.feature,function(t,e){var n=i.get(e);n&&r.merge(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}});t.exports=o},function(i,t,r){(function(t){var m=r(29),g=r(1),v=r(3),x=r(12),e=r(52),n=r(103),_=r(17);i.exports=r(2).extendComponentView({type:"toolbox",render:function(c,p,f){function t(t,e){var n,i=h[t],r=h[e],o=l[i],a=new x(o,c,c.ecModel);if(i&&!r){if(function(t){return 0===t.indexOf("my")}(i))n={model:a,onclick:a.option.onclick,featureName:i};else{var s=m.get(i);if(!s)return;n=new s(a)}u[i]=n}else{if(!(n=u[r]))return;n.model=a}return!i&&r?void(n.dispose&&n.dispose(p,f)):!a.get("show")||n.unusable?void(n.remove&&n.remove(p,f)):(function(a,s,t){var l=a.getModel("iconStyle"),e=s.getIcons?s.getIcons():a.get("icon"),u=a.get("title")||{};if("string"==typeof e){var n=e,i=u;u={},(e={})[t]=n,u[t]=i}var h=a.iconPaths={};g.each(e,function(t,e){var n=l.getModel("normal").getItemStyle(),i=l.getModel("emphasis").getItemStyle(),r={x:-y/2,y:-y/2,width:y,height:y},o=0===t.indexOf("image://")?(r.image=t.slice(8),new v.Image({style:r})):v.makePath(t.replace("path://",""),{style:n,hoverStyle:i,rectHover:!0},r,"center");v.setHoverStyle(o),c.get("showTitle")&&(o.__title=u[e],o.on("mouseover",function(){o.setStyle({text:u[e],textPosition:i.textPosition||"bottom",textFill:i.fill||i.stroke||"#000",textAlign:i.textAlign||"center"})}).on("mouseout",function(){o.setStyle({textFill:null})})),o.trigger(a.get("iconStatus."+e)||"normal"),d.add(o),o.on("click",g.bind(s.onclick,s,p,f,e)),h[e]=o})}(a,n,i),a.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},void(n.render&&n.render(a,p,f)))}var d=this.group;if(d.removeAll(),c.get("show")){var y=+c.get("itemSize"),l=c.get("feature")||{},u=this._features||(this._features={}),h=[];g.each(l,function(t,e){h.push(e)}),new e(this._featureNames||[],h).add(t).update(t).remove(g.curry(t,null)).execute(),this._featureNames=h,n.layout(d,c,f),n.addBackground(d,c),d.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var i=_.getBoundingRect(e,n.font),r=t.position[0]+d.position[0],o=t.position[1]+d.position[1]+y,a=!1;o+i.height>f.getHeight()&&(n.textPosition="top",a=!0);var s=a?-5-i.height:y+8;r+i.width/2>f.getWidth()?(n.textPosition=["100%",s],n.textAlign="right"):r-i.width/2<0&&(n.textPosition=[0,s],n.textAlign="left")}})}},remove:function(e,n){g.each(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){g.each(this._features,function(t){t.dispose&&t.dispose(e,n)})}})}).call(t,r(201))},function(t,e,n){function _(t){var e=function(t){var r={},o=[],a=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var n=e.getBaseAxis();if("category"===n.type){var i=n.dim+"_"+n.index;r[i]||(r[i]={categoryAxis:n,valueAxis:e.getOtherAxis(n),series:[]},a.push({axisDim:n.dim,axisIndex:n.index})),r[i].series.push(t)}else o.push(t)}}),{seriesGroupByCategoryAxis:r,other:o,meta:a}}(t);return{value:b.filter([function(t){var h=[];return b.each(t,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,r=[" "].concat(b.map(t.series,function(t){return t.name})),o=[n.model.getCategories()];b.each(t.series,function(t){o.push(t.getRawData().mapArray(i,function(t){return t}))});for(var a=[r.join(S)],s=0;s',h=window.open();h.document.write(u)}},n(29).register("saveAsImage",i),t.exports=i},function(t,e,n){n(198),n(199),n(2).registerAction({type:"showTip",event:"showTip",update:"none"},function(){}),n(2).registerAction({type:"hideTip",event:"hideTip",update:"none"},function(){})},function(t,e,n){function i(r){var o=[],t=(r=r).get("transitionDuration"),e=r.get("backgroundColor"),n=r.getModel("textStyle"),i=r.get("padding");return t&&o.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return a.map(c,function(t){return t+"transition:"+n}).join(";")}(t)),e&&(o.push("background-Color:"+s.toHex(e)),o.push("filter:alpha(opacity=70)"),o.push("background-Color:"+e)),u(["width","color","radius"],function(t){var e="border-"+t,n=h(e),i=r.get(n);null!=i&&o.push(e+":"+i+("color"===t?"":"px"))}),o.push(function(n){var i=[],t=n.get("fontSize"),e=n.getTextColor();return e&&i.push("color:"+e),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px"),u(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";")}(n)),null!=i&&o.push("padding:"+l.normalizeCssArray(i).join("px ")+"px"),o.join(";")+";"}function r(n,t){var e=document.createElement("div"),i=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,n.appendChild(e),this._container=n,this._show=!1,this._hideTimeout;var r=this;e.onmouseenter=function(){r.enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},e.onmousemove=function(t){if(!r.enterable){var e=i.handler;o.normalizeEvent(n,t),e.dispatch("mousemove",t)}},e.onmouseleave=function(){r.enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1},function(e,n){function t(t){!function(t){for(;t&&t!==n;){if(t===e)return!0;t=t.parentNode}}(t.target)||t.preventDefault()}o.addEventListener(n,"touchstart",t),o.addEventListener(n,"touchmove",t),o.addEventListener(n,"touchend",t)}(e,n)}var a=n(1),s=n(22),o=n(33),l=n(9),u=a.each,h=l.toCamelCase,c=["","-webkit-","-moz-","-o-"];r.prototype={constructor:r,enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout),this.el.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+i(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),this._show=!0},setContent:function(t){var e=this.el;e.innerHTML=t,e.style.display=t?"block":"none"},moveTo:function(t,e){var n=this.el.style;n.left=t+"px",n.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this.enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(a.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}},t.exports=r},function(t,e,n){n(2).extendComponentModel({type:"tooltip",defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove",alwaysShowContent:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:!0,animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",lineStyle:{color:"#555",width:1,type:"solid"},crossStyle:{color:"#555",width:1,type:"dashed",textStyle:{}},shadowStyle:{color:"rgba(150,150,150,0.3)"}},textStyle:{color:"#fff",fontSize:14}}})},function(t,e,n){function p(t,e,n,i){return{x1:t,y1:e,x2:n,y2:i}}function c(t,e,n,i){return{x:t,y:e,width:n,height:i}}function f(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}function x(t,e,n,i,r,o,a){var s=a.getWidth(),l=a.getHeight(),u=o&&o.getBoundingRect().clone();if(o&&u.applyTransform(o.transform),"function"==typeof t&&(t=t([e,n],r,u)),_.isArray(t))e=g(t[0],s),n=g(t[1],l);else if("string"==typeof t&&o){var h=function(t,e,n){var i=n.clientWidth,r=n.clientHeight,o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-5;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+5;break;case"left":o=e.x-i-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+5,a=e.y+l/2-r/2}return[o,a]}(t,u,i.el);e=h[0],n=h[1]}else{var h=function(t,e,n,i,r){var o=n.clientWidth,a=n.clientHeight;return i":"")+_.map(e,function(t,e){return t.formatTooltip(l[e].dataIndex,!0)}).join("
")}a.setContent(c)}x(f,n[0],n[1],a,d,null,h)}},_showItemTooltipContent:function(t,e,n){var i=this._api,r=t.getData(),o=r.getItemModel(e),a=this._tooltipModel,s=this._tooltipContent,l=o.getModel("tooltip");if(l.parentModel?l.parentModel.parentModel=a:l.parentModel=this._tooltipModel,l.get("showContent")){var u,h=l.get("formatter"),c=l.get("position"),p=t.getDataParams(e);if(h){if("string"==typeof h)u=w.formatTpl(h,p);else if("function"==typeof h){var f=this,d="item_"+t.name+"_"+e;f._ticket=d,u=h(p,d,function(t,e){t===f._ticket&&(s.setContent(e),x(c,n.offsetX,n.offsetY,s,p,n.target,i))})}}else u=t.formatTooltip(e);s.show(l),s.setContent(u),x(c,n.offsetX,n.offsetY,s,p,n.target,i)}},_showAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&_.each(e,function(t){t.show()})}else this.group.eachChild(function(t){t.show()}),this.group.show()},_resetLastHover:function(){var t=this._lastHover;t.payloadBatch&&this._api.dispatchAction({type:"downplay",batch:t.payloadBatch}),this._lastHover={}},_hideAxisPointer:function(t){if(t){var e=this._axisPointers[t];e&&_.each(e,function(t){t.hide()})}else this.group.hide()},_hide:function(){clearTimeout(this._showTimeout),this._hideAxisPointer(),this._resetLastHover(),this._alwaysShowContent||this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._api.dispatchAction({type:"hideTip",from:this.uid}),this._lastX=this._lastY=null},dispose:function(t,e){if(!s.node){var n=e.getZr();this._tooltipContent.hide(),n.off("click",this._tryShow),n.off("mousemove",this._mousemove),n.off("mouseout",this._hide),n.off("globalout",this._hide),e.off("showTip",this._manuallyShowTip),e.off("hideTip",this._manuallyHideTip)}}})},,function(t,e){function n(){u=!1,a.length?l=a.concat(l):h=-1,l.length&&i()}function i(){if(!u){var t=setTimeout(n);u=!0;for(var e=l.length;e;){for(a=l,l=[];++h=s.Int&&a.dataType<=s.Boolean&&(e.push({value:t.getValue(a.name),name:a.alias}),0==t.getValue(a.name)&&r++,this.options.colors?this.options.colors.constructor===Array&&(n.push({name:a.alias,color:this.options.colors[o]||"#000"}),i.push(a.alias)):(n.push({name:a.alias,color:"#00FF00"}),i.push(a.alias)))}return r==this.fields.length?null:{data:{tooltip:this.options.tooltip||{},grid:this.options.grid||{top:"1%"},xAxis:this.options.xAxis||{data:i,boundaryGap:!1,axisLabel:{interval:0,rotate:-90}},yAxis:this.options.yAxis||{show:!1,type:"value"},series:[{name:this.options.name||"",type:"line",data:e,symbol:"circle",symbolSize:5,itemStyle:{normal:{color:function(t){return l.options.colors[t.dataIndex]},lineStyle:{color:"#00FF00"}}}}]},legend:n}},r.exports=o}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(0),n(139),n(61),n,e,t],void 0===(r=function(t,n,u,e,i,r){function o(t){var e=t||{};n.call(this,e),this.fields=e.fields,this.options={type:void 0===e.type?1:e.type,colors:e.colors||["#c4ccd3","#546579"],name:e.name,radius:e.radius,labelStyle:e.labelStyle},h=this}var h=null;function c(t,e){var n,i,r;try{n=t.toString().split(".")[1].length}catch(t){n=0}try{i=e.toString().split(".")[1].length}catch(t){i=0}return(t*(r=Math.pow(10,Math.max(n,i)))+e*r)/r}return t.extend2(o,n),o.prototype.copy=function(){var t=this.options,e=new o({fields:this.fields,type:t.type,colors:t.colors,name:t.name,radius:t.radius,labelStyle:t.labelStyle,style:this.style});return e.customOption=this.customOption,e},o.prototype.getOption=function(t){switch(this.options.type){case 0:return o.simple(t);case 1:return o.doughnut(t);default:return o.simple(t)}},o.doughnut=function(t){for(var e=[],n=[],i=0,r=0,o=h.options.radius,a=0;a=u.Int&&s.dataType<=u.Boolean&&(e.push({value:t.getValue(s.name),name:s.alias}),r=c(r,t.getValue(s.name)),0==t.getValue(s.name)&&i++,h.options.colors?h.options.colors.constructor===Array&&n.push({name:s.alias,color:h.options.colors[a]||"#000"}):n.push(s.alias))}if(i==h.fields.length)return null;t.extend&&(o=t.extend.radius);var l={tooltip:h.options.tooltip||{},grid:h.options.grid,series:[{name:h.options.name||"",type:"pie",avoidLabelOverlap:!1,radius:o||["50%","70%"],label:{normal:{show:!0,position:"center",formatter:function(){return r},textStyle:h.options.labelStyle}},data:e}]};return h.options.colors&&h.options.colors.constructor===Array&&(l.series[0].itemStyle={normal:{color:function(t){return h.options.colors[t.dataIndex]}}}),{data:l,legend:n}},o.simple=function(t){for(var e=[],n=[],i=0,r=h.options.radius,o=0;oe&&o[1]>n)return r}},o.prototype.setPatternLayer=function(t){t&&this.OLPageLayout.setPatternLayer(t)},o.prototype.addLayer=function(t){null!=t&&this.OLPageLayout.addLayer(t)},o.prototype.removeLayer=function(t){t.clear(),this.OLPageLayout.removeLayer(t)},o.prototype.format=function(t,e){var n=this.getSuggestedLayout(),i=function(t,e){var n=1,i=e.includes("LandScape"),r=l.getPixelSize(e);if(t){var o,a=t.name,s=t.landscape;o="custom"===a?s?[t.height,t.width]:[t.width,t.height]:(s&&(a+="_LandScape"),l.getPixelSize(a)),(s&&i||!s&&!i)&&(n=o[0]/r[0])}return n}(this.paper,n);return this.OLPageLayout.format(t,e,i)},r.exports=o}.apply(e,i))||(t.exports=r)},function(t,e,n){var i,r;i=[n(10),n(36),n(1),n(17),n,e,t],void 0===(r=function(t,e,n,o,i,r,a){function s(t){this._trackLayer=t.trackLayer,this._trackSymbol=t.trackSymbol,this._speed=t.speed,this._polyline=t.polyline,this._skip=t.skip||1,this._playing=!1,this._paused=!1,this._trackElement=null,this._interval=null,this._totalTime=null}var l=new e({});return t(s.prototype,{interval:{get:function(){return this._interval},set:function(t){this._interval!=t&&(this._interval=t,this._animater&&this._animater.updateInterval(this._interval))}},playing:{get:function(){return this._playing},set:function(t){this._playing!=t&&(this._playing=t)}},paused:{get:function(){return this._paused},set:function(t){this._paused!=t&&(this._paused=t)}}}),s.prototype.play=function(t){this._interPolyline=this.getInterLine();var e=this._interPolyline.getPointCount(),n=this.getIndex(t),i=this._interPolyline.getPoint(n);if(0!=e){(function(t){this._trackElement=new o({geometry:t,symbol:this._trackSymbol}),this._trackLayer.add(this._trackElement)}).call(this,i),this._playing=!0,this._paused=!1,this._interval=function(){return this._totalTime=this.getTotalTime(),this._totalTime/this._interPolyline.getPointCount()}.call(this);var r=this;return this._animater=function(t,e,n,i,r){var o={timer:null,index:e,interval:t,count:n,isPause:!1,play:function(){var t=function(){o.isPause||(o.index