@arcgis/core 4.32.0-next.20250128 → 4.32.0-next.20250130

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 (1152) hide show
  1. package/TrackGraphic.js +1 -1
  2. package/applications/Components/SelectionOperation.d.ts +1 -2
  3. package/applications/Components/SketchTooltipControls.d.ts +1 -2
  4. package/applications/Components/basemapUtils.d.ts +1 -2
  5. package/applications/Components/drawUtils.d.ts +1 -2
  6. package/applications/Components/fontUtils.d.ts +1 -2
  7. package/applications/Components/getDefaultUnits.d.ts +1 -2
  8. package/applications/Components/gfxUtils.d.ts +1 -2
  9. package/applications/Components/layerOriginUtils.d.ts +4 -2
  10. package/applications/Components/layersEffectsJsonUtils.d.ts +1 -2
  11. package/applications/Components/previewSymbol2D.d.ts +1 -2
  12. package/applications/Components/reactiveUtils.d.ts +1 -2
  13. package/applications/Components/styleUtils.d.ts +1 -2
  14. package/applications/Components/svgUtils.d.ts +3 -2
  15. package/applications/Components/webStyleSymbolUtils.d.ts +1 -2
  16. package/applications/Excalibur/videoViewUtils.d.ts +1 -2
  17. package/applications/ExperienceBuilder/sketchUtils.d.ts +3 -2
  18. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +2 -2
  19. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +3 -2
  20. package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +4 -2
  21. package/applications/MapViewer/mediaUtils.d.ts +2 -2
  22. package/applications/MapViewer/templateUtils.d.ts +4 -2
  23. package/applications/SceneViewer/colorUtils.d.ts +1 -2
  24. package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -2
  25. package/applications/SceneViewer/layerUtils.d.ts +2 -2
  26. package/applications/SceneViewer/sceneViewerUtils.d.ts +15 -2
  27. package/applications/SceneViewer/symbolUtils.d.ts +1 -2
  28. package/applications/Urban/meshUtils.d.ts +1 -2
  29. package/applications/WebEditor/sketchUtils.d.ts +2 -2
  30. package/arcade.d.ts +2 -2
  31. package/assets/components/assets/icon/hammerCoin16.json +1 -0
  32. package/assets/components/assets/icon/hammerCoin24.json +1 -0
  33. package/assets/components/assets/icon/hammerCoin32.json +1 -0
  34. package/assets/components/assets/icon/hammerLock16.json +1 -0
  35. package/assets/components/assets/icon/hammerLock24.json +1 -0
  36. package/assets/components/assets/icon/hammerLock32.json +1 -0
  37. package/assets/esri/core/workers/RemoteClient.js +1 -1
  38. package/assets/esri/core/workers/chunks/06d72622590dbd38c5de.js +1 -0
  39. package/assets/esri/core/workers/chunks/07c5f3fc475c57f5a7a7.js +1 -0
  40. package/assets/esri/core/workers/chunks/08c4b585290efc98ca5d.js +1 -0
  41. package/assets/esri/core/workers/chunks/{41f7287832d407f13ce5.js → 09b77f82c22530b44daa.js} +1 -1
  42. package/assets/esri/core/workers/chunks/0b62871b89dcb4c70457.js +1 -0
  43. package/assets/esri/core/workers/chunks/0bafa546602b776caf2f.js +1 -0
  44. package/assets/esri/core/workers/chunks/0ebdf0d1fd2034b24519.js +972 -0
  45. package/assets/esri/core/workers/chunks/{e89439cc20b7f4c6a9d1.js → 0ef5b0f8aa8a09acd6e0.js} +1 -1
  46. package/assets/esri/core/workers/chunks/117e7a12af77c761efb5.js +1 -0
  47. package/assets/esri/core/workers/chunks/122ed10cac9f192e1eec.js +1 -0
  48. package/assets/esri/core/workers/chunks/12964a4b16113cdc9c93.js +1 -0
  49. package/assets/esri/core/workers/chunks/149bad940feb0764b350.js +1 -0
  50. package/assets/esri/core/workers/chunks/1891c9aa162c5df1d27c.js +1 -0
  51. package/assets/esri/core/workers/chunks/1ab83753d9eec0463461.js +1 -0
  52. package/assets/esri/core/workers/chunks/{304722106439951da6e1.js → 1accbc048b74857269e4.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{0edf5cd5d004631c3959.js → 1cbeac3301b6943bb28a.js} +1 -1
  54. package/assets/esri/core/workers/chunks/1d51c064045e9c47bd2e.js +1 -0
  55. package/assets/esri/core/workers/chunks/1f443b99653708470f31.js +1 -0
  56. package/assets/esri/core/workers/chunks/{7d49b5bc9eb102e467ab.js → 220b12654b94c94f8d8a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/22e11a8abc70b6571a2b.js +1 -0
  58. package/assets/esri/core/workers/chunks/2345344be4b0e487d3a6.js +1 -0
  59. package/assets/esri/core/workers/chunks/{6eb829a7959df2269b0e.js → 24c94f97a76646d415ae.js} +1 -1
  60. package/assets/esri/core/workers/chunks/258b46b58a4860942f7c.js +1 -0
  61. package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js.LICENSE.txt +1 -1
  62. package/assets/esri/core/workers/chunks/2c6f2fdf274c0258621e.js +1 -0
  63. package/assets/esri/core/workers/chunks/2ff63a71213f618377d6.js +1 -0
  64. package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
  65. package/assets/esri/core/workers/chunks/{985ae30627429832b2a9.js → 32f5f00aab55ef16dcf1.js} +1 -1
  66. package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +1 -0
  67. package/assets/esri/core/workers/chunks/3984bf01f055fc42bfbf.js +1 -0
  68. package/assets/esri/core/workers/chunks/3e872e5e528dca7bee0c.js +1 -0
  69. package/assets/esri/core/workers/chunks/3ec51b75d1a86dad6cb1.js +1 -0
  70. package/assets/esri/core/workers/chunks/4263eee3247aaf4e64bf.js +1 -0
  71. package/assets/esri/core/workers/chunks/448ee44c7f594e5b2551.js +1 -0
  72. package/assets/esri/core/workers/chunks/476205ee4414ed80666a.js +1 -0
  73. package/assets/esri/core/workers/chunks/4b56c0c109e10d7409b8.js +1 -0
  74. package/assets/esri/core/workers/chunks/{95e786366bc471bd0730.js → 4c5279fedf982a174706.js} +1 -1
  75. package/assets/esri/core/workers/chunks/4cab082b8432ddc05345.js +1 -0
  76. package/assets/esri/core/workers/chunks/{1e1306527fb38c5894eb.js → 5a536de1ecae424bad05.js} +1 -1
  77. package/assets/esri/core/workers/chunks/5adeb979f178944b9ce5.js +1 -0
  78. package/assets/esri/core/workers/chunks/5be7cf1564e756c24066.js +1 -0
  79. package/assets/esri/core/workers/chunks/{f09c95c3d79205ee5a84.js → 5e9bf6d0db82526b8a8c.js} +5 -5
  80. package/assets/esri/core/workers/chunks/{57ebfa7f163a1b40cd1e.js → 61795bde00f2e16d04f1.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{568fe969e8f914f042ca.js → 627cbe662d58cda62e7e.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{6d179eb8edcefb91d5d7.js → 69ab4b780f7223cfd7dd.js} +1 -1
  83. package/assets/esri/core/workers/chunks/6d79ec15d1858839f576.js +1 -0
  84. package/assets/esri/core/workers/chunks/6e25742ceedea7fb1b97.js +1 -0
  85. package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js.LICENSE.txt +1 -1
  86. package/assets/esri/core/workers/chunks/6ef2514a6b7bbfb8e37d.js +1 -0
  87. package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
  88. package/assets/esri/core/workers/chunks/{50beab30e120ba39d212.js → 76794184ba8c2e66745e.js} +1 -1
  89. package/assets/esri/core/workers/chunks/7810579a5a780933cdc9.js +1 -0
  90. package/assets/esri/core/workers/chunks/{e45dba512ebee97f0af2.js → 78242f2bf742b33d99fa.js} +1 -1
  91. package/assets/esri/core/workers/chunks/7966c245a073c85f04b1.js +1 -0
  92. package/assets/esri/core/workers/chunks/{fa0d968733d581bc2e4d.js → 7d120f8b01fe719eb257.js} +1 -1
  93. package/assets/esri/core/workers/chunks/7e23c15b2a02116f7189.js +1 -0
  94. package/assets/esri/core/workers/chunks/7f87cf3d6a365d987f69.js +1 -0
  95. package/assets/esri/core/workers/chunks/83edac97a52b26ead1ea.js +314 -0
  96. package/assets/esri/core/workers/chunks/881ddbdeb40336208e90.js +1 -0
  97. package/assets/esri/core/workers/chunks/{ec9d5af8887854e821c8.js → 88cbaa91c495d86f4bb0.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{11c999b976ed805b0608.js → 89e3f7880abd014a62c0.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{a3ae5ea96898de327147.js → 8bd51b5b392dfacc922f.js} +1 -1
  100. package/assets/esri/core/workers/chunks/8e6301006abdf47cc88d.js +1 -0
  101. package/assets/esri/core/workers/chunks/{9466e53ff270f6eb42c9.js → 9011704b258ecbfb6d9b.js} +2 -2
  102. package/assets/esri/core/workers/chunks/{9466e53ff270f6eb42c9.js.LICENSE.txt → 9011704b258ecbfb6d9b.js.LICENSE.txt} +1 -1
  103. package/assets/esri/core/workers/chunks/92984981afcbb95828cd.js +1 -0
  104. package/assets/esri/core/workers/chunks/934857de20f6f5c15188.js +1 -0
  105. package/assets/esri/core/workers/chunks/95ad76e58452b60fb79f.js +1 -0
  106. package/assets/esri/core/workers/chunks/9725398f6d56c8ba54ae.js +1 -0
  107. package/assets/esri/core/workers/chunks/97310e6eec87eeaf58f0.js +1 -0
  108. package/assets/esri/core/workers/chunks/9ffa27d0517bad84572e.js +1 -0
  109. package/assets/esri/core/workers/chunks/a39977478a6c57d2e8fb.js +1 -0
  110. package/assets/esri/core/workers/chunks/{f355ca70abadb2155839.js → a61d05354348385f41b5.js} +1 -1
  111. package/assets/esri/core/workers/chunks/af917f69d9c6e9937263.js +1 -0
  112. package/assets/esri/core/workers/chunks/b18620fc15707e4413a1.js +1 -0
  113. package/assets/esri/core/workers/chunks/b1baf39daf5725404be5.js +1 -0
  114. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
  115. package/assets/esri/core/workers/chunks/{39a6fe4cdb205f4925fb.js → b68bddd0c4ca91493543.js} +1 -1
  116. package/assets/esri/core/workers/chunks/bc50585615f07d5ec1a9.js +1 -0
  117. package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +2 -0
  118. package/assets/esri/core/workers/chunks/{b5d4255db21dfd3b3b13.js.LICENSE.txt → bf9bc52a3c559108c19a.js.LICENSE.txt} +1 -1
  119. package/assets/esri/core/workers/chunks/c04091eea7089dc2e864.js +1 -0
  120. package/assets/esri/core/workers/chunks/{b9369c5415f5b3bda5cf.js → c1d80a709148e3373a82.js} +1 -1
  121. package/assets/esri/core/workers/chunks/c249ad935f54d3b49ae3.js +1 -0
  122. package/assets/esri/core/workers/chunks/{759618564e68fc09dc36.js → c57b9f2b9c229e68919d.js} +1 -1
  123. package/assets/esri/core/workers/chunks/c74441fbe0f63633796f.js +1 -0
  124. package/assets/esri/core/workers/chunks/{7fd48f0a2b35779e680a.js → c7a94e569c905f97244a.js} +1 -1
  125. package/assets/esri/core/workers/chunks/c80d542935803bf869f8.js +1 -0
  126. package/assets/esri/core/workers/chunks/{bc0183350841e09d71fa.js → c8a0089e080140db9076.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{d71a5c029fc9f4820589.js → cee3a38b92a48a58c4d0.js} +1 -1
  128. package/assets/esri/core/workers/chunks/d1678945cf6a58f76863.js +1 -0
  129. package/assets/esri/core/workers/chunks/{9ed1691eab19dfb1cf04.js → d1718ad93e3271b0525e.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{d5b373fe244e5dce1548.js → d27a199fd8e2ade69254.js} +1 -1
  131. package/assets/esri/core/workers/chunks/d3a8aabdbfb59dd433e3.js +1 -0
  132. package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +1 -0
  133. package/assets/esri/core/workers/chunks/da1157e288dbc6ba842a.js +1 -0
  134. package/assets/esri/core/workers/chunks/{8584ccce34972e28c040.js → da77eefaad83c0644380.js} +1 -1
  135. package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +1 -0
  136. package/assets/esri/core/workers/chunks/dd9be173cddc16a354ed.js +1 -0
  137. package/assets/esri/core/workers/chunks/debfb75a94b66b58cbbc.js +1 -0
  138. package/assets/esri/core/workers/chunks/{5a83f90b55a5efbe1ef2.js → df3d1a8d3f11d52eb30d.js} +1 -1
  139. package/assets/esri/core/workers/chunks/e0de91eacf3a3b7eda55.js +51 -0
  140. package/assets/esri/core/workers/chunks/e444ec05a8a1dfbd21a8.js +1 -0
  141. package/assets/esri/core/workers/chunks/e4651d577d297386268e.js +1 -0
  142. package/assets/esri/core/workers/chunks/e468bf4ec7402942ad8c.js +1 -0
  143. package/assets/esri/core/workers/chunks/f200dca22f9f9bbb8670.js +1 -0
  144. package/assets/esri/core/workers/chunks/f2fae056a81f12b56b04.js +1 -0
  145. package/assets/esri/core/workers/chunks/f429d95eb986f3d215f3.js +1 -0
  146. package/assets/esri/core/workers/chunks/f8367c21fa91435c7c53.js +1 -0
  147. package/assets/esri/themes/base/_Ui.scss +6 -0
  148. package/assets/esri/themes/base/_mixins.scss +0 -7
  149. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +0 -2
  150. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -5
  151. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +0 -2
  152. package/assets/esri/themes/base/widgets/_Features.scss +0 -5
  153. package/assets/esri/themes/base/widgets/_LayerList.scss +0 -2
  154. package/assets/esri/themes/base/widgets/_TableList.scss +0 -2
  155. package/assets/esri/themes/dark/main.css +1 -1
  156. package/assets/esri/themes/light/main.css +1 -1
  157. package/assets/esri/themes/light/view.css +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  160. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  161. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  162. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  163. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  164. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  165. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  166. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  167. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  168. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  169. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  170. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  171. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  172. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  173. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  174. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  175. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  176. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  177. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  178. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  179. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  180. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  181. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  182. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  183. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  184. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
  185. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  186. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  187. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  188. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  189. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  190. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  191. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  192. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  193. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  194. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  195. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  196. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  197. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  198. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  199. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  200. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  218. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  219. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  220. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  221. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  222. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  240. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  241. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  242. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  243. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  244. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  245. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  246. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  247. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  248. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  249. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  250. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  251. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  252. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  253. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  254. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  255. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  256. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  257. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  258. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  259. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  260. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  261. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  262. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  263. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  264. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  265. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  266. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  267. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  268. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  269. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  270. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  271. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  272. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  273. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  274. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  275. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  276. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  277. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  278. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  279. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  280. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  281. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  282. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  283. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  284. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  285. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  286. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  287. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  288. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  289. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  290. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  291. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  292. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  293. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  294. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  295. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  296. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  297. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  298. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  299. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  300. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  301. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_no.json +1 -1
  302. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  303. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  304. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  305. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  306. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  307. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  308. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  309. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  310. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  311. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  312. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  313. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  314. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  315. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  316. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  317. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  318. package/chunks/AtmosphereCompositing.glsl.js +2 -2
  319. package/chunks/BlendLayers.glsl.js +1 -1
  320. package/chunks/BlendWeights.glsl.js +1 -1
  321. package/chunks/BloomBlur.glsl.js +23 -23
  322. package/chunks/BloomComposition.glsl.js +3 -3
  323. package/chunks/BloomDepthAdjust.glsl.js +2 -2
  324. package/chunks/Blur.glsl.js +1 -1
  325. package/chunks/Bufferer-DjC-SKTJ.js +5 -0
  326. package/chunks/ChapmanAtmosphere.glsl.js +2 -2
  327. package/chunks/CheckerBoard.glsl.js +2 -2
  328. package/chunks/Clouds.glsl.js +14 -14
  329. package/chunks/CloudsComposition.glsl.js +1 -1
  330. package/chunks/ColorMaterial.glsl.js +1 -1
  331. package/chunks/ComponentShader.glsl.js +4 -4
  332. package/chunks/Compositing.glsl.js +2 -2
  333. package/chunks/DefaultMaterial.glsl.js +16 -15
  334. package/chunks/{Distance2DCalculator-C9BrfErD.js → Distance2DCalculator-8-JrFGHH.js} +1 -1
  335. package/chunks/EdgeDetect.glsl.js +2 -2
  336. package/chunks/EdgeShader.glsl.js +2 -2
  337. package/chunks/Envelope.js +1 -1
  338. package/chunks/FocusAreaColor.glsl.js +2 -2
  339. package/chunks/FocusAreaMask.glsl.js +1 -1
  340. package/chunks/Fog.glsl.js +3 -3
  341. package/chunks/GeodeticDistanceCalculator-BsWHOuqE.js +5 -0
  342. package/chunks/Geometry.js +1 -1
  343. package/chunks/HUDCompositing.glsl.js +1 -1
  344. package/chunks/HUDMaterial.glsl.js +24 -24
  345. package/chunks/Haze.glsl.js +3 -3
  346. package/chunks/HazeCompositing.glsl.js +2 -2
  347. package/chunks/Heatmap.glsl.js +1 -1
  348. package/chunks/HeatmapDensity.glsl.js +5 -5
  349. package/chunks/HighlightApply.glsl.js +2 -2
  350. package/chunks/HighlightDownsample.glsl.js +2 -2
  351. package/chunks/HighlightToSingle.glsl.js +2 -2
  352. package/chunks/ImageMaterial.glsl.js +4 -4
  353. package/chunks/LaserlinePath.glsl.js +1 -1
  354. package/chunks/Laserlines.glsl.js +1 -1
  355. package/chunks/LineCallout.glsl.js +1 -1
  356. package/chunks/LineMarker.glsl.js +8 -8
  357. package/chunks/Magnifier.glsl.js +4 -4
  358. package/chunks/MeasurementArrow.glsl.js +2 -2
  359. package/chunks/NativeLine.glsl.js +4 -4
  360. package/chunks/NoiseTextureAtlas.glsl.js +34 -34
  361. package/chunks/OITBlend.glsl.js +3 -3
  362. package/chunks/OperatorClip.js +1 -1
  363. package/chunks/OperatorCut.js +1 -1
  364. package/chunks/OperatorGeneralize.js +1 -1
  365. package/chunks/OperatorGeodesicBuffer.js +1 -1
  366. package/chunks/OperatorGeodeticArea.js +1 -1
  367. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  368. package/chunks/OperatorGeodeticDistance.js +1 -1
  369. package/chunks/OperatorGeodeticLength.js +1 -1
  370. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  371. package/chunks/OperatorProximity.js +1 -1
  372. package/chunks/OperatorProximityGeodesic.js +1 -1
  373. package/chunks/OperatorShapePreservingLength.js +1 -1
  374. package/chunks/OperatorShapePreservingProject.js +1 -1
  375. package/chunks/OverlayCompositing.glsl.js +1 -1
  376. package/chunks/Path.glsl.js +9 -9
  377. package/chunks/Pattern.glsl.js +3 -3
  378. package/chunks/Point2D.js +1 -1
  379. package/chunks/PointRenderer.glsl.js +1 -1
  380. package/chunks/Precipitation.glsl.js +1 -1
  381. package/chunks/ProjectionTransformation.js +1 -1
  382. package/chunks/QuadraticBezier.js +1 -1
  383. package/chunks/RasterColorizer.glsl.js +9 -9
  384. package/chunks/RealisticTree.glsl.js +3 -3
  385. package/chunks/RibbonLine.glsl.js +32 -32
  386. package/chunks/SSAO.glsl.js +2 -2
  387. package/chunks/SSAOBlur.glsl.js +1 -1
  388. package/chunks/ShadedColorMaterial.glsl.js +3 -3
  389. package/chunks/ShadowCastAccumulate.glsl.js +2 -2
  390. package/chunks/ShadowCastVisualize.glsl.js +4 -4
  391. package/chunks/ShadowHighlight.glsl.js +2 -2
  392. package/chunks/{SideCalculator2D-Bf4QCxCR.js → SideCalculator2D-BNwb5gvz.js} +1 -1
  393. package/chunks/SimpleAtmosphere.glsl.js +8 -8
  394. package/chunks/SingleHighlightApply.glsl.js +1 -1
  395. package/chunks/SingleHighlightBlur.glsl.js +6 -7
  396. package/chunks/SlicePlaneMaterial.glsl.js +2 -2
  397. package/chunks/Stars.glsl.js +2 -2
  398. package/chunks/Terrain.glsl.js +2 -2
  399. package/chunks/TextureOnly.glsl.js +2 -2
  400. package/chunks/Viewshed.glsl.js +2 -2
  401. package/chunks/WaterSurface.glsl.js +7 -7
  402. package/chunks/distanceOperator.js +1 -1
  403. package/chunks/relateOperator.js +1 -1
  404. package/core/QueueProcessor.js +5 -0
  405. package/core/accessorSupport/decorators.d.ts +4 -2
  406. package/core/has.js +1 -1
  407. package/core/jsonMap.js +1 -1
  408. package/core/lang.d.ts +1 -2
  409. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  410. package/core/mathUtils.js +1 -1
  411. package/core/promiseUtils.d.ts +5 -2
  412. package/core/quantity.d.ts +3 -2
  413. package/core/reactiveUtils.d.ts +5 -2
  414. package/core/scheduling.d.ts +2 -2
  415. package/core/sql/WhereClauseCache.js +1 -1
  416. package/core/sql.d.ts +1 -2
  417. package/core/sql.js +1 -1
  418. package/core/units.d.ts +9 -2
  419. package/core/urlUtils.d.ts +5 -2
  420. package/core/workers.d.ts +1 -2
  421. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  422. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  423. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  424. package/editing/sharedTemplates/executor/builders/connectionPoint.js +1 -1
  425. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  426. package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
  427. package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
  428. package/editing/sharedTemplates/executor/builders/pointAtAllVerticesOfLine.js +1 -1
  429. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfLine.js +1 -1
  430. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfRadial.js +1 -1
  431. package/editing/sharedTemplates/executor/builders/pointAtEndOfLine.js +1 -1
  432. package/editing/sharedTemplates/executor/builders/pointAtInteriorVertices.js +1 -1
  433. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  434. package/editing/sharedTemplates/executor/builders/pointAtNotBeginningOfLine.js +1 -1
  435. package/editing/sharedTemplates/executor/builders/pointAtNotEndOfLine.js +1 -1
  436. package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
  437. package/editing/sharedTemplates/executor/builders/pointAtPolygonNotStart.js +1 -1
  438. package/editing/sharedTemplates/executor/builders/pointAtPolygonStart.js +1 -1
  439. package/editing/sharedTemplates/executor/builders/pointIdentity.js +1 -1
  440. package/editing/sharedTemplates/executor/builders/pointPrimaryIdentity.js +1 -1
  441. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  442. package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
  443. package/editing/sharedTemplates/executor/builders/polygonIdentity.js +1 -1
  444. package/editing/sharedTemplates/executor/builders/polygonPrimaryIdentity.js +1 -1
  445. package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
  446. package/editing/sharedTemplates/executor/builders/radialLines.js +1 -1
  447. package/editing/sharedTemplates/executor/builders/twoPointLines.js +1 -1
  448. package/editing/sharedTemplates/executor/createTemplateExecutor.js +5 -0
  449. package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
  450. package/editing/sharedTemplates/executor/support/executorUtils.js +1 -1
  451. package/editing/sharedTemplates/executor/support/getBuilder.js +5 -0
  452. package/editing/templateUtils.js +1 -1
  453. package/form/elements/inputs.d.ts +11 -2
  454. package/form/elements.d.ts +7 -2
  455. package/geometry/coordinateFormatter.d.ts +11 -2
  456. package/geometry/geometryEngine.d.ts +37 -2
  457. package/geometry/geometryEngineAsync.d.ts +37 -2
  458. package/geometry/operators/affineTransformOperator.d.ts +3 -2
  459. package/geometry/operators/alphaShapeOperator.d.ts +3 -2
  460. package/geometry/operators/areaOperator.d.ts +2 -2
  461. package/geometry/operators/autoCompleteOperator.d.ts +2 -2
  462. package/geometry/operators/boundaryOperator.d.ts +3 -2
  463. package/geometry/operators/bufferOperator.d.ts +3 -2
  464. package/geometry/operators/centroidOperator.d.ts +2 -2
  465. package/geometry/operators/clipOperator.d.ts +3 -2
  466. package/geometry/operators/containsOperator.d.ts +3 -2
  467. package/geometry/operators/convexHullOperator.d.ts +4 -2
  468. package/geometry/operators/crossesOperator.d.ts +3 -2
  469. package/geometry/operators/cutOperator.d.ts +2 -2
  470. package/geometry/operators/densifyOperator.d.ts +3 -2
  471. package/geometry/operators/differenceOperator.d.ts +3 -2
  472. package/geometry/operators/disjointOperator.d.ts +3 -2
  473. package/geometry/operators/distanceOperator.d.ts +2 -2
  474. package/geometry/operators/equalsOperator.d.ts +3 -2
  475. package/geometry/operators/extendOperator.d.ts +2 -2
  476. package/geometry/operators/extendOperator.js +1 -1
  477. package/geometry/operators/generalizeOperator.d.ts +3 -2
  478. package/geometry/operators/geodesicBufferOperator.d.ts +5 -2
  479. package/geometry/operators/geodesicProximityOperator.d.ts +6 -2
  480. package/geometry/operators/geodeticAreaOperator.d.ts +4 -2
  481. package/geometry/operators/geodeticDensifyOperator.d.ts +5 -2
  482. package/geometry/operators/geodeticDistanceOperator.d.ts +4 -2
  483. package/geometry/operators/geodeticLengthOperator.d.ts +4 -2
  484. package/geometry/operators/graphicBufferOperator.d.ts +2 -2
  485. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  486. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  487. package/geometry/operators/gx/operatorBoundary.js +1 -1
  488. package/geometry/operators/gx/operatorBuffer.js +1 -1
  489. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  490. package/geometry/operators/gx/operatorDifference.js +1 -1
  491. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  492. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  493. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  494. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  495. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  496. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  497. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  498. package/geometry/operators/gx/operatorIntersection.js +1 -1
  499. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  500. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  501. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  502. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  503. package/geometry/operators/gx/operatorOffset.js +1 -1
  504. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  505. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  506. package/geometry/operators/gx/operatorProject.js +1 -1
  507. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  508. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  509. package/geometry/operators/gx/operatorSimplify.js +1 -1
  510. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  511. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  512. package/geometry/operators/gx/operatorUnion.js +1 -1
  513. package/geometry/operators/integrateOperator.d.ts +2 -2
  514. package/geometry/operators/intersectionOperator.d.ts +4 -2
  515. package/geometry/operators/intersectsOperator.d.ts +3 -2
  516. package/geometry/operators/isNearOperator.d.ts +2 -2
  517. package/geometry/operators/isNearOperator.js +1 -1
  518. package/geometry/operators/labelPointOperator.d.ts +3 -2
  519. package/geometry/operators/lengthOperator.d.ts +2 -2
  520. package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
  521. package/geometry/operators/locateBetweenOperator.d.ts +2 -2
  522. package/geometry/operators/minimumBoundingCircleOperator.d.ts +3 -2
  523. package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
  524. package/geometry/operators/offsetOperator.d.ts +3 -2
  525. package/geometry/operators/overlapsOperator.d.ts +3 -2
  526. package/geometry/operators/polygonOverlayOperator.d.ts +2 -2
  527. package/geometry/operators/polygonSlicerOperator.d.ts +4 -2
  528. package/geometry/operators/projectOperator.d.ts +5 -2
  529. package/geometry/operators/projectOperator.js +1 -1
  530. package/geometry/operators/proximityOperator.d.ts +4 -2
  531. package/geometry/operators/relateOperator.d.ts +4 -2
  532. package/geometry/operators/reshapeOperator.d.ts +2 -2
  533. package/geometry/operators/reshapeOperator.js +1 -1
  534. package/geometry/operators/shapePreservingProjectOperator.d.ts +5 -2
  535. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  536. package/geometry/operators/simplifyOperator.d.ts +4 -2
  537. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -2
  538. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  539. package/geometry/operators/support/initNoPeFactory.js +1 -1
  540. package/geometry/operators/support/jsonConverter.js +1 -1
  541. package/geometry/operators/symmetricDifferenceOperator.d.ts +3 -2
  542. package/geometry/operators/touchesOperator.d.ts +3 -2
  543. package/geometry/operators/unionOperator.d.ts +3 -2
  544. package/geometry/operators/withinOperator.d.ts +3 -2
  545. package/geometry/projection.d.ts +5 -2
  546. package/geometry/support/geodesicUtils.d.ts +5 -2
  547. package/geometry/support/jsonUtils.d.ts +2 -2
  548. package/geometry/support/meshUtils.d.ts +6 -2
  549. package/geometry/support/normalizeUtils.d.ts +2 -2
  550. package/geometry/support/scaleUtils.js +1 -1
  551. package/geometry/support/webMercatorUtils.d.ts +6 -2
  552. package/geometry.d.ts +7 -2
  553. package/interfaces.d.ts +72 -94
  554. package/intl.d.ts +16 -2
  555. package/kernel.d.ts +2 -2
  556. package/layers/ImageryLayer.js +1 -1
  557. package/layers/ImageryTileLayer.js +1 -1
  558. package/layers/LinkChartLayer.js +1 -1
  559. package/layers/catalog/catalogUtils.d.ts +2 -2
  560. package/layers/graphics/OptimizedGeometry.js +1 -1
  561. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  562. package/layers/graphics/sources/ParquetSource.js +1 -1
  563. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  564. package/layers/knowledgeGraph/cypherUtils.d.ts +1 -2
  565. package/layers/knowledgeGraph/layerUtils.js +1 -1
  566. package/layers/knowledgeGraph/supportUtils.d.ts +4 -2
  567. package/layers/mixins/APIKeyMixin.d.ts +1 -1
  568. package/layers/mixins/ArcGISCachedService.d.ts +1 -1
  569. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  570. package/layers/mixins/ArcGISMapService.d.ts +1 -1
  571. package/layers/mixins/BlendLayer.d.ts +1 -1
  572. package/layers/mixins/CustomParametersMixin.d.ts +1 -1
  573. package/layers/mixins/DisplayFilteredLayer.d.ts +1 -1
  574. package/layers/mixins/FeatureEffectLayer.d.ts +1 -1
  575. package/layers/mixins/FeatureLayerBase.d.ts +1 -1
  576. package/layers/mixins/FeatureReductionLayer.d.ts +1 -1
  577. package/layers/mixins/ImageryTileMixin.d.ts +1 -1
  578. package/layers/mixins/ImageryTileMixin.js +1 -1
  579. package/layers/mixins/OperationalLayer.d.ts +1 -1
  580. package/layers/mixins/OrderedLayer.d.ts +1 -1
  581. package/layers/mixins/PortalLayer.d.ts +1 -1
  582. package/layers/mixins/PublishableLayer.d.ts +1 -1
  583. package/layers/mixins/RasterPresetRendererMixin.d.ts +1 -1
  584. package/layers/mixins/RefreshableLayer.d.ts +1 -1
  585. package/layers/mixins/ScaleRangeLayer.d.ts +1 -1
  586. package/layers/mixins/SceneService.d.ts +1 -1
  587. package/layers/mixins/SublayersOwner.d.ts +1 -1
  588. package/layers/mixins/TemporalLayer.d.ts +1 -1
  589. package/layers/mixins/TemporalSceneLayer.d.ts +1 -1
  590. package/layers/ogc/wcsUtils.d.ts +1 -2
  591. package/layers/ogc/wfsUtils.d.ts +2 -2
  592. package/layers/orientedImagery/transformations/imageToWorld.d.ts +1 -2
  593. package/layers/orientedImagery/transformations/worldToImage.d.ts +1 -2
  594. package/layers/support/DisplayFilterInfo.js +1 -1
  595. package/layers/support/Sublayer.js +1 -1
  596. package/layers/support/TrackInfo.js +1 -1
  597. package/layers/support/TrackPartInfo.js +5 -0
  598. package/layers/support/arcadeUtils.d.ts +1 -2
  599. package/layers/support/arcadeUtils.js +1 -1
  600. package/layers/support/csvUtils.d.ts +1 -2
  601. package/layers/support/displayFilterUtils.js +1 -1
  602. package/layers/support/featureLayerUtils.js +1 -1
  603. package/layers/support/fieldUtils.d.ts +8 -2
  604. package/layers/support/fieldUtils.js +1 -1
  605. package/layers/support/layerOriginUtils.js +1 -1
  606. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  607. package/layers/support/rasterFieldUtils.js +1 -1
  608. package/layers/support/rasterFunctionConstants.d.ts +15 -2
  609. package/layers/support/rasterFunctionUtils.d.ts +105 -2
  610. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  611. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  612. package/package.json +3 -3
  613. package/pointCloudRenderers.d.ts +5 -2
  614. package/popup/content.d.ts +9 -2
  615. package/rasterRenderers.d.ts +7 -2
  616. package/renderers/mixins/VisualVariablesMixin.d.ts +1 -1
  617. package/renderers/support/jsonUtils.d.ts +1 -2
  618. package/renderers/support/utils.d.ts +2 -2
  619. package/renderers.d.ts +9 -2
  620. package/request.js +1 -1
  621. package/rest/closestFacility.d.ts +1 -2
  622. package/rest/featureService/utils.d.ts +1 -2
  623. package/rest/find.d.ts +1 -2
  624. package/rest/geometryService.d.ts +21 -2
  625. package/rest/geoprocessor.d.ts +2 -2
  626. package/rest/identify.d.ts +1 -2
  627. package/rest/imageService.d.ts +19 -2
  628. package/rest/knowledgeGraphService.d.ts +11 -2
  629. package/rest/knowledgeGraphService.js +1 -1
  630. package/rest/locator.d.ts +4 -2
  631. package/rest/networkService.d.ts +1 -2
  632. package/rest/networks/queryAssociations.d.ts +1 -2
  633. package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -2
  634. package/rest/networks/trace.d.ts +1 -2
  635. package/rest/places.d.ts +3 -2
  636. package/rest/print.d.ts +2 -2
  637. package/rest/query.d.ts +11 -2
  638. package/rest/route.d.ts +1 -2
  639. package/rest/serviceArea.d.ts +1 -2
  640. package/rest/symbolService.d.ts +1 -2
  641. package/smartMapping/labels/bins.d.ts +1 -2
  642. package/smartMapping/labels/clusters.d.ts +1 -2
  643. package/smartMapping/popup/clusters.d.ts +1 -2
  644. package/smartMapping/popup/templates.d.ts +1 -2
  645. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -2
  646. package/smartMapping/raster/renderers/colormap.d.ts +1 -2
  647. package/smartMapping/raster/renderers/flow.d.ts +1 -2
  648. package/smartMapping/raster/renderers/rgb.d.ts +1 -2
  649. package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -2
  650. package/smartMapping/raster/renderers/stretch.d.ts +1 -2
  651. package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -2
  652. package/smartMapping/raster/renderers/vectorField.d.ts +1 -2
  653. package/smartMapping/raster/support/colorRamps.d.ts +5 -2
  654. package/smartMapping/raster/support/utils.d.ts +2 -2
  655. package/smartMapping/renderers/color.d.ts +6 -2
  656. package/smartMapping/renderers/dotDensity.d.ts +1 -2
  657. package/smartMapping/renderers/dotDensity.js +1 -1
  658. package/smartMapping/renderers/heatmap.d.ts +2 -2
  659. package/smartMapping/renderers/heatmap.js +1 -1
  660. package/smartMapping/renderers/location.d.ts +1 -2
  661. package/smartMapping/renderers/opacity.d.ts +1 -2
  662. package/smartMapping/renderers/pieChart.d.ts +2 -2
  663. package/smartMapping/renderers/predominance.d.ts +1 -2
  664. package/smartMapping/renderers/relationship.d.ts +2 -2
  665. package/smartMapping/renderers/size.d.ts +5 -2
  666. package/smartMapping/renderers/support/rendererUtils.d.ts +1 -2
  667. package/smartMapping/renderers/type.d.ts +2 -2
  668. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  669. package/smartMapping/statistics/heatmapStatistics.js +1 -1
  670. package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
  671. package/smartMapping/statistics/support/ageUtils.d.ts +1 -2
  672. package/smartMapping/statistics/support/predominanceUtils.d.ts +1 -2
  673. package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
  674. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  675. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  676. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  677. package/smartMapping/support/adapters/LayerAdapter.js +1 -1
  678. package/smartMapping/support/adapters/OGCFeatureLayerAdapter.js +1 -1
  679. package/smartMapping/support/adapters/PointCloudLayerAdapter.js +1 -1
  680. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  681. package/smartMapping/support/adapters/StreamLayerAdapter.js +1 -1
  682. package/smartMapping/support/adapters/support/histogramUtils.js +5 -0
  683. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  684. package/smartMapping/support/adapters/support/utils.js +1 -1
  685. package/smartMapping/symbology/color.d.ts +7 -2
  686. package/smartMapping/symbology/dotDensity.d.ts +4 -2
  687. package/smartMapping/symbology/flow.d.ts +5 -2
  688. package/smartMapping/symbology/heatmap.d.ts +5 -2
  689. package/smartMapping/symbology/location.d.ts +3 -2
  690. package/smartMapping/symbology/pieChart.d.ts +5 -2
  691. package/smartMapping/symbology/predominance.d.ts +5 -2
  692. package/smartMapping/symbology/relationship.d.ts +5 -2
  693. package/smartMapping/symbology/size.d.ts +3 -2
  694. package/smartMapping/symbology/support/colorRamps.d.ts +4 -2
  695. package/smartMapping/symbology/type.d.ts +5 -2
  696. package/support/LayersMixin.d.ts +1 -1
  697. package/support/TablesMixin.d.ts +1 -1
  698. package/support/featureFlags.js +1 -1
  699. package/support/popupUtils.d.ts +4 -2
  700. package/support/revision.js +1 -1
  701. package/support/timeUtils.d.ts +3 -2
  702. package/symbols/support/cimConversionUtils.d.ts +1 -2
  703. package/symbols/support/cimSymbolUtils.d.ts +6 -2
  704. package/symbols/support/jsonUtils.d.ts +1 -2
  705. package/symbols/support/symbolUtils.d.ts +7 -2
  706. package/symbols.d.ts +29 -2
  707. package/tables/elements.d.ts +5 -2
  708. package/unionTypes.d.ts +12 -2
  709. package/versionManagement/utils.d.ts +2 -2
  710. package/versionManagement/versionAdapters/utils.d.ts +2 -2
  711. package/views/2d/engine/webgl/TextureManager.js +1 -1
  712. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  713. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  714. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  715. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +1 -1
  716. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  717. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  718. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  719. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  720. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  721. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js +1 -1
  722. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  723. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  724. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  725. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  726. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TestShader.js +1 -1
  727. package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
  728. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  729. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  730. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  731. package/views/2d/layers/MediaLayerView2D.js +1 -1
  732. package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
  733. package/views/2d/layers/TileLayerView2D.js +1 -1
  734. package/views/2d/layers/features/Processor.js +1 -1
  735. package/views/2d/layers/features/ProcessorTileMessageQueue.js +1 -1
  736. package/views/2d/layers/features/aggregation/AAggregateSpatialIndex.js +1 -1
  737. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  738. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  739. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  740. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  741. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  742. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  743. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  744. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  745. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  746. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  747. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  748. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  749. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  750. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  751. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  752. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  753. package/views/2d/layers/features/schema/processor/StorageSchema.js +1 -1
  754. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  755. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  756. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  757. package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +1 -1
  758. package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +1 -1
  759. package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +1 -1
  760. package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
  761. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  762. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  763. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +5 -0
  764. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  765. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  766. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  767. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  768. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  769. package/views/2d/layers/features/support/whereUtils.js +1 -1
  770. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  771. package/views/2d/tiling/TileQueue.js +1 -1
  772. package/views/3d/environment/ChapmanApproximation.glsl.js +3 -3
  773. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  774. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  775. package/views/3d/environment/ChapmanRaymarching.glsl.js +4 -4
  776. package/views/3d/environment/Clouds.glsl.js +1 -1
  777. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  778. package/views/3d/environment/CloudsComposition.js +1 -1
  779. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  780. package/views/3d/environment/Fog.glsl.js +1 -1
  781. package/views/3d/environment/Fog.js +1 -1
  782. package/views/3d/environment/LocalAtmosphere.js +1 -1
  783. package/views/3d/environment/MarsAtmosphere.js +1 -1
  784. package/views/3d/environment/NoiseTextureAtlas.glsl.js +1 -1
  785. package/views/3d/environment/Precipitation.glsl.js +1 -1
  786. package/views/3d/environment/Precipitation.js +1 -1
  787. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  788. package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
  789. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  790. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  791. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  792. package/views/3d/layers/SceneLayerWorker.js +1 -1
  793. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  794. package/views/3d/layers/graphics/Labeler.js +1 -1
  795. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  796. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  797. package/views/3d/layers/graphics/pipeline/Tile.js +1 -1
  798. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  799. package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
  800. package/views/3d/layers/graphics/pipeline/featureData/FeatureDataStore.js +1 -1
  801. package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
  802. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  803. package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
  804. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  805. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  806. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  807. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  808. package/views/3d/support/PBFDecoder.js +1 -1
  809. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  810. package/views/3d/webgl/RenderNode.js +1 -1
  811. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  812. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
  813. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  814. package/views/3d/webgl-engine/collections/Component/Material/shader/DecodeSymbolColor.glsl.js +2 -2
  815. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  816. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  817. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -1
  818. package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +1 -1
  819. package/views/3d/webgl-engine/core/shaderLibrary/HighlightReadBitmap.glsl.js +2 -2
  820. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +3 -3
  821. package/views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js +1 -1
  822. package/views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js +2 -2
  823. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +1 -1
  824. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +2 -2
  825. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  826. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +1 -1
  827. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -9
  828. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +1 -1
  829. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
  830. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
  831. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
  832. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  833. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +2 -2
  834. package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +1 -1
  835. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
  836. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
  837. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  838. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +1 -1
  839. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +2 -2
  840. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +2 -2
  841. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  842. package/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js +3 -3
  843. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  844. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +1 -1
  845. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +1 -1
  846. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
  847. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +1 -1
  848. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +3 -3
  849. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +2 -2
  850. package/views/3d/webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js +1 -1
  851. package/views/3d/webgl-engine/core/shaderLibrary/raster/Common.glsl.js +2 -2
  852. package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +1 -1
  853. package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
  854. package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +1 -1
  855. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +1 -1
  856. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +1 -1
  857. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
  858. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
  859. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +1 -1
  860. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
  861. package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +1 -1
  862. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +4 -4
  863. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +1 -1
  864. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  865. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +1 -1
  866. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +1 -1
  867. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  868. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +1 -1
  869. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +1 -1
  870. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +7 -7
  871. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +2 -2
  872. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
  873. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  874. package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +2 -2
  875. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +1 -1
  876. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  877. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +1 -1
  878. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
  879. package/views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js +1 -1
  880. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  881. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
  882. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +6 -6
  883. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +1 -1
  884. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  885. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
  886. package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
  887. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  888. package/views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js +1 -1
  889. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -1
  890. package/views/3d/webgl-engine/core/shaderLibrary/util/DoublePrecision.glsl.js +1 -1
  891. package/views/3d/webgl-engine/core/shaderLibrary/util/IsNaN.glsl.js +2 -2
  892. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  893. package/views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js +1 -1
  894. package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js +1 -1
  895. package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js +1 -1
  896. package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +1 -1
  897. package/views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js +1 -1
  898. package/views/3d/webgl-engine/core/shaderLibrary/util/TextureOnly.glsl.js +1 -1
  899. package/views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js +1 -1
  900. package/views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js +1 -1
  901. package/views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js +1 -1
  902. package/views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js +1 -1
  903. package/views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js +1 -1
  904. package/views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js +1 -1
  905. package/views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js +1 -1
  906. package/views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js +1 -1
  907. package/views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js +1 -1
  908. package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +1 -1
  909. package/views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js +1 -1
  910. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  911. package/views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js +1 -1
  912. package/views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js +1 -1
  913. package/views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js +1 -1
  914. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  915. package/views/3d/webgl-engine/core/shaderModules/Integer2BindUniform.js +1 -1
  916. package/views/3d/webgl-engine/core/shaderModules/Integer2PassUniform.js +1 -1
  917. package/views/3d/webgl-engine/core/shaderModules/IntegerBindUniform.js +1 -1
  918. package/views/3d/webgl-engine/core/shaderModules/IntegerDrawUniform.js +1 -1
  919. package/views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js +1 -1
  920. package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +1 -1
  921. package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +1 -1
  922. package/views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js +1 -1
  923. package/views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js +1 -1
  924. package/views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js +1 -1
  925. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  926. package/views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js +1 -1
  927. package/views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js +1 -1
  928. package/views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js +1 -1
  929. package/views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js +1 -1
  930. package/views/3d/webgl-engine/core/shaderModules/TextureCubeBindUniform.js +1 -1
  931. package/views/3d/webgl-engine/core/shaderModules/glsl.js +5 -0
  932. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
  933. package/views/3d/webgl-engine/effects/OpaqueEnvironment.js +1 -1
  934. package/views/3d/webgl-engine/effects/TransparentEnvironment.js +1 -1
  935. package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
  936. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  937. package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjust.glsl.js +1 -1
  938. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  939. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  940. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +5 -0
  941. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +5 -0
  942. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  943. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  944. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  945. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  946. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  947. package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
  948. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  949. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  950. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  951. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  952. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  953. package/views/3d/webgl-engine/effects/smaa/SMAAPassParameters.js +1 -1
  954. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  955. package/views/3d/webgl-engine/effects/ssao/SSAOParameters.js +1 -1
  956. package/views/3d/webgl-engine/effects/stars/Stars.glsl.js +1 -1
  957. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  958. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  959. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  960. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  961. package/views/3d/webgl-engine/lib/Material.js +1 -1
  962. package/views/3d/webgl-engine/lib/Program.js +1 -1
  963. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  964. package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
  965. package/views/3d/webgl-engine/lib/TextureCompressionWorkerHandle.js +1 -1
  966. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  967. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  968. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  969. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  970. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  971. package/views/3d/webgl-engine/shaders/BlendWeights.glsl.js +1 -1
  972. package/views/3d/webgl-engine/shaders/Blur.glsl.js +1 -1
  973. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  974. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  975. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  976. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  977. package/views/3d/webgl-engine/shaders/EdgeDetect.glsl.js +1 -1
  978. package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +1 -1
  979. package/views/3d/webgl-engine/shaders/FocusAreaMask.glsl.js +1 -1
  980. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +1 -1
  981. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  982. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
  983. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  984. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  985. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  986. package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
  987. package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +1 -1
  988. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  989. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  990. package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
  991. package/views/3d/webgl-engine/shaders/Laserlines.glsl.js +1 -1
  992. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  993. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  994. package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
  995. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  996. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  997. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +7 -7
  998. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
  999. package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
  1000. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  1001. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  1002. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  1003. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  1004. package/views/3d/webgl-engine/shaders/SSAO.glsl.js +1 -1
  1005. package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +1 -1
  1006. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
  1007. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  1008. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  1009. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  1010. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  1011. package/views/3d/webgl-engine/shaders/SingleHighlightApply.glsl.js +1 -1
  1012. package/views/3d/webgl-engine/shaders/SingleHighlightBlur.glsl.js +1 -1
  1013. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  1014. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  1015. package/views/3d/webgl-engine/shaders/SphereIntersect.glsl.js +2 -2
  1016. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  1017. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +1 -1
  1018. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  1019. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  1020. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +2 -2
  1021. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardNonSilhouetteEdges.glsl.js +4 -4
  1022. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +2 -2
  1023. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShader.glsl.js +1 -1
  1024. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
  1025. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +3 -3
  1026. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +7 -7
  1027. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +7 -7
  1028. package/views/3d/webgl.d.ts +3 -2
  1029. package/views/BreakpointsOwner.d.ts +1 -1
  1030. package/views/DOMContainer.d.ts +1 -1
  1031. package/views/DOMContainer.js +1 -1
  1032. package/views/FocusAreas.js +1 -1
  1033. package/views/PopupView.d.ts +1 -1
  1034. package/views/View.js +1 -1
  1035. package/views/layers/FeatureLayerView.js +1 -1
  1036. package/views/layers/support/WhereClauseVisitor.js +5 -0
  1037. package/views/support/DefaultsFromMap.js +1 -1
  1038. package/views/support/{QueueProcessor.js → ScheduledQueueProcessor.js} +1 -1
  1039. package/views/support/colorUtils.d.ts +2 -2
  1040. package/views/webgl/NoParameters.js +5 -0
  1041. package/views/webgl/ShaderBuilder.js +5 -0
  1042. package/views/webgl/Texture.js +1 -1
  1043. package/views/webgl/Uniform.js +5 -0
  1044. package/views/webgl/testAppleAmdDrawArrays.js +1 -1
  1045. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  1046. package/widgets/Editor/EditorViewModel.js +1 -1
  1047. package/widgets/Editor/UpdateWorkflow.js +1 -1
  1048. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  1049. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  1050. package/widgets/Editor.js +1 -1
  1051. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  1052. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  1053. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationSettings.js +5 -0
  1054. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  1055. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  1056. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +5 -0
  1057. package/widgets/Print.js +1 -1
  1058. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  1059. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  1060. package/widgets/TimeSlider.js +1 -1
  1061. package/widgets/smartMapping/support/utils.d.ts +3 -2
  1062. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  1063. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
  1064. package/widgets/support/widget.d.ts +8 -2
  1065. package/assets/esri/core/workers/chunks/02be905f7e9185de78c3.js +0 -1
  1066. package/assets/esri/core/workers/chunks/0b66fee87863e5775a6a.js +0 -1
  1067. package/assets/esri/core/workers/chunks/1557446aa4525705a5b2.js +0 -1
  1068. package/assets/esri/core/workers/chunks/1a8aaa92ccb90f646a8b.js +0 -1
  1069. package/assets/esri/core/workers/chunks/1dc6b5b177022b80c473.js +0 -1
  1070. package/assets/esri/core/workers/chunks/2118e9ffb24178ed7f59.js +0 -1
  1071. package/assets/esri/core/workers/chunks/25a6641938a9ccab39b7.js +0 -1
  1072. package/assets/esri/core/workers/chunks/2840705ae7fa909ab4ed.js +0 -1
  1073. package/assets/esri/core/workers/chunks/2a4c6c2e9ba103720e22.js +0 -314
  1074. package/assets/esri/core/workers/chunks/2e4f861c78ef820c0a3e.js +0 -1
  1075. package/assets/esri/core/workers/chunks/349f31a1fb489fbfe60d.js +0 -1
  1076. package/assets/esri/core/workers/chunks/34b31091e172e910d750.js +0 -1
  1077. package/assets/esri/core/workers/chunks/371c2fd9d767612bbeb2.js +0 -1
  1078. package/assets/esri/core/workers/chunks/37658a4e83a5b18acd37.js +0 -1
  1079. package/assets/esri/core/workers/chunks/39f3e202d95725f405ec.js +0 -1
  1080. package/assets/esri/core/workers/chunks/3cb56f509d8f7f340c45.js +0 -1
  1081. package/assets/esri/core/workers/chunks/4086698137db0795187f.js +0 -1
  1082. package/assets/esri/core/workers/chunks/454034bad60414a9ab7f.js +0 -1
  1083. package/assets/esri/core/workers/chunks/483787099d2ba8b8022d.js +0 -1
  1084. package/assets/esri/core/workers/chunks/4b38c008872bb9e10278.js +0 -1
  1085. package/assets/esri/core/workers/chunks/4cccca778b060d8dcd06.js +0 -1
  1086. package/assets/esri/core/workers/chunks/4e5cf2d489db2a57d3bd.js +0 -1
  1087. package/assets/esri/core/workers/chunks/4eda602a909a4773cb27.js +0 -1
  1088. package/assets/esri/core/workers/chunks/5595f19c1f332f504a81.js +0 -1
  1089. package/assets/esri/core/workers/chunks/55da04abc8e1ea93caa9.js +0 -1
  1090. package/assets/esri/core/workers/chunks/561fc48b06a43abe1cd0.js +0 -1
  1091. package/assets/esri/core/workers/chunks/576b7961fe7771dacfd9.js +0 -1
  1092. package/assets/esri/core/workers/chunks/5bb175106aee21025bc2.js +0 -1
  1093. package/assets/esri/core/workers/chunks/5c57aa9fdc4e1bab61ac.js +0 -1
  1094. package/assets/esri/core/workers/chunks/602c67fe1061ec5a3fa5.js +0 -1
  1095. package/assets/esri/core/workers/chunks/61f985a9a393803e5350.js +0 -1
  1096. package/assets/esri/core/workers/chunks/644e83f48752a34f0d1a.js +0 -1
  1097. package/assets/esri/core/workers/chunks/64f1355f7f51ecb3af95.js +0 -1
  1098. package/assets/esri/core/workers/chunks/68f5b077fc1f6f7636dd.js +0 -1
  1099. package/assets/esri/core/workers/chunks/7388b57de8926acd1fc2.js +0 -1
  1100. package/assets/esri/core/workers/chunks/76b8aa593a5279569267.js +0 -1
  1101. package/assets/esri/core/workers/chunks/7705ca2cc8ac3307d4cd.js +0 -1
  1102. package/assets/esri/core/workers/chunks/7719fe672ea74cdc87be.js +0 -1
  1103. package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +0 -1
  1104. package/assets/esri/core/workers/chunks/7c95721c077c70f31b53.js +0 -1
  1105. package/assets/esri/core/workers/chunks/82a69eba9bacca8437bd.js +0 -1
  1106. package/assets/esri/core/workers/chunks/8a13cd313d309281dbb9.js +0 -1
  1107. package/assets/esri/core/workers/chunks/933089d069853f6e509a.js +0 -1
  1108. package/assets/esri/core/workers/chunks/9848e9b9cc62328bfeb4.js +0 -1
  1109. package/assets/esri/core/workers/chunks/9a30ad773c22bde61c64.js +0 -1
  1110. package/assets/esri/core/workers/chunks/9bcead430045cbd9941c.js +0 -1
  1111. package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +0 -1
  1112. package/assets/esri/core/workers/chunks/a418af538ee98de7822a.js +0 -1
  1113. package/assets/esri/core/workers/chunks/b1ce435e3850255e0b24.js +0 -1
  1114. package/assets/esri/core/workers/chunks/b31096f20b9ed1446c3a.js +0 -1
  1115. package/assets/esri/core/workers/chunks/b5d4255db21dfd3b3b13.js +0 -2
  1116. package/assets/esri/core/workers/chunks/b5ee6c203f536bdb6708.js +0 -1
  1117. package/assets/esri/core/workers/chunks/b882f921387e21fb263d.js +0 -1
  1118. package/assets/esri/core/workers/chunks/bf9144a5d1fdebec6c4d.js +0 -1
  1119. package/assets/esri/core/workers/chunks/c12bdf6fd7f631e3f79e.js +0 -971
  1120. package/assets/esri/core/workers/chunks/c14afb5a090c58e66235.js +0 -1
  1121. package/assets/esri/core/workers/chunks/c58f559eb68035ebe3da.js +0 -1
  1122. package/assets/esri/core/workers/chunks/c62614bf6ba530924ca1.js +0 -1
  1123. package/assets/esri/core/workers/chunks/c67322bb54dcf699fe23.js +0 -1
  1124. package/assets/esri/core/workers/chunks/d0672714fffe04d5632a.js +0 -51
  1125. package/assets/esri/core/workers/chunks/d5ca87a4ecf096430a21.js +0 -1
  1126. package/assets/esri/core/workers/chunks/d9c34e07627d93d4670b.js +0 -1
  1127. package/assets/esri/core/workers/chunks/e21259a75af746895d6c.js +0 -1
  1128. package/assets/esri/core/workers/chunks/e2c49c1dc02249cf6fd2.js +0 -1
  1129. package/assets/esri/core/workers/chunks/e36a4a049ea8b5589d28.js +0 -1
  1130. package/assets/esri/core/workers/chunks/f43277fdbdbb0f49fe52.js +0 -1
  1131. package/assets/esri/core/workers/chunks/f73bbf3a08adaa37581d.js +0 -1
  1132. package/assets/esri/core/workers/chunks/f9656b0d3c1df8ad19af.js +0 -1
  1133. package/chunks/Bufferer-BhfWVXPl.js +0 -5
  1134. package/chunks/Clipper-a9xfvRaw.js +0 -5
  1135. package/chunks/CrackAndCluster-CHWFqqYQ.js +0 -5
  1136. package/chunks/GeodeticDistanceCalculator-Cnd3ZMKD.js +0 -5
  1137. package/chunks/Intersector-K1VmdfQW.js +0 -5
  1138. package/chunks/OperatorDifference.js +0 -5
  1139. package/chunks/OperatorIntersection.js +0 -5
  1140. package/chunks/OperatorSimplify.js +0 -5
  1141. package/chunks/OperatorUnion.js +0 -5
  1142. package/layers/support/TrackLabelClass.js +0 -5
  1143. package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +0 -5
  1144. package/views/2d/layers/features/support/FeatureFilter.js +0 -5
  1145. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +0 -5
  1146. package/views/3d/webgl-engine/core/shaderModules/Uniform.js +0 -5
  1147. package/views/3d/webgl-engine/core/shaderModules/interfaces.js +0 -5
  1148. package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNode.js +0 -5
  1149. package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNodeColorEffects.js +0 -5
  1150. package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNodeGeometryMasking.js +0 -5
  1151. /package/chunks/{GeometryCleaner-DVgW95-D.js → GeometryCleaner-BEJM7I4l.js} +0 -0
  1152. /package/views/{3d/webgl-engine/core/shaderTechnique → webgl}/BindType.js +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ue});var s=i(90237),r=i(13874),a=i(69540),n=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),h=i(10107),f=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),x=i(89015),v=i(16131),b=i(8303),I=i(56551),_=i(54310),S=i(25036),A=i(82935),T=i(10873),R=i(20437),M=i(74797),C=i(22796),O=i(84169),F=i(4916),P=i(68197),k=i(5443),D=i(16930),N=i(73444),E=i(14140),L=i(16019);function B(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function z(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function J(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];B(l)?a=e:z(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter(((e,t)=>!(t===a||t===n)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[a]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),h=null==u||"CRS84"===u?4326:Number(u),f=new D.A({wkid:h}),[p,d]=s[a],[m,y]=s[n],g=new k.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:f});return{width:Math.round(g.width/r[a]),height:Math.round(g.height/r[n]),extent:g,dimensions:o}}function V(e){const t=(0,N.Z0)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function $(){return Math.round(255*Math.random())}function U(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=V(r)),a&&(t[e].unit=a.label?V(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const a=e.label?V(e.label):null;if(r.Label=a,e.preferredColor){const t=P.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=$(),e.Green=$(),e.Blue=$())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function j(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,L.X1)(t,i)}function G(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var Z=i(45617),H=i(87186),q=i(77301),W=i(28435),X=i(6952);let Y=class extends F.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,W.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:h,pixelType:f}=c,p=t.extent??new k.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:h-.5,spatialReference:new D.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/h},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new H.A({width:u,height:h,pixelType:f,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,W.lD)(e,t,r,a)),l=null!=s.statistics,u=null!=s.histograms,h=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,X.f4)(e)),f=await(0,c.Lx)([o,h]);if(!f[0].value&&f[1].value)throw new n.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=f[0].value,l||(s.statistics=f[1].value?.statistics),u||(s.histograms=f[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map((e=>new Z.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),n=(0,q.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,X.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],Y.prototype,"source",void 0),(0,s._)([(0,h.MZ)()],Y.prototype,"url",null),Y=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Y);const K=Y;var Q=i(22671);let ee=class extends F.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,X.eH)(i[0]),l=a?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new K({source:{extent:t,pixelBlocks:i,attributeTable:r?Q.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new n.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new n.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new n.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:o}=s[e];if(!("ndarray"===a.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new n.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!B(t[t.length-1])||!z(t[t.length-2]))throw new n.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=J(e),{ranges:a}=e,n=Object.keys(a).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=U(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:h}=a[s],f=h.length>2?e*h.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=h.slice(0,-2),m="float"===l?"f32":j(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const a=E.A.createEmptyBand(m,y),n=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new E.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[G(p,d,s)+f]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=E.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const h=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:h,bandNames:c?void 0:n}}(t)}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],ee.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)({constructOnly:!0})],ee.prototype,"source",void 0),ee=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ee);const te=ee;var ie=i(4576),se=i(21325),re=i(50103),ae=i(21312);function ne(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function oe(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new D.A({wkid:t});if(e=String(e).trim(),(0,se.jp)(e))return new D.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=le(n);const l=new D.A(t?{wkid:t}:{wkt:n}),c=le(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=le(e),new D.A(0!==t?{wkid:t}:{wkt:e})):null}function le(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function ce(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,re.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,re.mX)(e);t.spatialReference=oe(i)}}else if((0,re.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,re.V6)(e,"GeodataXform"),i=oe((0,re.v7)(t,"SpatialReference/WKID")||(0,re.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,re.v7)(t,"PolynomialOrder")??1,r=(0,re.Ui)(t,"CoeffX/Double"),a=(0,re.Ui)(t,"CoeffY/Double"),n=(0,re.Ui)(t,"InverseCoeffX/Double"),o=(0,re.Ui)(t,"InverseCoeffY/Double"),l=ne(r,a),c=ne(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new ae.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,re.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,re.mX)(e)));else if((0,re.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,re.v7)(e,"NoDataValue"),i=(0,re.V6)(e,"Histograms/HistItem"),s=(0,re.v7)(i,"HistMin"),r=(0,re.v7)(i,"HistMax"),a=(0,re.v7)(i,"BucketCount"),n=(0,re.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,re.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=(0,re.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(ie.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(ie.Ru):null}return t}var ue=i(51244);let he=class extends F.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new D.A({wkid:3857})),r?.length&&null==s&&(s=(0,X.Pg)(r));const{width:o,height:l}=t;let c=new k.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let h=!0;if(a){const e=a.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(a=null,c=u)}const f=new K({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(f.ioConfig.skipMapInfo=!0),await f.open(),f.source=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,ue.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new n.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new n.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=ce(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new ae.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],he.prototype,"datasetFormat",void 0),he=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],he);const fe=he;var pe=i(97768),de=i(84952),me=i(86738),ye=i(20223),ge=i(87045),we=i(25943),xe=i(73037),ve=i(82371);let be=class extends F.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal});if(!h)return null;const f=o?n.tileSize:r.tileInfo.size,p=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==p)return null;const d=r.blockBoundary[e];if("jpg"!==r.compression||i>d.minCol&&i<d.maxCol&&t>d.minRow&&t<d.maxRow)return p;const{origin:m,blockWidth:y,blockHeight:g}=r,{x:w,y:x}=this.getPyramidPixelSize(e),v=Math.round((a.xmin-m.x)/w)%y,b=Math.round((a.xmax-m.x)/w)%y||y,I=Math.round((m.y-a.ymax)/x)%g,_=Math.round((m.y-a.ymin)/x)%g||g,S=i===d.minCol?v:0,A=t===d.minRow?I:0,T=i===d.maxCol?b:y,R=t===d.maxRow?_:g;return(0,W.z$)(p,{x:S,y:A},{width:T-S,height:R-A}),p}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new n.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new n.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new n.A("image-server-raster:open","cannot initialize image service");(0,ve.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return ge.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=a))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return ge.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=a}))})}return ge.A.fromJSON(e)}(s.tileInfo,s):ge.A.fromJSON(s.tileInfo);(0,pe.Lw)(a);const[o,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,h=.5/r.width*u.x,f=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>h||!p.some((e=>Math.abs(e.resolution-f)<h)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=a.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const x=this.computeBlockBoundary(c,m,y,a.origin,g,d),v=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new ye.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:v,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,transposeInfo:b,blockBoundary:x}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new xe.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,de.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new we.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=D.A.fromJSON(t.spatialReference||e.spatialReference),a=new me.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new H.A({width:i,height:s,bandCount:3,extent:k.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,ve.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),n=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??a));let h=n;return l>0&&(h=r.find((e=>Math.abs(e.scale-l)<s))??n,this._levelOffset=h.level-n.level),[u,h]}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],be.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],be.prototype,"tileType",void 0),be=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],be);const Ie=be;var _e=i(47124);const Se=new Map;Se.set("Int8","s8"),Se.set("UInt8","u8"),Se.set("Int16","s16"),Se.set("UInt16","u16"),Se.set("Int32","s32"),Se.set("UInt32","u32"),Se.set("Float32","f32"),Se.set("Float64","f32"),Se.set("Double64","f32");const Ae=new Map;Ae.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ae.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ae.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ae.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Te=class extends F.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new E.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),x=new Uint8Array(w),v=[];let b=0;for(y=0;y<d;y++)v.push(b),x.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Ae.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(x.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:v,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(h!==r||f!==a){let e=_.mask;if(e)for(y=0;y<a;y++)if(T=y*r,y<f)for(A=h;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),_.mask=e,y=0;y<f;y++)for(T=y*r,A=0;A<h;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,X.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(_e.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:f}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(h/l/u**y)-1,t=Math.ceil(f/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Ae.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,p=0;for(h=0;h<e;h++)p=a**h,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=t*c+i,f*=4*l;const d=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,re.V6)(e,"MRF_META/Raster");if(!t)throw new n.A("mrf:open","not a valid MRF format");const i=(0,re.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),o=((0,re.mX)(t,"Compression")||"none").toLowerCase();if(!Ae.has(o))throw new n.A("mrf:open","currently does not support compression "+o);const l=(0,re.mX)(t,"DataType")||"UInt8",c=Se.get(l);if(null==c)throw new n.A("mrf:open","currently does not support pixel type "+l);const u=(0,re.V6)(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),p=(0,re.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,re.V6)(e,"MRF_META/CachedSource"))throw new n.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,re.V6)(e,"MRF_META/GeoTags"),g=(0,re.V6)(y,"BoundingBox");let w,x=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,re.mX)(y,"Projection")||"";let a=D.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new D.A({wkid:e}))}else a=oe(r)??D.A.WGS84;else x=!0,a=new D.A({wkid:3857});w=new k.A(e,t,i,s),w.spatialReference=a}else x=!0,w=new k.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new D.A({wkid:3857})});const v=(0,re.V6)(e,"MRF_META/Rsets"),b=parseInt(v?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new ye.A({origin:new me.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:b}),S=new me.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new H.A({width:s,height:r,extent:w,isPseudoSpatialReference:x,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,re.mX)(e,"datafile"),R=(0,re.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Ae.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ce(t)}catch{return null}}};(0,s._)([(0,h.MZ)()],Te.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],Te.prototype,"_storageIndex",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Te.prototype,"datasetFormat",void 0),Te=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Te);const Re=Te;var Me=i(15265);function Ce(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),a=r.map((e=>e.name)),n=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})})),{displayFieldName:"",fields:r,features:n}}class Oe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Me.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Me.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Ce({fields:l,records:c})}}}var Fe=i(45664),Pe=i(47915);const ke=(e,t)=>e.get(t)?.values,De=(e,t)=>e.get(t)?.values?.[0];let Ne=class extends F.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new n.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,Fe.uT)(i),l=[];await this._readIFDs(l,i,s,r,0,a?8:4,t);const{imageInfo:c,rasterInfo:u}=function(e){const t=(0,Fe.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:h,pyramidBlockHeight:f,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=oe(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new D.A({wkid:3857}));const x=new k.A({...t.extent,spatialReference:g}),v=new me.A(x?{x:x.xmin,y:x.ymax,spatialReference:g}:{x:0,y:0}),b=new ye.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:l,origin:v,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new me.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=De(e[0],"PHOTOMETRICINTERPRETATION"),T=ke(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new H.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:x,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new k.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new ae.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new me.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,Fe.zS)(l),f=(0,Fe.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:l,pyramidIFDs:h,maskIFDs:f,...c},this._set("rasterInfo",u),!c.isSupported)throw new n.A("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new n.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");u.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const p=l[0].get("PREDICTOR")?.values?.[0],d=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===d&&2===p)throw new n.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:m,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!m){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,X.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new me.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,u)}y.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||m||(u.attributeTable=await this._fetchAuxiliaryTable(e),null!=u.attributeTable&&(u.keyProperties.DataType="thematic")),m&&this.updateImageSpaceRasterInfo(u),this.updateTileInfo()}async _readIFDs(e,t,i,s,r,a=4,n){if(!s)return null;(s>=t.byteLength||s<0)&&(t=(await this.request(this.url,{range:{from:s+r,to:s+r+this._bufferSize},responseType:"array-buffer",signal:n})).data,r=s+r,s=0);const o=await this._readIFD(t,i,s,r,Pe.A.tiffTags,a,n);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-r,r,a,n)}async _readIFD(e,t,i,s,r=Pe.A.tiffTags,a=4,n){if(!e)return null;const o=(0,Fe.JM)(e,t,i,s,r,a);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const r=i.map((e=>e.offlineOffsetSize)).filter(ie.Ru),a=Math.min.apply(null,r.map((e=>e[0])));if(Math.min.apply(null,r.map((e=>e[0]+e[1])))-a<=this._bufferSize){const{data:r}=await this.request(this.url,{range:{from:a,to:a+this._bufferSize},responseType:"array-buffer",signal:n});e=r,s=a,i.forEach((i=>(0,Fe.Cr)(e,t,i,s)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),r=i?.values;if(r&&r.length>4){const a=r[0]+"."+r[1]+"."+r[2],o=await this._readIFD(e,t,i.valueOffset+6-s,s,Pe.A.geoKeys,2,n);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[a]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:s,to:s+o.requiredBufferSize+4},responseType:"array-buffer",signal:n});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,s,Pe.A.tiffTags,4,n)}}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===h.length?h[0].data:new ArrayBuffer(f),d=[0],m=[0];if(h.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){const s=h[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let x,v,b;if(o!==y||l!==g){let e=w.mask;if(e)for(x=0;x<g;x++)if(b=x*y,x<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),w.mask=e,x=0;x<l;x++)for(b=x*y,v=0;v<o;v++)e[b+v]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,Fe.XO)(l,o),u=ke(l,"TILEOFFSETS");if(void 0===u)return null;const h=ke(l,"TILEBYTECOUNTS"),{minRow:f,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<f||i<p)return null;const y=De(l,"IMAGEWIDTH"),g=De(l,"IMAGELENGTH"),w=De(l,"TILEWIDTH"),x=De(l,"TILELENGTH"),v=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;v[s]={from:u[e],to:u[e]+h[e]-1}}}else{const e=t*(m+1)+i;v.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<v.length;e++)if(null==v[e].from||!v[e].to||v[e].to<0)return null;return{ranges:v,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%x||x}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ce(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Oe.parse(t);return i?.recordSet?Q.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,h.MZ)()],Ne.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],Ne.prototype,"_headerInfo",void 0),(0,s._)([(0,h.MZ)()],Ne.prototype,"_bufferSize",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Ne.prototype,"datasetFormat",void 0),Ne=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Ne);const Ee=Ne,Le=new Map;Le.set("MRF",{desc:"Meta Raster Format",constructor:Re}),Le.set("TIFF",{desc:"GeoTIFF",constructor:Ee}),Le.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ie}),Le.set("JPG",{desc:"JPG Raster Format",constructor:fe}),Le.set("PNG",{desc:"PNG Raster Format",constructor:fe}),Le.set("GIF",{desc:"GIF Raster Format",constructor:fe}),Le.set("BMP",{desc:"BMP Raster Format",constructor:fe}),Le.set("CovJSON",{desc:"COVJSON Raster Format",constructor:te}),Le.set("MEMORY",{desc:"In Memory Raster Format",constructor:K});class Be{static get supportedFormats(){const e=new Set;return Le.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),a){if(!this.supportedFormats.has(a))throw new n.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new n.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,Le.get(a).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(Le.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,Le.get(a).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){Le.has(e.toUpperCase())||Le.set(e.toUpperCase(),{desc:t,constructor:i})}}var ze=i(6049),Je=i(30291),Ve=i(92935);let $e=class extends((0,g.dM)((0,S.j)((0,v.q)((0,b.A)((0,I.H)((0,w.d)((0,x.o)((0,A.e)((0,y.b)((0,_.J)((0,l.P)(a.A.ClonableMixin(m.A))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ve.X.SAVE:return r(this,t);case Ve.X.SAVE_AS:return a(this,s,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==M.F_.rawServicePixelValue))),s=(0,Je.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r?.pixelType.startsWith("f")&&s.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&t&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),s}async generateRasterInfo(e,t){if(e=(0,f.PZ)(C.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof n.A)throw e;throw new n.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(Ve.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ve.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t="Function"===this.raster.datasetFormat,!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new n.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new n.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters="Function"===e.datasetFormat?e.primaryRasters.rasters:[e],this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,ze.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Be.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),a=r.findIndex((e=>null==e));if(a>-1)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Be.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new n.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Be.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new n.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,ze.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new O.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof n.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};(0,s._)([(0,h.MZ)({clonable:!1})],$e.prototype,"_primaryRasters",void 0),(0,s._)([(0,h.MZ)(T.fV)],$e.prototype,"legendEnabled",void 0),(0,s._)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],$e.prototype,"isReference",void 0),(0,s._)([(0,h.MZ)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,s._)([(0,h.MZ)({json:{read:!0,write:!0}})],$e.prototype,"blendMode",void 0),(0,s._)([(0,h.MZ)({type:C.A,json:{name:"renderingRule",write:!0}})],$e.prototype,"rasterFunction",void 0),(0,s._)([(0,h.MZ)()],$e.prototype,"sourceJSON",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],$e.prototype,"version",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],$e.prototype,"type",void 0),(0,s._)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],$e.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],$e.prototype,"popupEnabled",void 0),(0,s._)([(0,h.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],$e.prototype,"popupTemplate",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),(0,s._)([(0,h.MZ)({readOnly:!0,type:[R.A]})],$e.prototype,"fields",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,type:[R.A]})],$e.prototype,"rasterFields",null),(0,s._)([(0,h.MZ)({constructOnly:!0})],$e.prototype,"source",void 0),$e=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],$e);const Ue=$e},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,a.MZ)()],t.prototype,"title",null),(0,s._)([(0,a.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},56551:(e,t,i)=>{i.d(t,{H:()=>p});var s=i(90237),r=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let h=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],h.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],h.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],h.prototype,"renderer",void 0),h=(0,s._)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],h);const f=h,p=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),a=i(78888),n=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),h=i(3694),f=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),x=i(4718),v=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,x.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,o[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:o},valid:!0,data:new Array(n*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=s=class extends n.A{constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a,n){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;n.then((()=>l.abort()),(()=>l.abort()));let u=!1;const h=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(h,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,f.G4)(l))return;const p=new w.U(e,t,i,r),m={...a,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,f.u7)(n,(()=>t((0,f.NK)())));const i=_(r);let a=this._pendingTilemapRequests[i];if(!a){a=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};A._maxPrefetch=4,A._prefetches=new h.A({initialSize:s._maxPrefetch}),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},82434:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(90237),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o},73037:(e,t,i)=>{i.d(t,{A:()=>u});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c);const u=c},21312:(e,t,i)=>{i.d(t,{A:()=>y});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),h=i(86738),f=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,h=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+h*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+h*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),h=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let m=s=class extends f.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m);const y=m},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>f,X6:()=>p});var s=i(78888),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function h(e,t,i){const h=(0,c.Dl)(e),{rasterFunction:f,sourceJSON:p}=t||{},d=f?JSON.stringify(f.rasterFunctionDefinition||f):null,m=(0,c.lF)({...h.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=h.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,x=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,v=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,x,v,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),M=n.A.fromJSON(g.spatialReference||g.extent.spatialReference),C="fulfilled"===_[0].status?_[0].value?.data:null,O=C?.features?.length?u.A.fromJSON(C):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const V=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:M,pixelSize:new a.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:M}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:V})}function f(e,t,i){return h(e,{sourceJSON:t},i)}function p(e,t,i){return h(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ue});var s=i(90237),r=i(13874),a=i(69540),n=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),h=i(10107),f=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),x=i(89015),v=i(16131),b=i(8303),I=i(56551),_=i(54310),S=i(25036),A=i(82935),T=i(10873),R=i(20437),M=i(74797),C=i(22796),O=i(84169),F=i(4916),P=i(68197),k=i(5443),D=i(16930),N=i(73444),E=i(14140),L=i(16019);function B(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function z(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function J(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];B(l)?a=e:z(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter(((e,t)=>!(t===a||t===n)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[a]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),h=null==u||"CRS84"===u?4326:Number(u),f=new D.A({wkid:h}),[p,d]=s[a],[m,y]=s[n],g=new k.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:f});return{width:Math.round(g.width/r[a]),height:Math.round(g.height/r[n]),extent:g,dimensions:o}}function V(e){const t=(0,N.Z0)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function $(){return Math.round(255*Math.random())}function U(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=V(r)),a&&(t[e].unit=a.label?V(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const a=e.label?V(e.label):null;if(r.Label=a,e.preferredColor){const t=P.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=$(),e.Green=$(),e.Blue=$())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function j(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,L.X1)(t,i)}function G(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var Z=i(45617),H=i(87186),q=i(77301),W=i(28435),X=i(6952);let Y=class extends F.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,W.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:h,pixelType:f}=c,p=t.extent??new k.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:h-.5,spatialReference:new D.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/h},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new H.A({width:u,height:h,pixelType:f,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,W.lD)(e,t,r,a)),l=null!=s.statistics,u=null!=s.histograms,h=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,X.f4)(e)),f=await(0,c.Lx)([o,h]);if(!f[0].value&&f[1].value)throw new n.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=f[0].value,l||(s.statistics=f[1].value?.statistics),u||(s.histograms=f[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map((e=>new Z.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),n=(0,q.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,X.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],Y.prototype,"source",void 0),(0,s._)([(0,h.MZ)()],Y.prototype,"url",null),Y=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Y);const K=Y;var Q=i(22671);let ee=class extends F.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,X.eH)(i[0]),l=a?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new K({source:{extent:t,pixelBlocks:i,attributeTable:r?Q.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new n.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new n.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new n.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:o}=s[e];if(!("ndarray"===a.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new n.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!B(t[t.length-1])||!z(t[t.length-2]))throw new n.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=J(e),{ranges:a}=e,n=Object.keys(a).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=U(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:h}=a[s],f=h.length>2?e*h.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=h.slice(0,-2),m="float"===l?"f32":j(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const a=E.A.createEmptyBand(m,y),n=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new E.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[G(p,d,s)+f]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=E.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const h=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:h,bandNames:c?void 0:n}}(t)}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],ee.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)({constructOnly:!0})],ee.prototype,"source",void 0),ee=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ee);const te=ee;var ie=i(4576),se=i(21325),re=i(50103),ae=i(21312);function ne(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function oe(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new D.A({wkid:t});if(e=String(e).trim(),(0,se.jp)(e))return new D.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=le(n);const l=new D.A(t?{wkid:t}:{wkt:n}),c=le(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=le(e),new D.A(0!==t?{wkid:t}:{wkt:e})):null}function le(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function ce(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,re.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,re.mX)(e);t.spatialReference=oe(i)}}else if((0,re.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,re.V6)(e,"GeodataXform"),i=oe((0,re.v7)(t,"SpatialReference/WKID")||(0,re.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,re.v7)(t,"PolynomialOrder")??1,r=(0,re.Ui)(t,"CoeffX/Double"),a=(0,re.Ui)(t,"CoeffY/Double"),n=(0,re.Ui)(t,"InverseCoeffX/Double"),o=(0,re.Ui)(t,"InverseCoeffY/Double"),l=ne(r,a),c=ne(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new ae.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,re.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,re.mX)(e)));else if((0,re.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,re.v7)(e,"NoDataValue"),i=(0,re.V6)(e,"Histograms/HistItem"),s=(0,re.v7)(i,"HistMin"),r=(0,re.v7)(i,"HistMax"),a=(0,re.v7)(i,"BucketCount"),n=(0,re.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,re.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=(0,re.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(ie.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(ie.Ru):null}return t}var ue=i(51244);let he=class extends F.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new D.A({wkid:3857})),r?.length&&null==s&&(s=(0,X.Pg)(r));const{width:o,height:l}=t;let c=new k.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let h=!0;if(a){const e=a.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(a=null,c=u)}const f=new K({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(f.ioConfig.skipMapInfo=!0),await f.open(),f.source=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,ue.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new n.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new n.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=ce(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new ae.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],he.prototype,"datasetFormat",void 0),he=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],he);const fe=he;var pe=i(97768),de=i(84952),me=i(86738),ye=i(20223),ge=i(87045),we=i(25943),xe=i(73037),ve=i(82371);let be=class extends F.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal});if(!h)return null;const f=o?n.tileSize:r.tileInfo.size,p=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==p)return null;const d=r.blockBoundary[e];if("jpg"!==r.compression||i>d.minCol&&i<d.maxCol&&t>d.minRow&&t<d.maxRow)return p;const{origin:m,blockWidth:y,blockHeight:g}=r,{x:w,y:x}=this.getPyramidPixelSize(e),v=Math.round((a.xmin-m.x)/w)%y,b=Math.round((a.xmax-m.x)/w)%y||y,I=Math.round((m.y-a.ymax)/x)%g,_=Math.round((m.y-a.ymin)/x)%g||g,S=i===d.minCol?v:0,A=t===d.minRow?I:0,T=i===d.maxCol?b:y,R=t===d.maxRow?_:g;return(0,W.z$)(p,{x:S,y:A},{width:T-S,height:R-A}),p}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new n.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new n.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new n.A("image-server-raster:open","cannot initialize image service");(0,ve.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return ge.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=a))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return ge.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=a}))})}return ge.A.fromJSON(e)}(s.tileInfo,s):ge.A.fromJSON(s.tileInfo);(0,pe.Lw)(a);const[o,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,h=.5/r.width*u.x,f=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>h||!p.some((e=>Math.abs(e.resolution-f)<h)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=a.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const x=this.computeBlockBoundary(c,m,y,a.origin,g,d),v=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new ye.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:v,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,transposeInfo:b,blockBoundary:x}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new xe.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,de.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new we.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=D.A.fromJSON(t.spatialReference||e.spatialReference),a=new me.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new H.A({width:i,height:s,bandCount:3,extent:k.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,ve.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),n=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??a));let h=n;return l>0&&(h=r.find((e=>Math.abs(e.scale-l)<s))??n,this._levelOffset=h.level-n.level),[u,h]}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],be.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],be.prototype,"tileType",void 0),be=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],be);const Ie=be;var _e=i(47124);const Se=new Map;Se.set("Int8","s8"),Se.set("UInt8","u8"),Se.set("Int16","s16"),Se.set("UInt16","u16"),Se.set("Int32","s32"),Se.set("UInt32","u32"),Se.set("Float32","f32"),Se.set("Float64","f32"),Se.set("Double64","f32");const Ae=new Map;Ae.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ae.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ae.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ae.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Te=class extends F.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new E.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),x=new Uint8Array(w),v=[];let b=0;for(y=0;y<d;y++)v.push(b),x.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Ae.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(x.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:v,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(h!==r||f!==a){let e=_.mask;if(e)for(y=0;y<a;y++)if(T=y*r,y<f)for(A=h;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),_.mask=e,y=0;y<f;y++)for(T=y*r,A=0;A<h;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,X.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(_e.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:f}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(h/l/u**y)-1,t=Math.ceil(f/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Ae.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,p=0;for(h=0;h<e;h++)p=a**h,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=t*c+i,f*=4*l;const d=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,re.V6)(e,"MRF_META/Raster");if(!t)throw new n.A("mrf:open","not a valid MRF format");const i=(0,re.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),o=((0,re.mX)(t,"Compression")||"none").toLowerCase();if(!Ae.has(o))throw new n.A("mrf:open","currently does not support compression "+o);const l=(0,re.mX)(t,"DataType")||"UInt8",c=Se.get(l);if(null==c)throw new n.A("mrf:open","currently does not support pixel type "+l);const u=(0,re.V6)(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),p=(0,re.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,re.V6)(e,"MRF_META/CachedSource"))throw new n.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,re.V6)(e,"MRF_META/GeoTags"),g=(0,re.V6)(y,"BoundingBox");let w,x=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,re.mX)(y,"Projection")||"";let a=D.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new D.A({wkid:e}))}else a=oe(r)??D.A.WGS84;else x=!0,a=new D.A({wkid:3857});w=new k.A(e,t,i,s),w.spatialReference=a}else x=!0,w=new k.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new D.A({wkid:3857})});const v=(0,re.V6)(e,"MRF_META/Rsets"),b=parseInt(v?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new ye.A({origin:new me.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:b}),S=new me.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new H.A({width:s,height:r,extent:w,isPseudoSpatialReference:x,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,re.mX)(e,"datafile"),R=(0,re.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Ae.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ce(t)}catch{return null}}};(0,s._)([(0,h.MZ)()],Te.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],Te.prototype,"_storageIndex",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Te.prototype,"datasetFormat",void 0),Te=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Te);const Re=Te;var Me=i(15265);function Ce(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),a=r.map((e=>e.name)),n=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})})),{displayFieldName:"",fields:r,features:n}}class Oe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Me.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Me.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Ce({fields:l,records:c})}}}var Fe=i(45664),Pe=i(47915);const ke=(e,t)=>e.get(t)?.values,De=(e,t)=>e.get(t)?.values?.[0];let Ne=class extends F.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new n.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,Fe.uT)(i),l=[];await this._readIFDs(l,i,s,r,0,a?8:4,t);const{imageInfo:c,rasterInfo:u}=function(e){const t=(0,Fe.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:h,pyramidBlockHeight:f,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=oe(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new D.A({wkid:3857}));const x=new k.A({...t.extent,spatialReference:g}),v=new me.A(x?{x:x.xmin,y:x.ymax,spatialReference:g}:{x:0,y:0}),b=new ye.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:l,origin:v,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new me.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=De(e[0],"PHOTOMETRICINTERPRETATION"),T=ke(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new H.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:x,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new k.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new ae.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new me.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,Fe.zS)(l),f=(0,Fe.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:l,pyramidIFDs:h,maskIFDs:f,...c},this._set("rasterInfo",u),!c.isSupported)throw new n.A("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new n.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");u.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const p=l[0].get("PREDICTOR")?.values?.[0],d=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===d&&2===p)throw new n.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:m,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!m){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,X.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new me.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,u)}y.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||m||(u.attributeTable=await this._fetchAuxiliaryTable(e),null!=u.attributeTable&&(u.keyProperties.DataType="thematic")),m&&this.updateImageSpaceRasterInfo(u),this.updateTileInfo()}async _readIFDs(e,t,i,s,r,a=4,n){if(!s)return null;(s>=t.byteLength||s<0)&&(t=(await this.request(this.url,{range:{from:s+r,to:s+r+this._bufferSize},responseType:"array-buffer",signal:n})).data,r=s+r,s=0);const o=await this._readIFD(t,i,s,r,Pe.A.tiffTags,a,n);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-r,r,a,n)}async _readIFD(e,t,i,s,r=Pe.A.tiffTags,a=4,n){if(!e)return null;const o=(0,Fe.JM)(e,t,i,s,r,a);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const r=i.map((e=>e.offlineOffsetSize)).filter(ie.Ru),a=Math.min.apply(null,r.map((e=>e[0])));if(Math.min.apply(null,r.map((e=>e[0]+e[1])))-a<=this._bufferSize){const{data:r}=await this.request(this.url,{range:{from:a,to:a+this._bufferSize},responseType:"array-buffer",signal:n});e=r,s=a,i.forEach((i=>(0,Fe.Cr)(e,t,i,s)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),r=i?.values;if(r&&r.length>4){const a=r[0]+"."+r[1]+"."+r[2],o=await this._readIFD(e,t,i.valueOffset+6-s,s,Pe.A.geoKeys,2,n);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[a]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:s,to:s+o.requiredBufferSize+4},responseType:"array-buffer",signal:n});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,s,Pe.A.tiffTags,4,n)}}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===h.length?h[0].data:new ArrayBuffer(f),d=[0],m=[0];if(h.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){const s=h[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let x,v,b;if(o!==y||l!==g){let e=w.mask;if(e)for(x=0;x<g;x++)if(b=x*y,x<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),w.mask=e,x=0;x<l;x++)for(b=x*y,v=0;v<o;v++)e[b+v]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,Fe.XO)(l,o),u=ke(l,"TILEOFFSETS");if(void 0===u)return null;const h=ke(l,"TILEBYTECOUNTS"),{minRow:f,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<f||i<p)return null;const y=De(l,"IMAGEWIDTH"),g=De(l,"IMAGELENGTH"),w=De(l,"TILEWIDTH"),x=De(l,"TILELENGTH"),v=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;v[s]={from:u[e],to:u[e]+h[e]-1}}}else{const e=t*(m+1)+i;v.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<v.length;e++)if(null==v[e].from||!v[e].to||v[e].to<0)return null;return{ranges:v,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%x||x}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ce(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Oe.parse(t);return i?.recordSet?Q.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,h.MZ)()],Ne.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],Ne.prototype,"_headerInfo",void 0),(0,s._)([(0,h.MZ)()],Ne.prototype,"_bufferSize",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Ne.prototype,"datasetFormat",void 0),Ne=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Ne);const Ee=Ne,Le=new Map;Le.set("MRF",{desc:"Meta Raster Format",constructor:Re}),Le.set("TIFF",{desc:"GeoTIFF",constructor:Ee}),Le.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ie}),Le.set("JPG",{desc:"JPG Raster Format",constructor:fe}),Le.set("PNG",{desc:"PNG Raster Format",constructor:fe}),Le.set("GIF",{desc:"GIF Raster Format",constructor:fe}),Le.set("BMP",{desc:"BMP Raster Format",constructor:fe}),Le.set("CovJSON",{desc:"COVJSON Raster Format",constructor:te}),Le.set("MEMORY",{desc:"In Memory Raster Format",constructor:K});class Be{static get supportedFormats(){const e=new Set;return Le.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),a){if(!this.supportedFormats.has(a))throw new n.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new n.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,Le.get(a).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(Le.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,Le.get(a).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){Le.has(e.toUpperCase())||Le.set(e.toUpperCase(),{desc:t,constructor:i})}}var ze=i(6049),Je=i(30291),Ve=i(92935);let $e=class extends((0,g.dM)((0,S.j)((0,v.q)((0,b.A)((0,I.H)((0,w.d)((0,x.o)((0,A.e)((0,y.b)((0,_.J)((0,l.P)(a.A.ClonableMixin(m.A))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ve.X.SAVE:return r(this,t);case Ve.X.SAVE_AS:return a(this,s,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==M.F_.rawServicePixelValue))),s=(0,Je.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,M.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,f.PZ)(C.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof n.A)throw e;throw new n.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(Ve.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ve.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t="Function"===this.raster.datasetFormat,!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new n.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new n.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters="Function"===e.datasetFormat?e.primaryRasters.rasters:[e],this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,ze.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Be.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),a=r.findIndex((e=>null==e));if(a>-1)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Be.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new n.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Be.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new n.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,ze.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new O.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof n.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};(0,s._)([(0,h.MZ)({clonable:!1})],$e.prototype,"_primaryRasters",void 0),(0,s._)([(0,h.MZ)(T.fV)],$e.prototype,"legendEnabled",void 0),(0,s._)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],$e.prototype,"isReference",void 0),(0,s._)([(0,h.MZ)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,s._)([(0,h.MZ)({json:{read:!0,write:!0}})],$e.prototype,"blendMode",void 0),(0,s._)([(0,h.MZ)({type:C.A,json:{name:"renderingRule",write:!0}})],$e.prototype,"rasterFunction",void 0),(0,s._)([(0,h.MZ)()],$e.prototype,"sourceJSON",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],$e.prototype,"version",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],$e.prototype,"type",void 0),(0,s._)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],$e.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],$e.prototype,"popupEnabled",void 0),(0,s._)([(0,h.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],$e.prototype,"popupTemplate",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),(0,s._)([(0,h.MZ)({readOnly:!0,type:[R.A]})],$e.prototype,"fields",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,type:[R.A]})],$e.prototype,"rasterFields",null),(0,s._)([(0,h.MZ)({constructOnly:!0})],$e.prototype,"source",void 0),$e=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],$e);const Ue=$e},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,a.MZ)()],t.prototype,"title",null),(0,s._)([(0,a.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},56551:(e,t,i)=>{i.d(t,{H:()=>p});var s=i(90237),r=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let h=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],h.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],h.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],h.prototype,"renderer",void 0),h=(0,s._)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],h);const f=h,p=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),a=i(78888),n=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),h=i(3694),f=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),x=i(4718),v=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,x.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,o[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:o},valid:!0,data:new Array(n*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=s=class extends n.A{constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a,n){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;n.then((()=>l.abort()),(()=>l.abort()));let u=!1;const h=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(h,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,f.G4)(l))return;const p=new w.U(e,t,i,r),m={...a,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,f.u7)(n,(()=>t((0,f.NK)())));const i=_(r);let a=this._pendingTilemapRequests[i];if(!a){a=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};A._maxPrefetch=4,A._prefetches=new h.A({initialSize:s._maxPrefetch}),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},82434:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(90237),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o},73037:(e,t,i)=>{i.d(t,{A:()=>u});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c);const u=c},21312:(e,t,i)=>{i.d(t,{A:()=>y});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),h=i(86738),f=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,h=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+h*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+h*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),h=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let m=s=class extends f.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m);const y=m},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>f,X6:()=>p});var s=i(78888),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function h(e,t,i){const h=(0,c.Dl)(e),{rasterFunction:f,sourceJSON:p}=t||{},d=f?JSON.stringify(f.rasterFunctionDefinition||f):null,m=(0,c.lF)({...h.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=h.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,x=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,v=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,x,v,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),M=n.A.fromJSON(g.spatialReference||g.extent.spatialReference),C="fulfilled"===_[0].status?_[0].value?.data:null,O=C?.features?.length?u.A.fromJSON(C):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const V=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:M,pixelSize:new a.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:M}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:V})}function f(e,t,i){return h(e,{sourceJSON:t},i)}function p(e,t,i){return h(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,7817,8125],{76061:(e,t,n)=>{n.d(t,{G:()=>s,S:()=>r});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class r extends s{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},68925:(e,t,n)=>{n.d(t,{c:()=>c,e:()=>u,s:()=>i});var s=n(4576),r=n(90756),o=n(78125);function u(e,t){const n=(0,o.getSpatialReference)(e);return(0,r.g)((0,o.fromGeometry)(e),(0,o.fromPolyline)(t),(0,o.fromSpatialReference)(n)).map((e=>(0,o.toGeometry)(e,n))).filter(s.Ru)}const i=(0,r.f)(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:u,supportsCurves:i},Symbol.toStringTag,{value:"Module"}))},37817:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>s.e,supportsCurves:()=>s.s}),n(4576),n(90756),n(78125);var s=n(68925)},90756:(e,t,n)=>{n.d(t,{g:()=>h,f:()=>y});var s=n(76061),r=n(55537),o=n(35368),u=n(95213),i=n(12189),c=i.C;function a(e,t){return{m_geometry:e,m_side:t}}class m extends s.G{constructor(e,t,n,s,r){super(),this.m_cutIndex=-1,this.m_cuts=[],this.m_progressTracker=r,this.m_cuttee=t.clone(),this.m_cutter=new o.P({copy:n}),this.m_bConsiderTouch=e;const i=(0,u.g)(t,n);this.m_tolerance=(0,u.a)(s,i,!0)}next(){return-1===this.m_cutIndex&&this.generateCuts(),++this.m_cutIndex<this.m_cuts.length?this.m_cuts[this.m_cutIndex]:null}getGeometryID(){return 0}tock(){return!0}getRank(){return 1}generateCuts(){switch(this.m_cuttee.getGeometryType()){case r.G.enumPolyline:this.generatePolylineCuts();break;case r.G.enumPolygon:this.generatePolygonCuts()}}generatePolylineCuts(){const e=new o.P,t=new o.P,n=new o.P;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(t);const s=[];!function(e,t,n,s,r,u){if(t.isEmpty()){const e=a(t,0);return void r.push(e)}if(n.isEmpty()){const e=a(t,0);return void r.push(e)}const m=[],l=new o.E;{const o=l.createGeometryUserIndex(),h=l.addGeometry(t),y=l.addGeometry(n),p=new i.T(u);let g=0,f=null;if(l.hasCurves()){f=new c;const e=l.getEnvelope2D(u);g=(0,i.s)(s.total());const t=(0,i.k)(s.total(),e);(0,i.l)(l,t,s.total(),12e3,f,null,u)}l.dbgVerifyCurves(),p.setEditShapeCrackAndCluster(l,s),p.cut(e,o,h,y,m);for(const e of m){null!==f&&f.stitchCurves(l,e,g,!1);const t=a(l.getGeometry(e),(0,i.m)(l.getGeometryUserIndex(e,o)));r.push(t)}null!==f&&f.clearStitcher(l)}}(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,s,this.m_progressTracker);for(let o=0;o<s.length;o++){const u=s[o];1===u.m_side?e.add(u.m_geometry,!1):2===u.m_side||4===u.m_side?t.add(u.m_geometry,!1):3===u.m_side?this.m_cuts.push(u.m_geometry):0===u.m_side?n.add(u.m_geometry,!1):(0,r.c)("")}n.isEmpty()||e.isEmpty()&&t.isEmpty()&&!(this.m_cuts.length>=3)||this.m_cuts.push(n),e.isEmpty()&&t.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}generatePolygonCuts(){const e=new o.a,t=new o.a,n=new o.a;this.m_cuts.length=0,this.m_cuts.push(e),this.m_cuts.push(t);const s=[];!function(e,t,n,s,r,u){if(t.isEmpty()){const e=a(t,0);return void r.push(e)}if(n.isEmpty()){const e=a(t,0);return void r.push(e)}const m=[],l=new o.E;{const e=l.createGeometryUserIndex(),h=l.addGeometry(t),y=l.addGeometry(n),p=new i.T(u);let g=0,f=null;if(l.hasCurves()){f=new c;const e=l.getEnvelope2D(u);g=(0,i.s)(s.total());const t=(0,i.k)(s.total(),e);(0,i.l)(l,t,s.total(),12e3,f,null,u)}l.dbgVerifyCurves(),p.setEditShapeCrackAndCluster(l,s),p.cut(!1,e,h,y,m),null!==f&&f.stitchCurves(l,o.n,g,!0);let d=l.getGeometry(h);const _=new o.a,C=new o.a,G=[];for(let t=0;t<m.length;t++){let n=null;{const r=new o.E,c=r.addGeometry(d),a=r.addGeometry(l.getGeometry(m[t]));if(r.hasCurves()){const e=r.getEnvelope2D(u);g=(0,i.s)(s.total());const t=(0,i.k)(s.total(),e);(0,i.l)(r,t,s.total(),12e3,f,null,u)}p.setEditShapeCrackAndCluster(r,s);const h=p.intersection(c,a);if(null!==f&&f.stitchCurves(r,o.n,g,!0),n=r.getGeometry(h),n.isEmpty())continue;const y=l.getGeometryUserIndex(m[t],e);2===y?_.add(n,!1):1===y?C.add(n,!1):G.push(n)}{const e=new o.E,n=e.addGeometry(d),r=e.addGeometry(l.getGeometry(m[t]));if(e.hasCurves()){const t=e.getEnvelope2D(u);g=(0,i.s)(s.total());const n=(0,i.k)(s.total(),t);(0,i.l)(e,n,s.total(),12e3,f,null,u)}p.setEditShapeCrackAndCluster(e,s);const c=p.difference(n,r);null!==f&&f.stitchCurves(e,o.n,g,!0),d=e.getGeometry(c)}}if(!d.isEmpty()&&m.length>0&&G.push(d),_.isEmpty()&&C.isEmpty())return;if(!_.isEmpty()){const e=a(_,1);r.push(e)}if(!C.isEmpty()){const e=a(C,2);r.push(e)}for(let e=0,t=G.length;e<t;++e){const t=a(G[e],3);r.push(t)}}}(this.m_bConsiderTouch,this.m_cuttee,this.m_cutter,this.m_tolerance,s,this.m_progressTracker);for(let o=0;o<s.length;o++){const u=s[o];1===u.m_side?e.add(u.m_geometry,!1):2===u.m_side?t.add(u.m_geometry,!1):3===u.m_side?this.m_cuts.push(u.m_geometry):0===u.m_side?n.add(u.m_geometry,!1):(0,r.c)("")}(0,r.g)(n.isEmpty()||1===s.length),e.isEmpty()&&t.isEmpty()&&this.m_cuts.length<3&&(this.m_cuts.length=0)}}const l=new class{getOperatorType(){return 10005}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,n,s,r){return new m(e,t,n,s,r)}};function h(e,t,n){const s=l.execute(!0,e,t,n,null);return Array.from(s)}function y(){return l.supportsCurves()}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>_,fromMultipoint:()=>G,fromPoint:()=>x,fromPolygon:()=>v,fromPolyline:()=>E,fromSpatialReference:()=>w,getSpatialReference:()=>d,toExtent:()=>k,toGeometry:()=>P,toMultipoint:()=>M,toPoint:()=>V,toPolygon:()=>R,toPolyline:()=>S});var s=n(83661),r=(n(79187),n(55537)),o=n(95213),u=n(35368),i=n(12189),c=n(5443),a=n(48526),m=n(86738),l=n(39829),h=n(82799),y=(n(90293),n(83299));const p="_gxVersion",g=2,f=1;function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function _(e){switch(e.type){case"point":return x(e);case"multipoint":return G(e);case"polyline":return E(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(f,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function G(e){if(!e.getCacheValue(p)){const t=new u.M,n=new o.P,s=e.points,r=e.hasM,i=e.hasZ,c=i?3:2;for(let e=0,o=s.length;e<o;e++){const o=s[e];n.setXYCoords(o[0],o[1]),i&&n.setZ(o[2]??0),r&&n.setM(o[c]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function x(e){if(!e.getCacheValue(p)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:s,rings:r}=e,o=(0,y.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:s,rings:r});e.setCacheValue(p,o)}return e.getCacheValue(p)}function E(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:s,paths:r}=e,o=(0,y.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:s,paths:r});e.setCacheValue(p,o)}return e.getCacheValue(p)}function w(e){if(e.wkid)return(0,i.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,i.b)(t):null}function P(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return V(e,t);case r.G.enumEnvelope:return k(e,t);case r.G.enumMultiPoint:return M(e,t);case r.G.enumPolyline:return S(e,t);case r.G.enumPolygon:return R(e,t)}return null}function k(e,t){if(e.isEmpty())return null;const n=new c.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(s.hasZ()){const t=e.queryInterval(f,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function M(e,t){if(e.isEmpty())return null;const n=e.getDescription(),s=n.hasM(),r=n.hasZ(),u=[],i=new o.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,i);const n=[i.getX(),i.getY()];r&&n.push(i.getZ()),s&&n.push(i.getM()),u.push(n)}const c=new a.A({hasM:s,hasZ:r,points:u,spatialReference:t});return c.setCacheValue(p,e),c}function V(e,t){if(e instanceof s.P)return new m.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new m.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(n.m=e.getM()),r.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function R(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,y.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({spatialReference:t,...(0,y.toGeometry)(e,null)});return n.setCacheValue(p,e),n}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1346],{61346:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>P});var i=t(66131),a=t(47609),r=t(66395),s=t(85935),l=t(93833),o=t(40334),f=t(93818),d=t(78878),u=t(80672),c=t(68423),m=t(35704),y=t(86691),p=t(54461),w=t(85978),h=t(30235),D=t(87594),I=t(33325),g=t(80609),F=t(334),T=t(74887),A=t(88368),$=t(13600),x=t(20437),b=t(20655),E=t(54218);function N(e,n,t){const i=e.getVariables();if(i.length>0){const a={};for(const e of i)a[e]=n.evaluateIdentifier(t,{name:e});e.parameters=a}return e}function S(e,n,t=null){for(const t in e)if(t.toLowerCase()===n.toLowerCase())return e[t];return t}function L(e){if(null===e)return null;const n={type:S(e,"type",""),name:S(e,"name","")};if("range"===n.type)n.range=S(e,"range",[]);else{n.codedValues=[];for(const t of S(e,"codedValues",[]))n.codedValues.push({name:S(t,"name",""),code:S(t,"code",null)})}return n}function C(e){if(null===e)return null;const n={},t=S(e,"wkt");null!==t&&(n.wkt=t);const i=S(e,"wkid");return null!==i&&(n.wkid=i),n}function Z(e){if(null===e)return null;const n={hasZ:S(e,"hasz",!1),hasM:S(e,"hasm",!1)},t=S(e,"spatialreference");null!=t&&(n.spatialReference=C(t));const i=S(e,"x",null);if(null!==i)return n.x=i,n.y=S(e,"y",null),n.hasZ&&(n.z=S(e,"z",null)),n.hasM&&(n.m=S(e,"m",null)),n;const a=S(e,"rings",null);if(null!==a)return n.rings=a,n;const r=S(e,"paths",null);if(null!==r)return n.paths=r,n;const s=S(e,"points",null);if(null!==s)return n.points=s,n;for(const t of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const i=S(e,t,null);null!==i&&(n[t]=i)}return n}function v(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function P(e){"async"===e.mode&&(e.functions.timezone=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,l)=>{if((0,d.D)(l,1,2,n,t),(0,d.k)(l[0]))return"Unknown";if((0,d.j)(l[0]))return"Unknown";if((0,d.p)(l[0])){if(await l[0].load(),1===l.length||null===l[1])return l[0].datesInUnknownTimezone?v("unknown"):v(l[0].dateFieldsTimeZone);if(!(l[1]instanceof r.A)||!1===l[1].hasField("type"))throw new s.D$(n,s.TX.InvalidParameter,t);const e=l[1].field("type");if(!1===(0,E.Kg)(e))throw new s.D$(n,s.TX.InvalidParameter,t);switch((0,d.f)(e).toLowerCase()){case"preferredtimezone":return v(l[0].preferredTimeZone);case"editfieldsinfo":return v(l[0].editFieldsInfo?.timeZone??null);case"timeinfo":return v(l[0].timeInfo?.timeZone??null);case"field":if(l[1].hasField("fieldname")&&(0,E.Kg)(l[1].field("fieldname")))return v(l[0].fieldTimeZone((0,d.f)(l[1].field("fieldname"))))}throw new s.D$(n,s.TX.InvalidParameter,t)}const o=(0,d.h)(l[0],(0,d.K)(n));if(null===o)return null;const f=o.timeZone;return"system"===f?i.lY.systemTimeZoneCanonicalName:"utc"===f.toLowerCase()?"UTC":"unknown"===f.toLowerCase()?"Unknown":f}))},e.functions.sqltimestamp=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{(0,d.D)(a,1,3,n,t);const r=a[0];if((0,d.g)(r)){if(1===a.length)return r.toSQLWithKeyword();if(2===a.length)return r.changeTimeZone((0,d.f)(a[1])).toSQLWithKeyword();throw new s.D$(n,s.TX.InvalidParameter,t)}if((0,d.j)(r))return r.toSQLWithKeyword();if((0,d.p)(r)){if(3!==a.length)throw new s.D$(n,s.TX.InvalidParameter,t);await r.load();const e=(0,d.f)(a[1]);if((0,d.j)(a[2]))return a[2].toSQLWithKeyword();if(!1===(0,d.g)(a[2]))throw new s.D$(n,s.TX.InvalidParameter,t);const i=r.fieldTimeZone(e);return null==i?a[2].toSQLWithKeyword():a[2].changeTimeZone(i).toSQLWithKeyword()}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(n,t){return e.standardFunctionAsync(n,t,((e,i,a)=>{if((0,d.D)(a,2,4,n,t),(0,d.o)(a[0])){const e=(0,d.f)(a[1]);let i=(0,d.J)(a[2],null);const r=(0,d.e)((0,d.J)(a[3],!0));if(null===i&&(i=["*"]),!1===(0,E.cy)(i))throw new s.D$(n,s.TX.InvalidParameter,t);return a[0].featureSetById(e,r,i)}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"featuresetbyid",min:2,max:4}),e.functions.getfeatureset=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{if((0,d.D)(a,1,2,n,t),(0,d.n)(a[0])){let e=(0,d.J)(a[1],"datasource");return null===e&&(e="datasource"),e=(0,d.f)(e).toLowerCase(),(0,o.convertToFeatureSet)(a[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference??null)}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(n,t){return e.standardFunctionAsync(n,t,((e,i,r)=>{if((0,d.D)(r,2,5,n,t),null===r[0])throw new s.D$(n,s.TX.PortalRequired,t);if(r[0]instanceof a.A){const e=(0,d.f)(r[1]),i=(0,d.f)(r[2]);let a=(0,d.J)(r[3],null);const l=(0,d.e)((0,d.J)(r[4],!0));if(null===a&&(a=["*"]),!1===(0,E.cy)(a))throw new s.D$(n,s.TX.InvalidParameter,t);let f;return f=n.services?.portal?n.services.portal:b.A.getDefault(),f=(0,u.R)(r[0],f),(0,o.constructFeatureSetFromPortalItem)(e,i,n.spatialReference??null,a,l,f,n.lrucache,n.interceptor)}if(!1===(0,E.Kg)(r[0]))throw new s.D$(n,s.TX.PortalRequired,t);const l=(0,d.f)(r[0]),f=(0,d.f)(r[1]);let c=(0,d.J)(r[2],null);const m=(0,d.e)((0,d.J)(r[3],!0));if(null===c&&(c=["*"]),!1===(0,E.cy)(c))throw new s.D$(n,s.TX.InvalidParameter,t);return(0,o.constructFeatureSetFromPortalItem)(l,f,n.spatialReference??null,c,m,n.services?.portal??b.A.getDefault(),n.lrucache,n.interceptor)}))},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(n,t){return e.standardFunctionAsync(n,t,((e,i,a)=>{if((0,d.D)(a,2,4,n,t),(0,d.o)(a[0])){const e=(0,d.f)(a[1]);let i=(0,d.J)(a[2],null);const r=(0,d.e)((0,d.J)(a[3],!0));if(null===i&&(i=["*"]),!1===(0,E.cy)(i))throw new s.D$(n,s.TX.InvalidParameter,t);return a[0].featureSetByName(e,r,i)}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(n,t){return e.standardFunction(n,t,((e,i,a)=>{(0,d.D)(a,1,1,n,t);const l={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,E.Kg)(a[0])){const e=JSON.parse(a[0]);void 0!==e.layerDefinition?(l.layerDefinition=e.layerDefinition,l.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(l.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(l.featureSet.features=e.features,l.featureSet.geometryType=e.geometryType,l.layerDefinition.geometryType=l.featureSet.geometryType,l.layerDefinition.objectIdField=e.objectIdFieldName??"",l.layerDefinition.typeIdField=e.typeIdFieldName,l.layerDefinition.globalIdField=e.globalIdFieldName,l.layerDefinition.fields=e.fields,e.spatialReference&&(l.layerDefinition.spatialReference=e.spatialReference))}else{if(!(a[0]instanceof r.A))throw new s.D$(n,s.TX.InvalidParameter,t);{const e=JSON.parse(a[0].castToText(!0)),i=S(e,"layerdefinition");if(null!==i){l.layerDefinition.geometryType=S(i,"geometrytype",""),l.featureSet.geometryType=l.layerDefinition.geometryType,l.layerDefinition.globalIdField=S(i,"globalidfield",""),l.layerDefinition.objectIdField=S(i,"objectidfield",""),l.layerDefinition.typeIdField=S(i,"typeidfield",""),l.layerDefinition.hasZ=!0===S(i,"hasz",!1),l.layerDefinition.hasM=!0===S(i,"hasm",!1);const n=S(i,"spatialreference");n&&(l.layerDefinition.spatialReference=C(n));const t=[];for(const e of S(i,"fields",[])){const n={name:S(e,"name",""),alias:S(e,"alias",""),type:S(e,"type",""),nullable:S(e,"nullable",!0),editable:S(e,"editable",!0),length:S(e,"length",null),domain:L(S(e,"domain"))};t.push(n)}l.layerDefinition.fields=t;const a=S(e,"featureset");if(a){const e={};for(const n of t)e[n.name.toLowerCase()]=n.name;for(const n of S(a,"features",[])){const t={},i=S(n,"attributes",{});for(const n in i)t[e[n.toLowerCase()]]=i[n];l.featureSet.features.push({attributes:t,geometry:Z(S(n,"geometry"))})}}}else{l.layerDefinition.hasZ=!0===S(e,"hasz",!1),l.layerDefinition.hasM=!0===S(e,"hasm",!1),l.layerDefinition.geometryType=S(e,"geometrytype",""),l.featureSet.geometryType=l.layerDefinition.geometryType,l.layerDefinition.objectIdField=S(e,"objectidfieldname",""),l.layerDefinition.typeIdField=S(e,"typeidfieldname","");const i=S(e,"spatialreference");i&&(l.layerDefinition.spatialReference=C(i));const a=[],r=S(e,"fields",null);if(!(0,E.cy)(r))throw new s.D$(n,s.TX.InvalidParameter,t);for(const e of r){const n={name:S(e,"name",""),alias:S(e,"alias",""),type:S(e,"type",""),nullable:S(e,"nullable",!0),editable:S(e,"editable",!0),length:S(e,"length",null),domain:L(S(e,"domain"))};a.push(n)}l.layerDefinition.fields=a;const o={};for(const e of a)o[e.name.toLowerCase()]=e.name;let f=S(e,"features",null);if((0,E.cy)(f))for(const e of f){const n={},t=S(e,"attributes",{});for(const e in t)n[o[e.toLowerCase()]]=t[e];l.featureSet.features.push({attributes:n,geometry:Z(S(e,"geometry",null))})}else f=null,l.featureSet.features=f}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const n of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(n===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,E.cy)(e.layerDefinition.fields)&&!1!==(0,E.cy)(e.featureSet.features)}(l))throw new s.D$(n,s.TX.InvalidParameter,t);return l.layerDefinition.geometryType||(l.layerDefinition.geometryType="esriGeometryNull"),h.A.create(l,n.spatialReference)}))},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(n,t){return e.standardFunctionAsync(n,t,(async(i,a,r)=>{if((0,d.D)(r,2,2,n,t),(0,E.cy)(r[0])||(0,d.m)(r[0])){const e=[];let i,a=r[0];if(a instanceof f.A&&(a=a.toArray()),!(0,d.i)(r[1]))throw new s.D$(n,s.TX.InvalidParameter,t);i=r[1].createFunction(n);for(const n of a){const t=i(n);(0,T.$X)(t)?!0===await t&&e.push(n):!0===t&&e.push(n)}return e}if((0,d.p)(r[0])){const t=await r[0].load(),i=A.A.create(r[1],{fieldsIndex:t.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC}),a=i.getVariables();if(a.length>0){const t={};for(const i of a)t[i]=e.evaluateIdentifier(n,{name:i});i.parameters=t}return new m.A({parentfeatureset:r[0],whereclause:i})}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{if((0,d.D)(a,2,2,n,t),(0,d.p)(a[0])){const e=new D.A(a[1]);return new y.A({parentfeatureset:a[0],orderbyclause:e})}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{if((0,d.D)(a,2,2,n,t),(0,d.p)(a[0]))return new p.A({parentfeatureset:a[0],topnum:a[1]});if((0,E.cy)(a[0]))return(0,d.t)(a[1])>=a[0].length?a[0].slice():a[0].slice(0,(0,d.t)(a[1]));if((0,d.m)(a[0]))return(0,d.t)(a[1])>=a[0].length()?a[0].slice():a[0].slice(0,(0,d.t)(a[1]));throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{if((0,d.D)(a,1,1,n,t),(0,d.p)(a[0])){const t=await a[0].first(e.abortSignal);if(null!==t){const e=l.A.createFromGraphicLikeObject(t.geometry,t.attributes,a[0],n.timeZone);return e._underlyingGraphic=t,e}return t}return(0,E.cy)(a[0])?0===a[0].length?null:a[0][0]:(0,d.m)(a[0])?0===a[0].length()?null:a[0].get(0):null}))},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{(0,d.D)(a,1,2,n,t);const l={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(a.length>1)if(a[1]instanceof r.A){if(a[1].hasField("minsize")&&(l.minsize=(0,d.t)(a[1].field("minsize"))),a[1].hasField("metadata")&&(l.returnMetadata=(0,d.e)(a[1].field("metadata"))),a[1].hasField("maxsize")&&(l.maxsize=(0,d.t)(a[1].field("maxsize"))),a[1].hasField("types")){const e=(0,d.$)(a[1].field("types"),!1);e.length>0&&(l.types=e)}}else if(null!==a[1])throw new s.D$(n,s.TX.InvalidParameter,t);if((0,d.n)(a[0])){let e=a[0]._layer;return e instanceof $.default&&(e=(0,o.constructFeatureSet)(e,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===e||!1===(0,d.p)(e)?[]:(await e.load(),e.queryAttachments(a[0].field(e.objectIdField),l.minsize,l.maxsize,l.types,l.returnMetadata))}if(null===a[0])return[];throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{(0,d.D)(a,2,4,n,t);const r=a[0],l=(0,d.f)(a[1]);let f=(0,d.J)(a[2],null);const u=(0,d.e)((0,d.J)(a[3],!0));if(null===f&&(f=["*"]),!1===(0,E.cy)(f))throw new s.D$(n,s.TX.InvalidParameter,t);if(null===a[0])return null;if(!(0,d.n)(a[0]))throw new s.D$(n,s.TX.InvalidParameter,t);let c=r._layer;if(c instanceof $.default&&(c=(0,o.constructFeatureSet)(c,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===c)return null;if(!1===(0,d.p)(c))return null;c=await c.load();const m=c.relationshipMetaData().filter((e=>e.name===l));if(0===m.length)return null;if(void 0!==m[0].relationshipTableId&&null!==m[0].relationshipTableId&&m[0].relationshipTableId>-1)return(0,o.constructFeatureSetFromRelationship)(c,m[0],r.field(c.objectIdField),c.spatialReference,f,u,n.lrucache,n.interceptor);let y=c.serviceUrl();if(!y)return null;y="/"===y.charAt(y.length-1)?y+m[0].relatedTableId.toString():y+"/"+m[0].relatedTableId.toString();const p=await(0,o.constructFeatureSetFromUrl)(y,c.spatialReference,f,u,n.lrucache,n.interceptor);await p.load();let h=p.relationshipMetaData();if(h=h.filter((e=>e.id===m[0].id)),!1===r.hasField(m[0].keyField)||null===r.field(m[0].keyField)){const e=await c.getFeatureByObjectId(r.field(c.objectIdField),[m[0].keyField]);if(e){const n=A.A.create(h[0].keyField+"= @id",{fieldsIndex:p.getFieldsIndex(),timeZone:p.dateFieldsTimeZoneDefaultUTC});return n.parameters={id:e.attributes[m[0].keyField]},p.filter(n)}return new w.A({parentfeatureset:p})}const D=A.A.create(h[0].keyField+"= @id",{fieldsIndex:p.getFieldsIndex(),timeZone:p.dateFieldsTimeZoneDefaultUTC});return D.parameters={id:r.field(m[0].keyField)},p.filter(D)}))},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{(0,d.D)(a,2,3,n,t);const r=a[0],l=(0,d.f)((0,d.J)(a[1],"")).toLowerCase(),f=(0,E.Kg)(a[2])?(0,d.f)(a[2]):null;if(null===a[0])return null;if(!(0,d.n)(a[0]))throw new s.D$(n,s.TX.InvalidParameter,t);let u=r._layer;if(u instanceof $.default&&(u=(0,o.constructFeatureSet)(u,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===u)return null;if(!1===(0,d.p)(u))return null;await u.load();const m=u.serviceUrl(),y=await(0,o.constructAssociationMetaDataFeatureSetFromUrl)(m,n.spatialReference);let p=null,w=null,h=!1;if(null!==f&&""!==f&&void 0!==f){for(const e of y.terminals)e.terminalName===f&&(w=e.terminalId);null===w&&(h=!0)}const D=y.associations.getFieldsIndex(),g=D.get("TOGLOBALID").name,F=D.get("FROMGLOBALID").name,T=D.get("TOTERMINALID").name,b=D.get("FROMTERMINALID").name,N=D.get("FROMNETWORKSOURCEID").name,S=D.get("TONETWORKSOURCEID").name,L=D.get("ASSOCIATIONTYPE").name,C=D.get("ISCONTENTVISIBLE").name,Z=D.get("OBJECTID").name;for(const e of u.fields)if("global-id"===e.type){p=r.field(e.name);break}let v=null,P=new c.Gr(new x.A({name:"percentalong",alias:"percentalong",type:"double"}),A.A.create("0",{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC})),X=new c.Gr(new x.A({name:"side",alias:"side",type:"string"}),A.A.create("''",{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC}));const R="globalid",k="globalId",U={};for(const e in y.lkp)U[e]=y.lkp[e].sourceId;const M=new c.bV(new x.A({name:"classname",alias:"classname",type:"string"}),null,U);let O="";switch(l){case"midspan":{O=`((${g}='${p}') OR ( ${F}='${p}')) AND (${L} IN (5))`,M.codefield=A.A.create(`CASE WHEN (${g}='${p}') THEN ${N} ELSE ${S} END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC});const e=(0,I.ke)(c.a.findField(y.associations.fields,F));e.name=R,e.alias=R,v=new c.Gr(e,A.A.create(`CASE WHEN (${F}='${p}') THEN ${g} ELSE ${F} END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC})),P=y.unVersion>=4?new c.IO(c.a.findField(y.associations.fields,D.get("PERCENTALONG").name)):new c.Gr(new x.A({name:"percentalong",alias:"percentalong",type:"double"}),A.A.create("0",{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{O=`((${g}='${p}') OR ( ${F}='${p}')) AND (${L} IN (4,6))`,M.codefield=A.A.create(`CASE WHEN (${g}='${p}') THEN ${N} ELSE ${S} END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC});const e=(0,I.ke)(c.a.findField(y.associations.fields,F));e.name=R,e.alias=R,v=new c.Gr(e,A.A.create(`CASE WHEN (${F}='${p}') THEN ${g} ELSE ${F} END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC})),X=new c.Gr(new x.A({name:"side",alias:"side",type:"string"}),A.A.create(`CASE WHEN (${L}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${g}='@T'`,n=`${F}='@T'`;null!==w&&(e+=` AND ${T}=@A`,n+=` AND ${b}=@A`),O="(("+e+") OR ("+n+"))",O=(0,d.W)(O,"@T",p??""),e=(0,d.W)(e,"@T",p??""),null!==w&&(e=(0,d.W)(e,"@A",w.toString()),O=(0,d.W)(O,"@A",w.toString())),M.codefield=A.A.create("CASE WHEN "+e+` THEN ${N} ELSE ${S} END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC});const t=(0,I.ke)(c.a.findField(y.associations.fields,F));t.name=R,t.alias=R,v=new c.Gr(t,A.A.create("CASE WHEN "+e+` THEN ${F} ELSE ${g} END`,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC}));break}case"container":O=`${g}='${p}' AND ${L} = 2`,null!==w&&(O+=` AND ${T} = `+w.toString()),M.codefield=N,O="( "+O+" )",v=new c.p8(c.a.findField(y.associations.fields,F),R,R);break;case"content":O=`(${F}='${p}' AND ${L} = 2)`,null!==w&&(O+=` AND ${b} = `+w.toString()),M.codefield=S,O="( "+O+" )",v=new c.p8(c.a.findField(y.associations.fields,g),R,R);break;case"structure":O=`(${g}='${p}' AND ${L} = 3)`,null!==w&&(O+=` AND ${T} = `+w.toString()),M.codefield=N,O="( "+O+" )",v=new c.p8(c.a.findField(y.associations.fields,F),R,k);break;case"attached":O=`(${F}='${p}' AND ${L} = 3)`,null!==w&&(O+=` AND ${b} = `+w.toString()),M.codefield=S,O="( "+O+" )",v=new c.p8(c.a.findField(y.associations.fields,g),R,k);break;default:throw new s.D$(n,s.TX.InvalidParameter,t)}return h&&(O="1 <> 1"),new c.a({parentfeatureset:y.associations,adaptedFields:[new c.IO(c.a.findField(y.associations.fields,Z)),new c.IO(c.a.findField(y.associations.fields,C)),v,X,M,P],extraFilter:O?A.A.create(O,{fieldsIndex:y.associations.getFieldsIndex(),timeZone:y.associations.dateFieldsTimeZoneDefaultUTC}):null})}))},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(n,t){return e.standardFunctionAsync(n,t,(async(i,a,l)=>{if((0,d.D)(l,3,3,n,t),!(0,d.p)(l[0]))throw new s.D$(n,s.TX.InvalidParameter,t);const o=await l[0].load(),f=[],u=[];let c=!1,m=[];if((0,E.Kg)(l[1]))m.push(l[1]);else if(l[1]instanceof r.A)m.push(l[1]);else if((0,E.cy)(l[1]))m=l[1];else{if(!(0,d.m)(l[1]))throw new s.D$(n,s.TX.InvalidParameter,t);m=l[1].toArray()}for(const e of m)if((0,E.Kg)(e)){const n=A.A.create((0,d.f)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),t=!0===(0,g.DA)(n)?(0,d.f)(e):"%%%%FIELDNAME";f.push({name:t,expression:n}),"%%%%FIELDNAME"===t&&(c=!0)}else{if(!(e instanceof r.A))throw new s.D$(n,s.TX.InvalidParameter,t);{const i=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",a=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===i&&(c=!0),!i)throw new s.D$(n,s.TX.InvalidParameter,t);f.push({name:i,expression:A.A.create(a||i,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(m=[],(0,E.Kg)(l[2]))m.push(l[2]);else if((0,E.cy)(l[2]))m=l[2];else if((0,d.m)(l[2]))m=l[2].toArray();else{if(!(l[2]instanceof r.A))throw new s.D$(n,s.TX.InvalidParameter,t);m.push(l[2])}for(const e of m){if(!(e instanceof r.A))throw new s.D$(n,s.TX.InvalidParameter,t);{const i=e.hasField("name")?e.field("name"):"",a=e.hasField("statistic")?e.field("statistic"):"",r=e.hasField("expression")?e.field("expression"):"";if(!i||!a||!r)throw new s.D$(n,s.TX.InvalidParameter,t);u.push({name:i,statistic:a.toLowerCase(),expression:A.A.create(r,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const n of o.fields)e[n.name.toLowerCase()]=1;for(const n of f)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);for(const n of u)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);let n=0;for(const t of f)if("%%%%FIELDNAME"===t.name){for(;1===e["field_"+n.toString()];)n++;e["field_"+n.toString()]=1,t.name="FIELD_"+n.toString()}}for(const t of f)N(t.expression,e,n);for(const t of u)N(t.expression,e,n);return l[0].groupby(f,u)}))},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(n,t){return e.standardFunctionAsync(n,t,(async(i,a,l)=>{if((0,d.p)(l[0])){(0,d.D)(l,2,2,n,t);const i=await l[0].load(),a=[];let o=[];if((0,E.Kg)(l[1]))o.push(l[1]);else if(l[1]instanceof r.A)o.push(l[1]);else if((0,E.cy)(l[1]))o=l[1];else{if(!(0,d.m)(l[1]))throw new s.D$(n,s.TX.InvalidParameter,t);o=l[1].toArray()}let f=!1;for(const e of o)if((0,E.Kg)(e)){const n=A.A.create((0,d.f)(e),{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),t=!0===(0,g.DA)(n)?(0,d.f)(e):"%%%%FIELDNAME";a.push({name:t,expression:n}),"%%%%FIELDNAME"===t&&(f=!0)}else{if(!(e instanceof r.A))throw new s.D$(n,s.TX.InvalidParameter,t);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",l=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(f=!0),!r)throw new s.D$(n,s.TX.InvalidParameter,t);a.push({name:r,expression:A.A.create(l||r,{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})})}}if(f){const e={};for(const n of i.fields)e[n.name.toLowerCase()]=1;for(const n of a)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);let n=0;for(const t of a)if("%%%%FIELDNAME"===t.name){for(;1===e["field_"+n.toString()];)n++;e["field_"+n.toString()]=1,t.name="FIELD_"+n.toString()}}for(const t of a)N(t.expression,e,n);return l[0].groupby(a,[])}return function(e){if(1===e.length){if((0,E.cy)(e[0]))return(0,F.t)("distinct",e[0],-1);if((0,d.m)(e[0]))return(0,F.t)("distinct",e[0].toArray(),-1)}return(0,F.t)("distinct",e,-1)}(l)}))},e.functions.getfeaturesetinfo=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{if((0,d.D)(a,1,1,n,t),!(0,d.p)(a[0]))return null;const s=await a[0].getFeatureSetInfo();return s?r.A.convertObjectToArcadeDictionary({layerId:s.layerId,layerName:s.layerName,itemId:s.itemId,serviceLayerUrl:s.serviceLayerUrl,webMapLayerId:s.webMapLayerId??null,webMapLayerTitle:s.webMapLayerTitle??null,className:null,objectClassId:null},(0,d.K)(n),!1,!1):null}))},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,a)=>{if((0,d.D)(a,2,2,n,t),(0,d.p)(a[0])){const e=await a[0].load(),i=a[1];if(!(0,E.Fq)(i))throw new s.D$(n,s.TX.InvalidParameter,t);if(e.subtypeField){const n=A.A.create(`${e.subtypeField}= ${a[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new m.A({parentfeatureset:a[0],whereclause:n})}if(null===e.typeIdField||""===e.typeIdField)throw new s.D$(n,s.TX.FeatureSetDoesNotHaveSubtypes,t);const r=A.A.create(`${e.typeIdField}= ${a[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new m.A({parentfeatureset:a[0],whereclause:r})}throw new s.D$(n,s.TX.InvalidParameter,t)}))},e.signatures.push({name:"filterbysubtypecode",min:2,max:2}))}},80672:(e,n,t)=>{t.d(n,{R:()=>a});var i=t(20655);function a(e,n){return null===e?n:new i.A({url:e.field("url")})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7677],{563:(e,t,i)=>{i.d(t,{QueueProcessor:()=>u});var s=i(97768),r=i(74887),n=i(9775),o=i(32587),l=i(11932),a=i(44794);class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class u{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,a.v)(!1),this.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new n.A(e.peeker),this.process=e.process}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}abort(e){const t=this._controllers.get(e);t&&t.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach((t=>e.push(t))),this._controllers.clear(),e.forEach((e=>e.abort())),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach(((t,i)=>e(i)))}get(e){const t=this._deferreds.get(e);return t?t.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const i=this.get(e);if(i)return i;const s=new AbortController;let n=null;t&&(n=(0,r.u7)(t,(()=>s.abort())));const o=()=>{l.remove(),null!=n&&n.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()},l=(0,r.NY)(s.signal,(()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),o(),a.reject((0,r.NK)())})),a=(0,r.Tw)();return this._deferreds.set(e,a),this._controllers.set(e,s),a.promise.then(o,o),this._queue.push(e),this._scheduleNext(),a.promise}last(){return this._queue.last()}lastPromise(){const e=this.last();return e?this.get(e):null}peek(){return this._queue.peek()}popLast(){const e=this._queue.popLast();return e&&(this._deferreds.get(e)?.reject((0,r.NK)()),this._removeItem(e)),e}reset(){const e=Array.from(this._processingItems.values());this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.delete(e)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)((()=>{this._schedule=null,this._next()})))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const i=new AbortController,s=new c(e,i);this._processingItems.set(e,s);try{t=this.process(e,i.signal)}catch(e){this._processError(s,e)}(0,r.$X)(t)?(s.promise=t,t.then((e=>this._processResult(s,e)),(e=>this._processError(s,e)))):this._processResult(s,t)}}},32587:(e,t,i)=>{i.d(t,{A:()=>n});var s=i(62788),r=i(95488);class n{constructor(e){this._observable=new r.I,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach(((i,s)=>e.call(t,i,s,this)),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,i)=>{i.d(t,{v:()=>l});var s=i(4718),r=i(62788),n=i(95488);class o{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function l(e,t=s.gh){return new o(e,t)}},89015:(e,t,i)=>{i.d(t,{o:()=>N});var s=i(90237),r=i(78888),n=i(49186),o=i(53966),l=i(10107),a=i(56507),c=(i(44208),i(87811),i(93223)),u=i(36005),h=i(40608),d=i(86738),p=i(16930),f=i(21325),m=i(60694),y=i(10873),g=i(45617),x=i(43577),_=i(13868),b=i(22796),v=i(69409),w=i(87045),R=i(84169),I=i(77301),S=i(77359),M=i(6049),T=i(70834),k=i(6952),A=i(14636),F=i(12711),P=i(85676),z=i(94359),C=i(22048),J=i(4095);const N=e=>{let t=class extends e{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster="Function"===e[0]?.raster?.datasetFormat}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,m.Jf)(e,o.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find((({name:t})=>t===e));return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const s=t?.layerDefinition?.drawingInfo?.renderer;return(0,z.LF)(s,i)||void 0}async convertVectorFieldData(e,t){const{serviceRasterInfo:i}=this;if(null==e||!i)return null;const s=this._rasterJobHandler.instance,r=i.dataType;return s?s.convertVectorFieldData({pixelBlock:e,dataType:r},t):(0,A.FI)(e,r)}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,a.PZ)(C.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new n.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new n.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let r=s;const{spatialReference:o}=i;s.spatialReference.equals(o)||(await(0,T.Hh)(),r="extent"===s.type?(0,T._l)(s,o):(0,T.uk)(s,o));const l=e.pixelSize??new d.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:o}),{extent:c,width:u,height:h}=(0,S.b7)(i,r,l),p=await this.fetchPixels(c,u,h,{...t,interpolation:"nearest"});if(null==p.pixelBlock)throw new n.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const f=await(0,S.$Q)(p.pixelBlock,c,r),m=this._rasterJobHandler.instance;return m?m.computeStatisticsHistograms({pixelBlock:f},t):(0,k.eH)(f)}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,J.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;let i=e.multidimensionalDefinition||this.multidimensionalDefinition;i?.length||(i=(0,I.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const s=e.timeExtent||this.timeExtent;if(null!=i&&null!=s&&(null!=s.start||null!=s.end)){i=i.map((e=>e.clone()));const r=t.variables.find((({name:e})=>e===i[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),n=i.find((({dimensionName:e})=>"StdTime"===e));if(!r||!n)return{...e,multidimensionalDefinition:null};const{start:o,end:l}=s,a=null==o?null:o.getTime(),c=null==l?null:l.getTime(),u=a??c,h=c??a;if(null!=r.values){const e=r.values.filter((e=>{if(Array.isArray(e)){if(u===h)return e[0]<=u&&e[1]>=u;const t=e[0]<=u&&e[1]>u||e[0]<h&&e[1]>=h,i=e[0]>=u&&e[1]<=h||e[0]<u&&e[1]>h;return t||i}return u===h?e===u:e>=u&&e<=h}));if(e.length){const t=e.sort(((e,t)=>{const i=Array.isArray(e)?e[0]:e,s=Array.isArray(e)?e[1]:e,r=Array.isArray(t)?t[0]:t,n=Array.isArray(t)?t[1]:t;return u===h?i-r:Math.abs(s-h)-Math.abs(n-h)}))[0];n.values=[t]}else i=null}else if(r.hasRegularIntervals&&r.extent){const[e,t]=r.extent;u>t||h<e?i=null:n.values=u===h?[u]:[Math.max(e,u),Math.min(t,h)]}}return null!=i&&(0,I.sx)(i,this.multidimensionalSubset)?{...e,multidimensionalDefinition:null}:{...e,multidimensionalDefinition:i}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t}=this;if(!e||!t||!this.renderer)return;const{rasterInfo:i}=this.raster,s=(0,I.ct)(i,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=s?.name,n=(0,F.$P)({...this.renderer.toJSON(),variableName:r});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(n))return;const o=this._rasterJobHandler.instance;o&&(t.rasterInfo=(0,F.m7)(i,r),t.rendererJSON=n,t.bind(),await o.updateSymbolizer(t),this._cachedRendererJson=n)}async applyRenderer(e,t){const i=e?.pixelBlock;if(!(null!=i&&i.pixels&&i.pixels.length>0))return null;let s;await this.updateRenderer();const r=this._rasterJobHandler.instance,n=this.bandIds??[];return s=r?await r.symbolize({...e,simpleStretchParams:t,bandIds:n}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:n}),s}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const s=(0,f.Vp)(e);return w.A.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,s,n={}){if(i(this),n.requestAsImageElement){const i=this.getTileUrl(e,t,s);return(0,r.A)(i,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:n.signal}).then((e=>e.data))}const{serviceRasterInfo:o}=this;if(null!=o.multidimensionalInfo&&null==(n=this.normalizeRasterFetchOptions(n)).multidimensionalDefinition){const i=n.tileInfo||o.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,s,i),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(n={...n,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,s,n)}async fetchPixels(e,t,i,s={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,s))}async identify(e,t={}){await this.load();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&!(s.hasMultidimensionalTranspose&&((0,I.DY)(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||null!=(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition))return{location:e,value:null};const r=this.multidimensionalSubset?.areaOfInterest;if(r&&!r.contains(e))throw new n.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");return i.identify(e,t)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some((e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some((e=>"StdTime"===e.name)))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,I.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,I.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&"Function"===this.raster.datasetFormat&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new v.A;return this._rasterJobHandler.connectionPromise=e.initialize().then((async()=>{i(this),this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,"Function"===this.raster.datasetFormat&&this.raster.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch((()=>{})),this.renderer&&this.updateRenderer()})).catch((()=>{})),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){if(null==this.interpolation){i(this);const{raster:e}=this,t=(0,F.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){i(this);const{rasterInfo:t}=this.raster,s=(0,I.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=s?.name,n=(0,F.I8)({variableName:r,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??(0,F.ci)(t)),!this.renderer||"override"===e){const e=(0,F.Mm)(this.raster),i=n?.renderer??(0,F.PD)(t,{bandIds:this.bandIds,variableName:r,rasterFunctionColorRamp:e}),s=t.statistics,o=s&&s.length>0?s[0]:null,l=o?.max??0,a=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(l>1e24||a<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const l=(0,F.$P)({...this.renderer.toJSON(),variableName:r}),a=(0,F.m7)(t,r);this.symbolizer?(this.symbolizer.rendererJSON=l,this.symbolizer.rasterInfo=a):this.symbolizer=new P.A({rendererJSON:l,rasterInfo:a});const c=this.symbolizer.bind();if(c.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,F.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else o.A.getLogger(this).warn("imagery-tile-mixin",c.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&"Function"===this.raster.datasetFormat){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.A.fromJSON(e)))}let e,t=this.raster,i=!1;"Function"===t.datasetFormat?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:s}=this;if(s){const i={raster:t};e.length>1&&e.forEach((e=>i[e.url]=e));const r=(0,M.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),n=new R.A({rasterFunction:r});n.rasterJobHandler=this._rasterJobHandler.instance,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=null,!i&&!s)return;const{bandIds:r}=this,{bandCount:n}=this.raster.rasterInfo,o=r?.length?r.some((e=>e>=n)):n>=3;r&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}};function i(e){if(!e.raster||!e.serviceRasterInfo)throw new n.A("imagery-tile","no raster")}return(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_cachedRasterFunctionJson",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_compatibleFullExtent",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"_rasterFunctionUpdatePromise",void 0),(0,s._)([(0,l.MZ)({type:[a.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],t.prototype,"bandIds",void 0),(0,s._)([(0,l.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,s._)([(0,l.MZ)({json:{read:!1}})],t.prototype,"fullExtent",null),(0,s._)([(0,l.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,c.e)(_.SZ)],t.prototype,"interpolation",void 0),(0,s._)([(0,l.MZ)()],t.prototype,"ioConfig",void 0),(0,s._)([(0,l.MZ)({type:[g.A],json:{write:!0}})],t.prototype,"multidimensionalDefinition",null),(0,s._)([(0,l.MZ)({type:x.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,s._)([(0,l.MZ)()],t.prototype,"raster",void 0),(0,s._)([(0,l.MZ)({type:b.A})],t.prototype,"rasterFunction",null),(0,s._)([(0,l.MZ)()],t.prototype,"serviceRasterInfo",void 0),(0,s._)([(0,l.MZ)()],t.prototype,"sourceJSON",void 0),(0,s._)([(0,l.MZ)({readOnly:!0,type:p.A,json:{read:!1}})],t.prototype,"spatialReference",void 0),(0,s._)([(0,l.MZ)({type:w.A})],t.prototype,"tileInfo",void 0),(0,s._)([(0,l.MZ)(y.OZ)],t.prototype,"url",null),(0,s._)([(0,l.MZ)()],t.prototype,"renderer",null),(0,s._)([(0,l.MZ)({types:z.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:z.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,s._)([(0,u.w)("internalRenderer")],t.prototype,"readRenderer",null),(0,s._)([(0,l.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),t=(0,s._)([(0,h.$)("esri.layers.mixins.ImageryTileMixin")],t),t}},91806:(e,t,i)=>{i.d(t,{A:()=>u});var s,r=i(90237),n=i(25482),o=i(10107),l=i(56507),a=(i(44208),i(87811),i(40608));let c=s=class extends n.A{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,r._)([(0,o.MZ)({type:l.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,r._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,r._)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,r._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,r._)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=s=(0,r._)([(0,a.$)("esri.layers.support.LOD")],c);const u=c},87045:(e,t,i)=>{i.d(t,{A:()=>I});var s,r=i(90237),n=i(66552),o=i(25482),l=i(83047),a=i(10107),c=i(56507),u=(i(44208),i(87811),i(36005)),h=i(40608),d=i(43937),p=i(86738),f=i(16930),m=i(19419),y=i(21325),g=i(28735),x=i(91806),_=i(72802);const b=new n.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=s=class extends o.A{static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:n=f.A.WebMercator,numLODs:o=24}=e;if(!(0,y.fn)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new x.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new x.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new p.A(0,0,n),size:[r,r],spatialReference:n})}const a=(0,y.Vp)(n),c=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:n}):new p.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),u=1/(39.37*(0,l.GA)(n)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*u;h.push(new x.A({level:e,scale:t,resolution:s}))}else{let e=(0,y.EA)(n)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);h.push(new x.A({level:0,scale:e,resolution:e*u}));for(let s=1;s<i;s++){const i=e/2**t,r=i*u;h.push(new x.A({level:s,scale:i,resolution:r})),e=i}}return new s({dpi:96,lods:h,origin:c,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e}))),this._set("scales",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],r=t[s+1];if(i<=e)return s;if(r===e)return s+1;if(i>e&&r<e)return s+Math.log(i/e)/Math.log(i/r)}return s}tileAt(e,t,i,s){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=i;else if((0,y.aI)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,s=i;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;n=e.x,o=e.y,s=i}const l=r.resolution*this.size[0],a=r.resolution*this.size[1];return s||(s=new _.U(null,0,0,0,(0,m.vt)())),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((n-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,n=i.resolution*this.size[0]/2**r,o=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.vt)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:s}=i,r=s*this.size[0],n=s*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const s=e+t,{scale:r,resolution:n}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new x.A({level:e,scale:r,resolution:n}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var w,R;(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,r._)([(0,a.MZ)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,r._)([(0,a.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,r._)([(0,a.MZ)({type:p.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,r._)([(0,u.w)("origin")],v.prototype,"readOrigin",null),(0,r._)([(0,a.MZ)({type:[x.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,r._)([(0,a.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,r._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,r._)([(0,u.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,r._)([(0,d.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],v.prototype,"writeSize",null),(0,r._)([(0,a.MZ)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=s=(0,r._)([(0,h.$)("esri.layers.support.TileInfo")],v),w=v||(v={}),(R=w.ExtrapolateOptions||(w.ExtrapolateOptions={}))[R.NONE=0]="NONE",R[R.POWER_OF_TWO=1]="POWER_OF_TWO";const I=v},72802:(e,t,i)=>{i.d(t,{U:()=>s});class s{constructor(e,t,i,s,r=void 0){this.id=e,this.level=t,this.row=i,this.col=s,this.extent=r}}},4916:(e,t,i)=>{i.d(t,{A:()=>D});var s=i(90237),r=i(78888),n=i(49186),o=i(25482),l=i(53966),a=i(74887),c=i(563),u=i(10107),h=i(56507),d=(i(44208),i(87811),i(40608)),p=i(5443),f=i(86738),m=i(16930),y=i(60694),g=i(10873),x=i(45617),_=i(91806),b=i(20223),v=i(87045),w=i(77301),R=i(70834);const I=new Map,S=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.refCount--,e.refCount<=0&&(s.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.ts=Date.now(),e.refCount++,s.delete(i),s.set(i,e),e.block}return null}putBlock(e,t,i,s){const r=this._cachedBlocks,n=e+"/"+t;if(r.has(n)){const e=r.get(n);e.ts=Date.now(),e.refCount++}else r.set(n,{block:i,ts:Date.now(),refCount:1,controller:s});this._trim(),this._updateTimer()}deleteBlock(e,t){const i=this._cachedBlocks,s=e+"/"+t;i.has(s)&&i.delete(s)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),i=Date.now();for(let s=0;s<t.length&&t[s][1].ts<=i-this._duration;s++)e.delete(t[s][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function M(e,t){return null==t?e:`${e}?sliceId=${t}`}function T(e,t,i){const s=I.get(e);if(!s)return null==t?S.decreaseRefCount(e,i):0;if(null==t||null==s[t])return S.decreaseRefCount(e,i);const r=s[t]?.cache,n=r?.get(i);if(r&&n){if(n.refCount--,0===n.refCount){r.delete(i);for(let e=0;e<s.length;e++)s[e]?.cache.delete(i);n.controller&&n.controller.abort()}return n.refCount}return 0}function k(e,t,i){const s=I.get(e);if(!s)return null==t?S.getBlock(e,i):null;if(null==t||null==s[t]){for(let e=0;e<s.length;e++){const t=s[e]?.cache.get(i);if(t)return t.refCount++,t.block}return S.getBlock(e,i)}const r=s[t]?.cache.get(i);if(r)return r.refCount++,r.block;for(let e=0;e<s.length;e++){if(e===t||!s[e])continue;const r=s[e]?.cache,n=r?.get(i);if(r&&n)return n.refCount++,r.set(i,n),n.block}return null}function A(e,t,i,s,r=null){const n=I.get(e);if(!n)return void(null==t&&S.putBlock(e,i,s,r));if(null==t||null==n[t])return void S.putBlock(e,i,s,r);const o={refCount:1,block:s,isResolved:!1,isRejected:!1,controller:r};s.then((()=>o.isResolved=!0)).catch((()=>o.isRejected=!0)),n[t]?.cache.set(i,o)}function F(e,t,i){const s=I.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):S.deleteBlock(e,i):null==t&&S.deleteBlock(e,i)}var P=i(16019),z=i(51244),C=i(28435),J=i(14636);let N=0,O=class extends o.A{constructor(){super(...arguments),this._tileFetchQueue=new c.QueueProcessor({concurrency:32,process:(e,t)=>this._fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:v.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,R.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),"Function"===this.datasetFormat&&this.primaryRasters?.rasters?.forEach((t=>t.rasterJobHandler=e))}get rasterId(){return this.url||"rasterId-"+N++}set url(e){this._set("url",(0,y.Jf)(e,l.A.getLogger(this)))}async open(e){return this._openPromise??=(0,R.Hh)().then((()=>this._open(e))),this._openPromise}async fetchTile(e,t,i,s={}){const r=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,i,r);return s={noClip:!0,...s},this.fetchPixels(n,r.size[0],r.size[1],s)}async identify(e,t={}){e=(0,h.PZ)(f.A,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:s}=t,{rasterInfo:r}=this,{hasMultidimensionalTranspose:n,multidimensionalInfo:o}=r;let{transposedVariableName:l}=t;const a=null!=o&&n&&(null!=s||(0,w.DY)(i));a&&!l&&(l=null!=i&&i.length>0?i[0].variableName??void 0:o.variables[0].name,t={...t,transposedVariableName:l}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=r,{datumTransformation:d}=t;let m=(0,R._I)(e,c,d);if(!u.intersects(m))return{location:m,value:null};if(null!=r.transform){const e=r.transform.inverseTransform(m);if(!r.nativeExtent.intersects(e))return{location:e,value:null};m=e}let y=0;const g=null!=l&&null!=o&&r.hasMultidimensionalTranspose;if("Function"===this.datasetFormat){const e=this.primaryRasters.rasters[0];if(g)return e.identify(m,t);const{pixelSize:s}=r,n=3,o=s.x*n/2,l=s.y*n/2,a=new p.A({xmin:m.x-o,xmax:m.x+o,ymin:m.y-l,ymax:m.y+l,spatialReference:c}),u={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId},{pixelBlock:h}=await e.fetchPixels(a,n,n,u),{pixelBlock:d}=await this.fetchPixels(a,n,n,u);if(null==h)return{location:m,value:null};const f=Math.floor(n*n*.5),y=!h.mask||h.mask[f]?h.pixels.map((e=>e[f])):null;let x;return null!=d&&(x=!d.mask||d.mask[f]?d.pixels.map((e=>e[f])):void 0),{location:m,value:y,processedValue:x,pyramidLevel:0}}if(!g)if(t.srcResolution)y=(0,R.t$)(t.srcResolution,r,this.ioConfig.sampling).pyramidLevel;else if(y=await this.computeBestPyramidLevelForLocation(e,t),null==y)return{location:m,value:null};const x=this.identifyPixelLocation(m,y,null,g);if(null===x)return{location:m,value:null};const{row:_,col:b,rowOffset:v,colOffset:I,blockWidth:S}=x,T=l??t.sliceId,F=M(this.rasterId,T),P=`${y}/${_}/${b}`;let z=k(F,null,P);null==z&&(z=this.fetchRawTile(y,_,b,t),A(F,null,P,z));const C=await z;if(!C?.pixels?.length)return{location:m,value:null};const J=v*S+I;return this._processIdentifyResult(C,{srcLocation:m,position:J,pyramidLevel:y,useTransposedTile:!!g,requestSomeSlices:a,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,R.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:r}=this;if(s.requestRawData&&r)return this._fetchPixels(e,t,i,s);const n=(0,R.FT)(e.spatialReference),o=(0,R.OM)(e);if(null==n||0===o||1===o&&this._isGlobalWrappableSource&&r)return this._fetchPixels(e,t,i,s);if(o>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,u=Math.round(n/(c-a)*t),h=u-Math.round((n/2-a)/(c-a)*t);let d=0;const f=[];for(let r=0;r<=o;r++){const m=new p.A({xmin:0===r?a:-n/2,xmax:r===o?c-n*r:n/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),y=0===r?u-h:r===o?t-d:u;d+=y,f.push(y);const g=s.disableWrapAround&&r>0?null:this._fetchPixels(m,y,i,s);l.push(g)}const m=(await Promise.all(l)).map((e=>e?.pixelBlock));let y=null;const g={width:t,height:i};return y=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:g,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:f},s)).pixelBlock:(0,C.z7)(m,g,{blockWidths:f}),{extent:e,srcExtent:(0,R._l)(e,this.rasterInfo.spatialReference,s.datumTransformation),pixelBlock:y}}async fetchRawPixels(e,t,i,s={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const r=await this._fetchRawTiles(e,t,i,s),{nativeExtent:n,nativePixelSize:o,storageInfo:l}=this.rasterInfo,a=2**e,c=o.x*a,u=o.y*a,h=new p.A({xmin:n.xmin+c*t.x,xmax:n.xmin+c*(t.x+i.width-1),ymin:n.ymax-u*(t.y+i.height-1),ymax:n.ymax-u*t.y,spatialReference:n.spatialReference});if(!r)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:d,mosaicSize:f}=r;if(1===d.length&&null!=d[0]&&d[0].width===i.width&&d[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:r.pixelBlocks[0]};const m=e>0?l.pyramidBlockWidth:l.blockWidth,y=e>0?l.pyramidBlockHeight:l.blockHeight,g={x:t.x%m,y:t.y%y};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:f,destDimension:i,clipOffset:g,clipSize:i,coefs:null,sampleSpacing:null,interpolation:s.interpolation,alignmentInfo:null,blockWidths:null},s)).pixelBlock:(0,C.z7)(d,f,{clipOffset:g,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,i,s){throw new n.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,R._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,z.D)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:s}=this.ioConfig,{range:n,query:o,headers:l}=t;i=i??t.retryCount??this.ioConfig.retryCount;const a=n?{Range:`bytes=${n.from}-${n.to}`}:null;try{return await(0,r.A)(e,{...t,query:{...o,...s},headers:{...l,...a}})}catch(s){if(i>0)return i--,this.request(e,t,i);throw s}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,w.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const r=s.lodAt(e);return this.getTileExtent({x:r.resolution,y:r.resolution},t,i,s.origin,s.spatialReference,s.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:r}=e;if(!e.tileInfo){const n=[],o=e.maximumPyramidLevel||0;let l=(s.x+s.y)/2,a=1/.0254*96*l;for(let e=0;e<=o&&(n.unshift(new _.A({level:o-e,resolution:l,scale:a})),e!==o);e++)if(r){const t=(r[e].x+r[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new f.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new v.A({origin:c,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:n}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,s){const{width:r,height:n,nativeExtent:o,pixelSize:l,spatialReference:a}=e,c=new f.A({x:o.xmin,y:o.ymax,spatialReference:a});null==s&&(s=Math.max(0,Math.round(Math.log(Math.max(r,n))/Math.LN2-8)));const u=this.computeBlockBoundary(o,512,512,{x:o.xmin,y:o.ymax},[l],s);e.storageInfo=new b.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:s,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,s,r,n=0,o=2){if(1===r.length&&n>0){r=[...r];let{x:e,y:t}=r[0];for(let i=0;i<n;i++)e*=o,t*=o,r.push({x:e,y:t})}const l=[],{x:a,y:c}=s;for(let s=0;s<r.length;s++){const{x:n,y:o}=r[s];l.push({minCol:Math.floor((e.xmin-a+.1*n)/t/n),maxCol:Math.floor((e.xmax-a-.1*n)/t/n),minRow:Math.floor((c-e.ymax+.1*o)/i/o),maxRow:Math.floor((c-e.ymin-.1*o)/i/o)})}return l}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:s}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const r=s**e;return{x:t.x*r,y:t.y*r}}identifyPixelLocation(e,t,i,s){const{spatialReference:r,nativeExtent:n,storageInfo:o}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=o,u=s&&null!=c?c.tileSize[0]:o.blockWidth,h=s&&null!=c?c.tileSize[1]:o.blockHeight,d=(0,R._I)(e,r,i);if(!n.intersects(d))return null;if(t<0||t>l)return null;const p=this.getPyramidPixelSize(t),{x:f,y:m}=p,y=(a.y-d.y)/m/h,g=(d.x-a.x)/f/u,x=Math.min(h-1,Math.floor((y-Math.floor(y))*h)),_=Math.min(u-1,Math.floor((g-Math.floor(g))*u));return{pyramidLevel:t,row:Math.floor(y),col:Math.floor(g),rowOffset:x,colOffset:_,blockWidth:u,srcLocation:d}}getTileExtent(e,t,i,s,r,n){const[o,l]=n,a=s.x+i*o*e.x,c=a+o*e.x,u=s.y-t*l*e.y,h=u-l*e.y;return new p.A({xmin:a,xmax:c,ymin:h,ymax:u,spatialReference:r})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];return!s||s.maxRow<t||s.maxCol<i||s.minRow>t||s.minCol>i}updateImageSpaceRasterInfo(e){const{pixelSize:t}=e,{width:i,height:s}=e,r=m.A.WebMercator;e.spatialReference=r,e.extent=e.nativeExtent=new p.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:r}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new f.A({x:1,y:1,spatialReference:r});const{extent:n,storageInfo:o}=e;if(o){o.origin=new f.A({x:n.xmin,y:n.ymax,spatialReference:r});const{pyramidResolutions:i,tileInfo:s}=o;if(i&&i.forEach((e=>{e.x/=t.x,e.y/=t.y})),s){s.origin=o.origin;const t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;s.lods.forEach(((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254}))}}}async _fetchPixels(e,t,i,s={}){let r=(0,R.OM)(e);if(r>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,i,s),{pyramidLevel:o,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:u,ul:h}=n;if(0===c||0===u)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:d}=this,p=d.transform,m="gcs-shift"===p?.type,y=null!=(0,R.FT)(e.spatialReference);!m&&y||(r=(0,R.OM)(n.srcExtent,m));const g=await this._fetchRawTiles(o,h,{width:c,height:u,wrapCount:r},s);if(!g)return{extent:e,srcExtent:a,pixelBlock:null};const x=d.storageInfo,_=o>0?x.pyramidBlockWidth:x.blockWidth,b=o>0?x.pyramidBlockHeight:x.blockHeight;let{x:v,y:w}=d.pixelSize;if(o>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=x;if(null!=e&&e[o-1])({x:v,y:w}=e[o-1]);else{const e=t**o;v*=e,w*=e}}const I=d.spatialReference,S=new f.A({x:v,y:w,spatialReference:I}),M=_===c&&b===u&&h.x%_==0&&h.y%b==0,T=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),k=!e.spatialReference.equals(I),A=I.isGeographic?1e-9:1e-4,{datumTransformation:F}=s;if(!k&&M&&1===g.pixelBlocks.length&&_===t&&b===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(l,T,A))return{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:g.pixelBlocks[0]};const P=y&&null!=(0,R.FT)(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,z=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");z&&!this.rasterJobHandler&&await(0,R.Hh)();const N=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:g.extent,pixelSize:T.toJSON(),datumTransformation:F,rasterTransform:p,hasWrapAround:r>0||P,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:z},s):(0,R.l0)({projectedExtent:e,srcBufferExtent:g.extent,pixelSize:T,datumTransformation:F,rasterTransform:p,hasWrapAround:r>0||P,isAdaptive:!1,includeGCSGrid:z});let O;const D=!s.requestRawData,B={rows:N.spacing[0],cols:N.spacing[1]},H=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(o,g.extent.xmin):void 0,{pixelBlocks:E,mosaicSize:Z,isPartiallyFilled:W}=g;let L=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:Z,destDimension:D?{width:t,height:i}:null,coefs:D?N.coefficients:null,sampleSpacing:D?B:null,projectDirections:z,gcsGrid:z?N.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:H,blockWidths:null},s);({pixelBlock:O,localNorthDirections:L}=e)}else{const e=(0,C.z7)(E,Z,{alignmentInfo:H});O=D?(0,C.$i)(e,{width:t,height:i},N.coefficients,B,s.interpolation):e,z&&N.gcsGrid&&(L=(0,C.QF)({width:t,height:i},N.gcsGrid),O=(0,J.Y2)(O,this.rasterInfo.dataType,L))}return s.requestRawData||z?{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:O,transformGrid:N,localNorthDirections:L,isPartiallyFilled:W}:{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:O}}async _fetchRawTiles(e,t,i,s){const{origin:r,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:o,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:u,height:h,wrapCount:d}=i;const f=this._getRasterTileAlignmentInfo(e,0);s.buffer&&(a-=s.buffer.cols,c-=s.buffer.rows,u+=2*s.buffer.cols,h+=2*s.buffer.rows);let m=0,y=0,g=0;d&&null!=f&&(({worldColumnCountFromOrigin:y,originColumnOffset:g,rightPadding:m}=f),y*f.blockWidth-m>=a+u&&(m=0));const x=Math.floor(a/o),_=Math.floor(c/l),b=Math.floor((a+u+m-1)/o),v=Math.floor((c+h+m-1)/l),w=n[e];if(!w)return null;const{minRow:R,minCol:I,maxCol:S,maxRow:M}=w;if(0===d&&(v<R||b<I||_>M||x>S))return null;const T=new Array;let k=!1;const A=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=_;t<=v;t++)for(let i=x;i<=b;i++){let r=i;if(!s.disableWrapAround&&d&&null!=f&&y<=i&&(r=i-y-g),t>=R&&r>=I&&M>=t&&S>=r){const i=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:r,options:s},{signal:s.signal});A?T.push(new Promise((e=>{i.then((t=>e(t))).catch((()=>{k=!0,e(null)}))}))):T.push(i)}else T.push(Promise.resolve(null))}if(0===T.length)return null;const F=await Promise.all(T),P={height:(v-_+1)*l,width:(b-x+1)*o},{spatialReference:z}=this.rasterInfo,C=this.getPyramidPixelSize(e),{x:J,y:N}=C;return{extent:new p.A({xmin:r.x+x*o*J,xmax:r.x+(b+1)*o*J,ymin:r.y-(v+1)*l*N,ymax:r.y-_*l*N,spatialReference:z}),pixelBlocks:F,mosaicSize:P,isPartiallyFilled:k}}_fetchRawTile(e,t,i,s){const r=this.rasterInfo.storageInfo.blockBoundary[e];if(!r)return Promise.resolve(null);const{minRow:n,minCol:o,maxCol:l,maxRow:c}=r;if(t<n||i<o||t>c||i>l)return Promise.resolve(null);const u=M(this.rasterId,s.sliceId),h=`${e}/${t}/${i}`;let d=k(u,s.registryId,h);if(null==d){const r=new AbortController;d=this.fetchRawTile(e,t,i,{...s,signal:r.signal}),A(u,s.registryId,h,d,r),d.catch((()=>F(u,s.registryId,h)))}return s.signal&&(0,a.u7)(s,(()=>{T(u,s.registryId,h)})),d}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;const s=e[0].length;if("vector-magdir"===i){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[r,n]=e,o=[],l=[];for(let e=0;e<s;e++){const[t,i]=(0,J.Lu)([r[e],n[e]]);o.push(t),l.push(i)}return[o,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,R.DO)(this.rasterInfo)),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,s={}){const r={datumTransformation:s.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};s.srcResolution&&(r.srcResolution=s.srcResolution,this._updateSourceDataInfo(e,r));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:o,srcHeight:l,pyramidLevel:a}=r,c=o/t,u=l/i,h=a<n&&c*u>=16,d=a===n&&this._requireTooManySrcTiles(o,l,t,i);if(h||d||0===o||0===l){const o=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=(0,R.Wo)(o,this.rasterInfo.spatialReference,e,r.datumTransformation);const d=!l||s.srcResolution&&l.x+l.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&d){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(n-a+3>=e){const t=2**e;l={x:s.srcResolution.x*t,y:s.srcResolution.y*t}}}l&&(r.srcResolution=l,this._updateSourceDataInfo(e,r))}return this._requireTooManySrcTiles(r.srcWidth,r.srcHeight,t,i)&&(r.srcWidth=0,r.srcHeight=0),r}_requireTooManySrcTiles(e,t,i,s){const{tileInfo:r}=this.rasterInfo.storageInfo,n=e/i,o=t/s;return Math.ceil(e/r.size[0])*Math.ceil(t/r.size[1])>=256*Math.max(1,(i+s)/1024)||n>8||o>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,s=i.spatialReference,{srcResolution:r,datumTransformation:n}=t,{pyramidLevel:o,pyramidResolution:l,excessiveReading:a}=(0,R.t$)(r,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||(0,R._l)(e,s,n);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{x:h,y:d}=i.storageInfo.origin,p=Math.floor((c.xmin-h)/l.x+.1),f=Math.floor((d-c.ymax)/l.y+.1),m=Math.floor((c.xmax-h)/l.x-.1),y=Math.floor((d-c.ymin)/l.y-.1),g=c.width<.1*l.x?0:m-p+1,x=c.height<.1*l.y?0:y-f+1;t.pyramidLevel=o,t.pyramidResolution=l,t.srcWidth=g,t.srcHeight=x,t.ul={x:p,y:f}}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:s,pyramidLevel:r,useTransposedTile:n}=t,o=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[s])return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!n){const t=e.pixels.map((e=>e[s])),n={location:i,value:t,pyramidLevel:r},o=this._computeMagDirValues(t.map((e=>[e])));return o?.length&&(n.magdirValue=o.map((e=>e[0]))),n}let a=e.pixels.map((e=>e.slice(s*o,s*o+o))),c=this._computeMagDirValues(a);const{requestSomeSlices:u,identifyOptions:h}=t;let d=(0,w.QW)(l,h.transposedVariableName);if(u){const e=(0,w.xx)(d,h.multidimensionalDefinition,h.timeExtent);a=a.map((t=>e.map((e=>t[e])))),c=c?.map((t=>e.map((e=>t[e])))),d=e.map((e=>d[e]))}const p=e.noDataValues||this.rasterInfo.noDataValue,f={pixels:a,pixelType:e.pixelType};let m;return null!=p&&((0,P.Sp)(f,p),m=f.mask),{location:i,value:null,dataSeries:d.map(((e,t)=>{const i={value:0===m?.[t]?null:a.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition.map((e=>new x.A({...e,isSlice:!0})))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i})),pyramidLevel:r}}};(0,s._)([(0,u.MZ)()],O.prototype,"_rasterTileAlignmentInfo",void 0),(0,s._)([(0,u.MZ)()],O.prototype,"_tileFetchQueue",void 0),(0,s._)([(0,u.MZ)({readOnly:!0})],O.prototype,"_isGlobalWrappableSource",null),(0,s._)([(0,u.MZ)({readOnly:!0})],O.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s._)([(0,u.MZ)()],O.prototype,"_openPromise",void 0),(0,s._)([(0,u.MZ)()],O.prototype,"rasterJobHandler",null),(0,s._)([(0,u.MZ)({readOnly:!0})],O.prototype,"rasterId",null),(0,s._)([(0,u.MZ)(g.OZ)],O.prototype,"url",null),(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],O.prototype,"datasetName",void 0),(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],O.prototype,"datasetFormat",void 0),(0,s._)([(0,u.MZ)()],O.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s._)([(0,u.MZ)()],O.prototype,"rasterInfo",void 0),(0,s._)([(0,u.MZ)()],O.prototype,"ioConfig",void 0),(0,s._)([(0,u.MZ)()],O.prototype,"sourceJSON",void 0),O=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.BaseRaster")],O);const D=O},84169:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(90237),r=i(49186),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),l=i(39829),a=i(4916),c=i(77359),u=i(28435),h=i(70834),d=i(22671);let p=class extends a.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,s={}){const{rasters:r,rasterIds:n}=this.primaryRasters;let o=!1;const{interpolation:l}=s,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&a&&(o=1===r.length&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:o});const h=r.map((r=>r.fetchPixels(e,t,i,s))),d=await Promise.all(h),p=d.map((e=>e.pixelBlock)),f=o||s.requestRawData?d.map((e=>e.srcTilePixelSize)):null;if(s.skipRasterFunction||p.every((e=>null==e)))return d[0];const m=d.find((e=>null!=e.pixelBlock))?.extent??e;let y=this.rasterJobHandler?await this.rasterJobHandler.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:n}):this.rasterFunction.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:n});const{transformGrid:g}=d[0];if(!o||null==y||null==g){const e=s.noClip?null:this.getClippingGeometry(m.spatialReference);return s.noClip||s.requestRawData||null==y||!e||(y=await(0,c.$Q)(y,m,e)),{...d[0],pixelBlock:y}}const x={rows:g.spacing[0],cols:g.spacing[1]};let _;_=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[y],srcMosaicSize:{width:y.width,height:y.height},destDimension:{width:t,height:i},coefs:g.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:l,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:(0,u.$i)(y,{width:t,height:i},g.coefficients,x,l);const b=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||s.requestRawData||null==_||null==b||(_=await(0,c.$Q)(_,e,b)),{extent:e,srcExtent:d[0].srcExtent,pixelBlock:_}}getClippingGeometry(e){const t=this._clippingGeometry.get("0");if(!e||!t)return t;const i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e);let s=this._clippingGeometry.get(i);return null!=s||(s=e.equals(t.spatialReference)?t:(0,h.uk)(t,e),this._clippingGeometry.set(i,s)),s}async _open(e){const{rasterFunction:t}=this;this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach((e=>e.rasterJobHandler=this.rasterJobHandler)));const{rasters:i,rasterIds:s}=this.primaryRasters,n=i.map((t=>t.rasterInfo?void 0:t.open(e)));await Promise.all(n);const o=i.map((({rasterInfo:e})=>e)),l=t.bind({rasterInfos:o,rasterIds:s});if(t.rawSourceRasterInfos=o,!l.success||0===o.length)throw new r.A("raster-function:open",`cannot bind the function: ${l.error??""}`);const a="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===a?.functionName&&(t.rasterInfo.attributeTable=d.A.fromJSON(a.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=o[0];this.hasUniqueSourceStorageInfo=1===o.length||o.slice(1).every((e=>function(e,t){const{storageInfo:i,pixelSize:s,spatialReference:r,extent:n}=e,{storageInfo:o,pixelSize:l,spatialReference:a,extent:c}=t;return s.x===l.x&&s.y===l.y&&r.equals(a)&&n.equals(c)&&i.blockHeight===o.blockHeight&&i.blockWidth===o.blockWidth&&i.maximumPyramidLevel===o.maximumPyramidLevel}(e,c))),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _updateClipGeometry(){const e=this.rasterFunction.getClippingGeometries()[0];let t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){const{extent:e}=this.rasterInfo,{difference:s,densify:r}=await Promise.all([i.e(9930),i.e(3209)]).then(i.bind(i,33209));let n=r(l.A.fromExtent(e),2*(e.width+e.height)/40);n=(0,h.uk)(n,t.spatialReference),t=s(n,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"datasetFormat",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"tileType",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"rasterFunction",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"primaryRasters",void 0),p=(0,s._)([(0,o.$)("esri.layers.support.rasterDatasets.FunctionRaster")],p);const f=p},50103:(e,t,i)=>{function s(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const r=[];if(t){const n=s(e,i);for(let e=0;e<n.length;e++)s(n[e],t).forEach((e=>r.push(e)));return r}const n=e.getElementsByTagNameNS("*",i);if(!n||0===n.length)return[];for(let e=0;e<n.length;e++)r.push(n[e]||n.item(e));return r}function r(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=s(e,i);return n.length>0?t?r(n[0],t):n[0]:null}function n(e,t=null){const i=t?r(e,t):e;let s;return i?(s=i.textContent||i.nodeValue,s?s.trim():null):null}function o(e,t){const i=s(e,t),r=[];let n;for(let e=0;e<i.length;e++)n=i[e].textContent||i[e].nodeValue,n&&(n=n.trim(),""!==n&&r.push(n));return r}function l(e,t=null){const i=n(e,t);return i?.split(" ").map((e=>Number(e)))??[]}function a(e,t){return o(e,t).map((e=>Number(e)))}function c(e,t){const i=n(e,t);return Number(i)}function u(e,t){const i=e?.nodeName?.toLowerCase(),s=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===s}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>o,IC:()=>s,Ui:()=>a,V6:()=>r,g7:()=>u,mX:()=>n,pN:()=>l,v7:()=>c,vv:()=>h})}}]);