@arcgis/core 4.34.0-next.34 → 4.34.0-next.35

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.
Files changed (178) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/ArcadeDate.js +1 -1
  3. package/arcade/ArcadeModuleResolver.js +1 -1
  4. package/arcade/featureset/actions/GroupBy.js +1 -1
  5. package/arcade/functions/date.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{28e04ef3575f164f611a.js → 00870a35b254295bc408.js} +1 -1
  8. package/assets/esri/core/workers/chunks/017adbbb77c9c9b4d49f.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b4b30a7f1b673461dc55.js → 0997e09fe5b0aba1f804.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{9bc6d974b0fce9db64ef.js → 15a5a89cd228a9364332.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{847455bf4fc33d6e6efc.js → 1dc410bc070cabb7198d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{94a3474e3f45efa4a4fe.js → 2c816d3a737e39e6eb84.js} +1 -1
  13. package/assets/esri/core/workers/chunks/2de11a8e5d426c381991.js +1 -0
  14. package/assets/esri/core/workers/chunks/3a7e43675163f7bed6ac.js +1 -0
  15. package/assets/esri/core/workers/chunks/40b0c5368b8322498189.js +1 -0
  16. package/assets/esri/core/workers/chunks/{4778acd0cfaf0cebeec7.js → 439128f23fa091633d2d.js} +1 -1
  17. package/assets/esri/core/workers/chunks/6000a302369799ea42a6.js +1 -0
  18. package/assets/esri/core/workers/chunks/{5d0c92aaa5891e6cb8f0.js → 641ca71d7c1a07bde66a.js} +1 -1
  19. package/assets/esri/core/workers/chunks/646227b500b92999f2c8.js +1 -0
  20. package/assets/esri/core/workers/chunks/{98f6d4ea026ed96fd3f3.js → 773feb0e0fad26df57ef.js} +1 -1
  21. package/assets/esri/core/workers/chunks/7b1d14a921d30c95d68b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{b78d00c4e493086741e1.js → 7d25f57299c642e727a6.js} +1 -1
  23. package/assets/esri/core/workers/chunks/8b7f6f2d1692b6b6dbd5.js +1 -0
  24. package/assets/esri/core/workers/chunks/91d48c32bf11ad1405c8.js +1 -0
  25. package/assets/esri/core/workers/chunks/9228f760129e48585b54.js +1 -0
  26. package/assets/esri/core/workers/chunks/a36be186ad10200c420c.js +1 -0
  27. package/assets/esri/core/workers/chunks/aa12ba96fb8c91105473.js +1 -0
  28. package/assets/esri/core/workers/chunks/{ea240d9e594bfbd8af68.js → aaf696a1026de569c82d.js} +1 -1
  29. package/assets/esri/core/workers/chunks/b331543767c35e5edcc6.js +1 -0
  30. package/assets/esri/core/workers/chunks/{7d852617e91b51121ea7.js → ba29c535128c4e8ae2d3.js} +1 -1
  31. package/assets/esri/core/workers/chunks/bf60d4da0dff1e14da8e.js +1 -0
  32. package/assets/esri/core/workers/chunks/{39bff604d4b4a1295038.js → c038472cb7f60af9426e.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{ca46f78aac1133d127fa.js → c1e5e2a6e7e2d7a1d63c.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{a809042fdce7ced2a415.js → cc3ca1729af33688c1e3.js} +1 -1
  35. package/assets/esri/core/workers/chunks/cde79c3644166d4798a8.js +1 -0
  36. package/assets/esri/core/workers/chunks/{181f8bbe670b4468307a.js → ce8f0ed9179c0d314df8.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{ac30cf2f9a94597f7665.js → d6b2ab614f308db50c4a.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{abe2cdfc2eda46b00812.js → d9045b964f536695840b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/dde6000aa2f69f6ecad0.js +1 -0
  40. package/assets/esri/core/workers/chunks/dec9656997683ef01ba6.js +1 -0
  41. package/assets/esri/core/workers/chunks/e18bb372457cedbf4f8c.js +1 -0
  42. package/assets/esri/core/workers/chunks/e892ed8b0b990d7eba28.js +1 -0
  43. package/assets/esri/core/workers/chunks/{dc5a8cf2a44a5ac201c5.js → ed05399f9a07fea66685.js} +1 -1
  44. package/config.js +1 -1
  45. package/core/BidiEngine.js +1 -1
  46. package/core/Promise.js +1 -1
  47. package/core/promiseUtils.js +1 -1
  48. package/core/sql/SqlInterval.js +1 -1
  49. package/core/sql/sqlDateParsingUtils.js +1 -1
  50. package/core/unitUtils.js +1 -1
  51. package/geometry/support/coordinateSystem.js +1 -1
  52. package/graphic/BuildingGraphicOrigin.d.ts +4 -0
  53. package/graphic/BuildingGraphicOrigin.js +5 -0
  54. package/graphic/CSVGraphicOrigin.d.ts +4 -0
  55. package/graphic/CSVGraphicOrigin.js +5 -0
  56. package/graphic/CatalogGraphicOrigin.d.ts +4 -0
  57. package/graphic/CatalogGraphicOrigin.js +5 -0
  58. package/graphic/FeatureGraphicOrigin.d.ts +4 -0
  59. package/graphic/FeatureGraphicOrigin.js +5 -0
  60. package/graphic/GeoJSONGraphicOrigin.d.ts +4 -0
  61. package/graphic/GeoJSONGraphicOrigin.js +5 -0
  62. package/graphic/GraphicOrigin.d.ts +4 -0
  63. package/graphic/GraphicOrigin.js +5 -0
  64. package/graphic/IntegratedMesh3DTilesGraphicOrigin.d.ts +4 -0
  65. package/graphic/IntegratedMesh3DTilesGraphicOrigin.js +5 -0
  66. package/graphic/IntegratedMeshGraphicOrigin.d.ts +4 -0
  67. package/graphic/IntegratedMeshGraphicOrigin.js +5 -0
  68. package/graphic/OGCFeatureGraphicOrigin.d.ts +4 -0
  69. package/graphic/OGCFeatureGraphicOrigin.js +5 -0
  70. package/graphic/PointCloudGraphicOrigin.d.ts +4 -0
  71. package/graphic/PointCloudGraphicOrigin.js +5 -0
  72. package/graphic/SceneGraphicOrigin.d.ts +4 -0
  73. package/graphic/SceneGraphicOrigin.js +5 -0
  74. package/graphic/StreamGraphicOrigin.d.ts +4 -0
  75. package/graphic/StreamGraphicOrigin.js +5 -0
  76. package/graphic/VectorTileGraphicOrigin.d.ts +4 -0
  77. package/graphic/VectorTileGraphicOrigin.js +5 -0
  78. package/graphic/VoxelGraphicOrigin.d.ts +4 -0
  79. package/graphic/VoxelGraphicOrigin.js +5 -0
  80. package/graphic/WFSGraphicOrigin.d.ts +4 -0
  81. package/graphic/WFSGraphicOrigin.js +5 -0
  82. package/graphic/graphicOriginUtils.js +5 -0
  83. package/graphic/graphicOrigins.d.ts +14 -0
  84. package/graphic/graphicOrigins.js +5 -0
  85. package/graphic/isBuildingGraphicOrigin.js +5 -0
  86. package/graphic/isCSVGraphicOrigin.js +5 -0
  87. package/graphic/isCatalogGraphicOrigin.js +5 -0
  88. package/graphic/isFeatureGraphicOrigin.js +5 -0
  89. package/graphic/isGeoJSONGraphicOrigin.js +5 -0
  90. package/graphic/isIntegratedMesh3DTilesGraphicOrigin.js +5 -0
  91. package/graphic/isIntegratedMeshGraphicOrigin.js +5 -0
  92. package/graphic/isOGCFeatureGraphicOrigin.js +5 -0
  93. package/graphic/isPointCloudGraphicOrigin.js +5 -0
  94. package/graphic/isSceneGraphicOrigin.js +5 -0
  95. package/graphic/isStreamGraphicOrigin.js +5 -0
  96. package/graphic/isVectorTileGraphicOrigin.js +5 -0
  97. package/graphic/isVoxelGraphicOrigin.js +5 -0
  98. package/graphic/isWFSGraphicOrigin.js +5 -0
  99. package/interfaces.d.ts +354 -13
  100. package/kernel.js +1 -1
  101. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  102. package/layers/support/Field.js +1 -1
  103. package/layers/support/featurePopupQueryUtils.js +1 -1
  104. package/layers/voxel/NCTimeParser.js +1 -1
  105. package/package.json +1 -1
  106. package/rest/knowledgeGraphService.js +1 -1
  107. package/smartMapping/statistics/support/utils.js +1 -1
  108. package/support/arcadeExpressionUtils.js +1 -1
  109. package/support/revision.js +1 -1
  110. package/symbols/support/svgUtils.js +1 -1
  111. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  112. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  113. package/views/2d/engine/webgl/Painter.js +1 -1
  114. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  116. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  117. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  118. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  119. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementComputation.js +5 -0
  120. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +1 -1
  121. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  122. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  123. package/views/3d/layers/CSVLayerView3D.js +1 -1
  124. package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
  125. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  126. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  127. package/views/3d/layers/FlowSubView3D.js +1 -1
  128. package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
  129. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  130. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  131. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  132. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  133. package/views/3d/layers/SceneLayerView3D.js +1 -1
  134. package/views/3d/layers/StreamLayerView3D.js +1 -1
  135. package/views/3d/layers/WFSLayerView3D.js +1 -1
  136. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  137. package/views/3d/layers/graphics/StreamController.js +1 -1
  138. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  139. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  140. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  141. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  142. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  143. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  144. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  145. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  146. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  147. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  148. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  149. package/views/3d/state/ConstraintsManager.js +1 -1
  150. package/views/3d/support/flow/geometryUtils.js +1 -1
  151. package/views/3d/terrain/OverlayManager.js +1 -1
  152. package/views/3d/terrain/TerrainSurface.js +1 -1
  153. package/views/3d/terrain/Tile.js +1 -1
  154. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  155. package/views/SceneView.js +1 -1
  156. package/views/interactive/Tooltip.js +1 -1
  157. package/views/layers/FeatureLayerView.js +1 -1
  158. package/views/layers/support/popupUtils.js +1 -1
  159. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  160. package/assets/esri/core/workers/chunks/07b2cc0f6b064277632f.js +0 -1
  161. package/assets/esri/core/workers/chunks/13f9e92e7e5d44d9f95c.js +0 -1
  162. package/assets/esri/core/workers/chunks/140efe4735605258ecc9.js +0 -1
  163. package/assets/esri/core/workers/chunks/2b76e716f478468b6798.js +0 -1
  164. package/assets/esri/core/workers/chunks/386ab72a45102c2d47f2.js +0 -1
  165. package/assets/esri/core/workers/chunks/3fb6146d914f9b410c2e.js +0 -1
  166. package/assets/esri/core/workers/chunks/432365fcd7becd508541.js +0 -1
  167. package/assets/esri/core/workers/chunks/439ce953a25b2776cb7f.js +0 -1
  168. package/assets/esri/core/workers/chunks/4c8d2334fcdb1354ff43.js +0 -1
  169. package/assets/esri/core/workers/chunks/5f321be63ed5447b04a1.js +0 -1
  170. package/assets/esri/core/workers/chunks/6006fbdb90c3bfc493a6.js +0 -1
  171. package/assets/esri/core/workers/chunks/700c641347853b1034d9.js +0 -1
  172. package/assets/esri/core/workers/chunks/7c35c61e3673cf94cdfd.js +0 -1
  173. package/assets/esri/core/workers/chunks/7c75876a0c6460585055.js +0 -1
  174. package/assets/esri/core/workers/chunks/949dc266ac6f3505d357.js +0 -1
  175. package/assets/esri/core/workers/chunks/a84af1b8b64b86b49bd3.js +0 -1
  176. package/assets/esri/core/workers/chunks/a9d83a442d8d7a376fc0.js +0 -1
  177. package/assets/esri/core/workers/chunks/ba1b21a90b257ac9a342.js +0 -1
  178. package/assets/esri/core/workers/chunks/f9ad37dfbe1d14c6a352.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3405],{10536:(e,t,s)=>{function i(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=i(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{z:()=>i})},12543:(e,t,s)=>{s.r(t),s.d(t,{default:()=>me});var i=s(31635),r=s(65529),n=s(74887),o=s(36708),a=s(10107),l=(s(44208),s(53966)),u=(s(87811),s(40608)),c=s(79897),d=s(16930),h=s(65864),p=s(58376),f=s(83221),g=s(95422),y=s(87045),m=s(61956),_=s(88625),v=s(66344),w=s(91869),b=s(83047),C=s(16271);function S(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s}=t;return new I(e,s)}return new T}class T{async alignCandidates(e,t,s){return e}notifyElevationSourceChange(){}}class I{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new v.q(1024),this._cacheVersion=0}async alignCandidates(e,t,s){const i=this._elevationInfo;return null==i||"absolute-height"!==i.mode||i.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,s):(function(e,t,s){const{offset:i,unit:r}=s;if(null==i)return;const n=(0,b.G9)(t),o=i*((0,C.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o;continue;case"vertex":t.target.z+=o;continue}}(e,t,i),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,s){const i=new Map;for(const t of e)(0,w.tE)(i,t.objectId,M).push(t);const[r,o,a]=this._prepareQuery(i,t),l=await this._alignPointsInFeatures(r,s);if((0,n.Te)(s),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,s);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:c}=l,d=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),c.has(e)||d.push(t)}return d}_prepareQuery(e,t){const s=[],i=[];for(const[t,r]of e){const e=[];for(const s of r)this._addToQueriesOrCachedResult(t,s.target,e,i),"edge"===s.type&&(this._addToQueriesOrCachedResult(t,s.start,e,i),this._addToQueriesOrCachedResult(t,s.end,e,i));0!==e.length&&s.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:s},i,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const r=x(e,t),n=this._alignmentsCache.get(r);null==n?s.push(t):i.push(new F(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(i.has(r)){n+=a.length;continue}const e=!s.has(r);for(const s of a){const i=x(r,s),a=t[n++];s.z=a,e&&o.put(i,a,1)}}}}class F{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function x(e,{x:t,y:s,z:i,spatialReference:r}){return`${e}-${t}-${s}-${i??0}}-wkid:${r?.wkid}`}function M(){return[]}class A{filter(e,t){return t}notifyElevationSourceChange(){}}class k{filter(e,t){const{point:s,distance:i}=e,{z:r}=s;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,n).filter(O);return o.sort(j),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":R(i,t,s);continue;case"vertex":P(i,t,s);continue}return e}}function O(e){return e.distance<=1}function E(e=!1){return e?new k:new A}function R(e,t,{x:s,y:i,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,o=i.z-s.z,a=r*r+n*n+o*o,l=(t.x-s.x)*r+(t.y-s.y)*n+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),c=s.x+r*u,d=s.y+n*u,h=s.z+o*u;e.x=c,e.y=d,e.z=h}(a,t,n,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,c=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+c*c)}function P(e,t,{x:s,y:i,z:r}){const{target:n}=e,o=(t.x-n.x)/s,a=(t.y-n.y)/i,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function j(e,t){return e.distance-t.distance}var q=s(4718),V=s(799);function z(e=!1,t){return e?new U(t):new Z}class Z{async fetch(){return[]}notifySymbologyChange(){}}class U{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new v.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],r=this._candidatesCache;for(const t of e){const e=N(t),n=r.get(e);if(n)for(const e of n)i.push((0,q.o8)(e));else s.push(t),r.put(e,[],1)}if(0===s.length)return i;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:c}=a;for(let e=0;e<c;++e){const t=a[e],i=N(s[l[e]]),n=r.get(i);n.push(t),r.put(i,n,n.length),u.push((0,q.o8)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function N(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,V.Wm)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,r=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,V.Wm)(r).toString()}default:return""}}var D=s(69622),G=s(4576),L=s(60999),B=s(3483),H=s(13069),J=s(5443),$=s(19419),W=s(90708),Q=s(60694),K=s(69418),Y=s(80893);class X{constructor(e,t){this.data=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,L.UT)(async e=>{const s=await(0,L.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,s.ok?s.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,L.UT)(async s=>{const i=await(0,L.DZ)(t.fetchFeatures(this,e.featureCount,s));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,i.ok?i.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,$.VY)(e,ee),(0,$.HY)(this.data.extent,ee))}}const ee=(0,$.vt)();let te=class extends D.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),s=(0,B.KC)(e,this._mandatoryOutFields);(0,B.aI)(s,t)||(this._set("outFields",s),(0,B.Yy)(s,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new c.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,G.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(e=>e.id??"")??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},s=(0,L.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),l.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(s),await this._updatingHandles.addPromise(s.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,Q.Wo)(this.url))return;const e=(0,L.UT)(async e=>{try{const t=await(0,Y.Jf)(this.url,new m.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=J.A.fromJSON(t.data?.extent)}catch(e){(0,n.QP)(e),l.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.addPromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const s=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this._updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<re}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(ne/(s*s))<oe}_ensureFetchAllCounts(e){let t=!0;for(const s of this._pendingTiles.values())s.state.type<2&&this._updatingHandles.addPromise(s.process(e)),s.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new X(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,s){let i=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:c}=await this._queryFeatures(a,s);l&&(i+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!c||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;const r=e?(0,H.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,H.AG)(e.attributes[t])&&(i=e.objectId??e.attributes[s])}),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Y.IJ)(this.url,e,new K.S({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,W.eY)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,Y.eW)(this.url,e,s,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,W.q3)(i,{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),s=null!=e?.data?this.store.getAttributesForTile(e?.data?.id):null,i=(0,B.KC)((0,B.iv)(this.outFields,s??new Set),this._mandatoryOutFields);return t.outFields=Array.from(i),t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new m.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,$.w1)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?m.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||se);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"url",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"globalIdField",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],te.prototype,"store",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"_minimumVerticesPerFeature",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"_mandatoryOutFields",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"outFields",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"suspended",void 0),(0,i.Cg)([(0,a.MZ)()],te.prototype,"_historicMoment",void 0),(0,i.Cg)([(0,a.MZ)()],te.prototype,"filter",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"customParameters",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"_configuration",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"tileInfo",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"tileSize",null),(0,i.Cg)([(0,a.MZ)()],te.prototype,"tilesOfInterest",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],te.prototype,"availability",void 0),(0,i.Cg)([(0,a.MZ)()],te.prototype,"hasZ",null),te=(0,i.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],te);const se=2e3,ie=6e5,re=1e6,ne=25,oe=1;var ae=s(6518),le=s(72802);class ue{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const s=this._priorities.get(e);if(null==s||s<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[s,i]of this._store)if(!t.has(s)&&e(i,s))return!0;for(const[s]of t){const t=this._store.get(s);if(t&&e(t,s))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let ce=class extends D.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new ae.F,this._tiles=new ue,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,$.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const s=this.featureStore.upsertMany(t),i=s.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,B.E$)(e,t),new Set(Object.keys(s[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(s.map(e=>e.objectId)),i),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:s}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<s||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const s of e.objectIds)if(1===this._refCounts.get(s)){const e=this.featureStore.getFeature(s);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new de(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)1===this._unreferenceFeature(s)&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){if(!e.length)return;const i=(await t(e,s)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of i){const t=(0,W.jQ)(this._tmpBoundingRect,e.geometry,r,n);null!=t&&this._tileBounds.forEachInBounds(t,t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))})}}process(e,t=()=>!0,s){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,$.HY)((0,$.VY)(this.extent,this._tmpBoundingRect),e.extent))return new pe(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new pe(e);const i=this.getAttributesForTile(e.id);if((0,B.Yy)(s,i))return new pe(e);const r=this._createTileTree(e,this.tileInfo);return this._simplify(r,t,null,0,1),this._collectMissingTiles(e,r,this.tileInfo,s)}get debugInfo(){return Array.from(this._tiles.values()).map(({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const r=this._tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,Y.gW)(t,s,i);return this._tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const s=new he(e.level,e.row,e.col);return t.updateTileInfo(s,1),this._tileBounds.forEachInBounds(e.extent,i=>{const r=this._tiles.get(i)?.data;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,r=s?t:e,n=1<<r.level-i.level;return Math.floor(r.row/n)===i.row&&Math.floor(r.col/n)===i.col}(e,r)&&this._populateChildren(s,r,t,this._tileFeatureCounts.get(r.id)||0)}),s}_populateChildren(e,t,s,i){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const r=new he(e.level+1,n,o);s.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,s,i)}}_simplify(e,t,s,i,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=s&&(s.children[i]=null),n);const o=r/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/n<ge&&(this._purge(e),null!=s&&(s.children[i]=null),l=n),l}_mergeChildren(e){const t=new Set;let s;this._forEachLeaf(e,e=>{const i=this._tiles.get(e.id);if(i){s=s?(0,B.E$)(s,i.attributeKeys):new Set(i.attributeKeys);for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,s??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s,i){const r=new fe(s,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,i),r.info}_collectMissingTilesRecurse(e,t,s,i){const r=this.getAttributesForTile(e.id),n=r&&!(0,B.Yy)(i,r);if(n&&t.addMissing(e.level,e.row,e.col,s),e.isLeaf)return;if(!e.hasChildren)return void(n||t.addMissing(e.level,e.row,e.col,s));const o=s/2;for(let s=0;s<e.children.length;s++){const r=e.children[s];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),o):this._collectMissingTilesRecurse(r,t,o,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],ce.prototype,"featureStore",void 0),(0,i.Cg)([(0,a.MZ)()],ce.prototype,"tileInfo",void 0),(0,i.Cg)([(0,a.MZ)()],ce.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)()],ce.prototype,"maximumByteSize",void 0),ce=(0,i.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],ce);class de{constructor(e,t,s){this.data=e,this.objectIds=t,this.attributeKeys=s}}class he{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class pe{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,$.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class fe{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new pe(t),null!=s&&(this._extent=(0,$.VY)(s))}addMissing(e,t,s,i){const r=new le.U(null,e,t,s);this._tileInfo.updateTileInfo(r,1),null==r.extent||null!=this._extent&&!(0,$.HY)(this._extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:i}),this.info.coveredArea-=(0,$.Wc)(r.extent))}}const ge=.18751;let ye=class extends r.A.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,n.Tw)(),this._elevationAligner=S(),this._elevationFilter=E(),this._symbologyCandidatesFetcher=z(),this._updatingHandles=new c.U,this._alignPointsInFeatures=async(e,t)=>{const s={query:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,n.Te)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,n.Te)(t),i}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=d.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new f.A({...e.serviceInfo,hasZ:n,hasM:!1}),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new g.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:s},timeInfo:i}),this._featureFetcher=new te({store:new ce({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:d.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=S(l,{elevationInfo:null!=e.elevationInfo?_.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=E(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),_e}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,_e}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),_e}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const s=function(e,t){const s=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:s}};const{distance:i,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:i,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:s,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),i=t?.signal,r=await(0,p.J)(this._queryEngine,s,i);(0,n.Te)(i);const o=await this._elevationAligner.alignCandidates(r.candidates,d.A.fromJSON(e.point.spatialReference)??d.A.WGS84,i);(0,n.Te)(i);const a=await this._symbologyCandidatesFetcher.fetch(o,i);(0,n.Te)(i);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?y.A.fromJSON(e.tileInfo):null,_e}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),_e}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),_e}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),_e}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),_e}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),_e}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),_e}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=z(e,this._getSymbologyCandidates),_e}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?m.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ye.prototype,"updating",null),(0,i.Cg)([(0,a.MZ)()],ye.prototype,"_isInitializing",void 0),ye=(0,i.Cg)([(0,u.$)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],ye);const me=ye,_e={result:{}}},13069:(e,t,s)=>{s.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},16271:(e,t,s)=>{s.d(t,{Ao:()=>n,KQ:()=>o});var i=s(4576),r=s(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},20437:(e,t,s)=>{s.d(t,{A:()=>g});var i,r=s(31635),n=s(66552),o=s(25482),a=s(10107),l=s(56507),u=(s(44208),s(87811),s(93223)),c=s(36005),d=s(40608),h=s(80451),p=s(98453);const f=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let g=class extends o.A{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?f.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],g.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],g.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],g.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:h.gK,json:{read:{reader:h.rS},write:!0}})],g.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],g.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],g.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"nullable",void 0),(0,r.Cg)([(0,u.e)(p.m)],g.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],g.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],g.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],g.prototype,"visible",void 0),g=i=(0,r.Cg)([(0,d.$)("esri.layers.support.Field")],g)},31756:(e,t,s)=>{s.d(t,{j:()=>n});var i=s(83047),r=s(79258);const n={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",r.$O.radius)}},39357:(e,t,s)=>{s.d(t,{H:()=>l});var i,r=s(31635),n=s(25482),o=s(10107),a=(s(44208),s(53966),s(87811),s(40608));let l=i=class extends n.A{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],l.prototype,"code",void 0),l=i=(0,r.Cg)([(0,a.$)("esri.layers.support.CodedValue")],l)},50498:(e,t,s)=>{s.d(t,{Ye:()=>d,gy:()=>c,yR:()=>h});var i=s(66552),r=s(5443),n=s(91075),o=s(48526),a=s(86738),l=s(39829),u=s(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),h={base:n.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}}},51624:(e,t,s)=>{s.d(t,{A:()=>u});var i=s(44208),r=s(69397),n=s(93687);const o=4294967296,a=new TextDecoder("utf-8"),l=(0,i.A)("safari")||(0,i.A)("ios")?6:(0,i.A)("ff")?12:32;class u{constructor(e,t,s=0,i=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,s,i)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,r.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const r=this.getMessage(),n=e(r,t,s,i);return r.release(),n}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const r=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return r?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>l){const i=e.subarray(t,s);return a.decode(i)}let i="",r="";for(let n=t;n<s;++n){const t=e[n];128&t?r+="%"+t.toString(16):(i+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(i+=decodeURIComponent(r)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}static{this.pool=new n.A(u,void 0,e=>{e._data=null,e._dataView=null})}}},53177:(e,t,s)=>{s.d(t,{A:()=>d});var i,r=s(31635),n=s(4718),o=s(10107),a=(s(44208),s(53966),s(93223)),l=s(40608),u=s(39357),c=s(76357);let d=class extends c.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some(e=>(String(e.code)===s&&(t=e.name),!!t))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[u.H],json:{write:{isRequired:!0}}})],d.prototype,"codedValues",void 0),(0,r.Cg)([(0,a.e)({codedValue:"coded-value"})],d.prototype,"type",void 0),d=i=(0,r.Cg)([(0,l.$)("esri.layers.support.CodedValueDomain")],d)},53655:(e,t,s)=>{s.d(t,{SH:()=>M,ae:()=>S,cn:()=>_});var i=s(49186),r=s(51624),n=s(92722),o=s(69418);const a=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function c(e){return e>=a.length?null:a[e]}function d(e){return e>=l.length?null:l[e]}function h(e){return e>=u.length?null:u[e]}function p(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function f(e,t,s){const i=e.asUnsafe(),r=t.createPointGeometry(s);for(;i.next();)switch(i.tag()){case 3:{const e=i.getUInt32(),s=i.pos()+e;let n=0;for(;i.pos()<s;)t.addCoordinatePoint(r,i.getSInt64(),n++);break}default:i.skip()}return r}function g(e,t,s){const i=e.asUnsafe(),r=t.createGeometry(s),n=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;i.next();)switch(i.tag()){case 2:{const e=i.getUInt32(),s=i.pos()+e;let n=0;for(;i.pos()<s;)t.addLength(r,i.getUInt32(),n++);break}case 3:{const e=i.getUInt32(),s=i.pos()+e;let o=0;for(t.allocateCoordinates(r);i.pos()<s;)t.addCoordinate(r,i.getSInt64(),o),o++,o===n&&(o=0);break}default:i.skip()}return r}function y(e){const t=e.asUnsafe(),s=new n.A;let i="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),i=t.pos()+e;for(;t.pos()<i;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),i=t.pos()+e;for(;t.pos()<i;)s.coords.push(t.getSInt64());break}case 1:i=o.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,queryGeometryType:i}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=d(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function v(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function w(e,t,s,i){const r=t.createFeature(s);let n=0;for(;e.next();)switch(e.tag()){case 1:{const t=i[n++].name;r.attributes[t]=e.processMessage(m);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(f,t,s);break;default:e.skip()}return r}function b(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function C(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function S(e){const t={originPosition:h(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=h(s.getEnum());break;case 2:t.scale=s.processMessage(b);break;case 3:t.translate=s.processMessage(C);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function I(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function F(e,t){const s=t.createFeatureResult(),i=e.asUnsafe();s.geometryType=p(t,0);let r=!1;for(;i.next();)switch(i.tag()){case 1:s.objectIdFieldName=i.getString();break;case 3:s.globalIdFieldName=i.getString();break;case 4:s.geohashFieldName=i.getString();break;case 5:s.geometryProperties=i.processMessage(T);break;case 7:s.geometryType=p(t,i.getEnum());break;case 8:s.spatialReference=i.processMessageWithArgs(I,t);break;case 10:s.hasZ=i.getBool();break;case 11:s.hasM=i.getBool();break;case 12:s.transform=i.processMessage(S);break;case 9:s.exceededTransferLimit=i.getBool();break;case 13:t.addField(s,i.processMessage(_));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,i.processMessageWithArgs(w,t,s,s.fields));break;case 2:s.uniqueIdField=i.processMessage(v);break;default:i.skip()}return t.finishFeatureResult(s),s}function x(e,t){const s={};let i=null;for(;e.next();)switch(e.tag()){case 4:i=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(F,t);break;default:e.skip()}return null!=i&&s.featureResult&&t.addQueryGeometry(s,i),s}function M(e,t){try{const s=2,i=new r.A(new Uint8Array(e),new DataView(e)),n={};for(;i.next();)i.tag()===s?n.queryResult=i.processMessageWithArgs(x,t):i.skip();return n}catch(e){throw new i.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},58501:(e,t,s)=>{s.d(t,{q:()=>r});var i=s(62815);function r(e,t,s){if(!s?.features||!s.hasZ)return;const r=(0,i.N)(s.geometryType,t,e.outSpatialReference);if(null!=r)for(const e of s.features)r(e.geometry)}},60999:(e,t,s)=>{s.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,jJ:()=>u});var i=s(31635),r=s(69622),n=s(97768),o=s(74887),a=s(10107),l=s(40608);function u(e,t,s){return(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))}async function c(e,t,s){return(await(0,o.Lx)(e.map((e,i)=>t.apply(s,[e,i])))).map(e=>e.value)}function d(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return h(e)}}async function f(e){try{return d(await e)}catch(e){return(0,o.QP)(e),h(e)}}function g(e,t){return new y(e,t)}let y=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then(e=>{this._result=d(e),this._cleanup()},e=>{this._result=h(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y)},64272:(e,t,s)=>{s.d(t,{T:()=>h});var i,r=s(31635),n=s(25482),o=s(88930),a=s(10107),l=(s(44208),s(53966),s(87811),s(36005)),u=s(40608),c=s(43937),d=s(98623);let h=class extends n.A{static{i=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new i({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(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===i&&s===r}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.lL)(s,e,t));let r=this.end;if(r){const s=(0,o.lL)(r,e,t);r=r.getTime()===s.getTime()?s:(0,o.S1)(s,1,e,t)}return new i({start:s,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=s?o=r:t>=r&&t<=n&&(o=t),s>=r&&s<=n?a=s:n>=t&&n<=s&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:n,end:a}=this;return null!=n&&(r.start=(0,o.S1)(n,e,t,s)),null!=a&&(r.end=(0,o.S1)(a,e,t,s)),r}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,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,r.Cg)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,r.Cg)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,r.Cg)([(0,l.w)("start")],h.prototype,"readStart",null),(0,r.Cg)([(0,c.K)("start")],h.prototype,"writeStart",null),h=i=(0,r.Cg)([(0,u.$)("esri.time.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0})},66208:(e,t,s)=>{s.d(t,{m:()=>r});var i=s(53655);function r(e,t){const s=(0,i.SH)(e,t),r=s.queryResult.featureResult,n=s.queryResult.queryGeometry,o=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=n,r.queryGeometryType=o),r}},69418:(e,t,s)=>{s.d(t,{S:()=>u,z:()=>l});var i=s(83047),r=s(21325),n=s(43334),o=s(58512),a=s(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,r.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,i.G9)(this._options.sourceSpatialReference)/(0,i.G9)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,n.N3)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new n.Om(null,{},null,0)}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce((e,t)=>e+t,0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.A}}},72802:(e,t,s)=>{s.d(t,{U:()=>i});class i{constructor(e,t,s,i,r=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=r}}},76357:(e,t,s)=>{s.d(t,{A:()=>c});var i=s(31635),r=s(66552),n=s(25482),o=s(10107),a=(s(44208),s(53966),s(87811),s(93223)),l=s(40608);const u=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends n.A{constructor(e){super(e),this.name=null,this.type=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.e)(u),(0,o.MZ)({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.Domain")],c)},79897:(e,t,s)=>{s.d(t,{U:()=>c});var i=s(31635),r=s(69622),n=s(36563),o=s(36708),a=s(11932),l=s(10107),u=s(40608);let c=class extends r.A{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(e,t,s={}){return this._installWatch(e,t,s,o.wB)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.z7)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const r=++this._handleId;return this.addHandles([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.OH),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],r),(0,n.hA)(()=>this.removeHandles(r))}addPromise(e){if(null==e)return e;const t=++this._handleId;this.addHandles((0,n.hA)(()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this.hasHandles(d)||this._set("updating",!1))}),t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this.removeHandles(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,s={},i){const r=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,r);const o=i(e,t,s);return this.addHandles(o,r),(0,n.hA)(()=>this.removeHandles(r))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.wB)(e,s,{sync:!0,equals:()=>!1});return this.addHandles(i,t),i}_createSyncUpdatingCallback(){return()=>{this.removeHandles(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles((0,a._)(()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(d))}),d)}}};(0,i.Cg)([(0,l.MZ)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,i.Cg)([(0,u.$)("esri.core.support.UpdatingHandles")],c);const d=-42},80451:(e,t,s)=>{s.d(t,{rS:()=>f,gK:()=>p}),s(44208);var i,r=s(53177),n=s(76357),o=s(31635),a=(s(53966),s(87811),s(49186),s(93223)),l=s(40608);let u=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o.Cg)([(0,a.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,o.Cg)([(0,l.$)("esri.layers.support.InheritedDomain")],u);var c,d=s(10107);let h=class extends n.A{static{c=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]},isRequired:!0}}})],h.prototype,"maxValue",void 0),(0,o.Cg)([(0,d.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]},isRequired:!0}}})],h.prototype,"minValue",void 0),(0,o.Cg)([(0,a.e)({range:"range"})],h.prototype,"type",void 0),h=c=(0,o.Cg)([(0,l.$)("esri.layers.support.RangeDomain")],h);const p={key:"type",base:n.A,typeMap:{range:h,"coded-value":r.A,inherited:u}};function f(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},80893:(e,t,s)=>{s.d(t,{IJ:()=>f,Jf:()=>_,Pk:()=>y,eW:()=>p,gW:()=>m,kS:()=>g});var i=s(78888),r=s(84952),n=s(65864),o=s(17136),a=s(21325),l=s(10536),u=s(66208),c=s(58501);const d="Layer does not support extent calculation.";function h(e,t,s){const i=e.geometry,r=e.toJSON();delete r.compactGeometryEnabled,delete r.defaultSpatialReferenceEnabled;const o=r;let l,u,c;if(i&&(u=i.spatialReference,c=(0,a.YX)(u),o.geometryType=(0,n.$B)(i),o.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(i,e.compactGeometryEnabled),o.inSR=c),r.groupByFieldsForStatistics&&(o.groupByFieldsForStatistics=r.groupByFieldsForStatistics.join(",")),r.objectIds)switch(s?.uniqueIdFields?.length){case void 0:o.objectIds=r.objectIds.join(",");break;case 1:o.uniqueIds=JSON.stringify(r.objectIds),delete o.objectIds;break;default:o.uniqueIds=JSON.stringify(r.objectIds.map(e=>JSON.parse(e))),delete o.objectIds}if(r.orderByFields&&(o.orderByFields=r.orderByFields.join(",")),!r.outFields||!r.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete o.outFields:r.outFields.includes("*")?o.outFields="*":o.outFields=r.outFields.join(","),r.outSR?(o.outSR=(0,a.YX)(r.outSR),l=e.outSpatialReference):i&&(r.returnGeometry||r.returnCentroid)&&(o.outSR=o.inSR,l=u),r.returnGeometry&&delete r.returnGeometry,r.outStatistics&&(o.outStatistics=JSON.stringify(r.outStatistics)),r.fullText&&(o.fullText=JSON.stringify(r.fullText)),r.pixelSize&&(o.pixelSize=JSON.stringify(r.pixelSize)),r.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete r.quantizationParameters.extent.spatialReference,o.quantizationParameters=JSON.stringify(r.quantizationParameters)),r.parameterValues&&(o.parameterValues=JSON.stringify(r.parameterValues)),r.rangeValues&&(o.rangeValues=JSON.stringify(r.rangeValues)),r.dynamicDataSource&&(o.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r.timeExtent){const e=r.timeExtent,{start:t,end:s}=e;null==t&&null==s||(o.time=t===s?t:`${t??"null"},${s??"null"}`),delete r.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=l&&u.equals(l)&&(o.defaultSR=o.inSR,delete o.inSR,delete o.outSR),o}async function p(e,t,s,i,r){const n=t.timeExtent?.isEmpty?{data:{features:[]}}:await w(e,t,"json",i,void 0,r);return(0,c.q)(t,s,n.data),n}async function f(e,t,s,i,r){if(t.timeExtent?.isEmpty)return{data:s.createFeatureResult()};const n=await g(e,t,i,r),o=n;return o.data=(0,u.m)(n.data,s),o}function g(e,t,s,i){return w(e,t,"pbf",s,void 0,i)}function y(e,t,s,i){return t.timeExtent?.isEmpty?Promise.resolve({data:{objectIds:[]}}):w(e,t,"json",s,{returnIdsOnly:!0},i)}function m(e,t,s,i){return t.timeExtent?.isEmpty?Promise.resolve({data:{count:0}}):w(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0},i)}async function _(e,t,s){if(t.timeExtent?.isEmpty)return{data:{count:0,extent:null}};const i=await w(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=i.data;if(r.hasOwnProperty("extent"))return i;if(r.features)throw new Error(d);if(r.hasOwnProperty("count"))throw new Error(d);return i}function v(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;const s={...e,returnUniqueIdsOnly:!0};return delete s.returnIdsOnly,s}async function w(e,t,s,n={},a={},u={}){const c="string"==typeof e?(0,r.An)(e):e,d=t.geometry?[t.geometry]:[],p=await(0,o.el)(d,null,{signal:n.signal}),f=p?.[0];null!=f&&((t=t.clone()).geometry=f);const g=(0,l.z)({...c.query,f:s,...v(a,u),...h(t,a,u)});return(0,i.A)((0,r.fj)(c.path,(y=a,null==t.formatOf3DObjects||y.returnCountOnly||y.returnExtentOnly||y.returnIdsOnly?"query":"query3d")),{...n,responseType:"pbf"===s?"array-buffer":"json",query:{...g,...n.query}});var y}},87045:(e,t,s)=>{s.d(t,{A:()=>b});var i,r=s(31635),n=s(66552),o=s(25482),a=s(83047),l=s(10107),u=s(56507),c=(s(44208),s(87811),s(36005)),d=s(40608),h=s(43937),p=s(86738),f=s(16930),g=s(19419),y=s(21325),m=s(28735),_=s(91806),v=s(72802);const w=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=class extends o.A{static{i=this}static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=f.A.WebMercator,numLODs:o=24}=e;if(!(0,y.fn)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new _.A({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new _.A({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.A(0,0,n),size:[r,r],spatialReference:n})}const l=(0,y.Vp)(n),u=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,a.GA)(n)*96),d=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*c;d.push(new _.A({level:e,scale:t,resolution:i}))}else{let e=(0,y.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(o/t);d.push(new _.A({level:0,scale:e,resolution:e*c}));for(let i=1;i<s;i++){const s=e/2**t,r=s*c;d.push(new _.A({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:d,origin:u,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,y.Vp)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach(e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e})),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=s;else if((0,y.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,i=s;else{const e=(0,m.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,i=s}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return i||(i=new v.U(null,0,0,0,(0,g.vt)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=0){let s=this.lodAt(e.level);if(!s&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const i=e.level-s.level,r=s.resolution*this.size[0]/2**i,n=s.resolution*this.size[1]/2**i;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,g.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+n}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const s=[],r=this.lods.length-t;for(let e=0;e<r;e++){const i=e+t,{scale:r,resolution:n}=i>=0?this.lods[i]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};s.push(new _.A({level:e,scale:r,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],b.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:p.A,json:{write:!0}})],b.prototype,"origin",void 0),(0,r.Cg)([(0,c.w)("origin")],b.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[_.A],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],b.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,r.Cg)([(0,c.w)("size",["rows","cols"])],b.prototype,"readSize",null),(0,r.Cg)([(0,h.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],b.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:f.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=i=(0,r.Cg)([(0,d.$)("esri.layers.support.TileInfo")],b)},88625:(e,t,s)=>{s.d(t,{A:()=>v});var i,r=s(31635),n=s(69540),o=s(66552),a=s(25482),l=s(97768),u=s(10107),c=(s(44208),s(53966),s(87811),s(36005)),d=s(40608),h=s(43937),p=s(30524);let f=i=class extends a.A{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,p.Dx)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],f.prototype,"title",void 0),f=i=(0,r.Cg)([(0,d.$)("esri.symbols.support.FeatureExpressionInfo")],f);const g=f;var y=s(16271);const m=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),_=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=class extends(n.A.ClonableMixin(a.A)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:g,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,c.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,h.K)("featureExpressionInfo",{featureExpressionInfo:{type:g},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:y.KQ,json:{type:String,read:_.read,write:_.write}})],v.prototype,"unit",null),v=(0,r.Cg)([(0,d.$)("esri.symbols.support.ElevationInfo")],v)},91806:(e,t,s)=>{s.d(t,{A:()=>u});var i,r=s(31635),n=s(25482),o=s(10107),a=s(56507),l=(s(44208),s(87811),s(40608));let u=class extends n.A{static{i=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,r.Cg)([(0,l.$)("esri.layers.support.LOD")],u)}}]);