@arcgis/core 5.2.0-next.113 → 5.2.0-next.115

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 (233) hide show
  1. package/Graphic.d.ts +5 -3
  2. package/Ground.d.ts +5 -4
  3. package/applications/Urban/LineImagePattern3D.js +1 -1
  4. package/arcgisGlobal.d.ts +2 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/02f94f9d704f03ddb5c6.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c517e732cab41093b2e0.js → 0312c40d94b248ad71e3.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0463c807b37f01bbc35c.js +1 -0
  9. package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +1 -0
  10. package/assets/esri/core/workers/chunks/2e0fd0536408053ac6f5.js +1 -0
  11. package/assets/esri/core/workers/chunks/{6b264006b96cbf93d8ed.js → 48d3da636be15581fd7d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/515fe302743c0b46f7e0.js +1 -0
  13. package/assets/esri/core/workers/chunks/{982a396bd4fffa62e911.js → 526cc64ae46dec3fbeda.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{d13cf2e8b24e978ea77c.js → 7243d5721bb6a7329055.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{785206da3962ba23de16.js → 84b89c523d3e16a5ee46.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{484b3e2a220c440ccbb4.js → 9b92c41907e2da80c288.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{4d2553219ffd223b0e90.js → a774006be107e449bc29.js} +1 -1
  18. package/assets/esri/core/workers/chunks/b45ebb1b64ee7314375e.js +1 -0
  19. package/assets/esri/core/workers/chunks/{e0f417992889a6c41095.js → baa8bce361a2677533ec.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{96ebf76661b12128ddd5.js → be4de7111bc21bc69de1.js} +1 -1
  21. package/assets/esri/core/workers/chunks/f18ee2eaa96d103627a6.js +1 -0
  22. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
  23. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
  24. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
  25. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
  26. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
  27. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
  28. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
  29. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
  30. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
  31. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
  32. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
  33. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
  34. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
  35. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
  36. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
  37. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
  38. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
  39. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
  40. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
  41. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
  42. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
  43. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
  44. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
  45. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
  46. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
  47. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
  48. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
  49. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
  50. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
  51. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
  52. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
  53. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
  54. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
  55. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
  56. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
  57. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
  58. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
  59. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
  60. package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
  61. package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/messages.ja.json +1 -1
  62. package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
  63. package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.de.json +1 -1
  64. package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.ro.json +1 -1
  65. package/assets/esri/widgets/Expand/t9n/messages.id.json +1 -1
  66. package/assets/esri/widgets/Features/t9n/messages.he.json +1 -1
  67. package/assets/esri/widgets/Features/t9n/messages.uk.json +1 -1
  68. package/assets/esri/widgets/Home/t9n/messages.bs.json +1 -1
  69. package/assets/esri/widgets/Home/t9n/messages.de.json +1 -1
  70. package/assets/esri/widgets/Home/t9n/messages.et.json +1 -1
  71. package/assets/esri/widgets/Home/t9n/messages.fi.json +1 -1
  72. package/assets/esri/widgets/Home/t9n/messages.hr.json +1 -1
  73. package/assets/esri/widgets/Home/t9n/messages.hu.json +1 -1
  74. package/assets/esri/widgets/Home/t9n/messages.id.json +1 -1
  75. package/assets/esri/widgets/Home/t9n/messages.lv.json +1 -1
  76. package/assets/esri/widgets/Home/t9n/messages.nl.json +1 -1
  77. package/assets/esri/widgets/Home/t9n/messages.pt-PT.json +1 -1
  78. package/assets/esri/widgets/Home/t9n/messages.th.json +1 -1
  79. package/assets/esri/widgets/Home/t9n/messages.tr.json +1 -1
  80. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
  81. package/assets/esri/widgets/Print/t9n/messages.es.json +1 -1
  82. package/assets/esri/widgets/Print/t9n/messages.it.json +1 -1
  83. package/assets/esri/widgets/Print/t9n/messages.lt.json +1 -1
  84. package/assets/esri/widgets/Print/t9n/messages.pt-PT.json +1 -1
  85. package/assets/esri/widgets/Print/t9n/messages.sl.json +1 -1
  86. package/assets/esri/widgets/Print/t9n/messages.sr.json +1 -1
  87. package/assets/esri/widgets/Search/t9n/messages.bs.json +1 -1
  88. package/assets/esri/widgets/Search/t9n/messages.de.json +1 -1
  89. package/assets/esri/widgets/Search/t9n/messages.es.json +1 -1
  90. package/assets/esri/widgets/Search/t9n/messages.et.json +1 -1
  91. package/assets/esri/widgets/Search/t9n/messages.fi.json +1 -1
  92. package/assets/esri/widgets/Search/t9n/messages.he.json +1 -1
  93. package/assets/esri/widgets/Search/t9n/messages.hr.json +1 -1
  94. package/assets/esri/widgets/Search/t9n/messages.it.json +1 -1
  95. package/assets/esri/widgets/Search/t9n/messages.lv.json +1 -1
  96. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ar.json +1 -1
  97. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ca.json +1 -1
  98. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.cs.json +1 -1
  99. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.el.json +1 -1
  100. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.es.json +1 -1
  101. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.fi.json +1 -1
  102. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.he.json +1 -1
  103. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.it.json +1 -1
  104. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lt.json +1 -1
  105. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lv.json +1 -1
  106. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.pl.json +1 -1
  107. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ro.json +1 -1
  108. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ru.json +1 -1
  109. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.sl.json +1 -1
  110. package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.uk.json +1 -1
  111. package/assets/esri/widgets/support/GridControls/t9n/messages.pt-BR.json +1 -1
  112. package/chunks/DeepSky.glsl.js +1 -1
  113. package/chunks/RibbonLine.glsl.js +63 -58
  114. package/config.js +1 -1
  115. package/core/Evented.d.ts +1 -1
  116. package/core/screenUtils.js +1 -1
  117. package/core/units.js +1 -1
  118. package/form/elements/AttachmentElement.d.ts +5 -5
  119. package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -1
  120. package/graphic/getGraphicOriginTitle.d.ts +10 -0
  121. package/graphic/getGraphicOriginTitle.js +2 -0
  122. package/kernel.js +1 -1
  123. package/layers/FeatureLayer.d.ts +2 -2
  124. package/layers/MapNotesLayer.js +1 -1
  125. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  126. package/layers/support/FeatureReductionBinning.d.ts +2 -2
  127. package/layers/support/FeatureReductionCluster.d.ts +2 -2
  128. package/layers/support/Field.js +1 -1
  129. package/layers/support/SubtypeSublayer.d.ts +1 -1
  130. package/layers/support/TimeSeriesInfo.d.ts +1 -1
  131. package/layers/support/featurePopupQueryUtils.js +1 -1
  132. package/layers/support/timeSeriesUtils.js +1 -1
  133. package/layers/support/types.d.ts +1 -1
  134. package/layers/types.d.ts +1 -2
  135. package/package.json +3 -3
  136. package/popup/FeatureContent.d.ts +7 -7
  137. package/portal/schemas/definitions.js +1 -1
  138. package/portal/types.d.ts +1 -1
  139. package/renderers/DotDensityRenderer.d.ts +2 -2
  140. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +1 -1
  141. package/rest/knowledgeGraphService.d.ts +2 -2
  142. package/rest/support/OutDistance.d.ts +19 -18
  143. package/rest/support/Query.d.ts +49 -21
  144. package/rest/support/RelationshipQuery.d.ts +1 -1
  145. package/smartMapping/renderers/support/utils.js +1 -1
  146. package/support/revision.js +1 -1
  147. package/symbols/LineSymbol3D.js +1 -1
  148. package/symbols/cim/types.d.ts +32 -0
  149. package/symbols/patterns/LinePattern3D.js +1 -1
  150. package/symbols/patterns/LineStylePattern3D.js +1 -1
  151. package/symbols/patterns/LineTemplatePattern3D.js +1 -1
  152. package/symbols/patterns/utils.js +1 -1
  153. package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
  154. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  155. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  156. package/views/2d/support/clippingUtils.js +1 -1
  157. package/views/2d/support/hitTestUtils.js +1 -1
  158. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
  159. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  160. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  161. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  162. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  163. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  165. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  166. package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
  167. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  168. package/views/3d/webgl-engine/lib/AttributeView.js +2 -0
  169. package/views/3d/webgl-engine/lib/attributeViewUtils.js +2 -0
  170. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  171. package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
  172. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  173. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  174. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  175. package/views/BreakpointsOwner.d.ts +2 -2
  176. package/views/PopupView.d.ts +64 -2
  177. package/views/SceneView.js +1 -1
  178. package/views/SelectionManager.d.ts +24 -24
  179. package/views/View.js +1 -1
  180. package/views/View2D.js +1 -1
  181. package/views/interactive/support/types.d.ts +0 -1
  182. package/views/layers/FeatureLikeLayerView.js +1 -1
  183. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  184. package/views/support/DefaultsFromMap.js +1 -1
  185. package/widgets/Attachments/support/attachmentUtils.d.ts +8 -0
  186. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
  187. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  188. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +5 -1
  189. package/widgets/BasemapLayerList/types.d.ts +15 -2
  190. package/widgets/BasemapLayerList.d.ts +1 -1
  191. package/widgets/BasemapLayerList.js +1 -1
  192. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  193. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  194. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +14 -0
  195. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  196. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  197. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +29 -2
  198. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  199. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +1 -5
  200. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  201. package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
  202. package/widgets/BatchAttributeForm.js +1 -1
  203. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -1
  204. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  205. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +5 -1
  206. package/widgets/CatalogLayerList/types.d.ts +12 -1
  207. package/widgets/CatalogLayerList.d.ts +2 -1
  208. package/widgets/CatalogLayerList.js +1 -1
  209. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  210. package/widgets/Editor/EditorViewModel.d.ts +2 -2
  211. package/widgets/Editor.d.ts +2 -2
  212. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +6 -6
  213. package/widgets/FeatureTable/support/FeatureStore.d.ts +2 -2
  214. package/widgets/FeatureTable.d.ts +5 -5
  215. package/widgets/LayerList/LayerListVisibleElements.d.ts +4 -1
  216. package/widgets/LayerList.js +1 -1
  217. package/widgets/TableList/ListItem.d.ts +2 -0
  218. package/widgets/TableList/ListItemPanel.d.ts +4 -0
  219. package/widgets/TableList/TableListViewModel.d.ts +4 -0
  220. package/widgets/TableList/TableListViewModel.js +1 -1
  221. package/widgets/TableList/TableListVisibleElements.d.ts +6 -1
  222. package/widgets/TableList/types.d.ts +12 -1
  223. package/widgets/TableList.d.ts +3 -0
  224. package/widgets/TableList.js +1 -1
  225. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +1 -1
  226. package/assets/esri/core/workers/chunks/078ed48eb055dd213ee6.js +0 -1
  227. package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +0 -1
  228. package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +0 -1
  229. package/assets/esri/core/workers/chunks/cd0f5cd0fefe7f49e3d8.js +0 -1
  230. package/assets/esri/core/workers/chunks/e6fb7b93cf73b05b1079.js +0 -1
  231. package/assets/esri/core/workers/chunks/f86ea5cf4814b458d50b.js +0 -1
  232. package/assets/esri/core/workers/chunks/f9b29d2ce1cd31c0fce1.js +0 -1
  233. package/graphic/graphicOrigins.js +0 -2
@@ -19,7 +19,7 @@ export interface AttachmentElementProperties extends ElementProperties, Partial<
19
19
  }
20
20
 
21
21
  /**
22
- * An `AttachmentElement` defines how one or more attachments can participate in the [Editor's](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/) form. Use this approach to set attachment configurations within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) `formTemplate`. When present in the form, the user has the ability to upload an attachment specific to its corresponding [input](#input).
22
+ * An `AttachmentElement` defines how one or more attachments can participate in the [Editor's](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/) form. Use this approach to set attachment configurations within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) `formTemplate`. When present in the form, the user has the ability to upload an attachment specific to its corresponding [input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input).
23
23
  *
24
24
  * > [!CAUTION]
25
25
  * >
@@ -61,7 +61,7 @@ export default class AttachmentElement extends Element {
61
61
  /** @since 5.1 */
62
62
  constructor(properties?: AttachmentElementProperties);
63
63
  /**
64
- * Indicates whether renaming of attachments is allowed by the user. If `true`, the user can rename attachments when adding them to the form. If `false`, the user cannot rename attachments and the file name will be determined by the [filenameExpression](#filenameexpression) property or generated automatically if [filenameExpression](#filenameexpression) is not specified.
64
+ * Indicates whether renaming of attachments is allowed by the user. If `true`, the user can rename attachments when adding them to the form. If `false`, the user cannot rename attachments and the file name will be determined by the [filenameExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#filenameExpression) property or generated automatically if [filenameExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#filenameExpression) is not specified.
65
65
  *
66
66
  * @default true
67
67
  * @since 5.1
@@ -88,11 +88,11 @@ export default class AttachmentElement extends Element {
88
88
  */
89
89
  accessor editableExpression: string | null | undefined;
90
90
  /**
91
- * A string-based [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression used to determine the file name of an attachment added through the form. If not specified, a unique name will be generated using the [attachmentKeyword](#attachmentKeyword) plus the current timestamp when attachment is added. This property is used when [useOriginalFilename](#useOriginalFilename) is set to `false` or when [allowUserRename](#allowUserRename) is set to `false` and the user adds an attachment without specifying a file name.
91
+ * A string-based [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression used to determine the file name of an attachment added through the form. If not specified, a unique name will be generated using the [attachmentKeyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword) plus the current timestamp when attachment is added. This property is used when [useOriginalFilename](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#useOriginalFilename) is set to `false` or when [allowUserRename](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#allowUserRename) is set to `false` and the user adds an attachment without specifying a file name.
92
92
  *
93
93
  * > [!CAUTION]
94
94
  * >
95
- * > If wanting to set an attachment's [filenameExpression](#filenameExpression), it should be handled in-line as part of the element rather than as a reference to a shared expression.
95
+ * > If wanting to set an attachment's [filenameExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#filenameExpression), it should be handled in-line as part of the element rather than as a reference to a shared expression.
96
96
  *
97
97
  * @default 'StandardizeFilename(`${$formElement.attachmentKeyword}_${Text(Now(), "YMMDDHHmmss")}`)'
98
98
  * @example
@@ -143,7 +143,7 @@ export default class AttachmentElement extends Element {
143
143
  */
144
144
  get type(): "attachment";
145
145
  /**
146
- * Determines whether the uploaded attachment's file name is preserved. If `false`, the name is updated based on [filenameExpression](#filenameExpression).
146
+ * Determines whether the uploaded attachment's file name is preserved. If `false`, the name is updated based on [filenameExpression](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#filenameExpression).
147
147
  *
148
148
  * @default true
149
149
  * @since 5.1
@@ -28,7 +28,7 @@ export interface AttachmentInputProperties extends Partial<Pick<AttachmentInput,
28
28
  * > [!CAUTION]
29
29
  * > * Input methods that are configured as only allowing `capture` are not supported on desktop devices for inputs such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/).
30
30
  * > * For inputs such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), minimum requirements apply only in mobile editing workflows when the input method is set to only allow capture and the minimum file count is greater than or equal to one.
31
- * * When using specific input types, such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), existing attachments are displayed only if they match the element's [keyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword). Existing attachments without a matching keyword are not shown. To display attachments that do not have a corresponding keyword, use the general `AttachmentInput` instead. This input type provides a more general approach to displaying attachments and does not require a keyword to be specified by setting the [attachmentAssociationType](#attachmentAssociationType) accordingly.
31
+ * * When using specific input types, such as [AudioInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AudioInput/), [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/), or [VideoInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/VideoInput/), existing attachments are displayed only if they match the element's [keyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword). Existing attachments without a matching keyword are not shown. To display attachments that do not have a corresponding keyword, use the general `AttachmentInput` instead. This input type provides a more general approach to displaying attachments and does not require a keyword to be specified by setting the [attachmentAssociationType](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/#attachmentAssociationType) accordingly.
32
32
  *
33
33
  * @since 5.1
34
34
  * @see [AttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/)
@@ -0,0 +1,10 @@
1
+ import type GraphicOrigin from "./GraphicOrigin.js";
2
+
3
+ /**
4
+ * Returns the title of the graphic's origin, preferring the sublayer title if available, and falling back to the layer title.
5
+ *
6
+ * @param origin - The graphic's origin.
7
+ * @returns The title of the origin's sublayer if available, otherwise the title of the origin's layer.
8
+ * @since 5.2
9
+ */
10
+ export function getGraphicOriginTitle(origin: GraphicOrigin): string | null | undefined;
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ function e(e){return"sublayer"in e&&t(e.sublayer)?e.sublayer.title:"layer"in e&&t(e.layer)?e.layer.title:void 0}function t(e){return"object"==typeof e&&null!==e&&"title"in e}export{e as getGraphicOriginTitle};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.113",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.115",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
@@ -1589,8 +1589,8 @@ export abstract class __FeatureLayerSansType extends FeatureLayerSuperclass {
1589
1589
  /**
1590
1590
  * Returns the title of a [feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/). The feature title is generated based on the following conditions for a `FeatureLayer`.
1591
1591
  * - If the feature has a popup title configured, then the popup title will be returned.
1592
- * - If the feature does not have a popup title, then the [displayField](#displayField) value will be returned.
1593
- * - If there is no `displayField`, then the [objectId](#objectIdField) will be returned.
1592
+ * - If the feature does not have a popup title, then the [displayField](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#displayField) value will be returned.
1593
+ * - If there is no `displayField`, then the [objectIdField](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#objectIdField) will be returned.
1594
1594
  *
1595
1595
  * @param graphic - The [graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) for which to generate a title.
1596
1596
  * @param options - Additional options that control how the title is generated.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../core/Collection.js";import o from"../core/Error.js";import{clone as i}from"../core/lang.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import a from"../core/Warning.js";import{property as s,subclass as p}from"../core/accessorSupport/decorators.js";import y from"../geometry/Extent.js";import{projectOrLoad as m,canProjectWithoutEngine as u,isLoaded as c,load as f,project as d}from"../geometry/projectionUtils.js";import g from"../geometry/SpatialReference.js";import{empty as b,expand as h,equals as S,toExtent as O,negativeInfinity as w}from"../geometry/support/aaBoundingRect.js";import{normalizeCentralMeridian as N}from"../geometry/support/normalizeUtils.js";import{equals as j}from"../geometry/support/spatialReferenceUtils.js";import L from"../graphic/MapNotesGraphicOrigin.js";import x from"./FeatureLayer.js";import J from"./GraphicsLayer.js";import v from"./Layer.js";import{findLastObjectIdFromFeatures as T}from"./graphics/objectIdUtils.js";import{BlendLayer as C}from"./mixins/BlendLayer.js";import{OperationalLayer as M}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as R}from"./mixins/ScaleRangeLayer.js";import E from"./support/Field.js";import D from"../symbols/SimpleFillSymbol.js";import G from"../symbols/SimpleLineSymbol.js";import P from"../symbols/SimpleMarkerSymbol.js";import _ from"../symbols/TextSymbol.js";import{reader as F}from"../core/accessorSupport/decorators/reader.js";import{writer as B}from"../core/accessorSupport/decorators/writer.js";function k(e){return"markup"===e.featureCollectionType||e.layers.some(e=>null!=e.layerDefinition.visibilityField||!z(e))}function z({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return $.find(t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type)}function U(){return new y({xmin:-180,ymin:-90,xmax:180,ymax:90})}const W=new E({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),A=new E({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255}),$=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new D).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new G).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new P).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new P).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new _).toJSON()}];let q=class extends(C(R(M(I(l(v)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=g.WGS84,this.sublayers=new r($.map(e=>new H({id:e.id,layerId:e.layerId,title:e.title,layer:this}))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!k(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,o){if(!k(t))return null;const i=t.layers.map(e=>{const t=new x;return t.read(e,o),t});return new r({items:i})}readLegacyfeatureCollectionJSON(e,t){return k(t)?i(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=b();if(null!=this.sublayers)this.sublayers.forEach(({fullBounds:e})=>null!=e?h(t,e,t):t,t);else if(this.featureCollectionJSON?.layers.some(e=>e.layerDefinition.extent)){this.featureCollectionJSON.layers.forEach(r=>{const o=m(r.layerDefinition.extent,e).geometry;null!=o&&h(t,o,t)})}return S(t,w)?m(U(),e).geometry:O(t,e)}readMinScale(e,t){for(const r of t.layers)if(null!=r.layerDefinition.minScale)return r.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const r of t.layers)if(null!=r.layerDefinition.maxScale)return r.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?g.fromJSON(t.layers[0].layerDefinition.spatialReference):g.WGS84}readSublayers(e,o,i){if(k(o))return null;const l=[];let n=o.layers.reduce((e,t)=>Math.max(e,t.layerDefinition.id??-1),-1)+1;for(const r of o.layers){const{layerDefinition:e,featureSet:o}=r,i=e.id??n++,a=z(r);if(null!=a){const r=new H({id:a.id,title:e.name,layerId:i,layer:this,graphics:o.features.map(({geometry:e,symbol:r,attributes:o,popupInfo:i})=>t.fromJSON({attributes:o,geometry:e,symbol:r,popupTemplate:i}))});l.push(r)}}return new r(l)}writeSublayers(e,t,r,i){const{minScale:l,maxScale:a}=this;if(null==e)return;const s=e.some(e=>e.graphics.length>0);if(!this.capabilities.operations.supportsMapNotesEditing)return void(s&&i?.messages?.push(new o("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const p=[];let y=this.spatialReference.toJSON();e:for(const o of e)for(const e of o.graphics)if(null!=e.geometry){y=e.geometry.spatialReference.toJSON();break e}for(const o of $){const t=e.find(e=>o.id===e.id);this._writeMapNoteSublayer(p,t,o,l,a,y,i)}n("featureCollection.layers",p,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=i(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const o of this.sublayers)for(const r of o.graphics)if(null!=r.geometry){const o=r.geometry;e?j(o.spatialReference,e)||(u(o.spatialReference,e)||c()||await f(),r.geometry=d(o,e)):e=o.spatialReference,t.push(r)}const r=await N(t.map(e=>e.geometry));t.forEach((e,t)=>e.geometry=r[t])}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find(t=>t.id===e)??null}_writeMapNoteSublayer(e,t,r,o,l,n,a){const s=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(s,e,r.geometryType,a);this._normalizeObjectIds(s,W),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:i(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:o,maxScale:l,objectIdField:"OBJECTID",fields:[W.toJSON(),A.toJSON()],spatialReference:n},featureSet:{features:s,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,o){if(null==t)return;const{geometry:i,symbol:l,popupTemplate:n}=t;if(null==i)return;if(i.type!==r)return void o?.messages?.push(new a("map-notes-layer:invalid-geometry-type",`Geometry "${i.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==l)return void o?.messages?.push(new a("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const s={attributes:{...t.attributes},geometry:i.toJSON(),symbol:l.toJSON()};null!=n&&(s.popupInfo=n.toJSON()),e.push(s)}_normalizeObjectIds(e,t){const r=t.name;let o=T(r,e)+1;const i=new Set;for(const l of e){l.attributes||(l.attributes={});const{attributes:e}=l;(null==e[r]||i.has(e[r]))&&(e[r]=o++),i.add(e[r])}}};e([s({readOnly:!0})],q.prototype,"capabilities",void 0),e([F(["portal-item","web-map"],"capabilities",["layers"])],q.prototype,"readCapabilities",null),e([s({readOnly:!0})],q.prototype,"featureCollections",void 0),e([F(["web-map","portal-item"],"featureCollections",["layers"])],q.prototype,"readFeatureCollections",null),e([s({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],q.prototype,"featureCollectionJSON",void 0),e([F(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],q.prototype,"readLegacyfeatureCollectionJSON",null),e([s({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],q.prototype,"featureCollectionType",void 0),e([s({readOnly:!0})],q.prototype,"fullExtent",null),e([s({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],q.prototype,"legendEnabled",void 0),e([s({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),e([s({type:Number,nonNullable:!0,json:{write:!1}})],q.prototype,"minScale",void 0),e([F(["web-map","portal-item"],"minScale",["layers"])],q.prototype,"readMinScale",null),e([s({type:Number,nonNullable:!0,json:{write:!1}})],q.prototype,"maxScale",void 0),e([F(["web-map","portal-item"],"maxScale",["layers"])],q.prototype,"readMaxScale",null),e([s({readOnly:!0})],q.prototype,"multipointLayer",null),e([s({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],q.prototype,"operationalLayerType",void 0),e([s({readOnly:!0})],q.prototype,"pointLayer",null),e([s({readOnly:!0})],q.prototype,"polygonLayer",null),e([s({readOnly:!0})],q.prototype,"polylineLayer",null),e([s({type:g})],q.prototype,"spatialReference",void 0),e([F(["web-map","portal-item"],"spatialReference",["layers"])],q.prototype,"readSpatialReference",null),e([s({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],q.prototype,"sublayers",void 0),e([F("web-map","sublayers",["layers"])],q.prototype,"readSublayers",null),e([B("web-map","sublayers")],q.prototype,"writeSublayers",null),e([s({readOnly:!0})],q.prototype,"textLayer",null),e([s()],q.prototype,"title",void 0),e([s({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),q=e([p("esri.layers.MapNotesLayer")],q);let H=class extends J{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",e=>{e.item.sourceLayer=this.layer,e.item.origin=this.graphicOrigin}),this.graphics.on("after-remove",e=>{e.item.sourceLayer=null,e.item.origin=null})}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?m(U(),e).geometry:O(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=b();return this.graphics.forEach(r=>{const o=null!=r.geometry?m(r.geometry,e).geometry:null;null!=o&&h(t,"point"===o.type?o:o.extent,t)}),S(t,w)?null:t}get graphicOrigin(){return new L(this.layer,this)}get sublayers(){return this.graphics}};e([s({readOnly:!0})],H.prototype,"fullExtent",null),e([s({readOnly:!0})],H.prototype,"fullBounds",null),e([s({readOnly:!0})],H.prototype,"graphicOrigin",null),e([s({readOnly:!0})],H.prototype,"sublayers",null),e([s()],H.prototype,"layer",void 0),e([s()],H.prototype,"layerId",void 0),e([s({readOnly:!0})],H.prototype,"visibilityMode",void 0),H=e([p("esri.layers.MapNotesLayer.MapNotesSublayer")],H);const K=q;export{K as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../core/Collection.js";import o from"../core/Error.js";import{clone as i}from"../core/lang.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as n}from"../core/object.js";import a from"../core/Warning.js";import{property as s,subclass as p}from"../core/accessorSupport/decorators.js";import y from"../geometry/Extent.js";import{projectOrLoad as m,canProjectWithoutEngine as u,isLoaded as c,load as f,project as d}from"../geometry/projectionUtils.js";import g from"../geometry/SpatialReference.js";import{empty as h,expand as b,equals as S,toExtent as O,negativeInfinity as w}from"../geometry/support/aaBoundingRect.js";import{normalizeCentralMeridian as N}from"../geometry/support/normalizeUtils.js";import{equals as j}from"../geometry/support/spatialReferenceUtils.js";import L from"../graphic/MapNotesGraphicOrigin.js";import x from"./FeatureLayer.js";import J from"./GraphicsLayer.js";import v from"./Layer.js";import{findLastObjectIdFromFeatures as T}from"./graphics/objectIdUtils.js";import{BlendLayer as C}from"./mixins/BlendLayer.js";import{OperationalLayer as M}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as R}from"./mixins/ScaleRangeLayer.js";import E from"./support/Field.js";import D from"../symbols/SimpleFillSymbol.js";import G from"../symbols/SimpleLineSymbol.js";import P from"../symbols/SimpleMarkerSymbol.js";import _ from"../symbols/TextSymbol.js";import{reader as F}from"../core/accessorSupport/decorators/reader.js";import{writer as B}from"../core/accessorSupport/decorators/writer.js";function k(e){return"markup"===e.featureCollectionType||e.layers.some(e=>null!=e.layerDefinition.visibilityField||!z(e))}function z({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return $.find(t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type)}function U(){return new y({xmin:-180,ymin:-90,xmax:180,ymax:90})}const W=new E({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),A=new E({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0,length:255}),$=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new D).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new G).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new P).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new P).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new _).toJSON()}];let q=class extends(C(R(M(I(l(v)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=g.WGS84,this.sublayers=new r($.map(e=>new H({id:e.id,layerId:e.layerId,title:e.title,layer:this}))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!k(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,o){if(!k(t))return null;const i=t.layers.map(e=>{const t=new x;return t.read(e,o),t});return new r({items:i})}readLegacyfeatureCollectionJSON(e,t){return k(t)?i(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=h();if(null!=this.sublayers)this.sublayers.forEach(({fullBounds:e})=>null!=e?b(t,e,t):t,t);else if(this.featureCollectionJSON?.layers.some(e=>e.layerDefinition.extent)){this.featureCollectionJSON.layers.forEach(r=>{const o=m(r.layerDefinition.extent,e).geometry;null!=o&&b(t,o,t)})}return S(t,w)?m(U(),e).geometry:O(t,e)}readMinScale(e,t){for(const r of t.layers)if(null!=r.layerDefinition.minScale)return r.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const r of t.layers)if(null!=r.layerDefinition.maxScale)return r.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?g.fromJSON(t.layers[0].layerDefinition.spatialReference):g.WGS84}readSublayers(e,o,i){if(k(o))return null;const l=[];let n=o.layers.reduce((e,t)=>Math.max(e,t.layerDefinition.id??-1),-1)+1;for(const r of o.layers){const{layerDefinition:e,featureSet:o}=r,i=e.id??n++,a=z(r);if(null!=a){const r=new H({id:a.id,title:e.name,layerId:i,layer:this,graphics:o.features.map(({geometry:e,symbol:r,attributes:o,popupInfo:i})=>t.fromJSON({attributes:o,geometry:e,symbol:r,popupTemplate:i}))});l.push(r)}}return new r(l)}writeSublayers(e,t,r,i){const{minScale:l,maxScale:a}=this;if(null==e)return;const s=e.some(e=>e.graphics.length>0);if(!this.capabilities.operations.supportsMapNotesEditing)return void(s&&i?.messages?.push(new o("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const p=[];let y=this.spatialReference.toJSON();e:for(const o of e)for(const e of o.graphics)if(null!=e.geometry){y=e.geometry.spatialReference.toJSON();break e}for(const o of $){const t=e.find(e=>o.id===e.id);this._writeMapNoteSublayer(p,t,o,l,a,y,i)}n("featureCollection.layers",p,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=i(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if(null==this.sublayers)return;let e=null;const t=[];for(const o of this.sublayers)for(const r of o.graphics)if(null!=r.geometry){const o=r.geometry;e?j(o.spatialReference,e)||(u(o.spatialReference,e)||c()||await f(),r.geometry=d(o,e)):e=o.spatialReference,t.push(r)}const r=await N(t.map(e=>e.geometry));t.forEach((e,t)=>e.geometry=r[t])}_findSublayer(e){return null==this.sublayers?null:this.sublayers?.find(t=>t.id===e)??null}_writeMapNoteSublayer(e,t,r,o,l,n,a){const s=[];if(null!=t){for(const e of t.graphics)this._writeMapNote(s,e,r.geometryType,a);this._normalizeObjectIds(s,W),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:i(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:o,maxScale:l,objectIdField:"OBJECTID",fields:[W.toJSON(),A.toJSON()],spatialReference:n},featureSet:{features:s,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,o){if(null==t)return;const{geometry:i,symbol:l,popupTemplate:n}=t;if(null==i)return;if(i.type!==r)return void o?.messages?.push(new a("map-notes-layer:invalid-geometry-type",`Geometry "${i.type}" cannot be saved in "${r}" layer`,{graphic:t}));if(null==l)return void o?.messages?.push(new a("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const s={attributes:{...t.attributes},geometry:i.toJSON(),symbol:l.toJSON()};null!=n&&(s.popupInfo=n.toJSON()),e.push(s)}_normalizeObjectIds(e,t){const r=t.name;let o=T(r,e)+1;const i=new Set;for(const l of e){l.attributes||(l.attributes={});const{attributes:e}=l;(null==e[r]||i.has(e[r]))&&(e[r]=o++),i.add(e[r])}}};e([s({readOnly:!0})],q.prototype,"capabilities",void 0),e([F(["portal-item","web-map"],"capabilities",["layers"])],q.prototype,"readCapabilities",null),e([s({readOnly:!0})],q.prototype,"featureCollections",void 0),e([F(["web-map","portal-item"],"featureCollections",["layers"])],q.prototype,"readFeatureCollections",null),e([s({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],q.prototype,"featureCollectionJSON",void 0),e([F(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],q.prototype,"readLegacyfeatureCollectionJSON",null),e([s({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],q.prototype,"featureCollectionType",void 0),e([s({readOnly:!0})],q.prototype,"fullExtent",null),e([s({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],q.prototype,"legendEnabled",void 0),e([s({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),e([s({type:Number,nonNullable:!0,json:{write:!1}})],q.prototype,"minScale",void 0),e([F(["web-map","portal-item"],"minScale",["layers"])],q.prototype,"readMinScale",null),e([s({type:Number,nonNullable:!0,json:{write:!1}})],q.prototype,"maxScale",void 0),e([F(["web-map","portal-item"],"maxScale",["layers"])],q.prototype,"readMaxScale",null),e([s({readOnly:!0})],q.prototype,"multipointLayer",null),e([s({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],q.prototype,"operationalLayerType",void 0),e([s({readOnly:!0})],q.prototype,"pointLayer",null),e([s({readOnly:!0})],q.prototype,"polygonLayer",null),e([s({readOnly:!0})],q.prototype,"polylineLayer",null),e([s({type:g})],q.prototype,"spatialReference",void 0),e([F(["web-map","portal-item"],"spatialReference",["layers"])],q.prototype,"readSpatialReference",null),e([s({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],q.prototype,"sublayers",void 0),e([F("web-map","sublayers",["layers"])],q.prototype,"readSublayers",null),e([B("web-map","sublayers")],q.prototype,"writeSublayers",null),e([s({readOnly:!0})],q.prototype,"textLayer",null),e([s()],q.prototype,"title",void 0),e([s({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),q=e([p("esri.layers.MapNotesLayer")],q);let H=class extends J{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer,e.origin=this.graphicOrigin;this.graphics.on("after-add",e=>{e.item.sourceLayer=this.layer,e.item.origin=this.graphicOrigin}),this.graphics.on("after-remove",e=>{e.item.sourceLayer=null,e.item.origin=null})}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?null==t?m(U(),e).geometry:O(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=h();return this.graphics.forEach(r=>{const o=null!=r.geometry?m(r.geometry,e).geometry:null;null!=o&&b(t,"point"===o.type?o:o.extent,t)}),S(t,w)?null:t}get graphicOrigin(){return new L(this.layer,this)}get sublayers(){return this.graphics}};e([s({readOnly:!0})],H.prototype,"fullExtent",null),e([s({readOnly:!0})],H.prototype,"fullBounds",null),e([s({readOnly:!0})],H.prototype,"graphicOrigin",null),e([s({readOnly:!0})],H.prototype,"sublayers",null),e([s()],H.prototype,"layer",void 0),e([s()],H.prototype,"layerId",void 0),e([s({readOnly:!0})],H.prototype,"visibilityMode",void 0),H=e([p("esri.layers.MapNotesLayer.MapNotesSublayer")],H);const K=q;export{K as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getMetersPerUnitForSR as n}from"../../../core/units.js";import o from"../../../geometry/Extent.js";import{P as i,a as r,b as s,c as a,d as l}from"../../../chunks/pe.js";import c from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{projectWithoutEngine as u}from"../../../geometry/projectionUtils.js";import x from"../../../geometry/SpatialReference.js";import{getInfo as m}from"../../../geometry/support/spatialReferenceUtils.js";function p(){if(!j)throw new t("rasterprojectionhelper-project","projection operator is not loaded")}const h=(e,t,n,o=0)=>{if(1===n[0])return[0,0];let i=1,r=-1,s=1,a=-1;for(let g=0;g<e.length;g+=2)isNaN(e[g])||(i=i>e[g]?e[g]:i,r=r>e[g]?r:e[g],s=s>e[g+1]?e[g+1]:s,a=a>e[g+1]?a:e[g+1]);const{cols:l,rows:c}=t,f=(r-i)/l/n[0],u=(a-s)/c/n[1],x=2*o;let m=0,p=!1,h=[0,0];for(let g=0;g<l-3;g++){for(let t=0;t<c-3;t++){const n=g*c*2+2*t,o=(e[n]+e[n+4]+e[n+4*c]+e[n+4*c+4])/4,i=(e[n+1]+e[n+5]+e[n+4*c+1]+e[n+4*c+5])/4,r=Math.abs((o-e[n+2*c+2])/f),s=Math.abs((i-e[n+2*c+3])/u);if(r+s>m&&(m=r+s,h=[r,s]),x&&m>x){p=!0;break}}if(p)break}return h},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,d=4,w=d,M=new Map,R=new Map,S=500,P=39.37,b=96;let E,G,k,j=!1;async function T(){return E||(E=Promise.withResolvers(),G=await(import("../../../geometry/operators/projectOperator.js")),k=await(import("../../../geometry/operators/support/geographicTransformationUtils.js")),G.projectIsLoaded()||await G.projectLoad(),k.isLoaded()||await k.load(),j=!0,E.resolve()),E.promise}function N(e,t,n){if(p(),n){const n=G.projectExecute(e,t);return k.getTransformation(t,e.spatialReference,n)}return k.getTransformation(e.spatialReference,t,e)}function v(e,t,n,i){const r=e.spatialReference;if(!r||!t||r.equals(t))return e;p();const s=n.center,a=new o({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:r}),l=G.projectExecute(a,t,{geographicTransformation:i}),c=Z(t);return null==l||null!=c&&l.width>=c?C(e,r,t):{x:l.width,y:l.height}}function C(e,t,o){const i=n(t)/n(o);return{x:e.x*i,y:e.y*i}}function _(e,o,i){const{spatialReference:r}=i;if(!r||!o||r.equals(o))return e;if(r.isGeographic&&o.isGeographic)return C(e,r,o);if(p(),!j)throw new t("raster-projection-helper:project-dataset-resolution","geometry engine is not loaded");let{x:s,y:a}=e;const l=(s+a)/2*n(r);let c=1;l>30&&(c=30/l,s*=c,a*=c);const u=256,x=s*u/2,m=a*u/2,{x:h,y:g}=i.center,y=[];for(let t=0;t<=u;t++)y.push([h-x,g-m+t*a]);for(let t=1;t<=u;t++)y.push([h-x+t*s,g+m]);for(let t=1;t<=u;t++)y.push([h+x,g+m-t*a]);for(let t=1;t<u;t++)y.push([h+x-t*s,g-m]);y.push(y[0]);const d=new f({rings:[y],spatialReference:r}),w=G.projectExecute(d,o);if(!w)return C(e,r,o);const M=w.extent,R=Z(o);if(null==M||null!=R&&M.width>=R)return C(e,r,o);const S=pe(w.rings),P=s*a*u*u,b=Math.sqrt(S/P)/c,E={x:M.width/c/u,y:M.height/c/u},k={x:s*b,y:a*b},T=E.x*E.y;return Math.abs(T-k.x*k.y)/T<.1?E:k}function z(e,t){return("number"==typeof e?e:(e.x+e.y)/2)*n(t)*b*P}function L(e,t){const{pixelSize:n,extent:o}=e;return z(_(n,t,o),t)}function I(e,t=.01){return n(e)?t/n(e):0}function W(e,t,n,o=!0){const i=e.spatialReference;if(i.equals(t))return e;p();const r=G.projectExecute(e,t,{geographicTransformation:n});return o&&r?(O([e],[r],i,t),r):r}function O(e,t,n,o){const i=$(n,!0),r=$(o,!0),s=I(n,S),a=I(o,S);if(s&&null!=i&&null!=r)for(let l=0;l<e.length;l++){const n=t[l];if(!n)continue;const{x:o}=e[l],{x:c}=n;c>=r[1]-a&&Math.abs(o-i[0])<s?n.x-=r[1]-r[0]:c<=r[0]+a&&Math.abs(o-i[1])<s&&(n.x+=r[1]-r[0])}}function A(e){const{inSR:t,outSR:n,preferPE:o}=e;if(t.equals(n)){const{points:t}=J(e,null);return t}if(t.isWebMercator&&n.isWGS84||t.isWGS84&&n.isWebMercator)return Y(e);if(o){if(t.isGeographic)return q(e);if(null!=B(t))return q(e)}return F(e)}function F(e){const{points:t}=J(e,null),{inSR:n,outSR:o,datumTransformation:i}=e,r=t.map(e=>new c(e[0],e[1],n)),s=G.projectExecuteMany(r,o,{geographicTransformation:i});return i&&O(r,s,n,o),s.map(e=>e?[e.x,e.y]:[NaN,NaN])}function q(e){const{inSR:t,outSR:n,datumTransformation:o}=e,s=B(t),{points:c,mask:f}=J(e,s);if(!t.isGeographic){const e=t.wkid?i.coordsys(t.wkid):i.fromString(t.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.projToGeog(e,c.length,c)}if(null!=o&&o.steps.length){let e;const t=179.9955;if(n.isGeographic&&(e=c.map(([e])=>e>t?1:e<-t?-1:0)),o.steps.forEach(e=>{const t=e.wkid?i.geogtran(e.wkid):i.fromString(r.PE_TYPE_GEOGTRAN,e.wkt);l.geogToGeog(t,c.length,c,null,e.isInverse?r.PE_TRANSFORM_2_TO_1:r.PE_TRANSFORM_1_TO_2)}),e)for(let n=0;n<c.length;n++){const o=e[n],i=c[n][0],r=i>t?1:i<-t?-1:0;o&&r&&o!==r&&(c[n][0]=o>0?i+360:i-360)}}if(!n.isGeographic){const e=B(n,!0),t=null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];X(c,t);const o=n.wkid?i.coordsys(n.wkid):i.fromString(n.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,n.wkt2||n.wkt);a.geogToProj(o,c.length,c)}let u=c;if(f&&c.length!==f.length){u=[];for(let e=0,t=0;e<f.length;e++)f[e]?u.push(c[t++]):u.push([NaN,NaN])}return u}function Y(e){const{cols:t,rows:n,xres:o,yres:i,usePixelCenter:r,inSR:s,outSR:a}=e;let{xmin:l,ymax:f}=e;r&&(l+=o/2,f-=i/2);const x=[],m=[],p=Math.max(t,n);for(let g=0;g<p;g++){const e=l+o*Math.min(t,g),r=f-i*Math.min(n,g),p=u(new c({x:e,y:r,spatialReference:s}),s,a);g<=t&&x.push(p.x),g<=n&&m.push(p.y)}const h=[];for(let c=0;c<t;c++)for(let e=0;e<n;e++)h.push([x[c],m[e]]);return h}function B(e,t=!1){let n=e.wkid||e.wkt2||e.wkt;if(!n||e.isGeographic)return null;if(n=String(n),M.has(n)){const e=M.get(n);return t?e?.gcs:e?.pcs}const o=e.wkid?i.coordsys(e.wkid):i.fromString(e.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=U(o,I(e,1e-4)),a=U(o,0,!0);return M.set(n,{pcs:s,gcs:a}),t?a:s}function U(e,t=0,n=!1){const o=s.generate(e),i=n?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!o||!i?.length)return null;let r=!1,a=i.find(e=>1===e.getInclusive()&&1===e.getKind());if(!a){if(a=i.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;r=!0}const l=n?0:(2===o.getNorthPoleLocation()?1:0)|(2===o.getSouthPoleLocation()?2:0),c=o.isPannableRectangle(),f=a.getCoord();if(r)return{isEnvelope:r,isPannable:c,vertices:f,coef:null,bbox:[f[0][0]-t,f[0][1]-t,f[1][0]+t,f[1][1]+t],poleLocation:l};let u=0;const x=[];let[m,p]=f[0],[h,g]=f[0];for(let s=0,y=f.length;s<y;s++){u++,u===y&&(u=0);const[e,t]=f[s],[n,o]=f[u];if(o===t)x.push([e,n,t,o,2]);else{const i=(n-e)/(o-t||1e-4),r=e-i*t;t<o?x.push([i,r,t,o,0]):x.push([i,r,o,t,1])}m=m<e?m:e,p=p<t?p:t,h=h>e?h:e,g=g>t?g:t}return{isEnvelope:!1,isPannable:c,vertices:f,coef:x,bbox:[m,p,h,g],poleLocation:l}}function J(e,t){const n=[],{cols:o,rows:i,xres:r,yres:s,usePixelCenter:a}=e;let{xmin:l,ymax:c}=e;if(a&&(l+=r/2,c-=s/2),null==t){for(let e=0;e<o;e++)for(let t=0;t<i;t++)n.push([l+r*e,c-s*t]);return{points:n}}const f=new Uint8Array(o*i);if(t.isEnvelope){const{isPannable:e,bbox:[a,u,x,m]}=t;for(let t=0,p=0;t<o;t++){const o=l+r*t,h=e||o>=a&&o<=x;for(let e=0;e<i;e++,p++){const t=c-s*e;h&&t>=u&&t<=m&&(n.push([o,t]),f[p]=1)}}return{points:n,mask:f}}const u=t.coef,x=[];for(let m=0;m<i;m++){const e=c-s*m,t=[],n=[];for(let i=0;i<u.length;i++){const[o,r,s,a,l]=u[i];if(e===s&&s===a)t.push(o),t.push(r),n.push(2),n.push(2);else if(e>=s&&e<=a){const i=o*e+r;t.push(i),n.push(l)}}let o=t;if(t.length>2){let e=2===n[0]?0:n[0],i=t[0];o=[];for(let r=1;r<n.length;r++)2===n[r]&&r!==n.length-1||(n[r]!==e&&(o.push(0===e?Math.min(i,t[r-1]):Math.max(i,t[r-1])),e=n[r],i=t[r]),r===n.length-1&&o.push(0===n[r]?Math.min(i,t[r]):Math.max(i,t[r])));o.sort((e,t)=>e-t)}else t[0]>t[1]&&(o=[t[1],t[0]]);x.push(o)}for(let m=0,p=0;m<o;m++){const e=l+r*m;for(let t=0;t<i;t++,p++){const o=c-s*t,i=x[t];if(2===i.length)e>=i[0]&&e<=i[1]&&(n.push([e,o]),f[p]=1);else if(i.length>2){let t=!1;for(let n=0;n<i.length;n+=2)if(e>=i[n]&&e<=i[n+1]){t=!0;break}t&&(n.push([e,o]),f[p]=1)}}}return{points:n,mask:f}}function X(e,t){const[n,o]=t;for(let i=0;i<e.length;i++){const t=e[i][1];(t<n||t>o)&&(e[i]=[NaN,NaN])}}function K(e,t){const n=Z(e[0].spatialReference);if(e.length<2||null==n)return e[0];if(t=t??I(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length)return e[0];let{xmin:i,xmax:r,ymin:s,ymax:a}=e[0];for(let o=1;o<e.length;o++){const t=e[o];r=t.xmax+n*o,s=Math.min(s,t.ymin),a=Math.max(a,t.ymax)}return new o({xmin:i,xmax:r,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function D(t,n,i=null,r=!0){const s=t.spatialReference;if(s.equals(n)||!n)return t;const a=te(t),l=Z(s,!0),c=Z(n);if(0===a||null==l||null==c){const e=V(t,n,i,r);if(e&&null==l&&null!=c&&Math.abs(e.width-c)<I(n)&&G.projectIsLoaded()){const o=B(s);if(null!=o&&0===o.poleLocation&&t.width<(o.bbox[2]-o.bbox[0])/2)return Q(t,n)||e}return e}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>I(s)){const{xmin:e,xmax:n}=t;for(let i=0;i<=a;i++){const r=0===i?e:-l/2,c=i===a?n-l*i:l/2;f[i]=new o({xmin:r,xmax:c,ymin:t.ymin,ymax:t.ymax,spatialReference:s})}}const u=f.map(e=>V(e,n,i,r)).filter(e);return 0===u.length?null:K(u)}function H(e,t,n){if("extent"===e.type){const{xmin:t,ymin:n,xmax:o,ymax:i,spatialReference:r}=e;e=new f({rings:[[[t,i],[o,i],[o,n],[t,n],[t,i]]],spatialReference:r})}return e.spatialReference.equals(t)?e:(p(),G.projectExecute(e,t,{geographicTransformation:n}))}function Q(e,t){const n=Z(t);if(null==n)return null;let{xmin:i,ymin:r,xmax:s,ymax:a}=e;const l=e.spatialReference,c=new f({spatialReference:l,rings:[[[i,r],[s,r],[s,a],[i,a],[i,r]]]}),u=G.projectExecute(c,t);if(2!==u.rings.length||!u.rings[0].length||!u.rings[1].length)return null;const{rings:x}=u,m=I(l),p=new o({spatialReference:t});for(let o=0;o<2;o++){i=s=x[o][0][0],r=a=x[o][0][1];for(let e=0;e<x[o].length;e++)i=i>x[o][e][0]?x[o][e][0]:i,s=s<x[o][e][0]?x[o][e][0]:s,r=r>x[o][e][1]?x[o][e][1]:r,a=a<x[o][e][1]?x[o][e][1]:a;if(0===o)p.ymin=r,p.ymax=a,p.xmin=i,p.xmax=s;else if(p.ymin=Math.min(p.ymin,r),p.ymax=Math.max(p.ymax,a),Math.abs(s-n/2)<m)p.xmin=i,p.xmax=p.xmax+n;else{if(!(Math.abs(i+n/2)<m))return null;p.xmax=s+n}}return p}function V(e,t,n,o=!0,i=!0){const r=e.spatialReference;if(r.equals(t)||!t)return e;p();const s=G.projectExecute(e,t,{geographicTransformation:n});if(i&&t.isWebMercator&&s&&(s.ymax=Math.min(20037508.342787,s.ymax),s.ymin=Math.max(-20037508.342787,s.ymin),s.ymin>=s.ymax))return null;if(!o||!s)return s;const a=$(r,!0),l=$(t,!0);if(null==a||null==l)return s;const f=I(r,.001),u=I(r,S),x=I(t,.001);if(Math.abs(s.xmin-l[0])<x&&Math.abs(s.xmax-l[1])<x){const o=Math.abs(e.xmin-a[0]),i=Math.abs(a[1]-e.xmax);if(o<f&&i>u){s.xmin=l[0];const o=[];o.push(new c(e.xmax,e.ymin,r)),o.push(new c(e.xmax,(e.ymin+e.ymax)/2,r)),o.push(new c(e.xmax,e.ymax,r));const i=o.map(e=>W(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmax=Math.max.apply(null,i)}if(i<f&&o>u){s.xmax=l[1];const o=[];o.push(new c(e.xmin,e.ymin,r)),o.push(new c(e.xmin,(e.ymin+e.ymax)/2,r)),o.push(new c(e.xmin,e.ymax,r));const i=o.map(e=>W(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmin=Math.min.apply(null,i)}}else{const e=I(t,.001);Math.abs(s.xmin-l[0])<e&&(s.xmin=l[0]),Math.abs(s.xmax-l[1])<e&&(s.xmax=l[1])}return s}function Z(e,t=!1){if(!e)return null;const n=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*n:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function $(e,t=!1){if(e.isGeographic)return[-180,180];const n=Z(e,t);return n?[-n/2,n/2]:null}function ee(e,t,n,o){let i=(e-t)/n;return i-Math.floor(i)!==0?i=Math.floor(i):o&&(i-=1),i}function te(e,t=!1){const n=Z(e.spatialReference);if(null==n)return 0;const o=t?0:-(n/2),i=I(e.spatialReference),r=!t&&Math.abs(e.xmax-n/2)<i?n/2:e.xmax,s=!t&&Math.abs(e.xmin+n/2)<i?-n/2:e.xmin;return ee(r,o,n,!0)-ee(s,o,n,!1)}function ne(e){const t=e.storageInfo.origin.x,n=Z(e.spatialReference,!0);if(null==n)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const o=n/2,{nativePixelSize:i,storageInfo:r,extent:s}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:c}=r;let f=i.x;const u=[],x=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(x?0:o),p=x?n-t:o-t;for(let h=0;h<=a;h++){const e=(s.xmax-t)/f/l,n=e-Math.floor(e)===0?e:Math.ceil(e),o=p/f/l,i=o-Math.floor(o)===0?o:Math.ceil(o),r=Math.floor(m/f/l),a=Math.round(m/f)%l,x=(l-Math.round(p/f)%l)%l;u.push({resolutionX:f,blockWidth:l,datasetColumnCount:n,worldColumnCountFromOrigin:i,leftMargin:a,rightPadding:x,originColumnOffset:r}),f*=c}return{originX:t,halfWorldWidth:o,pyramidsInfo:u,hasGCSSShiftTransform:x}}function oe(e){if(!e||e.isGeographic)return e;const t=String(e.wkid||e.wkt2||e.wkt);let n;if(R.has(t))n=R.get(t);else{n=(e.wkid?i.coordsys(e.wkid):i.fromString(r.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),R.set(t,n)}return new x({wkid:n})}function ie(e){const t=e.isAdaptive&&null==e.spacing;let n=e.spacing||[y,y],o=re(e),i={cols:o.size[0]+1,rows:o.size[1]+1};const r=o.outofBoundPointCount>0&&o.outofBoundPointCount<o.offsets.length/2;let s=o.outofBoundPointCount===o.offsets.length/2||t&&r?[0,0]:h(o.offsets,i,n,w);const a=(s[0]+s[1])/2,l=e.projectedExtent.spatialReference,c=e.srcBufferExtent.spatialReference;if(t&&(r||a>w)&&(l.isGeographic||B(l),n=[d,d],o=re({...e,spacing:n}),i={cols:o.size[0]+1,rows:o.size[1]+1},s=h(o.offsets,i,n,w)),o.error=s,n[0]>1&&(o.coefficients=se(o.offsets,i,r)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)o.gcsGrid={offsets:o.offsets,coefficients:o.coefficients,spacing:n};else{const t=B(l);if(null!=t&&!t.isEnvelope){const t=oe(l),s=D(e.projectedExtent,t),{offsets:a}=re({...e,srcBufferExtent:s,spacing:n}),c=se(a,i,r);o.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return o}function re(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:o,datumTransformation:i,rasterTransform:r}=e,s=t.spatialReference,a=n.spatialReference;p();const{xmin:l,ymin:f,xmax:u,ymax:x}=t,m=Z(a),h=null!=m&&(e.hasWrapAround||"gcs-shift"===r?.type),g=e.spacing||[y,y],w=g[0]*o.x,M=g[1]*o.y,R=1===g[0],P=Math.ceil((u-l)/w-.1/g[0])+(R?0:1),b=Math.ceil((x-f)/M-.1/g[1])+(R?0:1),E=A({cols:P,rows:b,xmin:l,ymax:x,xres:w,yres:M,inSR:s,outSR:a,datumTransformation:i,preferPE:g[0]<=d,usePixelCenter:R}),G=[];let k,j=0;const T=R?-1:NaN,{xmin:N,xmax:v,ymax:C,width:_,height:z}=n,L=I(a,S),W=null!=m&&N>0&&v>m/2,O=B(s),F=null!=O&&O.poleLocation>0;for(let p=0;p<P;p++){const e=[];for(let t=0;t<b;t++){let n=E[p*b+t];if(h&&n[0]>v&&n[0]>m/2-L?n[0]-=m:h&&0===p&&n[0]<0&&W&&!r&&(n[0]+=m),!n||isNaN(n[0])||isNaN(n[1]))G.push(T),G.push(T),e.push(null),j++;else{if(r){const e=r.inverseTransform(new c({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}e.push(n),p>0&&h&&k[t]&&n[0]<k[t][0]&&(n[0]+=m,F&&n[0]>v&&n[0]>m&&(n[0]-=m)),G.push((n[0]-N)/_),G.push((C-n[1])/z)}}k=e}return{offsets:G,error:null,coefficients:null,outofBoundPointCount:j,spacing:g,size:R?[P,b]:[P-1,b-1]}}function se(e,t,n){const{cols:o,rows:i}=t,r=new Float32Array((o-1)*(i-1)*2*6),s=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let l=0;l<o-1;l++){for(let t=0;t<i-1;t++){let n=l*i*2+2*t;const c=e[n],f=e[n+1],u=e[n+2],x=e[n+3];n+=2*i;const m=e[n],p=e[n+1],h=e[n+2],g=e[n+3];let y=0,d=12*(t*(o-1)+l);for(let e=0;e<3;e++)r[d++]=s[y++]*c+s[y++]*u+s[y++]*h;y=0;for(let e=0;e<3;e++)r[d++]=s[y++]*f+s[y++]*x+s[y++]*g;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*c+a[y++]*m+a[y++]*h;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*f+a[y++]*p+a[y++]*g}if(n)for(let e=0;e<r.length;e++)isNaN(r[e])&&(r[e]=-1)}return r}function ae(e,t){const n=e.clone().normalize();return 1===n.length?n[0]:K(n,t)}function le(e){const{spatialReference:t}=e,n=m(t);if(!n)return e;const[i,r]=n.valid,s=r-i;let a=0;if(e.xmin<i){const t=i-e.xmin;a=Math.ceil(t/s)}else if(e.xmin>r){const t=e.xmin-r;a=-Math.ceil(t/s)}return new o({spatialReference:e.spatialReference,xmin:e.xmin+a*s,ymin:e.ymin,xmax:e.xmax+a*s,ymax:e.ymax})}function ce(e,t,o){const{storageInfo:i,pixelSize:r}=t;let s=0,a=!1;const{pyramidResolutions:l}=i,f="mixed"===i.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,i.tileInfo.dpi/96)):1,u=(e.x+e.y)/2/f;if(null!=l&&l.length){const e=l[l.length-1],i=(e.x+e.y)/2,f=(r.x+r.y)/2;if(u<=f)s=0;else if(u>=i)s=l.length,a=u/i>8;else{let e,t=f;for(let n=1;n<=l.length;n++){if(e=(l[n-1].x+l[n-1].y)/2,u<=e){u===e?s=n:"down"===o?(s=n-1,a=u/t>8):s="up"===o||u-t>e-u||u/t>2?n:n-1;break}t=e}}const x=0===s?r:l[s-1];if(a){Math.min(x.x,x.y)*n(t.spatialReference)>19567&&(a=!1)}return{pyramidLevel:s,pyramidResolution:new c({x:x.x,y:x.y,spatialReference:t.spatialReference}),excessiveReading:a}}const x=Math.log(e.x/r.x)/Math.LN2,m=Math.log(e.y/r.y)/Math.LN2,p=t.storageInfo.maximumPyramidLevel||0;s="down"===o?Math.floor(Math.min(x,m)):"up"===o?Math.ceil(Math.max(x,m)):Math.round((x+m)/2),s<0?s=0:s>p&&(a=s>p+3,s=p);const h=2**s;return{pyramidLevel:s,pyramidResolution:new c({x:h*t.nativePixelSize.x,y:h*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function fe(e,t,n=!1){const{pixelSize:o,extent:i}=e,r=N(i,t,!1),s=D(ae(i,(o.x+o.y)/16),t,r);return!s||n||0===te(s)?s:V(i,t,r)}function ue(e,t,n){const o=n?.tileSize??512,i=n?.alignGlobalDatasetWithAGOL??!0,r=!!n?.limitToSrcResolution,{extent:s,pixelSize:a}=e,l=_(a,t,s);if(null==l)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const c=(l.x+l.y)/2,f=z(c,t),u=256/o,x=t.isGeographic?295828763.7958547*u:591657527.591555*u,m=(t.isGeographic?.703125:156543.03392800014)*u;let p="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const h=fe(e,t,!0),g=Math.min(Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2),Math.ceil(Math.log(x/2/f)/Math.LN2));if(!p&&h&&i&&(t.isGeographic||t.isWebMercator)){const n=Z(t);if(p=te(h)>0||null!=n&&h.width>n/4,!p&&null!=n){let t=-1;if(g<3)t=2**g*c*o;else if(e.storageInfo){const{maximumPyramidLevel:n=0,pyramidScalingFactor:i=2}=e.storageInfo;t=i**n*c*o}const i=Math.ceil(n/t);p=1===i||2===i&&n/2-h.xmax<t}}let y,d=f;const w=1.001,M=Math.min(2,Math.max(1.414,e.storageInfo?.pyramidScalingFactor||2));if(p){d=x;const n=xe(e,t);y={x:n.x*m,y:n.y*m}}else{y={x:a.x,y:a.y};let e=0;for(;d<x*(w/2)&&e<g;)e++,d*=M,y.x*=M,y.y*=M;Math.max(d,x)/Math.min(d,x)<=w&&(d=x)}const R=[d],S=[{x:y.x,y:y.y}],P=70.5310735,b=Math.min(P,f)/w;for(;d>=b;)d/=M,y.x/=M,y.y/=M,R.push(d),S.push({x:y.x,y:y.y});if(r){const e=.001*a.x;let t=S.findIndex(t=>t.x>=a.x-e&&t.x<=a.x+e);t>-1?(S.length=t+1,R.length=t+1):(t=S.findIndex(t=>t.x<=a.x+e),t>0&&(S.length=t,R.length=t))}return{projectedPixelSize:l,scales:R,srcResolutions:S,isCustomTilingScheme:!p}}function xe(e,t){if(t.isWGS84||t.isWebMercator){const n=t.isGeographic?1341104507446289e-21:.29858214164761665,o=t.isGeographic?4326:3857,i=fe(e,new x({wkid:o}),!0),r=_({x:n,y:n},e.spatialReference,i);return{x:r.x/n,y:r.y/n}}const n=_(e.pixelSize,t,e.extent),o=(n.x+n.y)/2;return{x:e.pixelSize.x/o,y:e.pixelSize.y/o}}function me(e,t){const{spatialReference:n,lods:o}=t,{x:i,y:r}=xe(e,n);return o.map(({resolution:e})=>({x:e*i,y:e*r}))}function pe(e){let t=0;for(const n of e){const e=n.length;let o=n[0][0]*(n[1][1]-n[e-2][1]);for(let t=1;t<e-1;t++)o+=n[t][0]*(n[t+1][1]-n[t-1][1]);t+=o/2}return Math.abs(t)}export{ue as computeProjectedScales,xe as computeSrcResolutionRatio,me as computeSrcResolutions,y as defaultGridSpacing,w as defaultProjectionToleranceInPixels,N as getDefaultDatumTransformationForDataset,A as getProjectedGridPoints,ie as getProjectionOffsetGrid,ne as getRasterDatasetAlignmentInfo,L as getSourceScale,Z as getWorldWidth,te as getWorldWrapCount,T as load,d as minimumGridSpacing,fe as projectDatasetExtent,_ as projectDatasetResolution,D as projectExtent,W as projectPoint,H as projectPolygon,v as projectResolution,le as shiftExtent,ae as snapExtent,ce as snapPyramid};
2
+ import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getMetersPerUnitForSR as n}from"../../../core/units.js";import o from"../../../geometry/Extent.js";import{P as i,a as r,b as s,c as a,d as l}from"../../../chunks/pe.js";import c from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{projectWithoutEngine as u}from"../../../geometry/projectionUtils.js";import x from"../../../geometry/SpatialReference.js";import{getInfo as m}from"../../../geometry/support/spatialReferenceUtils.js";function p(){if(!j)throw new t("rasterprojectionhelper-project","projection operator is not loaded")}const h=(e,t,n,o=0)=>{if(1===n[0])return[0,0];let i=1,r=-1,s=1,a=-1;for(let g=0;g<e.length;g+=2)isNaN(e[g])||(i=i>e[g]?e[g]:i,r=r>e[g]?r:e[g],s=s>e[g+1]?e[g+1]:s,a=a>e[g+1]?a:e[g+1]);const{cols:l,rows:c}=t,f=(r-i)/l/n[0],u=(a-s)/c/n[1],x=2*o;let m=0,p=!1,h=[0,0];for(let g=0;g<l-3;g++){for(let t=0;t<c-3;t++){const n=g*c*2+2*t,o=(e[n]+e[n+4]+e[n+4*c]+e[n+4*c+4])/4,i=(e[n+1]+e[n+5]+e[n+4*c+1]+e[n+4*c+5])/4,r=Math.abs((o-e[n+2*c+2])/f),s=Math.abs((i-e[n+2*c+3])/u);if(r+s>m&&(m=r+s,h=[r,s]),x&&m>x){p=!0;break}}if(p)break}return h},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,d=4,w=d,M=new Map,R=new Map,S=500,P=39.37,b=96;let E,G,k,j=!1;async function T(){return E||(E=Promise.withResolvers(),G=await(import("../../../geometry/operators/projectOperator.js")),k=await(import("../../../geometry/operators/support/geographicTransformationUtils.js")),G.projectIsLoaded()||await G.projectLoad(),k.isLoaded()||await k.load(),j=!0,E.resolve()),E.promise}function N(e,t,n){if(p(),n){const n=G.projectExecute(e,t);return k.getTransformation(t,e.spatialReference,n)}return k.getTransformation(e.spatialReference,t,e)}function v(e,t,n,i){const r=e.spatialReference;if(!r||!t||r.equals(t))return e;p();const s=n.center,a=new o({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:r}),l=G.projectExecute(a,t,{geographicTransformation:i}),c=Z(t);return null==l||null!=c&&l.width>=c?C(e,r,t):{x:l.width,y:l.height}}function C(e,t,o){const i=n(t)/n(o);return{x:e.x*i,y:e.y*i}}function _(e,o,i){const{spatialReference:r}=i;if(!r||!o||r.equals(o))return e;if(r.isGeographic&&o.isGeographic)return C(e,r,o);if(p(),!j)throw new t("raster-projection-helper:project-dataset-resolution","geometry engine is not loaded");let{x:s,y:a}=e;const l=(s+a)/2*n(r);let c=1;l>30&&(c=30/l,s*=c,a*=c);const u=256,x=s*u/2,m=a*u/2,{x:h,y:g}=i.center,y=[];for(let t=0;t<=u;t++)y.push([h-x,g-m+t*a]);for(let t=1;t<=u;t++)y.push([h-x+t*s,g+m]);for(let t=1;t<=u;t++)y.push([h+x,g+m-t*a]);for(let t=1;t<u;t++)y.push([h+x-t*s,g-m]);y.push(y[0]);const d=new f({rings:[y],spatialReference:r}),w=G.projectExecute(d,o);if(!w)return C(e,r,o);const M=w.extent,R=Z(o);if(null==M||null!=R&&M.width>=R)return C(e,r,o);const S=pe(w.rings),P=s*a*u*u,b=Math.sqrt(S/P)/c,E={x:M.width/c/u,y:M.height/c/u},k={x:s*b,y:a*b},T=E.x*E.y;return Math.abs(T-k.x*k.y)/T<.1?E:k}function z(e,t){return("number"==typeof e?e:(e.x+e.y)/2)*n(t)*b*P}function L(e,t){const{pixelSize:n,extent:o}=e;return z(_(n,t,o),t)}function I(e,t=.01){return n(e)?t/n(e):0}function W(e,t,n,o=!0){const i=e.spatialReference;if(i.equals(t))return e;p();const r=G.projectExecute(e,t,{geographicTransformation:n});return o&&r?(O([e],[r],i,t),r):r}function O(e,t,n,o){const i=$(n,!0),r=$(o,!0),s=I(n,S),a=I(o,S);if(s&&null!=i&&null!=r)for(let l=0;l<e.length;l++){const n=t[l];if(!n)continue;const{x:o}=e[l],{x:c}=n;c>=r[1]-a&&Math.abs(o-i[0])<s?n.x-=r[1]-r[0]:c<=r[0]+a&&Math.abs(o-i[1])<s&&(n.x+=r[1]-r[0])}}function A(e){const{inSR:t,outSR:n,preferPE:o}=e;if(t.equals(n)){const{points:t}=J(e,null);return t}if(t.isWebMercator&&n.isWGS84||t.isWGS84&&n.isWebMercator)return Y(e);if(o){if(t.isGeographic)return q(e);if(null!=B(t))return q(e)}return F(e)}function F(e){const{points:t}=J(e,null),{inSR:n,outSR:o,datumTransformation:i}=e,r=t.map(e=>new c(e[0],e[1],n)),s=G.projectExecuteMany(r,o,{geographicTransformation:i});return i&&O(r,s,n,o),s.map(e=>e?[e.x,e.y]:[NaN,NaN])}function q(e){const{inSR:t,outSR:n,datumTransformation:o}=e,s=B(t),{points:c,mask:f}=J(e,s);if(!t.isGeographic){const e=t.wkid?i.coordsys(t.wkid):i.fromString(t.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.projToGeog(e,c.length,c)}if(null!=o&&o.steps.length){let e;const t=179.9955;if(n.isGeographic&&(e=c.map(([e])=>e>t?1:e<-t?-1:0)),o.steps.forEach(e=>{const t=e.wkid?i.geogtran(e.wkid):i.fromString(r.PE_TYPE_GEOGTRAN,e.wkt);l.geogToGeog(t,c.length,c,null,e.isInverse?r.PE_TRANSFORM_2_TO_1:r.PE_TRANSFORM_1_TO_2)}),e)for(let n=0;n<c.length;n++){const o=e[n],i=c[n][0],r=i>t?1:i<-t?-1:0;o&&r&&o!==r&&(c[n][0]=o>0?i+360:i-360)}}if(!n.isGeographic){const e=B(n,!0),t=null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];X(c,t);const o=n.wkid?i.coordsys(n.wkid):i.fromString(n.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,n.wkt2||n.wkt);a.geogToProj(o,c.length,c)}let u=c;if(f&&c.length!==f.length){u=[];for(let e=0,t=0;e<f.length;e++)f[e]?u.push(c[t++]):u.push([NaN,NaN])}return u}function Y(e){const{cols:t,rows:n,xres:o,yres:i,usePixelCenter:r,inSR:s,outSR:a}=e;let{xmin:l,ymax:f}=e;r&&(l+=o/2,f-=i/2);const x=[],m=[],p=Math.max(t,n);for(let g=0;g<p;g++){const e=l+o*Math.min(t,g),r=f-i*Math.min(n,g),p=u(new c({x:e,y:r,spatialReference:s}),s,a);g<=t&&x.push(p.x),g<=n&&m.push(p.y)}const h=[];for(let c=0;c<t;c++)for(let e=0;e<n;e++)h.push([x[c],m[e]]);return h}function B(e,t=!1){let n=e.wkid||e.wkt2||e.wkt;if(!n||e.isGeographic)return null;if(n=String(n),M.has(n)){const e=M.get(n);return t?e?.gcs:e?.pcs}const o=e.wkid?i.coordsys(e.wkid):i.fromString(e.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=U(o,I(e,1e-4)),a=U(o,0,!0);return M.set(n,{pcs:s,gcs:a}),t?a:s}function U(e,t=0,n=!1){const o=s.generate(e),i=n?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!o||!i?.length)return null;let r=!1,a=i.find(e=>1===e.getInclusive()&&1===e.getKind());if(!a){if(a=i.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;r=!0}const l=n?0:(2===o.getNorthPoleLocation()?1:0)|(2===o.getSouthPoleLocation()?2:0),c=o.isPannableRectangle(),f=a.getCoord();if(r)return{isEnvelope:r,isPannable:c,vertices:f,coef:null,bbox:[f[0][0]-t,f[0][1]-t,f[1][0]+t,f[1][1]+t],poleLocation:l};let u=0;const x=[];let[m,p]=f[0],[h,g]=f[0];for(let s=0,y=f.length;s<y;s++){u++,u===y&&(u=0);const[e,t]=f[s],[n,o]=f[u];if(o===t)x.push([e,n,t,o,2]);else{const i=(n-e)/(o-t||1e-4),r=e-i*t;t<o?x.push([i,r,t,o,0]):x.push([i,r,o,t,1])}m=m<e?m:e,p=p<t?p:t,h=h>e?h:e,g=g>t?g:t}return{isEnvelope:!1,isPannable:c,vertices:f,coef:x,bbox:[m,p,h,g],poleLocation:l}}function J(e,t){const n=[],{cols:o,rows:i,xres:r,yres:s,usePixelCenter:a}=e;let{xmin:l,ymax:c}=e;if(a&&(l+=r/2,c-=s/2),null==t){for(let e=0;e<o;e++)for(let t=0;t<i;t++)n.push([l+r*e,c-s*t]);return{points:n}}const f=new Uint8Array(o*i);if(t.isEnvelope){const{isPannable:e,bbox:[a,u,x,m]}=t;for(let t=0,p=0;t<o;t++){const o=l+r*t,h=e||o>=a&&o<=x;for(let e=0;e<i;e++,p++){const t=c-s*e;h&&t>=u&&t<=m&&(n.push([o,t]),f[p]=1)}}return{points:n,mask:f}}const u=t.coef,x=[];for(let m=0;m<i;m++){const e=c-s*m,t=[],n=[];for(let i=0;i<u.length;i++){const[o,r,s,a,l]=u[i];if(e===s&&s===a)t.push(o),t.push(r),n.push(2),n.push(2);else if(e>=s&&e<=a){const i=o*e+r;t.push(i),n.push(l)}}let o=t;if(t.length>2){let e=2===n[0]?0:n[0],i=t[0];o=[];for(let r=1;r<n.length;r++)2===n[r]&&r!==n.length-1||(n[r]!==e&&(o.push(0===e?Math.min(i,t[r-1]):Math.max(i,t[r-1])),e=n[r],i=t[r]),r===n.length-1&&o.push(0===n[r]?Math.min(i,t[r]):Math.max(i,t[r])));o.sort((e,t)=>e-t)}else t[0]>t[1]&&(o=[t[1],t[0]]);x.push(o)}for(let m=0,p=0;m<o;m++){const e=l+r*m;for(let t=0;t<i;t++,p++){const o=c-s*t,i=x[t];if(2===i.length)e>=i[0]&&e<=i[1]&&(n.push([e,o]),f[p]=1);else if(i.length>2){let t=!1;for(let n=0;n<i.length;n+=2)if(e>=i[n]&&e<=i[n+1]){t=!0;break}t&&(n.push([e,o]),f[p]=1)}}}return{points:n,mask:f}}function X(e,t){const[n,o]=t;for(let i=0;i<e.length;i++){const t=e[i][1];(t<n||t>o)&&(e[i]=[NaN,NaN])}}function K(e,t){const n=Z(e[0].spatialReference);if(e.length<2||null==n)return e[0];if(t=t??I(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length)return e[0];let{xmin:i,xmax:r,ymin:s,ymax:a}=e[0];for(let o=1;o<e.length;o++){const t=e[o];r=t.xmax+n*o,s=Math.min(s,t.ymin),a=Math.max(a,t.ymax)}return new o({xmin:i,xmax:r,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function D(t,n,i=null,r=!0){const s=t.spatialReference;if(s.equals(n)||!n)return t;const a=te(t),l=Z(s,!0),c=Z(n);if(0===a||null==l||null==c){const e=V(t,n,i,r);if(e&&null==l&&null!=c&&Math.abs(e.width-c)<I(n)&&G.projectIsLoaded()){const o=B(s);if(null!=o&&0===o.poleLocation&&t.width<(o.bbox[2]-o.bbox[0])/2)return Q(t,n)||e}return e}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>I(s)){const{xmin:e,xmax:n}=t;for(let i=0;i<=a;i++){const r=0===i?e:-l/2,c=i===a?n-l*i:l/2;f[i]=new o({xmin:r,xmax:c,ymin:t.ymin,ymax:t.ymax,spatialReference:s})}}const u=f.map(e=>V(e,n,i,r)).filter(e);return 0===u.length?null:K(u)}function H(e,t,n){if("extent"===e.type){const{xmin:t,ymin:n,xmax:o,ymax:i,spatialReference:r}=e;e=new f({rings:[[[t,i],[o,i],[o,n],[t,n],[t,i]]],spatialReference:r})}return e.spatialReference.equals(t)?e:(p(),G.projectExecute(e,t,{geographicTransformation:n}))}function Q(e,t){const n=Z(t);if(null==n)return null;let{xmin:i,ymin:r,xmax:s,ymax:a}=e;const l=e.spatialReference,c=new f({spatialReference:l,rings:[[[i,r],[s,r],[s,a],[i,a],[i,r]]]}),u=G.projectExecute(c,t);if(2!==u.rings.length||!u.rings[0].length||!u.rings[1].length)return null;const{rings:x}=u,m=I(l),p=new o({spatialReference:t});for(let o=0;o<2;o++){i=s=x[o][0][0],r=a=x[o][0][1];for(let e=0;e<x[o].length;e++)i=i>x[o][e][0]?x[o][e][0]:i,s=s<x[o][e][0]?x[o][e][0]:s,r=r>x[o][e][1]?x[o][e][1]:r,a=a<x[o][e][1]?x[o][e][1]:a;if(0===o)p.ymin=r,p.ymax=a,p.xmin=i,p.xmax=s;else if(p.ymin=Math.min(p.ymin,r),p.ymax=Math.max(p.ymax,a),Math.abs(s-n/2)<m)p.xmin=i,p.xmax=p.xmax+n;else{if(!(Math.abs(i+n/2)<m))return null;p.xmax=s+n}}return p}function V(e,t,n,o=!0,i=!0){const r=e.spatialReference;if(r.equals(t)||!t)return e;p();const s=G.projectExecute(e,t,{geographicTransformation:n});if(i&&t.isWebMercator&&s&&(s.ymax=Math.min(20037508.342787,s.ymax),s.ymin=Math.max(-20037508.342787,s.ymin),s.ymin>=s.ymax))return null;if(!o||!s)return s;const a=$(r,!0),l=$(t,!0);if(null==a||null==l)return s;const f=I(r,.001),u=I(r,S),x=I(t,.001);if(Math.abs(s.xmin-l[0])<x&&Math.abs(s.xmax-l[1])<x){const o=Math.abs(e.xmin-a[0]),i=Math.abs(a[1]-e.xmax);if(o<f&&i>u){s.xmin=l[0];const o=[];o.push(new c(e.xmax,e.ymin,r)),o.push(new c(e.xmax,(e.ymin+e.ymax)/2,r)),o.push(new c(e.xmax,e.ymax,r));const i=o.map(e=>W(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmax=Math.max.apply(null,i)}if(i<f&&o>u){s.xmax=l[1];const o=[];o.push(new c(e.xmin,e.ymin,r)),o.push(new c(e.xmin,(e.ymin+e.ymax)/2,r)),o.push(new c(e.xmin,e.ymax,r));const i=o.map(e=>W(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmin=Math.min.apply(null,i)}}else{const e=I(t,.001);Math.abs(s.xmin-l[0])<e&&(s.xmin=l[0]),Math.abs(s.xmax-l[1])<e&&(s.xmax=l[1])}return s}function Z(e,t=!1){if(!e)return null;const n=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*n:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function $(e,t=!1){if(e.isGeographic)return[-180,180];const n=Z(e,t);return n?[-n/2,n/2]:null}function ee(e,t,n,o){let i=(e-t)/n;return i-Math.floor(i)!==0?i=Math.floor(i):o&&(i-=1),i}function te(e,t=!1){const n=Z(e.spatialReference);if(null==n)return 0;const o=t?0:-(n/2),i=I(e.spatialReference),r=!t&&Math.abs(e.xmax-n/2)<i?n/2:e.xmax,s=!t&&Math.abs(e.xmin+n/2)<i?-n/2:e.xmin;return ee(r,o,n,!0)-ee(s,o,n,!1)}function ne(e){const t=e.storageInfo.origin.x,n=Z(e.spatialReference,!0);if(null==n)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const o=n/2,{nativePixelSize:i,storageInfo:r,extent:s}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:c}=r;let f=i.x;const u=[],x=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(x?0:o),p=x?n-t:o-t;for(let h=0;h<=a;h++){const e=(s.xmax-t)/f/l,n=e-Math.floor(e)===0?e:Math.ceil(e),o=p/f/l,i=o-Math.floor(o)===0?o:Math.ceil(o),r=Math.floor(m/f/l),a=Math.round(m/f)%l,x=(l-Math.round(p/f)%l)%l;u.push({resolutionX:f,blockWidth:l,datasetColumnCount:n,worldColumnCountFromOrigin:i,leftMargin:a,rightPadding:x,originColumnOffset:r}),f*=c}return{originX:t,halfWorldWidth:o,pyramidsInfo:u,hasGCSSShiftTransform:x}}function oe(e){if(!e||e.isGeographic)return e;const t=String(e.wkid||e.wkt2||e.wkt);let n;if(R.has(t))n=R.get(t);else{n=(e.wkid?i.coordsys(e.wkid):i.fromString(r.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),R.set(t,n)}return new x({wkid:n})}function ie(e){const t=e.isAdaptive&&null==e.spacing;let n=e.spacing||[y,y],o=re(e),i={cols:o.size[0]+1,rows:o.size[1]+1};const r=o.outofBoundPointCount>0&&o.outofBoundPointCount<o.offsets.length/2;let s=o.outofBoundPointCount===o.offsets.length/2||t&&r?[0,0]:h(o.offsets,i,n,w);const a=(s[0]+s[1])/2,l=e.projectedExtent.spatialReference,c=e.srcBufferExtent.spatialReference;if(t&&(r||a>w)&&(l.isGeographic||B(l),n=[d,d],o=re({...e,spacing:n}),i={cols:o.size[0]+1,rows:o.size[1]+1},s=h(o.offsets,i,n,w)),o.error=s,n[0]>1&&(o.coefficients=se(o.offsets,i,r)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)o.gcsGrid={offsets:o.offsets,coefficients:o.coefficients,spacing:n};else{const t=B(l);if(null!=t&&!t.isEnvelope){const t=oe(l),s=D(e.projectedExtent,t),{offsets:a}=re({...e,srcBufferExtent:s,spacing:n}),c=se(a,i,r);o.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return o}function re(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:o,datumTransformation:i,rasterTransform:r}=e,s=t.spatialReference,a=n.spatialReference;p();const{xmin:l,ymin:f,xmax:u,ymax:x}=t,m=Z(a),h=null!=m&&(e.hasWrapAround||"gcs-shift"===r?.type),g=e.spacing||[y,y],w=g[0]*o.x,M=g[1]*o.y,R=1===g[0],P=Math.ceil((u-l)/w-.1/g[0])+(R?0:1),b=Math.ceil((x-f)/M-.1/g[1])+(R?0:1),E=A({cols:P,rows:b,xmin:l,ymax:x,xres:w,yres:M,inSR:s,outSR:a,datumTransformation:i,preferPE:g[0]<=d,usePixelCenter:R}),G=[];let k,j=0;const T=R?-1:NaN,{xmin:N,xmax:v,ymax:C,width:_,height:z}=n,L=I(a,S),W=null!=m&&N>0&&v>m/2,O=B(s),F=null!=O&&O.poleLocation>0;for(let p=0;p<P;p++){const e=[];for(let t=0;t<b;t++){let n=E[p*b+t];if(h&&n[0]>v&&n[0]>m/2-L?n[0]-=m:h&&0===p&&n[0]<0&&W&&!r&&(n[0]+=m),!n||isNaN(n[0])||isNaN(n[1]))G.push(T),G.push(T),e.push(null),j++;else{if(r){const e=r.inverseTransform(new c({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}e.push(n),p>0&&h&&k[t]&&n[0]<k[t][0]&&(n[0]+=m,F&&n[0]>v&&n[0]>m&&(n[0]-=m)),G.push((n[0]-N)/_),G.push((C-n[1])/z)}}k=e}return{offsets:G,error:null,coefficients:null,outofBoundPointCount:j,spacing:g,size:R?[P,b]:[P-1,b-1]}}function se(e,t,n){const{cols:o,rows:i}=t,r=new Float32Array((o-1)*(i-1)*2*6),s=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let l=0;l<o-1;l++){for(let t=0;t<i-1;t++){let n=l*i*2+2*t;const c=e[n],f=e[n+1],u=e[n+2],x=e[n+3];n+=2*i;const m=e[n],p=e[n+1],h=e[n+2],g=e[n+3];let y=0,d=12*(t*(o-1)+l);for(let e=0;e<3;e++)r[d++]=s[y++]*c+s[y++]*u+s[y++]*h;y=0;for(let e=0;e<3;e++)r[d++]=s[y++]*f+s[y++]*x+s[y++]*g;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*c+a[y++]*m+a[y++]*h;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*f+a[y++]*p+a[y++]*g}if(n)for(let e=0;e<r.length;e++)isNaN(r[e])&&(r[e]=-1)}return r}function ae(e,t){const n=e.clone().normalize();return 1===n.length?n[0]:K(n,t)}function le(e){const{spatialReference:t}=e,n=m(t);if(!n)return e;const[i,r]=n.valid,s=r-i;let a=0;if(e.xmin<i){const t=i-e.xmin;a=Math.ceil(t/s)}else if(e.xmin>r){const t=e.xmin-r;a=-Math.ceil(t/s)}return new o({spatialReference:e.spatialReference,xmin:e.xmin+a*s,ymin:e.ymin,xmax:e.xmax+a*s,ymax:e.ymax})}function ce(e,t,o){const{storageInfo:i,pixelSize:r}=t;let s=0,a=!1;const{pyramidResolutions:l}=i,f="mixed"===i.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,i.tileInfo.dpi/96)):1,u=(e.x+e.y)/2/f;if(null!=l&&l.length){const e=l[l.length-1],i=(e.x+e.y)/2,f=(r.x+r.y)/2;if(u<=f)s=0;else if(u>=i)s=l.length,a=u/i>8;else{let e,t=f;for(let n=1;n<=l.length;n++){if(e=(l[n-1].x+l[n-1].y)/2,u<=e){u===e?s=n:"down"===o?(s=n-1,a=u/t>8):s="up"===o||u-t>e-u||u/t>2?n:n-1;break}t=e}}const x=0===s?r:l[s-1];if(a){Math.min(x.x,x.y)*n(t.spatialReference)>19567&&(a=!1)}return{pyramidLevel:s,pyramidResolution:new c({x:x.x,y:x.y,spatialReference:t.spatialReference}),excessiveReading:a}}const x=Math.log(e.x/r.x)/Math.LN2,m=Math.log(e.y/r.y)/Math.LN2,p=t.storageInfo.maximumPyramidLevel||0;s="down"===o?Math.floor(Math.min(x,m)):"up"===o?Math.ceil(Math.max(x,m)):Math.round((x+m)/2),s<0?s=0:s>p&&(a=s>p+3,s=p);const h=2**s;return{pyramidLevel:s,pyramidResolution:new c({x:h*t.nativePixelSize.x,y:h*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function fe(e,t,n=!1){const{pixelSize:o,extent:i}=e,r=N(i,t,!1),s=D(ae(i,(o.x+o.y)/16),t,r);return!s||n||0===te(s)?s:V(i,t,r)}function ue(e,t,n){const o=n?.tileSize??512,i=n?.alignGlobalDatasetWithAGOL??!0,r=!!n?.limitToSrcResolution,{extent:s,pixelSize:a}=e,l=_(a,t,s);if(null==l)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const c=(l.x+l.y)/2,f=z(c,t),u=256/o,x=t.isGeographic?295828763.7958547*u:591657527.591555*u,m=(t.isGeographic?.703125:156543.03392800014)*u;let p="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const h=fe(e,t,!0),g=Math.min(Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2),Math.ceil(Math.log(x/2/f)/Math.LN2));if(!p&&h&&i&&(t.isGeographic||t.isWebMercator)){const n=Z(t);if(p=te(h)>0||null!=n&&h.width>n/4,!p&&null!=n){let t=-1;if(g<3)t=2**g*c*o;else if(e.storageInfo){const{maximumPyramidLevel:n=0,pyramidScalingFactor:i=2}=e.storageInfo;t=i**n*c*o}const i=Math.ceil(n/t);p=1===i||2===i&&n/2-h.xmax<t}}let y,d=f;const w=1.001,M=Math.min(2,Math.max(1.414,e.storageInfo?.pyramidScalingFactor||2));if(p){d=x;const n=xe(e,t);y={x:n.x*m,y:n.y*m}}else{y={x:a.x,y:a.y};let e=0;for(;d<x*(w/2)&&e<g;)e++,d*=M,y.x*=M,y.y*=M;Math.max(d,x)/Math.min(d,x)<=w&&(d=x)}const R=[d],S=[{x:y.x,y:y.y}],P=70.5310735,b=Math.min(P,f)/w;for(;d>=b;)d/=M,y.x/=M,y.y/=M,R.push(d),S.push({x:y.x,y:y.y});if(r){const e=.001*a.x;let t=S.findIndex(t=>t.x>=a.x-e&&t.x<=a.x+e);t>-1?(S.length=t+1,R.length=t+1):(t=S.findIndex(t=>t.x<=a.x+e),t>0&&(S.length=t,R.length=t))}return{projectedPixelSize:l,scales:R,srcResolutions:S,isCustomTilingScheme:!p}}function xe(e,t){if(t.isWGS84||t.isWebMercator){const n=t.isGeographic?1341104507446289e-21:.29858214164761665,o=t.isGeographic?4326:3857,i=fe(e,new x({wkid:o}),!0),r=_({x:n,y:n},e.spatialReference,i);return{x:r.x/n,y:r.y/n}}const n=_(e.pixelSize,t,e.extent),o=(n.x+n.y)/2;return{x:e.pixelSize.x/o,y:e.pixelSize.y/o}}function me(e,t){const{spatialReference:n,lods:o}=t,{x:i,y:r}=xe(e,n);return o.map(({resolution:e})=>({x:e*i,y:e*r}))}function pe(e){let t=0;for(const n of e){const e=n.length;let o=n[0][0]*(n[1][1]-n[e-2][1]);for(let t=1;t<e-1;t++)o+=n[t][0]*(n[t+1][1]-n[t-1][1]);t+=o/2}return Math.abs(t)}export{pe as calculateArea2D,ue as computeProjectedScales,xe as computeSrcResolutionRatio,me as computeSrcResolutions,y as defaultGridSpacing,w as defaultProjectionToleranceInPixels,N as getDefaultDatumTransformationForDataset,A as getProjectedGridPoints,ie as getProjectionOffsetGrid,ne as getRasterDatasetAlignmentInfo,L as getSourceScale,Z as getWorldWidth,te as getWorldWrapCount,T as load,d as minimumGridSpacing,fe as projectDatasetExtent,_ as projectDatasetResolution,D as projectExtent,W as projectPoint,H as projectPolygon,v as projectResolution,le as shiftExtent,ae as snapExtent,ce as snapPyramid};
@@ -726,7 +726,7 @@ export default class FeatureReductionBinning extends FeatureReductionBinningSupe
726
726
  * @param fieldName - The name of the field.
727
727
  * @returns The matching field or `undefined`.
728
728
  * @since 5.0
729
- * @see [fields](#fields)
729
+ * @see [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fields)
730
730
  */
731
731
  getField(fieldName: string): AggregateField | null | undefined;
732
732
  /**
@@ -734,7 +734,7 @@ export default class FeatureReductionBinning extends FeatureReductionBinningSupe
734
734
  *
735
735
  * The alias is resolved in the following order:
736
736
  *
737
- * 1. [Field configuration alias](#fieldConfigurations)
737
+ * 1. The alias in [fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fieldConfigurations)
738
738
  * 2. [AggregateField.alias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/#alias) defined on the field.
739
739
  *
740
740
  * @param fieldName - The name of the field.
@@ -1306,7 +1306,7 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
1306
1306
  * @param fieldName - The name of the field.
1307
1307
  * @returns The matching field or `undefined`.
1308
1308
  * @since 5.0
1309
- * @see [fields](#fields)
1309
+ * @see [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#fields)
1310
1310
  */
1311
1311
  getField(fieldName: string): AggregateField | null | undefined;
1312
1312
  /**
@@ -1314,7 +1314,7 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
1314
1314
  *
1315
1315
  * The alias is resolved in the following order:
1316
1316
  *
1317
- * 1. [Field configuration alias](#fieldConfigurations)
1317
+ * 1. The alias in [fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#fieldConfigurations)
1318
1318
  * 2. [AggregateField.alias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AggregateField/#alias) defined on the field.
1319
1319
  *
1320
1320
  * @param fieldName - The name of the field.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{Integer as n}from"../../core/accessorSupport/ensureType.js";import{fromJSON as l,types as a}from"./domains.js";import{kebabDict as s}from"./fieldType.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{enumeration as d}from"../../core/accessorSupport/decorators/enumeration.js";var u;const c=new t({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let m=class extends o{static{u=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let o=null;try{o=t?JSON.parse(t):null}catch(r){}return o?.value??null}readValueType(e,{description:t}){let o=null;try{o=t?JSON.parse(t):null}catch(r){}return o?c.fromJSON(o.fieldValueType):null}clone(){return new u({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};e([r({type:String,json:{write:!0}})],m.prototype,"alias",void 0),e([r({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),e([r()],m.prototype,"description",void 0),e([p("description")],m.prototype,"readDescription",null),e([r({types:a,json:{read:{reader:l},write:!0}})],m.prototype,"domain",void 0),e([r({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),e([r({type:n,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),e([r({type:String,json:{write:!0}})],m.prototype,"name",void 0),e([r({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),e([d(s)],m.prototype,"type",void 0),e([r()],m.prototype,"valueType",void 0),e([p("valueType",["description"])],m.prototype,"readValueType",null),e([r({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=u=e([i("esri.layers.support.Field")],m);export{m as default};
2
+ import{__decorate as e}from"tslib";import{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o,subclass as i}from"../../core/accessorSupport/decorators.js";import{Integer as n}from"../../core/accessorSupport/ensureType.js";import{fromJSON as l,types as a}from"./domains.js";import{kebabDict as s}from"./fieldType.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{enumeration as d}from"../../core/accessorSupport/decorators/enumeration.js";var u;const c=new t({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",marginOfError:"margin-of-error",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let m=class extends r{static{u=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(o){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(o){}return r?c.fromJSON(r.fieldValueType):null}clone(){return new u({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};e([o({type:String,json:{write:!0}})],m.prototype,"alias",void 0),e([o({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),e([o()],m.prototype,"description",void 0),e([p("description")],m.prototype,"readDescription",null),e([o({types:a,json:{read:{reader:l},write:!0}})],m.prototype,"domain",void 0),e([o({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),e([o({type:n,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),e([o({type:String,json:{write:!0}})],m.prototype,"name",void 0),e([o({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),e([d(s)],m.prototype,"type",void 0),e([o()],m.prototype,"valueType",void 0),e([p("valueType",["description"])],m.prototype,"readValueType",null),e([o({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=u=e([i("esri.layers.support.Field")],m);export{m as default};
@@ -826,7 +826,7 @@ export default class SubtypeSublayer extends SubtypeSublayerSuperclass {
826
826
  /**
827
827
  * Returns the title of a [feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/). The feature title is generated based on the following conditions for a `SubtypeSublayer`.
828
828
  * - If the feature has a popup title configured, then the popup title will be returned.
829
- * - Otherwise, the [objectId](#objectIdField) of the associated feature will be returned.
829
+ * - Otherwise, the [objectIdField](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/#objectIdField) of the associated feature will be returned.
830
830
  *
831
831
  * @param graphic - The [graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) for which to generate a title.
832
832
  * @param options - Additional options that control how the title is generated.
@@ -127,7 +127,7 @@ export default class TimeSeriesInfo extends TimeSeriesInfoSuperclass {
127
127
  * series included `temperature_Jan2020`, `temperature_Jan2021`, `temperature_Jan2022`, etc. the time value unit
128
128
  * would be `month` to reflect each field's relevance over a singular month.
129
129
  */
130
- accessor timeValueUnits: "days" | "hours" | "minutes" | "months" | "seconds" | "years" | null | undefined;
130
+ accessor timeValueUnits: "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "decades" | "centuries" | null | undefined;
131
131
  /**
132
132
  * The title of the time series configuration. This is a user-friendly name that can be used in the UI of
133
133
  * client applications to refer to the specific time series.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{sqlIn as e}from"../../core/sql.js";import{unpackFieldNames as t,featureHasFields as o}from"./fieldUtils.js";import{loadArcade as i}from"../../support/loadArcade.js";async function s(i,s,n,r){const u=new Array(s.length),l=new Map,c=new Map,a=t(i.fieldsIndex,n.outFields),d=!0===i.capabilities?.operations?.supportsQuery&&null!=i.queryFeatures,f=r?.hasRequiredFields??o;for(let e=0;e<s.length;e++){const t=s[e];if(d&&!t.isAggregate){if(n.returnGeometry||!f(t,a)){const o=t.getObjectId();if(null!=o){l.set(o,{graphic:t,index:e});continue}const i=t.getGlobalId();if(null!=i){c.set(i,{graphic:t,index:e});continue}}u[e]=t}else u[e]=t}if(!d||!i.queryFeatures||0===l.size&&0===c.size)return u.filter(Boolean);const p=[],y=(e,t)=>{t&&(e.outFields??=[],e.outFields.includes(t)||e.outFields.push(t))};if(l.size>0){const e=n.clone();y(e,i.objectIdField),"uniqueIdFields"in i&&i.uniqueIdFields?.length&&(e.outFields??=[],e.outFields.push(...i.uniqueIdFields)),e.objectIds=Array.from(l.keys()),p.push({type:"object-id",query:e,map:l})}const g="globalIdField"in i?i.globalIdField:null;if(null!=g&&c.size>0){const t=n.clone();y(t,g);const o=Array.from(c.keys());t.where=e(g,o),p.push({type:"global-id",query:t,map:c})}const b=r?.updateSourceAttributes??!1;for(const{type:e,query:t,map:o}of p)try{const s=await i.queryFeatures(t,r);for(const t of s.features){const i="object-id"===e?t.getObjectId():t.getGlobalId();if(null==i)continue;const s=o.get(i);if(!s)continue;const{graphic:n,index:r}=s;if(b&&t.attributes){n.attributes??={};for(const e of a)e in t.attributes&&(n.attributes[e]=t.attributes[e])}const{geometry:l,origin:c}=n;t.geometry||=l,t.origin=c,u[r]=t}}catch{}return u.filter(Boolean)}async function n(e){if(e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type))return i()}export{s as fetchFeaturePopupFeatures,n as loadFeaturePopupArcadeModules};
2
+ import{sqlIn as e}from"../../core/sql.js";import{unpackFieldNames as t,featureHasFields as i}from"./fieldUtils.js";import{loadArcade as o}from"../../support/loadArcade.js";async function r(o,r,s,n){const u=new Array(r.length),l=new Map,c=new Map,a=t(o.fieldsIndex,s.outFields),d=!0===o.capabilities?.operations?.supportsQuery&&null!=o.queryFeatures,f=n?.hasRequiredFields??i;for(let e=0;e<r.length;e++){const t=r[e];if(d&&!t.isAggregate){if(s.returnGeometry||!f(t,a)){const i=t.getObjectId();if(null!=i){l.set(i,{graphic:t,index:e});continue}const o=t.getGlobalId();if(null!=o){c.set(o,{graphic:t,index:e});continue}}u[e]=t}else u[e]=t}if(!d||!o.queryFeatures||0===l.size&&0===c.size)return u.filter(Boolean);const p=[],y=(e,t)=>{t&&(e.outFields??=[],e.outFields.includes(t)||e.outFields.push(t))};if(l.size>0){const e=s.clone();y(e,o.objectIdField),"uniqueIdFields"in o&&o.uniqueIdFields?.length&&(e.outFields??=[],e.outFields.push(...o.uniqueIdFields)),e.objectIds=Array.from(l.keys()),p.push({type:"object-id",query:e,map:l})}const g="globalIdField"in o?o.globalIdField:null;if(null!=g&&c.size>0){const t=s.clone();y(t,g);const i=Array.from(c.keys());t.where=e(g,i),p.push({type:"global-id",query:t,map:c})}const b=n?.updateSourceAttributes??!1;for(const{type:e,query:t,map:i}of p)try{const r=await o.queryFeatures(t,n);r.exceededTransferLimit&&n?.onExceededTransferLimit?.(Array.from(i.values(),({graphic:e})=>e));for(const t of r.features){const o="object-id"===e?t.getObjectId():t.getGlobalId();if(null==o)continue;const r=i.get(o);if(!r)continue;const{graphic:s,index:n}=r;if(b&&t.attributes){s.attributes??={};for(const e of a)e in t.attributes&&(s.attributes[e]=t.attributes[e])}const{geometry:l,origin:c}=s;t.geometry||=l,t.origin=c,u[n]=t}}catch{}return u.filter(Boolean)}async function s(e){if(e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type))return o()}export{r as fetchFeaturePopupFeatures,s as loadFeaturePopupArcadeModules};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function e(e){const t=e.fieldTimeMappings??[],n=e.timeValueUnits??"years",a=t.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${r(n)}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nvar hasCurrentTime = hasCurrentStart || hasCurrentEnd;\n\nif (!hasCurrentTime) {\n return $feature.${t[0].fieldName};\n}\n\nvar currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\nvar formattedCurrentTime = Text(currentTime, timeFormat);\n\nvar result = Decode(formattedCurrentTime,\n${a.join("\n")}\n null\n);\n\nreturn result;`}function r(e){switch(e){case"years":default:return"Y";case"months":return"Y-M";case"days":return"Y-M-D";case"hours":case"minutes":return"Y-M-D-H-mm";case"seconds":return"Y-M-D-H-mm-ss"}}export{e as createTimeSeriesExpression,r as getArcadeTimeFormatString};
2
+ function e(e){const t=e.fieldTimeMappings??[],n=e.timeValueUnits??"years",a=t.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${r(n)}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nvar hasCurrentTime = hasCurrentStart || hasCurrentEnd;\n\nif (!hasCurrentTime) {\n return $feature.${t[0].fieldName};\n}\n\nvar currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\nvar formattedCurrentTime = Text(currentTime, timeFormat);\n\nvar result = Decode(formattedCurrentTime,\n${a.join("\n")}\n null\n);\n\nreturn result;`}function r(e){switch(e){case"centuries":case"decades":case"years":default:return"Y";case"months":return"Y-M";case"weeks":case"days":return"Y-M-D";case"hours":case"minutes":return"Y-M-D-H-mm";case"seconds":return"Y-M-D-H-mm-ss"}}export{e as createTimeSeriesExpression,r as getArcadeTimeFormatString};
@@ -27,7 +27,7 @@ export type FieldType = "small-integer" | "integer" | "single" | "double" | "lon
27
27
  *
28
28
  * @since 5.0
29
29
  */
30
- export type FieldValueType = "binary" | "coordinate" | "count-or-amount" | "currency" | "date-and-time" | "description" | "email-address" | "location-or-place-name" | "measurement" | "name-or-title" | "none" | "ordered-or-ranked" | "percentage-or-ratio" | "phone-number" | "type-or-category" | "unique-identifier" | "url";
30
+ export type FieldValueType = "binary" | "coordinate" | "count-or-amount" | "currency" | "date-and-time" | "description" | "email-address" | "location-or-place-name" | "margin-of-error" | "measurement" | "name-or-title" | "none" | "ordered-or-ranked" | "percentage-or-ratio" | "phone-number" | "type-or-category" | "unique-identifier" | "url";
31
31
 
32
32
  /**
33
33
  * Supported field formatting types.
package/layers/types.d.ts CHANGED
@@ -434,8 +434,7 @@ export interface QueryCapabilities {
434
434
  * Indicates if the layer's query operation supports returning distance values of each feature in the query result using
435
435
  * the [Query.outDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outDistance) property.
436
436
  *
437
- * @internal
438
- * @since 5.1
437
+ * @since 5.2
439
438
  */
440
439
  supportsOutDistance: boolean;
441
440
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.113",
3
+ "version": "5.2.0-next.115",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -19,8 +19,8 @@
19
19
  "type": "module",
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
- "@amcharts/amcharts5": "~5.20.5",
23
- "@arcgis/toolkit": "5.2.0-next.113",
22
+ "@amcharts/amcharts5": "~5.20.6",
23
+ "@arcgis/toolkit": "5.2.0-next.115",
24
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
25
25
  "@esri/calcite-components": "^5.2.0-next.73",
26
26
  "@vaadin/grid": "~25.2.11",
@@ -105,7 +105,7 @@ export default class FeatureContent extends FeatureContentSuperclass {
105
105
  /** A read-only map of Arcade expression names to their evaluated values for the current feature. */
106
106
  get expressionAttributes(): Record<string, any> | null | undefined;
107
107
  /**
108
- * The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) formatting. They are obtained from the feature's [graphic](#graphic) attribute values and can be read:
108
+ * The formatted attributes calculated from `fieldInfo` [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/) formatting. They are obtained from the feature's [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic) attribute values and can be read:
109
109
  * * [globally](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#FeatureFormattedAttributes-global) using the [PopupTemplate.fieldInfos](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#fieldInfos) property directly at the root level of the [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/), or
110
110
  * * [per an individual content element](https://developers.arcgis.com/javascript/latest/references/core/popup/types/#FeatureFormattedAttributes-content). This element is defined with a [FieldsContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/FieldsContent/) popup element set on the PopupTemplate [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) property.
111
111
  */
@@ -144,7 +144,7 @@ export default class FeatureContent extends FeatureContentSuperclass {
144
144
  * @default ""
145
145
  */
146
146
  get heading(): string;
147
- /** Indicates whether the current [graphic](#graphic) resides in a non-spatial table. */
147
+ /** Indicates whether the current [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic) resides in a non-spatial table. */
148
148
  get isFeatureFromTable(): boolean;
149
149
  /** A read-only property containing metadata regarding the last edit performed on a feature. */
150
150
  get lastEditInfo(): LastEditInfo | null | undefined;
@@ -161,9 +161,9 @@ export default class FeatureContent extends FeatureContentSuperclass {
161
161
  get location(): Point | null | undefined;
162
162
  set location(value: PointProperties | null | undefined);
163
163
  /**
164
- * A map is required when the input [graphic](#graphic) has a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use the `$map` profile variable to access data from layers within a map. Without a map, expressions that use `$map` will throw an error.
164
+ * A map is required when the input [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic) has a popupTemplate that contains [Arcade](https://developers.arcgis.com/arcade) expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use the `$map` profile variable to access data from layers within a map. Without a map, expressions that use `$map` will throw an error.
165
165
  *
166
- * Alternatively, the [view](#view) property can be used to provide the map instance for this property.
166
+ * Alternatively, the [view](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#view) property can be used to provide the map instance for this property.
167
167
  *
168
168
  * @see [Type system](https://developers.arcgis.com/arcade/guide/types/#featuresetcollection)
169
169
  * @see [Arcade Profiles: Popup](https://developers.arcgis.com/arcade/profiles/popup/)
@@ -213,7 +213,7 @@ export default class FeatureContent extends FeatureContentSuperclass {
213
213
  * > [!WARNING]
214
214
  * >
215
215
  * > A view is required if the user expects to display content in any of the following situations:
216
- * > - The [graphic](#graphic) has a popupTemplate containing Arcade expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/) or reference the `$map` profile variable (i.e. access data from layers within a map).
216
+ * > - The [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic) has a popupTemplate containing Arcade expressions in [ExpressionInfo](https://developers.arcgis.com/javascript/latest/references/core/popup/ExpressionInfo/) or [ExpressionContent](https://developers.arcgis.com/javascript/latest/references/core/popup/content/ExpressionContent/) that may use [geometry functions](https://developers.arcgis.com/arcade/function-reference/geometry_functions/) or reference the `$map` profile variable (i.e. access data from layers within a map).
217
217
  * > - Content is displayed from the popup template of an [aggregate feature](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) (i.e. a [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/) or [bin](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/)).
218
218
  * > - Values from `date` and `timestamp-offset` [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type) should respect the associated [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeZone) or [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#timeZone).
219
219
  */
@@ -221,8 +221,8 @@ export default class FeatureContent extends FeatureContentSuperclass {
221
221
  /** Indicates whether the feature is currently waiting for all of its content to finish loading. */
222
222
  get waitingForContent(): boolean;
223
223
  /**
224
- * Fetches and updates the geometry of the [graphic](#graphic).
225
- * This method can be called to refresh the [graphic](#graphic)'s geometry before taking actions such as calling
224
+ * Fetches and updates the geometry of the [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic).
225
+ * This method can be called to refresh the [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic)'s geometry before taking actions such as calling
226
226
  * [View2D.goTo()](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#goTo) with the graphic as the `target`.
227
227
  *
228
228
  * @returns A promise that resolves when the geometry update attempt has completed.