@arcgis/core 4.26.0-next.20221207 → 4.26.0-next.20221209

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 (291) hide show
  1. package/Basemap.js +1 -1
  2. package/README.md +11 -11
  3. package/WebScene.js +1 -1
  4. package/assets/components/assets/date-picker/t9n/messages_ar.json +3 -3
  5. package/assets/components/assets/date-picker/t9n/messages_bg.json +3 -3
  6. package/assets/components/assets/date-picker/t9n/messages_bs.json +3 -3
  7. package/assets/components/assets/date-picker/t9n/messages_ca.json +3 -3
  8. package/assets/components/assets/date-picker/t9n/messages_cs.json +3 -3
  9. package/assets/components/assets/date-picker/t9n/messages_da.json +3 -3
  10. package/assets/components/assets/date-picker/t9n/messages_de.json +3 -3
  11. package/assets/components/assets/date-picker/t9n/messages_el.json +3 -3
  12. package/assets/components/assets/date-picker/t9n/messages_es.json +3 -3
  13. package/assets/components/assets/date-picker/t9n/messages_et.json +3 -3
  14. package/assets/components/assets/date-picker/t9n/messages_fi.json +3 -3
  15. package/assets/components/assets/date-picker/t9n/messages_fr.json +3 -3
  16. package/assets/components/assets/date-picker/t9n/messages_he.json +3 -3
  17. package/assets/components/assets/date-picker/t9n/messages_hr.json +3 -3
  18. package/assets/components/assets/date-picker/t9n/messages_hu.json +3 -3
  19. package/assets/components/assets/date-picker/t9n/messages_id.json +3 -3
  20. package/assets/components/assets/date-picker/t9n/messages_it.json +3 -3
  21. package/assets/components/assets/date-picker/t9n/messages_ja.json +3 -3
  22. package/assets/components/assets/date-picker/t9n/messages_ko.json +3 -3
  23. package/assets/components/assets/date-picker/t9n/messages_lt.json +3 -3
  24. package/assets/components/assets/date-picker/t9n/messages_lv.json +3 -3
  25. package/assets/components/assets/date-picker/t9n/messages_nl.json +3 -3
  26. package/assets/components/assets/date-picker/t9n/messages_no.json +3 -3
  27. package/assets/components/assets/date-picker/t9n/messages_pl.json +3 -3
  28. package/assets/components/assets/date-picker/t9n/messages_pt-BR.json +3 -3
  29. package/assets/components/assets/date-picker/t9n/messages_pt-PT.json +3 -3
  30. package/assets/components/assets/date-picker/t9n/messages_ro.json +3 -3
  31. package/assets/components/assets/date-picker/t9n/messages_ru.json +3 -3
  32. package/assets/components/assets/date-picker/t9n/messages_sk.json +3 -3
  33. package/assets/components/assets/date-picker/t9n/messages_sl.json +3 -3
  34. package/assets/components/assets/date-picker/t9n/messages_sr.json +3 -3
  35. package/assets/components/assets/date-picker/t9n/messages_sv.json +3 -3
  36. package/assets/components/assets/date-picker/t9n/messages_th.json +3 -3
  37. package/assets/components/assets/date-picker/t9n/messages_tr.json +3 -3
  38. package/assets/components/assets/date-picker/t9n/messages_uk.json +3 -3
  39. package/assets/components/assets/date-picker/t9n/messages_vi.json +3 -3
  40. package/assets/components/assets/date-picker/t9n/messages_zh-CN.json +3 -3
  41. package/assets/components/assets/date-picker/t9n/messages_zh-HK.json +3 -3
  42. package/assets/components/assets/date-picker/t9n/messages_zh-TW.json +3 -3
  43. package/assets/esri/core/workers/RemoteClient.js +1 -1
  44. package/assets/esri/core/workers/chunks/{63c9b8b25bcfa4a8941a.js → 02497309e0f848bf2879.js} +1 -1
  45. package/assets/esri/core/workers/chunks/078a0b134210167b629d.js +1 -0
  46. package/assets/esri/core/workers/chunks/0cb85f1f7ceaeeeab332.js +1 -0
  47. package/assets/esri/core/workers/chunks/{922be2187f5403983743.js → 114ae7f7f3d2ce2f44a7.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{06a18548b5b413a264d2.js → 190c9feab5f80e586d84.js} +1 -1
  49. package/assets/esri/core/workers/chunks/1afa607bb40b1dcd8cb5.js +1 -0
  50. package/assets/esri/core/workers/chunks/{daccf417cf9d3790f717.js → 1bc134bc56bc6e6063d1.js} +1 -1
  51. package/assets/esri/core/workers/chunks/2247b07f59959c5e0767.js +1 -0
  52. package/assets/esri/core/workers/chunks/2bf7b879f5e81317c7f8.js +1 -0
  53. package/assets/esri/core/workers/chunks/3326536d183a858a2a4d.js +1 -0
  54. package/assets/esri/core/workers/chunks/3714482f3a829d122da1.js +1 -0
  55. package/assets/esri/core/workers/chunks/{38aa8de65b0f31dd1fbd.js → 38d8d7e5ae339230dd99.js} +1 -1
  56. package/assets/esri/core/workers/chunks/43b2e17ffd5ffcbcf269.js.LICENSE.txt +1 -1
  57. package/assets/esri/core/workers/chunks/{6f01deb550483ecfe52f.js → 46fbfb2f815f4a543d5f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/4ebb2b97a476fb0794de.js +1 -0
  59. package/assets/esri/core/workers/chunks/5983c9f28b7f63c7e1e0.js +1 -0
  60. package/assets/esri/core/workers/chunks/5ef9489ce7e0425148db.js +1 -0
  61. package/assets/esri/core/workers/chunks/60a08ce29d09cb07ef06.js +1 -0
  62. package/assets/esri/core/workers/chunks/654f242c1bfbefea5c13.js +1 -0
  63. package/assets/esri/core/workers/chunks/667bf6cbdb927b78a4d8.js +1 -0
  64. package/assets/esri/core/workers/chunks/66905af5c71af782a87f.js +1 -0
  65. package/assets/esri/core/workers/chunks/{81cf172203726059e5af.js → 6873f25e103d9e3d573c.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{35ff39539242e111d0e6.js → 700373e83c24e24f7772.js} +1 -1
  67. package/assets/esri/core/workers/chunks/719ee5c4a064ea9bdfcf.js +1 -0
  68. package/assets/esri/core/workers/chunks/{b03c3c29fee88d5af648.js → 7227df502cacbb6d0529.js} +1 -1
  69. package/assets/esri/core/workers/chunks/73f663016ac17f1d62f8.js +1 -0
  70. package/assets/esri/core/workers/chunks/7bc7b6cf75771687d81f.js +1 -0
  71. package/assets/esri/core/workers/chunks/{23d5c7bbc362dcf1bb7a.js → 7fefe20ab46a4407d778.js} +1 -1
  72. package/assets/esri/core/workers/chunks/88a677071b6dc6ef0740.js +1 -0
  73. package/assets/esri/core/workers/chunks/89003e387684af5ebeac.js +1 -0
  74. package/assets/esri/core/workers/chunks/{2438bcb3640b97955276.js → 97b927bc9a1d19d1acee.js} +1 -1
  75. package/assets/esri/core/workers/chunks/a0ae66d0c6c48bda6afe.js +1 -0
  76. package/assets/esri/core/workers/chunks/aa681f7dfd8675e23e1f.js +1 -0
  77. package/assets/esri/core/workers/chunks/bad2ec88d0ed090daf56.js +1 -0
  78. package/assets/esri/core/workers/chunks/{95de0bfaab7090407b4c.js → bb8a670d4a1eaa458bef.js} +1 -1
  79. package/assets/esri/core/workers/chunks/cc5f2321c2d4ada25f00.js +1 -0
  80. package/assets/esri/core/workers/chunks/cdc322081aa7eed7679e.js +1 -0
  81. package/assets/esri/core/workers/chunks/cf1b9d7058e509dc812b.js +1 -0
  82. package/assets/esri/core/workers/chunks/d370fa8115514c4e83fe.js +1 -0
  83. package/assets/esri/core/workers/chunks/d48cf916dd84de782721.js +1 -0
  84. package/assets/esri/core/workers/chunks/d58d6c656066e44b9d55.js +1 -0
  85. package/assets/esri/core/workers/chunks/d705365004cedc2f2ce4.js +1 -0
  86. package/assets/esri/core/workers/chunks/e3e05a70797b60e15e39.js +1 -0
  87. package/assets/esri/core/workers/chunks/e9c81eee503c1b112bad.js +1 -0
  88. package/assets/esri/core/workers/chunks/ee50d5d0afe9bdccc84d.js +1 -0
  89. package/assets/esri/core/workers/chunks/ee7657d3bd6974be8cb7.js +1 -0
  90. package/assets/esri/core/workers/chunks/{d84969ee62f41844dc72.js → f27d1065876097390d7e.js} +1 -1
  91. package/assets/esri/core/workers/chunks/f3abe9b563a9b6ee9c35.js +1 -0
  92. package/assets/esri/core/workers/chunks/{860b590fea3a3ad6a4a0.js → fc154666791fafde475f.js} +1 -1
  93. package/assets/esri/images/portal/allsourceproject16.png +0 -0
  94. package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -0
  95. package/assets/esri/themes/base/widgets/_SnappingControls.scss +0 -1
  96. package/assets/esri/themes/dark/main.css +1 -1
  97. package/assets/esri/themes/light/main.css +1 -1
  98. package/assets/esri/themes/light/view.css +1 -1
  99. package/copyright.txt +0 -32
  100. package/core/BidiText.js +1 -1
  101. package/core/has.js +1 -1
  102. package/interfaces.d.ts +25 -17
  103. package/layers/FeatureLayer.js +1 -1
  104. package/layers/SceneLayer.js +1 -1
  105. package/layers/graphics/editingSupport.js +1 -1
  106. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  107. package/layers/mixins/ArcGISMapService.js +1 -1
  108. package/layers/mixins/EditBusLayer.js +1 -1
  109. package/layers/mixins/FeatureLayerBase.js +1 -1
  110. package/layers/mixins/ImageryTileMixin.js +1 -1
  111. package/layers/mixins/operationalLayers.js +1 -1
  112. package/layers/support/Sublayer.js +1 -1
  113. package/layers/support/featureLayerUtils.js +1 -1
  114. package/layers/support/layersCreator.js +1 -1
  115. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  116. package/layers/support/rasterFunctions/AspectFunction.js +1 -1
  117. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  118. package/layers/support/rasterFunctions/ColormapFunction.js +1 -1
  119. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  120. package/layers/support/rasterFunctions/MaskFunction.js +1 -1
  121. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  122. package/layers/support/rasterFunctions/RemapFunction.js +1 -1
  123. package/layers/support/rasterFunctions/SlopeFunction.js +1 -1
  124. package/layers/support/rasterFunctions/StatisticsHistogramsFunction.js +1 -1
  125. package/layers/support/rasterFunctions/StretchFunction.js +1 -1
  126. package/layers/support/rasterFunctions/bandIndexUtils.js +1 -1
  127. package/layers/support/rasterFunctions/localUtils.js +1 -1
  128. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  129. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  130. package/layers/support/serviceCapabilitiesUtils.js +5 -0
  131. package/networks/Network.js +1 -1
  132. package/networks/support/TopologyValidationJobInfo.js +1 -1
  133. package/package.json +3 -3
  134. package/portal/PortalItem.js +1 -1
  135. package/portal/schemas/definitions.js +1 -1
  136. package/renderers/support/RasterSymbolizer.js +1 -1
  137. package/rest/support/meshFeatureSet.js +1 -1
  138. package/support/revision.js +1 -1
  139. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  140. package/symbols/cim/CIMSymbolHelper.js +1 -1
  141. package/views/2d/AnimationManager.js +1 -1
  142. package/views/2d/FrameTask.js +1 -1
  143. package/views/2d/LabelManager.js +1 -1
  144. package/views/2d/engine/Bitmap.js +1 -1
  145. package/views/2d/engine/DisplayObject.js +1 -1
  146. package/views/2d/engine/flow/FlowView2D.js +1 -1
  147. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  148. package/views/2d/engine/vectorTiles/Placement.js +1 -1
  149. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  150. package/views/2d/engine/vectorTiles/TileParser.js +1 -1
  151. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  152. package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
  153. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  154. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  155. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  156. package/views/2d/engine/webgl/DisplayRecordStore.js +1 -1
  157. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  158. package/views/2d/engine/webgl/FreeList.js +1 -1
  159. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  160. package/views/2d/engine/webgl/GraphicTile.js +1 -1
  161. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  162. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  163. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  164. package/views/2d/engine/webgl/Overlay.js +1 -1
  165. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  166. package/views/2d/engine/webgl/Painter.js +1 -1
  167. package/views/2d/engine/webgl/TextureManager.js +1 -1
  168. package/views/2d/engine/webgl/TileData.js +1 -1
  169. package/views/2d/engine/webgl/TileDisplayData.js +1 -1
  170. package/views/2d/engine/webgl/Utils.js +1 -1
  171. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  172. package/views/2d/engine/webgl/WGLDisplayObject.js +1 -1
  173. package/views/2d/engine/webgl/WGLDisplayRecord.js +1 -1
  174. package/views/2d/engine/webgl/WGLRendererInfo.js +1 -1
  175. package/views/2d/engine/webgl/animatedFormats/apng.js +1 -1
  176. package/views/2d/engine/webgl/animatedFormats/gif.js +1 -1
  177. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  178. package/views/2d/engine/webgl/brushes/WGLBrushInfo.js +1 -1
  179. package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
  180. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  181. package/views/2d/engine/webgl/collisions/visualVariableSimpleUtils.js +1 -1
  182. package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
  183. package/views/2d/engine/webgl/effects/AnimationEffect.js +1 -1
  184. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  185. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  186. package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
  187. package/views/2d/engine/webgl/effects/post-processing/Bloom.js +1 -1
  188. package/views/2d/engine/webgl/effects/post-processing/Blur.js +1 -1
  189. package/views/2d/engine/webgl/effects/post-processing/Colorize.js +1 -1
  190. package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +1 -1
  191. package/views/2d/engine/webgl/effects/post-processing/Opacity.js +1 -1
  192. package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
  193. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  194. package/views/2d/engine/webgl/mesh/VertexDataWriter.js +1 -1
  195. package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
  196. package/views/2d/engine/webgl/mesh/factories/WGLMeshFactory.js +1 -1
  197. package/views/2d/engine/webgl/mesh/templates/WGLBaseMarkerTemplate.js +1 -1
  198. package/views/2d/engine/webgl/mesh/templates/WGLDynamicMeshTemplate.js +1 -1
  199. package/views/2d/engine/webgl/mesh/templates/WGLDynamicTextTemplate.js +1 -1
  200. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  201. package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
  202. package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
  203. package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
  204. package/views/2d/engine/webgl/mesh/templates/WGLMeshTemplate.js +1 -1
  205. package/views/2d/engine/webgl/mesh/templates/WGLTemplateStore.js +1 -1
  206. package/views/2d/engine/webgl/mesh/templates/WGLTextTemplate.js +1 -1
  207. package/views/2d/engine/webgl/mesh/templates/util.js +1 -1
  208. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  209. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  210. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  211. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  212. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  213. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  214. package/views/2d/layers/features/textUtils.js +1 -1
  215. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  216. package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
  217. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  218. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  219. package/views/2d/layers/support/cimSymbolUtils.js +1 -1
  220. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  221. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  222. package/views/3d/state/GoToOperation.js +1 -1
  223. package/views/3d/state/controllers/RotateController.js +1 -1
  224. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  225. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  226. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  227. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  228. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  229. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  230. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  231. package/views/3d/state/utils/navigationUtils.js +1 -1
  232. package/views/3d/terrain/SphericalPatch.js +1 -1
  233. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  234. package/views/layers/MapImageLayerView.js +1 -1
  235. package/views/layers/support/popupUtils.js +1 -1
  236. package/widgets/Attachments.js +1 -1
  237. package/widgets/Bookmarks.js +1 -1
  238. package/widgets/Directions/components/SaveLayer.js +1 -1
  239. package/widgets/Directions.js +1 -1
  240. package/widgets/Editor.js +1 -1
  241. package/widgets/Feature/FeatureAttachments.js +1 -1
  242. package/widgets/Feature/FeatureRelationship.js +1 -1
  243. package/widgets/Feature.js +1 -1
  244. package/widgets/FeatureForm.js +1 -1
  245. package/widgets/FeatureTemplates/ItemList.js +1 -1
  246. package/widgets/Popup.js +1 -1
  247. package/widgets/Search/SearchResultRenderer.js +1 -1
  248. package/widgets/Search/css.js +5 -0
  249. package/widgets/Search/searchResultRendererCSS.js +5 -0
  250. package/widgets/Search.js +1 -1
  251. package/widgets/TimeSlider.js +1 -1
  252. package/widgets/UtilityNetworkTrace.js +1 -1
  253. package/widgets/Weather/LabeledSlider.js +1 -1
  254. package/widgets/Weather.js +1 -1
  255. package/widgets/support/SnappingControls.js +1 -1
  256. package/assets/esri/core/workers/chunks/0e39beecd54e296d34a9.js +0 -1
  257. package/assets/esri/core/workers/chunks/1596b8a7b9c6533684d3.js +0 -1
  258. package/assets/esri/core/workers/chunks/16e9bd57f774944d0bf8.js +0 -1
  259. package/assets/esri/core/workers/chunks/22d910b557da8d3def2a.js +0 -1
  260. package/assets/esri/core/workers/chunks/23d3ff827f06f233aff6.js +0 -1
  261. package/assets/esri/core/workers/chunks/26a4a9409c872e87198b.js +0 -1
  262. package/assets/esri/core/workers/chunks/28e6d77e6ed9c12286c6.js +0 -1
  263. package/assets/esri/core/workers/chunks/2a96186eb230886ee150.js +0 -1
  264. package/assets/esri/core/workers/chunks/2c150a53ed64993bfe68.js +0 -1
  265. package/assets/esri/core/workers/chunks/2d70499eacbd1d2a33a7.js +0 -1
  266. package/assets/esri/core/workers/chunks/3507ee2981adae3fd12c.js +0 -1
  267. package/assets/esri/core/workers/chunks/36c4f74750078d0e870a.js +0 -1
  268. package/assets/esri/core/workers/chunks/37df6fcc98fa295b8ffe.js +0 -1
  269. package/assets/esri/core/workers/chunks/53167d1dee62643a9d45.js +0 -1
  270. package/assets/esri/core/workers/chunks/63c012f5239a5cc97de1.js +0 -1
  271. package/assets/esri/core/workers/chunks/6458cfade7b544877b62.js +0 -1
  272. package/assets/esri/core/workers/chunks/6a305025cd113320559d.js +0 -1
  273. package/assets/esri/core/workers/chunks/6baf0b4b205b6cf99716.js +0 -1
  274. package/assets/esri/core/workers/chunks/6d268a2d71321abedfe1.js +0 -1
  275. package/assets/esri/core/workers/chunks/73880cf65266699e1e84.js +0 -1
  276. package/assets/esri/core/workers/chunks/7cb266c7b5b7804b5059.js +0 -1
  277. package/assets/esri/core/workers/chunks/7ee330d582d6e1f96026.js +0 -1
  278. package/assets/esri/core/workers/chunks/7f9db8289d12f8966d3e.js +0 -1
  279. package/assets/esri/core/workers/chunks/a72aa25362ca9745f604.js +0 -1
  280. package/assets/esri/core/workers/chunks/a75a5358dce29a81f440.js +0 -1
  281. package/assets/esri/core/workers/chunks/a7cf36a2fc8fa6c7887f.js +0 -1
  282. package/assets/esri/core/workers/chunks/af2c85193b7988590673.js +0 -1
  283. package/assets/esri/core/workers/chunks/b6174aee3fc02f42c4bf.js +0 -1
  284. package/assets/esri/core/workers/chunks/bcd1def9ef5cdb455828.js +0 -1
  285. package/assets/esri/core/workers/chunks/cacc5187278914008966.js +0 -1
  286. package/assets/esri/core/workers/chunks/e96fbfb1c010b63d7088.js +0 -1
  287. package/assets/esri/core/workers/chunks/ed6ffb01c9833f88141e.js +0 -1
  288. package/assets/esri/core/workers/chunks/ef36993ca3de9e6b6e3b.js +0 -1
  289. package/assets/esri/core/workers/chunks/f814ba015cbf052340ce.js +0 -1
  290. package/assets/esri/core/workers/chunks/fa74c89236a5415cd3ef.js +0 -1
  291. package/assets/esri/core/workers/chunks/fc985e581cb4760e57c8.js +0 -1
package/Basemap.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"./chunks/tslib.es6.js";import r from"./core/Collection.js";import{referenceSetter as t}from"./core/collectionUtils.js";import{deprecated as s}from"./core/deprecate.js";import{JSONSupportMixin as o}from"./core/JSONSupport.js";import{clone as a}from"./core/lang.js";import i from"./core/Loadable.js";import{loadAll as n}from"./core/loadAll.js";import l from"./core/Logger.js";import{isSome as p}from"./core/maybe.js";import{throwIfAborted as c,eachAlways as m}from"./core/promiseUtils.js";import{isProtocolRelative as h,urlToObject as u}from"./core/urlUtils.js";import{property as d}from"./core/accessorSupport/decorators/property.js";import"./core/accessorSupport/ensureType.js";import{subclass as y}from"./core/accessorSupport/decorators/subclass.js";import{writer as f}from"./core/accessorSupport/decorators/writer.js";import b from"./geometry/SpatialReference.js";import L from"./portal/Portal.js";import g from"./portal/PortalItem.js";import{getBasemapTitle as w,esriBasemapDefinitions as I}from"./support/basemapDefinitions.js";import{getLayerJSON as j}from"./webdoc/support/writeUtils.js";var v;let S=0;const _="esri.Basemap";let U=v=class extends(o(i)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+S++,this.baseLayers=new r,this.referenceLayers=new r;const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&l.getLogger(this.declaredClass).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},s=e=>{e.parent=null};this.baseLayers.on("after-add",(e=>t(e.item))),this.referenceLayers.on("after-add",(e=>t(e.item))),this.baseLayers.on("after-remove",(e=>s(e.item))),this.referenceLayers.on("after-remove",(e=>s(e.item)))}initialize(){this.when().catch((e=>{l.getLogger(this.declaredClass).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.removeAll();for(const t of e)t.destroy();const r=this.referenceLayers.removeAll();for(const t of r)t.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem?.destroy(),this.portalItem=null}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",t(e,this._get("baseLayers")))}_writeBaseLayers(e,r,t){const s=[];e?(t={...t,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const r=j(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);p(r)&&s.push(r)})),this.referenceLayers.forEach((e=>{const r=j(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);p(r)&&(r.isReference=!0,s.push(r))})),r.baseMapLayers=s):r.baseMapLayers=s}set referenceLayers(e){this._set("referenceLayers",t(e,this._get("referenceLayers")))}writeTitle(e,r){r.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return n(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};return this.loaded&&(e.loadStatus="loaded"),new v({resourceInfo:this.resourceInfo}).set(e)}read(e,r){this.resourceInfo||this._set("resourceInfo",{data:e,context:r}),super.read(e,r)}write(e,r){return e=e||{},r&&r.origin||(r={origin:"web-map",...r}),super.write(e,r),!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const r=a(e);return r.url&&h(r.url)&&(r.url=`https:${r.url}`),r.templateUrl&&h(r.templateUrl)&&(r.templateUrl=`https:${r.templateUrl}`),r}))),e}async _loadFromSource(e){const{resourceInfo:r,portalItem:t}=this;c(e);const s=[];if(r){const t=r.context?r.context.url:null;if(s.push(this._loadLayersFromJSON(r.data,t,e)),r.data.id&&!r.data.title){const e=r.data.id;s.push(w(e).then((e=>{e&&this.read({title:e},r.context)})))}}else t&&s.push(this._loadFromItem(t,e));await Promise.all(s)}async _loadLayersFromJSON(e,r,t){const s=this.resourceInfo&&this.resourceInfo.context,o=this.portalItem&&this.portalItem.portal||s&&s.portal||null,a=s&&"web-scene"===s.origin?"web-scene":"web-map",{populateOperationalLayers:i}=await import("./layers/support/layersCreator.js"),n=[];if(c(t),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const t={context:{origin:a,url:r,portal:o,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},s=i(this.baseLayers,e.baseMapLayers.filter((e=>!e.isReference)),t);n.push(s);const l=i(this.referenceLayers,e.baseMapLayers.filter((e=>e.isReference)),t);n.push(l)}await m(n)}async _loadFromItem(e,r){const t=await e.load(r),s=await t.fetchData("json",r),o=u(e.itemUrl??"");return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:"web-map",portal:e.portal||L.getDefault(),url:o}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||L.getDefault(),url:o}),this._loadLayersFromJSON(this.resourceInfo.data,o,r)}static fromId(e){const r=I[e];if(r){if(r.deprecated){let r=null;"dark-gray"===e?r="dark-gray-vector":"gray"===e?r="gray-vector":"streets"===e?r="streets-vector":"topo"===e&&(r="topo-vector"),s(l.getLogger(_),`The ${e} basemap has entered mature support and is no longer being updated.`,{replacement:r,see:"https://arcg.is/1iq8aD",warnOnce:!0})}return v.fromJSON(r)}return null}};e([d({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,r,t,s){this._writeBaseLayers(e,r,s)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:r}},writer(e,r,t,s){this._writeBaseLayers(e,r,s)}}}}}})],U.prototype,"baseLayers",null),e([d({type:String,json:{origins:{"web-scene":{write:!0}}}})],U.prototype,"id",void 0),e([d({type:g})],U.prototype,"portalItem",void 0),e([d()],U.prototype,"referenceLayers",null),e([d({readOnly:!0})],U.prototype,"resourceInfo",void 0),e([d({type:b})],U.prototype,"spatialReference",void 0),e([d()],U.prototype,"thumbnailUrl",void 0),e([d({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],U.prototype,"title",void 0),e([f("title")],U.prototype,"writeTitle",null),U=v=e([y(_)],U);const x=U;export{x as default};
5
+ import{_ as e}from"./chunks/tslib.es6.js";import r from"./core/Collection.js";import{referenceSetter as t}from"./core/collectionUtils.js";import{deprecated as s}from"./core/deprecate.js";import{JSONSupportMixin as o}from"./core/JSONSupport.js";import{clone as a}from"./core/lang.js";import i from"./core/Loadable.js";import{loadAll as n}from"./core/loadAll.js";import l from"./core/Logger.js";import{isSome as p}from"./core/maybe.js";import{throwIfAborted as c,eachAlways as m}from"./core/promiseUtils.js";import{isProtocolRelative as y,urlToObject as h}from"./core/urlUtils.js";import{property as u}from"./core/accessorSupport/decorators/property.js";import"./core/accessorSupport/ensureType.js";import{subclass as d}from"./core/accessorSupport/decorators/subclass.js";import{writer as f}from"./core/accessorSupport/decorators/writer.js";import b from"./geometry/SpatialReference.js";import L from"./portal/Portal.js";import g from"./portal/PortalItem.js";import{getBasemapTitle as w,esriBasemapDefinitions as I}from"./support/basemapDefinitions.js";import{getLayerJSON as j}from"./webdoc/support/writeUtils.js";var S;let v=0;const _="esri.Basemap";let U=S=class extends(o(i)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+v++,this.baseLayers=new r,this.referenceLayers=new r;const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&l.getLogger(this.declaredClass).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},s=e=>{e.parent=null};this.baseLayers.on("after-add",(e=>t(e.item))),this.referenceLayers.on("after-add",(e=>t(e.item))),this.baseLayers.on("after-remove",(e=>s(e.item))),this.referenceLayers.on("after-remove",(e=>s(e.item)))}initialize(){this.when().catch((e=>{l.getLogger(this.declaredClass).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.removeAll();for(const t of e)t.destroy();const r=this.referenceLayers.removeAll();for(const t of r)t.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem?.destroy(),this.portalItem=null}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",t(e,this._get("baseLayers")))}_writeBaseLayers(e,r,t){const s=[];e?(t={...t,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const r=j(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);p(r)&&s.push(r)})),this.referenceLayers.forEach((e=>{const r=j(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);p(r)&&("scene"!==e.type&&(r.isReference=!0),s.push(r))})),r.baseMapLayers=s):r.baseMapLayers=s}set referenceLayers(e){this._set("referenceLayers",t(e,this._get("referenceLayers")))}writeTitle(e,r){r.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return n(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};return this.loaded&&(e.loadStatus="loaded"),new S({resourceInfo:this.resourceInfo}).set(e)}read(e,r){this.resourceInfo||this._set("resourceInfo",{data:e,context:r}),super.read(e,r)}write(e,r){return e=e||{},r&&r.origin||(r={origin:"web-map",...r}),super.write(e,r),!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const r=a(e);return r.url&&y(r.url)&&(r.url=`https:${r.url}`),r.templateUrl&&y(r.templateUrl)&&(r.templateUrl=`https:${r.templateUrl}`),r}))),e}async _loadFromSource(e){const{resourceInfo:r,portalItem:t}=this;c(e);const s=[];if(r){const t=r.context?r.context.url:null;if(s.push(this._loadLayersFromJSON(r.data,t,e)),r.data.id&&!r.data.title){const e=r.data.id;s.push(w(e).then((e=>{e&&this.read({title:e},r.context)})))}}else t&&s.push(this._loadFromItem(t,e));await Promise.all(s)}async _loadLayersFromJSON(e,r,t){const s=this.resourceInfo&&this.resourceInfo.context,o=this.portalItem&&this.portalItem.portal||s&&s.portal||null,a=s&&"web-scene"===s.origin?"web-scene":"web-map",{populateOperationalLayers:i}=await import("./layers/support/layersCreator.js"),n=[];if(c(t),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const t={context:{origin:a,url:r,portal:o,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},s=e=>"web-scene"===a&&"ArcGISSceneServiceLayer"===e.layerType||e.isReference,l=i(this.baseLayers,e.baseMapLayers.filter((e=>!s(e))),t);n.push(l);const p=i(this.referenceLayers,e.baseMapLayers.filter(s),t);n.push(p)}await m(n)}async _loadFromItem(e,r){const t=await e.load(r),s=await t.fetchData("json",r),o=h(e.itemUrl??"");return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:"Web Scene"===e.type?"web-scene":"web-map",portal:e.portal||L.getDefault(),url:o}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||L.getDefault(),url:o}),this._loadLayersFromJSON(this.resourceInfo.data,o,r)}static fromId(e){const r=I[e];if(r){if(r.deprecated){let r=null;"dark-gray"===e?r="dark-gray-vector":"gray"===e?r="gray-vector":"streets"===e?r="streets-vector":"topo"===e&&(r="topo-vector"),s(l.getLogger(_),`The ${e} basemap has entered mature support and is no longer being updated.`,{replacement:r,see:"https://arcg.is/1iq8aD",warnOnce:!0})}return S.fromJSON(r)}return null}};e([u({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,r,t,s){this._writeBaseLayers(e,r,s)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:r}},writer(e,r,t,s){this._writeBaseLayers(e,r,s)}}}}}})],U.prototype,"baseLayers",null),e([u({type:String,json:{origins:{"web-scene":{write:!0}}}})],U.prototype,"id",void 0),e([u({type:g})],U.prototype,"portalItem",void 0),e([u()],U.prototype,"referenceLayers",null),e([u({readOnly:!0})],U.prototype,"resourceInfo",void 0),e([u({type:b})],U.prototype,"spatialReference",void 0),e([u()],U.prototype,"thumbnailUrl",void 0),e([u({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],U.prototype,"title",void 0),e([f("title")],U.prototype,"writeTitle",null),U=S=e([d(_)],U);const x=U;export{x as default};
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @arcgis/core
2
2
 
3
- A minified, unbuilt version of the [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/) ES modules.
3
+ A minified, unbuilt version of the [ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/) ES modules.
4
4
 
5
5
  ## Features
6
6
 
7
- For an overview of the API, visit the [developer documentation](https://developers.arcgis.com/javascript/latest/key-features/) site.
7
+ For an overview of the SDK, visit the [developer documentation](https://developers.arcgis.com/javascript/latest/key-features/) site.
8
8
 
9
9
  You can install these modules with [npm](https://npmjs.org/) and then use them directly in a framework such as [React](https://reactjs.org/), [Vue.js](https://vuejs.org) or [Angular](https://cli.angular.io/). Or, you can also create your own custom builds with [Webpack](https://webpackjs.org) or [rollup.js](https://rollupjs.org/guide/en/).
10
10
 
11
- The API includes [TypeScript](https://www.typescriptlang.org/) type definitions. The `.d.ts` declaration files are bundled with the install.
11
+ The SDK includes [TypeScript](https://www.typescriptlang.org/) type definitions. The `.d.ts` declaration files are bundled with the install.
12
12
 
13
13
  Sample applications can be found at [github.com/jsapi-resources/](https://github.com/Esri/jsapi-resources/tree/master/esm-samples).
14
14
 
@@ -22,9 +22,9 @@ npm install @arcgis/core
22
22
 
23
23
  ## Configure CSS
24
24
 
25
- Set the CSS to the same version as the installed API modules. You can verify the installed API version by running `npm list @arcgis/core`. If you are working with local assets skip to the *Manage assets locally* section.
25
+ Set the CSS to the same version as the installed SDK modules. You can verify the installed SDK version by running `npm list @arcgis/core`. If you are working with locally hosted assets skip to the *Manage assets locally* section.
26
26
 
27
- The first example shows importing CSS for production API version `4.25.0`:
27
+ The first example shows importing CSS for production SDK version `4.25.0`:
28
28
 
29
29
  *index.css*
30
30
 
@@ -32,7 +32,7 @@ The first example shows importing CSS for production API version `4.25.0`:
32
32
  @import "https://js.arcgis.com/4.25/@arcgis/core/assets/esri/themes/light/main.css";
33
33
  ```
34
34
 
35
- The second example shows importing CSS for `next` API version `4.25.0-next.20220921`:
35
+ The second example shows importing CSS for `next` SDK version `4.25.0-next.20220921`:
36
36
 
37
37
  *index.css*
38
38
 
@@ -44,13 +44,13 @@ For more information using the `next` version visit the [feedback-js-api-next](h
44
44
 
45
45
  ## Working with assets
46
46
 
47
- The default configuration for local builds is to automatically pull the APIs assets from a CDN at runtime, there is no need for additional configuration. The assets include styles, images, web workers, wasm and localization files. Production versions of the API's assets are hosted on the ArcGIS CDN, and `next` builds (e.g. `4.25.0-next.20220921`) use assets hosted on the jsDelivr CDN.
47
+ The default configuration for local builds is for the SDK to automatically pull assets from a CDN at runtime, there is no need for additional configuration. The assets include styles, images, web workers, wasm and localization files. Production versions of the SDK's assets are hosted on the ArcGIS CDN, and `next` builds (e.g. `4.25.0-next.20220921`) use assets hosted on the jsDelivr CDN.
48
48
 
49
49
  ### Manage assets locally
50
50
 
51
51
  If you need to manage the assets locally, copy them into your project from `/node_modules/@arcgis/core/assets`, and then set `config.assetsPath` to insure requests for assets are resolved correctly. A simple way to accomplish this is to configure an npm script that runs during your build process. For example, use npm to install `ncp` and configure a script in package.json to copy the folder.
52
52
 
53
- **Important:** Every time you upgrade the API, be sure to recopy the new version of the assets to your project. This ensures the assets stay synchronized with the API.
53
+ **Important:** Every time you upgrade the SDK, be sure to recopy the new version of the assets to your project. This ensures the assets stay synchronized.
54
54
 
55
55
  Here’s a React example:
56
56
 
@@ -123,17 +123,17 @@ Windows users can use [`xcopy`](https://docs.microsoft.com/en-us/windows-server/
123
123
 
124
124
  ## Requirements
125
125
 
126
- Use of the ArcGIS API for JavaScript is subject to the terms described in the product-specific [terms of use.](https://www.esri.com/en-us/legal/terms/product-specific-scope-of-use) Learn more about licensing [here](https://developers.arcgis.com/javascript/latest/licensing/).
126
+ Use of the ArcGIS Maps SDK for JavaScript is subject to the terms described in the product-specific [terms of use.](https://www.esri.com/en-us/legal/terms/product-specific-scope-of-use) Learn more about licensing [here](https://developers.arcgis.com/javascript/latest/licensing/).
127
127
 
128
128
  ## Resources
129
129
 
130
- - [ArcGIS for JavaScript](https://developers.arcgis.com/javascript/)
130
+ - [ArcGIS Maps SDK JavaScript](https://developers.arcgis.com/javascript/)
131
131
  - [http://blogs.esri.com/esri/arcgis/tag/javascript/](https://blogs.esri.com/esri/arcgis/tag/javascript/)
132
132
  - [twitter@ArcGISDevs](https://twitter.com/ArcGISDevs)
133
133
 
134
134
  ## Issues
135
135
 
136
- - General questions about using these modules or the ArcGIS API for JavaScript? See the [Esri developer community](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript).
136
+ - General questions about using these modules or the ArcGIS Maps SDK for JavaScript? See the [Esri developer community](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript).
137
137
  - [Technical support](https://support.esri.com/).
138
138
 
139
139
  ## Licensing
package/WebScene.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"./chunks/tslib.es6.js";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import o from"./core/Collection.js";import s from"./core/Error.js";import a from"./core/Handles.js";import"./core/has.js";import{clone as n}from"./core/lang.js";import l from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import c from"./core/Logger.js";import{isSome as d}from"./core/maybe.js";import{MultiOriginJSONMixin as h,MultiOriginJSONSupport as u}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as m}from"./core/Promise.js";import{debounce as y,eachAlways as w}from"./core/promiseUtils.js";import{urlToObject as g,addQueryParameter as f}from"./core/urlUtils.js";import{property as v}from"./core/accessorSupport/decorators/property.js";import"./core/accessorSupport/ensureType.js";import{reader as b}from"./core/accessorSupport/decorators/reader.js";import{subclass as S}from"./core/accessorSupport/decorators/subclass.js";import{writer as A}from"./core/accessorSupport/decorators/writer.js";import{updateOrigins as _}from"./core/accessorSupport/originUtils.js";import{readLoadable as I}from"./core/accessorSupport/read.js";import j from"./geometry/Extent.js";import R from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as L}from"./geometry/projection.js";import P from"./geometry/SpatialReference.js";import{validateWebSceneError as V}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as U}from"./geometry/support/jsonUtils.js";import{isEarth as M}from"./geometry/support/spatialReferenceUtils.js";import O from"./portal/Portal.js";import E from"./portal/PortalItem.js";import C from"./support/MapFloorInfo.js";import{createSchemaValidationError as N,createCopyError as T}from"./support/webSceneUtils.js";import{ViewingMode as G}from"./views/ViewingMode.js";import{isSpatialReferenceSupported as F}from"./views/support/spatialReferenceSupport.js";import{saveResources as $}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as W}from"./webdoc/support/thumbnailUtils.js";import J from"./webscene/ApplicationProperties.js";import x from"./webscene/Environment.js";import k from"./webscene/InitialViewProperties.js";import B from"./webscene/Presentation.js";import q from"./webscene/TransportationNetwork.js";import{Version as K}from"./webscene/Version.js";const D=new K(1,29),H=()=>{const e=8,t=[],r=D.major;for(let i=e;i<=D.minor;i++)t.push(`${r}.${i}`);return t},z="Web Scene",Q="ViewingMode-Local";let X=class extends(l.LoadableMixin(m(h(r)))){constructor(e){super(e),this._handles=new a,this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=null,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new B,this.initialViewProperties=new k,this.portalItem=null,this.resourceInfo=null,this._debouncedSaveOperations=y((async(e,t,r)=>{switch(e){case Y.SAVE:return this._saveImpl(t);case Y.SAVE_AS:return this._saveAsImpl(r,t)}})),this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch((e=>{c.getLogger(this.declaredClass).error("#load()","Failed to load web scene",e)})),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this._handles.add(this.allLayers.on("change",(()=>this._scheduleLayersIdGC())))}destroy(){this._unscheduleLayersIdGC(),this._handles.destroy(),this.presentation&&this.presentation.destroy();const e=this.portalItem;this.portalItem=null,e?.destroy()}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){const o={...i,layerContainerType:"operational-layers"},s=e.map((e=>this.verifyWriteLayer(e,i)?e.write({},o):null)).filter((e=>!!e));t[r]=s.toArray()}verifyWriteLayer(e,t){return"write"in e||(t&&t.messages&&t.messages.push(new s("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1)}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new K(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${D.major}.${D.minor}`}get thumbnailUrl(){return this.portalItem&&this.portalItem.thumbnailUrl||null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t){const r={};return t.initialState&&t.initialState.environment&&(r.environment=x.fromJSON(t.initialState.environment)),t.spatialReference?r.spatialReference=P.fromJSON(t.spatialReference):r.spatialReference=P.WebMercator,r.viewingMode=t.viewingMode||"global",t.initialState&&t.initialState.viewpoint&&(r.viewpoint=i.fromJSON(t.initialState.viewpoint)),new k(r)}get spatialReference(){return this.initialViewProperties?.spatialReference??P.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){return this.addResolvingPromise(this._loadFromSource()),Promise.resolve(this)}loadAll(){return p(this,(e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map((e=>e.basemap)))}))}read(e,t){t={...t,origin:"web-scene"};const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(I(this,e,(t=>super.read(e,t)),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion.supportsVisibleElevationLayersInSlides){const t=e.baseMap.elevationLayers.map((e=>({id:e.id}))),r=this.presentation.slides,i=(e,t)=>e.visibleLayers.some((e=>e.id===t)),o=t.filter((e=>!r.some((t=>i(t,e.id)))));r.forEach((e=>{e.visibleLayers.addMany(o)}))}}_writeBasemapElevationLayers(e){const t=e.ground&&e.ground.layers;!e.baseMap&&t&&t.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=n(t))}write(e,t){if("loaded"!==this.loadStatus){const e=new s("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw c.getLogger(this.declaredClass).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages.filter((e=>"web-document-write:property-required"===e.name));if(e.length){const t=new s("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw c.getLogger(this.declaredClass).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(Y.SAVE,e)}async _saveImpl(e){this.portalItem||(c.getLogger(this.declaredClass).error("save(): requires the .portalItem property to be set"),await Promise.reject(new s("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene"))),this.portalItem.type!==z&&await Promise.reject(new s("webscene:portal-item-wrong-type",`Portal item needs to have type "${z}"`));const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:this.portalItem.itemUrl&&g(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||O.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,e),this._updateTypeKeywords(this.portalItem),await this.portalItem.update({data:i}),await $(this._resourceReferences,r,null),_(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(Y.SAVE_AS,t,e)}async _saveAsImpl(e,t){let r=E.from(e);r||(c.getLogger(this.declaredClass).error("saveAs(portalItem): requires a portal item parameter"),await Promise.reject(new s("webscene:portal-item-required","saveAs requires a portal item to save to"))),r.id&&(r=r.clone(),r.id=null);const i=r.portal||O.getDefault();await this._ensureLoadBeforeSave(),r.type=z,r.portal=i;const o=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:null,messages:[],portal:i,portalItem:r,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),a=this.write({},o);await Promise.all(o.resources.pendingOperations),await this._verifySaveAs(a,o,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");return this._updateTypeKeywords(r),await i.signIn(),await i.user.addItem({item:r,folder:t&&t.folder,data:a}),await $(this._resourceReferences,o,null),this.portalItem=r,u.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl&&g(r.itemUrl)}),_(o),n&&(this.thumbnailUrl=l?f(n,"w","8192"):n),o.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await this.portalItem.updateThumbnail({thumbnail:this.thumbnailUrl}),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}_verifySave(e,t,r,i=!1){if(!M(this.spatialReference))return Promise.reject(new s("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently."));let o,a=t.messages.filter((e=>"error"===e.type)).map((e=>new s(e.name,e.message,e.details)));t.blockedRelativeUrls&&(a=a.concat(t.blockedRelativeUrls.map((e=>new s("url:unsupported",`Relative url '${e}' is not supported in Web Scene`))))),r&&r.ignoreUnsupported&&(a=a.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),r?.requiredPropertyChecksDisabled&&(a=a.filter((e=>"web-document-write:property-required"!==e.name)));const n=r&&r.strictSchemaValidationEnabled;return o=n?import("./webscene/support/schemaValidator.js").then((t=>{const r=t.validate(e);if(r.length>0){const e=`webscene did not validate:\n${r.join("\n")}`;c.getLogger(this.declaredClass).error(`${i?"saveAs":"save"}(): ${e}`)}return r.map((e=>new s("webscene:schema-validation",e)))})).then((e=>{if(n&&e.length>0){throw N(e.concat(a))}return a})):Promise.resolve(a),o.then((e=>{if(e.length>0)throw new s("webscene:save","Failed to save webscene due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:e})}))}_verifySaveAs(e,t,r){return this.canNotSaveAs(t)?Promise.reject(T()):this._verifySave(e,t,r,!0)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(e){return e||(e=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),this.write({},e)),e.verifyItemRelativeUrls&&e.verifyItemRelativeUrls.writtenUrls.length>0}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=x.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,d(e.clippingArea)?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this._updateFromThumbnail(e,t.thumbnailSize||void 0)}async _updateFromThumbnail(e,t){const r=W(e,t),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}_loadFromSource(){return this.resourceInfo?this._loadFromJSON(this.resourceInfo,{origin:"web-scene"}):this.portalItem&&this.portalItem.id?this._loadFromItem(this.portalItem):this._loadObjectsWithLayers()}_readAndLoadFromJSON(e,t){const r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r,t)}_extractOperationalLayers(e){const t=[];if(!this.sourceVersion.supportsGround&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(this.sourceVersion.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}_loadFromJSON(e,t){const r=new o;return this._validateSpatialReference().then((()=>this._validateHeightModelInfo())).then((()=>import("./layers/support/layersCreator.js"))).then((({populateOperationalLayers:i})=>{const{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...t,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||O.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(r,s,e))}return o&&o.length>0&&n.push(i(this.layers,o,l)),w(n).then((()=>{}))})).then((()=>this._loadObjectsWithLayers())).then((()=>{this.ground.layers.addMany(r)}))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[];for(const t of this.allLayers.items)if("beforeSave"in t&&"function"==typeof t.beforeSave){const r=t.beforeSave();r&&e.push(r)}await w(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach((t=>{t.basemap&&e.push(t.basemap.load())})),await w(e)}async _loadFromItem(e){if(await e.load().catch((e=>{throw new s("webscene:load-portal-item","Failed to load portal item",{error:e})})),"Web Scene"!==e.type)throw new s("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r={origin:"web-scene",url:g(e.itemUrl),portal:e.portal||O.getDefault(),portalItem:e,readResourcePaths:[]};await this._readAndLoadFromJSON(t,r),this._resourceReferences={portalItem:e,paths:r.readResourcePaths}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!F(t,G.Global))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||L(e,t)}else{if(!F(t,G.Local))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e&&(d(e.camera)&&e.camera.position&&e.camera.position.spatialReference||d(e.targetGeometry)&&e.targetGeometry.spatialReference),o=e.viewpoint,a=i(o);if(a&&!r(a))return Promise.reject(new s("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find((e=>!r(i(e.viewpoint))));if(n){const r=i(n.viewpoint);return Promise.reject(new s("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=V(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateJSON(e){const t=K.parse(e.version||"","webscene");return D.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=P.WebMercator.toJSON()),e}_updateTypeKeywords(e){"local"===this.initialViewProperties.viewingMode?e.typeKeywords?e.typeKeywords.includes(Q)||e.typeKeywords.push(Q):e.typeKeywords=[Q]:"global"===this.initialViewProperties.viewingMode&&e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e=>e!==Q))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||P.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem&&this.portalItem.itemUrl?g(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout((()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()}),3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties&&this.applicationProperties.viewing&&this.applicationProperties.viewing.search,t=e=>this.allLayers.some((t=>t.id===e));e&&e.layers&&(e.layers=e.layers.filter((e=>t(e.id))));const r=this.presentation&&this.presentation.slides;r&&r.forEach((e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter((e=>t(e.id))))}))}static fromJSON(e){if(!e)throw new s("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}};var Y;X.version=`${D.major}.${D.minor}`,e([v({type:J,json:{write:!0}})],X.prototype,"applicationProperties",void 0),e([v({json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],X.prototype,"basemap",void 0),e([v({type:j,json:{read:{source:"clippingArea.geometry",reader:U},write:{target:"clippingArea.geometry"}}})],X.prototype,"clippingArea",void 0),e([A("clippingArea")],X.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],X.prototype,"clippingEnabled",void 0),e([b("clippingEnabled",["clippingArea"])],X.prototype,"readClippingEnabled",null),e([A("clippingEnabled")],X.prototype,"writeClippingEnabled",null),e([v({type:C,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],X.prototype,"floorInfo",void 0),e([v({type:R,json:{write:!0}})],X.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],X.prototype,"layers",void 0),e([A("layers")],X.prototype,"writeLayers",null),e([v({readOnly:!0,type:K,json:{type:H(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],X.prototype,"sourceVersion",void 0),e([b("sourceVersion",["version"])],X.prototype,"readSourceVersion",null),e([A("sourceVersion")],X.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:!1}})],X.prototype,"tables",void 0),e([v()],X.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],X.prototype,"authoringApp",null),e([A("authoringApp")],X.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],X.prototype,"authoringAppVersion",null),e([A("authoringAppVersion")],X.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,allowNull:!0,ignoreOrigin:!0,enabled:!0}}})],X.prototype,"ground",void 0),e([A("ground")],X.prototype,"writeGround",null),e([v({type:o.ofType(q),json:{write:!0}})],X.prototype,"transportationNetworks",void 0),e([v({type:B,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],X.prototype,"presentation",void 0),e([v({type:k,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new k({viewingMode:"global",spatialReference:P.WebMercator})}})],X.prototype,"initialViewProperties",void 0),e([b("initialViewProperties",["initialState.environment","spatialReference","viewingMode","initialState.viewpoint"])],X.prototype,"readInitialViewProperties",null),e([v({type:P,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"viewingMode",null),e([v({type:E})],X.prototype,"portalItem",void 0),e([v()],X.prototype,"resourceInfo",void 0),X=e([S("esri.WebScene")],X),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Y||(Y={}));const Z=X;export{Z as default};
5
+ import{_ as e}from"./chunks/tslib.es6.js";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import o from"./core/Collection.js";import s from"./core/Error.js";import a from"./core/Handles.js";import"./core/has.js";import{clone as n}from"./core/lang.js";import l from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import c from"./core/Logger.js";import{isSome as d}from"./core/maybe.js";import{MultiOriginJSONMixin as h,MultiOriginJSONSupport as u}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as m}from"./core/Promise.js";import{debounce as y,eachAlways as w}from"./core/promiseUtils.js";import{urlToObject as g,addQueryParameter as f}from"./core/urlUtils.js";import{property as v}from"./core/accessorSupport/decorators/property.js";import"./core/accessorSupport/ensureType.js";import{reader as b}from"./core/accessorSupport/decorators/reader.js";import{subclass as S}from"./core/accessorSupport/decorators/subclass.js";import{writer as A}from"./core/accessorSupport/decorators/writer.js";import{updateOrigins as _}from"./core/accessorSupport/originUtils.js";import{readLoadable as I}from"./core/accessorSupport/read.js";import j from"./geometry/Extent.js";import R from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as L}from"./geometry/projection.js";import P from"./geometry/SpatialReference.js";import{validateWebSceneError as V}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as U}from"./geometry/support/jsonUtils.js";import{isEarth as M}from"./geometry/support/spatialReferenceUtils.js";import O from"./portal/Portal.js";import E from"./portal/PortalItem.js";import C from"./support/MapFloorInfo.js";import{createSchemaValidationError as N,createCopyError as T}from"./support/webSceneUtils.js";import{ViewingMode as G}from"./views/ViewingMode.js";import{isSpatialReferenceSupported as F}from"./views/support/spatialReferenceSupport.js";import{saveResources as $}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as W}from"./webdoc/support/thumbnailUtils.js";import J from"./webscene/ApplicationProperties.js";import x from"./webscene/Environment.js";import k from"./webscene/InitialViewProperties.js";import B from"./webscene/Presentation.js";import q from"./webscene/TransportationNetwork.js";import{Version as K}from"./webscene/Version.js";const D=new K(1,30),H=()=>{const e=8,t=[],r=D.major;for(let i=e;i<=D.minor;i++)t.push(`${r}.${i}`);return t},z="Web Scene",Q="ViewingMode-Local";let X=class extends(l.LoadableMixin(m(h(r)))){constructor(e){super(e),this._handles=new a,this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=null,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new B,this.initialViewProperties=new k,this.portalItem=null,this.resourceInfo=null,this._debouncedSaveOperations=y((async(e,t,r)=>{switch(e){case Y.SAVE:return this._saveImpl(t);case Y.SAVE_AS:return this._saveAsImpl(r,t)}})),this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch((e=>{c.getLogger(this.declaredClass).error("#load()","Failed to load web scene",e)})),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this._handles.add(this.allLayers.on("change",(()=>this._scheduleLayersIdGC())))}destroy(){this._unscheduleLayersIdGC(),this._handles.destroy(),this.presentation&&this.presentation.destroy();const e=this.portalItem;this.portalItem=null,e?.destroy()}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){const o={...i,layerContainerType:"operational-layers"},s=e.map((e=>this.verifyWriteLayer(e,i)?e.write({},o):null)).filter((e=>!!e));t[r]=s.toArray()}verifyWriteLayer(e,t){return"write"in e||(t&&t.messages&&t.messages.push(new s("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1)}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new K(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${D.major}.${D.minor}`}get thumbnailUrl(){return this.portalItem&&this.portalItem.thumbnailUrl||null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t){const r={};return t.initialState&&t.initialState.environment&&(r.environment=x.fromJSON(t.initialState.environment)),t.spatialReference?r.spatialReference=P.fromJSON(t.spatialReference):r.spatialReference=P.WebMercator,r.viewingMode=t.viewingMode||"global",t.initialState&&t.initialState.viewpoint&&(r.viewpoint=i.fromJSON(t.initialState.viewpoint)),new k(r)}get spatialReference(){return this.initialViewProperties?.spatialReference??P.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){return this.addResolvingPromise(this._loadFromSource()),Promise.resolve(this)}loadAll(){return p(this,(e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map((e=>e.basemap)))}))}read(e,t){t={...t,origin:"web-scene"};const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(I(this,e,(t=>super.read(e,t)),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion.supportsVisibleElevationLayersInSlides){const t=e.baseMap.elevationLayers.map((e=>({id:e.id}))),r=this.presentation.slides,i=(e,t)=>e.visibleLayers.some((e=>e.id===t)),o=t.filter((e=>!r.some((t=>i(t,e.id)))));r.forEach((e=>{e.visibleLayers.addMany(o)}))}}_writeBasemapElevationLayers(e){const t=e.ground&&e.ground.layers;!e.baseMap&&t&&t.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=n(t))}write(e,t){if("loaded"!==this.loadStatus){const e=new s("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw c.getLogger(this.declaredClass).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages.filter((e=>"web-document-write:property-required"===e.name));if(e.length){const t=new s("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw c.getLogger(this.declaredClass).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(Y.SAVE,e)}async _saveImpl(e){this.portalItem||(c.getLogger(this.declaredClass).error("save(): requires the .portalItem property to be set"),await Promise.reject(new s("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene"))),this.portalItem.type!==z&&await Promise.reject(new s("webscene:portal-item-wrong-type",`Portal item needs to have type "${z}"`));const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:this.portalItem.itemUrl&&g(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||O.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,e),this._updateTypeKeywords(this.portalItem),await this.portalItem.update({data:i}),await $(this._resourceReferences,r,null),_(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(Y.SAVE_AS,t,e)}async _saveAsImpl(e,t){let r=E.from(e);r||(c.getLogger(this.declaredClass).error("saveAs(portalItem): requires a portal item parameter"),await Promise.reject(new s("webscene:portal-item-required","saveAs requires a portal item to save to"))),r.id&&(r=r.clone(),r.id=null);const i=r.portal||O.getDefault();await this._ensureLoadBeforeSave(),r.type=z,r.portal=i;const o=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:null,messages:[],portal:i,portalItem:r,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),a=this.write({},o);await Promise.all(o.resources.pendingOperations),await this._verifySaveAs(a,o,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");return this._updateTypeKeywords(r),await i.signIn(),await i.user.addItem({item:r,folder:t&&t.folder,data:a}),await $(this._resourceReferences,o,null),this.portalItem=r,u.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl&&g(r.itemUrl)}),_(o),n&&(this.thumbnailUrl=l?f(n,"w","8192"):n),o.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await this.portalItem.updateThumbnail({thumbnail:this.thumbnailUrl}),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}_verifySave(e,t,r,i=!1){if(!M(this.spatialReference))return Promise.reject(new s("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently."));let o,a=t.messages.filter((e=>"error"===e.type)).map((e=>new s(e.name,e.message,e.details)));t.blockedRelativeUrls&&(a=a.concat(t.blockedRelativeUrls.map((e=>new s("url:unsupported",`Relative url '${e}' is not supported in Web Scene`))))),r&&r.ignoreUnsupported&&(a=a.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),r?.requiredPropertyChecksDisabled&&(a=a.filter((e=>"web-document-write:property-required"!==e.name)));const n=r&&r.strictSchemaValidationEnabled;return o=n?import("./webscene/support/schemaValidator.js").then((t=>{const r=t.validate(e);if(r.length>0){const e=`webscene did not validate:\n${r.join("\n")}`;c.getLogger(this.declaredClass).error(`${i?"saveAs":"save"}(): ${e}`)}return r.map((e=>new s("webscene:schema-validation",e)))})).then((e=>{if(n&&e.length>0){throw N(e.concat(a))}return a})):Promise.resolve(a),o.then((e=>{if(e.length>0)throw new s("webscene:save","Failed to save webscene due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:e})}))}_verifySaveAs(e,t,r){return this.canNotSaveAs(t)?Promise.reject(T()):this._verifySave(e,t,r,!0)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(e){return e||(e=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),this.write({},e)),e.verifyItemRelativeUrls&&e.verifyItemRelativeUrls.writtenUrls.length>0}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=x.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,d(e.clippingArea)?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this._updateFromThumbnail(e,t.thumbnailSize||void 0)}async _updateFromThumbnail(e,t){const r=W(e,t),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}_loadFromSource(){return this.resourceInfo?this._loadFromJSON(this.resourceInfo,{origin:"web-scene"}):this.portalItem&&this.portalItem.id?this._loadFromItem(this.portalItem):this._loadObjectsWithLayers()}_readAndLoadFromJSON(e,t){const r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r,t)}_extractOperationalLayers(e){const t=[];if(!this.sourceVersion.supportsGround&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(this.sourceVersion.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}_loadFromJSON(e,t){const r=new o;return this._validateSpatialReference().then((()=>this._validateHeightModelInfo())).then((()=>import("./layers/support/layersCreator.js"))).then((({populateOperationalLayers:i})=>{const{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...t,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||O.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(r,s,e))}return o&&o.length>0&&n.push(i(this.layers,o,l)),w(n).then((()=>{}))})).then((()=>this._loadObjectsWithLayers())).then((()=>{this.ground.layers.addMany(r)}))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[];for(const t of this.allLayers.items)if("beforeSave"in t&&"function"==typeof t.beforeSave){const r=t.beforeSave();r&&e.push(r)}await w(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach((t=>{t.basemap&&e.push(t.basemap.load())})),await w(e)}async _loadFromItem(e){if(await e.load().catch((e=>{throw new s("webscene:load-portal-item","Failed to load portal item",{error:e})})),"Web Scene"!==e.type)throw new s("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r={origin:"web-scene",url:g(e.itemUrl),portal:e.portal||O.getDefault(),portalItem:e,readResourcePaths:[]};await this._readAndLoadFromJSON(t,r),this._resourceReferences={portalItem:e,paths:r.readResourcePaths}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!F(t,G.Global))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||L(e,t)}else{if(!F(t,G.Local))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e&&(d(e.camera)&&e.camera.position&&e.camera.position.spatialReference||d(e.targetGeometry)&&e.targetGeometry.spatialReference),o=e.viewpoint,a=i(o);if(a&&!r(a))return Promise.reject(new s("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find((e=>!r(i(e.viewpoint))));if(n){const r=i(n.viewpoint);return Promise.reject(new s("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=V(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateJSON(e){const t=K.parse(e.version||"","webscene");return D.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=P.WebMercator.toJSON()),e}_updateTypeKeywords(e){"local"===this.initialViewProperties.viewingMode?e.typeKeywords?e.typeKeywords.includes(Q)||e.typeKeywords.push(Q):e.typeKeywords=[Q]:"global"===this.initialViewProperties.viewingMode&&e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e=>e!==Q))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||P.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem&&this.portalItem.itemUrl?g(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout((()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()}),3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties&&this.applicationProperties.viewing&&this.applicationProperties.viewing.search,t=e=>this.allLayers.some((t=>t.id===e));e&&e.layers&&(e.layers=e.layers.filter((e=>t(e.id))));const r=this.presentation&&this.presentation.slides;r&&r.forEach((e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter((e=>t(e.id))))}))}static fromJSON(e){if(!e)throw new s("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}};var Y;X.version=`${D.major}.${D.minor}`,e([v({type:J,json:{write:!0}})],X.prototype,"applicationProperties",void 0),e([v({json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],X.prototype,"basemap",void 0),e([v({type:j,json:{read:{source:"clippingArea.geometry",reader:U},write:{target:"clippingArea.geometry"}}})],X.prototype,"clippingArea",void 0),e([A("clippingArea")],X.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],X.prototype,"clippingEnabled",void 0),e([b("clippingEnabled",["clippingArea"])],X.prototype,"readClippingEnabled",null),e([A("clippingEnabled")],X.prototype,"writeClippingEnabled",null),e([v({type:C,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],X.prototype,"floorInfo",void 0),e([v({type:R,json:{write:!0}})],X.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],X.prototype,"layers",void 0),e([A("layers")],X.prototype,"writeLayers",null),e([v({readOnly:!0,type:K,json:{type:H(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],X.prototype,"sourceVersion",void 0),e([b("sourceVersion",["version"])],X.prototype,"readSourceVersion",null),e([A("sourceVersion")],X.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:!1}})],X.prototype,"tables",void 0),e([v()],X.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],X.prototype,"authoringApp",null),e([A("authoringApp")],X.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],X.prototype,"authoringAppVersion",null),e([A("authoringAppVersion")],X.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,allowNull:!0,ignoreOrigin:!0,enabled:!0}}})],X.prototype,"ground",void 0),e([A("ground")],X.prototype,"writeGround",null),e([v({type:o.ofType(q),json:{write:!0}})],X.prototype,"transportationNetworks",void 0),e([v({type:B,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],X.prototype,"presentation",void 0),e([v({type:k,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new k({viewingMode:"global",spatialReference:P.WebMercator})}})],X.prototype,"initialViewProperties",void 0),e([b("initialViewProperties",["initialState.environment","spatialReference","viewingMode","initialState.viewpoint"])],X.prototype,"readInitialViewProperties",null),e([v({type:P,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"viewingMode",null),e([v({type:E})],X.prototype,"portalItem",void 0),e([v()],X.prototype,"resourceInfo",void 0),X=e([S("esri.WebScene")],X),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Y||(Y={}));const Z=X;export{Z as default};
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "بيت_Next month_____________________لاحقة",
3
- "prevMonth": "بيت_Previous month_______________لاحقة",
4
- "year": "بيت_Year_________لاحقة"
2
+ "nextMonth": "الشهر التالي",
3
+ "prevMonth": "الشهر السابق",
4
+ "year": "سنة"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "й_Next month_____________________й",
3
- "prevMonth": "й_Previous month_______________й",
4
- "year": "й_Year_________й"
2
+ "nextMonth": "Следващ месец",
3
+ "prevMonth": "Предишен месец",
4
+ "year": "Година"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Č_Next month_____________________ž",
3
- "prevMonth": "Č_Previous month_______________ž",
4
- "year": "Č_Year_________ž"
2
+ "nextMonth": "Sljedeći mjesec",
3
+ "prevMonth": "Prethodni mjesec",
4
+ "year": "Godina"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ó_Next month_____________________à",
3
- "prevMonth": "ó_Previous month_______________à",
4
- "year": "ó_Year_________à"
2
+ "nextMonth": "El mes vinent",
3
+ "prevMonth": "El mes passat",
4
+ "year": "Any"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Ř_Next month_____________________ů",
3
- "prevMonth": "Ř_Previous month_______________ů",
4
- "year": "Ř_Year_________ů"
2
+ "nextMonth": "Další měsíc",
3
+ "prevMonth": "Předchozí měsíc",
4
+ "year": "Rok"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ø_Next month_____________________å",
3
- "prevMonth": "ø_Previous month_______________å",
4
- "year": "ø_Year_________å"
2
+ "nextMonth": "Næste måned",
3
+ "prevMonth": "Forrige måned",
4
+ "year": "År"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ä_Next month_____________________Ü",
3
- "prevMonth": "ä_Previous month_______________Ü",
4
- "year": "ä_Year_________Ü"
2
+ "nextMonth": "Nächster Monat",
3
+ "prevMonth": "Vorheriger Monat",
4
+ "year": "Jahr"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Đ_Next month_____________________ớ",
3
- "prevMonth": "Đ_Previous month_______________ớ",
4
- "year": "Đ_Year_________ớ"
2
+ "nextMonth": "Επόμενος μήνας",
3
+ "prevMonth": "Προηγούμενος μήνας",
4
+ "year": "Ετών"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "á_Next month_____________________Ó",
3
- "prevMonth": "á_Previous month_______________Ó",
4
- "year": "á_Year_________Ó"
2
+ "nextMonth": "Mes próximo",
3
+ "prevMonth": "Mes anterior",
4
+ "year": "Año"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Š_Next month_____________________ä",
3
- "prevMonth": "Š_Previous month_______________ä",
4
- "year": "Š_Year_________ä"
2
+ "nextMonth": "Järgmine kuu",
3
+ "prevMonth": "Eelmine kuu",
4
+ "year": "Aasta"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Å_Next month_____________________ö",
3
- "prevMonth": "Å_Previous month_______________ö",
4
- "year": "Å_Year_________ö"
2
+ "nextMonth": "Seuraava kuukausi",
3
+ "prevMonth": "Edellinen kuukausi",
4
+ "year": "Vuosi"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "æ_Next month_____________________Â",
3
- "prevMonth": "æ_Previous month_______________Â",
4
- "year": "æ_Year_________Â"
2
+ "nextMonth": "Mois suivant",
3
+ "prevMonth": "Mois précédent",
4
+ "year": "Année"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "כן_Next month_____________________ש",
3
- "prevMonth": "כן_Previous month_______________ש",
4
- "year": "כן_Year_________ש"
2
+ "nextMonth": "החודש הבא",
3
+ "prevMonth": "החודש הקודם",
4
+ "year": "שנה"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Č_Next month_____________________ž",
3
- "prevMonth": "Č_Previous month_______________ž",
4
- "year": "Č_Year_________ž"
2
+ "nextMonth": "Sljedeći mjesec",
3
+ "prevMonth": "Prethodni mjesec",
4
+ "year": "Godina"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "í_Next month_____________________ő",
3
- "prevMonth": "í_Previous month_______________ő",
4
- "year": "í_Year_________ő"
2
+ "nextMonth": "Következő hónap",
3
+ "prevMonth": "Előző hónap",
4
+ "year": "év"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ng_Next month_____________________ny",
3
- "prevMonth": "ng_Previous month_______________ny",
4
- "year": "ng_Year_________ny"
2
+ "nextMonth": "Bulan depan",
3
+ "prevMonth": "Bulan sebelumnya",
4
+ "year": "Tahun"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "é_Next month_____________________È",
3
- "prevMonth": "é_Previous month_______________È",
4
- "year": "é_Year_________È"
2
+ "nextMonth": "Mese successivo",
3
+ "prevMonth": "Mese precedente",
4
+ "year": "Anno"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "須_Next month_____________________鷗",
3
- "prevMonth": "須_Previous month_______________鷗",
4
- "year": "須_Year_________鷗"
2
+ "nextMonth": "次月",
3
+ "prevMonth": "前月",
4
+ "year": "年"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "한_Next month_____________________빠",
3
- "prevMonth": "한_Previous month_______________빠",
4
- "year": "한_Year_________빠"
2
+ "nextMonth": "다음 달",
3
+ "prevMonth": "이전 달",
4
+ "year": "년"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Į_Next month_____________________š",
3
- "prevMonth": "Į_Previous month_______________š",
4
- "year": "Į_Year_________š"
2
+ "nextMonth": "Kitas mėnuo",
3
+ "prevMonth": "Ankstesnis mėnuo",
4
+ "year": "Metai"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ķ_Next month_____________________ū",
3
- "prevMonth": "ķ_Previous month_______________ū",
4
- "year": "ķ_Year_________ū"
2
+ "nextMonth": "Nākamais mēnesis",
3
+ "prevMonth": "Iepriekšējais mēnesis",
4
+ "year": "Gads"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "IJ_Next month_____________________ä",
3
- "prevMonth": "IJ_Previous month_______________ä",
4
- "year": "IJ_Year_________ä"
2
+ "nextMonth": "Volgende maand",
3
+ "prevMonth": "Vorige maand",
4
+ "year": "Jaar"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "å_Next month_____________________ø",
3
- "prevMonth": "å_Previous month_______________ø",
4
- "year": "å_Year_________ø"
2
+ "nextMonth": "Neste måned",
3
+ "prevMonth": "Forrige måned",
4
+ "year": "År"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ł_Next month_____________________ą",
3
- "prevMonth": "ł_Previous month_______________ą",
4
- "year": "ł_Year_________ą"
2
+ "nextMonth": "Przyszły miesiąc",
3
+ "prevMonth": "Ubiegły miesiąc",
4
+ "year": "Rok"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ã_Next month_____________________Ç",
3
- "prevMonth": "ã_Previous month_______________Ç",
4
- "year": "ã_Year_________Ç"
2
+ "nextMonth": "Próximo mês",
3
+ "prevMonth": "Mês anterior",
4
+ "year": "Ano"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ã_Next month_____________________Ç",
3
- "prevMonth": "ã_Previous month_______________Ç",
4
- "year": "ã_Year_________Ç"
2
+ "nextMonth": "Próximo mês",
3
+ "prevMonth": "Mês anterior",
4
+ "year": "Ano"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Ă_Next month_____________________ș",
3
- "prevMonth": "Ă_Previous month_______________ș",
4
- "year": "Ă_Year_________ș"
2
+ "nextMonth": "Luna următoare",
3
+ "prevMonth": "Luna anterioară",
4
+ "year": "An"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Ж_Next month_____________________Я",
3
- "prevMonth": "Ж_Previous month_______________Я",
4
- "year": "Ж_Year_________Я"
2
+ "nextMonth": "Следующий месяц",
3
+ "prevMonth": "Предыдущий месяц",
4
+ "year": "Год"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ĺ_Next month_____________________ľ",
3
- "prevMonth": "ĺ_Previous month_______________ľ",
4
- "year": "ĺ_Year_________ľ"
2
+ "nextMonth": "Nasledujúci mesiac",
3
+ "prevMonth": "Predchádzajúci mesiac",
4
+ "year": "Rok"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Š_Next month_____________________č",
3
- "prevMonth": "Š_Previous month_______________č",
4
- "year": "Š_Year_________č"
2
+ "nextMonth": "Naslednji mesec",
3
+ "prevMonth": "Prejšnji mesec",
4
+ "year": "Leto"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Č_Next month_____________________ž",
3
- "prevMonth": "Č_Previous month_______________ž",
4
- "year": "Č_Year_________ž"
2
+ "nextMonth": "Sledećeg meseca",
3
+ "prevMonth": "Prethodni mesec",
4
+ "year": "Godina"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "Å_Next month_____________________ö",
3
- "prevMonth": "Å_Previous month_______________ö",
4
- "year": "Å_Year_________ö"
2
+ "nextMonth": "Nästa månad",
3
+ "prevMonth": "Föregående månad",
4
+ "year": "År"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ก้_Next month_____________________ษฺ",
3
- "prevMonth": "ก้_Previous month_______________ษฺ",
4
- "year": "ก้_Year_________ษฺ"
2
+ "nextMonth": "เดือนถัดไป",
3
+ "prevMonth": "เดือนก่อนหน้า",
4
+ "year": "ปี"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ı_Next month_____________________İ",
3
- "prevMonth": "ı_Previous month_______________İ",
4
- "year": "ı_Year_________İ"
2
+ "nextMonth": "Sonraki ay",
3
+ "prevMonth": "Önceki ay",
4
+ "year": "Yıl"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "nextMonth": "ґ_Next month_____________________Ї",
3
- "prevMonth": "ґ_Previous month_______________Ї",
4
- "year": "ґ_Year_________Ї"
2
+ "nextMonth": "Наступного місяця",
3
+ "prevMonth": "Попередній місяць",
4
+ "year": "Рік"
5
5
  }