100&&console.warn("\n MaxListenersExceededWarning: Possible MapEvent memory leak detected. ".concat(o[r].size," \n event listeners added to ").concat(r," type. Please check and make sure you really need these listeners!")),t._mapListenerDepts.set(e,o)}},{key:"_setOneTimeListenerDepts",value:function(e,r,n,i){var o=t._oneTimeMapListenerDepts.get(e)||{};o[r]=o[r]||new Map,i=i||n,o[r].set(n,i),o[r].size>100&&console.warn("\n MaxListenersExceededWarning: Possible MapEvent memory leak detected. ".concat(o[r].size," \n event listeners added to ").concat(r," type. Please check and make sure you really need these listeners!")),t._oneTimeMapListenerDepts.set(e,o)}},{key:"_onDirectlyDOMEvent",value:function(e,r){return function(n){var i=t._mapListenerDepts.get(e)||{},o=t._oneTimeMapListenerDepts.get(e)||{};if(!l()(i)||!l()(o)){var a=i[r]||new Set,s=o[r]||new Set,u=e.getContainer();a.forEach((function(t){var i=m(n,e,u.id),o=i.point,a=i.lngLat;t(Object.assign({},n,{type:r,point:o,lngLat:a,originalEvent:n,target:e}))}));for(var c=s,h=0,p=c.length;h0&&Object.defineProperty(o,"defaultPrevented",{value:!0})}var c=t._mapListenerDepts.get(e)||{};l()(c)||c[r].forEach((function(t){t(Object.assign({},{isTrusted:!1!==o.isTrusted,type:r,target:o.target,point:o.point}))}))}}}]),t}();y._directlyEvents=new WeakMap,y._delegateEvents=new WeakMap,y._mapListenerDepts=new Map,y._mapEventBindListenerSet={},y._oneTimeMapListenerDepts=new Map},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"d",(function(){return o})),r.d(e,"e",(function(){return a})),r.d(e,"f",(function(){return s})),r.d(e,"g",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"h",(function(){return l}));r(39);function n(t,e){return t[0]+=e[0],t[1]+=e[1],t}function i(t,e){var r,n,i=t[0],o=t[1],a=e[0],s=e[1],u=a[0],c=a[1],l=s[0],h=s[1],p=l-u,d=h-c,f=0===p&&0===d?0:(p*(i-u)+d*(o-c))/(p*p+d*d||0);return f<=0?(r=u,n=c):f>=1?(r=l,n=h):(r=u+f*p,n=c+f*d),[r,n]}function o(t,e){for(var r=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){r=!1;break}return r}function a(t,e){var r=Math.cos(e),n=Math.sin(e),i=t[0]*r-t[1]*n,o=t[1]*r+t[0]*n;return t[0]=i,t[1]=o,t}function s(t,e){return t[0]*=e,t[1]*=e,t}function u(t,e){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function c(t,e){return Math.sqrt(u(t,e))}function l(t,e){return u(t,i(t,e))}},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(t,e,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},c.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n0?t.animate({rotation:e,anchor:r,duration:n,easing:i.b}):t.rotate(e,r)}}function h(t,e,r,n,i){e=t.constrainResolution(e,0,i),d(t,e,r,n)}function p(t,e,r,n){var i=t.getResolution(),o=t.constrainResolution(i,e,0);if(void 0!==o){var s=t.getResolutions();o=Object(a.a)(o,t.getMinResolution()||s[s.length-1],t.getMaxResolution()||s[0])}if(r&&void 0!==o&&o!==i){var u=t.getCenter(),c=t.calculateCenterZoom(o,r);c=t.constrainCenter(c),r=[(o*u[0]-i*c[0])/(o-i),(o*u[1]-i*c[1])/(o-i)]}d(t,o,r,n)}function d(t,e,r,n){if(e){var o=t.getResolution(),a=t.getCenter();if(void 0!==o&&a&&e!==o&&n)t.animate({resolution:e,anchor:r,duration:n,easing:i.b});else{if(r){var s=t.calculateCenterZoom(e,r);t.setCenter(s)}t.setResolution(e)}}}e.a=s},function(t,e,r){"use strict";var n;r.d(e,"a",(function(){return n})),function(t){t.Hover="hover",t.Click="click",t.Select="select",t.Active="active",t.Drag="drag"}(n||(n={}))},function(t,e,r){"use strict";r.d(e,"b",(function(){return f}));var n=r(26),i=r(253),o=r(35),a=r(152),s=r(44);var u=function(t){function e(){t.call(this),this.revision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){++this.revision_,this.dispatchEvent(s.a.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var r=t.length,n=new Array(r),i=0;i0?(r[0]=2*(u*s+h*i+c*a-l*o)/p,r[1]=2*(c*s+h*o+l*i-u*a)/p,r[2]=2*(l*s+h*a+u*o-c*i)/p):(r[0]=2*(u*s+h*i+c*a-l*o),r[1]=2*(c*s+h*o+l*i-u*a),r[2]=2*(l*s+h*a+u*o-c*i)),M(t,e,r),t}function T(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function P(t,e){var r=e[0],n=e[1],i=e[2],o=e[4],a=e[5],s=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(r,n,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(u,c,l),t}function O(t,e){var r=new n.a(3);P(r,e);var i=1/r[0],o=1/r[1],a=1/r[2],s=e[0]*i,u=e[1]*o,c=e[2]*a,l=e[4]*i,h=e[5]*o,p=e[6]*a,d=e[8]*i,f=e[9]*o,g=e[10]*a,m=s+h+g,y=0;return m>0?(y=2*Math.sqrt(m+1),t[3]=.25*y,t[0]=(p-f)/y,t[1]=(d-c)/y,t[2]=(u-l)/y):s>h&&s>g?(y=2*Math.sqrt(1+s-h-g),t[3]=(p-f)/y,t[0]=.25*y,t[1]=(u+l)/y,t[2]=(d+c)/y):h>g?(y=2*Math.sqrt(1+h-s-g),t[3]=(d-c)/y,t[0]=(u+l)/y,t[1]=.25*y,t[2]=(p+f)/y):(y=2*Math.sqrt(1+g-s-h),t[3]=(u-l)/y,t[0]=(d+c)/y,t[1]=(p+f)/y,t[2]=.25*y),t}function L(t,e,r,n){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,c=o+o,l=a+a,h=i*u,p=i*c,d=i*l,f=o*c,g=o*l,m=a*l,y=s*u,v=s*c,A=s*l,_=n[0],b=n[1],x=n[2];return t[0]=(1-(f+m))*_,t[1]=(p+A)*_,t[2]=(d-v)*_,t[3]=0,t[4]=(p-A)*b,t[5]=(1-(h+m))*b,t[6]=(g+y)*b,t[7]=0,t[8]=(d+v)*x,t[9]=(g-y)*x,t[10]=(1-(h+f))*x,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function k(t,e,r,n,i){var o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,p=o*c,d=o*l,f=o*h,g=a*l,m=a*h,y=s*h,v=u*c,A=u*l,_=u*h,b=n[0],x=n[1],w=n[2],C=i[0],E=i[1],I=i[2],M=(1-(g+y))*b,S=(d+_)*b,T=(f-A)*b,P=(d-_)*x,O=(1-(p+y))*x,L=(m+v)*x,k=(f+A)*w,R=(m-v)*w,D=(1-(p+g))*w;return t[0]=M,t[1]=S,t[2]=T,t[3]=0,t[4]=P,t[5]=O,t[6]=L,t[7]=0,t[8]=k,t[9]=R,t[10]=D,t[11]=0,t[12]=r[0]+C-(M*C+P*E+k*I),t[13]=r[1]+E-(S*C+O*E+R*I),t[14]=r[2]+I-(T*C+L*E+D*I),t[15]=1,t}function R(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r+r,s=n+n,u=i+i,c=r*a,l=n*a,h=n*s,p=i*a,d=i*s,f=i*u,g=o*a,m=o*s,y=o*u;return t[0]=1-h-f,t[1]=l+y,t[2]=p-m,t[3]=0,t[4]=l-y,t[5]=1-c-f,t[6]=d+g,t[7]=0,t[8]=p+m,t[9]=d-g,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function D(t,e,r,n,i,o,a){var s=1/(r-e),u=1/(i-n),c=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*u,t[10]=(a+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*c,t[15]=0,t}function B(t,e,r,n,i){var o,a=1/Math.tan(e/2);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n),t}function N(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),c=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}function F(t,e,r,n,i,o,a){var s=1/(e-r),u=1/(n-i),c=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*u,t[14]=(a+o)*c,t[15]=1,t}function j(t,e,r,i){var o,a,s,u,l,h,p,d,f,g,m=e[0],y=e[1],v=e[2],A=i[0],_=i[1],b=i[2],x=r[0],w=r[1],C=r[2];return Math.abs(m-x)0&&(l*=d=1/Math.sqrt(d),h*=d,p*=d);var f=u*p-c*h,g=c*l-s*p,m=s*h-u*l;return(d=f*f+g*g+m*m)>0&&(f*=d=1/Math.sqrt(d),g*=d,m*=d),t[0]=f,t[1]=g,t[2]=m,t[3]=0,t[4]=h*m-p*g,t[5]=p*f-l*m,t[6]=l*g-h*f,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function U(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function G(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function H(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t}function V(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function Q(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t}function q(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t}function W(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function Y(t,e){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],p=t[9],d=t[10],f=t[11],g=t[12],m=t[13],y=t[14],v=t[15],A=e[0],_=e[1],b=e[2],x=e[3],w=e[4],C=e[5],E=e[6],I=e[7],M=e[8],S=e[9],T=e[10],P=e[11],O=e[12],L=e[13],k=e[14],R=e[15];return Math.abs(r-A)<=n.b*Math.max(1,Math.abs(r),Math.abs(A))&&Math.abs(i-_)<=n.b*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-b)<=n.b*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(a-x)<=n.b*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(s-w)<=n.b*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(u-C)<=n.b*Math.max(1,Math.abs(u),Math.abs(C))&&Math.abs(c-E)<=n.b*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(l-I)<=n.b*Math.max(1,Math.abs(l),Math.abs(I))&&Math.abs(h-M)<=n.b*Math.max(1,Math.abs(h),Math.abs(M))&&Math.abs(p-S)<=n.b*Math.max(1,Math.abs(p),Math.abs(S))&&Math.abs(d-T)<=n.b*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(f-P)<=n.b*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(g-O)<=n.b*Math.max(1,Math.abs(g),Math.abs(O))&&Math.abs(m-L)<=n.b*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(y-k)<=n.b*Math.max(1,Math.abs(y),Math.abs(k))&&Math.abs(v-R)<=n.b*Math.max(1,Math.abs(v),Math.abs(R))}var X=f,Z=V},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.POST_CONSTRUCT=e.DESIGN_PARAM_TYPES=e.PARAM_TYPES=e.TAGGED_PROP=e.TAGGED=e.MULTI_INJECT_TAG=e.INJECT_TAG=e.OPTIONAL_TAG=e.UNMANAGED_TAG=e.NAME_TAG=e.NAMED_TAG=void 0,e.NAMED_TAG="named",e.NAME_TAG="name",e.UNMANAGED_TAG="unmanaged",e.OPTIONAL_TAG="optional",e.INJECT_TAG="inject",e.MULTI_INJECT_TAG="multi_inject",e.TAGGED="inversify:tagged",e.TAGGED_PROP="inversify:tagged_props",e.PARAM_TYPES="inversify:paramtypes",e.DESIGN_PARAM_TYPES="design:paramtypes",e.POST_CONSTRUCT="post_construct"},function(t,e,r){"use strict";r.d(e,"a",(function(){return P}));var n,i,o,a,s,u=r(11),c=r.n(u),l=r(33),h=r.n(l),p=r(3),d=r.n(p),f=r(4),g=r.n(f),m=r(6),y=r.n(m),v=(r(66),r(312)),A=r.n(v),_=r(116),b=r.n(_),x=r(480),w=r.n(x),C=r(16),E=r(8),I=r(24),M=r(94);function S(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var e=1;e0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(Z);function et(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),J(O,t)}function rt(t,e){return e?q(t,e):new k(z(t))}var nt=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.predicate,this.thisArg))},t}(),it=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return m(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(S);function ot(){}function at(t,e,r){return function(n){return n.lift(new st(t,e,r))}}var st=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new ut(t,this.nextOrObserver,this.error,this.complete))},t}(),ut=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o._tapNext=ot,o._tapError=ot,o._tapComplete=ot,o._tapError=n||ot,o._tapComplete=i||ot,y(r)?(o._context=o,o._tapNext=r):r&&(o._context=r,o._tapNext=r.next||ot,o._tapError=r.error||ot,o._tapComplete=r.complete||ot),o}return m(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(S);var ct=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new lt(t,this.project))},t}(),lt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.project=r,n.index=0,n}return m(e,t),e.prototype._next=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var r=new X(this),n=this.destination;n.add(r),this.innerSubscription=K(t,r),this.innerSubscription!==r&&n.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(Z);var ht=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var r=new pt(t),n=K(this.notifier,new X(r));return n&&!r.seenValue?(r.add(n),e.subscribe(r)):r},t}(),pt=function(t){function e(e){var r=t.call(this,e)||this;return r.seenValue=!1,r}return m(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(Z),dt=r(103),ft=r(126),gt=r(67),mt=r(9),yt=r(1);function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p()(t);if(e){var i=p()(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l()(this,r)}}var At=function(t){u()(r,t);var e=vt(r);function r(t,n){var o;if(i()(this,r),o=e.call(this),!t)return l()(o);var a=t.element,s=Object(mt.b)();a.id=s,o.mapInstance=yt.a.getProps(n,"map");var u=yt.a.getProps(n,"kedamap");return o._mapCore=o.mapInstance.map,o._overlay=new u.Marker(a,t),o._draggable=!1,o._dragSubscription=null,o._diff={},o}return a()(r,[{key:"addToMap",value:function(){return this._overlay.addTo(this._mapCore),this}},{key:"removeFromMap",value:function(){return this._overlay.remove(),this}},{key:"getLngLat",value:function(){return this._overlay.getLngLat()}},{key:"setLngLat",value:function(t){return this._overlay.setLngLat(t),this}},{key:"getElement",value:function(){return this._overlay.getElement()}},{key:"setPopup",value:function(t){return this._overlay.setPopup(t),this}},{key:"getPopup",value:function(){return this._overlay.getPopup()}},{key:"togglePopup",value:function(){return this._overlay.togglePopup(),this}},{key:"getOffset",value:function(){var t=this._overlay.getOffset();return f()(t)?t:[t.x,t.y]}},{key:"setOffset",value:function(t){return this._overlay.setOffset(t),this}},{key:"setDraggable",value:function(t){var e,r,n=this;if(this._draggable=t,this._mapCore)if(this._draggable){var i=this.getElement(),o=this._mapCore,a=F((function(t){return gt.a.on(o)("mousedown",t)})),s=F((function(t){return gt.a.on(o)("mousemove",t)})),u=F((function(t){return gt.a.on(o)("mouseup",t)})),c=F((function(t){return gt.a.on(o)("mouseleave",t)}));this._dragSubscription||(this._dragSubscription=a.pipe((e=function(t){return i.contains(t.originalEvent.target)},function(t){return t.lift(new nt(e,r))}),at((function(t){o.dragPan.disable(),i.style.cursor="move";var e=n._mapCore.project([n.getLngLat().lng,n.getLngLat().lat]);n._diff.left=t.point.x-e.x,n._diff.top=t.point.y-e.y,dt.a.fireDragEvent(t,i,"dragstart")})),function t(e,r){return"function"==typeof r?function(n){return n.pipe(t((function(t,n){return Y(e(t,n)).pipe(D((function(e,i){return r(t,e,n,i)})))})))}:function(t){return t.lift(new ct(e))}}((function(){return s.pipe(D((function(t){return dt.a.fireDragEvent(t,i,"dragging"),t})),(t=function(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof i&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof k?t[0]:et(r)(rt(t,n))}(c,u).pipe(at((function(t){i.style.cursor="pointer",o.dragPan.enable(),dt.a.fireDragEvent(t,i,"dragend")}))),function(e){return e.lift(new ht(t))}));var t}))).subscribe((function(t){var e=t.point.x-n._diff.left,r=t.point.y-n._diff.top,i=n._mapCore.unproject({x:e,y:r});n.setLngLat(i)})))}else this._dragSubscription&&(this._dragSubscription.unsubscribe(),this._dragSubscription=null);return this}},{key:"isDraggable",value:function(){return this._draggable}},{key:"addEvent",value:function(t,e){var r=this.getId();dt.a.on(t,"#".concat(r),e)}},{key:"removeEvent",value:function(t){var e=this.getId();dt.a.off(t,"#".concat(e))}},{key:"getId",value:function(){return this.getElement().id}},{key:"setProperty",value:function(t){return this.getElement().setAttribute("__customProps__",t),this}}]),r}(ft.a)},function(t,e,r){"use strict";(function(t,n){
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+function i(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t,e){return t(e={exports:{}},e.exports),e.exports}r.d(e,"a",(function(){return T})),r.d(e,"b",(function(){return L})),r.d(e,"c",(function(){return I})),r.d(e,"d",(function(){return O}));var c=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0},t.exports=e.default}));s(c);var l=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=e.pop();return t.call(this,e,n)}},t.exports=e.default}));s(l);var h=u((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.fallback=s,r.wrap=u;var i,o=r.hasSetImmediate="function"==typeof t&&t,a=r.hasNextTick="object"==typeof n&&"function"==typeof n.nextTick;function s(t){setTimeout(t,0)}function u(t){return function(e){for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];return t((function(){return e.apply(void 0,r)}))}}i=o?t:a?n.nextTick:s,r.default=u(i)}));s(h);h.fallback,h.wrap,h.hasSetImmediate,h.hasNextTick;var p=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if((0,d.isAsync)(t))return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=e.pop(),i=t.apply(this,e);return o(i,n)};return(0,r.default)((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}if(n&&"function"==typeof n.then)return o(n,r);r(null,n)}))};var r=i(l),n=i(h);function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){return t.then((function(t){a(e,null,t)}),(function(t){a(e,t&&t.message?t:new Error(t))}))}function a(t,e,r){try{t(e,r)}catch(t){(0,n.default)((function(t){throw t}),t)}}t.exports=e.default}));s(p);var d=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isAsyncIterable=e.isAsyncGenerator=e.isAsync=void 0;var r,n=(r=p)&&r.__esModule?r:{default:r};function i(t){return"AsyncFunction"===t[Symbol.toStringTag]}e.default=function(t){if("function"!=typeof t)throw new Error("expected a function");return i(t)?(0,n.default)(t):t},e.isAsync=i,e.isAsyncGenerator=function(t){return"AsyncGenerator"===t[Symbol.toStringTag]},e.isAsyncIterable=function(t){return"function"==typeof t[Symbol.asyncIterator]}}));s(d);d.isAsyncIterable,d.isAsyncGenerator,d.isAsync;var f=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){void 0===e&&(e=t.length);if(!e)throw new Error("arity is undefined");function r(){for(var r=this,n=[],i=arguments.length;i--;)n[i]=arguments[i];return"function"==typeof n[e-1]?t.apply(this,n):new Promise((function(i,o){n[e-1]=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if(t)return o(t);i(e.length>1?e:e[0])},t.apply(r,n)}))}return Object.defineProperty(r,"name",{configurable:!0,value:"awaitable("+t.name+")"}),r},t.exports=e.default}));s(f);var g=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=o(c),n=o(d),i=o(f);function o(t){return t&&t.__esModule?t:{default:t}}e.default=(0,i.default)((function(t,e,i){var o=(0,r.default)(e)?[]:{};t(e,(function(t,e,r){(0,n.default)(t)((function(t){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];n.length<2&&(n=n[0]),o[e]=n,r(t)}))}),(function(t){return i(t,o)}))}),3),t.exports=e.default}));s(g);var m=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){function e(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(null!==t){var n=t;t=null,n.apply(this,e)}}return Object.assign(e,t),e},t.exports=e.default}));s(m);var y=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()},t.exports=e.default}));s(y);var v=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if((0,r.default)(t))return function(t){var e=-1,r=t.length;return function(){return++e=e||s||o||(s=!0,t.next().then((function(t){var e=t.value,n=t.done;if(!a&&!o){if(s=!1,n)return o=!0,void(u<=0&&i(null));u++,r(e,c,h),c++,l()}})).catch(p))}function h(t,e){if(u-=1,!a)return t?p(t):!1===t?(o=!0,void(a=!0)):e===n.default||o&&u<=0?(o=!0,i(null)):void l()}function p(t){a||(s=!1,o=!0,i(t))}l()};var r,n=(r=_)&&r.__esModule?r:{default:r};t.exports=e.default}));s(b);var x=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=s(m),n=s(v),i=s(A),o=s(b),a=s(_);function s(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){return function(e,s,u){if(u=(0,r.default)(u),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return u(null);if((0,d.isAsyncGenerator)(e))return(0,o.default)(e,t,s,u);if((0,d.isAsyncIterable)(e))return(0,o.default)(e[Symbol.asyncIterator](),t,s,u);var c=(0,n.default)(e),l=!1,h=!1,p=0,f=!1;function g(t,e){if(!h)if(p-=1,t)l=!0,u(t);else if(!1===t)l=!0,h=!0;else{if(e===a.default||l&&p<=0)return l=!0,u(null);f||m()}}function m(){for(f=!0;p0;)n[i]=arguments[i+1];if(!1!==r)return r||o===t.length?e.apply(void 0,[r].concat(n)):void a(n)}a([])})),t.exports=e.default}))),O=function(){function t(){for(var t=arguments,e=[],r=0;r=0&&l.splice(e,1)}function m(t){var e=document.createElement("style");return t.attrs.type="text/css",y(e,t.attrs),f(t,e),e}function y(t,e){Object.keys(e).forEach((function(r){t.setAttribute(r,e[r])}))}function v(t,e){var r,n,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var a=c++;r=u||(u=m(e)),n=b.bind(null,r,a,!1),i=b.bind(null,r,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",y(e,t.attrs),f(t,e),e}(e),n=w.bind(null,r,e),i=function(){g(r),r.href&&URL.revokeObjectURL(r.href)}):(r=m(e),n=x.bind(null,r),i=function(){g(r)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=d(t,e);return p(r,e),function(t){for(var n=[],i=0;i1)u=r;else{if(d>0){for(var f=0;fo&&(o=l),a=u,s=c}return o}function a(t,e,r,n,i){for(var a=0,s=r.length;a=o&&t<=a||!a)return{circleRadius:r[n].circleRadius||e.circleRadius||R,circleColor:r[n].circleColor||e.circleColor||D,circleStrokeWidth:r[n].circleStrokeWidth||e.circleStrokeWidth||B,circleStrokeColor:r[n].circleStrokeColor||e.circleStrokeColor||N,countTextColor:r[n].countTextColor||e.countTextColor||F,countTextSize:r[n].countTextSize||e.countTextSize||j}}return{circleRadius:e.circleRadius||R,circleColor:e.circleColor||D,circleStrokeWidth:e.circleStrokeWidth||B,circleStrokeColor:e.circleStrokeColor||N,countTextColor:e.countTextColor||F,countTextSize:e.countTextSize||j}}(r,e);return new S.c({image:new M.a({radius:n.circleRadius,stroke:new I.a({color:n.circleStrokeColor,width:n.circleStrokeWidth}),fill:new E.a({color:n.circleColor})}),text:new O({text:r+"",fill:new E.a({color:n.countTextColor}),font:n.countTextSize+"px sans-serif"})})}function H(t,e,r,n){var i=t.getGeometry().getType();if(e.icons&&"regionLayer"!==e.layerType)return new S.c({image:Q(t,e)});var o="",a=e.defaultStyles||{};switch(r=r||{},i){case"Point":o=W(t,n?{}:a,r,n);break;case"LineString":case"MultiLineString":o=Y(t,n?{}:a,r,n);break;case"MultiPoint":o=W(t,n?{}:a,r,n);break;case"MultiPolygon":case"Polygon":case"GeometryCollection":case"Circle":o=X(t,n?{}:a,r,n)}return o}var V=!0;function Q(t,e){var r="",n=1,i=t.values_;e.icons&&e.icons.length>0&&(e.icons[0].filter?e.icons.forEach((function(t){t.filter&&(t.filter.forEach((function(t){!function t(e,r){if(e.filter){if(!r[e.key])return void(V=!1);for(var n=0;n-1&&(n=t.iconName)}));var i=y.a.spriteJson[n]?y.a.spriteJson[n]:y.a.spriteJson["point-11"];return new L.a({offset:[i.x,i.y],opacity:1,rotateWithView:!0,rotation:0,scale:1,size:[i.width,i.height],crossOrigin:"anonymous",src:y.a.spriteUrl})}function W(t,e,r,n){var i,o,a,s;if(n){i=r["circle-radius"]||t.get("circle-radius")||e["circle-radius"]||3,o=r["circle-color"]||t.get("circle-color")||e["circle-color"]||"rgba(210,12,12,1)",a=r["circle-stroke-color"]||t.get("circle-stroke-color")||e["circle-stroke-color"]||o,s=r["circle-stroke-width"]||t.get("circle-stroke-width")||e["circle-stroke-width"]||0;var u={};i&&(u.radius=i),o&&(u.fill=new E.a({color:o}));var c={};return a&&(c.color=a),s&&(c.width=s),u.stroke=new I.a(c),new S.c(Object.assign(n,{image:new M.a(u)}))}return i=r["circle-radius"]||t.get("circle-radius")||e["circle-radius"]||z.circleRadius,o=r["circle-color"]||t.get("circle-color")||e["circle-color"]||z.circleColor,a=r["circle-stroke-color"]||t.get("circle-stroke-color")||e["circle-stroke-color"]||z.circleColor,s=r["circle-stroke-width"]||t.get("circle-stroke-width")||e["circle-stroke-width"]||z.circleStrokeWidth,new S.c({image:new M.a({radius:i,fill:new E.a({color:o}),stroke:new I.a({color:a,width:s})})})}function Y(t,e,r,n){var i,o,a,s;if(n){i=r["line-color"]||t.get("line-color")||e["line-color"]||"rgba(210,12,12,1)",o=r["line-dasharray"]||t.get("line-dasharray")||e["line-dasharray"],a=r["line-cap"]||t.get("line-cap")||e["line-cap"],s=r["line-width"]||t.get("line-width")||e["line-width"]||1;var u={};i&&(u.fill=new E.a({color:i}));var c={lineJoin:"round"};return i&&(c.color=i),s&&(c.width=s),o&&(c.lineDash=o),a&&(c.lineCap="round"),u.stroke=new I.a(c),new S.c(Object.assign(n,u))}return i=r["line-color"]||t.get("line-color")||e["line-color"]||z.lineColor,o=r["line-dasharray"]||t.get("line-dasharray")||e["line-dasharray"]||z.lineDasharray,a=r["line-cap"]||t.get("line-cap")||e["line-cap"]||z.lineCap,s=r["line-width"]||t.get("line-width")||e["line-width"]||z.lineWidth,new S.c({fill:new E.a({color:i}),stroke:new I.a({color:i,width:s,lineDash:o,lineJoin:"round",lineCap:a})})}function X(t,e,r,n){var i,o,a;if(n){i=r["fill-color"]||t.get("fill-color")||e["fill-color"],o=r["fill-outline-color"]||t.get("fill-outline-color")||e["fill-outline-color"],a=r["line-width"]||t.get("line-width")||e["line-width"];var s={};i&&(s.fill=new E.a({color:i}));var u={};return o&&(u.color=o),a&&(u.width=a),new S.c(Object.assign(n,s))}return i=r["fill-color"]||t.get("fill-color")||e["fill-color"]||z.fillColor,o=r["fill-outline-color"]||t.get("fill-outline-color")||e["fill-outline-color"]||z.fillOutlineColor,a=r["line-width"]||t.get("line-width")||e["line-width"]||z.lineWidth,new S.c({fill:new E.a({color:i}),stroke:new I.a({color:o,width:a})})}function Z(t,e,r){return"iconText"===r||"iconTextVector"===r?function(t,e,r){var n="iconText"===r?"properties_":"values_";if(!(t[n]&&t[n].aggsCount&&t[n].aggsCount>1)){var i=null;return i=e.iconTextStyle?new O({offsetX:e.iconTextStyle.textOffset&&e.iconTextStyle.textOffset[0]||0,offsetY:e.iconTextStyle.textOffset&&e.iconTextStyle.textOffset[1]||20,font:(e.iconTextStyle.textSize||12)+"px sans-serif",placement:"point",textAlign:"center",text:t[n][e.showText],backgroundFill:new E.a({color:e.iconTextStyle.iconColor||"#1569E0"}),padding:e.iconTextStyle.iconTextFitPadding||[0,6,0,6],fill:new E.a({color:e.iconTextStyle.textColor||"#fff"})}):new O({offsetX:0,offsetY:20,font:"12px sans-serif",placement:"point",textAlign:"center",text:t[n][e.showText]}),new S.c({text:i})}}(t,e,r):"geometry"===e.layerType||"regionLayer"===e.layerType?H(t,e):"mixedLayer"===e.layerType?U(t,e):G(t,e)}var K=r(201),J=r(25),$=r(20),tt=r(86),et=r(85),rt=function(t){function e(e,r,n){if(t.call(this),void 0!==n&&void 0===r)this.setFlatCoordinates(n,e);else{var i=r||0;this.setCenterAndRadius(e,i,n)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,r,n){var i=this.flatCoordinates,o=t-i[0],a=e-i[1],s=o*o+a*a;if(s=r[0]||(t[1]<=r[1]&&t[3]>=r[1]||Object(J.q)(t,this.intersectsCoordinate,this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+r;for(var i=1;i=this.transition_?1:Object(ft.a)(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(gt.a),vt=r(100),At=r(35),_t=r(265),bt=r(64),xt=function(t){function e(r,n,i,o,a,s,u,c,l,h,p,d,f,g,m){if(t.call(this,r,n,{transition:0}),this.context_={},this.loader_,this.replayState_={},this.sourceTiles_=h,this.tileKeys=[],this.extent=null,this.sourceRevision_=i,this.wrappedTileCoord=s,this.loadListenerKeys_=[],this.sourceTileListenerKeys_=[],s){var y=this.extent=l.getTileCoordExtent(s),v=l.getResolution(m),A=c.getZForResolution(v),_=m!=r[0],b=0;if(c.forEachTileCoord(y,A,function(t){var e=Object(J.v)(y,c.getTileCoordExtent(t)),r=c.getExtent();if(r&&(e=Object(J.v)(e,r,e)),Object(J.y)(e)/v>=.5&&Object(J.u)(e)/v>=.5){++b;var n=t.toString(),i=h[n];if(!i&&!_){var s=u(t,p,d);i=h[n]=new f(t,null==s?ht:st,null==s?"":s,o,a),this.sourceTileListenerKeys_.push(Object(At.a)(i,mt.a.CHANGE,g))}!i||_&&i.getState()!=ct||(i.consumers++,this.tileKeys.push(n))}}.bind(this)),_&&b==this.tileKeys.length&&this.finishLoading_(),m<=r[0]&&this.state!=ct)for(;m>l.getMinZoom();){var x=new e(r,n,i,o,a,s,u,c,l,h,p,d,f,bt.c,--m);if(x.state==ct){this.interimTile=x;break}}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state=pt,this.changed(),this.interimTile&&this.interimTile.dispose();for(var e=0,r=this.tileKeys.length;e=0;--r){var n=this.getTile(this.tileKeys[r]).getState();n!=ct&&--t,n==ht&&++e}t==this.tileKeys.length?(this.loadListenerKeys_.forEach(At.e),this.loadListenerKeys_.length=0,this.setState(ct)):this.setState(e==this.tileKeys.length?ht:lt)},e}(yt);function wt(t,e){var r=Object(_t.a)(e,t.getFormat(),t.onLoad.bind(t),t.onError.bind(t));t.setLoader(r)}var Ct=[0,0,4096,4096],Et=function(t){function e(e,r,n,i,o,a){t.call(this,e,r,a),this.consumers=0,this.extent_=null,this.format_=i,this.features_=null,this.loader_,this.projection_=null,this.replayGroups_={},this.tileLoadFunction_=o,this.url_=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.features_=null,this.replayGroups_={},this.state=pt,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getExtent=function(){return this.extent_||Ct},e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.getKey=function(){return this.url_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getReplayGroup=function(t,e){return this.replayGroups_[Object(dt.c)(t)+","+e]},e.prototype.load=function(){this.state==st&&(this.setState(ut),this.tileLoadFunction_(this,this.url_),this.loader_(null,NaN,null))},e.prototype.onLoad=function(t,e,r){this.setProjection(e),this.setFeatures(t),this.setExtent(r)},e.prototype.onError=function(){this.setState(lt)},e.prototype.setExtent=function(t){this.extent_=t},e.prototype.setFeatures=function(t){this.features_=t,this.setState(ct)},e.prototype.setProjection=function(t){this.projection_=t},e.prototype.setReplayGroup=function(t,e,r){this.replayGroups_[Object(dt.c)(t)+","+e]=r},e.prototype.setLoader=function(t){this.loader_=t},e}(yt);function It(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}var Mt=r(48),St=r(39);function Tt(t,e,r,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=r,n):[t,e,r]}function Pt(t,e,r){return t+"/"+e+"/"+r}function Ot(t,e){var r=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,o=/\{-y\}/g;return function(a,s,u){return a?t.replace(r,a[0].toString()).replace(n,a[1].toString()).replace(i,(function(){return(-a[2]-1).toString()})).replace(o,(function(){var t=a[0],r=e.getFullTileRange(t);return Object(Mt.a)(r,55),(r.getHeight()+a[2]).toString()})):void 0}}function Lt(t,e){for(var r=t.length,n=new Array(r),i=0;ithis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},jt.prototype.getHeight=function(){return this.maxY-this.minY+1},jt.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},jt.prototype.getWidth=function(){return this.maxX-this.minX+1},jt.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};var Ut=jt,Gt=r(59),Ht=[0,0,0],Vt=function(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Object(Mt.a)(Object(Gt.d)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var r=0,n=this.resolutions_.length-1;r=this.minZoom;){if(o=2===this.zoomFactor_?zt(a=Math.floor(a/2),a,s=Math.floor(s/2),s,n):this.getTileRangeForExtentAndZ(u,c,n),e.call(r,c,o))return!0;--c}return!1},Vt.prototype.getExtent=function(){return this.extent_},Vt.prototype.getMaxZoom=function(){return this.maxZoom},Vt.prototype.getMinZoom=function(){return this.minZoom},Vt.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},Vt.prototype.getResolution=function(t){return this.resolutions_[t]},Vt.prototype.getResolutions=function(){return this.resolutions_},Vt.prototype.getTileCoordChildTileRange=function(t,e,r){if(t[0]r||r>e.getMaxZoom())return!1;var o,a=e.getExtent();return!(o=a?e.getTileRangeForExtentAndZ(a,r):e.getFullTileRange(r))||o.containsXY(n,i)}(t,n)?t:null},e.prototype.refresh=function(){this.tileCache.clear(),this.changed()},e.prototype.useTile=function(t,e,r,n){},e}(Bt.a),Zt=function(t){function e(e,r){t.call(this,e),this.tile=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Dt.a),Kt="tileloadstart",Jt="tileloadend",$t="tileloaderror",te=function(t){function e(e){var r=e.projection||"EPSG:3857",n=e.extent||Yt(r),i=e.tileGrid||function(t){var e=t||{},r=e.extent||Object(C.d)("EPSG:3857").getExtent(),n={extent:r,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:qt(r,e.maxZoom,e.tileSize)};return new Qt(n)}({extent:n,maxZoom:e.maxZoom||22,minZoom:e.minZoom,tileSize:e.tileSize||512});t.call(this,{attributions:e.attributions,cacheSize:void 0!==e.cacheSize?e.cacheSize:128,opaque:!1,projection:r,state:e.state,tileGrid:i,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:wt,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.format_=e.format?e.format:null,this.sourceTiles_={},this.overlaps_=null==e.overlaps||e.overlaps,this.tileClass=e.tileClass?e.tileClass:Et,this.tileGrids_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTiles_={}},e.prototype.getTile=function(t,e,r,n,i){var o=Pt(t,e,r);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,r],s=this.getTileCoordForTileUrlFunction(a,i),u=new xt(a,null!==s?st:ht,this.getRevision(),this.format_,this.tileLoadFunction,s,this.tileUrlFunction,this.tileGrid,this.getTileGridForProjection(i),this.sourceTiles_,n,i,this.tileClass,this.handleTileChange.bind(this),a[0]);return this.tileCache.set(o,u),u},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),r=this.tileGrids_[e];if(!r){var n=this.tileGrid;r=this.tileGrids_[e]=Wt(t,void 0,n?n.getTileSize(n.getMinZoom()):void 0)}return r},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,r){var n=It(this.getTileGridForProjection(r).getTileSize(t),this.tmpSize);return[Math.round(n[0]*e),Math.round(n[1]*e)]},e}(function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible}),this.generateTileUrlFunction_=!e.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,this.tileUrlFunction=e.tileUrlFunction?e.tileUrlFunction.bind(this):kt,this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),e.tileUrlFunction&&this.setTileUrlFunction(e.tileUrlFunction,this.key_),this.tileLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,r=t.target,n=Object(dt.c)(r),i=r.getState();i==ut?(this.tileLoadingKeys_[n]=!0,e=Kt):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=i==lt?$t:i==ct||i==pt?Jt:void 0),null!=e&&this.dispatchEvent(new Zt(e,r))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=this.urls=function(t){var e=[],r=/\{([a-z])-([a-z])\}/.exec(t);if(r){var n,i=r[1].charCodeAt(0),o=r[2].charCodeAt(0);for(n=i;n<=o;++n)e.push(t.replace(r[0],String.fromCharCode(n)));return e}if(r=r=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(r[2],10),s=parseInt(r[1],10);s<=a;s++)e.push(t.replace(r[0],s.toString()));return e}return e.push(t),e}(t);this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Lt(t,this.tileGrid),e):this.setKey(e)},e.prototype.useTile=function(t,e,r){var n=Pt(t,e,r);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Xt)),ee=r(471),re=r.n(ee),ne=r(163),ie=r(135),oe=r(51),ae=r(183),se=r(262),ue=r(197),ce=r(263),le=r(114),he=r(133),pe=r(136),de=r(151),fe=r(264),ge=r(180),me=r(147),ye=r(146),ve=r(162),Ae=Object(ve.b)(),_e=function(t,e,r,n,i){this.extent_,this.id_=i,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=n};_e.prototype.get=function(t){return this.properties_[t]},_e.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===$.a.POINT?Object(J.k)(this.flatCoordinates_):Object(J.m)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},_e.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=Object(J.s)(this.getExtent());this.flatInteriorPoints_=Object(ge.a)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},_e.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Object(fe.a)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Object(ge.b)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},_e.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Object(me.a)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},_e.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,n=0,i=r.length;n>3)?r.readString():2===t?r.readFloat():3===t?r.readDouble():4===t?r.readVarint64():5===t?r.readVarint():6===t?r.readSVarint():7===t?r.readBoolean():null;e.values.push(n)}}function Ce(t,e,r){if(1==t)e.id=r.readVarint();else if(2==t)for(var n=r.readVarint()+r.pos;r.pos>3}a--,1===o||2===o?(s+=t.readSVarint(),u+=t.readSVarint(),1===o&&c>l&&(n.push(c),l=c),r.push(s,u),c+=2):7===o?c>l&&(r.push(r[l],r[l+1]),c+=2):Object(Mt.a)(!1,59)}c>l&&(n.push(c),l=c)},e.prototype.createFeature_=function(t,e,r){var n,i=e.type;if(0===i)return null;var o=e.id,a=e.properties;a[this.layerName_]=e.layer.name;var s=[],u=[];this.readRawGeometry_(t,e,s,u);var c=function(t,e){var r;1===t?r=1===e?$.a.POINT:$.a.MULTI_POINT:2===t?r=1===e?$.a.LINE_STRING:$.a.MULTI_LINE_STRING:3===t&&(r=$.a.POLYGON);return r}(i,u.length);if(this.featureClass_===be)n=new this.featureClass_(c,s,u,a,o);else{var l;if(c==$.a.POLYGON){for(var h=[],p=0,d=0,f=0,g=u.length;f1?new ce.a(s,oe.a.XY,h):new he.a(s,oe.a.XY,u)}else l=c===$.a.POINT?new le.a(s,oe.a.XY):c===$.a.LINE_STRING?new ae.a(s,oe.a.XY):c===$.a.POLYGON?new he.a(s,oe.a.XY,u):c===$.a.MULTI_POINT?new ue.a(s,oe.a.XY):c===$.a.MULTI_LINE_STRING?new se.a(s,oe.a.XY,u):null;n=new(0,this.featureClass_),this.geometryName_&&n.setGeometryName(this.geometryName_);var y=Object(ne.b)(l,!1,this.adaptOptions(r));n.setGeometry(y),n.setId(o),n.setProperties(a)}return n},e.prototype.getLastExtent=function(){return this.extent_},e.prototype.getType=function(){return ie.a.ARRAY_BUFFER},e.prototype.readFeatures=function(t,e){var r=this.layers_,n=new re.a(t),i=n.readFields(xe,{}),o=[];for(var a in i)if(!r||-1!=r.indexOf(a)){for(var s=i[a],u=0,c=s.length;u=0;--n)e.remove(r[n])},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),n={feature:t,geometry:e,segment:[r,r]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),n=0,i=r.length;n=0;--g)this.insertVertex_.apply(this,n[g])}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var r=this.dragSegments_[e][0],n=r.geometry;if(n.getType()===$.a.CIRCLE){var i=n.getCenter(),o=r.featureSegments[0],a=r.featureSegments[1];o.segment[0]=o.segment[1]=i,a.segment[0]=a.segment[1]=i,this.rBush_.update(Object(J.k)(i),o),this.rBush_.update(n.getExtent(),a)}else this.rBush_.update(Object(J.b)(r.segment),r)}return this.modified_&&(this.dispatchEvent(new Qe(Ve,this.features_,t)),this.modified_=!1),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map)},e.prototype.handlePointerAtPixel_=function(t,e){var r=e.getCoordinateFromPixel(t),n=Object(J.c)(Object(J.k)(r),e.getView().getResolution()*this.pixelTolerance_),i=this.rBush_.getInExtent(n);if(i.length>0){i.sort((function(t,e){return We(r,t)-We(r,e)}));var o=i[0],a=o.segment,s=Ye(r,o),u=e.getPixelFromCoordinate(s),c=Object(it.c)(t,u);if(c<=this.pixelTolerance_){var l={};if(o.geometry.getType()===$.a.CIRCLE&&1===o.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(s);else{var h=e.getPixelFromCoordinate(a[0]),p=e.getPixelFromCoordinate(a[1]),d=Object(it.g)(u,h),f=Object(it.g)(u,p);c=Math.sqrt(Math.min(d,f)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(s=d>f?a[1]:a[0]),this.createOrUpdateVertexFeature_(s);for(var g=1,m=i.length;g=0;--i)c=(r=h[i])[0],l=Object(dt.c)(c.feature),c.depth&&(l+="-"+c.depth.join("-")),l in p||(p[l]={}),0===r[1]?(p[l].right=c,p[l].index=c.index):1==r[1]&&(p[l].left=c,p[l].index=c.index+1);for(l in p){switch(u=p[l].right,a=p[l].left,(s=(o=p[l].index)-1)<0&&(s=0),t=e=(n=(c=void 0!==a?a:u).geometry).getCoordinates(),d=!1,n.getType()){case $.a.MULTI_LINE_STRING:e[c.depth[0]].length>2&&(e[c.depth[0]].splice(o,1),d=!0);break;case $.a.LINE_STRING:e.length>2&&(e.splice(o,1),d=!0);break;case $.a.MULTI_POLYGON:t=t[c.depth[1]];case $.a.POLYGON:(t=t[c.depth[0]]).length>4&&(o==t.length-1&&(o=0),t.splice(o,1),d=!0,0===o&&(t.pop(),t.push(t[0]),s=t.length-1))}if(d){this.setGeometryCoordinates_(n,e);var f=[];if(void 0!==a&&(this.rBush_.remove(a),f.push(a.segment[0])),void 0!==u&&(this.rBush_.remove(u),f.push(u.segment[1])),void 0!==a&&void 0!==u){var g={depth:c.depth,feature:c.feature,geometry:c.geometry,index:s,segment:f};this.rBush_.insert(Object(J.b)(g.segment),g)}this.updateSegmentIndices_(n,o,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),h.length=0}}return d},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,r,n){this.rBush_.forEachInExtent(t.getExtent(),(function(i){i.geometry===t&&(void 0===r||void 0===i.depth||Object(Gt.b)(i.depth,r))&&i.index>e&&(i.index+=n)}))},e}(ze.b);function Ze(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ke(t){for(var e=1;e-1&&(s.aggsValue=JSON.parse(s.aggsValue)),i.push({aggsName:s.aggsName,aggsValue:s.aggsValue})),u.type="aggs",u.data=i);else 1!=s.aggsCount&&s.aggsName&&s.aggsValue?("string"==typeof s.aggsValue&&(s.aggsValue.indexOf("[")>-1?s.aggsValue=JSON.parse(s.aggsValue):s.aggsValue.indexOf(",")>-1&&(s.aggsValue=s.aggsValue.split(","))),i.push({aggsName:s.aggsName,aggsValue:s.aggsValue}),u.type="aggs",u.data=i):(u.type="details",u.clustered=!1,u.data=n.map((function(t){return t.properties})));e(t,u)}}else e(t)}))}},{key:"removeEvent",value:function(t){this.map&&m.b.off(this.map)(t,this.layerId)}},{key:"clearEvent",value:function(){m.b.clear(this.layerId)}},{key:"_addTimerDevice",value:function(t){this.dynamic&&(y.a.timerDevice=y.a.timerDevice||new K.a,this.timerDeviceId=v.a.createRandomId(16),(!this.timer||this.timer<15e3)&&(this.timer=15e3),y.a.timerDevice.add(this.timerDeviceId,this.timer,t))}},{key:"_removeTimerDevice",value:function(){this.timerDeviceId&&(y.a.timerDevice.remove(this.timerDeviceId),this.timerDeviceId=null)}},{key:"getChildLayerIds",value:function(){return m.a.getLayerIdsDepts(this.layerId)}},{key:"buildVectorSource",value:function(t){this.sources=new te({maxZoom:24,tileSize:256,format:new Ie({idProperty:this.vectorLayerName}),tileLoadFunction:function(t,e){t.setLoader((function(){var r="";if(y.a.config&&y.a.config.TOKEN){var n="".concat(y.a.config.TOKEN,"-").concat((new Date).getTime()).concat(Object(v.b)());r=btoa(n)}fetch(e,{headers:{Authorization:r}}).then((function(e){e.arrayBuffer().then((function(e){var r=t.getFormat();t.setProjection(r.readProjection(e));var n=r.readFeatures(e);t.setFeatures(n)}))}))}))},url:t})}},{key:"buildVectorLayer",value:function(){var t=this;this.layer=new De({declutter:!0,source:this.sources,style:function(e){return Z(e,t)}}),this.map.addLayer(this.layer),m.a.setIdDepts(this.layerId,this.layer.ol_uid),this.showText&&this.buildIconTextLayer()}},{key:"buildIconTextLayer",value:function(){var t=this;this.iconTextLayer=new De({declutter:!0,source:this.sources,style:function(e){return Z(e,t,"iconText")}}),this.map.addLayer(this.iconTextLayer)}},{key:"buildIconTextVectorLayer",value:function(){var t=this;this.iconTextLayer=new x.a({source:this.layerSource,style:function(e){return Z(e,t,"iconTextVector")}}),this.map.addLayer(this.iconTextLayer)}},{key:"setLayerEditable",value:function(t){if(this.opts&&!0===this.opts.dynamic)t.callback&&t.callback({status:20,error:"定时更新数据的动态图层无法进行编辑"});else{this.layerEditable=!0,t.callback&&t.callback({status:10,message:"图层".concat(t.layerId,"已进入编辑状态")});var e=this,r=new Xe({features:new Be.a(this.layerFeatures)});this.map.addInteraction(r),r.on("modifyend",(function(t,r){var n=t.target.dragSegments_[0][0].feature,i={type:"Feature",geometry:{type:"Point",coordinates:Object(C.g)(n.values_.geometry.flatCoordinates,"EPSG:".concat(y.a.config.EPSG),"EPSG:4326")},properties:n.values_},o=n.values_.id||n.values_.dataId;e.draggedFeatureList[o]=i}))}}}]),r}(g.a)},function(t,e,r){"use strict";function n(t){return Math.pow(t,3)}function i(t){return 1-n(1-t)}function o(t){return t}r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o}))},function(t,e,r){"use strict";var n=r(42),i=r(22);e.a=function(t,e,r){void 0===r&&(r={});var o=Object(n.b)(t),a=Object(n.b)(e),s=Object(i.degreesToRadians)(a[1]-o[1]),u=Object(i.degreesToRadians)(a[0]-o[0]),c=Object(i.degreesToRadians)(o[1]),l=Object(i.degreesToRadians)(a[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(c)*Math.cos(l);return Object(i.radiansToLength)(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),r.units)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.STACK_OVERFLOW=e.CIRCULAR_DEPENDENCY_IN_FACTORY=e.POST_CONSTRUCT_ERROR=e.MULTIPLE_POST_CONSTRUCT_METHODS=e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=e.ARGUMENTS_LENGTH_MISMATCH=e.INVALID_DECORATOR_OPERATION=e.INVALID_TO_SELF_VALUE=e.INVALID_FUNCTION_BINDING=e.INVALID_MIDDLEWARE_RETURN=e.NO_MORE_SNAPSHOTS_AVAILABLE=e.INVALID_BINDING_TYPE=e.NOT_IMPLEMENTED=e.CIRCULAR_DEPENDENCY=e.UNDEFINED_INJECT_ANNOTATION=e.MISSING_INJECT_ANNOTATION=e.MISSING_INJECTABLE_ANNOTATION=e.NOT_REGISTERED=e.CANNOT_UNBIND=e.AMBIGUOUS_MATCH=e.KEY_NOT_FOUND=e.NULL_ARGUMENT=e.DUPLICATED_METADATA=e.DUPLICATED_INJECTABLE_DECORATOR=void 0,e.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",e.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",e.NULL_ARGUMENT="NULL argument",e.KEY_NOT_FOUND="Key Not Found",e.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",e.CANNOT_UNBIND="Could not unbind serviceIdentifier:",e.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",e.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",e.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",e.UNDEFINED_INJECT_ANNOTATION=function(t){return"@inject called with undefined this could mean that the class "+t+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},e.CIRCULAR_DEPENDENCY="Circular dependency found:",e.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",e.INVALID_BINDING_TYPE="Invalid binding type:",e.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",e.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",e.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",e.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",e.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",e.ARGUMENTS_LENGTH_MISMATCH=function(){for(var t=[],e=0;e= than the number of constructor arguments of its base class."},e.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",e.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",e.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",e.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",e.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class",e.POST_CONSTRUCT_ERROR=function(){for(var t=[],e=0;e137.8347,r=t[1]<.8293||t[1]>55.8271||!1;return e||r},transformlng:function(t,e){var r=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return r+=2*(20*Math.sin(6*t*n)+20*Math.sin(2*t*n))/3,r+=2*(20*Math.sin(t*n)+40*Math.sin(t/3*n))/3,r+=2*(150*Math.sin(t/12*n)+300*Math.sin(t/30*n))/3},transformlat:function(t,e){var r=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return r+=2*(20*Math.sin(6*t*n)+20*Math.sin(2*t*n))/3,r+=2*(20*Math.sin(e*n)+40*Math.sin(e/3*n))/3,r+=2*(160*Math.sin(e/12*n)+320*Math.sin(e*n/30))/3},wgs84togcj02:function(t){if(!(t[0]<-180||t[0]>180||t[1]<-90||t[1]>90)){var e=t[0],r=t[1],a=this.transformlat(e-105,r-35),s=this.transformlng(e-105,r-35),u=r/180*n,c=Math.sin(u);c=1-o*c*c;var l=Math.sqrt(c);return a=180*a/(i*(1-o)/(c*l)*n),[e+(s=180*s/(i/l*Math.cos(u)*n)),r+a]}console.error("坐标格式不符合规范")},gcj02towgs84:function(t){if(!(t[0]<-180||t[0]>180||t[1]<-90||t[1]>90)){var e=t[0],r=t[1],a=this.transformlat(e-105,r-35),s=this.transformlng(e-105,r-35),u=r/180*n,c=Math.sin(u);c=1-o*c*c;var l=Math.sqrt(c);return a=180*a/(i*(1-o)/(c*l)*n),[2*e-(e+(s=180*s/(i/l*Math.cos(u)*n))),2*r-(r+a)]}console.error("坐标格式不符合规范")}}},function(t,e,r){"use strict";r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return p}));var n=r(3),i=r.n(n),o=r(4),a=r.n(o),s=r(2),u=function(){function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};i()(this,t),this.lng=void 0,this.lat=void 0,this.timestamp=void 0,this.properties=void 0,this.lng=e,this.lat=r,this.timestamp=n,this.properties=o}return a()(t,[{key:"toArray",value:function(){return[this.lng,this.lat]}},{key:"toGeometry",value:function(){return{type:"Point",coordinates:this.toArray()}}},{key:"toFeature",value:function(){return{type:"Feature",geometry:this.toGeometry(),properties:this.properties}}},{key:"getLng",value:function(){return this.lng}},{key:"setLng",value:function(t){return this.lng=t,this}},{key:"getLat",value:function(){return this.lat}},{key:"setLat",value:function(t){return this.lat=t,this}},{key:"getTimestamp",value:function(){return this.timestamp}},{key:"setTimestamp",value:function(t){return this.timestamp=t,this}},{key:"getProperty",value:function(t){return this.properties[t]}},{key:"setProperty",value:function(t,e){return this.properties[t]=e,this}},{key:"getProperties",value:function(){return this.properties}},{key:"setProperties",value:function(t){return this.properties=t,this}},{key:"extend",value:function(t){return Object(s.extend)(this.properties,t),this}},{key:"clone",value:function(){return new t(this.lng,this.lat,this.timestamp,Object(s.extend)({},this.properties))}}]),t}(),c=function(){function t(e,r){i()(this,t),this.prev=void 0,this.next=void 0,this.distance=void 0,this.direction=void 0,this.duration=void 0,this.prev=e,this.next=r,this.distance=null,this.direction=null,this.duration=null}return a()(t,[{key:"toArray",value:function(){return[this.prev.toArray(),this.next.toArray()]}},{key:"toGeometry",value:function(){return{type:"LineString",coordinates:this.toArray()}}},{key:"toFeature",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:"Feature",geometry:this.toGeometry(),properties:Object(s.isTrue)(t)?this.prev.getProperties():this.next.getProperties()}}},{key:"getPrev",value:function(){return this.prev}},{key:"getNext",value:function(){return this.next}},{key:"getDuration",value:function(){return Object(s.isUndef)(this.duration)&&(this.duration=this.next.getTimestamp()-this.prev.getTimestamp()),this.duration}},{key:"getDirection",value:function(){return Object(s.isUndef)(this.direction)&&(this.direction=s.GeometryUtil.bearing(this.prev.toArray(),this.next.toArray())),this.direction}},{key:"getDistance",value:function(){return Object(s.isUndef)(this.distance)&&(this.distance=s.GeometryUtil.distance(this.prev.toArray(),this.next.toArray(),{units:"kilometers"})),this.distance}},{key:"extend",value:function(t){this.next.extend(t)}},{key:"breakUpNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t<=0)return this.prev;if(t>=this.getDuration())return this.next;var r=t/this.getDuration(),n=this.getDistance()*r,i=this.toFeature(),o=s.GeometryUtil.along(i,n,{units:"kilometers"}),a=o.geometry.coordinates;return new u(a[0],a[1],this.prev.getTimestamp()+t,Object(s.isTrue)(e)?this.next.getProperties():this.prev.getProperties())}}]),t}();function l(t){return"NODE INVALID: ".concat(t)}function h(t,e){return t.getTimestamp()>=e.getTimestamp()?(Object(s.warn)(l("TIMESTAMP IS SOONER THAN LAST NODE!")),!1):0===e.getLng()?(Object(s.warn)(l("LNG IS ZERO!")),!1):0===e.getLng()?(Object(s.warn)(l("LAT IS ZERO!")),!1):e.getLng()!==t.getLng()||e.getLat()!==t.getLat()||(Object(s.warn)(l("LNGLAT IS SAME!")),!1)}var p=function(){function t(e){i()(this,t),this.queue=void 0,this.infinited=void 0,this.prev=void 0,this.prevIsHead=void 0,this.pointer=void 0,this.hasChanged=void 0,this.queue=new s.Queue,this.infinited=!0===e,this.hasChanged=!0}return a()(t,[{key:"push",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Object(s.isUndef)(this.prev))return this.prev=t,void(this.prevIsHead=!0);if(!isNaN(t.getTimestamp())){var r=this.prevIsHead;if(Object(s.isTrue)(this.prevIsHead)&&h(this.prev,t)&&(e&&this.prev.setTimestamp(t.getTimestamp()-5e3),this.prevIsHead=!1),h(this.prev,t)){var n=Object(s.extend)({},this.prev.getProperties());t.setProperties(Object(s.extend)(n,t.getProperties()));var i=new c(this.prev,t);if(this.queue.enqueue(i),this.prev=t,!1===this.infinited&&this.queue.size()>500){var o=this.queue.dequeue();Object(s.isDef)(this.pointer)&&this.pointer.segment===o&&0!==this.queue.size()&&(this.pointer={segment:this.queue.peek(),passed:0,currentNode:this.queue.peek().getPrev()})}Object(s.isTrue)(r)&&(this.pointer={segment:i,passed:0,currentNode:this.prev})}}}},{key:"mergeProperties",value:function(t){Object(s.isDef)(this.prev)&&this.prev.extend(t)}},{key:"removeFirst",value:function(){this.queue.dequeue()}},{key:"size",value:function(){return this.queue.size()}},{key:"isEmpty",value:function(){return 0===this.size()}},{key:"forEach",value:function(t){var e=this,r=!0;this.queue.forEach((function(n,i,o){var a=e.pointer&&e.pointer.segment;a===n?(0===e.pointer.passed?t(n,!1):e.pointer.passed===e.pointer.segment.getDuration()?t(n,!0):(t(new c(a.getPrev(),e.pointer.currentNode),!0),t(new c(e.pointer.currentNode,a.getNext()),!1)),r=!1):Object(s.isFalse)(r)?t(n,!1):t(n,!0)}))}},{key:"getLastSegmentDuration",value:function(){return Object(s.isDef)(this.queue.last())?this.queue.last().getDuration():0}},{key:"getLastDuration",value:function(){if(Object(s.isUndef)(this.pointer))return 0;var t=this.queue.index(this.pointer.segment);if(t>-1){for(var e=0,r=t,n=this.queue.size();r500;)this.queue.dequeue()}},{key:"assignBefore",value:function(t){this.queue.assignBefore(t.queue),this.format()}},{key:"clone",value:function(){var e=new t;return e.queue=this.queue.clone(),e.prev=this.prev,e.prevIsHead=this.prevIsHead,e.pointer=this.pointer,e}}]),t}()},function(t,e,r){"use strict";r.d(e,"b",(function(){return A})),r.d(e,"a",(function(){return b}));var n=r(3),i=r.n(n),o=r(4),a=r.n(o),s=r(470),u=r.n(s),c=r(93),l=r.n(c),h=r(144),p=r.n(h),d=r(167),f=r.n(d),g=r(168),m=r.n(g),y=r(165),v=["click","dblclick","mousedown","mouseup","contextmenu"],A=["mouseenter","mouseover","mousemove","mouseout","mouseleave"],_=["dragstart","dragging","dragend"],b=function(){function t(){i()(this,t)}return a()(t,null,[{key:"on",value:function(e,r,n){if(-1!==m()(v,e))y.a.on(e,r,n,{capture:!0});else if(-1!==m()(A,e))t.registerDirectlyEvent(e,r,n);else{if(-1===m()(_,e))throw new Error("Do not support this event type ".concat(e," for overlay"));var i=document.querySelectorAll(r);f()(i,(function(r){t.registerDragEvent(r,e,n)}))}t.registeredEventTypes[r]=t.registeredEventTypes[r]||new Set,t.registeredEventTypes[r].add(e)}},{key:"clear",value:function(e){var r=t.registeredEventTypes[e]||new Set;0!==r.size&&r.forEach((function(r){return t.off(r,e)}))}},{key:"off",value:function(e,r){if(-1!==m()(v,e))y.a.off(e,r,{capture:!0});else if(-1!==m()(A,e))t.unRegisterDirectlyEvent(e,r);else{if(-1===m()(_,e))throw new Error('Overlay event system do not support "'.concat(e,'" event, \n please use one of these : [').concat(v.concat(A,_).toString(),"]"));var n=document.querySelectorAll(r);f()(n,(function(r){t.unRegisterDragEvent(r,e)}))}}},{key:"registerDirectlyEvent",value:function(e,r,n){var i=document.querySelectorAll(r);f()(i,(function(r){t._on(r,e,n)}))}},{key:"unRegisterDirectlyEvent",value:function(e,r){var n=document.querySelectorAll(r);f()(n,(function(r){t._off(r,e)}))}},{key:"registerDragEvent",value:function(e,r,n){var i=t.dragEventList.get(e)||{};i[r]=n,t.dragEventList.set(e,i)}},{key:"unRegisterDragEvent",value:function(e,r){var n=t.dragEventList.get(e);p()(n)||(delete n[r],l()(n)&&t.dragEventList.delete(e))}},{key:"fireDragEvent",value:function(e,r,n){var i=t.dragEventList.get(r);if(!p()(i)){var o=i[n];if(!p()(o)){var a=Object.assign({},e,{type:n});o.call(r,a)}}}},{key:"_on",value:function(e,r,n){var i=t.directlyEventList.get(e)||{};i[r]=i[r]||[],-1===m()(i[r],n)&&(i[r].push(n),e.addEventListener(r,n),t.directlyEventList.set(e,i))}},{key:"_off",value:function(e,r,n){var i=t.directlyEventList.get(e)||{};if(!l()(i)&&(i[r]=i[r]||[],0!==i[r].length)){if(p()(n)){var o=i[r];f()(o,(function(t){return e.removeEventListener(r,t)})),i[r]=[]}else e.removeEventListener(r,n),u()(i[r],(function(t){return t===n}));t.directlyEventList.set(e,i)}}}]),t}();b.directlyEventList=new WeakMap,b.dragEventList=new WeakMap,b.registeredEventTypes={}},function(t,e,r){var n=r(10),i=r(280),o=r(594),a=r(595);function s(e){var r="function"==typeof Map?new Map:void 0;return t.exports=s=function(t){if(null===t||!o(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i(e,t)},t.exports.default=t.exports,t.exports.__esModule=!0,s(e)}t.exports=s,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=void 0!==i?i:[],a=0,s=e;s=0?this.order.splice(r,0,e):this.order.push(t.layerId)}else this.order.push(t.layerId)}}},{key:"remove",value:function(t){if(this.layerObj[t]){delete this.layerObj[t];var e=this.order.indexOf(t);e>=0&&this.order.splice(e,1)}}},{key:"clear",value:function(){this.removeAllLayer(),this.layerObj={},this.order=[]}},{key:"removeAllLayer",value:function(){for(var t in this.layerObj)this.layerObj.hasOwnProperty(t)&&this.layerObj[t].removeLayer()}},{key:"get",value:function(t){return this.layerObj[t]}},{key:"getFirst",value:function(){var t=this.order[0];return t?this.layerObj[t]:null}}]),t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(70),i=r(73),o=r(53),a=function(t){function e(e){var r=e||{};t.call(this,r),r.handleDownEvent&&(this.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(this.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(this.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(this.handleUpEvent=r.handleUpEvent),r.stopDown&&(this.stopDown=r.stopDown),this.handlingDownUpSequence=!1,this.trackedPointers_={},this.targetPointers=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.pointerEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==n.a.POINTERDRAG)this.handleDragEvent(t);else if(t.type==n.a.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==n.a.POINTERDOWN){var i=this.handleDownEvent(t);i&&t.preventDefault(),this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==n.a.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===n.a.POINTERDOWN||e===n.a.POINTERDRAG||e===n.a.POINTERUP}(t)){var e=t.pointerEvent,r=e.pointerId.toString();t.type==n.a.POINTERUP?delete this.trackedPointers_[r]:(t.type==n.a.POINTERDOWN||r in this.trackedPointers_)&&(this.trackedPointers_[r]=e),this.targetPointers=Object(o.c)(this.trackedPointers_)}},e}(i.a);function s(t){for(var e=t.length,r=0,n=0,i=0;io&&(c-s)*(o-u)-(i-s)*(l-u)>0&&a++:l<=o&&(c-s)*(o-u)-(i-s)*(l-u)<0&&a--,s=c,u=l}return 0!==a}function a(t,e,r,n,i,a){if(0===r.length)return!1;if(!o(t,e,r[0],n,i,a))return!1;for(var s=1,u=r.length;se.x?1:this.ye.y?1:0},C.prototype.clone=function(){},C.prototype.copy=function(){return new C(this)},C.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},C.prototype.distance3D=function(t){var e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return Math.sqrt(e*e+r*r+n*n)},C.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},C.prototype.hashCode=function(){var t=17;return 37*(t=37*t+C.hashCode(this.x))+C.hashCode(this.y)},C.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},C.prototype.interfaces_=function(){return[b,x,e]},C.prototype.getClass=function(){return C},C.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=A.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},E.DimensionalComparator.get=function(){return I},E.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},E.NULL_ORDINATE.get=function(){return A.NaN},E.X.get=function(){return 0},E.Y.get=function(){return 1},E.Z.get=function(){return 2},Object.defineProperties(C,E);var I=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 v("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};I.prototype.compare=function(t,e){var r=t,n=e,i=I.compare(r.x,n.x);if(0!==i)return i;var o=I.compare(r.y,n.y);return 0!==o?o:this._dimensionsToTest<=2?0:I.compare(r.z,n.z)},I.prototype.interfaces_=function(){return[w]},I.prototype.getClass=function(){return I},I.compare=function(t,e){return te?1:A.isNaN(t)?A.isNaN(e)?0:-1:A.isNaN(e)?1:0};var M=function(){};M.prototype.create=function(){},M.prototype.interfaces_=function(){return[]},M.prototype.getClass=function(){return M};var S=function(){},T={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};S.prototype.interfaces_=function(){return[]},S.prototype.getClass=function(){return S},S.toLocationSymbol=function(t){switch(t){case S.EXTERIOR:return"e";case S.BOUNDARY:return"b";case S.INTERIOR:return"i";case S.NONE:return"-"}throw new v("Unknown location value: "+t)},T.INTERIOR.get=function(){return 0},T.BOUNDARY.get=function(){return 1},T.EXTERIOR.get=function(){return 2},T.NONE.get=function(){return-1},Object.defineProperties(S,T);var P=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},O=function(){},L={LOG_10:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.log10=function(t){var e=Math.log(t);return A.isInfinite(e)||A.isNaN(e)?e:e/O.LOG_10},O.min=function(t,e,r,n){var i=t;return er?r:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var n=arguments[0],i=arguments[1],o=arguments[2];return no?o:n}},O.wrap=function(t,e){return t<0?e- -t%e:t%e},O.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],r=arguments[2],n=t;return e>n&&(n=e),r>n&&(n=r),n}if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],u=i;return o>u&&(u=o),a>u&&(u=a),s>u&&(u=s),u}},O.average=function(t,e){return(t+e)/2},L.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(O,L);var k=function(t){this.str=t};k.prototype.append=function(t){this.str+=t},k.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},k.prototype.toString=function(t){return this.str};var R=function(t){this.value=t};R.prototype.intValue=function(){return this.value},R.prototype.compareTo=function(t){return this.valuet?1:0},R.isNaN=function(t){return Number.isNaN(t)};var D=function(){};D.isWhitespace=function(t){return t<=32&&t>=0||127===t},D.toUpperCase=function(t){return t.toUpperCase()};var B=function t(){if(this._hi=0,this._lo=0,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 r=arguments[0];this.init(r)}else if("string"==typeof arguments[0]){var n=arguments[0];t.call(this,t.parse(n))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},N={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}};B.prototype.le=function(t){return(this._hi9?(l=!0,h="9"):h="0"+c,a.append(h),r=r.subtract(B.valueOf(c)).multiply(B.TEN),l&&r.selfAdd(B.TEN);var p=!0,d=B.magnitude(r._hi);if(d<0&&Math.abs(d)>=s-u&&(p=!1),!p)break}return e[0]=n,a.toString()},B.prototype.sqr=function(){return this.multiply(this)},B.prototype.doubleValue=function(){return this._hi+this._lo},B.prototype.subtract=function(){if(arguments[0]instanceof B){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},B.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},B.prototype.isZero=function(){return 0===this._hi&&0===this._lo},B.prototype.selfSubtract=function(){if(arguments[0]instanceof B){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)}},B.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},B.prototype.min=function(t){return this.le(t)?this:t},B.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof B){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 r=arguments[0],n=arguments[1],i=null,o=null,a=null,s=null,u=null,c=null,l=null,h=null;return u=this._hi/r,h=(i=(c=B.SPLIT*u)-(i=c-u))*(a=(h=B.SPLIT*r)-(a=h-r))-(l=u*r)+i*(s=r-a)+(o=u-i)*a+o*s,h=u+(c=(this._hi-l-h+this._lo-u*n)/r),this._hi=h,this._lo=u-h+c,this}},B.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},B.prototype.divide=function(){if(arguments[0]instanceof B){var t=arguments[0],e=null,r=null,n=null,i=null,o=null,a=null,s=null,u=null;return r=(o=this._hi/t._hi)-(e=(a=B.SPLIT*o)-(e=a-o)),u=e*(n=(u=B.SPLIT*t._hi)-(n=u-t._hi))-(s=o*t._hi)+e*(i=t._hi-n)+r*n+r*i,a=(this._hi-s-u+this._lo-o*t._lo)/t._hi,new B(u=o+a,o-u+a)}if("number"==typeof arguments[0]){var c=arguments[0];return A.isNaN(c)?B.createNaN():B.copy(this).selfDivide(c,0)}},B.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},B.prototype.pow=function(t){if(0===t)return B.valueOf(1);var e=new B(this),r=B.valueOf(1),n=Math.abs(t);if(n>1)for(;n>0;)n%2==1&&r.selfMultiply(e),(n/=2)>0&&(e=e.sqr());else r=e;return t<0?r.reciprocal():r},B.prototype.ceil=function(){if(this.isNaN())return B.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new B(t,e)},B.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0},B.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},B.prototype.setValue=function(){if(arguments[0]instanceof B){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},B.prototype.max=function(t){return this.ge(t)?this:t},B.prototype.sqrt=function(){if(this.isZero())return B.valueOf(0);if(this.isNegative())return B.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,r=B.valueOf(e),n=this.subtract(r.sqr())._hi*(.5*t);return r.add(n)},B.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],r=null,n=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+e)-(a=i-this._hi),n=(s=(o=e-a+(this._hi-o))+this._lo)+(i-(r=i+s)),this._hi=r+n,this._lo=n+(r-this._hi),this}}else if(2===arguments.length){var u=arguments[0],c=arguments[1],l=null,h=null,p=null,d=null,f=null,g=null,m=null;d=this._hi+u,h=this._lo+c,f=d-(g=d-this._hi),p=h-(m=h-this._lo);var y=(l=d+(g=(f=u-g+(this._hi-f))+h))+(g=(p=c-m+(this._lo-p))+(g+(d-l))),v=g+(l-y);return this._hi=y,this._lo=v,this}},B.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof B){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 r=arguments[0],n=arguments[1],i=null,o=null,a=null,s=null,u=null,c=null;i=(u=B.SPLIT*this._hi)-this._hi,c=B.SPLIT*r,i=u-i,o=this._hi-i,a=c-r;var l=(u=this._hi*r)+(c=i*(a=c-a)-u+i*(s=r-a)+o*a+o*s+(this._hi*n+this._lo*r)),h=c+(i=u-l);return this._hi=l,this._lo=h,this}},B.prototype.selfSqr=function(){return this.selfMultiply(this)},B.prototype.floor=function(){if(this.isNaN())return B.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new B(t,e)},B.prototype.negate=function(){return this.isNaN()?this:new B(-this._hi,-this._lo)},B.prototype.clone=function(){},B.prototype.multiply=function(){if(arguments[0]instanceof B){var t=arguments[0];return t.isNaN()?B.createNaN():B.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return A.isNaN(e)?B.createNaN():B.copy(this).selfMultiply(e,0)}},B.prototype.isNaN=function(){return A.isNaN(this._hi)},B.prototype.intValue=function(){return Math.trunc(this._hi)},B.prototype.toString=function(){var t=B.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},B.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!0,e),n=e[0]+1,i=r;if("."===r.charAt(0))i="0"+r;else if(n<0)i="0."+B.stringOfChar("0",-n)+r;else if(-1===r.indexOf(".")){var o=n-r.length;i=r+B.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},B.prototype.reciprocal=function(){var t,e,r,n,i=null,o=null,a=null,s=null;t=(r=1/this._hi)-(i=(a=B.SPLIT*r)-(i=a-r)),o=(s=B.SPLIT*this._hi)-this._hi;var u=r+(a=(1-(n=r*this._hi)-(s=i*(o=s-o)-n+i*(e=this._hi-o)+t*o+t*e)-r*this._lo)/this._hi);return new B(u,r-u+a)},B.prototype.toSciNotation=function(){if(this.isZero())return B.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!1,e),n=B.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===r.charAt(0))throw new Error("Found leading zero: "+r);var i="";r.length>1&&(i=r.substring(1));var o=r.charAt(0)+"."+i;return this.isNegative()?"-"+o+n:o+n},B.prototype.abs=function(){return this.isNaN()?B.NaN:this.isNegative()?this.negate():new B(this)},B.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},B.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo},B.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},B.prototype.trunc=function(){return this.isNaN()?B.NaN:this.isPositive()?this.floor():this.ceil()},B.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},B.prototype.interfaces_=function(){return[e,b,x]},B.prototype.getClass=function(){return B},B.sqr=function(t){return B.valueOf(t).selfMultiply(t)},B.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return B.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new B(e)}},B.sqrt=function(t){return B.valueOf(t).sqrt()},B.parse=function(t){for(var e=0,r=t.length;D.isWhitespace(t.charAt(e));)e++;var n=!1;if(e=r);){var c=t.charAt(e);if(e++,D.isDigit(c)){var l=c-"0";o.selfMultiply(B.TEN),o.selfAdd(l),a++}else{if("."!==c){if("e"===c||"E"===c){var h=t.substring(e);try{u=R.parseInt(h)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+h+" in string "+t):e}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}s=a}}var p=o,d=a-s-u;if(0===d)p=o;else if(d>0){var f=B.TEN.pow(d);p=o.divide(f)}else if(d<0){var g=B.TEN.pow(-d);p=o.multiply(g)}return n?p.negate():p},B.createNaN=function(){return new B(A.NaN,A.NaN)},B.copy=function(t){return new B(t)},B.magnitude=function(t){var e=Math.abs(t),r=Math.log(e)/Math.log(10),n=Math.trunc(Math.floor(r));return 10*Math.pow(10,n)<=e&&(n+=1),n},B.stringOfChar=function(t,e){for(var r=new k,n=0;n0){if(o<=0)return F.signum(a);n=i+o}else{if(!(i<0))return F.signum(a);if(o>=0)return F.signum(a);n=-i-o}var s=F.DP_SAFE_EPSILON*n;return a>=s||-a>=s?F.signum(a):2},F.signum=function(t){return t>0?1:t<0?-1:0},j.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(F,j);var z=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},z.prototype.setOrdinate=function(t,e,r){},z.prototype.size=function(){},z.prototype.getOrdinate=function(t,e){},z.prototype.getCoordinate=function(){},z.prototype.getCoordinateCopy=function(t){},z.prototype.getDimension=function(){},z.prototype.getX=function(t){},z.prototype.clone=function(){},z.prototype.expandEnvelope=function(t){},z.prototype.copy=function(){},z.prototype.getY=function(t){},z.prototype.toCoordinateArray=function(){},z.prototype.interfaces_=function(){return[x]},z.prototype.getClass=function(){return z},Object.defineProperties(z,U);var G=function(){},H=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(G),V=function(){};V.arraycopy=function(t,e,r,n,i){for(var o=0,a=e;at._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,n=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];return!this.isNull()&&r>=this._minx&&r<=this._maxx&&n>=this._miny&&n<=this._maxy}},q.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof q){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||rthis._maxy||nthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=n,this._maxy=n):(rthis._maxx&&(this._maxx=r),nthis._maxy&&(this._maxy=n))}},q.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},q.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},q.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},q.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},q.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},q.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},q.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},q.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof q){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof C){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var r=arguments[0],n=arguments[1];return this.covers(r,n)}},q.prototype.centre=function(){return this.isNull()?null:new C((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},q.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof q){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 r=arguments[0],n=arguments[1];this.init(r.x,n.x,r.y,n.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];it._maxx&&(e=this._minx-t._maxx);var r=0;return this._maxyt._maxy&&(r=this._miny-t._maxy),0===e?r:0===r?e:Math.sqrt(e*e+r*r)},q.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+C.hashCode(this._minx))+C.hashCode(this._maxx))+C.hashCode(this._miny))+C.hashCode(this._maxy)},q.prototype.interfaces_=function(){return[b,e]},q.prototype.getClass=function(){return q},q.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],r=arguments[2];return r.x>=(t.xe.x?t.x:e.x)&&r.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var n=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),u=Math.max(o.x,a.x),c=Math.min(n.x,i.x),l=Math.max(n.x,i.x);return!(c>u||lu||lthis.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},rt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},rt.prototype.setPrecisionModel=function(t){this._precisionModel=t},rt.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;ei?n:i;else{var a=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);0!==(o=n>i?a:s)||t.equals(e)||(o=Math.max(a,s))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},rt.nonRobustComputeEdgeDistance=function(t,e,r){var n=t.x-e.x,i=t.y-e.y,o=Math.sqrt(n*n+i*i);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},nt.DONT_INTERSECT.get=function(){return 0},nt.DO_INTERSECT.get=function(){return 1},nt.COLLINEAR.get=function(){return 2},nt.NO_INTERSECTION.get=function(){return 0},nt.POINT_INTERSECTION.get=function(){return 1},nt.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(rt,nt);var it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new q(this._inputLines[0][0],this._inputLines[0][1]),r=new q(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&r.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],r=arguments[1],n=arguments[2];if(this._isProper=!1,q.intersects(r,n,e)&&0===st.orientationIndex(r,n,e)&&0===st.orientationIndex(n,r,e))return this._isProper=!0,(e.equals(r)||e.equals(n))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,r,n,i){i.x=this.smallestInAbsValue(t.x,e.x,r.x,n.x),i.y=this.smallestInAbsValue(t.y,e.y,r.y,n.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,r.x-=i.x,r.y-=i.y,n.x-=i.x,n.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,r,n,i){var o=null;try{o=Q.intersection(t,r,n,i)}catch(a){if(!(a instanceof H))throw a;o=e.nearestEndpoint(t,r,n,i)}return o},e.prototype.intersection=function(t,r,n,i){var o=this.intersectionWithNormalization(t,r,n,i);return this.isInSegmentEnvelopes(o)||(o=new C(e.nearestEndpoint(t,r,n,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,r,n){var i=t,o=Math.abs(i);return Math.abs(e)1e-4&&V.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,r,n){var i=new C(t),o=new C(e),a=new C(r),s=new C(n),u=new C;this.normalizeToEnvCentre(i,o,a,s,u);var c=this.safeHCoordinateIntersection(i,o,a,s);return c.x+=u.x,c.y+=u.y,c},e.prototype.computeCollinearIntersection=function(e,r,n,i){var o=q.intersects(e,r,n),a=q.intersects(e,r,i),s=q.intersects(n,i,e),u=q.intersects(n,i,r);return o&&a?(this._intPt[0]=n,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=e,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=n,this._intPt[1]=e,!n.equals(e)||a||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=n,this._intPt[1]=r,!n.equals(r)||a||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):a&&u?(this._intPt[0]=i,this._intPt[1]=r,!i.equals(r)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,r,n,i){var o=t.xe.x?t.x:e.x,u=t.y>e.y?t.y:e.y,c=r.xn.x?r.x:n.x,p=r.y>n.y?r.y:n.y,d=((o>c?o:c)+(sl?a:l)+(u0&&a>0||o<0&&a<0)return t.NO_INTERSECTION;var s=st.orientationIndex(n,i,e),u=st.orientationIndex(n,i,r);return s>0&&u>0||s<0&&u<0?t.NO_INTERSECTION:0===o&&0===a&&0===s&&0===u?this.computeCollinearIntersection(e,r,n,i):(0===o||0===a||0===s||0===u?(this._isProper=!1,e.equals2D(n)||e.equals2D(i)?this._intPt[0]=e:r.equals2D(n)||r.equals2D(i)?this._intPt[0]=r:0===o?this._intPt[0]=new C(n):0===a?this._intPt[0]=new C(i):0===s?this._intPt[0]=new C(e):0===u&&(this._intPt[0]=new C(r))):(this._isProper=!0,this._intPt[0]=this.intersection(e,r,n,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,r,n){var i=t,o=st.distancePointLine(t,r,n),a=st.distancePointLine(e,r,n);return a0?r>0?-i:i:r>0?i:-i;if(0===e||0===r)return n>0?t>0?i:-i:t>0?-i:i;if(e>0?n>0?e<=n||(i=-i,o=t,t=r,r=o,o=e,e=n,n=o):e<=-n?(i=-i,r=-r,n=-n):(o=t,t=-r,r=o,o=e,e=-n,n=o):n>0?-e<=n?(i=-i,t=-t,e=-e):(o=-t,t=r,r=o,o=-e,e=n,n=o):e>=n?(t=-t,e=-e,r=-r,n=-n):(i=-i,o=-t,t=-r,r=o,o=-e,e=-n,n=o),t>0){if(!(r>0))return i;if(!(t<=r))return i}else{if(r>0)return-i;if(!(t>=r))return-i;i=-i,t=-t,r=-r}for(;;){if((n-=(a=Math.floor(r/t))*e)<0)return-i;if(n>e)return i;if(t>(r-=a*t)+r){if(en+n)return-i;r=t-r,n=e-n,i=-i}if(0===n)return 0===r?0:-i;if(0===r)return i;if((e-=(a=Math.floor(t/r))*n)<0)return i;if(e>n)return-i;if(r>(t-=a*r)+t){if(ne+e)return i;t=r-t,e=n-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var at=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};at.prototype.countSegment=function(t,e){if(t.xn&&(r=e.x,n=t.x),this._p.x>=r&&this._p.x<=n&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,s=e.y-this._p.y,u=ot.signOfDet2x2(i,o,a,s);if(0===u)return this._isPointOnSegment=!0,null;s0&&this._crossingCount++}},at.prototype.isPointInPolygon=function(){return this.getLocation()!==S.EXTERIOR},at.prototype.getLocation=function(){return this._isPointOnSegment?S.BOUNDARY:this._crossingCount%2==1?S.INTERIOR:S.EXTERIOR},at.prototype.isOnSegment=function(){return this._isPointOnSegment},at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.locatePointInRing=function(){if(arguments[0]instanceof C&&P(arguments[1],z)){for(var t=arguments[0],e=arguments[1],r=new at(t),n=new C,i=new C,o=1;o1||s<0||s>1)&&(i=!0)}}else i=!0;return i?O.min(st.distancePointLine(t,r,n),st.distancePointLine(e,r,n),st.distancePointLine(r,t,e),st.distancePointLine(n,t,e)):0},st.isPointInRing=function(t,e){return st.locatePointInRing(t,e)!==S.EXTERIOR},st.computeLength=function(t){var e=t.size();if(e<=1)return 0;var r=0,n=new C;t.getCoordinate(0,n);for(var i=n.x,o=n.y,a=1;ar.y&&(r=o,n=i)}var a=n;do{(a-=1)<0&&(a=e)}while(t[a].equals2D(r)&&a!==n);var s=n;do{s=(s+1)%e}while(t[s].equals2D(r)&&s!==n);var u=t[a],c=t[s];if(u.equals2D(r)||c.equals2D(r)||u.equals2D(c))return!1;var l=st.computeOrientation(u,r,c);return 0===l?u.x>c.x:l>0},st.locatePointInRing=function(t,e){return at.locatePointInRing(t,e)},st.distancePointLinePerpendicular=function(t,e,r){var n=(r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y),i=((e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y))/n;return Math.abs(i)*Math.sqrt(n)},st.computeOrientation=function(t,e,r){return st.orientationIndex(t,e,r)},st.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new v("Line array must contain at least one vertex");for(var r=t.distance(e[0]),n=0;n=1)return o.distance(s);var l=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/u;return Math.abs(l)*Math.sqrt(u)}},st.isOnLine=function(t,e){for(var r=new it,n=1;n0},yt.prototype.interfaces_=function(){return[ft]},yt.prototype.getClass=function(){return yt};var vt=function(){};vt.prototype.isInBoundary=function(t){return t>1},vt.prototype.interfaces_=function(){return[ft]},vt.prototype.getClass=function(){return vt};var At=function(){};At.prototype.isInBoundary=function(t){return 1===t},At.prototype.interfaces_=function(){return[ft]},At.prototype.getClass=function(){return At};var _t=function(){};_t.prototype.add=function(){},_t.prototype.addAll=function(){},_t.prototype.isEmpty=function(){},_t.prototype.iterator=function(){},_t.prototype.size=function(){},_t.prototype.toArray=function(){},_t.prototype.remove=function(){},(r.prototype=new Error).name="IndexOutOfBoundsException";var bt=function(){};bt.prototype.hasNext=function(){},bt.prototype.next=function(){},bt.prototype.remove=function(){};var xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(_t);(n.prototype=new Error).name="NoSuchElementException";var wt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof _t&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,_t]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var r=this.array_[t];return this.array_[t]=e,r},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new r;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,r=this.array_.length;e=1&&this.get(this.size()-1).equals2D(i))return null;t.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];return this.add(o,a),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var s=arguments[0],u=arguments[1];if(arguments[2])for(var c=0;c=0;l--)this.add(s[l],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var h=arguments[0],p=arguments[1];if(!arguments[2]){var d=this.size();if(d>0){if(h>0&&this.get(h-1).equals2D(p))return null;if(hy&&(v=-1);for(var A=m;A!==y;A+=v)this.add(f[A],g);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,r),e}(wt),It=function(){},Mt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Mt.ForwardComparator.get=function(){return St},Mt.BidirectionalComparator.get=function(){return Tt},Mt.coordArrayType.get=function(){return new Array(0).fill(null)},It.prototype.interfaces_=function(){return[]},It.prototype.getClass=function(){return It},It.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},It.ptNotInList=function(t,e){for(var r=0;r=t?e:[]},It.indexOf=function(t,e){for(var r=0;r0)&&(e=t[r]);return e},It.extract=function(t,e,r){e=O.clamp(e,0,t.length);var n=(r=O.clamp(r,-1,t.length))-e+1;r<0&&(n=0),e>=t.length&&(n=0),rn.length)return 1;if(0===r.length)return 0;var i=It.compare(r,n);return It.isEqualReversed(r,n)?0:i},Tt.prototype.OLDcompare=function(t,e){var r=t,n=e;if(r.lengthn.length)return 1;if(0===r.length)return 0;for(var i=It.increasingDirection(r),o=It.increasingDirection(n),a=i>0?0:r.length-1,s=o>0?0:r.length-1,u=0;u0))return e.value;e=e.right}}return null},h.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var r,n,i=this.root_;do{if(r=i,(n=t.compareTo(i.key))<0)i=i.left;else{if(!(n>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var a={key:t,left:null,right:null,value:e,parent:r,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}};return n<0?r.left=a:r.right=a,this.fixAfterInsertion(a),this.size_++,null},h.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(s(t)===c(s(s(t)))){var e=l(s(s(t)));1===a(e)?(u(s(t),Rt),u(e,Rt),u(s(s(t)),1),t=s(s(t))):(t===l(s(t))&&(t=s(t),this.rotateLeft(t)),u(s(t),Rt),u(s(s(t)),1),this.rotateRight(s(s(t))))}else{var r=c(s(s(t)));1===a(r)?(u(s(t),Rt),u(r,Rt),u(s(s(t)),1),t=s(s(t))):(t===c(s(t))&&(t=s(t),this.rotateRight(t)),u(s(t),Rt),u(s(s(t)),1),this.rotateLeft(s(s(t))))}this.root_.color=Rt},h.prototype.values=function(){var t=new wt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=h.successor(e));)t.add(e.value);return t},h.prototype.entrySet=function(){var t=new Lt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=h.successor(e));)t.add(e);return t},h.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},h.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},h.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},h.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var r=t.parent,n=t;null!==r&&n===r.right;)n=r,r=r.parent;return r},h.prototype.size=function(){return this.size_};var Dt=function(){};Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},p.prototype=new o,(d.prototype=new p).contains=function(t){for(var e=0,r=this.array_.length;e=0;){var a=i.substring(0,o);n.add(a),o=(i=i.substring(o+r)).indexOf(e)}i.length>0&&n.add(i);for(var s=new Array(n.size()).fill(null),u=0;u0)for(var o=i;o0&&n.append(" ");for(var o=0;o0&&n.append(","),n.append(qt.toString(t.getOrdinate(i,o)))}return n.append(")"),n.toString()}},Yt.ensureValidRing=function(t,e){var r=e.size();return 0===r?e:r<=3?Yt.createClosedRing(t,e,4):e.getOrdinate(0,z.X)===e.getOrdinate(r-1,z.X)&&e.getOrdinate(0,z.Y)===e.getOrdinate(r-1,z.Y)?e:Yt.createClosedRing(t,e,r+1)},Yt.createClosedRing=function(t,e,r){var n=t.create(r,e.getDimension()),i=e.size();Yt.copy(e,0,n,0,i);for(var o=i;o0&&Yt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Ft.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return st.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Yt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,r=0;e= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},r.MINIMUM_VALID_SIZE.get=function(){return 4},r.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,r),e}(Xt),re=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return lt.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],r=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,r)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),r=0;r0?e.createPoint(r[0]):e.createPoint():t},ae.prototype.interfaces_=function(){return[ne.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var se=function(){};se.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Xt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},se.prototype.interfaces_=function(){return[ne.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ue=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e0){var t=new k(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e3&&(n=3),n<2?new ue(r):new ue(r,n)}},le.prototype.interfaces_=function(){return[M,e]},le.prototype.getClass=function(){return le},le.instance=function(){return le.instanceObject},he.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},he.instanceObject.get=function(){return new le},Object.defineProperties(le,he);var pe=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new wt,e=this.map_.values(),r=e.next();!r.done;)t.add(r.value),r=e.next();return t},e.prototype.entrySet=function(){var t=new Lt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(Pt),de=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof ge){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var r=arguments[0];this._modelType=t.FIXED,this.setScale(r)}else if(arguments[0]instanceof t){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}},fe={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};de.prototype.equals=function(t){if(!(t instanceof de))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},de.prototype.compareTo=function(t){var e=t,r=this.getMaximumSignificantDigits(),n=e.getMaximumSignificantDigits();return new R(r).compareTo(new R(n))},de.prototype.getScale=function(){return this._scale},de.prototype.isFloating=function(){return this._modelType===de.FLOATING||this._modelType===de.FLOATING_SINGLE},de.prototype.getType=function(){return this._modelType},de.prototype.toString=function(){var t="UNKNOWN";return this._modelType===de.FLOATING?t="Floating":this._modelType===de.FLOATING_SINGLE?t="Floating-Single":this._modelType===de.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},de.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return A.isNaN(t)||this._modelType===de.FLOATING_SINGLE?t:this._modelType===de.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===de.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},de.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===de.FLOATING?t=16:this._modelType===de.FLOATING_SINGLE?t=6:this._modelType===de.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},de.prototype.setScale=function(t){this._scale=Math.abs(t)},de.prototype.interfaces_=function(){return[e,b]},de.prototype.getClass=function(){return de},de.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},fe.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},fe.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(de,fe);var ge=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},me={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ge.prototype.readResolve=function(){return ge.nameToTypeMap.get(this._name)},ge.prototype.toString=function(){return this._name},ge.prototype.interfaces_=function(){return[e]},ge.prototype.getClass=function(){return ge},me.serialVersionUID.get=function(){return-552860263173159e4},me.nameToTypeMap.get=function(){return new pe},Object.defineProperties(ge,me),de.Type=ge,de.FIXED=new ge("FIXED"),de.FLOATING=new ge("FLOATING"),de.FLOATING_SINGLE=new ge("FLOATING SINGLE");var ye=function t(){this._precisionModel=new de,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?P(arguments[0],M)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof de&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},ve={serialVersionUID:{configurable:!0}};ye.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},ye.prototype.createLineString=function(t){return t?t instanceof Array?new Xt(this.getCoordinateSequenceFactory().create(t),this):P(t,z)?new Xt(t,this):void 0:new Xt(this.getCoordinateSequenceFactory().create([]),this)},ye.prototype.createMultiLineString=function(){if(0===arguments.length)return new Ht(null,this);if(1===arguments.length){var t=arguments[0];return new Ht(t,this)}},ye.prototype.buildGeometry=function(t){for(var e=null,r=!1,n=!1,i=t.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===e&&(e=a),a!==e&&(r=!0),o.isGeometryCollectionOrDerived()&&(n=!0)}if(null===e)return this.createGeometryCollection();if(r||n)return this.createGeometryCollection(ye.toGeometryArray(t));var s=t.iterator().next();if(t.size()>1){if(s instanceof $t)return this.createMultiPolygon(ye.toPolygonArray(t));if(s instanceof Xt)return this.createMultiLineString(ye.toLineStringArray(t));if(s instanceof Kt)return this.createMultiPoint(ye.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},ye.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},ye.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(P(arguments[0],z)){var e=arguments[0];return new Kt(e,this)}}},ye.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},ye.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(P(arguments[0],z)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var r=arguments[0];return this.createPolygon(r,null)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return new $t(n,i,this)}},ye.prototype.getSRID=function(){return this._SRID},ye.prototype.createGeometryCollection=function(){if(0===arguments.length)return new Gt(null,this);if(1===arguments.length){var t=arguments[0];return new Gt(t,this)}},ye.prototype.createGeometry=function(t){return new ne(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},ye.prototype.getPrecisionModel=function(){return this._precisionModel},ye.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(P(arguments[0],z)){var e=arguments[0];return new ee(e,this)}}},ye.prototype.createMultiPolygon=function(){if(0===arguments.length)return new re(null,this);if(1===arguments.length){var t=arguments[0];return new re(t,this)}},ye.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(P(arguments[0],z)){var r=arguments[0];if(null===r)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(r.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[t]},m.prototype.push=function(t){return this.array_.push(t),t},m.prototype.pop=function(t){if(0===this.array_.length)throw new g;return this.array_.pop()},m.prototype.peek=function(){if(0===this.array_.length)throw new g;return this.array_[this.array_.length-1]},m.prototype.empty=function(){return 0===this.array_.length},m.prototype.isEmpty=function(){return this.empty()},m.prototype.search=function(t){return this.array_.indexOf(t)},m.prototype.size=function(){return this.array_.length},m.prototype.toArray=function(){for(var t=[],e=0,r=this.array_.length;e0&&this._minIndexthis._minCoord.y&&r.y>this._minCoord.y&&n===st.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Me.prototype.getRightmostSideOfSegment=function(t,e){var r=t.getEdge().getCoordinates();if(e<0||e+1>=r.length)return-1;if(r[e].y===r[e+1].y)return-1;var n=Ee.LEFT;return r[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=r,this._minCoord=e[r])},Me.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)},Me.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var r=e.next();r.isForward()&&this.checkForRightmostCoordinate(r)}et.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)===Ee.LEFT&&(this._orientedDe=this._minDe.getSym())},Me.prototype.interfaces_=function(){return[]},Me.prototype.getClass=function(){return Me};var Se=function(t){function e(r,n){t.call(this,e.msgWithCoord(r,n)),this.pt=n?new C(n):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),Te=function(){this.array_=[]};Te.prototype.addLast=function(t){this.array_.push(t)},Te.prototype.removeFirst=function(){return this.array_.shift()},Te.prototype.isEmpty=function(){return 0===this.array_.length};var Pe=function(){this._finder=null,this._dirEdgeList=new wt,this._nodes=new wt,this._rightMostCoord=null,this._env=null,this._finder=new Me};Pe.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Pe.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Pe.prototype.computeNodeDepth=function(t){for(var e=null,r=t.getEdges().iterator();r.hasNext();){var n=r.next();if(n.isVisited()||n.getSym().isVisited()){e=n;break}}if(null===e)throw new Se("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Pe.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ee.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Pe.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Pe.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ee.RIGHT)>=1&&e.getDepth(Ee.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Pe.prototype.computeDepths=function(t){var e=new Lt,r=new Te,n=t.getNode();for(r.addLast(n),e.add(n),t.setVisited(!0);!r.isEmpty();){var i=r.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();e.contains(s)||(r.addLast(s),e.add(s))}}}},Pe.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Pe.prototype.getEnvelope=function(){if(null===this._env){for(var t=new q,e=this._dirEdgeList.iterator();e.hasNext();)for(var r=e.next().getEdge().getCoordinates(),n=0;nthis.location.length){var e=new Array(3).fill(null);e[Ee.ON]=this.location[Ee.ON],e[Ee.LEFT]=S.NONE,e[Ee.RIGHT]=S.NONE,this.location=e}for(var r=0;r1&&t.append(S.toLocationSymbol(this.location[Ee.LEFT])),t.append(S.toLocationSymbol(this.location[Ee.ON])),this.location.length>1&&t.append(S.toLocationSymbol(this.location[Ee.RIGHT])),t.toString()},Oe.prototype.setLocations=function(t,e,r){this.location[Ee.ON]=t,this.location[Ee.LEFT]=e,this.location[Ee.RIGHT]=r},Oe.prototype.get=function(t){return t1},Oe.prototype.isAnyNull=function(){for(var t=0;tthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},ke.prototype.addPoints=function(t,e,r){var n=t.getCoordinates();if(e){var i=1;r&&(i=0);for(var o=i;o=0;s--)this._pts.add(n[s])}},ke.prototype.isHole=function(){return this._isHole},ke.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},ke.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!st.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();)if(r.next().containsPoint(t))return!1;return!0},ke.prototype.addHole=function(t){this._holes.add(t)},ke.prototype.isShell=function(){return null===this._shell},ke.prototype.getLabel=function(){return this._label},ke.prototype.getEdges=function(){return this._edges},ke.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},ke.prototype.getShell=function(){return this._shell},ke.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],r=arguments[1],n=e.getLocation(r,Ee.RIGHT);if(n===S.NONE)return null;if(this._label.getLocation(r)===S.NONE)return this._label.setLocation(r,n),null}},ke.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},ke.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),r=0;r=2,"found partial label"),this.computeIM(t)},Be.prototype.isInResult=function(){return this._isInResult},Be.prototype.isVisited=function(){return this._isVisited},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var Ne=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],r=arguments[1];this._coord=e,this._edges=r,this._label=new Le(0,S.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var r=S.NONE;if(r=this._label.getLocation(e),!t.isNull(e)){var n=t.getLocation(e);r!==S.BOUNDARY&&(r=n)}return r},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],r=arguments[1];null===this._label?this._label=new Le(e,r):this._label.setLocation(e,r)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Le)for(var r=arguments[0],n=0;n<2;n++){var i=this.computeMergedLocation(r,n);this._label.getLocation(n)===S.NONE&&this._label.setLocation(n,i)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=S.NONE;null!==this._label&&(e=this._label.getLocation(t));var r=null;switch(e){case S.BOUNDARY:r=S.INTERIOR;break;case S.INTERIOR:default:r=S.BOUNDARY}this._label.setLocation(t,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Be),Fe=function(){this.nodeMap=new h,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Fe.prototype.find=function(t){return this.nodeMap.get(t)},Fe.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ne){var r=arguments[0],n=this.nodeMap.get(r.getCoordinate());return null===n?(this.nodeMap.put(r.getCoordinate(),r),r):(n.mergeLabel(r),n)}},Fe.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Fe.prototype.iterator=function(){return this.nodeMap.values().iterator()},Fe.prototype.values=function(){return this.nodeMap.values()},Fe.prototype.getBoundaryNodes=function(t){for(var e=new wt,r=this.iterator();r.hasNext();){var n=r.next();n.getLabel().getLocation(t)===S.BOUNDARY&&e.add(n)}return e},Fe.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var je=function(){},ze={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je},je.isNorthern=function(t){return t===je.NE||t===je.NW},je.isOpposite=function(t,e){return t!==e&&2==(t-e+4)%4},je.commonHalfPlane=function(t,e){if(t===e)return t;if(2==(t-e+4)%4)return-1;var r=te?t:e)?3:r},je.isInHalfPlane=function(t,e){return e===je.SE?t===je.SE||t===je.SW:t===e||t===e+1},je.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new v("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?je.NE:je.SE:e>=0?je.NW:je.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var r=arguments[0],n=arguments[1];if(n.x===r.x&&n.y===r.y)throw new v("Cannot compute the quadrant for two identical points "+r);return n.x>=r.x?n.y>=r.y?je.NE:je.SE:n.y>=r.y?je.NW:je.SW}},ze.NE.get=function(){return 0},ze.NW.get=function(){return 1},ze.SW.get=function(){return 2},ze.SE.get=function(){return 3},Object.defineProperties(je,ze);var Ue=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],r=arguments[1],n=arguments[2];this._edge=e,this.init(r,n),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this._edge=i,this.init(o,a),this._label=s}};Ue.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),e.add(s)):r.addAll(a)}else n.add(o)}return n},Qe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Qe.prototype.buildMaximalEdgeRings=function(t){for(var e=new wt,r=t.iterator();r.hasNext();){var n=r.next();if(n.isInResult()&&n.getLabel().isArea()&&null===n.getEdgeRing()){var i=new De(n,this._geometryFactory);e.add(i),i.setInResult()}}return e},Qe.prototype.placePolygonHoles=function(t,e){for(var r=e.iterator();r.hasNext();){var n=r.next();n.isHole()&&n.setShell(t)}},Qe.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Qe.prototype.findEdgeRingContaining=function(t,e){for(var r=t.getLinearRing(),n=r.getEnvelopeInternal(),i=r.getCoordinateN(0),o=null,a=null,s=e.iterator();s.hasNext();){var u=s.next(),c=u.getLinearRing(),l=c.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var h=!1;l.contains(n)&&st.isPointInRing(i,c.getCoordinates())&&(h=!0),h&&(null===o||a.contains(l))&&(o=u)}return o},Qe.prototype.findShell=function(t){for(var e=0,r=null,n=t.iterator();n.hasNext();){var i=n.next();i.isHole()||(r=i,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),r},Qe.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],r=arguments[1];Ve.linkResultDirectedEdges(r);var n=this.buildMaximalEdgeRings(e),i=new wt,o=this.buildMinimalEdgeRings(n,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe};var qe=function(){};qe.prototype.getBounds=function(){},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var We=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};We.prototype.getItem=function(){return this._item},We.prototype.getBounds=function(){return this._bounds},We.prototype.interfaces_=function(){return[qe,e]},We.prototype.getClass=function(){return We};var Ye=function(){this._size=null,this._items=null,this._size=0,this._items=new wt,this._items.add(null)};Ye.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Ye.prototype.size=function(){return this._size},Ye.prototype.reorder=function(t){for(var e=null,r=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(r)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,r)},Ye.prototype.clear=function(){this._size=0,this._items.clear()},Ye.prototype.isEmpty=function(){return 0===this._size},Ye.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Xe=function(){};Xe.prototype.visitItem=function(t){},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ze=function(){};Ze.prototype.insert=function(t,e){},Ze.prototype.remove=function(t,e){},Ze.prototype.query=function(){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var Ke=function(){if(this._childBoundables=new wt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Je={serialVersionUID:{configurable:!0}};Ke.prototype.getLevel=function(){return this._level},Ke.prototype.size=function(){return this._childBoundables.size()},Ke.prototype.getChildBoundables=function(){return this._childBoundables},Ke.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Ke.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Ke.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Ke.prototype.interfaces_=function(){return[qe,e]},Ke.prototype.getClass=function(){return Ke},Je.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Ke,Je);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var r=t.toArray();e?Nt.sort(r,e):Nt.sort(r);for(var n=t.iterator(),i=0,o=r.length;itr.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(n)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new v("neither boundable is composite")},tr.prototype.isLeaves=function(){return!(tr.isComposite(this._boundable1)||tr.isComposite(this._boundable2))},tr.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},tr.prototype.expand=function(t,e,r,n){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new tr(o,e,this._itemDistance);a.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=r}},rr={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};er.prototype.getNodeCapacity=function(){return this._nodeCapacity},er.prototype.lastNode=function(t){return t.get(t.size()-1)},er.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var r=e.next();r instanceof Ke?t+=this.size(r):r instanceof We&&(t+=1)}return t}},er.prototype.removeItem=function(t,e){for(var r=null,n=t.getChildBoundables().iterator();n.hasNext();){var i=n.next();i instanceof We&&i.getItem()===e&&(r=i)}return null!==r&&(t.getChildBoundables().remove(r),!0)},er.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new wt:t}if(1===arguments.length){for(var e=arguments[0],r=new wt,n=e.getChildBoundables().iterator();n.hasNext();){var i=n.next();if(i instanceof Ke){var o=this.itemsTree(i);null!==o&&r.add(o)}else i instanceof We?r.add(i.getItem()):et.shouldNeverReachHere()}return r.size()<=0?null:r}},er.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new We(t,e))},er.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new wt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[2];if(et.isTrue(r>-2),n.getLevel()===r)return i.add(n),null;for(var o=n.getChildBoundables().iterator();o.hasNext();){var a=o.next();a instanceof Ke?this.boundablesAtLevel(r,a,i):(et.isTrue(a instanceof We),-1===r&&i.add(a))}return null}},er.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new wt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var r=arguments[0],n=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,n)}else if(3===arguments.length)if(P(arguments[2],Xe)&&arguments[0]instanceof Object&&arguments[1]instanceof Ke)for(var i=arguments[0],o=arguments[1],a=arguments[2],s=o.getChildBoundables(),u=0;ut&&(t=n)}}return t+1}},er.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var r=new wt;r.add(this.createNode(e));var n=new wt(t);$e.sort(n,this.getComparator());for(var i=n.iterator();i.hasNext();){var o=i.next();this.lastNode(r).getChildBoundables().size()===this.getNodeCapacity()&&r.add(this.createNode(e)),this.lastNode(r).addChildBoundable(o)}return r},er.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},er.prototype.interfaces_=function(){return[e]},er.prototype.getClass=function(){return er},er.compareDoubles=function(t,e){return t>e?1:t0);for(var r=new wt,n=0;n0;){var h=l.poll(),p=h.getDistance();if(p>=u)break;h.isLeaves()?(u=p,c=h):h.expandToQueue(l,u)}return[c.getBoundable(0).getItem(),c.getBoundable(1).getItem()]}}else if(3===arguments.length){var d=arguments[0],f=arguments[1],g=arguments[2],m=new We(d,f),y=new tr(this.getRoot(),m,g);return this.nearestNeighbour(y)[0]}},r.prototype.interfaces_=function(){return[Ze,e]},r.prototype.getClass=function(){return r},r.centreX=function(t){return r.avg(t.getMinX(),t.getMaxX())},r.avg=function(t,e){return(t+e)/2},r.centreY=function(t){return r.avg(t.getMinY(),t.getMaxY())},n.STRtreeNode.get=function(){return ar},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,n){return t.compareDoubles(r.centreX(e.getBounds()),r.centreX(n.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[w]},compare:function(e,n){return t.compareDoubles(r.centreY(e.getBounds()),r.centreY(n.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(r,n),r}(er),ar=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var r=e.next();null===t?t=new q(r.getBounds()):t.expandToInclude(r.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ke),sr=function(){};sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},sr.relativeSign=function(t,e){return te?1:0},sr.compare=function(t,e,r){if(e.equals2D(r))return 0;var n=sr.relativeSign(e.x,r.x),i=sr.relativeSign(e.y,r.y);switch(t){case 0:return sr.compareValue(n,i);case 1:return sr.compareValue(i,n);case 2:return sr.compareValue(i,-n);case 3:return sr.compareValue(-n,i);case 4:return sr.compareValue(-n,-i);case 5:return sr.compareValue(-i,-n);case 6:return sr.compareValue(-i,n);case 7:return sr.compareValue(n,-i)}return et.shouldNeverReachHere("invalid octant value"),0},sr.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ur=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],r=arguments[2],n=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=r,this._segmentOctant=n,this._isInterior=!e.equals2D(t.getCoordinate(r))};ur.prototype.getCoordinate=function(){return this.coord},ur.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ur.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:sr.compare(this._segmentOctant,this.coord,e.coord)},ur.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ur.prototype.isInterior=function(){return this._isInterior},ur.prototype.interfaces_=function(){return[b]},ur.prototype.getClass=function(){return ur};var cr=function(){this._nodeMap=new h,this._edge=null;var t=arguments[0];this._edge=t};cr.prototype.getSplitCoordinates=function(){var t=new Et;this.addEndpoints();for(var e=this.iterator(),r=e.next();e.hasNext();){var n=e.next();this.addEdgeCoordinates(r,n,t),r=n}return t.toCoordinateArray()},cr.prototype.addCollapsedNodes=function(){var t=new wt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var r=e.next().intValue();this.add(this._edge.getCoordinate(r),r)}},cr.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cr.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?r>=n?0:1:r>=n?7:6:e>=0?r>=n?3:2:r>=n?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new v("Cannot compute the octant for two identical points "+i);return lr.octant(a,s)}};var hr=function(){};hr.prototype.getCoordinates=function(){},hr.prototype.size=function(){},hr.prototype.getCoordinate=function(t){},hr.prototype.isClosed=function(){},hr.prototype.setData=function(t){},hr.prototype.getData=function(){},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr};var pr=function(){};pr.prototype.addIntersection=function(t,e){},pr.prototype.interfaces_=function(){return[hr]},pr.prototype.getClass=function(){return pr};var dr=function(){this._nodeList=new cr(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};dr.prototype.getCoordinates=function(){return this._pts},dr.prototype.size=function(){return this._pts.length},dr.prototype.getCoordinate=function(t){return this._pts[t]},dr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},dr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},dr.prototype.setData=function(t){this._data=t},dr.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:lr.octant(t,e)},dr.prototype.getData=function(){return this._data},dr.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var r=arguments[0],n=arguments[1],i=arguments[3],o=new C(r.getIntersection(i));this.addIntersection(o,n)}},dr.prototype.toString=function(){return J.toLineString(new ue(this._pts))},dr.prototype.getNodeList=function(){return this._nodeList},dr.prototype.addIntersectionNode=function(t,e){var r=e,n=r+1;if(n=0&&r>=0||e<=0&&r<=0?Math.max(e,r):0}if(arguments[0]instanceof C){var n=arguments[0];return st.orientationIndex(this.p0,this.p1,n)}},fr.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},fr.prototype.isVertical=function(){return this.p0.x===this.p1.x},fr.prototype.equals=function(t){if(!(t instanceof fr))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},fr.prototype.intersection=function(t){var e=new it;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},fr.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),r=new C;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r}if(arguments[0]instanceof fr){var n=arguments[0],i=this.projectionFactor(n.p0),o=this.projectionFactor(n.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(n.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(n.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new fr(a,s)}},fr.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},fr.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},fr.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},fr.prototype.distancePerpendicular=function(t){return st.distancePointLinePerpendicular(t,this.p0,this.p1)},fr.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},fr.prototype.midPoint=function(){return fr.midPoint(this.p0,this.p1)},fr.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,n=e*e+r*r;return n<=0?A.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*r)/n},fr.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var r=new Array(2).fill(null),n=A.MAX_VALUE,i=null,o=this.closestPoint(t.p0);n=o.distance(t.p0),r[0]=o,r[1]=t.p0;var a=this.closestPoint(t.p1);(i=a.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||A.isNaN(e))&&(e=1),e},fr.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},fr.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},fr.prototype.distance=function(){if(arguments[0]instanceof fr){var t=arguments[0];return st.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return st.distancePointLine(e,this.p0,this.p1)}},fr.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},fr.prototype.hashCode=function(){var t=A.doubleToLongBits(this.p0.x);t^=31*A.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),r=A.doubleToLongBits(this.p1.x);return r^=31*A.doubleToLongBits(this.p1.y),e^Math.trunc(r)^Math.trunc(r>>32)},fr.prototype.interfaces_=function(){return[b,e]},fr.prototype.getClass=function(){return fr},fr.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},gr.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(fr,gr);var mr=function(){this.tempEnv1=new q,this.tempEnv2=new q,this._overlapSeg1=new fr,this._overlapSeg2=new fr};mr.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],r=arguments[2],n=arguments[3];t.getLineSegment(e,this._overlapSeg1),r.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var yr=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],r=arguments[2],n=arguments[3];this._pts=t,this._start=e,this._end=r,this._context=n};yr.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},yr.prototype.computeSelect=function(t,e,r,n){var i=this._pts[e],o=this._pts[r];if(n.tempEnv1.init(i,o),r-e==1)return n.select(this,e),null;if(!t.intersects(n.tempEnv1))return null;var a=Math.trunc((e+r)/2);e