UNPKG

terriajs

Version:

Geospatial data visualization platform.

1 lines 266 kB
(self.webpackChunkterriajs=self.webpackChunkterriajs||[]).push([[873],{35968:(t,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>Xa});var i=6378137,h=.0066943799901413165,_=484813681109536e-20,n=Math.PI/2,l=1e-10,o=.017453292519943295,e=57.29577951308232,r=Math.PI/4,k=2*Math.PI,u=3.14159265359,c={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const M={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.01},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var y=/[\s_\-\/\(\)]/g;function x(t,a){if(t[a])return t[a];for(var s,i=Object.keys(t),h=a.toLowerCase().replace(y,""),_=-1;++_<i.length;)if((s=i[_]).toLowerCase().replace(y,"")===h)return t[s]}function f(t){var a,s,i,h={},_=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,a){var s=a.split("=");return s.push(!0),t[s[0].toLowerCase()]=s[1],t}),{}),n={proj:"projName",datum:"datumCode",rf:function(t){h.rf=parseFloat(t)},lat_0:function(t){h.lat0=t*o},lat_1:function(t){h.lat1=t*o},lat_2:function(t){h.lat2=t*o},lat_ts:function(t){h.lat_ts=t*o},lon_0:function(t){h.long0=t*o},lon_1:function(t){h.long1=t*o},lon_2:function(t){h.long2=t*o},alpha:function(t){h.alpha=parseFloat(t)*o},gamma:function(t){h.rectified_grid_angle=parseFloat(t)},lonc:function(t){h.longc=t*o},x_0:function(t){h.x0=parseFloat(t)},y_0:function(t){h.y0=parseFloat(t)},k_0:function(t){h.k0=parseFloat(t)},k:function(t){h.k0=parseFloat(t)},a:function(t){h.a=parseFloat(t)},b:function(t){h.b=parseFloat(t)},r:function(t){h.a=h.b=parseFloat(t)},r_a:function(){h.R_A=!0},zone:function(t){h.zone=parseInt(t,10)},south:function(){h.utmSouth=!0},towgs84:function(t){h.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){h.to_meter=parseFloat(t)},units:function(t){h.units=t;var a=x(M,t);a&&(h.to_meter=a.to_meter)},from_greenwich:function(t){h.from_greenwich=t*o},pm:function(t){var a=x(c,t);h.from_greenwich=(a||parseFloat(t))*o},nadgrids:function(t){"@null"===t?h.datumCode="none":h.nadgrids=t},axis:function(t){var a="ewnsud";3===t.length&&-1!==a.indexOf(t.substr(0,1))&&-1!==a.indexOf(t.substr(1,1))&&-1!==a.indexOf(t.substr(2,1))&&(h.axis=t)},approx:function(){h.approx=!0}};for(a in _)s=_[a],a in n?"function"==typeof(i=n[a])?i(s):h[i]=s:h[a]=s;return"string"==typeof h.datumCode&&"WGS84"!==h.datumCode&&(h.datumCode=h.datumCode.toLowerCase()),h}var p=1,m=/\s/,d=/[A-Za-z]/,g=/[A-Za-z84_]/,w=/[,\]]/,v=/[\d\.E\-\+]/;function b(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=p}function N(t,a,s){Array.isArray(a)&&(s.unshift(a),a=null);var i=a?{}:t,h=s.reduce((function(t,a){return C(a,t),t}),i);a&&(t[a]=h)}function C(t,a){if(Array.isArray(t)){var s=t.shift();if("PARAMETER"===s&&(s=t.shift()),1===t.length)return Array.isArray(t[0])?(a[s]={},void C(t[0],a[s])):void(a[s]=t[0]);if(t.length)if("TOWGS84"!==s){if("AXIS"===s)return s in a||(a[s]=[]),void a[s].push(t);var i;switch(Array.isArray(s)||(a[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":return a[s]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&C(t[2],a[s]));case"SPHEROID":case"ELLIPSOID":return a[s]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&C(t[3],a[s]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void N(a,s,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],N(a,s,t),void(a[s].type=s);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return C(t,a[s]);return N(a,s,t)}}else a[s]=t;else a[s]=!0}else a[t]=!0}b.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;m.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case p:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},b.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(w.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},b.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=p)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=p,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},b.prototype.number=function(t){if(!v.test(t)){if(w.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},b.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},b.prototype.keyword=function(t){if(g.test(t))this.word+=t;else{if("["===t){var a=[];return a.push(this.word),this.level++,null===this.root?this.root=a:this.currentObject.push(a),this.stack.push(this.currentObject),this.currentObject=a,void(this.state=p)}if(!w.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},b.prototype.neutral=function(t){if(d.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(v.test(t))return this.word=t,void(this.state=3);if(!w.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},b.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var S=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function E(t){return.017453292519943295*t}function P(t){for(var a=Object.keys(t),s=0,i=a.length;s<i;++s){var h=a[s];-1!==S.indexOf(h)&&I(t[h]),"object"==typeof t[h]&&P(t[h])}}function I(t){if(t.AUTHORITY){var a=Object.keys(t.AUTHORITY)[0];a&&a in t.AUTHORITY&&(t.title=a+":"+t.AUTHORITY[a])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var s="",i=0,h=t.AXIS.length;i<h;++i){var _=[t.AXIS[i][0].toLowerCase(),t.AXIS[i][1].toLowerCase()];-1!==_[0].indexOf("north")||("y"===_[0]||"lat"===_[0])&&"north"===_[1]?s+="n":-1!==_[0].indexOf("south")||("y"===_[0]||"lat"===_[0])&&"south"===_[1]?s+="s":-1!==_[0].indexOf("east")||("x"===_[0]||"lon"===_[0])&&"east"===_[1]?s+="e":-1===_[0].indexOf("west")&&("x"!==_[0]&&"lon"!==_[0]||"west"!==_[1])||(s+="w")}2===s.length&&(s+="u"),3===s.length&&(t.axis=s)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var n=t.GEOGCS;function l(a){return a*(t.to_meter||1)}"GEOGCS"===t.type&&(n=t),n&&(n.DATUM?t.datumCode=n.DATUM.name.toLowerCase():t.datumCode=n.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),n.DATUM&&n.DATUM.SPHEROID&&(t.ellps=n.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=n.DATUM.SPHEROID.a,t.rf=parseFloat(n.DATUM.SPHEROID.rf,10)),n.DATUM&&n.DATUM.TOWGS84&&(t.datum_params=n.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",E],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",E],["x0","false_easting",l],["y0","false_northing",l],["long0","central_meridian",E],["lat0","latitude_of_origin",E],["lat0","standard_parallel_1",E],["lat1","standard_parallel_1",E],["lat2","standard_parallel_2",E],["azimuth","Azimuth"],["alpha","azimuth",E],["srsCode","name"]].forEach((function(a){return function(t,a){var s=a[0],i=a[1];!(s in t)&&i in t&&(t[s]=t[i],3===a.length&&(t[s]=a[2](t[s])))}(t,a)})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName?!t.lat_ts&&t.lat0&&"Polar_Stereographic"===t.projName&&(t.lat_ts=t.lat0,t.lat0=E(t.lat0>0?90:-90)):(t.lat0=E(t.lat1>0?90:-90),t.lat_ts=t.lat1)}function O(t){var a=new b(t).output(),s=a[0],i={};return C(a,i),P(i),i[s]}function q(t){var a=this;if(2===arguments.length){var s=arguments[1];"string"==typeof s?"+"===s.charAt(0)?q[t]=f(arguments[1]):q[t]=O(arguments[1]):q[t]=s}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?q.apply(a,t):q(t)}));if("string"==typeof t){if(t in q)return q[t]}else"EPSG"in t?q["EPSG:"+t.EPSG]=t:"ESRI"in t?q["ESRI:"+t.ESRI]=t:"IAU2000"in t?q["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var a=1;a<=60;++a)t("EPSG:"+(32600+a),"+proj=utm +zone="+a+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+a),"+proj=utm +zone="+a+" +south +datum=WGS84 +units=m");t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(q);const j=q;var z=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],A=["3857","900913","3785","102113"];function G(t,a){var s,i;if(t=t||{},!a)return t;for(i in a)void 0!==(s=a[i])&&(t[i]=s);return t}function R(t,a,s){var i=t*a;return s/Math.sqrt(1-i*i)}function L(t){return t<0?-1:1}function T(t){return Math.abs(t)<=u?t:t-L(t)*k}function B(t,a,s){var i=t*s,h=.5*t;return i=Math.pow((1-i)/(1+i),h),Math.tan(.5*(n-a))/i}function D(t,a){for(var s,i,h=.5*t,_=n-2*Math.atan(a),l=0;l<=15;l++)if(s=t*Math.sin(_),_+=i=n-2*Math.atan(a*Math.pow((1-s)/(1+s),h))-_,Math.abs(i)<=1e-10)return _;return-9999}function F(t){return t}var U=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=R(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var a,s,i=t.x,h=t.y;if(h*e>90&&h*e<-90&&i*e>180&&i*e<-180)return null;if(Math.abs(Math.abs(h)-n)<=l)return null;if(this.sphere)a=this.x0+this.a*this.k0*T(i-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(r+.5*h));else{var _=Math.sin(h),o=B(this.e,h,_);a=this.x0+this.a*this.k0*T(i-this.long0),s=this.y0-this.a*this.k0*Math.log(o)}return t.x=a,t.y=s,t},inverse:function(t){var a,s,i=t.x-this.x0,h=t.y-this.y0;if(this.sphere)s=n-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var _=Math.exp(-h/(this.a*this.k0));if(-9999===(s=D(this.e,_)))return null}return a=T(this.long0+i/(this.a*this.k0)),t.x=a,t.y=s,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:F,inverse:F,names:["longlat","identity"]}],W={},Q=[];function H(t,a){var s=Q.length;return t.names?(Q[s]=t,t.names.forEach((function(t){W[t.toLowerCase()]=s})),this):(console.log(a),!0)}const X={start:function(){U.forEach(H)},add:H,get:function(t){if(!t)return!1;var a=t.toLowerCase();return void 0!==W[a]&&Q[W[a]]?Q[W[a]]:void 0}};var J={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},K=J.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};J.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var V={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};for(var Z in V){var Y=V[Z];V[Y.datumName]=Y}const $=V;var tt={};function at(t){if(0===t.length)return null;var a="@"===t[0];return a&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!a,grid:null,isNull:!0}:{name:t,mandatory:!a,grid:tt[t]||null,isNull:!1}}function st(t){return t/3600*Math.PI/180}function it(t,a,s){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(a,s)))}function ht(t){return t.map((function(t){return[st(t.longitudeShift),st(t.latitudeShift)]}))}function _t(t,a,s){return{name:it(t,a+8,a+16).trim(),parent:it(t,a+24,a+24+8).trim(),lowerLatitude:t.getFloat64(a+72,s),upperLatitude:t.getFloat64(a+88,s),lowerLongitude:t.getFloat64(a+104,s),upperLongitude:t.getFloat64(a+120,s),latitudeInterval:t.getFloat64(a+136,s),longitudeInterval:t.getFloat64(a+152,s),gridNodeCount:t.getInt32(a+168,s)}}function nt(t,a,s,i){for(var h=a+176,_=[],n=0;n<s.gridNodeCount;n++){var l={latitudeShift:t.getFloat32(h+16*n,i),longitudeShift:t.getFloat32(h+16*n+4,i),latitudeAccuracy:t.getFloat32(h+16*n+8,i),longitudeAccuracy:t.getFloat32(h+16*n+12,i)};_.push(l)}return _}function lt(t,a){if(!(this instanceof lt))return new lt(t);a=a||function(t){if(t)throw t};var s=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in j}(t))return j[t];if(function(t){return z.some((function(a){return t.indexOf(a)>-1}))}(t)){var a=O(t);if(function(t){var a=x(t,"authority");if(a){var s=x(a,"epsg");return s&&A.indexOf(s)>-1}}(a))return j["EPSG:3857"];var s=function(t){var a=x(t,"extension");if(a)return x(a,"proj4")}(a);return s?f(s):a}return function(t){return"+"===t[0]}(t)?f(t):void 0}(t);if("object"==typeof s){var i=lt.projections.get(s.projName);if(i){if(s.datumCode&&"none"!==s.datumCode){var h=x($,s.datumCode);h&&(s.datum_params=s.datum_params||(h.towgs84?h.towgs84.split(","):null),s.ellps=h.ellipse,s.datumName=h.datumName?h.datumName:s.datumCode)}s.k0=s.k0||1,s.axis=s.axis||"enu",s.ellps=s.ellps||"wgs84",s.lat1=s.lat1||s.lat0;var n,o,e,r,k,u,c=function(t,a,s,i,h){if(!t){var _=x(J,i);_||(_=K),t=_.a,a=_.b,s=_.rf}return s&&!a&&(a=(1-1/s)*t),(0===s||Math.abs(t-a)<l)&&(h=!0,a=t),{a:t,b:a,rf:s,sphere:h}}(s.a,s.b,s.rf,s.ellps,s.sphere),M=(n=c.a,o=c.b,c.rf,k=((e=n*n)-(r=o*o))/e,u=0,s.R_A?(e=(n*=1-k*(.16666666666666666+k*(.04722222222222222+.022156084656084655*k)))*n,k=0):u=Math.sqrt(k),{es:k,e:u,ep2:(e-r)/r}),y=function(t){return void 0===t?null:t.split(",").map(at)}(s.nadgrids),p=s.datum||function(t,a,s,i,h,n,l){var o={};return o.datum_type=void 0===t||"none"===t?5:4,a&&(o.datum_params=a.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=1),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=_,o.datum_params[4]*=_,o.datum_params[5]*=_,o.datum_params[6]=o.datum_params[6]/1e6+1))),l&&(o.datum_type=3,o.grids=l),o.a=s,o.b=i,o.es=h,o.ep2=n,o}(s.datumCode,s.datum_params,c.a,c.b,M.es,M.ep2,y);G(this,s),G(this,i),this.a=c.a,this.b=c.b,this.rf=c.rf,this.sphere=c.sphere,this.es=M.es,this.e=M.e,this.ep2=M.ep2,this.datum=p,this.init(),a(null,this)}else a("Could not get projection name from: "+t)}else a("Could not parse to valid json: "+t)}lt.projections=X,lt.projections.start();const ot=lt;function et(t,a,s){var i,h,_,l,o=t.x,e=t.y,r=t.z?t.z:0;if(e<-n&&e>-1.001*n)e=-n;else if(e>n&&e<1.001*n)e=n;else{if(e<-n)return{x:-1/0,y:-1/0,z:t.z};if(e>n)return{x:1/0,y:1/0,z:t.z}}return o>Math.PI&&(o-=2*Math.PI),h=Math.sin(e),l=Math.cos(e),_=h*h,{x:((i=s/Math.sqrt(1-a*_))+r)*l*Math.cos(o),y:(i+r)*l*Math.sin(o),z:(i*(1-a)+r)*h}}function rt(t,a,s,i){var h,_,n,l,o,e,r,k,u,c,M,y,x,f,p,m=t.x,d=t.y,g=t.z?t.z:0;if(h=Math.sqrt(m*m+d*d),_=Math.sqrt(m*m+d*d+g*g),h/s<1e-12){if(f=0,_/s<1e-12)return p=-i,{x:t.x,y:t.y,z:t.z}}else f=Math.atan2(d,m);n=g/_,k=(l=h/_)*(1-a)*(o=1/Math.sqrt(1-a*(2-a)*l*l)),u=n*o,x=0;do{x++,e=a*(r=s/Math.sqrt(1-a*u*u))/(r+(p=h*k+g*u-r*(1-a*u*u))),y=(M=n*(o=1/Math.sqrt(1-e*(2-e)*l*l)))*k-(c=l*(1-e)*o)*u,k=c,u=M}while(y*y>1e-24&&x<30);return{x:f,y:Math.atan(M/Math.abs(c)),z:p}}function kt(t){return 1===t||2===t}function ut(t,a,s){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var i={x:-s.x,y:s.y},h={x:Number.NaN,y:Number.NaN},_=[];t:for(var n=0;n<t.grids.length;n++){var l=t.grids[n];if(_.push(l.name),l.isNull){h=i;break}if(l.mandatory,null!==l.grid)for(var o=l.grid.subgrids,r=0,k=o.length;r<k;r++){var u=o[r],c=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,M=u.ll[0]-c,y=u.ll[1]-c,x=u.ll[0]+(u.lim[0]-1)*u.del[0]+c,f=u.ll[1]+(u.lim[1]-1)*u.del[1]+c;if(!(y>i.y||M>i.x||f<i.y||x<i.x||(h=ct(i,a,u),isNaN(h.x))))break t}else if(l.mandatory)return console.log("Unable to find mandatory grid '"+l.name+"'"),-1}return isNaN(h.x)?(console.log("Failed to find a grid shift table for location '"+-i.x*e+" "+i.y*e+" tried: '"+_+"'"),-1):(s.x=-h.x,s.y=h.y,0)}function ct(t,a,s){var i={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return i;var h={x:t.x,y:t.y};h.x-=s.ll[0],h.y-=s.ll[1],h.x=T(h.x-Math.PI)+Math.PI;var _=Mt(h,s);if(a){if(isNaN(_.x))return i;_.x=h.x-_.x,_.y=h.y-_.y;var n,l,o=9;do{if(l=Mt(_,s),isNaN(l.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}n={x:h.x-(l.x+_.x),y:h.y-(l.y+_.y)},_.x+=n.x,_.y+=n.y}while(o--&&Math.abs(n.x)>1e-12&&Math.abs(n.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),i;i.x=T(_.x+s.ll[0]),i.y=_.y+s.ll[1]}else isNaN(_.x)||(i.x=t.x+_.x,i.y=t.y+_.y);return i}function Mt(t,a){var s,i={x:t.x/a.del[0],y:t.y/a.del[1]},h=Math.floor(i.x),_=Math.floor(i.y),n=i.x-1*h,l=i.y-1*_,o={x:Number.NaN,y:Number.NaN};if(h<0||h>=a.lim[0])return o;if(_<0||_>=a.lim[1])return o;s=_*a.lim[0]+h;var e=a.cvs[s][0],r=a.cvs[s][1];s++;var k=a.cvs[s][0],u=a.cvs[s][1];s+=a.lim[0];var c=a.cvs[s][0],M=a.cvs[s][1];s--;var y=a.cvs[s][0],x=a.cvs[s][1],f=n*l,p=n*(1-l),m=(1-n)*(1-l),d=(1-n)*l;return o.x=m*e+p*k+d*y+f*c,o.y=m*r+p*u+d*x+f*M,o}function yt(t,a,s){var i,h,_,n=s.x,l=s.y,o=s.z||0,e={};for(_=0;_<3;_++)if(!a||2!==_||void 0!==s.z)switch(0===_?(i=n,h=-1!=="ew".indexOf(t.axis[_])?"x":"y"):1===_?(i=l,h=-1!=="ns".indexOf(t.axis[_])?"y":"x"):(i=o,h="z"),t.axis[_]){case"e":case"n":e[h]=i;break;case"w":case"s":e[h]=-i;break;case"u":void 0!==s[h]&&(e.z=i);break;case"d":void 0!==s[h]&&(e.z=-i);break;default:return null}return e}function xt(t){var a={x:t[0],y:t[1]};return t.length>2&&(a.z=t[2]),t.length>3&&(a.m=t[3]),a}function ft(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function pt(t,a,s,_){var n,l=void 0!==(s=Array.isArray(s)?xt(s):{x:s.x,y:s.y,z:s.z,m:s.m}).z;if(function(t){ft(t.x),ft(t.y)}(s),t.datum&&a.datum&&function(t,a){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==a.datumCode||(1===a.datum.datum_type||2===a.datum.datum_type||3===a.datum.datum_type)&&"WGS84"!==t.datumCode}(t,a)&&(s=pt(t,n=new ot("WGS84"),s,_),t=n),_&&"enu"!==t.axis&&(s=yt(t,!1,s)),"longlat"===t.projName)s={x:s.x*o,y:s.y*o,z:s.z||0};else if(t.to_meter&&(s={x:s.x*t.to_meter,y:s.y*t.to_meter,z:s.z||0}),!(s=t.inverse(s)))return;if(t.from_greenwich&&(s.x+=t.from_greenwich),s=function(t,a,s){if(function(t,a){return t.datum_type===a.datum_type&&!(t.a!==a.a||Math.abs(t.es-a.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===a.datum_params[0]&&t.datum_params[1]===a.datum_params[1]&&t.datum_params[2]===a.datum_params[2]:2!==t.datum_type||t.datum_params[0]===a.datum_params[0]&&t.datum_params[1]===a.datum_params[1]&&t.datum_params[2]===a.datum_params[2]&&t.datum_params[3]===a.datum_params[3]&&t.datum_params[4]===a.datum_params[4]&&t.datum_params[5]===a.datum_params[5]&&t.datum_params[6]===a.datum_params[6])}(t,a))return s;if(5===t.datum_type||5===a.datum_type)return s;var _=t.a,n=t.es;if(3===t.datum_type){if(0!==ut(t,!1,s))return;_=i,n=h}var l=a.a,o=a.b,e=a.es;return 3===a.datum_type&&(l=i,o=6356752.314,e=h),n!==e||_!==l||kt(t.datum_type)||kt(a.datum_type)?(s=et(s,n,_),kt(t.datum_type)&&(s=function(t,a,s){if(1===a)return{x:t.x+s[0],y:t.y+s[1],z:t.z+s[2]};if(2===a){var i=s[0],h=s[1],_=s[2],n=s[3],l=s[4],o=s[5],e=s[6];return{x:e*(t.x-o*t.y+l*t.z)+i,y:e*(o*t.x+t.y-n*t.z)+h,z:e*(-l*t.x+n*t.y+t.z)+_}}}(s,t.datum_type,t.datum_params)),kt(a.datum_type)&&(s=function(t,a,s){if(1===a)return{x:t.x-s[0],y:t.y-s[1],z:t.z-s[2]};if(2===a){var i=s[0],h=s[1],_=s[2],n=s[3],l=s[4],o=s[5],e=s[6],r=(t.x-i)/e,k=(t.y-h)/e,u=(t.z-_)/e;return{x:r+o*k-l*u,y:-o*r+k+n*u,z:l*r-n*k+u}}}(s,a.datum_type,a.datum_params)),s=rt(s,e,l,o),3!==a.datum_type||0===ut(a,!0,s)?s:void 0):s}(t.datum,a.datum,s))return a.from_greenwich&&(s={x:s.x-a.from_greenwich,y:s.y,z:s.z||0}),"longlat"===a.projName?s={x:s.x*e,y:s.y*e,z:s.z||0}:(s=a.forward(s),a.to_meter&&(s={x:s.x/a.to_meter,y:s.y/a.to_meter,z:s.z||0})),_&&"enu"!==a.axis?yt(a,!0,s):(s&&!l&&delete s.z,s)}var mt=ot("WGS84");function dt(t,a,s,i){var h,_,n;return Array.isArray(s)?(h=pt(t,a,s,i)||{x:NaN,y:NaN},s.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==a.name&&"geocent"===a.name?"number"==typeof h.z?[h.x,h.y,h.z].concat(s.slice(3)):[h.x,h.y,s[2]].concat(s.slice(3)):[h.x,h.y].concat(s.slice(2)):[h.x,h.y]):(_=pt(t,a,s,i),2===(n=Object.keys(s)).length||n.forEach((function(i){if(void 0!==t.name&&"geocent"===t.name||void 0!==a.name&&"geocent"===a.name){if("x"===i||"y"===i||"z"===i)return}else if("x"===i||"y"===i)return;_[i]=s[i]})),_)}function gt(t){return t instanceof ot?t:t.oProj?t.oProj:ot(t)}const wt=function(t,a,s){t=gt(t);var i,h=!1;return void 0===a?(a=t,t=mt,h=!0):(void 0!==a.x||Array.isArray(a))&&(s=a,a=t,t=mt,h=!0),a=gt(a),s?dt(t,a,s):(i={forward:function(s,i){return dt(t,a,s,i)},inverse:function(s,i){return dt(a,t,s,i)}},h&&(i.oProj=a),i)};var vt=s(73367);function bt(t,a,s){if(!(this instanceof bt))return new bt(t,a,s);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===a){var i=t.split(",");this.x=parseFloat(i[0],10),this.y=parseFloat(i[1],10),this.z=parseFloat(i[2],10)||0}else this.x=t,this.y=a,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}bt.fromMGRS=function(t){return new bt((0,vt.gK)(t))},bt.prototype.toMGRS=function(t){return(0,vt.sY)([this.x,this.y],t)};const Nt=bt;var Ct=.046875,St=.01953125,Et=.01068115234375;function Pt(t){var a=[];a[0]=1-t*(.25+t*(Ct+t*(St+t*Et))),a[1]=t*(.75-t*(Ct+t*(St+t*Et)));var s=t*t;return a[2]=s*(.46875-t*(.013020833333333334+.007120768229166667*t)),s*=t,a[3]=s*(.3645833333333333-.005696614583333333*t),a[4]=s*t*.3076171875,a}function It(t,a,s,i){return s*=a,a*=a,i[0]*t-s*(i[1]+a*(i[2]+a*(i[3]+a*i[4])))}function Ot(t,a,s){for(var i=1/(1-a),h=t,_=20;_;--_){var n=Math.sin(h),o=1-a*n*n;if(h-=o=(It(h,n,Math.cos(h),s)-t)*(o*Math.sqrt(o))*i,Math.abs(o)<l)return h}return h}const qt={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Pt(this.es),this.ml0=It(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var a,s,i,h=t.x,_=t.y,n=T(h-this.long0),o=Math.sin(_),e=Math.cos(_);if(this.es){var r=e*n,k=Math.pow(r,2),u=this.ep2*Math.pow(e,2),c=Math.pow(u,2),M=Math.abs(e)>l?Math.tan(_):0,y=Math.pow(M,2),x=Math.pow(y,2);a=1-this.es*Math.pow(o,2),r/=Math.sqrt(a);var f=It(_,o,e,this.en);s=this.a*(this.k0*r*(1+k/6*(1-y+u+k/20*(5-18*y+x+14*u-58*y*u+k/42*(61+179*x-x*y-479*y)))))+this.x0,i=this.a*(this.k0*(f-this.ml0+o*n*r/2*(1+k/12*(5-y+9*u+4*c+k/30*(61+x-58*y+270*u-330*y*u+k/56*(1385+543*x-x*y-3111*y))))))+this.y0}else{var p=e*Math.sin(n);if(Math.abs(Math.abs(p)-1)<l)return 93;if(s=.5*this.a*this.k0*Math.log((1+p)/(1-p))+this.x0,i=e*Math.cos(n)/Math.sqrt(1-Math.pow(p,2)),(p=Math.abs(i))>=1){if(p-1>l)return 93;i=0}else i=Math.acos(i);_<0&&(i=-i),i=this.a*this.k0*(i-this.lat0)+this.y0}return t.x=s,t.y=i,t},inverse:function(t){var a,s,i,h,_=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(s=Ot(a=this.ml0+o/this.k0,this.es,this.en),Math.abs(s)<n){var e=Math.sin(s),r=Math.cos(s),k=Math.abs(r)>l?Math.tan(s):0,u=this.ep2*Math.pow(r,2),c=Math.pow(u,2),M=Math.pow(k,2),y=Math.pow(M,2);a=1-this.es*Math.pow(e,2);var x=_*Math.sqrt(a)/this.k0,f=Math.pow(x,2);i=s-(a*=k)*f/(1-this.es)*.5*(1-f/12*(5+3*M-9*u*M+u-4*c-f/30*(61+90*M-252*u*M+45*y+46*u-f/56*(1385+3633*M+4095*y+1574*y*M)))),h=T(this.long0+x*(1-f/6*(1+2*M+u-f/20*(5+28*M+24*y+8*u*M+6*u-f/42*(61+662*M+1320*y+720*y*M))))/r)}else i=n*L(o),h=0;else{var p=Math.exp(_/this.k0),m=.5*(p-1/p),d=this.lat0+o/this.k0,g=Math.cos(d);a=Math.sqrt((1-Math.pow(g,2))/(1+Math.pow(m,2))),i=Math.asin(a),o<0&&(i=-i),h=0===m&&0===g?0:T(Math.atan2(m,g)+this.long0)}return t.x=h,t.y=i,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function jt(t){var a=Math.exp(t);return(a-1/a)/2}function zt(t,a){t=Math.abs(t),a=Math.abs(a);var s=Math.max(t,a),i=Math.min(t,a)/(s||1);return s*Math.sqrt(1+Math.pow(i,2))}function At(t,a){for(var s,i=2*Math.cos(2*a),h=t.length-1,_=t[h],n=0;--h>=0;)s=i*_-n+t[h],n=_,_=s;return a+s*Math.sin(2*a)}function Gt(t,a,s){for(var i,h,_=Math.sin(a),n=Math.cos(a),l=jt(s),o=function(t){var a=Math.exp(t);return(a+1/a)/2}(s),e=2*n*o,r=-2*_*l,k=t.length-1,u=t[k],c=0,M=0,y=0;--k>=0;)i=M,h=c,u=e*(M=u)-i-r*(c=y)+t[k],y=r*M-h+e*c;return[(e=_*o)*u-(r=n*l)*y,e*y+r*u]}const Rt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(qt.init.apply(this),this.forward=qt.forward,this.inverse=qt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),a=t/(2-t),s=a;this.cgb[0]=a*(2+a*(-2/3+a*(a*(116/45+a*(26/45+a*(-2854/675)))-2))),this.cbg[0]=a*(a*(2/3+a*(4/3+a*(-82/45+a*(32/45+a*(4642/4725)))))-2),s*=a,this.cgb[1]=s*(7/3+a*(a*(-227/45+a*(2704/315+a*(2323/945)))-1.6)),this.cbg[1]=s*(5/3+a*(-16/15+a*(-13/9+a*(904/315+a*(-1522/945))))),s*=a,this.cgb[2]=s*(56/15+a*(-136/35+a*(-1262/105+a*(73814/2835)))),this.cbg[2]=s*(-26/15+a*(34/21+a*(1.6+a*(-12686/2835)))),s*=a,this.cgb[3]=s*(4279/630+a*(-332/35+a*(-399572/14175))),this.cbg[3]=s*(1237/630+a*(a*(-24832/14175)-2.4)),s*=a,this.cgb[4]=s*(4174/315+a*(-144838/6237)),this.cbg[4]=s*(-734/315+a*(109598/31185)),s*=a,this.cgb[5]=s*(601676/22275),this.cbg[5]=s*(444337/155925),s=Math.pow(a,2),this.Qn=this.k0/(1+a)*(1+s*(1/4+s*(1/64+s/256))),this.utg[0]=a*(a*(2/3+a*(-37/96+a*(1/360+a*(81/512+a*(-96199/604800)))))-.5),this.gtu[0]=a*(.5+a*(-2/3+a*(5/16+a*(41/180+a*(-127/288+a*(7891/37800)))))),this.utg[1]=s*(-1/48+a*(-1/15+a*(437/1440+a*(-46/105+a*(1118711/3870720))))),this.gtu[1]=s*(13/48+a*(a*(557/1440+a*(281/630+a*(-1983433/1935360)))-.6)),s*=a,this.utg[2]=s*(-17/480+a*(37/840+a*(209/4480+a*(-5569/90720)))),this.gtu[2]=s*(61/240+a*(-103/140+a*(15061/26880+a*(167603/181440)))),s*=a,this.utg[3]=s*(-4397/161280+a*(11/504+a*(830251/7257600))),this.gtu[3]=s*(49561/161280+a*(-179/168+a*(6601661/7257600))),s*=a,this.utg[4]=s*(-4583/161280+a*(108847/3991680)),this.gtu[4]=s*(34729/80640+a*(-3418889/1995840)),s*=a,this.utg[5]=s*(-20648693/638668800),this.gtu[5]=.6650675310896665*s;var i=At(this.cbg,this.lat0);this.Zb=-this.Qn*(i+function(t,a){for(var s,i=2*Math.cos(a),h=t.length-1,_=t[h],n=0;--h>=0;)s=i*_-n+t[h],n=_,_=s;return Math.sin(a)*s}(this.gtu,2*i))},forward:function(t){var a=T(t.x-this.long0),s=t.y;s=At(this.cbg,s);var i=Math.sin(s),h=Math.cos(s),_=Math.sin(a),n=Math.cos(a);s=Math.atan2(i,n*h),a=Math.atan2(_*h,zt(i,h*n)),a=function(t){var a=Math.abs(t);return a=function(t){var a=1+t,s=a-1;return 0===s?t:t*Math.log(a)/s}(a*(1+a/(zt(1,a)+1))),t<0?-a:a}(Math.tan(a));var l,o,e=Gt(this.gtu,2*s,2*a);return s+=e[0],a+=e[1],Math.abs(a)<=2.623395162778?(l=this.a*(this.Qn*a)+this.x0,o=this.a*(this.Qn*s+this.Zb)+this.y0):(l=1/0,o=1/0),t.x=l,t.y=o,t},inverse:function(t){var a,s,i=(t.x-this.x0)*(1/this.a),h=(t.y-this.y0)*(1/this.a);if(h=(h-this.Zb)/this.Qn,i/=this.Qn,Math.abs(i)<=2.623395162778){var _=Gt(this.utg,2*h,2*i);h+=_[0],i+=_[1],i=Math.atan(jt(i));var n=Math.sin(h),l=Math.cos(h),o=Math.sin(i),e=Math.cos(i);h=Math.atan2(n*e,zt(o,e*l)),a=T((i=Math.atan2(o,e*l))+this.long0),s=At(this.cgb,h)}else a=1/0,s=1/0;return t.x=a,t.y=s,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},Lt={init:function(){var t=function(t,a){if(void 0===t){if((t=Math.floor(30*(T(a)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*o,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Rt.init.apply(this),this.forward=Rt.forward,this.inverse=Rt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Tt(t,a){return Math.pow((1-t)/(1+t),a)}const Bt={init:function(){var t=Math.sin(this.lat0),a=Math.cos(this.lat0);a*=a,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*a*a/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+r)/(Math.pow(Math.tan(.5*this.lat0+r),this.C)*Tt(this.e*t,this.ratexp))},forward:function(t){var a=t.x,s=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+r),this.C)*Tt(this.e*Math.sin(s),this.ratexp))-n,t.x=this.C*a,t},inverse:function(t){for(var a=t.x/this.C,s=t.y,i=Math.pow(Math.tan(.5*s+r)/this.K,1/this.C),h=20;h>0&&(s=2*Math.atan(i*Tt(this.e*Math.sin(t.y),-.5*this.e))-n,!(Math.abs(s-t.y)<1e-14));--h)t.y=s;return h?(t.x=a,t.y=s,t):null},names:["gauss"]},Dt={init:function(){Bt.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var a,s,i,h;return t.x=T(t.x-this.long0),Bt.forward.apply(this,[t]),a=Math.sin(t.y),s=Math.cos(t.y),i=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*a+this.cosc0*s*i),t.x=h*s*Math.sin(t.x),t.y=h*(this.cosc0*a-this.sinc0*s*i),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var a,s,i,h,_;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,_=zt(t.x,t.y)){var n=2*Math.atan2(_,this.R2);a=Math.sin(n),s=Math.cos(n),h=Math.asin(s*this.sinc0+t.y*a*this.cosc0/_),i=Math.atan2(t.x*a,_*this.cosc0*s-t.y*this.sinc0*a)}else h=this.phic0,i=0;return t.x=i,t.y=h,Bt.inverse.apply(this,[t]),t.x=T(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ft={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=l&&(this.k0=.5*(1+L(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=l&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=l&&Math.abs(Math.cos(this.lat_ts))>l&&(this.k0=.5*this.cons*R(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/B(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=R(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-n,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var a,s,i,h,_,o,e=t.x,r=t.y,k=Math.sin(r),u=Math.cos(r),c=T(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=l&&Math.abs(r+this.lat0)<=l?(t.x=NaN,t.y=NaN,t):this.sphere?(a=2*this.k0/(1+this.sinlat0*k+this.coslat0*u*Math.cos(c)),t.x=this.a*a*u*Math.sin(c)+this.x0,t.y=this.a*a*(this.coslat0*k-this.sinlat0*u*Math.cos(c))+this.y0,t):(s=2*Math.atan(this.ssfn_(r,k,this.e))-n,h=Math.cos(s),i=Math.sin(s),Math.abs(this.coslat0)<=l?(_=B(this.e,r*this.con,this.con*k),o=2*this.a*this.k0*_/this.cons,t.x=this.x0+o*Math.sin(e-this.long0),t.y=this.y0-this.con*o*Math.cos(e-this.long0),t):(Math.abs(this.sinlat0)<l?(a=2*this.a*this.k0/(1+h*Math.cos(c)),t.y=a*i):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*h*Math.cos(c))),t.y=a*(this.cosX0*i-this.sinX0*h*Math.cos(c))+this.y0),t.x=a*h*Math.sin(c)+this.x0,t))},inverse:function(t){var a,s,i,h,_;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var e=2*Math.atan(o/(2*this.a*this.k0));return a=this.long0,s=this.lat0,o<=l?(t.x=a,t.y=s,t):(s=Math.asin(Math.cos(e)*this.sinlat0+t.y*Math.sin(e)*this.coslat0/o),a=Math.abs(this.coslat0)<l?this.lat0>0?T(this.long0+Math.atan2(t.x,-1*t.y)):T(this.long0+Math.atan2(t.x,t.y)):T(this.long0+Math.atan2(t.x*Math.sin(e),o*this.coslat0*Math.cos(e)-t.y*this.sinlat0*Math.sin(e))),t.x=a,t.y=s,t)}if(Math.abs(this.coslat0)<=l){if(o<=l)return s=this.lat0,a=this.long0,t.x=a,t.y=s,t;t.x*=this.con,t.y*=this.con,i=o*this.cons/(2*this.a*this.k0),s=this.con*D(this.e,i),a=this.con*T(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else h=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),a=this.long0,o<=l?_=this.X0:(_=Math.asin(Math.cos(h)*this.sinX0+t.y*Math.sin(h)*this.cosX0/o),a=T(this.long0+Math.atan2(t.x*Math.sin(h),o*this.cosX0*Math.cos(h)-t.y*this.sinX0*Math.sin(h)))),s=-1*D(this.e,Math.tan(.5*(n+_)));return t.x=a,t.y=s,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function(t,a,s){return a*=s,Math.tan(.5*(n+t))*Math.pow((1-a)/(1+a),.5*s)}},Ut={init:function(){var t=this.lat0;this.lambda0=this.long0;var a=Math.sin(t),s=this.a,i=1/this.rf,h=2*i-Math.pow(i,2),_=this.e=Math.sqrt(h);this.R=this.k0*s*Math.sqrt(1-h)/(1-h*Math.pow(a,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(a/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+_*a)/(1-_*a));this.K=n-this.alpha*l+this.alpha*_/2*o},forward:function(t){var a=Math.log(Math.tan(Math.PI/4-t.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),i=-this.alpha*(a+s)+this.K,h=2*(Math.atan(Math.exp(i))-Math.PI/4),_=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(_)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(_))),l=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(_));return t.y=this.R/2*Math.log((1+Math.sin(l))/(1-Math.sin(l)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var a=t.x-this.x0,s=t.y-this.y0,i=a/this.R,h=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4),_=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(i)),n=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(h))),l=this.lambda0+n/this.alpha,o=0,e=_,r=-1e3,k=0;Math.abs(e-r)>1e-7;){if(++k>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+_/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(e))/2)),r=e,e=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=l,t.y=e,t},names:["somerc"]};var Wt=1e-7;const Qt={init:function(){var t,a,s,i,h,_,e,u,c,M,y,x,f,p=0,m=0,d=0,g=0,w=0,v=0,b=0;this.no_off=(f="object"==typeof(x=this).PROJECTION?Object.keys(x.PROJECTION)[0]:x.PROJECTION,"no_uoff"in x||"no_off"in x||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(f)),this.no_rot="no_rot"in this;var N=!1;"alpha"in this&&(N=!0);var C=!1;if("rectified_grid_angle"in this&&(C=!0),N&&(b=this.alpha),C&&(p=this.rectified_grid_angle*o),N||C)m=this.longc;else if(d=this.long1,w=this.lat1,g=this.long2,v=this.lat2,Math.abs(w-v)<=Wt||(t=Math.abs(w))<=Wt||Math.abs(t-n)<=Wt||Math.abs(Math.abs(this.lat0)-n)<=Wt||Math.abs(Math.abs(v)-n)<=Wt)throw new Error;var S=1-this.es;a=Math.sqrt(S),Math.abs(this.lat0)>l?(u=Math.sin(this.lat0),s=Math.cos(this.lat0),t=1-this.es*u*u,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*a/t,(h=(i=this.B*a/(s*Math.sqrt(t)))*i-1)<=0?h=0:(h=Math.sqrt(h),this.lat0<0&&(h=-h)),this.E=h+=i,this.E*=Math.pow(B(this.e,this.lat0,u),this.B)):(this.B=1/a,this.A=this.k0,this.E=i=h=1),N||C?(N?(y=Math.asin(Math.sin(b)/i),C||(p=b)):(y=p,b=Math.asin(i*Math.sin(y))),this.lam0=m-Math.asin(.5*(h-1/h)*Math.tan(y))/this.B):(_=Math.pow(B(this.e,w,Math.sin(w)),this.B),e=Math.pow(B(this.e,v,Math.sin(v)),this.B),h=this.E/_,c=(e-_)/(e+_),M=((M=this.E*this.E)-e*_)/(M+e*_),(t=d-g)<-Math.pi?g-=k:t>Math.pi&&(g+=k),this.lam0=T(.5*(d+g)-Math.atan(M*Math.tan(.5*this.B*(d-g))/c)/this.B),y=Math.atan(2*Math.sin(this.B*T(d-this.lam0))/(h-1/h)),p=b=Math.asin(i*Math.sin(y))),this.singam=Math.sin(y),this.cosgam=Math.cos(y),this.sinrot=Math.sin(p),this.cosrot=Math.cos(p),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(i*i-1)/Math.cos(b))),this.lat0<0&&(this.u_0=-this.u_0)),h=.5*y,this.v_pole_n=this.ArB*Math.log(Math.tan(r-h)),this.v_pole_s=this.ArB*Math.log(Math.tan(r+h))},forward:function(t){var a,s,i,h,_,o,e,r,k={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-n)>l){if(a=.5*((_=this.E/Math.pow(B(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/_)),s=.5*(_+o),h=Math.sin(this.B*t.x),i=(a*this.singam-h*this.cosgam)/s,Math.abs(Math.abs(i)-1)<l)throw new Error;r=.5*this.ArB*Math.log((1-i)/(1+i)),o=Math.cos(this.B*t.x),e=Math.abs(o)<Wt?this.A*t.x:this.ArB*Math.atan2(a*this.cosgam+h*this.singam,o)}else r=t.y>0?this.v_pole_n:this.v_pole_s,e=this.ArB*t.y;return this.no_rot?(k.x=e,k.y=r):(e-=this.u_0,k.x=r*this.cosrot+e*this.sinrot,k.y=e*this.cosrot-r*this.sinrot),k.x=this.a*k.x+this.x0,k.y=this.a*k.y+this.y0,k},inverse:function(t){var a,s,i,h,_,o,e,r={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(s=t.y,a=t.x):(s=t.x*this.cosrot-t.y*this.sinrot,a=t.y*this.cosrot+t.x*this.sinrot+this.u_0),h=.5*((i=Math.exp(-this.BrA*s))-1/i),_=.5*(i+1/i),e=((o=Math.sin(this.BrA*a))*this.cosgam+h*this.singam)/_,Math.abs(Math.abs(e)-1)<l)r.x=0,r.y=e<0?-n:n;else{if(r.y=this.E/Math.sqrt((1+e)/(1-e)),r.y=D(this.e,Math.pow(r.y,1/this.B)),r.y===1/0)throw new Error;r.x=-this.rB*Math.atan2(h*this.cosgam-o*this.singam,Math.cos(this.BrA*a))}return r.x+=this.lam0,r},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},Ht={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<l)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var a=Math.sin(this.lat1),s=Math.cos(this.lat1),i=R(this.e,a,s),h=B(this.e,this.lat1,a),_=Math.sin(this.lat2),n=Math.cos(this.lat2),o=R(this.e,_,n),e=B(this.e,this.lat2,_),r=B(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>l?this.ns=Math.log(i/o)/Math.log(h/e):this.ns=a,isNaN(this.ns)&&(this.ns=a),this.f0=i/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(r,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var a=t.x,s=t.y;Math.abs(2*Math.abs(s)-Math.PI)<=l&&(s=L(s)*(n-2e-10));var i,h,_=Math.abs(Math.abs(s)-n);if(_>l)i=B(this.e,s,Math.sin(s)),h=this.a*this.f0*Math.pow(i,this.ns);else{if((_=s*this.ns)<=0)return null;h=0}var o=this.ns*T(a-this.long0);return t.x=this.k0*(h*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(o))+this.y0,t},inverse:function(t){var a,s,i,h,_,l=(t.x-this.x0)/this.k0,o=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(a=Math.sqrt(l*l+o*o),s=1):(a=-Math.sqrt(l*l+o*o),s=-1);var e=0;if(0!==a&&(e=Math.atan2(s*l,s*o)),0!==a||this.ns>0){if(s=1/this.ns,i=Math.pow(a/(this.a*this.f0),s),-9999===(h=D(this.e,i)))return null}else h=-n;return _=T(e/this.ns+this.long0),t.x=_,t.y=h,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)"]},Xt={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 a,s,i,h,_,n,l,o=t.x,e=t.y,r=T(o-this.long0);return a=Math.pow((1+this.e*Math.sin(e))/(1-this.e*Math.sin(e)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(e/2+this.s45),this.alfa)/a)-this.s45),i=-r*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(i)),_=Math.asin(Math.cos(s)*Math.sin(i)/Math.cos(h)),n=this.n*_,l=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=l*Math.cos(n)/1,t.x=l*Math.sin(n)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var a,s,i,h,_,n,l,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),_=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/_,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),a=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(h)),s=Math.asin(Math.cos(i)*Math.sin(h)/Math.cos(a)),t.x=this.long0-s/this.alfa,n=a,l=0;var e=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(a/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(l=1),n=t.y,e+=1}while(0===l&&e<15);return e>=15?null:t},names:["Krovak","krovak"]};function Jt(t,a,s,i,h){return t*h-a*Math.sin(2*h)+s*Math.sin(4*h)-i*Math.sin(6*h)}function Kt(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Vt(t){return.375*t*(1+.25*t*(1+.46875*t))}function Zt(t){return.05859375*t*t*(1+.75*t)}function Yt(t){return t*t*t*(35/3072)}function $t(t,a,s){var i=a*s;return t/Math.sqrt(1-i*i)}function ta(t){return Math.abs(t)<n?t:t-L(t)*Math.PI}function aa(t,a,s,i,h){var _,n;_=t/a;for(var l=0;l<15;l++)if(_+=n=(t-(a*_-s*Math.sin(2*_)+i*Math.sin(4*_)-h*Math.sin(6*_)))/(a-2*s*Math.cos(2*_)+4*i*Math.cos(4*_)-6*h*Math.cos(6*_)),Math.abs(n)<=1e-10)return _;return NaN}const sa={init:function(){this.sphere||(this.e0=Kt(this.es),this.e1=Vt(this.es),this.e2=Zt(this.es),this.e3=Yt(this.es),this.ml0=this.a*Jt(thi