@arcgis/core 5.1.0-next.12 → 5.1.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a5d3dcb490686430c81d.js → 27c8dea6154eb8c36fed.js} +1 -1
- package/assets/esri/core/workers/chunks/2d67ab4927a968d5c8d4.js +1 -0
- package/assets/esri/core/workers/chunks/804c31973f7d116523cb.js +1 -0
- package/assets/esri/core/workers/chunks/{aa748cdeab2db5eb9d45.js → d9dc3962535616a06e2f.js} +1 -1
- package/assets/esri/core/workers/chunks/fd5a5b05a1551cdb8c87.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
- package/assets/esri/themes/base/widgets/_Grid.scss +8 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/core/Logger.js +1 -1
- package/core/deprecate.js +1 -1
- package/kernel.js +1 -1
- package/layers/ImageryLayer.d.ts +1 -1
- package/layers/MapImageLayer.d.ts +1 -1
- package/layers/TileLayer.d.ts +1 -1
- package/layers/WebTileLayer.d.ts +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/support/relativeTimeQueryUtils.js +1 -1
- package/package.json +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/Symbol3DEmissive.d.ts +9 -9
- package/symbols/support/Symbol3DMaterial.d.ts +8 -8
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/Attribution.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/SelectionManager.d.ts +242 -0
- package/views/View.d.ts +1 -1
- package/views/selection/types.d.ts +140 -0
- package/views/support/selectionUtils.js +1 -1
- package/views/ui/DefaultUI.d.ts +5 -12
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/types.d.ts +1 -1
- package/webscene/SunLighting.d.ts +20 -2
- package/webscene/VirtualLighting.d.ts +20 -2
- package/widgets/Attribution/AttributionViewModel.d.ts +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.d.ts +9 -3
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/assets/esri/core/workers/chunks/0485ae33a8b327974751.js +0 -1
- package/assets/esri/core/workers/chunks/98c3b7d8db53f0b12642.js +0 -1
- package/assets/esri/core/workers/chunks/c88101cb8301f095d037.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[91,1775,3354,3931,6061,7548,8125],{1555(e,t,n){n.d(t,{C:()=>d});var r=n(5482),i=n(53966),s=n(86211),o=n(91429),a=n(16930),l=n(19419),c=n(65529),u=n(86738),h=n(28735);let p=class extends c.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,n){return e.hasZ=!0,e.z=n.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,n){f.spatialReference=t.spatialReference;const r=e.hasM&&!e.hasZ;for(let i=0;i<e.paths.length;i++){const s=e.paths[i],o=t.paths[i];for(let e=0;e<s.length;e++){const t=s[e],i=o[e];f.x=i[0],f.y=i[1],r&&(t[3]=t[2]),t[2]=n.elevationAt(f.x,f.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,n){f.spatialReference=t.spatialReference;const r=e.hasM&&!e.hasZ;for(let i=0;i<e.points.length;i++){const s=e.points[i],o=t.points[i];f.x=o[0],f.y=o[1],r&&(s[3]=s[2]),s[2]=n.elevationAt(f.x,f.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const r=(0,h.Cv)(e,t);return r||i.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),r}};p=(0,r.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],p);const f=new u.A;let d=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,n="tiles"in e?e.tiles.map(n=>new m({tile:n,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:n});const r=n[0];if(r){this.extent=r.extent.clone();const{min:e,max:t}=r.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<n.length;e++){const t=n[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,l.w1)((0,l.vt)(),t?.spatialReference??a.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let n;for(const r of this.samplers)if(r.containsAt(e,t)&&(n=r.elevationAt(e,t),n!==r.noDataValue))return n;return null!=n?n:(i.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"noDataValue",void 0),(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"samplers",void 0),d=(0,r.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],d);let m=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,l.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const n=(0,s.GA)(e.tileInfo.spatialReference),r=e.tileInfo.lodAt(e.tile.key.level).resolution*n;this.demResolution={min:r,max:r}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,l.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tile",void 0),(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tileInfo",void 0),m=(0,r.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],m)},4144(e,t,n){n.d(t,{Hh:()=>a,fz:()=>u,g7:()=>l,s1:()=>o,zo:()=>c});var r=n(76061),i=n(83290);let s;function o(){return!!s&&(0,i.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,i.l)()]);s=new e.OperatorProject,t(i.p)}}function l(e,t){return s.execute(e,t,null)}function c(e,t){const n=s.executeMany(new r.S(e),t,null);return Array.from(n)}function u(){return s.supportsCurves()}},4146(e,t,n){n.d(t,{A:()=>v});var r=n(5482),i=n(11254),s=n(49186),o=n(65529),a=n(4902),l=n(92474),c=n(53966),u=n(74887),h=n(84952),p=n(91429),f=n(5443),d=n(16930),m=n(92602),g=n(79677);let y=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([n.e(812),n.e(7982)]).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([n.e(812),n.e(5613),n.e(5710)]).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,p.MZ)({type:d.A})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,r.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r.Cg)([(0,p.$K)("esri.layers.Layer")],v)},4902(e,t,n){n.d(t,{s:()=>o});var r=n(5482),i=n(64108);let s=0;const o=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable")],n),n};o(class{})},5808(e,t,n){n.d(t,{O:()=>r});const r={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}},7817(e,t,n){n.d(t,{e:()=>s,l:()=>a,s:()=>o});var r=n(86211),i=n(78125);function s(e,t={}){const{unit:n}=t;let s=(0,i.fromGeometry)(e).calculateLength2D();if(s&&n){const t=(0,i.getSpatialReference)(e);s=(0,r.PQ)(s,t,n)}return s}const o=!0,a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},7861(e,t,n){n.d(t,{L:()=>i});var r=n(11254);async function i(e,t){return(await(0,r.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}},10222(e,t,n){n.d(t,{e:()=>s,s:()=>a});var r=n(81150),i=n(78125);function s(e){const t=(0,i.getSpatialReference)(e);return(0,i.toGeometry)((0,r.g7)((0,i.fromGeometry)(e),(0,i.fromSpatialReference)(t),!1),t)}const o=(0,r.fz)(),a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,executeMany:function(e){const t=e.map(i.fromGeometry),n=(0,i.getSpatialReference)(e);return(0,r.zo)(t,(0,i.fromSpatialReference)(n),!1).map(e=>(0,i.toGeometry)(e,n))},isSimple:function(e){return(0,r.Pg)((0,i.fromGeometry)(e),(0,i.fromSpatialReference)((0,i.getSpatialReference)(e)),!1)},supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},16215(e,t,n){n.d(t,{S:()=>i,Y:()=>r});const r=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&r in e}},17499(e,t,n){n.d(t,{gw:()=>o});var r=n(49186),i=n(60408),s=n(62815);function o(e,t,n){let r;for(const o of e)if(o&&(0,i.Pv)(o)&&!("vertexAttributes"in o)){if(!r){null==t.vcsWkid&&null==n.vcsWkid||l(t,n);const e="type"in o?o.type:(0,i.$B)(o);if(r=(0,s.N)(e,t,n),!r)return}r(o)}}class a extends r.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new a}},17799(e,t,n){n.d(t,{T9:()=>a,d_:()=>i,gT:()=>s});var r=n(86211);function i(e,t){return{type:(0,r.t$)(t),value:e,unit:t}}function s(e,t){return{type:(0,r.t$)(t),value:e,unit:t}}function o(e,t,n="arithmetic"){return{type:(0,r.t$)(t),value:e,unit:t,rotationType:n}}function a(e,t){return null==e?t:null==t||e.value>(0,r.oU)(t.value,t.unit,e.unit)?e:t}i(0,"meters"),s(0,"square-meters"),o(0,"radians"),o(0,"degrees"),o(0,"degrees","geographic")},23281(e,t,n){n.d(t,{eR:()=>C,Qv:()=>P,fs:()=>_,Yp:()=>E,RR:()=>b,l6:()=>T});var r=n(66552),i=(n(86211),n(28735),n(5482)),s=n(69540),o=n(25482),a=n(91429),l=n(69622),c=n(21325);let u=class extends l.A{set horizontalWKID(e){e?(0,c.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,c.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:n,radialDistortionCoefficients:r,tangentialDistortionCoefficients:i}=this;return e?.length>1&&!Number.isNaN(t)&&n?.length>1&&r?.length>1&&i?.length>1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"horizontalWKID",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"verticalWKID",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"z",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientation")],u);const h=u;let p=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,heading:o,pitch:a,roll:l,affineTransformations:c,focalLength:u,principalOffsetPoint:h,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,n,r,i,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(u),h?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"heading",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pitch",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"roll",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"z",void 0),p=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],p);const f=p;let d=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:n,ellipsoidRadius:r,squaredEccentricity:i,properties:s}=this,o=`${s}`.split("|");return o.splice(1,1),`${e}|${t}|${n}|${r}|${i}|${o.join("|")}`}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"latitude",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"longitude",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"ellipsoidRadius",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"squaredEccentricity",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"properties",void 0),d=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],d);const m=d;let g=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,omega:o,phi:a,kappa:l,affineTransformations:c,focalLength:u,principalOffsetPoint:h,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,n,r,i,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(u),h?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],g.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"omega",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"phi",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"kappa",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"z",void 0),g=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],g);const y=g;let v=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:n,radialDistortionCoefficients:r,tangentialDistortionCoefficients:i}=this;return e?.length>1||!Number.isNaN(t)||n?.length>1||r?.length>1||i?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,yaw:o,pitch:a,roll:l,affineTransformations:c,focalLength:u,principalOffsetPoint:h,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,n,r,i,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(u),h?.forEach(e=>d.push(e)),h?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const w=v,M=new Map;M.set("2",{desc:"Using Omega Phi Kappa",constructor:y}),M.set("1",{desc:"Using Heading, Pitch and Roll",constructor:f}),M.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:w}),M.set("4",{desc:"Using Local Tangent Plane",constructor:m});var x=n(63490);function C(e,t,n){return e?(0,x.E1)(e)?new x.Mr(e):function(e,t,n){let{url:r}=e;return r?(r=function(e,t,n){return t&&(e=`${t}${e}`),n&&(e+=`${n}`),e}(r,t,n),new x.TH({...e,url:r})):null}(e,t,n):e}const b=new r.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),T=new r.J({Feet:"feet",Meter:"meter"}),_=new r.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),S=new Map;S.set("1",function(e){const[t,n,r,i,s,o,a,l,c,u,h,p,f,d,m,g,y,v,w,M,x,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,heading:o,pitch:a,roll:l,...R([c,u,h,p,f,d],[g,y],[v,w,M],[x,C],m)}}),S.set("3",function(e){const[t,n,r,i,s,o,a,l,c,u,h,p,f,d,m,g,y,v,w,M,x,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,yaw:o,pitch:a,roll:l,...R([c,u,h,p,f,d],[g,y],[v,w,M],[x,C],m)}}),S.set("2",function(e){const[t,n,r,i,s,o,a,l,c,u,h,p,f,d,m,g,y,v,w,M,x,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,omega:o,phi:a,kappa:l,...R([c,u,h,p,f,d],[g,y],[v,w,M],[x,C],m)}}),S.set("4",function(e){const[t,n,r,i,s,...o]=e.slice(1),a=S.get(s),l=M.get(s)?.constructor;return a&&l?{latitude:t,longitude:n,ellipsoidRadius:r,squaredEccentricity:i,properties:new l(a([s,"",...o]))}:null});const A=e=>{const t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function R(e,t,n,r,i){const s=A(e),o=A(t),a=A(n),l=A(r);return{affineTransformations:6===s?.length?s:void 0,focalLength:6===s?.length?parseFloat(i):void 0,principalOffsetPoint:2!==o?.length?[0,0]:o,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}function P(e){return Array.isArray(e)&&e?.length>5&&!e.some(isNaN)}function E(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}},27749(e,t,n){n.d(t,{e:()=>f,g:()=>d,l:()=>p});var r=n(86211),i=n(77085),s=n(5808);let o,a,l,c,u;function h(){return!!o&&(0,i.s1)()}async function p(){if(!h()){const[e]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(1666)]).then(n.bind(n,78125)),(0,i.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,u=(0,i.fz)()}}function f(e,t,n={}){const{curveType:u="geodesic",unit:h}=n;h&&(t=(0,r.oU)(t,h,"meters"));const p=l(e);return c((0,i.g7)(o(e),t,a(p),s.O[u]),p)}const d=Object.freeze(Object.defineProperty({__proto__:null,execute:f,executeMany:function(e,t,n={}){const{curveType:u="geodesic",unit:h}=n;h&&(t=(0,r.oU)(t,h,"meters"));const p=e.map(o),f=l(e);return(0,i.zo)(p,t,a(f),s.O[u]).map(e=>c(e,f))},isLoaded:h,load:p,get supportsCurves(){return u}},Symbol.toStringTag,{value:"Module"}))},27921(e,t,n){n.d(t,{$Q:()=>M,C:()=>a,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>v,Tj:()=>w,lU:()=>h,mN:()=>x,vE:()=>C,vt:()=>o});var r=n(34727),i=n(35522),s=n(51850);function o(e=b){return[e[0],e[1],e[2],e[3]]}function a(e,t){return function(e,t,n,r,i=o()){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,n){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function u(e,t,n,r=o()){const i=n[0]-t[0],s=n[1]-t[1],a=n[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],h=s*u-a*c,p=a*l-i*u,f=i*c-s*l,d=h*h+p*p+f*f,m=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;return r[0]=h*m,r[1]=p*m,r[2]=f*m,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function h(e,t,n,r=0,s=Math.floor(n*(1/3)),o=Math.floor(n*(2/3))){if(n<3)return!1;t(f,r);let a=s,l=!1;for(;a<n-1&&!l;)t(d,a),a++,l=!(0,i.t2)(f,d);if(!l)return!1;for(a=Math.max(a,o),l=!1;a<n&&!l;)t(m,a),a++,(0,i.Re)(g,f,d),(0,i.S8)(g,g),(0,i.Re)(y,d,m),(0,i.S8)(y,y),l=!(0,i.t2)(f,m)&&!(0,i.t2)(d,m)&&Math.abs((0,i.Om)(g,y))<p;return l?(u(f,d,m,e),!0):(0!==r||1!==s||2!==o)&&h(e,t,n,0,1,2)}n(78955),n(44280),n(32114),n(32728);const p=.99619469809,f=(0,s.vt)(),d=(0,s.vt)(),m=(0,s.vt)(),g=(0,s.vt)(),y=(0,s.vt)();function v(e,t,n){return function(e){return 0===e||1===e}(C(e,t.origin,t.vector,0,n))}function w(e,t){return x(e,t)>=0}function M(e,t){const n=(0,i.Om)(e,t.ray.direction),r=-x(e,t.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;const s=r/n;return n>0?s<t.c1&&(t.c1=s):s>t.c0&&(t.c0=s),t.c0<=t.c1}function x(e,t){return(0,i.Om)(e,t)+e[3]}function C(e,t,n,s,o){const a=(0,i.Om)(e,n),l=x(e,t);if(0===a)return l>=0?2:3;let c=-l/a;return 1&s&&(c=(0,r.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?l>=0?2:3:((0,i.WQ)(o,t,(0,i.hs)(o,n,c)),l>=0?0:1)}const b=[0,0,1,0]},28208(e,t,n){n.d(t,{NU:()=>a,ZH:()=>s,vK:()=>o});var r=n(86738),i=n(16930);const s=new r.A({x:0,y:0,z:0,spatialReference:i.A.WebMercator}),o=1e3,a=.3515625},32114(e,t,n){n.d(t,{Rc:()=>f,J8:()=>d,rq:()=>h,Km:()=>p}),n(44208);var r=n(26390),i=n(29242),s=n(9093),o=n(82534),a=n(48163),l=n(51850),c=n(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(a.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(i.vt)}static createMat4f64(){return new u(s.vt)}static createQuatf64(){return new u(o.vt)}get test(){}}u.createVec2f64();const h=u.createVec3f64(),p=u.createVec4f64(),f=(u.createMat3f64(),u.createMat4f64()),d=u.createQuatf64()},32728(e,t,n){n.d(t,{YH:()=>o,nu:()=>a,wp:()=>s}),n(34727);var r=n(35522),i=n(51850);function s(e,t){const n=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),i=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),s=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,r.hZ)(e,n,i,s),e}function o(e,t,n){n=n||e;const i=(0,r.Om)(e,t);(0,r.hZ)(n,e[0]-i*t[0],e[1]-i*t[1],e[2]-i*t[2]),(0,r.S8)(n,n)}function a(e,t,n,s=(0,i.vt)()){const o=(0,r.Bw)(e),a=(0,r.Bw)(t),u=(0,r.Om)(e,t)/(o*a);if(u<.9999999999999999){const i=Math.acos(u),h=((1-n)*o+n*a)/Math.sin(i),p=h/o*Math.sin((1-n)*i),f=h/a*Math.sin(n*i);return(0,r.hs)(l,e,p),(0,r.hs)(c,t,f),(0,r.WQ)(s,l,c)}return(0,r.Cc)(s,e,t,n)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const l=(0,i.vt)(),c=(0,i.vt)()},35223(e,t,n){n.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(4167)]).then(n.bind(n,28879)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6061)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorGeodeticLength,t(r.p)}}function a(e,t,n){return i.execute(e,t,n,null)}function l(){return i.supportsCurves()}},35522(e,t,n){n.d(t,{$A:()=>_,Bw:()=>s,C:()=>o,Cc:()=>S,DI:()=>C,Il:()=>k,Io:()=>v,Ln:()=>y,Om:()=>T,Qr:()=>h,Re:()=>c,S8:()=>b,T9:()=>m,WQ:()=>l,Z0:()=>A,_S:()=>f,aI:()=>O,ei:()=>R,gL:()=>P,hG:()=>w,hZ:()=>a,hs:()=>g,jb:()=>V,jk:()=>d,lo:()=>L,lw:()=>u,m3:()=>M,oW:()=>I,t2:()=>Z,tn:()=>p,uE:()=>F,xg:()=>N,ze:()=>x});var r=n(51850),i=n(34304);function s(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function u(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function p(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function f(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function d(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function m(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function y(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function v(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function w(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function M(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function x(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function C(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const n=t[0],r=t[1],i=t[2];let s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function T(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _(e,t,n){const r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=i*l-s*a,e[1]=s*o-r*l,e[2]=r*a-i*o,e}function S(e,t,n,r){const i=t[0],s=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e[2]=o+r*(n[2]-o),e}function A(e,t,n){const r=t[0],i=t[1],s=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*s+n[12],e[1]=n[1]*r+n[5]*i+n[9]*s+n[13],e[2]=n[2]*r+n[6]*i+n[10]*s+n[14],e}function R(e,t,n){const r=t[0],i=t[1],s=t[2];return e[0]=r*n[0]+i*n[3]+s*n[6],e[1]=r*n[1]+i*n[4]+s*n[7],e[2]=r*n[2]+i*n[5]+s*n[8],e}function P(e,t,n){const r=n[0],i=n[1],s=n[2],o=n[3],a=t[0],l=t[1],c=t[2],u=i*c-s*l,h=s*a-r*c,p=r*l-i*a,f=i*p-s*h,d=s*u-r*p,m=r*h-i*u,g=2*o;return e[0]=a+u*g+2*f,e[1]=l+h*g+2*d,e[2]=c+p*g+2*m,e}const E=(0,r.vt)(),z=(0,r.vt)();function Z(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t){if(e===t)return!0;const n=e[0],r=e[1],s=e[2],o=t[0],a=t[1],l=t[2],c=(0,i.FD)();return Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-l)<=c*Math.max(1,Math.abs(s),Math.abs(l))}function I(e,t,n){const r=n[0]-t[0],i=n[1]-t[1],s=n[2]-t[2];let o=r*r+i*i+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const V=c,D=u,j=h,N=v,L=w,k=s,F=M;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:l,angle:function(e,t){b(E,e),b(z,t);const n=T(E,z);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,i,s){const o=1-s,a=o*o,l=s*s,c=a*o,u=3*s*a,h=3*l*o,p=l*s;return e[0]=t[0]*c+n[0]*u+r[0]*h+i[0]*p,e[1]=t[1]*c+n[1]*u+r[1]*h+i[1]*p,e[2]=t[2]*c+n[2]*u+r[2]*h+i[2]*p,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:o,cross:_,crossAndNormalize:function(e,t,n){const r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2],c=i*l-s*a,u=s*o-r*l,h=r*a-i*o,p=Math.sqrt(c*c+u*u+h*h);return e[0]=c/p,e[1]=u/p,e[2]=h/p,e},direction:I,dist:N,distance:v,div:j,divide:h,dot:T,equals:O,exactEquals:Z,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,c=o*(s-1),u=o*(3-2*s);return e[0]=t[0]*a+n[0]*l+r[0]*c+i[0]*u,e[1]=t[1]*a+n[1]*l+r[1]*c+i[1]*u,e[2]=t[2]*a+n[2]*l+r[2]*c+i[2]*u,e},inverse:C,len:k,length:s,lerp:S,max:m,min:d,mul:D,multiply:u,negate:x,normalize:b,random:function(e,t=1){const n=i.Ov,r=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(r)*o,e[1]=Math.sin(r)*o,e[2]=s*t,e},rotateX:function(e,t,n,r){const i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[0],s[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),s[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateY:function(e,t,n,r){const i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),s[1]=i[1],s[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateZ:function(e,t,n,r){const i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),s[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),s[2]=i[2],e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,set:a,sign:f,sqrDist:L,sqrLen:F,squaredDistance:w,squaredLength:M,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:V,subtract:c,transformMat3:R,transformMat4:A,transformQuat:P},Symbol.toStringTag,{value:"Module"}))},35982(e,t,n){n.d(t,{B:()=>l});var r=n(4576),i=n(36563),s=n(53966),o=n(74887),a=n(83027);class l{constructor(e,t,n,r,i={}){this._mainMethod=t,this._transferLists=n,this._listeners=[],this._promise=(0,a.h)(e,{...i,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>s.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const n={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(n),this._connectListener(n),(0,i.hA)(()=>{n.removed=!0,(0,r.TF)(this._listeners,n),this._thread&&null!=n.threadHandle&&n.threadHandle.remove()})}[Symbol.dispose](){this.destroy()}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,n){return this.invokeMethod(this._mainMethod,e,t,n)}invokeMethod(e,t,n,r){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:n,jobPriority:r})}return this._promise?this._promise.then(()=>((0,o.Te)(n),this.invokeMethod(e,t,n))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(c):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function c(){}},36708(e,t,n){n.d(t,{C_:()=>p,OH:()=>m,Vh:()=>g,on:()=>h,pc:()=>y,wB:()=>l,z7:()=>c});var r=n(37955),i=n(36563),s=n(97768),o=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,f)}function c(e,t,n={}){return u(e,t,n,d)}function u(e,t,n={},r){let i=null;const o=n.once?(e,n)=>{r(e)&&((0,s.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,o,n.sync,n.equals),n.initial){const t=e();o(t,t)}return i}function h(e,t,n,o={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function p(e){o.once&&o.once&&(0,s.xt)(u),n(e)}const f=l(e,(e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,p),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return u=(0,i.hA)(()=>{f.remove(),h()}),u}function p(e,t){return function(e,t,n){if((0,o.G4)(n))return Promise.reject((0,o.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((r,s)=>{a=(0,i.vE)([(0,o.u7)(n,()=>{l(),s((0,o.NK)())}),u(e,e=>{l(),r(e)},{sync:!1,once:!0},t??f)])})}(e,d,t)}function f(e){return!0}function d(e){return!!e}n(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},38969(e,t,n){n.d(t,{i:()=>i});var r=n(37955);function i(e,t){return new Promise((n,i)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,r.Oo)(e,"canplay",n)),t((0,r.Oo)(e,"error",i)))})}},39663(e,t,n){n.d(t,{e:()=>p,g:()=>f,l:()=>h});var r=n(86211),i=n(35223),s=n(5808);let o,a,l,c;function u(){return!!o&&(0,i.s1)()}async function h(){if(!u()){const[e]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)),(0,i.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,i.fz)()}}function p(e,t={}){const{curveType:n="geodesic",unit:c}=t,u=l(e);let h=(0,i.g7)(o(e),a(u),s.O[n]);return h&&c&&(h=(0,r.oU)(h,"meters",c)),h}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:u,load:h,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},44280(e,t,n){n.d(t,{g7:()=>a,gr:()=>o});var r=n(34727),i=n(35522),s=n(51850);function o(e,t){return(0,i.Om)(e,t)/(0,i.Bw)(e)}function a(e,t){const n=(0,i.Om)(e,t)/((0,i.Bw)(e)*(0,i.Bw)(t));return-(0,r.XM)(n)}(0,s.vt)(),(0,s.vt)()},48163(e,t,n){function r(){return[0,0]}function i(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function a(){return s(1,1)}function l(){return s(1,0)}function c(){return s(0,1)}n.d(t,{Un:()=>u,ci:()=>o,fA:()=>s,o8:()=>i,vt:()=>r});const u=a(),h=l(),p=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:p,ZEROS:[0,0],clone:i,create:r,freeze:function(e,t){return[e,t]},fromArray:o,fromValues:s,ones:a,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},49590(e,t,n){n.d(t,{e:()=>p,g:()=>f,l:()=>h});var r=n(86211),i=n(86742),s=n(5808);let o,a,l,c;function u(){return!!o&&(0,i.s1)()}async function h(){if(!u()){const[e]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)),(0,i.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,i.fz)()}}function p(e,t={}){const{curveType:n="geodesic",unit:c}=t,u=l(e);let h=(0,i.g7)(o(e),a(u),s.O[n]);return h&&c&&(h=(0,r.oU)(h,"square-meters",c)),h}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:u,load:h,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},54239(e,t,n){n.d(t,{A:()=>g});var r,i=n(5482),s=n(4576),o=n(66552),a=n(25482),l=n(86211),c=n(67076),u=n(91429),h=n(43937),p=n(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),d=f.jsonValues.slice();(0,s.Xy)(d,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,n){return f.write(e,t,n)}readHeightModel(e,t,n){return f.read(e)||(n?.messages&&n.messages.push(function(e,t){return new c.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:n})),null)}readHeightUnit(e,t,n){return m.read(e)||(n?.messages&&n.messages.push(y(e,{context:n})),null)}readHeightUnitService(e,t,n){return(0,l.LA)(e)||m.read(e)||(n?.messages&&n.messages.push(y(e,{context:n})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const n=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:n??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new c.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:d,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,i.Cg)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,i.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,i.Cg)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,i.Cg)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,i.Cg)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,i.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,i.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,i.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],g)},61691(e,t,n){n.d(t,{G:()=>r});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},62369(e,t,n){n.r(t),n.d(t,{default:()=>L});var r=n(5482),i=n(11254),s=n(49186),o=n(97768),a=n(25728),l=n(74887),c=n(84952),u=n(91429),h=n(54239),p=n(4146),f=n(89186),d=n(18768),m=n(16131),g=n(8303),y=n(10873),v=n(87378),w=n(35982);class M extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,n){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},n):Promise.resolve(null)}release(){--this.ref<=0&&(x.forEach((e,t)=>{e===this&&x.delete(t)}),this.destroy())}}const x=new Map;var C=n(34727),b=n(19419),T=(n(44208),n(86211)),_=n(5443),S=n(86738),A=n(16930),R=n(21325),P=n(28735),E=n(91806),z=n(87045);class Z{constructor(e){const t=Z.checkUnsupported(e);if(null!=t)throw t;const n=e;this.spatialReference=n.spatialReference,this._isWebMercator=this.spatialReference.isWebMercator,this._isGCS=(0,R.EA)(this.spatialReference),this.origin=[n.origin.x,n.origin.y],this.pixelSize=n.size[0],this.dpi=n.dpi;const r=n.lods.reduce((e,t)=>(t.level<e.minLod.level&&(e.minLod=t),e.max=Math.max(e.max,t.level),e),{minLod:n.lods[0],max:-1/0}),i=r.minLod,s=2**i.level;let o=i.resolution*s,a=i.scale*s;this.levels=new Array(r.max+1);for(let e=0;e<this.levels.length;e++)this.levels[e]={resolution:o,scale:a,tileSize:[o*n.size[0],o*n.size[1]]},o/=2,a/=2}clone(){return new Z(this.toTileInfo())}toTileInfo(){return new z.A({dpi:this.dpi,origin:new S.A({x:this.origin[0],y:this.origin[1],spatialReference:this.spatialReference}),size:[this.pixelSize,this.pixelSize],spatialReference:this.spatialReference,lods:this.levels.map((e,t)=>new E.A({level:t,scale:e.scale,resolution:e.resolution}))})}getExtent(e,t,n,r){const i=this.levels[e],s=i.tileSize[0],o=i.tileSize[1];r[0]=this.origin[0]+n*s,r[2]=this.origin[0]+(n+1)*s,r[3]=this.origin[1]-t*o,r[1]=this.origin[1]-(t+1)*o}convertExtentToRadians(e,t){this._isWebMercator?(t[0]=(0,P.yw)(e[0]),t[1]=(0,P.jg)(e[1]),t[2]=(0,P.yw)(e[2]),t[3]=(0,P.jg)(e[3])):this._isGCS&&(t[0]=(0,C.kU)(e[0]),t[1]=(0,C.kU)(e[1]),t[2]=(0,C.kU)(e[2]),t[3]=(0,C.kU)(e[3]))}getExtentGeometry(e,t,n,r=new _.A){return this.getExtent(e,t,n,O),r.spatialReference=this.spatialReference,r.xmin=O[0],r.ymin=O[1],r.xmax=O[2],r.ymax=O[3],r.zmin=void 0,r.zmax=void 0,r}ensureMaxLod(e){if(null==e)return!1;let t=!1;for(;this.levels.length<=e;){const{resolution:e,scale:n}=this.levels[this.levels.length-1],r=e/2*this.pixelSize;this.levels.push({resolution:e/2,scale:n/2,tileSize:[r,r]}),t=!0}return t}capMaxLod(e){this.levels.length>e+1&&(this.levels.length=e+1)}getMaxLod(){return this.levels.length-1}scaleAtLevel(e){return this.levels[0].scale/2**e}levelAtScale(e){const t=this.levels[0].scale;return e>=t?0:Math.log(t/e)*Math.LOG2E}resolutionAtLevel(e){return this.levels[0].resolution/2**e}compatibleWith(e,t=1/0){if(Z.checkUnsupported(e))return!1;const n=new Z(e);if(!n.spatialReference.equals(this.spatialReference))return!1;if(n.pixelSize!==this.pixelSize)return!1;const r=Math.min(this.levels.length-1,n.levels.length-1,t),i=this.levels[r].resolution;let s=.5*i;return!(!(0,C.Sp)(n.origin[0],this.origin[0],s)||!(0,C.Sp)(n.origin[1],this.origin[1],s))&&(s=.5*i/2**r/this.pixelSize*12,(0,C.Sp)(i,n.levels[r].resolution,s))}rootTilesInExtent(e,t=null,n=1/0){const r=new Array,i=this.levels[0].tileSize;if(null==e||0===i[0]||0===i[1])return r;Z.computeRowColExtent(e,i,this.origin,O);let s=O[1],o=O[3],a=O[0],l=O[2];const c=l-a,u=o-s;if(c*u>n){const e=Math.floor(Math.sqrt(n));u>e&&(s=s+Math.floor(.5*u)-Math.floor(.5*e),o=s+e),c>e&&(a=a+Math.floor(.5*c)-Math.floor(.5*e),l=a+e)}for(let e=s;e<o;e++)for(let t=a;t<l;t++)r.push([0,e,t]);return null!=t&&(t[0]=this.origin[0]+a*i[0],t[1]=this.origin[1]-o*i[1],t[2]=this.origin[0]+l*i[0],t[3]=this.origin[1]-s*i[1]),r}static computeRowColExtent(e,t,n,r){const i=.001*(e[2]-e[0]+(e[3]-e[1]));r[0]=Math.max(0,Math.floor((e[0]+i-n[0])/t[0])),r[2]=Math.max(0,Math.ceil((e[2]-i-n[0])/t[0])),r[1]=Math.max(0,Math.floor((n[1]-e[3]+i)/t[1])),r[3]=Math.max(0,Math.ceil((n[1]-e[1]-i)/t[1]))}static isPowerOfTwo(e){const t=e.lods,n=t[0].resolution*2**t[0].level;return!t.some(e=>!(0,C.b6)(e.resolution,n/2**e.level))}static hasGapInLevels(e){const t=e.lods.map(e=>e.level);t.sort((e,t)=>e-t);for(let e=1;e<t.length;e++)if(t[e]!==t[0]+e)return!0;return!1}static tileSizeSupported(e){const t=e.size[1];return t===e.size[0]&&!(t&t-1)&&t>=128&&t<=512}static hasOriginPerLODs(e){const t=e.origin;return e.lods.some(e=>null!=e.origin&&(e.origin[0]!==t.x||e.origin[1]!==t.y))}static getMissingTileInfoError(){return new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")}static checkUnsupported(e){return null==e?new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information"):e.lods.length<1?new s.A("tilingscheme:generic","Tiling scheme must have at least one level"):Z.isPowerOfTwo(e)?Z.hasGapInLevels(e)?new s.A("tilingscheme:gaps","Tiling scheme levels must not have gaps between min and max level"):Z.tileSizeSupported(e)?Z.hasOriginPerLODs(e)?new s.A("tilingscheme:multiple-origin","Tiling scheme levels must not have their own origin"):null:new s.A("tilingscheme:tile-size","Tiles must be square and size must be one of [128, 256, 512]"):new s.A("tilingscheme:power-of-two","Tiling scheme must be power of two")}static fromExtent(e,t){const n=e[2]-e[0],r=e[3]-e[1],i=(0,T.GA)(t),s=1.2*Math.max(n,r),o=s/256,a=o*i*(96/.0254),l=new Z(new z.A({size:[256,256],origin:new S.A({x:e[0]-.5*(s-n),y:e[3]+.5*(s-r)}),lods:[new E.A({level:0,resolution:o,scale:a})],spatialReference:t}));return l.ensureMaxLod(20),l}static makeWebMercatorAuxiliarySphere(e){const t=new Z(Z.WebMercatorAuxiliarySphereTileInfo);return t.ensureMaxLod(e),t}static makeGCSWithTileSize(e,t=256,n=16){const r=256/t,i=new Z(new z.A({size:[t,t],origin:new S.A({x:-180,y:90,spatialReference:e}),spatialReference:e,lods:[new E.A({level:0,resolution:.703125*r,scale:295497598.570834*r})]}));return i.ensureMaxLod(n),i}static{this.WebMercatorAuxiliarySphereTileInfo=new z.A({size:[256,256],origin:new S.A({x:-20037508.342787,y:20037508.342787,spatialReference:A.A.WebMercator}),spatialReference:A.A.WebMercator,lods:[new E.A({level:0,resolution:156543.03392800014,scale:591657527.591555})]})}static{this.WebMercatorAuxiliarySphere=Z.makeWebMercatorAuxiliarySphere(19)}get test(){}}const O=(0,b.vt)(),I=(0,C.$8)(C.pq/10),V=(0,b.vt)();Z.WebMercatorAuxiliarySphere.getExtent(0,0,0,V),(0,b.vt)([-180,-90,180,90]);var D=n(36005);let j=class extends((0,f.f)((0,d.b)((0,m.q)((0,g.A)((0,a.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=x.get(e);return t||(null!=e?(t=new M(t=>e.immediate.schedule(t)),x.set(e,t)):(t=new M,x.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const n=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return n?{operations:{supportsTileMap:n.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let n=t.currentVersion;return n||(n=9.3),n}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,n,r){const s=r?.signal,o={responseType:"array-buffer",signal:s},a={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,n,r)).then(()=>(0,i.A)(this.getTileUrl(e,t,n),o)).then(e=>this._lercDecoder.decode(e.data,a,s)).then(e=>new v.A(e?new v.A({values:e.pixelData,width:e.width,height:e.height,noDataValue:e.noDataValue}):{values:[],width:0,height:0,noDataValue:r?.noDataValue??I}))}getTileUrl(e,t,n){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,c.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${n}${i?"?"+i:""}`}async queryElevation(e,t){const{query:r}=await n.e(91).then(n.bind(n,90091));return(0,l.Te)(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await n.e(91).then(n.bind(n,90091));return(0,l.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,n,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,n,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},n=await(0,i.A)(this.parsedUrl.path,t);n.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=n.data,this.read(n.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[N]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"capabilities",void 0),(0,r.Cg)([(0,D.w)("service","capabilities",["capabilities"])],j.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],j.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,type:h.A})],j.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],j.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],j.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],j.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],j.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],j.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],j.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)(y.OZ)],j.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],j.prototype,"version",void 0),(0,r.Cg)([(0,D.w)("version",["currentVersion"])],j.prototype,"readVersion",null),j=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],j);const N=Symbol("default-fetch-tile");j.prototype.fetchTile[N]=!0;const L=j},63490(e,t,n){n.d(t,{E1:()=>c,Mr:()=>l,TH:()=>a});var r=n(5482),i=n(69540),s=n(25482),o=n(91429);let a=class extends((0,i.OU)(s.o)){constructor(){super(...arguments),this.url=null}};(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"lod",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=(0,r.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],a);let l=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.constantElevation=null}};(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"constantElevation",void 0),l=(0,r.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],l);const c=e=>null!=e&&"number"==typeof e.constantElevation},65708(e,t,n){n.d(t,{a:()=>o,e:()=>s});var r=n(86211),i=n(78125);function s(e,t={}){const{unit:n}=t;let s=(0,i.fromGeometry)(e).calculateArea2D();if(s&&n){const t=(0,i.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,r.B5)(t);o!==n&&(o?s=(0,r.oU)(s,o,n):(s=Math.sqrt(s),s*=(0,r.GA)(t),s**=2,s=(0,r.oU)(s,"square-meters",n)))}return s}const o=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:!0},Symbol.toStringTag,{value:"Module"}))},68747(e,t,n){n.r(t),n.d(t,{generateCombinationsPanoramicWorker:()=>x,generateCombinationsWorker:()=>M});var r=n(34727),i=n(74887);n(17799),n(69052),n(799),n(86211),n(18047),new Map,n(77690),n(29242),n(51850),n(37585),n(35522);var s=n(49186);n(56507),n(86738),n(39829),n(82799),n(16930),n(34403),n(21325),n(91218),n(65708),n(49590),n(27749),n(39663),n(7817),n(10222),n(4576),n(63490),n(6800),n(87811);var o=n(53966);n(44208),n(27921),n(5443),n(83276),n(19419),n(62369),n(87772),n(23281),n(90091),n(87378),n(22796),n(1555),n(87045),n(72802),n(7861);const a=[1920,1080];(0,r.KJ)(Math.acos(.05));var l=n(5482),c=n(97768),u=n(61893),h=n(10107),p=n(64108);let f=class extends u.Z{constructor(e){super(e),this.autoLoad=!1,this.customParameters=null,this.datasetFormat=null,this.url=null,this.rotation=null}destroy(){this._cache=(0,c.pR)(this._cache)}get layer(){return this._cache}get size(){if(!this._cache?.loaded||!this._cache.serviceRasterInfo)return;const{serviceRasterInfo:e}=this._cache;return[e.width,e.height]}async load(e){if(this._cache?.loaded)return await this._cache.load(e),{layer:this._cache,size:this.size};const{url:t,customParameters:r}=this;let s=this.datasetFormat;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");const a=await n.e(7835).then(n.bind(n,97835));if((0,i.Te)(e),s||(s=a.guessExtensionFromURI(t)),!s){try{s=await a.getDatasetFormat(t)}catch(e){o.A.getLogger(this).warn("non-panoramic-media:dataset-format",e)}(0,i.Te)(e)}s??="UNKNOWN FORMAT",this.datasetFormat=s;const l=(await Promise.all([n.e(7373),n.e(9235),n.e(3500),n.e(1003),n.e(2806),n.e(561)]).then(n.bind(n,90561))).default;(0,i.Te)(e),this._cache=new l({url:t,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:s},customParameters:r??void 0});const c=this._cache.load(e);return this.addResolvingPromise(c),await c,(0,i.Te)(e),{layer:this._cache,size:this.size}}};(0,l.Cg)([(0,h.MZ)()],f.prototype,"_cache",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"autoLoad",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"customParameters",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"datasetFormat",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"url",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"layer",null),(0,l.Cg)([(0,h.MZ)()],f.prototype,"rotation",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"size",null),f=(0,l.Cg)([(0,p.$)("esri.widgets.OrientedImageryViewer.support.NonPanoramicMedia")],f);var d=n(37955),m=n(38969);class g extends s.A{constructor(e,t,n){super(e,t,n),this.name="unknown",this.name=e}}const y=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),v=new Set(["MRF","TIFF","TIF"]);let w=class extends u.Z{constructor(e){super(e),this._size=[0,0],this._cache=null,this.autoLoad=!1,this.cameraHeading=null,this.extension=null,this.imagePyramid=null,this.type="image",this.uiStrings={}}destroy(){this._cache=null}get horizonPitch(){const{matrix:e}=this;return e?(0,r.KJ)(Math.asin(-e[6])):0}get horizonRoll(){const{matrix:e}=this;return e?(0,r.KJ)(Math.atan(e[7]/e[8])):0}get horizonYaw(){const{matrix:e,cameraHeading:t}=this;return e?(0,r.KJ)(Math.atan2(e[3],e[0])):t?-t:0}get size(){return this._size}async load(e){const{guessExtensionFromURI:t}=await n.e(7835).then(n.bind(n,97835));if((0,i.Te)(e),"video"===this.type)return this.loadVideoMesh(e);let r=this.extension;if(r||(r=t(this.url)),!r||!y.has(r))throw new g("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{extension:r});return v.has(r)?this.loadOptimizedImageMesh(e):this.loadImageMesh(e)}async loadOptimizedImageMesh(e){const{loadMeshes:t,loadPyramid:r,loadRaster:s}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060)),o=await s(this.url,e);(0,i.Te)(e),this.imagePyramid=await r(o,e),(0,i.Te)(e);const a=this.imagePyramid.getLowResolutionTiles(),l=await t(a,e);return(0,i.Te)(e),this._size=this.imagePyramid.imageSize,{meshOrMeshes:l,size:this._size,tileKeys:a?.map(e=>e.key)}}async loadVideoMesh(e){const{createImageSphere:t}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060));if((0,i.Te)(e),this._cache){const n=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{meshOrMeshes:n,size:this._size}}const r=await this._resolveMedia(e);(0,i.Te)(e),this._cache=r.media,this._size=[...a];const s=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{meshOrMeshes:s,size:this._size}}async loadImageMesh(e){const{createImageSphere:t}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060));if((0,i.Te)(e),this._cache){const n=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{meshOrMeshes:n,size:this._size}}const r=await this._resolveMedia(e);(0,i.Te)(e),this._cache=r.media;const s=r.mesh;return this._size=[r.media.width,r.media.height],{meshOrMeshes:s,size:this._size}}async _resolveMedia(e){const t=(0,i.Tw)(),r=(0,i.u7)(e?.signal,t.resolve),s="video"===this.type?document.createElement("video"):document.createElement("img");s.crossOrigin="anonymous",s.src=this.url;let o=null;const a="video"===this.type?(0,m.i)(s,this.addHandles):await new Promise((e,t)=>{o=[(0,d.on)(s,"error",e=>{t(e)}),(0,d.on)(s,"load",e)]}).finally(()=>{o?.forEach(e=>e.remove()),o=null}),l=Promise.race([a,t.promise]);this.addResolvingPromise(l);try{await l}finally{r?.remove()}(0,i.Te)(e);const c=s;if(!c)throw new g("unknown","Could not load media",{url:this.url});const{createImageSphere:u}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060));(0,i.Te)(e);const h=await u({data:s,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{media:c,mesh:h}}};function M(e){return function(e,t){const{cameraPitch:n,cameraRoll:r,cameraLocation:i}=e,{x:s,y:o,z:a,spatialReference:l}=i;if(t.every(e=>0===e)||!t||!t.length||!l)throw new Error("Invalid parameters");const[c,u,,h,p]=t,f=[-h,0,h],d=[-p,0,p],m=[-c,0,c],g=[-u,0,u],y=[];for(const t of f)for(const i of d)for(const c of m)for(const u of m)for(const h of g){const p={...e};p.cameraPitch=n+t,p.cameraRoll=r+i,p.cameraLocation={x:s+c,y:o+u,z:a?a+h:0,spatialReference:{wkid:l.wkid}},y.push(p)}return y}(e.imageToWorldProps,e.accuracyParameters)}function x(e){return function(e,t){const{cameraHeading:n,cameraLocation:r}=e,{x:i,y:s,z:o,spatialReference:a}=r;if(!t||t.every(e=>0===e)||!t.length||!a)throw new Error("Invalid parameters");const[l,c,u]=t,h=u>0?[-u,0,u]:[],p=l>0?[-l,0,l]:[],f=c>0?[-c,0,c]:[],d=[];for(const t of h)for(const r of p)for(const l of p)for(const c of f){const u={...e};u.cameraHeading=n+t,u.cameraLocation={x:i+r,y:s+l,z:o?o+c:0,spatialReference:{wkid:a.wkid}},d.push(u)}return d}(e.imageToWorldProps,e.accuracyParameters)}(0,l.Cg)([(0,h.MZ)()],w.prototype,"_size",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"autoLoad",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"cameraHeading",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"extension",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"horizonPitch",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"horizonRoll",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"horizonYaw",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"imagePyramid",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"matrix",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"size",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"type",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"uiStrings",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"url",void 0),w=(0,l.Cg)([(0,p.$)("esri.widgets.PanoramicViewer.support.PanoramicMedia")],w),n(9093),n(91829),n(58083),n(79258),n(73354),n(28208),n(28735)},73354(e,t,n){n.d(t,{a:()=>h,b:()=>a,c:()=>o,d:()=>i,e:()=>p,f:()=>u,l:()=>c,n:()=>f,t:()=>s});var r=n(40876);function i(e,t,n){s(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function s(e,t,n,r=3,i=r){if(e.length/r!==Math.ceil(t.length/i))return e;const s=e.length/r,o=n[0],a=n[1],l=n[2],c=n[4],u=n[5],h=n[6],p=n[8],f=n[9],d=n[10],m=n[12],g=n[13],y=n[14];let v=0,w=0;for(let n=0;n<s;n++){const n=t[v],s=t[v+1],M=t[v+2];e[w]=o*n+c*s+p*M+m,e[w+1]=a*n+u*s+f*M+g,e[w+2]=l*n+h*s+d*M+y,v+=i,w+=r}return e}function o(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,r=3,i=r){if(e.length/r!==Math.ceil(t.length/i))return;const s=e.length/r,o=n[0],a=n[1],l=n[2],c=n[3],u=n[4],h=n[5],p=n[6],f=n[7],d=n[8];let m=0,g=0;for(let n=0;n<s;n++){const n=t[m],s=t[m+1],y=t[m+2];e[g]=o*n+c*s+p*y,e[g+1]=a*n+u*s+f*y,e[g+2]=l*n+h*s+d*y,m+=i,g+=r}}function l(e,t,n,r=3,i=r){const s=Math.min(e.length/r,t.length/i);let o=0,a=0;for(let l=0;l<s;l++)e[a]=n*t[o],e[a+1]=n*t[o+1],e[a+2]=n*t[o+2],o+=i,a+=r;return e}function c(e,t,n,r){u(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function u(e,t,n,i,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const u=1/r.Tf;for(let r=0;r<a;r++)e[c]=i*(n*t[l])**u,e[c+1]=i*(n*t[l+1])**u,e[c+2]=i*(n*t[l+2])**u,l+=o,c+=s}function h(e,t,n,r=3,i=r){const s=e.length/r;if(s!==Math.ceil(t.length/i))return e;let o=0,a=0;for(let l=0;l<s;l++)e[a]=t[o]+n[0],e[a+1]=t[o+1]+n[1],e[a+2]=t[o+2]+n[2],o+=i,a+=r;return e}function p(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,n=3,r=n){const i=Math.min(e.length/n,t.length/r);let s=0,o=0;for(let a=0;a<i;a++){const i=t[s],a=t[s+1],l=t[s+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*i,e[o+1]=t*a,e[o+2]=t*l}s+=r,o+=n}}n(44208),n(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:p,scale:l,scaleView:function(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),i=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)i[c]=o[l]>>n,i[c+1]=o[l+1]>>n,i[c+2]=o[l+2]>>n,l+=a,c+=s},transformMat3:a,transformMat3View:o,transformMat4:s,transformMat4View:i,translate:h},Symbol.toStringTag,{value:"Module"}))},76061(e,t,n){n.d(t,{S:()=>i});var r=n(61691);class i extends r.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},77085(e,t,n){n.d(t,{Hh:()=>a,fz:()=>u,g7:()=>l,s1:()=>o,zo:()=>c});var r=n(76061),i=n(83290);let s;function o(){return!!s&&(0,i.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(1088)]).then(n.bind(n,31088)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,i.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(i.p)}}function l(e,t,n,r){return s.execute(e,t,n,r,null)}function c(e,t,n,i){const o=s.executeMany(new r.S(e),t,n,i,null);return Array.from(o)}function u(){return s.supportsCurves()}},77548(e,t,n){n.d(t,{Gh:()=>w,tk:()=>m,BR:()=>d,p2:()=>p,wI:()=>f,G$:()=>y,$x:()=>g,Ov:()=>l,UC:()=>s,W_:()=>c,OP:()=>v,TU:()=>a,XX:()=>o,jy:()=>u});var r=n(70333),i=n(11254);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}n(7762),n(84952),n(36563),n(36708),n(4146),new WeakMap,n(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function c(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function h(e){const t=e?.type;return"binning"===t||"cluster"===t}function p(e,t){if(!u(e))return;const n=t?.graphic,r=e.featureReduction;if(n){if(n.isAggregate){const e=n.origin;return e&&"featureReductionProvider"in e&&r?h(r)?r:null:void 0}return e}return t?.checkFeatureReduction&&r?h(r)?r:null:e}async function f(e,t){const n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function m(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function g(e,t){return null}function y(e){return null}function v(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function w(e,t){if(!t||!v(e))return;const n=(e.url,null);n&&(e.url=n)}},78125(e,t,n){n.r(t),n.d(t,{fromExtent:()=>g,fromGeometry:()=>m,fromMultipoint:()=>y,fromPoint:()=>v,fromPolygon:()=>w,fromPolyline:()=>M,fromPolylineUsingImportOperator:()=>x,fromSpatialReference:()=>C,getSpatialReference:()=>d,toExtent:()=>T,toGeometry:()=>b,toMultipoint:()=>_,toPoint:()=>S,toPolygon:()=>A,toPolyline:()=>R});var r=n(83661),i=(n(79187),n(55537)),s=n(95213),o=n(88885),a=n(5443),l=n(48526),c=n(86738),u=n(39829),h=n(82799),p=(n(90293),n(83299));const f="_gxVersion";function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function m(e){switch(e.type){case"point":return v(e);case"multipoint":return y(e);case"polyline":return M(e);case"polygon":return w(e);case"extent":return g(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function g(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function y(e){if(!e.getCacheValue(f)){const t=new o.M,n=new s.P,r=e.points,i=e.hasM,a=e.hasZ,l=a?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),a&&n.setZ(s[2]??0),i&&n.setM(s[l]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:i}=e,s=(0,p.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:i});e.setCacheValue(f,s)}return e.getCacheValue(f)}function M(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:i}=e,s=(0,p.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:i});e.setCacheValue(f,s)}return e.getCacheValue(f)}function x(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:i}=e,s=(0,p.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:n,hasZ:r,paths:i});e.setCacheValue(f,s)}return e.getCacheValue(f)}function C(e){return(0,p.fromSpatialReference)(e)}function b(e,t){if(e)switch(e.getGeometryType()){case i.G.enumPoint:return S(e,t);case i.G.enumEnvelope:return T(e,t);case i.G.enumMultiPoint:return _(e,t);case i.G.enumPolyline:return R(e,t);case i.G.enumPolygon:return A(e,t)}return null}function T(e,t){if(e.isEmpty())return null;const n=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(2,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(1,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(f,e),n}function _(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),i=n.hasZ(),o=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];i&&n.push(a.getZ()),r&&n.push(a.getM()),o.push(n)}const c=new l.A({hasM:r,hasZ:i,points:o,spatialReference:t});return c.setCacheValue(f,e),c}function S(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),i=e.getDescription();return i.hasM()&&(n.m=e.getM()),i.hasZ()&&(n.z=e.getZ()),n.setCacheValue(f,e),n}function A(e,t){if(e.isEmpty())return null;const n=u.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(f,e),n}function R(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(f,e),n}},79677(e,t,n){n.d(t,{A:()=>h});var r,i=n(5482),s=n(25482),o=n(88930),a=n(91429),l=n(98623),c=n(36005),u=n(43937);let h=class extends s.o{static{r=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,e,t));let i=this.end;if(i){const n=(0,o.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,o.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return i>=t&&i<=n?o=i:t>=i&&t<=s&&(o=t),n>=i&&n<=s?a=n:s>=t&&s<=n&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,n=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new r,{start:s,end:a}=this;return null!=s&&(i.start=(0,o.S1)(s,e,t,n)),null!=a&&(i.end=(0,o.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i.Cg)([(0,c.w)("end")],h.prototype,"readEnd",null),(0,i.Cg)([(0,u.K)("end")],h.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i.Cg)([(0,c.w)("start")],h.prototype,"readStart",null),(0,i.Cg)([(0,u.K)("start")],h.prototype,"writeStart",null),h=r=(0,i.Cg)([(0,a.$K)("esri.time.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0})},81150(e,t,n){n.d(t,{Pg:()=>l,fz:()=>c,g7:()=>o,zo:()=>a});var r=n(76061),i=(n(55537),n(88885),n(15756));n(95213);const s=new i.f;function o(e,t,n){return s.execute(e,t,n,null)}function a(e,t,n){const i=s.executeMany(new r.S(e),t,n,null);return Array.from(i)}function l(e,t,n){return s.isSimpleAsFeature(e,t,n,null,null)}function c(){return s.supportsCurves()}},82534(e,t,n){function r(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}n.d(t,{o8:()=>i,vt:()=>r,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,fromValues:function(e,t,n,r){return[e,t,n,r]}},Symbol.toStringTag,{value:"Module"}))},83276(e,t,n){n.r(t),n.d(t,{execute:()=>f,executeMany:()=>d,isLoaded:()=>h,load:()=>p,supportsCurves:()=>u});var r=n(4144),i=n(17499);let s,o,a,l,c,u;function h(){return!!s&&(0,r.s1)()}async function p(){if(!h()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(1666)]).then(n.bind(n,78125)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,r.Hh)()]);s=e.fromGeometry,o=e.fromSpatialReference,a=e.getSpatialReference,l=e.toGeometry,c=t.createProjectionTransformation,u=(0,r.fz)()}}function f(e,t,n){const u=a(e),h=c(o(u),o(t),n),p=l((0,r.g7)(s(e),h),t);return!n?.zConversionDisabled&&p?.hasZ&&(0,i.gw)([p],u,t),p}function d(e,t,n){const u=e.map(s),h=a(e),p=c(o(h),o(t),n),f=(0,r.zo)(u,p).map(e=>l(e,t));return!n?.zConversionDisabled&&f&&(0,i.gw)(f,h,t),f}},86742(e,t,n){n.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6859),n.e(6558)]).then(n.bind(n,6558)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6061)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorGeodeticArea,t(r.p)}}function a(e,t,n){return i.execute(e,t,n,null)}function l(){return i.supportsCurves()}},87378(e,t,n){n.d(t,{A:()=>a});var r,i=n(34275),s=n(56507);const o=Symbol("ElevationTileDataClass");class a{static{r=o}constructor({values:e,width:t,height:n,noDataValue:s}){this[r]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,i.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=n,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let n=1/0,r=-1/0,i=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(n=s<n?s:n,r=s>r?s:r,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=n,this._maxValue=r>-3e38?r:0)}static{this.from=(0,s.qf)(a)}}},87992(e,t,n){n.d(t,{JR:()=>_,ME:()=>C,MY:()=>S,NO:()=>x,Nh:()=>T,V2:()=>z,_s:()=>Z,e6:()=>I,gh:()=>b,tr:()=>D,uX:()=>g});var r=n(5482),i=n(69397),s=n(16930),o=(n(70328),n(19419)),a=n(60408),l=n(21325),c=n(513),u=n(50954),h=n(79567),p=n(52006),f=n(49663),d=n(46068),m=n(92722);class g{constructor({type:e,spatialReference:t,vertexCount:n,vertexXY:r,vertexZ:i,vertexM:s,partCount:o,partOffsets:a,partFlags:l,segmentFlags:c,segmentIndices:u,segmentParams:h,segmentCountArc:p,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=n,this.vertexXY=r,this.vertexZ=i,this.vertexM=s,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=c,this.segmentIndices=u,this.segmentParams=h,this.segmentCountArc=p,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:n}=this;return e&&e-t-n}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?i.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:n,hasZ:r,hasM:i,segmentCountArc:s,segmentCountBezier:o}=this,a=z(e,t,n,r,i,this.hasCurves(),s,o);a.spatialReference=this.spatialReference;const{vertexXY:l,vertexZ:c,vertexM:u}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,n+1)),a.partOffsets.set(e.subarray(0,n+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:n,segmentParams:r,segmentParamCount:i}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(n.subarray(0,t),0),a.segmentParams.set(r.subarray(0,i),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const n=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,n)=>Math.abs(e-n)>t||isNaN(e)!==isNaN(n);for(let t=0;t<this.vertexCount;++t)if(n(this.vertexXY[2*t],e.vertexXY[2*t])||n(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(n(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(n(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(n(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return new y(this)}}class y{constructor(e){this.geometry=e,this.value=new v(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class v{constructor(e){this.geometry=e,this.index=-1,this._readVertex=P(e),this._segments=new w(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class w{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new M(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class M{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=P(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let n=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[n++],r=t[n++],i=t[n++],s=t[n++];return{b:[this.end,[e,r],[i,s]]}}const r=t[n++],i=t[n++],s=t[n++],o=t[n++],a=t[n++],l=t[n++];n++,n++;const c=t[n++],u=t[n++];if(!Boolean(4&r)&&1===s)return{c:[this.end,[c,u]]};const h=2&r?0:1,p=1&r?0:1;return{a:[this.end,[a,l],h,p,o,i,s]}}}function x(e,t){const n={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,r.mS)(n,new A(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:n,vertexXY:i,vertexZ:s,vertexM:a}=e,l=R(e);if(e.hasCurves()){const n={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(n,new A(e,["vertexZ","vertexM"]),!1);const i=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:n}of t.segments)(0,h.e)(i,e,n),e=(0,p.yP)(n)}const[s,a,c,u]=i;t={xmin:s,ymin:a,xmax:c,ymax:u,spatialReference:l}}catch(e){n.error=e,n.hasError=!0}finally{(0,r.hk)(n)}}else{let e,r,s,o;e=r=1/0,s=o=-1/0;for(let t=0;t<n;++t){const n=i[2*t],a=i[2*t+1];e=Math.min(e,n),s=Math.max(s,n),r=Math.min(r,a),o=Math.max(o,a)}t={xmin:e,ymin:r,xmax:s,ymax:o,spatialReference:l}}if(s){let e=1/0,n=-1/0;for(const t of s)e=Math.min(e,t),n=Math.max(n,t);t.zmin=e,t.zmax=n}if(a){let e=1/0,n=-1/0;for(const t of a)e=Math.min(e,t),n=Math.max(n,t);t.mmin=e,t.mmax=n}return t}(e)),t}catch(e){n.error=e,n.hasError=!0}finally{(0,r.hk)(n)}}function C(e){let t,n,r;if((0,a.fT)(e)){r="point";const{x:i,y:s,z:o,m:a}=e,l=[i,s];null!=o&&l.push(o),null!=a&&l.push(a),n=[[l]],t=1}else(0,a.U9)(e)?(r="multipoint",n=[e.points],t=e.points.length):(0,a.Rg)(e)?(r="polyline",n=e.curvePaths??e.paths,t=n.reduce((e,t)=>e+t.length,0)):(r="polygon",n=e.curveRings??e.rings,t=n.reduce((e,t)=>(0===t.length||(e+=t.length,E(t[0],(0,p.yP)(t.at(-1)))&&--e),e),0));const i=z(r,t,r.includes("point")?0:n.length,(0,a.Pv)(e),(0,a.W0)(e),(0,p.Ed)(e)),{hasZ:s,hasM:o,vertexXY:l,vertexZ:c,vertexM:u}=i;function h(e){l[2*d]=e[0],l[2*d+1]=e[1],s&&(c[d]=e[2]),o&&(u[d]=e[f]),++d}i.spatialReference=e.spatialReference??void 0;const f=i.hasZ?3:2;let d=0;if(!i.isMultipart()){if(!s&&!o){for(const[e,t]of n[0])l[2*d]=e,l[2*d+1]=t,++d;return i}for(const e of n[0])h(e);return i}const m="polygon"===r,{partOffsets:g}=i;let y=0;if(!i.hasCurves()){for(const e of n){if(g[y++]=d,0===e.length)continue;let t=e.length;if(m&&E(e[0],e.at(-1))&&--t,s||o)for(let n=0;n<t;++n)h(e[n]);else for(let n=0;n<t;++n){const[t,r]=e[n];l[2*d]=t,l[2*d+1]=r,++d}}return g[y]=d,i}function v(e){const t=w+e;if(t<=(i.segmentParams?.length??0))return;let n=t*j;n=20*Math.ceil(n/20);const r=i.segmentParams;i.segmentParams=new Float64Array(n),null!=r&&i.segmentParams.set(r)}let w=0;for(const e of n){if(i.partOffsets[y++]=d,0===e.length)continue;const t=e[0];let n=t;for(let t=1;t<e.length;++t){const r=e[t];h(n);const s=d-1;(0,p.wY)(r)?(v(10),++i.segmentCountArc,w=Z(n,r,i,s,w),n=r.a[0]):(0,p.DA)(r)?(v(10),++i.segmentCountArc,w=O(n,r,i,s,w),n=r.a[0]):(0,p.aO)(r)?(v(10),++i.segmentCountArc,w=I(n,r,i,s,w),n=r.c[0]):(0,p.n1)(r)?(v(4),++i.segmentCountBezier,w=D(0,r,i,s,w),n=r.b[0]):n=r}m&&E(t,n)||h(n)}return i.partOffsets[y]=d,i}function b(e){const t=P(e),{vertexCount:n,partCount:r,hasZ:i,hasM:s}=e,o=R(e);if("point"===e.type){const[t,n]=e.vertexXY,r=e.vertexZ?.[0],i=e.vertexM?.[0];return{x:t,y:n,z:r,m:i,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<n;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:i,hasM:s}}const l="polygon"===e.type;if(!e.hasCurves()){const n=new Array;for(let i=0;i<r;++i){const r=e.partOffsets[i+1],s=new Array;for(;a<r;)s.push(t(a++));l&&s.length>0&&s.push(s[0]),n.push(s)}return l?{rings:n,hasZ:i,hasM:s,spatialReference:o}:{paths:n,hasZ:i,hasM:s,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:n}of e.parts){const e=[n];for(const{curve:n}of t)e.push(n);c.push(e)}return l?{rings:[],curveRings:c,hasZ:i,hasM:s,spatialReference:o}:{paths:[],curvePaths:c,hasZ:i,hasM:s,spatialReference:o}}function T(e,{lengths:t,coords:n,hasZ:r,hasM:i},s){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);r??=!1,i??=!1;const c=z(e,l,o,r,i,!1,0,0);if(c.spatialReference=s??void 0,!c.isMultipart()){for(let e=0,t=0;e<l;++e)c.vertexXY[2*e]=n[t++],c.vertexXY[2*e+1]=n[t++],r&&(c.vertexZ[e]=n[t++]),i&&(c.vertexM[e]=n[t++]);return c}const u=2+Number(r)+Number(i);let h=0,p=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[p],s=t+e-Number(a);c.partOffsets[++p]=s;for(let e=t;e<s;++e)c.vertexXY[2*e]=n[h++],c.vertexXY[2*e+1]=n[h++],r&&(c.vertexZ[e]=n[h++]),i&&(c.vertexM[e]=n[h++]);a&&(h+=u)}return c}function _({type:e,vertexCount:t,vertexXY:n,vertexZ:r,vertexM:i,partCount:s,partOffsets:o,hasZ:a,hasM:l}){const c=new m.A([],[],a,l);s=Math.max(s,1);const u="polygon"===e;let h=0;for(let e=0;e<s;++e){const s=o?.[e+1]??t,p=c.coords.length;for(let e=h;e<s;++e)c.coords.push(n[2*e],n[2*e+1]),a&&c.coords.push(r[e]),l&&c.coords.push(i[e]);if(u){const e=h;c.coords.push(n[2*e],n[2*e+1]),a&&c.coords.push(r[e]),l&&c.coords.push(i[e])}c.lengths.push((c.coords.length-p)/c.stride),h=s}return"point"===e&&(c.lengths.length=0),c}function S(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,n=e.isCustomWkid()?0:e.getOldID();if(n<=0)return{wkt:t};let r=e.getLatestID();(r<=0||r===n)&&(r=void 0);const i=e.getVCS();if(null==i)return{wkid:n,latestWkid:r,wkt:t};const s=i.isCustomWkid()?0:i.getOldID();if(s<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===s)&&(o=void 0),{wkid:n,wkt:t,latestWkid:r,vcsWkid:s,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class A{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const n of t)e[n]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function P({vertexXY:e,vertexZ:t,vertexM:n}){return t?n?r=>[e[2*r],e[2*r+1],t[r],n[r]]:n=>[e[2*n],e[2*n+1],t[n]]:n?t=>[e[2*t],e[2*t+1],n[t]]:t=>[e[2*t],e[2*t+1]]}function E(e,t){return e.every((e,n)=>e===t[n])}function z(e,t,n,r,i,s,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:n,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;r&&(c+=Float64Array.BYTES_PER_ELEMENT*t),i&&(c+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(c+=(n+1)*Int32Array.BYTES_PER_ELEMENT,c+=(n+1)*Int8Array.BYTES_PER_ELEMENT),s&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const u=new ArrayBuffer(c);let h=0;return l.vertexXY=new Float64Array(u,h,2*t),h+=l.vertexXY.byteLength,r&&(l.vertexZ=new Float64Array(u,h,t),h+=l.vertexZ.byteLength),i&&(l.vertexM=new Float64Array(u,h,t),h+=l.vertexM.byteLength),s&&(l.segmentParams=new Float64Array(u,h,l.segmentParamCount),h+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,h,t),l.segmentIndices.fill(N),h+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,h,n+1),h+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,h,n+1),h+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,n).fill(1)),s&&(l.segmentFlags=new Int8Array(u,h,t),l.segmentFlags.fill(1),h+=l.segmentFlags.byteLength),l}function Z(e,t,{segmentFlags:n,segmentIndices:r,segmentParams:i},s,o){n[s]=4,r[s]=o;const[a,[l,c],u,h,p,f,m]=t.a;let g=4;h||(g|=1),u||(g|=2);const y=(0,d.SW)(e,t),[v,w]=(0,d.Uk)(y,.5);return i[o++]=g,i[o++]=f,i[o++]=m,i[o++]=p,i[o++]=l,i[o++]=c,i[o++]=y.u2-y.u1,i[o++]=y.u1,i[o++]=v,i[o++]=w,o}function O(e,t,{segmentFlags:n,segmentIndices:r,segmentParams:i},s,o){n[s]=4,r[s]=o;const a=(0,f.i)(e,t);return V(a,4,...(0,c.mq)(a,.5),i,o)}function I(e,t,{segmentFlags:n,segmentIndices:r,segmentParams:i},s,o){return n[s]=4,r[s]=o,V((0,u.pM)(e,t),0,...t.c[1],i,o)}function V(e,t,n,r,i,s){const{cx:o,cy:a,thetaStart:l,thetaEnd:c,radius:u}=e;return l>c||(t|=1),Math.abs(c-l)<=Math.PI||(t|=2),i[s++]=t,i[s++]=u,i[s++]=1,i[s++]=0,i[s++]=o,i[s++]=a,i[s++]=c-l,i[s++]=l,i[s++]=n,i[s++]=r,s}function D(e,{b:[t,[n,r],[i,s]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},c,u){return o[c]=2,a[c]=u,l[u++]=n,l[u++]=r,l[u++]=i,l[u++]=s,u}const j=1.61803,N=-1},90091(e,t,n){n.d(t,{createSampler:()=>P,query:()=>R});var r=n(60999),i=n(49186),s=n(97768),o=n(74887),a=n(86211),l=n(91218),c=n(19419),u=n(4576),h=n(72802);class p{constructor(e,t){this.layer=e,this.parameters=t}}class f extends p{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,r=g(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(r,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){return(0,u.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends p{constructor(e,t,n,r){super(e,n),this.maskExtents=r,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),r=Math.min(n,e);r<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(r)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,r=g(t,n);if(!e)return r.length-1;const i=this.extent;if(null==i)return-1;for(let n=r.length-1;n>=0;n--){const s=r[n],o=s.resolution*t.size[0],a=s.resolution*t.size[1];if(Math.ceil(i.width/o)*Math.ceil(i.height/a)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=y(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let r=!1;e(n,()=>r=!0),r?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=y(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:r}=this.layer,i=g(n,r)[e],s=n.tileAt(i.level,t.xmin,t.ymin),o=s.extent,a=i.resolution*n.size[0],l=i.resolution*n.size[1],c=Math.ceil((t.xmax-o[0])/a),u=Math.ceil((t.ymax-o[1])/l);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const r=new h.U(s.level,s.row-e,s.col+t);n.updateTileInfo(r),this._tileIsMasked(r)||this._candidateTiles.push(r)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function m(e){return null!=e?.tileInfo}function g(e,t){const n=e.lods;if(m(t)){const{effectiveMinLOD:e,effectiveMaxLOD:r}=t;return n.filter(t=>t.level>=e&&t.level<=r)}return n}function y(e,t){const n={},r=[];for(const i of e){const e=i.id;e&&!n[e]?(n[e]=i,r.push(i)):t?.(i)}const i=r.sort((e,t)=>e.level-t.level);return i.filter((e,n)=>{for(let r=0;r<n;r++){const n=i[r].extent;if(n&&(0,c.gR)(n,e.extent))return t?.(e),!1}return!0})}class v{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class w{constructor(e,t=null){if(this.key=e,null!=t){const n=e.extent;this._samplerData=new v(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:r,dx:i,dy:s,y1:o,x0:a}=this._samplerData,{width:l,values:c,noDataValue:u}=r,h=M(s*(o-t),0,n),p=M(i*(e-a),0,n),f=Math.floor(h),d=Math.floor(p),m=f*l+d,g=m+l,y=c[m],v=c[g],w=c[m+1],x=c[g+1];if(y!==u&&v!==u&&w!==u&&x!==u){const e=p-d,t=y+(w-y)*e;return t+(v+(x-v)*e-t)*(h-f)}}}function M(e,t,n){return e<t?t:e>n?n:e}var x=n(87378),C=n(48526),b=n(86738),T=n(82799);class _{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new _(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,l.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),r=(0,l.project)(n,e);if(!r)return null;const i=this.coordinates.map((e,t)=>{const n=e.clone(),i=r.points[t];return n.x=i[0],n.y=i[1],n}),s=this.clone(i);return s.spatialReference=e,s}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,l.project)(t,e);if(!n)return null;const r=this.coordinates.map((e,t)=>{const r=e.clone(),i=n.points[t];return r.x=i[0],r.y=i[1],r}),i=this.clone(r);return i.spatialReference=e,i}static fromGeometry(e){const t=new _(e);if(e instanceof _)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const r=e.clone(t);return r.spatialReference=n,r},t;switch(e.type){case"point":{const n=e,{hasZ:r,hasM:i}=n;return t.coordinates=r&&i?[new S(n.x,n.y,n.z,n.m)]:r?[new S(n.x,n.y,n.z)]:i?[new S(n.x,n.y,null,n.m)]:[new S(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new b.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new b.A(t[0].x,t[0].y,t[0].z,n),t}case"multipoint":{const n=e,{hasZ:r,hasM:i}=n;return t.coordinates=r&&i?n.points.map(e=>new S(e[0],e[1],e[2],e[3])):r?n.points.map(e=>new S(e[0],e[1],e[2])):i?n.points.map(e=>new S(e[0],e[1],null,e[2])):n.points.map(e=>new S(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new C.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:n}):new C.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:n}),t}case"polyline":{const n=e,r=[],i=[],{hasZ:s,hasM:o}=e;let a=0;for(const e of n.paths)if(i.push([a,a+e.length]),a+=e.length,s&&o)for(const t of e)r.push(new S(t[0],t[1],t[2],t[3]));else if(s)for(const t of e)r.push(new S(t[0],t[1],t[2]));else if(o)for(const t of e)r.push(new S(t[0],t[1],null,t[2]));else for(const t of e)r.push(new S(t[0],t[1]));return t.coordinates=r,t._exporter=(t,n)=>{const r=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=i.map(e=>r.slice(e[0],e[1]));return new T.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:n})},t}}}}class S{constructor(e,t,n=null,r=null,i=null,s=null){this.x=e,this.y=t,this.z=n,this.m=r,this.tile=i,this.elevationTile=s}clone(){return new S(this.x,this.y,this.z,this.m)}}var A=n(1555);async function R(e,t,n){if(!e)throw new i.A(N,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof _)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new i.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const r={...D,...n},o=r.signal;if("integrated-mesh-3dtiles"===e.type){const i=_.fromGeometry(t);if(e.queryElevationCallback&&e.replacesTerrain){const s=12.9*(n?.minDemResolution||0)+.71,a=await e.queryElevationCallback(i,{signal:o,maxGeometricError:s}),l=i.coordinates.map(()=>({demResolution:1,source:e})),c=await a.project(t.spatialReference,o);if(c){if(void 0!==r.noDataValue&&r.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=r.noDataValue);return{geometry:c.export(),noDataValue:r.noDataValue??Number.MAX_VALUE,sampleInfo:l}}}const s=i.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:i.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}const c=new f(e,t.spatialReference,r);return await e.load({signal:o}),await async function(e,t,n){let r;const s=e.layer.tileInfo.spatialReference;if(t instanceof _?r=await t.project(s,n):(await(0,l.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:n}),r=(0,l.project)(t,s)),!r)throw new i.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=_.fromGeometry(r)}(c,t,o),await Z(c,o),await j(c,o),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let r=e.parameters.noDataValue;if(n){const e=n.sample(t.x,t.y);null==e?t.elevationTile=null:r=e}t.z=r})}(c),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(n);const r={geometry:n.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(r.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,a.GA)(t.spatialReference);return e.geometry.coordinates.map(r=>{let i=-1;return r.elevationTile&&r.elevationTile!==e.outsideExtentTile&&(i=t.lodAt(r.elevationTile.key.level).resolution*n),{demResolution:i,source:-1===i?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),r}(c,o)}async function P(e,t,n){if(e=Array.isArray(e)?e:[e],0===(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new i.A(N,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new i.A("elevation-query:invalid-extent","Invalid or undefined extent");const r={...D,...n,returnSampleInfo:!0},s=E(e[e.length-1],t,r);return 1===e.length?s:z(e,t,await s,r)}async function E(e,t,n,r){const i=n.signal;await e.load({signal:i});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,l.initializeProjection)([{source:s,dest:o}],{signal:i}),t=(0,l.project)(t,o));const a=new d(e,t,n,r);await Z(a,i),await j(a,i);const c=a.elevationTiles,u=a.layer.tileInfo,h=a.parameters.noDataValue;return new A.C({noDataValue:h,tiles:c,tileInfo:u})}async function z(e,t,n,r){if(e.pop(),!e.length)return n;const i=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),s=await E(e[e.length-1],t,r,i);if(0===s.samplers.length)return n;const o=n.samplers.concat(s.samplers),a=r.noDataValue;return z(e,t,new A.C({samplers:o,noDataValue:a}),r)}async function Z(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new w(new h.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const r=e.x,i=e.y;(r<n.xmin||r>n.xmax||i<n.ymin||i>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.parameters.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:r}=e.layer,i=t/(0,a.GA)(n.spatialReference),s=g(n,r);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-i)<Math.abs(o.resolution-i)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await async function(e,t){const{tileInfo:n,tilemapCache:r}=e.layer,i=V(n,r,e.parameters.minDemResolution);await O(e,i,t)}(e,t);else{if("auto"!==n)throw new i.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,r=V(t,n,e.parameters.minDemResolution);e.selectTilesAtLOD(r,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const r={},i=e=>{null!=e.id&&(e.id in r?r[e.id]++:(r[e.id]=1,n++))},s=e=>{if(null==e.id)return;const t=r[e.id];1===t?(delete r[e.id],n--):r[e.id]=t-1};e.forEachTileToFetch(i,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(r=>{n<=e.parameters.maximumAutoTileRequests||(s(r),t.upsampleTile(r)&&(o=!0),i(r))},s),o););}(e);const n=e.layer.tilemapCache;if(!n||m(n))return I(e,t);const i=e.getTilesToFetch(),s={},a=i.map(async e=>{const i=new h.U(0,0,0),a=await(0,r.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,i,{signal:t}));!1!==a.ok?null!=e.id&&(s[e.id]=i):(0,o.QP)(a.error)});await(0,o.qr)(Promise.all(a),t),e.remapTiles(s)}(e,t)}}async function O(e,t,n){const r=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=r.tilemapCache,a=e.getTilesToFetch();try{if(s&&!m(s))await(0,o.qr)(Promise.all(a.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await j(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new i.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(r){(0,o.QP)(r),await O(e,t-1,n)}}async function I(e,t){const n=e.layer.tileInfo;await j(e,t);let r=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?r=!0:t()}),r&&await I(e,t)}function V(e,t,n=0){const r=g(e,t);let i=r.length-1;if(n>0){const t=n/(0,a.GA)(e.spatialReference),s=r.findIndex(e=>e.resolution<t);0===s?i=0:s>0&&(i=s-1)}return i}const D={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function j(e,t){const n=e.getTilesToFetch(),r={},i=e.parameters.cache,s=e.parameters.noDataValue,a={noDataValue:s,signal:t},l=n.map(async t=>{if(null==t.id)return;const n=`${e.layer.uid}:${t.id}:${s}`,o=i?.get(n),l=o??x.A.from(await e.layer.fetchTile(t.level,t.row,t.col,a));i?.put(n,l),r[t.id]=new w(t,l)});await(0,o.qr)(Promise.allSettled(l),t),e.populateElevationTiles(r)}const N="elevation-query:invalid-layer"},92722(e,t,n){n.d(t,{A:()=>i});var r=n(69397);class i{constructor(e=[],t=[],n=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:n,hasM:r}){return new i(e,t,n||!1,r||!1)}static fromRect([e,t,n,r]){const s=n-e,o=r-t;return new i([5],[e,t,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let i=this.coords[r*t],s=this.coords[r*t+1];for(let o=1;o<n;o+=1){const n=r*(t+o),a=this.coords[n],l=this.coords[n+1];e+=-.5*(a-i)*(l+s),i=a,s=l}t+=n}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=n*(t+i);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;const{stride:i}=this;for(const e of n){for(let n=1;n<e;n++){const e=i*(r+n);t[e]+=t[e-i],t[e+1]+=t[e+1-i]}r+=e}return e}clone(e){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:n,size:r}=this,s=this.coords.slice(0,r*n);return e?(e.set(s),new i(t,e)):new i(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const n=new Array(t*e);for(let t=0,r=0;t<n.length;t+=e)n[r++]=this.coords[t],n[r++]=this.coords[t+1];return new i(this.lengths,n,!1,!1)}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[91,1775,3354,3931,6061,7548,8125],{1555(e,t,n){n.d(t,{C:()=>d});var r=n(5482),i=n(53966),s=n(86211),o=n(91429),a=n(16930),l=n(19419),c=n(65529),u=n(86738),h=n(28735);let p=class extends c.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,n){return e.hasZ=!0,e.z=n.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,n){f.spatialReference=t.spatialReference;const r=e.hasM&&!e.hasZ;for(let i=0;i<e.paths.length;i++){const s=e.paths[i],o=t.paths[i];for(let e=0;e<s.length;e++){const t=s[e],i=o[e];f.x=i[0],f.y=i[1],r&&(t[3]=t[2]),t[2]=n.elevationAt(f.x,f.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,n){f.spatialReference=t.spatialReference;const r=e.hasM&&!e.hasZ;for(let i=0;i<e.points.length;i++){const s=e.points[i],o=t.points[i];f.x=o[0],f.y=o[1],r&&(s[3]=s[2]),s[2]=n.elevationAt(f.x,f.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const r=(0,h.Cv)(e,t);return r||i.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),r}};p=(0,r.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],p);const f=new u.A;let d=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,n="tiles"in e?e.tiles.map(n=>new m({tile:n,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:n});const r=n[0];if(r){this.extent=r.extent.clone();const{min:e,max:t}=r.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<n.length;e++){const t=n[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,l.w1)((0,l.vt)(),t?.spatialReference??a.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let n;for(const r of this.samplers)if(r.containsAt(e,t)&&(n=r.elevationAt(e,t),n!==r.noDataValue))return n;return null!=n?n:(i.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"noDataValue",void 0),(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"samplers",void 0),d=(0,r.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],d);let m=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,l.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const n=(0,s.GA)(e.tileInfo.spatialReference),r=e.tileInfo.lodAt(e.tile.key.level).resolution*n;this.demResolution={min:r,max:r}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,l.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tile",void 0),(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,r.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tileInfo",void 0),m=(0,r.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],m)},4144(e,t,n){n.d(t,{Hh:()=>a,fz:()=>u,g7:()=>l,s1:()=>o,zo:()=>c});var r=n(76061),i=n(83290);let s;function o(){return!!s&&(0,i.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,i.l)()]);s=new e.OperatorProject,t(i.p)}}function l(e,t){return s.execute(e,t,null)}function c(e,t){const n=s.executeMany(new r.S(e),t,null);return Array.from(n)}function u(){return s.supportsCurves()}},4146(e,t,n){n.d(t,{A:()=>v});var r=n(5482),i=n(11254),s=n(49186),o=n(65529),a=n(4902),l=n(92474),c=n(53966),u=n(74887),h=n(84952),p=n(91429),f=n(5443),d=n(16930),m=n(92602),g=n(79677);let y=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([n.e(812),n.e(7982)]).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([n.e(812),n.e(5613),n.e(5710)]).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,p.MZ)({type:d.A})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,r.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r.Cg)([(0,p.$K)("esri.layers.Layer")],v)},4902(e,t,n){n.d(t,{s:()=>o});var r=n(5482),i=n(64108);let s=0;const o=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable")],n),n};o(class{})},5808(e,t,n){n.d(t,{O:()=>r});const r={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}},7817(e,t,n){n.d(t,{e:()=>s,l:()=>a,s:()=>o});var r=n(86211),i=n(78125);function s(e,t={}){const{unit:n}=t;let s=(0,i.fromGeometry)(e).calculateLength2D();if(s&&n){const t=(0,i.getSpatialReference)(e);s=(0,r.PQ)(s,t,n)}return s}const o=!0,a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},7861(e,t,n){n.d(t,{L:()=>i});var r=n(11254);async function i(e,t){return(await(0,r.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}},10222(e,t,n){n.d(t,{e:()=>s,s:()=>a});var r=n(81150),i=n(78125);function s(e){const t=(0,i.getSpatialReference)(e);return(0,i.toGeometry)((0,r.g7)((0,i.fromGeometry)(e),(0,i.fromSpatialReference)(t),!1),t)}const o=(0,r.fz)(),a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,executeMany:function(e){const t=e.map(i.fromGeometry),n=(0,i.getSpatialReference)(e);return(0,r.zo)(t,(0,i.fromSpatialReference)(n),!1).map(e=>(0,i.toGeometry)(e,n))},isSimple:function(e){return(0,r.Pg)((0,i.fromGeometry)(e),(0,i.fromSpatialReference)((0,i.getSpatialReference)(e)),!1)},supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},16215(e,t,n){n.d(t,{S:()=>i,Y:()=>r});const r=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&r in e}},17499(e,t,n){n.d(t,{gw:()=>o});var r=n(49186),i=n(60408),s=n(62815);function o(e,t,n){let r;for(const o of e)if(o&&(0,i.Pv)(o)&&!("vertexAttributes"in o)){if(!r){null==t.vcsWkid&&null==n.vcsWkid||l(t,n);const e="type"in o?o.type:(0,i.$B)(o);if(r=(0,s.N)(e,t,n),!r)return}r(o)}}class a extends r.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new a}},17799(e,t,n){n.d(t,{T9:()=>a,d_:()=>i,gT:()=>s});var r=n(86211);function i(e,t){return{type:(0,r.t$)(t),value:e,unit:t}}function s(e,t){return{type:(0,r.t$)(t),value:e,unit:t}}function o(e,t,n="arithmetic"){return{type:(0,r.t$)(t),value:e,unit:t,rotationType:n}}function a(e,t){return null==e?t:null==t||e.value>(0,r.oU)(t.value,t.unit,e.unit)?e:t}i(0,"meters"),s(0,"square-meters"),o(0,"radians"),o(0,"degrees"),o(0,"degrees","geographic")},23281(e,t,n){n.d(t,{eR:()=>C,Qv:()=>P,fs:()=>_,Yp:()=>E,RR:()=>b,l6:()=>T});var r=n(66552),i=(n(86211),n(28735),n(5482)),s=n(69540),o=n(25482),a=n(91429),l=n(69622),c=n(21325);let u=class extends l.A{set horizontalWKID(e){e?(0,c.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,c.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:n,radialDistortionCoefficients:r,tangentialDistortionCoefficients:i}=this;return e?.length>1&&!Number.isNaN(t)&&n?.length>1&&r?.length>1&&i?.length>1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"horizontalWKID",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"verticalWKID",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"z",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"type",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientation")],u);const h=u;let p=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,heading:o,pitch:a,roll:l,affineTransformations:c,focalLength:u,principalOffsetPoint:h,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,n,r,i,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(u),h?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"heading",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pitch",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"roll",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"z",void 0),p=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],p);const f=p;let d=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:n,ellipsoidRadius:r,squaredEccentricity:i,properties:s}=this,o=`${s}`.split("|");return o.splice(1,1),`${e}|${t}|${n}|${r}|${i}|${o.join("|")}`}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"latitude",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"longitude",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"ellipsoidRadius",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"squaredEccentricity",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"properties",void 0),d=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],d);const m=d;let g=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,omega:o,phi:a,kappa:l,affineTransformations:c,focalLength:u,principalOffsetPoint:h,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,n,r,i,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(u),h?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],g.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"omega",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"phi",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"kappa",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"z",void 0),g=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],g);const y=g;let v=class extends((0,s.OU)((0,o.T)(h))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:n,radialDistortionCoefficients:r,tangentialDistortionCoefficients:i}=this;return e?.length>1||!Number.isNaN(t)||n?.length>1||r?.length>1||i?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,yaw:o,pitch:a,roll:l,affineTransformations:c,focalLength:u,principalOffsetPoint:h,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,n,r,i,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(u),h?.forEach(e=>d.push(e)),h?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,i.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const w=v,M=new Map;M.set("2",{desc:"Using Omega Phi Kappa",constructor:y}),M.set("1",{desc:"Using Heading, Pitch and Roll",constructor:f}),M.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:w}),M.set("4",{desc:"Using Local Tangent Plane",constructor:m});var x=n(63490);function C(e,t,n){return e?(0,x.E1)(e)?new x.Mr(e):function(e,t,n){let{url:r}=e;return r?(r=function(e,t,n){return t&&(e=`${t}${e}`),n&&(e+=`${n}`),e}(r,t,n),new x.TH({...e,url:r})):null}(e,t,n):e}const b=new r.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),T=new r.J({Feet:"feet",Meter:"meter"}),_=new r.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),S=new Map;S.set("1",function(e){const[t,n,r,i,s,o,a,l,c,u,h,p,f,d,m,g,y,v,w,M,x,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,heading:o,pitch:a,roll:l,...R([c,u,h,p,f,d],[g,y],[v,w,M],[x,C],m)}}),S.set("3",function(e){const[t,n,r,i,s,o,a,l,c,u,h,p,f,d,m,g,y,v,w,M,x,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,yaw:o,pitch:a,roll:l,...R([c,u,h,p,f,d],[g,y],[v,w,M],[x,C],m)}}),S.set("2",function(e){const[t,n,r,i,s,o,a,l,c,u,h,p,f,d,m,g,y,v,w,M,x,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:n,x:r,y:i,z:s,omega:o,phi:a,kappa:l,...R([c,u,h,p,f,d],[g,y],[v,w,M],[x,C],m)}}),S.set("4",function(e){const[t,n,r,i,s,...o]=e.slice(1),a=S.get(s),l=M.get(s)?.constructor;return a&&l?{latitude:t,longitude:n,ellipsoidRadius:r,squaredEccentricity:i,properties:new l(a([s,"",...o]))}:null});const A=e=>{const t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function R(e,t,n,r,i){const s=A(e),o=A(t),a=A(n),l=A(r);return{affineTransformations:6===s?.length?s:void 0,focalLength:6===s?.length?parseFloat(i):void 0,principalOffsetPoint:2!==o?.length?[0,0]:o,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}function P(e){return Array.isArray(e)&&e?.length>5&&!e.some(isNaN)}function E(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}},27749(e,t,n){n.d(t,{e:()=>f,g:()=>d,l:()=>p});var r=n(86211),i=n(77085),s=n(5808);let o,a,l,c,u;function h(){return!!o&&(0,i.s1)()}async function p(){if(!h()){const[e]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(1666)]).then(n.bind(n,78125)),(0,i.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,u=(0,i.fz)()}}function f(e,t,n={}){const{curveType:u="geodesic",unit:h}=n;h&&(t=(0,r.oU)(t,h,"meters"));const p=l(e);return c((0,i.g7)(o(e),t,a(p),s.O[u]),p)}const d=Object.freeze(Object.defineProperty({__proto__:null,execute:f,executeMany:function(e,t,n={}){const{curveType:u="geodesic",unit:h}=n;h&&(t=(0,r.oU)(t,h,"meters"));const p=e.map(o),f=l(e);return(0,i.zo)(p,t,a(f),s.O[u]).map(e=>c(e,f))},isLoaded:h,load:p,get supportsCurves(){return u}},Symbol.toStringTag,{value:"Module"}))},27921(e,t,n){n.d(t,{$Q:()=>M,C:()=>a,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>v,Tj:()=>w,lU:()=>h,mN:()=>x,vE:()=>C,vt:()=>o});var r=n(34727),i=n(35522),s=n(51850);function o(e=b){return[e[0],e[1],e[2],e[3]]}function a(e,t){return function(e,t,n,r,i=o()){return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,n){const r=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function u(e,t,n,r=o()){const i=n[0]-t[0],s=n[1]-t[1],a=n[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],h=s*u-a*c,p=a*l-i*u,f=i*c-s*l,d=h*h+p*p+f*f,m=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;return r[0]=h*m,r[1]=p*m,r[2]=f*m,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function h(e,t,n,r=0,s=Math.floor(n*(1/3)),o=Math.floor(n*(2/3))){if(n<3)return!1;t(f,r);let a=s,l=!1;for(;a<n-1&&!l;)t(d,a),a++,l=!(0,i.t2)(f,d);if(!l)return!1;for(a=Math.max(a,o),l=!1;a<n&&!l;)t(m,a),a++,(0,i.Re)(g,f,d),(0,i.S8)(g,g),(0,i.Re)(y,d,m),(0,i.S8)(y,y),l=!(0,i.t2)(f,m)&&!(0,i.t2)(d,m)&&Math.abs((0,i.Om)(g,y))<p;return l?(u(f,d,m,e),!0):(0!==r||1!==s||2!==o)&&h(e,t,n,0,1,2)}n(78955),n(44280),n(32114),n(32728);const p=.99619469809,f=(0,s.vt)(),d=(0,s.vt)(),m=(0,s.vt)(),g=(0,s.vt)(),y=(0,s.vt)();function v(e,t,n){return function(e){return 0===e||1===e}(C(e,t.origin,t.vector,0,n))}function w(e,t){return x(e,t)>=0}function M(e,t){const n=(0,i.Om)(e,t.ray.direction),r=-x(e,t.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;const s=r/n;return n>0?s<t.c1&&(t.c1=s):s>t.c0&&(t.c0=s),t.c0<=t.c1}function x(e,t){return(0,i.Om)(e,t)+e[3]}function C(e,t,n,s,o){const a=(0,i.Om)(e,n),l=x(e,t);if(0===a)return l>=0?2:3;let c=-l/a;return 1&s&&(c=(0,r.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?l>=0?2:3:((0,i.WQ)(o,t,(0,i.hs)(o,n,c)),l>=0?0:1)}const b=[0,0,1,0]},28208(e,t,n){n.d(t,{NU:()=>a,ZH:()=>s,vK:()=>o});var r=n(86738),i=n(16930);const s=new r.A({x:0,y:0,z:0,spatialReference:i.A.WebMercator}),o=1e3,a=.3515625},32114(e,t,n){n.d(t,{Rc:()=>f,J8:()=>d,rq:()=>h,Km:()=>p}),n(44208);var r=n(26390),i=n(29242),s=n(9093),o=n(82534),a=n(48163),l=n(51850),c=n(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(a.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(i.vt)}static createMat4f64(){return new u(s.vt)}static createQuatf64(){return new u(o.vt)}get test(){}}u.createVec2f64();const h=u.createVec3f64(),p=u.createVec4f64(),f=(u.createMat3f64(),u.createMat4f64()),d=u.createQuatf64()},32728(e,t,n){n.d(t,{YH:()=>o,nu:()=>a,wp:()=>s}),n(34727);var r=n(35522),i=n(51850);function s(e,t){const n=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),i=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),s=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,r.hZ)(e,n,i,s),e}function o(e,t,n){n=n||e;const i=(0,r.Om)(e,t);(0,r.hZ)(n,e[0]-i*t[0],e[1]-i*t[1],e[2]-i*t[2]),(0,r.S8)(n,n)}function a(e,t,n,s=(0,i.vt)()){const o=(0,r.Bw)(e),a=(0,r.Bw)(t),u=(0,r.Om)(e,t)/(o*a);if(u<.9999999999999999){const i=Math.acos(u),h=((1-n)*o+n*a)/Math.sin(i),p=h/o*Math.sin((1-n)*i),f=h/a*Math.sin(n*i);return(0,r.hs)(l,e,p),(0,r.hs)(c,t,f),(0,r.WQ)(s,l,c)}return(0,r.Cc)(s,e,t,n)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const l=(0,i.vt)(),c=(0,i.vt)()},35223(e,t,n){n.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(4167)]).then(n.bind(n,28879)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6061)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorGeodeticLength,t(r.p)}}function a(e,t,n){return i.execute(e,t,n,null)}function l(){return i.supportsCurves()}},35522(e,t,n){n.d(t,{$A:()=>_,Bw:()=>s,C:()=>o,Cc:()=>S,DI:()=>C,Il:()=>k,Io:()=>v,Ln:()=>y,Om:()=>T,Qr:()=>h,Re:()=>c,S8:()=>b,T9:()=>m,WQ:()=>l,Z0:()=>A,_S:()=>f,aI:()=>O,ei:()=>R,gL:()=>P,hG:()=>w,hZ:()=>a,hs:()=>g,jb:()=>V,jk:()=>d,lo:()=>L,lw:()=>u,m3:()=>M,oW:()=>I,t2:()=>Z,tn:()=>p,uE:()=>F,xg:()=>N,ze:()=>x});var r=n(51850),i=n(34304);function s(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function u(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function p(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function f(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function d(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function m(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function y(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function v(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function w(e,t){const n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function M(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function x(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function C(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t){const n=t[0],r=t[1],i=t[2];let s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function T(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _(e,t,n){const r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=i*l-s*a,e[1]=s*o-r*l,e[2]=r*a-i*o,e}function S(e,t,n,r){const i=t[0],s=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e[2]=o+r*(n[2]-o),e}function A(e,t,n){const r=t[0],i=t[1],s=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*s+n[12],e[1]=n[1]*r+n[5]*i+n[9]*s+n[13],e[2]=n[2]*r+n[6]*i+n[10]*s+n[14],e}function R(e,t,n){const r=t[0],i=t[1],s=t[2];return e[0]=r*n[0]+i*n[3]+s*n[6],e[1]=r*n[1]+i*n[4]+s*n[7],e[2]=r*n[2]+i*n[5]+s*n[8],e}function P(e,t,n){const r=n[0],i=n[1],s=n[2],o=n[3],a=t[0],l=t[1],c=t[2],u=i*c-s*l,h=s*a-r*c,p=r*l-i*a,f=i*p-s*h,d=s*u-r*p,m=r*h-i*u,g=2*o;return e[0]=a+u*g+2*f,e[1]=l+h*g+2*d,e[2]=c+p*g+2*m,e}const E=(0,r.vt)(),z=(0,r.vt)();function Z(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t){if(e===t)return!0;const n=e[0],r=e[1],s=e[2],o=t[0],a=t[1],l=t[2],c=(0,i.FD)();return Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-l)<=c*Math.max(1,Math.abs(s),Math.abs(l))}function I(e,t,n){const r=n[0]-t[0],i=n[1]-t[1],s=n[2]-t[2];let o=r*r+i*i+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const V=c,D=u,j=h,N=v,L=w,k=s,F=M;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:l,angle:function(e,t){b(E,e),b(z,t);const n=T(E,z);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,i,s){const o=1-s,a=o*o,l=s*s,c=a*o,u=3*s*a,h=3*l*o,p=l*s;return e[0]=t[0]*c+n[0]*u+r[0]*h+i[0]*p,e[1]=t[1]*c+n[1]*u+r[1]*h+i[1]*p,e[2]=t[2]*c+n[2]*u+r[2]*h+i[2]*p,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:o,cross:_,crossAndNormalize:function(e,t,n){const r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2],c=i*l-s*a,u=s*o-r*l,h=r*a-i*o,p=Math.sqrt(c*c+u*u+h*h);return e[0]=c/p,e[1]=u/p,e[2]=h/p,e},direction:I,dist:N,distance:v,div:j,divide:h,dot:T,equals:O,exactEquals:Z,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,c=o*(s-1),u=o*(3-2*s);return e[0]=t[0]*a+n[0]*l+r[0]*c+i[0]*u,e[1]=t[1]*a+n[1]*l+r[1]*c+i[1]*u,e[2]=t[2]*a+n[2]*l+r[2]*c+i[2]*u,e},inverse:C,len:k,length:s,lerp:S,max:m,min:d,mul:D,multiply:u,negate:x,normalize:b,random:function(e,t=1){const n=i.Ov,r=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(r)*o,e[1]=Math.sin(r)*o,e[2]=s*t,e},rotateX:function(e,t,n,r){const i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[0],s[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),s[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateY:function(e,t,n,r){const i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),s[1]=i[1],s[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateZ:function(e,t,n,r){const i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),s[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),s[2]=i[2],e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,set:a,sign:f,sqrDist:L,sqrLen:F,squaredDistance:w,squaredLength:M,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:V,subtract:c,transformMat3:R,transformMat4:A,transformQuat:P},Symbol.toStringTag,{value:"Module"}))},35982(e,t,n){n.d(t,{B:()=>l});var r=n(4576),i=n(36563),s=n(53966),o=n(74887),a=n(83027);class l{constructor(e,t,n,r,i={}){this._mainMethod=t,this._transferLists=n,this._listeners=[],this._promise=(0,a.h)(e,{...i,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>s.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const n={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(n),this._connectListener(n),(0,i.hA)(()=>{n.removed=!0,(0,r.TF)(this._listeners,n),this._thread&&null!=n.threadHandle&&n.threadHandle.remove()})}[Symbol.dispose](){this.destroy()}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,n){return this.invokeMethod(this._mainMethod,e,t,n)}invokeMethod(e,t,n,r){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:n,jobPriority:r})}return this._promise?this._promise.then(()=>((0,o.Te)(n),this.invokeMethod(e,t,n))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(c):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function c(){}},36708(e,t,n){n.d(t,{C_:()=>p,OH:()=>m,Vh:()=>g,on:()=>h,pc:()=>y,wB:()=>l,z7:()=>c});var r=n(37955),i=n(36563),s=n(97768),o=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,f)}function c(e,t,n={}){return u(e,t,n,d)}function u(e,t,n={},r){let i=null;const o=n.once?(e,n)=>{r(e)&&((0,s.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,o,n.sync,n.equals),n.initial){const t=e();o(t,t)}return i}function h(e,t,n,o={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function p(e){o.once&&o.once&&(0,s.xt)(u),n(e)}const f=l(e,(e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,p),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return u=(0,i.hA)(()=>{f.remove(),h()}),u}function p(e,t){return function(e,t,n){if((0,o.G4)(n))return Promise.reject((0,o.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((r,s)=>{a=(0,i.vE)([(0,o.u7)(n,()=>{l(),s((0,o.NK)())}),u(e,e=>{l(),r(e)},{sync:!1,once:!0},t??f)])})}(e,d,t)}function f(e){return!0}function d(e){return!!e}n(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},38969(e,t,n){n.d(t,{i:()=>i});var r=n(37955);function i(e,t){return new Promise((n,i)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,r.Oo)(e,"canplay",n)),t((0,r.Oo)(e,"error",i)))})}},39663(e,t,n){n.d(t,{e:()=>p,g:()=>f,l:()=>h});var r=n(86211),i=n(35223),s=n(5808);let o,a,l,c;function u(){return!!o&&(0,i.s1)()}async function h(){if(!u()){const[e]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)),(0,i.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,i.fz)()}}function p(e,t={}){const{curveType:n="geodesic",unit:c}=t,u=l(e);let h=(0,i.g7)(o(e),a(u),s.O[n]);return h&&c&&(h=(0,r.oU)(h,"meters",c)),h}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:u,load:h,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},44280(e,t,n){n.d(t,{g7:()=>a,gr:()=>o});var r=n(34727),i=n(35522),s=n(51850);function o(e,t){return(0,i.Om)(e,t)/(0,i.Bw)(e)}function a(e,t){const n=(0,i.Om)(e,t)/((0,i.Bw)(e)*(0,i.Bw)(t));return-(0,r.XM)(n)}(0,s.vt)(),(0,s.vt)()},48163(e,t,n){function r(){return[0,0]}function i(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function a(){return s(1,1)}function l(){return s(1,0)}function c(){return s(0,1)}n.d(t,{Un:()=>u,ci:()=>o,fA:()=>s,o8:()=>i,vt:()=>r});const u=a(),h=l(),p=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:p,ZEROS:[0,0],clone:i,create:r,freeze:function(e,t){return[e,t]},fromArray:o,fromValues:s,ones:a,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},49590(e,t,n){n.d(t,{e:()=>p,g:()=>f,l:()=>h});var r=n(86211),i=n(86742),s=n(5808);let o,a,l,c;function u(){return!!o&&(0,i.s1)()}async function h(){if(!u()){const[e]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(9169)]).then(n.bind(n,78125)),(0,i.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,i.fz)()}}function p(e,t={}){const{curveType:n="geodesic",unit:c}=t,u=l(e);let h=(0,i.g7)(o(e),a(u),s.O[n]);return h&&c&&(h=(0,r.oU)(h,"square-meters",c)),h}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:u,load:h,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},54239(e,t,n){n.d(t,{A:()=>g});var r,i=n(5482),s=n(4576),o=n(66552),a=n(25482),l=n(86211),c=n(67076),u=n(91429),h=n(43937),p=n(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),d=f.jsonValues.slice();(0,s.Xy)(d,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,n){return f.write(e,t,n)}readHeightModel(e,t,n){return f.read(e)||(n?.messages&&n.messages.push(function(e,t){return new c.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:n})),null)}readHeightUnit(e,t,n){return m.read(e)||(n?.messages&&n.messages.push(y(e,{context:n})),null)}readHeightUnitService(e,t,n){return(0,l.LA)(e)||m.read(e)||(n?.messages&&n.messages.push(y(e,{context:n})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const n=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:n??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new c.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:d,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,i.Cg)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,i.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,i.Cg)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,i.Cg)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,i.Cg)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,i.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,i.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,i.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],g)},61691(e,t,n){n.d(t,{G:()=>r});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},62369(e,t,n){n.r(t),n.d(t,{default:()=>L});var r=n(5482),i=n(11254),s=n(49186),o=n(97768),a=n(25728),l=n(74887),c=n(84952),u=n(91429),h=n(54239),p=n(4146),f=n(89186),d=n(18768),m=n(16131),g=n(8303),y=n(10873),v=n(87378),w=n(35982);class M extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,n){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},n):Promise.resolve(null)}release(){--this.ref<=0&&(x.forEach((e,t)=>{e===this&&x.delete(t)}),this.destroy())}}const x=new Map;var C=n(34727),b=n(19419),T=(n(44208),n(86211)),_=n(5443),S=n(86738),A=n(16930),R=n(21325),P=n(28735),E=n(91806),z=n(87045);class Z{constructor(e){const t=Z.checkUnsupported(e);if(null!=t)throw t;const n=e;this.spatialReference=n.spatialReference,this._isWebMercator=this.spatialReference.isWebMercator,this._isGCS=(0,R.EA)(this.spatialReference),this.origin=[n.origin.x,n.origin.y],this.pixelSize=n.size[0],this.dpi=n.dpi;const r=n.lods.reduce((e,t)=>(t.level<e.minLod.level&&(e.minLod=t),e.max=Math.max(e.max,t.level),e),{minLod:n.lods[0],max:-1/0}),i=r.minLod,s=2**i.level;let o=i.resolution*s,a=i.scale*s;this.levels=new Array(r.max+1);for(let e=0;e<this.levels.length;e++)this.levels[e]={resolution:o,scale:a,tileSize:[o*n.size[0],o*n.size[1]]},o/=2,a/=2}clone(){return new Z(this.toTileInfo())}toTileInfo(){return new z.A({dpi:this.dpi,origin:new S.A({x:this.origin[0],y:this.origin[1],spatialReference:this.spatialReference}),size:[this.pixelSize,this.pixelSize],spatialReference:this.spatialReference,lods:this.levels.map((e,t)=>new E.A({level:t,scale:e.scale,resolution:e.resolution}))})}getExtent(e,t,n,r){const i=this.levels[e],s=i.tileSize[0],o=i.tileSize[1];r[0]=this.origin[0]+n*s,r[2]=this.origin[0]+(n+1)*s,r[3]=this.origin[1]-t*o,r[1]=this.origin[1]-(t+1)*o}convertExtentToRadians(e,t){this._isWebMercator?(t[0]=(0,P.yw)(e[0]),t[1]=(0,P.jg)(e[1]),t[2]=(0,P.yw)(e[2]),t[3]=(0,P.jg)(e[3])):this._isGCS&&(t[0]=(0,C.kU)(e[0]),t[1]=(0,C.kU)(e[1]),t[2]=(0,C.kU)(e[2]),t[3]=(0,C.kU)(e[3]))}getExtentGeometry(e,t,n,r=new _.A){return this.getExtent(e,t,n,O),r.spatialReference=this.spatialReference,r.xmin=O[0],r.ymin=O[1],r.xmax=O[2],r.ymax=O[3],r.zmin=void 0,r.zmax=void 0,r}ensureMaxLod(e){if(null==e)return!1;let t=!1;for(;this.levels.length<=e;){const{resolution:e,scale:n}=this.levels[this.levels.length-1],r=e/2*this.pixelSize;this.levels.push({resolution:e/2,scale:n/2,tileSize:[r,r]}),t=!0}return t}capMaxLod(e){this.levels.length>e+1&&(this.levels.length=e+1)}getMaxLod(){return this.levels.length-1}scaleAtLevel(e){return this.levels[0].scale/2**e}levelAtScale(e){const t=this.levels[0].scale;return e>=t?0:Math.log(t/e)*Math.LOG2E}resolutionAtLevel(e){return this.levels[0].resolution/2**e}compatibleWith(e,t=1/0){if(Z.checkUnsupported(e))return!1;const n=new Z(e);if(!n.spatialReference.equals(this.spatialReference))return!1;if(n.pixelSize!==this.pixelSize)return!1;const r=Math.min(this.levels.length-1,n.levels.length-1,t),i=this.levels[r].resolution;let s=.5*i;return!(!(0,C.Sp)(n.origin[0],this.origin[0],s)||!(0,C.Sp)(n.origin[1],this.origin[1],s))&&(s=.5*i/2**r/this.pixelSize*12,(0,C.Sp)(i,n.levels[r].resolution,s))}rootTilesInExtent(e,t=null,n=1/0){const r=new Array,i=this.levels[0].tileSize;if(null==e||0===i[0]||0===i[1])return r;Z.computeRowColExtent(e,i,this.origin,O);let s=O[1],o=O[3],a=O[0],l=O[2];const c=l-a,u=o-s;if(c*u>n){const e=Math.floor(Math.sqrt(n));u>e&&(s=s+Math.floor(.5*u)-Math.floor(.5*e),o=s+e),c>e&&(a=a+Math.floor(.5*c)-Math.floor(.5*e),l=a+e)}for(let e=s;e<o;e++)for(let t=a;t<l;t++)r.push([0,e,t]);return null!=t&&(t[0]=this.origin[0]+a*i[0],t[1]=this.origin[1]-o*i[1],t[2]=this.origin[0]+l*i[0],t[3]=this.origin[1]-s*i[1]),r}static computeRowColExtent(e,t,n,r){const i=.001*(e[2]-e[0]+(e[3]-e[1]));r[0]=Math.max(0,Math.floor((e[0]+i-n[0])/t[0])),r[2]=Math.max(0,Math.ceil((e[2]-i-n[0])/t[0])),r[1]=Math.max(0,Math.floor((n[1]-e[3]+i)/t[1])),r[3]=Math.max(0,Math.ceil((n[1]-e[1]-i)/t[1]))}static isPowerOfTwo(e){const t=e.lods,n=t[0].resolution*2**t[0].level;return!t.some(e=>!(0,C.b6)(e.resolution,n/2**e.level))}static hasGapInLevels(e){const t=e.lods.map(e=>e.level);t.sort((e,t)=>e-t);for(let e=1;e<t.length;e++)if(t[e]!==t[0]+e)return!0;return!1}static tileSizeSupported(e){const t=e.size[1];return t===e.size[0]&&!(t&t-1)&&t>=128&&t<=512}static hasOriginPerLODs(e){const t=e.origin;return e.lods.some(e=>null!=e.origin&&(e.origin[0]!==t.x||e.origin[1]!==t.y))}static getMissingTileInfoError(){return new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")}static checkUnsupported(e){return null==e?new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information"):e.lods.length<1?new s.A("tilingscheme:generic","Tiling scheme must have at least one level"):Z.isPowerOfTwo(e)?Z.hasGapInLevels(e)?new s.A("tilingscheme:gaps","Tiling scheme levels must not have gaps between min and max level"):Z.tileSizeSupported(e)?Z.hasOriginPerLODs(e)?new s.A("tilingscheme:multiple-origin","Tiling scheme levels must not have their own origin"):null:new s.A("tilingscheme:tile-size","Tiles must be square and size must be one of [128, 256, 512]"):new s.A("tilingscheme:power-of-two","Tiling scheme must be power of two")}static fromExtent(e,t){const n=e[2]-e[0],r=e[3]-e[1],i=(0,T.GA)(t),s=1.2*Math.max(n,r),o=s/256,a=o*i*(96/.0254),l=new Z(new z.A({size:[256,256],origin:new S.A({x:e[0]-.5*(s-n),y:e[3]+.5*(s-r)}),lods:[new E.A({level:0,resolution:o,scale:a})],spatialReference:t}));return l.ensureMaxLod(20),l}static makeWebMercatorAuxiliarySphere(e){const t=new Z(Z.WebMercatorAuxiliarySphereTileInfo);return t.ensureMaxLod(e),t}static makeGCSWithTileSize(e,t=256,n=16){const r=256/t,i=new Z(new z.A({size:[t,t],origin:new S.A({x:-180,y:90,spatialReference:e}),spatialReference:e,lods:[new E.A({level:0,resolution:.703125*r,scale:295497598.570834*r})]}));return i.ensureMaxLod(n),i}static{this.WebMercatorAuxiliarySphereTileInfo=new z.A({size:[256,256],origin:new S.A({x:-20037508.342787,y:20037508.342787,spatialReference:A.A.WebMercator}),spatialReference:A.A.WebMercator,lods:[new E.A({level:0,resolution:156543.03392800014,scale:591657527.591555})]})}static{this.WebMercatorAuxiliarySphere=Z.makeWebMercatorAuxiliarySphere(19)}get test(){}}const O=(0,b.vt)(),I=(0,C.$8)(C.pq/10),V=(0,b.vt)();Z.WebMercatorAuxiliarySphere.getExtent(0,0,0,V),(0,b.vt)([-180,-90,180,90]);var D=n(36005);let j=class extends((0,f.f)((0,d.b)((0,m.q)((0,g.A)((0,a.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=x.get(e);return t||(null!=e?(t=new M(t=>e.immediate.schedule(t)),x.set(e,t)):(t=new M,x.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const n=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return n?{operations:{supportsTileMap:n.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let n=t.currentVersion;return n||(n=9.3),n}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,n,r){const s=r?.signal,o={responseType:"array-buffer",signal:s},a={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,n,r)).then(()=>(0,i.A)(this.getTileUrl(e,t,n),o)).then(e=>this._lercDecoder.decode(e.data,a,s)).then(e=>new v.A(e?new v.A({values:e.pixelData,width:e.width,height:e.height,noDataValue:e.noDataValue}):{values:[],width:0,height:0,noDataValue:r?.noDataValue??I}))}getTileUrl(e,t,n){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,c.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${n}${i?"?"+i:""}`}async queryElevation(e,t){const{query:r}=await n.e(91).then(n.bind(n,90091));return(0,l.Te)(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await n.e(91).then(n.bind(n,90091));return(0,l.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,n,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,n,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},n=await(0,i.A)(this.parsedUrl.path,t);n.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=n.data,this.read(n.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[N]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"capabilities",void 0),(0,r.Cg)([(0,D.w)("service","capabilities",["capabilities"])],j.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],j.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,type:h.A})],j.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],j.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],j.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],j.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],j.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],j.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],j.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)(y.OZ)],j.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],j.prototype,"version",void 0),(0,r.Cg)([(0,D.w)("version",["currentVersion"])],j.prototype,"readVersion",null),j=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],j);const N=Symbol("default-fetch-tile");j.prototype.fetchTile[N]=!0;const L=j},63490(e,t,n){n.d(t,{E1:()=>c,Mr:()=>l,TH:()=>a});var r=n(5482),i=n(69540),s=n(25482),o=n(91429);let a=class extends((0,i.OU)(s.o)){constructor(){super(...arguments),this.url=null}};(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"lod",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=(0,r.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],a);let l=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.constantElevation=null}};(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"constantElevation",void 0),l=(0,r.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],l);const c=e=>null!=e&&"number"==typeof e.constantElevation},65708(e,t,n){n.d(t,{a:()=>o,e:()=>s});var r=n(86211),i=n(78125);function s(e,t={}){const{unit:n}=t;let s=(0,i.fromGeometry)(e).calculateArea2D();if(s&&n){const t=(0,i.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,r.B5)(t);o!==n&&(o?s=(0,r.oU)(s,o,n):(s=Math.sqrt(s),s*=(0,r.GA)(t),s**=2,s=(0,r.oU)(s,"square-meters",n)))}return s}const o=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:!0},Symbol.toStringTag,{value:"Module"}))},68747(e,t,n){n.r(t),n.d(t,{generateCombinationsPanoramicWorker:()=>x,generateCombinationsWorker:()=>M});var r=n(34727),i=n(74887);n(17799),n(69052),n(799),n(86211),n(18047),new Map,n(77690),n(29242),n(51850),n(37585),n(35522);var s=n(49186);n(56507),n(86738),n(39829),n(82799),n(16930),n(34403),n(21325),n(91218),n(65708),n(49590),n(27749),n(39663),n(7817),n(10222),n(4576),n(63490),n(6800),n(87811);var o=n(53966);n(44208),n(27921),n(5443),n(83276),n(19419),n(62369),n(87772),n(23281),n(90091),n(87378),n(22796),n(1555),n(87045),n(72802),n(7861);const a=[1920,1080];(0,r.KJ)(Math.acos(.05));var l=n(5482),c=n(97768),u=n(61893),h=n(10107),p=n(64108);let f=class extends u.Z{constructor(e){super(e),this.autoLoad=!1,this.customParameters=null,this.datasetFormat=null,this.url=null,this.rotation=null}destroy(){this._cache=(0,c.pR)(this._cache)}get layer(){return this._cache}get size(){if(!this._cache?.loaded||!this._cache.serviceRasterInfo)return;const{serviceRasterInfo:e}=this._cache;return[e.width,e.height]}async load(e){if(this._cache?.loaded)return await this._cache.load(e),{layer:this._cache,size:this.size};const{url:t,customParameters:r}=this;let s=this.datasetFormat;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");const a=await n.e(7835).then(n.bind(n,97835));if((0,i.Te)(e),s||(s=a.guessExtensionFromURI(t)),!s){try{s=await a.getDatasetFormat(t)}catch(e){o.A.getLogger(this).warn("non-panoramic-media:dataset-format",e)}(0,i.Te)(e)}s??="UNKNOWN FORMAT",this.datasetFormat=s;const l=(await Promise.all([n.e(7373),n.e(9235),n.e(3500),n.e(1003),n.e(2806),n.e(561)]).then(n.bind(n,90561))).default;(0,i.Te)(e),this._cache=new l({url:t,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:s},customParameters:r??void 0});const c=this._cache.load(e);return this.addResolvingPromise(c),await c,(0,i.Te)(e),{layer:this._cache,size:this.size}}};(0,l.Cg)([(0,h.MZ)()],f.prototype,"_cache",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"autoLoad",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"customParameters",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"datasetFormat",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"url",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"layer",null),(0,l.Cg)([(0,h.MZ)()],f.prototype,"rotation",void 0),(0,l.Cg)([(0,h.MZ)()],f.prototype,"size",null),f=(0,l.Cg)([(0,p.$)("esri.widgets.OrientedImageryViewer.support.NonPanoramicMedia")],f);var d=n(37955),m=n(38969);class g extends s.A{constructor(e,t,n){super(e,t,n),this.name="unknown",this.name=e}}const y=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),v=new Set(["MRF","TIFF","TIF"]);let w=class extends u.Z{constructor(e){super(e),this._size=[0,0],this._cache=null,this.autoLoad=!1,this.cameraHeading=null,this.extension=null,this.imagePyramid=null,this.type="image",this.uiStrings={}}destroy(){this._cache=null}get horizonPitch(){const{matrix:e}=this;return e?(0,r.KJ)(Math.asin(-e[6])):0}get horizonRoll(){const{matrix:e}=this;return e?(0,r.KJ)(Math.atan(e[7]/e[8])):0}get horizonYaw(){const{matrix:e,cameraHeading:t}=this;return e?(0,r.KJ)(Math.atan2(e[3],e[0])):t?-t:0}get size(){return this._size}async load(e){const{guessExtensionFromURI:t}=await n.e(7835).then(n.bind(n,97835));if((0,i.Te)(e),"video"===this.type)return this.loadVideoMesh(e);let r=this.extension;if(r||(r=t(this.url)),!r||!y.has(r))throw new g("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:r??"UNKNOWN FORMAT"});return v.has(r)?this.loadOptimizedImageMesh(e):this.loadImageMesh(e)}async loadOptimizedImageMesh(e){const{loadMeshes:t,loadPyramid:r,loadRaster:s}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060)),o=await s(this.url,e);(0,i.Te)(e),this.imagePyramid=await r(o,e),(0,i.Te)(e);const a=this.imagePyramid.getLowResolutionTiles(),l=await t(a,e);return(0,i.Te)(e),this._size=this.imagePyramid.imageSize,{meshOrMeshes:l,size:this._size,tileKeys:a?.map(e=>e.key)}}async loadVideoMesh(e){const{createImageSphere:t}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060));if((0,i.Te)(e),this._cache){const n=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{meshOrMeshes:n,size:this._size}}const r=await this._resolveMedia(e);(0,i.Te)(e),this._cache=r.media,this._size=[...a];const s=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{meshOrMeshes:s,size:this._size}}async loadImageMesh(e){const{createImageSphere:t}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060));if((0,i.Te)(e),this._cache){const n=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{meshOrMeshes:n,size:this._size}}const r=await this._resolveMedia(e);(0,i.Te)(e),this._cache=r.media;const s=r.mesh;return this._size=[r.media.width,r.media.height],{meshOrMeshes:s,size:this._size}}async _resolveMedia(e){const t=(0,i.Tw)(),r=(0,i.u7)(e?.signal,t.resolve),s="video"===this.type?document.createElement("video"):document.createElement("img");s.crossOrigin="anonymous",s.src=this.url;let o=null;const a="video"===this.type?(0,m.i)(s,this.addHandles):await new Promise((e,t)=>{o=[(0,d.on)(s,"error",e=>{t(e)}),(0,d.on)(s,"load",e)]}).finally(()=>{o?.forEach(e=>e.remove()),o=null}),l=Promise.race([a,t.promise]);this.addResolvingPromise(l);try{await l}finally{r?.remove()}(0,i.Te)(e);const c=s;if(!c)throw new g("unknown","Could not load media",{url:this.url});const{createImageSphere:u}=await Promise.all([n.e(8487),n.e(36),n.e(3494)]).then(n.bind(n,21060));(0,i.Te)(e);const h=await u({data:s,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,i.Te)(e),{media:c,mesh:h}}};function M(e){return function(e,t){const{cameraPitch:n,cameraRoll:r,cameraLocation:i}=e,{x:s,y:o,z:a,spatialReference:l}=i;if(t.every(e=>0===e)||!t||!t.length||!l)throw new Error("Invalid parameters");const[c,u,,h,p]=t,f=[-h,0,h],d=[-p,0,p],m=[-c,0,c],g=[-u,0,u],y=[];for(const t of f)for(const i of d)for(const c of m)for(const u of m)for(const h of g){const p={...e};p.cameraPitch=n+t,p.cameraRoll=r+i,p.cameraLocation={x:s+c,y:o+u,z:a?a+h:0,spatialReference:{wkid:l.wkid}},y.push(p)}return y}(e.imageToWorldProps,e.accuracyParameters)}function x(e){return function(e,t){const{cameraHeading:n,cameraLocation:r}=e,{x:i,y:s,z:o,spatialReference:a}=r;if(!t||t.every(e=>0===e)||!t.length||!a)throw new Error("Invalid parameters");const[l,c,u]=t,h=u>0?[-u,0,u]:[],p=l>0?[-l,0,l]:[],f=c>0?[-c,0,c]:[],d=[];for(const t of h)for(const r of p)for(const l of p)for(const c of f){const u={...e};u.cameraHeading=n+t,u.cameraLocation={x:i+r,y:s+l,z:o?o+c:0,spatialReference:{wkid:a.wkid}},d.push(u)}return d}(e.imageToWorldProps,e.accuracyParameters)}(0,l.Cg)([(0,h.MZ)()],w.prototype,"_size",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"autoLoad",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"cameraHeading",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"extension",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"horizonPitch",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"horizonRoll",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"horizonYaw",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"imagePyramid",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"matrix",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"size",null),(0,l.Cg)([(0,h.MZ)()],w.prototype,"type",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"uiStrings",void 0),(0,l.Cg)([(0,h.MZ)()],w.prototype,"url",void 0),w=(0,l.Cg)([(0,p.$)("esri.widgets.PanoramicViewer.support.PanoramicMedia")],w),n(9093),n(91829),n(58083),n(79258),n(73354),n(28208),n(28735)},73354(e,t,n){n.d(t,{a:()=>h,b:()=>a,c:()=>o,d:()=>i,e:()=>p,f:()=>u,l:()=>c,n:()=>f,t:()=>s});var r=n(40876);function i(e,t,n){s(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function s(e,t,n,r=3,i=r){if(e.length/r!==Math.ceil(t.length/i))return e;const s=e.length/r,o=n[0],a=n[1],l=n[2],c=n[4],u=n[5],h=n[6],p=n[8],f=n[9],d=n[10],m=n[12],g=n[13],y=n[14];let v=0,w=0;for(let n=0;n<s;n++){const n=t[v],s=t[v+1],M=t[v+2];e[w]=o*n+c*s+p*M+m,e[w+1]=a*n+u*s+f*M+g,e[w+2]=l*n+h*s+d*M+y,v+=i,w+=r}return e}function o(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,r=3,i=r){if(e.length/r!==Math.ceil(t.length/i))return;const s=e.length/r,o=n[0],a=n[1],l=n[2],c=n[3],u=n[4],h=n[5],p=n[6],f=n[7],d=n[8];let m=0,g=0;for(let n=0;n<s;n++){const n=t[m],s=t[m+1],y=t[m+2];e[g]=o*n+c*s+p*y,e[g+1]=a*n+u*s+f*y,e[g+2]=l*n+h*s+d*y,m+=i,g+=r}}function l(e,t,n,r=3,i=r){const s=Math.min(e.length/r,t.length/i);let o=0,a=0;for(let l=0;l<s;l++)e[a]=n*t[o],e[a+1]=n*t[o+1],e[a+2]=n*t[o+2],o+=i,a+=r;return e}function c(e,t,n,r){u(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function u(e,t,n,i,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const u=1/r.Tf;for(let r=0;r<a;r++)e[c]=i*(n*t[l])**u,e[c+1]=i*(n*t[l+1])**u,e[c+2]=i*(n*t[l+2])**u,l+=o,c+=s}function h(e,t,n,r=3,i=r){const s=e.length/r;if(s!==Math.ceil(t.length/i))return e;let o=0,a=0;for(let l=0;l<s;l++)e[a]=t[o]+n[0],e[a+1]=t[o+1]+n[1],e[a+2]=t[o+2]+n[2],o+=i,a+=r;return e}function p(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,n=3,r=n){const i=Math.min(e.length/n,t.length/r);let s=0,o=0;for(let a=0;a<i;a++){const i=t[s],a=t[s+1],l=t[s+2],c=i*i+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*i,e[o+1]=t*a,e[o+2]=t*l}s+=r,o+=n}}n(44208),n(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:f,normalizeView:p,scale:l,scaleView:function(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),i=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<r;e++)i[c]=o[l]>>n,i[c+1]=o[l+1]>>n,i[c+2]=o[l+2]>>n,l+=a,c+=s},transformMat3:a,transformMat3View:o,transformMat4:s,transformMat4View:i,translate:h},Symbol.toStringTag,{value:"Module"}))},76061(e,t,n){n.d(t,{S:()=>i});var r=n(61691);class i extends r.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},77085(e,t,n){n.d(t,{Hh:()=>a,fz:()=>u,g7:()=>l,s1:()=>o,zo:()=>c});var r=n(76061),i=n(83290);let s;function o(){return!!s&&(0,i.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(1088)]).then(n.bind(n,31088)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,i.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(i.p)}}function l(e,t,n,r){return s.execute(e,t,n,r,null)}function c(e,t,n,i){const o=s.executeMany(new r.S(e),t,n,i,null);return Array.from(o)}function u(){return s.supportsCurves()}},77548(e,t,n){n.d(t,{Gh:()=>w,tk:()=>m,BR:()=>d,p2:()=>p,wI:()=>f,G$:()=>y,$x:()=>g,Ov:()=>l,UC:()=>s,W_:()=>c,OP:()=>v,TU:()=>a,XX:()=>o,jy:()=>u});var r=n(70333),i=n(11254);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}n(7762),n(84952),n(36563),n(36708),n(4146),new WeakMap,n(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function c(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function u(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function h(e){const t=e?.type;return"binning"===t||"cluster"===t}function p(e,t){if(!u(e))return;const n=t?.graphic,r=e.featureReduction;if(n){if(n.isAggregate){const e=n.origin;return e&&"featureReductionProvider"in e&&r?h(r)?r:null:void 0}return e}return t?.checkFeatureReduction&&r?h(r)?r:null:e}async function f(e,t){const n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function m(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function g(e,t){return null}function y(e){return null}function v(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function w(e,t){if(!t||!v(e))return;const n=(e.url,null);n&&(e.url=n)}},78125(e,t,n){n.r(t),n.d(t,{fromExtent:()=>g,fromGeometry:()=>m,fromMultipoint:()=>y,fromPoint:()=>v,fromPolygon:()=>w,fromPolyline:()=>M,fromPolylineUsingImportOperator:()=>x,fromSpatialReference:()=>C,getSpatialReference:()=>d,toExtent:()=>T,toGeometry:()=>b,toMultipoint:()=>_,toPoint:()=>S,toPolygon:()=>A,toPolyline:()=>R});var r=n(83661),i=(n(79187),n(55537)),s=n(95213),o=n(88885),a=n(5443),l=n(48526),c=n(86738),u=n(39829),h=n(82799),p=(n(90293),n(83299));const f="_gxVersion";function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function m(e){switch(e.type){case"point":return v(e);case"multipoint":return y(e);case"polyline":return M(e);case"polygon":return w(e);case"extent":return g(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function g(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function y(e){if(!e.getCacheValue(f)){const t=new o.M,n=new s.P,r=e.points,i=e.hasM,a=e.hasZ,l=a?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),a&&n.setZ(s[2]??0),i&&n.setM(s[l]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:i}=e,s=(0,p.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:i});e.setCacheValue(f,s)}return e.getCacheValue(f)}function M(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:i}=e,s=(0,p.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:i});e.setCacheValue(f,s)}return e.getCacheValue(f)}function x(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:i}=e,s=(0,p.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:n,hasZ:r,paths:i});e.setCacheValue(f,s)}return e.getCacheValue(f)}function C(e){return(0,p.fromSpatialReference)(e)}function b(e,t){if(e)switch(e.getGeometryType()){case i.G.enumPoint:return S(e,t);case i.G.enumEnvelope:return T(e,t);case i.G.enumMultiPoint:return _(e,t);case i.G.enumPolyline:return R(e,t);case i.G.enumPolygon:return A(e,t)}return null}function T(e,t){if(e.isEmpty())return null;const n=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(2,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(1,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(f,e),n}function _(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),i=n.hasZ(),o=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];i&&n.push(a.getZ()),r&&n.push(a.getM()),o.push(n)}const c=new l.A({hasM:r,hasZ:i,points:o,spatialReference:t});return c.setCacheValue(f,e),c}function S(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),i=e.getDescription();return i.hasM()&&(n.m=e.getM()),i.hasZ()&&(n.z=e.getZ()),n.setCacheValue(f,e),n}function A(e,t){if(e.isEmpty())return null;const n=u.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(f,e),n}function R(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(f,e),n}},79677(e,t,n){n.d(t,{A:()=>h});var r,i=n(5482),s=n(25482),o=n(88930),a=n(91429),l=n(98623),c=n(36005),u=n(43937);let h=class extends s.o{static{r=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,e,t));let i=this.end;if(i){const n=(0,o.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,o.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return i>=t&&i<=n?o=i:t>=i&&t<=s&&(o=t),n>=i&&n<=s?a=n:s>=t&&s<=n&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,n=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new r,{start:s,end:a}=this;return null!=s&&(i.start=(0,o.S1)(s,e,t,n)),null!=a&&(i.end=(0,o.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i.Cg)([(0,c.w)("end")],h.prototype,"readEnd",null),(0,i.Cg)([(0,u.K)("end")],h.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i.Cg)([(0,c.w)("start")],h.prototype,"readStart",null),(0,i.Cg)([(0,u.K)("start")],h.prototype,"writeStart",null),h=r=(0,i.Cg)([(0,a.$K)("esri.time.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0})},81150(e,t,n){n.d(t,{Pg:()=>l,fz:()=>c,g7:()=>o,zo:()=>a});var r=n(76061),i=(n(55537),n(88885),n(15756));n(95213);const s=new i.f;function o(e,t,n){return s.execute(e,t,n,null)}function a(e,t,n){const i=s.executeMany(new r.S(e),t,n,null);return Array.from(i)}function l(e,t,n){return s.isSimpleAsFeature(e,t,n,null,null)}function c(){return s.supportsCurves()}},82534(e,t,n){function r(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}n.d(t,{o8:()=>i,vt:()=>r,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,fromValues:function(e,t,n,r){return[e,t,n,r]}},Symbol.toStringTag,{value:"Module"}))},83276(e,t,n){n.r(t),n.d(t,{execute:()=>f,executeMany:()=>d,isLoaded:()=>h,load:()=>p,supportsCurves:()=>u});var r=n(4144),i=n(17499);let s,o,a,l,c,u;function h(){return!!s&&(0,r.s1)()}async function p(){if(!h()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(1666)]).then(n.bind(n,78125)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,r.Hh)()]);s=e.fromGeometry,o=e.fromSpatialReference,a=e.getSpatialReference,l=e.toGeometry,c=t.createProjectionTransformation,u=(0,r.fz)()}}function f(e,t,n){const u=a(e),h=c(o(u),o(t),n),p=l((0,r.g7)(s(e),h),t);return!n?.zConversionDisabled&&p?.hasZ&&(0,i.gw)([p],u,t),p}function d(e,t,n){const u=e.map(s),h=a(e),p=c(o(h),o(t),n),f=(0,r.zo)(u,p).map(e=>l(e,t));return!n?.zConversionDisabled&&f&&(0,i.gw)(f,h,t),f}},86742(e,t,n){n.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6859),n.e(6558)]).then(n.bind(n,6558)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6061)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorGeodeticArea,t(r.p)}}function a(e,t,n){return i.execute(e,t,n,null)}function l(){return i.supportsCurves()}},87378(e,t,n){n.d(t,{A:()=>a});var r,i=n(34275),s=n(56507);const o=Symbol("ElevationTileDataClass");class a{static{r=o}constructor({values:e,width:t,height:n,noDataValue:s}){this[r]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,i.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=n,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let n=1/0,r=-1/0,i=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(n=s<n?s:n,r=s>r?s:r,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=n,this._maxValue=r>-3e38?r:0)}static{this.from=(0,s.qf)(a)}}},87992(e,t,n){n.d(t,{JR:()=>_,ME:()=>C,MY:()=>S,NO:()=>x,Nh:()=>T,V2:()=>z,_s:()=>Z,e6:()=>I,gh:()=>b,tr:()=>D,uX:()=>g});var r=n(5482),i=n(69397),s=n(16930),o=(n(70328),n(19419)),a=n(60408),l=n(21325),c=n(513),u=n(50954),h=n(79567),p=n(52006),f=n(49663),d=n(46068),m=n(92722);class g{constructor({type:e,spatialReference:t,vertexCount:n,vertexXY:r,vertexZ:i,vertexM:s,partCount:o,partOffsets:a,partFlags:l,segmentFlags:c,segmentIndices:u,segmentParams:h,segmentCountArc:p,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=n,this.vertexXY=r,this.vertexZ=i,this.vertexM=s,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=c,this.segmentIndices=u,this.segmentParams=h,this.segmentCountArc=p,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:n}=this;return e&&e-t-n}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?i.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:n,hasZ:r,hasM:i,segmentCountArc:s,segmentCountBezier:o}=this,a=z(e,t,n,r,i,this.hasCurves(),s,o);a.spatialReference=this.spatialReference;const{vertexXY:l,vertexZ:c,vertexM:u}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,n+1)),a.partOffsets.set(e.subarray(0,n+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:n,segmentParams:r,segmentParamCount:i}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(n.subarray(0,t),0),a.segmentParams.set(r.subarray(0,i),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const n=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,n)=>Math.abs(e-n)>t||isNaN(e)!==isNaN(n);for(let t=0;t<this.vertexCount;++t)if(n(this.vertexXY[2*t],e.vertexXY[2*t])||n(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(n(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(n(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(n(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return new y(this)}}class y{constructor(e){this.geometry=e,this.value=new v(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class v{constructor(e){this.geometry=e,this.index=-1,this._readVertex=P(e),this._segments=new w(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class w{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new M(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class M{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=P(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let n=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[n++],r=t[n++],i=t[n++],s=t[n++];return{b:[this.end,[e,r],[i,s]]}}const r=t[n++],i=t[n++],s=t[n++],o=t[n++],a=t[n++],l=t[n++];n++,n++;const c=t[n++],u=t[n++];if(!Boolean(4&r)&&1===s)return{c:[this.end,[c,u]]};const h=2&r?0:1,p=1&r?0:1;return{a:[this.end,[a,l],h,p,o,i,s]}}}function x(e,t){const n={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,r.mS)(n,new A(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:n,vertexXY:i,vertexZ:s,vertexM:a}=e,l=R(e);if(e.hasCurves()){const n={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(n,new A(e,["vertexZ","vertexM"]),!1);const i=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:n}of t.segments)(0,h.e)(i,e,n),e=(0,p.yP)(n)}const[s,a,c,u]=i;t={xmin:s,ymin:a,xmax:c,ymax:u,spatialReference:l}}catch(e){n.error=e,n.hasError=!0}finally{(0,r.hk)(n)}}else{let e,r,s,o;e=r=1/0,s=o=-1/0;for(let t=0;t<n;++t){const n=i[2*t],a=i[2*t+1];e=Math.min(e,n),s=Math.max(s,n),r=Math.min(r,a),o=Math.max(o,a)}t={xmin:e,ymin:r,xmax:s,ymax:o,spatialReference:l}}if(s){let e=1/0,n=-1/0;for(const t of s)e=Math.min(e,t),n=Math.max(n,t);t.zmin=e,t.zmax=n}if(a){let e=1/0,n=-1/0;for(const t of a)e=Math.min(e,t),n=Math.max(n,t);t.mmin=e,t.mmax=n}return t}(e)),t}catch(e){n.error=e,n.hasError=!0}finally{(0,r.hk)(n)}}function C(e){let t,n,r;if((0,a.fT)(e)){r="point";const{x:i,y:s,z:o,m:a}=e,l=[i,s];null!=o&&l.push(o),null!=a&&l.push(a),n=[[l]],t=1}else(0,a.U9)(e)?(r="multipoint",n=[e.points],t=e.points.length):(0,a.Rg)(e)?(r="polyline",n=e.curvePaths??e.paths,t=n.reduce((e,t)=>e+t.length,0)):(r="polygon",n=e.curveRings??e.rings,t=n.reduce((e,t)=>(0===t.length||(e+=t.length,E(t[0],(0,p.yP)(t.at(-1)))&&--e),e),0));const i=z(r,t,r.includes("point")?0:n.length,(0,a.Pv)(e),(0,a.W0)(e),(0,p.Ed)(e)),{hasZ:s,hasM:o,vertexXY:l,vertexZ:c,vertexM:u}=i;function h(e){l[2*d]=e[0],l[2*d+1]=e[1],s&&(c[d]=e[2]),o&&(u[d]=e[f]),++d}i.spatialReference=e.spatialReference??void 0;const f=i.hasZ?3:2;let d=0;if(!i.isMultipart()){if(!s&&!o){for(const[e,t]of n[0])l[2*d]=e,l[2*d+1]=t,++d;return i}for(const e of n[0])h(e);return i}const m="polygon"===r,{partOffsets:g}=i;let y=0;if(!i.hasCurves()){for(const e of n){if(g[y++]=d,0===e.length)continue;let t=e.length;if(m&&E(e[0],e.at(-1))&&--t,s||o)for(let n=0;n<t;++n)h(e[n]);else for(let n=0;n<t;++n){const[t,r]=e[n];l[2*d]=t,l[2*d+1]=r,++d}}return g[y]=d,i}function v(e){const t=w+e;if(t<=(i.segmentParams?.length??0))return;let n=t*j;n=20*Math.ceil(n/20);const r=i.segmentParams;i.segmentParams=new Float64Array(n),null!=r&&i.segmentParams.set(r)}let w=0;for(const e of n){if(i.partOffsets[y++]=d,0===e.length)continue;const t=e[0];let n=t;for(let t=1;t<e.length;++t){const r=e[t];h(n);const s=d-1;(0,p.wY)(r)?(v(10),++i.segmentCountArc,w=Z(n,r,i,s,w),n=r.a[0]):(0,p.DA)(r)?(v(10),++i.segmentCountArc,w=O(n,r,i,s,w),n=r.a[0]):(0,p.aO)(r)?(v(10),++i.segmentCountArc,w=I(n,r,i,s,w),n=r.c[0]):(0,p.n1)(r)?(v(4),++i.segmentCountBezier,w=D(0,r,i,s,w),n=r.b[0]):n=r}m&&E(t,n)||h(n)}return i.partOffsets[y]=d,i}function b(e){const t=P(e),{vertexCount:n,partCount:r,hasZ:i,hasM:s}=e,o=R(e);if("point"===e.type){const[t,n]=e.vertexXY,r=e.vertexZ?.[0],i=e.vertexM?.[0];return{x:t,y:n,z:r,m:i,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<n;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:i,hasM:s}}const l="polygon"===e.type;if(!e.hasCurves()){const n=new Array;for(let i=0;i<r;++i){const r=e.partOffsets[i+1],s=new Array;for(;a<r;)s.push(t(a++));l&&s.length>0&&s.push(s[0]),n.push(s)}return l?{rings:n,hasZ:i,hasM:s,spatialReference:o}:{paths:n,hasZ:i,hasM:s,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:n}of e.parts){const e=[n];for(const{curve:n}of t)e.push(n);c.push(e)}return l?{rings:[],curveRings:c,hasZ:i,hasM:s,spatialReference:o}:{paths:[],curvePaths:c,hasZ:i,hasM:s,spatialReference:o}}function T(e,{lengths:t,coords:n,hasZ:r,hasM:i},s){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);r??=!1,i??=!1;const c=z(e,l,o,r,i,!1,0,0);if(c.spatialReference=s??void 0,!c.isMultipart()){for(let e=0,t=0;e<l;++e)c.vertexXY[2*e]=n[t++],c.vertexXY[2*e+1]=n[t++],r&&(c.vertexZ[e]=n[t++]),i&&(c.vertexM[e]=n[t++]);return c}const u=2+Number(r)+Number(i);let h=0,p=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[p],s=t+e-Number(a);c.partOffsets[++p]=s;for(let e=t;e<s;++e)c.vertexXY[2*e]=n[h++],c.vertexXY[2*e+1]=n[h++],r&&(c.vertexZ[e]=n[h++]),i&&(c.vertexM[e]=n[h++]);a&&(h+=u)}return c}function _({type:e,vertexCount:t,vertexXY:n,vertexZ:r,vertexM:i,partCount:s,partOffsets:o,hasZ:a,hasM:l}){const c=new m.A([],[],a,l);s=Math.max(s,1);const u="polygon"===e;let h=0;for(let e=0;e<s;++e){const s=o?.[e+1]??t,p=c.coords.length;for(let e=h;e<s;++e)c.coords.push(n[2*e],n[2*e+1]),a&&c.coords.push(r[e]),l&&c.coords.push(i[e]);if(u){const e=h;c.coords.push(n[2*e],n[2*e+1]),a&&c.coords.push(r[e]),l&&c.coords.push(i[e])}c.lengths.push((c.coords.length-p)/c.stride),h=s}return"point"===e&&(c.lengths.length=0),c}function S(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,n=e.isCustomWkid()?0:e.getOldID();if(n<=0)return{wkt:t};let r=e.getLatestID();(r<=0||r===n)&&(r=void 0);const i=e.getVCS();if(null==i)return{wkid:n,latestWkid:r,wkt:t};const s=i.isCustomWkid()?0:i.getOldID();if(s<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===s)&&(o=void 0),{wkid:n,wkt:t,latestWkid:r,vcsWkid:s,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class A{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const n of t)e[n]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function P({vertexXY:e,vertexZ:t,vertexM:n}){return t?n?r=>[e[2*r],e[2*r+1],t[r],n[r]]:n=>[e[2*n],e[2*n+1],t[n]]:n?t=>[e[2*t],e[2*t+1],n[t]]:t=>[e[2*t],e[2*t+1]]}function E(e,t){return e.every((e,n)=>e===t[n])}function z(e,t,n,r,i,s,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:n,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;r&&(c+=Float64Array.BYTES_PER_ELEMENT*t),i&&(c+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(c+=(n+1)*Int32Array.BYTES_PER_ELEMENT,c+=(n+1)*Int8Array.BYTES_PER_ELEMENT),s&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const u=new ArrayBuffer(c);let h=0;return l.vertexXY=new Float64Array(u,h,2*t),h+=l.vertexXY.byteLength,r&&(l.vertexZ=new Float64Array(u,h,t),h+=l.vertexZ.byteLength),i&&(l.vertexM=new Float64Array(u,h,t),h+=l.vertexM.byteLength),s&&(l.segmentParams=new Float64Array(u,h,l.segmentParamCount),h+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,h,t),l.segmentIndices.fill(N),h+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,h,n+1),h+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,h,n+1),h+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,n).fill(1)),s&&(l.segmentFlags=new Int8Array(u,h,t),l.segmentFlags.fill(1),h+=l.segmentFlags.byteLength),l}function Z(e,t,{segmentFlags:n,segmentIndices:r,segmentParams:i},s,o){n[s]=4,r[s]=o;const[a,[l,c],u,h,p,f,m]=t.a;let g=4;h||(g|=1),u||(g|=2);const y=(0,d.SW)(e,t),[v,w]=(0,d.Uk)(y,.5);return i[o++]=g,i[o++]=f,i[o++]=m,i[o++]=p,i[o++]=l,i[o++]=c,i[o++]=y.u2-y.u1,i[o++]=y.u1,i[o++]=v,i[o++]=w,o}function O(e,t,{segmentFlags:n,segmentIndices:r,segmentParams:i},s,o){n[s]=4,r[s]=o;const a=(0,f.i)(e,t);return V(a,4,...(0,c.mq)(a,.5),i,o)}function I(e,t,{segmentFlags:n,segmentIndices:r,segmentParams:i},s,o){return n[s]=4,r[s]=o,V((0,u.pM)(e,t),0,...t.c[1],i,o)}function V(e,t,n,r,i,s){const{cx:o,cy:a,thetaStart:l,thetaEnd:c,radius:u}=e;return l>c||(t|=1),Math.abs(c-l)<=Math.PI||(t|=2),i[s++]=t,i[s++]=u,i[s++]=1,i[s++]=0,i[s++]=o,i[s++]=a,i[s++]=c-l,i[s++]=l,i[s++]=n,i[s++]=r,s}function D(e,{b:[t,[n,r],[i,s]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},c,u){return o[c]=2,a[c]=u,l[u++]=n,l[u++]=r,l[u++]=i,l[u++]=s,u}const j=1.61803,N=-1},90091(e,t,n){n.d(t,{createSampler:()=>P,query:()=>R});var r=n(60999),i=n(49186),s=n(97768),o=n(74887),a=n(86211),l=n(91218),c=n(19419),u=n(4576),h=n(72802);class p{constructor(e,t){this.layer=e,this.parameters=t}}class f extends p{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,r=g(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(r,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){return(0,u.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends p{constructor(e,t,n,r){super(e,n),this.maskExtents=r,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),r=Math.min(n,e);r<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(r)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,r=g(t,n);if(!e)return r.length-1;const i=this.extent;if(null==i)return-1;for(let n=r.length-1;n>=0;n--){const s=r[n],o=s.resolution*t.size[0],a=s.resolution*t.size[1];if(Math.ceil(i.width/o)*Math.ceil(i.height/a)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=y(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let r=!1;e(n,()=>r=!0),r?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=y(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:r}=this.layer,i=g(n,r)[e],s=n.tileAt(i.level,t.xmin,t.ymin),o=s.extent,a=i.resolution*n.size[0],l=i.resolution*n.size[1],c=Math.ceil((t.xmax-o[0])/a),u=Math.ceil((t.ymax-o[1])/l);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const r=new h.U(s.level,s.row-e,s.col+t);n.updateTileInfo(r),this._tileIsMasked(r)||this._candidateTiles.push(r)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function m(e){return null!=e?.tileInfo}function g(e,t){const n=e.lods;if(m(t)){const{effectiveMinLOD:e,effectiveMaxLOD:r}=t;return n.filter(t=>t.level>=e&&t.level<=r)}return n}function y(e,t){const n={},r=[];for(const i of e){const e=i.id;e&&!n[e]?(n[e]=i,r.push(i)):t?.(i)}const i=r.sort((e,t)=>e.level-t.level);return i.filter((e,n)=>{for(let r=0;r<n;r++){const n=i[r].extent;if(n&&(0,c.gR)(n,e.extent))return t?.(e),!1}return!0})}class v{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class w{constructor(e,t=null){if(this.key=e,null!=t){const n=e.extent;this._samplerData=new v(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:r,dx:i,dy:s,y1:o,x0:a}=this._samplerData,{width:l,values:c,noDataValue:u}=r,h=M(s*(o-t),0,n),p=M(i*(e-a),0,n),f=Math.floor(h),d=Math.floor(p),m=f*l+d,g=m+l,y=c[m],v=c[g],w=c[m+1],x=c[g+1];if(y!==u&&v!==u&&w!==u&&x!==u){const e=p-d,t=y+(w-y)*e;return t+(v+(x-v)*e-t)*(h-f)}}}function M(e,t,n){return e<t?t:e>n?n:e}var x=n(87378),C=n(48526),b=n(86738),T=n(82799);class _{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new _(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,l.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),r=(0,l.project)(n,e);if(!r)return null;const i=this.coordinates.map((e,t)=>{const n=e.clone(),i=r.points[t];return n.x=i[0],n.y=i[1],n}),s=this.clone(i);return s.spatialReference=e,s}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,l.project)(t,e);if(!n)return null;const r=this.coordinates.map((e,t)=>{const r=e.clone(),i=n.points[t];return r.x=i[0],r.y=i[1],r}),i=this.clone(r);return i.spatialReference=e,i}static fromGeometry(e){const t=new _(e);if(e instanceof _)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const r=e.clone(t);return r.spatialReference=n,r},t;switch(e.type){case"point":{const n=e,{hasZ:r,hasM:i}=n;return t.coordinates=r&&i?[new S(n.x,n.y,n.z,n.m)]:r?[new S(n.x,n.y,n.z)]:i?[new S(n.x,n.y,null,n.m)]:[new S(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new b.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new b.A(t[0].x,t[0].y,t[0].z,n),t}case"multipoint":{const n=e,{hasZ:r,hasM:i}=n;return t.coordinates=r&&i?n.points.map(e=>new S(e[0],e[1],e[2],e[3])):r?n.points.map(e=>new S(e[0],e[1],e[2])):i?n.points.map(e=>new S(e[0],e[1],null,e[2])):n.points.map(e=>new S(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new C.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:n}):new C.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:n}),t}case"polyline":{const n=e,r=[],i=[],{hasZ:s,hasM:o}=e;let a=0;for(const e of n.paths)if(i.push([a,a+e.length]),a+=e.length,s&&o)for(const t of e)r.push(new S(t[0],t[1],t[2],t[3]));else if(s)for(const t of e)r.push(new S(t[0],t[1],t[2]));else if(o)for(const t of e)r.push(new S(t[0],t[1],null,t[2]));else for(const t of e)r.push(new S(t[0],t[1]));return t.coordinates=r,t._exporter=(t,n)=>{const r=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=i.map(e=>r.slice(e[0],e[1]));return new T.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:n})},t}}}}class S{constructor(e,t,n=null,r=null,i=null,s=null){this.x=e,this.y=t,this.z=n,this.m=r,this.tile=i,this.elevationTile=s}clone(){return new S(this.x,this.y,this.z,this.m)}}var A=n(1555);async function R(e,t,n){if(!e)throw new i.A(N,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof _)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new i.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const r={...D,...n},o=r.signal;if("integrated-mesh-3dtiles"===e.type){const i=_.fromGeometry(t);if(e.queryElevationCallback&&e.replacesTerrain){const s=12.9*(n?.minDemResolution||0)+.71,a=await e.queryElevationCallback(i,{signal:o,maxGeometricError:s}),l=i.coordinates.map(()=>({demResolution:1,source:e})),c=await a.project(t.spatialReference,o);if(c){if(void 0!==r.noDataValue&&r.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=r.noDataValue);return{geometry:c.export(),noDataValue:r.noDataValue??Number.MAX_VALUE,sampleInfo:l}}}const s=i.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:i.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}const c=new f(e,t.spatialReference,r);return await e.load({signal:o}),await async function(e,t,n){let r;const s=e.layer.tileInfo.spatialReference;if(t instanceof _?r=await t.project(s,n):(await(0,l.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:n}),r=(0,l.project)(t,s)),!r)throw new i.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=_.fromGeometry(r)}(c,t,o),await Z(c,o),await j(c,o),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let r=e.parameters.noDataValue;if(n){const e=n.sample(t.x,t.y);null==e?t.elevationTile=null:r=e}t.z=r})}(c),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(n);const r={geometry:n.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(r.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,a.GA)(t.spatialReference);return e.geometry.coordinates.map(r=>{let i=-1;return r.elevationTile&&r.elevationTile!==e.outsideExtentTile&&(i=t.lodAt(r.elevationTile.key.level).resolution*n),{demResolution:i,source:-1===i?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),r}(c,o)}async function P(e,t,n){if(e=Array.isArray(e)?e:[e],0===(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new i.A(N,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new i.A("elevation-query:invalid-extent","Invalid or undefined extent");const r={...D,...n,returnSampleInfo:!0},s=E(e[e.length-1],t,r);return 1===e.length?s:z(e,t,await s,r)}async function E(e,t,n,r){const i=n.signal;await e.load({signal:i});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,l.initializeProjection)([{source:s,dest:o}],{signal:i}),t=(0,l.project)(t,o));const a=new d(e,t,n,r);await Z(a,i),await j(a,i);const c=a.elevationTiles,u=a.layer.tileInfo,h=a.parameters.noDataValue;return new A.C({noDataValue:h,tiles:c,tileInfo:u})}async function z(e,t,n,r){if(e.pop(),!e.length)return n;const i=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),s=await E(e[e.length-1],t,r,i);if(0===s.samplers.length)return n;const o=n.samplers.concat(s.samplers),a=r.noDataValue;return z(e,t,new A.C({samplers:o,noDataValue:a}),r)}async function Z(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new w(new h.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const r=e.x,i=e.y;(r<n.xmin||r>n.xmax||i<n.ymin||i>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.parameters.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:r}=e.layer,i=t/(0,a.GA)(n.spatialReference),s=g(n,r);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-i)<Math.abs(o.resolution-i)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await async function(e,t){const{tileInfo:n,tilemapCache:r}=e.layer,i=V(n,r,e.parameters.minDemResolution);await O(e,i,t)}(e,t);else{if("auto"!==n)throw new i.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,r=V(t,n,e.parameters.minDemResolution);e.selectTilesAtLOD(r,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const r={},i=e=>{null!=e.id&&(e.id in r?r[e.id]++:(r[e.id]=1,n++))},s=e=>{if(null==e.id)return;const t=r[e.id];1===t?(delete r[e.id],n--):r[e.id]=t-1};e.forEachTileToFetch(i,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(r=>{n<=e.parameters.maximumAutoTileRequests||(s(r),t.upsampleTile(r)&&(o=!0),i(r))},s),o););}(e);const n=e.layer.tilemapCache;if(!n||m(n))return I(e,t);const i=e.getTilesToFetch(),s={},a=i.map(async e=>{const i=new h.U(0,0,0),a=await(0,r.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,i,{signal:t}));!1!==a.ok?null!=e.id&&(s[e.id]=i):(0,o.QP)(a.error)});await(0,o.qr)(Promise.all(a),t),e.remapTiles(s)}(e,t)}}async function O(e,t,n){const r=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=r.tilemapCache,a=e.getTilesToFetch();try{if(s&&!m(s))await(0,o.qr)(Promise.all(a.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await j(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new i.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(r){(0,o.QP)(r),await O(e,t-1,n)}}async function I(e,t){const n=e.layer.tileInfo;await j(e,t);let r=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?r=!0:t()}),r&&await I(e,t)}function V(e,t,n=0){const r=g(e,t);let i=r.length-1;if(n>0){const t=n/(0,a.GA)(e.spatialReference),s=r.findIndex(e=>e.resolution<t);0===s?i=0:s>0&&(i=s-1)}return i}const D={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function j(e,t){const n=e.getTilesToFetch(),r={},i=e.parameters.cache,s=e.parameters.noDataValue,a={noDataValue:s,signal:t},l=n.map(async t=>{if(null==t.id)return;const n=`${e.layer.uid}:${t.id}:${s}`,o=i?.get(n),l=o??x.A.from(await e.layer.fetchTile(t.level,t.row,t.col,a));i?.put(n,l),r[t.id]=new w(t,l)});await(0,o.qr)(Promise.allSettled(l),t),e.populateElevationTiles(r)}const N="elevation-query:invalid-layer"},92722(e,t,n){n.d(t,{A:()=>i});var r=n(69397);class i{constructor(e=[],t=[],n=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:n,hasM:r}){return new i(e,t,n||!1,r||!1)}static fromRect([e,t,n,r]){const s=n-e,o=r-t;return new i([5],[e,t,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let i=this.coords[r*t],s=this.coords[r*t+1];for(let o=1;o<n;o+=1){const n=r*(t+o),a=this.coords[n],l=this.coords[n+1];e+=-.5*(a-i)*(l+s),i=a,s=l}t+=n}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=n*(t+i);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;const{stride:i}=this;for(const e of n){for(let n=1;n<e;n++){const e=i*(r+n);t[e]+=t[e-i],t[e+1]+=t[e+1-i]}r+=e}return e}clone(e){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:n,size:r}=this,s=this.coords.slice(0,r*n);return e?(e.set(s),new i(t,e)):new i(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const n=new Array(t*e);for(let t=0,r=0;t<n.length;t+=e)n[r++]=this.coords[t],n[r++]=this.coords[t+1];return new i(this.lengths,n,!1,!1)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5482],{5479(e,t,r){function s(e){const t=[];return function*(){yield*t;let r,s=t.length;for(;!(r=e.next()).done;)for(t.push(r.value),yield r.value;++s<t.length;)yield t[s]}}r.d(t,{I6:()=>o,N5:()=>n,PP:()=>s,xZ:()=>l,zN:()=>a});const i=Object.freeze({done:!0,value:void 0});function n(e){const t=[];let r=null,s=null,n=!1;async function o(){if(n)return i;if(null!=s)return s;s=e.next();try{const e=await s;return s=null,e.done?(n=!0,i):(t.push(e.value),e)}catch(e){throw n=!0,s=null,r=e,e}}return async function*(){yield*t;let e,s=t.length;for(;!(e=await o()).done;)for(yield e.value;++s<t.length;)yield t[s];if(null!=r)throw r}}function o(e,t){for(const r of e)if(null!=r&&t(r))return r}function a(e,t){for(const r of e)if(t(r))return!0;return!1}function l(e){return null!=e&&"function"==typeof e[Symbol.iterator]}},11406(e,t,r){r.d(t,{T:()=>n});var s=r(36563);class i{constructor(e,t){this._observers=e,this._observer=t}remove(){const{_observers:e,_observer:t}=this;if(e[e.length-1]===t)return void e.pop();const r=e.indexOf(this._observer);-1!==r&&e.splice(r,1)}}class n{constructor(){this._observers=null,this.destroyed=!1}observe(e){if(this.destroyed||e.destroyed)return o;null==this._observers&&(this._observers=[]);const t=this._observers;let r=!1,s=!1;for(const i of t)if(i.destroyed)s=!0;else if(i===e){r=!0;break}return r||(t.push(e),s&&this._removeDestroyedObservers()),new i(t,e)}_removeDestroyedObservers(){const e=this._observers;if(!e)return;const t=e.length;if(0===t)return;let r=0;for(let s=0;s<t;++s){for(;s+r<t&&e[s+r].destroyed;)++r;if(r>0){if(!(s+r<t))break;e[s]=e[s+r]}}e.length=t-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this._observers;if(null!=e){for(const t of e)t.onCommitted();this._observers=null}}}const o=(0,s.hA)()},14012(e,t,r){r.d(t,{iS:()=>w,wB:()=>N,Cn:()=>k});var s=r(98291),i=r(36563),n=r(4718),o=r(93687);class a extends o.A{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...e){const t=super.acquire(...e);return this._set.delete(t),t}release(e){e&&!this._set.has(e)&&(super.release(e),this._set.add(e))}_dispose(e){this._set.delete(e),super._dispose(e)}}var l=r(76030),c=r(24326),u=r(16649),h=r(85537),d=r(80559),f=r(88620);class p{constructor(){this.uid=(0,c.c)(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static{this.pool=new a(()=>new p)}static acquireUntracked(e,t,r,s,i){return this.pool.acquire(0,e,t,r,s,i,n.aI)}static acquireTracked(e,t,r,s){return this.pool.acquire(1,e,t,r,null,null,s)}notify(e,t){0===this.type?this.callback.call(this.target,e,t,this.path,this.target):this.callback.call(null,e,t,void 0,void 0)}acquire(e,t,r,s,i,n,o){this.uid=(0,c.c)(),this.removed=!1,this.type=e,this.oldValue=t,this.callback=r,this.getValue=s,this.target=i,this.path=n,this.equals=o}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=(0,c.c)(),this.removed=!0}}const g=new s.A,_=new Set;let v;function m(e){_.delete(e),_.add(e),v||(v=(0,l._)(O))}function y(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function w(e){for(const t of _.values())t.target===e&&(t.removed=!0)}function O(){let e=10;for(;v&&e--;){v=null;const e=b(),t=g.acquire();for(const r of e){const e=r.uid;y(r),e===r.uid&&r.removed&&t.push(r)}for(const e of _)e.removed&&(t.push(e),_.delete(e));for(const e of t)p.pool.release(e);g.release(t),g.release(e),A.forEach(e=>e())}}function b(){const e=g.acquire();e.length=_.size;let t=0;for(const r of _)e[t]=r,++t;return _.clear(),e}const A=new Set;function N(e,t,r,s=!1){return e.__accessor__&&e.__accessor__.lifecycle!==h.v.DESTROYED?s?function(e,t,r){const s=(0,f.qg)(e,t,r,(e,t,r)=>{let i=!1;return(0,d.mJ)(()=>(0,u.RP)(e,t),(o,a)=>{e.__accessor__.lifecycle!==h.v.DESTROYED?i||(i=!0,(0,n.aI)(a,o)||r.call(e,o,a,t,e),i=!1):s.remove()})});return s}(e,t,r):function(e,t,r){let s=(0,f.qg)(e,t,r,(e,t,r)=>{let n,o,a=(0,d.Df)(()=>(0,u.RP)(e,t),(i,a)=>{e.__accessor__?.lifecycle===h.v.DESTROYED||n&&n.uid!==o?s.remove():(n||(n=p.acquireUntracked(i,r,a,e,t),o=n.uid),m(n))});return(0,i.hA)(()=>{a.remove(),n&&(n.uid!==o||n.removed||(n.removed=!0,m(n)),n=null),s=a=null})});return s}(e,t,r):(0,i.hA)()}function k(e,t,r=!1,s=n.gh){return r?function(e,t,r){let s=!1;return(0,d.mJ)(e,(e,i)=>{s||(s=!0,r(i,e)||t(e,i),s=!1)})}(e,t,s):function(e,t,r){let s,n,o=(0,d.Df)(e,(e,i)=>{s&&s.uid!==n?o.remove():(s||(s=p.acquireTracked(e,t,i,r),n=s.uid),m(s))});return(0,i.hA)(()=>{o.remove(),s&&(s.uid!==n||s.removed||(s.removed=!0,m(s)),s=null),o=null})}(e,t,s)}},25482(e,t,r){r.d(t,{o:()=>g,T:()=>f});var s=r(5482),i=r(69622),n=r(4718);class o{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new o;return this._values.forEach((r,s)=>{e&&e.has(s)||t.set(s,(0,n.o8)(r.value),r.origin)}),t}get(e,t){t=this._normalizeOrigin(t);const r=this._values.get(e);return null==t||r?.origin===t?r?.value:void 0}originOf(e){return this._values.get(e)?.origin??7}keys(e){e=this._normalizeOrigin(e);const t=[...this._values.keys()];return null==e?t:t.filter(t=>this._values.get(t)?.origin===e)}set(e,t,r){if(0===(r=this._normalizeOrigin(r))){const t=this._values.get(e);if(null!=t?.origin&&t.origin>r)return}this._values.set(e,new a(t,r))}delete(e,t){null!=(t=this._normalizeOrigin(t))&&this._values.get(e)?.origin!==t||this._values.delete(e)}has(e,t){return null!=(t=this._normalizeOrigin(t))?this._values.get(e)?.origin===t:this._values.has(e)}isAtOrigin(e,t){return t=this._normalizeOrigin(t),this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return t=this._normalizeOrigin(t),!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(({value:t},r)=>e(t,r))}_normalizeOrigin(e){if(null!=e)return 0===e?e:7}}class a{constructor(e,t){this.value=e,this.origin=t}}var l=r(76953),c=r(45917),u=r(88620),h=r(49422),d=r(64108);const f=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,s=new o;t.store=s,(0,l.k)(t,r,s)}read(e,t){(0,c.L)(this,e,t)}write(e,t){return(0,h.M)(this,e??{},t)}toJSON(e){return this.write({},e)}static fromJSON(e,t){return p.call(this,e,t)}};return r=(0,s.Cg)([(0,d.$)("esri.core.JSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function p(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}const g=f(i.A)},35666(e,t,r){r.d(t,{AU:()=>s,OL:()=>n,aB:()=>i,in:()=>o});const s=8;function i(e){switch(e){case"defaults":return 0;case"service":return 2;case"portal-item":return 3;case"web-scene":return 4;case"web-map":return 5;case"link-chart":return 6;case"user":return 7;default:return null}}function n(e){switch(e){case 0:return"defaults";case 2:return"service";case 3:return"portal-item";case 4:return"web-scene";case 5:return"web-map";case 6:return"link-chart";case 7:return"user"}}function o(e){return n(e)}},45917(e,t,r){r.d(t,{L:()=>u,t:()=>h});var s=r(16649),i=r(88620),n=r(7142);function o(e,t,r){if(!e?.read||!1===e.read.enabled||!e.read.source)return!1;const i=e.read.source;if("string"==typeof i){if(i===t)return!0;if(i.includes(".")&&i.startsWith(t)&&(0,s.t2)(i,r))return!0}else for(const e of i){if(e===t)return!0;if(e.includes(".")&&e.startsWith(t)&&(0,s.t2)(e,r))return!0}return!1}function a(e,t,r,s,i){let a=(0,n.N5)(t[r],i);(function(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)})(a)&&(e[r]=!0);for(const l of Object.getOwnPropertyNames(t))a=(0,n.N5)(t[l],i),o(a,r,s)&&(e[l]=!0)}function l(e,t,r,s){const i=r.metadata,o=(0,n.xF)(i[t],s),a=o?.default;if(void 0===a)return;const l="function"==typeof a?a.call(e,t,s):a;void 0!==l&&r.set(t,l)}const c={origin:"service"};function u(e,t,r=c){if(!t||"object"!=typeof t)return;const o=(0,i.oY)(e),u=o.metadata,h={};for(const e of Object.getOwnPropertyNames(t))a(h,u,e,t,r);o.setDefaultOrigin(r.origin);for(const i of Object.getOwnPropertyNames(h)){const a=(0,n.N5)(u[i],r).read,l=a?.source;let c;c=l&&"string"==typeof l?(0,s.RP)(t,l):t[i],a?.reader&&(c=a.reader.call(e,c,t,r)),void 0!==c&&o.set(i,c)}if(!r||!r.ignoreDefaults){o.setDefaultOrigin("defaults");for(const t of Object.getOwnPropertyNames(u))h[t]||l(e,t,o,r)}o.setDefaultOrigin("user")}function h(e,t,r,s=c){const i={...s,messages:[]};r(i),i.messages?.forEach(t=>{"warning"!==t.type||e.loaded?s?.messages&&s.messages.push(t):e.loadWarnings.push(t)})}},49422(e,t,r){r.d(t,{M:()=>f,R:()=>d});var s=r(4576),i=r(49186),n=r(53966),o=r(16649),a=r(35666),l=r(88620),c=r(7142);function u(e,t,r,s,i){const n={};return t.write?.writer?.call(e,s,n,r,i),n}function h(e,t,r,l,c,u){if(!l?.write)return!1;const h=(0,o.Jt)(e,r);if(!c&&l.write.overridePolicy){const t=l.write.overridePolicy.call(e,h,r,u??void 0);void 0!==t&&(c=t)}if(c||(c=l.write),!c||!1===c.enabled)return!1;if(c.layerContainerTypes&&u?.layerContainerType&&!c.layerContainerTypes.includes(u.layerContainerType))return!1;if((null===h&&!c.allowNull&&!c.writerEnsuresNonNull||void 0===h)&&c.isRequired){const t=new i.A("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return t&&u?.messages?u.messages.push(t):t&&!u&&n.A.getLogger("esri.core.accessorSupport.write").error(t.name,t.message),!1}return!(void 0===h||null===h&&!c.allowNull&&!c.writerEnsuresNonNull||!(c.alwaysWriteDefaults||t.store.multipleOriginsSupported&&0!==t.store.originOf(r))&&function(e,t,r,i,n){const o=i.default;if(void 0===o)return!1;if(null!=i.defaultEquals)return i.defaultEquals(n);if("function"==typeof o){if(Array.isArray(n)){const i=o.call(e,t,r??void 0);return(0,s.aI)(i,n)}return!1}return o===n}(e,r,u,l,h)||!c.ignoreOrigin&&u?.origin&&t.store.multipleOriginsSupported&&t.store.originOf(r)<(0,a.aB)(u.origin))}function d(e,t,r,s){const i=(0,l.oY)(e),n=i.metadata,o=(0,c.k4)(n[t],s);return!!o&&h(e,i,t,o,r,s)}function f(e,t,r){if(e&&"function"==typeof e.toJSON&&(!e.toJSON.isDefaultToJSON||!e.write))return(0,l.h1)(t,e.toJSON(r));const s=(0,l.oY)(e),i=s.metadata;for(const n in i){const d=(0,c.k4)(i[n],r);if(!h(e,s,n,d,void 0,r))continue;const f=(0,o.Jt)(e,n),p=u(e,d,d.write&&"string"==typeof d.write.target?d.write.target:n,f,r);Object.keys(p).length>0&&(t=(0,l.h1)(t,p),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then(()=>(0,l.h1)(t,p,()=>"replace-arrays"))),r?.writtenProperties&&r.writtenProperties.push({target:e,propName:n,oldOrigin:(0,a.in)(s.store.originOf(n)),newOrigin:r.origin}))}return t}},69622(e,t,r){r.d(t,{A:()=>B});var s=r(51447),i=r(71511),n=r(53966),o=r(97768),a=r(56454),l=r(16649),c=r(85537),u=r(96156),h=(r(44208),r(4718)),d=r(93687),f=r(11406),p=r(62788),g=r(47328),_=r(67867);class v extends f.T{constructor(e,t){super(),this.propertyName=e,this.metadata=t,this.trackingTarget=new _.R(this),this.flags=0,this.flags=g.i.Dirty|(t.nonNullable?g.i.NonNullable:0)|(t.hasOwnProperty("value")?g.i.HasDefaultValue:0)|(void 0===t.get?g.i.DepTrackingInitialized:0)|(void 0===t.dependsOn?g.i.AutoTracked:0)}destroy(){this.flags&g.i.Dirty&&this.onCommitted(),super.destroy(),this.trackingTarget.destroy()}getComputed(e,t){e.mutable&&(0,p.gc)(this);const r=e.store,s=this.propertyName,i=this.flags,n=r.get(s);if(i&g.i.Computing)return n;if(!(i&g.i.Dirty)&&r.has(s))return n;let o;this.flags|=g.i.Computing;const{host:a}=e;i&g.i.AutoTracked?o=(0,p.a)(this.trackingTarget,t,a):((0,p.Xr)(a,this),o=t.call(a)),this.flags|=g.i.DepTrackingInitialized,r.set(s,o,1);const l=r.get(s);return l===n?this.flags&=~g.i.Dirty:(0,p.F_)(this.commit,this),this.flags&=~g.i.Computing,l}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~g.i.Dirty,this.onCommitted()}onInvalidated(){~this.flags&g.i.Overridden&&(this.flags|=g.i.Dirty);const e=this._observers;if(e&&e.length>0)for(const t of e)t.onInvalidated()}onCommitted(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onCommitted()}}}var m=r(35666);class y{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(e){const t=new y;return this._values.forEach((r,s)=>{e&&e.has(s)||t.set(s,(0,h.o8)(r))}),t}get(e){return this._values.get(e)}originOf(){return 7}keys(){return[...this._values.keys()]}set(e,t){this._values.set(e,t)}delete(e){this._values.delete(e)}has(e){return this._values.has(e)}isAtOrigin(e,t){return this.has(e)}isBelowOrigin(e,t){return!this.has(e)}forEach(e){this._values.forEach(e)}}function w(e,t,r){return void 0!==e}function O(e,t,r,s){return!(void 0===e||null==r&&e.flags&g.i.NonNullable&&(s.lifecycle,c.v.INITIALIZING,1))}class b{constructor(e){this.host=e,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=c.v.INITIALIZING,this.store=new y,this.mutable=!0,this._origin=7;const t=this.host.constructor.__accessorMetadata__;for(const e in t){const r=new v(e,t[e]);this.propertiesByName.set(e,r)}this.metadata=t}initialize(){this.lifecycle=c.v.CONSTRUCTING}constructed(){this.lifecycle=c.v.CONSTRUCTED}destroy(){this.lifecycle=c.v.DESTROYED,this.propertiesByName.forEach(e=>e.destroy())}get initialized(){return this.lifecycle!==c.v.INITIALIZING}get(e){const t=this.propertiesByName.get(e);if(!w(t))return;const r=t.metadata.get;if(r)return t.getComputed(this,r);this.mutable&&(0,p.gc)(t);const s=this.store;return s.has(e)?s.get(e):t.metadata.value}originOf(e){const t=this.store.originOf(e);if(void 0===t){const t=this.propertiesByName.get(e);if(void 0!==t&&t.flags&g.i.HasDefaultValue)return"defaults"}return(0,m.OL)(t)}has(e){return this.propertiesByName.has(e)&&this.store.has(e)}keys(){return[...this.propertiesByName.keys()]}internalGet(e){const t=this.propertiesByName.get(e);if(w(t))return this.store.has(e)?this.store.get(e):t.metadata.value}internalSet(e,t){const r=this.propertiesByName.get(e);w(r)&&this._internalSet(r,t)}getDependsInfo(e,t,r){const s=this.propertiesByName.get(t);if(!w(s))return"";const i=new _.R,n=(0,p.a)(i,()=>s.metadata.get?.call(e));let o=`${r}${e.declaredClass.split(".").pop()}.${t}: ${n}\n`;const a=i.accessed??new Set;if(0===a.size)return o;r+=" ";for(const e of a)e instanceof v&&(o+=`${r}${e.propertyName}: undefined\n`);return o}setAtOrigin(e,t,r){const s=this.propertiesByName.get(e);if(w(s))return this._setAtOrigin(s,t,r)}isOverridden(e){const t=this.propertiesByName.get(e);return void 0!==t&&!!(t.flags&g.i.Overridden)}clearOrigin(e,t){const r=this.store,s=this.propertiesByName.get(e);if(!w(s))return;const i=r.isAtOrigin(e,t)&&!(s.flags&g.i.Overridden);r.delete(e,t),i&&s.notifyChange()}clearOverride(e){const t=this.propertiesByName.get(e);t&&t.flags&g.i.Overridden&&(t.flags&=~g.i.Overridden,t.notifyChange())}override(e,t){const r=this.propertiesByName.get(e);if(!O(r,0,t,this))return;const s=r.metadata.cast;if(s){const e=this._cast(s,t),{valid:r,value:i}=e;if(N.release(e),!r)return;t=i}r.flags|=g.i.Overridden,this._internalSet(r,t)}set(e,t){const r=this.propertiesByName.get(e);if(!O(r,0,t,this))return;const s=r.metadata.cast;if(s){const e=this._cast(s,t),{valid:r,value:i}=e;if(N.release(e),!r)return;t=i}const i=r.metadata.set;i?i.call(this.host,t):this._internalSet(r,t)}setDefaultOrigin(e){this._origin=(0,m.aB)(e)}getDefaultOrigin(){return(0,m.OL)(this._origin)}notifyChange(e){this.propertiesByName.get(e)?.notifyChange()}invalidate(e){this.propertiesByName.get(e)?.invalidate()}commit(e){this.propertiesByName.get(e)?.commit()}_internalSet(e,t){const r=this.lifecycle!==c.v.INITIALIZING?this._origin:0;this._setAtOrigin(e,t,r)}_setAtOrigin(e,t,r){const s=this.store,i=e.propertyName,n=s.isAtOrigin(i,r);if(n&&~e.flags&g.i.Overridden&&(0,h.aI)(t,s.get(i)))return;const o=s.isBelowOrigin(i,r)||n;o&&e.invalidate(),s.set(i,t,r),o&&e.commit(),(0,p.fE)(this.host,e)}_cast(e,t){const r=N.acquire();return r.valid=!0,r.value=t,e&&(r.value=e.call(this.host,t,r)),r}}class A{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}}const N=new d.A(()=>new A);var k=r(47821);var S,C,D=r(14012),T=r(10107),E=r(64108);function I(e){if(null==e)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return e.constructor?.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const q=Symbol("Accessor-Handles"),z=Symbol("Accessor-Initialized");class B{static{S=q,C=z}static createSubclass(e={}){if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:t,declaredClass:r,constructor:s}=e;delete e.declaredClass,delete e.properties,delete e.constructor;const i=this;class n extends i{constructor(...e){super(...e),this.inherited=null,s&&s.apply(this,e)}}(0,u.tD)(n.prototype);for(const t in e){const r=e[t];n.prototype[t]="function"==typeof r?function(...e){const s=this.inherited;let n;this.inherited=function(...e){if(i.prototype[t])return i.prototype[t].apply(this,e)};try{n=r.apply(this,e)}catch(e){throw this.inherited=s,e}return this.inherited=s,n}:e[t]}for(const e in t){const r=I(t[e]);(0,T.MZ)(r)(n.prototype,e)}return(0,E.$)(r)(n)}static freeze(e){return e instanceof B?e.__accessor__.mutable=!1:Object.freeze(e),e}static isFrozen(e){return e instanceof B?!e.__accessor__.mutable:Object.isFrozen(e)}constructor(...e){if(this[S]=null,this[C]=!1,this.constructor===B)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const t=new b(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:t}),e.length>0&&(t.ctorArgs=this.normalizeCtorArgs?.apply(this,e)??e[0])}postscript(){const e=this.__accessor__,t=e.ctorArgs;e.initialize(),t&&(this.set(t),e.ctorArgs=null),e.constructed(),this.initialize(),this[z]=!0}initialize(){}[a.G](){this[q]=(0,o.pR)(this[q])}destroy(){this.destroyed||((0,D.iS)(this),this.__accessor__.destroy())}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[z]}get destroyed(){return this.__accessor__?.lifecycle===c.v.DESTROYED||!1}get destroying(){return this.__accessor__?.lifecycle===c.v.DESTROYING||!1}commitProperty(e){(0,l.Jt)(this,e)}hasOwnProperty(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(e,t){return(0,k.h)(this,e,t),this}watch(e,t,r){return(0,s.eO)(n.A.getLogger(this),"`watch` is deprecated in favor of reactiveUtils.watch",{replacement:"reactiveUtils.watch",version:"4.32",see:"https://arcg.is/1vaqf42#watch",warnOnce:!0}),(0,D.wB)(this,e,t,r)}addHandles(e,t){if(this.destroyed){const t=Array.isArray(e)?e:[e];for(const e of t)e.remove();return}(this[q]??=new i.A).add(e,t)}removeHandles(e){this[q]?.remove(e)}removeAllHandles(){this[q]?.removeAll()}removeHandlesReference(e){this[q]?.removeReference(e)}hasHandles(e){return!0===this[q]?.has(e)}_override(e,t){void 0===t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_clearOverride(e){return this.__accessor__.clearOverride(e)}_overrideIfSome(e,t){null==t?this.__accessor__.clearOverride(e):this.__accessor__.override(e,t)}_isOverridden(e){return this.__accessor__.isOverridden(e)}notifyChange(e){this.__accessor__.notifyChange(e)}_get(e){return this.__accessor__.internalGet(e)}_set(e,t){return this.__accessor__.internalSet(e,t),this}}},71429(e,t,r){r.d(t,{r:()=>i});var s=r(67867);class i extends s.R{constructor(e){super(new n(e)),this._observer&&o.register(this,new WeakRef(this._observer),this)}destroy(){this._observer&&o.unregister(this._observer),this.accessed?.clear(),this.clear(),this._observer?.destroy()}}class n{constructor(e){this._notify=e,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const e=this._invalidCount;if(1===e)return this._invalidCount=0,void this._notify();this._invalidCount=e>0?e-1:0}destroy(){this.destroyed=!0,this._notify=a}}const o=new FinalizationRegistry(e=>{e.deref()?.destroy()});function a(){}},71511(e,t,r){r.d(t,{A:()=>i});var s=r(5479);class i{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach(t=>{e+=t.length}),e}add(e,t){if((0,s.xZ)(e)){const r=this._getOrCreateGroup(t);for(const t of e)a(t)&&r.push(t)}else a(e)&&this._getOrCreateGroup(t).push(e);return this}forEach(e,t){if("function"==typeof e)this._groups.forEach(t=>t.forEach(e));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(n(e))}remove(e){if("string"!=typeof e&&(0,s.xZ)(e)){for(const t of e)this.remove(t);return this}return this.has(e)?(o(this._getGroup(e)),this._groups.delete(n(e)),this):this}removeAll(){return this._groups.forEach(o),this._groups.clear(),this}removeReference(e){return this._groups.delete(e),this}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(n(e),t),t}_getGroup(e){return this._groups.get(n(e))}}function n(e){return e||"_default_"}function o(e){for(const t of e)t instanceof i?t.removeAll():t.remove()}function a(e){return null!=e&&(!!e.remove||e instanceof i)}},76030(e,t,r){r.d(t,{_:()=>_,$m:()=>A,md:()=>b});var s=r(26390);function i(e,t,r,s,i){console.timeStamp(e,t,r,i,s)}class n{constructor(e,t=30){this.name=e,this._counter=0,this._samples=new Array(t)}push(e){null!=e&&(this._samples[++this._counter%this._samples.length]=e)}set(e){null!=e&&(this._samples[this._counter%this._samples.length]=e)}get median(){return this._samples.slice().sort((e,t)=>e-t)[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce((e,t)=>e+t,0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}var o=r(15142),a=r(74887),l=r(78659);class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let u=0;const h={time:(0,l.l5)(0),deltaTime:(0,l.l5)(0),elapsedFrameTime:(0,l.l5)(0),frameDuration:(0,l.l5)(0)},d=["prepare","preRender","render","postRender","update","finish"],f=[],p=new o.A,g={frameTasks:p,willDispatch:!1,clearFrameTasks:function(e=!1){p.forAll(e=>{e.removed=!0}),e&&w()},dispatch:O,executeFrameTasks:function(e){const t=(0,l.l5)(e-u);u=e;const r=1e3/60,s=Math.max(0,t-r);h.time=e,h.frameDuration=(0,l.l5)(r-s);for(let r=0;r<d.length;r++){const s=performance.now(),n=d[r];p.forAll(s=>{s.paused||s.removed||(0===r&&s.ticks++,s.phases[n]&&(h.elapsedFrameTime=(0,l.l5)(performance.now()-e),h.deltaTime=0===s.ticks?(0,l.l5)(0):t,s.phases[n]?.call(s,h)))});const o=performance.now();N[r].push(o-s),i(n,s,o,"Maps SDK","Scheduling")}w();const n=performance.now();k.push(n-e),i("Animation Frame",e,n,"Maps SDK","Scheduling")},reschedule:function(){null!=v&&(cancelAnimationFrame(v),v=requestAnimationFrame(m))}};function _(e){const t=new c(e);return f.push(t),g.willDispatch||(g.willDispatch=!0,(0,s.d)(O)),t}let v=null;function m(){const e=performance.now();v=null;const t=p.some(e=>!e.paused&&!e.removed);v=t?requestAnimationFrame(m):null,g.executeFrameTasks(e)}const y=new o.A;function w(){p.forAll(e=>{e.removed&&y.push(e)}),p.removeUnorderedMany(y.data,y.length),y.clear()}function O(){for(;f.length;){const e=f.shift();e.isActive&&e.callback()}g.willDispatch=!1}function b(e=1,t){const r=(0,a.Tw)(),i=()=>{(0,a.G4)(t)?r.reject((0,a.NK)()):0===e?r():(--e,(0,s.d)(()=>i()))};return i(),r.promise}async function A(e){await function(e){return b(1,e)}(e),await new Promise(t=>requestAnimationFrame(()=>{e?.aborted||t()}))}const N=d.map(e=>new n(e)),k=new n("total")},76953(e,t,r){function s(e,t,r){t.keys().forEach(e=>{r.set(e,t.get(e),0)});const s=e.metadata;Object.keys(s).forEach(t=>{e.internalGet(t)&&r.set(t,e.internalGet(t),0)})}r.d(t,{k:()=>s})},78659(e,t,r){function s(e){return e}function i(e){return 1e3*e}function n(e){return e}r.d(t,{Kp:()=>n,gr:()=>i,l5:()=>s})},80559(e,t,r){r.d(t,{Df:()=>c,fm:()=>u,mJ:()=>l});var s=r(36563),i=r(62788),n=r(71429);let o=!1;const a=[];function l(e,t){let r=new n.r(function s(){if(!r||l)return;if(o)return void h(s);const n=a;r.clear(),o=!0,l=!0,a=(0,i.a)(r,e),l=!1,o=!1,t(a,n),d()}),a=null,l=!1;return l=!0,a=(0,i.a)(r,e),l=!1,(0,s.hA)(function(){r&&(r.destroy(),r=null,a=null)})}function c(e,t){let r=new n.r(function(){t(o,a)}),o=null;function a(){return r?(r.clear(),o=(0,i.a)(r,e),o):null}return a(),(0,s.hA)(function(){r&&(r.destroy(),r=null),o=null})}function u(e,t){let r=!1,a=!1;const l=!!t?.sync;let c=new n.r(()=>{r||a||(a=!0,l?u():queueMicrotask(u))});function u(){a=!1,c&&!r&&(o?h(u):(c.clear(),o=!0,r=!0,(0,i.a)(c,e),r=!1,o=!1,d()))}return r=!0,(0,i.a)(c,e),r=!1,(0,s.hA)(function(){c&&(c.destroy(),c=null)})}function h(e){a.includes(e)||a.unshift(e)}function d(){for(;a.length;)a.pop()()}},98291(e,t,r){r.d(t,{A:()=>n});var s=r(93687);function i(e){e.length=0}class n{constructor(e=50,t=50){this._pool=new s.A(()=>[],void 0,i,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return o.acquire()}static release(e){return o.release(e)}static prune(){o.prune()}}const o=new n(100)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7835],{97835(e,t,n){n.d(t,{getDatasetFormat:()=>c,guessExtensionFromURI:()=>o});var s=n(11254);const a=/\.(\w+)$/;function o(e){const t=new URL(e).pathname.match(a);return!t||t.length<2?null:t[1].toUpperCase()}const c=async(e,t)=>{const n=await(0,s.A)(e,{...t,method:"head"}),a=n?.getHeader?.("Content-Type");return a?a.split("/")[1]:null}}}]);
|