diff --git a/dist/en/main/apidoc/module-ol_transform.html b/dist/en/main/apidoc/module-ol_transform.html index d304a68f51..1c87e421c8 100644 --- a/dist/en/main/apidoc/module-ol_transform.html +++ b/dist/en/main/apidoc/module-ol_transform.html @@ -188,7 +188,7 @@
p?Math.tan(s):0,g=Math.pow(f,2),m=Math.pow(g,2);e=1-this.es*Math.pow(a,2),h/=Math.sqrt(e);var _=he(s,a,l,this.en);i=this.a*(this.k0*h*(1+u/6*(1-g+c+u/20*(5-18*g+m+14*c-58*g*c+u/42*(61+179*m-m*g-479*g)))))+this.x0,n=this.a*(this.k0*(_-this.ml0+a*o*h/2*(1+u/12*(5-g+9*c+4*d+u/30*(61+m-58*g+270*c-330*g*c+u/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var y=l*Math.sin(o);if(Math.abs(Math.abs(y)-1)
=1){if(y-1>p)return 93;n=0}else n=Math.acos(n);s<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var e,i,n,r,s=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(i=ce(e=this.ml0+o/this.k0,this.es,this.en),Math.abs(i) 0?$(this.long0+Math.atan2(t.x,-1*t.y)):$(this.long0+Math.atan2(t.x,t.y)):$(this.long0+Math.atan2(t.x*Math.sin(a),o*this.coslat0*Math.cos(a)-t.y*this.sinlat0*Math.sin(a))),t.x=e,t.y=i,t)}if(Math.abs(this.coslat0)<=p){if(o<=p)return i=this.lat0,e=this.long0,t.x=e,t.y=i,t;t.x*=this.con,t.y*=this.con,n=o*this.cons/(2*this.a*this.k0),i=this.con*Y(this.e,n),e=this.con*$(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=p?s=this.X0:(s=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/o),e=$(this.long0+Math.atan2(t.x*Math.sin(r),o*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),i=-1*Y(this.e,Math.tan(.5*(c+s)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function(t,e,i){return e*=i,Math.tan(.5*(c+t))*Math.pow((1-e)/(1+e),.5*i)}};var Se={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),s=this.e=Math.sqrt(r);this.R=this.k0*i*Math.sqrt(1-r)/(1-r*Math.pow(e,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),a=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+s*e)/(1-s*e));this.K=o-this.alpha*a+this.alpha*s/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),a=this.lambda0+o/this.alpha,l=0,h=s,u=-1e3,c=0;Math.abs(h-u)>1e-7;){if(++c>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),u=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=a,t.y=h,t},names:["somerc"]},Ce=1e-7;var Te={init:function(){var t,e,i,n,r,s,o,a,l,h,u,d,f,g=0,_=0,v=0,E=0,b=0,w=0,S=0;this.no_off=(f="object"==typeof(d=this).PROJECTION?Object.keys(d.PROJECTION)[0]:d.PROJECTION,"no_uoff"in d||"no_off"in d||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(f)),this.no_rot="no_rot"in this;var C=!1;"alpha"in this&&(C=!0);var T=!1;if("rectified_grid_angle"in this&&(T=!0),C&&(S=this.alpha),T&&(g=this.rectified_grid_angle*m),C||T)_=this.longc;else if(v=this.long1,b=this.lat1,E=this.long2,w=this.lat2,Math.abs(b-w)<=Ce||(t=Math.abs(b))<=Ce||Math.abs(t-c)<=Ce||Math.abs(Math.abs(this.lat0)-c)<=Ce||Math.abs(Math.abs(w)-c)<=Ce)throw new Error;var M=1-this.es;e=Math.sqrt(M),Math.abs(this.lat0)>p?(a=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*a*a,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/M),this.A=this.B*this.k0*e/t,(r=(n=this.B*e/(i*Math.sqrt(t)))*n-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(W(this.e,this.lat0,a),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=r=1),C||T?(C?(u=Math.asin(Math.sin(S)/n),T||(g=S)):(u=g,S=Math.asin(n*Math.sin(u))),this.lam0=_-Math.asin(.5*(r-1/r)*Math.tan(u))/this.B):(s=Math.pow(W(this.e,b,Math.sin(b)),this.B),o=Math.pow(W(this.e,w,Math.sin(w)),this.B),r=this.E/s,l=(o-s)/(o+s),h=((h=this.E*this.E)-o*s)/(h+o*s),(t=v-E)<-Math.pi?E-=x:t>Math.pi&&(E+=x),this.lam0=$(.5*(v+E)-Math.atan(h*Math.tan(.5*this.B*(v-E))/l)/this.B),u=Math.atan(2*Math.sin(this.B*$(v-this.lam0))/(r-1/r)),g=S=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(g),this.cosrot=Math.cos(g),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(S))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(y-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(y+r))},forward:function(t){var e,i,n,r,s,o,a,l,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-c)>p){if(e=.5*((s=this.E/Math.pow(W(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/s)),i=.5*(s+o),r=Math.sin(this.B*t.x),n=(e*this.singam-r*this.cosgam)/i,Math.abs(Math.abs(n)-1) 0?this.v_pole_n:this.v_pole_s,a=this.ArB*t.y;return this.no_rot?(h.x=a,h.y=l):(a-=this.u_0,h.x=l*this.cosrot+a*this.sinrot,h.y=a*this.cosrot-l*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h},inverse:function(t){var e,i,n,r,s,o,a,l={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((n=Math.exp(-this.BrA*i))-1/n),s=.5*(n+1/n),a=((o=Math.sin(this.BrA*e))*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(a)-1) p?this.ns=Math.log(n/a)/Math.log(r/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=p&&(i=X(i)*(c-2*p));var n,r,s=Math.abs(Math.abs(i)-c);if(s>p)n=W(this.e,i,Math.sin(i)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((s=i*this.ns)<=0)return null;r=0}var o=this.ns*$(e-this.long0);return t.x=this.k0*(r*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,t},inverse:function(t){var e,i,n,r,s,o=(t.x-this.x0)/this.k0,a=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+a*a),i=1):(e=-Math.sqrt(o*o+a*a),i=-1);var l=0;if(0!==e&&(l=Math.atan2(i*o,i*a)),0!==e||this.ns>0){if(i=1/this.ns,n=Math.pow(e/(this.a*this.f0),i),-9999===(r=Y(this.e,n)))return null}else r=-c;return s=$(l/this.ns+this.long0),t.x=s,t.y=r,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var Pe={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,r,s,o,a,l=t.x,h=t.y,u=$(l-this.long0);return e=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),s=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),t.y=a*Math.cos(o)/1,t.x=a*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,r,s,o,a,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(e)),t.x=this.long0-i/this.alfa,o=e,a=0;var h=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(a=1),o=t.y,h+=1}while(0===a&&h<15);return h>=15?null:t},names:["Krovak","krovak"]};function Re(t,e,i,n,r){return t*r-e*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)}function Ie(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Ae(t){return.375*t*(1+.25*t*(1+.46875*t))}function Le(t){return.05859375*t*t*(1+.75*t)}function Fe(t){return t*t*t*(35/3072)}function Oe(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)}function Ze(t){return Math.abs(t) 0)switch(this.qp=Ne(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=t*Ge,e=t*t,i[0]+=e*ze,i[1]=e*Ue,e*=t,i[0]+=e*je,i[1]+=e*Be,i[2]=e*qe,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Ne(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,i,n,r,s,o,a,l,h,u,d=t.x,f=t.y;if(d=$(d-this.long0),this.sphere){if(s=Math.sin(f),u=Math.cos(f),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+u*n:1+this.sinph0*s+this.cosph0*u*n)<=p)return null;e=(i=Math.sqrt(2/i))*u*Math.sin(d),i*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0) =0?(e=(h=Math.sqrt(o))*r,i=n*(this.mode===this.S_POLE?h:-h)):e=i=0}}return t.x=this.a*e+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n,r,s,o,a,l,h,u,d=t.x/this.a,f=t.y/this.a;if(this.sphere){var g,m=0,_=0;if((i=.5*(g=Math.sqrt(d*d+f*f)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(_=Math.sin(i),m=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(g)<=p?0:Math.asin(f*_/g),d*=_,f=m*g;break;case this.OBLIQ:i=Math.abs(g)<=p?this.lat0:Math.asin(m*this.sinph0+f*_*this.cosph0/g),d*=_*this.cosph0,f=(m-Math.sin(i)*this.sinph0)*g;break;case this.N_POLE:f=-f,i=c-i;break;case this.S_POLE:i-=c}e=0!==f||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,f):0}else{if(a=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,f*=this.dd,(o=Math.sqrt(d*d+f*f)) 1&&(t=t>1?1:-1),Math.asin(t)}var $e={init:function(){Math.abs(this.lat1+this.lat2) p?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=Ne(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*$(e-this.long0),o=r*Math.sin(s)+this.x0,a=this.rh-r*Math.cos(s)+this.y0;return t.x=o,t.y=a,t},inverse:function(t){var e,i,n,r,s,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),r=0,0!==e&&(r=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,i)),s=$(r/this.ns0+this.long0),t.x=s,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,r,s,o=Xe(.5*e);if(t 0||Math.abs(s)<=p?(o=this.x0+1*this.a*i*Math.sin(n)/s,a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*r)/s):(o=this.x0+this.infinity_dist*i*Math.sin(n),a=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*r)),t.x=o,t.y=a,t},inverse:function(t){var e,i,n,r,s,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(r=Math.atan2(e,this.rc),i=Math.sin(r),o=Xe((n=Math.cos(r))*this.sin_p14+t.y*i*this.cos_p14/e),s=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),s=$(this.long0+s)):(o=this.phic0,s=0),t.x=s,t.y=o,t},names:["gnom"]};var Ye={init:function(){this.sphere||(this.k0=V(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,r=t.y,s=$(n-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var o=Ne(this.e,Math.sin(r));e=this.x0+this.a*this.k0*s,i=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=$(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,e){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-i)<1e-6)return e<0?-1*c:c;for(var n,r,s,o,a=Math.asin(.5*e),l=0;l<30;l++)if(r=Math.sin(a),s=Math.cos(a),o=t*r,a+=n=Math.pow(1-o*o,2)/(2*s)*(e/(1-t*t)-r/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(n)<=1e-10)return a;return NaN}(this.e,2*t.y*this.k0/this.a),e=$(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=i,t},names:["cea"]};var He={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=$(e-this.long0),r=Ze(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*r,t},inverse:function(t){var e=t.x,i=t.y;return t.x=$(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Ze(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var Ke={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ie(this.es),this.e1=Ae(this.es),this.e2=Le(this.es),this.e3=Fe(this.es),this.ml0=this.a*Re(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,r=t.x,s=t.y,o=$(r-this.long0);if(n=o*Math.sin(s),this.sphere)Math.abs(s)<=p?(e=this.a*o,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(s),i=this.a*(Ze(s-this.lat0)+(1-Math.cos(n))/Math.tan(s)));else if(Math.abs(s)<=p)e=this.a*o,i=-1*this.ml0;else{var a=Oe(this.a,this.e,Math.sin(s))/Math.tan(s);e=a*Math.sin(n),i=this.a*Re(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+a*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,r,s,o,a,l,h;if(n=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=p)e=$(n/this.a+this.long0),i=0;else{var u;for(o=this.lat0+r/this.a,a=n*n/this.a/this.a+o*o,l=o,s=20;s;--s)if(l+=h=-1*(o*(l*(u=Math.tan(l))+1)-l-.5*(l*l+a)*u)/((l-o)/u-1),Math.abs(h)<=p){i=l;break}e=$(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=p)i=0,e=$(this.long0+n/this.a);else{var c,d,f,g,m;for(o=(this.ml0+r)/this.a,a=n*n/this.a/this.a+o*o,l=o,s=20;s;--s)if(m=this.e*Math.sin(l),c=Math.sqrt(1-m*m)*Math.tan(l),d=this.a*Re(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=h=(o*(c*(g=d/this.a)+1)-g-.5*c*(g*g+a))/(this.es*Math.sin(2*l)*(g*g+a-2*o*g)/(4*c)+(o-g)*(c*f-2/Math.sin(2*l))-f),Math.abs(h)<=p){i=l;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=$(this.long0+Math.asin(n*c/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","poly"]};var Je={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,i=t.x,n=t.y-this.lat0,r=i-this.long0,s=n/u*1e-5,o=r,a=1,l=0;for(e=1;e<=10;e++)a*=s,l+=this.A[e]*a;var h,c=l,d=o,f=1,g=0,p=0,m=0;for(e=1;e<=6;e++)h=g*c+f*d,f=f*c-g*d,g=h,p=p+this.B_re[e]*f-this.B_im[e]*g,m=m+this.B_im[e]*f+this.B_re[e]*g;return t.x=m*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var e,i,n=t.x,r=t.y,s=n-this.x0,o=(r-this.y0)/this.a,a=s/this.a,l=1,h=0,c=0,d=0;for(e=1;e<=6;e++)i=h*o+l*a,l=l*o-h*a,h=i,c=c+this.C_re[e]*l-this.C_im[e]*h,d=d+this.C_im[e]*l+this.C_re[e]*h;for(var f=0;f =0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;return 0!==i&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere?(r=$(this.long0+s/this.ns),n=Ze(this.g-i/this.a),t.x=r,t.y=n,t):(n=ke(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),r=$(this.long0+s/this.ns),t.x=r,t.y=n,t)},names:["Equidistant_Conic","eqdc"]};var ni={init:function(){this.R=this.a},forward:function(t){var e,i,n=t.x,r=t.y,s=$(n-this.long0);Math.abs(r)<=p&&(e=this.x0+this.R*s,i=this.y0);var o=Xe(2*Math.abs(r/Math.PI));(Math.abs(s)<=p||Math.abs(Math.abs(r)-c)<=p)&&(e=this.x0,i=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o));var a=.5*Math.abs(Math.PI/s-s/Math.PI),l=a*a,h=Math.sin(o),u=Math.cos(o),d=u/(h+u-1),f=d*d,g=d*(2/h-1),m=g*g,_=Math.PI*this.R*(a*(d-m)+Math.sqrt(l*(d-m)*(d-m)-(m+l)*(f-m)))/(m+l);s<0&&(_=-_),e=this.x0+_;var y=l+d;return _=Math.PI*this.R*(g*y-a*Math.sqrt((m+l)*(l+1)-y*y))/(m+l),i=r>=0?this.y0+_:this.y0-_,t.x=e,t.y=i,t},inverse:function(t){var e,i,n,r,s,o,a,l,h,u,c,d;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,s=(n=t.x/c)*n+(r=t.y/c)*r,c=3*(r*r/(l=-2*(o=-Math.abs(r)*(1+s))+1+2*r*r+s*s)+(2*(a=o-2*r*r+n*n)*a*a/l/l/l-9*o*a/l/l)/27)/(h=(o-a*a/3/l)/l)/(u=2*Math.sqrt(-h/3)),Math.abs(c)>1&&(c=c>=0?1:-1),d=Math.acos(c)/3,i=t.y>=0?(-u*Math.cos(d+Math.PI/3)-a/3/l)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-a/3/l)*Math.PI,e=Math.abs(n) 2*c*this.a)return;return i=e/this.a,n=Math.sin(i),r=Math.cos(i),s=this.long0,Math.abs(e)<=p?o=this.lat0:(o=Xe(r*this.sin_p12+t.y*n*this.cos_p12/e),a=Math.abs(this.lat0)-c,s=Math.abs(a)<=p?this.lat0>=0?$(this.long0+Math.atan2(t.x,-t.y)):$(this.long0-Math.atan2(-t.x,t.y)):$(this.long0+Math.atan2(t.x*n,e*this.cos_p12*r-t.y*this.sin_p12*n))),t.x=s,t.y=o,t}return l=Ie(this.es),h=Ae(this.es),u=Le(this.es),d=Fe(this.es),Math.abs(this.sin_p12-1)<=p?(o=ke(((f=this.a*Re(l,h,u,d,c))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,l,h,u,d),s=$(this.long0+Math.atan2(t.x,-1*t.y)),t.x=s,t.y=o,t):Math.abs(this.sin_p12+1)<=p?(f=this.a*Re(l,h,u,d,c),o=ke(((e=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,l,h,u,d),s=$(this.long0+Math.atan2(t.x,t.y)),t.x=s,t.y=o,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),_=Math.atan2(t.x,t.y),g=Oe(this.a,this.e,this.sin_p12),y=Math.cos(_),v=-(x=this.e*this.cos_p12*y)*x/(1-this.es),E=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),S=1-v*(w=(b=e/g)-v*(1+v)*Math.pow(b,3)/6-E*(1+3*v)*Math.pow(b,4)/24)*w/2-b*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*y),s=$(this.long0+Math.asin(Math.sin(_)*Math.sin(w)/Math.cos(m))),C=Math.sin(m),o=Math.atan2((C-this.es*S*this.sin_p12)*Math.tan(m),C*(1-this.es)),t.x=s,t.y=o,t)},names:["Azimuthal_Equidistant","aeqd"]};var si={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,n,r,s,o,a,l=t.x,h=t.y;return n=$(l-this.long0),e=Math.sin(h),i=Math.cos(h),r=Math.cos(n),1,((s=this.sin_p14*e+this.cos_p14*i*r)>0||Math.abs(s)<=p)&&(o=1*this.a*i*Math.sin(n),a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*r)),t.x=o,t.y=a,t},inverse:function(t){var e,i,n,r,s,o,a;return t.x-=this.x0,t.y-=this.y0,i=Xe((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(i),r=Math.cos(i),o=this.long0,Math.abs(e)<=p?(a=this.lat0,t.x=o,t.y=a,t):(a=Xe(r*this.sin_p14+t.y*n*this.cos_p14/e),s=Math.abs(this.lat0)-c,Math.abs(s)<=p?(o=this.lat0>=0?$(this.long0+Math.atan2(t.x,-t.y)):$(this.long0-Math.atan2(-t.x,t.y)),t.x=o,t.y=a,t):(o=$(this.long0+Math.atan2(t.x*n,e*this.cos_p14*r-t.y*this.sin_p14*n)),t.x=o,t.y=a,t))},names:["ortho"]},oi=1,ai=2,li=3,hi=4,ui=5,ci=6,di={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function fi(t,e,i,n){var r;return t y&&r<=c+y?(n.value=di.AREA_1,r-=c):r>c+y||r<=-(c+y)?(n.value=di.AREA_2,r=r>=0?r-v:r+v):(n.value=di.AREA_3,r+=c)),r}function gi(t,e){var i=t+e;return i<-v?i+=x:i>+v&&(i-=x),i}var pi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=c-y/2?this.face=ui:this.lat0<=-(c-y/2)?this.face=ci:Math.abs(this.long0)<=y?this.face=oi:Math.abs(this.long0)<=c+y?this.face=this.long0>0?ai:hi:this.face=li,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,n,r,s,o,a={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===ui)r=c-e,i>=y&&i<=c+y?(l.value=di.AREA_0,n=i-c):i>c+y||i<=-(c+y)?(l.value=di.AREA_1,n=i>0?i-v:i+v):i>-(c+y)&&i<=-y?(l.value=di.AREA_2,n=i+c):(l.value=di.AREA_3,n=i);else if(this.face===ci)r=c+e,i>=y&&i<=c+y?(l.value=di.AREA_0,n=-i+c):i 1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,n,r,s=t.x,o=t.y;if(s-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var a=this.radius_p/ge(this.radius_p*Math.cos(o),Math.sin(o));if(i=a*Math.cos(s)*Math.cos(o),n=a*Math.sin(s)*Math.cos(o),r=a*Math.sin(o),(this.radius_g-i)*i-n*n-r*r*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ge(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(r/ge(n,e)))}else"sphere"===this.shape&&(e=Math.cos(o),i=Math.cos(s)*e,n=Math.sin(s)*e,r=Math.sin(o),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ge(r,e)),t.y=this.radius_g_1*Math.atan(r/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(r/ge(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,n,r,s=-1,o=0,a=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(a=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*ge(1,a)):(o=Math.tan(t.x/this.radius_g_1),a=Math.tan(t.y/this.radius_g_1)*ge(1,o));var l=a/this.radius_p;if(e=o*o+l*l+s*s,(n=(i=2*this.radius_g*s)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;r=(-i-Math.sqrt(n))/(2*e),s=this.radius_g+r*s,o*=r,a*=r,t.x=Math.atan2(o,s),t.y=Math.atan(a*Math.cos(t.x)/s),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(a=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+a*a)):(o=Math.tan(t.x/this.radius_g_1),a=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),e=o*o+a*a+s*s,(n=(i=2*this.radius_g*s)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;r=(-i-Math.sqrt(n))/(2*e),s=this.radius_g+r*s,o*=r,a*=r,t.x=Math.atan2(o,s),t.y=Math.atan(a*Math.cos(t.x)/s)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};Rt.defaultDatum="WGS84",Rt.Proj=gt,Rt.WGS84=new Rt.Proj("WGS84"),Rt.Point=Yt,Rt.toPoint=wt,Rt.defs=z,Rt.nadgrid=function(t,e){var i=new DataView(e),n=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0),11!==e&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(i),r=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:ht(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(i,n),s=function(t,e,i){for(var n=176,r=[],s=0;s0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=xi?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=o`+this.createMarker("relative")+(n%2==0||2===s?this.createStepText(n,t,!1,e,i):"")+"")}a.push(this.createStepText(s,t,!0,e,i));return(this.scaleBarText_?`=0;s--){const i=n[s][0];if((0,d.r4)(new o.Z(i).getExtent(),new o.Z(t).getExtent())){n[s].push(t),e=!0;break}}e||n.push([t.reverse()])}return n}(e.rings,n);1===r.length?(i="Polygon",t=Object.assign({},t,{rings:r[0]})):(i="MultiPolygon",t=Object.assign({},t,{rings:r}))}const n=y[i];return(0,_.fI)(n(t),!1,e)}function b(t){let e="XY";return!0===t.hasZ&&!0===t.hasM?e="XYZM":!0===t.hasZ?e="XYZ":!0===t.hasM&&(e="XYM"),e}function w(t){const e=t.getLayout();return{hasZ:"XYZ"===e||"XYZM"===e,hasM:"XYM"===e||"XYZM"===e}}function S(t,e){return(0,x[t.getType()])((0,_.fI)(t,!0,e),e)}e.Z=v},15113:function(t,e,i){"use strict";i.d(e,{YU:function(){return x},fI:function(){return p},lj:function(){return m},zg:function(){return y}});var n=i(79619),r=i(33321),s=i(47051),o=i(15925),a=i(23814),l=i(16667),h=i(54729),u=i(58105),c=i(54017),d=i(22765),f=i(81625),g=i(71313);function p(t,e,i){const n=i?(0,f.U2)(i.featureProjection):null,r=i?(0,f.U2)(i.dataProjection):null;let s=t;if(n&&r&&!(0,f.OP)(n,r)){e&&(s=t.clone());const i=e?n:r,o=e?r:n;"tile-pixels"===i.getUnits()?s.transform(i,o):s.applyTransform((0,f.Ck)(i,o))}if(e&&i&&void 0!==i.decimals){const e=Math.pow(10,i.decimals),n=function(t){for(let i=0,n=t.length;i=i?n-=i:n<0&&(n+=i);let s=n+1;s>=i&&(s-=i);const o=t[n],a=o[0],l=o[1],h=t[s];return[a+(h[0]-a)*r,l+(h[1]-l)*r]}class j extends m.Z{constructor(t){const e=t;e.stopDown||(e.stopDown=v.Dv),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:v.uX,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const r=e||new n.Z([NaN,NaN]),s=(0,T.Vs)(t[0],i),o=(0,C.bI)(s,(0,T.Vs)(t[t.length-1],i));r.setCenterAndRadius(s,Math.sqrt(o),this.geometryLayout_);const a=(0,T.Cs)();return a&&r.transform(i,a),r};else{let e;"Point"===t?e=p.Z:"LineString"===t?e=h.Z:"Polygon"===t&&(e=_.ZP),i=function(i,n,r){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new y.Z({source:new x.Z({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:U(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:E.rM,this.freehandCondition_,t.freehand?this.freehandCondition_=E.Bx:this.freehandCondition_=t.freehandCondition?t.freehandCondition:E.vY,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(l.Z.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?E.Bx:t:E.Fi,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===s.Z.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===c.Z.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===c.Z.POINTERDRAG){Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===c.Z.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===c.Z.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===c.Z.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===c.Z.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===c.Z.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new u.Z(c.Z.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,b.hI)([i,n]),s=this.traceSource_.getFeaturesInExtent(r);if(0===s.length)return;const o=function(t,e){const i=[];for(let n=0;n=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),this.geometryFunction_(r,e,i)):"Polygon"===s&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),n&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n&&this.finishDrawing()}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let r=0;r{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}r=r&&"ready"==i}const s=this.renderSources(t,n);if(this.getRenderer().renderComplete&&r)return this.renderedResolution_=i.resolution,s;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return s}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=h(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}u.prototype.dispose,e.Z=u},2896:function(t,e,i){"use strict";i.d(e,{$6:function(){return r},Gg:function(){return o},VW:function(){return s}});var n=i(81625);function r(t,e){return[[-1/0,-1/0,1/0,1/0]]}function s(t,e){return[t]}function o(t){return function(e,i,r){const s=t.getZForResolution((0,n.oK)(i,r)),o=t.getTileRangeForExtentAndZ((0,n.dY)(e,r),s),a=[],l=[s,0,0];for(l[1]=o.minX;l[1]<=o.maxX;++l[1])for(l[2]=o.minY;l[2]<=o.maxY;++l[2])a.push((0,n.Fj)(t.getTileCoordExtent(l),r));return a}}},63312:function(t,e,i){"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function r(t,e,i,n,r,o){const a=r-i,l=o-n;if(0!==a||0!==l){const s=((t-i)*a+(e-n)*l)/(a*a+l*l);s>1?(i=r,n=o):s>0&&(i+=a*s,n+=l*s)}return s(t,e,i,n)}function s(t,e,i,n){const r=i-t,s=n-e;return r*r+s*s}function o(t){const e=t.length;for(let i=0;i