@agrotools1/at-components 0.3.4 → 0.3.5

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 (895) hide show
  1. package/dist/AGraphicContainer-b6e32ab3.js +109 -0
  2. package/dist/APIKeyMixin-83218bd5.js +19 -0
  3. package/dist/Analysis-8c5616ab.js +31 -0
  4. package/dist/ArcGISCachedService-8da73861.js +47 -0
  5. package/dist/ArcGISService-1e7483eb.js +25 -0
  6. package/dist/AreaMeasurement2D-ee78c5ab.js +405 -0
  7. package/dist/AreaMeasurement3D-098fd9ea.js +488 -0
  8. package/dist/AttachmentInfo-1b2ece0a.js +34 -0
  9. package/dist/AttachmentQuery-470d5a03.js +18 -0
  10. package/dist/AttributeStore-f80857be.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-a5f201d7.js +63 -0
  12. package/dist/BingMapsLayer-4c95d39c.js +112 -0
  13. package/dist/Bitmap-d7c41f66.js +128 -0
  14. package/dist/BitmapContainer-af419f59.js +23 -0
  15. package/dist/BlendLayer-ced1717f.js +13 -0
  16. package/dist/BoundsStore-030e1112.js +63 -0
  17. package/dist/BufferObject-6f0ccf08.js +100 -0
  18. package/dist/BufferView-83825b1b.js +683 -0
  19. package/dist/BuildingSceneLayer-67d67dd9.js +535 -0
  20. package/dist/Button-b96d4e96.js +36 -0
  21. package/dist/CSVLayer-0d54cccb.js +208 -0
  22. package/dist/CSVSourceWorker-00c7e147.js +367 -0
  23. package/dist/CatalogDynamicGroupLayerView2D-e1b747eb.js +66 -0
  24. package/dist/CatalogFootprintLayerView2D-4d654b8c.js +76 -0
  25. package/dist/CatalogLayer-fdcebf46.js +262 -0
  26. package/dist/CatalogLayerView2D-d872dec4.js +52 -0
  27. package/dist/ClassBreaksDefinition-0f6902fe.js +18 -0
  28. package/dist/ColorMaterial.glsl-0f79d1d3.js +64 -0
  29. package/dist/ColorSet-1f170190.js +45 -0
  30. package/dist/ColorStop-81b2ebbf.js +29 -0
  31. package/dist/Container-5cca9103.js +521 -0
  32. package/dist/CustomParametersMixin-fa9fc8f5.js +12 -0
  33. package/dist/DefaultMaterial.glsl-ea170d90.js +42 -0
  34. package/dist/DefaultMaterial_COLOR_GAMMA-e9199fb6.js +653 -0
  35. package/dist/DefaultTheme-e76e0ce4.js +130 -0
  36. package/dist/DeleteForwardEditsParameters-114413db.js +18 -0
  37. package/dist/DimensionLayer-5caa9d6d.js +129 -0
  38. package/dist/DirectLineMeasurement3D-6d3a316a.js +449 -0
  39. package/dist/DistanceMeasurement2D-7090d647.js +303 -0
  40. package/dist/DoubleArray-40bc6f82.js +25 -0
  41. package/dist/Dropdown/Checklist/Dropdown.Checklist.d.ts +17 -17
  42. package/dist/Dropdown/Dropdown.core.d.ts +6 -4
  43. package/dist/Dropdown/Dropdown.types.d.ts +1 -1
  44. package/dist/EdgeProcessingWorker-94aed8c4.js +63 -0
  45. package/dist/EditBusLayer-dcf477a3.js +107 -0
  46. package/dist/ElevationInfo-a456026a.js +56 -0
  47. package/dist/ElevationLayer-6061b8f4.js +129 -0
  48. package/dist/ElevationQuery-ec17e2cc.js +598 -0
  49. package/dist/ElevationSamplerWorker-beaaeaeb.js +62 -0
  50. package/dist/ExportImageParameters-56040230.js +66 -0
  51. package/dist/ExportStrategy-7d1b4a0c.js +93 -0
  52. package/dist/ExportWMSImageParameters-0b3d33ed.js +33 -0
  53. package/dist/External-9a57bcf0.js +110 -0
  54. package/dist/FeatureCollectionSnappingSource-b589f9ce.js +130 -0
  55. package/dist/FeatureCommandQueue-d1572e0d.js +1244 -0
  56. package/dist/FeatureEffect-20d94762.js +39 -0
  57. package/dist/FeatureEffectLayer-017997f2.js +13 -0
  58. package/dist/FeatureFilter-73c8c240.js +27 -0
  59. package/dist/FeatureLayer-ecf9f4ea.js +693 -0
  60. package/dist/FeatureLayerBase-1ffc64a0.js +148 -0
  61. package/dist/FeatureLayerSource-0acdac77.js +444 -0
  62. package/dist/FeatureLayerView2D-6f0d2580.js +1967 -0
  63. package/dist/FeaturePipelineWorker-77d06d4f.js +3633 -0
  64. package/dist/FeatureReductionLayer-203415cc.js +225 -0
  65. package/dist/FeatureReductionSelection-4ba3cfda.js +22 -0
  66. package/dist/FeatureServiceSnappingSource-90c5e877.js +481 -0
  67. package/dist/FeatureServiceSnappingSourceWorker-9f33d320.js +747 -0
  68. package/dist/FeatureSet-29d82bc9.js +188 -0
  69. package/dist/FeatureStore-9d48217b.js +131 -0
  70. package/dist/FeatureTemplate-79cf9cb6.js +12 -0
  71. package/dist/FeatureType-30eece24.js +25 -0
  72. package/dist/FieldsIndex-7d8f3589.js +109 -0
  73. package/dist/Filter/components/Filter.types.d.ts +17 -0
  74. package/dist/Filter/index.d.ts +4 -0
  75. package/dist/Filter/tests/mocks.d.ts +6 -0
  76. package/dist/FormTemplate-18b193a8.js +350 -0
  77. package/dist/GeoJSONLayer-d2677013.js +236 -0
  78. package/dist/GeoJSONSourceWorker-4571c9d5.js +247 -0
  79. package/dist/GeoRSSLayer-320f17b2.js +73 -0
  80. package/dist/GeoRSSLayerView2D-4683eb47.js +140 -0
  81. package/dist/GeometryUtils-b855940e.js +403 -0
  82. package/dist/GraphicContainer-9bd07fb2.js +26 -0
  83. package/dist/GraphicManipulator-e96e9aa3.js +1499 -0
  84. package/dist/GraphicsLayer-964ed1f0.js +38 -0
  85. package/dist/GraphicsLayerView2D-83766b4b.js +114 -0
  86. package/dist/GraphicsSnappingSource-0bf5350b.js +273 -0
  87. package/dist/GraphicsView2D-3103ed12.js +620 -0
  88. package/dist/GroupLayer-2c099630.js +147 -0
  89. package/dist/GroupLayerView2D-abb8b6d5.js +98 -0
  90. package/dist/HUDMaterial.glsl-6e206016.js +65 -0
  91. package/dist/HighlightCounter-1d4774e1.js +41 -0
  92. package/dist/HighlightGraphicContainer-de26900b.js +18 -0
  93. package/dist/I3SBinaryReader-63c12e1b.js +310 -0
  94. package/dist/I3SLayerDefinitions-d0aa8265.js +55 -0
  95. package/dist/I3SUtil-277467e8.js +59 -0
  96. package/dist/IdentityManager-a1b54522.js +899 -0
  97. package/dist/ImageHistogramParameters-47cf0f1b.js +905 -0
  98. package/dist/ImageryLayer-89c92097.js +1799 -0
  99. package/dist/ImageryLayerView2D-e0c5549a.js +352 -0
  100. package/dist/ImageryTileLayer-c38364f3.js +2157 -0
  101. package/dist/ImageryTileLayerView2D-f659a87c.js +1110 -0
  102. package/dist/Indices-29975728.js +67 -0
  103. package/dist/Input/Input.core.d.ts +1 -1
  104. package/dist/Input/index.d.ts +1 -1
  105. package/dist/IntegratedMesh3DTilesLayer-8b851e87.js +112 -0
  106. package/dist/IntegratedMeshLayer-9ed738ba.js +141 -0
  107. package/dist/InteractiveAnalysisViewModel-c95e13c5.js +7397 -0
  108. package/dist/InterleavedLayout-f5e6ee23.js +163 -0
  109. package/dist/KMLLayer-3662a890.js +162 -0
  110. package/dist/KMLLayerView2D-3d172b6a.js +253 -0
  111. package/dist/KnowledgeGraphLayerView2D-086160b5.js +43 -0
  112. package/dist/LRUCache-948c7d75.js +32 -0
  113. package/dist/LabelClass-c0694878.js +135 -0
  114. package/dist/LabelMetric-39280634.js +400 -0
  115. package/dist/LaserlinePath.glsl-205f0e8a.js +64 -0
  116. package/dist/Laserlines.glsl-6f09c43e.js +65 -0
  117. package/dist/LayerFloorInfo-308449b6.js +15 -0
  118. package/dist/LayerView-2b3b1a70.js +206 -0
  119. package/dist/LercWorker-b007ee29.js +157 -0
  120. package/dist/LineOfSightLayer-99b48ebf.js +147 -0
  121. package/dist/LinkChartLayer-d69e2e36.js +1027 -0
  122. package/dist/List/components/List.d.ts +74 -0
  123. package/dist/List/components/List.types.d.ts +11 -0
  124. package/dist/List/index.d.ts +4 -0
  125. package/dist/List/tests/mocks.d.ts +7 -0
  126. package/dist/Lyr3DWorker-2fdd578b.js +82 -0
  127. package/dist/MagnifierPrograms-5042ccad.js +806 -0
  128. package/dist/MapImageLayer-f3e35db3.js +169 -0
  129. package/dist/MapImageLayerView2D-98cfaffb.js +146 -0
  130. package/dist/MapNotesLayer-6942570f.js +283 -0
  131. package/dist/MapNotesLayerView2D-b641bba4.js +161 -0
  132. package/dist/MapServiceLayerViewHelper-9111fb4f.js +288 -0
  133. package/dist/MeasurementWidgetContent-a66f382a.js +2642 -0
  134. package/dist/MediaLayer-585e1067.js +523 -0
  135. package/dist/MediaLayerView2D-74d90bf4.js +332 -0
  136. package/dist/MemCache-1532e921.js +227 -0
  137. package/dist/MemorySourceWorker-ba059303.js +222 -0
  138. package/dist/Mesh-43d631db.js +980 -0
  139. package/dist/MeshLocalVertexSpace-f9cc6881.js +19 -0
  140. package/dist/MultiOriginJSONSupport-ec8788e6.js +158 -0
  141. package/dist/OGCFeatureLayer-5e327659.js +211 -0
  142. package/dist/OGCFeatureLayerView2D-d0104fdc.js +82 -0
  143. package/dist/ObjectStack-2d389b76.js +21 -0
  144. package/dist/Octree-1dba17ba.js +495 -0
  145. package/dist/OpenStreetMapLayer-dc083119.js +30 -0
  146. package/dist/OperationalLayer-d43d80b1.js +44 -0
  147. package/dist/OrderByInfo-26301234.js +16 -0
  148. package/dist/OrderedLayer-36fe0e60.js +26 -0
  149. package/dist/OrientedImageryLayer-21689d88.js +216 -0
  150. package/dist/OverlayCompositing.glsl-f80836ca.js +65 -0
  151. package/dist/OverrideHelper-880a7e09.js +242 -0
  152. package/dist/PBFDecoderWorker-b5f6d890.js +213 -0
  153. package/dist/PointCloudLayer-899f6a49.js +197 -0
  154. package/dist/PointCloudUniqueValueRenderer-8a477087.js +115 -0
  155. package/dist/PointCloudWorker-4bea79e8.js +212 -0
  156. package/dist/PooledRBush-df73bc2a.js +272 -0
  157. package/dist/Popup-e01092b4.js +3990 -0
  158. package/dist/PortalLayer-daca6a23.js +126 -0
  159. package/dist/Program-8b1e5f48.js +694 -0
  160. package/dist/ProgramTemplate-e4360f44.js +35 -0
  161. package/dist/QueryEngine-ca1511e3.js +896 -0
  162. package/dist/QueryTask-c9fa71fa.js +119 -0
  163. package/dist/RasterSymbolizer-1644d7a7.js +3024 -0
  164. package/dist/RasterVFDisplayObject-7ec19876.js +581 -0
  165. package/dist/RasterWorker-2d320094.js +78 -0
  166. package/dist/RawBlockCache-86e6c5d3.js +185 -0
  167. package/dist/RealisticTree.glsl-65abf4e9.js +42 -0
  168. package/dist/RefreshableLayer-a0708abb.js +80 -0
  169. package/dist/RefreshableLayerView-2b6aca24.js +16 -0
  170. package/dist/Relationship-ef9ae528.js +64 -0
  171. package/dist/RelationshipQuery-8a39148b.js +22 -0
  172. package/dist/RenderingContext-e718bfed.js +889 -0
  173. package/dist/RibbonLine.glsl-e82fb3bb.js +65 -0
  174. package/dist/RouteLayer-06ecd24a.js +786 -0
  175. package/dist/RouteLayerView2D-26c96396.js +195 -0
  176. package/dist/SDFHelper-70cff23b.js +140 -0
  177. package/dist/SSAO.glsl-54f15911.js +43 -0
  178. package/dist/SSAOBlur.glsl-cbd829bc.js +42 -0
  179. package/dist/ScaleRangeLayer-dc6d9c0e.js +21 -0
  180. package/dist/SceneLayer-255b45af.js +542 -0
  181. package/dist/SceneLayerSnappingSource-8969a32e.js +218 -0
  182. package/dist/SceneLayerSnappingSourceWorker-17673240.js +112 -0
  183. package/dist/SceneLayerWorker-46a764a8.js +164 -0
  184. package/dist/SceneService-bbc3f4e5.js +215 -0
  185. package/dist/Scheduler-e3ad50f2.js +373 -0
  186. package/dist/Search/Search.d.ts +11 -0
  187. package/dist/Select/Multiple/Select.multiple.d.ts +1 -1
  188. package/dist/Select/Select.core.d.ts +1 -1
  189. package/dist/Select/index.d.ts +1 -1
  190. package/dist/ShadedColorMaterial.glsl-8e194f81.js +64 -0
  191. package/dist/SnappingOperation-d12c0cd0.js +48 -0
  192. package/dist/SourceLayerData-054d8bb6.js +116 -0
  193. package/dist/SpatialFilter-ba146c95.js +1701 -0
  194. package/dist/Stop-38c9a9d4.js +281 -0
  195. package/dist/StreamLayer-9d300b87.js +188 -0
  196. package/dist/StreamLayerView2D-d80b90e9.js +164 -0
  197. package/dist/StyleRepository-e8c44bab.js +2212 -0
  198. package/dist/SublayersOwner-469b921a.js +545 -0
  199. package/dist/SubtypeGroupLayer-e467307a.js +514 -0
  200. package/dist/SubtypeGroupLayerView2D-41ed7e6f.js +84 -0
  201. package/dist/TableConfig/TableConfig.d.ts +6 -6
  202. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  203. package/dist/TechniqueInstance-9c0d4dcf.js +233 -0
  204. package/dist/TemporalLayer-011ac13a.js +23 -0
  205. package/dist/Texture-b28260ca.js +501 -0
  206. package/dist/TextureOnly.glsl-87d0e898.js +65 -0
  207. package/dist/Theme-bf54db6d.js +3426 -0
  208. package/dist/Tick-5be5a637.js +723 -0
  209. package/dist/TileContainer-09ca940a.js +31 -0
  210. package/dist/TileInfoTilemapCache-26485a76.js +38 -0
  211. package/dist/TileLayer-b0580f1d.js +194 -0
  212. package/dist/TileLayerView2D-e4561937.js +187 -0
  213. package/dist/TilemapCache-d2163c80.js +189 -0
  214. package/dist/TimeInfo-68d2df8b.js +42 -0
  215. package/dist/TimeOnly-bb600899.js +706 -0
  216. package/dist/Tooltip-927072f3.js +138 -0
  217. package/dist/TopFeaturesQuery-77f00fe7.js +32 -0
  218. package/dist/TurboLine-87dd880a.js +565 -0
  219. package/dist/UniqueValueRenderer-56a91680.js +1039 -0
  220. package/dist/UnknownLayer-6b7b3c5d.js +30 -0
  221. package/dist/UnknownTimeZone-e62caf07.js +15 -0
  222. package/dist/UnsupportedLayer-16a90c0a.js +31 -0
  223. package/dist/UpdateTracking2D-bf4e8a89.js +8566 -0
  224. package/dist/Util-6762e3c9.js +57 -0
  225. package/dist/VectorTileLayer-3c42b01b.js +544 -0
  226. package/dist/VectorTileLayerView2D-3af619aa.js +2108 -0
  227. package/dist/Version-9c75ca2b.js +33 -0
  228. package/dist/VertexArrayObject-e736d4c8.js +73 -0
  229. package/dist/VertexColor.glsl-69e78e7a.js +2683 -0
  230. package/dist/VertexSnappingCandidate-10823eb3.js +13 -0
  231. package/dist/VideoLayerView2D-68e687b0.js +124 -0
  232. package/dist/VoxelLayer-76005caf.js +631 -0
  233. package/dist/WFSLayer-398b281f.js +221 -0
  234. package/dist/WFSSourceWorker-7506acff.js +157 -0
  235. package/dist/WGLContainer-f2c4f5da.js +5426 -0
  236. package/dist/WMSLayer-6fbfc745.js +536 -0
  237. package/dist/WMSLayerView2D-63dda194.js +117 -0
  238. package/dist/WMTSLayer-6492359f.js +531 -0
  239. package/dist/WMTSLayerView2D-5daae3fe.js +142 -0
  240. package/dist/WebTileLayer-5f7595df.js +110 -0
  241. package/dist/WhereClause-a8fc45da.js +2766 -0
  242. package/dist/WorkerHandle-11931750.js +47 -0
  243. package/dist/WorkerTileHandler-b53b5efc.js +1539 -0
  244. package/dist/action-b5c3b319.js +198 -0
  245. package/dist/action-group-01e02696.js +145 -0
  246. package/dist/action-menu-e0ddae4e.js +1759 -0
  247. package/dist/apng-9d467a98.js +392 -0
  248. package/dist/arcade-71dc610e.js +229 -0
  249. package/dist/arcadeAsyncRuntime-146d9fb6.js +943 -0
  250. package/dist/arcadeUtils-f7ed3399.js +8741 -0
  251. package/dist/arcgis-knowledge-client-core-b8fef5b0.js +1218 -0
  252. package/dist/arcgis-knowledge-client-core-simd-d54c7150.js +1218 -0
  253. package/dist/arcgisLayers-8d42568b.js +152 -0
  254. package/dist/associatedFeatureServiceUtils-c50f28e9.js +92 -0
  255. package/dist/axisAngleDegrees-ea89c136.js +49 -0
  256. package/dist/basis_transcoder-39fbc6ae.js +1248 -0
  257. package/dist/calcite-action-264e28ab.js +22 -0
  258. package/dist/calcite-action-bar-6ec66445.js +303 -0
  259. package/dist/calcite-action-group-85d021dc.js +28 -0
  260. package/dist/calcite-button-8a5af2ce.js +228 -0
  261. package/dist/calcite-flow-9b5e43fd.js +128 -0
  262. package/dist/calcite-flow-item-0089f891.js +499 -0
  263. package/dist/calcite-icon-c20a8db7.js +16 -0
  264. package/dist/calcite-input-24e48df5.js +24 -0
  265. package/dist/calcite-label-9e4dcb66.js +79 -0
  266. package/dist/calcite-list-711dcec1.js +2135 -0
  267. package/dist/calcite-list-item-1a29c5f1.js +576 -0
  268. package/dist/calcite-list-item-group-b69dedb8.js +71 -0
  269. package/dist/calcite-loader-e8b209f6.js +14 -0
  270. package/dist/calcite-modal-5e518e4c.js +333 -0
  271. package/dist/calcite-notice-25463d4d.js +181 -0
  272. package/dist/calcite-option-113080c1.js +94 -0
  273. package/dist/calcite-scrim-423337f4.js +18 -0
  274. package/dist/calcite-select-cd1e7e86.js +231 -0
  275. package/dist/capabilities-e7ea2422.js +50 -0
  276. package/dist/chartCommon-beb757c5.js +256 -0
  277. package/dist/chartUtilsAm5-6eaf385e.js +2954 -0
  278. package/dist/clientSideDefaults-366deb67.js +39 -0
  279. package/dist/colorRamps-4ea8b8f7.js +38 -0
  280. package/dist/colorUtils-611a3fa1.js +164 -0
  281. package/dist/commonProperties-3f86f534.js +60 -0
  282. package/dist/computeTranslationToOriginAndRotation-db6fb1b6.js +60 -0
  283. package/dist/conditionalSlot-4bf2837a.js +27 -0
  284. package/dist/createConnection-0754c362.js +299 -0
  285. package/dist/dataUtils-ebb55aab.js +1421 -0
  286. package/dist/deduplicate-af05e046.js +89 -0
  287. package/dist/defaults-f025f8a3.js +31 -0
  288. package/dist/deleteForwardEdits-0b666266.js +13 -0
  289. package/dist/diffUtils-b887dbbc.js +90 -0
  290. package/dist/drapedUtils-82fba1a5.js +75 -0
  291. package/dist/earcut-da8e2a55.js +292 -0
  292. package/dist/edgeProcessing-d7499657.js +252 -0
  293. package/dist/editingSupport-4b7813cf.js +203 -0
  294. package/dist/editsZScale-4a6ee4aa.js +37 -0
  295. package/dist/elevationInfoUtils-c20557cb.js +126 -0
  296. package/dist/executeForIds-6a55aa95.js +14 -0
  297. package/dist/executeForTopCount-7ffc37ac.js +17 -0
  298. package/dist/executeForTopExtents-191307d3.js +17 -0
  299. package/dist/executeForTopIds-f644d448.js +17 -0
  300. package/dist/executeQueryJSON-c5616d7b.js +15 -0
  301. package/dist/executeQueryPBF-807fb886.js +152 -0
  302. package/dist/executeRelationshipQuery-d5a1463b.js +53 -0
  303. package/dist/executeTopFeaturesQuery-6bb737a8.js +18 -0
  304. package/dist/featureConversionUtils-8fd0a407.js +479 -0
  305. package/dist/featureLayerUtils-37c96c26.js +250 -0
  306. package/dist/featureLayerUtils-cd009ccc.js +142 -0
  307. package/dist/featureSetUtils-f54946cf.js +2530 -0
  308. package/dist/featuresetbase-5a262736.js +707 -0
  309. package/dist/featuresetgeom-b772f260.js +99 -0
  310. package/dist/featuresetstats-fecaae94.js +81 -0
  311. package/dist/featuresetstring-8d32b66d.js +95 -0
  312. package/dist/fetchService-41c786e9.js +33 -0
  313. package/dist/fieldProperties-0a31a020.js +33 -0
  314. package/dist/floatRGBA-bcce207e.js +20 -0
  315. package/dist/form-8bc80cb2.js +138 -0
  316. package/dist/geohashUtils-5b115834.js +85 -0
  317. package/dist/geojson-33ba4718.js +208 -0
  318. package/dist/geomasync-9ccbb40e.js +567 -0
  319. package/dist/geometryEngine-5d1edffb.js +192 -0
  320. package/dist/geometryEngineAsync-65f20167.js +217 -0
  321. package/dist/geometryEngineBase-4107554c.js +18463 -0
  322. package/dist/geometryEngineJSON-96ac95b3.js +46 -0
  323. package/dist/geometryEngineJSON-fecd2377.js +171 -0
  324. package/dist/geometryEngineWorker-3cc93f48.js +11 -0
  325. package/dist/geometryServiceUtils-99ffac76.js +28 -0
  326. package/dist/georeference-597e7b2a.js +291 -0
  327. package/dist/gif-24ef6c2c.js +323 -0
  328. package/dist/gltfexport-f5557b01.js +705 -0
  329. package/dist/groupLayerUtils-429ce1be.js +39 -0
  330. package/dist/heatmapUtils-582b52e1.js +45 -0
  331. package/dist/highlightReasons-6f0f9ef6.js +19 -0
  332. package/dist/hydrated-31a838fb.js +40 -0
  333. package/dist/i3s-3437a8f0.js +809 -0
  334. package/dist/icon-6764e79e.js +127 -0
  335. package/dist/imageBitmapUtils-d56cd963.js +23 -0
  336. package/dist/imageUtils-5fc5f2e1.js +69 -0
  337. package/dist/imageUtils-d0a1bdd3.js +89 -0
  338. package/dist/imageryUtils-31c938b0.js +43 -0
  339. package/dist/index-a8d87ec0.js +45604 -0
  340. package/dist/index.d.ts +2 -1
  341. package/dist/index.js +26 -25
  342. package/dist/input-message-067fbc56.js +92 -0
  343. package/dist/input2-d25d1697.js +575 -0
  344. package/dist/interactive-79c8f5d7.js +80 -0
  345. package/dist/jsonContext-b5489a22.js +15 -0
  346. package/dist/jsonUtils-34961e68.js +86 -0
  347. package/dist/jsonUtils-65dc6fdf.js +476 -0
  348. package/dist/jsonUtils-980c608d.js +59 -0
  349. package/dist/kmlUtils-b1b9817a.js +112 -0
  350. package/dist/knowledgeGraphService-53d3ffbb.js +739 -0
  351. package/dist/knowledgegraph-bd84abd0.js +149 -0
  352. package/dist/labelUtils-333abe25.js +61 -0
  353. package/dist/labelingInfo-6d452fa4.js +46 -0
  354. package/dist/layersCreator-2cc797a3.js +151 -0
  355. package/dist/layersLoader-028db48b.js +197 -0
  356. package/dist/lazyLayerLoader-2dd5721b.js +10 -0
  357. package/dist/lclayout-44591238.js +773 -0
  358. package/dist/lengthUtils-7339106c.js +5 -0
  359. package/dist/lerc-wasm-49e10ccb.js +325 -0
  360. package/dist/libtess-asm-ac16428b.js +3673 -0
  361. package/dist/libtess-f4e34dcf.js +269 -0
  362. package/dist/lineSegment-0e4aefd8.js +76 -0
  363. package/dist/loadGLTFMesh-4afc2514.js +181 -0
  364. package/dist/loadable-a2fd544f.js +24 -0
  365. package/dist/loader-fbae5e8f.js +79 -0
  366. package/dist/lyr3DWorker-1fc30357.js +2108 -0
  367. package/dist/mapViewDeps-59a6c6c7.js +3052 -0
  368. package/dist/mediaLayerUtils-642a4077.js +35 -0
  369. package/dist/meshFeatureSet-91312223.js +126 -0
  370. package/dist/meshVertexSpaceUtils-48eddc77.js +58 -0
  371. package/dist/multidimensionalUtils-705f0902.js +290 -0
  372. package/dist/normalizeUtilsSync-71d587bd.js +181 -0
  373. package/dist/number-063f85f4.js +128 -0
  374. package/dist/objectResourceUtils-0e881546.js +1455 -0
  375. package/dist/observers-745d564e.js +30 -0
  376. package/dist/ogcFeatureUtils-80329692.js +206 -0
  377. package/dist/openCloseComponent-1c398ac3.js +37 -0
  378. package/dist/orientedBoundingBox-a29567df.js +447 -0
  379. package/dist/parser-65ddb097.js +488 -0
  380. package/dist/pbf-b0a9807c.js +215 -0
  381. package/dist/pbfQueryUtils-3cd28b30.js +422 -0
  382. package/dist/pe-wasm-fe3a1187.js +887 -0
  383. package/dist/persistable-36a3796e.js +89 -0
  384. package/dist/perspectiveUtils-b75aeded.js +42 -0
  385. package/dist/pieChart-bc276742.js +555 -0
  386. package/dist/plane-79192909.js +160 -0
  387. package/dist/popupUtils-022834aa.js +22 -0
  388. package/dist/popupUtils-4b2bd688.js +50 -0
  389. package/dist/portalItemUtils-052627b4.js +57 -0
  390. package/dist/portalLayers-3be98e63.js +312 -0
  391. package/dist/portalUtils-b665fd61.js +7 -0
  392. package/dist/programUtils-00a4e18d.js +59 -0
  393. package/dist/project-032d84cf.js +21 -0
  394. package/dist/projectPointToVector-3a48d9a2.js +14 -0
  395. package/dist/projectVectorToVector-4c6a3902.js +13 -0
  396. package/dist/quantityUtils-a39f9287.js +33 -0
  397. package/dist/quantizationUtils-4616cce9.js +68 -0
  398. package/dist/quat-5e906b75.js +104 -0
  399. package/dist/query-2ab99d18.js +89 -0
  400. package/dist/queryAttachments-15a42419.js +39 -0
  401. package/dist/queryEngineUtils-ff4789cd.js +21 -0
  402. package/dist/queryTopFeatures-5eb3ccc9.js +50 -0
  403. package/dist/queryZScale-62422052.js +12 -0
  404. package/dist/rasterProjectionHelper-b605f2ee.js +577 -0
  405. package/dist/rasterUtils-f2036a08.js +122 -0
  406. package/dist/rasterizingUtils-0c9cf9ce.js +46 -0
  407. package/dist/request-00229175.js +46 -0
  408. package/dist/requestImageUtils-90da2619.js +8 -0
  409. package/dist/resourceExtension-eadbfa3f.js +17 -0
  410. package/dist/resourceUtils-28b3c1e8.js +42 -0
  411. package/dist/resourceUtils-4e9ccf63.js +69 -0
  412. package/dist/resourceUtils-666fad8a.js +62 -0
  413. package/dist/saveAPIKeyUtils-1a4f92e5.js +8 -0
  414. package/dist/saveUtils-5b62c0b1.js +24 -0
  415. package/dist/scaleUtils-6153583e.js +23 -0
  416. package/dist/scrim-6e0e08c4.js +114 -0
  417. package/dist/serviceCapabilitiesUtils-96f8d393.js +64 -0
  418. package/dist/sourceUtils-5aee3b16.js +71 -0
  419. package/dist/sphere-512478f6.js +199 -0
  420. package/dist/statsWorker-183f2d29.js +37 -0
  421. package/dist/streamLayerUtils-a1e8e58a.js +31 -0
  422. package/dist/style.css +1 -1
  423. package/dist/styleUtils-49a8dabd.js +14 -0
  424. package/dist/styleUtils-52e000d6.js +75 -0
  425. package/dist/sublayerUtils-65a83d58.js +37 -0
  426. package/dist/substitute-0272cab6.js +52 -0
  427. package/dist/symbolColorUtils-261cba60.js +8 -0
  428. package/dist/symbolLayerUtils-e0203fd7.js +31 -0
  429. package/dist/symbologySnappingCandidates-eeda4ddf.js +221 -0
  430. package/dist/t9n-147b4f00.js +349 -0
  431. package/dist/testSVGPremultipliedAlpha-e3c11fd6.js +94 -0
  432. package/dist/timeSupport-3ddd7e4b.js +410 -0
  433. package/dist/triangle-28fd7dff.js +98 -0
  434. package/dist/unitConversionUtils-df3ffd70.js +17 -0
  435. package/dist/unitFormatUtils-d857519e.js +40 -0
  436. package/dist/uploadAssetErrors-18a6fad7.js +70 -0
  437. package/dist/uploadAssets-f2c89175.js +330 -0
  438. package/dist/utils-214b98cc.js +91 -0
  439. package/dist/utils-283fbef1.js +34 -0
  440. package/dist/utils-333b2280.js +2746 -0
  441. package/dist/utils-7202e24d.js +232 -0
  442. package/dist/utils-a7d5b733.js +419 -0
  443. package/dist/utils-cffde1b1.js +433 -0
  444. package/dist/utils-e4309923.js +79 -0
  445. package/dist/utils-e582955c.js +73 -0
  446. package/dist/utils3-d4b9a6af.js +75 -0
  447. package/dist/vec3-d9885b29.js +81 -0
  448. package/dist/vec42-d5675dd5.js +125 -0
  449. package/dist/versionUtils-2a4f90d3.js +161 -0
  450. package/dist/visualVariableUtils-d45d2e59.js +267 -0
  451. package/dist/webStyleSymbolUtils-5d8e6604.js +48 -0
  452. package/dist/webglDeps-c5e1e661.js +23 -0
  453. package/dist/wfsUtils-a004cee1.js +343 -0
  454. package/dist/workerHelper-a0956a07.js +11 -0
  455. package/dist/xyChart-e8a9ed1d.js +3335 -0
  456. package/package.json +1 -1
  457. package/dist/AGraphicContainer-0a4e0426.js +0 -109
  458. package/dist/APIKeyMixin-83e85532.js +0 -19
  459. package/dist/Analysis-c4011253.js +0 -31
  460. package/dist/ArcGISCachedService-1c6af1c1.js +0 -47
  461. package/dist/ArcGISService-1d880889.js +0 -25
  462. package/dist/AreaMeasurement2D-86006a71.js +0 -405
  463. package/dist/AreaMeasurement3D-1825243c.js +0 -488
  464. package/dist/AttachmentInfo-fa04c641.js +0 -34
  465. package/dist/AttachmentQuery-1450c2f7.js +0 -18
  466. package/dist/AttributeStore-02f947ea.js +0 -1707
  467. package/dist/BaseDynamicLayerView2D-eb11c757.js +0 -63
  468. package/dist/BingMapsLayer-7ad7d511.js +0 -112
  469. package/dist/Bitmap-14a020d8.js +0 -128
  470. package/dist/BitmapContainer-cc71fd24.js +0 -23
  471. package/dist/BlendLayer-e2f97659.js +0 -13
  472. package/dist/BoundsStore-8612892f.js +0 -63
  473. package/dist/BufferObject-bd932c2c.js +0 -100
  474. package/dist/BufferView-97ed14c7.js +0 -683
  475. package/dist/BuildingSceneLayer-3f5380c8.js +0 -535
  476. package/dist/Button-15031955.js +0 -36
  477. package/dist/CSVLayer-a76db6f4.js +0 -208
  478. package/dist/CSVSourceWorker-afe160ed.js +0 -367
  479. package/dist/CatalogDynamicGroupLayerView2D-be946494.js +0 -66
  480. package/dist/CatalogFootprintLayerView2D-14763204.js +0 -76
  481. package/dist/CatalogLayer-7d6228dd.js +0 -262
  482. package/dist/CatalogLayerView2D-13e32a42.js +0 -52
  483. package/dist/ClassBreaksDefinition-7040a7fc.js +0 -18
  484. package/dist/ColorMaterial.glsl-e56765f1.js +0 -64
  485. package/dist/ColorSet-4ff0a7b7.js +0 -45
  486. package/dist/ColorStop-1e154045.js +0 -29
  487. package/dist/Container-6e3b610b.js +0 -521
  488. package/dist/CustomParametersMixin-c01280c0.js +0 -12
  489. package/dist/DefaultMaterial.glsl-e7e23b90.js +0 -42
  490. package/dist/DefaultMaterial_COLOR_GAMMA-7fd21704.js +0 -653
  491. package/dist/DefaultTheme-3c5b433f.js +0 -130
  492. package/dist/DeleteForwardEditsParameters-7073c5e5.js +0 -18
  493. package/dist/DimensionLayer-f921dd3d.js +0 -129
  494. package/dist/DirectLineMeasurement3D-61d14af2.js +0 -449
  495. package/dist/DistanceMeasurement2D-b023b35c.js +0 -303
  496. package/dist/DoubleArray-1186b8b8.js +0 -25
  497. package/dist/Dropdown/Filter/Filter.types.d.ts +0 -17
  498. package/dist/Dropdown/Filter/test.mocks.d.ts +0 -6
  499. package/dist/Dropdown/List/Dropdown.List.d.ts +0 -73
  500. package/dist/Dropdown/List/List.types.d.ts +0 -11
  501. package/dist/Dropdown/List/test.mocks.d.ts +0 -7
  502. package/dist/EdgeProcessingWorker-cb6277ad.js +0 -63
  503. package/dist/EditBusLayer-9d740f8f.js +0 -107
  504. package/dist/ElevationInfo-581ff99d.js +0 -56
  505. package/dist/ElevationLayer-42b57d9b.js +0 -129
  506. package/dist/ElevationQuery-f6d0cf9f.js +0 -598
  507. package/dist/ElevationSamplerWorker-50d805bb.js +0 -62
  508. package/dist/ExportImageParameters-5b047f92.js +0 -66
  509. package/dist/ExportStrategy-b6c54d77.js +0 -93
  510. package/dist/ExportWMSImageParameters-ff5a3ac8.js +0 -33
  511. package/dist/External-695a389a.js +0 -110
  512. package/dist/FeatureCollectionSnappingSource-fdaed9e0.js +0 -130
  513. package/dist/FeatureCommandQueue-c2bd1a39.js +0 -1244
  514. package/dist/FeatureEffect-9ea1b3da.js +0 -39
  515. package/dist/FeatureEffectLayer-0fa169c4.js +0 -13
  516. package/dist/FeatureFilter-638c4cae.js +0 -27
  517. package/dist/FeatureLayer-2a419d3e.js +0 -693
  518. package/dist/FeatureLayerBase-7331e738.js +0 -148
  519. package/dist/FeatureLayerSource-733186fb.js +0 -444
  520. package/dist/FeatureLayerView2D-bc4994b6.js +0 -1967
  521. package/dist/FeaturePipelineWorker-5f68488c.js +0 -3633
  522. package/dist/FeatureReductionLayer-0c152478.js +0 -225
  523. package/dist/FeatureReductionSelection-f952512d.js +0 -22
  524. package/dist/FeatureServiceSnappingSource-4c02d5a3.js +0 -481
  525. package/dist/FeatureServiceSnappingSourceWorker-c2a1dc50.js +0 -747
  526. package/dist/FeatureSet-2c6b8e00.js +0 -188
  527. package/dist/FeatureStore-a26846c0.js +0 -131
  528. package/dist/FeatureTemplate-1b6b7e2d.js +0 -12
  529. package/dist/FeatureType-9e1f1a7d.js +0 -25
  530. package/dist/FieldsIndex-91711836.js +0 -109
  531. package/dist/FormTemplate-ae0cfb6e.js +0 -350
  532. package/dist/GeoJSONLayer-b2070c34.js +0 -236
  533. package/dist/GeoJSONSourceWorker-aecb5f9b.js +0 -247
  534. package/dist/GeoRSSLayer-3743b41f.js +0 -73
  535. package/dist/GeoRSSLayerView2D-098c24bc.js +0 -140
  536. package/dist/GeometryUtils-036c7f22.js +0 -403
  537. package/dist/GraphicContainer-ece3945e.js +0 -26
  538. package/dist/GraphicManipulator-bc92899f.js +0 -1499
  539. package/dist/GraphicsLayer-764f0324.js +0 -38
  540. package/dist/GraphicsLayerView2D-36908d0c.js +0 -114
  541. package/dist/GraphicsSnappingSource-2bb681c0.js +0 -273
  542. package/dist/GraphicsView2D-e9cf5cd6.js +0 -620
  543. package/dist/GroupLayer-5ea5b71b.js +0 -147
  544. package/dist/GroupLayerView2D-22ec9eaa.js +0 -98
  545. package/dist/HUDMaterial.glsl-80ab7d22.js +0 -65
  546. package/dist/HighlightCounter-36842e52.js +0 -41
  547. package/dist/HighlightGraphicContainer-10cb9671.js +0 -18
  548. package/dist/I3SBinaryReader-9dbdc661.js +0 -310
  549. package/dist/I3SLayerDefinitions-b56e2c87.js +0 -55
  550. package/dist/I3SUtil-5461dc89.js +0 -59
  551. package/dist/IdentityManager-bb063156.js +0 -899
  552. package/dist/ImageHistogramParameters-1f8e5179.js +0 -905
  553. package/dist/ImageryLayer-a807d3b3.js +0 -1799
  554. package/dist/ImageryLayerView2D-358a3267.js +0 -352
  555. package/dist/ImageryTileLayer-0f67f262.js +0 -2157
  556. package/dist/ImageryTileLayerView2D-2bc2bb67.js +0 -1110
  557. package/dist/Indices-0c5304f2.js +0 -67
  558. package/dist/IntegratedMesh3DTilesLayer-be69dca8.js +0 -112
  559. package/dist/IntegratedMeshLayer-3c070523.js +0 -141
  560. package/dist/InteractiveAnalysisViewModel-3005a4a6.js +0 -7397
  561. package/dist/InterleavedLayout-d37b99a2.js +0 -163
  562. package/dist/KMLLayer-2011c3c6.js +0 -162
  563. package/dist/KMLLayerView2D-5d17145f.js +0 -253
  564. package/dist/KnowledgeGraphLayerView2D-7172b91b.js +0 -43
  565. package/dist/LRUCache-39211cf9.js +0 -32
  566. package/dist/LabelClass-d1080628.js +0 -135
  567. package/dist/LabelMetric-ab56c6b3.js +0 -400
  568. package/dist/LaserlinePath.glsl-df8f92cc.js +0 -64
  569. package/dist/Laserlines.glsl-f7d93e3f.js +0 -65
  570. package/dist/LayerFloorInfo-3edeb9a2.js +0 -15
  571. package/dist/LayerView-1c58c8c6.js +0 -206
  572. package/dist/LercWorker-c7a2aca1.js +0 -157
  573. package/dist/LineOfSightLayer-3028e21f.js +0 -147
  574. package/dist/LinkChartLayer-988ae660.js +0 -1027
  575. package/dist/Lyr3DWorker-4c8c758f.js +0 -82
  576. package/dist/MagnifierPrograms-123961a3.js +0 -806
  577. package/dist/MapImageLayer-9241ad63.js +0 -169
  578. package/dist/MapImageLayerView2D-726e5c66.js +0 -146
  579. package/dist/MapNotesLayer-2d2db99b.js +0 -283
  580. package/dist/MapNotesLayerView2D-41f5790c.js +0 -161
  581. package/dist/MapServiceLayerViewHelper-8f5228ec.js +0 -288
  582. package/dist/MeasurementWidgetContent-504fd868.js +0 -2642
  583. package/dist/MediaLayer-e71ce661.js +0 -523
  584. package/dist/MediaLayerView2D-33c67404.js +0 -332
  585. package/dist/MemCache-413327b3.js +0 -227
  586. package/dist/MemorySourceWorker-b0e70dd0.js +0 -222
  587. package/dist/Mesh-98c4e050.js +0 -980
  588. package/dist/MeshLocalVertexSpace-7a7e4d4e.js +0 -19
  589. package/dist/MultiOriginJSONSupport-2fca3cc5.js +0 -158
  590. package/dist/OGCFeatureLayer-451fbd45.js +0 -211
  591. package/dist/OGCFeatureLayerView2D-d23b08d2.js +0 -82
  592. package/dist/ObjectStack-742b2ff3.js +0 -21
  593. package/dist/Octree-a3c8e90e.js +0 -495
  594. package/dist/OpenStreetMapLayer-9bb91f97.js +0 -30
  595. package/dist/OperationalLayer-fbfada66.js +0 -44
  596. package/dist/OrderByInfo-335eb561.js +0 -16
  597. package/dist/OrderedLayer-29b4ac64.js +0 -26
  598. package/dist/OrientedImageryLayer-aa2498e2.js +0 -216
  599. package/dist/OverlayCompositing.glsl-4b1e83c2.js +0 -65
  600. package/dist/OverrideHelper-74cc3959.js +0 -242
  601. package/dist/PBFDecoderWorker-fd40e0f9.js +0 -213
  602. package/dist/PointCloudLayer-64cdbbb2.js +0 -197
  603. package/dist/PointCloudUniqueValueRenderer-db9b3a98.js +0 -115
  604. package/dist/PointCloudWorker-a5eb5224.js +0 -212
  605. package/dist/PooledRBush-be6fe17a.js +0 -272
  606. package/dist/Popup-db250fe6.js +0 -3990
  607. package/dist/PortalLayer-a6ce110e.js +0 -126
  608. package/dist/Program-ecabc523.js +0 -694
  609. package/dist/ProgramTemplate-e5ce3b0f.js +0 -35
  610. package/dist/QueryEngine-87b2546b.js +0 -896
  611. package/dist/QueryTask-36400ec7.js +0 -119
  612. package/dist/RasterSymbolizer-cfd47847.js +0 -3024
  613. package/dist/RasterVFDisplayObject-d4c967ea.js +0 -581
  614. package/dist/RasterWorker-068ae23a.js +0 -78
  615. package/dist/RawBlockCache-9e8d4c35.js +0 -185
  616. package/dist/RealisticTree.glsl-adab8e44.js +0 -42
  617. package/dist/RefreshableLayer-eec34ca2.js +0 -80
  618. package/dist/RefreshableLayerView-ee06f08c.js +0 -16
  619. package/dist/Relationship-a7eb5489.js +0 -64
  620. package/dist/RelationshipQuery-4551bb04.js +0 -22
  621. package/dist/RenderingContext-9e8fac0d.js +0 -889
  622. package/dist/RibbonLine.glsl-5990bf5f.js +0 -65
  623. package/dist/RouteLayer-858bc482.js +0 -786
  624. package/dist/RouteLayerView2D-a70d519f.js +0 -195
  625. package/dist/SDFHelper-efca0a53.js +0 -140
  626. package/dist/SSAO.glsl-7670c1fc.js +0 -43
  627. package/dist/SSAOBlur.glsl-3523d6af.js +0 -42
  628. package/dist/ScaleRangeLayer-7f440b85.js +0 -21
  629. package/dist/SceneLayer-999bd23f.js +0 -542
  630. package/dist/SceneLayerSnappingSource-9420aaed.js +0 -218
  631. package/dist/SceneLayerSnappingSourceWorker-be67e552.js +0 -112
  632. package/dist/SceneLayerWorker-201939c2.js +0 -164
  633. package/dist/SceneService-318eff2f.js +0 -215
  634. package/dist/Scheduler-279ea0c3.js +0 -373
  635. package/dist/ShadedColorMaterial.glsl-bd2979d8.js +0 -64
  636. package/dist/SnappingOperation-5100da71.js +0 -48
  637. package/dist/SourceLayerData-50c2b980.js +0 -116
  638. package/dist/SpatialFilter-b6c6b2fc.js +0 -1701
  639. package/dist/Stop-196981da.js +0 -281
  640. package/dist/StreamLayer-37b818b8.js +0 -188
  641. package/dist/StreamLayerView2D-7f0f45bc.js +0 -164
  642. package/dist/StyleRepository-4e8fa398.js +0 -2212
  643. package/dist/SublayersOwner-90d10612.js +0 -545
  644. package/dist/SubtypeGroupLayer-959cabf8.js +0 -514
  645. package/dist/SubtypeGroupLayerView2D-95e63b42.js +0 -84
  646. package/dist/TechniqueInstance-bd190c26.js +0 -233
  647. package/dist/TemporalLayer-aacda167.js +0 -23
  648. package/dist/Texture-3618be49.js +0 -501
  649. package/dist/TextureOnly.glsl-fcca7034.js +0 -65
  650. package/dist/Theme-85608a9a.js +0 -3426
  651. package/dist/Tick-79e96104.js +0 -723
  652. package/dist/TileContainer-f1e7edd8.js +0 -31
  653. package/dist/TileInfoTilemapCache-2f882821.js +0 -38
  654. package/dist/TileLayer-db13a237.js +0 -194
  655. package/dist/TileLayerView2D-15af6be4.js +0 -187
  656. package/dist/TilemapCache-fc4b2c6c.js +0 -189
  657. package/dist/TimeInfo-39a9d4e1.js +0 -42
  658. package/dist/TimeOnly-b759457a.js +0 -706
  659. package/dist/Tooltip-0ba72b27.js +0 -138
  660. package/dist/TopFeaturesQuery-a11ecc39.js +0 -32
  661. package/dist/TurboLine-5e62d290.js +0 -565
  662. package/dist/UniqueValueRenderer-bf2f3234.js +0 -1039
  663. package/dist/UnknownLayer-2cf71578.js +0 -30
  664. package/dist/UnknownTimeZone-aabdcf56.js +0 -15
  665. package/dist/UnsupportedLayer-36650e4a.js +0 -31
  666. package/dist/UpdateTracking2D-b6d16b0c.js +0 -8566
  667. package/dist/Util-8f54c96b.js +0 -57
  668. package/dist/VectorTileLayer-ddcca4ec.js +0 -544
  669. package/dist/VectorTileLayerView2D-8176946a.js +0 -2108
  670. package/dist/Version-9eb299cd.js +0 -33
  671. package/dist/VertexArrayObject-d1a4262b.js +0 -73
  672. package/dist/VertexColor.glsl-fd9f70e0.js +0 -2683
  673. package/dist/VertexSnappingCandidate-70513010.js +0 -13
  674. package/dist/VideoLayerView2D-e08e1d57.js +0 -124
  675. package/dist/VoxelLayer-959702aa.js +0 -631
  676. package/dist/WFSLayer-4a41b206.js +0 -221
  677. package/dist/WFSSourceWorker-53d88982.js +0 -157
  678. package/dist/WGLContainer-e9e8616e.js +0 -5426
  679. package/dist/WMSLayer-8e44f55c.js +0 -536
  680. package/dist/WMSLayerView2D-415a1793.js +0 -117
  681. package/dist/WMTSLayer-804f4bed.js +0 -531
  682. package/dist/WMTSLayerView2D-96186a90.js +0 -142
  683. package/dist/WebTileLayer-7391ea01.js +0 -110
  684. package/dist/WhereClause-1816217e.js +0 -2766
  685. package/dist/WorkerHandle-25f67c67.js +0 -47
  686. package/dist/WorkerTileHandler-a7e508bc.js +0 -1539
  687. package/dist/action-3ce81e45.js +0 -198
  688. package/dist/action-group-f2d26c2b.js +0 -145
  689. package/dist/action-menu-015d91ab.js +0 -1759
  690. package/dist/apng-e5532475.js +0 -392
  691. package/dist/arcade-dbe2ca4a.js +0 -229
  692. package/dist/arcadeAsyncRuntime-78b83b41.js +0 -943
  693. package/dist/arcadeUtils-cb1066a6.js +0 -8741
  694. package/dist/arcgis-knowledge-client-core-7379d99e.js +0 -1218
  695. package/dist/arcgis-knowledge-client-core-simd-ea8b4d20.js +0 -1218
  696. package/dist/arcgisLayers-cd3494fd.js +0 -152
  697. package/dist/associatedFeatureServiceUtils-da8d377d.js +0 -92
  698. package/dist/axisAngleDegrees-19922758.js +0 -49
  699. package/dist/basis_transcoder-bf0490cc.js +0 -1248
  700. package/dist/calcite-action-0db4f61c.js +0 -22
  701. package/dist/calcite-action-bar-1b4c89cb.js +0 -303
  702. package/dist/calcite-action-group-3c8a934c.js +0 -28
  703. package/dist/calcite-button-1079a10c.js +0 -228
  704. package/dist/calcite-flow-c1e71a12.js +0 -128
  705. package/dist/calcite-flow-item-1097b48f.js +0 -499
  706. package/dist/calcite-icon-c88b4a67.js +0 -16
  707. package/dist/calcite-input-8c33ee84.js +0 -24
  708. package/dist/calcite-label-7fbfbe36.js +0 -79
  709. package/dist/calcite-list-93af4ae2.js +0 -2135
  710. package/dist/calcite-list-item-f0a6cda3.js +0 -576
  711. package/dist/calcite-list-item-group-107a313e.js +0 -71
  712. package/dist/calcite-loader-5194bf83.js +0 -14
  713. package/dist/calcite-modal-486280cc.js +0 -333
  714. package/dist/calcite-notice-a81274a8.js +0 -181
  715. package/dist/calcite-option-0020a955.js +0 -94
  716. package/dist/calcite-scrim-27d65e7f.js +0 -18
  717. package/dist/calcite-select-05f25c2a.js +0 -231
  718. package/dist/capabilities-238bde7d.js +0 -50
  719. package/dist/chartCommon-7eda170a.js +0 -256
  720. package/dist/chartUtilsAm5-fd8aeac2.js +0 -2954
  721. package/dist/clientSideDefaults-b91506af.js +0 -39
  722. package/dist/colorRamps-6027ea73.js +0 -38
  723. package/dist/colorUtils-3dd4b884.js +0 -164
  724. package/dist/commonProperties-bf4d305f.js +0 -60
  725. package/dist/computeTranslationToOriginAndRotation-ca5a9439.js +0 -60
  726. package/dist/conditionalSlot-80a4c6ff.js +0 -27
  727. package/dist/createConnection-70dd787a.js +0 -299
  728. package/dist/dataUtils-b632d3a2.js +0 -1421
  729. package/dist/deduplicate-e13aa9e2.js +0 -89
  730. package/dist/defaults-40a1a995.js +0 -31
  731. package/dist/deleteForwardEdits-b0182a08.js +0 -13
  732. package/dist/diffUtils-5f43e52a.js +0 -90
  733. package/dist/drapedUtils-416e5304.js +0 -75
  734. package/dist/earcut-235aa57d.js +0 -292
  735. package/dist/edgeProcessing-43d45a32.js +0 -252
  736. package/dist/editingSupport-7706f838.js +0 -203
  737. package/dist/editsZScale-49d8a8cd.js +0 -37
  738. package/dist/elevationInfoUtils-3fbfcf1f.js +0 -126
  739. package/dist/executeForIds-419ba6a3.js +0 -14
  740. package/dist/executeForTopCount-8a8ba5c7.js +0 -17
  741. package/dist/executeForTopExtents-9f24d5d0.js +0 -17
  742. package/dist/executeForTopIds-0bfdb55f.js +0 -17
  743. package/dist/executeQueryJSON-2a2e9e1b.js +0 -15
  744. package/dist/executeQueryPBF-f10de9ec.js +0 -152
  745. package/dist/executeRelationshipQuery-0680cb30.js +0 -53
  746. package/dist/executeTopFeaturesQuery-c553d696.js +0 -18
  747. package/dist/featureConversionUtils-83783887.js +0 -479
  748. package/dist/featureLayerUtils-545d260a.js +0 -250
  749. package/dist/featureLayerUtils-b18e6016.js +0 -142
  750. package/dist/featureSetUtils-0c7ba073.js +0 -2530
  751. package/dist/featuresetbase-aadfabb3.js +0 -707
  752. package/dist/featuresetgeom-a405018e.js +0 -99
  753. package/dist/featuresetstats-f6602402.js +0 -81
  754. package/dist/featuresetstring-834ea865.js +0 -95
  755. package/dist/fetchService-dac740ef.js +0 -33
  756. package/dist/fieldProperties-b024e721.js +0 -33
  757. package/dist/floatRGBA-46ee3e38.js +0 -20
  758. package/dist/form-0b2f0ac9.js +0 -138
  759. package/dist/geohashUtils-418d1ca6.js +0 -85
  760. package/dist/geojson-96d3353d.js +0 -208
  761. package/dist/geomasync-ff5b3734.js +0 -567
  762. package/dist/geometryEngine-8fcb3d59.js +0 -192
  763. package/dist/geometryEngineAsync-212f4b0f.js +0 -217
  764. package/dist/geometryEngineBase-4c2ff8b9.js +0 -18463
  765. package/dist/geometryEngineJSON-131b461e.js +0 -171
  766. package/dist/geometryEngineJSON-b43cf67f.js +0 -46
  767. package/dist/geometryEngineWorker-707ca480.js +0 -11
  768. package/dist/geometryServiceUtils-af23d0b5.js +0 -28
  769. package/dist/georeference-02bc532d.js +0 -291
  770. package/dist/gif-b072aa1c.js +0 -323
  771. package/dist/gltfexport-3362ea71.js +0 -705
  772. package/dist/groupLayerUtils-81545911.js +0 -39
  773. package/dist/heatmapUtils-b25824e4.js +0 -45
  774. package/dist/highlightReasons-5b8b2665.js +0 -19
  775. package/dist/hydrated-b0c62926.js +0 -40
  776. package/dist/i3s-32edc725.js +0 -809
  777. package/dist/icon-453c7f62.js +0 -127
  778. package/dist/imageBitmapUtils-51497e26.js +0 -23
  779. package/dist/imageUtils-1d1da6e6.js +0 -89
  780. package/dist/imageUtils-8c40eba6.js +0 -69
  781. package/dist/imageryUtils-0c00fbf3.js +0 -43
  782. package/dist/index-3b4c2147.js +0 -45568
  783. package/dist/input-message-32600f49.js +0 -92
  784. package/dist/input2-1c0831ed.js +0 -575
  785. package/dist/interactive-5824e097.js +0 -80
  786. package/dist/jsonContext-ec21ce85.js +0 -15
  787. package/dist/jsonUtils-012feb40.js +0 -476
  788. package/dist/jsonUtils-3979baa3.js +0 -59
  789. package/dist/jsonUtils-3eb7c689.js +0 -86
  790. package/dist/kmlUtils-4c198ea5.js +0 -112
  791. package/dist/knowledgeGraphService-a159d815.js +0 -739
  792. package/dist/knowledgegraph-eb0d44d4.js +0 -149
  793. package/dist/labelUtils-01b646c7.js +0 -61
  794. package/dist/labelingInfo-148dcd26.js +0 -46
  795. package/dist/layersCreator-4e94f616.js +0 -151
  796. package/dist/layersLoader-f4e3ab33.js +0 -197
  797. package/dist/lazyLayerLoader-eb51910e.js +0 -10
  798. package/dist/lclayout-4d303c41.js +0 -773
  799. package/dist/lengthUtils-6abaf27a.js +0 -5
  800. package/dist/lerc-wasm-0ae912df.js +0 -325
  801. package/dist/libtess-asm-91c97dcd.js +0 -3673
  802. package/dist/libtess-cba14731.js +0 -269
  803. package/dist/lineSegment-8f04aab4.js +0 -76
  804. package/dist/loadGLTFMesh-71542570.js +0 -181
  805. package/dist/loadable-e7c40a8a.js +0 -24
  806. package/dist/loader-6272e4b3.js +0 -79
  807. package/dist/lyr3DWorker-9ee4ee8b.js +0 -2108
  808. package/dist/mapViewDeps-b17a2e04.js +0 -3052
  809. package/dist/mediaLayerUtils-f0ccfd82.js +0 -35
  810. package/dist/meshFeatureSet-304dfa08.js +0 -126
  811. package/dist/meshVertexSpaceUtils-e7f774fa.js +0 -58
  812. package/dist/multidimensionalUtils-642f26da.js +0 -290
  813. package/dist/normalizeUtilsSync-b5f617e6.js +0 -181
  814. package/dist/number-3af512e3.js +0 -128
  815. package/dist/objectResourceUtils-d45057aa.js +0 -1455
  816. package/dist/observers-700e505d.js +0 -30
  817. package/dist/ogcFeatureUtils-440ed0bf.js +0 -206
  818. package/dist/openCloseComponent-1501c620.js +0 -37
  819. package/dist/orientedBoundingBox-80988e7f.js +0 -447
  820. package/dist/parser-6e351b85.js +0 -488
  821. package/dist/pbf-a85c52b3.js +0 -215
  822. package/dist/pbfQueryUtils-5f25f81f.js +0 -422
  823. package/dist/pe-wasm-e588110b.js +0 -887
  824. package/dist/persistable-ad01d0ca.js +0 -89
  825. package/dist/perspectiveUtils-ab58ddbb.js +0 -42
  826. package/dist/pieChart-d3793e8b.js +0 -555
  827. package/dist/plane-e103e8ed.js +0 -160
  828. package/dist/popupUtils-5f7c3e79.js +0 -50
  829. package/dist/popupUtils-b95ab60a.js +0 -22
  830. package/dist/portalItemUtils-3d59513a.js +0 -57
  831. package/dist/portalLayers-16b2f807.js +0 -312
  832. package/dist/portalUtils-3789afb0.js +0 -7
  833. package/dist/programUtils-c8d96b39.js +0 -59
  834. package/dist/project-7eaa59a4.js +0 -21
  835. package/dist/projectPointToVector-19151d97.js +0 -14
  836. package/dist/projectVectorToVector-d552535c.js +0 -13
  837. package/dist/quantityUtils-258bfdb4.js +0 -33
  838. package/dist/quantizationUtils-752e4d24.js +0 -68
  839. package/dist/quat-6dc51256.js +0 -104
  840. package/dist/query-da893693.js +0 -89
  841. package/dist/queryAttachments-df86b71d.js +0 -39
  842. package/dist/queryEngineUtils-ffc50ce5.js +0 -21
  843. package/dist/queryTopFeatures-5a58a12d.js +0 -50
  844. package/dist/queryZScale-39ffaf30.js +0 -12
  845. package/dist/rasterProjectionHelper-d13bc46d.js +0 -577
  846. package/dist/rasterUtils-22b15453.js +0 -122
  847. package/dist/rasterizingUtils-3388ddbf.js +0 -46
  848. package/dist/request-82a2415a.js +0 -46
  849. package/dist/requestImageUtils-2fca27f8.js +0 -8
  850. package/dist/resourceExtension-672d03cc.js +0 -17
  851. package/dist/resourceUtils-95b9964a.js +0 -42
  852. package/dist/resourceUtils-b1e50d5e.js +0 -69
  853. package/dist/resourceUtils-e8831103.js +0 -62
  854. package/dist/saveAPIKeyUtils-ee9b0447.js +0 -8
  855. package/dist/saveUtils-1323ad64.js +0 -24
  856. package/dist/scaleUtils-1a70f716.js +0 -23
  857. package/dist/scrim-c0a641cd.js +0 -114
  858. package/dist/serviceCapabilitiesUtils-33d4e1c0.js +0 -64
  859. package/dist/sourceUtils-e8c5db4e.js +0 -71
  860. package/dist/sphere-75cef429.js +0 -199
  861. package/dist/statsWorker-1f1bc582.js +0 -37
  862. package/dist/streamLayerUtils-c85a0eed.js +0 -31
  863. package/dist/styleUtils-05bc85a5.js +0 -75
  864. package/dist/styleUtils-7bd8d0a7.js +0 -14
  865. package/dist/sublayerUtils-feb77591.js +0 -37
  866. package/dist/substitute-c31da60c.js +0 -52
  867. package/dist/symbolColorUtils-3c385668.js +0 -8
  868. package/dist/symbolLayerUtils-2d2753b7.js +0 -31
  869. package/dist/symbologySnappingCandidates-00eeca39.js +0 -221
  870. package/dist/t9n-55800455.js +0 -349
  871. package/dist/testSVGPremultipliedAlpha-ec1f73c4.js +0 -94
  872. package/dist/timeSupport-a7623294.js +0 -410
  873. package/dist/triangle-c799f11b.js +0 -98
  874. package/dist/unitConversionUtils-05050e6d.js +0 -17
  875. package/dist/unitFormatUtils-2a84c371.js +0 -40
  876. package/dist/uploadAssetErrors-601b044e.js +0 -70
  877. package/dist/uploadAssets-5a835c8a.js +0 -330
  878. package/dist/utils-2dc379da.js +0 -79
  879. package/dist/utils-34b1ea70.js +0 -2746
  880. package/dist/utils-45c14202.js +0 -232
  881. package/dist/utils-484969fb.js +0 -91
  882. package/dist/utils-5aaff624.js +0 -433
  883. package/dist/utils-a94dc35d.js +0 -419
  884. package/dist/utils-e68cfebf.js +0 -34
  885. package/dist/utils-fc14cc83.js +0 -73
  886. package/dist/utils3-5745e839.js +0 -75
  887. package/dist/vec3-12b9e1d8.js +0 -81
  888. package/dist/vec42-a1569d60.js +0 -125
  889. package/dist/versionUtils-c4f3617a.js +0 -161
  890. package/dist/visualVariableUtils-bcb95edc.js +0 -267
  891. package/dist/webStyleSymbolUtils-9db5b81c.js +0 -48
  892. package/dist/webglDeps-05e0410a.js +0 -23
  893. package/dist/wfsUtils-7caaa2cc.js +0 -343
  894. package/dist/workerHelper-86e37deb.js +0 -11
  895. package/dist/xyChart-0673158d.js +0 -3335
@@ -0,0 +1,2530 @@
1
+ import { bR as ae, ez as Ue, ap as Be, z as G, c6 as M, aO as Me, dE as We, by as N, c1 as $e, W as Ve, iS as fe, e7 as Qe, U as B, c7 as Ze, bP as pe, ey as ze, bM as Je } from "./index-a8d87ec0.js";
2
+ import { aw as re, ax as I, K as Ke, an as x, ao as _e, ap as ye, aq as ge, ar as me, as as we, aD as $, aE as ne, aF as Xe, aG as Y, N as Ye, aH as He, aI as V, aJ as et } from "./arcadeUtils-f7ed3399.js";
3
+ import { x as R, s as D, a as T, n as L, t as A, r as tt } from "./WhereClause-a8fc45da.js";
4
+ import { x as E, t as _, g as j, m as Q, a as k, y as it, L as st, w as X, E as Fe, T as Se, S as be, F as at, v as ve, p as rt, D as Z, I as nt, d as U, b as lt, f as ot, c as m } from "./SpatialFilter-ba146c95.js";
5
+ import { c as ut, a as dt, n as ht } from "./TimeOnly-bb600899.js";
6
+ import { x as xe, n as Ne } from "./MD5-1b5ec1c3.js";
7
+ import { Z as ct } from "./FieldsIndex-7d8f3589.js";
8
+ import v from "./FeatureLayer-ecf9f4ea.js";
9
+ import Le from "./SubtypeGroupLayer-e467307a.js";
10
+ import { u as Ie, i as Ce } from "./infoFor3D-bf4e6c95.js";
11
+ import { a as ft, s as De } from "./executeQueryJSON-c5616d7b.js";
12
+ import { n as pt } from "./executeQueryPBF-807fb886.js";
13
+ import { d as _t } from "./FeatureSet-29d82bc9.js";
14
+ import "./AttachmentInfo-1b2ece0a.js";
15
+ import "./AttachmentQuery-470d5a03.js";
16
+ import { n as yt, s as gt } from "./executeForIds-6a55aa95.js";
17
+ import "./pbf-b0a9807c.js";
18
+ import Te from "./RelationshipQuery-8a39148b.js";
19
+ import "./TopFeaturesQuery-77f00fe7.js";
20
+ import { n as mt } from "./FeatureType-30eece24.js";
21
+ let Ae = class {
22
+ constructor() {
23
+ this.declaredRootClass = "esri.arcade.featureSetCollection", this._layerById = {}, this._layerByName = {};
24
+ }
25
+ add(e, t, i) {
26
+ this._layerById[t] = i, this._layerByName[e] = i;
27
+ }
28
+ async featureSetByName(e, t = !0, i = ["*"]) {
29
+ return this._layerByName[e] === void 0 ? null : this._layerByName[e];
30
+ }
31
+ async featureSetById(e, t = !0, i = ["*"]) {
32
+ return this._layerById[e] === void 0 ? null : this._layerById[e];
33
+ }
34
+ castToText(e = !1) {
35
+ return "object, FeatureSetCollection";
36
+ }
37
+ }, Oe = class H extends E {
38
+ constructor(e) {
39
+ super(e), this.declaredClass = "esri.arcade.featureset.actions.AttributeFilter", this._maxProcessing = 1e3, this._parent = e.parentfeatureset, e.whereclause instanceof R ? (this._whereclause = e.whereclause, this._whereClauseFunction = null) : (this._whereClauseFunction = e.whereclause, this._whereclause = null);
40
+ }
41
+ _initialiseFeatureSet() {
42
+ this._parent !== null ? (this.fields = this._parent.fields.slice(0), this.geometryType = this._parent.geometryType, this.objectIdField = this._parent.objectIdField, this.globalIdField = this._parent.globalIdField, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = this._parent.typeIdField, this.types = this._parent.types, this.subtypeField = this._parent.subtypeField, this.subtypes = this._parent.subtypes) : (this.fields = [], this.typeIdField = "", this.subtypeField = "", this.objectIdField = "", this.globalIdField = "", this.spatialReference = new ae({ wkid: 4326 }), this.geometryType = re.point);
43
+ }
44
+ async _getSet(e) {
45
+ if (this._wset === null) {
46
+ await this._ensureLoaded();
47
+ const t = await this._parent._getFilteredSet("", null, this._whereclause, null, e);
48
+ return this._checkCancelled(e), this._whereClauseFunction !== null ? this._wset = new _(t._candidates.slice(0).concat(t._known.slice(0)), [], t._ordered, this._clonePageDefinition(t.pagesDefinition)) : this._wset = new _(t._candidates.slice(0), t._known.slice(0), t._ordered, this._clonePageDefinition(t.pagesDefinition)), this._wset;
49
+ }
50
+ return this._wset;
51
+ }
52
+ _isInFeatureSet(e) {
53
+ var i;
54
+ let t = (i = this._parent) == null ? void 0 : i._isInFeatureSet(e);
55
+ return t === I.NotInFeatureSet ? t : (t = this._idstates[e], t === void 0 ? I.Unknown : t);
56
+ }
57
+ _getFeature(e, t, i) {
58
+ return this._parent._getFeature(e, t, i);
59
+ }
60
+ _getFeatures(e, t, i, s) {
61
+ return this._parent._getFeatures(e, t, i, s);
62
+ }
63
+ _featureFromCache(e) {
64
+ return this._parent._featureFromCache(e);
65
+ }
66
+ executeWhereClause(e) {
67
+ var t;
68
+ return ((t = this._whereclause) == null ? void 0 : t.testFeature(e)) ?? !1;
69
+ }
70
+ async executeWhereClauseDeferred(e) {
71
+ if (this._whereClauseFunction !== null) {
72
+ const t = this._whereClauseFunction(e);
73
+ return Ue(t), t;
74
+ }
75
+ return this.executeWhereClause(e);
76
+ }
77
+ async _fetchAndRefineFeatures(e, t, i) {
78
+ var n, l, u;
79
+ const s = new _([], e, !1, null), a = Math.min(t, e.length);
80
+ if (await ((n = this._parent) == null ? void 0 : n._getFeatures(s, -1, a, i)), this._checkCancelled(i), this._whereClauseFunction == null) {
81
+ for (let o = 0; o < a; o++) {
82
+ const d = (l = this._parent) == null ? void 0 : l._featureFromCache(e[o]);
83
+ this.executeWhereClause(d) === !0 ? this._idstates[e[o]] = I.InFeatureSet : this._idstates[e[o]] = I.NotInFeatureSet;
84
+ }
85
+ return "success";
86
+ }
87
+ const r = [];
88
+ for (let o = 0; o < a; o++) {
89
+ const d = (u = this._parent) == null ? void 0 : u._featureFromCache(e[o]);
90
+ r.push(await this.executeWhereClauseDeferred(d));
91
+ }
92
+ for (let o = 0; o < t; o++)
93
+ r[o] === !0 ? this._idstates[e[o]] = I.InFeatureSet : this._idstates[e[o]] = I.NotInFeatureSet;
94
+ return "success";
95
+ }
96
+ async _getFilteredSet(e, t, i, s, a) {
97
+ this._whereClauseFunction !== null || (i !== null ? this._whereclause !== null && (i = j(this._whereclause, i)) : i = this._whereclause), await this._ensureLoaded();
98
+ const r = await this._parent._getFilteredSet(e, t, i, s, a);
99
+ let n;
100
+ return this._checkCancelled(a), n = this._whereClauseFunction !== null ? new _(r._candidates.slice(0).concat(r._known.slice(0)), [], r._ordered, this._clonePageDefinition(r.pagesDefinition)) : new _(r._candidates.slice(0), r._known.slice(0), r._ordered, this._clonePageDefinition(r.pagesDefinition)), n;
101
+ }
102
+ async _stat(e, t, i, s, a, r, n) {
103
+ if (this._whereClauseFunction !== null)
104
+ return a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 };
105
+ let l = this._whereclause;
106
+ a !== null && this._whereclause !== null && (l = j(this._whereclause, a));
107
+ const u = await this._parent._stat(e, t, i, s, l, r, n);
108
+ return u.calculated === !1 ? a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 } : u;
109
+ }
110
+ async _canDoAggregates(e, t, i, s, a) {
111
+ return this._whereClauseFunction === null && (a !== null ? this._whereclause !== null && (a = j(this._whereclause, a)) : a = this._whereclause, this._parent !== null && this._parent._canDoAggregates(e, t, i, s, a));
112
+ }
113
+ async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
114
+ if (this._parent === null)
115
+ throw new D(T.NeverReach);
116
+ return a !== null ? this._whereclause !== null && (a = j(this._whereclause, a)) : a = this._whereclause, this._parent._getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n);
117
+ }
118
+ static registerAction() {
119
+ E._featuresetFunctions.filter = function(e) {
120
+ if (typeof e == "function")
121
+ return new H({ parentfeatureset: this, whereclause: e });
122
+ let t = null;
123
+ return e instanceof R && (t = e), new H({ parentfeatureset: this, whereclause: t });
124
+ };
125
+ }
126
+ getFieldsIndex() {
127
+ return this._parent.getFieldsIndex();
128
+ }
129
+ }, J = class {
130
+ constructor(e) {
131
+ this.field = e, this.sqlRewritable = !1;
132
+ }
133
+ postInitialization(e, t) {
134
+ }
135
+ }, ee = class extends J {
136
+ constructor(e) {
137
+ super(e), this.sqlRewritable = !0;
138
+ }
139
+ extractValue(e) {
140
+ return e.attributes[this.field.name];
141
+ }
142
+ rewriteSql(e) {
143
+ return { rewritten: this.sqlRewritable, where: e };
144
+ }
145
+ }, wt = class extends J {
146
+ constructor(e, t, i) {
147
+ super(Ke(e)), this.originalField = e, this.sqlRewritable = !0, this.field.name = t, this.field.alias = i;
148
+ }
149
+ rewriteSql(e, t) {
150
+ return { rewritten: this.sqlRewritable, where: Q(e, this.field.name, this.originalField.name, t.getFieldsIndex()) };
151
+ }
152
+ extractValue(e) {
153
+ return e.attributes[this.originalField.name];
154
+ }
155
+ }, Ft = class F extends J {
156
+ constructor(e, t, i) {
157
+ super(e), this.codefield = t, this.lkp = i, this.reverseLkp = {};
158
+ for (const s in i)
159
+ this.reverseLkp[i[s]] = s;
160
+ this.sqlRewritable = !0;
161
+ }
162
+ rewriteSql(e, t) {
163
+ const i = this.evaluateNodeToWhereClause(e.parseTree, x.Standardised, this.field.name, this.codefield instanceof R ? k(this.codefield, x.Standardised) : this.codefield, e.parameters);
164
+ return i.includes(F.BADNESS) ? { rewritten: !1, where: e } : { rewritten: this.sqlRewritable, where: R.create(i, t._parent.getFieldsIndex(), t.dateFieldsTimeZoneDefaultUTC) };
165
+ }
166
+ evaluateNodeToWhereClause(e, t, i = null, s = null, a) {
167
+ let r, n, l, u;
168
+ switch (e.type) {
169
+ case "interval":
170
+ return at(this.evaluateNodeToWhereClause(e.value, t, i, s, a), e.qualifier, e.op);
171
+ case "case-expression": {
172
+ let o = " CASE ";
173
+ e.format === "simple" && (o += this.evaluateNodeToWhereClause(e.operand, t, i, F.BADNESS, a));
174
+ for (let d = 0; d < e.clauses.length; d++)
175
+ o += " WHEN " + this.evaluateNodeToWhereClause(e.clauses[d].operand, t, i, F.BADNESS, a) + " THEN " + this.evaluateNodeToWhereClause(e.clauses[d].value, t, i, F.BADNESS, a);
176
+ return e.else !== null && (o += " ELSE " + this.evaluateNodeToWhereClause(e.else, t, i, F.BADNESS, a)), o += " END ", o;
177
+ }
178
+ case "parameter": {
179
+ const o = a[e.value.toLowerCase()];
180
+ if (typeof o == "string")
181
+ return "'" + o.toString().replaceAll("'", "''") + "'";
182
+ if (_e(o))
183
+ return X(o, t);
184
+ if (ye(o))
185
+ return X(o, t);
186
+ if (ge(o))
187
+ return Fe(o, t);
188
+ if (me(o))
189
+ return Se(o, t);
190
+ if (we(o))
191
+ return be(o, t);
192
+ if (o instanceof Array) {
193
+ const d = [];
194
+ for (let c = 0; c < o.length; c++)
195
+ typeof o[c] == "string" ? d.push("'" + o[c].toString().replaceAll("'", "''") + "'") : _e(o[c]) || ye(o[c]) ? d.push(X(o[c], t)) : ge(o[c]) ? d.push(Fe(o[c], t)) : me(o[c]) ? d.push(Se(o[c], t)) : we(o[c]) ? d.push(be(o[c], t)) : d.push(o[c].toString());
196
+ return d;
197
+ }
198
+ return o.toString();
199
+ }
200
+ case "expression-list":
201
+ n = [];
202
+ for (const o of e.value)
203
+ n.push(this.evaluateNodeToWhereClause(o, t, i, s, a));
204
+ return n;
205
+ case "unary-expression":
206
+ return " ( NOT " + this.evaluateNodeToWhereClause(e.expr, t, i, F.BADNESS, a) + " ) ";
207
+ case "binary-expression":
208
+ switch (e.operator) {
209
+ case "AND":
210
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " AND " + this.evaluateNodeToWhereClause(e.right, t, i, s, a) + ") ";
211
+ case "OR":
212
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " OR " + this.evaluateNodeToWhereClause(e.right, t, i, s, a) + ") ";
213
+ case "IS":
214
+ if (e.right.type !== "null")
215
+ throw new L(A.UnsupportedIsRhs);
216
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IS NULL )";
217
+ case "ISNOT":
218
+ if (e.right.type !== "null")
219
+ throw new L(A.UnsupportedIsRhs);
220
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IS NOT NULL )";
221
+ case "IN":
222
+ if (r = [], e.right.type === "expression-list") {
223
+ if (e.left.type === "column-reference" && e.left.column.toUpperCase() === this.field.name.toUpperCase()) {
224
+ const o = [];
225
+ let d = !0;
226
+ for (const c of e.right.value) {
227
+ if (c.type !== "string") {
228
+ d = !1;
229
+ break;
230
+ }
231
+ if (this.lkp[c.value] === void 0) {
232
+ d = !1;
233
+ break;
234
+ }
235
+ o.push(this.lkp[c.value].toString());
236
+ }
237
+ if (d)
238
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + o.join(",") + ")) ";
239
+ }
240
+ return r = this.evaluateNodeToWhereClause(e.right, t, i, s, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + r.join(",") + ")) ";
241
+ }
242
+ return u = this.evaluateNodeToWhereClause(e.right, t, i, s, a), u instanceof Array ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + u.join(",") + ")) " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " IN (" + u + ")) ";
243
+ case "NOT IN":
244
+ if (r = [], e.right.type === "expression-list") {
245
+ if (e.left.type === "column-reference" && e.left.column.toUpperCase() === this.field.name.toUpperCase()) {
246
+ const o = [];
247
+ let d = !0;
248
+ for (const c of e.right.value) {
249
+ if (c.type !== "string") {
250
+ d = !1;
251
+ break;
252
+ }
253
+ if (this.lkp[c.value] === void 0) {
254
+ d = !1;
255
+ break;
256
+ }
257
+ o.push(this.lkp[c.value].toString());
258
+ }
259
+ if (d)
260
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + o.join(",") + ")) ";
261
+ }
262
+ return r = this.evaluateNodeToWhereClause(e.right, t, i, s, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + r.join(",") + ")) ";
263
+ }
264
+ return u = this.evaluateNodeToWhereClause(e.right, t, i, s, a), u instanceof Array ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + u.join(",") + ")) " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, s, a) + " NOT IN (" + u + ")) ";
265
+ case "BETWEEN":
266
+ return l = this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " BETWEEN " + l[0] + " AND " + l[1] + " ) ";
267
+ case "NOTBETWEEN":
268
+ return l = this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a), " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT BETWEEN " + l[0] + " AND " + l[1] + " ) ";
269
+ case "LIKE":
270
+ return e.escape !== "" ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + " ESCAPE '" + e.escape + "') " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
271
+ case "NOT LIKE":
272
+ return e.escape !== "" ? " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + " ESCAPE '" + e.escape + "') " : " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " NOT LIKE " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
273
+ case "<>":
274
+ case "=":
275
+ if (e.left.type === "column-reference" && e.right.type === "string") {
276
+ if (e.left.column.toUpperCase() === this.field.name.toUpperCase() && this.lkp[e.right.value.toString()] !== void 0)
277
+ return " (" + s + " " + e.operator + " " + this.lkp[e.right.value.toString()].toString() + ") ";
278
+ } else if (e.right.type === "column-reference" && e.left.type === "string" && e.right.column.toUpperCase() === this.field.name.toUpperCase())
279
+ return " (" + this.lkp[e.right.value.toString()].toString() + " " + e.operator + " " + s + ") ";
280
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " " + e.operator + " " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
281
+ case "<":
282
+ case ">":
283
+ case ">=":
284
+ case "<=":
285
+ case "*":
286
+ case "-":
287
+ case "+":
288
+ case "/":
289
+ case "||":
290
+ return " (" + this.evaluateNodeToWhereClause(e.left, t, i, F.BADNESS, a) + " " + e.operator + " " + this.evaluateNodeToWhereClause(e.right, t, i, F.BADNESS, a) + ") ";
291
+ }
292
+ case "null":
293
+ return "null";
294
+ case "boolean":
295
+ return e.value === !0 ? "1" : "0";
296
+ case "string":
297
+ return "'" + e.value.toString().replaceAll("'", "''") + "'";
298
+ case "timestamp":
299
+ return `timestamp '${e.value}'`;
300
+ case "date":
301
+ return `date '${e.value}'`;
302
+ case "time":
303
+ return `time '${e.value}'`;
304
+ case "number":
305
+ return e.value.toString();
306
+ case "current-time":
307
+ return st(e.mode === "date", t);
308
+ case "column-reference":
309
+ return i && i.toLowerCase() === e.column.toLowerCase() ? "(" + s + ")" : e.column;
310
+ case "data-type":
311
+ return e.value;
312
+ case "function": {
313
+ const o = this.evaluateNodeToWhereClause(e.args, t, i, F.BADNESS, a);
314
+ return it(e.name, o, t);
315
+ }
316
+ }
317
+ throw new L(A.UnsupportedSyntax, { node: e.type });
318
+ }
319
+ extractValue(e) {
320
+ return this.codefield instanceof R ? this.reverseLkp[R.convertValueToStorageFormat(this.codefield.calculateValueCompiled(e))] : this.reverseLkp[e.attributes[this.codefield]];
321
+ }
322
+ };
323
+ Ft.BADNESS = "_!!!_BAD_LKP_!!!!";
324
+ class St extends J {
325
+ constructor(e, t) {
326
+ super(e), this._sql = t;
327
+ }
328
+ rewriteSql(e, t) {
329
+ return { rewritten: !0, where: Q(e, this.field.name, k(this._sql, x.Standardised), t.getFieldsIndex()) };
330
+ }
331
+ extractValue(e) {
332
+ return R.convertValueToStorageFormat(this._sql.calculateValueCompiled(e), this.field.type);
333
+ }
334
+ }
335
+ class bt extends E {
336
+ static findField(e, t) {
337
+ for (const i of e)
338
+ if (i.name.toLowerCase() === t.toString().toLowerCase())
339
+ return i;
340
+ return null;
341
+ }
342
+ constructor(e) {
343
+ super(e), this._calcFunc = null, this.declaredClass = "esri.arcade.featureset.actions.Adapted", this.adaptedFields = [], this._extraFilter = null, this._extraFilter = e.extraFilter, this._parent = e.parentfeatureset, this._maxProcessing = 30, this.adaptedFields = e.adaptedFields;
344
+ }
345
+ _initialiseFeatureSet() {
346
+ this._parent !== null ? (this.geometryType = this._parent.geometryType, this.objectIdField = this._parent.objectIdField, this.globalIdField = this._parent.globalIdField, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = this._parent.typeIdField, this.types = this._parent.types) : (this.spatialReference = new ae({ wkid: 4326 }), this.objectIdField = "", this.globalIdField = "", this.geometryType = re.point, this.typeIdField = "", this.types = null, this.subtypeField = null, this.subtypes = null), this.fields = [];
347
+ for (const e of this.adaptedFields)
348
+ e.postInitialization(this, this._parent), this.fields.push(e.field);
349
+ }
350
+ async _getSet(e) {
351
+ var t;
352
+ if (this._wset === null) {
353
+ await this._ensureLoaded();
354
+ let i = null;
355
+ return i = this._extraFilter ? await this._getFilteredSet("", null, null, null, e) : await ((t = this._parent) == null ? void 0 : t._getSet(e)), this._checkCancelled(e), Be(i), this._wset = new _(i._candidates.slice(0), i._known.slice(0), i._ordered, this._clonePageDefinition(i.pagesDefinition)), this._wset;
356
+ }
357
+ return this._wset;
358
+ }
359
+ _isInFeatureSet(e) {
360
+ return this._parent._isInFeatureSet(e);
361
+ }
362
+ async _getFeatures(e, t, i, s) {
363
+ var o, d;
364
+ const a = [];
365
+ t !== -1 && this._featureCache[t] === void 0 && a.push(t);
366
+ const r = this._maxQueryRate();
367
+ if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
368
+ return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
369
+ let n = 0;
370
+ for (let c = e._lastFetchedIndex; c < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(this._featureCache[e._known[c]] === void 0 && (e._known[c] !== t && a.push(e._known[c]), a.length >= r))); c++)
371
+ ;
372
+ if (a.length === 0)
373
+ return "success";
374
+ e = new _([], a, e._ordered, null);
375
+ const l = Math.min(a.length, i);
376
+ await ((o = this._parent) == null ? void 0 : o._getFeatures(e, -1, l, s)), this._checkCancelled(s);
377
+ const u = [];
378
+ for (let c = 0; c < l; c++) {
379
+ const f = (d = this._parent) == null ? void 0 : d._featureFromCache(a[c]);
380
+ f !== void 0 && u.push({ geometry: f.geometry, attributes: f.attributes, id: a[c] });
381
+ }
382
+ for (const c of u) {
383
+ const f = [];
384
+ for (const y of this.adaptedFields)
385
+ f[y.field.name] = y.extractValue(c);
386
+ this._featureCache[c.id] = new G({ attributes: f, geometry: ut(c.geometry) });
387
+ }
388
+ return "success";
389
+ }
390
+ async _fetchAndRefineFeatures() {
391
+ throw new D(T.NeverReach);
392
+ }
393
+ async _getFilteredSet(e, t, i, s, a) {
394
+ let r = !1;
395
+ const n = this._reformulateWithoutAdaptions(i);
396
+ r = n.cannot, i = n.where;
397
+ let l = !1;
398
+ if (s !== null) {
399
+ l = !0;
400
+ const d = [];
401
+ for (const c of this.adaptedFields)
402
+ if (!(c instanceof ee) && s.scanForField(c.field.name) === !0) {
403
+ if (!(c instanceof wt)) {
404
+ s = null, l = !1;
405
+ break;
406
+ }
407
+ d.push({ field: c.field.name, newfield: c.originalField.name });
408
+ }
409
+ s && d.length > 0 && (s = s.replaceFields(d));
410
+ }
411
+ i !== null ? this._extraFilter !== null && (i = j(this._extraFilter, i)) : i = this._extraFilter, await this._ensureLoaded();
412
+ const u = await this._parent._getFilteredSet(e, t, i, s, a);
413
+ let o;
414
+ return this._checkCancelled(a), o = r === !0 ? new _(u._candidates.slice(0).concat(u._known.slice(0)), [], l === !0 && u._ordered, this._clonePageDefinition(u.pagesDefinition)) : new _(u._candidates.slice(0), u._known.slice(0), l === !0 && u._ordered, this._clonePageDefinition(u.pagesDefinition)), o;
415
+ }
416
+ _reformulateWithoutAdaptions(e) {
417
+ const t = { cannot: !1, where: e };
418
+ if (e !== null) {
419
+ for (const i of this.adaptedFields)
420
+ if (ve(e, i.field.name) === !0) {
421
+ const s = i.rewriteSql(e, this);
422
+ if (s.rewritten !== !0) {
423
+ t.cannot = !0, t.where = null;
424
+ break;
425
+ }
426
+ t.where = s.where;
427
+ }
428
+ }
429
+ return t;
430
+ }
431
+ async _stat(e, t, i, s, a, r, n) {
432
+ let l = !1, u = this._reformulateWithoutAdaptions(t);
433
+ if (l = u.cannot, t = u.where, u = this._reformulateWithoutAdaptions(a), l = l || u.cannot, (a = u.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, l === !0)
434
+ return a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 };
435
+ const o = await this._parent._stat(e, t, i, s, a, r, n);
436
+ return o.calculated === !1 ? a === null && i === "" && s === null ? this._manualStat(e, t, r, n) : { calculated: !1 } : o;
437
+ }
438
+ async _canDoAggregates(e, t, i, s, a) {
439
+ if (this._parent === null)
440
+ return !1;
441
+ for (let l = 0; l < e.length; l++)
442
+ for (const u of this.adaptedFields)
443
+ if (e[l].toLowerCase() === u.field.name.toLowerCase() && !(u instanceof ee))
444
+ return !1;
445
+ const r = [];
446
+ for (let l = 0; l < t.length; l++) {
447
+ const u = t[l];
448
+ if (u.workingexpr !== null) {
449
+ const o = this._reformulateWithoutAdaptions(u.workingexpr);
450
+ if (o.cannot)
451
+ return !1;
452
+ const d = u.clone();
453
+ d.workingexpr = o.where, r.push(d);
454
+ } else
455
+ r.push(u);
456
+ }
457
+ const n = this._reformulateWithoutAdaptions(a);
458
+ return !n.cannot && ((a = n.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, this._parent._canDoAggregates(e, r, i, s, a));
459
+ }
460
+ async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
461
+ if (this._parent === null)
462
+ throw new D(T.NeverReach);
463
+ const l = [];
464
+ for (let o = 0; o < t.length; o++) {
465
+ const d = t[o];
466
+ if (d.workingexpr !== null) {
467
+ const c = this._reformulateWithoutAdaptions(d.workingexpr);
468
+ if (c.cannot)
469
+ throw new D(T.NeverReach);
470
+ const f = d.clone();
471
+ f.workingexpr = c.where, l.push(f);
472
+ } else
473
+ l.push(d);
474
+ }
475
+ const u = this._reformulateWithoutAdaptions(a);
476
+ if (u.cannot)
477
+ throw new D(T.NeverReach);
478
+ return (a = u.where) !== null ? this._extraFilter !== null && (a = j(this._extraFilter, a)) : a = this._extraFilter, this._parent._getAggregatePagesDataSourceDefinition(e, l, i, s, a, r, n);
479
+ }
480
+ }
481
+ function Re(h, e) {
482
+ return h === e ? 0 : h === null ? -1 : e === null ? 1 : h < e ? -1 : 1;
483
+ }
484
+ class W {
485
+ constructor(e) {
486
+ const t = e.split(",");
487
+ this._fields = [], this._directions = [];
488
+ for (let i = 0; i < t.length; i++) {
489
+ const s = t[i].match(/\S+/g);
490
+ this._fields.push(s[0]), s.length === 2 ? s[1].toLowerCase() === "asc" ? this._directions.push(1) : this._directions.push(0) : this._directions.push(1);
491
+ }
492
+ }
493
+ constructClause() {
494
+ let e = "";
495
+ for (let t = 0; t < this._fields.length; t++)
496
+ t !== 0 && (e += ","), e += this._fields[t], this._directions[t] === 1 ? e += " ASC" : e += " DESC";
497
+ return e;
498
+ }
499
+ order(e) {
500
+ e.sort((t, i) => {
501
+ for (let s = 0; s < this._fields.length; s++) {
502
+ const a = this.featureValue(t.feature, this._fields[s], s), r = this.featureValue(i.feature, this._fields[s], s);
503
+ let n = 0;
504
+ if (n = this._directions[s] === 1 ? Re(a, r) : -1 * Re(a, r), n !== 0)
505
+ return n;
506
+ }
507
+ return 0;
508
+ });
509
+ }
510
+ scanForField(e) {
511
+ for (let t = 0; t < this._fields.length; t++)
512
+ if (this._fields[t].toLowerCase().trim() === e.toLowerCase().trim())
513
+ return !0;
514
+ return !1;
515
+ }
516
+ replaceFields(e) {
517
+ let t = "";
518
+ for (let i = 0; i < this._fields.length; i++) {
519
+ i !== 0 && (t += ",");
520
+ let s = this._fields[i];
521
+ for (const a of e)
522
+ if (s.toLowerCase() === a.field.toLowerCase()) {
523
+ s = a.newfield;
524
+ break;
525
+ }
526
+ t += s, this._directions[i] === 1 ? t += " ASC" : t += " DESC";
527
+ }
528
+ return new W(t);
529
+ }
530
+ featureValue(e, t, i) {
531
+ const s = e.attributes[t];
532
+ if (s !== void 0)
533
+ return s;
534
+ for (const a in e.attributes)
535
+ if (t.toLowerCase() === a.toLowerCase())
536
+ return this._fields[i] = a, e.attributes[a];
537
+ return null;
538
+ }
539
+ }
540
+ let te = class Ee extends E {
541
+ constructor(e) {
542
+ super(e), this._orderbyclause = null, this.declaredClass = "esri.arcade.featureset.actions.OrderBy", this._maxProcessing = 100, this._orderbyclause = e.orderbyclause, this._parent = e.parentfeatureset;
543
+ }
544
+ async _getSet(e) {
545
+ if (this._wset === null) {
546
+ await this._ensureLoaded();
547
+ const t = await this._getFilteredSet("", null, null, this._orderbyclause, e);
548
+ return this._checkCancelled(e), this._wset = t, this._wset;
549
+ }
550
+ return this._wset;
551
+ }
552
+ async manualOrderSet(e, t) {
553
+ var a;
554
+ const i = await this.getIdColumnDictionary(e, [], -1, t);
555
+ (a = this._orderbyclause) == null || a.order(i);
556
+ const s = new _([], [], !0, null);
557
+ for (let r = 0; r < i.length; r++)
558
+ s._known.push(i[r].id);
559
+ return s;
560
+ }
561
+ async getIdColumnDictionary(e, t, i, s) {
562
+ if (i < e._known.length - 1) {
563
+ const a = this._maxQueryRate();
564
+ if (e._known[i + 1] === "GETPAGES")
565
+ return await $(this._parent._expandPagedSet(e, a, 0, 0, s)), this.getIdColumnDictionary(e, t, i, s);
566
+ let r = i + 1;
567
+ const n = [];
568
+ for (; r < e._known.length && e._known[r] !== "GETPAGES"; )
569
+ n.push(e._known[r]), r++;
570
+ i += n.length;
571
+ const l = await $(this._parent._getFeatureBatch(n, s));
572
+ this._checkCancelled(s);
573
+ for (const u of l)
574
+ t.push({ id: u.attributes[this.objectIdField], feature: u });
575
+ return this.getIdColumnDictionary(e, t, i, s);
576
+ }
577
+ return e._candidates.length > 0 ? (await $(this._refineSetBlock(e, this._maxProcessingRate(), s)), this._checkCancelled(s), this.getIdColumnDictionary(e, t, i, s)) : t;
578
+ }
579
+ _isInFeatureSet(e) {
580
+ return this._parent._isInFeatureSet(e);
581
+ }
582
+ _getFeatures(e, t, i, s) {
583
+ return this._parent._getFeatures(e, t, i, s);
584
+ }
585
+ _featureFromCache(e) {
586
+ if (this._featureCache[e] === void 0) {
587
+ const t = this._parent._featureFromCache(e);
588
+ return t === void 0 ? void 0 : t === null ? null : (this._featureCache[e] = t, t);
589
+ }
590
+ return this._featureCache[e];
591
+ }
592
+ async _fetchAndRefineFeatures() {
593
+ throw new D(T.NeverReach);
594
+ }
595
+ async _getFilteredSet(e, t, i, s, a) {
596
+ await this._ensureLoaded();
597
+ const r = await this._parent._getFilteredSet(e, t, i, s === null ? this._orderbyclause : s, a);
598
+ this._checkCancelled(a);
599
+ const n = new _(r._candidates.slice(0), r._known.slice(0), r._ordered, this._clonePageDefinition(r.pagesDefinition));
600
+ let l = !0;
601
+ if (r._candidates.length > 0 && (l = !1), n._ordered === !1) {
602
+ let u = await this.manualOrderSet(n, a);
603
+ return l === !1 && (t === null && i === null || (u = new _(u._candidates.slice(0).concat(u._known.slice(0)), [], u._ordered, this._clonePageDefinition(u.pagesDefinition)))), u;
604
+ }
605
+ return n;
606
+ }
607
+ static registerAction() {
608
+ E._featuresetFunctions.orderBy = function(e) {
609
+ return e === "" ? this : new Ee({ parentfeatureset: this, orderbyclause: new W(e) });
610
+ };
611
+ }
612
+ getFieldsIndex() {
613
+ return this._parent.getFieldsIndex();
614
+ }
615
+ };
616
+ function It(h) {
617
+ if (h.parseTree.type === "function") {
618
+ if (h.parseTree.args.value.length === 0)
619
+ return { name: h.parseTree.name, expr: null };
620
+ if (h.parseTree.args.value.length > 1)
621
+ throw new L(A.MissingStatisticParameters);
622
+ const e = R.create(rt(h.parseTree.args.value[0], x.Standardised, h.parameters), h.fieldsIndex, h.timeZone);
623
+ return { name: h.parseTree.name, expr: e };
624
+ }
625
+ return null;
626
+ }
627
+ let ke = class ie {
628
+ constructor() {
629
+ this.field = "", this.tofieldname = "", this.typeofstat = "MIN", this.workingexpr = null;
630
+ }
631
+ clone() {
632
+ const e = new ie();
633
+ return e.field = this.field, e.tofieldname = this.tofieldname, e.typeofstat = this.typeofstat, e.workingexpr = this.workingexpr, e;
634
+ }
635
+ static parseStatField(e, t, i, s) {
636
+ const a = new ie();
637
+ a.field = e;
638
+ const r = R.create(t, i, s), n = It(r);
639
+ if (n === null)
640
+ throw new L(A.UnsupportedSqlFunction, { function: "" });
641
+ const l = n.name.toUpperCase().trim();
642
+ if (l === "MIN") {
643
+ if (a.typeofstat = "MIN", a.workingexpr = n.expr, r === null)
644
+ throw new L(A.InvalidFunctionParameters, { function: "min" });
645
+ } else if (l === "MAX") {
646
+ if (a.typeofstat = "MAX", a.workingexpr = n.expr, r === null)
647
+ throw new L(A.InvalidFunctionParameters, { function: "max" });
648
+ } else if (l === "COUNT")
649
+ a.typeofstat = "COUNT", a.workingexpr = n.expr;
650
+ else if (l === "STDEV") {
651
+ if (a.typeofstat = "STDDEV", a.workingexpr = n.expr, r === null)
652
+ throw new L(A.InvalidFunctionParameters, { function: "stdev" });
653
+ } else if (l === "SUM") {
654
+ if (a.typeofstat = "SUM", a.workingexpr = n.expr, r === null)
655
+ throw new L(A.InvalidFunctionParameters, { function: "sum" });
656
+ } else if (l === "MEAN") {
657
+ if (a.typeofstat = "AVG", a.workingexpr = n.expr, r === null)
658
+ throw new L(A.InvalidFunctionParameters, { function: l });
659
+ } else if (l === "AVG") {
660
+ if (a.typeofstat = "AVG", a.workingexpr = n.expr, r === null)
661
+ throw new L(A.InvalidFunctionParameters, { function: "avg" });
662
+ } else {
663
+ if (l !== "VAR")
664
+ throw new L(A.UnsupportedSqlFunction, { function: l });
665
+ if (a.typeofstat = "VAR", a.workingexpr = n.expr, r === null)
666
+ throw new L(A.InvalidFunctionParameters, { function: "var" });
667
+ }
668
+ return a;
669
+ }
670
+ toStatisticsName() {
671
+ switch (this.typeofstat.toUpperCase()) {
672
+ case "MIN":
673
+ return "min";
674
+ case "MAX":
675
+ return "max";
676
+ case "SUM":
677
+ return "sum";
678
+ case "COUNT":
679
+ default:
680
+ return "count";
681
+ case "VAR":
682
+ return "var";
683
+ case "STDDEV":
684
+ return "stddev";
685
+ case "AVG":
686
+ return "avg";
687
+ }
688
+ }
689
+ };
690
+ function Ct(h) {
691
+ if (!h)
692
+ return "COUNT";
693
+ switch (h.toLowerCase()) {
694
+ case "max":
695
+ return "MAX";
696
+ case "var":
697
+ case "variance":
698
+ return "VAR";
699
+ case "avg":
700
+ case "average":
701
+ case "mean":
702
+ return "AVG";
703
+ case "min":
704
+ return "MIN";
705
+ case "sum":
706
+ return "SUM";
707
+ case "stdev":
708
+ case "stddev":
709
+ return "STDDEV";
710
+ case "count":
711
+ return "COUNT";
712
+ }
713
+ return "COUNT";
714
+ }
715
+ let Dt = class Pe extends E {
716
+ constructor(e) {
717
+ super(e), this._decodedStatsfield = [], this._decodedGroupbyfield = [], this._candosimplegroupby = !0, this.phsyicalgroupbyfields = [], this.objectIdField = "ROW__ID", this._internalObjectIdField = "ROW__ID", this._adaptedFields = [], this.declaredClass = "esri.arcade.featureset.actions.Aggregate", this._uniqueIds = 1, this._maxQuery = 10, this._maxProcessing = 10, this._parent = e.parentfeatureset, this._config = e;
718
+ }
719
+ isTable() {
720
+ return !0;
721
+ }
722
+ async _getSet(e) {
723
+ if (this._wset === null) {
724
+ const t = await this._getFilteredSet("", null, null, null, e);
725
+ return this._wset = t, this._wset;
726
+ }
727
+ return this._wset;
728
+ }
729
+ _isInFeatureSet() {
730
+ return I.InFeatureSet;
731
+ }
732
+ _nextUniqueName(e) {
733
+ for (; e["T" + this._uniqueIds.toString()] === 1; )
734
+ this._uniqueIds++;
735
+ const t = "T" + this._uniqueIds.toString();
736
+ return e[t] = 1, t;
737
+ }
738
+ _convertToEsriFieldType(e) {
739
+ return e;
740
+ }
741
+ _initialiseFeatureSet() {
742
+ const e = {};
743
+ let t = !1, i = 1;
744
+ const s = this._parent ? this._parent.getFieldsIndex() : new ct([]);
745
+ for (this.objectIdField = "ROW__ID", this.globalIdField = ""; t === !1; ) {
746
+ let r = !1;
747
+ for (let n = 0; n < this._config.groupbyfields.length; n++)
748
+ if (this._config.groupbyfields[n].name.toLowerCase() === this.objectIdField.toLowerCase()) {
749
+ r = !0;
750
+ break;
751
+ }
752
+ if (r === !1) {
753
+ for (let n = 0; n < this._config.statsfields.length; n++)
754
+ if (this._config.statsfields[n].name.toLowerCase() === this.objectIdField.toLowerCase()) {
755
+ r = !0;
756
+ break;
757
+ }
758
+ }
759
+ r === !1 ? t = !0 : (this.objectIdField = "ROW__ID" + i.toString(), i++);
760
+ }
761
+ for (const r of this._config.statsfields) {
762
+ const n = new ke();
763
+ n.field = r.name, n.tofieldname = r.name, n.workingexpr = r.expression instanceof R ? r.expression : R.create(r.expression, s, this.dateFieldsTimeZoneDefaultUTC), n.typeofstat = Ct(r.statistic), this._decodedStatsfield.push(n);
764
+ }
765
+ this._decodedGroupbyfield = [];
766
+ for (const r of this._config.groupbyfields) {
767
+ const n = { name: r.name, singlefield: null, tofieldname: r.name, expression: r.expression instanceof R ? r.expression : R.create(r.expression, s, this.dateFieldsTimeZoneDefaultUTC), sqlType: null };
768
+ this._decodedGroupbyfield.push(n);
769
+ }
770
+ if (this._parent !== null) {
771
+ this.geometryType = this._parent.geometryType, this.spatialReference = this._parent.spatialReference, this.hasM = this._parent.hasM, this.hasZ = this._parent.hasZ, this.typeIdField = "";
772
+ for (const r of this._parent.fields)
773
+ e[r.name.toUpperCase()] = 1;
774
+ this.types = null, this.subtypes = null, this.subtypeField = "";
775
+ } else
776
+ this.geometryType = re.point, this.typeIdField = "", this.types = null, this.subtypes = null, this.subtypeField = "", this.spatialReference = new ae({ wkid: 4326 });
777
+ this.fields = [];
778
+ const a = new ke();
779
+ a.field = this._nextUniqueName(e), a.tofieldname = this.objectIdField, a.workingexpr = R.create(this._parent.objectIdField, this._parent.getFieldsIndex(), this.dateFieldsTimeZoneDefaultUTC), a.typeofstat = "MIN", this._decodedStatsfield.push(a);
780
+ for (const r of this._decodedGroupbyfield) {
781
+ const n = new M();
782
+ if (r.name = this._nextUniqueName(e), n.name = r.tofieldname, n.alias = n.name, Z(r.expression)) {
783
+ const l = this._parent.getField(k(r.expression, x.Standardised));
784
+ if (!l)
785
+ throw new D(T.AggregationFieldNotFound);
786
+ r.name = l.name, r.singlefield = l.name, this.phsyicalgroupbyfields.push(l.name), n.type = l.type, r.sqlType = l.type;
787
+ } else {
788
+ n.type = this._convertToEsriFieldType(nt(r.expression, this._parent.fields));
789
+ const l = new M();
790
+ l.name = r.name, l.alias = l.name, this.phsyicalgroupbyfields.push(r.name), this._adaptedFields.push(new St(l, r.expression)), this._candosimplegroupby = !1, r.sqlType = n.type;
791
+ }
792
+ this.fields.push(n);
793
+ }
794
+ if (this._adaptedFields.length > 0)
795
+ for (const r of this._parent.fields)
796
+ this._adaptedFields.push(new ee(r));
797
+ for (let r = 0; r < this._decodedStatsfield.length; r++) {
798
+ const n = new M();
799
+ let l = null;
800
+ const u = this._decodedStatsfield[r];
801
+ u.field = this._nextUniqueName(e), u.tofieldname === this.objectIdField && (this._internalObjectIdField = u.field), n.name = u.tofieldname, n.alias = n.name;
802
+ const o = u.workingexpr !== null && Z(u.workingexpr) ? k(u.workingexpr, x.Standardised) : "";
803
+ switch (this._decodedStatsfield[r].typeofstat) {
804
+ case "SUM":
805
+ if (o !== "") {
806
+ if (l = this._parent.getField(o), !l)
807
+ throw new D(T.AggregationFieldNotFound);
808
+ n.type = l.type;
809
+ } else
810
+ n.type = "double";
811
+ break;
812
+ case "MIN":
813
+ case "MAX":
814
+ if (o !== "") {
815
+ if (l = this._parent.getField(o), !l)
816
+ throw new D(T.AggregationFieldNotFound);
817
+ n.type = l.type;
818
+ } else
819
+ n.type = "double";
820
+ break;
821
+ case "COUNT":
822
+ n.type = "integer";
823
+ break;
824
+ case "STDDEV":
825
+ case "VAR":
826
+ case "AVG":
827
+ if (o !== "" && (l = this._parent.getField(o), !l))
828
+ throw new D(T.AggregationFieldNotFound);
829
+ n.type = "double";
830
+ }
831
+ this.fields.push(n);
832
+ }
833
+ }
834
+ async _canDoAggregates() {
835
+ return !1;
836
+ }
837
+ async _getFeatures(e, t, i, s) {
838
+ t !== -1 && this._featureCache[t];
839
+ const a = this._maxQuery;
840
+ return this._checkIfNeedToExpandKnownPage(e, a) === !0 ? (await this._expandPagedSet(e, a, 0, 0, s), this._getFeatures(e, t, i, s)) : "success";
841
+ }
842
+ async _getFilteredSet(e, t, i, s, a) {
843
+ if (e !== "")
844
+ return new _([], [], !0, null);
845
+ let r = null;
846
+ const n = { ordered: !1, nowhereclause: !1 };
847
+ if (await this._ensureLoaded(), i !== null) {
848
+ for (let u = 0; u < this._decodedStatsfield.length; u++)
849
+ if (ve(i, this._decodedStatsfield[u].tofieldname) === !0) {
850
+ n.nowhereclause = !0, i = null;
851
+ break;
852
+ }
853
+ }
854
+ if (s !== null) {
855
+ n.ordered = !0;
856
+ for (let u = 0; u < this._decodedStatsfield.length; u++)
857
+ if (s.scanForField(this._decodedStatsfield[u].tofieldname) === !0) {
858
+ s = null, n.ordered = !1;
859
+ break;
860
+ }
861
+ if (s !== null) {
862
+ for (const u of this._decodedGroupbyfield)
863
+ if (u.singlefield === null && s.scanForField(u.tofieldname) === !0) {
864
+ s = null, n.ordered = !1;
865
+ break;
866
+ }
867
+ }
868
+ }
869
+ if (this._candosimplegroupby !== !1 && await this._parent._canDoAggregates(this.phsyicalgroupbyfields, this._decodedStatsfield, "", null, null)) {
870
+ let u = null;
871
+ i && (u = this._reformulateWhereClauseWithoutGroupByFields(i));
872
+ let o = null;
873
+ s && (o = this._reformulateOrderClauseWithoutGroupByFields(s));
874
+ const d = await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields, this._decodedStatsfield, "", null, u, o, this._internalObjectIdField);
875
+ return this._checkCancelled(a), r = n.nowhereclause === !0 ? new _(d._candidates.slice(0).concat(d._known.slice(0)), [], n.ordered === !0 && d._ordered, this._clonePageDefinition(d.pagesDefinition)) : new _(d._candidates.slice(0), d._known.slice(0), n.ordered === !0 && d._ordered, this._clonePageDefinition(d.pagesDefinition)), r;
876
+ }
877
+ let l = this._parent;
878
+ if (this._adaptedFields.length > 0 && (l = new bt({ parentfeatureset: this._parent, adaptedFields: this._adaptedFields, extraFilter: null })), n.nowhereclause === !0)
879
+ r = new _(["GETPAGES"], [], !1, { aggregatefeaturesetpagedefinition: !0, resultOffset: 0, resultRecordCount: this._maxQuery, internal: { fullyResolved: !1, workingItem: null, type: "manual", iterator: null, set: [], subfeatureset: new te({ parentfeatureset: l, orderbyclause: new W(this.phsyicalgroupbyfields.join(",") + "," + this._parent.objectIdField + " ASC") }) } });
880
+ else {
881
+ let u = l;
882
+ if (i !== null) {
883
+ let o = null;
884
+ i && (o = this._reformulateWhereClauseWithoutGroupByFields(i)), u = new Oe({ parentfeatureset: u, whereclause: o });
885
+ }
886
+ r = new _(["GETPAGES"], [], !1, { aggregatefeaturesetpagedefinition: !0, resultOffset: 0, resultRecordCount: this._maxQuery, internal: { fullyResolved: !1, workingItem: null, type: "manual", iterator: null, set: [], subfeatureset: new te({ parentfeatureset: u, orderbyclause: new W(this.phsyicalgroupbyfields.join(",") + "," + this._parent.objectIdField + " ASC") }) } });
887
+ }
888
+ return r;
889
+ }
890
+ _reformulateWhereClauseWithoutStatsFields(e) {
891
+ for (const t of this._decodedStatsfield)
892
+ e = Q(e, t.tofieldname, k(t.workingexpr, x.Standardised), this._parent.getFieldsIndex());
893
+ return e;
894
+ }
895
+ _reformulateWhereClauseWithoutGroupByFields(e) {
896
+ for (const t of this._decodedGroupbyfield)
897
+ t.tofieldname !== t.name && (e = Q(e, t.tofieldname, k(t.expression, x.Standardised), this._parent.getFieldsIndex()));
898
+ return e;
899
+ }
900
+ _reformulateOrderClauseWithoutGroupByFields(e) {
901
+ const t = [];
902
+ for (const i of this._decodedGroupbyfield)
903
+ i.tofieldname !== i.name && t.push({ field: i.tofieldname, newfield: i.name });
904
+ return t.length > 0 ? e.replaceFields(t) : e;
905
+ }
906
+ _clonePageDefinition(e) {
907
+ return e === null ? null : e.aggregatefeaturesetpagedefinition === !0 ? { aggregatefeaturesetpagedefinition: !0, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, internal: e.internal } : this._parent._clonePageDefinition(e);
908
+ }
909
+ async _refineSetBlock(e, t, i) {
910
+ return this._checkIfNeedToExpandCandidatePage(e, this._maxQuery) === !0 ? (await this._expandPagedSet(e, this._maxQuery, 0, 0, i), this._refineSetBlock(e, t, i)) : (this._checkCancelled(i), e._candidates.length, this._refineKnowns(e, t), e._candidates.length, e._candidates.length, e);
911
+ }
912
+ _expandPagedSet(e, t, i, s, a) {
913
+ return this._expandPagedSetFeatureSet(e, t, i, s, a);
914
+ }
915
+ async _getPhysicalPage(e, t, i) {
916
+ if (e.pagesDefinition.aggregatefeaturesetpagedefinition === !0)
917
+ return this._sequentialGetPhysicalItem(e, e.pagesDefinition.resultRecordCount, i, []);
918
+ const s = await this._getAgregagtePhysicalPage(e, t, i);
919
+ for (const a of s) {
920
+ const r = { geometry: a.geometry, attributes: {} }, n = {};
921
+ for (const l in a.attributes)
922
+ n[l.toLowerCase()] = a.attributes[l];
923
+ for (const l of this._decodedGroupbyfield)
924
+ r.attributes[l.tofieldname] = n[l.name.toLowerCase()];
925
+ for (const l of this._decodedStatsfield)
926
+ r.attributes[l.tofieldname] = n[l.field.toLowerCase()];
927
+ this._featureCache[r.attributes[this.objectIdField]] = new G(r);
928
+ }
929
+ return s.length;
930
+ }
931
+ _sequentialGetPhysicalItem(e, t, i, s) {
932
+ return new Promise((a, r) => {
933
+ e.pagesDefinition.internal.iterator === null && (e.pagesDefinition.internal.iterator = e.pagesDefinition.internal.subfeatureset.iterator(i)), e.pagesDefinition.internal.fullyResolved === !0 || t === 0 ? a(s.length) : this._nextAggregateItem(e, t, i, s, (n) => {
934
+ n === null ? a(s.length) : (t -= 1, a(this._sequentialGetPhysicalItem(e, t, i, s)));
935
+ }, r);
936
+ });
937
+ }
938
+ _nextAggregateItem(e, t, i, s, a, r) {
939
+ try {
940
+ $(e.pagesDefinition.internal.iterator.next()).then((n) => {
941
+ if (n === null)
942
+ if (e.pagesDefinition.internal.workingItem !== null) {
943
+ const l = this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);
944
+ s.push(l), e.pagesDefinition.internal.workingItem = null, e.pagesDefinition.internal.set.push(l.attributes[this.objectIdField]), e.pagesDefinition.internal.fullyResolved = !0, a(null);
945
+ } else
946
+ e.pagesDefinition.internal.fullyResolved = !0, a(null);
947
+ else {
948
+ const l = this._generateAggregateHash(n);
949
+ if (e.pagesDefinition.internal.workingItem === null)
950
+ e.pagesDefinition.internal.workingItem = { features: [n], id: l };
951
+ else {
952
+ if (l !== e.pagesDefinition.internal.workingItem.id) {
953
+ const u = this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);
954
+ return s.push(u), e.pagesDefinition.internal.workingItem = null, e.pagesDefinition.internal.set.push(u.attributes[this.objectIdField]), t -= 1, e.pagesDefinition.internal.workingItem = { features: [n], id: l }, void a(u);
955
+ }
956
+ e.pagesDefinition.internal.workingItem.features.push(n);
957
+ }
958
+ this._nextAggregateItem(e, t, i, s, a, r);
959
+ }
960
+ }, r);
961
+ } catch (n) {
962
+ r(n);
963
+ }
964
+ }
965
+ _calculateFieldStat(e, t, i) {
966
+ const s = [];
967
+ for (let a = 0; a < e.features.length; a++)
968
+ if (t.workingexpr !== null) {
969
+ const r = t.workingexpr.calculateValue(e.features[a]);
970
+ r !== null && (r instanceof dt || r instanceof ht ? s.push(r.toNumber()) : r instanceof tt ? s.push(r.toMilliseconds()) : s.push(r));
971
+ } else
972
+ s.push(null);
973
+ switch (t.typeofstat) {
974
+ case "MIN":
975
+ i.attributes[t.tofieldname] = U("min", s, -1);
976
+ break;
977
+ case "MAX":
978
+ i.attributes[t.tofieldname] = U("max", s, -1);
979
+ break;
980
+ case "SUM":
981
+ i.attributes[t.tofieldname] = U("sum", s, -1);
982
+ break;
983
+ case "COUNT":
984
+ i.attributes[t.tofieldname] = s.length;
985
+ break;
986
+ case "VAR":
987
+ i.attributes[t.tofieldname] = U("var", s, -1);
988
+ break;
989
+ case "STDDEV":
990
+ i.attributes[t.tofieldname] = U("stddev", s, -1);
991
+ break;
992
+ case "AVG":
993
+ i.attributes[t.tofieldname] = U("avg", s, -1);
994
+ }
995
+ return !0;
996
+ }
997
+ _calculateAndAppendAggregateItem(e) {
998
+ const t = { attributes: {}, geometry: null };
999
+ for (const s of this._decodedGroupbyfield) {
1000
+ const a = s.singlefield ? e.features[0].attributes[s.singlefield] : R.convertValueToStorageFormat(s.expression.calculateValue(e.features[0]), s.sqlType);
1001
+ t.attributes[s.tofieldname] = a;
1002
+ }
1003
+ for (const s of this._decodedStatsfield)
1004
+ this._calculateFieldStat(e, s, t);
1005
+ const i = [];
1006
+ for (let s = 0; s < this._decodedStatsfield.length; s++)
1007
+ i.push(this._calculateFieldStat(e, this._decodedStatsfield[s], t));
1008
+ return this._featureCache[t.attributes[this.objectIdField]] = new G({ attributes: t.attributes, geometry: t.geometry }), t;
1009
+ }
1010
+ _generateAggregateHash(e) {
1011
+ let t = "";
1012
+ for (const i of this._decodedGroupbyfield) {
1013
+ const s = i.singlefield ? e.attributes[i.singlefield] : i.expression.calculateValue(e);
1014
+ t += s == null ? ":" : ":" + s.toString();
1015
+ }
1016
+ return xe(t, Ne.String);
1017
+ }
1018
+ async _stat() {
1019
+ return { calculated: !1 };
1020
+ }
1021
+ async getFeatureByObjectId() {
1022
+ return null;
1023
+ }
1024
+ static registerAction() {
1025
+ E._featuresetFunctions.groupby = function(e, t) {
1026
+ return new Pe({ parentfeatureset: this, groupbyfields: e, statsfields: t });
1027
+ };
1028
+ }
1029
+ };
1030
+ class le extends E {
1031
+ constructor(e) {
1032
+ super(e), this._topnum = 0, this.declaredClass = "esri.arcade.featureset.actions.Top", this._countedin = 0, this._maxProcessing = 100, this._topnum = e.topnum, this._parent = e.parentfeatureset;
1033
+ }
1034
+ async _getSet(e) {
1035
+ if (this._wset === null) {
1036
+ await this._ensureLoaded();
1037
+ const t = await this._parent._getSet(e);
1038
+ return this._wset = new _(t._candidates.slice(0), t._known.slice(0), !1, this._clonePageDefinition(t.pagesDefinition)), this._setKnownLength(this._wset) > this._topnum && (this._wset._known = this._wset._known.slice(0, this._topnum)), this._setKnownLength(this._wset) >= this._topnum && (this._wset._candidates = []), this._wset;
1039
+ }
1040
+ return this._wset;
1041
+ }
1042
+ _setKnownLength(e) {
1043
+ return e._known.length > 0 && e._known[e._known.length - 1] === "GETPAGES" ? e._known.length - 1 : e._known.length;
1044
+ }
1045
+ _isInFeatureSet(e) {
1046
+ const t = this._parent._isInFeatureSet(e);
1047
+ if (t === I.NotInFeatureSet)
1048
+ return t;
1049
+ const i = this._idstates[e];
1050
+ return i === I.InFeatureSet || i === I.NotInFeatureSet ? i : t === I.InFeatureSet && i === void 0 ? this._countedin < this._topnum ? (this._idstates[e] = I.InFeatureSet, this._countedin++, I.InFeatureSet) : (this._idstates[e] = I.NotInFeatureSet, I.NotInFeatureSet) : I.Unknown;
1051
+ }
1052
+ async _expandPagedSet(e, t, i, s, a) {
1053
+ if (this._parent === null)
1054
+ throw new D(T.NotImplemented);
1055
+ if (t > this._topnum && (t = this._topnum), this._countedin >= this._topnum && e.pagesDefinition.internal.set.length <= e.pagesDefinition.resultOffset) {
1056
+ let n = e._known.length;
1057
+ return n > 0 && e._known[n - 1] === "GETPAGES" && (e._known.length = n - 1), n = e._candidates.length, n > 0 && e._candidates[n - 1] === "GETPAGES" && (e._candidates.length = n - 1), "success";
1058
+ }
1059
+ const r = await this._parent._expandPagedSet(e, t, i, s, a);
1060
+ return this._setKnownLength(e) > this._topnum && (e._known.length = this._topnum), this._setKnownLength(e) >= this._topnum && (e._candidates.length = 0), r;
1061
+ }
1062
+ async _getFeatures(e, t, i, s) {
1063
+ const a = [], r = this._maxQueryRate();
1064
+ if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
1065
+ return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
1066
+ t !== -1 && this._featureCache[t] === void 0 && a.push(t);
1067
+ let n = 0;
1068
+ for (let o = e._lastFetchedIndex; o < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(this._featureCache[e._known[o]] === void 0 && (e._known[o] !== t && a.push(e._known[o]), a.length > r))); o++)
1069
+ ;
1070
+ if (a.length === 0)
1071
+ return "success";
1072
+ const l = new _([], a, !1, null), u = Math.min(a.length, i);
1073
+ await this._parent._getFeatures(l, -1, u, s);
1074
+ for (let o = 0; o < u; o++) {
1075
+ const d = this._parent._featureFromCache(a[o]);
1076
+ d !== void 0 && (this._featureCache[a[o]] = d);
1077
+ }
1078
+ return "success";
1079
+ }
1080
+ async _getFilteredSet(e, t, i, s, a) {
1081
+ await this._ensureLoaded();
1082
+ const r = await this._getSet(a);
1083
+ return new _(r._candidates.slice(0).concat(r._known.slice(0)), [], !1, this._clonePageDefinition(r.pagesDefinition));
1084
+ }
1085
+ _refineKnowns(e, t) {
1086
+ let i = 0, s = null;
1087
+ const a = [];
1088
+ for (let r = 0; r < e._candidates.length; r++) {
1089
+ const n = this._isInFeatureSet(e._candidates[r]);
1090
+ if (n === I.InFeatureSet) {
1091
+ if (e._known.push(e._candidates[r]), i += 1, s === null ? s = { start: r, end: r } : s.end === r - 1 ? s.end = r : (a.push(s), s = { start: r, end: r }), e._known.length >= this._topnum)
1092
+ break;
1093
+ } else if (n === I.NotInFeatureSet)
1094
+ s === null ? s = { start: r, end: r } : s.end === r - 1 ? s.end = r : (a.push(s), s = { start: r, end: r }), i += 1;
1095
+ else if (n === I.Unknown)
1096
+ break;
1097
+ if (i >= t)
1098
+ break;
1099
+ }
1100
+ s !== null && a.push(s);
1101
+ for (let r = a.length - 1; r >= 0; r--)
1102
+ e._candidates.splice(a[r].start, a[r].end - a[r].start + 1);
1103
+ this._setKnownLength(e) > this._topnum && (e._known = e._known.slice(0, this._topnum)), this._setKnownLength(e) >= this._topnum && (e._candidates = []);
1104
+ }
1105
+ async _stat() {
1106
+ return { calculated: !1 };
1107
+ }
1108
+ async _canDoAggregates() {
1109
+ return !1;
1110
+ }
1111
+ static registerAction() {
1112
+ E._featuresetFunctions.top = function(e) {
1113
+ return new le({ parentfeatureset: this, topnum: e });
1114
+ };
1115
+ }
1116
+ getFieldsIndex() {
1117
+ return this._parent.getFieldsIndex();
1118
+ }
1119
+ }
1120
+ async function Tt(h, e, t, i) {
1121
+ return vt(e, await Rt(h, e, t, i), t, i);
1122
+ }
1123
+ async function Rt(h, e, t, i) {
1124
+ var o;
1125
+ const s = { ...i }, a = xt(e, t), r = ((o = e.outStatistics) == null ? void 0 : o[0]) != null, n = Me("featurelayer-pbf-statistics"), l = !r || n;
1126
+ let u;
1127
+ if ((t == null ? void 0 : t.format) === "pbf" && l)
1128
+ try {
1129
+ u = await pt(h, a, s);
1130
+ } catch (d) {
1131
+ if (d.name !== "query:parsing-pbf")
1132
+ throw d;
1133
+ t.format = "json";
1134
+ }
1135
+ return (t == null ? void 0 : t.format) !== "json" && l || (u = await ft(h, a, s)), kt(t == null ? void 0 : t.fieldsIndex, u.fields), u;
1136
+ }
1137
+ function kt(h, e) {
1138
+ if (h != null && e != null)
1139
+ for (const t of e) {
1140
+ const i = h.get(t.name);
1141
+ i && Object.assign(t, i.toJSON());
1142
+ }
1143
+ }
1144
+ async function vt(h, e, t, i) {
1145
+ var r;
1146
+ const s = t == null ? void 0 : t.infoFor3D;
1147
+ if (!qe(h, s) || s == null || !e.assetMaps || !((r = e.features) != null && r.length))
1148
+ return _t.fromJSON(e);
1149
+ const { meshFeatureSetFromJSON: a } = await We(import("./meshFeatureSet-91312223.js"), i);
1150
+ return a(h, s, e);
1151
+ }
1152
+ function xt(h, e) {
1153
+ let t = N.from(h);
1154
+ t.sourceSpatialReference = t.sourceSpatialReference ?? (e == null ? void 0 : e.sourceSpatialReference) ?? null, (e != null && e.gdbVersion || e != null && e.dynamicDataSource) && (t = t === h ? t.clone() : t, t.gdbVersion = h.gdbVersion || e.gdbVersion, t.dynamicDataSource = h.dynamicDataSource ? $e.from(h.dynamicDataSource) : e.dynamicDataSource);
1155
+ const i = e == null ? void 0 : e.infoFor3D;
1156
+ if (i != null && qe(h, i)) {
1157
+ t = t === h ? t.clone() : t, t.formatOf3DObjects = null;
1158
+ const { supportedFormats: s, queryFormats: a } = i, r = Ie("model/gltf-binary", s) ?? Ce("glb", s), n = Ie("model/gltf+json", s) ?? Ce("gtlf", s);
1159
+ for (const l of a) {
1160
+ if (l === r) {
1161
+ t.formatOf3DObjects = l;
1162
+ break;
1163
+ }
1164
+ l !== n || t.formatOf3DObjects || (t.formatOf3DObjects = l);
1165
+ }
1166
+ if (!t.formatOf3DObjects)
1167
+ throw new Ve("query:unsupported-3d-query-formats", "Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");
1168
+ if (t.outFields == null || !t.outFields.includes("*")) {
1169
+ t = t === h ? t.clone() : t, t.outFields == null && (t.outFields = []);
1170
+ const { originX: l, originY: u, originZ: o, translationX: d, translationY: c, translationZ: f, scaleX: y, scaleY: g, scaleZ: b, rotationX: S, rotationY: p, rotationZ: w, rotationDeg: C } = i.transformFieldRoles;
1171
+ t.outFields.push(l, u, o, d, c, f, y, g, b, S, p, w, C);
1172
+ }
1173
+ }
1174
+ return t;
1175
+ }
1176
+ function qe(h, e) {
1177
+ return e != null && h.returnGeometry === !0 && h.multipatchOption !== "xyFootprint" && !h.outStatistics;
1178
+ }
1179
+ class z extends E {
1180
+ constructor(e) {
1181
+ super(e), this.declaredClass = "esri.arcade.featureset.sources.FeatureLayerDynamic", this._removeGeometry = !1, this._overrideFields = null, this.formulaCredential = null, this._pageJustIds = !1, this._requestStandardised = !1, this._useDefinitionExpression = !0, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1182
+ }
1183
+ _maxQueryRate() {
1184
+ return ne;
1185
+ }
1186
+ end() {
1187
+ return this._layer;
1188
+ }
1189
+ optimisePagingFeatureQueries(e) {
1190
+ this._pageJustIds = e;
1191
+ }
1192
+ get urlQueryPath() {
1193
+ return this._layer.parsedUrl.path || "";
1194
+ }
1195
+ convertQueryToLruCacheKey(e) {
1196
+ const t = this.urlQueryPath + "," + Xe(e.toJSON());
1197
+ return xe(t, Ne.String);
1198
+ }
1199
+ async loadImpl() {
1200
+ return this._layer.loaded === !0 ? (this._initialiseFeatureSet(), this) : (await this._layer.load(), this._initialiseFeatureSet(), this);
1201
+ }
1202
+ _initialiseFeatureSet() {
1203
+ var e, t, i, s, a, r;
1204
+ if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._layer.geometryType, this.fields = this._layer.fields.slice(0), this.hasZ = ((i = (t = (e = this._layer) == null ? void 0 : e.capabilities) == null ? void 0 : t.data) == null ? void 0 : i.supportsZ) === !0, this.hasM = ((r = (a = (s = this._layer) == null ? void 0 : s.capabilities) == null ? void 0 : a.data) == null ? void 0 : r.supportsM) === !0, this._overrideFields !== null)
1205
+ if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1206
+ this._overrideFields = null;
1207
+ else {
1208
+ const n = [], l = [];
1209
+ for (const u of this.fields)
1210
+ if (u.type === "oid")
1211
+ n.push(u), l.push(u.name);
1212
+ else
1213
+ for (const o of this._overrideFields)
1214
+ if (o.toLowerCase() === u.name.toLowerCase()) {
1215
+ n.push(u), l.push(u.name);
1216
+ break;
1217
+ }
1218
+ this.fields = n, this._overrideFields = l;
1219
+ }
1220
+ if (this._layer.source && this._layer.source.sourceJSON) {
1221
+ const n = this._layer.source.sourceJSON.currentVersion;
1222
+ this._layer.source.sourceJSON.useStandardizedQueries === !0 ? (this._databaseType = x.StandardisedNoInterval, n != null && n >= 10.61 && (this._databaseType = x.Standardised)) : n != null && (n >= 10.5 && (this._databaseType = x.StandardisedNoInterval, this._requestStandardised = !0), n >= 10.61 && (this._databaseType = x.Standardised));
1223
+ }
1224
+ this.objectIdField = this._layer.objectIdField;
1225
+ for (const n of this.fields)
1226
+ n.type === "global-id" && (this.globalIdField = n.name);
1227
+ this._layer instanceof Le ? (this.subtypeField = this._layer.subtypeField ?? "", this.subtypes = this._layer.subtypes, this.types = null, this.typeIdField = null) : (this.typeIdField = this._layer.typeIdField ?? "", this.types = this._layer.types, this.subtypeField = this._layer.subtypeField, this.subtypes = this._layer.subtypes);
1228
+ }
1229
+ _isInFeatureSet() {
1230
+ return I.InFeatureSet;
1231
+ }
1232
+ async _refineSetBlock(e) {
1233
+ return e;
1234
+ }
1235
+ _candidateIdTransform(e) {
1236
+ return e;
1237
+ }
1238
+ async _getSet(e) {
1239
+ if (this._wset === null) {
1240
+ await this._ensureLoaded();
1241
+ const t = await this._getFilteredSet("", null, null, null, e);
1242
+ return this._wset = t, t;
1243
+ }
1244
+ return this._wset;
1245
+ }
1246
+ async _runDatabaseProbe(e) {
1247
+ await this._ensureLoaded();
1248
+ const t = new N();
1249
+ this.datesInUnknownTimezone && (t.timeReferenceUnknownClient = !0), t.where = e.replace("OBJECTID", this._layer.objectIdField);
1250
+ try {
1251
+ return await this._layer.queryObjectIds(t), !0;
1252
+ } catch {
1253
+ return !1;
1254
+ }
1255
+ }
1256
+ _canUsePagination() {
1257
+ return !(!this._layer.capabilities || !this._layer.capabilities.query || this._layer.capabilities.query.supportsPagination !== !0);
1258
+ }
1259
+ _cacheableFeatureSetSourceKey() {
1260
+ return this._layer.url;
1261
+ }
1262
+ pbfSupportedForQuery(e) {
1263
+ var i, s;
1264
+ const t = (s = (i = this._layer) == null ? void 0 : i.capabilities) == null ? void 0 : s.query;
1265
+ return !e.outStatistics && (t == null ? void 0 : t.supportsFormatPBF) === !0 && (t == null ? void 0 : t.supportsQuantizationEditMode) === !0;
1266
+ }
1267
+ async queryPBF(e) {
1268
+ return e.quantizationParameters = { mode: "edit" }, (await Tt(this._layer.parsedUrl, e, { format: "pbf" }, {})).unquantize();
1269
+ }
1270
+ get gdbVersion() {
1271
+ return this._layer && this._layer.capabilities && this._layer.capabilities.data && this._layer.capabilities.data.isVersioned ? this._layer.gdbVersion || "SDE.DEFAULT" : "";
1272
+ }
1273
+ nativeCapabilities() {
1274
+ return { title: this._layer.title ?? "", source: this, canQueryRelated: !0, capabilities: this._layer.capabilities, databaseType: this._databaseType, requestStandardised: this._requestStandardised };
1275
+ }
1276
+ executeQuery(e, t) {
1277
+ e.returnZ = this.hasZ, e.returnM = this.hasM;
1278
+ const i = t === "execute" ? De : t === "executeForCount" ? yt : gt, s = t === "execute" && this.pbfSupportedForQuery(e);
1279
+ let a = null;
1280
+ if (this.recentlyUsedQueries) {
1281
+ const r = this.convertQueryToLruCacheKey(e);
1282
+ a = this.recentlyUsedQueries.getFromCache(r), a === null && (a = s !== !0 ? i(this._layer.parsedUrl.path, e) : this.queryPBF(e), this.recentlyUsedQueries.addToCache(r, a), a = a.catch((n) => {
1283
+ var l;
1284
+ throw (l = this.recentlyUsedQueries) == null || l.removeFromCache(r), n;
1285
+ }));
1286
+ }
1287
+ return this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: e, method: t }), a === null && (a = s !== !0 ? i(this._layer.parsedUrl.path, e) : this.queryPBF(e)), a;
1288
+ }
1289
+ async _getFilteredSet(e, t, i, s, a) {
1290
+ const r = await this.databaseType();
1291
+ if (this.isTable() && t && e !== null && e !== "")
1292
+ return new _([], [], !0, null);
1293
+ if (this._canUsePagination())
1294
+ return this._getFilteredSetUsingPaging(e, t, i, s, a);
1295
+ let n = "", l = !1;
1296
+ s !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (n = s.constructClause(), l = !0);
1297
+ const u = new N();
1298
+ this.datesInUnknownTimezone && (u.timeReferenceUnknownClient = !0), u.where = i === null ? t === null ? "1=1" : "" : k(i, r), this._requestStandardised && (u.sqlFormat = "standard"), u.spatialRelationship = this._makeRelationshipEnum(e), u.outSpatialReference = this.spatialReference, u.orderByFields = n !== "" ? n.split(",") : null, u.geometry = t === null ? null : t, u.relationParameter = this._makeRelationshipParam(e);
1299
+ let o = await this.executeQuery(u, "executeForIds");
1300
+ return o === null && (o = []), this._checkCancelled(a), new _([], o, l, null);
1301
+ }
1302
+ _expandPagedSet(e, t, i, s, a) {
1303
+ return this._expandPagedSetFeatureSet(e, t, i, s, a);
1304
+ }
1305
+ async _getFilteredSetUsingPaging(e, t, i, s, a) {
1306
+ var f;
1307
+ let r = "", n = !1;
1308
+ s !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (r = s.constructClause(), n = !0);
1309
+ const l = await this.databaseType();
1310
+ let u = i === null ? t === null ? "1=1" : "" : k(i, l);
1311
+ this._layer.definitionExpression && this._useDefinitionExpression && (u = u !== "" ? "((" + this._layer.definitionExpression + ") AND (" + u + "))" : this._layer.definitionExpression);
1312
+ let o = this._maxQueryRate();
1313
+ const d = (f = this._layer.capabilities) == null ? void 0 : f.query.maxRecordCount;
1314
+ d != null && d < o && (o = d);
1315
+ let c = null;
1316
+ if (this._pageJustIds === !0)
1317
+ c = new _([], ["GETPAGES"], n, { spatialRel: this._makeRelationshipEnum(e), relationParam: this._makeRelationshipParam(e), outFields: this._layer.objectIdField, resultRecordCount: o, resultOffset: 0, geometry: t === null ? null : t, where: u, orderByFields: r, returnGeometry: !1, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1318
+ else {
1319
+ let y = !0;
1320
+ this._removeGeometry === !0 && (y = !1);
1321
+ const g = this._overrideFields ?? this._fieldsIncludingObjectId(["*"]);
1322
+ c = new _([], ["GETPAGES"], n, { spatialRel: this._makeRelationshipEnum(e), relationParam: this._makeRelationshipParam(e), outFields: g.join(","), resultRecordCount: o, resultOffset: 0, geometry: t === null ? null : t, where: u, orderByFields: r, returnGeometry: y, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1323
+ }
1324
+ return await this._expandPagedSet(c, o, 0, 1, a), c;
1325
+ }
1326
+ _clonePageDefinition(e) {
1327
+ return e === null ? null : e.groupbypage !== !0 ? { groupbypage: !1, spatialRel: e.spatialRel, relationParam: e.relationParam, outFields: e.outFields, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, geometry: e.geometry, where: e.where, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal } : { groupbypage: !0, spatialRel: e.spatialRel, relationParam: e.relationParam, outFields: e.outFields, resultRecordCount: e.resultRecordCount, useOIDpagination: e.useOIDpagination, generatedOid: e.generatedOid, groupByFieldsForStatistics: e.groupByFieldsForStatistics, resultOffset: e.resultOffset, outStatistics: e.outStatistics, geometry: e.geometry, where: e.where, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal };
1328
+ }
1329
+ async _getPhysicalPage(e, t, i) {
1330
+ const s = e.pagesDefinition.internal.lastRetrieved, a = s, r = e.pagesDefinition.internal.lastPage, n = new N();
1331
+ this._requestStandardised && (n.sqlFormat = "standard"), this.datesInUnknownTimezone && (n.timeReferenceUnknownClient = !0), n.spatialRelationship = e.pagesDefinition.spatialRel, n.relationParameter = e.pagesDefinition.relationParam, n.outFields = e.pagesDefinition.outFields.split(","), n.num = e.pagesDefinition.resultRecordCount, n.start = e.pagesDefinition.internal.lastPage, n.geometry = e.pagesDefinition.geometry, n.where = e.pagesDefinition.where, n.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, n.returnGeometry = e.pagesDefinition.returnGeometry, n.outSpatialReference = this.spatialReference;
1332
+ const l = await this.executeQuery(n, "execute");
1333
+ if (this._checkCancelled(i), e.pagesDefinition.internal.lastPage !== r)
1334
+ return "done";
1335
+ const u = this._layer.objectIdField;
1336
+ for (let o = 0; o < l.features.length; o++)
1337
+ e.pagesDefinition.internal.set[a + o] = l.features[o].attributes[u];
1338
+ if (this._pageJustIds === !1)
1339
+ for (let o = 0; o < l.features.length; o++)
1340
+ this._featureCache[l.features[o].attributes[u]] = l.features[o];
1341
+ return (l.exceededTransferLimit === void 0 && l.features.length !== e.pagesDefinition.resultRecordCount || l.exceededTransferLimit === !1) && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = s + l.features.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, "done";
1342
+ }
1343
+ _fieldsIncludingObjectId(e) {
1344
+ if (e === null)
1345
+ return [this.objectIdField];
1346
+ const t = e.slice(0);
1347
+ if (t.includes("*"))
1348
+ return t;
1349
+ let i = !1;
1350
+ for (const s of t)
1351
+ if (s.toUpperCase() === this.objectIdField.toUpperCase()) {
1352
+ i = !0;
1353
+ break;
1354
+ }
1355
+ return i === !1 && t.push(this.objectIdField), t;
1356
+ }
1357
+ async _getFeatures(e, t, i, s) {
1358
+ const a = [];
1359
+ if (t !== -1 && this._featureCache[t] === void 0 && a.push(t), this._checkIfNeedToExpandKnownPage(e, this._maxProcessingRate()) === !0)
1360
+ return await this._expandPagedSet(e, this._maxProcessingRate(), 0, 0, s), this._getFeatures(e, t, i, s);
1361
+ let r = 0;
1362
+ for (let o = e._lastFetchedIndex; o < e._known.length; o++) {
1363
+ if (e._lastFetchedIndex += 1, r++, this._featureCache[e._known[o]] === void 0) {
1364
+ let d = !1;
1365
+ if (this._layer._mode !== null && this._layer._mode !== void 0) {
1366
+ const c = this._layer._mode;
1367
+ if (c._featureMap[e._known[o]] !== void 0) {
1368
+ const f = c._featureMap[e._known[o]];
1369
+ f !== null && (d = !0, this._featureCache[e._known[o]] = f);
1370
+ }
1371
+ }
1372
+ if (d === !1 && (e._known[o] !== t && a.push(e._known[o]), a.length >= this._maxProcessingRate() - 1))
1373
+ break;
1374
+ }
1375
+ if (r >= i && a.length === 0)
1376
+ break;
1377
+ }
1378
+ if (a.length === 0)
1379
+ return "success";
1380
+ const n = new N();
1381
+ this._requestStandardised && (n.sqlFormat = "standard"), this.datesInUnknownTimezone && (n.timeReferenceUnknownClient = !0), n.objectIds = a, n.outFields = this._overrideFields ?? this._fieldsIncludingObjectId(["*"]), n.returnGeometry = !0, this._removeGeometry === !0 && (n.returnGeometry = !1), n.outSpatialReference = this.spatialReference;
1382
+ const l = await this.executeQuery(n, "execute");
1383
+ if (this._checkCancelled(s), l.error !== void 0)
1384
+ throw new D(T.RequestFailed, { reason: l.error });
1385
+ const u = this._layer.objectIdField;
1386
+ for (let o = 0; o < l.features.length; o++)
1387
+ this._featureCache[l.features[o].attributes[u]] = l.features[o];
1388
+ return "success";
1389
+ }
1390
+ async _getDistinctPages(e, t, i, s, a, r, n, l, u) {
1391
+ var S;
1392
+ await this._ensureLoaded();
1393
+ const o = await this.databaseType();
1394
+ let d = i.parseTree.column;
1395
+ const c = this._layer.fields ?? [];
1396
+ for (let p = 0; p < c.length; p++)
1397
+ if (c[p].name.toLowerCase() === d.toLowerCase()) {
1398
+ d = c[p].name;
1399
+ break;
1400
+ }
1401
+ const f = new N();
1402
+ this._requestStandardised && (f.sqlFormat = "standard"), this.datesInUnknownTimezone && (f.timeReferenceUnknownClient = !0);
1403
+ let y = r === null ? a === null ? "1=1" : "" : k(r, o);
1404
+ this._layer.definitionExpression && this._useDefinitionExpression && (y = y !== "" ? "((" + this._layer.definitionExpression + ") AND (" + y + "))" : this._layer.definitionExpression), f.where = y, f.spatialRelationship = this._makeRelationshipEnum(s), f.relationParameter = this._makeRelationshipParam(s), f.geometry = a === null ? null : a, f.returnDistinctValues = !0, f.returnGeometry = !1, f.outFields = [d];
1405
+ const g = await this.executeQuery(f, "execute");
1406
+ if (this._checkCancelled(u), !g.hasOwnProperty("features"))
1407
+ throw new D(T.InvalidStatResponse);
1408
+ let b = !1;
1409
+ for (let p = 0; p < c.length; p++)
1410
+ if (c[p].name === d) {
1411
+ c[p].type === "date" && (b = !0);
1412
+ break;
1413
+ }
1414
+ for (let p = 0; p < g.features.length; p++) {
1415
+ if (b) {
1416
+ const w = g.features[p].attributes[d];
1417
+ w !== null ? l.push(new Date(w)) : l.push(w);
1418
+ } else
1419
+ l.push(g.features[p].attributes[d]);
1420
+ if (l.length >= n)
1421
+ break;
1422
+ }
1423
+ return g.features.length === 0 ? l : g.features.length === ((S = this._layer.capabilities) == null ? void 0 : S.query.maxRecordCount) && l.length < n ? { calculated: !0, result: await this._getDistinctPages(e + g.features.length, t, i, s, a, r, n, l, u) } : l;
1424
+ }
1425
+ async _distinctStat(e, t, i, s, a, r, n) {
1426
+ return { calculated: !0, result: await this._getDistinctPages(0, e, t, i, s, a, r, [], n) };
1427
+ }
1428
+ isTable() {
1429
+ return this._layer.isTable || this._layer.geometryType === null || this._layer.type === "table" || this._layer.geometryType === "" || this._layer.geometryType === "esriGeometryNull";
1430
+ }
1431
+ async _countstat(e, t, i, s) {
1432
+ const a = await this.databaseType(), r = new N();
1433
+ if (this._requestStandardised && (r.sqlFormat = "standard"), this.isTable() && i && t !== null && t !== "")
1434
+ return { calculated: !0, result: 0 };
1435
+ let n = s === null ? i === null ? "1=1" : "" : k(s, a);
1436
+ return this._layer.definitionExpression && this._useDefinitionExpression && (n = n !== "" ? "((" + this._layer.definitionExpression + ") AND (" + n + "))" : this._layer.definitionExpression), r.where = n, this.datesInUnknownTimezone && (r.timeReferenceUnknownClient = !0), r.where = n, r.spatialRelationship = this._makeRelationshipEnum(t), r.relationParameter = this._makeRelationshipParam(t), r.geometry = i === null ? null : i, r.returnGeometry = !1, { calculated: !0, result: await this.executeQuery(r, "executeForCount") };
1437
+ }
1438
+ async _stats(e, t, i, s, a, r, n) {
1439
+ await this._ensureLoaded();
1440
+ const l = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsSqlExpression === !0, u = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsStatistics === !0, o = this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsDistinct === !0;
1441
+ if (e === "count")
1442
+ return o ? this._countstat(e, i, s, a) : { calculated: !1 };
1443
+ if (u === !1 || Z(t) === !1 && l === !1 || t.isStandardized === !1)
1444
+ return i !== "" || a !== null ? { calculated: !1 } : this._manualStat(e, t, r, n);
1445
+ if (e === "distinct")
1446
+ return o === !1 ? i !== "" || a !== null ? { calculated: !1 } : this._manualStat(e, t, r, n) : this._distinctStat(e, t, i, s, a, r, n);
1447
+ const d = await this.databaseType();
1448
+ if (this.isTable() && s && i !== null && i !== "")
1449
+ return { calculated: !0, result: null };
1450
+ const c = new N();
1451
+ this._requestStandardised && (c.sqlFormat = "standard");
1452
+ let f = a === null ? s === null ? "1=1" : "" : k(a, d);
1453
+ this._layer.definitionExpression && this._useDefinitionExpression && (f = f !== "" ? "((" + this._layer.definitionExpression + ") AND (" + f + "))" : this._layer.definitionExpression), c.where = f, c.spatialRelationship = this._makeRelationshipEnum(i), c.relationParameter = this._makeRelationshipParam(i), c.geometry = s === null ? null : s, this.datesInUnknownTimezone && (c.timeReferenceUnknownClient = !0);
1454
+ const y = new fe();
1455
+ y.statisticType = lt(e), y.onStatisticField = k(t, d), y.outStatisticFieldName = "ARCADE_STAT_RESULT", c.returnGeometry = !1;
1456
+ let g = "ARCADE_STAT_RESULT";
1457
+ c.outStatistics = [y];
1458
+ const b = await this.executeQuery(c, "execute");
1459
+ if (!b.hasOwnProperty("features") || b.features.length === 0)
1460
+ throw new D(T.InvalidStatResponse);
1461
+ let S = !1;
1462
+ const p = b.fields ?? [];
1463
+ for (let w = 0; w < p.length; w++)
1464
+ if (p[w].name.toUpperCase() === "ARCADE_STAT_RESULT") {
1465
+ g = p[w].name, p[w].type === "date" && (S = !0);
1466
+ break;
1467
+ }
1468
+ if (S) {
1469
+ let w = b.features[0].attributes[g];
1470
+ return w !== null && (w = new Date(b.features[0].attributes[g])), { calculated: !0, result: w };
1471
+ }
1472
+ return { calculated: !0, result: b.features[0].attributes[g] };
1473
+ }
1474
+ _stat(e, t, i, s, a, r, n) {
1475
+ return this._stats(e, t, i, s, a, r, n);
1476
+ }
1477
+ async _canDoAggregates(e, t) {
1478
+ var r, n;
1479
+ await this._ensureLoaded();
1480
+ let i = !1;
1481
+ const s = (r = this._layer.capabilities) == null ? void 0 : r.query, a = (s == null ? void 0 : s.supportsSqlExpression) === !0;
1482
+ if (s != null && s.supportsStatistics === !0 && s.supportsOrderBy === !0 && (i = !0), i)
1483
+ for (let l = 0; l < t.length - 1; l++)
1484
+ (((n = t[l].workingexpr) == null ? void 0 : n.isStandardized) === !1 || Z(t[l].workingexpr) === !1 && a === !1) && (i = !1);
1485
+ return i !== !1;
1486
+ }
1487
+ _makeRelationshipEnum(e) {
1488
+ if (e.includes("esriSpatialRelRelation"))
1489
+ return "relation";
1490
+ switch (e) {
1491
+ case "esriSpatialRelRelation":
1492
+ return "relation";
1493
+ case "esriSpatialRelIntersects":
1494
+ return "intersects";
1495
+ case "esriSpatialRelContains":
1496
+ return "contains";
1497
+ case "esriSpatialRelOverlaps":
1498
+ return "overlaps";
1499
+ case "esriSpatialRelWithin":
1500
+ return "within";
1501
+ case "esriSpatialRelTouches":
1502
+ return "touches";
1503
+ case "esriSpatialRelCrosses":
1504
+ return "crosses";
1505
+ case "esriSpatialRelEnvelopeIntersects":
1506
+ return "envelope-intersects";
1507
+ }
1508
+ return e;
1509
+ }
1510
+ _makeRelationshipParam(e) {
1511
+ return e.includes("esriSpatialRelRelation") ? e.split(":")[1] : "";
1512
+ }
1513
+ async _getAggregatePagesDataSourceDefinition(e, t, i, s, a, r, n) {
1514
+ var b;
1515
+ await this._ensureLoaded();
1516
+ const l = await this.databaseType();
1517
+ let u = "", o = !1, d = !1;
1518
+ r !== null && this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsOrderBy === !0 && (u = r.constructClause(), d = !0), this._layer.capabilities && this._layer.capabilities.query && this._layer.capabilities.query.supportsPagination === !1 && (d = !1, o = !0, u = this._layer.objectIdField);
1519
+ const c = [];
1520
+ for (let S = 0; S < t.length; S++) {
1521
+ const p = new fe();
1522
+ p.onStatisticField = t[S].workingexpr !== null ? k(t[S].workingexpr, l) : "", p.outStatisticFieldName = t[S].field, p.statisticType = t[S].toStatisticsName(), c.push(p);
1523
+ }
1524
+ u === "" && (u = e.join(","));
1525
+ let f = this._maxQueryRate();
1526
+ const y = (b = this._layer.capabilities) == null ? void 0 : b.query.maxRecordCount;
1527
+ y != null && y < f && (f = y);
1528
+ let g = a === null ? s === null ? "1=1" : "" : k(a, l);
1529
+ return this._layer.definitionExpression && this._useDefinitionExpression && (g = g !== "" ? "((" + this._layer.definitionExpression + ") AND (" + g + "))" : this._layer.definitionExpression), new _([], ["GETPAGES"], d, { groupbypage: !0, spatialRel: this._makeRelationshipEnum(i), relationParam: this._makeRelationshipParam(i), outFields: ["*"], useOIDpagination: o, generatedOid: n, resultRecordCount: f, resultOffset: 0, groupByFieldsForStatistics: e, outStatistics: c, geometry: s === null ? null : s, where: g, orderByFields: u, returnGeometry: !1, returnIdsOnly: !1, internal: { lastMaxId: -1, set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } });
1530
+ }
1531
+ async _getAgregagtePhysicalPage(e, t, i) {
1532
+ let s = e.pagesDefinition.where;
1533
+ e.pagesDefinition.useOIDpagination === !0 && (s = s !== "" ? "(" + s + ") AND (" + e.pagesDefinition.generatedOid + ">" + e.pagesDefinition.internal.lastMaxId.toString() + ")" : e.pagesDefinition.generatedOid + ">" + e.pagesDefinition.internal.lastMaxId.toString());
1534
+ const a = e.pagesDefinition.internal.lastRetrieved, r = a, n = e.pagesDefinition.internal.lastPage, l = new N();
1535
+ if (this._requestStandardised && (l.sqlFormat = "standard"), l.where = s, l.spatialRelationship = e.pagesDefinition.spatialRel, l.relationParameter = e.pagesDefinition.relationParam, l.outFields = e.pagesDefinition.outFields, l.outStatistics = e.pagesDefinition.outStatistics, l.geometry = e.pagesDefinition.geometry, l.groupByFieldsForStatistics = e.pagesDefinition.groupByFieldsForStatistics, l.num = e.pagesDefinition.resultRecordCount, l.start = e.pagesDefinition.internal.lastPage, l.returnGeometry = e.pagesDefinition.returnGeometry, this.datesInUnknownTimezone && (l.timeReferenceUnknownClient = !0), l.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, this.isTable() && l.geometry && l.spatialRelationship)
1536
+ return [];
1537
+ const u = await this.executeQuery(l, "execute");
1538
+ if (this._checkCancelled(i), !u.hasOwnProperty("features"))
1539
+ throw new D(T.InvalidStatResponse);
1540
+ const o = [];
1541
+ if (e.pagesDefinition.internal.lastPage !== n)
1542
+ return [];
1543
+ u.features.length > 0 && u.features[0].attributes[e.pagesDefinition.generatedOid] === void 0 && (e.pagesDefinition.generatedOid = e.pagesDefinition.generatedOid.toLowerCase());
1544
+ for (let d = 0; d < u.features.length; d++)
1545
+ e.pagesDefinition.internal.set[r + d] = u.features[d].attributes[e.pagesDefinition.generatedOid];
1546
+ for (let d = 0; d < u.features.length; d++)
1547
+ o.push(new G({ attributes: u.features[d].attributes, geometry: null }));
1548
+ return e.pagesDefinition.useOIDpagination === !0 ? u.features.length === 0 ? e.pagesDefinition.internal.fullyResolved = !0 : e.pagesDefinition.internal.lastMaxId = u.features[u.features.length - 1].attributes[e.pagesDefinition.generatedOid] : (u.exceededTransferLimit === void 0 && u.features.length !== e.pagesDefinition.resultRecordCount || u.exceededTransferLimit === !1) && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = a + u.features.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, o;
1549
+ }
1550
+ static create(e, t, i, s, a) {
1551
+ const r = new v({ url: e, outFields: t === null ? ["*"] : t });
1552
+ return new z({ layer: r, spatialReference: i, lrucache: s, interceptor: a });
1553
+ }
1554
+ relationshipMetaData() {
1555
+ var e;
1556
+ return this._layer && this._layer.source && ((e = this._layer.source.sourceJSON) != null && e.relationships) ? this._layer.source.sourceJSON.relationships : [];
1557
+ }
1558
+ serviceUrl() {
1559
+ return Y(this._layer.parsedUrl.path);
1560
+ }
1561
+ async queryAttachments(e, t, i, s, a) {
1562
+ const r = this._layer.capabilities;
1563
+ if (r != null && r.data.supportsAttachment && (r != null && r.operations.supportsQueryAttachments)) {
1564
+ const n = { objectIds: [e], returnMetadata: a };
1565
+ (t && t > 0 || i && i > 0) && (n.size = [t && t > 0 ? t : 0, i && i > 0 ? i : t + 1]), s && s.length > 0 && (n.attachmentTypes = s), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: n, method: "attachments" });
1566
+ const l = await this._layer.queryAttachments(n), u = [];
1567
+ return l && l[e] && l[e].forEach((o) => {
1568
+ const d = this._layer.parsedUrl.path + "/" + e.toString() + "/attachments/" + o.id.toString();
1569
+ let c = null;
1570
+ a && o.exifInfo && (c = Ye.convertJsonToArcade(o.exifInfo, "system", !0)), u.push(new He(o.id, o.name, o.contentType, o.size, d, c, o.keywords ?? null));
1571
+ }), u;
1572
+ }
1573
+ return [];
1574
+ }
1575
+ async queryRelatedFeatures(e) {
1576
+ var s;
1577
+ const t = { f: "json", relationshipId: e.relationshipId.toString(), definitionExpression: e.where, outFields: (s = e.outFields) == null ? void 0 : s.join(","), returnGeometry: e.returnGeometry.toString() };
1578
+ e.resultOffset !== void 0 && e.resultOffset !== null && (t.resultOffset = e.resultOffset.toString()), e.resultRecordCount !== void 0 && e.resultRecordCount !== null && (t.resultRecordCount = e.resultRecordCount.toString()), e.orderByFields && (t.orderByFields = e.orderByFields.join(",")), e.objectIds && e.objectIds.length > 0 && (t.objectIds = e.objectIds.join(",")), e.outSpatialReference && (t.outSR = Qe(e.outSpatialReference)), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preRequestCallback({ layer: this._layer, queryPayload: t, method: "relatedrecords", url: this._layer.parsedUrl.path + "/queryRelatedRecords" });
1579
+ const i = await B(this._layer.parsedUrl.path + "/queryRelatedRecords", { responseType: "json", query: t });
1580
+ if (i.data) {
1581
+ const a = {}, r = i.data;
1582
+ if (r != null && r.relatedRecordGroups) {
1583
+ const n = r.spatialReference;
1584
+ for (const l of r.relatedRecordGroups) {
1585
+ const u = l.objectId, o = [];
1586
+ for (const d of l.relatedRecords) {
1587
+ d.geometry && (d.geometry.spatialReference = n);
1588
+ const c = new G({ geometry: d.geometry ? Ze(d.geometry) : null, attributes: d.attributes });
1589
+ o.push(c);
1590
+ }
1591
+ a[u] = { features: o, exceededTransferLimit: r.exceededTransferLimit === !0 };
1592
+ }
1593
+ }
1594
+ return a;
1595
+ }
1596
+ throw new D(T.InvalidRequest);
1597
+ }
1598
+ async getFeatureByObjectId(e, t) {
1599
+ const i = new N();
1600
+ i.outFields = t, i.returnGeometry = !1, i.outSpatialReference = this.spatialReference, i.where = this.objectIdField + "=" + e.toString(), this.datesInUnknownTimezone && (i.timeReferenceUnknownClient = !0), this.featureSetQueryInterceptor && this.featureSetQueryInterceptor.preLayerQueryCallback({ layer: this._layer, query: i, method: "execute" });
1601
+ const s = await De(this._layer.parsedUrl.path, i);
1602
+ return s.features.length === 1 ? s.features[0] : null;
1603
+ }
1604
+ async getIdentityUser() {
1605
+ var t;
1606
+ await this.load();
1607
+ const e = (t = pe) == null ? void 0 : t.findCredential(this._layer.url);
1608
+ return e ? e.userId : null;
1609
+ }
1610
+ async getOwningSystemUrl() {
1611
+ var s, a;
1612
+ await this.load();
1613
+ const e = (s = pe) == null ? void 0 : s.findServerInfo(this._layer.url);
1614
+ if (e)
1615
+ return e.owningSystemUrl;
1616
+ let t = this._layer.url;
1617
+ const i = t.toLowerCase().indexOf("/rest/services");
1618
+ if (t = i > -1 ? t.substring(0, i) : t, t) {
1619
+ t += "/rest/info";
1620
+ try {
1621
+ const r = await B(t, { query: { f: "json" } });
1622
+ let n = "";
1623
+ return (a = r.data) != null && a.owningSystemUrl && (n = r.data.owningSystemUrl), n;
1624
+ } catch {
1625
+ return "";
1626
+ }
1627
+ }
1628
+ return "";
1629
+ }
1630
+ getDataSourceFeatureSet() {
1631
+ const e = new z({ layer: this._layer, spatialReference: this.spatialReference ?? void 0, outFields: this._overrideFields ?? void 0, includeGeometry: !this._removeGeometry, lrucache: this.recentlyUsedQueries ?? void 0, interceptor: this.featureSetQueryInterceptor ?? void 0 });
1632
+ return e._useDefinitionExpression = !1, e;
1633
+ }
1634
+ get preferredTimeZone() {
1635
+ return this._layer.preferredTimeZone ?? null;
1636
+ }
1637
+ get dateFieldsTimeZone() {
1638
+ return this._layer.dateFieldsTimeZone ?? null;
1639
+ }
1640
+ get datesInUnknownTimezone() {
1641
+ return this._layer.datesInUnknownTimezone;
1642
+ }
1643
+ get editFieldsInfo() {
1644
+ return this._layer.editFieldsInfo ?? null;
1645
+ }
1646
+ get timeInfo() {
1647
+ return this._layer.timeInfo ?? null;
1648
+ }
1649
+ async getFeatureSetInfo() {
1650
+ var a, r;
1651
+ if (this.fsetInfo)
1652
+ return this.fsetInfo;
1653
+ let e = null, { parsedUrl: { path: t }, serviceItemId: i = null } = this._layer;
1654
+ if (t) {
1655
+ const n = await B(t, { responseType: "json", query: { f: "json" } });
1656
+ e = ((a = n == null ? void 0 : n.data) == null ? void 0 : a.name) ?? null, i = ((r = n == null ? void 0 : n.data) == null ? void 0 : r.serviceItemId) ?? null;
1657
+ }
1658
+ const s = this._layer.title && (this._layer.parent ?? null) !== null;
1659
+ return this.featureSetInfo = { layerId: this._layer.layerId, layerName: e === "" ? null : e, itemId: i === "" ? null : i, serviceLayerUrl: t === "" ? null : t, webMapLayerId: s ? this._layer.id ?? null : null, webMapLayerTitle: s ? this._layer.title ?? null : null, className: null, objectClassId: null }, this.fsetInfo;
1660
+ }
1661
+ }
1662
+ class oe extends E {
1663
+ constructor(e) {
1664
+ super(e), this.declaredClass = "esri.arcade.featureset.sources.FeatureLayerMemory", this._removeGeometry = !1, this._overrideFields = null, this._forceIsTable = !1, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, e.isTable === !0 && (this._forceIsTable = !0), e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1665
+ }
1666
+ _maxQueryRate() {
1667
+ return ne;
1668
+ }
1669
+ end() {
1670
+ return this._layer;
1671
+ }
1672
+ optimisePagingFeatureQueries() {
1673
+ }
1674
+ async loadImpl() {
1675
+ return this._layer.loaded === !0 ? (this._initialiseFeatureSet(), this) : (await this._layer.load(), this._initialiseFeatureSet(), this);
1676
+ }
1677
+ get gdbVersion() {
1678
+ return "";
1679
+ }
1680
+ _initialiseFeatureSet() {
1681
+ var e, t, i, s, a, r;
1682
+ if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._layer.geometryType, this.fields = this._layer.fields.slice(0), this._overrideFields !== null)
1683
+ if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1684
+ this._overrideFields = null;
1685
+ else {
1686
+ const n = [], l = [];
1687
+ for (const u of this.fields)
1688
+ if (u.type === "oid")
1689
+ n.push(u), l.push(u.name);
1690
+ else
1691
+ for (const o of this._overrideFields)
1692
+ if (o.toLowerCase() === u.name.toLowerCase()) {
1693
+ n.push(u), l.push(u.name);
1694
+ break;
1695
+ }
1696
+ this.fields = n, this._overrideFields = l;
1697
+ }
1698
+ this.objectIdField = this._layer.objectIdField;
1699
+ for (const n of this.fields)
1700
+ n.type === "global-id" && (this.globalIdField = n.name);
1701
+ this._databaseType = x.Standardised, this.hasZ = ((i = (t = (e = this._layer) == null ? void 0 : e.capabilities) == null ? void 0 : t.data) == null ? void 0 : i.supportsZ) === !0, this.hasM = ((r = (a = (s = this._layer) == null ? void 0 : s.capabilities) == null ? void 0 : a.data) == null ? void 0 : r.supportsM) === !0, this._layer instanceof Le ? (this.subtypeField = this._layer.subtypeField ?? "", this.subtypes = this._layer.subtypes, this.types = null, this.typeIdField = null) : (this.typeIdField = this._layer.typeIdField ?? "", this.types = this._layer.types, this.subtypeField = this._layer.subtypeField, this.subtypes = this._layer.subtypes);
1702
+ }
1703
+ isTable() {
1704
+ return this._forceIsTable || this._layer.isTable || this._layer.type === "table" || !this._layer.geometryType;
1705
+ }
1706
+ _isInFeatureSet() {
1707
+ return I.InFeatureSet;
1708
+ }
1709
+ _candidateIdTransform(e) {
1710
+ return e;
1711
+ }
1712
+ async _getSet(e) {
1713
+ if (this._wset === null) {
1714
+ await this._ensureLoaded();
1715
+ const t = await this._getFilteredSet("", null, null, null, e);
1716
+ return this._wset = t, t;
1717
+ }
1718
+ return this._wset;
1719
+ }
1720
+ _changeFeature(e) {
1721
+ const t = {};
1722
+ for (const i of this.fields)
1723
+ t[i.name] = e.attributes[i.name];
1724
+ return new G({ geometry: this._removeGeometry === !0 ? null : e.geometry, attributes: t });
1725
+ }
1726
+ async _getFilteredSet(e, t, i, s, a) {
1727
+ let r = "", n = !1;
1728
+ if (s !== null && (r = s.constructClause(), n = !0), this.isTable() && t && e !== null && e !== "")
1729
+ return new _([], [], !0, null);
1730
+ const l = new N();
1731
+ l.returnZ = this.hasZ, l.returnM = this.hasM, l.where = i === null ? t === null ? "1=1" : "" : k(i, x.Standardised), l.spatialRelationship = this._makeRelationshipEnum(e), l.outSpatialReference = this.spatialReference, l.orderByFields = r !== "" ? r.split(",") : null, l.geometry = t === null ? null : t, l.returnGeometry = !0, l.relationParameter = this._makeRelationshipParam(e);
1732
+ const u = await this._layer.queryFeatures(l);
1733
+ if (u === null)
1734
+ return new _([], [], n, null);
1735
+ this._checkCancelled(a);
1736
+ const o = [];
1737
+ return u.features.forEach((d) => {
1738
+ const c = d.attributes[this._layer.objectIdField];
1739
+ o.push(c), this._featureCache[c] = this._changeFeature(d);
1740
+ }), new _([], o, n, null);
1741
+ }
1742
+ _makeRelationshipEnum(e) {
1743
+ if (e.includes("esriSpatialRelRelation"))
1744
+ return "relation";
1745
+ switch (e) {
1746
+ case "esriSpatialRelRelation":
1747
+ return "relation";
1748
+ case "esriSpatialRelIntersects":
1749
+ return "intersects";
1750
+ case "esriSpatialRelContains":
1751
+ return "contains";
1752
+ case "esriSpatialRelOverlaps":
1753
+ return "overlaps";
1754
+ case "esriSpatialRelWithin":
1755
+ return "within";
1756
+ case "esriSpatialRelTouches":
1757
+ return "touches";
1758
+ case "esriSpatialRelCrosses":
1759
+ return "crosses";
1760
+ case "esriSpatialRelEnvelopeIntersects":
1761
+ return "envelope-intersects";
1762
+ }
1763
+ return e;
1764
+ }
1765
+ _makeRelationshipParam(e) {
1766
+ return e.includes("esriSpatialRelRelation") ? e.split(":")[1] : "";
1767
+ }
1768
+ async _queryAllFeatures() {
1769
+ if (this._wset)
1770
+ return this._wset;
1771
+ const e = new N();
1772
+ if (e.where = "1=1", await this._ensureLoaded(), this._layer.source && this._layer.source.items) {
1773
+ const s = [];
1774
+ return this._layer.source.items.forEach((a) => {
1775
+ const r = a.attributes[this._layer.objectIdField];
1776
+ s.push(r), this._featureCache[r] = this._changeFeature(a);
1777
+ }), this._wset = new _([], s, !1, null), this._wset;
1778
+ }
1779
+ e.returnZ = this.hasZ, e.returnM = this.hasM;
1780
+ const t = await this._layer.queryFeatures(e), i = [];
1781
+ return t.features.forEach((s) => {
1782
+ const a = s.attributes[this._layer.objectIdField];
1783
+ i.push(a), this._featureCache[a] = this._changeFeature(s);
1784
+ }), this._wset = new _([], i, !1, null), this._wset;
1785
+ }
1786
+ async _getFeatures(e, t, i) {
1787
+ const s = [];
1788
+ t !== -1 && this._featureCache[t] === void 0 && s.push(t);
1789
+ for (let a = e._lastFetchedIndex; a < e._known.length && (e._lastFetchedIndex += 1, !(this._featureCache[e._known[a]] === void 0 && (e._known[a] !== t && s.push(e._known[a]), s.length > i))); a++)
1790
+ ;
1791
+ if (s.length === 0)
1792
+ return "success";
1793
+ throw new D(T.MissingFeatures);
1794
+ }
1795
+ async _refineSetBlock(e) {
1796
+ return e;
1797
+ }
1798
+ async _stat() {
1799
+ return { calculated: !1 };
1800
+ }
1801
+ async _canDoAggregates() {
1802
+ return !1;
1803
+ }
1804
+ relationshipMetaData() {
1805
+ return [];
1806
+ }
1807
+ static _cloneAttr(e) {
1808
+ const t = {};
1809
+ for (const i in e)
1810
+ t[i] = e[i];
1811
+ return t;
1812
+ }
1813
+ nativeCapabilities() {
1814
+ return { title: this._layer.title ?? "", canQueryRelated: !1, source: this, capabilities: this._layer.capabilities, databaseType: this._databaseType, requestStandardised: !0 };
1815
+ }
1816
+ static create(e, t) {
1817
+ var y, g, b, S, p, w;
1818
+ let i = e.layerDefinition.objectIdField;
1819
+ const s = e.layerDefinition.typeIdField ?? "", a = [];
1820
+ if (e.layerDefinition.types)
1821
+ for (const C of e.layerDefinition.types)
1822
+ a.push(mt.fromJSON(C));
1823
+ let r = e.layerDefinition.geometryType;
1824
+ r === void 0 && (r = e.featureSet.geometryType || "");
1825
+ let n = e.featureSet.features;
1826
+ const l = t.toJSON();
1827
+ if (!i) {
1828
+ let C = !1;
1829
+ for (const P of e.layerDefinition.fields)
1830
+ if (P.type === "oid" || P.type === "esriFieldTypeOID") {
1831
+ i = P.name, C = !0;
1832
+ break;
1833
+ }
1834
+ if (C === !1) {
1835
+ let P = "FID", he = !0, ce = 0;
1836
+ for (; he; ) {
1837
+ let q = !0;
1838
+ for (const Ge of e.layerDefinition.fields)
1839
+ if (Ge.name === P) {
1840
+ q = !1;
1841
+ break;
1842
+ }
1843
+ q === !0 ? he = !1 : (ce++, P = "FID" + ce.toString());
1844
+ }
1845
+ e.layerDefinition.fields.push({ type: "esriFieldTypeOID", name: P, alias: P });
1846
+ const K = [];
1847
+ for (let q = 0; q < n.length; q++)
1848
+ K.push({ geometry: e.featureSet.features[q].geometry, attributes: e.featureSet.features[q].attributes ? this._cloneAttr(e.featureSet.features[q].attributes) : {} }), K[q].attributes[P] = q;
1849
+ n = K, i = P;
1850
+ }
1851
+ }
1852
+ const u = [];
1853
+ for (const C of e.layerDefinition.fields)
1854
+ C instanceof M ? u.push(C) : u.push(M.fromJSON(C));
1855
+ let o = r;
1856
+ switch (o || (o = ""), o) {
1857
+ case "esriGeometryPoint":
1858
+ o = "point";
1859
+ break;
1860
+ case "esriGeometryPolyline":
1861
+ o = "polyline";
1862
+ break;
1863
+ case "esriGeometryPolygon":
1864
+ o = "polygon";
1865
+ break;
1866
+ case "esriGeometryEnvelope":
1867
+ o = "extent";
1868
+ break;
1869
+ case "esriGeometryMultipoint":
1870
+ o = "multipoint";
1871
+ break;
1872
+ case "":
1873
+ case "esriGeometryNull":
1874
+ o = "esriGeometryNull";
1875
+ }
1876
+ if (o !== "esriGeometryNull")
1877
+ for (const C of n)
1878
+ C.geometry && !(C.geometry instanceof ze) && (C.geometry.type = o, C.geometry.spatialReference === void 0 && (C.geometry.spatialReference = l));
1879
+ else
1880
+ for (const C of n)
1881
+ C.geometry && (C.geometry = null);
1882
+ const d = { outFields: ["*"], source: n, fields: u, hasZ: ((y = e == null ? void 0 : e.layerDefinition) == null ? void 0 : y.hasZ) === !0 || ((g = e == null ? void 0 : e.featureSet) == null ? void 0 : g.hasZ) === !0, hasM: ((b = e == null ? void 0 : e.layerDefinition) == null ? void 0 : b.hasM) === !0 || ((S = e == null ? void 0 : e.featureSet) == null ? void 0 : S.hasM) === !0, types: a, typeIdField: s, objectIdField: i, spatialReference: t }, c = o === "esriGeometryNull" || o === null;
1883
+ c || (d.geometryType = o);
1884
+ const f = new v(d);
1885
+ return (p = e == null ? void 0 : e.layerDefinition) != null && p.subtypeField && ((w = e == null ? void 0 : e.layerDefinition) != null && w.subtypes) && f.read({ subtypes: e.layerDefinition.subtypes, subtypeField: e.layerDefinition.subtypeField }), new oe({ layer: f, spatialReference: t, isTable: c });
1886
+ }
1887
+ async queryAttachments() {
1888
+ return [];
1889
+ }
1890
+ async getFeatureByObjectId(e) {
1891
+ const t = new N();
1892
+ t.where = this.objectIdField + "=" + e.toString(), t.returnZ = this.hasZ, t.returnM = this.hasM;
1893
+ const i = await this._layer.queryFeatures(t);
1894
+ return i.features.length === 1 ? i.features[0] : null;
1895
+ }
1896
+ async getOwningSystemUrl() {
1897
+ return "";
1898
+ }
1899
+ async getIdentityUser() {
1900
+ return "";
1901
+ }
1902
+ get preferredTimeZone() {
1903
+ return this._layer.preferredTimeZone ?? null;
1904
+ }
1905
+ get dateFieldsTimeZone() {
1906
+ return this._layer.dateFieldsTimeZone ?? null;
1907
+ }
1908
+ get datesInUnknownTimezone() {
1909
+ var e;
1910
+ return (e = this._layer) == null ? void 0 : e.datesInUnknownTimezone;
1911
+ }
1912
+ get editFieldsInfo() {
1913
+ var e;
1914
+ return (e = this._layer) == null ? void 0 : e.editFieldsInfo;
1915
+ }
1916
+ get timeInfo() {
1917
+ var e;
1918
+ return (e = this._layer) == null ? void 0 : e.timeInfo;
1919
+ }
1920
+ async getFeatureSetInfo() {
1921
+ const e = this._layer.title && this._layer.parent;
1922
+ return this.fsetInfo ?? { layerId: null, layerName: null, itemId: null, serviceLayerUrl: null, webMapLayerId: e ? this._layer.id ?? null : null, webMapLayerTitle: e ? this._layer.title ?? null : null, className: null, objectClassId: null };
1923
+ }
1924
+ }
1925
+ class Nt extends E {
1926
+ constructor(e) {
1927
+ super(e), this.declaredClass = "esri.arcade.featureset.sources.FeatureLayerRelated", this._findObjectId = -1, this._requestStandardised = !1, this._removeGeometry = !1, this._overrideFields = null, this.featureObjectId = null, e.spatialReference && (this.spatialReference = e.spatialReference), this._transparent = !0, this._maxProcessing = 1e3, this._layer = e.layer, this._wset = null, this._findObjectId = e.objectId, this.featureObjectId = e.objectId, this.relationship = e.relationship, this._relatedLayer = e.relatedLayer, e.outFields !== void 0 && (this._overrideFields = e.outFields), e.includeGeometry !== void 0 && (this._removeGeometry = e.includeGeometry === !1);
1928
+ }
1929
+ _maxQueryRate() {
1930
+ return ne;
1931
+ }
1932
+ end() {
1933
+ return this._layer;
1934
+ }
1935
+ optimisePagingFeatureQueries() {
1936
+ }
1937
+ async loadImpl() {
1938
+ var e;
1939
+ return await Promise.all([this._layer.load(), (e = this._relatedLayer) == null ? void 0 : e.load()]), this._initialiseFeatureSet(), this;
1940
+ }
1941
+ nativeCapabilities() {
1942
+ return this._relatedLayer.nativeCapabilities();
1943
+ }
1944
+ _initialiseFeatureSet() {
1945
+ if (this.spatialReference == null && (this.spatialReference = this._layer.spatialReference), this.geometryType = this._relatedLayer.geometryType, this.fields = this._relatedLayer.fields.slice(0), this.hasZ = this._relatedLayer.hasZ, this.hasM = this._relatedLayer.hasM, this._overrideFields !== null)
1946
+ if (this._overrideFields.length === 1 && this._overrideFields[0] === "*")
1947
+ this._overrideFields = null;
1948
+ else {
1949
+ const t = [], i = [];
1950
+ for (const s of this.fields)
1951
+ if (s.type === "oid")
1952
+ t.push(s), i.push(s.name);
1953
+ else
1954
+ for (const a of this._overrideFields)
1955
+ if (a.toLowerCase() === s.name.toLowerCase()) {
1956
+ t.push(s), i.push(s.name);
1957
+ break;
1958
+ }
1959
+ this.fields = t, this._overrideFields = i;
1960
+ }
1961
+ const e = this._layer.nativeCapabilities();
1962
+ e && (this._databaseType = e.databaseType, this._requestStandardised = e.requestStandardised), this.objectIdField = this._relatedLayer.objectIdField, this.globalIdField = this._relatedLayer.globalIdField, this.hasM = this._relatedLayer.supportsM, this.hasZ = this._relatedLayer.supportsZ, this.typeIdField = this._relatedLayer.typeIdField, this.types = this._relatedLayer.types, this.subtypeField = this._relatedLayer.subtypeField, this.subtypes = this._relatedLayer.subtypes;
1963
+ }
1964
+ async databaseType() {
1965
+ return await this._relatedLayer.databaseType(), this._databaseType = this._relatedLayer._databaseType, this._databaseType;
1966
+ }
1967
+ isTable() {
1968
+ return this._relatedLayer.isTable();
1969
+ }
1970
+ _isInFeatureSet() {
1971
+ return I.InFeatureSet;
1972
+ }
1973
+ _candidateIdTransform(e) {
1974
+ return e;
1975
+ }
1976
+ async _getSet(e) {
1977
+ if (this._wset === null) {
1978
+ await this._ensureLoaded();
1979
+ const t = await this._getFilteredSet("", null, null, null, e);
1980
+ return this._wset = t, t;
1981
+ }
1982
+ return this._wset;
1983
+ }
1984
+ _changeFeature(e) {
1985
+ const t = {};
1986
+ for (const i of this.fields)
1987
+ t[i.name] = e.attributes[i.name];
1988
+ return new G({ geometry: this._removeGeometry === !0 ? null : e.geometry, attributes: t });
1989
+ }
1990
+ async _getFilteredSet(e, t, i, s, a) {
1991
+ var S, p;
1992
+ if (await this.databaseType(), this.isTable() && t && e !== null && e !== "")
1993
+ return new _([], [], !0, null);
1994
+ const r = this._layer.nativeCapabilities();
1995
+ if (r.canQueryRelated === !1)
1996
+ return new _([], [], !0, null);
1997
+ if ((S = r.capabilities) != null && S.queryRelated && r.capabilities.queryRelated.supportsPagination)
1998
+ return this._getFilteredSetUsingPaging(e, t, i, s, a);
1999
+ let n = "", l = !1;
2000
+ s !== null && ((p = r.capabilities) != null && p.queryRelated) && r.capabilities.queryRelated.supportsOrderBy === !0 && (n = s.constructClause(), l = !0);
2001
+ const u = new Te();
2002
+ u.objectIds = [this._findObjectId];
2003
+ const o = this._overrideFields !== null ? this._overrideFields : this._fieldsIncludingObjectId(this._relatedLayer.fields ? this._relatedLayer.fields.map((w) => w.name) : ["*"]);
2004
+ u.outFields = o, u.relationshipId = this.relationship.id, u.where = "1=1";
2005
+ let d = !0;
2006
+ this._removeGeometry === !0 && (d = !1), u.returnGeometry = d, this._requestStandardised && (u.sqlFormat = "standard"), u.outSpatialReference = this.spatialReference, u.orderByFields = n !== "" ? n.split(",") : null;
2007
+ const c = await r.source.queryRelatedFeatures(u);
2008
+ this._checkCancelled(a);
2009
+ const f = c[this._findObjectId] ? c[this._findObjectId].features : [], y = [];
2010
+ for (let w = 0; w < f.length; w++)
2011
+ this._featureCache[f[w].attributes[this._relatedLayer.objectIdField]] = f[w], y.push(f[w].attributes[this._relatedLayer.objectIdField]);
2012
+ const g = t && e !== null && e !== "", b = i != null;
2013
+ return new _(g || b ? y : [], g || b ? [] : y, l, null);
2014
+ }
2015
+ _fieldsIncludingObjectId(e) {
2016
+ if (e === null)
2017
+ return [this.objectIdField];
2018
+ const t = e.slice(0);
2019
+ if (t.includes("*"))
2020
+ return t;
2021
+ let i = !1;
2022
+ for (const s of t)
2023
+ if (s.toUpperCase() === this.objectIdField.toUpperCase()) {
2024
+ i = !0;
2025
+ break;
2026
+ }
2027
+ return i === !1 && t.push(this.objectIdField), t;
2028
+ }
2029
+ async _getFilteredSetUsingPaging(e, t, i, s, a) {
2030
+ var S, p;
2031
+ let r = "", n = !1;
2032
+ const l = this._layer.nativeCapabilities();
2033
+ s !== null && ((S = l == null ? void 0 : l.capabilities) != null && S.queryRelated) && l.capabilities.queryRelated.supportsOrderBy === !0 && (r = s.constructClause(), n = !0), await this.databaseType();
2034
+ const u = "1=1";
2035
+ let o = this._maxQueryRate();
2036
+ const d = (p = l.capabilities) == null ? void 0 : p.query.maxRecordCount;
2037
+ d != null && d < o && (o = d);
2038
+ const c = t && e !== null && e !== "", f = i != null;
2039
+ let y = null, g = !0;
2040
+ this._removeGeometry === !0 && (g = !1);
2041
+ const b = this._overrideFields !== null ? this._overrideFields : this._fieldsIncludingObjectId(this._relatedLayer.fields ? this._relatedLayer.fields.map((w) => w.name) : ["*"]);
2042
+ return y = new _(c || f ? ["GETPAGES"] : [], c || f ? [] : ["GETPAGES"], n, { outFields: b.join(","), resultRecordCount: o, resultOffset: 0, objectIds: [this._findObjectId], where: u, orderByFields: r, returnGeometry: g, returnIdsOnly: "false", internal: { set: [], lastRetrieved: 0, lastPage: 0, fullyResolved: !1 } }), await this._expandPagedSet(y, o, 0, 0, a), y;
2043
+ }
2044
+ _expandPagedSet(e, t, i, s, a) {
2045
+ return this._expandPagedSetFeatureSet(e, t, i, s, a);
2046
+ }
2047
+ _clonePageDefinition(e) {
2048
+ return e === null ? null : e.groupbypage !== !0 ? { groupbypage: !1, outFields: e.outFields, resultRecordCount: e.resultRecordCount, resultOffset: e.resultOffset, where: e.where, objectIds: e.objectIds, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal } : { groupbypage: !0, outFields: e.outFields, resultRecordCount: e.resultRecordCount, useOIDpagination: e.useOIDpagination, generatedOid: e.generatedOid, groupByFieldsForStatistics: e.groupByFieldsForStatistics, resultOffset: e.resultOffset, outStatistics: e.outStatistics, geometry: e.geometry, where: e.where, objectIds: e.objectIds, orderByFields: e.orderByFields, returnGeometry: e.returnGeometry, returnIdsOnly: e.returnIdsOnly, internal: e.internal };
2049
+ }
2050
+ async _getPhysicalPage(e, t, i) {
2051
+ const s = e.pagesDefinition.internal.lastRetrieved, a = s, r = e.pagesDefinition.internal.lastPage, n = this._layer.nativeCapabilities(), l = new Te();
2052
+ this._requestStandardised === !0 && (l.sqlFormat = "standard"), l.relationshipId = this.relationship.id, l.objectIds = e.pagesDefinition.objectIds, l.resultOffset = e.pagesDefinition.internal.lastPage, l.resultRecordCount = e.pagesDefinition.resultRecordCount, l.outFields = e.pagesDefinition.outFields.split(","), l.where = e.pagesDefinition.where, l.orderByFields = e.pagesDefinition.orderByFields !== "" ? e.pagesDefinition.orderByFields.split(",") : null, l.returnGeometry = e.pagesDefinition.returnGeometry, l.outSpatialReference = this.spatialReference;
2053
+ const u = await n.source.queryRelatedFeatures(l);
2054
+ if (this._checkCancelled(i), e.pagesDefinition.internal.lastPage !== r)
2055
+ return 0;
2056
+ const o = u[this._findObjectId] ? u[this._findObjectId].features : [];
2057
+ for (let c = 0; c < o.length; c++)
2058
+ e.pagesDefinition.internal.set[a + c] = o[c].attributes[this._relatedLayer.objectIdField];
2059
+ for (let c = 0; c < o.length; c++)
2060
+ this._featureCache[o[c].attributes[this._relatedLayer.objectIdField]] = o[c];
2061
+ const d = !u[this._findObjectId] || u[this._findObjectId].exceededTransferLimit === !1;
2062
+ return o.length !== e.pagesDefinition.resultRecordCount && d && (e.pagesDefinition.internal.fullyResolved = !0), e.pagesDefinition.internal.lastRetrieved = s + o.length, e.pagesDefinition.internal.lastPage += e.pagesDefinition.resultRecordCount, o.length;
2063
+ }
2064
+ async _getFeatures(e, t, i, s) {
2065
+ const a = [];
2066
+ t !== -1 && this._featureCache[t] === void 0 && a.push(t);
2067
+ const r = this._maxQueryRate();
2068
+ if (this._checkIfNeedToExpandKnownPage(e, r) === !0)
2069
+ return await this._expandPagedSet(e, r, 0, 0, s), this._getFeatures(e, t, i, s);
2070
+ let n = 0;
2071
+ for (let l = e._lastFetchedIndex; l < e._known.length && (n++, n <= i && (e._lastFetchedIndex += 1), !(e._known[l] !== "GETPAGES" && this._featureCache[e._known[l]] === void 0 && (e._known[l] !== t && a.push(e._known[l]), a.length > i))) && !(n >= i && a.length === 0); l++)
2072
+ ;
2073
+ if (a.length === 0)
2074
+ return "success";
2075
+ throw new D(T.MissingFeatures);
2076
+ }
2077
+ async _refineSetBlock(e, t, i) {
2078
+ return e;
2079
+ }
2080
+ async _stat(e, t, i, s, a, r, n) {
2081
+ return { calculated: !1 };
2082
+ }
2083
+ get gdbVersion() {
2084
+ return this._relatedLayer.gdbVersion;
2085
+ }
2086
+ async _canDoAggregates(e, t, i, s, a) {
2087
+ return !1;
2088
+ }
2089
+ relationshipMetaData() {
2090
+ return this._relatedLayer.relationshipMetaData();
2091
+ }
2092
+ serviceUrl() {
2093
+ return this._relatedLayer.serviceUrl();
2094
+ }
2095
+ queryAttachments(e, t, i, s, a) {
2096
+ return this._relatedLayer.queryAttachments(e, t, i, s, a);
2097
+ }
2098
+ getFeatureByObjectId(e, t) {
2099
+ return this._relatedLayer.getFeatureByObjectId(e, t);
2100
+ }
2101
+ getOwningSystemUrl() {
2102
+ return this._relatedLayer.getOwningSystemUrl();
2103
+ }
2104
+ getIdentityUser() {
2105
+ return this._relatedLayer.getIdentityUser();
2106
+ }
2107
+ getDataSourceFeatureSet() {
2108
+ return this._relatedLayer;
2109
+ }
2110
+ get preferredTimeZone() {
2111
+ var e;
2112
+ return ((e = this._relatedLayer) == null ? void 0 : e.preferredTimeZone) ?? null;
2113
+ }
2114
+ get dateFieldsTimeZone() {
2115
+ var e;
2116
+ return ((e = this._relatedLayer) == null ? void 0 : e.dateFieldsTimeZone) ?? null;
2117
+ }
2118
+ get datesInUnknownTimezone() {
2119
+ var e;
2120
+ return (e = this._relatedLayer) == null ? void 0 : e.datesInUnknownTimezone;
2121
+ }
2122
+ get editFieldsInfo() {
2123
+ var e;
2124
+ return ((e = this._relatedLayer) == null ? void 0 : e.editFieldsInfo) ?? null;
2125
+ }
2126
+ get timeInfo() {
2127
+ var e;
2128
+ return ((e = this._relatedLayer) == null ? void 0 : e.timeInfo) ?? null;
2129
+ }
2130
+ async getFeatureSetInfo() {
2131
+ return this.fsetInfo ?? this._layer.featureSetInfo;
2132
+ }
2133
+ }
2134
+ function Lt() {
2135
+ m.applicationCache === null && (m.applicationCache = new m());
2136
+ }
2137
+ async function se(h, e) {
2138
+ if (m.applicationCache) {
2139
+ const t = m.applicationCache.getLayerInfo(h);
2140
+ if (t) {
2141
+ const a = await t;
2142
+ return new v({ url: h, outFields: e, sourceJSON: a });
2143
+ }
2144
+ const i = new v({ url: h, outFields: e }), s = (async () => (await i.load(), i.sourceJSON))();
2145
+ if (m.applicationCache) {
2146
+ m.applicationCache.setLayerInfo(h, s);
2147
+ try {
2148
+ return await s, i;
2149
+ } catch (a) {
2150
+ throw m.applicationCache.clearLayerInfo(h), a;
2151
+ }
2152
+ }
2153
+ return await s, i;
2154
+ }
2155
+ return new v({ url: h, outFields: e });
2156
+ }
2157
+ async function ue(h, e, t, i, s, a = null) {
2158
+ return O(await se(h, ["*"]), e, t, i, s, a);
2159
+ }
2160
+ function O(h, e = null, t = null, i = !0, s = null, a = null) {
2161
+ if (h instanceof v || V(h)) {
2162
+ const n = { layer: h, spatialReference: e, outFields: t, includeGeometry: i, lrucache: s, interceptor: a };
2163
+ return h.url || !h.source ? new z(n) : new oe(n);
2164
+ }
2165
+ const r = O(h.parent, e, t, i, s, a);
2166
+ return r.filter(R.create(h.parent.subtypeField + "=" + h.subtypeCode.toString(), h.parent.fieldsIndex, r.dateFieldsTimeZoneDefaultUTC));
2167
+ }
2168
+ async function At(h) {
2169
+ if (m.applicationCache !== null) {
2170
+ const t = m.applicationCache.getLayerInfo(h);
2171
+ if (t !== null)
2172
+ return t;
2173
+ }
2174
+ const e = (async () => {
2175
+ const t = await B(h, { responseType: "json", query: { f: "json" } });
2176
+ return t.data ? t.data : null;
2177
+ })();
2178
+ if (m.applicationCache !== null) {
2179
+ m.applicationCache.setLayerInfo(h, e);
2180
+ try {
2181
+ return await e;
2182
+ } catch (t) {
2183
+ throw m.applicationCache.clearLayerInfo(h), t;
2184
+ }
2185
+ }
2186
+ return e;
2187
+ }
2188
+ async function Ot(h, e) {
2189
+ const t = "QUERYDATAELEMTS:" + e.toString() + ":" + h;
2190
+ if (m.applicationCache !== null) {
2191
+ const s = m.applicationCache.getLayerInfo(t);
2192
+ if (s !== null)
2193
+ return s;
2194
+ }
2195
+ const i = (async () => {
2196
+ var a;
2197
+ const s = await B(h + "/queryDataElements", { method: "post", responseType: "json", query: { layers: JSON.stringify([e.toString()]), f: "json" } });
2198
+ if (s.data) {
2199
+ const r = s.data;
2200
+ if ((a = r.layerDataElements) != null && a[0])
2201
+ return r.layerDataElements[0];
2202
+ }
2203
+ throw new D(T.DataElementsNotFound);
2204
+ })();
2205
+ if (m.applicationCache !== null) {
2206
+ m.applicationCache.setLayerInfo(t, i);
2207
+ try {
2208
+ return await i;
2209
+ } catch (s) {
2210
+ throw m.applicationCache.clearLayerInfo(t), s;
2211
+ }
2212
+ }
2213
+ return i;
2214
+ }
2215
+ async function je(h) {
2216
+ if (m.applicationCache !== null) {
2217
+ const t = m.applicationCache.getLayerInfo(h);
2218
+ if (t !== null)
2219
+ return t;
2220
+ }
2221
+ const e = (async () => {
2222
+ const t = await B(h, { responseType: "json", query: { f: "json" } });
2223
+ if (t.data) {
2224
+ const i = t.data;
2225
+ return i.layers || (i.layers = []), i.tables || (i.tables = []), i;
2226
+ }
2227
+ return { layers: [], tables: [] };
2228
+ })();
2229
+ if (m.applicationCache !== null) {
2230
+ m.applicationCache.setLayerInfo(h, e);
2231
+ try {
2232
+ return await e;
2233
+ } catch (t) {
2234
+ throw m.applicationCache.clearLayerInfo(h), t;
2235
+ }
2236
+ }
2237
+ return e;
2238
+ }
2239
+ async function Et(h, e) {
2240
+ var s, a, r;
2241
+ const t = { metadata: null, networkId: -1, unVersion: 3, terminals: [], queryelem: null, layerNameLkp: {}, lkp: null }, i = await je(h);
2242
+ if (t.metadata = i, ((s = i.controllerDatasetLayers) == null ? void 0 : s.utilityNetworkLayerId) !== void 0 && i.controllerDatasetLayers.utilityNetworkLayerId !== null) {
2243
+ if (i.layers)
2244
+ for (const u of i.layers)
2245
+ t.layerNameLkp[u.id] = u.name;
2246
+ if (i.tables)
2247
+ for (const u of i.tables)
2248
+ t.layerNameLkp[u.id] = u.name;
2249
+ const n = i.controllerDatasetLayers.utilityNetworkLayerId;
2250
+ t.networkId = n;
2251
+ const l = await Ot(h, n);
2252
+ if (l) {
2253
+ t.queryelem = l, (a = t.queryelem) != null && a.dataElement && t.queryelem.dataElement.schemaGeneration !== void 0 && (t.unVersion = t.queryelem.dataElement.schemaGeneration), t.lkp = {}, t.queryelem.dataElement.domainNetworks || (t.queryelem.dataElement.domainNetworks = []);
2254
+ for (const o of t.queryelem.dataElement.domainNetworks) {
2255
+ for (const d of o.edgeSources ?? []) {
2256
+ const c = { layerId: d.layerId, sourceId: d.sourceId, className: t.layerNameLkp[d.layerId] ?? null };
2257
+ c.className && (t.lkp[c.className] = c);
2258
+ }
2259
+ for (const d of o.junctionSources ?? []) {
2260
+ const c = { layerId: d.layerId, sourceId: d.sourceId, className: t.layerNameLkp[d.layerId] ?? null };
2261
+ c.className && (t.lkp[c.className] = c);
2262
+ }
2263
+ }
2264
+ if (t.queryelem.dataElement.terminalConfigurations)
2265
+ for (const o of t.queryelem.dataElement.terminalConfigurations)
2266
+ for (const d of o.terminals)
2267
+ t.terminals.push({ terminalId: d.terminalId, terminalName: d.terminalName });
2268
+ const u = await At(h + "/" + n);
2269
+ if (((r = u.systemLayers) == null ? void 0 : r.associationsTableId) !== void 0 && u.systemLayers.associationsTableId !== null) {
2270
+ const o = [];
2271
+ t.unVersion >= 4 && (o.push("STATUS"), o.push("PERCENTALONG"));
2272
+ let d = await ue(h + "/" + u.systemLayers.associationsTableId.toString(), e, ["OBJECTID", "FROMNETWORKSOURCEID", "TONETWORKSOURCEID", "FROMGLOBALID", "TOGLOBALID", "TOTERMINALID", "FROMTERMINALID", "ASSOCIATIONTYPE", "ISCONTENTVISIBLE", "GLOBALID", ...o], !1, null, null);
2273
+ return await d.load(), t.unVersion >= 4 && (d = d.filter(R.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)", d.getFieldsIndex(), d.dateFieldsTimeZoneDefaultUTC)), await d.load()), { lkp: t.lkp, associations: d, unVersion: t.unVersion, terminals: t.terminals };
2274
+ }
2275
+ return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2276
+ }
2277
+ return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2278
+ }
2279
+ return { associations: null, unVersion: t.unVersion, lkp: null, terminals: [] };
2280
+ }
2281
+ async function Pt(h, e, t, i = null, s = null, a = !0, r = null, n = null) {
2282
+ let l = h.serviceUrl();
2283
+ if (!l)
2284
+ return null;
2285
+ l = l.charAt(l.length - 1) === "/" ? l + e.relatedTableId.toString() : l + "/" + e.relatedTableId.toString();
2286
+ const u = await ue(l, i, s, a, r, n);
2287
+ return new Nt({ layer: h, relatedLayer: u, relationship: e, objectId: t, spatialReference: i, outFields: s, includeGeometry: a, lrucache: r, interceptor: n });
2288
+ }
2289
+ Oe.registerAction(), Dt.registerAction(), te.registerAction(), ot.registerAction(), le.registerAction();
2290
+ class qt extends Ae {
2291
+ constructor(e, t = null, i = null, s = null) {
2292
+ super(), this._map = e, this._overridespref = t, this._lrucache = i, this._interceptor = s, this._instantLayers = [];
2293
+ }
2294
+ _makeAndAddFeatureSet(e, t = !0, i = null) {
2295
+ const s = O(e, this._overridespref, i === null ? ["*"] : i, t, this._lrucache, this._interceptor);
2296
+ return this._instantLayers.push({ featureset: s, opitem: e, includeGeometry: t, outFields: JSON.stringify(i) }), s;
2297
+ }
2298
+ async featureSetByName(e, t = !0, i = null) {
2299
+ if (this._map.loaded !== void 0 && this._map.load !== void 0 && this._map.loaded === !1)
2300
+ return await this._map.load(), this.featureSetByName(e, t, i);
2301
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2302
+ const s = JSON.stringify(i);
2303
+ for (let r = 0; r < this._instantLayers.length; r++) {
2304
+ const n = this._instantLayers[r];
2305
+ if (n.opitem.title === e && n.includeGeometry === t && n.outFields === s)
2306
+ return this._instantLayers[r].featureset;
2307
+ }
2308
+ const a = this._map.allLayers.find((r) => {
2309
+ if (r instanceof v) {
2310
+ if (r.title === e)
2311
+ return !0;
2312
+ } else if (V(r) && r.title === e)
2313
+ return !0;
2314
+ return !1;
2315
+ });
2316
+ if (a)
2317
+ return this._makeAndAddFeatureSet(a, t, i);
2318
+ if (this._map.tables) {
2319
+ const r = this._map.tables.find((n) => !!(n.title && n.title === e || n.title && n.title === e));
2320
+ if (r) {
2321
+ if (r instanceof v)
2322
+ return this._makeAndAddFeatureSet(r, t, i);
2323
+ if (!r._materializedTable) {
2324
+ const n = r.outFields ? r : { ...r, outFields: ["*"] };
2325
+ r._materializedTable = new v(n);
2326
+ }
2327
+ return await r._materializedTable.load(), this._makeAndAddFeatureSet(r._materializedTable, t, i);
2328
+ }
2329
+ }
2330
+ return null;
2331
+ }
2332
+ async featureSetById(e, t = !0, i = ["*"]) {
2333
+ if (this._map.loaded !== void 0 && this._map.load !== void 0 && this._map.loaded === !1)
2334
+ return await this._map.load(), this.featureSetById(e, t, i);
2335
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2336
+ const s = JSON.stringify(i);
2337
+ for (let r = 0; r < this._instantLayers.length; r++) {
2338
+ const n = this._instantLayers[r];
2339
+ if (n.opitem.id === e && n.includeGeometry === t && n.outFields === s)
2340
+ return this._instantLayers[r].featureset;
2341
+ }
2342
+ const a = this._map.allLayers.find((r) => {
2343
+ if (r instanceof v) {
2344
+ if (r.id === e)
2345
+ return !0;
2346
+ } else if (V(r) && r.id === e)
2347
+ return !0;
2348
+ return !1;
2349
+ });
2350
+ if (a)
2351
+ return this._makeAndAddFeatureSet(a, t, i);
2352
+ if (this._map.tables) {
2353
+ const r = this._map.tables.find((n) => n.id === e);
2354
+ if (r) {
2355
+ if (r instanceof v)
2356
+ return this._makeAndAddFeatureSet(r, t, i);
2357
+ if (!r._materializedTable) {
2358
+ const n = { ...r, outFields: ["*"] };
2359
+ r._materializedTable = new v(n);
2360
+ }
2361
+ return await r._materializedTable.load(), this._makeAndAddFeatureSet(r._materializedTable, t, i);
2362
+ }
2363
+ }
2364
+ return null;
2365
+ }
2366
+ }
2367
+ class de extends Ae {
2368
+ constructor(e, t = null, i = null, s = null) {
2369
+ super(), this._url = e, this._overridespref = t, this._lrucache = i, this._interceptor = s, this.metadata = null, this._instantLayers = [];
2370
+ }
2371
+ get url() {
2372
+ return this._url;
2373
+ }
2374
+ _makeAndAddFeatureSet(e, t = !0, i = null) {
2375
+ const s = O(e, this._overridespref, i === null ? ["*"] : i, t, this._lrucache);
2376
+ return this._instantLayers.push({ featureset: s, opitem: e, includeGeometry: t, outFields: JSON.stringify(i) }), s;
2377
+ }
2378
+ async _loadMetaData() {
2379
+ const e = await je(this._url);
2380
+ return this.metadata = e, e;
2381
+ }
2382
+ load() {
2383
+ return this._loadMetaData();
2384
+ }
2385
+ clone() {
2386
+ return new de(this._url, this._overridespref, this._lrucache, this._interceptor);
2387
+ }
2388
+ async featureSetByName(e, t = !0, i = null) {
2389
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2390
+ const s = JSON.stringify(i);
2391
+ for (let n = 0; n < this._instantLayers.length; n++) {
2392
+ const l = this._instantLayers[n];
2393
+ if (l.opitem.title === e && l.includeGeometry === t && l.outFields === s)
2394
+ return this._instantLayers[n].featureset;
2395
+ }
2396
+ const a = await this._loadMetaData();
2397
+ let r = null;
2398
+ for (const n of a.layers ?? [])
2399
+ n.name === e && (r = n);
2400
+ if (!r)
2401
+ for (const n of a.tables ?? [])
2402
+ n.name === e && (r = n);
2403
+ if (r) {
2404
+ const n = await se(this._url + "/" + r.id, ["*"]);
2405
+ return this._makeAndAddFeatureSet(n, t, i);
2406
+ }
2407
+ return null;
2408
+ }
2409
+ async featureSetById(e, t = !0, i = ["*"]) {
2410
+ i === null && (i = ["*"]), i = (i = i.slice(0)).sort();
2411
+ const s = JSON.stringify(i);
2412
+ e = e != null ? e.toString() : "";
2413
+ for (let n = 0; n < this._instantLayers.length; n++) {
2414
+ const l = this._instantLayers[n];
2415
+ if (l.opitem.id === e && l.includeGeometry === t && l.outFields === s)
2416
+ return this._instantLayers[n].featureset;
2417
+ }
2418
+ const a = await this._loadMetaData();
2419
+ let r = null;
2420
+ for (const n of a.layers ?? [])
2421
+ n.id !== null && n.id !== void 0 && n.id.toString() === e && (r = n);
2422
+ if (!r)
2423
+ for (const n of a.tables ?? [])
2424
+ n.id !== null && n.id !== void 0 && n.id.toString() === e && (r = n);
2425
+ if (r) {
2426
+ const n = await se(this._url + "/" + r.id, ["*"]);
2427
+ return this._makeAndAddFeatureSet(n, t, i);
2428
+ }
2429
+ return null;
2430
+ }
2431
+ }
2432
+ function jt(h, e, t = null, i = null) {
2433
+ return new qt(h, e, t, i);
2434
+ }
2435
+ function Gt(h, e, t = null, i = null) {
2436
+ return new de(h, e, t, i);
2437
+ }
2438
+ function Ut(h, e, t, i, s) {
2439
+ if (h === null)
2440
+ return null;
2441
+ if (h instanceof v) {
2442
+ switch (e) {
2443
+ case "datasource":
2444
+ return O(h, s, h.outFields, !0, t, i).getDataSourceFeatureSet();
2445
+ case "parent":
2446
+ case "root":
2447
+ return O(h, s, h.outFields, !0, t, i);
2448
+ }
2449
+ return null;
2450
+ }
2451
+ if (V(h)) {
2452
+ switch (e) {
2453
+ case "datasource":
2454
+ return O(h, s, h.outFields, !0, t, i).getDataSourceFeatureSet();
2455
+ case "parent":
2456
+ case "root":
2457
+ return O(h, s, h.outFields, !0, t, i);
2458
+ }
2459
+ return null;
2460
+ }
2461
+ if (et(h)) {
2462
+ switch (e) {
2463
+ case "datasource":
2464
+ return O(h.parent, s, h.parent.outFields, !0, t, i).getDataSourceFeatureSet();
2465
+ case "parent":
2466
+ case "root":
2467
+ return O(h, s, h.parent.outFields, !0, t, i);
2468
+ }
2469
+ return null;
2470
+ }
2471
+ if (h instanceof E)
2472
+ switch (e) {
2473
+ case "datasource":
2474
+ return h.getDataSourceFeatureSet();
2475
+ case "parent":
2476
+ return h;
2477
+ case "root":
2478
+ return h.getRootFeatureSet();
2479
+ }
2480
+ return null;
2481
+ }
2482
+ async function Bt(h, e, t, i, s, a, r, n = null) {
2483
+ if (m.applicationCache) {
2484
+ const u = m.applicationCache.getLayerInfo(h + ":" + a.url);
2485
+ if (u) {
2486
+ const o = await u;
2487
+ return O(new v({ url: Y(o.url) + "/" + e, outFields: ["*"] }), t, i, s, r, n);
2488
+ }
2489
+ }
2490
+ const l = new Je({ id: h, portal: a }).load();
2491
+ m.applicationCache && m.applicationCache.setLayerInfo(h + ":" + a.url, l);
2492
+ try {
2493
+ const u = await l;
2494
+ return O(new v({ url: Y(u.url ?? "") + "/" + e, outFields: ["*"] }), t, i, s, r, n);
2495
+ } catch (u) {
2496
+ throw m.applicationCache && m.applicationCache.clearLayerInfo(h + ":" + a.url), u;
2497
+ }
2498
+ }
2499
+ const ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2500
+ __proto__: null,
2501
+ constructAssociationMetaDataFeatureSetFromUrl: Et,
2502
+ constructFeatureSet: O,
2503
+ constructFeatureSetFromPortalItem: Bt,
2504
+ constructFeatureSetFromRelationship: Pt,
2505
+ constructFeatureSetFromUrl: ue,
2506
+ convertToFeatureSet: Ut,
2507
+ createFeatureSetCollectionFromMap: jt,
2508
+ createFeatureSetCollectionFromService: Gt,
2509
+ initialiseMetaDataCache: Lt
2510
+ }, Symbol.toStringTag, { value: "Module" }));
2511
+ export {
2512
+ Et as A,
2513
+ St as B,
2514
+ ue as F,
2515
+ ee as I,
2516
+ bt as L,
2517
+ W as a,
2518
+ te as b,
2519
+ Oe as c,
2520
+ le as d,
2521
+ Ae as e,
2522
+ oe as f,
2523
+ O as g,
2524
+ Ft as h,
2525
+ wt as i,
2526
+ Ut as j,
2527
+ Pt as k,
2528
+ ci as l,
2529
+ Bt as q
2530
+ };