text: import { Q as a$1, am as s$4, J as t$2, ak as d$1, an as s$5, s as s$6, h, _ as j, M as M$1, au as x, aJ as m, aK as m$1, bo as A$1, bp as u$1, bc as k, bd as P$1, ab as b, D as e, bb as e$1, ba as t$3, bq as m$2, bn as g$1 } from './Identifiable-c8406192.js';
  import { n as n$2 } from './vec3f64-a6795633.js';
  import './vec3-ae5ae182.js';
  import { G, a as G$1, R as R$1, I, E as E$1 } from './unitUtils-1b0a3531.js';
  import './mat4-3619c4da.js';
  import { a as t$1 } from './config-b3bf08ce.js';
  
  /*
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  See https://js.arcgis.com/4.19/esri/copyright.txt for details.
  */
  let o,r$1=null;function n$1(){return !!r$1}function _(){return !!t$1("esri-wasm")}function P(){return o||(o=import('./pe-wasm-85f80525.js').then((function(e){return e.p})).then((({default:e})=>e({locateFile:e=>a$1(`esri/geometry/support/${e}`)}))).then((e=>{N$1(e);})),o)}var s$3,E,i;!function(e){function t(e,t,o){r$1.ensureCache.prepare();const n=A(o),_=o===n,P=r$1.ensureFloat64(n),s=r$1._pe_geog_to_proj(r$1.getPointer(e),t,P);return s&&d(o,t,P,_),s}function o(e,o,r,_){switch(_){case E.PE_TRANSFORM_P_TO_G:return n(e,o,r);case E.PE_TRANSFORM_G_TO_P:return t(e,o,r)}return 0}function n(e,t,o){return _(e,t,o,0)}function _(e,t,o,n){r$1.ensureCache.prepare();const _=A(o),P=o===_,s=r$1.ensureFloat64(_),E=r$1._pe_proj_to_geog_center(r$1.getPointer(e),t,s,n);return E&&d(o,t,s,P),E}e.geogToProj=t,e.projGeog=o,e.projToGeog=n,e.projToGeogCenter=_;}(s$3||(s$3={})),function(e){function t(){e.PE_BUFFER_MAX=r$1.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=r$1.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=r$1.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=r$1.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=r$1.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=r$1.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=r$1.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=r$1.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=r$1.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=r$1.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=r$1.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=r$1.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=r$1.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=r$1.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=r$1.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=r$1.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=r$1.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=r$1.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=r$1.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=r$1.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_PARM_X0=r$1.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=r$1.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=r$1.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=r$1.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=r$1.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=r$1.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=r$1.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=r$1.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=r$1.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=r$1.PeDefs.prototype.PE_HORIZON_DELTA;}e.init=t;}(E||(E={})),function(e){const t={},o={},n=e=>{if(e){const t=e.getType();switch(t){case E.PE_TYPE_GEOGCS:e=r$1.castObject(e,r$1.PeGeogcs);break;case E.PE_TYPE_PROJCS:e=r$1.castObject(e,r$1.PeProjcs);break;case E.PE_TYPE_GEOGTRAN:e=r$1.castObject(e,r$1.PeGeogtran);break;default:t&E.PE_TYPE_UNIT&&(e=r$1.castObject(e,r$1.PeUnit));}}return e};function _(){r$1.PeFactory.prototype.initialize(null);}function P(e){return s(E.PE_TYPE_COORDSYS,e)}function s(e,o){let _=null,P=t[e];if(P||(P={},t[e]=P),P.hasOwnProperty(String(o)))_=P[o];else {const t=r$1.PeFactory.prototype.factoryByType(e,o);r$1.compare(t,r$1.NULL)||(_=t,P[o]=_);}return _=n(_),_}function i(e,t){let _=null,P=o[e];if(P||(P={},o[e]=P),P.hasOwnProperty(t))_=P[t];else {const o=r$1.PeFactory.prototype.fromString(e,t);r$1.compare(o,r$1.NULL)||(_=o,P[t]=_);}return _=n(_),_}function p(e){return s(E.PE_TYPE_GEOGCS,e)}function u(e){return s(E.PE_TYPE_GEOGTRAN,e)}function a(e){return r$1.PeFactory.prototype.getCode(e)}function c(e){return s(E.PE_TYPE_PROJCS,e)}function g(e){return s(E.PE_TYPE_UNIT,e)}e.initialize=_,e.coordsys=P,e.factoryByType=s,e.fromString=i,e.geogcs=p,e.geogtran=u,e.getCode=a,e.projcs=c,e.unit=g;}(i||(i={}));let p=null;var u,a,c,g,T,f,O$1,S,l;function N$1(e){function t(e,t,o){e[t]=o(e[t]);}r$1=e,E.init(),u.init(),T.init(),O$1.init(),S.init(),p=class extends r$1.PeGCSExtent{destroy(){r$1.destroy(this);}};const o=[r$1.PeDatum,r$1.PeGeogcs,r$1.PeGeogtran,r$1.PeObject,r$1.PeParameter,r$1.PePrimem,r$1.PeProjcs,r$1.PeSpheroid,r$1.PeUnit];for(const r of o)t(r.prototype,"getName",(e=>function(){return e.call(this,new Array(E.PE_NAME_MAX))}));for(const P of [r$1.PeGeogtran,r$1.PeProjcs])t(P.prototype,"getParameters",(e=>function(){const t=new Array(E.PE_PARM_MAX);let o=e.call(this);for(let e=0;e<t.length;e++){const n=r$1.getValue(o,"*");t[e]=n?r$1.wrapPointer(n,r$1.PeParameter):null,o+=Int32Array.BYTES_PER_ELEMENT;}return t}));t(r$1.PeHorizon.prototype,"getCoord",(e=>function(){const t=this.getSize();if(!t)return null;const o=[];return d(o,t,e.call(this)),o})),t(r$1.PeGTlistExtendedEntry.prototype,"getEntries",(e=>{const t=r$1._pe_getPeGTlistExtendedGTsSize();return function(){let o=null;const n=e.call(this);if(!r$1.compare(n,r$1.NULL)){o=[n];const e=this.getSteps();if(e>1){const _=r$1.getPointer(n);for(let n=1;n<e;n++)o.push(r$1.wrapPointer(_+t*n,r$1.PeGTlistExtendedGTs));}}return o}}));const n=r$1._pe_getPeHorizonSize(),_=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let o=null;const _=e.call(this);if(!r$1.compare(_,r$1.NULL)){o=[_];const e=_.getNump();if(e>1){const t=r$1.getPointer(_);for(let _=1;_<e;_++)o.push(r$1.wrapPointer(t+n*_,r$1.PeHorizon));}}return t.set(e,o),o};t(r$1.PeProjcs.prototype,"horizonGcsGenerate",_),t(r$1.PeProjcs.prototype,"horizonPcsGenerate",_),r$1.PeObject.prototype.toString=function(e=E.PE_STR_OPTS_NONE){r$1.ensureCache.prepare();const t=r$1.getPointer(this),o=r$1.ensureInt8(new Array(E.PE_BUFFER_MAX));return r$1.UTF8ToString(r$1._pe_object_to_string_ext(t,e,o))};}function y(e){if(!e)return;const t=r$1.getClass(e);if(!t)return;const o=r$1.getCache(t);if(!o)return;const n=r$1.getPointer(e);n&&delete o[n];}function M(e,t){const o=[],n=new Array(t);for(let _=0;_<e;_++)o.push(r$1.ensureInt8(n));return o}function A(e){let t;return Array.isArray(e[0])?(t=[],e.forEach((e=>{t.push(e[0],e[1]);}))):t=e,t}function d(e,t,o,n=!1){if(n)for(let _=0;_<2*t;_++)e[_]=r$1.getValue(o+_*Float64Array.BYTES_PER_ELEMENT,"double");else {const n=0===e.length;for(let _=0;_<t;_++)n&&(e[_]=new Array(2)),e[_][0]=r$1.getValue(o,"double"),e[_][1]=r$1.getValue(o+Float64Array.BYTES_PER_ELEMENT,"double"),o+=2*Float64Array.BYTES_PER_ELEMENT;}}!function(e){let t;function o(){e.PE_GTLIST_OPTS_COMMON=r$1.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=r$1._pe_getPeGTlistExtendedEntrySize();}function n(e,o,n,_,P,s){let E=null;const i=new r$1.PeInteger(s);try{const p=r$1.PeGTlistExtended.prototype.getGTlist(e,o,n,_,P,i);if((s=i.val)&&(E=[p],s>1)){const e=r$1.getPointer(p);for(let o=1;o<s;o++)E.push(r$1.wrapPointer(e+t*o,r$1.PeGTlistExtendedEntry));}}finally{r$1.destroy(i);}return E}e.init=o,e.getGTlist=n;}(u||(u={})),function(e){function t(e){if(e&&e.length){for(const t of e)y(t),t.getEntries().forEach((e=>{y(e);const t=e.getGeogtran();y(t),t.getParameters().forEach(y),[t.getGeogcs1(),t.getGeogcs2()].forEach((e=>{y(e);const t=e.getDatum();y(t),y(t.getSpheroid()),y(e.getPrimem()),y(e.getUnit());}));}));r$1.PeGTlistExtendedEntry.prototype.Delete(e[0]);}}e.destroy=t;}(a||(a={})),function(e){function t(e,t,o,n,_){r$1.ensureCache.prepare();const P=A(o),s=o===P,E=r$1.ensureFloat64(P);let i=0;n&&(i=r$1.ensureFloat64(n));const p=r$1._pe_geog_to_geog(r$1.getPointer(e),t,E,i,_);return p&&d(o,t,E,s),p}e.geogToGeog=t;}(c||(c={})),function(e){const t=(e,t,o,n,_,P)=>{let s,i;switch(r$1.ensureCache.prepare(),e){case"dd":s=r$1._pe_geog_to_dd,i=E.PE_DD_MAX;break;case"ddm":s=r$1._pe_geog_to_ddm,i=E.PE_DDM_MAX;break;case"dms":s=r$1._pe_geog_to_dms,i=E.PE_DMS_MAX;}let p=0;t&&(p=r$1.getPointer(t));const u=A(n),a=r$1.ensureFloat64(u),c=M(o,i),g=s(p,o,a,_,r$1.ensureInt32(c));if(g)for(let E=0;E<o;E++)P[E]=r$1.UTF8ToString(c[E]);return g},o=(e,t,o,n,_)=>{let P;switch(r$1.ensureCache.prepare(),e){case"dd":P=r$1._pe_dd_to_geog;break;case"ddm":P=r$1._pe_ddm_to_geog;break;case"dms":P=r$1._pe_dms_to_geog;}let s=0;t&&(s=r$1.getPointer(t));const E=n.map((e=>r$1.ensureString(e))),i=r$1.ensureInt32(E),p=r$1.ensureFloat64(new Array(2*o)),u=P(s,o,i,p);return u&&d(_,o,p),u};function n(e,o,r,n,_){return t("dms",e,o,r,n,_)}function _(e,t,r,n){return o("dms",e,t,r,n)}function P(e,o,r,n,_){return t("ddm",e,o,r,n,_)}function s(e,t,r,n){return o("ddm",e,t,r,n)}function i(e,o,r,n,_){return t("dd",e,o,r,n,_)}function p(e,t,r,n){return o("dd",e,t,r,n)}e.geog_to_dms=n,e.dms_to_geog=_,e.geog_to_ddm=P,e.ddm_to_geog=s,e.geog_to_dd=i,e.dd_to_geog=p;}(g||(g={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=r$1.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=r$1.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=r$1.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=r$1.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=r$1.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES;}function o(e,t,o,n,_,P,s){r$1.ensureCache.prepare();let i=0;e&&(i=r$1.getPointer(e));const p=A(o),u=r$1.ensureFloat64(p),a=M(t,E.PE_MGRS_MAX),c=r$1.ensureInt32(a),g=r$1._pe_geog_to_mgrs_extended(i,t,u,n,_,P,c);if(g)for(let E=0;E<t;E++)s[E]=r$1.UTF8ToString(a[E]);return g}function n(e,t,o,n,_){r$1.ensureCache.prepare();let P=0;e&&(P=r$1.getPointer(e));const s=o.map((e=>r$1.ensureString(e))),E=r$1.ensureInt32(s),i=r$1.ensureFloat64(new Array(2*t)),p=r$1._pe_mgrs_to_geog_extended(P,t,E,n,i);return p&&d(_,t,i),p}e.init=t,e.geog_to_mgrs_extended=o,e.mgrs_to_geog_extended=n;}(T||(T={})),function(e){function t(e,t,o,n,_,P,s){r$1.ensureCache.prepare();let i=0;e&&(i=r$1.getPointer(e));const p=A(o),u=r$1.ensureFloat64(p),a=M(t,E.PE_MGRS_MAX),c=r$1.ensureInt32(a),g=r$1._pe_geog_to_usng(i,t,u,n,_,P,c);if(g)for(let E=0;E<t;E++)s[E]=r$1.UTF8ToString(a[E]);return g}function o(e,t,o,n){r$1.ensureCache.prepare();let _=0;e&&(_=r$1.getPointer(e));const P=o.map((e=>r$1.ensureString(e))),s=r$1.ensureInt32(P),E=r$1.ensureFloat64(new Array(2*t)),i=r$1._pe_usng_to_geog(_,t,s,E);return i&&d(n,t,E),i}e.geog_to_usng=t,e.usng_to_geog=o;}(f||(f={})),function(e){function t(){e.PE_UTM_OPTS_NONE=r$1.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=r$1.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=r$1.PeNotationUtm.prototype.PE_UTM_OPTS_NS;}function o(e,t,o,n,_){r$1.ensureCache.prepare();let P=0;e&&(P=r$1.getPointer(e));const s=A(o),i=r$1.ensureFloat64(s),p=M(t,E.PE_UTM_MAX),u=r$1.ensureInt32(p),a=r$1._pe_geog_to_utm(P,t,i,n,u);if(a)for(let E=0;E<t;E++)_[E]=r$1.UTF8ToString(p[E]);return a}function n(e,t,o,n,_){r$1.ensureCache.prepare();let P=0;e&&(P=r$1.getPointer(e));const s=o.map((e=>r$1.ensureString(e))),E=r$1.ensureInt32(s),i=r$1.ensureFloat64(new Array(2*t)),p=r$1._pe_utm_to_geog(P,t,E,n,i);return p&&d(_,t,i),p}e.init=t,e.geog_to_utm=o,e.utm_to_geog=n;}(O$1||(O$1={})),function(e){const t=new Map;function o(){e.PE_PCSINFO_OPTION_NONE=r$1.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=r$1.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=r$1.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=r$1.PePCSInfo.prototype.PE_POLE_POINT;}function n(o,n=e.PE_PCSINFO_OPTION_DOMAIN){let _,P;return t.has(o)&&(P=t.get(o),P[n]&&(_=P[n])),_||(_=r$1.PePCSInfo.prototype.generate(o,n),P||(P=[],t.set(o,P)),P[n]=_),_}e.init=o,e.generate=n;}(S||(S={})),function(e){function t(){return r$1.PeVersion.prototype.version_string()}e.version_string=t;}(l||(l={}));var R=Object.freeze({__proto__:null,get _pe(){return r$1},isLoaded:n$1,isSupported:_,load:P,get PeCSTransformations(){return s$3},get PeDefs(){return E},get PeFactory(){return i},get PeGCSExtent(){return p},get PeGTlistExtended(){return u},get PeGTlistExtendedEntry(){return a},get PeGTTransformations(){return c},get PeNotationDms(){return g},get PeNotationMgrs(){return T},get PeNotationUsng(){return f},get PeNotationUtm(){return O$1},get PePCSInfo(){return S},get PeVersion(){return l},_init:N$1});
  
  /*
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  See https://js.arcgis.com/4.19/esri/copyright.txt for details.
  */
  const r=s$4.radius,n=s$4.eccentricitySquared,s$2={a1:r*n,a2:r*n*r*n,a3:r*n*n/2,a4:r*n*r*n*2.5,a5:r*n+r*n*n/2,a6:1-n};
  
  /*
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  See https://js.arcgis.com/4.19/esri/copyright.txt for details.
  */
  let s$1=0;class t{constructor(t=null){this.uid=s$1++,t?(this._wkt=void 0!==t.wkt?t.wkt:null,this._wkid=void 0!==t.wkid?t.wkid:-1,this._isInverse=void 0!==t.isInverse&&!0===t.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1);}static fromGE(s){const i=new t;return i._wkt=s.wkt,i._wkid=s.wkid,i._isInverse=s.isInverse,i}get wkt(){return this._wkt}set wkt(t){this._wkt=t,this.uid=s$1++;}get wkid(){return this._wkid}set wkid(t){this._wkid=t,this.uid=s$1++;}get isInverse(){return this._isInverse}set isInverse(t){this._isInverse=t,this.uid=s$1++;}getInverse(){const s=new t;return s._wkt=this.wkt,s._wkid=this._wkid,s._isInverse=!this.isInverse,s}}
  
  /*
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  See https://js.arcgis.com/4.19/esri/copyright.txt for details.
  */
  class s{constructor(s){if(this.steps=[],this._cached_projection={},this._chain="",this._gtlistentry=null,s&&s.steps)for(const i of s.steps)i instanceof t?this.steps.push(i):this.steps.push(new t({wkid:i.wkid,wkt:i.wkt,isInverse:i.isInverse}));}static cacheKey(t,s){return [void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():"",void 0!==s.wkid&&null!==s.wkid?s.wkid.toString():"-1",void 0!==s.wkt&&null!==s.wkt?s.wkt.toString():""].join(",")}static fromGE(i){const e=new s;let n="";for(const s of i.steps){const i=t.fromGE(s);e.steps.push(i),n+=i.uid.toString()+",";}return e._cached_projection={},e._gtlistentry=null,e._chain=n,e}getInverse(){const t=new s;t.steps=[];for(let s=this.steps.length-1;s>=0;s--){const i=this.steps[s];t.steps.push(i.getInverse());}return t}getGTListEntry(){let t="";for(const s of this.steps)t+=s.uid.toString()+",";return t!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=t),this._gtlistentry}assignCachedGe(t,i,e){this._cached_projection[s.cacheKey(t,i)]=e;}getCachedGeTransformation(t,i){let e="";for(const s of this.steps)e+=s.uid.toString()+",";e!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=e);const n=this._cached_projection[s.cacheKey(t,i)];return void 0===n?null:n}}
  
  /*
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  See https://js.arcgis.com/4.19/esri/copyright.txt for details.
  */
  let B=null,K=null,L=null,N={};function V(){return !!B&&n$1()}function X(){return !0}function D(e){return t$2(L)&&(L=Promise.all([P(),import('./geometryEngineBase-878f0128.js').then((function(n){return n.g})),import('./hydrated-7a6754ee.js')])),L.then((([,n,{hydratedAdapter:r}])=>{h(e),K=r,B=n.default,B._enableProjection(R);}))}function H(n,e,t=null){return Array.isArray(n)?0===n.length?[]:J(K,n,n[0].spatialReference,e,t):J(K,[n],n.spatialReference,e,t)[0]}function J(e,t,r,l,u=null){if(t$2(r)||t$2(l))return t;if(nn(r,l,u))return t.map((n=>rn(n,r,l)));if(t$2(u)){const e=s.cacheKey(r,l);void 0!==N[e]?u=N[e]:(u=O(r,l,null),t$2(u)&&(u=new s),N[e]=u);}if(t$2(B))throw new Y;return B._project(e,t,r,l,u)}function O(e,t,r=null){if(t$2(B))throw new Y;if(t$2(e)||t$2(t))return null;const l=B._getTransformation(K,e,t,r,null==r?void 0:r.spatialReference);return null!==l?s.fromGE(l):null}class Y extends s$6{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()");}}function nn(n,e,t){return !t&&(!!d$1(n,e)||s$5(n)&&s$5(e)&&!!te(n,e,se))}async function en(n,e){if(!V())for(const{source:t,dest:r,geographicTransformation:l}of n)if(!nn(t,r,l))return D(e)}function rn(n,e,t){if(!n)return n;if("x"in n){const r=new j;return un(n,e,r,t)?r:null}if("xmin"in n){const r=new M$1;return mn(n,e,r,t)?r:null}if("rings"in n){const r=new x;return pn(n,e,r,t)?r:null}if("paths"in n){const r=new m;return cn(n,e,r,t)?r:null}if("points"in n){const r=new m$1;return sn(n,e,r,t)?r:null}return null}function un(n,e,t,r,l=0){me[0]=n.x,me[1]=n.y;const u=n.z;return me[2]=void 0!==u?u:l,!!xn(me,e,0,me,r,0,1)&&(t.x=me[0],t.y=me[1],t.spatialReference=r,void 0===u?(t.z=void 0,t.hasZ=!1):(t.z=me[2],t.hasZ=!0),void 0===n.m?(t.m=void 0,t.hasM=!1):(t.m=n.m,t.hasM=!0),!0)}function sn(n,e,t,r,l=0){const{points:u,hasZ:o,hasM:s}=n,i=[],a=u.length,c=[];for(const f of u)c.push(f[0],f[1],o?f[2]:l);if(!xn(c,e,0,c,r,0,a))return !1;for(let f=0;f<a;++f){const n=3*f,e=c[n],t=c[n+1];o&&s?i.push([e,t,c[n+2],u[f][3]]):o?i.push([e,t,c[n+2]]):s?i.push([e,t,u[f][2]]):i.push([e,t]);}return t.points=i,t.spatialReference=r,t.hasZ=o,t.hasM=s,!0}function cn(n,e,t,r,l=0){const{paths:u,hasZ:o,hasM:s}=n,i=[];return !!In(u,o,s,e,i,r,l)&&(t.paths=i,t.spatialReference=r,t.hasZ=o,t.hasM=s,!0)}function fn(e,t,r=t.spatialReference,l=0){return !t$2(r)&&pn(e,e.spatialReference,t,r,l)}function pn(n,e,t,r,l=0){const{rings:u,hasZ:o,hasM:s}=n,i=[];return !!In(u,o,s,e,i,r,l)&&(t.rings=i,t.spatialReference=r,t.hasZ=o,t.hasM=s,!0)}function mn(n,e,t,r,l=0){const{xmin:u,ymin:o,xmax:s,ymax:i,hasZ:a,hasM:c}=n;if(!jn(u,o,a?n.zmin:l,e,me,r))return !1;t.xmin=me[0],t.ymin=me[1],a&&(t.zmin=me[2]);return !!jn(s,i,a?n.zmax:l,e,me,r)&&(t.xmax=me[0],t.ymax=me[1],a&&(t.zmax=me[2]),c&&(t.mmin=n.mmin,t.mmax=n.mmax),t.spatialReference=r,!0)}function jn(n,e,t,r,l,u){return fe[0]=n,fe[1]=e,fe[2]=t,xn(fe,r,0,l,u,0,1)}function xn(e,t,r,l,u,o,s=1){const i=te(t,u,se);if(t$2(i))return !1;if(i===vn){if(e===l&&r===o)return !0;const n=r+3*s;for(let t=r,u=o;t<n;t++,u++)l[u]=e[t];return !0}const a=r+3*s;for(let n=r,c=o;n<a;n+=3,c+=3)i(e,n,l,c);return !0}function In(n,e,t,r,l,u,o=0){const s=new Array;for(const a of n)for(const n of a)s.push(n[0],n[1],e?n[2]:o);if(!xn(s,r,0,s,u,0,s.length/3))return !1;let i=0;l.length=0;for(const a of n){const n=new Array;for(const r of a)e&&t?n.push([s[i++],s[i++],s[i++],r[3]]):e?n.push([s[i++],s[i++],s[i++]]):t?(n.push([s[i++],s[i++],r[2]]),i++):(n.push([s[i++],s[i++]]),i++);l.push(n);}return !0}function bn(n,e){return e.spatialReference===n?e.spatialReferenceId:(e.spatialReference=n,"metersPerUnit"in e&&(e.metersPerUnit=G(n,1)),n.wkt===G$1.wkt?e.spatialReferenceId=1:A$1(n)?e.spatialReferenceId=2:u$1(n)?e.spatialReferenceId=3:n.wkt===R$1.wkt?e.spatialReferenceId=4:4490===n.wkid?e.spatialReferenceId=5:n.wkt===I.wkt?e.spatialReferenceId=7:n.wkt===E$1.wkt?e.spatialReferenceId=9:k(n)?e.spatialReferenceId=8:P$1(n)?e.spatialReferenceId=10:e.spatialReferenceId=0)}function vn(n,e,t,r){n!==t&&(t[r++]=n[e++],t[r++]=n[e++],t[r]=n[e]);}function qn(n,e,t,r){t[r++]=ce*(n[e++]/s$4.radius),t[r++]=ce*(Math.PI/2-2*Math.atan(Math.exp(-1*n[e++]/s$4.radius))),t[r]=n[e];}function zn(n,e,t,r){qn(n,e,t,r),Ln(t,r,t,r);}function Un(n,e,t,r){qn(n,e,t,r),Qn(t,r,t,r);}function An(n,e$1,t,r,l){const u=.4999999*Math.PI,o=e(ae*n[e$1+1],-u,u),s=Math.sin(o);t[r++]=ae*n[e$1]*l.radius,t[r++]=l.halfSemiMajorAxis*Math.log((1+s)/(1-s)),t[r]=n[e$1+2];}function Gn(n,e,t,r){An(n,e,t,r,s$4);}function _n(n,e,t,r,l){const u=l+n[e+2],o=ae*n[e+1],s=ae*n[e],i=Math.cos(o);t[r++]=Math.cos(s)*i*u,t[r++]=Math.sin(s)*i*u,t[r]=Math.sin(o)*u;}function Bn(n,e,t,r){_n(n,e,t,r,e$1.radius);}function Kn(n,e,t,r){_n(n,e,t,r,t$3.radius);}function Ln(n,e,t,r){_n(n,e,t,r,s$4.radius);}function Nn(n,e,t,r,l){const u=n[e],o=n[e+1],s=n[e+2],i=Math.sqrt(u*u+o*o+s*s),a=g$1(s/(0===i?1:i)),c=Math.atan2(o,u);t[r++]=ce*c,t[r++]=ce*a,t[r]=i-l;}function Vn(n,e,t,r){Nn(n,e,t,r,e$1.radius);}function Xn(n,e,t,r){Nn(n,e,t,r,t$3.radius);}function Dn(n,e,t,r){Nn(n,e,t,r,s$4.radius);}function Hn(n,e,t,r){Dn(n,e,t,r),Gn(t,r,t,r);}function Jn(n,e,t,r){Dn(n,e,t,r),Qn(t,r,t,r);}function On(n,e,t,r,l){const u=ae*n[e],o=ae*n[e+1],s=n[e+2],i=Math.sin(o),a=Math.cos(o),c=l.radius/Math.sqrt(1-l.eccentricitySquared*i*i);t[r++]=(c+s)*a*Math.cos(u),t[r++]=(c+s)*a*Math.sin(u),t[r++]=(c*(1-l.eccentricitySquared)+s)*i;}function Qn(n,e,t,r){On(n,e,t,r,s$4);}function Yn(n,e,t,r){const l=s$2,u=n[e],o=n[e+1],s=n[e+2];let i,c,f,p,h,m,d,M,R,j,w,E,g,y,x,P,I,T,C,F,S;i=Math.abs(s),c=u*u+o*o,f=Math.sqrt(c),p=c+s*s,h=Math.sqrt(p),F=Math.atan2(o,u),m=s*s/p,d=c/p,y=l.a2/h,x=l.a3-l.a4/h,d>.3?(M=i/h*(1+d*(l.a1+y+m*x)/h),C=Math.asin(M),j=M*M,R=Math.sqrt(1-j)):(R=f/h*(1-m*(l.a5-y-d*x)/h),C=Math.acos(R),j=1-R*R,M=Math.sqrt(j)),w=1-s$4.eccentricitySquared*j,E=s$4.radius/Math.sqrt(w),g=l.a6*E,y=f-E*R,x=i-g*M,I=R*y+M*x,P=R*x-M*y,T=P/(g/w+I),C+=T,S=I+P*T/2,s<0&&(C=-C),t[r++]=ce*F,t[r++]=ce*C,t[r]=S;}function $n(n,e,t,r){Yn(n,e,t,r),Ln(t,r,t,r);}function ne(n,e,t,r){Yn(n,e,t,r),Gn(t,r,t,r);}const ee={2:{5:null,8:null,10:null,6:vn,1:Ln,7:null,9:null,0:null,3:Gn,2:vn,4:Qn},5:{5:vn,8:null,10:null,6:vn,1:Ln,7:null,9:null,0:null,3:null,2:null,4:Qn},8:{5:null,8:vn,10:null,6:null,1:null,7:Kn,9:null,0:null,3:null,2:null,4:null},10:{5:null,8:null,10:vn,6:null,1:null,7:null,9:Bn,0:null,3:null,2:null,4:null},3:{5:null,8:null,10:null,6:qn,1:zn,7:null,9:null,0:null,3:vn,2:qn,4:Un},4:{5:Yn,8:null,10:null,6:Yn,1:$n,7:null,9:null,0:null,3:ne,2:Yn,4:vn},1:{5:Dn,8:null,10:null,6:Dn,1:vn,7:null,9:null,0:null,3:Hn,2:Dn,4:Jn},7:{5:null,8:Xn,10:null,6:null,1:null,7:vn,9:null,0:null,3:null,2:null,4:null},9:{5:null,8:null,10:Vn,6:null,1:null,7:null,9:vn,0:null,3:null,2:null,4:null},0:{5:null,8:null,10:null,6:null,1:null,7:null,9:null,0:vn,3:null,2:null,4:null},6:{5:null,8:null,10:null,6:vn,1:Ln,7:null,9:null,0:null,3:null,2:vn,4:Qn}};function te(e,t,r=le()){return t$2(e)||t$2(t)?null:re(e,t,r).projector}function re(e,t,l){if(t$2(e)||t$2(t)||l.source.spatialReference===e&&l.dest.spatialReference===t)return l;const u=bn(e,l.source),o=bn(t,l.dest);return 0===u&&0===o?d$1(e,t)?l.projector=vn:l.projector=null:l.projector=ee[u][o],l}function le(){return {source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:vn}}const se=le(),ae=m$2(1),ce=b(1),fe=n$2(),me=n$2();
  
  export { D, H, J, O, V, X, en as e, fn as f, nn as n, xn as x };
  