@arcgis/core 5.0.0-next.35 → 5.0.0-next.36

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 (169) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/06462b267ff8d5984882.js +1 -0
  3. package/assets/esri/core/workers/chunks/{b48bb38e5d60fc7a9097.js → 08ef90e3fcfd4eda4301.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0a58b57e1777a8b0ea23.js +1 -0
  5. package/assets/esri/core/workers/chunks/{7115c52e22b7becff8de.js → 103153951ba312dc5e9e.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{f55328aabf84770c8e6a.js → 1817cf11e85afca947d3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/20e4243ea563d05a5256.js +1 -0
  8. package/assets/esri/core/workers/chunks/24a3c6f0154787968724.js +1 -0
  9. package/assets/esri/core/workers/chunks/{fafbacf2467e6883b6c9.js → 28db329528def851efd7.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{2367bd1cb34799a3f08a.js → 30184e39129d9c66ea54.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3f03165487c1c2340fff.js +1 -0
  12. package/assets/esri/core/workers/chunks/48e2737182c75005fb8f.js +1 -0
  13. package/assets/esri/core/workers/chunks/{05e55118dc0023d500fc.js → 5000a37fba27464d10ca.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{fa01d1813fa78034526e.js → 51355866a0dcf41cfded.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{a372d9af43ade7c6314c.js → 52c8687b473c9953c2f2.js} +1 -1
  16. package/assets/esri/core/workers/chunks/640085b5ade5c7f16228.js +1 -0
  17. package/assets/esri/core/workers/chunks/727804cf901094b1d620.js +1 -0
  18. package/assets/esri/core/workers/chunks/{0446562aee0639c61485.js → 7420fa18ba12014b22ea.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{c9c2e00fed979c21e2f0.js → 8a946cbc816f373c136b.js} +1 -1
  20. package/assets/esri/core/workers/chunks/8c271e9272e4eaf1325a.js +1 -0
  21. package/assets/esri/core/workers/chunks/{2a0fe1aede5c68374ccf.js → 8ec238b5b59ef18a1713.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{f1dfb1323d50247e80f9.js → 9110287f272141f60c35.js} +1 -1
  23. package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +1 -0
  24. package/assets/esri/core/workers/chunks/9664d9e679abc41f6c42.js +1 -0
  25. package/assets/esri/core/workers/chunks/{2921f05a40fda12f9f81.js → a00bba1c7cbf8cd7892c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +1 -0
  27. package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +1 -0
  28. package/assets/esri/core/workers/chunks/{483dc4ee5d73cdfe6229.js → b075d3714fab0591d67c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{82cc758bddd9f8397b9f.js → b451dc416eebd0931ef8.js} +4 -4
  30. package/assets/esri/core/workers/chunks/b59be95949445ff5afab.js +1 -0
  31. package/assets/esri/core/workers/chunks/b6dec5dfdeca54bae88d.js +1 -0
  32. package/assets/esri/core/workers/chunks/{4356274cfa477eb6d749.js → bfb9cbe59d36d18f9157.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{6afd59412bfc134bdf75.js → c052fb8c952cda0b5d13.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{f2ebd6471e1259a6eac0.js → c9e7cc5d853908ab5b2f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{97650ee3d0eecb69ccbb.js → d8623f5f13a084e439c2.js} +5 -5
  36. package/assets/esri/core/workers/chunks/dd105d6e0fcedee32644.js +1 -0
  37. package/assets/esri/core/workers/chunks/e1148067ceae7d9eaaf8.js +1 -0
  38. package/assets/esri/core/workers/chunks/{b536fdb655ad293d9024.js → eb6218634a492667506a.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{7804be2f5b3d86188a24.js → edc3d98f33d7bf959154.js} +1 -1
  40. package/assets/esri/core/workers/chunks/eefad79be500667af96e.js +1 -0
  41. package/assets/esri/core/workers/chunks/{63933cbcb5c12df09715.js → f1ac1c8b1331ec79e898.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{2b7f9a57a2cfbc108673.js → f1b99529e2055873b65a.js} +1 -1
  43. package/assets/esri/core/workers/chunks/f693a4d97b2762d0e6ff.js +1 -0
  44. package/assets/esri/core/workers/chunks/f8caceeaa14d99c35526.js +1 -0
  45. package/assets/esri/core/workers/chunks/febce0d80f019dc2a427.js +1 -0
  46. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  47. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  48. package/assets/esri/themes/base/widgets/_Attribution.scss +1 -0
  49. package/assets/esri/themes/dark/main.css +1 -1
  50. package/assets/esri/themes/light/main.css +1 -1
  51. package/assets/esri/themes/light/view.css +1 -1
  52. package/chunks/Magnifier.glsl.js +1 -1
  53. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  54. package/chunks/arcgis-knowledge-client-core.js +1 -1
  55. package/chunks/cameraUtilsSpherical.js +1 -1
  56. package/chunks/vec42.js +1 -1
  57. package/config.js +1 -1
  58. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  59. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  60. package/geometry/support/aaBoundingRect.js +1 -1
  61. package/geometry/support/buffer/BufferView.js +1 -1
  62. package/geometry/support/buffer/internals/Vec4.js +1 -1
  63. package/interfaces.d.ts +108 -0
  64. package/kernel.js +1 -1
  65. package/layers/GaussianSplatLayer.js +1 -1
  66. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  67. package/layers/IntegratedMeshLayer.js +1 -1
  68. package/package.json +1 -1
  69. package/rest/knowledgeGraph/DataModel.js +1 -1
  70. package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.d.ts +4 -0
  71. package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.js +5 -0
  72. package/rest/knowledgeGraph/GraphProperty.js +1 -1
  73. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  74. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  75. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  76. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  77. package/rest/knowledgeGraphService.d.ts +3 -0
  78. package/rest/knowledgeGraphService.js +1 -1
  79. package/support/revision.js +1 -1
  80. package/views/3d/GroundView3D.js +1 -1
  81. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  82. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  83. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  84. package/views/3d/environment/Fog.js +1 -1
  85. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  86. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  87. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  88. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  89. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  90. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  91. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  92. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  93. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  94. package/views/3d/layers/DrapedSubView3D.js +1 -1
  95. package/views/3d/layers/I3SMeshView3D.js +1 -1
  96. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  97. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  98. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  99. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  100. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  101. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  102. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  103. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  104. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  105. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  106. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  107. package/views/3d/state/ConstraintsManager.js +1 -1
  108. package/views/3d/state/ViewStateManager.js +1 -1
  109. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  110. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  111. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  112. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  113. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  114. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  115. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  116. package/views/3d/terrain/Overlay.js +1 -1
  117. package/views/3d/terrain/OverlayManager.js +1 -1
  118. package/views/3d/terrain/PatchRenderData.js +1 -1
  119. package/views/3d/terrain/ScaleRangeQueries.js +1 -1
  120. package/views/3d/terrain/TerrainSurface.js +1 -1
  121. package/views/3d/terrain/TextureFader.js +1 -1
  122. package/views/3d/terrain/TextureReference.js +1 -1
  123. package/views/3d/terrain/Tile.js +1 -1
  124. package/views/3d/webgl/RenderCamera.js +1 -1
  125. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  126. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
  127. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +1 -1
  128. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
  129. package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
  130. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  131. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  132. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  133. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  134. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  135. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  136. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  137. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  138. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  139. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  140. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  141. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +1 -1
  142. package/views/3d/webgl-engine/shaders/ensureColor4.js +1 -1
  143. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +5 -5
  144. package/views/SceneView.js +1 -1
  145. package/views/interactive/coordinateHelper.js +1 -1
  146. package/views/interactive/sketch/constraints.js +1 -1
  147. package/views/support/GroundElevationSampler.js +1 -1
  148. package/widgets/support/SelectionList.js +1 -1
  149. package/assets/esri/core/workers/chunks/032444974011118127d7.js +0 -1
  150. package/assets/esri/core/workers/chunks/089221bac1f019692f48.js +0 -1
  151. package/assets/esri/core/workers/chunks/1bfe0b2bf38d4dee7fd6.js +0 -1
  152. package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +0 -1
  153. package/assets/esri/core/workers/chunks/53d95ba86d010231fc4e.js +0 -1
  154. package/assets/esri/core/workers/chunks/7d3e665613927904ba4f.js +0 -1
  155. package/assets/esri/core/workers/chunks/a5f2da24497349239648.js +0 -1
  156. package/assets/esri/core/workers/chunks/a7b1b42bdb9cb9ecac45.js +0 -1
  157. package/assets/esri/core/workers/chunks/acaaefd4997316d319b8.js +0 -1
  158. package/assets/esri/core/workers/chunks/ad138b989c2c7a1168ac.js +0 -1
  159. package/assets/esri/core/workers/chunks/cc7c37f9ed3f831fd25c.js +0 -1
  160. package/assets/esri/core/workers/chunks/d14bd320f72d8e8a0ad8.js +0 -1
  161. package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +0 -1
  162. package/assets/esri/core/workers/chunks/de99c4fd1582a8e610cf.js +0 -1
  163. package/assets/esri/core/workers/chunks/ded3ef385d5a3a2ec8ca.js +0 -1
  164. package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +0 -1
  165. package/assets/esri/core/workers/chunks/eab0938d4ad7d7cc7309.js +0 -1
  166. package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +0 -1
  167. package/assets/esri/core/workers/chunks/ef5b13ee3362763c1096.js +0 -1
  168. package/assets/esri/core/workers/chunks/effbc4d240752e8ba0ab.js +0 -1
  169. package/assets/esri/core/workers/chunks/f403d8e414766fab2936.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1437,7694],{16494:(e,t,r)=>{r.d(t,{Nd:()=>l,W5:()=>n});var i=r(37330);const s=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],n=new i.I({whiteList:s,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(o.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17311:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),s=r(69622),o=r(4576),n=r(60999),l=r(7762),a=r(16494),p=r(91429),u=r(30524),d=r(43668);const y=/<br\s*\/*>/gi;let c=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,s=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:l}=this,p=l&&n;t.forEach(t=>{const u=t.getObjectId()??t.attributes[e.objectIdField];let d=p?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,s).global,layer:e,text:l}):"";r?.removeHTML&&(d=a.Nd.sanitize(d).replaceAll(y," ")),i.set(u,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,u.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const s=await e.queryFeatures(i);if(s?.features.length===t.length)return s.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,p.MZ)({readOnly:!0})],c.prototype,"_arcadeTask",null),(0,i.Cg)([(0,p.MZ)()],c.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],c.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],c.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,p.MZ)()],c.prototype,"displayField",void 0),(0,i.Cg)([(0,p.MZ)()],c.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,p.MZ)()],c.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,p.MZ)()],c.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)()],c.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,p.MZ)()],c.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)()],c.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],c.prototype,"requiredFields",null),c=(0,i.Cg)([(0,p.$K)("esri.layers.support.TitleCreator")],c)},22671:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(31635),o=r(52106),n=r(66552),l=r(25482),a=r(4718),p=r(91429),u=r(16930),d=r(65864),y=r(50498),c=r(20437),h=r(36005),g=r(43937);const f=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,d.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,e=>e*o+i,e=>s-e*n,l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=u.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=o.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(n)}return s}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,d.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,d.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,d.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,p.MZ)({type:[o.A],json:{write:!0}})],m.prototype,"features",void 0),(0,s.Cg)([(0,h.w)("features")],m.prototype,"readFeatures",null),(0,s.Cg)([(0,p.MZ)({type:[c.A],json:{write:!0}})],m.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],m.prototype,"geometryType",void 0),(0,s.Cg)([(0,g.K)("geometryType")],m.prototype,"writeGeometryType",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s.Cg)([(0,p.MZ)({types:y.yR,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,h.w)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s.Cg)([(0,g.K)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],m.prototype,"transform",void 0),m=i=(0,s.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),s=r(69540),o=r(66552),n=r(25482),l=r(91429);const a=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],p)},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>a});var i=r(31635),s=r(93637),o=r(91429),n=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const s=new n.A;return s.read(i,r),[s]}const a={type:[n.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const o=e.find(e=>!!e.field);o&&(0,s.sM)(r,[o.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),s=r(69540),o=r(25482),n=r(91429),l=r(80451),a=r(29005),p=r(36005),u=r(43937);let d=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,p.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],d)},38961:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),s=r(7762),o=r(36708),n=r(10107),l=r(64108),a=r(80559);let p=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)(()=>this._refresh(),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=this.getCollections?.();if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,n.MZ)()],p.prototype,"getCollections",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"itemFilterFunction",void 0),p=(0,i.Cg)([(0,l.$)("esri.core.CollectionFlattener")],p)},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var i=r(34727),s=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const o=function(e){if("manual"===p(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],u(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(o&&((0,i.gg)(t,o[0])||(0,i.ZH)(r,o[1])))return"";const n=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const s=u(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,i.ZH)(s,t)||(0,i.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],s=e[t+1];if((0,i.ZH)(u(s.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,s.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===p(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,s){return e=u(e),r=u(r),t=d(t),!(!(0,i.Sp)(r,e)&&(s??r)>e||(0,i.Hx)(t,r)||void 0!==s&&(0,i.Sp)(s,e))}function p(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(69540),o=r(66552),n=r(25482),l=r(91429);const a=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),p=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let u=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],u.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],u.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"role",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.Relationship")],u)},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},81583:(e,t,r)=>{r.d(t,{L:()=>l,g:()=>n});var i=r(60999),s=r(7762),o=r(92474);async function n(e,t){return await e.load(),l(e,t)}async function l(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.A.isCollection(t)?t.forEach(e=>n(e)):(0,o.Zm)(t)&&r.push(t))};t(n);let l=null;if(await(0,i.Tj)(r,async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||l||(l=t)}),l)throw l.error;return e}},82411:(e,t,r)=>{r.r(t),r.d(t,{default:()=>rt});var i=r(31635),s=r(7762),o=r(38961),n=r(49186),l=r(36563),a=r(4718),p=r(81583),u=r(53966),d=r(25728),y=r(74887),c=r(36708),h=r(84952),g=r(91429),f=r(16930),m=r(4146),v=r(52106),b=r(37838),w=r(11254),C=r(66552),M=r(92474),Z=r(61893),F=r(5443),T=r(55156),x=r(60950),S=r(89808),I=r(99959);const A=Symbol("isBuildingGraphicOrigin");var j;class O extends I.A{get[(j=A,x.ym)](){return this.sublayer}get[T.e](){return this.sublayer}get[S.Q](){return this.sublayer}constructor(e){super(),this[j]=!0,this.type="building",this.sublayer=e}get layer(){return this.sublayer.layer}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var _=r(68654),L=r(4902),P=r(56507),R=r(10873),E=r(36005);let N=class extends((0,L.s)(d.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],N.prototype,"title",void 0),(0,i.Cg)([(0,E.w)("service","title",["alias","name"])],N.prototype,"readTitle",null),(0,i.Cg)([(0,g.MZ)()],N.prototype,"layer",void 0),(0,i.Cg)([(0,g.MZ)({type:P.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,isRequired:!0}}})],N.prototype,"id",void 0),(0,i.Cg)([(0,E.w)("service","id")],N.prototype,"readIdOnlyOnce",null),(0,i.Cg)([(0,g.MZ)((0,R.Qo)(String))],N.prototype,"modelName",void 0),(0,i.Cg)([(0,g.MZ)((0,R.Qo)(Boolean))],N.prototype,"isEmpty",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean,nonNullable:!0})],N.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],N.prototype,"visible",void 0),(0,i.Cg)([(0,g.MZ)({type:Number,json:{write:!0}})],N.prototype,"opacity",void 0),N=(0,i.Cg)([(0,g.$K)("esri.layers.buildingSublayers.BuildingSublayer")],N);var k=r(4071),q=r(15426),B=r(17036),$=r(95466),K=r(30524),U=r(83898),Q=r(50805),D=r(41214),G=r(61956),J=r(54218),z=r(30291),V=r(88625),H=r(5682),W=r(45671),Y=r(93223);const X=(0,B.p)();let ee=class extends((0,M.WV)((0,Z.g)(N))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}initialize(){this._set("graphicOrigin",new O(this))}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new $.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,i=t.associatedLayerID;return null!=r&&"number"==typeof i?new _.default({portalItem:r,customParameters:this.customParameters,layerId:i}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=(0,U.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,u.A.getLogger(this),t)});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,z.tn)(this,e)}async _fetchService(e){const t=(await(0,w.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,q.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:k.P,{query:t,operations:{supportsQuery:r},data:{supportsZ:i,supportsM:s,isVersioned:o}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:i,supportsM:s,isVersioned:o}}}createQuery(){const e=new G.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(J.Et)}async queryCachedAttributes(e,t){const r=(0,K.hL)(this.fieldsIndex,await(0,W.TO)(this,(0,W.D8)(this)));return(0,H.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"parsedUrl",null),(0,i.Cg)([(0,g.MZ)({type:Q.W4,readOnly:!0})],ee.prototype,"nodePages",void 0),(0,i.Cg)([(0,g.MZ)({type:[Q.uV],readOnly:!0})],ee.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[Q.Ot],readOnly:!0})],ee.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({type:[Q.L0],readOnly:!0})],ee.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"store",void 0),(0,i.Cg)([(0,g.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],ee.prototype,"rootNode",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,g.MZ)(X.fields)],ee.prototype,"fields",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"fieldsIndex",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:_.default})],ee.prototype,"associatedLayer",void 0),(0,i.Cg)([(0,E.w)("service","associatedLayer",["associatedLayerID"])],ee.prototype,"readAssociatedLayer",null),(0,i.Cg)([(0,g.MZ)(X.outFields)],ee.prototype,"outFields",void 0),(0,i.Cg)([(0,g.MZ)({type:String,readOnly:!0})],ee.prototype,"objectIdField",null),(0,i.Cg)([(0,g.MZ)({type:String,readOnly:!0})],ee.prototype,"globalIdField",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{read:!1}})],ee.prototype,"displayField",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String})],ee.prototype,"apiKey",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String})],ee.prototype,"customParameters",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:F.A})],ee.prototype,"fullExtent",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:f.A})],ee.prototype,"spatialReference",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"version",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:V.A})],ee.prototype,"elevationInfo",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:Number})],ee.prototype,"minScale",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:Number})],ee.prototype,"maxScale",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:Number})],ee.prototype,"effectiveScaleRange",null),(0,i.Cg)([(0,g.MZ)({type:["hide","show"],json:{write:!0}})],ee.prototype,"listMode",void 0),(0,i.Cg)([(0,g.MZ)({types:D.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ee.prototype,"renderer",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ee.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,g.MZ)(R.M6)],ee.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:b.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],ee.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ee.prototype,"normalReferenceFrame",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],ee.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,g.MZ)()],ee.prototype,"types",null),(0,i.Cg)([(0,g.MZ)()],ee.prototype,"typeIdField",null),(0,i.Cg)([(0,g.MZ)({json:{write:!1}}),(0,Y.e)(new C.J({"3DObject":"3d-object",Point:"point"}))],ee.prototype,"layerType",void 0),(0,i.Cg)([(0,g.MZ)()],ee.prototype,"geometryType",null),(0,i.Cg)([(0,g.MZ)()],ee.prototype,"profile",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],ee.prototype,"capabilities",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ee.prototype,"statisticsInfo",void 0),ee=(0,i.Cg)([(0,g.$K)("esri.layers.buildingSublayers.BuildingComponentSublayer")],ee);var te=r(67076);function re(e,t){e.forEach(e=>{t(e),"building-group"===e.type&&re(e.sublayers,t)})}const ie={type:s.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:se}}},read:!1}};function se(e,t,r){if(e&&Array.isArray(e))return new s.A(e.map(e=>{const t=function(e){return"group"===e.layerType?oe:ee}(e);if(t){const i=new t;return i.read(e,r),i}return r?.messages&&e&&r.messages.push(new te.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null}))}let oe=class extends N{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,p.L)(this,e=>re(this.sublayers,t=>{"building-group"!==t.type&&e(t)}))}static{this.sublayersProperty=ie}static{this.readSublayers=se}};(0,i.Cg)([(0,g.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],oe.prototype,"listMode",void 0),(0,i.Cg)([(0,g.MZ)(ie)],oe.prototype,"sublayers",void 0),oe=(0,i.Cg)([(0,g.$K)("esri.layers.buildingSublayers.BuildingGroupSublayer")],oe);var ne=r(52136),le=r(18768),ae=r(69208),pe=r(16131),ue=r(8303),de=r(25036),ye=r(58947),ce=r(92009),he=r(25482),ge=r(13069);let fe=class extends he.o{constructor(){super(...arguments),this.type=null}};(0,i.Cg)([(0,g.MZ)({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],fe.prototype,"type",void 0),fe=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterAuthoringInfo")],fe);const me=fe;var ve;let be=ve=class extends he.o{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new ve({filterType:this.filterType,filterValues:(0,a.o8)(this.filterValues)})}};(0,i.Cg)([(0,g.MZ)({type:String,json:{write:{isRequired:!0}}})],be.prototype,"filterType",void 0),(0,i.Cg)([(0,g.MZ)({type:[String],json:{write:{isRequired:!0}}})],be.prototype,"filterValues",void 0),be=ve=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterAuthoringInfoType")],be);const we=be;var Ce;const Me=s.A.ofType(we);let Ze=Ce=class extends he.o{clone(){return new Ce({filterTypes:(0,a.o8)(this.filterTypes)})}};(0,i.Cg)([(0,g.MZ)({type:Me,json:{write:{isRequired:!0}}})],Ze.prototype,"filterTypes",void 0),Ze=Ce=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],Ze);const Fe=Ze;var Te;const xe=s.A.ofType(Fe);let Se=Te=class extends me{constructor(){super(...arguments),this.type="checkbox"}clone(){return new Te({filterBlocks:(0,a.o8)(this.filterBlocks)})}};(0,i.Cg)([(0,g.MZ)({type:["checkbox"]})],Se.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)({type:xe,json:{write:{isRequired:!0}}})],Se.prototype,"filterBlocks",void 0),Se=Te=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],Se);const Ie=Se;let Ae=class extends he.o{};(0,i.Cg)([(0,g.MZ)({readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],Ae.prototype,"type",void 0),Ae=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterMode")],Ae);const je=Ae;var Oe;let _e=Oe=class extends je{constructor(){super(...arguments),this.type="solid"}clone(){return new Oe}};(0,i.Cg)([(0,g.MZ)({type:["solid"],readOnly:!0,json:{write:{isRequired:!0}}})],_e.prototype,"type",void 0),_e=Oe=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterModeSolid")],_e);const Le=_e;var Pe,Re=r(51734);let Ee=Pe=class extends je{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Pe({edges:(0,a.o8)(this.edges)})}};(0,i.Cg)([(0,Y.e)({wireFrame:"wire-frame"})],Ee.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)(Re.J)],Ee.prototype,"edges",void 0),Ee=Pe=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterModeWireFrame")],Ee);const Ne=Ee;var ke;let qe=ke=class extends je{constructor(){super(...arguments),this.type="x-ray"}clone(){return new ke}};(0,i.Cg)([(0,g.MZ)({type:["x-ray"],readOnly:!0,json:{write:{isRequired:!0}}})],qe.prototype,"type",void 0),qe=ke=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterModeXRay")],qe);const Be=qe;var $e;let Ke=$e=class extends he.o{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Le,this.title=""}clone(){return new $e({filterExpression:this.filterExpression,filterMode:(0,a.o8)(this.filterMode),title:this.title})}};(0,i.Cg)([(0,g.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ke.prototype,"filterExpression",void 0),(0,i.Cg)([(0,g.MZ)({nonNullable:!0,types:{key:"type",base:je,typeMap:{solid:Le,"wire-frame":Ne,"x-ray":Be}},json:{read:e=>{switch(e?.type){case"solid":return Le.fromJSON(e);case"wireFrame":return Ne.fromJSON(e);case"x-ray":return Be.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}})],Ke.prototype,"filterMode",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ke.prototype,"title",void 0),Ke=$e=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilterBlock")],Ke);const Ue=Ke;var Qe;const De=s.A.ofType(Ue);let Ge=Qe=class extends he.o{constructor(e){super(e),this.description=null,this.filterBlocks=null,this.id=(0,ge.lk)(),this.name=null}clone(){return new Qe({description:this.description,filterBlocks:(0,a.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,a.o8)(this.filterAuthoringInfo)})}};(0,i.Cg)([(0,g.MZ)({type:String,json:{write:!0}})],Ge.prototype,"description",void 0),(0,i.Cg)([(0,g.MZ)({type:De,json:{write:{enabled:!0,isRequired:!0}}})],Ge.prototype,"filterBlocks",void 0),(0,i.Cg)([(0,g.MZ)({types:{key:"type",base:me,typeMap:{checkbox:Ie}},json:{read:e=>"checkbox"===e?.type?Ie.fromJSON(e):null,write:!0}})],Ge.prototype,"filterAuthoringInfo",void 0),(0,i.Cg)([(0,g.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],Ge.prototype,"id",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Ge.prototype,"name",void 0),Ge=Qe=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFilter")],Ge);let Je=class extends he.o{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,i.Cg)([(0,g.MZ)({type:String})],Je.prototype,"fieldName",void 0),(0,i.Cg)([(0,g.MZ)({type:String})],Je.prototype,"modelName",void 0),(0,i.Cg)([(0,g.MZ)({type:String})],Je.prototype,"label",void 0),(0,i.Cg)([(0,g.MZ)({type:Number})],Je.prototype,"min",void 0),(0,i.Cg)([(0,g.MZ)({type:Number})],Je.prototype,"max",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:e=>Array.isArray(e)&&(e.every(e=>"string"==typeof e)||e.every(e=>"number"==typeof e))?e.slice():null}})],Je.prototype,"mostFrequentValues",void 0),(0,i.Cg)([(0,g.MZ)({type:[Number]})],Je.prototype,"subLayerIds",void 0),Je=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingFieldStatistics")],Je);const ze=Je;let Ve=class extends((0,M.WV)((0,Z.g)(he.o))){constructor(e){super(e),this.url=null,this.customParameters=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(u.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,w.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,i.Cg)([(0,g.MZ)({constructOnly:!0,type:String})],Ve.prototype,"url",void 0),(0,i.Cg)([(0,g.MZ)({constructOnly:!0})],Ve.prototype,"customParameters",void 0),(0,i.Cg)([(0,g.MZ)({constructOnly:!0})],Ve.prototype,"apiKey",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:[ze],json:{read:{source:"summary"}}})],Ve.prototype,"fields",null),Ve=(0,i.Cg)([(0,g.$K)("esri.layers.support.BuildingSummaryStatistics")],Ve);var He=r(56776);const We=s.A.ofType(Ge),Ye=(0,a.o8)(oe.sublayersProperty),Xe=Ye.json?.origins;Xe&&(Xe["web-scene"]={type:[ee],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},Xe["portal-item"]={type:[ee],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let et=class extends((0,ye.w6)((0,le.b)((0,pe.q)((0,ue.A)((0,de.j)((0,d.P)((0,ae.d)((0,ne.p)(m.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._allSublayerOverrides=null,this.filters=new We,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const i=oe.readSublayers(e,t,r);return re(i,e=>e.layer=this),this._allSublayerOverrides&&(function(e,t){t.forEach(t=>tt(e,t))}(i,this._allSublayerOverrides),this._allSublayerOverrides=null),i}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?function(e,t,r){const i=[];re(e,e=>{const t=e.write({},r);Object.keys(t).length>1&&i.push(t)}),i.length>0&&(t.sublayers=i)}(this.sublayers,e,t):this._allSublayerOverrides&&function(e,t,r){const i=r?.origin&&e.get(r.origin);i&&(t.sublayers=[],i.overrides.forEach(e=>{t.sublayers.push((0,a.o8)(e))}))}(this._allSublayerOverrides,e,t)),e}read(e,t){if(super.read(e,t),("web-scene"===t?.origin||"portal-item"===t?.origin)&&Array.isArray(e?.sublayers)){const r=function(e,t){const r=new Map;for(const i of e)null!=i&&"object"==typeof i&&"number"==typeof i.id?r.set(i.id,i):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:i}));return{overrides:r,context:t}}(e.sublayers,t);this.sublayers?tt(this.sublayers,r):(this._allSublayerOverrides??=new Map,this._allSublayerOverrides.set(t.origin,r))}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef&&this.parsedUrl){const e=(0,h.fj)(this.parsedUrl.path,t.statisticsHRef);return new Ve({url:e,apiKey:this.apiKey,customParameters:this.customParameters})}return null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.QP).then(()=>this._fetchService(t)).then(()=>this._fetchAssociatedFeatureService(t));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,p.g)(this,e=>{re(this.sublayers,t=>{"building-group"!==t.type&&e(t)}),this.summaryStatistics&&e(this.summaryStatistics)})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,ce.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){(0,y.QZ)(this._logWarningOnPopupEnabled())}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,l.rE)(e)),await(0,c.C_)(()=>this.allSublayers.filter(e=>"building-component"===e.type).some(e=>e.popupEnabled&&null!=e.popupTemplate),e.signal);const t=this.allSublayers.filter(e=>"building-component"===e.type).filter(e=>e.popupEnabled&&null!=e.popupTemplate),r=[],i=[];for(const e of t){const t=e.title??`untitled ${e.id}`;e.attributeStorageInfo?r.push(t):i.push(t)}const s="\n ",o=r.length>0?`\nThe following sublayers will fall back to binary attributes for Popups:${s}${r.join(s)}`:"",n=i.length>0?`\nThe following sublayers have no binary attributes and will not work with Popups:${s}${i.join(s)}`:"";u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded for this BuildingSceneLayer: ${this.title}.`,o,n)}_validateElevationInfo(e){const t="Building scene layers";(0,He.XF)(u.A.getLogger(this),(0,He.B)(t,"absolute-height",e)),(0,He.XF)(u.A.getLogger(this),(0,He.tW)(t,e))}};function tt(e,t){const{overrides:r,context:i}=t;re(e,e=>e.read(r.get(e.id),i))}(0,i.Cg)([(0,g.MZ)({type:["BuildingSceneLayer"]})],et.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],et.prototype,"allSublayers",void 0),(0,i.Cg)([(0,g.MZ)(Ye)],et.prototype,"sublayers",void 0),(0,i.Cg)([(0,E.w)("service","sublayers")],et.prototype,"readSublayers",null),(0,i.Cg)([(0,g.MZ)({type:We,nonNullable:!0,json:{write:!0}})],et.prototype,"filters",void 0),(0,i.Cg)([(0,g.MZ)({type:String,json:{write:!0}})],et.prototype,"activeFilterId",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:Ve})],et.prototype,"summaryStatistics",void 0),(0,i.Cg)([(0,E.w)("summaryStatistics",["statisticsHRef"])],et.prototype,"readSummaryStatistics",null),(0,i.Cg)([(0,g.MZ)({type:[String],json:{read:!1}})],et.prototype,"outFields",void 0),(0,i.Cg)([(0,g.MZ)(R.Fm)],et.prototype,"fullExtent",void 0),(0,i.Cg)([(0,g.MZ)(R.fV)],et.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:["show","hide","hide-children"]})],et.prototype,"listMode",void 0),(0,i.Cg)([(0,g.MZ)((0,R.Qo)(f.A))],et.prototype,"spatialReference",void 0),(0,i.Cg)([(0,g.MZ)(R.Yj)],et.prototype,"elevationInfo",null),(0,i.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],et.prototype,"type",void 0),(0,i.Cg)([(0,g.MZ)()],et.prototype,"associatedFeatureServiceItem",void 0),et=(0,i.Cg)([(0,g.$K)("esri.layers.BuildingSceneLayer")],et);const rt=et},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,s=r(31635),o=r(66552),n=r(25482),l=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let p=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,s.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],p.prototype,"order",void 0),p=i=(0,s.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],p)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4342,9062,9279],{22671:(e,t,r)=>{r.d(t,{A:()=>m});var i,n=r(31635),s=r(52106),o=r(66552),a=r(25482),l=r(4718),d=r(91429),p=r(16930),u=r(65864),c=r(50498),y=r(20437),h=r(36005),f=r(43937);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,u.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const d=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,a,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=p.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=s.aggregateGeometries,d=o.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,u.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,u.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,u.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,d.MZ)({type:[s.A],json:{write:!0}})],m.prototype,"features",void 0),(0,n.Cg)([(0,h.w)("features")],m.prototype,"readFeatures",null),(0,n.Cg)([(0,d.MZ)({type:[y.A],json:{write:!0}})],m.prototype,"fields",void 0),(0,n.Cg)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,n.Cg)([(0,f.K)("geometryType")],m.prototype,"writeGeometryType",null),(0,n.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,n.Cg)([(0,d.MZ)({types:c.yR,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,h.w)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,d.MZ)({type:p.A,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,n.Cg)([(0,f.K)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,d.MZ)({json:{write:!0}})],m.prototype,"transform",void 0),m=i=(0,n.Cg)([(0,d.$K)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0},32587:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(62788),n=r(95488);class s{constructor(e){this._observable=new n.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,i.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,i.gc)(this._observable),this._map.entries()}forEach(e,t){(0,i.gc)(this._observable),this._map.forEach((r,i)=>e.call(t,r,i,this),t)}get(e){return(0,i.gc)(this._observable),this._map.get(e)}has(e){return(0,i.gc)(this._observable),this._map.has(e)}keys(){return(0,i.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),i=e(t,r);i!==t&&this.set(r,i)}})}values(){return(0,i.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,i.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>d,ne:()=>l});var i=r(31635),n=r(93637),s=r(91429),o=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new o.A;return n.read(i,r),[n]}const l={type:[o.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},d=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),n=r(69540),s=r(25482),o=r(91429),a=r(80451),l=r(29005),d=r(36005),p=r(43937);let u=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,a.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"domains",void 0),(0,i.Cg)([(0,d.w)("domains")],u.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],u.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[l.A],json:{write:!0}})],u.prototype,"templates",void 0),u=(0,i.Cg)([(0,o.$K)("esri.layers.support.FeatureType")],u)},44794:(e,t,r)=>{r.d(t,{v:()=>a});var i=r(4718),n=r(62788),s=r(95488);class o{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=i.gh){return new o(e,t)}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(s,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>g,QY:()=>c,lL:()=>m,xR:()=>h});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),d=r(43668),p=r(98623);const u=["geometry","scale","timeProperties"];function c(e,t){if(null!=t)for(const r of u)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,d.l)();let a;try{a=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=s.scriptUsesGeometryEngine(a);l&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},u=s.compileScript(a,p);let c=null;null!=r&&(c=new o(r),c.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new f(e,s,a,u,t,y,c,o)}constructor(e,t,r,i,n,s,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new g,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class g{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(m(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function m(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),u={};if(t)for(const e in t)u[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)u.hasOwnProperty(t.name)||(u[t.name]=t.value);const c=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))c.delete(e);c.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});const y=await(0,a.xR)(e.expression,null,u);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new d(r,h);return new l(h,p,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class d extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},83508:(e,t,r)=>{r.r(t),r.d(t,{default:()=>fe});var i=r(31635),n=r(11254),s=r(7762),o=r(49186),a=r(91869),l=r(25728),d=r(74887),p=r(84952),u=r(91429),c=r(4146),y=r(36563),h=r(66344),f=r(32587),g=r(36708),m=r(44794),w=r(56507),b=r(63074),v=r(25036),_=r(10873),C=r(91880),M=r(1873);let Z=class extends((0,v.j)((0,b.dM)((0,l.P)(c.A)))){constructor(e){super(e),this._layerCache=new h.q(20,e=>e.destroy()),this._oidToReference=new f.A,this._layerToReference=new Map,this.legendEnabled=!0,this.layers=new s.A,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",({item:e})=>{e.parent=this}),this.layers.on("after-remove",({item:e})=>{e.parent=null}),(0,g.wB)(()=>this._orderBy,()=>{this._updateLayerSortValues(),this._sortAllLayers()})])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){return this.parent?this.parent.orderBy?.find(e=>!e.valueExpression&&e.field)??new C.A({field:this.parent.objectIdField}):null}get _referenceComparator(){const e=this._orderBy;if(!this.parent||!e)return()=>0;const t=this.parent.fieldsIndex.get(e.field),r=(0,M.FM)(t?.toJSON().type,"descending"===e.order,"case-sensitive"),i=(0,M.FM)("esriFieldTypeOID","descending"===e.order);return(e,t)=>r(t.sortValue,e.sortValue)||i(t.objectId,e.objectId)}get fullExtent(){return this.parent?.fullExtent??null}get updating(){return(0,a.Bs)(this._oidToReference,({pending:e})=>null!=e)}acquireLayer(e){if(this.destroyed)return(0,y.hA)();const t=this._getLayerReference(e);return t.count++,(0,y.hA)(()=>{t.count--,t.count||this._destroyLayerReference(t)})}_getLayerReference(e){const t=e.getObjectId();return(0,a.tE)(this._oidToReference,t,()=>{const t=e.getObjectId(),r=`${t}`,i=e.getAttribute(this.parent.itemSourceField),n=new F(e,t,i),s=this._layerCache.pop(r);return s?(this._addLayer(n,s),n):(n.pending=this.parent.createLayerFromFootprint(e).then(e=>{n.count?this._addLayer(n,e):(this.destroyed||this._layerCache.get(r)||this._layerCache.put(r,e),n.layer=null)}).catch(()=>{}).finally(()=>{n.pending=null}),n)})}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t)))}};(0,i.Cg)([(0,u.MZ)()],Z.prototype,"_orderBy",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Z.prototype,"_referenceComparator",null),(0,i.Cg)([(0,u.MZ)(_.fV)],Z.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide","hide-children"],json:{write:!0}})],Z.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Z.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],Z.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Z.prototype,"layers",void 0),(0,i.Cg)([(0,u.MZ)({type:w.jz,range:{min:0,max:50},json:{write:!0,default:10}})],Z.prototype,"maximumVisibleSublayers",void 0),(0,i.Cg)([(0,u.MZ)(_.ke)],Z.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)({clonable:!1})],Z.prototype,"parent",void 0),(0,i.Cg)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],Z.prototype,"title",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],Z.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],Z.prototype,"updating",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],Z.prototype,"visible",void 0),Z=(0,i.Cg)([(0,u.$K)("esri.layers.catalog.CatalogDynamicGroupLayer")],Z);class F{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=(0,m.v)(null)}get pending(){return this._pending.value}set pending(e){this._pending.value=e}}var x=r(37838),S=r(4718),T=r(965),I=r(55156),O=r(60950),j=r(89808),E=r(99959);const R=Symbol("isCatalogGraphicOrigin");var A;class L extends E.A{get[(A=R,O.ym)](){return this.layer}get[I.e](){return this.layer}get[j.Q](){return this.layer}constructor(e){super(),this[A]=!0,this.type="catalog",this.layer=e}get id(){return this.layer.id}}var P=r(87718),q=r(30524),D=r(46499),N=r(39383),G=r(96576),V=r(41214),$=r(30291),B=r(94985);let k=class extends((0,v.j)((0,P.F)((0,b.dM)((0,l.P)(c.A))))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.graphicOrigin=new L(this),this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,q.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",e=>this.emit("apply-edits",e)),this.parent.on("edits",e=>this.emit("edits",e)),this.parent.on("refresh",e=>this.emit("refresh",e))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get displayFilterEnabled(){return this.parent?.displayFilterEnabled??!0}get displayFilterInfo(){return this.parent?.displayFilterInfo??null}get effectiveEditingEnabled(){return!1}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){(0,q.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){const e=new B.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new G.A({symbol:e})}()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return(0,$.tn)(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}async queryAttributeBins(e,t){return await this.load(),this.parent.queryAttributeBins(e,t)}};(0,i.Cg)([(0,u.MZ)(_.zQ)],k.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"apiKey",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"capabilities",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"customParameters",null),(0,i.Cg)([(0,u.MZ)()],k.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"definitionExpression",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"editingInfo",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],k.prototype,"charts",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"createQueryVersion",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"displayField",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],k.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,u.MZ)((()=>{const e=(0,S.o8)(_.Yj);return e.json.origins["web-map"]={read:!1,write:!1},e})())],k.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"fields",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"fieldsIndex",null),(0,i.Cg)([(0,u.MZ)({type:T.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],k.prototype,"formTemplate",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"geometryFieldsInfo",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"geometryType",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"globalIdField",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0,clonable:!1})],k.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"hasM",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"hasZ",null),(0,i.Cg)([(0,u.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],k.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:N.w,write:!0}})],k.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,u.MZ)(_.kF)],k.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,u.MZ)(_.fV)],k.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide"],json:{write:!0}})],k.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)((()=>{const e=(0,S.o8)(_.hG);return e.json.origins.service.read=!1,e})())],k.prototype,"maxScale",void 0),(0,i.Cg)([(0,u.MZ)((()=>{const e=(0,S.o8)(_.hn);return e.json.origins.service.read=!1,e})())],k.prototype,"minScale",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"objectIdField",null),(0,i.Cg)([(0,u.MZ)(_.ke)],k.prototype,"opacity",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"orderBy",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"outFields",null),(0,i.Cg)([(0,u.MZ)({clonable:!1})],k.prototype,"parent",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)(_.M6)],k.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:x.A,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"preferredTimeZone",null),(0,i.Cg)([(0,u.MZ)({types:V.Hg,json:{origins:{"web-scene":{types:V.XJ}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<3}}}}})],k.prototype,"renderer",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"returnM",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"returnZ",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"source",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"timeExtent",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"timeInfo",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"timeOffset",null),(0,i.Cg)([(0,u.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],k.prototype,"title",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],k.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"typeIdField",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"types",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],k.prototype,"useViewTime",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],k.prototype,"visible",void 0),k=(0,i.Cg)([(0,u.$K)("esri.layers.catalog.CatalogFootprintLayer")],k);var J=r(72593),z=r(52136),U=r(18768),Q=r(69208),K=r(6455),Y=r(47685),H=r(87796),W=r(16131),X=r(32756),ee=r(8303),te=r(54310),re=r(82935),ie=r(15426),ne=r(33143),se=r(17036),oe=r(91908),ae=r(20655),le=r(80812),de=r(39131),pe=r(61956);const ue=(0,se.p)();function ce(e,t,r,i){const n=e.write({},i);(function(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let ye=class extends((0,K.FJ)((0,H.j)((0,Y.w6)((0,b.dM)((0,X.fY)((0,re.e)((0,v.j)((0,te.J)((0,U.b)((0,W.q)((0,ee.A)((0,l.P)((0,Q.d)((0,z.p)(c.A))))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new Z({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new k({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new s.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new J.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d.QP).then(async()=>{const{url:e,source:r,portalItem:i}=this;if(!e)throw new o.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new o.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:n}=r;n&&(this.sourceJSON=n,this.read(n,{origin:"service",portalItem:i,portal:i?.portal,url:this.parsedUrl}))}).then(()=>{const e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new o.A("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}).then(()=>(0,ie.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}async applyEdits(e,t){return(0,ie.ct)(this,e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new pe.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,ie.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return(0,ie.jp)(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(pe.A.from(e)??r.createQuery(),t),n=r.footprintLayer.graphicOrigin;if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r.footprintLayer,e.origin=n;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(pe.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(pe.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(pe.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,oe.D)(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async queryAttributeBins(e,t){const{source:i,capabilities:n}=await this.load();(0,ie.ZJ)(e,n,"CatalogLayer");const s=await r.e(6956).then(r.bind(r,14575)),o=await i.queryAttributeBins(s.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this.footprintLayer;return o}async _fetchFirstValidLayerId(e){const{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(this.applyPreferredHost(t),Array.isArray(t?.layers))return t.layers.find(({type:e})=>this.supportedSourceTypes.has(e))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new o.A("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const i=JSON.parse(t);if(function(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}(i)){const{itemId:e,portalUrl:t}=i,r=(0,de.qG)(t),n=this.portalItem?.portal,s=ae.A.getDefault();let o,l=!0;n&&(0,p.ut)(t,n.url)?o=n:(0,p.ut)(t,s.url)?o=s:(o=(0,a.tE)(this._portals,r,()=>new ae.A({url:r})),l=!1);const d=await c.A.fromPortalItem(new le.default({id:e,portal:o}));return l||await he(d),d}if(function(e){return"object"==typeof e&&null!=e&&"url"in e}(i))return c.A.fromArcGISServerUrl({url:i.url});const{default:n}=await r.e(7546).then(r.bind(r,45165));return new n}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};async function he(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,"group"===e.type&&await Promise.allSettled([...e.layers.map(e=>he(e)),...e.tables.map(e=>he(e))])}}(0,i.Cg)([(0,u.MZ)(_.fV)],ye.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"createQueryVersion",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"drawOrderField",void 0),(0,i.Cg)([(0,u.MZ)({type:Z,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ce}}})],ye.prototype,"dynamicGroupLayer",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"editingEnabled",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],ye.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)({...ue.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ye.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)(ue.fieldsIndex)],ye.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],ye.prototype,"floorInfo",void 0),(0,i.Cg)([(0,u.MZ)({type:k,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ce}}})],ye.prototype,"footprintLayer",void 0),(0,i.Cg)([(0,u.MZ)(_.id)],ye.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"itemNameField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"itemSourceField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"itemTypeField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"layers",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide","hide-children"]})],ye.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"maxScaleField",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"minScaleField",void 0),(0,i.Cg)([(0,u.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],ye.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],ye.prototype,"orderBy",void 0),(0,i.Cg)([(0,u.MZ)(ue.outFields)],ye.prototype,"outFields",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ye.prototype,"source",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],ye.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],ye.prototype,"typeIdField",void 0),(0,i.Cg)([(0,u.MZ)({type:[ne.A]})],ye.prototype,"types",void 0),ye=(0,i.Cg)([(0,u.$K)("esri.layers.CatalogLayer")],ye);const fe=ye},87718:(e,t,r)=>{r.d(t,{F:()=>x,Y:()=>F});var i,n=r(31635),s=r(91429),o=r(49186),a=r(25482),l=r(93637),d=r(76369),p=r(66552),u=r(4718),c=r(50498),y=r(61956),h=r(79677);const f=new p.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new p.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let m=i=class extends a.o{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new y.A({geometry:(0,u.o8)(r),objectIds:(0,u.o8)(s),spatialRelationship:i,timeExtent:(0,u.o8)(n),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new i({geometry:(0,u.o8)(t),objectIds:(0,u.o8)(s),spatialRelationship:r,timeExtent:(0,u.o8)(n),where:e,units:o,distance:a})}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),(0,n.Cg)([(0,s.MZ)({types:c.yR,json:{write:!0}})],m.prototype,"geometry",void 0),(0,n.Cg)([(0,s.MZ)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],m.prototype,"spatialRelationship",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],m.prototype,"distance",void 0),(0,n.Cg)([(0,s.MZ)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n.Cg)([(0,s.MZ)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],m.prototype,"units",void 0),(0,n.Cg)([(0,s.MZ)({type:h.A,json:{write:!0}})],m.prototype,"timeExtent",void 0),m=i=(0,n.Cg)([(0,s.$K)("esri.layers.support.FeatureFilter")],m);const w=m;var b;const v={read:{reader:d.LF},write:{writer:d.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},_={read:{reader:d.LF},write:{writer:d.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let M=b=class extends a.o{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new o.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new o.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new b({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n.Cg)([(0,s.MZ)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,l.sM)(r,n,t):(0,l.sM)(r,null,t)}}}})],M.prototype,"filter",void 0),(0,n.Cg)([(0,s.MZ)({json:{read:d.LF,write:{writer:d.M9,allowNull:!0},origins:{"web-map":v,"portal-item":v}}})],M.prototype,"includedEffect",void 0),(0,n.Cg)([(0,s.MZ)({json:{read:d.LF,write:{writer:d.M9,allowNull:!0},origins:{"web-map":_,"portal-item":_}}})],M.prototype,"excludedEffect",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],M.prototype,"excludedLabelsVisible",void 0),M=b=(0,n.Cg)([(0,s.$K)("esri.layers.support.FeatureEffect")],M);const Z={write:{allowNull:!0}},F={type:M,json:{origins:{"web-map":Z,"portal-item":Z}}},x=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.featureEffect=null}};return(0,n.Cg)([(0,s.MZ)(F)],r.prototype,"featureEffect",void 0),r=(0,n.Cg)([(0,s.$K)("esri.layers.mixins.FeatureEffectLayer")],r),r}},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(31635),s=r(66552),o=r(25482),a=r(91429);const l=new s.J({asc:"ascending",desc:"descending"});let d=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],d.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],d.prototype,"order",void 0),d=i=(0,n.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],d)},96520:(e,t,r)=>{r.d(t,{u:()=>o});var i=r(86211),n=r(21325);function s(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);a(e,r,n),a(t,r,n)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const o=(0,i.G9)(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)s(e,e.rings,o);else if("paths"in e)s(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9911],{159:(e,t,r)=>{r.d(t,{A:()=>a});var n,i=r(31635),o=r(69622),s=r(91429),l=r(99157);let a=n=class extends o.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,i.Cg)([(0,s.MZ)({type:[l.A],nonNullable:!0})],a.prototype,"steps",void 0),a=n=(0,i.Cg)([(0,s.$K)("esri.geometry.operators.support.GeographicTransformation")],a)},1626:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(31635),o=r(4718),s=r(91429),l=r(2485),a=r(72606),u=r(43937),c=r(36005);let f=n=class extends a.A{constructor(e){super(e),this.colorRamps=null,this.type="multipart",this.weights=void 0}writeColorRamps(e,t,r,n){const i=e?.map(e=>e.toJSON(n)),{weights:o}=this;if(i&&o?.length&&i.length===o?.length){const e=100/o.reduce((e,t)=>e+t);let t=0;i.forEach((r,n)=>{r.start=t,t+=o[n]*e,r.stop=t})}t.colorRamps=i}readWeights(e,t){const r=t.colorRamps?.map(({start:e,stop:t})=>null==e||null==t?-1:t-e);if(!r?.some(e=>e<0))return r}clone(){return new n({colorRamps:(0,o.o8)(this.colorRamps)})}};(0,i.Cg)([(0,s.MZ)({type:[l.A],json:{write:{isRequired:!0}}})],f.prototype,"colorRamps",void 0),(0,i.Cg)([(0,u.K)("colorRamps")],f.prototype,"writeColorRamps",null),(0,i.Cg)([(0,s.MZ)({type:["multipart"],json:{write:{isRequired:!0}}})],f.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({type:[Number]})],f.prototype,"weights",void 0),(0,i.Cg)([(0,c.w)("weights",["colorRamps"])],f.prototype,"readWeights",null),f=n=(0,i.Cg)([(0,s.$K)("esri.rest.support.MultipartColorRamp")],f)},2485:(e,t,r)=>{r.d(t,{A:()=>f});var n,i=r(31635),o=r(68197),s=r(4718),l=r(91429),a=r(56507),u=r(72606),c=r(93223);let f=n=class extends u.A{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new n({fromColor:(0,s.o8)(this.fromColor),toColor:(0,s.o8)(this.toColor),algorithm:this.algorithm})}};(0,i.Cg)([(0,c.e)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],f.prototype,"algorithm",void 0),(0,i.Cg)([(0,l.MZ)({type:o.A,json:{type:[a.jz],write:{isRequired:!0}}})],f.prototype,"fromColor",void 0),(0,i.Cg)([(0,l.MZ)({type:o.A,json:{type:[a.jz],write:{isRequired:!0}}})],f.prototype,"toColor",void 0),(0,i.Cg)([(0,l.MZ)({type:["algorithmic"],json:{write:{isRequired:!0}}})],f.prototype,"type",void 0),f=n=(0,i.Cg)([(0,l.$K)("esri.rest.support.AlgorithmicColorRamp")],f)},5561:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var n=r(5443),i=r(86738),o=r(159),s=r(14140),l=r(77649),a=(r(44208),r(16019)),u=r(28435);var c,f=r(6049),p=r(70834),d=r(6952),h=r(14636),m=r(73037),y=r(31635),g=r(91429),v=r(82434),w=r(93223);let x=c=class extends v.A{constructor(){super(...arguments),this.type="identity"}clone(){return new c}};(0,y.Cg)([(0,w.e)({IdentityXform:"identity"})],x.prototype,"type",void 0),x=c=(0,y.Cg)([(0,g.$K)("esri.layers.support.rasterTransforms.IdentityTransform")],x);var b=r(21312);const M={GCSShiftXform:m.A,IdentityXform:x,PolynomialXform:b.A};function C(e){const t=e?.type;if(!t)return null;const r=M[e?.type];if(r){const t=new r;return t.read(e),t}return null}var S=r(85676),A=r(4095);function k(e){if(!e)return{result:null,transferList:[]};const{pixelBlock:t,transferList:r}=e.getTransferableObject();return{result:t,transferList:r}}class O{convertVectorFieldData(e){const t=s.A.fromJSON(e.pixelBlock),r=k((0,h.FI)(t,e.type));return Promise.resolve(r)}convertPixelBlockToFeatures(e){const t=(0,u.L)({pixelBlock:s.A.fromJSON(e.pixelBlock),extent:n.A.fromJSON(e.extent),fieldNames:e.fieldNames,skipFactor:e.skipFactor,skipSpatialReference:!0,pixelIdOffset:e.pixelIdOffset,imageRowSize:e.imageRowSize});return Promise.resolve(t)}transformPixels(e){const t=function(e,t,r){const{width:n,height:i,pixels:o}=e;let l=[];l=e.bandMasks?e.bandMasks.map(e=>new Uint8Array(e)):o.map(()=>e.mask?new Uint8Array(e.mask):new Uint8Array(n*i).fill(255));const c="f32",f=o.map((e,n)=>{switch(t){case"log":return function(e,t,r){const n=e.length,i=s.A.createEmptyBand(r,n);for(let r=0;r<n;r++)if(t[r]){const n=e[r];n<=0?t[r]=0:i[r]=Math.log(n)}return i}(e,l[n],c);case"sqrt":return function(e,t,r){const n=e.length,i=s.A.createEmptyBand(r,n);for(let r=0;r<n;r++)if(t[r]){const n=e[r];n<0?t[r]=0:i[r]=Math.sqrt(n)}return i}(e,l[n],c);case"inverse":return function(e,t,r){const n=e.length,i=s.A.createEmptyBand(r,n),[o,l]=(0,a.hP)(r);for(let r=0;r<n;r++)if(!t||t[r]){const t=1/e[r];i[r]=i[r]=Math.max(o,Math.min(t,l))}return i}(e,l[n],c);case"box-cox":return function(e,t,r,n){const i=e.length,o=s.A.createEmptyBand(r,i),[l,u]=(0,a.hP)(r),c=n?.lambda??0,f=n?.shift??0,p=0===c;for(let r=0;r<i;r++)if(t[r]){const n=e[r];if(n<=0)t[r]=0;else if(p)o[r]=Math.log(n+f);else{const e=((n+f)**c-1)/c;o[r]=Math.max(l,Math.min(e,u))}}return o}(e,l[n],c,r);default:return e}}),p="inverse"===t,d=p?e.mask:1===l.length?l[0]:(0,u.YD)(l),h=p?e.bandMasks:1===l.length?void 0:l;return new s.A({width:n,height:i,pixelType:c,bandMasks:h,mask:d,pixels:f})}(s.A.fromJSON(e.pixelBlock),e.transformType,e.transformParameters);return Promise.resolve(k(t))}computeStatisticsHistograms(e){const t=s.A.fromJSON(e.pixelBlock),r=(0,d.eH)(t,{histogramSize:e.histogramSize,includeSkewnessKurtosis:e.includeSkewnessKurtosis});return Promise.resolve(r)}compositeBands(e){const t=e.pixelBlocks.map(e=>e&&s.A.fromJSON(e)),r=k((0,u.Wy)(t));return Promise.resolve(r)}async decode(e){return k(await(0,l.D)(e.data,e.options))}symbolize(e){const t=e.pixelBlock?s.A.fromJSON(e.pixelBlock):null,r=e.extent?n.A.fromJSON(e.extent):null,i=k(this.symbolizer.symbolize({...e,pixelBlock:t,extent:r}));return Promise.resolve(i)}highlightPixels(e){const t=s.A.fromJSON(e.pixelBlock),r=s.A.fromJSON(e.renderedPixelBlock);return(0,u._F)({pixelBlock:t,renderedPixelBlock:r,highlightOptions:e.highlightOptions}),Promise.resolve(r.toJSON())}async updateSymbolizer(e){this.symbolizer=S.A.fromJSON(e.symbolizerJSON),e.histograms&&"rasterStretch"===this.symbolizer?.rendererJSON.type&&(this.symbolizer.rendererJSON.histograms=e.histograms)}async updateRasterFunction(e){this.rasterFunction=(0,f.vt)(e.rasterFunctionJSON)}async process(e){return k(this.rasterFunction.process({extent:n.A.fromJSON(e.extent),primaryPixelBlocks:e.primaryPixelBlocks.map(e=>null!=e?s.A.fromJSON(e):null),primaryPixelSizes:e.primaryPixelSizes?.map(e=>null!=e?i.A.fromJSON(e):null),primaryRasterIds:e.primaryRasterIds}))}stretch(e){const t=k(this.symbolizer.simpleStretch(s.A.fromJSON(e.srcPixelBlock),e.stretchParams));return Promise.resolve(t)}estimateStatisticsHistograms(e){const t=(0,d.f4)(s.A.fromJSON(e.srcPixelBlock));return Promise.resolve(t)}split(e){const t=(0,u.lD)(s.A.fromJSON(e.srcPixelBlock),e.tileSize,e.maximumPyramidLevel??0,!1===e.useBilinear),r=[];let n;return t&&(n=new Map,t.forEach((e,t)=>{if(e){const{pixelBlock:i,transferList:o}=e.getTransferableObject();n.set(t,i),o.forEach(e=>{r.includes(e)||r.push(e)})}})),Promise.resolve({result:n,transferList:r})}clipTile(e){const t=s.A.fromJSON(e.pixelBlock),r=k((0,u.J$)({...e,pixelBlock:t}));return Promise.resolve(r)}async mosaicAndTransform(e){const t=e.srcPixelBlocks.map(e=>e?new s.A(e):null),r=(0,u.z7)(t,e.srcMosaicSize,{blockWidths:e.blockWidths,alignmentInfo:e.alignmentInfo,clipOffset:e.clipOffset,clipSize:e.clipSize});let n,i=r;e.coefs&&(i=(0,u.$i)(r,e.destDimension,e.coefs,e.sampleSpacing,e.interpolation)),e.projectDirections&&e.gcsGrid&&(n=(0,u.QF)(e.destDimension,e.gcsGrid),i=(0,h.Y2)(i,e.isUV?"vector-uv":"vector-magdir",n));const{result:o,transferList:l}=k(i);return{result:{pixelBlock:o,localNorthDirections:n},transferList:l}}async createFlowMesh(e,t){const r={data:new Float32Array(e.flowData.buffer),mask:new Uint8Array(e.flowData.maskBuffer),width:e.flowData.width,height:e.flowData.height},{vertexData:n,indexData:i}=await(0,A.CW)(e.meshType,e.simulationSettings,r,t.signal);return{result:{vertexBuffer:n.buffer,indexBuffer:i.buffer},transferList:[n.buffer,i.buffer]}}async getProjectionOffsetGrid(e){const t=n.A.fromJSON(e.projectedExtent),r=n.A.fromJSON(e.srcBufferExtent);let i=null;e.datumTransformationSteps?.length&&(i=new o.A({steps:e.datumTransformationSteps})),await(0,p.Hh)();const s=e.rasterTransform?C(e.rasterTransform):null;return(0,p.l0)({...e,projectedExtent:t,srcBufferExtent:r,datumTransformation:i,rasterTransform:s})}}},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(37539);function i(e,t,r,i,o,s,l=Math.floor(e.length/3)){const a=(0,n.jd)(t,o);if(null==a)return!1;if(a===n.pO){if(e===i&&r===s)return!0;const t=r+3*l;for(let n=r,o=s;n<t;n++,o++)i[o]=e[n]??0;return!0}const u=r+3*l;for(let t=r,n=s;t<u;t+=3,n+=3)a(e,t,i,n);return!0}},20437:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(31635),o=r(66552),s=r(25482),l=r(91429),a=r(56507),u=r(80451),c=r(98453),f=r(36005),p=r(93223);const d=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=class extends s.o{static{n=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 r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?d.fromJSON(r.fieldValueType):null}clone(){return new n({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,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,i.Cg)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,i.Cg)([(0,l.MZ)()],h.prototype,"description",void 0),(0,i.Cg)([(0,f.w)("description")],h.prototype,"readDescription",null),(0,i.Cg)([(0,l.MZ)({types:u.gK,json:{read:{reader:u.rS},write:!0}})],h.prototype,"domain",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,i.Cg)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,i.Cg)([(0,p.e)(c.m)],h.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)()],h.prototype,"valueType",void 0),(0,i.Cg)([(0,f.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=n=(0,i.Cg)([(0,l.$K)("esri.layers.support.Field")],h)},21312:(e,t,r)=>{r.d(t,{A:()=>h});var n,i=r(31635),o=r(91429),s=r(5443),l=r(86738),a=r(82434),u=r(36005),c=r(43937),f=r(93223);function p(e,t,r){const{x:n,y:i}=t;if(r<2)return{x:e[0]+n*e[2]+i*e[4],y:e[1]+n*e[3]+i*e[5]};if(2===r){const t=n*n,r=i*i,o=n*i;return{x:e[0]+n*e[2]+i*e[4]+t*e[6]+o*e[8]+r*e[10],y:e[1]+n*e[3]+i*e[5]+t*e[7]+o*e[9]+r*e[11]}}const o=n*n,s=i*i,l=n*i,a=o*n,u=o*i,c=n*s,f=i*s;return{x:e[0]+n*e[2]+i*e[4]+o*e[6]+l*e[8]+s*e[10]+a*e[12]+u*e[14]+c*e[16]+f*e[18],y:e[1]+n*e[3]+i*e[5]+o*e[7]+l*e[9]+s*e[11]+a*e[13]+u*e[15]+c*e[17]+f*e[19]}}function d(e,t,r){const{xmin:n,ymin:i,xmax:o,ymax:l,spatialReference:a}=t;let u=[];if(r<2)u.push({x:n,y:l}),u.push({x:o,y:l}),u.push({x:n,y:i}),u.push({x:o,y:i});else{let e=10;for(let t=0;t<e;t++)u.push({x:n,y:i+(l-i)*t/(e-1)}),u.push({x:o,y:i+(l-i)*t/(e-1)});e=8;for(let t=1;t<=e;t++)u.push({x:n+(o-n)*t/e,y:i}),u.push({x:n+(o-n)*t/e,y:l})}u=u.map(t=>p(e,t,r));const c=u.map(e=>e.x),f=u.map(e=>e.y);return new s.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:a})}let h=n=class extends a.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:r,coeffY:n}=t;if(!r?.length||!n?.length||r.length!==n.length)return null;const i=[];for(let e=0;e<r.length;e++)i.push(r[e]),i.push(n[e]);return i}writeForwardCoefficients(e,t,r){const n=[],i=[];for(let t=0;t<e?.length;t++)t%2==0?n.push(e[t]):i.push(e[t]);t.coeffX=n,t.coeffY=i}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,r,n,i,o,s]=e,l=n*s-o*i,a=o*i-n*s;return[(o*r-t*s)/l,(n*r-t*i)/a,s/l,i/a,-o/l,-n/a]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:r,inverseCoeffY:n}=t;if(!r?.length||!n?.length||r.length!==n.length)return null;const i=[];for(let e=0;e<r.length;e++)i.push(r[e]),i.push(n[e]);return i}writeInverseCoefficients(e,t,r){const n=[],i=[];for(let t=0;t<e?.length;t++)t%2==0?n.push(e[t]):i.push(e[t]);t.inverseCoeffX=n,t.inverseCoeffY=i}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new n({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],h.prototype,"polynomialOrder",void 0),(0,i.Cg)([(0,o.MZ)()],h.prototype,"forwardCoefficients",void 0),(0,i.Cg)([(0,u.w)("forwardCoefficients",["coeffX","coeffY"])],h.prototype,"readForwardCoefficients",null),(0,i.Cg)([(0,c.K)("forwardCoefficients")],h.prototype,"writeForwardCoefficients",null),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],h.prototype,"inverseCoefficients",null),(0,i.Cg)([(0,u.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],h.prototype,"readInverseCoefficients",null),(0,i.Cg)([(0,c.K)("inverseCoefficients")],h.prototype,"writeInverseCoefficients",null),(0,i.Cg)([(0,o.MZ)()],h.prototype,"affectsPixelSize",null),(0,i.Cg)([(0,f.e)({PolynomialXform:"polynomial"})],h.prototype,"type",void 0),h=n=(0,i.Cg)([(0,o.$K)("esri.layers.support.rasterTransforms.PolynomialTransform")],h)},31635:(e,t,r)=>{function n(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function i(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}r.d(t,{Cg:()=>n,hk:()=>s,mS:()=>i}),Object.create,Object.create;var o="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function s(e){function t(t){e.error=e.hasError?new o(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,function(e){return t(e),i()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},37539:(e,t,r)=>{r.d(t,{pO:()=>m,jd:()=>p,Tp:()=>d,w5:()=>f});var n=r(34727),i=r(86211),o=r(73941),s=r(79258);Math.PI;const l=s.$O.radius,a=s.$O.eccentricitySquared,u={a1:l*a,a2:l*a*l*a,a3:l*a*a/2,a4:l*a*l*a*2.5,a5:l*a+l*a*a/2,a6:1-a};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius;var c=r(21325);const f={2:{5:m,7:null,9:null,10:m,1:C,6:null,8:null,0:null,3:g,11:v,2:m,4:R},5:{5:m,7:null,9:null,10:m,1:C,6:null,8:null,0:null,3:g,11:v,2:m,4:R},7:{5:null,7:m,9:null,10:m,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,r,n){const i=e[t]/z,o=I-2*Math.atan(Math.exp(-e[t+1]/z)),s=z+(e[t+2]??0),l=Math.cos(o)*s;r[n]=Math.cos(i)*l,r[n+1]=Math.sin(i)*l,r[n+2]=Math.sin(o)*s},6:null,8:null,0:null,3:m,11:function(e,t,r,n){y(e,t,r,n),v(r,n,r,n)},2:y,4:function(e,t,r,n){y(e,t,r,n),R(r,n,r,n)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,r,n){T(e,t,r,n),C(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){T(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){T(e,t,r,n),v(r,n,r,n)},2:T,4:m},1:{5:O,7:null,9:null,10:O,1:m,6:null,8:null,0:null,3:function(e,t,r,n){O(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){O(e,t,r,n),v(r,n,r,n)},2:O,4:function(e,t,r,n){O(e,t,r,n),R(r,n,r,n)}},6:{5:null,7:k,9:null,10:k,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:C,6:M,8:b,0:null,3:g,11:v,2:m,4:R},11:{5:w,7:null,9:null,10:w,1:function(e,t,r,n){w(e,t,r,n),C(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){w(e,t,r,n),g(r,n,r,n)},11:m,2:w,4:function(e,t,r,n){w(e,t,r,n),R(r,n,r,n)}}};function p(e,t){return d(e,t)?.projector}function d(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const r=h(e,P.source),n=h(t,P.dest);return 0===r&&0===n?(0,c.aI)(e,t)?P.projector=m:P.projector=null:P.projector=f[r][n],P}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===o.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===o.FY.wkt?t.spatialReferenceId=6:e.wkt===o.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t]??0)}function y(e,t,r,n){r[n]=j*(e[t]/z),r[n+1]=j*(I-2*Math.atan(Math.exp(-e[t+1]/z))),r[n+2]=e[t+2]??0}function g(e,t,r,i){!function(e,t,r,i,o){const s=.4999999*Math.PI,l=(0,n.qE)(N*e[t+1],-s,s),a=Math.sin(l);r[i++]=N*e[t]*o.radius,r[i++]=o.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[i]=e[t+2]??0}(e,t,r,i,s.$O)}function v(e,t,r,n){r[n]=e[t]*Z,r[n+1]=e[t+1]*Z,r[n+2]=e[t+2]??0}function w(e,t,r,n){r[n]=e[t]*q,r[n+1]=e[t+1]*q,r[n+2]=e[t+2]??0}function x(e,t,r,n,i){const o=i+(e[t+2]??0),s=N*e[t],l=N*e[t+1],a=Math.cos(l)*o;r[n]=Math.cos(s)*a,r[n+1]=Math.sin(s)*a,r[n+2]=Math.sin(l)*o}function b(e,t,r,n){x(e,t,r,n,s.Sw.radius)}function M(e,t,r,n){x(e,t,r,n,s.sH.radius)}function C(e,t,r,n){x(e,t,r,n,s.$O.radius)}function S(e,t,r,i,o){const s=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(s*s+l*l+a*a),c=(0,n.YN)(a/(0===u?1:u)),f=Math.atan2(l,s);r[i++]=j*f,r[i++]=j*c,r[i]=u-o}function A(e,t,r,n){S(e,t,r,n,s.Sw.radius)}function k(e,t,r,n){S(e,t,r,n,s.sH.radius)}function O(e,t,r,n){S(e,t,r,n,s.$O.radius)}function R(e,t,r,n){!function(e,t,r,n,i){const o=N*e[t],s=N*e[t+1],l=e[t+2]??0,a=Math.sin(s),u=Math.cos(s),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);r[n++]=(c+l)*u*Math.cos(o),r[n++]=(c+l)*u*Math.sin(o),r[n++]=(c*(1-i.eccentricitySquared)+l)*a}(e,t,r,n,s.$O)}function T(e,t,r,n){const i=u,o=e[t],l=e[t+1],a=e[t+2]??0;let c,f,p,d,h,m,y,g,v,w,x,b,M,C,S,A,k,O,R,T,P;c=Math.abs(a),f=o*o+l*l,p=Math.sqrt(f),d=f+a*a,h=Math.sqrt(d),T=Math.atan2(l,o),m=a*a/d,y=f/d,C=i.a2/h,S=i.a3-i.a4/h,y>.3?(g=c/h*(1+y*(i.a1+C+m*S)/h),R=Math.asin(g),w=g*g,v=Math.sqrt(1-w)):(v=p/h*(1-m*(i.a5-C-y*S)/h),R=Math.acos(v),w=1-v*v,g=Math.sqrt(w)),x=1-s.$O.eccentricitySquared*w,b=s.$O.radius/Math.sqrt(x),M=i.a6*b,C=p-b*v,S=c-M*g,k=v*C+g*S,A=v*S-g*C,O=A/(M/x+k),R+=O,P=k+A*O/2,a<0&&(R=-R),r[n++]=j*T,r[n++]=j*R,r[n]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},N=(0,n.kU)(1),j=(0,n.KJ)(1),I=.5*Math.PI,z=s.$O.radius,Z=z*Math.PI/180,q=180/(z*Math.PI)},39357:(e,t,r)=>{r.d(t,{H:()=>l});var n,i=r(31635),o=r(25482),s=r(91429);let l=n=class extends o.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],l.prototype,"code",void 0),l=n=(0,i.Cg)([(0,s.$K)("esri.layers.support.CodedValue")],l)},40876:(e,t,r)=>{r.d(t,{Eq:()=>d,G1:()=>m,TS:()=>o,Tf:()=>v,V6:()=>i,Vm:()=>h,ay:()=>a,c1:()=>y,c4:()=>s,j5:()=>u,lT:()=>f,oW:()=>c,xV:()=>x});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(e){return!!n[e]||!!n[e.toLowerCase()]}function o(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...o(e)]}function l(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function a(e,t,r,n=1){const i=(e%360+360)%360/360,o=r<=.5?r*(t+1):r+t-r*t,s=2*r-o;return[Math.round(255*l(s,o,i+1/3)),Math.round(255*l(s,o,i)),Math.round(255*l(s,o,i-1/3)),n]}function u(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,i=t?1:17,o=t?9===e.length:5===e.length;let s=Number("0x"+e.slice(1));if(isNaN(s))return null;const l=[0,0,0,1];let a;return o&&(a=s&n,s>>=r,l[3]=i*a/255),a=s&n,s>>=r,l[2]=i*a,a=s&n,s>>=r,l[1]=i*a,a=s&n,s>>=r,l[0]=i*a,l}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),n=parseInt(e.slice(3,4),16),i=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,r+16*r,n+16*n,(i+16*i)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function f(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),r=t[1];if("rgb"===r&&3===e.length||"rgba"===r&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),p(t)}return p(e.map(e=>parseFloat(e)))}if("hsl"===r&&3===e.length||"hsla"===r&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function p(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?m(e[3]):1,e}function d(e){let t=i(e)?o(e):null;return t??=f(e),t??=c(e),t}function h(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function m(e){return g(e,0,1)}function y(e){return Math.round(g(e,0,255))}function g(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}const v=2.2,w=1/v;function x(e){return e**w}},51850:(e,t,r)=>{function n(){return[0,0,0]}function i(e){return[e[0],e[1],e[2]]}function o(e,t,r){return[e,t,r]}function s(e,t,r){return[e,t,r]}function l(e,t=[0,0,0]){const r=Math.min(3,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t}function a(){return o(1,1,1)}function u(){return o(1,0,0)}function c(){return o(0,1,0)}function f(){return o(0,0,1)}r.d(t,{CN:()=>s,Cb:()=>y,Cw:()=>h,JP:()=>m,Un:()=>d,ci:()=>l,fA:()=>o,o8:()=>i,uY:()=>p,vt:()=>n});const p=[0,0,0],d=a(),h=u(),m=c(),y=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:h,UNIT_Y:m,UNIT_Z:y,ZEROS:p,clone:i,create:n,freeze:s,fromArray:l,fromValues:o,ones:a,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},53177:(e,t,r)=>{r.d(t,{A:()=>c});var n,i=r(31635),o=r(4718),s=r(91429),l=r(39357),a=r(76357),u=r(93223);let c=class extends a.A{static{n=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some(e=>(String(e.code)===r&&(t=e.name),!!t))}return t}clone(){return new n({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,s.MZ)({type:[l.H],json:{write:{isRequired:!0}}})],c.prototype,"codedValues",void 0),(0,i.Cg)([(0,u.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=n=(0,i.Cg)([(0,s.$K)("esri.layers.support.CodedValueDomain")],c)},62815:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(86211),i=r(73941),o=r(21325);function s(e,t,r){if(null==t||null==r||r.vcsWkid||(0,o.aI)(t,r)||(0,i.xP)(t)||(0,i.xP)(r))return null;const s=(0,n.G9)(t)/(0,n.G9)(r);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,s);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},65864:(e,t,r)=>{r.d(t,{$B:()=>m,Bi:()=>d,Pv:()=>v,Rg:()=>p,U9:()=>c,W0:()=>w,ZC:()=>u,fT:()=>f,rS:()=>h,xD:()=>g});var n=r(5443),i=r(91075),o=r(48526),s=r(86738),l=r(39829),a=r(82799);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function f(e){return void 0!==e.x&&void 0!==e.y}function p(e){return void 0!==e.paths||void 0!==e.curvePaths}function d(e){return void 0!==e.rings||void 0!==e.curveRings}function h(e){return null==e?null:e instanceof i.A?e:f(e)?s.A.fromJSON(e):p(e)?a.A.fromJSON(e):d(e)?l.A.fromJSON(e):c(e)?o.A.fromJSON(e):u(e)?n.A.fromJSON(e):null}function m(e){return e?f(e)?"esriGeometryPoint":p(e)?"esriGeometryPolyline":d(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const y={esriGeometryPoint:s.A,esriGeometryPolyline:a.A,esriGeometryPolygon:l.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:o.A,esriGeometryMultiPatch:l.A};function g(e){return e&&y[e]||null}function v(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function w(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}},68197:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(40876),i=r(34727),o=r(56507);function s(e){return(0,i.qE)((0,o.Vr)(e),0,255)}function l(e,t){const r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}class a{static blendColors(e,t,r,n=new a){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=(0,n.lT)(e);return r?a.fromArray(r,t):null}static fromHex(e,t=new a){const r=(0,n.oW)(e);return r?a.fromArray(r,t):null}static fromArray(e,t=new a){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,n.Eq)(e);return r?a.fromArray(r,t):null}static fromJSON(e){return null!=e?new a([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e,t){return null==e?null:(t??=[0,0,0,0],t[0]=e.r/255,t[1]=e.g/255,t[2]=e.b/255,t[3]=null!=e.a?e.a:1,t)}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){if("string"==typeof e)a.fromString(e,this);else if(Array.isArray(e))a.fromArray(e,this);else{const t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof a||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,n=3===r||4===r,i=4===r||8===r,o=`#${l(this.r,n)}${l(this.g,n)}${l(this.b,n)}${i?l(Math.round(255*this.a),n):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=s(this.r),r=s(this.g),n=s(this.b);return 0===e||1!==this.a?[t,r,n,s(255*this.a)]:[t,r,n]}clone(){return new a(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,n.c1)(this.r),this.g=(0,n.c1)(this.g),this.b=(0,n.c1)(this.b),this.a=(0,n.G1)(this.a),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}a.prototype.declaredClass="esri.Color"},72606:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(31635),i=r(25482),o=r(91429);let s=class extends i.o{constructor(e){super(e),this.type=null}};(0,n.Cg)([(0,o.MZ)({readOnly:!0,json:{read:!1,write:!0}})],s.prototype,"type",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.support.ColorRamp")],s)},73037:(e,t,r)=>{r.d(t,{A:()=>a});var n,i=r(31635),o=r(91429),s=r(82434),l=r(93223);let a=n=class extends s.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new n({tolerance:this.tolerance})}};(0,i.Cg)([(0,l.e)({GCSShiftXform:"gcs-shift"})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"tolerance",void 0),a=n=(0,i.Cg)([(0,o.$K)("esri.layers.support.rasterTransforms.GCSShiftTransform")],a)},76357:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(31635),i=r(66552),o=r(25482),s=r(91429),l=r(93223);const a=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends o.o{constructor(e){super(e),this.name=null,this.type=null}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n.Cg)([(0,l.e)(a),(0,s.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,n.Cg)([(0,s.$K)("esri.layers.support.Domain")],u)},80451:(e,t,r)=>{r.d(t,{rS:()=>d,gK:()=>p}),r(44208);var n,i=r(53177),o=r(76357),s=r(31635),l=r(91429),a=r(93223);let u=class extends o.A{static{n=this}constructor(e){super(e),this.type="inherited"}clone(){return new n}};var c;(0,s.Cg)([(0,a.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=n=(0,s.Cg)([(0,l.$K)("esri.layers.support.InheritedDomain")],u);let f=class extends o.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,s.Cg)([(0,l.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,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],f.prototype,"maxValue",void 0),(0,s.Cg)([(0,l.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],f.prototype,"minValue",void 0),(0,s.Cg)([(0,a.e)({range:"range"})],f.prototype,"type",void 0),f=c=(0,s.Cg)([(0,l.$K)("esri.layers.support.RangeDomain")],f);const p={key:"type",base:o.A,typeMap:{range:f,"coded-value":i.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return f.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},82434:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(31635),i=r(25482),o=r(91429);let s=class extends i.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,n.Cg)([(0,o.MZ)()],s.prototype,"affectsPixelSize",null),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],s.prototype,"spatialReference",void 0),s=(0,n.Cg)([(0,o.$K)("esri.layers.support.rasterTransforms.BaseRasterTransform")],s)},87317:(e,t,r)=>{r.d(t,{a:()=>w,b:()=>h,c:()=>c,d:()=>i,e:()=>x,f:()=>p,g:()=>y,h:()=>s,i:()=>d,l:()=>g,n:()=>m,s:()=>o,t:()=>v});var n=r(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function o(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}function s(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function l(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function a(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function c(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+o*o)}function p(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return r*r+n*n+i*i+o*o}function d(e){const t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}function h(e){const t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}function m(e,t){const r=t[0],n=t[1],i=t[2],o=t[3];let s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),e[0]=r*s,e[1]=n*s,e[2]=i*s,e[3]=o*s),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function g(e,t,r,n){const i=t[0],o=t[1],s=t[2],l=t[3];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=s+n*(r[2]-s),e[3]=l+n*(r[3]-l),e}function v(e,t,r){const n=t[0],i=t[1],o=t[2],s=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function x(e,t){const r=e[0],i=e[1],o=e[2],s=e[3],l=t[0],a=t[1],u=t[2],c=t[3],f=(0,n.FD)();return Math.abs(r-l)<=f*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(i-a)<=f*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(o-u)<=f*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(s-c)<=f*Math.max(1,Math.abs(s),Math.abs(c))}const b=l,M=a,C=u,S=f,A=p,k=d,O=h;Object.freeze(Object.defineProperty({__proto__:null,add:s,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:i,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:S,distance:f,div:C,divide:u,dot:y,equals:x,exactEquals:w,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:k,length:d,lerp:g,max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},mul:M,multiply:a,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:m,random:function(e,t=1){const r=n.Ov;let i,o,s,l,a,u;do{i=2*r()-1,o=2*r()-1,a=i*i+o*o}while(a>=1);do{s=2*r()-1,l=2*r()-1,u=s*s+l*l}while(u>=1);const c=Math.sqrt((1-a)/u);return e[0]=t*i,e[1]=t*o,e[2]=t*s*c,e[3]=t*l*c,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[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},set:o,sqrDist:A,sqrLen:O,squaredDistance:p,squaredLength:h,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:l,transformMat4:v,transformQuat:function(e,t,r){const n=t[0],i=t[1],o=t[2],s=r[0],l=r[1],a=r[2],u=r[3],c=u*n+l*o-a*i,f=u*i+a*n-s*o,p=u*o+s*i-l*n,d=-s*n-l*i-a*o;return e[0]=c*u+d*-s+f*-a-p*-l,e[1]=f*u+d*-l+p*-s-c*-a,e[2]=p*u+d*-a+c*-l-f*-s,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},91218:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>D,initializeProjection:()=>_,isEqualBaseGCS:()=>L,isLoaded:()=>P,isLoadedOrLoad:()=>N,isLoadedOrLoadFor:()=>j,load:()=>z,project:()=>Z,projectExtent:()=>re,projectMany:()=>q,projectMultipoint:()=>X,projectOrLoad:()=>B,projectOrLoadMany:()=>J,projectPoint:()=>U,projectPolygon:()=>ee,projectPolyline:()=>H,projectWithZConversion:()=>$,projectWithoutEngine:()=>K,requiresLoad:()=>I,test:()=>V,tryProjectWithZConversion:()=>G,unload:()=>E});var n=r(49186),i=r(74887),o=r(62788),s=r(95488),l=r(51850),a=r(21276),u=r(73941),c=r(5443),f=r(91075),p=r(48526),d=r(86738),h=r(39829),m=r(82799),y=r(16930),g=r(159),v=r(9762),w=r(37539);function x(e,t,r,n,i,o){return b[0]=e,b[1]=t,b[2]=r,(0,v.projectBuffer)(b,n,0,i,o,0)}const b=(0,l.vt)();var M=r(21325),C=r(62815);let S=null,A=null,k=null,O=null,R={};const T=new s.I;function P(){return!!(A?.isLoaded()&&k?.isLoaded()&&O?.isLoaded())}function N(){return!!P()||((0,o.gc)(T),z(),!1)}function j(e,t){return!e||!t||D(e,t)||N()}function I(e,t){return!D(e,t)&&!P()}async function z(e){null==S&&(S=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(A=e,A.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(k=e,k.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(O=e,O.load()))])),await S,(0,i.Te)(e),T.notify()}function Z(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),q(e,e[0].spatialReference,t,r)):((0,a.f)(e),q([e],e.spatialReference,t,r)[0])}function q(e,t,r,n){if(null==t||null==r)return e;if(D(t,r,n))return e.map(e=>K(e,t,r));if(null==n?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>K(e,t,y.A.WGS84)).map(e=>G(e,r));if(null==n?.geographicTransformation&&(0,u.jA)(r))return e.map(e=>G(e,y.A.WGS84)).map(e=>K(e,y.A.WGS84,r));if(!P())throw new F;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:O.getTransformation(t,r,n.areaOfInterestExtent)||new g.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let i=R[e];i||(i=O.getTransformation(t,r)||new g.A,R[e]=i),n={geographicTransformation:i}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof f.A?A.executeMany(e,r,n):k.executeMany(e,r,n)}function B(e,t){const r=J([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function J(e,t){if(!P())for(const r of e)if(null!=r&&!(0,M.aI)(r.spatialReference,t)&&(0,M.fn)(r.spatialReference)&&(0,M.fn)(t)&&!D(r.spatialReference,t))return(0,o.gc)(T),{pending:z(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,M.aI)(e.spatialReference,t)?e:(0,M.fn)(e.spatialReference)&&(0,M.fn)(t)?G(e,t):null)}}class F extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function E(){S=null,A=null,k=null,O=null,R={}}const V={get loadPromise(){return S}};function G(e,t){try{const r=Z(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const n=(0,C.N)(r.type,e.spatialReference,t);return null!=n&&n(r),r}catch(e){if(!(e instanceof F))throw e;return null}}async function $(e,t,r){const n=e.spatialReference;return null!=n&&null!=t&&await _(n,t,null,r),G(e,t)}function D(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,M.aI)(e,t)||(0,M.fn)(e)&&(0,M.fn)(t)&&!!(0,w.jd)(e,t))}function L(e,t){if((0,M.aI)(e,t))return!0;if(!(0,M.fn)(e)||!(0,M.fn)(t))return!1;const r=(0,M.oT)(e)||(0,M.K8)(e)||(0,M.x1)(e),n=(0,M.oT)(t)||(0,M.K8)(t)||(0,M.x1)(t);return r&&n}async function _(e,t,r,n){if(P())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,options:i}of e)if(t&&r&&!D(t,r,i))return z(n)}else if(e&&t&&!D(e,t,r))return z(n);return(0,i.NO)(n)}function K(e,t,r){return e?"x"in e?W(e,t,new d.A,r,0):"xmin"in e?ne(e,t,new c.A,r,0):"rings"in e?te(e,t,new h.A,r,0):"paths"in e?Q(e,t,new m.A,r,0):"points"in e?Y(e,t,new p.A,r,0):null:null}function U(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=W(e,e.spatialReference,t,r,n)}function W(e,t,r,n,i){oe[0]=e.x,oe[1]=e.y;const o=e.z;return oe[2]=void 0!==o?o:i,(0,v.projectBuffer)(oe,t,0,oe,n,0)?(r.x=oe[0],r.y=oe[1],r.spatialReference=n,void 0!==o||(0,u.xP)(n)?(r.z=oe[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function X(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=Y(e,e.spatialReference,t,r,n)}function Y(e,t,r,n,i){const{points:o,hasZ:s,hasM:l}=e,a=[],c=o.length,f=[];for(const e of o)f.push(e[0],e[1],s?e[2]:i);if(!(0,v.projectBuffer)(f,t,0,f,n,0,c))return null;const p=s||(0,u.xP)(n);for(let e=0;e<c;++e){const t=3*e,r=f[t],n=f[t+1];p&&l?a.push([r,n,f[t+2],o[e][3]]):p?a.push([r,n,f[t+2]]):l?a.push([r,n,o[e][2]]):a.push([r,n])}return r.points=a,r.spatialReference=n,r.hasZ=s,r.hasM=l,r}function H(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=Q(e,e.spatialReference,t,r,n)}function Q(e,t,r,n,i){const{paths:o,hasZ:s,hasM:l}=e,a=[];if(!ie(o,s??!1,l??!1,t,a,n,i))return null;const c=s||(0,u.xP)(n);return r.paths=a,r.spatialReference=n,r.hasZ=c,r.hasM=l,r}function ee(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,n)}function te(e,t,r,n,i){const{rings:o,hasZ:s,hasM:l}=e,a=[];if(!ie(o,s??!1,l??!1,t,a,n,i))return null;const c=s||(0,u.xP)(n);return r.rings=a,r.spatialReference=n,r.hasZ=c,r.hasM=l,r}function re(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ne(e,e.spatialReference,t,r,n)}function ne(e,t,r,n,i){const{xmin:o,ymin:s,xmax:l,ymax:a,hasZ:c,hasM:f}=e;if(!x(o,s,c?e.zmin:i,t,oe,n))return null;const p=c||(0,u.xP)(n);return r.xmin=oe[0],r.ymin=oe[1],p&&(r.zmin=oe[2]),x(l,a,c?e.zmax:i,t,oe,n)?(r.xmax=oe[0],r.ymax=oe[1],p&&(r.zmax=oe[2]),f&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function ie(e,t,r,n,i,o,s=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:s);if(!(0,v.projectBuffer)(l,n,0,l,o,0))return!1;let a=0;i.length=0;const c=t||(0,u.xP)(o);for(const t of e){const e=new Array;for(const n of t)c&&r?e.push([l[a++],l[a++],l[a++],n[3]]):c?e.push([l[a++],l[a++],l[a++]]):r?(e.push([l[a++],l[a++],n[2]]),a++):(e.push([l[a++],l[a++]]),a++);i.push(e)}return!0}const oe=(0,l.vt)()},91829:(e,t,r)=>{function n(){return[0,0,0,0]}function i(e){return[e[0],e[1],e[2],e[3]]}function o(e,t,r,n){return[e,t,r,n]}function s(e,t,r,n){return[e,t,r,n]}function l(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t}function a(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function c(){return o(0,1,0,0)}function f(){return o(0,0,1,0)}function p(){return o(0,0,0,1)}r.d(t,{CN:()=>s,Un:()=>h,ci:()=>l,fA:()=>o,o8:()=>i,uY:()=>d,vt:()=>n});const d=[0,0,0,0],h=a(),m=u(),y=c(),g=f(),v=p();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:y,UNIT_Z:g,ZEROS:d,clone:i,create:n,freeze:s,fromArray:l,fromValues:o,ones:a,unitW:p,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},95349:(e,t,r)=>{r.d(t,{g:()=>s,r:()=>l});var n=r(2485),i=r(72606),o=r(1626);const s={key:"type",base:i.A,typeMap:{algorithmic:n.A,multipart:o.A}};function l(e){return e?.type?"algorithmic"===e.type?n.A.fromJSON(e):"multipart"===e.type?o.A.fromJSON(e):null:null}},95488:(e,t,r)=>{r.d(t,{I:()=>i});var n=r(11406);class i extends n.T{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},98453:(e,t,r)=>{r.d(t,{m:()=>n});const n=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99157:(e,t,r)=>{r.d(t,{A:()=>l});var n,i=r(31635),o=r(69622),s=r(91429);let l=n=class extends o.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"isInverse",void 0),(0,i.Cg)([(0,s.MZ)()],l.prototype,"wkt",void 0),(0,i.Cg)([(0,s.MZ)()],l.prototype,"wkid",void 0),l=n=(0,i.Cg)([(0,s.$K)("esri.geometry.operators.support.GeographicTransformationStep")],l)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6787],{2272:(e,t,i)=>{i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),r=i(70333),n=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,i){const s={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(i?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?n:JSON.stringify(n);else s[r]=n}return s}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&s.A.request.useIdentity&&await Promise.all([i.e(7330),i.e(168),i.e(148)]).then(i.bind(i,50148));const l=await r.id.getCredential(e,n);return l?.token}},6518:(e,t,i)=>{i.d(t,{F:()=>a});var s=i(44208),r=i(75503),n=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},12543:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ge});var s=i(31635),r=i(65529),n=i(74887),o=i(36708),a=i(91429),l=i(79897),u=i(16930),h=i(65864),c=i(83221),d=i(56390),p=i(87045),f=i(72802),g=i(61956),m=i(88625),y=(i(44208),i(66344)),_=i(91869),v=i(86211),w=i(16271);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:i}=t;return new C(e,i)}return new b}class b{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class C{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new y.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){const{offset:s,unit:r}=i;if(null==s)return;const n=(0,v.G9)(t),o=s*((0,w.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,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){const s=new Map;for(const t of e)(0,_.tE)(s,t.objectId,S).push(t);const[r,o,a]=this._prepareQuery(s,t),l=await this._alignPointsInFeatures(r,i);if((0,n.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const i=[],s=[];for(const[t,r]of e){const e=[];for(const i of r)this._addToQueriesOrCachedResult(t,i.target,e,s),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,s),this._addToQueriesOrCachedResult(t,i.end,e,s));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,s){const r=M(e,t),n=this._alignmentsCache.get(r);null==n?i.push(t):s.push(new I(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:s},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(s.has(r)){n+=a.length;continue}const e=!i.has(r);for(const i of a){const s=M(r,i),a=t[n++];i.z=a,e&&o.put(s,a,1)}}}}class I{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function M(e,{x:t,y:i,z:s,spatialReference:r}){return`${e}-${t}-${i}-${s??0}}-wkid:${r?.wkid}`}function S(){return[]}class T{filter(e,t){return t}notifyElevationSourceChange(){}}class F{filter(e,t){const{point:i,distance:s}=e,{z:r}=i;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}(s),o=this._updateCandidatesTo3D(t,i,n).filter(z);return o.sort(O),o}_updateCandidatesTo3D(e,t,i){for(const s of e)switch(s.type){case"edge":B(s,t,i);continue;case"vertex":E(s,t,i);continue}return e}}function z(e){return e.distance<=1}function A(e=!1){return e?new F:new T}function B(e,t,{x:i,y:s,z:r}){const{start:n,end:o,target:a}=e;e.draped||function(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,o=s.z-i.z,a=r*r+n*n+o*o,l=(t.x-i.x)*r+(t.y-i.y)*n+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+r*u,c=i.y+n*u,d=i.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/i,u=(t.y-a.y)/s,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function E(e,t,{x:i,y:s,z:r}){const{target:n}=e,o=(t.x-n.x)/i,a=(t.y-n.y)/s,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function O(e,t){return e.distance-t.distance}var R=i(4718),P=i(799);function j(e=!1,t){return e?new k(t):new Z}class Z{async fetch(){return[]}notifySymbologyChange(){}}class k{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const i=[],s=[],r=this._candidatesCache;for(const t of e){const e=H(t),n=r.get(e);if(n)for(const e of n)s.push((0,R.o8)(e));else i.push(t),r.put(e,[],1)}if(0===i.length)return s;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],s=H(i[l[e]]),n=r.get(s);n.push(t),r.put(s,n,n.length),u.push((0,R.o8)(t))}return s.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function H(e){switch(e.type){case"vertex":{const{objectId:t,target:i}=e,s=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,P.Wm)(s).toString()}case"edge":{const{objectId:t,start:i,end:s}=e,r=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${s.x}-${s.y}-${s.z??0}`;return(0,P.Wm)(r).toString()}default:return""}}var N=i(69622),q=i(4576),L=i(60999),V=i(53966),U=i(3483),Y=i(13069),D=i(5443),X=i(19419),J=i(90708),$=i(58512),G=i(60694),K=i(69418),W=i(80893);class Q{constructor(e,t){this.key=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{key:this.key,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 i=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,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,L.UT)(async i=>{const s=await(0,L.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,s.ok?s.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()}}}let ee=class extends N.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"),i=(0,U.KC)(e,this._mandatoryOutFields);(0,U.aI)(i,t)||(this._set("outFields",i),(0,U.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}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=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.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,q.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(({id:e})=>e)??[])}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))},i=(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),V.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,G.Wo)(this.url))return;const e=(0,L.UT)(async e=>{try{const t=await(0,W.Jf)(this.url,new g.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=D.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),V.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:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}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,i)=>this._fetchFeatures(e,t,i),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.key),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<se}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(re/(i*i))<ne}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,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 i=new Q(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ie,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(s+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||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,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?(0,Y.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,Y.AG)(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new $.A:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,s=await(0,W.IJ)(this.url,e,new K.S({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.eY)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,s=await(0,W.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:ie,signal:t});return(0,J.q3)(s,{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),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=(0,U.KC)((0,U.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),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 g.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,X.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?g.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||te);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"url",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"objectIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"globalIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"capabilities",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"spatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ee.prototype,"store",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"_minimumVerticesPerFeature",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"_mandatoryOutFields",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"outFields",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"suspended",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"_historicMoment",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"filter",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"customParameters",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"_configuration",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tileInfo",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tileSize",null),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"tilesOfInterest",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"availability",void 0),(0,s.Cg)([(0,a.MZ)()],ee.prototype,"hasZ",null),ee=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ee);const te=2e3,ie=6e5,se=1e6,re=25,ne=1;var oe=i(6518);class ae{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 i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[i,s]of this._store)if(!t.has(i)&&e(s,i))return!0;for(const[i]of t){const t=this._store.get(i);if(t&&e(t,i))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 le=class extends N.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 oe.F,this._tiles=new ae,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,X.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const i=this.featureStore.upsertMany(t),s=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,U.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),s),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const i of e.objectIds)if(1===this._refCounts.get(i)){const e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const i=this._tiles.get(e);if(i)return!i.objectIds.size||(0,U.Yy)(t,i.attributeKeys)}return!1}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,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){const s=e.id;this._tiles.set(s,new ue(e,t,i)),this._tileBounds.set(s,e.extent),this._tileFeatureCounts.set(s,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const i=e.key.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;const{features:s}=await t(e,i);for(const e of s){const t=(0,J.jQ)(this._tmpBoundingRect,e.geometry);null!=t&&this._tileBounds.forEachInBounds(t,t=>{const i=this._tiles.get(t);this.featureStore.add(e);const s=e.objectId;i.objectIds.has(s)||(i.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(i.key.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,X.HY)((0,X.VY)(this.extent,this._tmpBoundingRect),e.extent))return new ce(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new ce(e);if(this._hasAttributesForTile(e.id,i))return new ce(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,s){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,W.gW)(t,i,s),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const i=new he(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,s=>{const r=this._tiles.get(s)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}(e,r)&&this._populateChildren(i,r,t,this._tileFeatureCounts.get(r.id)||0)}),i}_populateChildren(e,t,i,s){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,i,s);else{const r=new he(e.level+1,n,o);i.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=i&&(i.children[s]=null),n);const o=r/2,a=o*o;let l=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];l+=null!=s?this._simplify(s,t,e,i,o):a}return 0===l?this._mergeChildren(e):1-l/n<pe&&(this._purge(e),null!=i&&(i.children[s]=null),l=n),l}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const s=this._tiles.get(e.id);if(s){i=i?(0,U.E$)(i,s.attributeKeys):new Set(s.attributeKeys);for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??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 i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,s){const r=new de(i,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,s),r.info}_collectMissingTilesRecurse(e,t,i,s){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,s);if(r&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,i));const n=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),n):this._collectMissingTilesRecurse(r,t,n,s)}}_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,s.Cg)([(0,a.MZ)({constructOnly:!0})],le.prototype,"featureStore",void 0),(0,s.Cg)([(0,a.MZ)()],le.prototype,"tileInfo",void 0),(0,s.Cg)([(0,a.MZ)()],le.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],le.prototype,"maximumByteSize",void 0),le=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],le);class ue{constructor(e,t,i){this.key=e,this.objectIds=t,this.attributeKeys=i}}class he extends f.U{constructor(){super(...arguments),this.isLeaf=!1,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 ce{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,X.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 de{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new ce(t),null!=i&&(this._extent=(0,X.VY)(i))}addMissing(e,t,i,s){const r=new f.U(e,t,i);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,X.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,X.Wc)(r.extent))}}const pe=.18751;let fe=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,n.Tw)(),this._elevationAligner=x(),this._elevationFilter=A(),this._symbologyCandidatesFetcher=j(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,n.Te)(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,n.Te)(t),s}}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:i,timeInfo:s,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new c.A({...e.serviceInfo,hasZ:n,hasM:!1}),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new d.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:s}),this._featureFetcher=new ee({store:new le({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?m.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=A(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),me}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,me}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),me}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const i=function(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:s,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:s,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),s=t?.signal,r=await this._queryEngine.executeQueryForSnapping(i,s);(0,n.Te)(s);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,s);(0,n.Te)(s);const a=await this._symbologyCandidatesFetcher.fetch(o,s);(0,n.Te)(s);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,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.map(e=>f.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?p.A.fromJSON(e.tileInfo):null,me}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),me}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),me}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),me}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),me}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),me}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),me}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=j(e,this._getSymbologyCandidates),me}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],fe.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)()],fe.prototype,"_isInitializing",void 0),fe=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],fe);const ge=fe,me={result:{}}},13069:(e,t,i)=>{i.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function r(){if(s)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.startsWith("{")?t:`{${t}}`}},16271:(e,t,i)=>{i.d(t,{Ao:()=>n,KQ:()=>o});var s=i(4576),r=i(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,s.TF)(e,"decimal-degrees"),e.sort(),e}()},20437:(e,t,i)=>{i.d(t,{A:()=>f});var s,r=i(31635),n=i(66552),o=i(25482),a=i(91429),l=i(56507),u=i(80451),h=i(98453),c=i(36005),d=i(93223);const p=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=class extends o.o{static{s=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 i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?p.fromJSON(i.fieldValueType):null}clone(){return new s({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}})],f.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],f.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.gK,json:{read:{reader:u.rS},write:!0}})],f.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],f.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=s=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],f)},31756:(e,t,i)=>{i.d(t,{j:()=>n});var s=i(86211),r=i(79258);const n={unknown:1,inches:(0,s.oU)(1,"meters","inches"),feet:(0,s.oU)(1,"meters","feet"),"us-feet":(0,s.oU)(1,"meters","us-feet"),yards:(0,s.oU)(1,"meters","yards"),miles:(0,s.oU)(1,"meters","miles"),"nautical-miles":(0,s.oU)(1,"meters","nautical-miles"),millimeters:(0,s.oU)(1,"meters","millimeters"),centimeters:(0,s.oU)(1,"meters","centimeters"),decimeters:(0,s.oU)(1,"meters","decimeters"),meters:(0,s.oU)(1,"meters","meters"),kilometers:(0,s.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,s.vl)(1,"meters",r.$O.radius)}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>g,Vh:()=>m,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u});var s=i(37955),r=i(36563),n=i(97768),o=i(74887),a=i(14012);function l(e,t,i={}){return h(e,t,i,p)}function u(e,t,i={}){return h(e,t,i,f)}function h(e,t,i={},s){let r=null;const o=i.once?(e,i)=>{s(e)&&((0,n.xt)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),i(e)}const p=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},37730:(e,t,i)=>{i.d(t,{T:()=>r});var s=i(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new s.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},39357:(e,t,i)=>{i.d(t,{H:()=>a});var s,r=i(31635),n=i(25482),o=i(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},50498:(e,t,i)=>{i.d(t,{Ye:()=>c,gy:()=>h,yR:()=>d});var s=i(66552),r=i(5443),n=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const h=(0,s.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,s.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}}},53177:(e,t,i)=>{i.d(t,{A:()=>h});var s,r=i(31635),n=i(4718),o=i(91429),a=i(39357),l=i(76357),u=i(93223);let h=class extends l.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some(e=>(String(e.code)===i&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.H],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},58501:(e,t,i)=>{i.d(t,{q:()=>r});var s=i(62815);function r(e,t,i){if(!i?.features||!i.hasZ)return;const r=(0,s.N)(i.geometryType,t,e.outSpatialReference);if(r)for(const e of i.features)r(e.geometry)}},60999:(e,t,i)=>{i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>h,UT:()=>g,aD:()=>y,jJ:()=>u});var s=i(31635),r=i(69622),n=i(97768),o=i(74887),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function g(e,t){return new m(e,t)}let m=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:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(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,s.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},66344:(e,t,i)=>{i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,i,r,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return s||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(i,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._users.forEach(i=>{const{id:r,name:n}=i;if(s.startsWith(r)){const i=t[n]||0;t[n]=i+e.size}})});const s={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const r=Object.keys(t);r.sort((e,i)=>t[i]-t[e]),r.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const r=this._users.get(e.split(o)[0])?.removeFunc,n=r?.(t,s,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!s||n.startsWith(s))){const s=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,s),i.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!s||r.startsWith(s)){const s=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,n,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69540:(e,t,i)=>{i.d(t,{OU:()=>h,Pw:()=>c});var s=i(31635),r=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return r=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A)},72802:(e,t,i)=>{i.d(t,{U:()=>r});var s=i(19419);class r{constructor(e,t,i,r=(0,s.vt)()){this._level=e,this._row=t,this._col=i,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},75503:(e,t,i)=>{i.d(t,{EC:()=>M,wq:()=>a});var s=i(4576),r=i(21818),n=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),b.prune(),C.prune(),I.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(v(e,i))for(x.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;v(e,o)&&(i.leaf?t(n):_(e,o)?l(n,t):x.push(n))}i=x.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!v(e,t))return!1;for(x.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(v(e,n)){if(t.leaf||_(e,n))return!0;x.push(r)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),I.clear();i||C.length>0;){if(i||(i=C.pop(),n=C.data[C.length-1],o=I.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,r.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),C.push(i),this._condense(C),this;a||i.leaf||!_(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(C.push(i),I.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new T(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new F([]);o.height=s;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));w(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){const t=Math.min(r+l-1,i);w(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);C.clear();const n=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=f(o),l=m(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,C);for(n.children.push(e),c(n,r);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(r,C,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return;const o=i.children.splice(n,i.children.length-n),a=i.leaf?new T(o):new F(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=y(t,a),u=f(t)+f(a);l<s?(s=l,n=o,r=u<r?u:r):l===s&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=h(e,0,t,r),o=h(e,i-t,i,r);let a=g(n)+g(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(n,e.leaf?r(t):t),a+=g(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?r(t):t),a+=g(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.qh)(n,i,n.length,r.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(b.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,r.zI)(e));else b.pushArray(i.children);i=b.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,r){r||(r=new T([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],c(r,e.leaf?s(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function g(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,i,s,r){const n=[t,i];for(;n.length;){const t=n.pop(),i=n.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,r),n.push(i,a,a,t)}}const x=new n.A,b=new n.A,C=new n.A,I=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},76357:(e,t,i)=>{i.d(t,{A:()=>u});var s=i(31635),r=i(66552),n=i(25482),o=i(91429),a=i(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},79677:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(31635),n=i(25482),o=i(88930),a=i(91429),l=i(98623),u=i(36005),h=i(43937);let c=class extends n.o{static{s=this}static get allTime(){return d}static get empty(){return p}static fromArray(e){return new s({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(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===s&&i===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let r=this.end;if(r){const i=(0,o.lL)(r,e,t);r=r.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new s({start:i,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=i?o=r:t>=r&&t<=n&&(o=t),i>=r&&i<=n?a=i:n>=t&&n<=i&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?s.empty:new s({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=l.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new s,{start:n,end:a}=this;return null!=n&&(r.start=(0,o.S1)(n,e,t,i)),null!=a&&(r.end=(0,o.S1)(a,e,t,i)),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 d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,u.w)("end")],c.prototype,"readEnd",null),(0,r.Cg)([(0,h.K)("end")],c.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.w)("start")],c.prototype,"readStart",null),(0,r.Cg)([(0,h.K)("start")],c.prototype,"writeStart",null),c=s=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],c);const d=new c,p=new c({start:void 0,end:void 0})},79897:(e,t,i)=>{i.d(t,{U:()=>h});var s=i(31635),r=i(69622),n=i(36563),o=i(36708),a=i(76030),l=i(10107),u=i(64108);let h=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,i={}){return this._installWatch(e,t,i,o.wB)}addWhen(e,t,i={}){return this._installWatch(e,t,i,o.z7)}addOnCollectionChange(e,t,{initial:i=!1,final:s=!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:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:s?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(c)||this._set("updating",!1))}),t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this.removeHandles(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(e,t,i={},s){const r=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,r);const o=s(e,t,i);return this.addHandles(o,r),(0,n.hA)(()=>this.removeHandles(r))}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),s=(0,o.wB)(e,i,{sync:!0,equals:()=>!1});return this.addHandles(s,t),s}_createSyncUpdatingCallback(){return()=>{this.removeHandles(c),++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(c))}),c)}}};(0,s.Cg)([(0,l.MZ)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,s.Cg)([(0,u.$)("esri.core.support.UpdatingHandles")],h);const c=-42},80451:(e,t,i)=>{i.d(t,{rS:()=>p,gK:()=>d}),i(44208);var s,r=i(53177),n=i(76357),o=i(31635),a=i(91429),l=i(93223);let u=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};var h;(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);let c=class extends n.A{static{h=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new h({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,a.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,i){t[i]=[this.minValue||0,e]},isRequired:!0}}})],c.prototype,"maxValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]},isRequired:!0}}})],c.prototype,"minValue",void 0),(0,o.Cg)([(0,l.e)({range:"range"})],c.prototype,"type",void 0),c=h=(0,o.Cg)([(0,a.$K)("esri.layers.support.RangeDomain")],c);const d={key:"type",base:n.A,typeMap:{range:c,"coded-value":r.A,inherited:u}};function p(e){if(!e?.type)return null;switch(e.type){case"range":return c.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},83221:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(4576),r=i(49186),n=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),c=i(51441),d=i(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new n.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:r,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:n}=e;for(const e in n)i.attributes[e]=n[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},87045:(e,t,i)=>{i.d(t,{A:()=>v});var s,r=i(31635),n=i(66552),o=i(25482),a=i(86211),l=i(91429),u=i(56507),h=i(86738),c=i(16930),d=i(21325),p=i(28735),f=i(91806),g=i(72802),m=i(36005),y=i(43937);const _=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 v=class extends o.o{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:n=c.A.WebMercator,numLODs:o=24}=e;if(!(0,d.fn)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new f.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new h.A(0,0,n),size:[r,r],spatialReference:n})}const l=(0,d.Vp)(n),u=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new h.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),p=1/(39.37*(0,a.GA)(n)*96),g=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*p;g.push(new f.A({level:e,scale:t,resolution:s}))}else{let e=(0,d.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);g.push(new f.A({level:0,scale:e,resolution:e*p}));for(let s=1;s<i;s++){const i=e/2**t,r=i*p;g.push(new f.A({level:s,scale:i,resolution:r})),e=i}}return new s({dpi:96,lods:g,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 i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e})),this._set("scales",s),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 i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],r=t[s+1];if(i<=e)return s;if(r===e)return s+1;if(i>e&&r<e)return s+Math.log(i/e)/Math.log(i/r)}return s}tileAt(e,t,i,s){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,s=i;else{const e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,s=i}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return s??=new g.U(0,0,0),s.level=e,s.row=Math.floor((this.origin.y-o)/l+.001),s.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const s=e.level-i.level,r=i.resolution*this.size[0]/2**s,n=i.resolution*this.size[1]/2**s;return 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,!0}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 i=this.lodAt(t.level);if(null==i)return null;const{resolution:s}=i,r=s*this.size[0],n=s*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 s.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 i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const s=e+t,{scale:r,resolution:n}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:r,resolution:n}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,r.Cg)([(0,m.w)("origin")],v.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[f.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,r.Cg)([(0,m.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],v.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=s=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],v)},88625:(e,t,i)=>{i.d(t,{A:()=>_});var s,r=i(31635),n=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(91429),h=i(30524);let c=s=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new s({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}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=s=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var p=i(16271),f=i(36005),g=i(43937);const m=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let _=class extends((0,n.OU)(a.o)){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,i,s){t[i]=e.write({},s),"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:d,json:{write:!0}})],_.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,f.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],_.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,g.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],_.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}}})],_.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],_.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:p.KQ,json:{type:String,read:y.read,write:y.write}})],_.prototype,"unit",null),_=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],_)},91806:(e,t,i)=>{i.d(t,{A:()=>l});var s,r=i(31635),n=i(25482),o=i(91429),a=i(56507);let l=class extends n.o{static{s=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 s({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}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.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}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.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}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},98453:(e,t,i)=>{i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);