@arcgis/core 4.31.0-next.20240819 → 4.31.0-next.20240821

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 (150) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{d2fa4d2887692a1ec9b1.js → 0553357f4cdf4deb13d0.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{b21db356f243d097ab3e.js → 122f3f294b8f95619f27.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{dc03a639c97a6f99dbc9.js → 1ac47b7a77818c372e1a.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{23a6700a3278d2cfcd75.js → 203cf58345df86caf4ca.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a2c40517266fe420017c.js → 25fa59544c13db8cee30.js} +1 -1
  7. package/assets/esri/core/workers/chunks/29545cd255b763d393d0.js +1 -0
  8. package/assets/esri/core/workers/chunks/3f75b7ed24b440b4508a.js +1 -0
  9. package/assets/esri/core/workers/chunks/40e4224f700206c67053.js +1 -0
  10. package/assets/esri/core/workers/chunks/48ab5ce08a97e5dac709.js +1 -0
  11. package/assets/esri/core/workers/chunks/{56bb7b589a0c040263ff.js → 4f1d44ce2f68e2ec2b60.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5429c2e1d2f159f332f9.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d8f416440963b77595e3.js → 58c476c8f6c274d77c0c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/5c4173205f885cd21422.js +1 -0
  15. package/assets/esri/core/workers/chunks/5cb07fa227b7fd06499f.js +1 -0
  16. package/assets/esri/core/workers/chunks/6f7c2d02fbd29870f6ee.js +1 -0
  17. package/assets/esri/core/workers/chunks/75ac4dfa3c8feeb82de2.js +1 -0
  18. package/assets/esri/core/workers/chunks/7fda3d3b211b6da5b0e5.js +1 -0
  19. package/assets/esri/core/workers/chunks/{1e7ce327435e0f4a4bec.js → 8224351edd777843180d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/949cbb667531527e6918.js +1 -0
  21. package/assets/esri/core/workers/chunks/{6e966c885e2ac9dff46b.js → 991295637f51e8207efe.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{252ff37bf5e12dae0b18.js → 9acc02df376d5bdfac87.js} +1 -1
  23. package/assets/esri/core/workers/chunks/9bbf7129579fe04ab268.js +1 -0
  24. package/assets/esri/core/workers/chunks/{492137ecf03ad2b2c2e3.js → a0fdb0fa96680ac758c0.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3ab02b7660e751cffe1c.js → a4b0e6084971989c526b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/a6834f66d8da628c3fb2.js +1 -0
  27. package/assets/esri/core/workers/chunks/{238936d241e76c4c0343.js → ace8b6351ed35b03499b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/b08689e5b0d1449877f5.js +1 -0
  29. package/assets/esri/core/workers/chunks/b686d70586623f7bf9a6.js +1 -0
  30. package/assets/esri/core/workers/chunks/b6dffcacd8b02384d6e2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{bf7253f7e5d6d63333c3.js → b765a72c9d4f092855f5.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b9490d5cc65cce2f2948.js +1 -0
  33. package/assets/esri/core/workers/chunks/{4706798c58398447d79f.js → bbd5477944da39234c30.js} +1 -1
  34. package/assets/esri/core/workers/chunks/cd8d595d577b74817623.js +1 -0
  35. package/assets/esri/core/workers/chunks/{145592dc516b86fbda63.js → cfc93bbd35cc4bfde7c0.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{48aeb087a1b10a8f4c0b.js → d5d70b3ecc0aca2ac184.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{a784222a7f9dc40ed67c.js → e2a6f77c05d0818e3f74.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{1ee365125c9fb9d9cafe.js → e5474bcde5b8fa037b56.js} +11 -11
  39. package/assets/esri/core/workers/chunks/{f7ab24d3dfc0ba9bf760.js → ea561b2460e634a643fc.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{cf7be98af841fadacf50.js → fc5129c825bc3c78b112.js} +1 -1
  41. package/chunks/BloomComposition.glsl.js +45 -0
  42. package/chunks/Centroid-DZi-eb9F.js +5 -0
  43. package/chunks/OperatorGeodesicBuffer.js +1 -1
  44. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  45. package/chunks/OperatorGeodeticDistance.js +5 -0
  46. package/chunks/OperatorProximity.js +5 -0
  47. package/chunks/OperatorShapePreservingDensify.js +1 -1
  48. package/chunks/Polyline.js +1 -1
  49. package/core/mathUtils.js +1 -1
  50. package/geometry/Mesh.js +1 -1
  51. package/geometry/operators/gx/operatorAutoComplete.js +5 -0
  52. package/geometry/operators/gx/operatorClip.js +1 -1
  53. package/geometry/operators/gx/operatorCut.js +1 -1
  54. package/geometry/operators/gx/operatorDensify.js +1 -1
  55. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  56. package/geometry/operators/gx/operatorGeodeticDensifyByLength.js +1 -1
  57. package/geometry/operators/gx/operatorGeodeticDistance.js +5 -0
  58. package/geometry/operators/gx/operatorIntersection.js +1 -1
  59. package/geometry/operators/gx/operatorLabelPoint.js +5 -0
  60. package/geometry/operators/gx/operatorOffset.js +5 -0
  61. package/geometry/operators/gx/operatorShapePreservingDensify.js +1 -1
  62. package/geometry/operators/gx/operatorSimplify.js +1 -1
  63. package/geometry/operators/gx/operatorUnion.js +1 -1
  64. package/geometry/operators/operatorAutoComplete.js +5 -0
  65. package/geometry/operators/operatorCentroid.js +5 -0
  66. package/geometry/operators/operatorContains.js +1 -1
  67. package/geometry/operators/operatorCrosses.js +1 -1
  68. package/geometry/operators/operatorCut.js +1 -1
  69. package/geometry/operators/operatorDensify.js +1 -1
  70. package/geometry/operators/operatorDifference.js +1 -1
  71. package/geometry/operators/operatorDisjoint.js +1 -1
  72. package/geometry/operators/operatorEquals.js +1 -1
  73. package/geometry/operators/operatorGeodesicBuffer.js +1 -1
  74. package/geometry/operators/operatorGeodeticDensifyByLength.js +1 -1
  75. package/geometry/operators/operatorGeodeticDistance.js +5 -0
  76. package/geometry/operators/operatorIntersection.js +1 -1
  77. package/geometry/operators/operatorIntersects.js +1 -1
  78. package/geometry/operators/operatorLabelPoint.js +5 -0
  79. package/geometry/operators/operatorOffset.js +5 -0
  80. package/geometry/operators/operatorOverlaps.js +1 -1
  81. package/geometry/operators/operatorProximity.js +5 -0
  82. package/geometry/operators/operatorRelate.js +1 -1
  83. package/geometry/operators/operatorReshape.js +5 -0
  84. package/geometry/operators/operatorShapePreservingDensify.js +1 -1
  85. package/geometry/operators/operatorTouches.js +1 -1
  86. package/geometry/operators/operatorWithin.js +1 -1
  87. package/geometry/operators/support/converterAPI.js +1 -1
  88. package/geometry/support/spatialReferenceUtils.js +1 -1
  89. package/geometry/support/webMercatorUtils.js +1 -1
  90. package/interfaces.d.ts +34 -6
  91. package/layers/LinkChartLayer.js +1 -1
  92. package/layers/OrientedImageryLayer.js +1 -1
  93. package/layers/graphics/sources/geojson/geojson.js +1 -1
  94. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  95. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  96. package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
  97. package/layers/knowledgeGraph/layerUtils.js +1 -1
  98. package/layers/mixins/operationalLayers.js +1 -1
  99. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  100. package/layers/orientedImagery/core/utils.js +1 -1
  101. package/layers/support/layersCreator.js +1 -1
  102. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  103. package/package.json +1 -1
  104. package/portal/PortalItem.js +1 -1
  105. package/portal/schemas/definitions.js +1 -1
  106. package/rest/versionManagement/gdbVersion/differences.js +5 -0
  107. package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +5 -0
  108. package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +5 -0
  109. package/smartMapping/statistics/support/utils.js +1 -1
  110. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  111. package/support/revision.js +1 -1
  112. package/symbols/cim/cimAnalyzer.js +1 -1
  113. package/symbols/support/utils.js +1 -1
  114. package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
  115. package/views/2d/layers/features/Processor.js +1 -1
  116. package/views/2d/layers/features/RenderState.js +1 -1
  117. package/views/2d/support/highlightGroupUtils.js +1 -1
  118. package/views/2d/tiling/LODInfo.js +1 -1
  119. package/views/2d/tiling/TileKey.js +1 -1
  120. package/views/3d/state/ViewStateManager.js +1 -1
  121. package/views/3d/support/cameraUtils.js +1 -1
  122. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  123. package/views/3d/support/viewpointUtils.js +1 -1
  124. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
  125. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +5 -0
  126. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +5 -0
  127. package/views/3d/webgl-engine/effects/bloom/BloomTechnique.js +5 -0
  128. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  129. package/widgets/OrientedImageryViewer.js +1 -1
  130. package/assets/esri/core/workers/chunks/0c6411a08d8b40fc7f4c.js +0 -1
  131. package/assets/esri/core/workers/chunks/22128034bf3b5aa713fc.js +0 -1
  132. package/assets/esri/core/workers/chunks/2dddb8a989b9c96572fe.js +0 -1
  133. package/assets/esri/core/workers/chunks/31f931de94414f13bd13.js +0 -1
  134. package/assets/esri/core/workers/chunks/370dd36904acad113842.js +0 -1
  135. package/assets/esri/core/workers/chunks/5f93a59c92f464925f9c.js +0 -1
  136. package/assets/esri/core/workers/chunks/6a04b6c7a5ec2389a768.js +0 -1
  137. package/assets/esri/core/workers/chunks/6f1853ab502bebefd3c3.js +0 -1
  138. package/assets/esri/core/workers/chunks/8a37c5b110665c8ff5a7.js +0 -1
  139. package/assets/esri/core/workers/chunks/945a3cc2191606f3a917.js +0 -1
  140. package/assets/esri/core/workers/chunks/9661398ce832137461f6.js +0 -1
  141. package/assets/esri/core/workers/chunks/b09bc516b7a7bf5a44a8.js +0 -1
  142. package/assets/esri/core/workers/chunks/b370dae404d8ff733a54.js +0 -1
  143. package/assets/esri/core/workers/chunks/c2ba052733e8ccae82e1.js +0 -1
  144. package/assets/esri/core/workers/chunks/d7d2552ff3e2d44319c7.js +0 -1
  145. package/assets/esri/core/workers/chunks/f2c3b68f00f88700e698.js +0 -1
  146. package/assets/esri/core/workers/chunks/f4d9689194d8d2547bb1.js +0 -1
  147. package/assets/esri/core/workers/chunks/f91b811fa044a01b6bb3.js +0 -1
  148. package/chunks/SimpleGeometryCursor.js +0 -5
  149. package/geometry/operators/support/cursorUtils.js +0 -5
  150. package/views/2d/layers/features/support/tileUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>A});var i,n,s=a(90237),o=(a(59456),a(5503)),r=a(49186),l=a(53966),h=a(91869),d=a(74887),u=a(10107),c=(a(44208),a(87811),a(40608)),p=a(4146),y=a(90708),g=a(92722);(n=i||(i={})).MULTIPLIER="multiplier",n.ABSOLUTE="absoluteValue";var m=a(61184),f=a(70643),L=a(85342),C=a(45654),M=a(63074),k=a(25036),w=a(8460),b=a(71402),T=a(5443),E=a(86738),N=a(82799);let I=class extends((0,M.dM)((0,k.j)(p.A))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new o.A,this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new T.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new o.A,this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new r.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new r.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,s)=>{const o=this._graphTypeLookup.get(s);if(!o)return l.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);"relationship"===o.type?t.has(s)||(t.add(s),i.push(o)):"entity"===o.type?t.has(s)||(t.add(s),a.push(o)):(l.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new m.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){return this.addResolvingPromise(new Promise((t=>{(0,b.fetchKnowledgeGraph)(this.url).then((async a=>{if(this._initializeLayerProperties({knowledgeGraph:a,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),await(0,L.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof g.A?e.linkChartLocation:e.linkChartLocation?(0,y.Ux)(e.linkChartLocation):null,t&&2===t.coords.length&&0===t.lengths.length?this.entityLinkChartDiagramLookup.set(e.id,t):this.relationshipLinkChartDiagramLookup.set(e.id,t)})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,d.Te)(e);const t=[],a=[];this.loadLayerAssumingLocalCache(),await(0,L.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,C.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&i.push(t);if(t){const e=new Set,t=[];for(const t of i)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const e of i)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);a&&await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,this._currentLinkChartConfig.layoutOptions);const n=[];return this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes(),i}async expand(e,t){const a=await this.dataManager.getConnectedRecordIds(e,t),i=a.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(a),{records:i}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=this._createSublayer(e);t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=this._createSublayer(e);t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const a=(0,h.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{if(a.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof g.A)this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation);else{const a=(0,y.Ux)(e.linkChartLocation);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e.id,e.linkChartLocation?a:null):this.entityLinkChartDiagramLookup.set(e.id,e.linkChartLocation?a:null)}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const s=new Map,o=new Map,h=new Map,d=new Map,u=new Uint8Array(a.length),c=new Float64Array(a.length),p=new Float64Array(a.length),g=new Float64Array(a.length),m=new Float64Array(a.length),f=new Uint32Array(i.length),C=new Uint32Array(i.length),M=new Float64Array(i.length),k=new Float64Array(i.length),b=[],I=new T.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let A,D="FORCE_DIRECTED",x=0,_=0;const R=w.i6.apply;switch(D="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,D){case"FORCE_DIRECTED":A=w.pM.apply;break;case"COMMUNITY":A=w.Tu.apply;break;case"HIERARCHICAL":A=w.$C.apply;break;case"RADIAL_TREE":A=w.vJ.apply;break;case"SMART_TREE":A=w.Xq.apply;break;default:A=w.Wg.apply}let O=!1;a.forEach((({typeName:a,feature:i})=>{if("CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e&&t?.lockedNodeLocations?.has(i.attributes[L.dr])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)?u[x]=w.tx.IsGeographic:u[x]=w.tx.None;const n=t.lockedNodeLocations.get(i.attributes[L.dr]);c[x]=n.x,p[x]=n.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)){u[x]=w.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":c[x]=t?.x,p[x]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(c[x]=e.x,p[x]=e.y):u[x]=w.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(c[x]=e.x,p[x]=e.y):u[x]=w.tx.IsMovable;break;default:u[x]=w.tx.IsMovable}(null==c[x]||null==p[x]||Number.isNaN(c[x])||Number.isNaN(p[x]))&&(u[x]=w.tx.IsMovable,c[x]=0,p[x]=0)}else if("CHRONOLOGICAL_SINGLE"===e||"CHRONOLOGICAL_MULTIPLE"===e){!O&&t?.lockedNodeLocations?.has(i.attributes[L.dr])&&(O=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,s=n&&e?.startField?i.attributes[n]:null;g[x]=s?new Date(s).getTime():NaN;const o=e?.endField,r=o&&e?.endField?i.attributes[o]:null;m[x]=r?new Date(r).getTime():NaN,c[x]=0,p[x]=0,u[x]=w.tx.IsMovable}else u[x]=w.tx.IsMovable,c[x]=0,p[x]=0;d.set(i.attributes[L.dr],x),b[x]={feature:i,typeName:a},x++})),O&&l.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let v=!1;const G=new Map;i.forEach((a=>{const i=a.feature.attributes[L.Cz],s=a.feature.attributes[L.KQ],o=d.get(i),r=d.get(s),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,u=h?a.feature.attributes[h]:null,c=l?.endField,p=c?a.feature.attributes[c]:null;if(void 0!==o&&void 0!==r){let t=i+"-"+s;"CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e||(t=t+"-"+u+"-"+p);const l=G.get(t),h=l?.has(a.typeName);h||(f[_]=o,C[_]=r,"CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e||(M[_]=u?new Date(u).getTime():NaN,k[_]=p?new Date(p).getTime():NaN),void 0===l?G.set(t,new Map([[a.typeName,_]])):l.set(a.typeName,_),_++),n.push(a)}else v=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),v&&l.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const P=this._validateLayoutSettings(e,t),S=this._convertLayoutSettingsToCalculationSettings(P);await(0,w.Hh)();let H=!1,U=null;if("CHRONOLOGICAL_SINGLE"===e||"CHRONOLOGICAL_MULTIPLE"===e){let a;({success:H,links:U,graphics:a}=R(u,c,p,g,m,f.subarray(0,_),C.subarray(0,_),M.subarray(0,_),k.subarray(0,_),"CHRONOLOGICAL_MULTIPLE"===e,t?.chronologicalOptions??{})),H&&(this.chronologicalAuxiliaryGraphics=a)}else({success:H,links:U}=A(u,c,p,f.subarray(0,_),C.subarray(0,_),S.computationBudgetTime,S.idealEdgeLengthMultiplier,S.repulsionRadiusMultiplier));if(!H)throw new r.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<b.length;e++){if(p[e]>84.9999?p[e]=84.9999:p[e]<-84.9999&&(p[e]=-84.9999),c[e]>179.9999?c[e]=179.9999:c[e]<-179.9999&&(c[e]=-179.9999),b[e].feature.attributes[L.T1]=new E.A(c[e],p[e]),s.has(b[e].typeName)){const t=s.get(b[e].typeName);t?.set(b[e].feature.attributes[L.dr],b[e].feature)}else{const t=new Map;t.set(b[e].feature.attributes[L.dr],b[e].feature),s.set(b[e].typeName,t)}h.set(b[e].feature.attributes[L.dr],b[e].feature);const t=(0,y.Ux)(b[e].feature.attributes[L.T1]);this.entityLinkChartDiagramLookup.set(b[e].feature.attributes[L.dr],b[e].feature.attributes[L.T1]?t:null),b[e].feature.attributes[L.T1].x<I.xmin&&(I.xmin=b[e].feature.attributes[L.T1].x),b[e].feature.attributes[L.T1].x>I.xmax&&(I.xmax=b[e].feature.attributes[L.T1].x),b[e].feature.attributes[L.T1].y<I.ymin&&(I.ymin=b[e].feature.attributes[L.T1].y),b[e].feature.attributes[L.T1].y>I.ymax&&(I.ymax=b[e].feature.attributes[L.T1].y)}if(this.linkChartExtent.xmin=I.xmin,this.linkChartExtent.xmax=I.xmax,this.linkChartExtent.ymin=I.ymin,this.linkChartExtent.ymax=I.ymax,!U)throw new r.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const F=new Map,B=new Map,z=new Map,Z=new Set;for(let a=0;a<n.length;a++){const i=[],s=n[a],r=s.feature.attributes[L.Cz],u=s.feature.attributes[L.KQ];let c=r+"-"+u;if("CHRONOLOGICAL_SINGLE"===e||"CHRONOLOGICAL_MULTIPLE"===e){const e=t?.timeInfoByTypeName?.get(s.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?s.feature.attributes[a]:null,n=e?.endField;c+="-"+i+"-"+(n?s.feature.attributes[n]:null)}const p=G.get(c).get(s.typeName),g=0===p?0:U?.vertexEndIndex[p-1];if(!Z.has(p)){if(Z.add(p),U.types[p]===w.J.Recursive){const e=[U.vertices[2*g],U.vertices[2*g+1]],t=[U.vertices[2*(g+1)],U.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],s=[a[0]+n[1],a[1]-n[0]],o=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(s),i.push(t),i.push(o),i.push(e)}else{if(U.types[p]!==w.J.Regular){l.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<U.vertexEndIndex[p];e++)i.push([U.vertices[2*e],U.vertices[2*e+1]])}if("CHRONOLOGICAL_SINGLE"!==e&&"CHRONOLOGICAL_MULTIPLE"!==e){const e=b[d.get(r)]?.feature.attributes[L.T1],t=b[d.get(u)]?.feature.attributes[L.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);F.has(c)?F.get(c).push(i):F.set(c,[i])}const m=F.get(c);B.has(c)||(B.set(c,new Map),z.set(c,new Map));const f=B.get(c),C=z.get(c);f.has(s.typeName)||(f.set(s.typeName,m.shift()),C.set(s.typeName,0));const M=f.get(s.typeName);C.set(s.typeName,C.get(s.typeName)+1);const k=new N.A({paths:[M]});if(s.feature.attributes[L.T1]=k,o.has(s.typeName)){const e=o.get(s.typeName);e?.set(s.feature.attributes[L.dr],s.feature)}else{const e=new Map;e.set(s.feature.attributes[L.dr],s.feature),o.set(s.typeName,e)}h.set(s.feature.attributes[L.dr],s.feature);const T=(0,y.Ux)(s.feature.attributes[L.T1]);this.relationshipLinkChartDiagramLookup.set(s.feature.attributes[L.dr],s.feature.attributes[L.T1]?T:null)}for(const e of n)e.feature.attributes[L.M1]=z.get(e.feature.attributes[L.Cz]+"-"+e.feature.attributes[L.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutOptions:P},{nodes:s,links:o,idMap:h}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new E.A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const a=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!a.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e){let t=[];for(const e of this.dataManager.relationshipTypeNames){const a=this.sublayerIdsCache.get(e);a&&(t=t.concat(Array.from(a.keys())))}const a=await this.dataManager.getRelationshipsBetweenNodes(e,t);return await this._handleNewRecords(a),{records:a}}async connectFromEntities(e){let t=[];for(const e of this.dataManager.relationshipTypeNames){const a=this.sublayerIdsCache.get(e);a&&(t=t.concat(Array.from(a.keys())))}let a=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(a=a.concat(Array.from(t)))}const i=await this.dataManager.getRelationshipsFromNodes(e,a,t);return await this._handleNewRecords(i),{records:i}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="RADIAL_TREE",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t})}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const a of e)this.sublayerIdsCache.has(a.typeName)||(this.sublayerIdsCache.set(a.typeName,new Set),t.push(a.typeName)),this.sublayerIdsCache.get(a.typeName).add(a.id);for(const e of t){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a),this.dataManager.sublayerCaches.set(e,new Map)}}await(0,L.qN)(this,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)));const a=Object.assign({},this._currentLinkChartConfig.layoutOptions);a.lockedNodeLocations=new Map;for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&a.lockedNodeLocations.set(e,new E.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,a)}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const s=(0,y.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,s):this.entityLinkChartDiagramLookup.set(n,s),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[L.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[L.KQ]);if(t&&a){const i=(0,y.Ux)(new N.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[L.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[L.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.defaultLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.defaultLinkChartConfig.layoutOptions||{}}):await this._calculateLayoutWithSublayerTimeInfo("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n={};if(!new Set(["FORCE_DIRECTED","COMMUNITY","GEOGRAPHIC","CHRONOLOGICAL_MULTIPLE","CHRONOLOGICAL_SINGLE"]).has(e)||!t)return n;const{computationBudgetTime:s,repulsionRadiusMultiplier:o,idealEdgeLength:r,idealEdgeLengthType:h}=t;if((e=>a(e)&&e>=1)(s)?n.computationBudgetTime=s:void 0!==s&&l.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),(e=>a(e)&&e>=1)(o)?n.repulsionRadiusMultiplier=o:void 0!==o&&l.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting"),"GEOGRAPHIC"===e&&(void 0!==r||void 0!==h)&&((e=>Object.values(i).includes(e))(h)?n.idealEdgeLengthType=h:void 0!==h&&l.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),(e=>a(e)&&e>=0)(r)?n.idealEdgeLength=r:void 0!==r&&l.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),("CHRONOLOGICAL_MULTIPLE"===e||"CHRONOLOGICAL_SINGLE"===e)&&t.chronologicalOptions){const e=t.chronologicalOptions;e.durationLineWidth&&e.durationLineWidth<0&&l.A.getLogger(this).warn("Invalid layout durationLineWidth setting, will revert to default setting")}return n}_convertLayoutSettingsToCalculationSettings(e){let t=e.idealEdgeLength;return e.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new f.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}};(0,s._)([(0,u.MZ)()],I.prototype,"dataPreloadedInLocalCache",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"defaultLinkChartConfig",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"dataManager",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"layers",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"entityLinkChartDiagramLookup",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"linkChartExtent",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"memberEntityTypes",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"memberRelationshipTypes",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"sublayerIdsCache",void 0),(0,s._)([(0,u.MZ)()],I.prototype,"tables",void 0),(0,s._)([(0,u.MZ)({json:{read:!1}})],I.prototype,"type",void 0),(0,s._)([(0,u.MZ)({json:{read:!1}})],I.prototype,"chronologicalAuxiliaryGraphics",void 0),I=(0,s._)([(0,c.$)("esri.layers.LinkChartLayer")],I);const A=I}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7899,3069],{11006:(e,t,n)=>{function r(e,t,n,r,o){i(e,t,n||0,r||e.length-1,o||s)}function i(e,t,n,r,s){for(;r>n;){if(r-n>600){var a=r-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(r,Math.floor(t+(a-l)*u/a+h)),s)}var p=e[t],d=n,m=r;for(o(e,n,t),s(e[r],p)>0&&o(e,n,r);d<m;){for(o(e,d,m),d++,m--;s(e[d],p)<0;)d++;for(;s(e[m],p)>0;)m--}0===s(e[n],p)?o(e,n,m):o(e,++m,r),m<=t&&(n=m+1),t<=m&&(r=m-1)}}function o(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function s(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>r})},69540:(e,t,n)=>{n.d(t,{O:()=>u,P:()=>h});var r=n(90237),i=n(69622),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(35666),l=n(88620),c=n(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},i=new Map;for(const e in t){const s=t[e],l=n?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,o.TU)(u),null!=u&&null==h||(l===a.Gr.DEFAULTS?i.set(e,h):r[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,n]of i)e.set(t,n,a.Gr.DEFAULTS)}return c}};return t=(0,r._)([(0,c.$)("esri.core.Clonable")],t),t};let h=class extends(u(i.A)){};h=(0,r._)([(0,c.$)("esri.core.Clonable")],h)},4902:(e,t,n)=>{n.d(t,{PH:()=>a,sA:()=>s});var r=n(90237),i=n(40608);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(s(class{})){};l=(0,r._)([(0,i.$)("esri.core.Identifiable")],l)},92071:(e,t,n)=>{n.d(t,{P:()=>v,L:()=>x});var r=n(90237),i=n(69622),o=n(76953),s=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((e,n)=>{t.set(n,(0,s.o8)(e),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach(((r,i)=>{e&&e.has(i)||t.set(i,(0,s.o8)(r),n)}))}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=a.Gr.USER){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=a.Gr.USER){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=n(45917),u=n(88620),h=n(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),n=t.store,r=new l;t.store=r,(0,o.k)(t,n,r)}read(e,t){(0,c.L)(this,e,t)}getAtOrigin(e,t){const n=d(this),r=(0,a.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach((e=>{i[e]=n.get(e,r)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const n=d(this),r=(0,a.aB)(t),i=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?n.keys(r):[e]:e,o.forEach((e=>{i.invalidate(e),n.revert(e,r),i.commit(e)}))}};return t=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,u.oY)(e).store}let m=class extends(p(i.A)){};m=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var f=n(16649),y=n(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(n))}removeOrigin(e){const t=_(this),n=(0,a.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),a.Gr.USER)}updateOrigin(e,t){const n=_(this),r=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=r+1;t<a.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(g(p(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],t),t};let x=class extends(v(i.A)){};x=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],x)},43668:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}n.d(t,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:i},Symbol.toStringTag,{value:"Module"}))},48163:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(){return i(1,1)}function s(){return i(1,0)}function a(){return i(0,1)}n.d(t,{Un:()=>l,fA:()=>i,vt:()=>r});const l=o(),c=s(),u=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:function(e,t){return new Float64Array(e,t,2)},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},77690:(e,t,n)=>{n.d(t,{B8:()=>a,Ge:()=>p,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>u,lw:()=>c,mg:()=>s,z0:()=>i});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t,n,r,i,o,s,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e}function s(e,t){if(e===t){const n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l;let m=n*h+r*p+i*d;return m?(m=1/m,e[0]=h*m,e[1]=(-u*r+i*c)*m,e[2]=(a*r-i*s)*m,e[3]=p*m,e[4]=(u*n-i*l)*m,e[5]=(-a*n+i*o)*m,e[6]=d*m,e[7]=(-c*n+r*l)*m,e[8]=(s*n-r*o)*m,e):null}function l(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e[0]=s*u-a*c,e[1]=i*c-r*u,e[2]=r*a-i*s,e[3]=a*l-o*u,e[4]=n*u-i*l,e[5]=i*o-n*a,e[6]=o*c-s*l,e[7]=r*l-n*c,e[8]=n*s-r*o,e}function c(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1],m=n[2],f=n[3],y=n[4],g=n[5],_=n[6],v=n[7],x=n[8];return e[0]=p*r+d*s+m*c,e[1]=p*i+d*a+m*u,e[2]=p*o+d*l+m*h,e[3]=f*r+y*s+g*c,e[4]=f*i+y*a+g*u,e[5]=f*o+y*l+g*h,e[6]=_*r+v*s+x*c,e[7]=_*i+v*a+x*u,e[8]=_*o+v*l+x*h,e}function u(e,t,n){const r=n[0],i=n[1],o=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=o*t[6],e[7]=o*t[7],e[8]=o*t[8],e}function h(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=n+n,a=r+r,l=i+i,c=n*s,u=r*s,h=r*a,p=i*s,d=i*a,m=i*l,f=o*s,y=o*a,g=o*l;return e[0]=1-h-m,e[3]=u-g,e[6]=p+y,e[1]=u+g,e[4]=1-c-m,e[7]=d-f,e[2]=p-y,e[5]=d+f,e[8]=1-c-h,e}function p(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],p=t[10],d=t[11],m=t[12],f=t[13],y=t[14],g=t[15],_=n*a-r*s,v=n*l-i*s,x=n*c-o*s,M=r*l-i*a,w=r*c-o*a,b=i*c-o*l,S=u*f-h*m,A=u*y-p*m,I=u*g-d*m,P=h*y-p*f,L=h*g-d*f,T=p*g-d*y;let O=_*T-v*L+x*P+M*I-w*A+b*S;return O?(O=1/O,e[0]=(a*T-l*L+c*P)*O,e[1]=(l*I-s*T-c*A)*O,e[2]=(s*L-a*I+c*S)*O,e[3]=(i*L-r*T-o*P)*O,e[4]=(n*T-i*I+o*A)*O,e[5]=(r*I-n*L-o*S)*O,e[6]=(f*b-y*w+g*M)*O,e[7]=(y*x-m*b-g*v)*O,e[8]=(m*w-f*x+g*_)*O,e):null}function d(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const m=c,f=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*(c*o-s*l)+n*(-c*i+s*a)+r*(l*i-o*a)},equals:function(e,t){const n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=t[0],d=t[1],m=t[2],f=t[3],y=t[4],g=t[5],_=t[6],v=t[7],x=t[8],M=(0,r.FD)();return Math.abs(n-p)<=M*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-d)<=M*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=M*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-f)<=M*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-y)<=M*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-g)<=M*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(c-_)<=M*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-v)<=M*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(h-x)<=M*Math.max(1,Math.abs(h),Math.abs(x))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:i,fromQuat:h,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:a,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8];return Math.abs(1-(n*n+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+u*u))<=t&&Math.abs(1-(o*o+l*l+h*h))<=t},mul:m,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:p,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],i=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l,m=n*h+r*p+i*d;if(!m)return null;const f=1/m;return e[0]=h*f,e[1]=(-u*r+i*c)*f,e[2]=(a*r-i*s)*f,e[3]=p*f,e[4]=(u*n-i*l)*f,e[5]=(-a*n+i*o)*f,e[6]=d*f,e[7]=(-c*n+r*l)*f,e[8]=(s*n-r*o)*f,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=Math.sin(n),d=Math.cos(n);return e[0]=d*r+p*s,e[1]=d*i+p*a,e[2]=d*o+p*l,e[3]=d*s-p*r,e[4]=d*a-p*i,e[5]=d*l-p*o,e[6]=c,e[7]=u,e[8]=h,e},scale:u,scaleByVec2:function(e,t,n){const r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e},set:o,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:f,subtract:d,translate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=p*r+d*s+c,e[7]=p*i+d*a+u,e[8]=p*o+d*l+h,e},transpose:s},Symbol.toStringTag,{value:"Module"}))},37585:(e,t,n)=>{n.d(t,{C:()=>i,Cc:()=>y,Io:()=>h,S8:()=>f,WQ:()=>s,e$:()=>_,hZ:()=>o,hs:()=>u,jb:()=>x,l0:()=>g});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e}function o(e,t,n){return e[0]=t,e[1]=n,e}function s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function a(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function u(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function h(e,t){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function p(e,t){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function d(e){const t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function m(e){const t=e[0],n=e[1];return t*t+n*n}function f(e,t){const n=t[0],r=t[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e}function y(e,t,n,r){const i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function g(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function _(e,t,n,r){const i=t[0]-n[0],o=t[1]-n[1],s=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*s+n[0],e[1]=i*s+o*a+n[1],e}const v=d,x=a,M=l,w=c,b=h,S=p,A=m;Object.freeze(Object.defineProperty({__proto__:null,add:s,angle:function(e,t){const n=e[0],r=e[1],i=t[0],o=t[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:i,cross:function(e,t,n){const r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e},dist:b,distance:h,div:w,divide:c,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const n=e[0],i=e[1],o=t[0],s=t[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:v,length:d,lerp:y,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:f,projectAndScale:function(e,t,n,r,i){let o=t[0]-n[0],s=t[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,e[0]=t[0]+o,e[1]=t[1]+s,e},random:function(e,t=1){const n=2*(0,r.Ov)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},rotate:_,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:u,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},set:o,sqrDist:S,sqrLen:A,squaredDistance:p,squaredLength:m,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:x,subtract:a,transformMat2:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e},transformMat2d:g,transformMat3:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e},transformMat4:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,n)=>{n.d(t,{E:()=>S,w:()=>s});var r=n(4576),i=(n(44208),n(3694)),o=n(11006);class s{constructor(e=9,t){this._compareMinX=h,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(),M.prune(),w.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(x.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):g(e,s)?a(o,t):x.push(o))}n=x.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;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 I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(w.clear(),b.clear();n||w.length>0;){if(n||(n=w.pop(),i=w.data[w.length-1],o=b.pop()??0,s=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),w.push(n),this._condense(w),this;s||n.leaf||!g(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(w.push(n),b.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new P([]);s.height=r;const a=Math.ceil(i/o),c=a*Math.ceil(Math.sqrt(o));v(e,t,n,c,this._compareMinX);for(let i=t;i<=n;i+=c){const t=Math.min(i+c-1,n);v(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return l(s,this._toBBox),s}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);w.clear();const o=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=d(s),l=f(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}(i,this._data,t,w);for(o.children.push(e),u(o,i);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)u(t.data[r],e)}(i,w,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new P(s);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=c(e,0,s,this._toBBox),a=c(e,s,n,this._toBBox),l=y(t,a),u=d(t)+d(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=c(e,0,t,i),s=c(e,n-t,n,i);let a=m(o)+m(s);for(let r=t;r<n-t;r++){const t=e.children[r];u(o,e.leaf?i(t):t),a+=m(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];u(s,e.leaf?i(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else l(n,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 a(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else M.pushArray(n.children);n=M.pop()??null}}function l(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(i,e.leaf?r(o):o);return i}function u(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 h(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(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 n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const x=new i.A,M=new i.A,w=new i.A,b=new i.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,n)=>{n.d(t,{C_:()=>p,OH:()=>f,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>c}),n(60999),n(5503);var r=n(37955),i=n(36563),o=n(97768),s=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,d)}function c(e,t,n={}){return u(e,t,n,m)}function u(e,t,n={},r){let i=null;const s=n.once?(e,n)=>{r(e)&&((0,o.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,s,n.sync,n.equals),n.initial){const t=e();s(t,t)}return i}function h(e,t,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function p(e){s.once&&s.once&&(0,o.xt)(u),n(e)}const d=l(e,((e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,p),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return u=(0,i.hA)((()=>{d.remove(),h()})),u}function p(e,t){return function(e,t,n){if((0,s.G4)(n))return Promise.reject((0,s.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,o.xt)(a)}return new Promise(((r,o)=>{a=(0,i.vE)([(0,s.u7)(n,(()=>{l(),o((0,s.NK)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,m,t)}function d(e){return!0}function m(e){return!!e}n(80559);const f={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},13069:(e,t,n)=>{n.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)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 o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},4146:(e,t,n)=>{n.d(t,{A:()=>x});var r=n(90237),i=(n(59456),n(78888)),o=n(49186),s=n(65529),a=n(4902),l=n(92474),c=n(53966),u=n(74887),h=n(84952),p=n(10107),d=(n(44208),n(87811),n(40608)),m=n(92602),f=n(79677),y=n(5443),g=n(16930);let _=0,v=class extends(s.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r._)([(0,p.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,p.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,p.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,p.MZ)({type:f.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,d.$)("esri.layers.Layer")],v);const x=v},87899:(e,t,n)=>{n.r(t),n.d(t,{default:()=>mt});var r=n(90237),i=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(87811),n(44208),n(36005)),p=n(40608),d=n(43937),m=n(35666),f=n(4146),y=n(63074),g=n(16131),_=n(8303),v=n(25036),x=n(69540),M=n(25482),w=n(77690),b=n(29242),S=n(37585),A=n(38954);const I=(0,n(51850).vt)(),P=(0,b.vt)(),L=(0,b.vt)(),T=(0,b.vt)();function O(e,t,n){return(0,A.s)(I,t[0],t[1],1),(0,A.t)(I,I,(0,w.mg)(P,n)),0===I[2]?(0,S.hZ)(e,I[0],I[1]):(0,S.hZ)(e,I[0]/I[2],I[1]/I[2])}function E(e,t,n){return R(L,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(T,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(e,(0,w.KC)(L,L),T),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,r,i,o,s,a,l){(0,w.hZ)(e,t,r,o,n,i,s,1,1,1),(0,A.s)(I,a,l,1),(0,w.KC)(P,e);const[c,u,h]=(0,A.t)(I,I,(0,w.mg)(P,P));return(0,w.hZ)(P,c,0,0,0,u,0,0,0,h),(0,w.lw)(e,P,e)}var B=n(90629),Z=n(48163),G=n(86738),C=n(39829),j=n(57251),U=n(16930);let N=class extends x.P{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:r}=(0,j.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};N=(0,r._)([(0,p.$)("esri.layers.support.GeoreferenceBase")],N);const $=N,Y=(0,b.vt)(),D=(0,Z.vt)();let X=class extends M.oY{};(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"x",void 0),(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"y",void 0),X=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let V=class extends x.P{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r._)([(0,c.MZ)()],V.prototype,"sourcePoint",void 0),(0,r._)([(0,c.MZ)({type:G.A})],V.prototype,"mapPoint",void 0),V=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],V);let H=class extends((0,M.Te)($)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=U.A.fromJSON(t.spatialReference),r=(0,b.fA)(...t.coefficients,1);return e.map((e=>((0,S.hZ)(D,e.x,e.y),O(D,D,r),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:n})})))}writeControlPoints(e,t,n,r){if(null!=this.transform)null!=e&&F(e[0])&&(t.controlPoints=e.map((e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}})),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8));else{const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(Y);if(null==e||!F(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){const i=(0,Z.fA)(0,n),o=(0,Z.fA)(0,0),s=(0,Z.fA)(t,0),a=(0,Z.fA)(t,n);return O(i,i,e),O(o,o,e),O(s,s,e),O(a,a,e),new C.A({rings:[[i,o,s,a,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!F(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=e,l={sourcePoint:(0,B.tc)(0,r),mapPoint:new G.A({x:i[0],y:i[1],spatialReference:t})},c={sourcePoint:(0,B.tc)(0,0),mapPoint:new G.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,B.tc)(n,0),mapPoint:new G.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,B.tc)(n,r),mapPoint:new G.A({x:a[0],y:a[1],spatialReference:t})};F(l)&&F(c)&&F(u)&&F(h)&&(re(Y,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:e})=>((0,S.hZ)(D,e.x,e.y),O(D,D,Y),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:t})}))))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,b.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!F(this.controlPoints[0]))return null;(0,S.hZ)(D,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return O(D,D,this.transform),new G.A({x:D[0],y:D[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!F(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,j.projectOrLoad)(e,t).geometry)?null:((0,S.hZ)(D,e.x,e.y),O(D,D,this.inverseTransform),(0,B.tc)(D[0],D[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;const[i,o,s,a]=t;if(!F(i))return null;const l=i.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!F(c.controlPoint))return null;null==e&&(e=(0,b.vt)());let p=null;return p=F(u.controlPoint)&&F(h.controlPoint)?re(e,i,c.controlPoint,u.controlPoint,h.controlPoint):F(u.controlPoint)?function(e,t,n,r){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),(0,S.Cc)(q,W,z,.5),(0,S.e$)(q,k,q,Math.PI),(0,S.Cc)(ee,K,J,.5),(0,S.e$)(ee,Q,ee,Math.PI),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint,u.controlPoint):function(e,t,n){return ne(W,K,t),ne(z,J,n),(0,S.e$)(k,z,W,te),(0,S.e$)(q,W,z,te),(0,S.e$)(Q,J,K,-te),(0,S.e$)(ee,K,J,-te),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint),p.every((e=>0===e))?null:p}_projectControlPoint(e,t){if(!F(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,j.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function F(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r._)([(0,c.MZ)({type:[V],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X]},coefficients:{type:[Number]},spatialReference:{type:U.A}}}}})],H.prototype,"controlPoints",void 0),(0,r._)([(0,h.w)("controlPoints")],H.prototype,"readControlPoints",null),(0,r._)([(0,d.K)("controlPoints")],H.prototype,"writeControlPoints",null),(0,r._)([(0,c.MZ)({clonable:!1})],H.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],H.prototype,"height",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],H.prototype,"inverseTransform",null),(0,r._)([(0,c.MZ)({readOnly:!0})],H.prototype,"transform",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],H.prototype,"width",void 0),H=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],H);const W=(0,Z.vt)(),z=(0,Z.vt)(),k=(0,Z.vt)(),q=(0,Z.vt)(),K=(0,Z.vt)(),J=(0,Z.vt)(),Q=(0,Z.vt)(),ee=(0,Z.vt)(),te=Math.PI/2;function ne(e,t,n){(0,S.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,S.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function re(e,t,n,r,i){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),ne(q,ee,i),ae(e,W,z,k,q,K,J,Q,ee)}const ie=new Array(8).fill(0),oe=new Array(8).fill(0);function se(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function ae(e,t,n,r,i,o,s,a,l){return E(e,se(ie,t,n,r,i),se(oe,o,s,a,l))}const le=H;var ce=n(78888),ue=n(43668),he=n(84952),pe=n(13069),de=n(4902),me=n(92474);const fe=(0,Z.vt)();let ye=class extends ${constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;const i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new C.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[r,i,o,s]]}=e;this.bottomLeft=new G.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new G.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new G.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new G.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;const o=t.spatialReference;e=e.normalize();const s=(0,j.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,S.hZ)(fe,s.x,s.y);const a=E((0,b.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return O(fe,fe,a),(0,B.tc)(fe[0],fe[1])}};(0,r._)([(0,c.MZ)({clonable:!1})],ye.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomRight",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topRight",void 0),ye=(0,r._)([(0,p.$)("esri.layers.support.CornersGeoreference")],ye);const ge=ye;var _e=n(34727),ve=n(34304),xe=n(5443);let Me=class extends ${constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=we(i,s,this.rotation);o=[a(e,t),a(e,r),a(n,r),a(n,t)],o.push(o[0])}else o=[[e,t],[e,r],[n,r],[n,t],[e,t]];return new C.A({rings:[o],spatialReference:i})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,a=(0,_e.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=we(o,s,-a),[c,u]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new xe.A({xmin:c,ymin:u,xmax:h,ymax:p,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,j.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=we(a.x,a.y,-n)(u,h)),(0,B.tc)((0,_e.hs)(u,r,o,0,1),(0,_e.hs)(h,s,i,0,1))}};function we(e,t,n){const r=(0,ve.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}(0,r._)([(0,c.MZ)({clonable:!1})],Me.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:xe.A})],Me.prototype,"extent",void 0),(0,r._)([(0,c.MZ)({type:Number})],Me.prototype,"rotation",void 0),Me=(0,r._)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],Me);const be=Me;n(59456);var Se=n(21325);function Ae(e,t){const n=(0,m.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>m.Gr.PORTAL_ITEM}const Ie={key:"type",base:$,typeMap:{"control-points":le,corners:ge,"extent-and-rotation":be}},Pe={key:"type",base:$,typeMap:{"control-points":le}};let Le=class extends((0,de.PH)((0,a.P)(me.A))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return le.fromJSON(e)}writeGeoreference(e,t,n,r){const i=r?.resources?.pendingOperations,a=()=>{const i=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:r}=e;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new le({controlPoints:[{mapPoint:new G.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,n)},{mapPoint:new G.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,0)},{mapPoint:new G.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,0)},{mapPoint:new G.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length&&r?.messages)return void r.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=i.write({},r)}};if("control-points"!==e.type&&!this.loaded&&i)return t[n]={},void i.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;const i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r._)([(0,c.MZ)({types:Ie,json:{write:!0,types:Pe}})],Le.prototype,"georeference",void 0),(0,r._)([(0,h.w)("georeference")],Le.prototype,"readGeoreference",null),(0,r._)([(0,d.K)("georeference")],Le.prototype,"writeGeoreference",null),(0,r._)([(0,c.MZ)({json:{read:!1,write:!1}})],Le.prototype,"opacity",void 0),Le=(0,r._)([(0,p.$)("esri.layers.support.MediaElementBase")],Le);const Te=Le;var Oe=n(85648),Ee=n(97159);let Re=class extends Te{constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ue.M5)(e).then((e=>{this._set("content",e)}));this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then((()=>{this._set("content",e)}));this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Ee.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Ee.t)(e,r)));const s=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(s){if(null==(0,Ee.i)(s))return void(t[n]=s);const e=(0,Ee.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Ee.M.NO);if(i&&e&&!(0,he.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,he.DB)(e)?(0,he.N9)(e):(await(0,ce.A)(e,{responseType:"blob"})).data:new Promise((t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t)))}(e).then((e=>{const r=function(e,t){const n=(0,pe.lk)(),r=`${(0,he.fj)("media",n)}.${(0,Oe.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})})))}write(e,t){const n=super.write(e,t);return"mediaType"in n&&!n.url&&delete n.mediaType,n}};(0,r._)([(0,c.MZ)()],Re.prototype,"animationOptions",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)({json:{name:"url",type:String,write:{overridePolicy:(e,t,n)=>({enabled:!Ae(n?.layer,n?.origin)})}}})],Re.prototype,"image",void 0),(0,r._)([(0,h.w)("image",["url"])],Re.prototype,"readImage",null),(0,r._)([(0,d.K)("image")],Re.prototype,"writeImage",null),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:{target:"mediaType",ignoreOrigin:!0}}})],Re.prototype,"type",void 0),Re=(0,r._)([(0,p.$)("esri.layers.support.ImageElement")],Re);const Be=Re;var Ze=n(62885),Ge=n(65529),Ce=n(61893),je=n(36708),Ue=n(19419),Ne=n(12176),$e=n(6518),Ye=n(69622),De=n(537),Xe=n(95108),Ve=n(65864),He=n(80754);function Fe(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,He.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,He.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,He.kd)(r,t);e.x+=n*(-2*t)}else if(r<n){const t=(0,He.kd)(r,n);e.x+=t*(-2*n)}}return e}function We(e,t){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=ze(e.xmin,t),{x:p,frameId:d}=ze(e.xmax,t),m=u===p&&a>0;if(a>2*c){const e={xmin:o<s?u:p,ymin:r,xmax:c,ymax:i},t={xmin:l,ymin:r,xmax:o<s?p:u,ymax:i},a={xmin:0,ymin:r,xmax:c,ymax:i},m={xmin:l,ymin:r,xmax:0,ymax:i},f=[],y=[];ke(e,a)&&f.push(h),ke(e,m)&&y.push(h),ke(t,a)&&f.push(d),ke(t,m)&&y.push(d);for(let e=h+1;e<d;e++)f.push(e),y.push(e);n.push(new Je(e,[h]),new Je(t,[d]),new Je(a,f),new Je(m,y))}else u>p||m?n.push(new Je({xmin:u,ymin:r,xmax:c,ymax:i},[h]),new Je({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new Je({xmin:u,ymin:r,xmax:p,ymax:i},[h]));return n}function ze(e,t){const[n,r]=t.valid,i=2*r;let o,s=0;return e>r?(o=Math.ceil(Math.abs(e-r)/i),e-=o*i,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/i),e+=o*i,s=-o),{x:e,frameId:s}}function ke(e,t){const{xmin:n,ymin:r,xmax:i,ymax:o}=t;return qe(e,n,r)&&qe(e,n,o)&&qe(e,i,o)&&qe(e,i,r)}function qe(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Ke(e,t,n=!0){const r=!(0,Ve.Rg)(e);if(r&&(0,Xe.m3)(e),n)return(new et).cut(e,t);const i=r?e.rings:e.paths,o=r?4:2,s=i.length,a=-2*t;for(let e=0;e<s;e++){const t=i[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+a,n[1]]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class Je{constructor(e,t){this.extent=e,this.frameIds=t}}const Qe=(0,Ue.vt)();class et{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const r=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide==-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(tt(this._lineIn,n<=0?e:this._xCut,t),tt(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function tt(e,t,n){const r=e.length;r>1&&e[r-1][0]===t&&e[r-2][0]===t?e[r-1][1]=n:e.push([t,n])}let nt=class extends Ye.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ue.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,j.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return C.A.fromJSON(function(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,Se.Vp)(n),i=(0,M.Wj)(e)?e.toJSON():e;if(!r)return i;const o=(0,Se.K8)(n)?102100:4326,s=He.j7[o].maxX,a=He.j7[o].minX;if((0,Ve.fT)(i))return Fe(i,s,a);if((0,Ve.U9)(i))return i.points=i.points.map((e=>Fe(e,s,a))),i;if((0,Ve.ZC)(i))return function(e,t){if(!t)return e;const n=We(e,t).map((e=>e.extent));return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}}(i,r);if((0,Ve.Bi)(i)||(0,Ve.Rg)(i)){const e=(0,De.Rg)(Qe,i),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,He.kd)(n.xmin,a)*(2*s),o=0===r?i:(0,He.kS)(i,r);return n.xmin+=r,n.xmax+=r,n.xmax>s?Ke(o,s,t):n.xmin<a?Ke(o,a,t):o}return i}(this.coords,!0))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ue.VY)(e):null}};(0,r._)([(0,c.MZ)()],nt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"element",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"bounds",null),(0,r._)([(0,c.MZ)()],nt.prototype,"coords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedCoords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedBounds",null),nt=(0,r._)([(0,p.$)("esri.layers.support.MediaElementView")],nt);var rt=n(37955);let it=class extends Te{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if("string"==typeof e){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,t.playsInline=!0,this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)})))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(e){return new Promise(((t,n)=>{const r=(0,rt.Oo)(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()}));this.addHandles(r,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",e.src?.includes("blob:")||(e.src=e.src))}))}};(0,r._)([(0,c.MZ)()],it.prototype,"autoplay",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)()],it.prototype,"video",null),it=(0,r._)([(0,p.$)("esri.layers.support.VideoElement")],it);const ot=it,st={key:"type",defaultKeyValue:"image",base:Te,typeMap:{image:Be,video:ot}},at=i.A.ofType(st);let lt=class extends(me.A.LoadableMixin((0,Ce.g)(Ge.A.EventedAccessor))){constructor(e){super(e),this._index=new $e.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new nt({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const r=(0,je.wB)((()=>e.coords),(()=>this._updateIndexForElement(e,!1)));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach(((e,t)=>this._elementsIndexes.set(e,t))),this.emit("refresh")},this.elements=new at}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find((e=>null!=e.georeference?.coords));this._set("spatialReference",e?e.georeference.coords.spatialReference:U.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Ze.V)(e,this._get("elements"),at))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new xe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,j.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,Se.aI)(e.spatialReference,this.spatialReference)?e:(0,j.project)(e,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const e of r)this._index.forEachInBounds((0,Ue.VY)(e),(({normalizedCoords:t,element:n})=>{null!=t&&(0,Ne.fA)(e,t)&&i.push(n)}));return i.sort(((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t))),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r!==i?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,r._)([(0,c.MZ)()],lt.prototype,"elements",null),(0,r._)([(0,c.MZ)({readOnly:!0})],lt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)()],lt.prototype,"spatialReference",null),lt=(0,r._)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],lt);const ct=lt;var ut=n(92935);function ht(e){return"object"==typeof e&&null!=e&&"type"in e}function pt(e){return ht(e)&&"image"===e.type}let dt=class extends((0,y.dM)((0,v.j)((0,g.q)((0,_.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case ut.X.SAVE:return i(this,t);case ut.X.SAVE_AS:return o(this,r,t)}})),this.source=new ct}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const r=ht(t)?new ct({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new ct({elements:new i.A(e)}):e instanceof i.A?new ct({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof ct){const t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}pt(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(ut.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ut.X.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Be;case"video":return new ot}return null}_getSourceOverride(e,t){if(ht(e)&&this.originIdOf("source")===m.Gr.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===m.Gr.WEB_MAP||this.originIdOf("georeference")===m.Gr.WEB_SCENE)){const n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"effectiveSource",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],dt.prototype,"georeference",void 0),(0,r._)([(0,h.w)("web-document","georeference")],dt.prototype,"readGeoreference",null),(0,r._)([(0,c.MZ)({type:String})],dt.prototype,"copyright",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)({type:["MediaLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image"]},georeference:{type:le}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Ae(this,n?.origin)&&pt(e)&&!!e.georeference&&e.originIdOf("georeference")>m.Gr.PORTAL_ITEM}}}}})],dt.prototype,"source",null),(0,r._)([(0,u.w)("source")],dt.prototype,"castSource",null),(0,r._)([(0,h.w)("source",["url"])],dt.prototype,"readSource",null),(0,r._)([(0,d.K)("source")],dt.prototype,"writeSource",null),(0,r._)([(0,c.MZ)()],dt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"type",void 0),dt=(0,r._)([(0,p.$)("esri.layers.MediaLayer")],dt);const mt=dt},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={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 i.w(9,(0,r.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(((n,r)=>{e[t++]=r})),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,o.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,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(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()))}}},16131:(e,t,n)=>{n.d(t,{q:()=>x});var r=n(90237),i=n(49186),o=n(84952),s=n(10107),a=n(56507),l=(n(87811),n(44208),n(36005)),c=n(40608),u=n(43937),h=n(89317),p=n(45917),d=n(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},y={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":f,"web-map/tables":y,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":f,"link-chart/tables":y,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var _=n(10873),v=n(79677);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,n){return"Group Layer"===n?.portalItem?.type?void 0:e}writeListMode(e,t,n,r){(r&&"ground"===r.layerContainerType||e&&(0,d.R)(this,n,{},r))&&(t[n]=e)}writeOperationalLayerType(e,t,n,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?v.A.fromArray(e):null}writeTimeExtent(e,t,n,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new i.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[n]=e.toArray())}read(e,t){t&&(t.layer=this),(0,p.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,n=g[e];let r=!!n?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new i.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const n=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof i.A&&"web-document-write:property-required"===e.name)).length;return(0,o.w8)(n?.url)?(t?.messages?.push(new i.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:n}beforeSave(){}};return(0,r._)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,s.MZ)(_.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,u.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,s.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:h.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,s.MZ)(_.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,s.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,u.K)("title"),(0,u.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,s.MZ)({type:v.A,json:{origins:{"web-scene":{write:{layerContainerTypes:h.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,u.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,s.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:h.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,c.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(90237),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),p=n(84952),d=n(10107),m=(n(44208),n(87811),n(36005)),f=n(40608),y=n(43937),g=n(83531),_=n(20655),v=n(80812),x=n(41318),M=n(10407);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new v.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([n.e(5356),n.e(1204)]).then(n.bind(n,41204));return(0,h.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===n.id;if(r&&n.portal.user)return(0,M.It)(n);let i,s;if(r)i=n.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!i||!(0,p.b8)(i,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,l=!1,c=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:c}};try{if(r?await n.reload():(n=new v.default({id:e,portal:{url:i}}),await n.load(t)),n.portal.user)return(0,M.It)(n)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:c}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?x.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},85648:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,r.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},79677:(e,t,n)=>{n.d(t,{A:()=>d});var r,i=n(90237),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),c=n(40608),u=n(43937),h=n(56400);let p=r=class extends o.oY{static get allTime(){return m}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,e,t));let i=this.end;if(i){const n=(0,s.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=n?s=i:t>=i&&t<=o&&(s=t),n>=i&&n<=o?a=n:o>=t&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,n)),null!=a&&(i.end=(0,s.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],p.prototype,"writeStart",null),p=r=(0,i._)([(0,c.$)("esri.time.TimeExtent")],p);const d=p,m=new p,f=new p({start:void 0,end:void 0})},92935:(e,t,n)=>{var r;n.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7899,3069],{11006:(e,t,n)=>{function r(e,t,n,r,o){i(e,t,n||0,r||e.length-1,o||s)}function i(e,t,n,r,s){for(;r>n;){if(r-n>600){var a=r-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(r,Math.floor(t+(a-l)*u/a+h)),s)}var p=e[t],d=n,m=r;for(o(e,n,t),s(e[r],p)>0&&o(e,n,r);d<m;){for(o(e,d,m),d++,m--;s(e[d],p)<0;)d++;for(;s(e[m],p)>0;)m--}0===s(e[n],p)?o(e,n,m):o(e,++m,r),m<=t&&(n=m+1),t<=m&&(r=m-1)}}function o(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function s(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>r})},69540:(e,t,n)=>{n.d(t,{O:()=>u,P:()=>h});var r=n(90237),i=n(69622),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(35666),l=n(88620),c=n(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},i=new Map;for(const e in t){const s=t[e],l=n?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,o.TU)(u),null!=u&&null==h||(l===a.Gr.DEFAULTS?i.set(e,h):r[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,n]of i)e.set(t,n,a.Gr.DEFAULTS)}return c}};return t=(0,r._)([(0,c.$)("esri.core.Clonable")],t),t};let h=class extends(u(i.A)){};h=(0,r._)([(0,c.$)("esri.core.Clonable")],h)},4902:(e,t,n)=>{n.d(t,{PH:()=>a,sA:()=>s});var r=n(90237),i=n(40608);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(s(class{})){};l=(0,r._)([(0,i.$)("esri.core.Identifiable")],l)},92071:(e,t,n)=>{n.d(t,{P:()=>v,L:()=>x});var r=n(90237),i=n(69622),o=n(76953),s=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((e,n)=>{t.set(n,(0,s.o8)(e),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach(((r,i)=>{e&&e.has(i)||t.set(i,(0,s.o8)(r),n)}))}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=a.Gr.USER){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=a.Gr.USER){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var c=n(45917),u=n(88620),h=n(40608);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),n=t.store,r=new l;t.store=r,(0,o.k)(t,n,r)}read(e,t){(0,c.L)(this,e,t)}getAtOrigin(e,t){const n=d(this),r=(0,a.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach((e=>{i[e]=n.get(e,r)})),i}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const n=d(this),r=(0,a.aB)(t),i=(0,u.oY)(this);let o;o="string"==typeof e?"*"===e?n.keys(r):[e]:e,o.forEach((e=>{i.invalidate(e),n.revert(e,r),i.commit(e)}))}};return t=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,u.oY)(e).store}let m=class extends(p(i.A)){};m=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var f=n(16649),y=n(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return _(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(n))}removeOrigin(e){const t=_(this),n=(0,a.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),a.Gr.USER)}updateOrigin(e,t){const n=_(this),r=(0,a.aB)(t),i=(0,f.Jt)(this,e);for(let t=r+1;t<a.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function _(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(g(p(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],t),t};let x=class extends(v(i.A)){};x=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],x)},43668:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const i=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(u){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,o.zf)(e))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t,n,r,i,o,s,a,l){return[e,t,n,r,i,o,s,a,l]}n.d(t,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:i},Symbol.toStringTag,{value:"Module"}))},48163:(e,t,n)=>{function r(){return[0,0]}function i(e,t){return[e,t]}function o(){return i(1,1)}function s(){return i(1,0)}function a(){return i(0,1)}n.d(t,{Un:()=>l,fA:()=>i,vt:()=>r});const l=o(),c=s(),u=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:c,UNIT_Y:u,ZEROS:[0,0],clone:function(e){return[e[0],e[1]]},create:r,createView:function(e,t){return new Float64Array(e,t,2)},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:i,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},77690:(e,t,n)=>{n.d(t,{B8:()=>a,Ge:()=>p,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>u,lw:()=>c,mg:()=>s,z0:()=>i});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function o(e,t,n,r,i,o,s,a,l,c){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s,e[6]=a,e[7]=l,e[8]=c,e}function s(e,t){if(e===t){const n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l;let m=n*h+r*p+i*d;return m?(m=1/m,e[0]=h*m,e[1]=(-u*r+i*c)*m,e[2]=(a*r-i*s)*m,e[3]=p*m,e[4]=(u*n-i*l)*m,e[5]=(-a*n+i*o)*m,e[6]=d*m,e[7]=(-c*n+r*l)*m,e[8]=(s*n-r*o)*m,e):null}function l(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8];return e[0]=s*u-a*c,e[1]=i*c-r*u,e[2]=r*a-i*s,e[3]=a*l-o*u,e[4]=n*u-i*l,e[5]=i*o-n*a,e[6]=o*c-s*l,e[7]=r*l-n*c,e[8]=n*s-r*o,e}function c(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1],m=n[2],f=n[3],y=n[4],g=n[5],_=n[6],v=n[7],x=n[8];return e[0]=p*r+d*s+m*c,e[1]=p*i+d*a+m*u,e[2]=p*o+d*l+m*h,e[3]=f*r+y*s+g*c,e[4]=f*i+y*a+g*u,e[5]=f*o+y*l+g*h,e[6]=_*r+v*s+x*c,e[7]=_*i+v*a+x*u,e[8]=_*o+v*l+x*h,e}function u(e,t,n){const r=n[0],i=n[1],o=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=o*t[6],e[7]=o*t[7],e[8]=o*t[8],e}function h(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=n+n,a=r+r,l=i+i,c=n*s,u=r*s,h=r*a,p=i*s,d=i*a,m=i*l,f=o*s,y=o*a,g=o*l;return e[0]=1-h-m,e[3]=u-g,e[6]=p+y,e[1]=u+g,e[4]=1-c-m,e[7]=d-f,e[2]=p-y,e[5]=d+f,e[8]=1-c-h,e}function p(e,t){const n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],u=t[8],h=t[9],p=t[10],d=t[11],m=t[12],f=t[13],y=t[14],g=t[15],_=n*a-r*s,v=n*l-i*s,x=n*c-o*s,M=r*l-i*a,w=r*c-o*a,b=i*c-o*l,S=u*f-h*m,A=u*y-p*m,I=u*g-d*m,P=h*y-p*f,L=h*g-d*f,T=p*g-d*y;let O=_*T-v*L+x*P+M*I-w*A+b*S;return O?(O=1/O,e[0]=(a*T-l*L+c*P)*O,e[1]=(l*I-s*T-c*A)*O,e[2]=(s*L-a*I+c*S)*O,e[3]=(i*L-r*T-o*P)*O,e[4]=(n*T-i*I+o*A)*O,e[5]=(r*I-n*L-o*S)*O,e[6]=(f*b-y*w+g*M)*O,e[7]=(y*x-m*b-g*v)*O,e[8]=(m*w-f*x+g*_)*O,e):null}function d(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const m=c,f=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*(c*o-s*l)+n*(-c*i+s*a)+r*(l*i-o*a)},equals:function(e,t){const n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=t[0],d=t[1],m=t[2],f=t[3],y=t[4],g=t[5],_=t[6],v=t[7],x=t[8],M=(0,r.FD)();return Math.abs(n-p)<=M*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-d)<=M*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-m)<=M*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(s-f)<=M*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(a-y)<=M*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(l-g)<=M*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(c-_)<=M*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-v)<=M*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(h-x)<=M*Math.max(1,Math.abs(h),Math.abs(x))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:i,fromQuat:h,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:a,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8];return Math.abs(1-(n*n+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+u*u))<=t&&Math.abs(1-(o*o+l*l+h*h))<=t},mul:m,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:p,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],i=t[2],o=t[4],s=t[5],a=t[6],l=t[8],c=t[9],u=t[10],h=u*s-a*c,p=-u*o+a*l,d=c*o-s*l,m=n*h+r*p+i*d;if(!m)return null;const f=1/m;return e[0]=h*f,e[1]=(-u*r+i*c)*f,e[2]=(a*r-i*s)*f,e[3]=p*f,e[4]=(u*n-i*l)*f,e[5]=(-a*n+i*o)*f,e[6]=d*f,e[7]=(-c*n+r*l)*f,e[8]=(s*n-r*o)*f,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=Math.sin(n),d=Math.cos(n);return e[0]=d*r+p*s,e[1]=d*i+p*a,e[2]=d*o+p*l,e[3]=d*s-p*r,e[4]=d*a-p*i,e[5]=d*l-p*o,e[6]=c,e[7]=u,e[8]=h,e},scale:u,scaleByVec2:function(e,t,n){const r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e},set:o,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:f,subtract:d,translate:function(e,t,n){const r=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],p=n[0],d=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=s,e[4]=a,e[5]=l,e[6]=p*r+d*s+c,e[7]=p*i+d*a+u,e[8]=p*o+d*l+h,e},transpose:s},Symbol.toStringTag,{value:"Module"}))},37585:(e,t,n)=>{n.d(t,{C:()=>i,Cc:()=>y,Io:()=>h,S8:()=>f,WQ:()=>s,e$:()=>_,hZ:()=>o,hs:()=>u,jb:()=>x,l0:()=>g});var r=n(34304);function i(e,t){return e[0]=t[0],e[1]=t[1],e}function o(e,t,n){return e[0]=t,e[1]=n,e}function s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function a(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function u(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function h(e,t){const n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function p(e,t){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function d(e){const t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function m(e){const t=e[0],n=e[1];return t*t+n*n}function f(e,t){const n=t[0],r=t[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e}function y(e,t,n,r){const i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function g(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function _(e,t,n,r){const i=t[0]-n[0],o=t[1]-n[1],s=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*s+n[0],e[1]=i*s+o*a+n[1],e}const v=d,x=a,M=l,w=c,b=h,S=p,A=m;Object.freeze(Object.defineProperty({__proto__:null,add:s,angle:function(e,t){const n=e[0],r=e[1],i=t[0],o=t[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:i,cross:function(e,t,n){const r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e},dist:b,distance:h,div:w,divide:c,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const n=e[0],i=e[1],o=t[0],s=t[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:v,length:d,lerp:y,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:f,projectAndScale:function(e,t,n,r,i){let o=t[0]-n[0],s=t[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,e[0]=t[0]+o,e[1]=t[1]+s,e},random:function(e,t=1){const n=2*(0,r.Ov)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},rotate:_,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:u,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e},set:o,sqrDist:S,sqrLen:A,squaredDistance:p,squaredLength:m,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:x,subtract:a,transformMat2:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e},transformMat2d:g,transformMat3:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e},transformMat4:function(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,n)=>{n.d(t,{E:()=>S,w:()=>s});var r=n(4576),i=(n(44208),n(3694)),o=n(11006);class s{constructor(e=9,t){this._compareMinX=h,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(),M.prune(),w.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(_(e,n))for(x.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):g(e,s)?a(o,t):x.push(o))}n=x.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||g(e,o))return!0;x.push(i)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;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 I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(w.clear(),b.clear();n||w.length>0;){if(n||(n=w.pop(),i=w.data[w.length-1],o=b.pop()??0,s=!0),n.leaf&&(t=(0,r.qh)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),w.push(n),this._condense(w),this;s||n.leaf||!g(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(w.push(n),b.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new P([]);s.height=r;const a=Math.ceil(i/o),c=a*Math.ceil(Math.sqrt(o));v(e,t,n,c,this._compareMinX);for(let i=t;i<=n;i+=c){const t=Math.min(i+c-1,n);v(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){const i=Math.min(n+a-1,t);s.children.push(this._build(e,n,i,r-1))}}return l(s,this._toBBox),s}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);w.clear();const o=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=d(s),l=f(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}(i,this._data,t,w);for(o.children.push(e),u(o,i);t>=0&&w.data[t].children.length>this._maxEntries;)this._split(w,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)u(t.data[r],e)}(i,w,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new P(s);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new P([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=c(e,0,s,this._toBBox),a=c(e,s,n,this._toBBox),l=y(t,a),u=d(t)+d(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:h,i=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=c(e,0,t,i),s=c(e,n-t,n,i);let a=m(o)+m(s);for(let r=t;r<n-t;r++){const t=e.children[r];u(o,e.leaf?i(t):t),a+=m(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];u(s,e.leaf?i(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else l(n,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 a(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else M.pushArray(n.children);n=M.pop()??null}}function l(e,t){c(e,0,e.children.length,t,e)}function c(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],u(i,e.leaf?r(o):o);return i}function u(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 h(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(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 n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const x=new i.A,M=new i.A,w=new i.A,b=new i.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class P extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,n)=>{n.d(t,{C_:()=>p,OH:()=>f,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>c}),n(60999),n(5503);var r=n(37955),i=n(36563),o=n(97768),s=n(74887),a=n(14012);function l(e,t,n={}){return u(e,t,n,d)}function c(e,t,n={}){return u(e,t,n,m)}function u(e,t,n={},r){let i=null;const s=n.once?(e,n)=>{r(e)&&((0,o.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,s,n.sync,n.equals),n.initial){const t=e();s(t,t)}return i}function h(e,t,n,s={}){let a=null,c=null,u=null;function h(){a&&c&&(c.remove(),s.onListenerRemove?.(a),a=null,c=null)}function p(e){s.once&&s.once&&(0,o.xt)(u),n(e)}const d=l(e,((e,n)=>{h(),(0,r.wb)(e)&&(a=e,c=(0,r.on)(e,t,p),s.onListenerAdd?.(e))}),{sync:s.sync,initial:!0});return u=(0,i.hA)((()=>{d.remove(),h()})),u}function p(e,t){return function(e,t,n){if((0,s.G4)(n))return Promise.reject((0,s.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,o.xt)(a)}return new Promise(((r,o)=>{a=(0,i.vE)([(0,s.u7)(n,(()=>{l(),o((0,s.NK)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??d)])}))}(e,m,t)}function d(e){return!0}function m(e){return!!e}n(80559);const f={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},13069:(e,t,n)=>{n.d(t,{lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)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 o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}},80754:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},4146:(e,t,n)=>{n.d(t,{A:()=>x});var r=n(90237),i=(n(59456),n(78888)),o=n(49186),s=n(65529),a=n(4902),l=n(92474),c=n(53966),u=n(74887),h=n(84952),p=n(10107),d=(n(44208),n(87811),n(40608)),m=n(92602),f=n(79677),y=n(5443),g=n(16930);let _=0,v=class extends(s.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(t)}catch(e){const n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r._)([(0,p.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,p.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,p.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,p.MZ)({type:f.A})],v.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,d.$)("esri.layers.Layer")],v);const x=v},87899:(e,t,n)=>{n.r(t),n.d(t,{default:()=>mt});var r=n(90237),i=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),c=n(10107),u=n(79901),h=(n(87811),n(44208),n(36005)),p=n(40608),d=n(43937),m=n(35666),f=n(4146),y=n(63074),g=n(16131),_=n(8303),v=n(25036),x=n(69540),M=n(25482),w=n(77690),b=n(29242),S=n(37585),A=n(38954);const I=(0,n(51850).vt)(),P=(0,b.vt)(),L=(0,b.vt)(),T=(0,b.vt)();function O(e,t,n){return(0,A.s)(I,t[0],t[1],1),(0,A.t)(I,I,(0,w.mg)(P,n)),0===I[2]?(0,S.hZ)(e,I[0],I[1]):(0,S.hZ)(e,I[0]/I[2],I[1]/I[2])}function E(e,t,n){return R(L,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(T,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(e,(0,w.KC)(L,L),T),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,r,i,o,s,a,l){(0,w.hZ)(e,t,r,o,n,i,s,1,1,1),(0,A.s)(I,a,l,1),(0,w.KC)(P,e);const[c,u,h]=(0,A.t)(I,I,(0,w.mg)(P,P));return(0,w.hZ)(P,c,0,0,0,u,0,0,0,h),(0,w.lw)(e,P,e)}var B=n(90629),Z=n(48163),G=n(86738),C=n(39829),j=n(57251),U=n(16930);let N=class extends x.P{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:r}=(0,j.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};N=(0,r._)([(0,p.$)("esri.layers.support.GeoreferenceBase")],N);const $=N,Y=(0,b.vt)(),D=(0,Z.vt)();let X=class extends M.oY{};(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"x",void 0),(0,r._)([(0,c.MZ)({type:Number,json:{write:!0}})],X.prototype,"y",void 0),X=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let V=class extends x.P{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r._)([(0,c.MZ)()],V.prototype,"sourcePoint",void 0),(0,r._)([(0,c.MZ)({type:G.A})],V.prototype,"mapPoint",void 0),V=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],V);let H=class extends((0,M.Te)($)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=U.A.fromJSON(t.spatialReference),r=(0,b.fA)(...t.coefficients,1);return e.map((e=>((0,S.hZ)(D,e.x,e.y),O(D,D,r),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:n})})))}writeControlPoints(e,t,n,r){if(null!=this.transform)null!=e&&F(e[0])&&(t.controlPoints=e.map((e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}})),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8));else{const e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(Y);if(null==e||!F(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){const i=(0,Z.fA)(0,n),o=(0,Z.fA)(0,0),s=(0,Z.fA)(t,0),a=(0,Z.fA)(t,n);return O(i,i,e),O(o,o,e),O(s,s,e),O(a,a,e),new C.A({rings:[[i,o,s,a,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!F(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=e,l={sourcePoint:(0,B.tc)(0,r),mapPoint:new G.A({x:i[0],y:i[1],spatialReference:t})},c={sourcePoint:(0,B.tc)(0,0),mapPoint:new G.A({x:o[0],y:o[1],spatialReference:t})},u={sourcePoint:(0,B.tc)(n,0),mapPoint:new G.A({x:s[0],y:s[1],spatialReference:t})},h={sourcePoint:(0,B.tc)(n,r),mapPoint:new G.A({x:a[0],y:a[1],spatialReference:t})};F(l)&&F(c)&&F(u)&&F(h)&&(re(Y,l,c,u,h),this.controlPoints=this.controlPoints.map((({sourcePoint:e})=>((0,S.hZ)(D,e.x,e.y),O(D,D,Y),{sourcePoint:e,mapPoint:new G.A({x:D[0],y:D[1],spatialReference:t})}))))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,b.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!F(this.controlPoints[0]))return null;(0,S.hZ)(D,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return O(D,D,this.transform),new G.A({x:D[0],y:D[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!F(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,j.projectOrLoad)(e,t).geometry)?null:((0,S.hZ)(D,e.x,e.y),O(D,D,this.inverseTransform),(0,B.tc)(D[0],D[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;const[i,o,s,a]=t;if(!F(i))return null;const l=i.mapPoint.spatialReference,c=this._projectControlPoint(o,l),u=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!F(c.controlPoint))return null;null==e&&(e=(0,b.vt)());let p=null;return p=F(u.controlPoint)&&F(h.controlPoint)?re(e,i,c.controlPoint,u.controlPoint,h.controlPoint):F(u.controlPoint)?function(e,t,n,r){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),(0,S.Cc)(q,W,z,.5),(0,S.e$)(q,k,q,Math.PI),(0,S.Cc)(ee,K,J,.5),(0,S.e$)(ee,Q,ee,Math.PI),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint,u.controlPoint):function(e,t,n){return ne(W,K,t),ne(z,J,n),(0,S.e$)(k,z,W,te),(0,S.e$)(q,W,z,te),(0,S.e$)(Q,J,K,-te),(0,S.e$)(ee,K,J,-te),ae(e,W,z,k,q,K,J,Q,ee)}(e,i,c.controlPoint),p.every((e=>0===e))?null:p}_projectControlPoint(e,t){if(!F(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,j.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function F(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r._)([(0,c.MZ)({type:[V],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X]},coefficients:{type:[Number]},spatialReference:{type:U.A}}}}})],H.prototype,"controlPoints",void 0),(0,r._)([(0,h.w)("controlPoints")],H.prototype,"readControlPoints",null),(0,r._)([(0,d.K)("controlPoints")],H.prototype,"writeControlPoints",null),(0,r._)([(0,c.MZ)({clonable:!1})],H.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],H.prototype,"height",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],H.prototype,"inverseTransform",null),(0,r._)([(0,c.MZ)({readOnly:!0})],H.prototype,"transform",null),(0,r._)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],H.prototype,"width",void 0),H=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],H);const W=(0,Z.vt)(),z=(0,Z.vt)(),k=(0,Z.vt)(),q=(0,Z.vt)(),K=(0,Z.vt)(),J=(0,Z.vt)(),Q=(0,Z.vt)(),ee=(0,Z.vt)(),te=Math.PI/2;function ne(e,t,n){(0,S.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,S.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function re(e,t,n,r,i){return ne(W,K,t),ne(z,J,n),ne(k,Q,r),ne(q,ee,i),ae(e,W,z,k,q,K,J,Q,ee)}const ie=new Array(8).fill(0),oe=new Array(8).fill(0);function se(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function ae(e,t,n,r,i,o,s,a,l){return E(e,se(ie,t,n,r,i),se(oe,o,s,a,l))}const le=H;var ce=n(78888),ue=n(43668),he=n(84952),pe=n(13069),de=n(4902),me=n(92474);const fe=(0,Z.vt)();let ye=class extends ${constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;const i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new C.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[r,i,o,s]]}=e;this.bottomLeft=new G.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new G.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new G.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new G.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;const o=t.spatialReference;e=e.normalize();const s=(0,j.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,S.hZ)(fe,s.x,s.y);const a=E((0,b.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return O(fe,fe,a),(0,B.tc)(fe[0],fe[1])}};(0,r._)([(0,c.MZ)({clonable:!1})],ye.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"bottomRight",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topLeft",void 0),(0,r._)([(0,c.MZ)({type:G.A})],ye.prototype,"topRight",void 0),ye=(0,r._)([(0,p.$)("esri.layers.support.CornersGeoreference")],ye);const ge=ye;var _e=n(34727),ve=n(34304),xe=n(5443);let Me=class extends ${constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=we(i,s,this.rotation);o=[a(e,t),a(e,r),a(n,r),a(n,t)],o.push(o[0])}else o=[[e,t],[e,r],[n,r],[n,t],[e,t]];return new C.A({rings:[o],spatialReference:i})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,a=(0,_e.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=we(o,s,-a),[c,u]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new xe.A({xmin:c,ymin:u,xmax:h,ymax:p,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,j.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=we(a.x,a.y,-n)(u,h)),(0,B.tc)((0,_e.hs)(u,r,o,0,1),(0,_e.hs)(h,s,i,0,1))}};function we(e,t,n){const r=(0,ve.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}(0,r._)([(0,c.MZ)({clonable:!1})],Me.prototype,"coords",null),(0,r._)([(0,c.MZ)({type:xe.A})],Me.prototype,"extent",void 0),(0,r._)([(0,c.MZ)({type:Number})],Me.prototype,"rotation",void 0),Me=(0,r._)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],Me);const be=Me;n(59456);var Se=n(21325);function Ae(e,t){const n=(0,m.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>m.Gr.PORTAL_ITEM}const Ie={key:"type",base:$,typeMap:{"control-points":le,corners:ge,"extent-and-rotation":be}},Pe={key:"type",base:$,typeMap:{"control-points":le}};let Le=class extends((0,de.PH)((0,a.P)(me.A))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return le.fromJSON(e)}writeGeoreference(e,t,n,r){const i=r?.resources?.pendingOperations,a=()=>{const i=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:r}=e;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new le({controlPoints:[{mapPoint:new G.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,n)},{mapPoint:new G.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,B.tc)(0,0)},{mapPoint:new G.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,0)},{mapPoint:new G.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,B.tc)(t,n)}],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length&&r?.messages)return void r.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=i.write({},r)}};if("control-points"!==e.type&&!this.loaded&&i)return t[n]={},void i.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;const i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r._)([(0,c.MZ)({types:Ie,json:{write:!0,types:Pe}})],Le.prototype,"georeference",void 0),(0,r._)([(0,h.w)("georeference")],Le.prototype,"readGeoreference",null),(0,r._)([(0,d.K)("georeference")],Le.prototype,"writeGeoreference",null),(0,r._)([(0,c.MZ)({json:{read:!1,write:!1}})],Le.prototype,"opacity",void 0),Le=(0,r._)([(0,p.$)("esri.layers.support.MediaElementBase")],Le);const Te=Le;var Oe=n(85648),Ee=n(97159);let Re=class extends Te{constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,ue.M5)(e).then((e=>{this._set("content",e)}));this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then((()=>{this._set("content",e)}));this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Ee.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Ee.t)(e,r)));const s=function(e){return"string"==typeof e&&!(0,he.DB)(e)&&!(0,he.w8)(e)}(e)?e:null;if(s){if(null==(0,Ee.i)(s))return void(t[n]=s);const e=(0,Ee.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Ee.M.NO);if(i&&e&&!(0,he.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,he.DB)(e)?(0,he.N9)(e):(await(0,ce.A)(e,{responseType:"blob"})).data:new Promise((t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t)))}(e).then((e=>{const r=function(e,t){const n=(0,pe.lk)(),r=`${(0,he.fj)("media",n)}.${(0,Oe.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})})))}write(e,t){const n=super.write(e,t);return"mediaType"in n&&!n.url&&delete n.mediaType,n}};(0,r._)([(0,c.MZ)()],Re.prototype,"animationOptions",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],Re.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)({json:{name:"url",type:String,write:{overridePolicy:(e,t,n)=>({enabled:!Ae(n?.layer,n?.origin)})}}})],Re.prototype,"image",void 0),(0,r._)([(0,h.w)("image",["url"])],Re.prototype,"readImage",null),(0,r._)([(0,d.K)("image")],Re.prototype,"writeImage",null),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:{target:"mediaType",ignoreOrigin:!0}}})],Re.prototype,"type",void 0),Re=(0,r._)([(0,p.$)("esri.layers.support.ImageElement")],Re);const Be=Re;var Ze=n(62885),Ge=n(65529),Ce=n(61893),je=n(36708),Ue=n(19419),Ne=n(12176),$e=n(6518),Ye=n(69622),De=n(537),Xe=n(95108),Ve=n(65864),He=n(80754);function Fe(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,He.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,He.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,He.kd)(r,t);e.x+=n*(-2*t)}else if(r<n){const t=(0,He.kd)(r,n);e.x+=t*(-2*n)}}return e}function We(e,t){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=ze(e.xmin,t),{x:p,frameId:d}=ze(e.xmax,t),m=u===p&&a>0;if(a>2*c){const e={xmin:o<s?u:p,ymin:r,xmax:c,ymax:i},t={xmin:l,ymin:r,xmax:o<s?p:u,ymax:i},a={xmin:0,ymin:r,xmax:c,ymax:i},m={xmin:l,ymin:r,xmax:0,ymax:i},f=[],y=[];ke(e,a)&&f.push(h),ke(e,m)&&y.push(h),ke(t,a)&&f.push(d),ke(t,m)&&y.push(d);for(let e=h+1;e<d;e++)f.push(e),y.push(e);n.push(new Je(e,[h]),new Je(t,[d]),new Je(a,f),new Je(m,y))}else u>p||m?n.push(new Je({xmin:u,ymin:r,xmax:c,ymax:i},[h]),new Je({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new Je({xmin:u,ymin:r,xmax:p,ymax:i},[h]));return n}function ze(e,t){const[n,r]=t.valid,i=2*r;let o,s=0;return e>r?(o=Math.ceil(Math.abs(e-r)/i),e-=o*i,s=o):e<n&&(o=Math.ceil(Math.abs(e-n)/i),e+=o*i,s=-o),{x:e,frameId:s}}function ke(e,t){const{xmin:n,ymin:r,xmax:i,ymax:o}=t;return qe(e,n,r)&&qe(e,n,o)&&qe(e,i,o)&&qe(e,i,r)}function qe(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function Ke(e,t,n=!0){const r=!(0,Ve.Rg)(e);if(r&&(0,Xe.m3)(e),n)return(new et).cut(e,t);const i=r?e.rings:e.paths,o=r?4:2,s=i.length,a=-2*t;for(let e=0;e<s;e++){const t=i[e];if(t&&t.length>=o){const e=[];for(const n of t)e.push([n[0]+a,n[1]]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class Je{constructor(e,t){this.extent=e,this.frameIds=t}}const Qe=(0,Ue.vt)();class et{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const r=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide==-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(tt(this._lineIn,n<=0?e:this._xCut,t),tt(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function tt(e,t,n){const r=e.length;r>1&&e[r-1][0]===t&&e[r-2][0]===t?e[r-1][1]=n:e.push([t,n])}let nt=class extends Ye.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Ue.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,j.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return C.A.fromJSON(function(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,Se.Vp)(n),i=(0,M.Wj)(e)?e.toJSON():e;if(!r)return i;const o=(0,Se.K8)(n)?102100:4326,s=He.j7[o].maxX,a=He.j7[o].minX;if((0,Ve.fT)(i))return Fe(i,s,a);if((0,Ve.U9)(i))return i.points=i.points.map((e=>Fe(e,s,a))),i;if((0,Ve.ZC)(i))return function(e,t){if(!t)return e;const n=We(e,t).map((e=>e.extent));return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}}(i,r);if((0,Ve.Bi)(i)||(0,Ve.Rg)(i)){const e=(0,De.Rg)(Qe,i),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,He.kd)(n.xmin,a)*(2*s),o=0===r?i:(0,He.kS)(i,r);return n.xmin+=r,n.xmax+=r,n.xmax>s?Ke(o,s,t):n.xmin<a?Ke(o,a,t):o}return i}(this.coords,!0))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Ue.VY)(e):null}};(0,r._)([(0,c.MZ)()],nt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"element",void 0),(0,r._)([(0,c.MZ)()],nt.prototype,"bounds",null),(0,r._)([(0,c.MZ)()],nt.prototype,"coords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedCoords",null),(0,r._)([(0,c.MZ)()],nt.prototype,"normalizedBounds",null),nt=(0,r._)([(0,p.$)("esri.layers.support.MediaElementView")],nt);var rt=n(37955);let it=class extends Te{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if("string"==typeof e){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,t.playsInline=!0,this.addResolvingPromise(this._loadVideo(t).then((()=>{this._set("content",t)})))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(e){return new Promise(((t,n)=>{const r=(0,rt.Oo)(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,n):t()}));this.addHandles(r,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",e.src?.includes("blob:")||(e.src=e.src))}))}};(0,r._)([(0,c.MZ)()],it.prototype,"autoplay",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"content",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentWidth",null),(0,r._)([(0,c.MZ)({readOnly:!0})],it.prototype,"contentHeight",null),(0,r._)([(0,c.MZ)()],it.prototype,"video",null),it=(0,r._)([(0,p.$)("esri.layers.support.VideoElement")],it);const ot=it,st={key:"type",defaultKeyValue:"image",base:Te,typeMap:{image:Be,video:ot}},at=i.A.ofType(st);let lt=class extends(me.A.LoadableMixin((0,Ce.g)(Ge.A.EventedAccessor))){constructor(e){super(e),this._index=new $e.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new nt({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const r=(0,je.wB)((()=>e.coords),(()=>this._updateIndexForElement(e,!1)));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach(((e,t)=>this._elementsIndexes.set(e,t))),this.emit("refresh")},this.elements=new at}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find((e=>null!=e.georeference?.coords));this._set("spatialReference",e?e.georeference.coords.spatialReference:U.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",(0,Ze.V)(e,this._get("elements"),at))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new xe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,j.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,Se.aI)(e.spatialReference,this.spatialReference)?e:(0,j.project)(e,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const e of r)this._index.forEachInBounds((0,Ue.VY)(e),(({normalizedCoords:t,element:n})=>{null!=t&&(0,Ne.fA)(e,t)&&i.push(n)}));return i.sort(((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t))),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r!==i?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,r._)([(0,c.MZ)()],lt.prototype,"elements",null),(0,r._)([(0,c.MZ)({readOnly:!0})],lt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)()],lt.prototype,"spatialReference",null),lt=(0,r._)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],lt);const ct=lt;var ut=n(92935);function ht(e){return"object"==typeof e&&null!=e&&"type"in e}function pt(e){return ht(e)&&"image"===e.type}let dt=class extends((0,y.dM)((0,v.j)((0,g.q)((0,_.A)((0,a.P)(f.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(e){case ut.X.SAVE:return i(this,t);case ut.X.SAVE_AS:return o(this,r,t)}})),this.source=new ct}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const r=ht(t)?new ct({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new ct({elements:new i.A(e)}):e instanceof i.A?new ct({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof ct){const t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}pt(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(ut.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ut.X.SAVE_AS,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Be;case"video":return new ot}return null}_getSourceOverride(e,t){if(ht(e)&&this.originIdOf("source")===m.Gr.PORTAL_ITEM&&t&&(this.originIdOf("georeference")===m.Gr.WEB_MAP||this.originIdOf("georeference")===m.Gr.WEB_SCENE)){const n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"effectiveSource",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],dt.prototype,"georeference",void 0),(0,r._)([(0,h.w)("web-document","georeference")],dt.prototype,"readGeoreference",null),(0,r._)([(0,c.MZ)({type:String})],dt.prototype,"copyright",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"fullExtent",null),(0,r._)([(0,c.MZ)({type:["MediaLayer"]})],dt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)({type:["show","hide"]})],dt.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image"]},georeference:{type:le}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Ae(this,n?.origin)&&pt(e)&&!!e.georeference&&e.originIdOf("georeference")>m.Gr.PORTAL_ITEM}}}}})],dt.prototype,"source",null),(0,r._)([(0,u.w)("source")],dt.prototype,"castSource",null),(0,r._)([(0,h.w)("source",["url"])],dt.prototype,"readSource",null),(0,r._)([(0,d.K)("source")],dt.prototype,"writeSource",null),(0,r._)([(0,c.MZ)()],dt.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],dt.prototype,"type",void 0),dt=(0,r._)([(0,p.$)("esri.layers.MediaLayer")],dt);const mt=dt},6518:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={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 i.w(9,(0,r.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(((n,r)=>{e[t++]=r})),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,o.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,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(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()))}}},16131:(e,t,n)=>{n.d(t,{q:()=>x});var r=n(90237),i=n(49186),o=n(84952),s=n(10107),a=n(56507),l=(n(87811),n(44208),n(36005)),c=n(40608),u=n(43937),h=n(89317),p=n(45917),d=n(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},y={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":f,"web-map/tables":y,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":f,"link-chart/tables":y,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var _=n(10873),v=n(79677);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,n){return"Group Layer"===n?.portalItem?.type?void 0:e}writeListMode(e,t,n,r){(r&&"ground"===r.layerContainerType||e&&(0,d.R)(this,n,{},r))&&(t[n]=e)}writeOperationalLayerType(e,t,n,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?v.A.fromArray(e):null}writeTimeExtent(e,t,n,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new i.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[n]=e.toArray())}read(e,t){t&&(t.layer=this),(0,p.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,n=g[e];let r=!!n?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new i.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const n=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof i.A&&"web-document-write:property-required"===e.name)).length;return(0,o.w8)(n?.url)?(t?.messages?.push(new i.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:n}beforeSave(){}};return(0,r._)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,s.MZ)(_.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,u.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,s.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:h.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,s.MZ)(_.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,s.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,u.K)("title"),(0,u.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,s.MZ)({type:v.A,json:{origins:{"web-scene":{write:{layerContainerTypes:h.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,u.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,s.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:h.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,c.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(90237),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),p=n(84952),d=n(10107),m=(n(44208),n(87811),n(36005)),f=n(40608),y=n(43937),g=n(83531),_=n(20655),v=n(80812),x=n(41318),M=n(10407);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new v.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([n.e(5356),n.e(1204)]).then(n.bind(n,41204));return(0,h.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===n.id;if(r&&n.portal.user)return(0,M.It)(n);let i,s;if(r)i=n.portal.url;else try{i=await(0,g.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!i||!(0,p.b8)(i,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const a=!0,l=!1,c=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:c}};try{if(r?await n.reload():(n=new v.default({id:e,portal:{url:i}}),await n.load(t)),n.portal.user)return(0,M.It)(n)}catch(e){(0,h.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:c}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?x.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},85648:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,r.Zo)(e);return l[t]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e},79677:(e,t,n)=>{n.d(t,{A:()=>d});var r,i=n(90237),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),c=n(40608),u=n(43937),h=n(56400);let p=r=class extends o.oY{static get allTime(){return m}static get empty(){return f}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,e,t));let i=this.end;if(i){const n=(0,s.lL)(i,e,t);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,a;return i>=t&&i<=n?s=i:t>=i&&t<=o&&(s=t),n>=i&&n<=o?a=n:o>=t&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(e,t,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,e,t,n)),null!=a&&(i.end=(0,s.S1)(a,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,u.K)("start")],p.prototype,"writeStart",null),p=r=(0,i._)([(0,c.$)("esri.time.TimeExtent")],p);const d=p,m=new p,f=new p({start:void 0,end:void 0})},92935:(e,t,n)=>{var r;n.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8902],{79901:(t,e,n)=>{n.d(e,{w:()=>h});var i=n(56507),r=n(96156);const s=Object.prototype.toString;function a(t){const e="__accessorMetadata__"in t?(0,i.dp)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return o.apply(this,t)}}function o(t,e,n,i){(0,r.z4)(t,e).cast=i}function h(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===s.call(t[0])?a(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,n)=>{(0,r.z4)(e,t).cast=e[n]}}(t[0]):void 0}},36005:(t,e,n)=>{n.d(e,{w:()=>r});var i=n(10107);function r(t,e,n){let r,s;return void 0===e||Array.isArray(e)?(s=t,n=e,r=[void 0]):(s=e,r=Array.isArray(t)?t:[t]),(t,e)=>{const a=t.constructor.prototype;r.forEach((r=>{const o=(0,i.rM)(t,r,s);o.read&&"object"==typeof o.read||(o.read={}),o.read.reader=a[e],n&&(o.read.source=(o.read.source||[]).concat(n))}))}}},5443:(t,e,n)=>{n.d(e,{A:()=>M});var i,r=n(90237),s=n(799),a=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),h=n(91075),l=n(86738),m=n(16930),u=n(94078),c=n(12176),x=n(21325),f=n(28735);function y(t,e,n){return null==e?n:null==n?e:t(e,n)}let p=i=class extends h.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?m.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:r??m.A.WGS84}}static fromBounds(t,e){return new i({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),"point"===t.type?(0,u.qz)(this,t):"extent"===t.type&&(0,u.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,i=this.height*e;if(this.xmin+=n,this.ymin+=i,this.xmax-=n,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,x.aI)(e,n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),(0,c.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=y(Math.min,this.zmin,t.zmin),this.zmax=y(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=y(Math.min,this.mmin,t.mmin),this.mmax=y(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=y(Math.max,this.zmin,t.zmin),this.zmax=y(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=y(Math.max,this.mmin,t.mmin),this.mmax=y(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,x.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const i=e.isWebMercator?(0,f.ci)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(i.x=d(i.x,t).x),this.spatialReference=new m.A((0,s.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let e=null;const[n,i]=t.valid,r=this.xmin,s=this.xmax;return r>=n&&r<=i&&s>=n&&s<=i||(e=this.center),e}_normalize(t,e,n){const i=this.spatialReference;if(!i)return this;const r=n??(0,x.Vp)(i);if(null==r)return this;const s=this._getParts(r).map((t=>t.extent));if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(e)return s;let a=!0,o=!0;return s.forEach((t=>{t.hasZ||(a=!1),t.hasM||(o=!1)})),{rings:s.map((t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(a){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(o){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e})),hasZ:a,hasM:o,spatialReference:i}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:r,spatialReference:s}=this,a=this.width,o=this.xmin,h=this.xmax;let l;t=t||(0,x.Vp)(s);const[m,u]=t.valid;l=d(this.xmin,t);const c=l.x,f=l.frameId;l=d(this.xmax,t);const y=l.x,p=l.frameId,M=c===y&&a>0;if(a>2*u){const t=new i(o<h?c:y,n,u,r,s),a=new i(m,n,o<h?y:c,r,s),l=new i(0,n,u,r,s),x=new i(m,n,0,r,s),d=[],M=[];t.contains(l)&&d.push(f),t.contains(x)&&M.push(f),a.contains(l)&&d.push(p),a.contains(x)&&M.push(p);for(let t=f+1;t<p;t++)d.push(t),M.push(t);e.push({extent:t,frameIds:[f]},{extent:a,frameIds:[p]},{extent:l,frameIds:d},{extent:x,frameIds:M})}else c>y||M?e.push({extent:new i(c,n,u,r,s),frameIds:[f]},{extent:new i(m,n,y,r,s),frameIds:[p]}):e.push({extent:new i(c,n,y,r,s),frameIds:[f]});this.cache._parts=e}const n=this.hasZ,r=this.hasM;if(n||r){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}};function d(t,e){const[n,i]=e.valid,r=2*i;let s,a=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,a=s):t<n&&(s=Math.ceil(Math.abs(t-n)/r),t+=s*r,a=-s),{x:t,frameId:a}}(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"center",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasM",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasZ",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"height",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"width",null),(0,r._)([(0,a.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],p.prototype,"xmin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"xmax",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymax",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmax",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmax",void 0),p=i=(0,r._)([(0,o.$)("esri.geometry.Extent")],p),p.prototype.toJSON.isDefaultToJSON=!0;const M=p},91075:(t,e,n)=>{n.d(e,{A:()=>m});var i=n(90237),r=n(25482),s=n(10107),a=(n(44208),n(53966),n(87811),n(36005)),o=n(40608),h=n(16930);let l=class extends r.oY{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=h.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof h.A)return t;if(null!=t){const n=new h.A;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,i._)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i._)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasM",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasZ",void 0),(0,i._)([(0,s.MZ)({type:h.A,json:{write:!0},value:h.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i._)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i._)([(0,o.$)("esri.geometry.Geometry")],l);const m=l},86738:(t,e,n)=>{n.d(e,{A:()=>w});var i=n(90237),r=n(53966),s=n(10107),a=n(79901),o=(n(87811),n(44208),n(36005)),h=n(40608),l=n(43937),m=n(56507),u=n(91075),c=n(16930),x=n(21325),f=n(28735);function y({x:t,y:e,spatialReference:n},i=[0,0]){if(n){if((0,x.K8)(n))return(0,f.tD)(t,e,i);if((0,x.EA)(n))return i[0]=t,i[1]=e,i}return null}const p=[0,0];var d;const M=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let z=d=class extends u.A{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,i,s){let a;if(Array.isArray(t))a=t,s=e,t=a[0],e=a[1],n=a[2],i=a[3];else if(t&&"object"==typeof t){if(a=t,t=null!=a.x?a.x:a.longitude,e=null!=a.y?a.y:a.latitude,n=a.z,i=a.m,(s=a.spatialReference)&&"esri.geometry.SpatialReference"!==s.declaredClass&&(s=new c.A(s)),null!=a.longitude||null!=a.latitude)if(null==a.longitude)r.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==a.latitude)r.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!a.declaredClass&&s?.isWebMercator){const n=(0,f.je)(a.longitude,a.latitude,M);t=n[0],e=n[1]}}else g(n)?(s=n,n=null):g(i)&&(s=i,i=null);const o={x:t,y:e};return null==o.x&&null!=o.y?r.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==o.y&&null!=o.x&&r.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=s&&(o.spatialReference=s),null!=n&&(o.z=n),null!=i&&(o.m=i),o}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return t=this,y(t,p)?.[1]??null;var t}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,f.je)(n,t,M)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return t=this,y(t,p)?.[0]??null;var t}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,f.je)(t,e,M)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new d;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return d.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:i,m:r,spatialReference:s}=this,{z:a,m:o}=t;let{x:h,y:l,spatialReference:m}=t;if(!s.equals(m))if(s.isWebMercator&&m.isWGS84)[h,l]=(0,f.je)(h,l),m=s;else{if(!s.isWGS84||!m.isWebMercator)return!1;[h,l]=(0,f.tD)(h,l),m=s}return e===h&&n===l&&i===a&&r===o&&s.wkid===m.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,x.Vp)(this.spatialReference);if(!t)return this;let e=this.x;const[n,i]=t.valid,r=2*i;let s;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,i=t.y-e.y,r=null!=t.z&&null!=e.z?t.z-e.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i._)([(0,s.MZ)({readOnly:!0})],z.prototype,"cache",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasM",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasZ",null),(0,i._)([(0,s.MZ)({type:Number})],z.prototype,"latitude",null),(0,i._)([(0,s.MZ)({type:Number})],z.prototype,"longitude",null),(0,i._)([(0,s.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.w)((t=>isNaN(t)?t:(0,m.GB)(t)))],z.prototype,"x",void 0),(0,i._)([(0,l.K)("x")],z.prototype,"writeX",null),(0,i._)([(0,o.w)("x")],z.prototype,"readX",null),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],z.prototype,"y",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"z",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"m",void 0),z=d=(0,i._)([(0,h.$)("esri.geometry.Point")],z),z.prototype.toJSON.isDefaultToJSON=!0;const w=z},88582:(t,e,n)=>{var i;n.d(e,{_:()=>i}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(i||(i={}))},19419:(t,e,n)=>{n.d(e,{HY:()=>x,Ie:()=>y,Rj:()=>c,VY:()=>o,Wc:()=>m,aI:()=>d,fA:()=>a,fT:()=>l,gR:()=>f,gX:()=>u,qv:()=>M,vt:()=>r,w1:()=>h}),n(44208),n(34727);var i=n(5443);function r(t=g){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function a(t,e,n,i,s=r()){return s[0]=t,s[1]=e,s[2]=n,s[3]=i,s}function o(t,e=r()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function h(t,e){return new i.A({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}function l(t,e,n){if(null!=e)if("length"in e)p(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function m(t){return function(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}(t)*function(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}(t)}function u(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function c(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function x(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function f(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function y(t){return t?s(t,M):r(M)}function p(t){return null!=t&&4===t.length}function d(t,e){return p(t)&&p(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const M=[1/0,1/0,-1/0,-1/0],g=[0,0,0,0]},94078:(t,e,n)=>{n.d(e,{CW:()=>o,F8:()=>h,gH:()=>a,m3:()=>m,qz:()=>r,rL:()=>s,t1:()=>u});const i=[0,0];function r(t,e){return null!=e&&l(t,e.x,e.y,e.z)}function s(t,e){if(!e.points||e.points.length)return!1;for(const n of e.points)if(!o(t,n))return!1;return!0}function a(t,e){const{xmin:n,ymin:i,zmin:r,xmax:s,ymax:a,zmax:o}=e;return t.hasZ&&e.hasZ?l(t,n,i,r)&&l(t,n,a,r)&&l(t,s,a,r)&&l(t,s,i,r)&&l(t,n,i,o)&&l(t,n,a,o)&&l(t,s,a,o)&&l(t,s,i,o):l(t,n,i)&&l(t,n,a)&&l(t,s,a)&&l(t,s,i)}function o(t,e){return l(t,e[0],e[1])}function h(t,e){return l(t,e[0],e[1],e[2])}function l(t,e,n,i){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function m(t,e){return i[1]=e.y,i[0]=e.x,function(t,e){return u(t.rings,e)}(t,i)}function u(t,e){if(!t)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return c(!1,t,e);let n=!1;for(let i=0,r=t.length;i<r;i++)n=c(n,t[i],e);return n}function c(t,e,n){const[i,r]=n;let s=t,a=0;for(let t=0,n=e.length;t<n;t++){a++,a===n&&(a=0);const[o,h]=e[t],[l,m]=e[a];(h<r&&m>=r||m<r&&h>=r)&&o+(r-h)/(m-h)*(l-o)<i&&(s=!s)}return s}},95108:(t,e,n)=>{n.d(e,{$3:()=>l,Ng:()=>o,R3:()=>s,gR:()=>a,m3:()=>u,t9:()=>h});var i=n(4576),r=n(88582);function s(t,e){const n=e[0]-t[0],i=e[1]-t[1];if(t.length>2&&e.length>2){const r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}return Math.sqrt(n*n+i*i)}function a(t,e,n,i){const[r,s]=e,[a,o]=n,[h,l]=i,m=h-a,u=l-o,c=m*m+u*u,x=(r-a)*m+(s-o)*u,f=Math.min(1,Math.max(0,x/c));return t[0]=a+m*f,t[1]=o+u*f,t}function o(t,e,n,i,r,s){let a=n,o=i,h=r-a,l=s-o;if(0!==h||0!==l){const n=((t-a)*h+(e-o)*l)/(h*h+l*l);n>1?(a=r,o=s):n>0&&(a+=h*n,o+=l*n)}return h=t-a,l=e-o,h*h+l*l}function h(t,e){return function(t,e,n){const i=t[0]+n*(e[0]-t[0]),r=t[1]+n*(e[1]-t[1]);return t.length>2&&e.length>2?[i,r,t[2]+n*(e[2]-t[2])]:[i,r]}(t,e,.5)}function l(t,e=r._.X,n=r._.Y){let i=0;const s=t.length;let a=t[0];for(let r=1;r<s;r++){const s=t[r];i+=(s[e]-a[e])*(s[n]+a[n]),a=s}if(!m(t)){const r=t[0];i+=(r[e]-a[e])*(r[n]+a[n])}return i>=0}function m(t){const e=t.length;return e<3||(0,i.aI)(t[0],t[e-1])}function u(t){if(!("rings"in t))return!1;let e=!1;for(const n of t.rings)m(n)||(n.push(n[0].slice()),e=!0);return e}n(21325)},12176:(t,e,n)=>{n.d(e,{A3:()=>p,Ql:()=>M,fA:()=>x,xB:()=>s,xK:()=>g});var i=n(94078);function r(t,e){return(0,i.qz)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let i,r,s;if(t.xmin<=e.xmin){if(i=e.xmin,t.xmax<i)return!1}else if(i=t.xmin,e.xmax<i)return!1;if(t.ymin<=e.ymin){if(r=e.ymin,t.ymax<r)return!1}else if(r=t.ymin,e.ymax<r)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function a(t,e){const{points:n,hasZ:r}=e,s=r?i.F8:i.CW;for(const e of n)if(s(t,e))return!0;return!1}const o=[0,0],h=[0,0],l=[0,0],m=[0,0],u=[o,h,l,m],c=[[l,o],[o,h],[h,m],[m,l]];function x(t,e){return function(t,e){o[0]=t.xmin,o[1]=t.ymax,h[0]=t.xmax,h[1]=t.ymax,l[0]=t.xmin,l[1]=t.ymin,m[0]=t.xmax,m[1]=t.ymin;for(const t of u)if((0,i.t1)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,i.CW)(t,e))return!0;for(let r=1;r<n.length;r++){const s=n[r];if((0,i.CW)(t,s)||d(e,s,c))return!0;e=s}}return!1}(t,e.rings)}function f(t,e){o[0]=t.xmin,o[1]=t.ymax,h[0]=t.xmax,h[1]=t.ymax,l[0]=t.xmin,l[1]=t.ymin,m[0]=t.xmax,m[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let r=e[0];if((0,i.CW)(t,r))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,i.CW)(t,s)||d(r,s,c))return!0;r=s}}return!1}const y=[0,0];function p(t){for(let e=0;e<t.length;e++){const n=t[e];for(let i=0;i<n.length-1;i++){const r=n[i],s=n[i+1];for(let n=e+1;n<t.length;n++)for(let e=0;e<t[n].length-1;e++){const i=t[n][e],a=t[n][e+1];if(M(r,s,i,a,y)&&!(y[0]===r[0]&&y[1]===r[1]||y[0]===i[0]&&y[1]===i[1]||y[0]===s[0]&&y[1]===s[1]||y[0]===a[0]&&y[1]===a[1]))return!0}}const i=n.length;if(!(i<=4))for(let t=0;t<i-3;t++){let e=i-1;0===t&&(e=i-2);const r=n[t],s=n[t+1];for(let i=t+2;i<e;i++){const t=n[i],e=n[i+1];if(M(r,s,t,e,y)&&!(y[0]===r[0]&&y[1]===r[1]||y[0]===t[0]&&y[1]===t[1]||y[0]===s[0]&&y[1]===s[1]||y[0]===e[0]&&y[1]===e[1]))return!0}}}return!1}function d(t,e,n){for(let i=0;i<n.length;i++)if(M(t,e,n[i][0],n[i][1]))return!0;return!1}function M(t,e,n,i,r){const[s,a]=t,[o,h]=e,[l,m]=n,[u,c]=i,x=u-l,f=s-l,y=o-s,p=c-m,d=a-m,M=h-a,g=p*y-x*M;if(0===g)return!1;const z=(x*d-p*f)/g,w=(y*d-M*f)/g;return z>=0&&z<=1&&w>=0&&w<=1&&(r&&(r[0]=s+z*(o-s),r[1]=a+z*(h-a)),!0)}function g(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return a;case"esriGeometryPoint":case"point":return r;case"esriGeometryPolygon":case"polygon":return x;case"esriGeometryPolyline":case"polyline":return f}}},28735:(t,e,n)=>{n.d(e,{Cv:()=>p,Gh:()=>g,ci:()=>z,je:()=>d,jg:()=>u,tD:()=>M,y7:()=>y});var i=n(4718),r=n(16930),s=n(79258),a=n(21325);const o=57.29577951308232,h=.017453292519943;function l(t){return t*o}function m(t){return t*h}function u(t){return Math.PI/2-2*Math.atan(Math.exp(-t/s.$O.radius))}function c(t){return null!=t.wkid||null!=t.wkt}const x=[0,0];function f(t,e,n,i,r){const s=t,a=r;if(a.spatialReference=n,"x"in s&&"x"in a)[a.x,a.y]=e(s.x,s.y,x,i);else if("xmin"in s&&"xmin"in a)[a.xmin,a.ymin]=e(s.xmin,s.ymin,x,i),[a.xmax,a.ymax]=e(s.xmax,s.ymax,x,i);else if("paths"in s&&"paths"in a||"rings"in s&&"rings"in a){const t="paths"in s?s.paths:s.rings,n=[];let r;for(let s=0;s<t.length;s++){const a=t[s];r=[],n.push(r);for(let t=0;t<a.length;t++)r.push(e(a[t][0],a[t][1],[0,0],i)),a[t].length>2&&r[t].push(a[t][2]),a[t].length>3&&r[t].push(a[t][3])}"paths"in a?a.paths=n:a.rings=n}else if("points"in s&&"points"in a){const t=s.points,n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r][0],t[r][1],[0,0],i),t[r].length>2&&n[r].push(t[r][2]),t[r].length>3&&n[r].push(t[r][3]);a.points=n}return r}function y(t,e){const n=t&&(c(t)?t:t.spatialReference),i=e&&(c(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!i)&&(!!(0,a.aI)(i,n)||(0,a.K8)(i)&&(0,a.oT)(n)||(0,a.K8)(n)&&(0,a.oT)(i))}function p(t,e){if(null==t)return null;const n=t.spatialReference,s=e&&(c(e)?e:e.spatialReference);return y(n,s)?(0,a.aI)(n,s)?(0,i.o8)(t):(0,a.K8)(s)?f(t,d,r.A.WebMercator,!1,(0,i.o8)(t)):(0,a.oT)(s)?f(t,M,r.A.WGS84,!1,(0,i.o8)(t)):null:null}function d(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const i=m(e);return n[0]=m(t)*s.$O.radius,n[1]=s.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function M(t,e,n=[0,0],i=!1){const r=l(t/s.$O.radius);return n[0]=i?r:r-360*Math.floor((r+180)/360),n[1]=l(Math.PI/2-2*Math.atan(Math.exp(-e/s.$O.radius))),n}function g(t,e=!1,n=(0,i.o8)(t)){return f(t,d,r.A.WebMercator,e,n)}function z(t,e=!1,n=(0,i.o8)(t)){return f(t,M,r.A.WGS84,e,n)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8902],{79901:(t,e,n)=>{n.d(e,{w:()=>h});var i=n(56507),r=n(96156);const s=Object.prototype.toString;function a(t){const e="__accessorMetadata__"in t?(0,i.dp)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return o.apply(this,t)}}function o(t,e,n,i){(0,r.z4)(t,e).cast=i}function h(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===s.call(t[0])?a(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,n)=>{(0,r.z4)(e,t).cast=e[n]}}(t[0]):void 0}},36005:(t,e,n)=>{n.d(e,{w:()=>r});var i=n(10107);function r(t,e,n){let r,s;return void 0===e||Array.isArray(e)?(s=t,n=e,r=[void 0]):(s=e,r=Array.isArray(t)?t:[t]),(t,e)=>{const a=t.constructor.prototype;r.forEach((r=>{const o=(0,i.rM)(t,r,s);o.read&&"object"==typeof o.read||(o.read={}),o.read.reader=a[e],n&&(o.read.source=(o.read.source||[]).concat(n))}))}}},5443:(t,e,n)=>{n.d(e,{A:()=>M});var i,r=n(90237),s=n(799),a=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),h=n(91075),l=n(86738),m=n(16930),u=n(94078),c=n(12176),x=n(21325),f=n(28735);function y(t,e,n){return null==e?n:null==n?e:t(e,n)}let p=i=class extends h.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?m.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:r??m.A.WGS84}}static fromBounds(t,e){return new i({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),"point"===t.type?(0,u.qz)(this,t):"extent"===t.type&&(0,u.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,i=this.height*e;if(this.xmin+=n,this.ymin+=i,this.xmax-=n,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,x.aI)(e,n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),(0,c.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=y(Math.min,this.zmin,t.zmin),this.zmax=y(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=y(Math.min,this.mmin,t.mmin),this.mmax=y(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=y(Math.max,this.zmin,t.zmin),this.zmax=y(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=y(Math.max,this.mmin,t.mmin),this.mmax=y(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,x.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const i=e.isWebMercator?(0,f.ci)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(i.x=d(i.x,t).x),this.spatialReference=new m.A((0,s.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let e=null;const[n,i]=t.valid,r=this.xmin,s=this.xmax;return r>=n&&r<=i&&s>=n&&s<=i||(e=this.center),e}_normalize(t,e,n){const i=this.spatialReference;if(!i)return this;const r=n??(0,x.Vp)(i);if(null==r)return this;const s=this._getParts(r).map((t=>t.extent));if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(e)return s;let a=!0,o=!0;return s.forEach((t=>{t.hasZ||(a=!1),t.hasM||(o=!1)})),{rings:s.map((t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(a){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(o){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e})),hasZ:a,hasM:o,spatialReference:i}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:r,spatialReference:s}=this,a=this.width,o=this.xmin,h=this.xmax;let l;t=t||(0,x.Vp)(s);const[m,u]=t.valid;l=d(this.xmin,t);const c=l.x,f=l.frameId;l=d(this.xmax,t);const y=l.x,p=l.frameId,M=c===y&&a>0;if(a>2*u){const t=new i(o<h?c:y,n,u,r,s),a=new i(m,n,o<h?y:c,r,s),l=new i(0,n,u,r,s),x=new i(m,n,0,r,s),d=[],M=[];t.contains(l)&&d.push(f),t.contains(x)&&M.push(f),a.contains(l)&&d.push(p),a.contains(x)&&M.push(p);for(let t=f+1;t<p;t++)d.push(t),M.push(t);e.push({extent:t,frameIds:[f]},{extent:a,frameIds:[p]},{extent:l,frameIds:d},{extent:x,frameIds:M})}else c>y||M?e.push({extent:new i(c,n,u,r,s),frameIds:[f]},{extent:new i(m,n,y,r,s),frameIds:[p]}):e.push({extent:new i(c,n,y,r,s),frameIds:[f]});this.cache._parts=e}const n=this.hasZ,r=this.hasM;if(n||r){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}};function d(t,e){const[n,i]=e.valid,r=2*i;let s,a=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,a=s):t<n&&(s=Math.ceil(Math.abs(t-n)/r),t+=s*r,a=-s),{x:t,frameId:a}}(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"center",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasM",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasZ",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"height",null),(0,r._)([(0,a.MZ)({readOnly:!0})],p.prototype,"width",null),(0,r._)([(0,a.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],p.prototype,"xmin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmin",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"xmax",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymax",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmax",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmax",void 0),p=i=(0,r._)([(0,o.$)("esri.geometry.Extent")],p),p.prototype.toJSON.isDefaultToJSON=!0;const M=p},91075:(t,e,n)=>{n.d(e,{A:()=>m});var i=n(90237),r=n(25482),s=n(10107),a=(n(44208),n(53966),n(87811),n(36005)),o=n(40608),h=n(16930);let l=class extends r.oY{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=h.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof h.A)return t;if(null!=t){const n=new h.A;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,i._)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i._)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasM",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasZ",void 0),(0,i._)([(0,s.MZ)({type:h.A,json:{write:!0},value:h.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i._)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i._)([(0,o.$)("esri.geometry.Geometry")],l);const m=l},86738:(t,e,n)=>{n.d(e,{A:()=>w});var i=n(90237),r=n(53966),s=n(10107),a=n(79901),o=(n(87811),n(44208),n(36005)),h=n(40608),l=n(43937),m=n(56507),u=n(91075),c=n(16930),x=n(21325),f=n(28735);function y({x:t,y:e,spatialReference:n},i=[0,0]){if(n){if((0,x.K8)(n))return(0,f.tD)(t,e,i);if((0,x.EA)(n))return i[0]=t,i[1]=e,i}return null}const p=[0,0];var d;const M=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let z=d=class extends u.A{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,i,s){let a;if(Array.isArray(t))a=t,s=e,t=a[0],e=a[1],n=a[2],i=a[3];else if(t&&"object"==typeof t){if(a=t,t=null!=a.x?a.x:a.longitude,e=null!=a.y?a.y:a.latitude,n=a.z,i=a.m,(s=a.spatialReference)&&"esri.geometry.SpatialReference"!==s.declaredClass&&(s=new c.A(s)),null!=a.longitude||null!=a.latitude)if(null==a.longitude)r.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==a.latitude)r.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!a.declaredClass&&s?.isWebMercator){const n=(0,f.je)(a.longitude,a.latitude,M);t=n[0],e=n[1]}}else g(n)?(s=n,n=null):g(i)&&(s=i,i=null);const o={x:t,y:e};return null==o.x&&null!=o.y?r.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==o.y&&null!=o.x&&r.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=s&&(o.spatialReference=s),null!=n&&(o.z=n),null!=i&&(o.m=i),o}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return t=this,y(t,p)?.[1]??null;var t}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,f.je)(n,t,M)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return t=this,y(t,p)?.[0]??null;var t}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,f.je)(t,e,M)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new d;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return d.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:i,m:r,spatialReference:s}=this,{z:a,m:o}=t;let{x:h,y:l,spatialReference:m}=t;if(!s.equals(m))if(s.isWebMercator&&m.isWGS84)[h,l]=(0,f.je)(h,l),m=s;else{if(!s.isWGS84||!m.isWebMercator)return!1;[h,l]=(0,f.tD)(h,l),m=s}return e===h&&n===l&&i===a&&r===o&&s.wkid===m.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,x.Vp)(this.spatialReference);if(!t)return this;let e=this.x;const[n,i]=t.valid,r=2*i;let s;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,i=t.y-e.y,r=null!=t.z&&null!=e.z?t.z-e.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i._)([(0,s.MZ)({readOnly:!0})],z.prototype,"cache",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasM",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],z.prototype,"hasZ",null),(0,i._)([(0,s.MZ)({type:Number})],z.prototype,"latitude",null),(0,i._)([(0,s.MZ)({type:Number})],z.prototype,"longitude",null),(0,i._)([(0,s.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.w)((t=>isNaN(t)?t:(0,m.GB)(t)))],z.prototype,"x",void 0),(0,i._)([(0,l.K)("x")],z.prototype,"writeX",null),(0,i._)([(0,o.w)("x")],z.prototype,"readX",null),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],z.prototype,"y",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],z.prototype,"z",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],z.prototype,"m",void 0),z=d=(0,i._)([(0,h.$)("esri.geometry.Point")],z),z.prototype.toJSON.isDefaultToJSON=!0;const w=z},88582:(t,e,n)=>{var i;n.d(e,{_:()=>i}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(i||(i={}))},19419:(t,e,n)=>{n.d(e,{HY:()=>x,Ie:()=>y,Rj:()=>c,VY:()=>o,Wc:()=>m,aI:()=>d,fA:()=>a,fT:()=>l,gR:()=>f,gX:()=>u,qv:()=>M,vt:()=>r,w1:()=>h}),n(44208),n(34727);var i=n(5443);function r(t=g){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function a(t,e,n,i,s=r()){return s[0]=t,s[1]=e,s[2]=n,s[3]=i,s}function o(t,e=r()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function h(t,e){return new i.A({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}function l(t,e,n){if(null!=e)if("length"in e)p(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function m(t){return function(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}(t)*function(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}(t)}function u(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function c(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function x(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function f(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function y(t){return t?s(t,M):r(M)}function p(t){return null!=t&&4===t.length}function d(t,e){return p(t)&&p(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const M=[1/0,1/0,-1/0,-1/0],g=[0,0,0,0]},94078:(t,e,n)=>{n.d(e,{CW:()=>o,F8:()=>h,gH:()=>a,m3:()=>m,qz:()=>r,rL:()=>s,t1:()=>u});const i=[0,0];function r(t,e){return null!=e&&l(t,e.x,e.y,e.z)}function s(t,e){if(!e.points||e.points.length)return!1;for(const n of e.points)if(!o(t,n))return!1;return!0}function a(t,e){const{xmin:n,ymin:i,zmin:r,xmax:s,ymax:a,zmax:o}=e;return t.hasZ&&e.hasZ?l(t,n,i,r)&&l(t,n,a,r)&&l(t,s,a,r)&&l(t,s,i,r)&&l(t,n,i,o)&&l(t,n,a,o)&&l(t,s,a,o)&&l(t,s,i,o):l(t,n,i)&&l(t,n,a)&&l(t,s,a)&&l(t,s,i)}function o(t,e){return l(t,e[0],e[1])}function h(t,e){return l(t,e[0],e[1],e[2])}function l(t,e,n,i){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function m(t,e){return i[1]=e.y,i[0]=e.x,function(t,e){return u(t.rings,e)}(t,i)}function u(t,e){if(!t)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return c(!1,t,e);let n=!1;for(let i=0,r=t.length;i<r;i++)n=c(n,t[i],e);return n}function c(t,e,n){const[i,r]=n;let s=t,a=0;for(let t=0,n=e.length;t<n;t++){a++,a===n&&(a=0);const[o,h]=e[t],[l,m]=e[a];(h<r&&m>=r||m<r&&h>=r)&&o+(r-h)/(m-h)*(l-o)<i&&(s=!s)}return s}},95108:(t,e,n)=>{n.d(e,{$3:()=>l,Ng:()=>o,R3:()=>s,gR:()=>a,m3:()=>u,t9:()=>h});var i=n(4576),r=n(88582);function s(t,e){const n=e[0]-t[0],i=e[1]-t[1];if(t.length>2&&e.length>2){const r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}return Math.sqrt(n*n+i*i)}function a(t,e,n,i){const[r,s]=e,[a,o]=n,[h,l]=i,m=h-a,u=l-o,c=m*m+u*u,x=(r-a)*m+(s-o)*u,f=Math.min(1,Math.max(0,x/c));return t[0]=a+m*f,t[1]=o+u*f,t}function o(t,e,n,i,r,s){let a=n,o=i,h=r-a,l=s-o;if(0!==h||0!==l){const n=((t-a)*h+(e-o)*l)/(h*h+l*l);n>1?(a=r,o=s):n>0&&(a+=h*n,o+=l*n)}return h=t-a,l=e-o,h*h+l*l}function h(t,e){return function(t,e,n){const i=t[0]+n*(e[0]-t[0]),r=t[1]+n*(e[1]-t[1]);return t.length>2&&e.length>2?[i,r,t[2]+n*(e[2]-t[2])]:[i,r]}(t,e,.5)}function l(t,e=r._.X,n=r._.Y){let i=0;const s=t.length;let a=t[0];for(let r=1;r<s;r++){const s=t[r];i+=(s[e]-a[e])*(s[n]+a[n]),a=s}if(!m(t)){const r=t[0];i+=(r[e]-a[e])*(r[n]+a[n])}return i>=0}function m(t){const e=t.length;return e<3||(0,i.aI)(t[0],t[e-1])}function u(t){if(!("rings"in t))return!1;let e=!1;for(const n of t.rings)m(n)||(n.push(n[0].slice()),e=!0);return e}n(21325)},12176:(t,e,n)=>{n.d(e,{A3:()=>p,Ql:()=>M,fA:()=>x,xB:()=>s,xK:()=>g});var i=n(94078);function r(t,e){return(0,i.qz)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let i,r,s;if(t.xmin<=e.xmin){if(i=e.xmin,t.xmax<i)return!1}else if(i=t.xmin,e.xmax<i)return!1;if(t.ymin<=e.ymin){if(r=e.ymin,t.ymax<r)return!1}else if(r=t.ymin,e.ymax<r)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function a(t,e){const{points:n,hasZ:r}=e,s=r?i.F8:i.CW;for(const e of n)if(s(t,e))return!0;return!1}const o=[0,0],h=[0,0],l=[0,0],m=[0,0],u=[o,h,l,m],c=[[l,o],[o,h],[h,m],[m,l]];function x(t,e){return function(t,e){o[0]=t.xmin,o[1]=t.ymax,h[0]=t.xmax,h[1]=t.ymax,l[0]=t.xmin,l[1]=t.ymin,m[0]=t.xmax,m[1]=t.ymin;for(const t of u)if((0,i.t1)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,i.CW)(t,e))return!0;for(let r=1;r<n.length;r++){const s=n[r];if((0,i.CW)(t,s)||d(e,s,c))return!0;e=s}}return!1}(t,e.rings)}function f(t,e){o[0]=t.xmin,o[1]=t.ymax,h[0]=t.xmax,h[1]=t.ymax,l[0]=t.xmin,l[1]=t.ymin,m[0]=t.xmax,m[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let r=e[0];if((0,i.CW)(t,r))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,i.CW)(t,s)||d(r,s,c))return!0;r=s}}return!1}const y=[0,0];function p(t){for(let e=0;e<t.length;e++){const n=t[e];for(let i=0;i<n.length-1;i++){const r=n[i],s=n[i+1];for(let n=e+1;n<t.length;n++)for(let e=0;e<t[n].length-1;e++){const i=t[n][e],a=t[n][e+1];if(M(r,s,i,a,y)&&!(y[0]===r[0]&&y[1]===r[1]||y[0]===i[0]&&y[1]===i[1]||y[0]===s[0]&&y[1]===s[1]||y[0]===a[0]&&y[1]===a[1]))return!0}}const i=n.length;if(!(i<=4))for(let t=0;t<i-3;t++){let e=i-1;0===t&&(e=i-2);const r=n[t],s=n[t+1];for(let i=t+2;i<e;i++){const t=n[i],e=n[i+1];if(M(r,s,t,e,y)&&!(y[0]===r[0]&&y[1]===r[1]||y[0]===t[0]&&y[1]===t[1]||y[0]===s[0]&&y[1]===s[1]||y[0]===e[0]&&y[1]===e[1]))return!0}}}return!1}function d(t,e,n){for(let i=0;i<n.length;i++)if(M(t,e,n[i][0],n[i][1]))return!0;return!1}function M(t,e,n,i,r){const[s,a]=t,[o,h]=e,[l,m]=n,[u,c]=i,x=u-l,f=s-l,y=o-s,p=c-m,d=a-m,M=h-a,g=p*y-x*M;if(0===g)return!1;const z=(x*d-p*f)/g,w=(y*d-M*f)/g;return z>=0&&z<=1&&w>=0&&w<=1&&(r&&(r[0]=s+z*(o-s),r[1]=a+z*(h-a)),!0)}function g(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return a;case"esriGeometryPoint":case"point":return r;case"esriGeometryPolygon":case"polygon":return x;case"esriGeometryPolyline":case"polyline":return f}}},28735:(t,e,n)=>{n.d(e,{Cv:()=>p,Gh:()=>g,ci:()=>z,je:()=>d,jg:()=>u,tD:()=>M,y7:()=>y});var i=n(4718),r=n(16930),s=n(79258),a=n(21325);const o=57.29577951308232,h=.017453292519943;function l(t){return t*o}function m(t){return t*h}function u(t){return Math.PI/2-2*Math.atan(Math.exp(-t/s.$O.radius))}function c(t){return null!=t.wkid||null!=t.wkt}const x=[0,0];function f(t,e,n,i,r){const s=t,a=r;if(a.spatialReference=n,"x"in s&&"x"in a)[a.x,a.y]=e(s.x,s.y,x,i);else if("xmin"in s&&"xmin"in a)[a.xmin,a.ymin]=e(s.xmin,s.ymin,x,i),[a.xmax,a.ymax]=e(s.xmax,s.ymax,x,i);else if("paths"in s&&"paths"in a||"rings"in s&&"rings"in a){const t="paths"in s?s.paths:s.rings,n=[];let r;for(let s=0;s<t.length;s++){const a=t[s];r=[],n.push(r);for(let t=0;t<a.length;t++)r.push(e(a[t][0],a[t][1],[0,0],i)),a[t].length>2&&r[t].push(a[t][2]),a[t].length>3&&r[t].push(a[t][3])}"paths"in a?a.paths=n:a.rings=n}else if("points"in s&&"points"in a){const t=s.points,n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r][0],t[r][1],[0,0],i),t[r].length>2&&n[r].push(t[r][2]),t[r].length>3&&n[r].push(t[r][3]);a.points=n}return r}function y(t,e){const n=t&&(c(t)?t:t.spatialReference),i=e&&(c(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!i)&&(!!(0,a.aI)(i,n)||(0,a.K8)(i)&&(0,a.oT)(n)||(0,a.K8)(n)&&(0,a.oT)(i))}function p(t,e){if(null==t)return null;const n=t.spatialReference,s=e&&(c(e)?e:e.spatialReference);return y(n,s)?(0,a.aI)(n,s)?(0,i.o8)(t):(0,a.K8)(s)?f(t,d,r.A.WebMercator,!1,(0,i.o8)(t)):(0,a.oT)(s)?f(t,M,r.A.WGS84,!1,(0,i.o8)(t)):null:null}function d(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const i=m(e);return n[0]=m(t)*s.$O.radius,n[1]=s.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function M(t,e,n=[0,0],i=!1){if(t===a.Mc[0])n[0]=-180;else if(t===a.Mc[1])n[0]=180;else{const e=l(t/s.$O.radius);n[0]=i?e:e-360*Math.floor((e+180)/360)}return n[1]=l(Math.PI/2-2*Math.atan(Math.exp(-e/s.$O.radius))),n}function g(t,e=!1,n=(0,i.o8)(t)){return f(t,d,r.A.WebMercator,e,n)}function z(t,e=!1,n=(0,i.o8)(t)){return f(t,M,r.A.WGS84,e,n)}}}]);