@arcgis/core 4.34.0-next.23 → 4.34.0-next.25

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 (438) hide show
  1. package/Basemap.js +1 -1
  2. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/applications/Components/imageryUtils.d.ts +4 -0
  6. package/applications/Components/imageryUtils.js +5 -0
  7. package/arcade/parser.js +1 -1
  8. package/arcade/validation/arcadeValidator.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/026fbeb0ff5b9e6c74df.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0867aa688fa8938906da.js → 03bef3f4b6b09b1e864b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/06cdbccc9f325dcc303d.js +1 -0
  13. package/assets/esri/core/workers/chunks/07613c89255bdab6b7c6.js +1 -0
  14. package/assets/esri/core/workers/chunks/09618761df5c4fdd52a0.js +1 -0
  15. package/assets/esri/core/workers/chunks/0ae00339991f5387203e.js +1 -0
  16. package/assets/esri/core/workers/chunks/0b4b294f3ce74fde5620.js +1 -0
  17. package/assets/esri/core/workers/chunks/{146520d263b910b5bdc7.js → 0e96a3b7228f1ff8e6c5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/109ef17dd4f9430bb686.js +1 -0
  19. package/assets/esri/core/workers/chunks/1597aca21334cab3b802.js +1 -0
  20. package/assets/esri/core/workers/chunks/196564ad230bef6b59cf.js +1 -0
  21. package/assets/esri/core/workers/chunks/19f8d551cbebc11db1eb.js +1 -0
  22. package/assets/esri/core/workers/chunks/1ceee047e3fa617b0600.js +1 -0
  23. package/assets/esri/core/workers/chunks/1d27701832ea139fcc20.js +1 -0
  24. package/assets/esri/core/workers/chunks/1f296f85becf1ca6714d.js +1 -0
  25. package/assets/esri/core/workers/chunks/1f8d7bd44d53c30df383.js +1 -0
  26. package/assets/esri/core/workers/chunks/1fabb5ec59da698c1618.js +1 -0
  27. package/assets/esri/core/workers/chunks/{919d2fd7ebc0c840a759.js → 219b2911668db120452b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/234cbc290b074eeb5dd6.js +1 -0
  29. package/assets/esri/core/workers/chunks/29ae5723fa35aa73ff9b.js +1 -0
  30. package/assets/esri/core/workers/chunks/2b4b073254fe8b6a081c.js +1 -0
  31. package/assets/esri/core/workers/chunks/30293b88501b5d6162fc.js +1 -0
  32. package/assets/esri/core/workers/chunks/31533f5e8b76b307f61c.js +1 -0
  33. package/assets/esri/core/workers/chunks/347117e61e1c6edd074f.js +1 -0
  34. package/assets/esri/core/workers/chunks/3616eb2607843524483f.js +1 -0
  35. package/assets/esri/core/workers/chunks/36648facd56ee91afc7c.js +1 -0
  36. package/assets/esri/core/workers/chunks/394477e88be0c6790f02.js +1 -0
  37. package/assets/esri/core/workers/chunks/3b80b01551d124534a1b.js +1 -0
  38. package/assets/esri/core/workers/chunks/{89d91ce2f566dd3f57f7.js → 3be9ec0503a669bcfce6.js} +1 -1
  39. package/assets/esri/core/workers/chunks/3c9cf06ac6aa1db6c4f6.js +1 -0
  40. package/assets/esri/core/workers/chunks/40fc7c43feaeef8b814d.js +1 -0
  41. package/assets/esri/core/workers/chunks/42cddc8f8c8d73e22ee2.js +1 -0
  42. package/assets/esri/core/workers/chunks/437a4100a837ee16df7c.js +1 -0
  43. package/assets/esri/core/workers/chunks/{63cc4647b7775ff8aedf.js → 44d28849e59f62616e72.js} +1 -1
  44. package/assets/esri/core/workers/chunks/453e536f566d80a9863b.js +1 -0
  45. package/assets/esri/core/workers/chunks/472c677a74d779ce62d7.js +1 -0
  46. package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6bb1ecaa0afc2c7de79e.js → 4cc3eeb0b824c53793d0.js} +1 -1
  48. package/assets/esri/core/workers/chunks/4ce671bc4d36387b55fa.js +1 -0
  49. package/assets/esri/core/workers/chunks/51cfa2f70ec222e1582b.js +1 -0
  50. package/assets/esri/core/workers/chunks/5284d46aecd6fe0345b8.js +1 -0
  51. package/assets/esri/core/workers/chunks/567385709e18ace93b1e.js +1 -0
  52. package/assets/esri/core/workers/chunks/5a9b27f2b343cd5b0852.js +1 -0
  53. package/assets/esri/core/workers/chunks/{4c2f3e43992a918e4c2d.js → 5ef3256c32c4b622bd11.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{5ce62d9fff80d014d186.js → 60aeb7a5ccd8bc71be02.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{55e9b02d70812f7cdac2.js → 63966066a963e9a1fb14.js} +1 -1
  56. package/assets/esri/core/workers/chunks/63f50ff2ae94f684d56b.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8bf04be4052bf148777a.js → 6a1cf6b0ffdf6080b5c4.js} +1 -1
  58. package/assets/esri/core/workers/chunks/6deaa08e3a61a455e564.js +1 -0
  59. package/assets/esri/core/workers/chunks/6e9b4bfe2a1497c96100.js +1 -0
  60. package/assets/esri/core/workers/chunks/6efc3d120c9c2c09cb06.js +1 -0
  61. package/assets/esri/core/workers/chunks/7338ce95bceb2c7fab87.js +1 -0
  62. package/assets/esri/core/workers/chunks/{c64fa94cba71ba2794e2.js → 771012f129890f9a089c.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{d1b363c418a67b087306.js → 780ff9314f26ae62f75f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/820cf4337b248a0cb63c.js +1 -0
  65. package/assets/esri/core/workers/chunks/{b57c0ef7bc57e3c91257.js → 865fccacf44ae5b70eba.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fedbf639a0788417a70f.js → 86abfce1f2ac93cc4d54.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{c94cc026c4ed330408fb.js → 8894483b91bcda845b6f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{f050ab9d100012b77bb9.js → 8c5b1114cc2a58305a81.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{6ca764b4baadef5c1515.js → 92737419b66894799a34.js} +1 -1
  70. package/assets/esri/core/workers/chunks/9511e55e4fabb3235eac.js +1 -0
  71. package/assets/esri/core/workers/chunks/{f43110391f124b8a179c.js → 9a78cb291c966f8ddda6.js} +2 -2
  72. package/assets/esri/core/workers/chunks/9f8341caab3b1d02f387.js +1 -0
  73. package/assets/esri/core/workers/chunks/a08d018d8c137fc4ca17.js +1 -0
  74. package/assets/esri/core/workers/chunks/{7051bcc178eb512819f6.js → a55338add265d330124b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/afe4fd3b1b3521712edd.js +1 -0
  76. package/assets/esri/core/workers/chunks/{9991bd3c7991bffd8260.js → b37f3c416cefc1a6ea2c.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{6782114a752b9cc59168.js → b6b8272a74a5c24a6b86.js} +1 -1
  78. package/assets/esri/core/workers/chunks/b9f66d735a7e63417b3d.js +1 -0
  79. package/assets/esri/core/workers/chunks/bb50b4a3af627f91d789.js +1 -0
  80. package/assets/esri/core/workers/chunks/{f42155b7a4e6c5e80757.js → bbc2a4976d044b990193.js} +1 -1
  81. package/assets/esri/core/workers/chunks/bbf2c31d217de1b8ba6e.js +1 -0
  82. package/assets/esri/core/workers/chunks/be3977f7fe0c46a1b493.js +1 -0
  83. package/assets/esri/core/workers/chunks/befba7ceeb26a38732c1.js +1 -0
  84. package/assets/esri/core/workers/chunks/bf3fc71881aa559fc931.js +1 -0
  85. package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +1 -0
  86. package/assets/esri/core/workers/chunks/c1fb5290e0e259b74389.js +1 -0
  87. package/assets/esri/core/workers/chunks/c361bf4d41a1843d4640.js +1 -0
  88. package/assets/esri/core/workers/chunks/c51099eab5a99c88e5de.js +1 -0
  89. package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +1 -0
  90. package/assets/esri/core/workers/chunks/c82e78590c2fabc67609.js +1 -0
  91. package/assets/esri/core/workers/chunks/{cab1a1067f44ce374673.js → c9e580867f7ac17be329.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{92ad9098006568358550.js → cafcb46d723d38b377a9.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{1d75cb1747ffb7b8b050.js → cb81d448ed6bad205346.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{0f6203ae32663b2b52db.js → d08a523b548e892e1222.js} +1 -1
  95. package/assets/esri/core/workers/chunks/d29ae64703a947bfb83b.js +1 -0
  96. package/assets/esri/core/workers/chunks/d2ce360961ca4b58666c.js +1 -0
  97. package/assets/esri/core/workers/chunks/{04c17957c15234ca0321.js → d81260303a11d3fbe940.js} +1 -1
  98. package/assets/esri/core/workers/chunks/de1457b07f4e263f1524.js +1 -0
  99. package/assets/esri/core/workers/chunks/{6bf43bc3714d7b3878fa.js → e547318638c8f496c1a0.js} +1 -1
  100. package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +346 -0
  101. package/assets/esri/core/workers/chunks/{53781ccca16e53d4a8c3.js → f291ccf9da6aa7d7ae23.js} +1 -1
  102. package/assets/esri/core/workers/chunks/f61a8cc7e2b198e521ba.js +1 -0
  103. package/assets/esri/core/workers/chunks/f9442a281cb91c64c7cd.js +1 -0
  104. package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +1 -0
  105. package/assets/esri/core/workers/chunks/{c3213b487c11076985af.js → fbf3240b36718fa5dc76.js} +1 -1
  106. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  107. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  108. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  109. package/chunks/ComponentShader.glsl.js +36 -36
  110. package/chunks/Envelope.js +1 -1
  111. package/chunks/MultiPathImpl.js +1 -1
  112. package/chunks/OperatorClip.js +1 -1
  113. package/chunks/ProjectionTransformation.js +1 -1
  114. package/chunks/RibbonLine.glsl.js +40 -33
  115. package/chunks/index.js +1 -1
  116. package/chunks/persistableUrlUtils.js +1 -1
  117. package/config.js +1 -1
  118. package/core/AsyncUpdate.js +1 -1
  119. package/core/Clonable.js +1 -1
  120. package/core/Evented.js +1 -1
  121. package/core/Identifiable.js +1 -1
  122. package/core/JSONSupport.js +1 -1
  123. package/core/Loadable.js +1 -1
  124. package/core/MapUtils.js +1 -1
  125. package/core/MemCache.js +1 -1
  126. package/core/MemCachePool.js +1 -1
  127. package/core/MultiOriginJSONSupport.js +1 -1
  128. package/core/ObjectPool.js +1 -1
  129. package/core/Promise.js +1 -1
  130. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  131. package/core/accessorSupport/overrideDefaultsFrom.js +1 -1
  132. package/core/quantity.d.ts +1 -0
  133. package/geometry/operators/gx/operatorOffset.js +1 -1
  134. package/geometry/operators/support/jsonConverter.js +1 -1
  135. package/geometry/support/buffer/BufferPool.js +1 -1
  136. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  137. package/interfaces.d.ts +211 -8
  138. package/kernel.js +1 -1
  139. package/layers/CatalogLayer.js +1 -1
  140. package/layers/FeatureLayer.js +1 -1
  141. package/layers/GeoJSONLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.js +1 -1
  143. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  144. package/layers/mixins/APIKeyMixin.js +1 -1
  145. package/layers/mixins/ArcGISCachedService.js +1 -1
  146. package/layers/mixins/ArcGISImageService.js +1 -1
  147. package/layers/mixins/ArcGISMapService.js +1 -1
  148. package/layers/mixins/ArcGISService.js +1 -1
  149. package/layers/mixins/BlendLayer.js +1 -1
  150. package/layers/mixins/CustomParametersMixin.js +1 -1
  151. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  152. package/layers/mixins/EditBusLayer.js +1 -1
  153. package/layers/mixins/FeatureEffectLayer.js +1 -1
  154. package/layers/mixins/FeatureLayerBase.js +1 -1
  155. package/layers/mixins/FeatureReductionLayer.js +1 -1
  156. package/layers/mixins/ImageryTileMixin.js +1 -1
  157. package/layers/mixins/OperationalLayer.js +1 -1
  158. package/layers/mixins/OrderedLayer.js +1 -1
  159. package/layers/mixins/PortalLayer.js +1 -1
  160. package/layers/mixins/PublishableLayer.js +1 -1
  161. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  162. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  163. package/layers/mixins/RefreshableLayer.js +1 -1
  164. package/layers/mixins/ScaleRangeLayer.js +1 -1
  165. package/layers/mixins/SceneService.js +1 -1
  166. package/layers/mixins/SublayersOwner.js +1 -1
  167. package/layers/mixins/TemporalLayer.js +1 -1
  168. package/layers/mixins/TemporalSceneLayer.js +1 -1
  169. package/layers/mixins/TrackableLayer.js +1 -1
  170. package/layers/ogc/wfsUtils.js +1 -1
  171. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  172. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  173. package/layers/support/ControlPointsGeoreference.js +1 -1
  174. package/layers/support/PixelBlock.js +1 -1
  175. package/layers/support/RasterJobHandler.js +1 -1
  176. package/layers/support/RasterWorker.js +1 -1
  177. package/layers/support/Sublayer.js +1 -1
  178. package/layers/support/arcgisLayerUrl.js +1 -1
  179. package/layers/support/multiLayerServiceUtils.js +1 -1
  180. package/layers/support/rasterDatasets/pixelReader.js +5 -0
  181. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  182. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  183. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  184. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  185. package/layers/video/VideoController.js +1 -1
  186. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  187. package/package.json +1 -1
  188. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  189. package/renderers/support/DictionaryControlString.js +1 -1
  190. package/rest/support/CameraInfoMixin.js +1 -1
  191. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  192. package/smartMapping/renderers/color.js +1 -1
  193. package/smartMapping/renderers/heatmap.js +1 -1
  194. package/smartMapping/renderers/pieChart.js +1 -1
  195. package/smartMapping/renderers/size.js +1 -1
  196. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  197. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  198. package/smartMapping/renderers/type.js +1 -1
  199. package/smartMapping/symbology/color.js +1 -1
  200. package/smartMapping/symbology/support/utils.js +1 -1
  201. package/support/LayersMixin.js +1 -1
  202. package/support/TablesMixin.js +1 -1
  203. package/support/revision.js +1 -1
  204. package/symbols/cim/cimAnalyzer.js +1 -1
  205. package/symbols/support/utils.js +1 -1
  206. package/views/2d/engine/ParentChildStage.js +1 -1
  207. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  208. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  213. package/views/2d/engine/webgl/textureUtils.js +1 -1
  214. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  215. package/views/2d/layers/LayerView2D.js +1 -1
  216. package/views/2d/layers/MediaLayerView2D.js +1 -1
  217. package/views/2d/layers/TileLayerView2D.js +1 -1
  218. package/views/2d/layers/features/FeatureContainer.js +1 -1
  219. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  220. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  221. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  222. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  223. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  224. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  225. package/views/2d/layers/support/DebugOverlay.js +1 -1
  226. package/views/3d/analysis/AnalysisView3D.js +1 -1
  227. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +5 -0
  228. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  229. package/views/3d/analysis/images/heading-rotate-svg.js +1 -1
  230. package/views/3d/analysis/images/tilt-rotate-svg.js +1 -1
  231. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  232. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  233. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  234. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  235. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  236. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  237. package/views/3d/layers/FlowSubView3D.js +1 -1
  238. package/views/3d/layers/I3SMeshView3D.js +1 -1
  239. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  240. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  241. package/views/3d/layers/LayerView3D.js +1 -1
  242. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  243. package/views/3d/layers/StreamLayerView3D.js +1 -1
  244. package/views/3d/layers/TiledLayerView3D.js +1 -1
  245. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Labeler.js +1 -1
  249. package/views/3d/layers/graphics/StreamController.js +5 -0
  250. package/views/3d/layers/graphics/StreamGraphics3DGraphicsPipeline.js +1 -1
  251. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  252. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  253. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  254. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  255. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  256. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  257. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  258. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  259. package/views/3d/layers/support/fetchTile.js +1 -1
  260. package/views/3d/state/ViewStateManager.js +1 -1
  261. package/views/3d/support/MemoryController.js +1 -1
  262. package/views/3d/support/ResourceController.js +1 -1
  263. package/views/3d/support/StreamDataLoader.js +1 -1
  264. package/views/3d/support/StreamDataRequester.js +5 -0
  265. package/views/3d/support/StreamTextureCollection.js +1 -1
  266. package/views/3d/support/engineContent/line.js +1 -1
  267. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  268. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  269. package/views/3d/support/flow/StreamlinesResources3D.js +1 -1
  270. package/views/3d/support/flow/geometryUtils.js +1 -1
  271. package/views/3d/support/index.js +1 -1
  272. package/views/3d/terrain/OverlayRenderer.js +1 -1
  273. package/views/3d/terrain/TerrainRenderer.js +1 -1
  274. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  275. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  276. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  277. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  278. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  281. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  282. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  283. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  284. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  285. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  286. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  287. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  288. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  289. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +17 -0
  290. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  291. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  292. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  293. package/views/BreakpointsOwner.js +1 -1
  294. package/views/DOMContainer.js +1 -1
  295. package/views/PopupView.js +1 -1
  296. package/views/VideoView.js +1 -1
  297. package/views/Viewport2DBaseMixin.js +1 -1
  298. package/views/Viewport2DMixin.js +1 -1
  299. package/views/draw/DrawGraphicTool.js +1 -1
  300. package/views/draw/DrawScreenTool.js +1 -1
  301. package/views/draw/DrawTool.js +1 -1
  302. package/views/draw/MultipointDrawAction.js +1 -1
  303. package/views/draw/PointDrawAction.js +1 -1
  304. package/views/draw/PolygonDrawAction.js +1 -1
  305. package/views/draw/PolylineDrawAction.js +1 -1
  306. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  307. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  308. package/views/layers/CatalogFootprintLayerView.js +1 -1
  309. package/views/layers/CatalogLayerView.js +1 -1
  310. package/views/layers/DimensionLayerView.js +1 -1
  311. package/views/layers/FeatureLayerView.js +1 -1
  312. package/views/layers/ImageryLayerView.js +1 -1
  313. package/views/layers/ImageryTileLayerView.js +1 -1
  314. package/views/layers/LineOfSightLayerView.js +1 -1
  315. package/views/layers/MapImageLayerView.js +1 -1
  316. package/views/layers/MediaLayerView.js +1 -1
  317. package/views/layers/OGCFeatureLayerView.js +1 -1
  318. package/views/layers/PointCloudLayerView.js +1 -1
  319. package/views/layers/RefreshableLayerView.js +1 -1
  320. package/views/layers/StreamLayerView.js +1 -1
  321. package/views/layers/ViewshedLayerView.js +1 -1
  322. package/views/layers/WMSLayerView.js +1 -1
  323. package/views/magnifier/mask-svg.js +1 -1
  324. package/views/magnifier/overlay-svg.js +1 -1
  325. package/views/support/Scheduler.js +1 -1
  326. package/views/video/VideoOperationalDataView.js +1 -1
  327. package/views/webgl/BufferObject.js +1 -1
  328. package/views/webgl/Program.js +1 -1
  329. package/views/webgl/Renderbuffer.js +1 -1
  330. package/views/webgl/Texture.js +1 -1
  331. package/views/webgl/Util.js +1 -1
  332. package/webmap/Bookmark.js +1 -1
  333. package/webscene/SunLighting.js +1 -1
  334. package/webscene/VirtualLighting.js +1 -1
  335. package/webscene/spec-certification/spec.js +1 -1
  336. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  337. package/widgets/BasemapLayerList.js +1 -1
  338. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  339. package/widgets/Directions/DirectionsSearchTool.js +1 -1
  340. package/widgets/Editor/EditorViewModel.js +1 -1
  341. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  342. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  343. package/widgets/Editor/support/SketchController.js +1 -1
  344. package/widgets/Editor/workflowUtils.js +1 -1
  345. package/widgets/Editor.js +1 -1
  346. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  347. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  348. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  349. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  350. package/widgets/LayerList.js +1 -1
  351. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  352. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  353. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  354. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  355. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  356. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  357. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  358. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  359. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  360. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  361. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  362. package/widgets/OrientedImageryViewer.js +1 -1
  363. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  364. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  365. package/widgets/PanoramicViewer.js +1 -1
  366. package/widgets/Print.js +1 -1
  367. package/widgets/Sketch/SketchViewModel.js +1 -1
  368. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  369. package/widgets/Slider/SliderViewModel.js +1 -1
  370. package/widgets/support/GoTo.js +1 -1
  371. package/widgets/support/SelectionList.js +1 -1
  372. package/assets/esri/core/workers/chunks/00eef04fd026adaf0df8.js +0 -1
  373. package/assets/esri/core/workers/chunks/0202c2ac73354e3970b2.js +0 -1
  374. package/assets/esri/core/workers/chunks/02dc6e31b1244e5bb785.js +0 -1
  375. package/assets/esri/core/workers/chunks/080c79d6caca3b6a2db2.js +0 -1
  376. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +0 -1
  377. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +0 -1
  378. package/assets/esri/core/workers/chunks/0ba6177ba118a0f032e2.js +0 -1
  379. package/assets/esri/core/workers/chunks/16a78f5a82f5ca163816.js +0 -1
  380. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +0 -346
  381. package/assets/esri/core/workers/chunks/1cc30073f8200b67cff6.js +0 -1
  382. package/assets/esri/core/workers/chunks/242b216d61940aebe8e1.js +0 -1
  383. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +0 -1
  384. package/assets/esri/core/workers/chunks/35d238a5a6501f89bed7.js +0 -1
  385. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +0 -1
  386. package/assets/esri/core/workers/chunks/40c1d65039c8f1d6afa0.js +0 -1
  387. package/assets/esri/core/workers/chunks/496e02cfe3d84010f675.js +0 -1
  388. package/assets/esri/core/workers/chunks/49dce142ad1ea4c01d00.js +0 -1
  389. package/assets/esri/core/workers/chunks/4b89d5b9e35bf79b321e.js +0 -1
  390. package/assets/esri/core/workers/chunks/54a49a25845897a15ab1.js +0 -1
  391. package/assets/esri/core/workers/chunks/573a8393bec916dcf16f.js +0 -1
  392. package/assets/esri/core/workers/chunks/576e408fb0834f3948e8.js +0 -1
  393. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +0 -1
  394. package/assets/esri/core/workers/chunks/6136bf09950adc46bc33.js +0 -1
  395. package/assets/esri/core/workers/chunks/666afe669866c44830bd.js +0 -1
  396. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +0 -1
  397. package/assets/esri/core/workers/chunks/81006d9eed65bbb82962.js +0 -1
  398. package/assets/esri/core/workers/chunks/843b6029d4c13115e1ac.js +0 -1
  399. package/assets/esri/core/workers/chunks/86d6007c45f2aa643ac8.js +0 -1
  400. package/assets/esri/core/workers/chunks/8ea34878a1ef24b4ded3.js +0 -1
  401. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +0 -1
  402. package/assets/esri/core/workers/chunks/90145d49a0cec902435c.js +0 -1
  403. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +0 -1
  404. package/assets/esri/core/workers/chunks/9ae18a17f62d91167202.js +0 -1
  405. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +0 -1
  406. package/assets/esri/core/workers/chunks/9f91d519da67714f915f.js +0 -1
  407. package/assets/esri/core/workers/chunks/a6a7279b09d7962147ec.js +0 -1
  408. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +0 -1
  409. package/assets/esri/core/workers/chunks/acb9c166259872828646.js +0 -1
  410. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +0 -1
  411. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +0 -1
  412. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +0 -1
  413. package/assets/esri/core/workers/chunks/b4bb461955a4c2bce072.js +0 -1
  414. package/assets/esri/core/workers/chunks/b98279213f45a0c27600.js +0 -1
  415. package/assets/esri/core/workers/chunks/ba5b24beebeb703b5919.js +0 -1
  416. package/assets/esri/core/workers/chunks/bd7d19ba0c7d9143a455.js +0 -1
  417. package/assets/esri/core/workers/chunks/bffaf1f20f18c75fad4e.js +0 -1
  418. package/assets/esri/core/workers/chunks/c4f8da6c238eb5e91f91.js +0 -1
  419. package/assets/esri/core/workers/chunks/cd64181298d82c8d0e9d.js +0 -1
  420. package/assets/esri/core/workers/chunks/cdabea4718a7e7d34cb8.js +0 -1
  421. package/assets/esri/core/workers/chunks/ce7155ae63e7bb74be00.js +0 -1
  422. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +0 -1
  423. package/assets/esri/core/workers/chunks/d915d0a30d9beb24bd3a.js +0 -1
  424. package/assets/esri/core/workers/chunks/dc6538a2d5a1e60d0209.js +0 -1
  425. package/assets/esri/core/workers/chunks/dca633ae3bfd4a3f9bb3.js +0 -1
  426. package/assets/esri/core/workers/chunks/def8a854a05f17d3538e.js +0 -1
  427. package/assets/esri/core/workers/chunks/dfa7976085f7408a366c.js +0 -1
  428. package/assets/esri/core/workers/chunks/e0a5b499b3ae38c21278.js +0 -1
  429. package/assets/esri/core/workers/chunks/e1a20ba7d6279f59adc0.js +0 -1
  430. package/assets/esri/core/workers/chunks/e49a135a2933306a6105.js +0 -1
  431. package/assets/esri/core/workers/chunks/e9a9174c4d1a0a9effb6.js +0 -1
  432. package/assets/esri/core/workers/chunks/edead1a123860cc74b1b.js +0 -1
  433. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +0 -1
  434. package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +0 -1
  435. package/assets/esri/core/workers/chunks/fa9658dbfb921f9c13af.js +0 -1
  436. package/assets/esri/core/workers/chunks/fb5e2b1ced03eef28e96.js +0 -1
  437. package/assets/esri/core/workers/chunks/fd8f4eabb8bbc593dd9c.js +0 -1
  438. package/layers/graphics/controllers/StreamController.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186,9875],{17311:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69622),o=r(4576),n=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),p=r(30524),d=r(43668);let c=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),s=this.fieldsIndex.get(r.at(-1)??"");s&&e.add(s.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const s=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(s)??""}async getTitles(e,t,r){const s=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:a}=this,l=a&&n;t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],u=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";s.set(r,u)})}catch{}return s}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,p.Kl)(e,this.requiredFields))){const s=e.createQuery();s.where="1=1",s.outFields=[...this.requiredFields],s.objectIds=r;const i=await e.queryFeatures(s);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),s=e?.name??r.fieldName;r.fieldName=s,t.set(s.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const s=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:s,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,s._)([(0,l.MZ)({readOnly:!0})],c.prototype,"_arcadeTask",null),(0,s._)([(0,l.MZ)()],c.prototype,"_featureUtils",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],c.prototype,"featureUtilsPromise",null),(0,s._)([(0,l.MZ)({readOnly:!0})],c.prototype,"calculatedExpressions",null),(0,s._)([(0,l.MZ)()],c.prototype,"displayField",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"effectivePopupTemplate",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"expressionsUsedInTitle",null),(0,s._)([(0,l.MZ)()],c.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"fieldInfoMap",null),(0,s._)([(0,l.MZ)()],c.prototype,"fields",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"objectIdField",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"requiredFields",null),c=(0,s._)([(0,u.$)("esri.layers.support.TitleCreator")],c)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(52106),n=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,h.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-s)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*o+s,e=>i-e*n,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=s);const l=o.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===s&&n===i||(o.push([e-s,n-i]),s=e,i=n)}else s=t(a[0]),i=r(a[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=s=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>n,mj:()=>i});var s=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every((e,t)=>e.type===r[t].type)}function o(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,s.sK)(r[e]))}function n(e){const t=e[0];return!!t&&"type"in t}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>u});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const s=e.find(e=>!!e.field);if(!s)return null;const i=new a.A;return i.read(s,r),[i]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,s){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,o.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,s._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),o=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),d=r(29005);let c=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,s._)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,s._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,s._)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,s._)([(0,l.$)("esri.layers.support.FeatureType")],c)},38961:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(90237),i=r(5503),o=r(36708),n=r(10107),a=r(40608),l=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.MZ)()],u.prototype,"getCollections",void 0),(0,s._)([(0,n.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,a.$)("esri.core.CollectionFlattener")],u)},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var s=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:s}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(s));return t}(e);if(o&&((0,s.gg)(t,o[0])||(0,s.ZH)(r,o[1])))return"";const n=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,s.ZH)(i,t)||(0,s.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,s.ZH)(p(i.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)l(s.minScale,s.maxScale,t,r)&&(yield s)}}function l(e,t,r,i){return e=p(e),r=p(r),t=d(t),!(!(0,s.Sp)(r,e)&&(i??r)>e||(0,s.Hx)(t,r)||void 0!==i&&(0,s.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45671:(e,t,r)=>{r.d(t,{D8:()=>o,TO:()=>i});var s=r(30524);async function i(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:i}=t,{objectIdField:o,typeIdField:n,globalIdField:a,relationships:l}=e;if(r.includes("*"))return["*"];const u=i?(0,s.eX)(e):[],p=(0,s.DB)(e.fieldsIndex,[...r,...u]);return n&&p.push(n),p&&o&&e.fieldsIndex?.has(o)&&!p.includes(o)&&p.push(o),p&&a&&e.fieldsIndex?.has(a)&&!p.includes(a)&&p.push(a),l&&l.forEach(t=>{const{keyField:r}=t;p&&r&&e.fieldsIndex?.has(r)&&!p.includes(r)&&p.push(r)}),p}function o(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var s=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>p,$b:()=>d,Nd:()=>c,jm:()=>y,sK:()=>m});var s=r(40876),i=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const n=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,s,i,o,n,a,l,u,p,d,c,y,h,f){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=s,m[4]=i,m[5]=o,m[6]=n,m[7]=a,m[8]=l,m[9]=u,m[10]=p,m[11]=d,m[12]=c,m[13]=y,m[14]=h,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=h(e.strength,t.strength,r),this.radius=h(e.radius,t.radius,r),this.threshold=h(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(h(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class p{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=h(e.amount,t.amount,r),this._updateMatrix()}clone(){return new p(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,s=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(s,s)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class d{constructor(e,t,r,s){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=h(e.offsetX,t.offsetX,r),this.offsetY=h(e.offsetY,t.offsetY,r),this.blurRadius=h(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(h(e.color[0],t.color[0],r)),this.color[1]=Math.round(h(e.color[1],t.color[1],r)),this.color[2]=Math.round(h(e.color[2],t.color[2],r)),this.color[3]=h(e.color[3],t.color[3],r)}clone(){return new d(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:e}}}class c{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=h(e.angle,t.angle,r),this._updateMatrix()}clone(){return new c(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),s=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class y{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=h(e.amount,t.amount,r)}clone(){return new y(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function h(e,t,r){return e+(t-e)*r}function f(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new p(e.type,0);case"saturate":case"brightness":case"contrast":return new p(e.type,1);case"opacity":return new y(1);case"hue-rotate":return new c(0);case"blur":return new u(0);case"drop-shadow":return new d(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>n});var s=r(60999),i=r(5503),o=r(92474);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.A.isCollection(t)?t.forEach(e=>n(e)):o.A.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,s.Tj)(r,async e=>{const t=await(0,s.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},88303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var s=r(90237),i=r(5503),o=r(38961),n=r(49186),a=r(36563),l=r(4718),u=r(81583),p=r(53966),d=r(92071),c=r(74887),y=r(36708),h=r(84952),f=r(10107),m=(r(44208),r(36005)),g=r(40608),_=r(16930),b=r(4146),v=r(52106),M=r(13874),w=r(78888),x=r(66552),S=r(92474),Z=r(61893),A=(r(87811),r(93223)),F=r(5443),I=r(13600),T=r(4902),O=r(56507),j=r(10873);let P=class extends(T.A.IdentifiableMixin(d.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],P.prototype,"title",void 0),(0,s._)([(0,m.w)("service","title",["alias","name"])],P.prototype,"readTitle",null),(0,s._)([(0,f.MZ)()],P.prototype,"layer",void 0),(0,s._)([(0,f.MZ)({type:O.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,isRequired:!0}}})],P.prototype,"id",void 0),(0,s._)([(0,m.w)("service","id")],P.prototype,"readIdOnlyOnce",null),(0,s._)([(0,f.MZ)((0,j.Qo)(String))],P.prototype,"modelName",void 0),(0,s._)([(0,f.MZ)((0,j.Qo)(Boolean))],P.prototype,"isEmpty",void 0),(0,s._)([(0,f.MZ)({type:Boolean,nonNullable:!0})],P.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],P.prototype,"visible",void 0),(0,s._)([(0,f.MZ)({type:Number,json:{write:!0}})],P.prototype,"opacity",void 0),P=(0,s._)([(0,g.$)("esri.layers.buildingSublayers.BuildingSublayer")],P);var L=r(4071),E=r(15426),R=r(17036),N=r(95466),k=r(30524),q=r(83898),B=r(50805),$=r(41214),C=r(61956),U=r(54218),Q=r(30291),J=r(88625),D=r(584),K=r(45671);const G=(0,R.p)();let V=class extends(S.A.LoadableMixin(Z.A.EsriPromiseMixin(P))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new N.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new I.default({portalItem:r,customParameters:this.customParameters,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=(0,q.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.A.getLogger(this),t)});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,Q.tn)(this,e)}async _fetchService(e){const t=(await(0,w.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,E.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:L.P,{query:t,operations:{supportsQuery:r},data:{supportsZ:s,supportsM:i,isVersioned:o}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:s,supportsM:i,isVersioned:o}}}createQuery(){const e=new C.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(U.Et)}async queryCachedAttributes(e,t){const r=(0,k.hL)(this.fieldsIndex,await(0,K.TO)(this,(0,K.D8)(this)));return(0,D.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"parsedUrl",null),(0,s._)([(0,f.MZ)({type:B.W4,readOnly:!0})],V.prototype,"nodePages",void 0),(0,s._)([(0,f.MZ)({type:[B.uV],readOnly:!0})],V.prototype,"materialDefinitions",void 0),(0,s._)([(0,f.MZ)({type:[B.Ot],readOnly:!0})],V.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,f.MZ)({type:[B.L0],readOnly:!0})],V.prototype,"geometryDefinitions",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"store",void 0),(0,s._)([(0,f.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],V.prototype,"rootNode",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,f.MZ)(G.fields)],V.prototype,"fields",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"fieldsIndex",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:I.default})],V.prototype,"associatedLayer",void 0),(0,s._)([(0,m.w)("service","associatedLayer",["associatedLayerID"])],V.prototype,"readAssociatedLayer",null),(0,s._)([(0,f.MZ)(G.outFields)],V.prototype,"outFields",void 0),(0,s._)([(0,f.MZ)({type:String,readOnly:!0})],V.prototype,"objectIdField",null),(0,s._)([(0,f.MZ)({type:String,readOnly:!0})],V.prototype,"globalIdField",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:String,json:{read:!1}})],V.prototype,"displayField",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:String})],V.prototype,"apiKey",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:String})],V.prototype,"customParameters",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:F.A})],V.prototype,"fullExtent",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:_.A})],V.prototype,"spatialReference",null),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"version",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:J.A})],V.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:Number})],V.prototype,"minScale",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:Number})],V.prototype,"maxScale",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:Number})],V.prototype,"effectiveScaleRange",null),(0,s._)([(0,f.MZ)({type:["hide","show"],json:{write:!0}})],V.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)({types:$.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],V.prototype,"renderer",void 0),(0,s._)([(0,f.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],V.prototype,"definitionExpression",void 0),(0,s._)([(0,f.MZ)(j.M6)],V.prototype,"popupEnabled",void 0),(0,s._)([(0,f.MZ)({type:M.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],V.prototype,"popupTemplate",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],V.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.MZ)()],V.prototype,"types",null),(0,s._)([(0,f.MZ)()],V.prototype,"typeIdField",null),(0,s._)([(0,f.MZ)({json:{write:!1}}),(0,A.e)(new x.J({"3DObject":"3d-object",Point:"point"}))],V.prototype,"layerType",void 0),(0,s._)([(0,f.MZ)()],V.prototype,"geometryType",null),(0,s._)([(0,f.MZ)()],V.prototype,"profile",null),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"capabilities",null),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"statisticsInfo",void 0),V=(0,s._)([(0,g.$)("esri.layers.buildingSublayers.BuildingComponentSublayer")],V);const z=V;var X,H=r(67076);const Y={type:i.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:W}}},read:!1}};function W(e,t,r){if(e&&Array.isArray(e))return new i.A(e.map(e=>{const t=function(e){return"group"===e.layerType?ee:z}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new H.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null}))}let ee=X=class extends P{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,u.L)(this,e=>X.forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}))}};var te;(0,s._)([(0,f.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],ee.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)(Y)],ee.prototype,"sublayers",void 0),ee=X=(0,s._)([(0,g.$)("esri.layers.buildingSublayers.BuildingGroupSublayer")],ee),(te=ee||(ee={})).sublayersProperty=Y,te.readSublayers=W,te.forEachSublayer=function e(t,r){t.forEach(t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)})};var re=r(52136),se=r(18768),ie=r(69208),oe=r(16131),ne=r(8303),ae=r(25036),le=r(58947),ue=r(92009),pe=r(25482),de=r(13069);let ce=class extends pe.A{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,f.MZ)({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],ce.prototype,"type",void 0),ce=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfo")],ce);const ye=ce;var he;let fe=he=class extends pe.A{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new he({filterType:this.filterType,filterValues:(0,l.o8)(this.filterValues)})}};(0,s._)([(0,f.MZ)({type:String,json:{write:{isRequired:!0}}})],fe.prototype,"filterType",void 0),(0,s._)([(0,f.MZ)({type:[String],json:{write:{isRequired:!0}}})],fe.prototype,"filterValues",void 0),fe=he=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfoType")],fe);const me=fe;var ge;const _e=i.A.ofType(me);let be=ge=class extends pe.A{clone(){return new ge({filterTypes:(0,l.o8)(this.filterTypes)})}};(0,s._)([(0,f.MZ)({type:_e,json:{write:{isRequired:!0}}})],be.prototype,"filterTypes",void 0),be=ge=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],be);const ve=be;var Me;const we=i.A.ofType(ve);let xe=Me=class extends ye{constructor(){super(...arguments),this.type="checkbox"}clone(){return new Me({filterBlocks:(0,l.o8)(this.filterBlocks)})}};(0,s._)([(0,f.MZ)({type:["checkbox"]})],xe.prototype,"type",void 0),(0,s._)([(0,f.MZ)({type:we,json:{write:{isRequired:!0}}})],xe.prototype,"filterBlocks",void 0),xe=Me=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],xe);const Se=xe;let Ze=class extends pe.A{};(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],Ze.prototype,"type",void 0),Ze=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterMode")],Ze);const Ae=Ze;var Fe;let Ie=Fe=class extends Ae{constructor(){super(...arguments),this.type="solid"}clone(){return new Fe}};(0,s._)([(0,f.MZ)({type:["solid"],readOnly:!0,json:{write:{isRequired:!0}}})],Ie.prototype,"type",void 0),Ie=Fe=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterModeSolid")],Ie);const Te=Ie;var Oe,je=r(51734);let Pe=Oe=class extends Ae{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Oe({edges:(0,l.o8)(this.edges)})}};(0,s._)([(0,A.e)({wireFrame:"wire-frame"})],Pe.prototype,"type",void 0),(0,s._)([(0,f.MZ)(je.J)],Pe.prototype,"edges",void 0),Pe=Oe=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterModeWireFrame")],Pe);const Le=Pe;var Ee;let Re=Ee=class extends Ae{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Ee}};(0,s._)([(0,f.MZ)({type:["x-ray"],readOnly:!0,json:{write:{isRequired:!0}}})],Re.prototype,"type",void 0),Re=Ee=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterModeXRay")],Re);const Ne=Re;var ke;const qe={nonNullable:!0,types:{key:"type",base:Ae,typeMap:{solid:Te,"wire-frame":Le,"x-ray":Ne}},json:{read:e=>{switch(e?.type){case"solid":return Te.fromJSON(e);case"wireFrame":return Le.fromJSON(e);case"x-ray":return Ne.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Be=ke=class extends pe.A{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Te,this.title=""}clone(){return new ke({filterExpression:this.filterExpression,filterMode:(0,l.o8)(this.filterMode),title:this.title})}};(0,s._)([(0,f.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"filterExpression",void 0),(0,s._)([(0,f.MZ)(qe)],Be.prototype,"filterMode",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"title",void 0),Be=ke=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterBlock")],Be);const $e=Be;var Ce;const Ue=i.A.ofType($e);let Qe=Ce=class extends pe.A{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,de.lk)(),this.name=null}clone(){return new Ce({description:this.description,filterBlocks:(0,l.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,l.o8)(this.filterAuthoringInfo)})}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Qe.prototype,"description",void 0),(0,s._)([(0,f.MZ)({type:Ue,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"filterBlocks",void 0),(0,s._)([(0,f.MZ)({types:{key:"type",base:ye,typeMap:{checkbox:Se}},json:{read:e=>"checkbox"===e?.type?Se.fromJSON(e):null,write:!0}})],Qe.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,f.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"id",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"name",void 0),Qe=Ce=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilter")],Qe);let Je=class extends pe.A{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,f.MZ)({type:String})],Je.prototype,"fieldName",void 0),(0,s._)([(0,f.MZ)({type:String})],Je.prototype,"modelName",void 0),(0,s._)([(0,f.MZ)({type:String})],Je.prototype,"label",void 0),(0,s._)([(0,f.MZ)({type:Number})],Je.prototype,"min",void 0),(0,s._)([(0,f.MZ)({type:Number})],Je.prototype,"max",void 0),(0,s._)([(0,f.MZ)({json:{read:e=>Array.isArray(e)&&(e.every(e=>"string"==typeof e)||e.every(e=>"number"==typeof e))?e.slice():null}})],Je.prototype,"mostFrequentValues",void 0),(0,s._)([(0,f.MZ)({type:[Number]})],Je.prototype,"subLayerIds",void 0),Je=(0,s._)([(0,g.$)("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],Je);let De=class extends(S.A.LoadableMixin(Z.A.EsriPromiseMixin(pe.A))){constructor(e){super(e),this.url=null,this.customParameters=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,w.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,f.MZ)({constructOnly:!0,type:String})],De.prototype,"url",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],De.prototype,"customParameters",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],De.prototype,"apiKey",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:[Je],json:{read:{source:"summary"}}})],De.prototype,"fields",null),De=(0,s._)([(0,g.$)("esri.layers.support.BuildingSummaryStatistics")],De);var Ke=r(24212);const Ge=i.A.ofType(Qe),Ve=(0,l.o8)(ee.sublayersProperty),ze=Ve.json?.origins;ze&&(ze["web-scene"]={type:[z],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},ze["portal-item"]={type:[z],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let Xe=class extends((0,le.w6)((0,se.b)((0,oe.q)((0,ne.A)((0,ae.j)((0,d.P)((0,ie.d)((0,re.p)(b.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._allSublayerOverrides=null,this.filters=new Ge,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=ee.readSublayers(e,t,r);return ee.forEachSublayer(s,e=>e.layer=this),this._allSublayerOverrides&&(function(e,t){t.forEach(t=>He(e,t))}(s,this._allSublayerOverrides),this._allSublayerOverrides=null),s}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?function(e,t,r){const s=[];ee.forEachSublayer(e,e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)}),s.length>0&&(t.sublayers=s)}(this.sublayers,e,t):this._allSublayerOverrides&&function(e,t,r){const s=r?.origin&&e.get(r.origin);s&&(t.sublayers=[],s.overrides.forEach(e=>{t.sublayers.push((0,l.o8)(e))}))}(this._allSublayerOverrides,e,t)),e}read(e,t){if(super.read(e,t),("web-scene"===t?.origin||"portal-item"===t?.origin)&&Array.isArray(e?.sublayers)){const r=function(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}(e.sublayers,t);this.sublayers?He(this.sublayers,r):(this._allSublayerOverrides??=new Map,this._allSublayerOverrides.set(t.origin,r))}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef&&this.parsedUrl){const e=(0,h.fj)(this.parsedUrl.path,t.statisticsHRef);return new De({url:e,apiKey:this.apiKey,customParameters:this.customParameters})}return null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP).then(()=>this._fetchService(t)).then(()=>this._fetchAssociatedFeatureService(t));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,u.g)(this,e=>{ee.forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}),this.summaryStatistics&&e(this.summaryStatistics)})}async saveAs(e,t){return this._debouncedSaveOperations(le.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(le.Xh.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,ue.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){(0,c.QZ)(this._logWarningOnPopupEnabled())}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,a.rE)(e)),await(0,y.C_)(()=>this.allSublayers.filter(e=>"building-component"===e.type).some(e=>e.popupEnabled&&null!=e.popupTemplate),e.signal);const t=this.allSublayers.filter(e=>"building-component"===e.type).filter(e=>e.popupEnabled&&null!=e.popupTemplate),r=[],s=[];for(const e of t){const t=e.title??`untitled ${e.id}`;e.attributeStorageInfo?r.push(t):s.push(t)}const i="\n ",o=r.length>0?`\nThe following sublayers will fall back to binary attributes for Popups:${i}${r.join(i)}`:"",n=s.length>0?`\nThe following sublayers have no binary attributes and will not work with Popups:${i}${s.join(i)}`:"";p.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded for this BuildingSceneLayer: ${this.title}.`,o,n)}_validateElevationInfo(e){const t="Building scene layers";(0,Ke.XF)(p.A.getLogger(this),(0,Ke.B)(t,"absolute-height",e)),(0,Ke.XF)(p.A.getLogger(this),(0,Ke.tW)(t,e))}};function He(e,t){const{overrides:r,context:s}=t;ee.forEachSublayer(e,e=>e.read(r.get(e.id),s))}(0,s._)([(0,f.MZ)({type:["BuildingSceneLayer"]})],Xe.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],Xe.prototype,"allSublayers",void 0),(0,s._)([(0,f.MZ)(Ve)],Xe.prototype,"sublayers",void 0),(0,s._)([(0,m.w)("service","sublayers")],Xe.prototype,"readSublayers",null),(0,s._)([(0,f.MZ)({type:Ge,nonNullable:!0,json:{write:!0}})],Xe.prototype,"filters",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Xe.prototype,"activeFilterId",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:De})],Xe.prototype,"summaryStatistics",void 0),(0,s._)([(0,m.w)("summaryStatistics",["statisticsHRef"])],Xe.prototype,"readSummaryStatistics",null),(0,s._)([(0,f.MZ)({type:[String],json:{read:!1}})],Xe.prototype,"outFields",void 0),(0,s._)([(0,f.MZ)(j.Fm)],Xe.prototype,"fullExtent",void 0),(0,s._)([(0,f.MZ)(j.fV)],Xe.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:["show","hide","hide-children"]})],Xe.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)((0,j.Qo)(_.A))],Xe.prototype,"spatialReference",void 0),(0,s._)([(0,f.MZ)(j.Yj)],Xe.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)({json:{read:!1},readOnly:!0})],Xe.prototype,"type",void 0),(0,s._)([(0,f.MZ)()],Xe.prototype,"associatedFeatureServiceItem",void 0),Xe=(0,s._)([(0,g.$)("esri.layers.BuildingSceneLayer")],Xe);const Ye=Xe},91880:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),o=r(66552),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=class extends n.A{static{s=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],p)},92935:(e,t,r)=>{var s;r.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1395,3513],{4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(90237),s=r(78888),n=r(49186),o=r(65529),a=r(4902),l=r(92474),d=r(53966),u=r(74887),p=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),m=r(92602),g=r(64272);let v=0,w=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.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 r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||m.A.portalUrl;throw d.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||d.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,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i._)([(0,c.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,c.MZ)({type:f.A})],w.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,c.MZ)()],w.prototype,"url",void 0),(0,i._)([(0,c.MZ)({type:g.T})],w.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,h.$)("esri.layers.Layer")],w)},8303:(e,t,r)=>{r.d(t,{A:()=>I});var i=r(90237),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),d=r(53966),u=r(97768),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),_=r(10407);const I=e=>{const t=e;let I=class extends t{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,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.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,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:d},content:{updateItem:u}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:u}}}_getUserPrivileges(e,t){const r=(0,_.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?b.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.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,i._)([(0,h.MZ)({type:w.default})],I.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],I),I},A={credential:null,user:null}},8947:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(60999),s=r(74887),n=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,s.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},13899:(e,t,r)=>{r.r(t),r.d(t,{default:()=>je});var i=r(90237),s=r(52106),n=r(13874),o=r(69540),a=r(5503),l=r(49186),d=r(36563),u=r(53966),p=r(97768),c=r(92071),h=r(74887),y=r(36708),f=r(10107),m=(r(44208),r(87811),r(88620)),g=r(36005),v=r(40608),w=r(35666),b=r(86738),_=r(4146),I=r(55726),A=r(52136),S=r(18768),M=r(69208),F=r(47685),x=r(16131),L=r(8303),O=r(25036),T=r(58947),E=r(82935),j=r(25482),Z=r(30524);function U({associatedLayer:e,serviceUpdateTimeStamp:t}){const r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,o=s&&n&&t.lastUpdate!==r.getTime();return s&&(o||!n&&i?.minServerGen!==i?.serverGen)}var P=r(96184),R=r(64272),N=r(26253);const $=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,Z.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,Z.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(U({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await(this.fetchStatistics?.(t,e));i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=i,l=t===r?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==o)return;const a=new R.T({start:n,end:o});this.setAtOrigin("timeInfo",new P.A({endField:i,startField:r,fullTimeExtent:a}),"service")}};return(0,i._)([(0,f.MZ)({type:P.A,json:{read:!1,write:!1}})],r.prototype,"timeInfo",null),(0,i._)([(0,f.MZ)({type:R.T,json:{read:!1,write:!1}})],r.prototype,"timeExtent",null),(0,i._)([(0,f.MZ)({type:N.T,json:{read:!1,write:!1}})],r.prototype,"timeOffset",null),(0,i._)([(0,f.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],r.prototype,"datesInUnknownTimezone",null),(0,i._)([(0,f.MZ)({type:D,readOnly:!0,json:{read:{source:"timeInfo"}}})],r.prototype,"serviceTimeInfo",void 0),r=(0,i._)([(0,v.$)("esri.layers.mixins.TemporalSceneLayer")],r),r};let D=class extends j.A{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i._)([(0,f.MZ)({type:String})],D.prototype,"endTimeField",void 0),(0,i._)([(0,f.MZ)({type:String})],D.prototype,"startTimeField",void 0),D=(0,i._)([(0,v.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],D);var C=r(60694),k=r(92009),q=r(4071),H=r(10873),V=r(15426),G=r(40530),J=r(67202),B=r(17036),K=r(95466),Q=r(50805),z=r(20557),W=r(46499),X=r(39383),Y=r(37352),ee=r(4513),te=r(86390);let re=class extends j.A{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,f.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],re.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],re.prototype,"field",void 0),(0,i._)([(0,f.MZ)({type:[Number],json:{read:!0,write:!0}})],re.prototype,"currentRangeExtent",void 0),(0,i._)([(0,f.MZ)({type:[Number],json:{read:!0,write:!0}})],re.prototype,"fullRangeExtent",void 0),(0,i._)([(0,f.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],re.prototype,"type",void 0),re=(0,i._)([(0,v.$)("esri.layers.support.RangeInfo")],re);var ie,se=r(78888),ne=r(4718),oe=r(87024),ae=r(67076),le=r(39829),de=r(98988);let ue=ie=class extends(j.A.JSONSupportMixin(a.A.ofType(le.A))){constructor(e){super(e)}clone(){return new ie(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map(r=>{if(!t.equals(r.spatialReference)){if(!(0,de.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new ae.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new le.A;(0,de.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i}).filter(e=>null!=e):this.toArray().map(t=>t.toJSON(e))}static fromJSON(e,t){const r=new ie;return e.forEach(e=>r.add(le.A.fromJSON(e,t))),r}};ue=ie=(0,i._)([(0,v.$)("esri.layers.support.PolygonCollection")],ue);const pe=ue;var ce,he=r(97159);let ye=ce=class extends j.A{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new pe,this._geometriesSource=null}initialize(){this.addHandles((0,y.on)(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,y.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=pe.fromJSON(e,r):this._geometriesSource={url:(0,he.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,se.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map(e=>({...e,spatialReference:n}));this.geometries=pe.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new ce({geometries:(0,ne.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,f.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],ye.prototype,"spatialRelationship",void 0),(0,i._)([(0,f.MZ)({type:pe,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,oe.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],ye.prototype,"geometries",void 0),(0,i._)([(0,g.w)(["web-scene","portal-item"],"geometries")],ye.prototype,"readGeometries",null),ye=ce=(0,i._)([(0,v.$)("esri.layers.support.SceneFilter")],ye);const fe=ye;var me=r(84952),ge=r(8947),ve=r(41214),we=r(61956),be=r(24212),_e=r(30291);async function Ie(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(Ae(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function Ae(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(8392),r.e(9588)]).then(r.bind(r,9588)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,r=e.getData?.(t).then(t=>new File([t],e.filename));r&&n.push(r)}),Promise.all(n)}var Se=r(584),Me=r(45671),Fe=r(78553);const xe=new Set(["3DObject","Point"]),Le=(0,B.p)();let Oe=class extends($((0,F.w6)((0,T.w6)((0,S.b)((0,x.q)((0,L.A)((0,O.j)((0,c.P)((0,M.d)((0,A.p)(o.A.ClonableMixin(_.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=(0,p.pR)(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,V.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new K.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:Q.W4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,V.C$)(this.associatedLayer)}get geometryType(){return Ee[this.profile]||"mesh"}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:q.P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:c&&w,supportsAdd:b&&h&&w,supportsDelete:b&&f&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Te[r]?Te[r]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(h.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,ge.L)(this,{origin:"service"},t),(0,Z.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new we.A;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,Z.hL)(this.fieldsIndex,await(0,Me.TO)(this,(0,Me.D8)(this)));return(0,Se.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new l.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,_e.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new l.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(T.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(T.Xh.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(8628).then(r.bind(r,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,d=s?.globalIdUsed??!0;if(a&&null==o)throw new l.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!d)throw new l.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,C.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,V.GA)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){t??={};const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||i(new l.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const s=await this.extractAndFilterFiles(e),n=s.reduce((e,t)=>(0,z.oF)(this.infoFor3D,t)?e+1:e,0);0===n&&i(new I.VP),n>1&&i(new I.XQ);const o=this.spatialReference,a=t.location??new b.A({x:0,y:0,z:0,spatialReference:o}),d=a.spatialReference.isGeographic?"local":"georeferenced",{default:p}=await Promise.all([r.e(3030),r.e(36)]).then(r.bind(r,40036)),c=p.createWithExternalSource(a,{type:"client",files:s},{vertexSpace:d,transform:(0,te.Z)(a.spatialReference),unitConversionDisabled:!0}),[h]=await this.uploadAssets([c],{...t,useAssetOrigin:!t.location});return h}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Ie(e)).filter(e=>(0,z.fu)(t,e)):e}validateLayer(e){if(e.layerType&&!xe.has(e.layerType))throw new l.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new l.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new l.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new l.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new l.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=(0,m.oY)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===w.Gr.SERVICE||n===w.Gr.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,C.Wo)(this.associatedLayer?.url)&&U(this)&&(0,m.oY)(this).setAtOrigin("fullExtent",e.clone(),w.Gr.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,k.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ee.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,h.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,d.rE)(e));try{await(0,y.C_)(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(e){return void(0,h.jH)(e)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,be.XF)(u.A.getLogger(this),(0,be.$7)("Mesh scene layers","relative-to-scene",e)),(0,be.XF)(u.A.getLogger(this),(0,be.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");const d=i.get(e);if(null==d)throw new l.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find(e=>e.name===d.name);if(null==u)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,me.fj)(s,u.href),{data:c}=await(0,se.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,i._)([(0,f.MZ)({types:{key:"type",base:G.c,typeMap:{selection:J.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Oe.prototype,"featureReduction",void 0),(0,i._)([(0,f.MZ)({type:[re],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Oe.prototype,"rangeInfos",void 0),(0,i._)([(0,f.MZ)({json:{read:!1}})],Oe.prototype,"associatedLayer",void 0),(0,i._)([(0,f.MZ)({type:["show","hide"]})],Oe.prototype,"listMode",void 0),(0,i._)([(0,f.MZ)({type:["ArcGISSceneServiceLayer"]})],Oe.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.MZ)({json:{read:!1},readOnly:!0})],Oe.prototype,"type",void 0),(0,i._)([(0,f.MZ)({...Le.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"fields",void 0),(0,i._)([(0,f.MZ)()],Oe.prototype,"types",null),(0,i._)([(0,f.MZ)()],Oe.prototype,"typeIdField",null),(0,i._)([(0,f.MZ)()],Oe.prototype,"templates",null),(0,i._)([(0,f.MZ)()],Oe.prototype,"formTemplate",null),(0,i._)([(0,f.MZ)({readOnly:!0,clonable:!1})],Oe.prototype,"fieldsIndex",null),(0,i._)([(0,f.MZ)({type:Y.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Oe.prototype,"floorInfo",void 0),(0,i._)([(0,f.MZ)(Le.outFields)],Oe.prototype,"outFields",void 0),(0,i._)([(0,f.MZ)({type:Q.W4,readOnly:!0,json:{read:!1}})],Oe.prototype,"nodePages",void 0),(0,i._)([(0,g.w)("service","nodePages",["nodePages","pointNodePages"])],Oe.prototype,"readNodePages",null),(0,i._)([(0,f.MZ)({type:[Q.uV],readOnly:!0})],Oe.prototype,"materialDefinitions",void 0),(0,i._)([(0,f.MZ)({type:[Q.Ot],readOnly:!0})],Oe.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,f.MZ)({type:[Q.L0],readOnly:!0})],Oe.prototype,"geometryDefinitions",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Oe.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Oe.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Oe.prototype,"statisticsInfo",void 0),(0,i._)([(0,f.MZ)({type:a.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Oe.prototype,"excludeObjectIds",void 0),(0,i._)([(0,f.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Oe.prototype,"definitionExpression",void 0),(0,i._)([(0,f.MZ)({type:fe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Oe.prototype,"filter",void 0),(0,i._)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Oe.prototype,"path",void 0),(0,i._)([(0,f.MZ)(H.Yj)],Oe.prototype,"elevationInfo",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Oe.prototype,"effectiveCapabilities",null),(0,i._)([(0,f.MZ)({readOnly:!0})],Oe.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,f.MZ)({type:String})],Oe.prototype,"geometryType",null),(0,i._)([(0,f.MZ)(H.kF)],Oe.prototype,"labelsVisible",void 0),(0,i._)([(0,f.MZ)({type:[W.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:X.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:X.w},write:!0}})],Oe.prototype,"labelingInfo",void 0),(0,i._)([(0,f.MZ)(H.fV)],Oe.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,Fe.D)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Oe.prototype,"opacity",void 0),(0,i._)([(0,f.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"priority",void 0),(0,i._)([(0,f.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"semantic",void 0),(0,i._)([(0,f.MZ)({types:ve.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Oe.prototype,"renderer",null),(0,i._)([(0,f.MZ)({json:{read:!1}})],Oe.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,g.w)("service","cachedDrawingInfo")],Oe.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Oe.prototype,"capabilities",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{read:!1}})],Oe.prototype,"editingEnabled",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Oe.prototype,"infoFor3D",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Oe.prototype,"relationships",null),(0,i._)([(0,f.MZ)(H.M6)],Oe.prototype,"popupEnabled",void 0),(0,i._)([(0,f.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],Oe.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Oe.prototype,"defaultPopupTemplate",null),(0,i._)([(0,f.MZ)(H.zQ)],Oe.prototype,"attributeTableTemplate",void 0),(0,i._)([(0,f.MZ)({type:String,json:{read:!1}})],Oe.prototype,"objectIdField",void 0),(0,i._)([(0,g.w)("service","objectIdField",["objectIdField","fields"])],Oe.prototype,"readObjectIdField",null),(0,i._)([(0,f.MZ)({type:String,json:{read:!1}})],Oe.prototype,"globalIdField",void 0),(0,i._)([(0,g.w)("service","globalIdField",["globalIdField","fields"])],Oe.prototype,"readGlobalIdField",null),(0,i._)([(0,f.MZ)({readOnly:!0,type:String,json:{read:!1}})],Oe.prototype,"displayField",null),(0,i._)([(0,f.MZ)({type:String,json:{read:!1}})],Oe.prototype,"profile",void 0),(0,i._)([(0,g.w)("service","profile",["store.profile"])],Oe.prototype,"readProfile",null),(0,i._)([(0,f.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Oe.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,f.MZ)(H.PY)],Oe.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,f.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],Oe.prototype,"serviceItemId",void 0),(0,i._)([(0,f.MZ)(E.B)],Oe.prototype,"useViewTime",null),Oe=(0,i._)([(0,v.$)("esri.layers.SceneLayer")],Oe);const Te={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ee={"mesh-pyramids":"mesh",points:"point"},je=Oe},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,n.MZ)()],r.prototype,"title",null),(0,i._)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],r),r}},20557:(e,t,r)=>{r.d(t,{Fm:()=>l,Hz:()=>h,JQ:()=>c,JZ:()=>b,ND:()=>f,R_:()=>o,U9:()=>p,fu:()=>s,nr:()=>y,oF:()=>n,rq:()=>d,z$:()=>u});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=g(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return v(function(e,t){const r=e.toLowerCase();return m(t).find(e=>w(e)===r)}(e,t))}function a(e,t){return v(g(e,t))}function l(e,t){return w(function(e,t){return m(t).find(t=>v(t)===e)}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e,t,r){return o(e,r)??a(t,r)}function p({supportedFormats:e}){return u("model/gltf-binary","glb",e)}function c(e){const t=p(e);return null!=t&&e.editFormats.includes(t)}function h(e){if(!e)return null;const t=p(e),r=function({supportedFormats:e}){return u("model/gltf+json","gltf",e)}(e);let i=null;for(const s of e.queryFormats){if(s===t)return s;s===r&&(i=s)}return i}function y({supportedFormats:e}){return u("application/esri3do-SR_world","wld",e)}function f({supportedFormats:e}){return u("application/esri3do-SR_prj","prj",e)}function m(e){return[...i,...e]}function g(e,t){const r=e.toLowerCase();return m(t).find(e=>function(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}(e).some(e=>r.endsWith(e)))}function v(e){return e?.[0]}function w(e){return e?.[1].toLowerCase()}function b(e){return e.tables?.find(e=>"assetMaps"===e.role)}},20816:(e,t,r)=>{r.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var i=r(78888);const s=(0,r(13069).vD)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]),a=await t(n,e,new i({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map},24770:(e,t,r)=>{r.d(t,{$I:()=>m,AU:()=>h,g7:()=>f,i4:()=>u,ui:()=>p,up:()=>v,vt:()=>d,yo:()=>y});var i=r(34727),s=r(58083),n=r(67026),o=r(82534),a=r(38954),l=r(51850);function d(e=v){return[e[0],e[1],e[2],e[3]]}function u(e,t,r=d()){return(0,a.c)(r,e),r[3]=t,r}function p(e,t=d()){const r=(0,s.l)(w,e);return g(t,(0,i.KJ)((0,n.Xd)(t,r))),t}function c(e,t,r=d()){return(0,n.x8)(w,e,m(e)),(0,n.x8)(b,t,m(t)),(0,n.lw)(w,b,w),g(r,(0,i.KJ)((0,n.Xd)(r,w)))}function h(e,t,r,i=d()){return u(l.Cw,e,_),u(l.JP,t,I),u(l.Cb,r,A),c(_,I,_),c(_,A,i),i}function y(e){return e}function f(e){return e[3]}function m(e){return(0,i.kU)(e[3])}function g(e,t){return e[3]=t,e}const v=[0,0,1,0],w=(0,o.vt)(),b=(0,o.vt)(),_=(d(),d()),I=d(),A=d()},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},26253:(e,t,r)=>{r.d(t,{T:()=>p});var i=r(90237),s=r(69540),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.$)("esri.time.TimeInterval")],p)},37352:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(90237),n=r(5503),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let d=i=class extends o.A{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],d.prototype,"floorField",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=i=(0,s._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d)},40530:(e,t,r)=>{r.d(t,{c:()=>a});var i=r(90237),s=r(25482),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends s.A{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},45671:(e,t,r)=>{r.d(t,{D8:()=>n,TO:()=>s});var i=r(30524);async function s(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:s}=t,{objectIdField:n,typeIdField:o,globalIdField:a,relationships:l}=e;if(r.includes("*"))return["*"];const d=s?(0,i.eX)(e):[],u=(0,i.DB)(e.fieldsIndex,[...r,...d]);return o&&u.push(o),u&&n&&e.fieldsIndex?.has(n)&&!u.includes(n)&&u.push(n),u&&a&&e.fieldsIndex?.has(a)&&!u.includes(a)&&u.push(a),l&&l.forEach(t=>{const{keyField:r}=t;u&&r&&e.fieldsIndex?.has(r)&&!u.includes(r)&&u.push(r)}),u}function n(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}},47685:(e,t,r)=>{r.d(t,{Mk:()=>f,Zk:()=>h,w6:()=>v});var i=r(90237),s=r(65529),n=r(4718),o=r(74887),a=r(10107),l=(r(44208),r(53966),r(40608)),d=r(20816);const u=new s.A.EventEmitter;function p(e){return u.on("apply-edits",new WeakRef(e))}function c(e){return u.on("update-moment",new WeakRef(e))}function h(e,t,r=null,i=!1){const s=(0,o.Tw)();return i=null==t||i,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const y=Symbol();function f(e){return null!=e&&"object"==typeof e&&y in e}function m(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function g(e,t,r){const i=new URL(e).host,s=d.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const v=e=>{var t;const r=e;let s=class extends r{static{t=y}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,d=m(this),u=m(this)&&g(t,i,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){const{adds:t,updates:i,deletes:s}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=m(this),o=m(this)&&g(t,r,this.gdbVersion),a=m(this)&&!g(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(p(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(c(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,d.w5)(e,t)}};return(0,i._)([(0,a.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i._)([(0,l.$)("esri.layers.mixins.EditBusLayer")],s),s}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>g});var i,s=r(90237),n=r(4576),o=r(66552),a=r(25482),l=r(83047),d=r(67076),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||m.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],g)},55726:(e,t,r)=>{r.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>f,WF:()=>u,Wt:()=>o,XQ:()=>m,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>new Error;class o extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},67202:(e,t,r)=>{r.d(t,{A:()=>l});var i,s=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(40530);let l=i=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l)},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},73179:(e,t,r)=>{r.d(t,{b:()=>l,h:()=>d});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function d(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},73836:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),l=r(58083),d=r(9093),u=r(67026),p=r(82534),c=r(51850),h=r(24770);let y=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.translation=(0,c.vt)(),this.rotationAxis=(0,c.ci)(h.up),this.rotationAngle=0,this.scale=(0,c.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,c.o8)((0,h.yo)(e)),this.rotationAngle=(0,h.g7)(e)}get localMatrix(){const e=(0,d.vt)();return(0,u.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,l.o1)(e,f,this.translation,this.scale),e}get localMatrixInverse(){return(0,l.B8)((0,d.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,l.t2)(this.localMatrix,e.localMatrix)}};(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,i._)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,i._)([(0,o.MZ)()],y.prototype,"rotation",null),(0,i._)([(0,o.MZ)()],y.prototype,"localMatrix",null),(0,i._)([(0,o.MZ)()],y.prototype,"localMatrixInverse",null),y=(0,i._)([(0,a.$)("esri.geometry.support.MeshTransform")],y);const f=(0,p.vt)()},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>f});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function d(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function u(e,t,r,i,s,n,o){return d(t&r|~t&i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return d(t&i|r&~i,e,t,s,n,o)}function c(e,t,r,i,s,n,o){return d(t^r^i,e,t,s,n,o)}function h(e,t,r,i,s,n,o){return d(r^(t|~i),e,t,s,n,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,d=s,y=n;r=u(r,i,s,n,e[t],7,-680876936),n=u(n,r,i,s,e[t+1],12,-389564586),s=u(s,n,r,i,e[t+2],17,606105819),i=u(i,s,n,r,e[t+3],22,-1044525330),r=u(r,i,s,n,e[t+4],7,-176418897),n=u(n,r,i,s,e[t+5],12,1200080426),s=u(s,n,r,i,e[t+6],17,-1473231341),i=u(i,s,n,r,e[t+7],22,-45705983),r=u(r,i,s,n,e[t+8],7,1770035416),n=u(n,r,i,s,e[t+9],12,-1958414417),s=u(s,n,r,i,e[t+10],17,-42063),i=u(i,s,n,r,e[t+11],22,-1990404162),r=u(r,i,s,n,e[t+12],7,1804603682),n=u(n,r,i,s,e[t+13],12,-40341101),s=u(s,n,r,i,e[t+14],17,-1502002290),i=u(i,s,n,r,e[t+15],22,1236535329),r=p(r,i,s,n,e[t+1],5,-165796510),n=p(n,r,i,s,e[t+6],9,-1069501632),s=p(s,n,r,i,e[t+11],14,643717713),i=p(i,s,n,r,e[t],20,-373897302),r=p(r,i,s,n,e[t+5],5,-701558691),n=p(n,r,i,s,e[t+10],9,38016083),s=p(s,n,r,i,e[t+15],14,-660478335),i=p(i,s,n,r,e[t+4],20,-405537848),r=p(r,i,s,n,e[t+9],5,568446438),n=p(n,r,i,s,e[t+14],9,-1019803690),s=p(s,n,r,i,e[t+3],14,-187363961),i=p(i,s,n,r,e[t+8],20,1163531501),r=p(r,i,s,n,e[t+13],5,-1444681467),n=p(n,r,i,s,e[t+2],9,-51403784),s=p(s,n,r,i,e[t+7],14,1735328473),i=p(i,s,n,r,e[t+12],20,-1926607734),r=c(r,i,s,n,e[t+5],4,-378558),n=c(n,r,i,s,e[t+8],11,-2022574463),s=c(s,n,r,i,e[t+11],16,1839030562),i=c(i,s,n,r,e[t+14],23,-35309556),r=c(r,i,s,n,e[t+1],4,-1530992060),n=c(n,r,i,s,e[t+4],11,1272893353),s=c(s,n,r,i,e[t+7],16,-155497632),i=c(i,s,n,r,e[t+10],23,-1094730640),r=c(r,i,s,n,e[t+13],4,681279174),n=c(n,r,i,s,e[t],11,-358537222),s=c(s,n,r,i,e[t+3],16,-722521979),i=c(i,s,n,r,e[t+6],23,76029189),r=c(r,i,s,n,e[t+9],4,-640364487),n=c(n,r,i,s,e[t+12],11,-421815835),s=c(s,n,r,i,e[t+15],16,530742520),i=c(i,s,n,r,e[t+2],23,-995338651),r=h(r,i,s,n,e[t],6,-198630844),n=h(n,r,i,s,e[t+7],10,1126891415),s=h(s,n,r,i,e[t+14],15,-1416354905),i=h(i,s,n,r,e[t+5],21,-57434055),r=h(r,i,s,n,e[t+12],6,1700485571),n=h(n,r,i,s,e[t+3],10,-1894986606),s=h(s,n,r,i,e[t+10],15,-1051523),i=h(i,s,n,r,e[t+1],21,-2054922799),r=h(r,i,s,n,e[t+8],6,1873313359),n=h(n,r,i,s,e[t+15],10,-30611744),s=h(s,n,r,i,e[t+6],15,-1560198380),i=h(i,s,n,r,e[t+13],21,1309151649),r=h(r,i,s,n,e[t+4],6,-145523070),n=h(n,r,i,s,e[t+11],10,-1120210379),s=h(s,n,r,i,e[t+2],15,718787259),i=h(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,d),n=o(n,y)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},82935:(e,t,r)=>{r.d(t,{B:()=>h,e:()=>y});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),a=r(89317),l=r(30524),d=r(96184),u=r(73133),p=r(64272),c=r(26253);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=u.j.fromJSON(r.timeOffsetUnits);return i&&s?new c.T({value:i,unit:s}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.MZ)({type:p.T,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:c.T})],r.prototype,"timeOffset",void 0),(0,i._)([(0,n.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i._)([(0,s.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i._)([(0,s.MZ)(h)],r.prototype,"useViewTime",void 0),r=(0,i._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},85648:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],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)n[l[e]]=e},86390:(e,t,r)=>{r.d(t,{Z:()=>n});var i=r(83047),s=r(73836);function n(e){const t=1/(0,i.GA)(e,1);return 1!==t?new s.A({scale:[t,t,t]}):void 0}},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),d=r(35666),u=r(10107),p=r(85648),c=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,c.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,c.t)(t,l)):void(s[a]=t.write({},l));const u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,c.t)(u,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},c.M.NO),g=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,d.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?g&&e?.contentAddressed?y(v):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=m(s,r,t),u=(0,p.n)(d),c=(0,o.Zo)(l.path),h=i?.compress??!1;u===c?(t.resources&&f({...e,resource:l,content:d,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,c.i)(h)||(0,o.w8)(h)||g)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=c.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,u.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:d,targetPropertyName:u}=e;if(!l.portalItem)return;const h=(0,c.p)(t),y=m(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const g=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,g),w=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===w)??l.resources.toAdd.find(({resource:e})=>e.path===w);if(e)return void(d[u]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(w);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{b.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,d[u]=b.itemRelativeUrl}).catch(()=>{}));const _=r?.compress??!1;l.resources&&f({...e,resource:b,content:y,compress:_,updates:l.resources.toAdd}),d[u]=b.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},92071:(e,t,r)=>{r.d(t,{P:()=>w,L:()=>b});var i=r(90237),s=r(69622),n=r(76953),o=r(4718),a=r(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,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),a.Gr.DEFAULTS)});for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var d=r(45917),u=r(88620),p=r(40608);const c=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,d.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach(e=>{s[e]=r.get(e,i)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach(e=>{s.invalidate(e),r.revert(e,i),s.commit(e)})}};return r=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function h(e){return(0,u.oY)(e).store}let y=class extends(c(s.A)){};y=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),m=r(49422);const g=e=>{const t=e;let r=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),s=(0,f.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return r=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function v(e){return(0,u.oY)(e).store}const w=e=>{const t=g(c(e));let r=class extends t{constructor(...e){super(...e)}};return r=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],r),r};let b=class extends(w(s.A)){};b=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],b)},96184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),d=r(43937),u=r(64272),p=r(26253),c=r(56400);function h(e,t){return p.T.fromJSON({value:e,unit:t})}let y=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i._)([(0,o.MZ)({type:u.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i._)([(0,d.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i._)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i._)([(0,d.K)("interval")],y.prototype,"writeInterval",null),(0,i._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i._)([(0,o.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i._)([(0,o.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.TimeInfo")],y)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299],{83299:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>ue,fromGeometry:()=>me,fromGeometryToGXGeometry:()=>le,getSpatialReference:()=>se,toGeometry:()=>de});var r=n(55537),i=n(83661),a=n(12189),s=n(95213),o=n(88885);function u(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function m(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}n(90293);class l{createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:u}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:m}}constructor(e,t){this.m_currentToken=0,this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.ar)()&&this.m_currentValue<=(0,i.i)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.d)("unrecognized json element type")}return(0,r.d)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}isError(){return 0}}class d{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.q)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.q)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===d.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===d.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.p)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function c(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function h(e){let t=!1,n=!1,r=!1,i=!1,s=!1,o=!1,u=!1,m=!1,l=!1,d=!1,h=!1,_=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=-1,N=-1,T=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",E="",P=null;for(;3!==e.nextToken();){const a=e.currentString();e.nextToken(),"wkid"===a?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===a?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"wkt"===a?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===a?s||6===e.currentToken()&&(E=e.currentString()):"vcsWkid"===a?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"latestVcsWkid"===a?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===a?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===a?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===a?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===a?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===a?h||(h=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===a?_||(_=!0,o=!0,I=e.currentDoubleValue()):"falseM"===a?f||(f=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===a?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===a?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===a?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===a?y||(y=!0,P=c(e)):e.skipChildren()}v<=0&&T>0&&(v=T),T<=0&&v>0&&(T=v);let G=null,B=!0;if(0!==z.length&&(B=!1,(0,a.aA)(z)&&(G=(0,a.a)(z))),G||0===E.length||(B=!1,(0,a.aA)(E)&&(G=(0,a.a)(E))),!G&&N>0&&(B=!1,(0,a.aB)(N)&&(v<=0||(0,a.aC)())&&(G=(0,a.c)(N,v))),!G&&g>0&&(B=!1,(0,a.aB)(g)&&(T<=0||(0,a.aC)())&&(G=(0,a.c)(g,T))),B&&(G=(0,a.R)(P)),o&&G){const e=new a.aD;G.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&d&&h&&e.setGridParams(F,j,w),k&&_&&e.setZParams(I,C),b&&f&&e.setMParams(O,D),G=(0,a.aE)(G,e)}return G}function _(e,t,n,a){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array of array of vertices is expected");const u=e?new o.a:new o.P,m=u,l=(0,s.y)(0),d=(0,s.D)(2,0),c=(0,s.z)(0);let h=null,_=null,f=null,p=null,b=null,T=0,v=0,x=0;const A=new o.S,S=i.P.getNAN();let w=0,C=0;const D=e?1:0;for(;4!==a.nextToken();){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: ring/path array is expected");let n=2,u=0,F=!0;const j=4;let I=0,O=0;const z=i.P.getNAN(),E=(0,i.d)(j,Number.NaN),P=(0,i.d)(j,Number.NaN);let G=!1;for(a.nextToken();4!==a.currentToken();){if(t&&1===a.currentToken())F&&(0,r.a)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,s.z)(w-1,1),p=(0,s.y)(w-1,-1),b=(0,s.D)(0)),G=!0,n=1,({segFlag:x,toPointSz:I}=N(A,E,S,a));else{for(G=!1,2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),I=0;4!==a.nextToken();)I===j&&(0,r.a)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[I++]=k(a);I<2&&(0,r.a)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,s.J)(E[0],E[1])||(0,r.a)("failed to parse multipath: x and y must be finite")}a.nextToken();do{if(d.size()===2*w&&d.resize(y(w)),d.writePoint2D(2*w,z.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(g(w)),I>2?(h||(h=(0,s.D)(w+1,Number.NaN)),h.write(w,E[2])):h&&h.write(w,Number.NaN),_&&_.size()===w&&_.resize(g(w)),I>3?(_||(_=(0,s.D)(w+1,Number.NaN)),_.write(w,E[3])):_&&_.write(w,Number.NaN),F)C++,l.add(w),c.add(D),F=!1,O=I,(0,i.b)(P,E,0,0,O);else if(null!==f)if(G){const e=(0,o.H)(x),t=b.size();b.resize(t+e),f.add(x),p.add(T),A.get().writeInBufferStream(b,T),T+=e,m.incCurveType(x,1),v++}else f.add(1),p.add(-1);w++,u++,S.setCoords(E[0],E[1])}while(u<n&&4===a.currentToken())}0!==u&&(e&&u>n&&I===O&&0===(0,i.as)(E,P,I)?(w--,u--):null!==f&&(f.add(1),p.add(-1)))}return w&&(l.resize(C),c.resize(C),w>0&&(l.add(w),c.add(0)),m.setAttributeStreamRef(0,d),m.setPathFlagsStreamRef(c),m.setPathStreamRef(l),null!==f&&(m.updateCurveCounter(v),m.setSegmentData(p,b,f,T)),m.notifyModifiedFlags(65535)),{geometry:u,as:h,bs:_}}function f(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array of vertices is expected");let n=0;const a=new o.M,u=(0,s.D)(2,0);let m=0;const l=(0,i.d)(4,Number.NaN),d=new i.P;let c=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,r.a)("failed to parse multipoint: each vertex array has to have at most 4 elements"),l[m++]=k(t);m<2&&(0,r.a)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,s.J)(l[0],l[1])||(0,r.a)("failed to parse multipoint: x and y must be finite"),u.size()===2*n&&u.resize(y(n)),u.writePoint2D(2*n,d.setCoords(l[0],l[1])),c&&c.size()===n&&c.resize(g(n)),m>2?(c||(c=(0,s.D)(n+1,Number.NaN)),c.write(n,l[2])):c&&c.write(n,Number.NaN),h&&h.size()===n&&h.resize(g(n)),m>3?(h||(h=(0,s.D)(n+1,Number.NaN)),h.write(n,l[3])):h&&h.write(n,Number.NaN),n++}if(n){const e=a.getImpl();e.setAttributeStreamRef(0,u),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:a,as:c,bs:h}}function p(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected");const n=(0,s.K)(2,0);let i=0,a=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(g(i)),i++;let s=0;for(-1===a?a=2===t.currentToken()?1:0:1===a&&2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(n.size()===i&&n.resize(g(i)),n.write(i,b(t)),s++,i++);4!==t.nextToken();)n.size()===i&&n.resize(g(i)),n.write(i,b(t)),s++,i++;if(n.write(e,s),0===a)break}return n.resize(i),n}function k(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function b(e){return e.currentInt32Value()}function y(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function g(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function N(e,t,n,a,s){const u={segFlag:0,toPointSz:0};let m=a.currentToken();m=a.nextToken();const l=a.currentString(),c=l[0];for((1!==l.length||"a"!==c&&"b"!==c&&"c"!==c&&"n"!==c&&"q"!==c)&&(0,r.a)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for curve parameters"),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==a.nextToken();)4===u.toPointSz&&(0,r.a)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=k(a);u.toPointSz<2&&(0,r.a)("failed to parse curve: vertex array must have at least 2 elements");const h=i.P.construct(t[0],t[1]),_=i.P.getNAN();let f=-1,p=-1,b=!1,y=Number.NaN,g=Number.NaN,N=Number.NaN;const v=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],x=i.P.getNAN();if("a"===c){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for center point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for center point"),_.setCoords(e,t),m=a.nextToken(),f=a.currentInt32Value(),m=a.nextToken(),p=a.currentInt32Value(),m=a.nextToken(),4!==m?(b=!1,y=k(a),m=a.nextToken(),g=k(a),m=a.nextToken(),N=k(a),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters")):b=!0,u.segFlag=4}else if("b"===c){for(let e=0;e<2;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===c){{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[0].setCoords(e,t)}m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);v[1].setCoords(e,t),v[2].setCoords(n,n),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===c){for(let e=0;e<1;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for interior point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for interior point"),x.setCoords(e,t),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=a.nextToken(),3!==m&&(0,r.a)("failed to parse curve: end object is expected for curve"),"a"===c)if(e.createEllipticArc(),b){const t=!0;T(e.get(),n,h,_,t,f,p)}else!function(e,t,n,r,i,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),c=new d({sz:44,buffer:l});let h=0;c.writeDouble(h,r.x),h+=8,c.writeDouble(h,r.y),h+=8,c.writeDouble(h,s),h+=8,c.writeDouble(h,u),h+=8,c.writeDouble(h,m),h+=8;let _=0;a||(_|=2048),i&&(_|=4096),c.writeInt32(h,_),h+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(n)?(s=!1,a=!0):a&&t.equals(n)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,o.F)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.A)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,o.A)(e)}(e,t,n,c)}(e.get(),n,h,_,f,p,y,g,N);else if("b"===c)e.createCubicBezier(),function(e,t,n,a){e.dropAllAttributes();const s=new ArrayBuffer(32),o=new d({sz:32,buffer:s});let u=0;o.writeDouble(u,a[0].x),u+=8,o.writeDouble(u,a[0].y),u+=8,o.writeDouble(u,a[1].x),u+=8,o.writeDouble(u,a[1].y),u+=8,function(e,t,n,a){(0,r.g)(32<=a.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=a.readDouble(0),e.m_cp[0].y=a.readDouble(8),e.m_cp[1].x=a.readDouble(16),e.m_cp[1].y=a.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,h,v);else if("n"===c)e.createQuadraticRationalBezier(),function(e,t,n,r,i,a,s){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new d({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,a),m+=8,u.writeDouble(m,s),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,h,v[0],v[1].x,v[1].y,v[2].x);else if("q"===c)e.createQuadraticBezier(),e.get().construct(n,v[0],h);else{e.createEllipticArc();const t=!1;T(e.get(),n,h,x,t,-1,-1)}return u}function T(e,t,n,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),c=new d({sz:20,buffer:l});let h=0;c.writeDouble(h,a.x),h+=8,c.writeDouble(h,a.y),h+=8;let _=0;s?(m||(_|=8),u&&(_|=16)):_|=128,c.writeInt32(h,_),h+=4,function(e,t,n,a){0>=a.size()&&(0,r.q)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const s=i.P.getNAN();s.x=a.readDouble(0),s.y=a.readDouble(8);const u=a.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.A)(e),!1;let m=!!(64&u);const l=!!(128&u);let d=!!(32&u);const c=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,s.setCoords(0,0)),m||(l?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.A)(e),e.queryCoord2D(.5,e.m_interior)):(0,o.B)(e,t,n,s,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,o.F)(e,Number.NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,o.A)(e)}(e,t,n,c)}function v(e,t,n,i,a){const s=e.getGeometryType();if(s===r.G.enumEllipticArc)return function(e,t,n,i,a){(0,r.g)(!(0,o.z)(e));const s=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,d=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return A(u,m,s.x,s.y,l,d,i,a),!0;const c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),A(u,m,s.x,s.y,l,d,i,a),S(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),A(u,m,s.x,s.y,l,d,i,a);const t=0,n=0;S(e.m_center.x+t,e.m_center.y+n,17,a);const r=!e.isMajor();a.addInt32(r?1:0);const o=e.isClockwise();a.addInt32(o?1:0),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),A(u,m,s.x,s.y,l,d,i,a);const t=e;S(t.m_center.x,t.m_center.y,17,a);const n=!t.isMajor();a.addInt32(n?1:0);const r=t.isClockwise();a.addInt32(r?1:0),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,n,i,a);if(s===r.G.enumBezier)return x(e,t,n,i,a);if(s===r.G.enumRationalBezier2)return function(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),A(s,o,a.x,a.y,u,m,r,i),S(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,a);if(s===r.G.enumBezier2){const r=new o.y;return r.constructFromQuadraticSegment(e),x(r,t,n,i,a)}(0,r.t)("")}function x(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),A(s,o,a.x,a.y,u,m,r,i),S(e.m_cp[0].x,e.m_cp[0].y,r,i),S(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function A(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function S(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function w(e,t,n,i){const a=n.getImpl(),u=!!(2&t),m=!!(4&t),l=!!(8&t),d=a.hasAttribute(1)&&!u,c=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!l,_=a.hasNonLinearSegments();d&&(i.addFieldName("hasZ"),i.addBool(!0)),c&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let f=null;const p=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const l=n.getPathCount();let k=0;const b=a.getAttributeStreamRef(0);let y=null,g=null,N=null;const T=new o.S;let x=null,A=null,S=null;_&&(x=a.getSegmentFlagsStreamRef(),A=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),d&&(y=a.getAttributeStreamRef(1)),c&&(g=a.getAttributeStreamRef(2)),h&&(N=a.getAttributeStreamRef(3),f=(0,s.t)(3,0));for(let t=0;t<l;t++){i.startArray(),h&&p.push(0);const a=n.getPathEnd(t);if(k===a){i.endArray();continue}const s=n.isClosedPath(t);let o=b.read(2*k),l=b.read(2*k+1),_=d?y.read(k):Number.NaN,w=c?g.read(k):Number.NaN,D=h?N.read(k):0;C(d,c,o,l,_,w,e,i);let F=1;h&&(f.add(D),p[p.length-1]++);const j=o,I=l,O=_,z=w,E=D;let P=!1,G=0,B=Number.NaN,V=Number.NaN,M=0;for(let t=k+1,n=k,R=s?a+1:a;t<R;t++,n++){const s=null!==x?31&x.read(n):1;let k,R;if(t<a?(k=b.read(2*t),R=b.read(2*t+1),d&&(B=y.read(t)),c&&(V=g.read(t)),h&&(M=N.read(t))):(k=j,R=I,B=O,V=z,M=E),1!==s){P=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():(0,r.t)("JSON export.unsupported curve");const t=T.get(),a=A.read(n);t.setStartXYCoords(o,l),t.setEndXYCoords(k,R),d&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),c&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,V)),t.readFromBufferStream(S,a),v(T.get(),u,m,e,i)&&G++}else C(d,c,k,R,B,V,e,i);h&&(f.add(M),p[p.length-1]++),F++,o=k,l=R,_=B,w=V,D=M}P&&0===G||(F<2&&G<1&&(C(d,c,o,l,_,w,e,i),F++,h&&(f.add(D),p[p.length-1]++)),s&&F<3&&G<2&&(C(d,c,j,I,O,z,e,i),F++,o=j,l=I,_=O,w=z,D=E,h&&(f.add(E),p[p.length-1]++))),i.endArray(),k=a}i.endArray()}if(h){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=p.length;t<n;++t){const n=p[t];(0,r.g)(0===n||null!==f&&e+n<=f.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(f.read(e)),e++;i.endArray()}i.endArray()}}function C(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const D="a".charCodeAt(0),F="A".charCodeAt(0),j="*".charCodeAt(0),I="b".charCodeAt(0),O="\\".charCodeAt(0),z="[".charCodeAt(0),E="{".charCodeAt(0),P=":".charCodeAt(0),G=".".charCodeAt(0),B=",".charCodeAt(0),V='"'.charCodeAt(0),M="]".charCodeAt(0),R="}".charCodeAt(0),U="e".charCodeAt(0),W="E".charCodeAt(0),X="f".charCodeAt(0),L="F".charCodeAt(0),Y="/".charCodeAt(0),K="-".charCodeAt(0),q="+".charCodeAt(0),J="n".charCodeAt(0),Z="N".charCodeAt(0),H="r".charCodeAt(0),Q="t".charCodeAt(0),$="u".charCodeAt(0),ee="0".charCodeAt(0),te="9".charCodeAt(0);class ne{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.t)("streaming json parsing not yet impl"):(0,r.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.t)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.t)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1!==this.m_currentTokenType)if(2!==this.m_currentTokenType);else{let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e)}else{let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e)}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.a)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)n++,r+=6;r=e;const i=new Uint8Array(n);let a=0;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)i[a++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let a=t;a<n;a++)if(i.charCodeAt(a)!==O)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++a)){case V:e+='"';break;case $:{const{u8s:t,end:n}=this.toUTF8_(a-1,i);a=n-1,e+=t;break}case O:e+="\\";break;case Y:e+="/";break;case I:e+="\b";break;case X:e+="\f";break;case J:e+="\n";break;case H:e+="\r";break;case Q:e+="\t"}t=a+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.a)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.a)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.a)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.a)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e===j?this.skipCStyleComments_():e===Y?this.skipCppStyleComments_():(0,r.a)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.a)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar();t===Y?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===M&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===R&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token");let e=this.m_peekChar();for(;e!==V;){const t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===V||e===O||e===Y||e===I||e===X||e===J||e===H||e===Q)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar();else if(e===$)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||e>=D&&e<=X||e>=F&&e<=L||(0,r.a)("invalid token");else(0,r.a)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===B&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===P&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.a)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==V&&(0,r.a)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.a)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.a)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==ee?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()}while(e>=ee&&e<=te)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||(0,r.a)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e!==q&&e!==K||(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()),e>=ee&&e<=te||(0,r.a)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===K?(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar(),e=!0,t>=ee&&t<=te||(0,r.a)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===G)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==U&&t!==W||this.exp_();else if(t===U||t===W)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"null"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"true"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.a)("invalid token"),"false"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.a)("invalid token"),"NaN"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===E?this.valueStartObject_():e===z?this.valueStartArray_():e===V?this.valueString_():e===K||e>=ee&&e<=ee+9?this.valueNumber_():e===J?this.valueNull_():e===Q?this.valueTrue_():e===X?this.valueFalse_():e===Z?this.valueNan_():(0,r.a)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==E&&e!==z&&(0,r.a)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const re=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},ie=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,s,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:w(!0,e,t,i);break;case r.G.enumPolyline:w(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),a=i.hasAttribute(1)&&!(2&e),s=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);a&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;a&&(o=i.getAttributeStreamRef(1)),s&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,d=Number.NaN;a&&(l=o.read(e)),s&&(d=m.read(e)),C(a,s,i,u,l,d,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(a&&(n.addFieldName("id"),n.addInt32(0)));const s=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),s),n.addFieldName("y"),n.addDouble(t.getY(),s),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),s)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),s)),a&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(a&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const s=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),s),n.addFieldName("ymin"),n.addDouble(t.getYMin(),s),n.addFieldName("xmax"),n.addDouble(t.getXMax(),s),n.addFieldName("ymax"),n.addDouble(t.getYMax(),s),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,s),n.addFieldName("zmax"),n.addDouble(e.vmax,s)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,s),n.addFieldName("mmax"),n.addDouble(e.vmax,s)}if(a){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.d)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let s=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(s=o.getOldID()),s<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),s>0){n.addFieldName("vcsWkid"),n.addInt32(s);const e=t.getLatestVerticalID();e!==s&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.a)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new a.aD;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},ae=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,u,m,l){let d;"string"==typeof n?(d=new ne({jsonString:n}),d.nextToken()):d=n,1!==d.currentToken()&&(0,r.a)("failed to import map geometry: start of object is expected");const c=function(e,t,n,i,a){let u=!1,m=!1,l=!1,d=!1,c=!1,y=!1,g=!1,N=!1,T=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,E=!1,P=!1,G=!1,B=Number.NaN,V=Number.NaN,M=Number.NaN,R=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,L=Number.NaN,Y=Number.NaN,K=Number.NaN,q=Number.NaN,J=Number.NaN,Z=Number.NaN,H=0,Q=0,$=!1,ee=!1,te=null,ne=null,re=null,ie=null,ae=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(a&&!u){u=!0,1===n.currentToken()?ie=h(n):10!==n.currentToken()&&(0,r.a)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("hasM"===t){if(!l){l=!0,ee=11===n.currentToken();continue}}else if("rings"===t){if(!(c||y||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){c=!0,({geometry:ae,as:te,bs:ne}=_(!0,!1,0,n));continue}}else if("curveRings"===t){if(!y&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){y=!0,({geometry:ae,as:te,bs:ne}=_(!0,!0,0,n));continue}}else if("paths"===t){if(!(g||N||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){g=!0,({geometry:ae,as:te,bs:ne}=_(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){N=!0,({geometry:ae,as:te,bs:ne}=_(!1,!0,0,n));continue}}else if("points"===t){if(!T&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){T=!0,({geometry:ae,as:te,bs:ne}=f(0,n));continue}}else if("ids"===t){if(!d){d=!0,re=p(0,n);continue}}else if("x"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=k(n);continue}}else if("y"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,V=k(n);continue}}else if("z"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,M=k(n);continue}}else if("m"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,R=k(n);continue}}else if("id"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumPoint)){w=!0,U=b(n);continue}}else if("xmin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,W=k(n);continue}}else if("ymin"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,X=k(n);continue}}else if("mmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,J=k(n);continue}}else if("zmin"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,K=k(n);continue}}else if("idmin"===t){if(!P&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){P=!0,H=b(n);continue}}else if("xmax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,L=k(n);continue}}else if("ymax"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,Y=k(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=k(n);continue}}else if("zmax"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,q=k(n);continue}}else if("idmax"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,Q=b(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(c||y||g||N||T){let e=null,t=null;const n=ae;$&&(ae.addAttribute(1),e=te,e||(e=(0,s.D)(n.getPointCount(),Number.NaN))),ee&&(ae.addAttribute(2),t=$?ne:te),null!=re&&ae.addAttribute(3),$&&null!=e&&n.setAttributeStreamRef(1,e),ee&&null!=t&&n.setAttributeStreamRef(2,t),null!=re&&function(e,t){if(e.isEmpty())return;const n=(0,s.K)(2,0),i=e.getGeometryType();let a=0;i===o.M.type?a=1:i===o.P.type||i===o.a.type?a=e.getPathCount():(0,r.d)("not implemented"),n.resize(e.getPointCount(),0);let u=0;for(let s=0;s<a;++s){const a=t.read(u);u++;const m=u+a;let l=0,d=0;i===o.M.type?l=e.getPointCount():i===o.P.type||i===o.a.type?(l=e.getPathSize(s),d=e.getPathStart(s)):(0,r.d)("not implemented");for(let e=0,r=Math.min(a,l);e<r;++e)n.write(d,t.read(u)),u++,d++;u=m}e.getImpl().setAttributeStreamRef(3,n)}(n,re)}else if(v||x||S||A||w){(0,s.I)(B,V)||(0,r.a)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new s.P({x:B,y:V});A&&e.setZ(M),S&&e.setM(R),w&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||E||P||G){(Number.isNaN(X)||Number.isNaN(L)||Number.isNaN(Y))&&(W=Number.NaN);const e=new s.E({xmin:W,ymin:X,xmax:L,ymax:Y});I&&O&&e.setInterval(1,0,K,q),z&&E&&e.setInterval(2,0,J,Z),P&&G&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,d,i,u);return new a.aF(c)}importSpatialReference(e){const t=h(e);return null===t&&(0,r.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,r.a)("string_to_geometry_type"),e.endsWith("point")?r.G.enumPoint:e.endsWith("envelope")?r.G.enumEnvelope:e.endsWith("multipoint")?r.G.enumMultiPoint:e.endsWith("polyline")?r.G.enumPolyline:e.endsWith("polygon")?r.G.enumPolygon:void(0,r.a)("string_to_geometry_type")}};function se(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function oe(e,t){const n=new l(e,{strict:!1});return n.nextToken(),ae.execute(0,r.G.enumUnknown,n,!0,t)}function ue(e){let t=null;return[e.map(e=>{if(null==t){const n=me(e);return t=n.getSpatialReference(),n.getGeometry()}return le(e)}),t]}function me(e){return oe(e,!0)}function le(e){return oe(e,!1).getGeometry()}function de(e,t){return e instanceof a.aF&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(re.reset(),ie.execute(0,e,t,re),re.getObject())}},90293:(e,t,n)=>{n(79187),n(55537),n(88885),n(95213),n(83661);var r=n(12189),i=n(83047),a=n(21325);(0,r.i)(e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let s,o;if(n){s=(0,i.x1)(n);const e=(0,a.EA)(r);if(!s&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else s=!(0,a.EA)(r);return o=t&&i.yD.has(t)?Math.PI/200:s?(0,i.Ao)(r):Math.PI/180,{isPCS:s,metersOrRadiansPerUnit:o,semiMajor:0,wkidOrWkt:e}})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299],{83299:(e,t,n)=>{n.r(t),n.d(t,{fromGeometries:()=>ue,fromGeometry:()=>me,fromGeometryToGXGeometry:()=>le,getSpatialReference:()=>se,toGeometry:()=>de});var r=n(55537),i=n(83661),a=n(12189),s=n(95213),o=n(88885);function u(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){const e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function m(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){const e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=Number.NaN),e}return{value:{m_token:4,m_value:null},done:!0}}n(90293);class l{createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:u}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:m}}constructor(e,t){this.m_currentToken=0,this.m_options=t?{...t}:{strict:!0};const n=e;this.m_iteratorStack=[n instanceof Array?this.createJSONArrayIterator(n):this.createJSONObjectIterator(n)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,i.ar)()&&this.m_currentValue<=(0,i.i)()?this.m_currentToken=8:this.m_currentToken=7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,r.d)("unrecognized json element type")}return(0,r.d)("unrecognized json element type"),0}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,r.a)("invalid token"),this.m_currentValue}isError(){return 0}}class d{constructor(e){return this.m_buffer=null,this.m_view=null,this.m_sz=0,this.m_offset=0,this.m_bOwnsBuffer=!0,this.m_bLittleEndian=!0,this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,r.q)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0!==e.offset?e.offset:0,this.m_view=void 0!==e.offset?new DataView(e.buffer,e.offset,e.sz):new DataView(this.m_buffer),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,r.q)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,r.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===d.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===d.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return this.m_bLittleEndian?1:0}getView(){return this.m_view||(0,r.p)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,r.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function c(e){let t=!1;for(;3!==e.nextToken();){const n=e.currentString();e.nextToken(),"uwkid"===n?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function h(e){let t=!1,n=!1,r=!1,i=!1,s=!1,o=!1,u=!1,m=!1,l=!1,d=!1,h=!1,_=!1,f=!1,p=!1,k=!1,b=!1,y=!1,g=-1,N=-1,T=-1,v=-1,x=0,A=0,S=0,w=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",E="",P=null;for(;3!==e.nextToken();){const a=e.currentString();e.nextToken(),"wkid"===a?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===a?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"wkt"===a?s||(s=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===a?s||6===e.currentToken()&&(E=e.currentString()):"vcsWkid"===a?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"latestVcsWkid"===a?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===a?u||(u=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===a?m||(m=!0,o=!0,A=e.currentDoubleValue()):"mTolerance"===a?l||(l=!0,o=!0,S=e.currentDoubleValue()):"falseX"===a?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===a?h||(h=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===a?_||(_=!0,o=!0,I=e.currentDoubleValue()):"falseM"===a?f||(f=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===a?p||(p=!0,o=!0,w=e.currentDoubleValue()):"zUnits"===a?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===a?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===a?y||(y=!0,P=c(e)):e.skipChildren()}v<=0&&T>0&&(v=T),T<=0&&v>0&&(T=v);let G=null,B=!0;if(0!==z.length&&(B=!1,(0,a.aA)(z)&&(G=(0,a.a)(z))),G||0===E.length||(B=!1,(0,a.aA)(E)&&(G=(0,a.a)(E))),!G&&N>0&&(B=!1,(0,a.aB)(N)&&(v<=0||(0,a.aC)())&&(G=(0,a.c)(N,v))),!G&&g>0&&(B=!1,(0,a.aB)(g)&&(T<=0||(0,a.aC)())&&(G=(0,a.c)(g,T))),B&&(G=(0,a.R)(P)),o&&G){const e=new a.aD;G.queryPrecisionDescriptorWithoutFalseXY(e),u&&e.setTolerance(0,x),m&&e.setTolerance(1,A),l&&e.setTolerance(2,S),p&&d&&h&&e.setGridParams(F,j,w),k&&_&&e.setZParams(I,C),b&&f&&e.setMParams(O,D),G=(0,a.aE)(G,e)}return G}function _(e,t,n,a){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array of array of vertices is expected");const u=e?new o.a:new o.P,m=u,l=(0,s.y)(0),d=(0,s.D)(2,0),c=(0,s.z)(0);let h=null,_=null,f=null,p=null,b=null,T=0,v=0,x=0;const A=new o.S,S=i.P.getNAN();let w=0,C=0;const D=e?1:0;for(;4!==a.nextToken();){2!==a.currentToken()&&(0,r.a)("failed to parse multipath: ring/path array is expected");let n=2,u=0,F=!0;const j=4;let I=0,O=0;const z=i.P.getNAN(),E=(0,i.d)(j,Number.NaN),P=(0,i.d)(j,Number.NaN);let G=!1;for(a.nextToken();4!==a.currentToken();){if(t&&1===a.currentToken())F&&(0,r.a)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,s.z)(w-1,1),p=(0,s.y)(w-1,-1),b=(0,s.D)(0)),G=!0,n=1,({segFlag:x,toPointSz:I}=N(A,E,S,a));else{for(G=!1,2!==a.currentToken()&&(0,r.a)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),I=0;4!==a.nextToken();)I===j&&(0,r.a)("failed to parse multipath: each vertex array has to have at most 4 elements"),E[I++]=k(a);I<2&&(0,r.a)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,s.J)(E[0],E[1])||(0,r.a)("failed to parse multipath: x and y must be finite")}a.nextToken();do{if(d.size()===2*w&&d.resize(y(w)),d.writePoint2D(2*w,z.setCoords(E[0],E[1])),h&&h.size()===w&&h.resize(g(w)),I>2?(h||(h=(0,s.D)(w+1,Number.NaN)),h.write(w,E[2])):h&&h.write(w,Number.NaN),_&&_.size()===w&&_.resize(g(w)),I>3?(_||(_=(0,s.D)(w+1,Number.NaN)),_.write(w,E[3])):_&&_.write(w,Number.NaN),F)C++,l.add(w),c.add(D),F=!1,O=I,(0,i.b)(P,E,0,0,O);else if(null!==f)if(G){const e=(0,o.H)(x),t=b.size();b.resize(t+e),f.add(x),p.add(T),A.get().writeInBufferStream(b,T),T+=e,m.incCurveType(x,1),v++}else f.add(1),p.add(-1);w++,u++,S.setCoords(E[0],E[1])}while(u<n&&4===a.currentToken())}0!==u&&(e&&u>n&&I===O&&0===(0,i.as)(E,P,I)?(w--,u--):null!==f&&(f.add(1),p.add(-1)))}return w&&(l.resize(C),c.resize(C),w>0&&(l.add(w),c.add(0)),m.setAttributeStreamRef(0,d),m.setPathFlagsStreamRef(c),m.setPathStreamRef(l),null!==f&&(m.updateCurveCounter(v),m.setSegmentData(p,b,f,T)),m.notifyModifiedFlags(65535)),{geometry:u,as:h,bs:_}}function f(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array of vertices is expected");let n=0;const a=new o.M,u=(0,s.D)(2,0);let m=0;const l=(0,i.d)(4,Number.NaN),d=new i.P;let c=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,r.a)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,r.a)("failed to parse multipoint: each vertex array has to have at most 4 elements"),l[m++]=k(t);m<2&&(0,r.a)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,s.J)(l[0],l[1])||(0,r.a)("failed to parse multipoint: x and y must be finite"),u.size()===2*n&&u.resize(y(n)),u.writePoint2D(2*n,d.setCoords(l[0],l[1])),c&&c.size()===n&&c.resize(g(n)),m>2?(c||(c=(0,s.D)(n+1,Number.NaN)),c.write(n,l[2])):c&&c.write(n,Number.NaN),h&&h.size()===n&&h.resize(g(n)),m>3?(h||(h=(0,s.D)(n+1,Number.NaN)),h.write(n,l[3])):h&&h.write(n,Number.NaN),n++}if(n){const e=a.getImpl();e.setAttributeStreamRef(0,u),e.resizeNoInit(n),e.notifyModifiedFlags(65535)}return{geometry:a,as:c,bs:h}}function p(e,t){2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected");const n=(0,s.K)(2,0);let i=0,a=-1;for(;4!==t.nextToken();){const e=i;n.size()===i&&n.resize(g(i)),i++;let s=0;for(-1===a?a=2===t.currentToken()?1:0:1===a&&2!==t.currentToken()&&(0,r.a)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(n.size()===i&&n.resize(g(i)),n.write(i,b(t)),s++,i++);4!==t.nextToken();)n.size()===i&&n.resize(g(i)),n.write(i,b(t)),s++,i++;if(n.write(e,s),0===a)break}return n.resize(i),n}function k(e){const t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return Number.NaN;{const t=e.currentDoubleValue();return Number.isNaN(t)?Number.NaN:t}}function b(e){return e.currentInt32Value()}function y(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function g(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function N(e,t,n,a,s){const u={segFlag:0,toPointSz:0};let m=a.currentToken();m=a.nextToken();const l=a.currentString(),c=l[0];for((1!==l.length||"a"!==c&&"b"!==c&&"c"!==c&&"n"!==c&&"q"!==c)&&(0,r.a)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for curve parameters"),m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for to point"),u.toPointSz=0;4!==a.nextToken();)4===u.toPointSz&&(0,r.a)("failed to parse curve: vertex array cannot have more than 4 elements"),t[u.toPointSz++]=k(a);u.toPointSz<2&&(0,r.a)("failed to parse curve: vertex array must have at least 2 elements");const h=i.P.construct(t[0],t[1]),_=i.P.getNAN();let f=-1,p=-1,b=!1,y=Number.NaN,g=Number.NaN,N=Number.NaN;const v=[i.P.getNAN(),i.P.getNAN(),i.P.getNAN()],x=i.P.getNAN();if("a"===c){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for center point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for center point"),_.setCoords(e,t),m=a.nextToken(),f=a.currentInt32Value(),m=a.nextToken(),p=a.currentInt32Value(),m=a.nextToken(),4!==m?(b=!1,y=k(a),m=a.nextToken(),g=k(a),m=a.nextToken(),N=k(a),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters")):b=!0,u.segFlag=4}else if("b"===c){for(let e=0;e<2;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=2}else if("n"===c){{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[0].setCoords(e,t)}m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);v[1].setCoords(e,t),v[2].setCoords(n,n),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=8}else if("q"===c){for(let e=0;e<1;e++){m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for control point"),m=a.nextToken();const t=k(a);m=a.nextToken();const n=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for control point"),v[e].setCoords(t,n)}m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=16}else{m=a.nextToken(),2!==m&&(0,r.a)("failed to parse curve: start array is expected for interior point"),m=a.nextToken();const e=k(a);m=a.nextToken();const t=k(a);m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for interior point"),x.setCoords(e,t),m=a.nextToken(),4!==m&&(0,r.a)("failed to parse curve: end array is expected for curve parameters"),u.segFlag=4}if(m=a.nextToken(),3!==m&&(0,r.a)("failed to parse curve: end object is expected for curve"),"a"===c)if(e.createEllipticArc(),b){const t=!0;T(e.get(),n,h,_,t,f,p)}else!function(e,t,n,r,i,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(44),c=new d({sz:44,buffer:l});let h=0;c.writeDouble(h,r.x),h+=8,c.writeDouble(h,r.y),h+=8,c.writeDouble(h,s),h+=8,c.writeDouble(h,u),h+=8,c.writeDouble(h,m),h+=8;let _=0;a||(_|=2048),i&&(_|=4096),c.writeInt32(h,_),h+=4,function(e,t,n,r){e.m_bits=0,e.m_center.x=r.readDouble(0),e.m_center.y=r.readDouble(8),e.m_rotation=r.readDouble(16),e.m_semiMajorAxis=r.readDouble(24),e.m_minorMajorRatio=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y;const i=r.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i);const u=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(n)?(s=!1,a=!0):a&&t.equals(n)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,o.F)(e,Number.NaN,u,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.A)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,n,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,u,e.m_center),e.setProjectionBehavior(1),(0,o.A)(e)}(e,t,n,c)}(e.get(),n,h,_,f,p,y,g,N);else if("b"===c)e.createCubicBezier(),function(e,t,n,a){e.dropAllAttributes();const s=new ArrayBuffer(32),o=new d({sz:32,buffer:s});let u=0;o.writeDouble(u,a[0].x),u+=8,o.writeDouble(u,a[0].y),u+=8,o.writeDouble(u,a[1].x),u+=8,o.writeDouble(u,a[1].y),u+=8,function(e,t,n,a){(0,r.g)(32<=a.size()),e.m_cp=(0,i.m)(i.P,2),e.m_cp[0].x=a.readDouble(0),e.m_cp[0].y=a.readDouble(8),e.m_cp[1].x=a.readDouble(16),e.m_cp[1].y=a.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,o)}(e.get(),n,h,v);else if("n"===c)e.createQuadraticRationalBezier(),function(e,t,n,r,i,a,s){e.dropAllAttributes();const o=new ArrayBuffer(40),u=new d({sz:40,buffer:o});let m=0;u.writeDouble(m,r.x),m+=8,u.writeDouble(m,r.y),m+=8,u.writeDouble(m,i),m+=8,u.writeDouble(m,a),m+=8,u.writeDouble(m,s),m+=8,function(e,t,n,r){e.m_cp.x=r.readDouble(0),e.m_cp.y=r.readDouble(8),e.m_weights[0]=r.readDouble(16),e.m_weights[1]=r.readDouble(24),e.m_weights[2]=r.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=n.x,e.m_YEnd=n.y}(e,t,n,u)}(e.get(),n,h,v[0],v[1].x,v[1].y,v[2].x);else if("q"===c)e.createQuadraticBezier(),e.get().construct(n,v[0],h);else{e.createEllipticArc();const t=!1;T(e.get(),n,h,x,t,-1,-1)}return u}function T(e,t,n,a,s,u,m){e.dropAllAttributes();const l=new ArrayBuffer(20),c=new d({sz:20,buffer:l});let h=0;c.writeDouble(h,a.x),h+=8,c.writeDouble(h,a.y),h+=8;let _=0;s?(m||(_|=8),u&&(_|=16)):_|=128,c.writeInt32(h,_),h+=4,function(e,t,n,a){0>=a.size()&&(0,r.q)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(n);const s=i.P.getNAN();s.x=a.readDouble(0),s.y=a.readDouble(8);const u=a.readInt32(16);if(1&u)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.A)(e),!1;let m=!!(64&u);const l=!!(128&u);let d=!!(32&u);const c=!!(8&u),h=!!(16&u),_=t.equals(n);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,s.setCoords(0,0)),m||(l?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,n,s),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,o.A)(e),e.queryCoord2D(.5,e.m_interior)):(0,o.B)(e,t,n,s,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,o.F)(e,Number.NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,o.A)(e)}(e,t,n,c)}function v(e,t,n,i,a){const s=e.getGeometryType();if(s===r.G.enumEllipticArc)return function(e,t,n,i,a){(0,r.g)(!(0,o.z)(e));const s=e.getEndXY(),u=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!n;let l=Number.NaN,d=Number.NaN;if(u&&(l=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return A(u,m,s.x,s.y,l,d,i,a),!0;const c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),A(u,m,s.x,s.y,l,d,i,a),S(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),A(u,m,s.x,s.y,l,d,i,a);const t=0,n=0;S(e.m_center.x+t,e.m_center.y+n,17,a);const r=!e.isMajor();a.addInt32(r?1:0);const o=e.isClockwise();a.addInt32(o?1:0),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),A(u,m,s.x,s.y,l,d,i,a);const t=e;S(t.m_center.x,t.m_center.y,17,a);const n=!t.isMajor();a.addInt32(n?1:0);const r=t.isClockwise();a.addInt32(r?1:0),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,n,i,a);if(s===r.G.enumBezier)return x(e,t,n,i,a);if(s===r.G.enumRationalBezier2)return function(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),A(s,o,a.x,a.y,u,m,r,i),S(e.m_cp.x,e.m_cp.y,r,i);const l=r;return i.addDouble(e.m_weights[0],l),i.addDouble(e.m_weights[1],l),i.addDouble(e.m_weights[2],l),i.endArray(),i.endObject(),!1}(e,t,n,i,a);if(s===r.G.enumBezier2){const r=new o.y;return r.constructFromQuadraticSegment(e),x(r,t,n,i,a)}(0,r.t)("")}function x(e,t,n,r,i){const a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!n;let u=Number.NaN,m=Number.NaN;return s&&(u=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),A(s,o,a.x,a.y,u,m,r,i),S(e.m_cp[0].x,e.m_cp[0].y,r,i),S(e.m_cp[1].x,e.m_cp[1].y,r,i),i.endArray(),i.endObject(),!1}function A(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function S(e,t,n,r){r.startArray(),r.addDouble(e,n),r.addDouble(t,n),r.endArray()}function w(e,t,n,i){const a=n.getImpl(),u=!!(2&t),m=!!(4&t),l=!!(8&t),d=a.hasAttribute(1)&&!u,c=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!l,_=a.hasNonLinearSegments();d&&(i.addFieldName("hasZ"),i.addBool(!0)),c&&(i.addFieldName("hasM"),i.addBool(!0)),e?_?i.addFieldName("curveRings"):i.addFieldName("rings"):_?i.addFieldName("curvePaths"):i.addFieldName("paths");let f=null;const p=[];if(n.isEmpty())i.startArray(),i.endArray();else{const e=17-(31&t>>13);i.startArray();const l=n.getPathCount();let k=0;const b=a.getAttributeStreamRef(0);let y=null,g=null,N=null;const T=new o.S;let x=null,A=null,S=null;_&&(x=a.getSegmentFlagsStreamRef(),A=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),d&&(y=a.getAttributeStreamRef(1)),c&&(g=a.getAttributeStreamRef(2)),h&&(N=a.getAttributeStreamRef(3),f=(0,s.t)(3,0));for(let t=0;t<l;t++){i.startArray(),h&&p.push(0);const a=n.getPathEnd(t);if(k===a){i.endArray();continue}const s=n.isClosedPath(t);let o=b.read(2*k),l=b.read(2*k+1),_=d?y.read(k):Number.NaN,w=c?g.read(k):Number.NaN,D=h?N.read(k):0;C(d,c,o,l,_,w,e,i);let F=1;h&&(f.add(D),p[p.length-1]++);const j=o,I=l,O=_,z=w,E=D;let P=!1,G=0,B=Number.NaN,V=Number.NaN,M=0;for(let t=k+1,n=k,R=s?a+1:a;t<R;t++,n++){const s=null!==x?31&x.read(n):1;let k,R;if(t<a?(k=b.read(2*t),R=b.read(2*t+1),d&&(B=y.read(t)),c&&(V=g.read(t)),h&&(M=N.read(t))):(k=j,R=I,B=O,V=z,M=E),1!==s){P=!0,4===s?T.createEllipticArc():2===s?T.createCubicBezier():16===s?T.createQuadraticBezier():8===s?T.createQuadraticRationalBezier():(0,r.t)("JSON export.unsupported curve");const t=T.get(),a=A.read(n);t.setStartXYCoords(o,l),t.setEndXYCoords(k,R),d&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),c&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,V)),t.readFromBufferStream(S,a),v(T.get(),u,m,e,i)&&G++}else C(d,c,k,R,B,V,e,i);h&&(f.add(M),p[p.length-1]++),F++,o=k,l=R,_=B,w=V,D=M}P&&0===G||(F<2&&G<1&&(C(d,c,o,l,_,w,e,i),F++,h&&(f.add(D),p[p.length-1]++)),s&&F<3&&G<2&&(C(d,c,j,I,O,z,e,i),F++,o=j,l=I,_=O,w=z,D=E,h&&(f.add(E),p[p.length-1]++))),i.endArray(),k=a}i.endArray()}if(h){i.addFieldName("ids"),i.startArray();let e=0;for(let t=0,n=p.length;t<n;++t){const n=p[t];(0,r.g)(0===n||null!==f&&e+n<=f.size()),i.startArray();for(let t=0;t<n;++t)i.addInt32(f.read(e)),e++;i.endArray()}i.endArray()}}function C(e,t,n,r,i,a,s,o){o.startArray(),o.addDouble(n,s),o.addDouble(r,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const D="a".charCodeAt(0),F="A".charCodeAt(0),j="*".charCodeAt(0),I="b".charCodeAt(0),O="\\".charCodeAt(0),z="[".charCodeAt(0),E="{".charCodeAt(0),P=":".charCodeAt(0),G=".".charCodeAt(0),B=",".charCodeAt(0),V='"'.charCodeAt(0),M="]".charCodeAt(0),R="}".charCodeAt(0),U="e".charCodeAt(0),W="E".charCodeAt(0),X="f".charCodeAt(0),L="F".charCodeAt(0),Y="/".charCodeAt(0),K="-".charCodeAt(0),q="+".charCodeAt(0),J="n".charCodeAt(0),Z="N".charCodeAt(0),H="r".charCodeAt(0),Q="t".charCodeAt(0),$="u".charCodeAt(0),ee="0".charCodeAt(0),te="9".charCodeAt(0);class ne{constructor(e){this.m_functionStack=[],this.m_pushPositions=[],this.m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0}),void 0===e?(this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,r.t)("streaming json parsing not yet impl"):(0,r.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){const t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,r.t)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=Number.MAX_SAFE_INTEGER,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,r.t)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,r.g)(0),""}childrenAsString(){return(0,r.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,r.a)("invalid token")}toUTF8_(e,t){let n=0,r=e;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)n++,r+=6;r=e;const i=new Uint8Array(n);let a=0;for(;t.charCodeAt(r)===O&&t.charCodeAt(r+1)===$;)i[a++]=Number.parseInt(t.slice(r+2,r+6),16),r+=6;return{u8s:this.m_utf8Decoder.decode(i),end:r}}unquoteCurrentString_(){let e="",t=1;const n=this.m_endToken-this.m_startToken-1;let r=0;const i=this.m_getCurrentSubstr();for(let a=t;a<n;a++)if(i.charCodeAt(a)!==O)r++;else{switch(r>0&&(e+=i.slice(t,t+r)),i.charCodeAt(++a)){case V:e+='"';break;case $:{const{u8s:t,end:n}=this.toUTF8_(a-1,i);a=n-1,e+=t;break}case O:e+="\\";break;case Y:e+="/";break;case I:e+="\b";break;case X:e+="\f";break;case J:e+="\n";break;case H:e+="\r";break;case Q:e+="\t"}t=a+1,r=0}return r>0&&(e+=i.slice(t,t+r)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,r.a)("invalid token"),10===this.m_currentTokenType)return Number.NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return Number.NaN;e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token")}const n=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(n)&&(0,r.a)("invalid token");else if(Number.isNaN(n))return Number.NaN;return n}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,r.a)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,r.a)("invalid token"));const n=parseInt(e);return Number.isNaN(n)&&(0,r.a)("invalid token"),n}currentInt64Value(){return(0,r.g)(0),0n}currentBoolValue(){return(0,r.g)(0),!1}isError(){return 0}JSONString(){return(0,r.g)(0),""}pushPosition(){return(0,r.g)(0),!1}popPosition(){return(0,r.g)(0),!1}skipCStyleComments_(){(0,r.g)(0)}skipCppStyleComments_(){(0,r.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e===j?this.skipCStyleComments_():e===Y?this.skipCppStyleComments_():(0,r.a)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,r.a)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar();t===Y?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return this.m_peekChar()===M&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return this.m_peekChar()===R&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token");let e=this.m_peekChar();for(;e!==V;){const t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,e===V||e===O||e===Y||e===I||e===X||e===J||e===H||e===Q)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar();else if(e===$)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||e>=D&&e<=X||e>=F&&e<=L||(0,r.a)("invalid token");else(0,r.a)("invalid token")}this.m_stepOverChar()}comma_(){return this.m_peekChar()===B&&(this.m_increment(),!0)}colon_(){return this.m_peekChar()===P&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,r.a)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,this.m_peekChar()!==V&&(0,r.a)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,r.a)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,r.a)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==ee?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()}while(e>=ee&&e<=te)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e>=ee&&e<=te||(0,r.a)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar(),e!==q&&e!==K||(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),e=this.m_peekChar()),e>=ee&&e<=te||(0,r.a)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(t===K?(this.m_stepOverChar(),this.m_eof()&&(0,r.a)("invalid token"),t=this.m_peekChar(),e=!0,t>=ee&&t<=te||(0,r.a)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),t===G)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),t!==U&&t!==W||this.exp_();else if(t===U||t===W)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;const n=this.m_endToken-this.m_startToken-t;if(n<10)this.m_currentTokenType=8;else if(10===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="2147483648"?this.m_currentTokenType=8:this.m_currentTokenType=9:n.slice(t)<="2147483647"?this.m_currentTokenType=8:this.m_currentTokenType=9}else if(n<19)this.m_currentTokenType=9;else if(19===n){const n=this.m_getCurrentSubstr();e?n.slice(t)<="9223372036854775808"?this.m_currentTokenType=9:this.m_currentTokenType=7:n.slice(t)<="9223372036854775807"?this.m_currentTokenType=9:this.m_currentTokenType=7}else this.m_currentTokenType=7}}valueNull_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"null"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=10}valueTrue_(){const{s:e,bDone:t}=this.m_get(5);t&&(0,r.a)("invalid token"),"true"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=11}valueFalse_(){const{s:e,bDone:t}=this.m_get(6);t&&(0,r.a)("invalid token"),"false"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=12}valueNan_(){const{s:e,bDone:t}=this.m_get(4);t&&(0,r.a)("invalid token"),"NaN"!==e&&(0,r.a)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;const e=this.m_peekChar();e===E?this.valueStartObject_():e===z?this.valueStartArray_():e===V?this.valueString_():e===K||e>=ee&&e<=ee+9?this.valueNumber_():e===J?this.valueNull_():e===Q?this.valueTrue_():e===X?this.valueFalse_():e===Z?this.valueNan_():(0,r.a)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());const e=this.m_peekChar();e!==E&&e!==z&&(0,r.a)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const re=new class{constructor(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject=[]}reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){const e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){const e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,r.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},ie=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,s,o){!function(e,t,n,i){if(t||n){if(i.startObject(),null!==t)switch(t.getGeometryType()){case r.G.enumPolygon:w(!0,e,t,i);break;case r.G.enumPolyline:w(!1,e,t,i);break;case r.G.enumMultiPoint:!function(e,t,n){const i=t.getImpl(),a=i.hasAttribute(1)&&!(2&e),s=i.hasAttribute(2)&&!(4&e),o=i.hasAttribute(3)&&!(8&e);a&&(n.addFieldName("hasZ"),n.addBool(!0)),s&&(n.addFieldName("hasM"),n.addBool(!0)),n.addFieldName("points");const u=t.getPointCount();if(t.isEmpty())n.startArray(),n.endArray();else{const t=17-(31&e>>13);n.startArray();const r=i.getAttributeStreamRef(0);let o=null,m=null;a&&(o=i.getAttributeStreamRef(1)),s&&(m=i.getAttributeStreamRef(2));for(let e=0;e<u;e++){const i=r.read(2*e),u=r.read(2*e+1);let l=Number.NaN,d=Number.NaN;a&&(l=o.read(e)),s&&(d=m.read(e)),C(a,s,i,u,l,d,t,n)}n.endArray()}if(o){let e=null;i.isEmpty()||(e=i.getAttributeStreamRef(3)),(0,r.g)(0===u||null!==e&&e.size()>=u),n.addFieldName("ids"),n.startArray();for(let t=0;t<u;t++)n.addInt32(e.read(t));n.endArray()}}(e,t,i);break;case r.G.enumPoint:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("x"),n.addNull(),n.addFieldName("y"),n.addNull(),r&&(n.addFieldName("z"),n.addNull()),i&&(n.addFieldName("m"),n.addNull()),void(a&&(n.addFieldName("id"),n.addInt32(0)));const s=17-(31&e>>13);n.addFieldName("x"),n.addDouble(t.getX(),s),n.addFieldName("y"),n.addDouble(t.getY(),s),r&&(n.addFieldName("z"),n.addDouble(t.getZ(),s)),i&&(n.addFieldName("m"),n.addDouble(t.getM(),s)),a&&(n.addFieldName("id"),n.addInt32(t.getID()))}(e,t,i);break;case r.G.enumEnvelope:!function(e,t,n){const r=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return n.addFieldName("xmin"),n.addNull(),n.addFieldName("ymin"),n.addNull(),n.addFieldName("xmax"),n.addNull(),n.addFieldName("ymax"),n.addNull(),r&&(n.addFieldName("zmin"),n.addNull(),n.addFieldName("zmax"),n.addNull()),i&&(n.addFieldName("mmin"),n.addNull(),n.addFieldName("mmax"),n.addNull()),void(a&&(n.addFieldName("idmin"),n.addInt32(0),n.addFieldName("idmax"),n.addInt32(0)));const s=17-(31&e>>13);if(n.addFieldName("xmin"),n.addDouble(t.getXMin(),s),n.addFieldName("ymin"),n.addDouble(t.getYMin(),s),n.addFieldName("xmax"),n.addDouble(t.getXMax(),s),n.addFieldName("ymax"),n.addDouble(t.getYMax(),s),r){const e=t.queryInterval(1,0);n.addFieldName("zmin"),n.addDouble(e.vmin,s),n.addFieldName("zmax"),n.addDouble(e.vmax,s)}if(i){const e=t.queryInterval(2,0);n.addFieldName("mmin"),n.addDouble(e.vmin,s),n.addFieldName("mmax"),n.addDouble(e.vmax,s)}if(a){const e=t.queryInterval(3,0);n.addFieldName("idmin"),n.addInt32(e.vmin),n.addFieldName("idmax"),n.addInt32(e.vmax)}}(e,t,i);break;case r.G.enumMultipatch:(0,r.g)(0);break;default:(0,r.d)("exportToJSON")}null!==n&&(i.addFieldName("spatialReference"),function(e,t,n){n.startObject();let i=0;t.isCustomWkid()||(i=t.getOldID());let s=0;const o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(s=o.getOldID()),s<=0&&(i=0)),i>0){n.addFieldName("wkid"),n.addInt32(i);const e=t.getLatestID();if(e>0&&e!==i&&(n.addFieldName("latestWkid"),n.addInt32(e)),s>0){n.addFieldName("vcsWkid"),n.addInt32(s);const e=t.getLatestVerticalID();e!==s&&(n.addFieldName("latestVcsWkid"),n.addInt32(e))}}if(0===t.getCoordinateSystemType())n.addFieldName("wkid"),n.addNull(),null!==t.getUnit()&&(n.addFieldName("unit"),function(e,t,n){n.startObject();const i=t.getID();i<=0&&(0,r.a)("cannot export unit that has no valid WKID"),n.addFieldName("uwkid"),n.addInt32(i),n.endObject()}(0,t.getUnit(),n));else if(i<=0||1&e){let r="";64&e&&(r=t.getText2(),n.addFieldName("wkt2"),n.addString(r));const i=t.getText();i!==r&&(n.addFieldName("wkt"),n.addString(i))}if(16&e){const e=new a.aD;t.queryPrecisionDescriptor(e),n.addFieldName("xyTolerance"),n.addDouble(e.getTolerance(0)),n.addFieldName("zTolerance"),n.addDouble(e.getTolerance(1)),n.addFieldName("mTolerance"),n.addDouble(e.getTolerance(2)),n.addFieldName("falseX"),n.addDouble(e.getFalseX()),n.addFieldName("falseY"),n.addDouble(e.getFalseY()),n.addFieldName("xyUnits"),n.addDouble(e.getGridUnitsXY()),n.addFieldName("falseZ"),n.addDouble(e.getFalseZ()),n.addFieldName("zUnits"),n.addDouble(e.getGridUnitsZ()),n.addFieldName("falseM"),n.addDouble(e.getFalseM()),n.addFieldName("mUnits"),n.addDouble(e.getGridUnitsM())}n.endObject()}(e,n,i)),i.endObject()}}(e,t,n,i)}exportSpatialReference(e,t,n,i){(0,r.g)(0)}exportProjectionTransformation(e,t,n,i){(0,r.g)(0)}exportDatumTransformation(e,t,n,i){(0,r.g)(0)}static geometryTypeToString(e){return(0,r.g)(0),""}},ae=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,i,u,m,l){let d;"string"==typeof n?(d=new ne({jsonString:n}),d.nextToken()):d=n,1!==d.currentToken()&&(0,r.a)("failed to import map geometry: start of object is expected");const c=function(e,t,n,i,a){let u=!1,m=!1,l=!1,d=!1,c=!1,y=!1,g=!1,N=!1,T=!1,v=!1,x=!1,A=!1,S=!1,w=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,E=!1,P=!1,G=!1,B=Number.NaN,V=Number.NaN,M=Number.NaN,R=Number.NaN,U=0,W=Number.NaN,X=Number.NaN,L=Number.NaN,Y=Number.NaN,K=Number.NaN,q=Number.NaN,J=Number.NaN,Z=Number.NaN,H=0,Q=0,$=!1,ee=!1,te=null,ne=null,re=null,ie=null,ae=null;for(;3!==n.nextToken();){const t=n.currentString();if(n.nextToken(),"spatialReference"===t){if(a&&!u){u=!0,1===n.currentToken()?ie=h(n):10!==n.currentToken()&&(0,r.a)("failed to parse spatial reference: object or null is expected");continue}}else if(i)if("hasZ"===t){if(!m){m=!0,$=11===n.currentToken();continue}}else if("hasM"===t){if(!l){l=!0,ee=11===n.currentToken();continue}}else if("rings"===t){if(!(c||y||e!==r.G.enumUnknown&&e!==r.G.enumPolygon)){c=!0,({geometry:ae,as:te,bs:ne}=_(!0,!1,0,n));continue}}else if("curveRings"===t){if(!y&&(e===r.G.enumUnknown||e===r.G.enumPolygon)){y=!0,({geometry:ae,as:te,bs:ne}=_(!0,!0,0,n));continue}}else if("paths"===t){if(!(g||N||e!==r.G.enumUnknown&&e!==r.G.enumPolyline)){g=!0,({geometry:ae,as:te,bs:ne}=_(!1,!1,0,n));continue}}else if("curvePaths"===t){if(!N&&(e===r.G.enumUnknown||e===r.G.enumPolyline)){N=!0,({geometry:ae,as:te,bs:ne}=_(!1,!0,0,n));continue}}else if("points"===t){if(!T&&(e===r.G.enumUnknown||e===r.G.enumMultiPoint)){T=!0,({geometry:ae,as:te,bs:ne}=f(0,n));continue}}else if("ids"===t){if(!d){d=!0,re=p(0,n);continue}}else if("x"===t){if(!v&&(e===r.G.enumUnknown||e===r.G.enumPoint)){v=!0,B=k(n);continue}}else if("y"===t){if(!x&&(e===r.G.enumUnknown||e===r.G.enumPoint)){x=!0,V=k(n);continue}}else if("z"===t){if(!A&&(e===r.G.enumUnknown||e===r.G.enumPoint)){A=!0,M=k(n);continue}}else if("m"===t){if(!S&&(e===r.G.enumUnknown||e===r.G.enumPoint)){S=!0,R=k(n);continue}}else if("id"===t){if(!w&&(e===r.G.enumUnknown||e===r.G.enumPoint)){w=!0,U=b(n);continue}}else if("xmin"===t){if(!C&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){C=!0,W=k(n);continue}}else if("ymin"===t){if(!D&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){D=!0,X=k(n);continue}}else if("mmin"===t){if(!z&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){z=!0,J=k(n);continue}}else if("zmin"===t){if(!I&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){I=!0,K=k(n);continue}}else if("idmin"===t){if(!P&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){P=!0,H=b(n);continue}}else if("xmax"===t){if(!F&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){F=!0,L=k(n);continue}}else if("ymax"===t){if(!j&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){j=!0,Y=k(n);continue}}else if("mmax"===t){if(!E&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){E=!0,Z=k(n);continue}}else if("zmax"===t){if(!O&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){O=!0,q=k(n);continue}}else if("idmax"===t){if(!G&&(e===r.G.enumUnknown||e===r.G.enumEnvelope)){G=!0,Q=b(n);continue}}else"materials"===t&&(0,r.g)(0);n.skipChildren()}if(c||y||g||N||T){let e=null,t=null;const n=ae;$&&(ae.addAttribute(1),e=te,e||(e=(0,s.D)(n.getPointCount(),Number.NaN))),ee&&(ae.addAttribute(2),t=$?ne:te),null!=re&&ae.addAttribute(3),$&&null!=e&&n.setAttributeStreamRef(1,e),ee&&null!=t&&n.setAttributeStreamRef(2,t),null!=re&&function(e,t){if(e.isEmpty())return;const n=(0,s.K)(2,0),i=e.getGeometryType();let a=0;i===o.M.type?a=1:i===o.P.type||i===o.a.type?a=e.getPathCount():(0,r.d)("not implemented"),n.resize(e.getPointCount(),0);let u=0;for(let s=0;s<a;++s){const a=t.read(u);u++;const m=u+a;let l=0,d=0;i===o.M.type?l=e.getPointCount():i===o.P.type||i===o.a.type?(l=e.getPathSize(s),d=e.getPathStart(s)):(0,r.d)("not implemented");for(let e=0,r=Math.min(a,l);e<r;++e)n.write(d,t.read(u)),u++,d++;u=m}e.getImpl().setAttributeStreamRef(3,n)}(n,re)}else if(v||x||S||A||w){(0,s.I)(B,V)||(0,r.a)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(V)||Number.isNaN(B))&&(B=Number.NaN,V=Number.NaN);const e=new s.P({x:B,y:V});A&&e.setZ(M),S&&e.setM(R),w&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||E||P||G){(Number.isNaN(X)||Number.isNaN(L)||Number.isNaN(Y))&&(W=Number.NaN);const e=new s.E({xmin:W,ymin:X,xmax:L,ymax:Y});I&&O&&e.setInterval(1,0,K,q),z&&E&&e.setInterval(2,0,J,Z),P&&G&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,d,i,u);return new a.aF(c)}importSpatialReference(e){const t=h(e);return null===t&&(0,r.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,r.g)(0),{}}importDatumTransformation(e,t){return(0,r.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,r.a)("string_to_geometry_type"),e.endsWith("point")?r.G.enumPoint:e.endsWith("envelope")?r.G.enumEnvelope:e.endsWith("multipoint")?r.G.enumMultiPoint:e.endsWith("polyline")?r.G.enumPolyline:e.endsWith("polygon")?r.G.enumPolygon:void(0,r.a)("string_to_geometry_type")}};function se(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function oe(e,t){const n=new l(e,{strict:!1});return n.nextToken(),ae.execute(0,r.G.enumUnknown,n,!0,t)}function ue(e){let t=null;return[e.map(e=>{if(null==t){const n=me(e);return t=n.getSpatialReference(),n.getGeometry()}return le(e)}),t]}function me(e){return oe(e,!0)}function le(e){return oe(e,!1).getGeometry()}function de(e,t){return e instanceof a.aF&&(t=e.getSpatialReference(),e=e.getGeometry()),e?.isEmpty()?null:(re.reset(),ie.execute(0,e,t,re),re.getObject())}},90293:(e,t,n)=>{n(79187),n(55537),n(88885),n(95213),n(83661);var r=n(12189),i=n(83047),a=n(21325);(0,r.i)(e=>{let t,n;"number"==typeof e?t=e:n=e;const r={wkid:t,wkt:n};let s,o;if(n){s=(0,i.x1)(n);const e=(0,a.EA)(r);if(!s&&!e)throw new Error(`Unsupported WKT type: ${n}`)}else s=!(0,a.EA)(r);return o=t&&i.yD.has(t)?Math.PI/200:s?(0,i.Ao)(r):Math.PI/180,{isPCS:s,metersOrRadiansPerUnit:o,semiMajor:0,wkidOrWkt:e}})}}]);