@agrotools1/at-components 0.2.3 → 0.2.4

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 (894) hide show
  1. package/dist/AGraphicContainer-75e55bb8.js +109 -0
  2. package/dist/APIKeyMixin-688c6ac6.js +19 -0
  3. package/dist/Analysis-53f71911.js +31 -0
  4. package/dist/ArcGISCachedService-ea7559f0.js +47 -0
  5. package/dist/ArcGISService-a447176d.js +25 -0
  6. package/dist/AreaMeasurement2D-4d0db109.js +405 -0
  7. package/dist/AreaMeasurement3D-a2a10ea8.js +488 -0
  8. package/dist/AttachmentInfo-a2849bf0.js +34 -0
  9. package/dist/AttachmentQuery-e743e06f.js +18 -0
  10. package/dist/AttributeStore-6a3291d4.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-b3ff0eae.js +63 -0
  12. package/dist/BingMapsLayer-689d8e88.js +112 -0
  13. package/dist/Bitmap-e2b1f93c.js +128 -0
  14. package/dist/BitmapContainer-4dcc4a14.js +23 -0
  15. package/dist/BlendLayer-113fd3b8.js +13 -0
  16. package/dist/BoundsStore-3598604e.js +63 -0
  17. package/dist/BufferObject-59880a47.js +100 -0
  18. package/dist/BufferView-2cfe8c7d.js +683 -0
  19. package/dist/BuildingSceneLayer-a3e4a869.js +535 -0
  20. package/dist/Button-5e85250d.js +36 -0
  21. package/dist/CSVLayer-a68a64b8.js +208 -0
  22. package/dist/CSVSourceWorker-cf1fee99.js +367 -0
  23. package/dist/CardWithInsights/CardWithInsights.d.ts +2 -1
  24. package/dist/CatalogDynamicGroupLayerView2D-a4ae390f.js +66 -0
  25. package/dist/CatalogFootprintLayerView2D-145014a4.js +76 -0
  26. package/dist/CatalogLayer-48e7048b.js +262 -0
  27. package/dist/CatalogLayerView2D-8b4a4d47.js +52 -0
  28. package/dist/ClassBreaksDefinition-e2d8b3cc.js +18 -0
  29. package/dist/ColorMaterial.glsl-a7c70d21.js +64 -0
  30. package/dist/ColorSet-f4b34654.js +45 -0
  31. package/dist/ColorStop-1111f0fd.js +29 -0
  32. package/dist/Container-4a2d8bcd.js +521 -0
  33. package/dist/CustomParametersMixin-601866cc.js +12 -0
  34. package/dist/DefaultMaterial.glsl-9243ba6c.js +42 -0
  35. package/dist/DefaultMaterial_COLOR_GAMMA-bf0d97c7.js +653 -0
  36. package/dist/DefaultTheme-e96ad45b.js +130 -0
  37. package/dist/DeleteForwardEditsParameters-bd5164e3.js +18 -0
  38. package/dist/DimensionLayer-d51dcf5e.js +129 -0
  39. package/dist/DirectLineMeasurement3D-7b426a46.js +449 -0
  40. package/dist/DistanceMeasurement2D-1f05b105.js +303 -0
  41. package/dist/DoubleArray-4f276822.js +25 -0
  42. package/dist/Dropdown/Dropdown.core.d.ts +31 -0
  43. package/dist/Dropdown/Filter/test.mocks.d.ts +6 -0
  44. package/dist/Dropdown/List/Dropdown.List.d.ts +84 -0
  45. package/dist/Dropdown/List/test.mocks.d.ts +6 -0
  46. package/dist/EdgeProcessingWorker-317b2f9a.js +63 -0
  47. package/dist/EditBusLayer-55763028.js +107 -0
  48. package/dist/ElevationInfo-5be88917.js +56 -0
  49. package/dist/ElevationLayer-754634d4.js +129 -0
  50. package/dist/ElevationQuery-1e84df59.js +598 -0
  51. package/dist/ElevationSamplerWorker-1c01b3d8.js +62 -0
  52. package/dist/ExportImageParameters-e00a1031.js +66 -0
  53. package/dist/ExportStrategy-ba992e25.js +93 -0
  54. package/dist/ExportWMSImageParameters-395804ac.js +33 -0
  55. package/dist/External-77e767f4.js +110 -0
  56. package/dist/Faq/Faq.d.ts +1 -1
  57. package/dist/Faq/index.d.ts +1 -1
  58. package/dist/FeatureCollectionSnappingSource-d1435805.js +130 -0
  59. package/dist/FeatureCommandQueue-4db7f162.js +1244 -0
  60. package/dist/FeatureEffect-5b570804.js +39 -0
  61. package/dist/FeatureEffectLayer-171a9749.js +13 -0
  62. package/dist/FeatureFilter-db89ec09.js +27 -0
  63. package/dist/FeatureLayer-881827c7.js +693 -0
  64. package/dist/FeatureLayerBase-b410d8eb.js +148 -0
  65. package/dist/FeatureLayerSource-e5eba81e.js +444 -0
  66. package/dist/FeatureLayerView2D-107b4ed6.js +1967 -0
  67. package/dist/FeaturePipelineWorker-2b42d98d.js +3633 -0
  68. package/dist/FeatureReductionLayer-1f3f6a98.js +225 -0
  69. package/dist/FeatureReductionSelection-b0c4bcaf.js +22 -0
  70. package/dist/FeatureServiceSnappingSource-fde9a8da.js +481 -0
  71. package/dist/FeatureServiceSnappingSourceWorker-d4113c50.js +747 -0
  72. package/dist/FeatureSet-595ae550.js +188 -0
  73. package/dist/FeatureStore-87fbe804.js +131 -0
  74. package/dist/FeatureTemplate-c810cba6.js +12 -0
  75. package/dist/FeatureType-22de76b9.js +25 -0
  76. package/dist/FieldsIndex-390b005f.js +109 -0
  77. package/dist/FormTemplate-728de82d.js +350 -0
  78. package/dist/GeoJSONLayer-fbf5ee27.js +236 -0
  79. package/dist/GeoJSONSourceWorker-30cd4133.js +247 -0
  80. package/dist/GeoRSSLayer-2addf639.js +73 -0
  81. package/dist/GeoRSSLayerView2D-29c15edb.js +140 -0
  82. package/dist/GeometryUtils-80d3036a.js +403 -0
  83. package/dist/GraphicContainer-2b112072.js +26 -0
  84. package/dist/GraphicManipulator-84ac0573.js +1499 -0
  85. package/dist/GraphicsLayer-ee9f874e.js +38 -0
  86. package/dist/GraphicsLayerView2D-c5eda7d2.js +114 -0
  87. package/dist/GraphicsSnappingSource-3dd1e9b3.js +273 -0
  88. package/dist/GraphicsView2D-40686b59.js +620 -0
  89. package/dist/GroupLayer-fd168a3e.js +147 -0
  90. package/dist/GroupLayerView2D-f4078b54.js +98 -0
  91. package/dist/HUDMaterial.glsl-bea5cb7c.js +65 -0
  92. package/dist/HighlightCounter-b3b4b206.js +41 -0
  93. package/dist/HighlightGraphicContainer-c00c331b.js +18 -0
  94. package/dist/I3SBinaryReader-d3a26893.js +310 -0
  95. package/dist/I3SLayerDefinitions-2bea64c8.js +55 -0
  96. package/dist/I3SUtil-ab1a91f5.js +59 -0
  97. package/dist/IdentityManager-8e14d109.js +899 -0
  98. package/dist/ImageHistogramParameters-711f313f.js +905 -0
  99. package/dist/ImageryLayer-fbaf4d8c.js +1799 -0
  100. package/dist/ImageryLayerView2D-199eb1fd.js +352 -0
  101. package/dist/ImageryTileLayer-48671dc9.js +2157 -0
  102. package/dist/ImageryTileLayerView2D-8ac1ee64.js +1110 -0
  103. package/dist/Indices-2f9cf62d.js +67 -0
  104. package/dist/Input/Input.core.d.ts +4553 -3
  105. package/dist/Input/index.d.ts +4547 -3
  106. package/dist/IntegratedMesh3DTilesLayer-89d862a2.js +112 -0
  107. package/dist/IntegratedMeshLayer-53f792e4.js +141 -0
  108. package/dist/InteractiveAnalysisViewModel-d7dd665d.js +7397 -0
  109. package/dist/InterleavedLayout-ff67e161.js +163 -0
  110. package/dist/KMLLayer-7a4cfa2a.js +162 -0
  111. package/dist/KMLLayerView2D-d0874e8d.js +253 -0
  112. package/dist/KnowledgeGraphLayerView2D-70d956b2.js +43 -0
  113. package/dist/LRUCache-5bebd9a8.js +32 -0
  114. package/dist/LabelClass-63459c37.js +135 -0
  115. package/dist/LabelMetric-09a9cd38.js +400 -0
  116. package/dist/LaserlinePath.glsl-731dbba1.js +64 -0
  117. package/dist/Laserlines.glsl-26d42447.js +65 -0
  118. package/dist/LayerFloorInfo-5c67a822.js +15 -0
  119. package/dist/LayerView-405cecd2.js +206 -0
  120. package/dist/LercWorker-a7892aa0.js +157 -0
  121. package/dist/LineOfSightLayer-abad68f7.js +147 -0
  122. package/dist/LinkChartLayer-c36d2a81.js +1027 -0
  123. package/dist/Lyr3DWorker-8f4c6c50.js +82 -0
  124. package/dist/MagnifierPrograms-ddc85113.js +806 -0
  125. package/dist/MapImageLayer-04f4cdcb.js +169 -0
  126. package/dist/MapImageLayerView2D-712dd60f.js +146 -0
  127. package/dist/MapNotesLayer-83fcba8e.js +283 -0
  128. package/dist/MapNotesLayerView2D-f0ad0a82.js +161 -0
  129. package/dist/MapServiceLayerViewHelper-6c746a26.js +288 -0
  130. package/dist/MeasurementWidgetContent-fc0c1569.js +2642 -0
  131. package/dist/MediaLayer-05162eaf.js +523 -0
  132. package/dist/MediaLayerView2D-474c563b.js +332 -0
  133. package/dist/MemCache-8f96824a.js +227 -0
  134. package/dist/MemorySourceWorker-08562524.js +222 -0
  135. package/dist/Mesh-3208420e.js +980 -0
  136. package/dist/MeshLocalVertexSpace-59268d9e.js +19 -0
  137. package/dist/MultiOriginJSONSupport-365740bb.js +158 -0
  138. package/dist/OGCFeatureLayer-7201d1ee.js +211 -0
  139. package/dist/OGCFeatureLayerView2D-d242f130.js +82 -0
  140. package/dist/ObjectStack-bad354ab.js +21 -0
  141. package/dist/Octree-cbaefa65.js +495 -0
  142. package/dist/OpenStreetMapLayer-b3c8020b.js +30 -0
  143. package/dist/OperationalLayer-30f48d16.js +44 -0
  144. package/dist/OrderByInfo-9bd0a8fe.js +16 -0
  145. package/dist/OrderedLayer-2962d196.js +26 -0
  146. package/dist/OrientedImageryLayer-5d599e15.js +216 -0
  147. package/dist/OverlayCompositing.glsl-334c68d5.js +65 -0
  148. package/dist/OverrideHelper-7981ecc2.js +242 -0
  149. package/dist/PBFDecoderWorker-48f7e620.js +213 -0
  150. package/dist/PointCloudLayer-5b804571.js +197 -0
  151. package/dist/PointCloudUniqueValueRenderer-9ef1db42.js +115 -0
  152. package/dist/PointCloudWorker-9e88daea.js +212 -0
  153. package/dist/PooledRBush-afceba5f.js +272 -0
  154. package/dist/Popup-89e3fd56.js +3990 -0
  155. package/dist/PortalLayer-21d22eb9.js +126 -0
  156. package/dist/Program-09ee8c67.js +694 -0
  157. package/dist/ProgramTemplate-be811b23.js +35 -0
  158. package/dist/ProgressBar/ProgressBar.d.ts +13 -1
  159. package/dist/QueryEngine-810a7f24.js +896 -0
  160. package/dist/QueryTask-013cc810.js +119 -0
  161. package/dist/RasterSymbolizer-ae063ee7.js +3024 -0
  162. package/dist/RasterVFDisplayObject-fe2f7ea2.js +581 -0
  163. package/dist/RasterWorker-7efcbd4d.js +78 -0
  164. package/dist/RawBlockCache-5a644219.js +185 -0
  165. package/dist/RealisticTree.glsl-4e33ae57.js +42 -0
  166. package/dist/RefreshableLayer-e64dd0ee.js +80 -0
  167. package/dist/RefreshableLayerView-61f7dd9a.js +16 -0
  168. package/dist/Relationship-adcdce15.js +64 -0
  169. package/dist/RelationshipQuery-0c20b8ed.js +22 -0
  170. package/dist/RenderingContext-29b578ca.js +889 -0
  171. package/dist/RibbonLine.glsl-038f5cac.js +65 -0
  172. package/dist/RouteLayer-479e0ccc.js +786 -0
  173. package/dist/RouteLayerView2D-1a646f54.js +195 -0
  174. package/dist/SDFHelper-9abcbcca.js +140 -0
  175. package/dist/SSAO.glsl-5d41f99f.js +43 -0
  176. package/dist/SSAOBlur.glsl-7ebf8f5c.js +42 -0
  177. package/dist/ScaleRangeLayer-3bbd6ead.js +21 -0
  178. package/dist/SceneLayer-b19fa11e.js +542 -0
  179. package/dist/SceneLayerSnappingSource-f53ddd8a.js +218 -0
  180. package/dist/SceneLayerSnappingSourceWorker-80f48214.js +112 -0
  181. package/dist/SceneLayerWorker-bab8aeb0.js +164 -0
  182. package/dist/SceneService-0c4fac79.js +215 -0
  183. package/dist/Scheduler-9db9a8cf.js +373 -0
  184. package/dist/Search/Search.d.ts +99 -0
  185. package/dist/Search/index.d.ts +1 -0
  186. package/dist/Search/test.mocks.d.ts +3 -0
  187. package/dist/Search/utils.d.ts +3 -0
  188. package/dist/Select/Item/Item.d.ts +1 -1
  189. package/dist/Select/Multiple/Select.multiple.d.ts +3 -3
  190. package/dist/Select/Select.core.d.ts +1 -1
  191. package/dist/Select/index.d.ts +3 -3
  192. package/dist/ShadedColorMaterial.glsl-a2dd0bb3.js +64 -0
  193. package/dist/SnappingOperation-25ff52da.js +48 -0
  194. package/dist/SourceLayerData-ec301fa4.js +116 -0
  195. package/dist/SpatialFilter-351a1d5e.js +1701 -0
  196. package/dist/Stop-595501a7.js +281 -0
  197. package/dist/StreamLayer-d5ebd4d3.js +188 -0
  198. package/dist/StreamLayerView2D-8a39daaa.js +164 -0
  199. package/dist/StyleRepository-dd283243.js +2212 -0
  200. package/dist/SublayersOwner-0be88fd0.js +545 -0
  201. package/dist/SubtypeGroupLayer-8386c037.js +514 -0
  202. package/dist/SubtypeGroupLayerView2D-97b63aa1.js +84 -0
  203. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  204. package/dist/Tag/Tag.d.ts +52 -0
  205. package/dist/TechniqueInstance-87f77cd3.js +233 -0
  206. package/dist/TemporalLayer-7c15b8a6.js +23 -0
  207. package/dist/Texture-c1f5f21b.js +501 -0
  208. package/dist/TextureOnly.glsl-acae1d94.js +65 -0
  209. package/dist/Theme-72a69427.js +3426 -0
  210. package/dist/Tick-d7f9b999.js +723 -0
  211. package/dist/TileContainer-20f11bc5.js +31 -0
  212. package/dist/TileInfoTilemapCache-a50aaed0.js +38 -0
  213. package/dist/TileLayer-ce04649f.js +194 -0
  214. package/dist/TileLayerView2D-0f45ff75.js +187 -0
  215. package/dist/TilemapCache-95b53d5a.js +189 -0
  216. package/dist/TimeInfo-f17e0ff9.js +42 -0
  217. package/dist/TimeOnly-63922f1a.js +706 -0
  218. package/dist/Tooltip-a21a6650.js +138 -0
  219. package/dist/TopFeaturesQuery-9e4228e7.js +32 -0
  220. package/dist/TurboLine-aeb14d6e.js +565 -0
  221. package/dist/UniqueValueRenderer-7532473e.js +1039 -0
  222. package/dist/UnknownLayer-99d4832b.js +30 -0
  223. package/dist/UnknownTimeZone-4c0a5184.js +15 -0
  224. package/dist/UnsupportedLayer-f439265c.js +31 -0
  225. package/dist/UpdateTracking2D-a1164b3d.js +8566 -0
  226. package/dist/Upload/Upload.d.ts +91 -14
  227. package/dist/Upload/index.d.ts +1 -1
  228. package/dist/Util-26f81cc4.js +57 -0
  229. package/dist/VectorTileLayer-8b5289d2.js +544 -0
  230. package/dist/VectorTileLayerView2D-00d98337.js +2108 -0
  231. package/dist/Version-2556ea28.js +33 -0
  232. package/dist/VertexArrayObject-5595c535.js +73 -0
  233. package/dist/VertexColor.glsl-01eb58bb.js +2683 -0
  234. package/dist/VertexSnappingCandidate-c1e2992a.js +13 -0
  235. package/dist/VideoLayerView2D-e92c8bab.js +124 -0
  236. package/dist/VoxelLayer-e57c2b7b.js +631 -0
  237. package/dist/WFSLayer-486fff2e.js +221 -0
  238. package/dist/WFSSourceWorker-3d8ac573.js +157 -0
  239. package/dist/WGLContainer-1441483b.js +5426 -0
  240. package/dist/WMSLayer-07ea95cc.js +536 -0
  241. package/dist/WMSLayerView2D-8b67d5da.js +117 -0
  242. package/dist/WMTSLayer-b52fbe0c.js +531 -0
  243. package/dist/WMTSLayerView2D-8ca1d522.js +142 -0
  244. package/dist/WebTileLayer-dd24dee2.js +110 -0
  245. package/dist/WhereClause-2eefa48c.js +2766 -0
  246. package/dist/WorkerHandle-f6b5ac7b.js +47 -0
  247. package/dist/WorkerTileHandler-e060fab5.js +1539 -0
  248. package/dist/action-a2d13907.js +198 -0
  249. package/dist/action-group-af071314.js +145 -0
  250. package/dist/action-menu-c759068f.js +1759 -0
  251. package/dist/apng-b33ce902.js +392 -0
  252. package/dist/arcade-b05c8c22.js +229 -0
  253. package/dist/arcadeAsyncRuntime-9b4a7891.js +943 -0
  254. package/dist/arcadeUtils-41691d12.js +8741 -0
  255. package/dist/arcgis-knowledge-client-core-2217ce57.js +1218 -0
  256. package/dist/arcgis-knowledge-client-core-simd-ab44590a.js +1218 -0
  257. package/dist/arcgisLayers-0ea0be85.js +152 -0
  258. package/dist/associatedFeatureServiceUtils-09077513.js +92 -0
  259. package/dist/axisAngleDegrees-1c3d7520.js +49 -0
  260. package/dist/basis_transcoder-292f1aaf.js +1248 -0
  261. package/dist/calcite-action-ad0d1e23.js +22 -0
  262. package/dist/calcite-action-bar-1b2de6d0.js +303 -0
  263. package/dist/calcite-action-group-aacf8ec4.js +28 -0
  264. package/dist/calcite-button-125cbd95.js +228 -0
  265. package/dist/calcite-flow-c9a6e8fa.js +128 -0
  266. package/dist/calcite-flow-item-eb314bb8.js +499 -0
  267. package/dist/calcite-icon-07f22bc6.js +16 -0
  268. package/dist/calcite-input-167be799.js +24 -0
  269. package/dist/calcite-label-7de34a6b.js +79 -0
  270. package/dist/calcite-list-2087f9ca.js +2135 -0
  271. package/dist/calcite-list-item-3419fb5f.js +576 -0
  272. package/dist/calcite-list-item-group-3a6545e3.js +71 -0
  273. package/dist/calcite-loader-16bcfb95.js +14 -0
  274. package/dist/calcite-modal-f608731f.js +333 -0
  275. package/dist/calcite-notice-88ee1edf.js +181 -0
  276. package/dist/calcite-option-375585a2.js +94 -0
  277. package/dist/calcite-scrim-751cf767.js +18 -0
  278. package/dist/calcite-select-62db97da.js +231 -0
  279. package/dist/capabilities-359df394.js +50 -0
  280. package/dist/chartCommon-cceb2530.js +256 -0
  281. package/dist/chartUtilsAm5-08a29408.js +2954 -0
  282. package/dist/clientSideDefaults-b5450c9b.js +39 -0
  283. package/dist/colorRamps-314c4b5a.js +38 -0
  284. package/dist/colorUtils-6e9b620c.js +164 -0
  285. package/dist/commonProperties-3399f319.js +60 -0
  286. package/dist/computeTranslationToOriginAndRotation-0b0f32ad.js +60 -0
  287. package/dist/conditionalSlot-012fd5da.js +27 -0
  288. package/dist/createConnection-f1189f51.js +299 -0
  289. package/dist/dataUtils-950a0ae9.js +1421 -0
  290. package/dist/deduplicate-eabb5f9e.js +89 -0
  291. package/dist/defaults-e5c5ee75.js +31 -0
  292. package/dist/deleteForwardEdits-ea9258ea.js +13 -0
  293. package/dist/diffUtils-04a71a59.js +90 -0
  294. package/dist/drapedUtils-2515520d.js +75 -0
  295. package/dist/earcut-192842ab.js +292 -0
  296. package/dist/edgeProcessing-da003f69.js +252 -0
  297. package/dist/editingSupport-9f04ba1b.js +203 -0
  298. package/dist/editsZScale-97938687.js +37 -0
  299. package/dist/elevationInfoUtils-e1edd62e.js +126 -0
  300. package/dist/executeForIds-3b8a1698.js +14 -0
  301. package/dist/executeForTopCount-6c6cd2f2.js +17 -0
  302. package/dist/executeForTopExtents-86851593.js +17 -0
  303. package/dist/executeForTopIds-24bc9dea.js +17 -0
  304. package/dist/executeQueryJSON-cf7d748b.js +15 -0
  305. package/dist/executeQueryPBF-ad416846.js +152 -0
  306. package/dist/executeRelationshipQuery-9b6666bf.js +53 -0
  307. package/dist/executeTopFeaturesQuery-4ac72bd2.js +18 -0
  308. package/dist/featureConversionUtils-67a121da.js +479 -0
  309. package/dist/featureLayerUtils-a4002773.js +142 -0
  310. package/dist/featureLayerUtils-a7e985d2.js +250 -0
  311. package/dist/featureSetUtils-11fcb3c4.js +2530 -0
  312. package/dist/featuresetbase-47894167.js +707 -0
  313. package/dist/featuresetgeom-bff2aa07.js +99 -0
  314. package/dist/featuresetstats-14a3fe2b.js +81 -0
  315. package/dist/featuresetstring-de2b64db.js +95 -0
  316. package/dist/fetchService-b6d76f5e.js +33 -0
  317. package/dist/fieldProperties-a9fbe289.js +33 -0
  318. package/dist/floatRGBA-2bc6800c.js +20 -0
  319. package/dist/form-e210eee8.js +138 -0
  320. package/dist/geohashUtils-085312a3.js +85 -0
  321. package/dist/geojson-f0bc401a.js +208 -0
  322. package/dist/geomasync-3c3b5e8d.js +567 -0
  323. package/dist/geometryEngine-2772790a.js +192 -0
  324. package/dist/geometryEngineAsync-db2e5674.js +217 -0
  325. package/dist/geometryEngineBase-8b327072.js +18463 -0
  326. package/dist/geometryEngineJSON-95268e88.js +171 -0
  327. package/dist/geometryEngineJSON-fc48a48b.js +46 -0
  328. package/dist/geometryEngineWorker-2fbc65f7.js +11 -0
  329. package/dist/geometryServiceUtils-ed9cb722.js +28 -0
  330. package/dist/georeference-f6f67e9b.js +291 -0
  331. package/dist/gif-a4043534.js +323 -0
  332. package/dist/gltfexport-d028c5c9.js +705 -0
  333. package/dist/groupLayerUtils-22dde377.js +39 -0
  334. package/dist/heatmapUtils-8e578a0a.js +45 -0
  335. package/dist/highlightReasons-ab23926f.js +19 -0
  336. package/dist/hydrated-219f2b0c.js +40 -0
  337. package/dist/i3s-b5ed4851.js +809 -0
  338. package/dist/icon-8711ff33.js +127 -0
  339. package/dist/imageBitmapUtils-dc97b3de.js +23 -0
  340. package/dist/imageUtils-0a71062a.js +69 -0
  341. package/dist/imageUtils-a4c7c9bf.js +89 -0
  342. package/dist/imageryUtils-d21fd540.js +43 -0
  343. package/dist/index-f28919b2.js +43440 -0
  344. package/dist/index.d.ts +3 -0
  345. package/dist/index.js +15 -12
  346. package/dist/input-message-3df877b9.js +92 -0
  347. package/dist/input2-32e36924.js +575 -0
  348. package/dist/interactive-c1e1aeaf.js +80 -0
  349. package/dist/jsonContext-4622e179.js +15 -0
  350. package/dist/jsonUtils-9f58b7bb.js +476 -0
  351. package/dist/jsonUtils-d9bb6102.js +86 -0
  352. package/dist/jsonUtils-e40213c1.js +59 -0
  353. package/dist/kmlUtils-5f8f6cf6.js +112 -0
  354. package/dist/knowledgeGraphService-a34bf3b0.js +739 -0
  355. package/dist/knowledgegraph-68124c78.js +149 -0
  356. package/dist/labelUtils-3a1386e4.js +61 -0
  357. package/dist/labelingInfo-69c9f8f4.js +46 -0
  358. package/dist/layersCreator-5e6fe7f2.js +151 -0
  359. package/dist/layersLoader-f96735c7.js +197 -0
  360. package/dist/lazyLayerLoader-142515c4.js +10 -0
  361. package/dist/lclayout-639ec791.js +773 -0
  362. package/dist/lengthUtils-8796ccf3.js +5 -0
  363. package/dist/lerc-wasm-acb341bd.js +325 -0
  364. package/dist/libtess-a9e7192e.js +269 -0
  365. package/dist/libtess-asm-8de2fb72.js +3673 -0
  366. package/dist/lineSegment-2790f546.js +76 -0
  367. package/dist/loadGLTFMesh-33064e6d.js +181 -0
  368. package/dist/loadable-4558719f.js +24 -0
  369. package/dist/loader-4dbc522d.js +79 -0
  370. package/dist/lyr3DWorker-3365d66f.js +2108 -0
  371. package/dist/mapViewDeps-67ec1d27.js +3052 -0
  372. package/dist/mediaLayerUtils-612838fb.js +35 -0
  373. package/dist/meshFeatureSet-07b96756.js +126 -0
  374. package/dist/meshVertexSpaceUtils-673c2055.js +58 -0
  375. package/dist/multidimensionalUtils-79cc2536.js +290 -0
  376. package/dist/normalizeUtilsSync-9fd98ab4.js +181 -0
  377. package/dist/number-110986f5.js +128 -0
  378. package/dist/objectResourceUtils-1b8d1c03.js +1455 -0
  379. package/dist/observers-507c19a0.js +30 -0
  380. package/dist/ogcFeatureUtils-3c65f06a.js +206 -0
  381. package/dist/openCloseComponent-89dc4d35.js +37 -0
  382. package/dist/orientedBoundingBox-46d44acf.js +447 -0
  383. package/dist/parser-8f715684.js +488 -0
  384. package/dist/pbf-4ce99129.js +215 -0
  385. package/dist/pbfQueryUtils-23cca540.js +422 -0
  386. package/dist/pe-wasm-d186391a.js +887 -0
  387. package/dist/persistable-09062510.js +89 -0
  388. package/dist/perspectiveUtils-9da629d6.js +42 -0
  389. package/dist/pieChart-92709a5c.js +555 -0
  390. package/dist/plane-2b39f8eb.js +160 -0
  391. package/dist/popupUtils-dc099446.js +22 -0
  392. package/dist/popupUtils-e53c5c04.js +50 -0
  393. package/dist/portalItemUtils-39079445.js +57 -0
  394. package/dist/portalLayers-efcd5403.js +312 -0
  395. package/dist/portalUtils-44b1ac04.js +7 -0
  396. package/dist/programUtils-c22a40e2.js +59 -0
  397. package/dist/project-4759dc23.js +21 -0
  398. package/dist/projectPointToVector-1d9098bc.js +14 -0
  399. package/dist/projectVectorToVector-add01592.js +13 -0
  400. package/dist/quantityUtils-afe6e5b7.js +33 -0
  401. package/dist/quantizationUtils-51d3a038.js +68 -0
  402. package/dist/quat-22f56b72.js +104 -0
  403. package/dist/query-8cf3e12b.js +89 -0
  404. package/dist/queryAttachments-0a63ea2f.js +39 -0
  405. package/dist/queryEngineUtils-a1db57f0.js +21 -0
  406. package/dist/queryTopFeatures-b4fb05ad.js +50 -0
  407. package/dist/queryZScale-112cd8e3.js +12 -0
  408. package/dist/rasterProjectionHelper-3ae0fcfd.js +577 -0
  409. package/dist/rasterUtils-6868b6b6.js +122 -0
  410. package/dist/rasterizingUtils-922f43e7.js +46 -0
  411. package/dist/request-fd620c13.js +46 -0
  412. package/dist/requestImageUtils-f8f50ad7.js +8 -0
  413. package/dist/resourceExtension-f0327971.js +17 -0
  414. package/dist/resourceUtils-2e33090d.js +69 -0
  415. package/dist/resourceUtils-db0d7e83.js +42 -0
  416. package/dist/resourceUtils-ff5eafc3.js +62 -0
  417. package/dist/saveAPIKeyUtils-32bb955d.js +8 -0
  418. package/dist/saveUtils-d4ad8f94.js +24 -0
  419. package/dist/scaleUtils-a3ce8cc6.js +23 -0
  420. package/dist/scrim-7ef1cdf5.js +114 -0
  421. package/dist/serviceCapabilitiesUtils-cafdd4bc.js +64 -0
  422. package/dist/sourceUtils-1a30f8aa.js +71 -0
  423. package/dist/sphere-84d1e36b.js +199 -0
  424. package/dist/statsWorker-efb7a41b.js +37 -0
  425. package/dist/streamLayerUtils-4c5b417e.js +31 -0
  426. package/dist/style.css +1 -1
  427. package/dist/styleUtils-8f0e3848.js +75 -0
  428. package/dist/styleUtils-a61894cc.js +14 -0
  429. package/dist/sublayerUtils-aaa67481.js +37 -0
  430. package/dist/substitute-7b4a925f.js +52 -0
  431. package/dist/symbolColorUtils-45615b74.js +8 -0
  432. package/dist/symbolLayerUtils-6ee325f3.js +31 -0
  433. package/dist/symbologySnappingCandidates-a56c7bbb.js +221 -0
  434. package/dist/t9n-b5ab99e4.js +349 -0
  435. package/dist/testSVGPremultipliedAlpha-a89a8569.js +94 -0
  436. package/dist/timeSupport-76d5ec0e.js +410 -0
  437. package/dist/triangle-95e355d3.js +98 -0
  438. package/dist/unitConversionUtils-b0c2c156.js +17 -0
  439. package/dist/unitFormatUtils-b79fea5c.js +40 -0
  440. package/dist/uploadAssetErrors-7ef907ce.js +70 -0
  441. package/dist/uploadAssets-99a2ec95.js +330 -0
  442. package/dist/utils-0da4a164.js +419 -0
  443. package/dist/utils-0e163cdb.js +433 -0
  444. package/dist/utils-421c60f9.js +73 -0
  445. package/dist/utils-6e4fc34d.js +91 -0
  446. package/dist/utils-9612bce6.js +34 -0
  447. package/dist/utils-99bb2971.js +2746 -0
  448. package/dist/utils-d1f92cf8.js +79 -0
  449. package/dist/utils-e30b7de3.js +232 -0
  450. package/dist/utils3-41d8e55d.js +75 -0
  451. package/dist/vec3-ab2339d6.js +81 -0
  452. package/dist/vec42-1a7bd7a6.js +125 -0
  453. package/dist/versionUtils-b6c13869.js +161 -0
  454. package/dist/visualVariableUtils-1a38c540.js +267 -0
  455. package/dist/webStyleSymbolUtils-6f89a405.js +48 -0
  456. package/dist/webglDeps-dcb6738a.js +23 -0
  457. package/dist/wfsUtils-d679c9b9.js +343 -0
  458. package/dist/workerHelper-8fb7376f.js +11 -0
  459. package/dist/xyChart-b3c4e27e.js +3335 -0
  460. package/package.json +1 -1
  461. package/dist/AGraphicContainer-98a4c8a4.js +0 -109
  462. package/dist/APIKeyMixin-9511e0a5.js +0 -19
  463. package/dist/Analysis-4b1d1fb5.js +0 -31
  464. package/dist/ArcGISCachedService-93e2cb27.js +0 -47
  465. package/dist/ArcGISService-3f8d89c1.js +0 -25
  466. package/dist/AreaMeasurement2D-e0bb230c.js +0 -405
  467. package/dist/AreaMeasurement3D-a9959ecf.js +0 -488
  468. package/dist/AttachmentInfo-601c56e2.js +0 -34
  469. package/dist/AttachmentQuery-3504d550.js +0 -18
  470. package/dist/AttributeStore-b90878e3.js +0 -1707
  471. package/dist/BaseDynamicLayerView2D-b2faf028.js +0 -63
  472. package/dist/BingMapsLayer-5d79fe2b.js +0 -112
  473. package/dist/Bitmap-f775c851.js +0 -128
  474. package/dist/BitmapContainer-af5942b8.js +0 -23
  475. package/dist/BlendLayer-a792edf6.js +0 -13
  476. package/dist/BoundsStore-789624df.js +0 -63
  477. package/dist/BufferObject-cbd0168e.js +0 -100
  478. package/dist/BufferView-004ad517.js +0 -683
  479. package/dist/BuildingSceneLayer-25bc760b.js +0 -535
  480. package/dist/Button-70963624.js +0 -36
  481. package/dist/CSVLayer-fd3b6750.js +0 -208
  482. package/dist/CSVSourceWorker-eb24cd85.js +0 -367
  483. package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +0 -66
  484. package/dist/CatalogFootprintLayerView2D-6eb16597.js +0 -76
  485. package/dist/CatalogLayer-1cc632fe.js +0 -262
  486. package/dist/CatalogLayerView2D-d143aa34.js +0 -52
  487. package/dist/ClassBreaksDefinition-07ba0c64.js +0 -18
  488. package/dist/ColorMaterial.glsl-e7801766.js +0 -64
  489. package/dist/ColorSet-df5696b5.js +0 -45
  490. package/dist/ColorStop-7187f368.js +0 -29
  491. package/dist/Container-ac97765a.js +0 -521
  492. package/dist/CustomParametersMixin-b3432b3e.js +0 -12
  493. package/dist/DefaultMaterial.glsl-3cc4efe7.js +0 -42
  494. package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +0 -653
  495. package/dist/DefaultTheme-12dffc66.js +0 -130
  496. package/dist/DeleteForwardEditsParameters-ae76d898.js +0 -18
  497. package/dist/DimensionLayer-9eb47c76.js +0 -129
  498. package/dist/DirectLineMeasurement3D-e9903136.js +0 -449
  499. package/dist/DistanceMeasurement2D-a4853462.js +0 -303
  500. package/dist/DoubleArray-5076283e.js +0 -25
  501. package/dist/EdgeProcessingWorker-c1783ddd.js +0 -63
  502. package/dist/EditBusLayer-e812f4c9.js +0 -107
  503. package/dist/ElevationInfo-fad03d5e.js +0 -56
  504. package/dist/ElevationLayer-397792d5.js +0 -129
  505. package/dist/ElevationQuery-beceb62f.js +0 -598
  506. package/dist/ElevationSamplerWorker-0048a204.js +0 -62
  507. package/dist/ExportImageParameters-c6c4bc61.js +0 -66
  508. package/dist/ExportStrategy-908f5b8d.js +0 -93
  509. package/dist/ExportWMSImageParameters-34da6b46.js +0 -33
  510. package/dist/External-14daf0c1.js +0 -110
  511. package/dist/FeatureCollectionSnappingSource-f97a1829.js +0 -130
  512. package/dist/FeatureCommandQueue-d4817eac.js +0 -1244
  513. package/dist/FeatureEffect-08976bbd.js +0 -39
  514. package/dist/FeatureEffectLayer-05c258f4.js +0 -13
  515. package/dist/FeatureFilter-8c5e44b1.js +0 -27
  516. package/dist/FeatureLayer-d3659466.js +0 -693
  517. package/dist/FeatureLayerBase-9b63f732.js +0 -148
  518. package/dist/FeatureLayerSource-960f1c01.js +0 -444
  519. package/dist/FeatureLayerView2D-7503e1ed.js +0 -1967
  520. package/dist/FeaturePipelineWorker-d4301d2a.js +0 -3633
  521. package/dist/FeatureReductionLayer-e6cf73ac.js +0 -225
  522. package/dist/FeatureReductionSelection-d90249a7.js +0 -22
  523. package/dist/FeatureServiceSnappingSource-9e49ca72.js +0 -481
  524. package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +0 -747
  525. package/dist/FeatureSet-d79f0e48.js +0 -188
  526. package/dist/FeatureStore-eb4b87c0.js +0 -131
  527. package/dist/FeatureTemplate-edb1b782.js +0 -12
  528. package/dist/FeatureType-bba29adb.js +0 -25
  529. package/dist/FieldsIndex-75cca4d0.js +0 -109
  530. package/dist/FormTemplate-22911c47.js +0 -350
  531. package/dist/GeoJSONLayer-b33c96b8.js +0 -236
  532. package/dist/GeoJSONSourceWorker-b04ff552.js +0 -247
  533. package/dist/GeoRSSLayer-6e5fcd0e.js +0 -73
  534. package/dist/GeoRSSLayerView2D-21b6b12e.js +0 -140
  535. package/dist/GeometryUtils-fa897cbd.js +0 -403
  536. package/dist/GraphicContainer-1fd6bfce.js +0 -26
  537. package/dist/GraphicManipulator-f3b7dc9b.js +0 -1499
  538. package/dist/GraphicsLayer-e0686779.js +0 -38
  539. package/dist/GraphicsLayerView2D-a7eba2fe.js +0 -114
  540. package/dist/GraphicsSnappingSource-594f402a.js +0 -273
  541. package/dist/GraphicsView2D-347562b8.js +0 -620
  542. package/dist/GroupLayer-7ae0a916.js +0 -147
  543. package/dist/GroupLayerView2D-ffcde606.js +0 -98
  544. package/dist/HUDMaterial.glsl-b0a3e0ce.js +0 -65
  545. package/dist/HighlightCounter-e18f0179.js +0 -41
  546. package/dist/HighlightGraphicContainer-fd774cea.js +0 -18
  547. package/dist/I3SBinaryReader-190e99de.js +0 -310
  548. package/dist/I3SLayerDefinitions-6ddaca60.js +0 -55
  549. package/dist/I3SUtil-44b83dc0.js +0 -59
  550. package/dist/IdentityManager-fbe91c13.js +0 -899
  551. package/dist/ImageHistogramParameters-d64fd9c8.js +0 -905
  552. package/dist/ImageryLayer-67878a78.js +0 -1799
  553. package/dist/ImageryLayerView2D-ae45faba.js +0 -352
  554. package/dist/ImageryTileLayer-9dca8b93.js +0 -2157
  555. package/dist/ImageryTileLayerView2D-977f66aa.js +0 -1110
  556. package/dist/Indices-e6dc3b15.js +0 -67
  557. package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +0 -112
  558. package/dist/IntegratedMeshLayer-9162c0b5.js +0 -141
  559. package/dist/InteractiveAnalysisViewModel-b046fcb9.js +0 -7397
  560. package/dist/InterleavedLayout-32973c8a.js +0 -163
  561. package/dist/KMLLayer-80f81df7.js +0 -162
  562. package/dist/KMLLayerView2D-b6ba3b80.js +0 -253
  563. package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +0 -43
  564. package/dist/LRUCache-27e8c401.js +0 -32
  565. package/dist/LabelClass-d9a476d6.js +0 -135
  566. package/dist/LabelMetric-e2728bbf.js +0 -400
  567. package/dist/LaserlinePath.glsl-60d00e61.js +0 -64
  568. package/dist/Laserlines.glsl-499a6cbf.js +0 -65
  569. package/dist/LayerFloorInfo-d05cf9dd.js +0 -15
  570. package/dist/LayerView-036988a9.js +0 -206
  571. package/dist/LercWorker-b1b4bb47.js +0 -157
  572. package/dist/LineOfSightLayer-9a9a60b7.js +0 -147
  573. package/dist/LinkChartLayer-d61803bb.js +0 -1027
  574. package/dist/Lyr3DWorker-87be14e0.js +0 -82
  575. package/dist/MagnifierPrograms-da7a27ab.js +0 -806
  576. package/dist/MapImageLayer-f07adf1a.js +0 -169
  577. package/dist/MapImageLayerView2D-d1b140c3.js +0 -146
  578. package/dist/MapNotesLayer-c662d147.js +0 -283
  579. package/dist/MapNotesLayerView2D-bf9ac698.js +0 -161
  580. package/dist/MapServiceLayerViewHelper-fb724de9.js +0 -288
  581. package/dist/MeasurementWidgetContent-e4888ef2.js +0 -2642
  582. package/dist/MediaLayer-36d873a3.js +0 -523
  583. package/dist/MediaLayerView2D-e58b8ec0.js +0 -332
  584. package/dist/MemCache-a9232ec2.js +0 -227
  585. package/dist/MemorySourceWorker-20ff27d6.js +0 -222
  586. package/dist/Mesh-3839826a.js +0 -980
  587. package/dist/MeshLocalVertexSpace-00151564.js +0 -19
  588. package/dist/MultiOriginJSONSupport-bb258670.js +0 -158
  589. package/dist/OGCFeatureLayer-2a8b7ecc.js +0 -211
  590. package/dist/OGCFeatureLayerView2D-185f9649.js +0 -82
  591. package/dist/ObjectStack-10d91171.js +0 -21
  592. package/dist/Octree-78797046.js +0 -495
  593. package/dist/OpenStreetMapLayer-b0a17790.js +0 -30
  594. package/dist/OperationalLayer-55af27d6.js +0 -44
  595. package/dist/OrderByInfo-22e3c805.js +0 -16
  596. package/dist/OrderedLayer-1403a591.js +0 -26
  597. package/dist/OrientedImageryLayer-8ec8d7d1.js +0 -216
  598. package/dist/OverlayCompositing.glsl-ba3bd81d.js +0 -65
  599. package/dist/OverrideHelper-82325a2c.js +0 -242
  600. package/dist/PBFDecoderWorker-f6517afc.js +0 -213
  601. package/dist/PointCloudLayer-cff43a10.js +0 -197
  602. package/dist/PointCloudUniqueValueRenderer-f337a895.js +0 -115
  603. package/dist/PointCloudWorker-cdb28dc1.js +0 -212
  604. package/dist/PooledRBush-ee4e60af.js +0 -272
  605. package/dist/Popup-c7f55588.js +0 -3990
  606. package/dist/PortalLayer-07b3c53e.js +0 -126
  607. package/dist/Program-ba2f18b2.js +0 -694
  608. package/dist/ProgramTemplate-eee4f097.js +0 -35
  609. package/dist/QueryEngine-10c97624.js +0 -896
  610. package/dist/QueryTask-115430b6.js +0 -119
  611. package/dist/RasterSymbolizer-fbf433fe.js +0 -3024
  612. package/dist/RasterVFDisplayObject-20b0dd86.js +0 -581
  613. package/dist/RasterWorker-44c37e20.js +0 -78
  614. package/dist/RawBlockCache-25203dbd.js +0 -185
  615. package/dist/RealisticTree.glsl-bc07c4dc.js +0 -42
  616. package/dist/RefreshableLayer-9550b85a.js +0 -80
  617. package/dist/RefreshableLayerView-601f7038.js +0 -16
  618. package/dist/Relationship-c662830e.js +0 -64
  619. package/dist/RelationshipQuery-765f068e.js +0 -22
  620. package/dist/RenderingContext-3db74548.js +0 -889
  621. package/dist/RibbonLine.glsl-c6a715b7.js +0 -65
  622. package/dist/RouteLayer-3f5411f3.js +0 -786
  623. package/dist/RouteLayerView2D-a5fd4cbf.js +0 -195
  624. package/dist/SDFHelper-a34e90ee.js +0 -140
  625. package/dist/SSAO.glsl-5491a708.js +0 -43
  626. package/dist/SSAOBlur.glsl-f3068b8e.js +0 -42
  627. package/dist/ScaleRangeLayer-7ddf00b4.js +0 -21
  628. package/dist/SceneLayer-c594bfc3.js +0 -542
  629. package/dist/SceneLayerSnappingSource-a0504ac7.js +0 -218
  630. package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +0 -112
  631. package/dist/SceneLayerWorker-1865768e.js +0 -164
  632. package/dist/SceneService-fb9f0142.js +0 -215
  633. package/dist/Scheduler-eacc84bb.js +0 -373
  634. package/dist/ShadedColorMaterial.glsl-db97956b.js +0 -64
  635. package/dist/SnappingOperation-9622a00d.js +0 -48
  636. package/dist/SourceLayerData-7016f1a5.js +0 -116
  637. package/dist/SpatialFilter-d20d4f50.js +0 -1701
  638. package/dist/Stop-68022e32.js +0 -281
  639. package/dist/StreamLayer-7c837e3d.js +0 -188
  640. package/dist/StreamLayerView2D-586f5a6a.js +0 -164
  641. package/dist/StyleRepository-fba75e70.js +0 -2212
  642. package/dist/SublayersOwner-3dc574cd.js +0 -545
  643. package/dist/SubtypeGroupLayer-1f9c5398.js +0 -514
  644. package/dist/SubtypeGroupLayerView2D-0f108d9d.js +0 -84
  645. package/dist/TechniqueInstance-0481dbff.js +0 -233
  646. package/dist/TemporalLayer-8116b4a4.js +0 -23
  647. package/dist/Texture-22a8cca5.js +0 -501
  648. package/dist/TextureOnly.glsl-458f8148.js +0 -65
  649. package/dist/Theme-f05b8eb0.js +0 -3426
  650. package/dist/Tick-aef93b48.js +0 -723
  651. package/dist/TileContainer-0bf0ea1b.js +0 -31
  652. package/dist/TileInfoTilemapCache-d78858c0.js +0 -38
  653. package/dist/TileLayer-0edee064.js +0 -194
  654. package/dist/TileLayerView2D-78d5801b.js +0 -187
  655. package/dist/TilemapCache-79699d61.js +0 -189
  656. package/dist/TimeInfo-40c96ade.js +0 -42
  657. package/dist/TimeOnly-9ee66ca6.js +0 -706
  658. package/dist/Tooltip-e7498dc9.js +0 -138
  659. package/dist/TopFeaturesQuery-ad224e01.js +0 -32
  660. package/dist/TurboLine-6ab04aef.js +0 -565
  661. package/dist/UniqueValueRenderer-eaa5f8a6.js +0 -1039
  662. package/dist/UnknownLayer-e280ddd4.js +0 -30
  663. package/dist/UnknownTimeZone-220952b5.js +0 -15
  664. package/dist/UnsupportedLayer-447f7676.js +0 -31
  665. package/dist/UpdateTracking2D-e9adad8f.js +0 -8566
  666. package/dist/Util-002f5109.js +0 -57
  667. package/dist/VectorTileLayer-3210be81.js +0 -544
  668. package/dist/VectorTileLayerView2D-6a51e3b8.js +0 -2108
  669. package/dist/Version-3de8cbca.js +0 -33
  670. package/dist/VertexArrayObject-07998745.js +0 -73
  671. package/dist/VertexColor.glsl-e415cf02.js +0 -2683
  672. package/dist/VertexSnappingCandidate-b676241f.js +0 -13
  673. package/dist/VideoLayerView2D-f659dd0d.js +0 -124
  674. package/dist/VoxelLayer-003f82ff.js +0 -631
  675. package/dist/WFSLayer-3da6c5f7.js +0 -221
  676. package/dist/WFSSourceWorker-9a11693a.js +0 -157
  677. package/dist/WGLContainer-3d159b63.js +0 -5426
  678. package/dist/WMSLayer-fc0632f8.js +0 -536
  679. package/dist/WMSLayerView2D-54e80e1b.js +0 -117
  680. package/dist/WMTSLayer-9324b12b.js +0 -531
  681. package/dist/WMTSLayerView2D-3ef936db.js +0 -142
  682. package/dist/WebTileLayer-45c563ff.js +0 -110
  683. package/dist/WhereClause-7a28b740.js +0 -2766
  684. package/dist/WorkerHandle-0d54a6c7.js +0 -47
  685. package/dist/WorkerTileHandler-786c2b24.js +0 -1539
  686. package/dist/action-163397e3.js +0 -198
  687. package/dist/action-group-4859fb97.js +0 -145
  688. package/dist/action-menu-2d70b2fc.js +0 -1759
  689. package/dist/apng-9b71d52c.js +0 -392
  690. package/dist/arcade-fa309282.js +0 -229
  691. package/dist/arcadeAsyncRuntime-738498fd.js +0 -943
  692. package/dist/arcadeUtils-f71d80fa.js +0 -8741
  693. package/dist/arcgis-knowledge-client-core-6056bcea.js +0 -1218
  694. package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +0 -1218
  695. package/dist/arcgisLayers-b2b878bd.js +0 -152
  696. package/dist/associatedFeatureServiceUtils-df5b5187.js +0 -92
  697. package/dist/axisAngleDegrees-32643b7c.js +0 -49
  698. package/dist/basis_transcoder-3187cc92.js +0 -1248
  699. package/dist/calcite-action-bar-5a87c23c.js +0 -303
  700. package/dist/calcite-action-ee2ca847.js +0 -22
  701. package/dist/calcite-action-group-19aa86ee.js +0 -28
  702. package/dist/calcite-button-8e9175c0.js +0 -228
  703. package/dist/calcite-flow-57d26d2d.js +0 -128
  704. package/dist/calcite-flow-item-4a3e3fc0.js +0 -499
  705. package/dist/calcite-icon-d99e280a.js +0 -16
  706. package/dist/calcite-input-28b20785.js +0 -24
  707. package/dist/calcite-label-4f30e08d.js +0 -79
  708. package/dist/calcite-list-0cee7628.js +0 -2135
  709. package/dist/calcite-list-item-0a19efa8.js +0 -576
  710. package/dist/calcite-list-item-group-0706662f.js +0 -71
  711. package/dist/calcite-loader-865045b1.js +0 -14
  712. package/dist/calcite-modal-3e4da6fd.js +0 -333
  713. package/dist/calcite-notice-50b74ab7.js +0 -181
  714. package/dist/calcite-option-713c1d40.js +0 -94
  715. package/dist/calcite-scrim-809fbd0b.js +0 -18
  716. package/dist/calcite-select-28d8edfc.js +0 -231
  717. package/dist/capabilities-c8f838be.js +0 -50
  718. package/dist/chartCommon-13718cda.js +0 -256
  719. package/dist/chartUtilsAm5-6be145fb.js +0 -2954
  720. package/dist/clientSideDefaults-5c1f97c9.js +0 -39
  721. package/dist/colorRamps-8792655e.js +0 -38
  722. package/dist/colorUtils-54f4b662.js +0 -164
  723. package/dist/commonProperties-f9559903.js +0 -60
  724. package/dist/computeTranslationToOriginAndRotation-4876cb93.js +0 -60
  725. package/dist/conditionalSlot-87175989.js +0 -27
  726. package/dist/createConnection-f974a00a.js +0 -299
  727. package/dist/dataUtils-7c276b73.js +0 -1421
  728. package/dist/deduplicate-59fb9cac.js +0 -89
  729. package/dist/defaults-2bfa4a36.js +0 -31
  730. package/dist/deleteForwardEdits-f653b513.js +0 -13
  731. package/dist/diffUtils-e71a6152.js +0 -90
  732. package/dist/drapedUtils-b42fcbc6.js +0 -75
  733. package/dist/earcut-6fa1a128.js +0 -292
  734. package/dist/edgeProcessing-2ff1f201.js +0 -252
  735. package/dist/editingSupport-68545668.js +0 -203
  736. package/dist/editsZScale-c7cdd215.js +0 -37
  737. package/dist/elevationInfoUtils-5456a079.js +0 -126
  738. package/dist/executeForIds-4ab75c0d.js +0 -14
  739. package/dist/executeForTopCount-7e095ec1.js +0 -17
  740. package/dist/executeForTopExtents-19daf9d0.js +0 -17
  741. package/dist/executeForTopIds-1ba3a4af.js +0 -17
  742. package/dist/executeQueryJSON-46168866.js +0 -15
  743. package/dist/executeQueryPBF-d8623daf.js +0 -152
  744. package/dist/executeRelationshipQuery-011dfb45.js +0 -53
  745. package/dist/executeTopFeaturesQuery-02166801.js +0 -18
  746. package/dist/featureConversionUtils-650d7601.js +0 -479
  747. package/dist/featureLayerUtils-64e09283.js +0 -142
  748. package/dist/featureLayerUtils-b07f9c11.js +0 -250
  749. package/dist/featureSetUtils-9d37d6f8.js +0 -2530
  750. package/dist/featuresetbase-62aeb079.js +0 -707
  751. package/dist/featuresetgeom-51f9fc4e.js +0 -99
  752. package/dist/featuresetstats-4db32894.js +0 -81
  753. package/dist/featuresetstring-990c3287.js +0 -95
  754. package/dist/fetchService-5198dd4a.js +0 -33
  755. package/dist/fieldProperties-edfa24cb.js +0 -33
  756. package/dist/floatRGBA-516d7961.js +0 -20
  757. package/dist/form-99719d52.js +0 -138
  758. package/dist/geohashUtils-2bc76440.js +0 -85
  759. package/dist/geojson-603231df.js +0 -208
  760. package/dist/geomasync-e9063b4c.js +0 -567
  761. package/dist/geometryEngine-d3bb2fd6.js +0 -192
  762. package/dist/geometryEngineAsync-55aa6170.js +0 -217
  763. package/dist/geometryEngineBase-527e8b63.js +0 -18463
  764. package/dist/geometryEngineJSON-28087174.js +0 -46
  765. package/dist/geometryEngineJSON-d54949f9.js +0 -171
  766. package/dist/geometryEngineWorker-dc2c7127.js +0 -11
  767. package/dist/geometryServiceUtils-6a3e1e93.js +0 -28
  768. package/dist/georeference-ed8b2c30.js +0 -291
  769. package/dist/gif-204e82dd.js +0 -323
  770. package/dist/gltfexport-b2566542.js +0 -705
  771. package/dist/groupLayerUtils-ea9e6359.js +0 -39
  772. package/dist/heatmapUtils-56758920.js +0 -45
  773. package/dist/highlightReasons-de432106.js +0 -19
  774. package/dist/hydrated-0e1c7565.js +0 -40
  775. package/dist/i3s-bb0b5b67.js +0 -809
  776. package/dist/icon-c6e3bd23.js +0 -127
  777. package/dist/imageBitmapUtils-881d8c64.js +0 -23
  778. package/dist/imageUtils-57eeedc5.js +0 -69
  779. package/dist/imageUtils-ef69c578.js +0 -89
  780. package/dist/imageryUtils-23f51cb1.js +0 -43
  781. package/dist/index-01c737ed.js +0 -42563
  782. package/dist/input-message-673a9baa.js +0 -92
  783. package/dist/input2-bbf6454e.js +0 -575
  784. package/dist/interactive-aeb2cb9f.js +0 -80
  785. package/dist/jsonContext-2dc288b1.js +0 -15
  786. package/dist/jsonUtils-1abd4bfc.js +0 -59
  787. package/dist/jsonUtils-913fa1bd.js +0 -86
  788. package/dist/jsonUtils-f6a5e63b.js +0 -476
  789. package/dist/kmlUtils-7c2744fe.js +0 -112
  790. package/dist/knowledgeGraphService-6a349e04.js +0 -739
  791. package/dist/knowledgegraph-c91b0bb2.js +0 -149
  792. package/dist/labelUtils-a3634e8f.js +0 -61
  793. package/dist/labelingInfo-568c9210.js +0 -46
  794. package/dist/layersCreator-4a5366ea.js +0 -151
  795. package/dist/layersLoader-b87d4857.js +0 -197
  796. package/dist/lazyLayerLoader-8817000c.js +0 -10
  797. package/dist/lclayout-64c67b4e.js +0 -773
  798. package/dist/lengthUtils-695e744c.js +0 -5
  799. package/dist/lerc-wasm-13192bf3.js +0 -325
  800. package/dist/libtess-asm-4883179d.js +0 -3673
  801. package/dist/libtess-fc70d1ce.js +0 -269
  802. package/dist/lineSegment-3aa941f5.js +0 -76
  803. package/dist/loadGLTFMesh-db6645f5.js +0 -181
  804. package/dist/loadable-266f324b.js +0 -24
  805. package/dist/loader-d1ce1bc1.js +0 -79
  806. package/dist/lyr3DWorker-dd48e619.js +0 -2108
  807. package/dist/mapViewDeps-226d9da3.js +0 -3052
  808. package/dist/mediaLayerUtils-ae485c27.js +0 -35
  809. package/dist/meshFeatureSet-8a2ad011.js +0 -126
  810. package/dist/meshVertexSpaceUtils-6efe3dcc.js +0 -58
  811. package/dist/multidimensionalUtils-508a3f3f.js +0 -290
  812. package/dist/normalizeUtilsSync-1dae280b.js +0 -181
  813. package/dist/number-5aa3a81b.js +0 -128
  814. package/dist/objectResourceUtils-642ab03e.js +0 -1455
  815. package/dist/observers-f646a6a4.js +0 -30
  816. package/dist/ogcFeatureUtils-46ac1c44.js +0 -206
  817. package/dist/openCloseComponent-47eb52c6.js +0 -37
  818. package/dist/orientedBoundingBox-554ccdc6.js +0 -447
  819. package/dist/parser-0701286c.js +0 -488
  820. package/dist/pbf-5dd791f5.js +0 -215
  821. package/dist/pbfQueryUtils-a6ca7e23.js +0 -422
  822. package/dist/pe-wasm-6c16b121.js +0 -887
  823. package/dist/persistable-9eb0e8df.js +0 -89
  824. package/dist/perspectiveUtils-b194621d.js +0 -42
  825. package/dist/pieChart-b97433d0.js +0 -555
  826. package/dist/plane-3398eec1.js +0 -160
  827. package/dist/popupUtils-c444b896.js +0 -22
  828. package/dist/popupUtils-d871563b.js +0 -50
  829. package/dist/portalItemUtils-4c4caad0.js +0 -57
  830. package/dist/portalLayers-cb07742f.js +0 -312
  831. package/dist/portalUtils-effd590f.js +0 -7
  832. package/dist/programUtils-65af7b7c.js +0 -59
  833. package/dist/project-ee9c2947.js +0 -21
  834. package/dist/projectPointToVector-7dc831a9.js +0 -14
  835. package/dist/projectVectorToVector-5163db7a.js +0 -13
  836. package/dist/quantityUtils-5cd4cf90.js +0 -33
  837. package/dist/quantizationUtils-0a8f74c6.js +0 -68
  838. package/dist/quat-a508aed3.js +0 -104
  839. package/dist/query-b6e1fd14.js +0 -89
  840. package/dist/queryAttachments-7b39ebdc.js +0 -39
  841. package/dist/queryEngineUtils-cb8e309e.js +0 -21
  842. package/dist/queryTopFeatures-2e0e3941.js +0 -50
  843. package/dist/queryZScale-c5733d0a.js +0 -12
  844. package/dist/rasterProjectionHelper-213afa27.js +0 -577
  845. package/dist/rasterUtils-f2e44e8b.js +0 -122
  846. package/dist/rasterizingUtils-25cc0190.js +0 -46
  847. package/dist/request-e0c679b3.js +0 -46
  848. package/dist/requestImageUtils-37d79281.js +0 -8
  849. package/dist/resourceExtension-5f3f1c80.js +0 -17
  850. package/dist/resourceUtils-0d68cbc2.js +0 -69
  851. package/dist/resourceUtils-374db840.js +0 -62
  852. package/dist/resourceUtils-43ce192b.js +0 -42
  853. package/dist/saveAPIKeyUtils-1a3d4a8a.js +0 -8
  854. package/dist/saveUtils-43fdc547.js +0 -24
  855. package/dist/scaleUtils-bdf8b6cb.js +0 -23
  856. package/dist/scrim-44eb4dc0.js +0 -114
  857. package/dist/serviceCapabilitiesUtils-823612b8.js +0 -64
  858. package/dist/sourceUtils-01d115c6.js +0 -71
  859. package/dist/sphere-908cd9aa.js +0 -199
  860. package/dist/statsWorker-49f9befe.js +0 -37
  861. package/dist/streamLayerUtils-29324e05.js +0 -31
  862. package/dist/styleUtils-82e8da52.js +0 -75
  863. package/dist/styleUtils-8541d60d.js +0 -14
  864. package/dist/sublayerUtils-eaac2486.js +0 -37
  865. package/dist/substitute-1f578d70.js +0 -52
  866. package/dist/symbolColorUtils-18fd6b3d.js +0 -8
  867. package/dist/symbolLayerUtils-4c58b291.js +0 -31
  868. package/dist/symbologySnappingCandidates-14d94b6b.js +0 -221
  869. package/dist/t9n-c1c2b6c8.js +0 -349
  870. package/dist/testSVGPremultipliedAlpha-159dac90.js +0 -94
  871. package/dist/timeSupport-3f529cdb.js +0 -410
  872. package/dist/triangle-8a3a2ba8.js +0 -98
  873. package/dist/unitConversionUtils-f0ebaf75.js +0 -17
  874. package/dist/unitFormatUtils-555e2d94.js +0 -40
  875. package/dist/uploadAssetErrors-d1389781.js +0 -70
  876. package/dist/uploadAssets-5e85f09d.js +0 -330
  877. package/dist/utils-3a10b10c.js +0 -34
  878. package/dist/utils-505c54e9.js +0 -91
  879. package/dist/utils-5432e258.js +0 -433
  880. package/dist/utils-7a88ec6a.js +0 -419
  881. package/dist/utils-7fa9cdf9.js +0 -2746
  882. package/dist/utils-d252c575.js +0 -73
  883. package/dist/utils-f07e00b3.js +0 -232
  884. package/dist/utils-fda10b4b.js +0 -79
  885. package/dist/utils3-c34ab97c.js +0 -75
  886. package/dist/vec3-f79c600d.js +0 -81
  887. package/dist/vec42-36edeb73.js +0 -125
  888. package/dist/versionUtils-6935648b.js +0 -161
  889. package/dist/visualVariableUtils-c425461a.js +0 -267
  890. package/dist/webStyleSymbolUtils-4f42a29f.js +0 -48
  891. package/dist/webglDeps-5f18210d.js +0 -23
  892. package/dist/wfsUtils-6f7f1e3e.js +0 -343
  893. package/dist/workerHelper-9dc9a790.js +0 -11
  894. package/dist/xyChart-e5648fee.js +0 -3335
@@ -1,3024 +0,0 @@
1
- import { aR as $t, W as pe, gW as ur, gX as cr, h0 as hr, ap as $e, e as D, y as B, c as Oe, bx as De, c5 as fr, c2 as dr, a$ as pr, bz as Q, b3 as gt, bR as mr, bu as Vt, a6 as gr, ad as yt, s as Ct } from "./index-01c737ed.js";
2
- import { c as ut, u as ee, o as Se, i as yr, j as qe, k as Cr, n as bt, q as Re } from "./dataUtils-7c276b73.js";
3
- import { A as wt, z as _e, j as vt, y as br } from "./colorUtils-54f4b662.js";
4
- var Je, St, Tt, _t = { exports: {} };
5
- St = _t, Je = function() {
6
- function e() {
7
- this.pos = 0, this.bufferLength = 0, this.eof = !1, this.buffer = null;
8
- }
9
- return e.prototype = { ensureBuffer: function(t) {
10
- var r = this.buffer, o = r ? r.byteLength : 0;
11
- if (t < o)
12
- return r;
13
- for (var u = 512; u < t; )
14
- u <<= 1;
15
- for (var i = new Uint8Array(u), f = 0; f < o; ++f)
16
- i[f] = r[f];
17
- return this.buffer = i;
18
- }, getByte: function() {
19
- for (var t = this.pos; this.bufferLength <= t; ) {
20
- if (this.eof)
21
- return null;
22
- this.readBlock();
23
- }
24
- return this.buffer[this.pos++];
25
- }, getBytes: function(t) {
26
- var r = this.pos;
27
- if (t) {
28
- this.ensureBuffer(r + t);
29
- for (var o = r + t; !this.eof && this.bufferLength < o; )
30
- this.readBlock();
31
- var u = this.bufferLength;
32
- o > u && (o = u);
33
- } else {
34
- for (; !this.eof; )
35
- this.readBlock();
36
- o = this.bufferLength;
37
- }
38
- return this.pos = o, this.buffer.subarray(r, o);
39
- }, lookChar: function() {
40
- for (var t = this.pos; this.bufferLength <= t; ) {
41
- if (this.eof)
42
- return null;
43
- this.readBlock();
44
- }
45
- return String.fromCharCode(this.buffer[this.pos]);
46
- }, getChar: function() {
47
- for (var t = this.pos; this.bufferLength <= t; ) {
48
- if (this.eof)
49
- return null;
50
- this.readBlock();
51
- }
52
- return String.fromCharCode(this.buffer[this.pos++]);
53
- }, makeSubStream: function(t, r, o) {
54
- for (var u = t + r; this.bufferLength <= u && !this.eof; )
55
- this.readBlock();
56
- return new Stream(this.buffer, t, r, o);
57
- }, skip: function(t) {
58
- t || (t = 1), this.pos += t;
59
- }, reset: function() {
60
- this.pos = 0;
61
- } }, e;
62
- }(), (Tt = function() {
63
- if (!self || !self.Uint32Array)
64
- return null;
65
- var e = new Uint32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), t = new Uint32Array([3, 4, 5, 6, 7, 8, 9, 10, 65547, 65549, 65551, 65553, 131091, 131095, 131099, 131103, 196643, 196651, 196659, 196667, 262211, 262227, 262243, 262259, 327811, 327843, 327875, 327907, 258, 258, 258]), r = new Uint32Array([1, 2, 3, 4, 65541, 65543, 131081, 131085, 196625, 196633, 262177, 262193, 327745, 327777, 393345, 393409, 459009, 459137, 524801, 525057, 590849, 591361, 657409, 658433, 724993, 727041, 794625, 798721, 868353, 876545]), o = [new Uint32Array([459008, 524368, 524304, 524568, 459024, 524400, 524336, 590016, 459016, 524384, 524320, 589984, 524288, 524416, 524352, 590048, 459012, 524376, 524312, 589968, 459028, 524408, 524344, 590032, 459020, 524392, 524328, 59e4, 524296, 524424, 524360, 590064, 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590024, 459018, 524388, 524324, 589992, 524292, 524420, 524356, 590056, 459014, 524380, 524316, 589976, 459030, 524412, 524348, 590040, 459022, 524396, 524332, 590008, 524300, 524428, 524364, 590072, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590020, 459017, 524386, 524322, 589988, 524290, 524418, 524354, 590052, 459013, 524378, 524314, 589972, 459029, 524410, 524346, 590036, 459021, 524394, 524330, 590004, 524298, 524426, 524362, 590068, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590028, 459019, 524390, 524326, 589996, 524294, 524422, 524358, 590060, 459015, 524382, 524318, 589980, 459031, 524414, 524350, 590044, 459023, 524398, 524334, 590012, 524302, 524430, 524366, 590076, 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590018, 459016, 524385, 524321, 589986, 524289, 524417, 524353, 590050, 459012, 524377, 524313, 589970, 459028, 524409, 524345, 590034, 459020, 524393, 524329, 590002, 524297, 524425, 524361, 590066, 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590026, 459018, 524389, 524325, 589994, 524293, 524421, 524357, 590058, 459014, 524381, 524317, 589978, 459030, 524413, 524349, 590042, 459022, 524397, 524333, 590010, 524301, 524429, 524365, 590074, 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590022, 459017, 524387, 524323, 589990, 524291, 524419, 524355, 590054, 459013, 524379, 524315, 589974, 459029, 524411, 524347, 590038, 459021, 524395, 524331, 590006, 524299, 524427, 524363, 590070, 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590030, 459019, 524391, 524327, 589998, 524295, 524423, 524359, 590062, 459015, 524383, 524319, 589982, 459031, 524415, 524351, 590046, 459023, 524399, 524335, 590014, 524303, 524431, 524367, 590078, 459008, 524368, 524304, 524568, 459024, 524400, 524336, 590017, 459016, 524384, 524320, 589985, 524288, 524416, 524352, 590049, 459012, 524376, 524312, 589969, 459028, 524408, 524344, 590033, 459020, 524392, 524328, 590001, 524296, 524424, 524360, 590065, 459010, 524372, 524308, 524572, 459026, 524404, 524340, 590025, 459018, 524388, 524324, 589993, 524292, 524420, 524356, 590057, 459014, 524380, 524316, 589977, 459030, 524412, 524348, 590041, 459022, 524396, 524332, 590009, 524300, 524428, 524364, 590073, 459009, 524370, 524306, 524570, 459025, 524402, 524338, 590021, 459017, 524386, 524322, 589989, 524290, 524418, 524354, 590053, 459013, 524378, 524314, 589973, 459029, 524410, 524346, 590037, 459021, 524394, 524330, 590005, 524298, 524426, 524362, 590069, 459011, 524374, 524310, 524574, 459027, 524406, 524342, 590029, 459019, 524390, 524326, 589997, 524294, 524422, 524358, 590061, 459015, 524382, 524318, 589981, 459031, 524414, 524350, 590045, 459023, 524398, 524334, 590013, 524302, 524430, 524366, 590077, 459008, 524369, 524305, 524569, 459024, 524401, 524337, 590019, 459016, 524385, 524321, 589987, 524289, 524417, 524353, 590051, 459012, 524377, 524313, 589971, 459028, 524409, 524345, 590035, 459020, 524393, 524329, 590003, 524297, 524425, 524361, 590067, 459010, 524373, 524309, 524573, 459026, 524405, 524341, 590027, 459018, 524389, 524325, 589995, 524293, 524421, 524357, 590059, 459014, 524381, 524317, 589979, 459030, 524413, 524349, 590043, 459022, 524397, 524333, 590011, 524301, 524429, 524365, 590075, 459009, 524371, 524307, 524571, 459025, 524403, 524339, 590023, 459017, 524387, 524323, 589991, 524291, 524419, 524355, 590055, 459013, 524379, 524315, 589975, 459029, 524411, 524347, 590039, 459021, 524395, 524331, 590007, 524299, 524427, 524363, 590071, 459011, 524375, 524311, 524575, 459027, 524407, 524343, 590031, 459019, 524391, 524327, 589999, 524295, 524423, 524359, 590063, 459015, 524383, 524319, 589983, 459031, 524415, 524351, 590047, 459023, 524399, 524335, 590015, 524303, 524431, 524367, 590079]), 9], u = [new Uint32Array([327680, 327696, 327688, 327704, 327684, 327700, 327692, 327708, 327682, 327698, 327690, 327706, 327686, 327702, 327694, 0, 327681, 327697, 327689, 327705, 327685, 327701, 327693, 327709, 327683, 327699, 327691, 327707, 327687, 327703, 327695, 0]), 5];
66
- function i(n) {
67
- throw new Error(n);
68
- }
69
- function f(n) {
70
- var s = 0, l = n[s++], a = n[s++];
71
- l != -1 && a != -1 || i("Invalid header in flate stream"), (15 & l) != 8 && i("Unknown compression method in flate stream"), ((l << 8) + a) % 31 != 0 && i("Bad FCHECK in flate stream"), 32 & a && i("FDICT bit set in flate stream"), this.bytes = n, this.bytesPos = s, this.codeSize = 0, this.codeBuf = 0, Je.call(this);
72
- }
73
- return f.prototype = Object.create(Je.prototype), f.prototype.getBits = function(n) {
74
- for (var s, l = this.codeSize, a = this.codeBuf, c = this.bytes, d = this.bytesPos; l < n; )
75
- (s = c[d++]) === void 0 && i("Bad encoding in flate stream"), a |= s << l, l += 8;
76
- return s = a & (1 << n) - 1, this.codeBuf = a >> n, this.codeSize = l -= n, this.bytesPos = d, s;
77
- }, f.prototype.getCode = function(n) {
78
- for (var s = n[0], l = n[1], a = this.codeSize, c = this.codeBuf, d = this.bytes, C = this.bytesPos; a < l; ) {
79
- var y;
80
- (y = d[C++]) === void 0 && i("Bad encoding in flate stream"), c |= y << a, a += 8;
81
- }
82
- var b = s[c & (1 << l) - 1], S = b >> 16, h = 65535 & b;
83
- return (a == 0 || a < S || S == 0) && i("Bad encoding in flate stream"), this.codeBuf = c >> S, this.codeSize = a - S, this.bytesPos = C, h;
84
- }, f.prototype.generateHuffmanTable = function(n) {
85
- for (var s = n.length, l = 0, a = 0; a < s; ++a)
86
- n[a] > l && (l = n[a]);
87
- for (var c = 1 << l, d = new Uint32Array(c), C = 1, y = 0, b = 2; C <= l; ++C, y <<= 1, b <<= 1)
88
- for (var S = 0; S < s; ++S)
89
- if (n[S] == C) {
90
- var h = 0, p = y;
91
- for (a = 0; a < C; ++a)
92
- h = h << 1 | 1 & p, p >>= 1;
93
- for (a = h; a < c; a += b)
94
- d[a] = C << 16 | S;
95
- ++y;
96
- }
97
- return [d, l];
98
- }, f.prototype.readBlock = function() {
99
- function n(L, W, $, F, j) {
100
- for (var J = L.getBits($) + F; J-- > 0; )
101
- W[b++] = j;
102
- }
103
- var s = this.getBits(3);
104
- if (1 & s && (this.eof = !0), (s >>= 1) != 0) {
105
- var l, a;
106
- if (s == 1)
107
- l = o, a = u;
108
- else if (s == 2) {
109
- for (var c = this.getBits(5) + 257, d = this.getBits(5) + 1, C = this.getBits(4) + 4, y = Array(e.length), b = 0; b < C; )
110
- y[e[b++]] = this.getBits(3);
111
- for (var S = this.generateHuffmanTable(y), h = 0, p = (b = 0, c + d), m = new Array(p); b < p; ) {
112
- var g = this.getCode(S);
113
- g == 16 ? n(this, m, 2, 3, h) : g == 17 ? n(this, m, 3, 3, h = 0) : g == 18 ? n(this, m, 7, 11, h = 0) : m[b++] = h = g;
114
- }
115
- l = this.generateHuffmanTable(m.slice(0, c)), a = this.generateHuffmanTable(m.slice(c, p));
116
- } else
117
- i("Unknown block type in flate stream");
118
- for (var w = (M = this.buffer) ? M.length : 0, k = this.bufferLength; ; ) {
119
- var v = this.getCode(l);
120
- if (v < 256)
121
- k + 1 >= w && (w = (M = this.ensureBuffer(k + 1)).length), M[k++] = v;
122
- else {
123
- if (v == 256)
124
- return void (this.bufferLength = k);
125
- var I = (v = t[v -= 257]) >> 16;
126
- I > 0 && (I = this.getBits(I)), h = (65535 & v) + I, v = this.getCode(a), (I = (v = r[v]) >> 16) > 0 && (I = this.getBits(I));
127
- var T = (65535 & v) + I;
128
- k + h >= w && (w = (M = this.ensureBuffer(k + h)).length);
129
- for (var E = 0; E < h; ++E, ++k)
130
- M[k] = M[k - T];
131
- }
132
- }
133
- } else {
134
- var x, A = this.bytes, P = this.bytesPos;
135
- (x = A[P++]) === void 0 && i("Bad block header in flate stream");
136
- var O = x;
137
- (x = A[P++]) === void 0 && i("Bad block header in flate stream"), O |= x << 8, (x = A[P++]) === void 0 && i("Bad block header in flate stream");
138
- var R = x;
139
- (x = A[P++]) === void 0 && i("Bad block header in flate stream"), (R |= x << 8) != (65535 & ~O) && i("Bad uncompressed block length in flate stream"), this.codeBuf = 0, this.codeSize = 0;
140
- var N = this.bufferLength, M = this.ensureBuffer(N + O), _ = N + O;
141
- this.bufferLength = _;
142
- for (var G = N; G < _; ++G) {
143
- if ((x = A[P++]) === void 0) {
144
- this.eof = !0;
145
- break;
146
- }
147
- M[G] = x;
148
- }
149
- this.bytesPos = P;
150
- }
151
- }, f;
152
- }()) !== void 0 && (St.exports = Tt);
153
- const Ue = $t(_t.exports);
154
- let wr = class jt {
155
- constructor(t) {
156
- this._canvas = null, this._ctx = null, t && (this._canvas = t.canvas, this._ctx = t.ctx || t.canvas && t.canvas.getContext("2d"));
157
- }
158
- decode(t, r, o) {
159
- if (!t || t.byteLength < 10)
160
- throw new pe("imagecanvasdecoder: decode", "required a valid encoded data as input.");
161
- let { width: u = 0, height: i = 0, format: f } = r;
162
- const { applyJpegMask: n } = r;
163
- if (n && (!u || !i))
164
- throw new pe("imagecanvasdecoder: decode", "image width and height are needed to apply jpeg mask directly to canvas");
165
- return new Promise((s, l) => {
166
- let a = null;
167
- f === "jpg" && n && (a = jt._getMask(t, { width: u, height: i }));
168
- const c = new Blob([new Uint8Array(t)], { type: "image/" + f == "jpg" ? "jpeg" : f }), d = URL.createObjectURL(c), C = new Image();
169
- let y;
170
- C.src = d, C.onload = () => {
171
- if (URL.revokeObjectURL(d), ur(o))
172
- return void l(cr());
173
- u = C.width, i = C.height, this._canvas && this._ctx ? (this._canvas.width === u && this._canvas.height === i || (this._canvas.width = u, this._canvas.height = i), this._ctx.clearRect(0, 0, u, i)) : (this._canvas = document.createElement("canvas"), this._canvas.width = u, this._canvas.height = i, this._ctx = this._canvas.getContext("2d")), this._ctx.drawImage(C, 0, 0);
174
- const b = this._ctx.getImageData(0, 0, u, i);
175
- let S;
176
- if (y = b.data, r.renderOnCanvas) {
177
- if (a)
178
- for (S = 0; S < a.length; S++)
179
- a[S] ? y[4 * S + 3] = 255 : y[4 * S + 3] = 0;
180
- return this._ctx.putImageData(b, 0, 0), void s(null);
181
- }
182
- const h = u * i, p = new Uint8Array(h), m = new Uint8Array(h), g = new Uint8Array(h);
183
- if (a)
184
- for (S = 0; S < h; S++)
185
- p[S] = y[4 * S], m[S] = y[4 * S + 1], g[S] = y[4 * S + 2];
186
- else
187
- for (a = new Uint8Array(h), S = 0; S < h; S++)
188
- p[S] = y[4 * S], m[S] = y[4 * S + 1], g[S] = y[4 * S + 2], a[S] = y[4 * S + 3];
189
- s({ width: u, height: i, pixels: [p, m, g], mask: a, pixelType: "u8" });
190
- }, C.onerror = () => {
191
- URL.revokeObjectURL(d), l("cannot load image");
192
- };
193
- });
194
- }
195
- static _getMask(t, r) {
196
- let o = null;
197
- try {
198
- const u = new Uint8Array(t), i = Math.ceil(u.length / 2);
199
- let f = 0;
200
- const n = u.length - 2;
201
- for (f = i; f < n && (u[f] !== 255 || u[f + 1] !== 217); f++)
202
- ;
203
- if (f += 2, f < u.length - 1) {
204
- const s = new Ue(u.subarray(f)).getBytes();
205
- o = new Uint8Array(r.width * r.height);
206
- let l = 0;
207
- for (let a = 0; a < s.length; a++)
208
- for (let c = 7; c >= 0; c--)
209
- o[l++] = s[a] >> c & 1;
210
- }
211
- } catch {
212
- }
213
- return o;
214
- }
215
- };
216
- var kt, It, xt, zt = { exports: {} };
217
- kt = zt, It = function() {
218
- var e = function() {
219
- function t(r) {
220
- this.message = "JPEG error: " + r;
221
- }
222
- return t.prototype = new Error(), t.prototype.name = "JpegError", t.constructor = t, t;
223
- }();
224
- return function() {
225
- if (!self || !self.Uint8ClampedArray)
226
- return null;
227
- var t = new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]), r = 4017, o = 799, u = 3406, i = 2276, f = 1567, n = 3784, s = 5793, l = 2896;
228
- function a() {
229
- this.decodeTransform = null, this.colorTransform = -1;
230
- }
231
- function c(h, p) {
232
- for (var m, g, w = 0, k = [], v = 16; v > 0 && !h[v - 1]; )
233
- v--;
234
- k.push({ children: [], index: 0 });
235
- var I, T = k[0];
236
- for (m = 0; m < v; m++) {
237
- for (g = 0; g < h[m]; g++) {
238
- for ((T = k.pop()).children[T.index] = p[w]; T.index > 0; )
239
- T = k.pop();
240
- for (T.index++, k.push(T); k.length <= m; )
241
- k.push(I = { children: [], index: 0 }), T.children[T.index] = I.children, T = I;
242
- w++;
243
- }
244
- m + 1 < v && (k.push(I = { children: [], index: 0 }), T.children[T.index] = I.children, T = I);
245
- }
246
- return k[0].children;
247
- }
248
- function d(h, p, m) {
249
- return 64 * ((h.blocksPerLine + 1) * p + m);
250
- }
251
- function C(h, p, m, g, w, k, v, I, T) {
252
- var E = m.mcusPerLine, x = m.progressive, A = p, P = 0, O = 0;
253
- function R() {
254
- if (O > 0)
255
- return O--, P >> O & 1;
256
- if ((P = h[p++]) === 255) {
257
- var U = h[p++];
258
- if (U)
259
- throw new e("unexpected marker " + (P << 8 | U).toString(16));
260
- }
261
- return O = 7, P >>> 7;
262
- }
263
- function N(U) {
264
- for (var z = U; ; ) {
265
- if (typeof (z = z[R()]) == "number")
266
- return z;
267
- if (typeof z != "object")
268
- throw new e("invalid huffman sequence");
269
- }
270
- }
271
- function M(U) {
272
- for (var z = 0; U > 0; )
273
- z = z << 1 | R(), U--;
274
- return z;
275
- }
276
- function _(U) {
277
- if (U === 1)
278
- return R() === 1 ? 1 : -1;
279
- var z = M(U);
280
- return z >= 1 << U - 1 ? z : z + (-1 << U) + 1;
281
- }
282
- function G(U, z) {
283
- var H = N(U.huffmanTableDC), Y = H === 0 ? 0 : _(H);
284
- U.blockData[z] = U.pred += Y;
285
- for (var re = 1; re < 64; ) {
286
- var le = N(U.huffmanTableAC), X = 15 & le, ne = le >> 4;
287
- if (X !== 0) {
288
- var lr = t[re += ne];
289
- U.blockData[z + lr] = _(X), re++;
290
- } else {
291
- if (ne < 15)
292
- break;
293
- re += 16;
294
- }
295
- }
296
- }
297
- function L(U, z) {
298
- var H = N(U.huffmanTableDC), Y = H === 0 ? 0 : _(H) << T;
299
- U.blockData[z] = U.pred += Y;
300
- }
301
- function W(U, z) {
302
- U.blockData[z] |= R() << T;
303
- }
304
- var $ = 0;
305
- function F(U, z) {
306
- if ($ > 0)
307
- $--;
308
- else
309
- for (var H = k, Y = v; H <= Y; ) {
310
- var re = N(U.huffmanTableAC), le = 15 & re, X = re >> 4;
311
- if (le !== 0) {
312
- var ne = t[H += X];
313
- U.blockData[z + ne] = _(le) * (1 << T), H++;
314
- } else {
315
- if (X < 15) {
316
- $ = M(X) + (1 << X) - 1;
317
- break;
318
- }
319
- H += 16;
320
- }
321
- }
322
- }
323
- var j, J = 0;
324
- function oe(U, z) {
325
- for (var H, Y, re = k, le = v, X = 0; re <= le; ) {
326
- var ne = t[re];
327
- switch (J) {
328
- case 0:
329
- if (X = (Y = N(U.huffmanTableAC)) >> 4, (H = 15 & Y) == 0)
330
- X < 15 ? ($ = M(X) + (1 << X), J = 4) : (X = 16, J = 1);
331
- else {
332
- if (H !== 1)
333
- throw new e("invalid ACn encoding");
334
- j = _(H), J = X ? 2 : 3;
335
- }
336
- continue;
337
- case 1:
338
- case 2:
339
- U.blockData[z + ne] ? U.blockData[z + ne] += R() << T : --X == 0 && (J = J === 2 ? 3 : 0);
340
- break;
341
- case 3:
342
- U.blockData[z + ne] ? U.blockData[z + ne] += R() << T : (U.blockData[z + ne] = j << T, J = 0);
343
- break;
344
- case 4:
345
- U.blockData[z + ne] && (U.blockData[z + ne] += R() << T);
346
- }
347
- re++;
348
- }
349
- J === 4 && --$ == 0 && (J = 0);
350
- }
351
- function Te(U, z, H, Y, re) {
352
- var le = H % E;
353
- z(U, d(U, (H / E | 0) * U.v + Y, le * U.h + re));
354
- }
355
- function ke(U, z, H) {
356
- z(U, d(U, H / U.blocksPerLine | 0, H % U.blocksPerLine));
357
- }
358
- var ce, ie, he, me, q, Pe, ge = g.length;
359
- Pe = x ? k === 0 ? I === 0 ? L : W : I === 0 ? F : oe : G;
360
- var se, ye, Ge, Ne, fe = 0;
361
- for (ye = ge === 1 ? g[0].blocksPerLine * g[0].blocksPerColumn : E * m.mcusPerColumn; fe < ye; ) {
362
- var Be = w ? Math.min(ye - fe, w) : ye;
363
- for (ie = 0; ie < ge; ie++)
364
- g[ie].pred = 0;
365
- if ($ = 0, ge === 1)
366
- for (ce = g[0], q = 0; q < Be; q++)
367
- ke(ce, Pe, fe), fe++;
368
- else
369
- for (q = 0; q < Be; q++) {
370
- for (ie = 0; ie < ge; ie++)
371
- for (Ge = (ce = g[ie]).h, Ne = ce.v, he = 0; he < Ne; he++)
372
- for (me = 0; me < Ge; me++)
373
- Te(ce, Pe, fe, he, me);
374
- fe++;
375
- }
376
- O = 0, (se = S(h, p)) && se.invalid && (console.log("decodeScan - unexpected MCU data, next marker is: " + se.invalid), p = se.offset);
377
- var Ce = se && se.marker;
378
- if (!Ce || Ce <= 65280)
379
- throw new e("marker was not found");
380
- if (!(Ce >= 65488 && Ce <= 65495))
381
- break;
382
- p += 2;
383
- }
384
- return (se = S(h, p)) && se.invalid && (console.log("decodeScan - unexpected Scan data, next marker is: " + se.invalid), p = se.offset), p - A;
385
- }
386
- function y(h, p, m) {
387
- var g, w, k, v, I, T, E, x, A, P, O, R, N, M, _, G, L, W = h.quantizationTable, $ = h.blockData;
388
- if (!W)
389
- throw new e("missing required Quantization Table.");
390
- for (var F = 0; F < 64; F += 8)
391
- A = $[p + F], P = $[p + F + 1], O = $[p + F + 2], R = $[p + F + 3], N = $[p + F + 4], M = $[p + F + 5], _ = $[p + F + 6], G = $[p + F + 7], A *= W[F], P | O | R | N | M | _ | G ? (P *= W[F + 1], O *= W[F + 2], R *= W[F + 3], N *= W[F + 4], M *= W[F + 5], _ *= W[F + 6], G *= W[F + 7], w = (g = (g = s * A + 128 >> 8) + (w = s * N + 128 >> 8) + 1 >> 1) - w, L = (k = O) * n + (v = _) * f + 128 >> 8, k = k * f - v * n + 128 >> 8, E = (I = (I = l * (P - G) + 128 >> 8) + (E = M << 4) + 1 >> 1) - E, T = (x = (x = l * (P + G) + 128 >> 8) + (T = R << 4) + 1 >> 1) - T, v = (g = g + (v = L) + 1 >> 1) - v, k = (w = w + k + 1 >> 1) - k, L = I * i + x * u + 2048 >> 12, I = I * u - x * i + 2048 >> 12, x = L, L = T * o + E * r + 2048 >> 12, T = T * r - E * o + 2048 >> 12, E = L, m[F] = g + x, m[F + 7] = g - x, m[F + 1] = w + E, m[F + 6] = w - E, m[F + 2] = k + T, m[F + 5] = k - T, m[F + 3] = v + I, m[F + 4] = v - I) : (L = s * A + 512 >> 10, m[F] = L, m[F + 1] = L, m[F + 2] = L, m[F + 3] = L, m[F + 4] = L, m[F + 5] = L, m[F + 6] = L, m[F + 7] = L);
392
- for (var j = 0; j < 8; ++j)
393
- A = m[j], (P = m[j + 8]) | (O = m[j + 16]) | (R = m[j + 24]) | (N = m[j + 32]) | (M = m[j + 40]) | (_ = m[j + 48]) | (G = m[j + 56]) ? (w = (g = 4112 + ((g = s * A + 2048 >> 12) + (w = s * N + 2048 >> 12) + 1 >> 1)) - w, L = (k = O) * n + (v = _) * f + 2048 >> 12, k = k * f - v * n + 2048 >> 12, v = L, E = (I = (I = l * (P - G) + 2048 >> 12) + (E = M) + 1 >> 1) - E, T = (x = (x = l * (P + G) + 2048 >> 12) + (T = R) + 1 >> 1) - T, L = I * i + x * u + 2048 >> 12, I = I * u - x * i + 2048 >> 12, x = L, L = T * o + E * r + 2048 >> 12, T = T * r - E * o + 2048 >> 12, A = (A = (g = g + v + 1 >> 1) + x) < 16 ? 0 : A >= 4080 ? 255 : A >> 4, P = (P = (w = w + k + 1 >> 1) + (E = L)) < 16 ? 0 : P >= 4080 ? 255 : P >> 4, O = (O = (k = w - k) + T) < 16 ? 0 : O >= 4080 ? 255 : O >> 4, R = (R = (v = g - v) + I) < 16 ? 0 : R >= 4080 ? 255 : R >> 4, N = (N = v - I) < 16 ? 0 : N >= 4080 ? 255 : N >> 4, M = (M = k - T) < 16 ? 0 : M >= 4080 ? 255 : M >> 4, _ = (_ = w - E) < 16 ? 0 : _ >= 4080 ? 255 : _ >> 4, G = (G = g - x) < 16 ? 0 : G >= 4080 ? 255 : G >> 4, $[p + j] = A, $[p + j + 8] = P, $[p + j + 16] = O, $[p + j + 24] = R, $[p + j + 32] = N, $[p + j + 40] = M, $[p + j + 48] = _, $[p + j + 56] = G) : (L = (L = s * A + 8192 >> 14) < -2040 ? 0 : L >= 2024 ? 255 : L + 2056 >> 4, $[p + j] = L, $[p + j + 8] = L, $[p + j + 16] = L, $[p + j + 24] = L, $[p + j + 32] = L, $[p + j + 40] = L, $[p + j + 48] = L, $[p + j + 56] = L);
394
- }
395
- function b(h, p) {
396
- for (var m = p.blocksPerLine, g = p.blocksPerColumn, w = new Int16Array(64), k = 0; k < g; k++)
397
- for (var v = 0; v < m; v++)
398
- y(p, d(p, k, v), w);
399
- return p.blockData;
400
- }
401
- function S(h, p, m) {
402
- function g(T) {
403
- return h[T] << 8 | h[T + 1];
404
- }
405
- var w = h.length - 1, k = m < p ? m : p;
406
- if (p >= w)
407
- return null;
408
- var v = g(p);
409
- if (v >= 65472 && v <= 65534)
410
- return { invalid: null, marker: v, offset: p };
411
- for (var I = g(k); !(I >= 65472 && I <= 65534); ) {
412
- if (++k >= w)
413
- return null;
414
- I = g(k);
415
- }
416
- return { invalid: v.toString(16), marker: I, offset: k };
417
- }
418
- return a.prototype = { parse: function(h) {
419
- function p() {
420
- var U = h[v] << 8 | h[v + 1];
421
- return v += 2, U;
422
- }
423
- function m() {
424
- var U = p(), z = v + U - 2, H = S(h, z, v);
425
- H && H.invalid && (console.log("readDataBlock - incorrect length, next marker is: " + H.invalid), z = H.offset);
426
- var Y = h.subarray(v, z);
427
- return v += Y.length, Y;
428
- }
429
- function g(U) {
430
- for (var z = Math.ceil(U.samplesPerLine / 8 / U.maxH), H = Math.ceil(U.scanLines / 8 / U.maxV), Y = 0; Y < U.components.length; Y++) {
431
- q = U.components[Y];
432
- var re = Math.ceil(Math.ceil(U.samplesPerLine / 8) * q.h / U.maxH), le = Math.ceil(Math.ceil(U.scanLines / 8) * q.v / U.maxV), X = z * q.h, ne = H * q.v * 64 * (X + 1);
433
- q.blockData = new Int16Array(ne), q.blocksPerLine = re, q.blocksPerColumn = le;
434
- }
435
- U.mcusPerLine = z, U.mcusPerColumn = H;
436
- }
437
- var w, k, v = 0, I = null, T = null, E = [], x = [], A = [], P = p();
438
- if (P !== 65496)
439
- throw new e("SOI not found");
440
- for (P = p(); P !== 65497; ) {
441
- var O, R, N;
442
- switch (P) {
443
- case 65504:
444
- case 65505:
445
- case 65506:
446
- case 65507:
447
- case 65508:
448
- case 65509:
449
- case 65510:
450
- case 65511:
451
- case 65512:
452
- case 65513:
453
- case 65514:
454
- case 65515:
455
- case 65516:
456
- case 65517:
457
- case 65518:
458
- case 65519:
459
- case 65534:
460
- var M = m();
461
- P === 65504 && M[0] === 74 && M[1] === 70 && M[2] === 73 && M[3] === 70 && M[4] === 0 && (I = { version: { major: M[5], minor: M[6] }, densityUnits: M[7], xDensity: M[8] << 8 | M[9], yDensity: M[10] << 8 | M[11], thumbWidth: M[12], thumbHeight: M[13], thumbData: M.subarray(14, 14 + 3 * M[12] * M[13]) }), P === 65518 && M[0] === 65 && M[1] === 100 && M[2] === 111 && M[3] === 98 && M[4] === 101 && (T = { version: M[5] << 8 | M[6], flags0: M[7] << 8 | M[8], flags1: M[9] << 8 | M[10], transformCode: M[11] });
462
- break;
463
- case 65499:
464
- for (var _ = p() + v - 2; v < _; ) {
465
- var G = h[v++], L = new Uint16Array(64);
466
- if (G >> 4) {
467
- if (G >> 4 != 1)
468
- throw new e("DQT - invalid table spec");
469
- for (R = 0; R < 64; R++)
470
- L[t[R]] = p();
471
- } else
472
- for (R = 0; R < 64; R++)
473
- L[t[R]] = h[v++];
474
- E[15 & G] = L;
475
- }
476
- break;
477
- case 65472:
478
- case 65473:
479
- case 65474:
480
- if (w)
481
- throw new e("Only single frame JPEGs supported");
482
- p(), (w = {}).extended = P === 65473, w.progressive = P === 65474, w.precision = h[v++], w.scanLines = p(), w.samplesPerLine = p(), w.components = [], w.componentIds = {};
483
- var W, $ = h[v++], F = 0, j = 0;
484
- for (O = 0; O < $; O++) {
485
- W = h[v];
486
- var J = h[v + 1] >> 4, oe = 15 & h[v + 1];
487
- F < J && (F = J), j < oe && (j = oe);
488
- var Te = h[v + 2];
489
- N = w.components.push({ h: J, v: oe, quantizationId: Te, quantizationTable: null }), w.componentIds[W] = N - 1, v += 3;
490
- }
491
- w.maxH = F, w.maxV = j, g(w);
492
- break;
493
- case 65476:
494
- var ke = p();
495
- for (O = 2; O < ke; ) {
496
- var ce = h[v++], ie = new Uint8Array(16), he = 0;
497
- for (R = 0; R < 16; R++, v++)
498
- he += ie[R] = h[v];
499
- var me = new Uint8Array(he);
500
- for (R = 0; R < he; R++, v++)
501
- me[R] = h[v];
502
- O += 17 + he, (ce >> 4 ? x : A)[15 & ce] = c(ie, me);
503
- }
504
- break;
505
- case 65501:
506
- p(), k = p();
507
- break;
508
- case 65498:
509
- p();
510
- var q, Pe = h[v++], ge = [];
511
- for (O = 0; O < Pe; O++) {
512
- var se = w.componentIds[h[v++]];
513
- q = w.components[se];
514
- var ye = h[v++];
515
- q.huffmanTableDC = A[ye >> 4], q.huffmanTableAC = x[15 & ye], ge.push(q);
516
- }
517
- var Ge = h[v++], Ne = h[v++], fe = h[v++], Be = C(h, v, w, ge, k, Ge, Ne, fe >> 4, 15 & fe);
518
- v += Be;
519
- break;
520
- case 65535:
521
- h[v] !== 255 && v--;
522
- break;
523
- default:
524
- if (h[v - 3] === 255 && h[v - 2] >= 192 && h[v - 2] <= 254) {
525
- v -= 3;
526
- break;
527
- }
528
- throw new e("unknown marker " + P.toString(16));
529
- }
530
- P = p();
531
- }
532
- for (this.width = w.samplesPerLine, this.height = w.scanLines, this.jfif = I, this.eof = v, this.adobe = T, this.components = [], O = 0; O < w.components.length; O++) {
533
- var Ce = E[(q = w.components[O]).quantizationId];
534
- Ce && (q.quantizationTable = Ce), this.components.push({ output: b(w, q), scaleX: q.h / w.maxH, scaleY: q.v / w.maxV, blocksPerLine: q.blocksPerLine, blocksPerColumn: q.blocksPerColumn });
535
- }
536
- this.numComponents = this.components.length;
537
- }, _getLinearizedBlockData: function(h, p) {
538
- var m, g, w, k, v, I, T, E, x, A, P, O = this.width / h, R = this.height / p, N = 0, M = this.components.length, _ = h * p * M, G = new Uint8ClampedArray(_), L = new Uint32Array(h), W = 4294967288;
539
- for (T = 0; T < M; T++) {
540
- for (g = (m = this.components[T]).scaleX * O, w = m.scaleY * R, N = T, P = m.output, k = m.blocksPerLine + 1 << 3, v = 0; v < h; v++)
541
- E = 0 | v * g, L[v] = (E & W) << 3 | 7 & E;
542
- for (I = 0; I < p; I++)
543
- for (A = k * ((E = 0 | I * w) & W) | (7 & E) << 3, v = 0; v < h; v++)
544
- G[N] = P[A + L[v]], N += M;
545
- }
546
- var $ = this.decodeTransform;
547
- if ($)
548
- for (T = 0; T < _; )
549
- for (E = 0, x = 0; E < M; E++, T++, x += 2)
550
- G[T] = (G[T] * $[x] >> 8) + $[x + 1];
551
- return G;
552
- }, _isColorConversionNeeded: function() {
553
- return this.adobe ? !!this.adobe.transformCode : this.numComponents === 3 ? this.colorTransform !== 0 : this.colorTransform === 1;
554
- }, _convertYccToRgb: function(h) {
555
- for (var p, m, g, w = 0, k = h.length; w < k; w += 3)
556
- p = h[w], m = h[w + 1], g = h[w + 2], h[w] = p - 179.456 + 1.402 * g, h[w + 1] = p + 135.459 - 0.344 * m - 0.714 * g, h[w + 2] = p - 226.816 + 1.772 * m;
557
- return h;
558
- }, _convertYcckToRgb: function(h) {
559
- for (var p, m, g, w, k = 0, v = 0, I = h.length; v < I; v += 4)
560
- p = h[v], m = h[v + 1], g = h[v + 2], w = h[v + 3], h[k++] = m * (-660635669420364e-19 * m + 437130475926232e-18 * g - 54080610064599e-18 * p + 48449797120281e-17 * w - 0.154362151871126) - 122.67195406894 + g * (-957964378445773e-18 * g + 817076911346625e-18 * p - 0.00477271405408747 * w + 1.53380253221734) + p * (961250184130688e-18 * p - 0.00266257332283933 * w + 0.48357088451265) + w * (-336197177618394e-18 * w + 0.484791561490776), h[k++] = 107.268039397724 + m * (219927104525741e-19 * m - 640992018297945e-18 * g + 659397001245577e-18 * p + 426105652938837e-18 * w - 0.176491792462875) + g * (-778269941513683e-18 * g + 0.00130872261408275 * p + 770482631801132e-18 * w - 0.151051492775562) + p * (0.00126935368114843 * p - 0.00265090189010898 * w + 0.25802910206845) + w * (-318913117588328e-18 * w - 0.213742400323665), h[k++] = m * (-570115196973677e-18 * m - 263409051004589e-19 * g + 0.0020741088115012 * p - 0.00288260236853442 * w + 0.814272968359295) - 20.810012546947 + g * (-153496057440975e-19 * g - 132689043961446e-18 * p + 560833691242812e-18 * w - 0.195152027534049) + p * (0.00174418132927582 * p - 0.00255243321439347 * w + 0.116935020465145) + w * (-343531996510555e-18 * w + 0.24165260232407);
561
- return h;
562
- }, _convertYcckToCmyk: function(h) {
563
- for (var p, m, g, w = 0, k = h.length; w < k; w += 4)
564
- p = h[w], m = h[w + 1], g = h[w + 2], h[w] = 434.456 - p - 1.402 * g, h[w + 1] = 119.541 - p + 0.344 * m + 0.714 * g, h[w + 2] = 481.816 - p - 1.772 * m;
565
- return h;
566
- }, _convertCmykToRgb: function(h) {
567
- for (var p, m, g, w, k = 0, v = 1 / 255, I = 0, T = h.length; I < T; I += 4)
568
- p = h[I] * v, m = h[I + 1] * v, g = h[I + 2] * v, w = h[I + 3] * v, h[k++] = 255 + p * (-4.387332384609988 * p + 54.48615194189176 * m + 18.82290502165302 * g + 212.25662451639585 * w - 285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * g - 17.873870861415444 * w - 5.497006427196366) + g * (-2.5217340131683033 * g - 21.248923337353073 * w + 17.5119270841813) - w * (21.86122147463605 * w + 189.48180835922747), h[k++] = 255 + p * (8.841041422036149 * p + 60.118027045597366 * m + 6.871425592049007 * g + 31.159100130055922 * w - 79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * g + 131.35250912493976 * w - 190.9453302588951) + g * (4.444339102852739 * g + 9.8632861493405 * w - 24.86741582555878) - w * (20.737325471181034 * w + 187.80453709719578), h[k++] = 255 + p * (0.8842522430003296 * p + 8.078677503112928 * m + 30.89978309703729 * g - 0.23883238689178934 * w - 14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * g + 50.606957656360734 * w - 112.23884253719248) + g * (0.03296041114873217 * g + 115.60384449646641 * w - 193.58209356861505) - w * (22.33816807309886 * w + 180.12613974708367);
569
- return h;
570
- }, getData: function(h, p, m) {
571
- if (this.numComponents > 4)
572
- throw new e("Unsupported color mode");
573
- var g = this._getLinearizedBlockData(h, p);
574
- if (this.numComponents === 1 && m) {
575
- for (var w = g.length, k = new Uint8ClampedArray(3 * w), v = 0, I = 0; I < w; I++) {
576
- var T = g[I];
577
- k[v++] = T, k[v++] = T, k[v++] = T;
578
- }
579
- return k;
580
- }
581
- if (this.numComponents === 3 && this._isColorConversionNeeded())
582
- return this._convertYccToRgb(g);
583
- if (this.numComponents === 4) {
584
- if (this._isColorConversionNeeded())
585
- return m ? this._convertYcckToRgb(g) : this._convertYcckToCmyk(g);
586
- if (m)
587
- return this._convertCmykToRgb(g);
588
- }
589
- return g;
590
- } }, a;
591
- }();
592
- }, (xt = It()) !== void 0 && (kt.exports = xt);
593
- const Wt = $t(zt.exports);
594
- let vr = class {
595
- static decode(t, r = !1) {
596
- const o = new Uint8Array(t), u = new Wt();
597
- u.parse(o);
598
- const { width: i, height: f, numComponents: n, eof: s } = u, l = u.getData(i, f, !0), a = i * f;
599
- let c, d = null, C = 0, y = 0, b = 0;
600
- if (!r && s < o.length - 1)
601
- try {
602
- const S = new Ue(o.subarray(s)).getBytes();
603
- d = new Uint8Array(a);
604
- let h = 0;
605
- for (C = 0; C < S.length; C++)
606
- for (b = 7; b >= 0; b--)
607
- d[h++] = S[C] >> b & 1;
608
- } catch {
609
- }
610
- if (n === 1 && l.length === i * f) {
611
- const S = new Uint8Array(l.buffer);
612
- c = [S, S, S];
613
- } else {
614
- for (c = [], C = 0; C < 3; C++)
615
- c.push(new Uint8Array(a));
616
- for (b = 0, y = 0; y < a; y++)
617
- for (C = 0; C < 3; C++)
618
- c[C][y] = l[b++];
619
- }
620
- return { width: i, height: f, pixels: c, mask: d };
621
- }
622
- };
623
- const Ht = [{ pixelType: "S8", size: 1, ctor: Int8Array, range: [-128, 127] }, { pixelType: "U8", size: 1, ctor: Uint8Array, range: [0, 255] }, { pixelType: "S16", size: 2, ctor: Int16Array, range: [-32768, 32767] }, { pixelType: "U16", size: 2, ctor: Uint16Array, range: [0, 65536] }, { pixelType: "S32", size: 4, ctor: Int32Array, range: [-2147483648, 2147483647] }, { pixelType: "U32", size: 4, ctor: Uint32Array, range: [0, 4294967296] }, { pixelType: "F32", size: 4, ctor: Float32Array, range: [-34027999387901484e22, 34027999387901484e22] }, { pixelType: "F64", size: 8, ctor: Float64Array, range: [-17976931348623157e292, 17976931348623157e292] }];
624
- let Ye = null;
625
- function Kt() {
626
- return Ye || (Ye = import("./lerc-wasm-13192bf3.js").then((e) => e.l).then(({ default: e }) => e({ locateFile: (t) => hr(`esri/layers/support/rasterFormats/${t}`) })).then((e) => {
627
- Tr(e);
628
- }), Ye);
629
- }
630
- const je = { getBlobInfo: null, decode: null };
631
- function Sr(e) {
632
- return 16 + (e >> 3 << 3);
633
- }
634
- function de(e, t, r) {
635
- r.set(e.slice(t, t + r.length));
636
- }
637
- function Tr(e) {
638
- const { _malloc: t, _free: r, _lerc_getBlobInfo: o, _lerc_getDataRanges: u, _lerc_decode_4D: i, asm: f } = e;
639
- let n;
640
- const s = Object.values(f).find((a) => a && "buffer" in a && a.buffer === e.HEAPU8.buffer), l = (a) => {
641
- const c = a.map((b) => Sr(b)), d = c.reduce((b, S) => b + S), C = t(d);
642
- n = new Uint8Array(s.buffer);
643
- let y = c[0];
644
- c[0] = C;
645
- for (let b = 1; b < c.length; b++) {
646
- const S = c[b];
647
- c[b] = c[b - 1] + y, y = S;
648
- }
649
- return c;
650
- };
651
- je.getBlobInfo = (a) => {
652
- const C = new Uint8Array(48), y = new Uint8Array(8 * 3), [b, S, h] = l([a.length, C.length, y.length]);
653
- n.set(a, b), n.set(C, S), n.set(y, h);
654
- let p = o(b, a.length, S, h, 12, 3);
655
- if (p)
656
- throw r(b), new Error(`lerc-getBlobInfo: error code is ${p}`);
657
- n = new Uint8Array(s.buffer), de(n, S, C), de(n, h, y);
658
- const m = new Uint32Array(C.buffer), g = new Float64Array(y.buffer), [w, k, , v, I, T, E, x, A, P, O] = m, R = { version: w, depthCount: P, width: v, height: I, validPixelCount: E, bandCount: T, blobSize: x, maskCount: A, dataType: k, minValue: g[0], maxValue: g[1], maxZerror: g[2], statistics: [], bandCountWithNoData: O };
659
- if (O && P > 1)
660
- return r(b), R;
661
- if (P === 1 && T === 1)
662
- return r(b), R.statistics.push({ minValue: g[0], maxValue: g[1] }), R;
663
- const N = P * T * 8, M = new Uint8Array(N), _ = new Uint8Array(N);
664
- let G = b, L = 0, W = 0, $ = !1;
665
- if (n.byteLength < b + 2 * N ? (r(b), $ = !0, [G, L, W] = l([a.length, N, N]), n.set(a, G)) : [L, W] = l([N, N]), n.set(M, L), n.set(_, W), p = u(G, a.length, P, T, L, W), p)
666
- throw r(G), $ || r(L), new Error(`lerc-getDataRanges: error code is ${p}`);
667
- n = new Uint8Array(s.buffer), de(n, L, M), de(n, W, _);
668
- const F = new Float64Array(M.buffer), j = new Float64Array(_.buffer), J = R.statistics;
669
- for (let oe = 0; oe < T; oe++)
670
- if (P > 1) {
671
- const Te = F.slice(oe * P, (oe + 1) * P), ke = j.slice(oe * P, (oe + 1) * P), ce = Math.min.apply(null, Te), ie = Math.max.apply(null, ke);
672
- J.push({ minValue: ce, maxValue: ie, depthStats: { minValues: Te, maxValues: ke } });
673
- } else
674
- J.push({ minValue: F[oe], maxValue: j[oe] });
675
- return r(G), $ || r(L), R;
676
- }, je.decode = (a, c) => {
677
- const { maskCount: d, depthCount: C, bandCount: y, width: b, height: S, dataType: h, bandCountWithNoData: p } = c, m = Ht[h], g = b * S, w = new Uint8Array(g * y), k = g * C * y * m.size, v = new Uint8Array(k), I = new Uint8Array(y), T = new Uint8Array(8 * y), [E, x, A, P, O] = l([a.length, w.length, v.length, I.length, T.length]);
678
- n.set(a, E), n.set(w, x), n.set(v, A), n.set(I, P), n.set(T, O);
679
- const R = i(E, a.length, d, x, C, b, S, y, h, A, P, O);
680
- if (R)
681
- throw r(E), new Error(`lerc-decode: error code is ${R}`);
682
- n = new Uint8Array(s.buffer), de(n, A, v), de(n, x, w);
683
- let N = null;
684
- if (p) {
685
- de(n, P, I), de(n, O, T), N = [];
686
- const M = new Float64Array(T.buffer);
687
- for (let _ = 0; _ < I.length; _++)
688
- N.push(I[_] ? M[_] : null);
689
- }
690
- return r(E), { data: v, maskData: w, noDataValues: N };
691
- };
692
- }
693
- function kr(e, t, r, o, u) {
694
- if (r < 2)
695
- return e;
696
- const i = new o(t * r);
697
- if (u)
698
- for (let f = 0, n = 0; f < t; f++)
699
- for (let s = 0, l = f; s < r; s++, l += t)
700
- i[l] = e[n++];
701
- else
702
- for (let f = 0, n = 0; f < t; f++)
703
- for (let s = 0, l = f; s < r; s++, l += t)
704
- i[n++] = e[l];
705
- return i;
706
- }
707
- function qt(e, t = {}) {
708
- const r = t.inputOffset ?? 0, o = e instanceof Uint8Array ? e.subarray(r) : new Uint8Array(e, r), u = je.getBlobInfo(o), { data: i, maskData: f, noDataValues: n } = je.decode(o, u), { width: s, height: l, bandCount: a, depthCount: c, dataType: d, maskCount: C, statistics: y } = u, b = Ht[d], S = new b.ctor(i.buffer), h = [], p = [], m = s * l, g = m * c;
709
- for (let E = 0; E < a; E++) {
710
- const x = S.subarray(E * g, (E + 1) * g);
711
- if (t.returnInterleaved)
712
- h.push(x);
713
- else {
714
- const A = kr(x, m, c, b.ctor, !0);
715
- h.push(A);
716
- }
717
- p.push(f.subarray(E * g, (E + 1) * g));
718
- }
719
- const w = C === 0 ? null : C === 1 ? p[0] : new Uint8Array(m);
720
- if (C > 1) {
721
- w.set(p[0]);
722
- for (let E = 1; E < p.length; E++) {
723
- const x = p[E];
724
- for (let A = 0; A < m; A++)
725
- w[A] = w[A] & x[A];
726
- }
727
- }
728
- const { noDataValue: k } = t, v = k != null && b.range[0] <= k && b.range[1] >= k;
729
- if (C > 0 && v)
730
- for (let E = 0; E < a; E++) {
731
- const x = h[E], A = p[E] || w;
732
- for (let P = 0; P < m; P++)
733
- A[P] === 0 && (x[P] = k);
734
- }
735
- const I = C === a && a > 1 ? p : null, { pixelType: T } = b;
736
- return { width: s, height: l, bandCount: a, pixelType: T, depthCount: c, statistics: y, pixels: h, mask: w, bandMasks: I, noDataValues: n };
737
- }
738
- function Ir(e, t, r, o = !0) {
739
- if (t % 4 != 0 || r % 4 != 0) {
740
- const u = new ArrayBuffer(4 * Math.ceil(r / 4)), i = new Uint8Array(u), f = new Uint8Array(e, t, r);
741
- if (o)
742
- for (let n = 0; n < i.length; n += 4)
743
- i[n] = f[n + 3], i[n + 1] = f[n + 2], i[n + 2] = f[n + 1], i[n + 3] = f[n];
744
- else
745
- i.set(f);
746
- return new Uint32Array(i.buffer);
747
- }
748
- if (o) {
749
- const u = new Uint8Array(e, t, r), i = new Uint8Array(u.length);
750
- for (let f = 0; f < i.length; f += 4)
751
- i[f] = u[f + 3], i[f + 1] = u[f + 2], i[f + 2] = u[f + 1], i[f + 3] = u[f];
752
- return new Uint32Array(i.buffer);
753
- }
754
- return new Uint32Array(e, t, r / 4);
755
- }
756
- function At() {
757
- const e = [];
758
- for (let t = 0; t <= 257; t++)
759
- e[t] = [t];
760
- return e;
761
- }
762
- function Et(e, t) {
763
- for (let r = 0; r < t.length; r++)
764
- e.push(t[r]);
765
- }
766
- const Ie = /* @__PURE__ */ new Set();
767
- function ct(e, t, r, o = !0) {
768
- const u = Ir(e, t, r, o);
769
- let i = 9, f = At(), n = 32, s = f.length, l = [], a = 1, c = u[0], d = 0;
770
- const C = u.length, y = 8 * (4 * C - r), b = [];
771
- for (; c != null; ) {
772
- if (n >= i)
773
- n -= i, d = c >>> 32 - i, c <<= i;
774
- else {
775
- d = c >>> 32 - n, c = u[a++];
776
- const h = i - n;
777
- n = 32 - h, d = (d << h) + (c >>> n), c <<= h;
778
- }
779
- if (d === 257)
780
- break;
781
- if (d === 256) {
782
- i = 9, f = At(), s = f.length, l = [];
783
- continue;
784
- }
785
- const S = f[d];
786
- if (S == null) {
787
- if (d > f.length)
788
- throw new Error("data integrity issue: code does not exist on code page");
789
- l.push(l[0]), f[s++] = l.slice(), Et(b, l);
790
- } else
791
- Et(b, S), l.push(S[0]), l.length > 1 && (f[s++] = l.slice()), l = S.slice();
792
- if (Ie.has(s) && i++, n === 0 && (c = u[a++], n = 32), a > C || a === C && n <= y)
793
- break;
794
- }
795
- return new Uint8Array(b);
796
- }
797
- Ie.add(511), Ie.add(1023), Ie.add(2047), Ie.add(4095), Ie.add(8191);
798
- const Pt = (e, t) => {
799
- const r = t.width * t.height, o = t.pixelType;
800
- return Math.floor(e.byteLength / (r * Jt(o)));
801
- }, Jt = (e) => {
802
- let t = 1;
803
- switch (e) {
804
- case Uint8Array:
805
- case Int8Array:
806
- t = 1;
807
- break;
808
- case Uint16Array:
809
- case Int16Array:
810
- t = 2;
811
- break;
812
- case Uint32Array:
813
- case Int32Array:
814
- case Float32Array:
815
- t = 4;
816
- break;
817
- case Float64Array:
818
- t = 8;
819
- }
820
- return t;
821
- }, xr = (e, t) => {
822
- if (8 * e.byteLength < t)
823
- return null;
824
- const r = new Uint8Array(e, 0, Math.ceil(t / 8)), o = new Uint8Array(t);
825
- let u = 0, i = 0, f = 0, n = 0;
826
- for (f = 0; f < r.length - 1; f++)
827
- for (i = r[f], n = 7; n >= 0; n--)
828
- o[u++] = i >> n & 1;
829
- for (n = 7; u < t - 1; )
830
- i = r[r.length - 1], o[u++] = i >> n & 1, n--;
831
- return o;
832
- };
833
- let Ar = class {
834
- static decode(t, r) {
835
- const o = r.pixelType, u = [], i = r.width * r.height, f = Pt(t, r), { bandIds: n, format: s } = r, l = (n == null ? void 0 : n.length) || Pt(t, r), a = t.byteLength - t.byteLength % (i * Jt(o)), c = new o(t, 0, i * f);
836
- let d, C, y, b, S = null;
837
- if (s === "bip")
838
- for (d = 0; d < l; d++) {
839
- for (y = new o(i), b = n ? n[d] : d, C = 0; C < i; C++)
840
- y[C] = c[C * f + b];
841
- u.push(y);
842
- }
843
- else if (s === "bsq")
844
- for (d = 0; d < l; d++)
845
- b = n ? n[d] : d, u.push(c.subarray(b * i, (b + 1) * i));
846
- return a < t.byteLength - 1 && (S = xr(t.slice(a), i)), { pixels: u, mask: S };
847
- }
848
- };
849
- function Er(e, t) {
850
- let r = 0, o = "", u = 0, i = 0;
851
- const f = e.length;
852
- for (; r < f; )
853
- i = e[r++], u = i >> 4, u < 8 ? u = 1 : u === 15 ? (u = 4, i = (7 & i) << 18 | (63 & e[r++]) << 12 | (63 & e[r++]) << 6 | 63 & e[r++]) : u === 14 ? (u = 3, i = (15 & i) << 12 | (63 & e[r++]) << 6 | 63 & e[r++]) : (u = 2, i = (31 & i) << 6 | 63 & e[r++]), (i !== 0 || t) && (o += String.fromCharCode(i));
854
- return o;
855
- }
856
- const ht = (() => {
857
- const e = [];
858
- return e[254] = "NEWSUBFILETYPE", e[255] = "SUBFILETYPE", e[256] = "IMAGEWIDTH", e[257] = "IMAGELENGTH", e[258] = "BITSPERSAMPLE", e[259] = "COMPRESSION", e[262] = "PHOTOMETRICINTERPRETATION", e[263] = "THRESHHOLDING", e[264] = "CELLWIDTH", e[265] = "CELLLENGTH", e[266] = "FILLORDER", e[269] = "DOCUMENTNAME", e[270] = "IMAGEDESCRIPTION", e[271] = "MAKE", e[272] = "MODEL", e[273] = "STRIPOFFSETS", e[274] = "ORIENTATION", e[277] = "SAMPLESPERPIXEL", e[278] = "ROWSPERSTRIP", e[279] = "STRIPBYTECOUNTS", e[280] = "MINSAMPLEVALUE", e[281] = "MAXSAMPLEVALUE", e[282] = "XRESOLUTION", e[283] = "YRESOLUTION", e[284] = "PLANARCONFIGURATION", e[285] = "PAGENAME", e[286] = "XPOSITION", e[287] = "YPOSITION", e[288] = "FREEOFFSETS", e[289] = "FREEBYTECOUNTS", e[290] = "GRAYRESPONSEUNIT", e[291] = "GRAYRESPONSECURVE", e[292] = "T4OPTIONS", e[293] = "T6OPTIONS", e[296] = "RESOLUTIONUNIT", e[297] = "PAGENUMBER", e[300] = "COLORRESPONSEUNIT", e[301] = "TRANSFERFUNCTION", e[305] = "SOFTWARE", e[306] = "DATETIME", e[315] = "ARTIST", e[316] = "HOSTCOMPUTER", e[317] = "PREDICTOR", e[318] = "WHITEPOINT", e[319] = "PRIMARYCHROMATICITIES", e[320] = "COLORMAP", e[321] = "HALFTONEHINTS", e[322] = "TILEWIDTH", e[323] = "TILELENGTH", e[324] = "TILEOFFSETS", e[325] = "TILEBYTECOUNTS", e[326] = "BADFAXLINES", e[327] = "CLEANFAXDATA", e[328] = "CONSECUTIVEBADFAXLINES", e[330] = "SUBIFD", e[332] = "INKSET", e[333] = "INKNAMES", e[334] = "NUMBEROFINKS", e[336] = "DOTRANGE", e[337] = "TARGETPRINTER", e[338] = "EXTRASAMPLES", e[339] = "SAMPLEFORMAT", e[340] = "SMINSAMPLEVALUE", e[341] = "SMAXSAMPLEVALUE", e[342] = "TRANSFERRANGE", e[347] = "JPEGTABLES", e[512] = "JPEGPROC", e[513] = "JPEGIFOFFSET", e[514] = "JPEGIFBYTECOUNT", e[515] = "JPEGRESTARTINTERVAL", e[517] = "JPEGLOSSLESSPREDICTORS", e[518] = "JPEGPOINTTRANSFORM", e[519] = "JPEGQTABLES", e[520] = "JPEGDCTABLES", e[521] = "JPEGACTABLES", e[529] = "YCBCRCOEFFICIENTS", e[530] = "YCBCRSUBSAMPLING", e[531] = "YCBCRPOSITIONING", e[532] = "REFERENCEBLACKWHITE", e[700] = "XMP", e[33550] = "GEOPIXELSCALE", e[33922] = "GEOTIEPOINTS", e[33432] = "COPYRIGHT", e[42112] = "GDAL_METADATA", e[42113] = "GDAL_NODATA", e[50844] = "RPCCOEFFICIENT", e[34264] = "GEOTRANSMATRIX", e[34735] = "GEOKEYDIRECTORY", e[34736] = "GEODOUBLEPARAMS", e[34737] = "GEOASCIIPARAMS", e[34665] = "EXIFIFD", e[34853] = "GPSIFD", e[40965] = "INTEROPERABILITYIFD", e;
859
- })(), Pr = (() => {
860
- const e = ht.slice();
861
- return e[36864] = "ExifVersion", e[40960] = "FlashpixVersion", e[40961] = "ColorSpace", e[42240] = "Gamma", e[37121] = "ComponentsConfiguration", e[37122] = "CompressedBitsPerPixel", e[40962] = "PixelXDimension", e[40963] = "PixelYDimension", e[37500] = "MakerNote", e[37510] = "UserComment", e[40964] = "RelatedSoundFile", e[36867] = "DateTimeOriginal", e[36868] = "DateTimeDigitized", e[36880] = "OffsetTime", e[36881] = "OffsetTimeOriginal", e[36882] = "OffsetTimeDigitized", e[37520] = "SubSecTime", e[37521] = "SubSecTimeOriginal", e[37522] = "SubSecTimeDigitized", e[37888] = "Temperature", e[37889] = "Humidity", e[37890] = "Pressure", e[37891] = "WaterDepth", e[37892] = "Acceleration", e[37893] = "CameraElevationAngle", e[42016] = "ImageUniqueID", e[42032] = "CameraOwnerName", e[42033] = "BodySerialNumber", e[42034] = "LensSpecification", e[42035] = "LensMake", e[42036] = "LensModel", e[42037] = "LensSerialNumber", e[33434] = "ExposureTime", e[33437] = "FNumber", e[34850] = "ExposureProgram", e[34852] = "SpectralSensitivity", e[34855] = "PhotographicSensitivity", e[34856] = "OECF", e[34864] = "SensitivityType", e[34865] = "StandardOutputSensitivity", e[34866] = "RecommendedExposureIndex", e[34867] = "ISOSpeed", e[34868] = "ISOSpeedLatitudeyyy", e[34869] = "ISOSpeedLatitudezzz", e[37377] = "ShutterSpeedValue", e[37378] = "ApertureValue", e[37379] = "BrightnessValue", e[37380] = "ExposureBiasValue", e[37381] = "MaxApertureValue", e[37382] = "SubjectDistance", e[37383] = "MeteringMode", e[37384] = "LightSource", e[37385] = "Flash", e[37386] = "FocalLength", e[37396] = "SubjectArea", e[41483] = "FlashEnergy", e[41484] = "SpatialFrequencyResponse", e[41486] = "FocalPlaneXResolution", e[41487] = "FocalPlaneYResolution", e[41488] = "FocalPlaneResolutionUnit", e[41492] = "SubjectLocation", e[41493] = "ExposureIndex", e[41495] = "SensingMethod", e[41728] = "FileSource", e[41729] = "SceneType", e[41730] = "CFAPattern", e[41985] = "CustomRendered", e[41986] = "ExposureMode", e[41987] = "WhiteBalance", e[41988] = "DigitalZoomRatio", e[41989] = "FocalLengthIn35mmFilm", e[41990] = "SceneCaptureType", e[41991] = "GainControl", e[41992] = "Contrast", e[41993] = "Saturation", e[41994] = "Sharpness", e[41995] = "DeviceSettingDescription", e[41996] = "SubjectDistanceRange", e;
862
- })(), Rr = ["GPSVersionID", "GPSLatitudeRef", "GPSLatitude", "GPSLongitudeRef", "GPSLongitude", "GPSAltitudeRef", "GPSAltitude", "GPSTimeStamp", "GPSSatellites", "GPSStatus", "GPSMeasureMode", "GPSDOP", "GPSSpeedRef", "GPSSpeed", "GPSTrackRef", "GPSTrack", "GPSImgDirectionRef", "GPSImgDirection", "GPSMapDatum", "GPSDestLatitudeRef", "GPSDestLatitude", "GPSDestLongitudeRef", "GPSDestLongitude", "GPSDestBearingRef", "GPSDestBearing", "GPSDestDistanceRef", "GPSDestDistance", "GPSProcessingMethod", "GPSAreaInformation", "GPSDateStamp", "GPSDifferential", "GPSHPositioningError"], Mr = (() => {
863
- const e = [];
864
- return e[1024] = "GTModelTypeGeoKey", e[1025] = "GTRasterTypeGeoKey", e[1026] = "GTCitationGeoKey", e[2048] = "GeographicTypeGeoKey", e[2049] = "GeogCitationGeoKey", e[2050] = "GeogGeodeticDatumGeoKey", e[2051] = "GeogPrimeMeridianGeoKey", e[2052] = "GeogLinearUnitsGeoKey", e[2053] = "GeogLinearUnitSizeGeoKey", e[2054] = "GeogAngularUnitsGeoKey", e[2055] = "GeogAngularUnitSizeGeoKey", e[2056] = "GeogEllipsoidGeoKey", e[2057] = "GeogSemiMajorAxisGeoKey", e[2058] = "GeogSemiMinorAxisGeoKey", e[2059] = "GeogInvFlatteningGeoKey", e[2061] = "GeogPrimeMeridianLongGeoKey", e[2060] = "GeogAzimuthUnitsGeoKey", e[3072] = "ProjectedCSTypeGeoKey", e[3073] = "PCSCitationGeoKey", e[3074] = "ProjectionGeoKey", e[3075] = "ProjCoordTransGeoKey", e[3076] = "ProjLinearUnitsGeoKey", e[3077] = "ProjLinearUnitSizeGeoKey", e[3078] = "ProjStdParallel1GeoKey", e[3079] = "ProjStdParallel2GeoKey", e[3080] = "ProjNatOriginLongGeoKey", e[3081] = "ProjNatOriginLatGeoKey", e[3082] = "ProjFalseEastingGeoKey", e[3083] = "ProjFalseNorthingGeoKey", e[3084] = "ProjFalseOriginLongGeoKey", e[3085] = "ProjFalseOriginLatGeoKey", e[3086] = "ProjFalseOriginEastingGeoKey", e[3087] = "ProjFalseOriginNorthingGeoKey", e[3088] = "ProjCenterLongGeoKey", e[3090] = "ProjCenterEastingGeoKey", e[3091] = "ProjCenterNorthingGeoKey", e[3092] = "ProjScaleAtNatOriginGeoKey", e[3093] = "ProjScaleAtCenterGeoKey", e[3094] = "ProjAzimuthAngleGeoKey", e[3095] = "ProjStraightVertPoleLongGeoKey", e[4096] = "VerticalCSTypeGeoKey", e[4097] = "VerticalCitationGeoKey", e[4098] = "VerticalDatumGeoKey", e[4099] = "VerticalUnitsGeoKey", e;
865
- })(), Lr = (e, t) => {
866
- let r = (t || ht)[e];
867
- return r === void 0 && (r = "unknown" + String(e)), r;
868
- }, et = /* @__PURE__ */ new Map();
869
- et.set("EXIFIFD", Pr), et.set("GPSIFD", Rr);
870
- const Ae = { tiffTags: ht, ifdTags: et, geoKeys: Mr, getTagName: Lr }, ft = (() => {
871
- const e = new ArrayBuffer(4), t = new Uint8Array(e);
872
- return new Uint32Array(e)[0] = 1, t[0] === 1;
873
- })(), Rt = [0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, -1, -1, -1, 8, 8, 8], Ee = 4294967296, Or = /* @__PURE__ */ new Set([1, 5, 6, 7, 8, 34712, 34887]);
874
- function dt(e, t) {
875
- let r = "unknown";
876
- return e === 3 ? r = t === 64 ? "f64" : "f32" : e === 1 ? t === 1 ? r = "u1" : t === 2 ? r = "u2" : t === 4 ? r = "u4" : t <= 8 ? r = "u8" : t <= 16 ? r = "u16" : t <= 32 && (r = "u32") : e === 2 && (t <= 8 ? r = "s8" : t <= 16 ? r = "s16" : t <= 32 && (r = "s32")), r;
877
- }
878
- function ze(e) {
879
- let t = null;
880
- switch (e ? e.toLowerCase() : "f32") {
881
- case "u1":
882
- case "u2":
883
- case "u4":
884
- case "u8":
885
- t = Uint8Array;
886
- break;
887
- case "u16":
888
- t = Uint16Array;
889
- break;
890
- case "u32":
891
- t = Uint32Array;
892
- break;
893
- case "s8":
894
- t = Int8Array;
895
- break;
896
- case "s16":
897
- t = Int16Array;
898
- break;
899
- case "s32":
900
- t = Int32Array;
901
- break;
902
- case "f64":
903
- t = Float64Array;
904
- break;
905
- default:
906
- t = Float32Array;
907
- }
908
- return t;
909
- }
910
- function Dr(e, t) {
911
- return { x: t[0] * e.x + t[1] * e.y + t[2], y: t[3] * e.x + t[4] * e.y + t[5] };
912
- }
913
- function Yt(e, t) {
914
- var r;
915
- return (r = e.get(t)) == null ? void 0 : r.values;
916
- }
917
- function ve(e, t) {
918
- var r;
919
- return (r = e.get(t)) == null ? void 0 : r.values;
920
- }
921
- function Mt(e, t) {
922
- var r, o;
923
- return (o = (r = e.get(t)) == null ? void 0 : r.values) == null ? void 0 : o[0];
924
- }
925
- function V(e, t) {
926
- var r, o;
927
- return (o = (r = e.get(t)) == null ? void 0 : r.values) == null ? void 0 : o[0];
928
- }
929
- function Xe(e, t, r, o = 0, u = Ae.tiffTags, i = 4) {
930
- const f = i === 8, n = f ? mt(new DataView(e, r, 8), 0, t) : new DataView(e, r, 2).getUint16(0, t), s = 4 + 2 * i, l = f ? 8 : 2, a = l + n * s;
931
- if (r + a > e.byteLength)
932
- return { success: !1, ifd: null, nextIFD: null, requiredBufferSize: a };
933
- const c = r + a + 4 <= e.byteLength ? Ve(new DataView(e, r + a, i === 8 ? 8 : 4), 0, t, i === 8) : null, d = r + l, C = /* @__PURE__ */ new Map();
934
- let y, b, S, h, p, m = 0, g = 0;
935
- for (let w = 0; w < n; w++) {
936
- b = new DataView(e, d + s * w, s), S = b.getUint16(0, t), p = b.getUint16(2, t), h = Ae.getTagName(S, u);
937
- const k = [];
938
- i === 2 ? (m = b.getUint16(4, t), g = b.getUint16(6, t)) : i === 4 ? (m = b.getUint32(4, t), g = b.getUint32(8, t)) : i === 8 && (m = Ve(b, 4, t, !0), g = Ve(b, 12, t, !0), k.push(b.getUint32(12, t)), k.push(b.getUint32(16, t))), y = { id: S, type: p, valueCount: m, valueOffset: g, valueOffsets: k, values: null }, $r(e, t, y, o, !1, i), C.set(h, y);
939
- }
940
- return { success: !0, ifd: C, nextIFD: c, requiredBufferSize: a };
941
- }
942
- const Ur = (e, t) => qt(e, { inputOffset: t }).pixels[0];
943
- function tt(e, t) {
944
- if (t !== 1 && t !== 2 && t !== 4)
945
- return e;
946
- const r = new Uint8Array(e), o = 8 / t, u = new Uint8Array(e.byteLength * o);
947
- let i = 0;
948
- const f = 2 ** t - 1;
949
- for (let n = 0; n < r.length; n++) {
950
- const s = r[n];
951
- for (let l = 0; l < o; l++)
952
- u[i++] = s << t * l >>> 8 - t & f;
953
- }
954
- return u.buffer;
955
- }
956
- function rt(e, t, r) {
957
- const o = new Wt();
958
- o.parse(e), o.colorTransform = r === 6 ? -1 : 0;
959
- const u = o.getData(o.width, o.height, t !== 1 && t !== 4);
960
- return new Uint8Array(u.buffer);
961
- }
962
- function ot(e) {
963
- const t = new Ue(e).getBytes(), r = new ArrayBuffer(t.length), o = new Uint8Array(r);
964
- return o.set(t), o;
965
- }
966
- async function nt(e, t, r, o, u) {
967
- const i = ft === t, f = V(r, "BITSPERSAMPLE"), n = V(r, "SAMPLESPERPIXEL") ?? 1, s = V(r, "PHOTOMETRICINTERPRETATION"), l = V(r, "SAMPLEFORMAT") ?? 1, a = dt(l, f), c = V(r, "COMPRESSION") ?? 1, d = ze(a);
968
- let C, y, b;
969
- if (c === 34887)
970
- return await Kt(), Ur(e, o);
971
- if (c === 1)
972
- C = e.slice(o, o + u), y = new Uint8Array(C);
973
- else if (c === 8 || c === 32946)
974
- y = new Uint8Array(e, o, u), y = ot(y), C = y.buffer;
975
- else if (c === 6)
976
- y = new Uint8Array(e, o, u), y = rt(y, n, s), C = y.buffer;
977
- else if (c === 7) {
978
- const m = r.get("JPEGTABLES").values, g = m.length - 2;
979
- y = new Uint8Array(g + u - 2);
980
- for (let k = 0; k < g; k++)
981
- y[k] = m[k];
982
- const w = new Uint8Array(e, o + 2, u - 2);
983
- for (let k = 0; k < w.length; k++)
984
- y[g + k] = w[k];
985
- y = rt(y, n, s), C = y.buffer;
986
- } else {
987
- if (c !== 5)
988
- throw new Error("tiff-decode: unsupport compression " + c);
989
- y = ct(e, o, u, t), C = y.buffer;
990
- }
991
- if (C = tt(C, f), a === "u8" || a === "s8" || i)
992
- b = new d(C);
993
- else {
994
- C = new ArrayBuffer(y.length);
995
- const m = new Uint8Array(C);
996
- switch (a) {
997
- case "u16":
998
- case "s16":
999
- for (let g = 0; g < y.length; g += 2)
1000
- m[g] = y[g + 1], m[g + 1] = y[g];
1001
- break;
1002
- case "u32":
1003
- case "s32":
1004
- case "f32":
1005
- for (let g = 0; g < y.length; g += 4)
1006
- m[g] = y[g + 3], m[g + 1] = y[g + 2], m[g + 2] = y[g + 1], m[g + 3] = y[g];
1007
- }
1008
- b = new d(C);
1009
- }
1010
- const S = V(r, "PREDICTOR") ?? 1, h = V(r, "TILEWIDTH"), p = V(r, "TILELENGTH");
1011
- if (S > 1 && (c === 5 || c === 8 || c === 32946) && h && p) {
1012
- const m = We(r), g = new d(b.length);
1013
- g.set(b), b = Wr(g, p, h, l === 3 && S === 3, m ? 1 : n);
1014
- }
1015
- return b;
1016
- }
1017
- async function Gr(e, t, r) {
1018
- const o = ve(r, "TILEOFFSETS");
1019
- if (o === void 0)
1020
- return null;
1021
- const u = ve(r, "TILEBYTECOUNTS"), { width: i, height: f, pixelType: n, tileWidth: s, tileHeight: l } = pt([r]), a = We(r, t), c = V(r, "SAMPLESPERPIXEL") || t.planes, d = i * f, C = V(r, "BITSPERSAMPLE"), y = (V(r, "COMPRESSION") ?? 1) === 34887, b = ze(n), S = [];
1022
- for (let M = 0; M < c; M++)
1023
- S.push(new b(d));
1024
- let h, p, m, g, w, k, v, I, T, E, x, A, P;
1025
- const O = Math.ceil(i / s), R = new Uint8Array(d).fill(255);
1026
- let N = !1;
1027
- if (C % 8 == 0)
1028
- if (y && a && c > 1) {
1029
- const M = Math.round(o.length / c);
1030
- for (h = 0; h < M; h++) {
1031
- k = Math.floor(h / O) * l, v = h % O * s, I = k * i + v;
1032
- for (let _ = 0; _ < c; _++) {
1033
- const G = h * c + _;
1034
- for (u[G] === 0 ? (m = null, N = !0) : m = await nt(e, t.littleEndian, r, o[G], u[G]), E = 0, T = I, A = Math.min(s, i - v), x = Math.min(l, f - k), P = S[_], g = 0; g < x; g++)
1035
- for (T = I + g * i, E = g * s, w = 0; w < A; w++, T++, E++)
1036
- m ? P[T] = m[E] : R[T] = 0;
1037
- }
1038
- }
1039
- } else
1040
- for (h = 0; h < o.length; h++)
1041
- for (k = Math.floor(h / O) * l, v = h % O * s, I = k * i + v, u[h] === 0 ? (m = null, N = !0) : m = await nt(e, t.littleEndian, r, o[h], u[h]), E = 0, T = I, A = Math.min(s, i - v), x = Math.min(l, f - k), p = 0; p < c; p++)
1042
- if (P = S[p], a || y)
1043
- for (g = 0; g < x; g++)
1044
- for (T = I + g * i, E = s * l * p + g * s, w = 0; w < A; w++, T++, E++)
1045
- m ? P[T] = m[E] : R[T] = 0;
1046
- else
1047
- for (g = 0; g < x; g++)
1048
- for (T = I + g * i, E = g * s * c + p, w = 0; w < A; w++, T++, E += c)
1049
- m ? P[T] = m[E] : R[T] = 0;
1050
- return { width: i, height: f, pixelType: n, pixels: S, mask: N ? R : void 0 };
1051
- }
1052
- const Nr = (e, t, r) => {
1053
- const o = ft === t.littleEndian, u = ve(r, "STRIPOFFSETS");
1054
- if (u === void 0)
1055
- return null;
1056
- const { width: i, height: f, pixelType: n } = pt([r]), s = V(r, "SAMPLESPERPIXEL") || t.planes, l = V(r, "PHOTOMETRICINTERPRETATION"), a = i * f, c = V(r, "BITSPERSAMPLE"), d = ze(n), C = new d(a * s), y = ve(r, "STRIPBYTECOUNTS"), b = V(r, "ROWSPERSTRIP"), S = V(r, "COMPRESSION") ?? 1;
1057
- let h, p, m, g, w, k, v, I, T, E = b;
1058
- if (c % 8 == 0)
1059
- for (h = 0; h < u.length; h++) {
1060
- if (w = h * (b * i) * s, E = (h + 1) * b > f ? f - h * b : b, n === "u8" || n === "s8" || o)
1061
- S === 8 || S === 32946 ? (v = new Uint8Array(e, u[h], y[h]), v = ot(v), k = v.buffer) : S === 6 ? (v = new Uint8Array(e, u[h], y[h]), v = rt(v, s, l), k = v.buffer) : S === 5 ? (v = ct(e, u[h], y[h], t.littleEndian), k = v.buffer) : (y[h] !== E * i * s * c / 8 && console.log("strip byte counts is different than expected"), k = e.slice(u[h], u[h] + y[h])), k = tt(k, c), g = new d(k);
1062
- else {
1063
- switch (S === 6 || S === 8 || S === 32946 ? (v = new Uint8Array(e, u[h], y[h]), I = ot(v), k = I.buffer) : (y[h] !== E * i * s * c / 8 && console.log("strip byte counts is different than expected"), k = new ArrayBuffer(y[h]), v = new Uint8Array(e, u[h], y[h]), I = new Uint8Array(k)), n) {
1064
- case "u16":
1065
- case "s16":
1066
- for (m = 0; m < v.length; m += 2)
1067
- I[m] = v[m + 1], I[m + 1] = v[m];
1068
- break;
1069
- case "u32":
1070
- case "s32":
1071
- case "f32":
1072
- for (m = 0; m < v.length; m += 4)
1073
- I[m] = v[m + 3], I[m + 1] = v[m + 2], I[m + 2] = v[m + 1], I[m + 3] = v[m];
1074
- }
1075
- k = tt(k, c), g = new d(k);
1076
- }
1077
- C.set(g, w);
1078
- }
1079
- const x = [];
1080
- if (s === 1)
1081
- x.push(C);
1082
- else
1083
- for (h = 0; h < s; h++) {
1084
- for (T = new d(a), p = 0; p < a; p++)
1085
- T[p] = C[p * s + h];
1086
- x.push(T);
1087
- }
1088
- return { width: i, height: f, pixelType: n, pixels: x };
1089
- }, Br = (e, t, r) => {
1090
- if (!(e && e.length > 0 && t && r))
1091
- return null;
1092
- let o, u, i;
1093
- const f = e[0].length, n = e.length, s = new Uint8Array(f);
1094
- for (let l = 0; l < n; l++)
1095
- if (o = e[l], u = t[l], i = r[l], l === 0)
1096
- for (let a = 0; a < f; a++)
1097
- s[a] = o[a] < u || o[a] > i ? 0 : 1;
1098
- else
1099
- for (let a = 0; a < f; a++)
1100
- s[a] && (s[a] = o[a] < u || o[a] > i ? 0 : 1);
1101
- return s;
1102
- }, Fr = (e) => {
1103
- if (!e)
1104
- return null;
1105
- const t = e.match(/<Item(.*?)Item>/gi);
1106
- if (!t || t.length === 0)
1107
- return null;
1108
- const r = /* @__PURE__ */ new Map();
1109
- let o, u, i, f, n;
1110
- for (let h = 0; h < t.length; h++)
1111
- o = t[h], u = o.slice(6, o.indexOf(">")), f = o.indexOf("sample="), f > -1 && (n = o.slice(f + 8, o.indexOf('"', f + 8))), f = o.indexOf("name="), f > -1 && (u = o.slice(f + 6, o.indexOf('"', f + 6))), u && (i = o.slice(o.indexOf(">") + 1, o.indexOf("</Item>")).trim(), n != null ? r.has(u) ? r.get(u)[n] = i : r.set(u, [i]) : r.set(u, i)), n = null;
1112
- const s = r.get("STATISTICS_MINIMUM"), l = r.get("STATISTICS_MAXIMUM"), a = r.get("STATISTICS_MEAN"), c = r.get("STATISTICS_STDDEV");
1113
- let d = null;
1114
- if (s && l) {
1115
- d = [];
1116
- for (let h = 0; h < s.length; h++)
1117
- d.push({ min: parseFloat(s[h]), max: parseFloat(l[h]), avg: a && parseFloat(a[h]), stddev: c && parseFloat(c[h]) });
1118
- }
1119
- const C = r.get("BandName"), y = r.get("WavelengthMin"), b = r.get("WavelengthMax");
1120
- let S = null;
1121
- if (C) {
1122
- S = [];
1123
- for (let h = 0; h < C.length; h++)
1124
- S.push({ BandName: C[h], WavelengthMin: y && parseFloat(y[h]), WavelengthMax: b && parseFloat(b[h]) });
1125
- }
1126
- return { statistics: d, bandProperties: S, dataType: r.get("DataType"), rawMetadata: r };
1127
- };
1128
- function $r(e, t, r, o = 0, u = !1, i = 4) {
1129
- if (r.values)
1130
- return !0;
1131
- const f = r.type, n = r.valueCount;
1132
- let s = r.valueOffset, l = [];
1133
- const a = Rt[f], c = 8 * a, d = n * a, C = n * Rt[f] * 8;
1134
- let y, b;
1135
- const S = i === 8 ? 64 : 32, h = r.valueOffsets;
1136
- if (C > S && d > (u ? e.byteLength : e ? e.byteLength - s + o : 0))
1137
- return r.offlineOffsetSize = [s, d], r.values = null, !1;
1138
- if (C <= S) {
1139
- if (!t)
1140
- if (S <= 32)
1141
- s >>>= 32 - C;
1142
- else {
1143
- const p = h != null && h.length ? h[0] : s >>> 0, m = h != null && h.length ? h[1] : Math.round((s - p) / Ee);
1144
- C <= 32 ? (s = p >>> 32 - C, h[0] = s) : (s = p * 2 ** (32 - C) + (m >>> 32 - C), h[0] = p, h[1] = m >>> 32 - C);
1145
- }
1146
- if (n === 1 && c === S)
1147
- l = [s];
1148
- else if (S === 64) {
1149
- const p = h != null && h.length ? h[0] : s >>> 0, m = h != null && h.length ? h[1] : Math.round((s - p) / Ee);
1150
- let g = p, w = 32;
1151
- for (b = 1; b <= n; b++) {
1152
- const k = 32 - c * b % 32;
1153
- if (w < c) {
1154
- const v = g << k >>> 32 - w, I = m << 32 - w >>> 32 - w;
1155
- g = m, l.push(v + I * 2 ** (c - w)), w -= 32 - (c - w);
1156
- } else
1157
- l.push(g << k >>> 32 - c), w -= c;
1158
- w === 0 && (w = 32, g = m);
1159
- }
1160
- } else
1161
- for (b = 1; b <= n; b++) {
1162
- const p = 32 - c * b;
1163
- l.push(s << p >>> 32 - c);
1164
- }
1165
- } else {
1166
- s -= o, u && (s = 0);
1167
- for (let p = s; p < s + d; p += a) {
1168
- switch (f) {
1169
- case 1:
1170
- case 2:
1171
- case 7:
1172
- y = new DataView(e, p, 1).getUint8(0);
1173
- break;
1174
- case 3:
1175
- y = new DataView(e, p, 2).getUint16(0, t);
1176
- break;
1177
- case 4:
1178
- case 13:
1179
- y = new DataView(e, p, 4).getUint32(0, t);
1180
- break;
1181
- case 5:
1182
- y = new DataView(e, p, 4).getUint32(0, t) / new DataView(e, p + 4, 4).getUint32(0, t);
1183
- break;
1184
- case 6:
1185
- y = new DataView(e, p, 1).getInt8(0);
1186
- break;
1187
- case 8:
1188
- y = new DataView(e, p, 2).getInt16(0, t);
1189
- break;
1190
- case 9:
1191
- y = new DataView(e, p, 4).getInt32(0, t);
1192
- break;
1193
- case 10:
1194
- y = new DataView(e, p, 4).getInt32(0, t) / new DataView(e, p + 4, 4).getInt32(0, t);
1195
- break;
1196
- case 11:
1197
- y = new DataView(e, p, 4).getFloat32(0, t);
1198
- break;
1199
- case 12:
1200
- y = new DataView(e, p, 8).getFloat64(0, t);
1201
- break;
1202
- case 16:
1203
- case 18:
1204
- y = mt(new DataView(e, p, 8), 0, t);
1205
- break;
1206
- case 17:
1207
- y = _r(new DataView(e, p, 8), 0, t);
1208
- break;
1209
- default:
1210
- y = null;
1211
- }
1212
- l.push(y);
1213
- }
1214
- }
1215
- if (f === 2) {
1216
- let p = "";
1217
- const m = l;
1218
- for (l = [], b = 0; b < m.length; b++)
1219
- m[b] === 0 && p !== "" ? (l.push(p), p = "") : p += String.fromCharCode(m[b]);
1220
- p === "" && l.length !== 0 || l.push(p);
1221
- }
1222
- return r.values = l, !0;
1223
- }
1224
- function pt(e) {
1225
- const t = e[0], r = V(t, "TILEWIDTH"), o = V(t, "TILELENGTH"), u = V(t, "IMAGEWIDTH"), i = V(t, "IMAGELENGTH"), f = V(t, "BITSPERSAMPLE"), n = V(t, "SAMPLESPERPIXEL"), s = V(t, "SAMPLEFORMAT") ?? 1, l = dt(s, f), a = We(t), c = Yt(t, "GDAL_NODATA");
1226
- let d = null;
1227
- c != null && c.length && (d = c.map((G) => parseFloat(G)), d.some((G) => isNaN(G)) && (d = null));
1228
- const C = V(t, "COMPRESSION") ?? 1;
1229
- let y;
1230
- switch (C) {
1231
- case 1:
1232
- y = "NONE";
1233
- break;
1234
- case 2:
1235
- case 3:
1236
- case 4:
1237
- case 32771:
1238
- y = "CCITT";
1239
- break;
1240
- case 5:
1241
- y = "LZW";
1242
- break;
1243
- case 6:
1244
- case 7:
1245
- y = "JPEG";
1246
- break;
1247
- case 32773:
1248
- y = "PACKBITS";
1249
- break;
1250
- case 8:
1251
- case 32946:
1252
- y = "DEFLATE";
1253
- break;
1254
- case 34712:
1255
- y = "JPEG2000";
1256
- break;
1257
- case 34887:
1258
- y = "LERC";
1259
- break;
1260
- default:
1261
- y = String(C);
1262
- }
1263
- let b = !0, S = "";
1264
- Or.has(C) || (b = !1, S += "unsupported tag compression " + C), s > 3 && (b = !1, S += "unsupported tag sampleFormat " + s), f !== 1 && f !== 2 && f !== 4 && f % 8 != 0 && (b = !1, S += "unsupported tag bitsPerSample " + f);
1265
- const h = Mt(t, "GEOASCIIPARAMS");
1266
- let p;
1267
- if (h) {
1268
- const G = h.split("|").find((W) => W.includes("ESRI PE String = ")), L = G ? G.replace("ESRI PE String = ", "") : "";
1269
- p = L.startsWith("COMPD_CS") || L.startsWith("PROJCS") || L.startsWith("GEOGCS") ? { wkid: null, wkt: L } : null;
1270
- }
1271
- const m = ve(t, "GEOTIEPOINTS"), g = ve(t, "GEOPIXELSCALE"), w = ve(t, "GEOTRANSMATRIX"), k = t.has("GEOKEYDIRECTORY") ? t.get("GEOKEYDIRECTORY").data : null;
1272
- let v, I, T = !1, E = !1;
1273
- if (k) {
1274
- T = V(k, "GTRasterTypeGeoKey") === 2;
1275
- const G = V(k, "GTModelTypeGeoKey");
1276
- if (G === 2) {
1277
- const L = V(k, "GeographicTypeGeoKey");
1278
- L >= 1024 && L <= 32766 && (p = { wkid: L }), p || L !== 32767 || (E = !0, p = { wkid: 4326 });
1279
- } else if (G === 1) {
1280
- const L = V(k, "ProjectedCSTypeGeoKey");
1281
- L >= 1024 && L <= 32766 && (p = { wkid: L });
1282
- }
1283
- }
1284
- if (g && m && m.length >= 6 ? (v = [g[0], 0, m[3] - m[0] * g[0], 0, -Math.abs(g[1]), m[4] - m[1] * g[1]], T && (v[2] -= 0.5 * v[0] + 0.5 * v[1], v[5] -= 0.5 * v[3] + 0.5 * v[4])) : w && w.length === 16 && (v = T ? [w[0], w[1], w[3] - 0.5 * w[0], w[4], w[5], w[7] - 0.5 * w[5]] : [w[0], w[1], w[3], w[4], w[5], w[7]]), v) {
1285
- const G = [{ x: 0, y: i }, { x: 0, y: 0 }, { x: u, y: i }, { x: u, y: 0 }];
1286
- let L, W = Number.POSITIVE_INFINITY, $ = Number.POSITIVE_INFINITY, F = Number.NEGATIVE_INFINITY, j = Number.NEGATIVE_INFINITY;
1287
- for (let J = 0; J < G.length; J++)
1288
- L = Dr(G[J], v), W = L.x > W ? W : L.x, F = L.x < F ? F : L.x, $ = L.y > $ ? $ : L.y, j = L.y < j ? j : L.y;
1289
- I = { xmin: W, xmax: F, ymin: $, ymax: j, spatialReference: p };
1290
- } else
1291
- I = { xmin: -0.5, ymin: 0.5 - i, xmax: u - 0.5, ymax: 0.5, spatialReference: p };
1292
- E && (I.xmax - I.xmin > 400 || Math.max(Math.abs(I.xmin), Math.abs(I.xmax)) > 361) && (p = null, I.spatialReference = null);
1293
- const x = Xt(e);
1294
- let A, P, O, R, N;
1295
- if (x.length > 0) {
1296
- O = Math.round(Math.log(u / V(x[0], "IMAGEWIDTH")) / Math.LN2);
1297
- const G = x[x.length - 1];
1298
- R = Math.round(Math.log(u / V(G, "IMAGEWIDTH")) / Math.LN2), A = V(G, "TILEWIDTH"), P = V(G, "TILELENGTH");
1299
- }
1300
- A = R != null && R > 0 ? A || r : null, P = R != null && R > 0 ? P || o : null, r && (N = [{ maxCol: Math.ceil(u / r) - 1, maxRow: Math.ceil(i / o) - 1, minRow: 0, minCol: 0 }], x.forEach((G) => {
1301
- N.push({ maxCol: Math.ceil(V(G, "IMAGEWIDTH") / V(G, "TILEWIDTH")) - 1, maxRow: Math.ceil(V(G, "IMAGELENGTH") / V(G, "TILELENGTH")) - 1, minRow: 0, minCol: 0 });
1302
- }));
1303
- const M = Mt(e[0], "GDAL_METADATA"), _ = Fr(M);
1304
- return S += " " + Qt({ width: u, height: i, tileWidth: r, tileHeight: o, planes: n, ifds: e }), { width: u, height: i, tileWidth: r, tileHeight: o, planes: n, isBSQ: a, pixelType: l, compression: y, noData: d, hasMaskBand: Zt(e).length === x.length + 1, isSupported: b, message: S, extent: I, isPseudoGeographic: E, affine: g ? null : v, firstPyramidLevel: O, maximumPyramidLevel: R, pyramidBlockWidth: A, pyramidBlockHeight: P, tileBoundary: N, metadata: _ };
1305
- }
1306
- function We(e, t) {
1307
- const r = Yt(e, "PLANARCONFIGURATION");
1308
- return r ? r[0] === 2 : !!t && t.isBSQ;
1309
- }
1310
- function Xt(e) {
1311
- return e.filter((t) => V(t, "NEWSUBFILETYPE") === 1);
1312
- }
1313
- function Zt(e) {
1314
- return e.filter((t) => {
1315
- const r = (4 & (V(t, "NEWSUBFILETYPE") ?? 0)) == 4, o = V(t, "PHOTOMETRICINTERPRETATION") === 4;
1316
- return r && o;
1317
- });
1318
- }
1319
- function Vr(e) {
1320
- const { littleEndian: t, isBigTiff: r, firstIFDPos: o } = jr(e);
1321
- let u = o;
1322
- const i = [];
1323
- do {
1324
- const f = zr(e, t, u, 0, Ae.tiffTags, r ? 8 : 4);
1325
- if (!f.success)
1326
- break;
1327
- i.push(f.ifd), u = f.nextIFD;
1328
- } while (u > 0);
1329
- return { ...pt(i), littleEndian: t, isBigTiff: r, ifds: i, pyramidIFDs: Xt(i), maskIFDs: Zt(i) };
1330
- }
1331
- function mt(e, t, r) {
1332
- const o = e.getUint32(t, r), u = e.getUint32(t + 4, r);
1333
- return r ? u * Ee + o : o * Ee + u;
1334
- }
1335
- function _r(e, t, r) {
1336
- let o = r ? e.getInt32(t, r) : e.getUint32(t, r), u = r ? e.getUint32(t + 4, r) : e.getInt32(t + 4, r);
1337
- const i = (r ? o : u) >= 0 ? 1 : -1;
1338
- return r ? o *= i : u *= i, i * (r ? u * Ee + o : o * Ee + u);
1339
- }
1340
- function Ve(e, t, r, o) {
1341
- return o ? mt(e, t, r) : e.getUint32(t, r);
1342
- }
1343
- function jr(e) {
1344
- const t = new DataView(e, 0, 16), r = t.getUint16(0, !1);
1345
- let o = null;
1346
- if (r === 18761)
1347
- o = !0;
1348
- else {
1349
- if (r !== 19789)
1350
- throw new Error("unexpected endianess byte");
1351
- o = !1;
1352
- }
1353
- const u = t.getUint16(2, o);
1354
- if (u !== 42 && u !== 43)
1355
- throw new Error("unexpected tiff identifier");
1356
- let i = 4;
1357
- const f = u === 43;
1358
- if (f) {
1359
- const n = t.getUint16(i, o);
1360
- if (i += 2, n !== 8)
1361
- throw new Error("unsupported bigtiff version");
1362
- if (t.getUint16(i, o) !== 0)
1363
- throw new Error("unsupported bigtiff version");
1364
- i += 2;
1365
- }
1366
- return { littleEndian: o, isBigTiff: f, firstIFDPos: Ve(t, i, o, f) };
1367
- }
1368
- function zr(e, t, r, o = 0, u = Ae.tiffTags, i = 4) {
1369
- const f = Xe(e, t, r, o, u, i);
1370
- let n;
1371
- const s = f.ifd;
1372
- if (s) {
1373
- if (Ae.ifdTags.forEach((l, a) => {
1374
- s.has(a) && (n = s.get(a), n.data = Xe(e, t, n.valueOffset - o, o, l).ifd);
1375
- }), s.has("GEOKEYDIRECTORY")) {
1376
- n = s.get("GEOKEYDIRECTORY");
1377
- const l = n.values;
1378
- if (l && l.length > 4) {
1379
- const a = l[0] + "." + l[1] + "." + l[2];
1380
- n.data = Xe(e, t, n.valueOffset + 6 - o, o, Ae.geoKeys, 2).ifd, n.data && n.data.set("GEOTIFFVersion", { id: 0, type: 2, valueCount: 1, valueOffset: null, values: [a] });
1381
- }
1382
- }
1383
- if (s.has("XMP")) {
1384
- n = s.get("XMP");
1385
- const l = n.values;
1386
- typeof l[0] == "number" && n.type === 7 && (n.values = [Er(new Uint8Array(l))]);
1387
- }
1388
- }
1389
- return f;
1390
- }
1391
- function Qt(e) {
1392
- const { width: t, height: r, tileHeight: o, tileWidth: u } = e, i = e.planes, f = u ? u * o : t * r, n = V(e.ifds[0], "BITSPERSAMPLE");
1393
- let s = "";
1394
- return f * i > 2 ** 30 / (n > 8 ? n / 8 : 1) && (s = u ? "tiled tiff exceeding 1 gigabits per tile is not supported" : "scanline tiff exceeding 1 gigabits is not supported"), s;
1395
- }
1396
- function Wr(e, t, r, o, u) {
1397
- const i = o ? 4 : 1, f = r * i * u;
1398
- o && (e = new Uint8Array(e.buffer));
1399
- for (let l = 0; l < t; l++) {
1400
- const a = l * f;
1401
- for (let c = u; c < f; c++)
1402
- e[a + c] += e[a + c - u];
1403
- }
1404
- if (!o)
1405
- return e;
1406
- const n = new Uint8Array(e.length), s = r * u;
1407
- for (let l = 0; l < t; l++) {
1408
- const a = l * f;
1409
- for (let c = 0; c < s; c++)
1410
- for (let d = 0; d < i; d++)
1411
- n[a + c * i + d] = e[a + c + (i - d - 1) * s];
1412
- }
1413
- return new Float32Array(n.buffer);
1414
- }
1415
- async function Hr(e, t) {
1416
- const { headerInfo: r, ifd: o, offsets: u, sizes: i } = t, f = [];
1417
- for (let T = 0; T < u.length; T++) {
1418
- i[T];
1419
- const E = await nt(e, r.littleEndian, o, u[T], i[T] || e.byteLength);
1420
- f.push(E);
1421
- }
1422
- const n = We(o, r), s = V(o, "BITSPERSAMPLE"), l = dt(V(o, "SAMPLEFORMAT") ?? 1, s), a = V(o, "SAMPLESPERPIXEL") || r.planes, c = ze(l), d = V(o, "TILEWIDTH"), C = V(o, "TILELENGTH"), y = V(o, "COMPRESSION") ?? 1, b = d * C;
1423
- let S;
1424
- const h = [];
1425
- let p = f[0];
1426
- const m = y === 34887;
1427
- for (let T = 0; T < a; T++) {
1428
- if (S = new c(b), f.length === a)
1429
- p = f[T], p.length === b && (S = p);
1430
- else if (p.length)
1431
- if (n || m)
1432
- S = p.length === b ? p : p.slice(b * T, b * (T + 1));
1433
- else
1434
- for (let E = 0; E < b; E++)
1435
- S[E] = p[E * a + T];
1436
- h.push(S);
1437
- }
1438
- const g = r.noData ? r.noData[0] : t.noDataValue, w = r.metadata ? r.metadata.statistics : null, k = w ? w.map((T) => T.min) : null, v = w ? w.map((T) => T.max) : null, I = { pixelType: l, width: d, height: C, pixels: h, noDataValue: g };
1439
- return g != null ? ut(I, g) : k && v && t.applyMinMaxConstraint && (I.mask = Br(h, k, v)), I;
1440
- }
1441
- async function Kr(e, t = {}) {
1442
- const r = t.pyramidLevel || 0, o = t.headerInfo || Vr(e), { ifds: u, noData: i } = o;
1443
- if (u.length === 0)
1444
- throw new Error("no valid image file directory");
1445
- const f = Qt(o);
1446
- if (f)
1447
- throw f;
1448
- let n = null;
1449
- const s = r === -1 ? u[u.length - 1] : u[r], l = i ?? t.noDataValue;
1450
- return n = o.tileWidth ? await Gr(e, o, s) : Nr(e, o, s), n && (l != null && ut(n, l), n);
1451
- }
1452
- var qr = function(e) {
1453
- var t, r, o, u, i, f;
1454
- function n(s) {
1455
- var l, a, c, d, C, y, b, S, h, p, m, g, w;
1456
- for (this.data = s, this.pos = 8, this.palette = [], this.imgData = [], this.transparency = {}, this.animation = null, this.text = {}, C = null; ; ) {
1457
- switch (l = this.readUInt32(), S = (function() {
1458
- var k, v;
1459
- for (v = [], k = 0; k < 4; ++k)
1460
- v.push(String.fromCharCode(this.data[this.pos++]));
1461
- return v;
1462
- }).call(this).join(""), S) {
1463
- case "IHDR":
1464
- this.width = this.readUInt32(), this.height = this.readUInt32(), this.bits = this.data[this.pos++], this.colorType = this.data[this.pos++], this.compressionMethod = this.data[this.pos++], this.filterMethod = this.data[this.pos++], this.interlaceMethod = this.data[this.pos++];
1465
- break;
1466
- case "acTL":
1467
- this.animation = { numFrames: this.readUInt32(), numPlays: this.readUInt32() || 1 / 0, frames: [] };
1468
- break;
1469
- case "PLTE":
1470
- this.palette = this.read(l);
1471
- break;
1472
- case "fcTL":
1473
- C && this.animation.frames.push(C), this.pos += 4, C = { width: this.readUInt32(), height: this.readUInt32(), xOffset: this.readUInt32(), yOffset: this.readUInt32() }, d = this.readUInt16(), c = this.readUInt16() || 100, C.delay = 1e3 * d / c, C.disposeOp = this.data[this.pos++], C.blendOp = this.data[this.pos++], C.data = [];
1474
- break;
1475
- case "IDAT":
1476
- case "fdAT":
1477
- for (S === "fdAT" && (this.pos += 4, l -= 4), s = (C != null ? C.data : void 0) || this.imgData, m = 0; 0 <= l ? m < l : m > l; 0 <= l ? ++m : --m)
1478
- s.push(this.data[this.pos++]);
1479
- break;
1480
- case "tRNS":
1481
- switch (this.transparency = {}, this.colorType) {
1482
- case 3:
1483
- if (this.transparency.indexed = this.read(l), (h = 255 - this.transparency.indexed.length) > 0)
1484
- for (g = 0; 0 <= h ? g < h : g > h; 0 <= h ? ++g : --g)
1485
- this.transparency.indexed.push(255);
1486
- break;
1487
- case 0:
1488
- this.transparency.grayscale = this.read(l)[0];
1489
- break;
1490
- case 2:
1491
- this.transparency.rgb = this.read(l);
1492
- }
1493
- break;
1494
- case "tEXt":
1495
- y = (p = this.read(l)).indexOf(0), b = String.fromCharCode.apply(String, p.slice(0, y)), this.text[b] = String.fromCharCode.apply(String, p.slice(y + 1));
1496
- break;
1497
- case "IEND":
1498
- return C && this.animation.frames.push(C), this.colors = (function() {
1499
- switch (this.colorType) {
1500
- case 0:
1501
- case 3:
1502
- case 4:
1503
- return 1;
1504
- case 2:
1505
- case 6:
1506
- return 3;
1507
- }
1508
- }).call(this), this.hasAlphaChannel = (w = this.colorType) === 4 || w === 6, a = this.colors + (this.hasAlphaChannel ? 1 : 0), this.pixelBitlength = this.bits * a, this.colorSpace = (function() {
1509
- switch (this.colors) {
1510
- case 1:
1511
- return "DeviceGray";
1512
- case 3:
1513
- return "DeviceRGB";
1514
- }
1515
- }).call(this), void (this.imgData = new Uint8Array(this.imgData));
1516
- default:
1517
- this.pos += l;
1518
- }
1519
- if (this.pos += 4, this.pos > this.data.length)
1520
- throw new Error("Incomplete or corrupt PNG file");
1521
- }
1522
- }
1523
- return n.load = function(s, l, a) {
1524
- var c;
1525
- return typeof l == "function" && (a = l), (c = new XMLHttpRequest()).open("GET", s, !0), c.responseType = "arraybuffer", c.onload = function() {
1526
- var d;
1527
- return d = new n(new Uint8Array(c.response || c.mozResponseArrayBuffer)), typeof (l != null ? l.getContext : void 0) == "function" && d.render(l), typeof a == "function" ? a(d) : void 0;
1528
- }, c.send(null);
1529
- }, r = 1, o = 2, t = 0, n.prototype.read = function(s) {
1530
- var l, a;
1531
- for (a = [], l = 0; 0 <= s ? l < s : l > s; 0 <= s ? ++l : --l)
1532
- a.push(this.data[this.pos++]);
1533
- return a;
1534
- }, n.prototype.readUInt32 = function() {
1535
- return this.data[this.pos++] << 24 | this.data[this.pos++] << 16 | this.data[this.pos++] << 8 | this.data[this.pos++];
1536
- }, n.prototype.readUInt16 = function() {
1537
- return this.data[this.pos++] << 8 | this.data[this.pos++];
1538
- }, n.prototype.decodePixels = function(s) {
1539
- var l, a, c, d, C, y, b, S, h, p, m, g, w, k, v, I, T, E, x, A, P, O, R;
1540
- if (s == null && (s = this.imgData), s.length === 0)
1541
- return new Uint8Array(0);
1542
- for (s = (s = new Ue(s)).getBytes(), I = (g = this.pixelBitlength / 8) * this.width, w = new Uint8Array(I * this.height), y = s.length, v = 0, k = 0, a = 0; k < y; ) {
1543
- switch (s[k++]) {
1544
- case 0:
1545
- for (d = x = 0; x < I; d = x += 1)
1546
- w[a++] = s[k++];
1547
- break;
1548
- case 1:
1549
- for (d = A = 0; A < I; d = A += 1)
1550
- l = s[k++], C = d < g ? 0 : w[a - g], w[a++] = (l + C) % 256;
1551
- break;
1552
- case 2:
1553
- for (d = P = 0; P < I; d = P += 1)
1554
- l = s[k++], c = (d - d % g) / g, T = v && w[(v - 1) * I + c * g + d % g], w[a++] = (T + l) % 256;
1555
- break;
1556
- case 3:
1557
- for (d = O = 0; O < I; d = O += 1)
1558
- l = s[k++], c = (d - d % g) / g, C = d < g ? 0 : w[a - g], T = v && w[(v - 1) * I + c * g + d % g], w[a++] = (l + Math.floor((C + T) / 2)) % 256;
1559
- break;
1560
- case 4:
1561
- for (d = R = 0; R < I; d = R += 1)
1562
- l = s[k++], c = (d - d % g) / g, C = d < g ? 0 : w[a - g], v === 0 ? T = E = 0 : (T = w[(v - 1) * I + c * g + d % g], E = c && w[(v - 1) * I + (c - 1) * g + d % g]), b = C + T - E, S = Math.abs(b - C), p = Math.abs(b - T), m = Math.abs(b - E), h = S <= p && S <= m ? C : p <= m ? T : E, w[a++] = (l + h) % 256;
1563
- break;
1564
- default:
1565
- throw new Error("Invalid filter algorithm: " + s[k - 1]);
1566
- }
1567
- v++;
1568
- }
1569
- return w;
1570
- }, n.prototype.decodePalette = function() {
1571
- var s, l, a, c, d, C, y, b, S;
1572
- for (a = this.palette, C = this.transparency.indexed || [], d = new Uint8Array((C.length || 0) + a.length), c = 0, a.length, s = 0, l = y = 0, b = a.length; y < b; l = y += 3)
1573
- d[c++] = a[l], d[c++] = a[l + 1], d[c++] = a[l + 2], d[c++] = (S = C[s++]) != null ? S : 255;
1574
- return d;
1575
- }, n.prototype.copyToImageData = function(s, l) {
1576
- var a, c, d, C, y, b, S, h, p, m, g;
1577
- if (c = this.colors, p = null, a = this.hasAlphaChannel, this.palette.length && (p = (g = this._decodedPalette) != null ? g : this._decodedPalette = this.decodePalette(), c = 4, a = !0), h = (d = s.data || s).length, y = p || l, C = b = 0, c === 1)
1578
- for (; C < h; )
1579
- S = p ? 4 * l[C / 4] : b, m = y[S++], d[C++] = m, d[C++] = m, d[C++] = m, d[C++] = a ? y[S++] : this.transparency.grayscale && this.transparency.grayscale === m ? 0 : 255, b = S;
1580
- else
1581
- for (; C < h; )
1582
- S = p ? 4 * l[C / 4] : b, d[C++] = y[S++], d[C++] = y[S++], d[C++] = y[S++], d[C++] = a ? y[S++] : this.transparency.rgb && this.transparency.rgb[1] === y[S - 3] && this.transparency.rgb[3] === y[S - 2] && this.transparency.rgb[5] === y[S - 1] ? 0 : 255, b = S;
1583
- }, n.prototype.decode = function() {
1584
- var s;
1585
- return s = new Uint8Array(this.width * this.height * 4), this.copyToImageData(s, this.decodePixels()), s;
1586
- }, i = e.document && e.document.createElement("canvas"), f = i && i.getContext("2d"), u = function(s) {
1587
- var l;
1588
- return f.width = s.width, f.height = s.height, f.clearRect(0, 0, s.width, s.height), f.putImageData(s, 0, 0), (l = new Image()).src = i.toDataURL(), l;
1589
- }, n.prototype.decodeFrames = function(s) {
1590
- var l, a, c, d, C, y, b, S;
1591
- if (this.animation) {
1592
- for (S = [], a = C = 0, y = (b = this.animation.frames).length; C < y; a = ++C)
1593
- l = b[a], c = s.createImageData(l.width, l.height), d = this.decodePixels(new Uint8Array(l.data)), this.copyToImageData(c, d), l.imageData = c, S.push(l.image = u(c));
1594
- return S;
1595
- }
1596
- }, n.prototype.renderFrame = function(s, l) {
1597
- var a, c, d;
1598
- return a = (c = this.animation.frames)[l], d = c[l - 1], l === 0 && s.clearRect(0, 0, this.width, this.height), (d != null ? d.disposeOp : void 0) === r ? s.clearRect(d.xOffset, d.yOffset, d.width, d.height) : (d != null ? d.disposeOp : void 0) === o && s.putImageData(d.imageData, d.xOffset, d.yOffset), a.blendOp === t && s.clearRect(a.xOffset, a.yOffset, a.width, a.height), s.drawImage(a.image, a.xOffset, a.yOffset);
1599
- }, n.prototype.animate = function(s) {
1600
- var l, a, c, d, C, y, b = this;
1601
- return a = 0, y = this.animation, d = y.numFrames, c = y.frames, C = y.numPlays, (l = function() {
1602
- var S, h;
1603
- if (S = a++ % d, h = c[S], b.renderFrame(s, S), d > 1 && a / d < C)
1604
- return b.animation._timeout = setTimeout(l, h.delay);
1605
- })();
1606
- }, n.prototype.stopAnimation = function() {
1607
- var s;
1608
- return clearTimeout((s = this.animation) != null ? s._timeout : void 0);
1609
- }, n.prototype.render = function(s) {
1610
- var l, a;
1611
- return s._png && s._png.stopAnimation(), s._png = this, s.width = this.width, s.height = this.height, l = s.getContext("2d"), this.animation ? (this.decodeFrames(l), this.animate(l)) : (a = l.createImageData(this.width, this.height), this.copyToImageData(a, this.decodePixels()), l.putImageData(a, 0, 0));
1612
- }, n;
1613
- }(self);
1614
- const Jr = /* @__PURE__ */ new Set(["jpg", "png", "bmp", "gif"]);
1615
- async function Yr(e, t) {
1616
- if (!ft)
1617
- throw new pe("rasterCoded:decode", "lerc decoder is not supported on big endian platform");
1618
- await Kt();
1619
- const { offset: r } = t, { width: o, height: u, pixelType: i, statistics: f, depthCount: n, noDataValues: s, bandMasks: l, pixels: a, mask: c } = qt(e, { inputOffset: r, returnInterleaved: t.returnInterleaved }), d = new ee({ width: o, height: u, pixelType: i.toLowerCase(), pixels: a, mask: c, statistics: f, bandMasks: l, depthCount: n, noDataValues: s });
1620
- return f != null && f.length || d.updateStatistics(), d;
1621
- }
1622
- async function Xr(e, t) {
1623
- const r = await Kr(e, { ...t, noDataValue: null });
1624
- $e(r);
1625
- const o = new ee({ width: r.width, height: r.height, pixels: r.pixels, pixelType: r.pixelType.toLowerCase(), mask: r.mask, bandMasks: r.bandMasks, statistics: null });
1626
- return o.updateStatistics(), o;
1627
- }
1628
- async function Zr(e, t) {
1629
- const r = await Hr(e, t.customOptions), o = new ee({ width: r.width, height: r.height, pixels: r.pixels, pixelType: r.pixelType.toLowerCase(), mask: r.mask, statistics: null });
1630
- return o.updateStatistics(), o;
1631
- }
1632
- function er(e, t) {
1633
- const r = t.pixelType || "u8", o = ee.getPixelArrayConstructor(r), u = r === "u8" ? e : new o(e.buffer), i = [], f = t.planes || 1;
1634
- if (f === 1)
1635
- i.push(u);
1636
- else
1637
- for (let s = 0; s < f; s++) {
1638
- const l = (t.width || 1) * (t.height || e.length), a = new o(l);
1639
- for (let c = 0; c < l; c++)
1640
- a[c] = u[c * f + s];
1641
- i.push(a);
1642
- }
1643
- const n = new ee({ width: t.width || 1, height: t.height || e.length, pixels: i, pixelType: r, statistics: null });
1644
- return n.updateStatistics(), n;
1645
- }
1646
- function Qr(e, t) {
1647
- return er(new Ue(new Uint8Array(e)).getBytes(), t);
1648
- }
1649
- function eo(e, t) {
1650
- return er(ct(e, t.offset, t.eof, !t.isInputBigEndian), t);
1651
- }
1652
- function to(e, t, r) {
1653
- const { pixelTypeCtor: o } = ao(t.pixelType), u = (0, Ar.decode)(e, { width: t.width, height: t.height, pixelType: o, format: r }), i = new ee({ width: t.width, height: t.height, pixels: u.pixels, pixelType: t.pixelType, mask: u.mask, statistics: null });
1654
- return i.updateStatistics(), i;
1655
- }
1656
- function ro(e, t) {
1657
- const r = vr.decode(e, t.hasNoZlibMask ?? void 0), o = new ee({ width: r.width, height: r.height, pixels: r.pixels, pixelType: "U8", mask: r.mask, statistics: null });
1658
- return o.updateStatistics(), o;
1659
- }
1660
- function oo(e, t) {
1661
- const r = new Uint8Array(e), o = new qr(r), { width: u, height: i } = t, f = u * i, n = o.decode();
1662
- let s, l = 0, a = 0;
1663
- const c = new Uint8Array(f);
1664
- for (l = 0; l < f; l++)
1665
- c[l] = n[4 * l + 3];
1666
- const d = new ee({ width: u, height: i, pixels: [], pixelType: "U8", mask: c, statistics: [] });
1667
- for (l = 0; l < 3; l++) {
1668
- for (s = new Uint8Array(f), a = 0; a < f; a++)
1669
- s[a] = n[4 * a + l];
1670
- d.addData({ pixels: s });
1671
- }
1672
- return d.updateStatistics(), d;
1673
- }
1674
- async function no(e, t, r, o) {
1675
- const u = new wr(), i = { applyJpegMask: !1, format: t, ...r }, f = await u.decode(e, i, o), n = new ee(f);
1676
- return n.updateStatistics(), n;
1677
- }
1678
- function tr(e) {
1679
- if (e == null)
1680
- throw new pe("rasterCodec:decode", "parameter encodeddata is required.");
1681
- const t = new Uint8Array(e, 0, 10);
1682
- let r = "";
1683
- return t[0] === 255 && t[1] === 216 ? r = "jpg" : t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71 ? r = "png" : t[0] === 67 && t[1] === 110 && t[2] === 116 && t[3] === 90 && t[4] === 73 && t[5] === 109 && t[6] === 97 && t[7] === 103 && t[8] === 101 && t[9] === 32 ? r = "lerc" : t[0] === 76 && t[1] === 101 && t[2] === 114 && t[3] === 99 && t[4] === 50 && t[5] === 32 ? r = "lerc2" : t[0] === 73 && t[1] === 73 && t[2] === 42 && t[3] === 0 || t[0] === 77 && t[1] === 77 && t[2] === 0 && t[3] === 42 || t[0] === 73 && t[1] === 73 && t[2] === 43 && t[3] === 0 || t[0] === 77 && t[1] === 77 && t[2] === 0 && t[3] === 43 ? r = "tiff" : t[0] === 71 && t[1] === 73 && t[2] === 70 ? r = "gif" : t[0] === 66 && t[1] === 77 ? r = "bmp" : String.fromCharCode.apply(null, t).toLowerCase().includes("error") && (r = "error"), r;
1684
- }
1685
- function io(e) {
1686
- let t = null;
1687
- switch (e) {
1688
- case "lerc":
1689
- case "lerc2":
1690
- t = Yr;
1691
- break;
1692
- case "jpg":
1693
- t = ro;
1694
- break;
1695
- case "png":
1696
- t = oo;
1697
- break;
1698
- case "bsq":
1699
- case "bip":
1700
- t = (r, o) => to(r, o, e);
1701
- break;
1702
- case "tiff":
1703
- t = Xr;
1704
- break;
1705
- case "deflate":
1706
- t = Qr;
1707
- break;
1708
- case "lzw":
1709
- t = eo;
1710
- break;
1711
- case "error":
1712
- t = () => {
1713
- throw new pe("rasterCodec:decode", "input data contains error");
1714
- };
1715
- break;
1716
- default:
1717
- t = () => {
1718
- throw new pe("rasterCodec:decode", "unsupported raster format");
1719
- };
1720
- }
1721
- return t;
1722
- }
1723
- function ao(e) {
1724
- let t = null, r = null;
1725
- switch (e ? e.toLowerCase() : "f32") {
1726
- case "u1":
1727
- case "u2":
1728
- case "u4":
1729
- case "u8":
1730
- r = 255, t = Uint8Array;
1731
- break;
1732
- case "u16":
1733
- r = r || 65535, t = Uint16Array;
1734
- break;
1735
- case "u32":
1736
- r = r || 2 ** 32 - 1, t = Uint32Array;
1737
- break;
1738
- case "s8":
1739
- r = r || -128, t = Int8Array;
1740
- break;
1741
- case "s16":
1742
- r = r || -32768, t = Int16Array;
1743
- break;
1744
- case "s32":
1745
- r = r || 0 - 2 ** 31, t = Int32Array;
1746
- break;
1747
- default:
1748
- t = Float32Array;
1749
- }
1750
- return { pixelTypeCtor: t, noDataValue: r };
1751
- }
1752
- function so(e, t = 1) {
1753
- if (!e)
1754
- return;
1755
- const { pixels: r, width: o, height: u, mask: i } = e;
1756
- if (!r || r.length === 0)
1757
- return;
1758
- const f = r.length, n = o - 1, s = u - 1, l = [];
1759
- let a, c, d, C, y, b, S = null;
1760
- const h = ee.getPixelArrayConstructor(e.pixelType);
1761
- if (t === 0) {
1762
- for (a = 0; a < f; a++) {
1763
- for (y = r[a], b = new h(n * s), c = 0; c < s; c++)
1764
- for (C = c * o, d = 0; d < n; d++)
1765
- b[c * n + d] = y[C + d];
1766
- l.push(b);
1767
- }
1768
- if (i != null)
1769
- for (S = new Uint8Array(n * s), c = 0; c < s; c++)
1770
- for (C = c * o, d = 0; d < n; d++)
1771
- S[c * n + d] = i[C + d];
1772
- } else {
1773
- for (a = 0; a < f; a++) {
1774
- for (y = r[a], b = new h(n * s), c = 0; c < s; c++)
1775
- for (C = c * o, d = 0; d < n; d++)
1776
- b[c * n + d] = (y[C + d] + y[C + d + 1] + y[C + o + d] + y[C + o + d + 1]) / 4;
1777
- l.push(b);
1778
- }
1779
- if (i)
1780
- for (S = new Uint8Array(n * s), c = 0; c < s; c++)
1781
- for (C = c * o, d = 0; d < n; d++)
1782
- S[c * n + d] = Math.min.apply(null, [i[C + d], i[C + d + 1], i[C + o + d], i[C + o + d + 1]]);
1783
- }
1784
- e.width = n, e.height = s, e.mask = S, e.pixels = l;
1785
- }
1786
- function $o(e) {
1787
- let t = tr(e);
1788
- return t === "lerc2" ? t = "lerc" : t === "error" && (t = ""), t;
1789
- }
1790
- async function Vo(e, t = {}, r) {
1791
- var n;
1792
- if (e == null)
1793
- throw new pe("rasterCodec:decode", "missing encodeddata parameter.");
1794
- let o = (n = t.format) == null ? void 0 : n.toLowerCase();
1795
- if (!(o !== "bsq" && o !== "bip" || t.width != null && t.height != null))
1796
- throw new pe("rasterCodec:decode", "requires width and height in options parameter.");
1797
- if (o === "tiff" && t.customOptions)
1798
- return Zr(e, t);
1799
- if ((!o || o !== "bsq" && o !== "bip" && o !== "deflate" && o !== "lzw") && (o = tr(e)), t.useCanvas && Jr.has(o))
1800
- return no(e, o, t, r);
1801
- const u = io(o);
1802
- let i;
1803
- t.isPoint && ((t = { ...t }).width != null && t.width++, t.height != null && t.height++);
1804
- const { offsets: f } = t;
1805
- if (f && f.length > 1) {
1806
- const s = f.map((c, d) => u(e.slice(c, f[d + 1]), t)), l = await Promise.all(s);
1807
- i = l[0], i.pixels = l.map((c) => c.pixels[0]);
1808
- const a = l.map((c) => c.mask);
1809
- l.some((c) => c != null) && (a.forEach((c, d) => {
1810
- c == null && (a[d] = new Uint8Array(i.width * i.height).fill(255));
1811
- }), i.bandMasks = a, i.mask = ee.combineBandMasks(a)), i.updateStatistics();
1812
- } else
1813
- i = await u(e, { ...t, offset: (f == null ? void 0 : f[0]) ?? t.offset });
1814
- return o !== "jpg" && t.noDataValue != null && i.depthCount === 1 && ut(i, t.noDataValue, { customFloatTolerance: t.tolerance }), t.isPoint && so(i), i;
1815
- }
1816
- var it;
1817
- function be(e) {
1818
- return e = Number(e), isNaN(e) ? void 0 : e;
1819
- }
1820
- let ue = it = class extends De {
1821
- constructor() {
1822
- super(...arguments), this.name = null, this.minWavelength = void 0, this.maxWavelength = void 0, this.radianceBias = void 0, this.radianceGain = void 0, this.reflectanceBias = void 0, this.reflectanceGain = void 0, this.solarIrradiance = void 0;
1823
- }
1824
- clone() {
1825
- return new it({ name: this.name, minWavelength: this.minWavelength, maxWavelength: this.maxWavelength, radianceBias: this.radianceBias, radianceGain: this.radianceGain, reflectanceBias: this.reflectanceBias, reflectanceGain: this.reflectanceGain, solarIrradiance: this.solarIrradiance });
1826
- }
1827
- };
1828
- D([B({ json: { name: "BandName", write: !0 } })], ue.prototype, "name", void 0), D([B({ json: { name: "WavelengthMin", read: { reader: be }, write: !0 } })], ue.prototype, "minWavelength", void 0), D([B({ json: { name: "WavelengthMax", read: { reader: be }, write: !0 } })], ue.prototype, "maxWavelength", void 0), D([B({ json: { name: "RadianceBias", read: { reader: be }, write: !0 } })], ue.prototype, "radianceBias", void 0), D([B({ json: { name: "RadianceGain", read: { reader: be }, write: !0 } })], ue.prototype, "radianceGain", void 0), D([B({ json: { name: "ReflectanceBias", read: { reader: be }, write: !0 } })], ue.prototype, "reflectanceBias", void 0), D([B({ json: { name: "ReflectanceGain", read: { reader: be }, write: !0 } })], ue.prototype, "reflectanceGain", void 0), D([B({ json: { name: "SolarIrradiance", read: { reader: be }, write: !0 } })], ue.prototype, "solarIrradiance", void 0), ue = it = D([Oe("esri.layers.support.RasterBandInfo")], ue);
1829
- const Lt = ue;
1830
- var at;
1831
- function Me(e) {
1832
- return e = Number(e), isNaN(e) ? void 0 : e;
1833
- }
1834
- let ae = at = class extends De {
1835
- constructor() {
1836
- super(...arguments), this.acquisitionDate = void 0, this.cloudCover = void 0, this.productName = void 0, this.sensorName = null, this.sensorAzimuth = void 0, this.sensorElevation = void 0, this.sunAzimuth = void 0, this.sunElevation = void 0;
1837
- }
1838
- readAcquisitionDate(e) {
1839
- return new Date(e);
1840
- }
1841
- writeAcquisitionDate(e, t) {
1842
- t.AcquisitionDate = e.getTime();
1843
- }
1844
- clone() {
1845
- return new at({ acquisitionDate: this.acquisitionDate, cloudCover: this.cloudCover, productName: this.productName, sensorName: this.sensorName, sensorAzimuth: this.sensorAzimuth, sensorElevation: this.sensorElevation, sunAzimuth: this.sunAzimuth, sunElevation: this.sunElevation });
1846
- }
1847
- };
1848
- D([B({ json: { name: "AcquisitionDate", write: !0 } })], ae.prototype, "acquisitionDate", void 0), D([fr("acquisitionDate")], ae.prototype, "readAcquisitionDate", null), D([dr("acquisitionDate")], ae.prototype, "writeAcquisitionDate", null), D([B({ json: { name: "CloudCover", read: { reader: Me }, write: !0 } })], ae.prototype, "cloudCover", void 0), D([B({ json: { name: "ProductName", write: !0 } })], ae.prototype, "productName", void 0), D([B({ json: { name: "SensorName", write: !0 } })], ae.prototype, "sensorName", void 0), D([B({ json: { name: "SensorAzimuth", read: { reader: Me }, write: !0 } })], ae.prototype, "sensorAzimuth", void 0), D([B({ json: { name: "SensorElevation", read: { reader: Me }, write: !0 } })], ae.prototype, "sensorElevation", void 0), D([B({ json: { name: "SunAzimuth", read: { reader: Me }, write: !0 } })], ae.prototype, "sunAzimuth", void 0), D([B({ json: { name: "SunElevation", read: { reader: Me }, write: !0 } })], ae.prototype, "sunElevation", void 0), ae = at = D([Oe("esri.layers.support.RasterSensorInfo")], ae);
1849
- const lo = ae;
1850
- var st;
1851
- let Z = st = class extends De {
1852
- constructor() {
1853
- super(...arguments), this.blockWidth = void 0, this.blockHeight = void 0, this.compression = null, this.origin = null, this.firstPyramidLevel = null, this.maximumPyramidLevel = null, this.pyramidScalingFactor = 2, this.pyramidBlockWidth = null, this.pyramidBlockHeight = null, this.isVirtualTileInfo = !1, this.tileInfo = null, this.transposeInfo = null, this.blockBoundary = null;
1854
- }
1855
- clone() {
1856
- return new st({ blockWidth: this.blockWidth, blockHeight: this.blockHeight, compression: this.compression, origin: Q(this.origin), firstPyramidLevel: this.firstPyramidLevel, maximumPyramidLevel: this.maximumPyramidLevel, pyramidResolutions: Q(this.pyramidResolutions), pyramidScalingFactor: this.pyramidScalingFactor, pyramidBlockWidth: this.pyramidBlockWidth, pyramidBlockHeight: this.pyramidBlockHeight, isVirtualTileInfo: this.isVirtualTileInfo, tileInfo: Q(this.tileInfo), transposeInfo: Q(this.transposeInfo), blockBoundary: Q(this.blockBoundary) });
1857
- }
1858
- };
1859
- D([B({ type: Number, json: { write: !0 } })], Z.prototype, "blockWidth", void 0), D([B({ type: Number, json: { write: !0 } })], Z.prototype, "blockHeight", void 0), D([B({ type: String, json: { write: !0 } })], Z.prototype, "compression", void 0), D([B({ type: pr, json: { write: !0 } })], Z.prototype, "origin", void 0), D([B({ type: Number, json: { write: !0 } })], Z.prototype, "firstPyramidLevel", void 0), D([B({ type: Number, json: { write: !0 } })], Z.prototype, "maximumPyramidLevel", void 0), D([B({ json: { write: !0 } })], Z.prototype, "pyramidResolutions", void 0), D([B({ type: Number, json: { write: !0 } })], Z.prototype, "pyramidScalingFactor", void 0), D([B({ type: Number, json: { write: !0 } })], Z.prototype, "pyramidBlockWidth", void 0), D([B({ type: Number, json: { write: !0 } })], Z.prototype, "pyramidBlockHeight", void 0), D([B({ type: Boolean, json: { write: !0 } })], Z.prototype, "isVirtualTileInfo", void 0), D([B({ json: { write: !0 } })], Z.prototype, "tileInfo", void 0), D([B()], Z.prototype, "transposeInfo", void 0), D([B()], Z.prototype, "blockBoundary", void 0), Z = st = D([Oe("esri.layers.support.RasterStorageInfo")], Z);
1860
- const uo = Z;
1861
- var lt;
1862
- let K = lt = class extends De {
1863
- constructor(e) {
1864
- super(e), this.attributeTable = null, this.bandCount = null, this.colormap = null, this.extent = null, this.format = void 0, this.height = null, this.width = null, this.histograms = null, this.keyProperties = {}, this.multidimensionalInfo = null, this.noDataValue = null, this.pixelSize = null, this.pixelType = null, this.isPseudoSpatialReference = !1, this.spatialReference = null, this.statistics = null, this.storageInfo = null, this.transform = null;
1865
- }
1866
- get bandInfos() {
1867
- const e = this.keyProperties.BandProperties, { bandCount: t } = this;
1868
- if (!(e != null && e.length) || e.length < t) {
1869
- const o = [];
1870
- for (let u = 1; u <= t; u++)
1871
- o.push(new Lt({ name: "band_" + u }));
1872
- return o;
1873
- }
1874
- const r = e.map((o) => Lt.fromJSON(o));
1875
- for (let o = 0; o < r.length; o++)
1876
- r[o].name = r[o].name || "band_" + (o + 1);
1877
- return r;
1878
- }
1879
- get dataType() {
1880
- var t, r;
1881
- const e = ((r = (t = this.keyProperties) == null ? void 0 : t.DataType) == null ? void 0 : r.toLowerCase()) ?? "generic";
1882
- return e === "stdtime" ? "standard-time" : e;
1883
- }
1884
- get nativeExtent() {
1885
- return this._get("nativeExtent") || this.extent;
1886
- }
1887
- set nativeExtent(e) {
1888
- e && this._set("nativeExtent", e);
1889
- }
1890
- get nativePixelSize() {
1891
- if (this.transform == null || !this.transform.affectsPixelSize)
1892
- return this.pixelSize;
1893
- const e = this.nativeExtent;
1894
- return { x: e.width / this.width, y: e.height / this.height };
1895
- }
1896
- get hasMultidimensionalTranspose() {
1897
- var e;
1898
- return !!((e = this.storageInfo) != null && e.transposeInfo);
1899
- }
1900
- get sensorInfo() {
1901
- var e;
1902
- if ((e = this.keyProperties) != null && e.SensorName)
1903
- return lo.fromJSON(this.keyProperties);
1904
- }
1905
- clone() {
1906
- return new lt({ attributeTable: Q(this.attributeTable), bandCount: this.bandCount, colormap: Q(this.colormap), extent: Q(this.extent), nativePixelSize: Q(this.nativePixelSize), format: this.format, height: this.height, width: this.width, histograms: Q(this.histograms), keyProperties: Q(this.keyProperties), multidimensionalInfo: Q(this.multidimensionalInfo), noDataValue: this.noDataValue, pixelSize: Q(this.pixelSize), pixelType: this.pixelType, isPseudoSpatialReference: this.isPseudoSpatialReference, spatialReference: Q(this.spatialReference), statistics: Q(this.statistics), storageInfo: Q(this.storageInfo), transform: Q(this.transform) });
1907
- }
1908
- };
1909
- D([B({ json: { write: !0 } })], K.prototype, "attributeTable", void 0), D([B({ json: { write: !0 } })], K.prototype, "bandCount", void 0), D([B({ readOnly: !0 })], K.prototype, "bandInfos", null), D([B({ json: { write: !0 } })], K.prototype, "colormap", void 0), D([B({ type: String, readOnly: !0 })], K.prototype, "dataType", null), D([B({ type: gt, json: { write: !0 } })], K.prototype, "extent", void 0), D([B({ type: gt, json: { write: !0 } })], K.prototype, "nativeExtent", null), D([B({ json: { write: !0 } })], K.prototype, "nativePixelSize", null), D([B({ json: { write: !0 } })], K.prototype, "format", void 0), D([B({ json: { write: !0 } })], K.prototype, "height", void 0), D([B({ json: { write: !0 } })], K.prototype, "width", void 0), D([B({ json: { write: !0 } })], K.prototype, "hasMultidimensionalTranspose", null), D([B({ json: { write: !0 } })], K.prototype, "histograms", void 0), D([B({ json: { write: !0 } })], K.prototype, "keyProperties", void 0), D([B({ json: { write: !0 } })], K.prototype, "multidimensionalInfo", void 0), D([B({ json: { write: !0 } })], K.prototype, "noDataValue", void 0), D([B({ json: { write: !0 } })], K.prototype, "pixelSize", void 0), D([B({ json: { write: !0 } })], K.prototype, "pixelType", void 0), D([B()], K.prototype, "isPseudoSpatialReference", void 0), D([B({ readOnly: !0 })], K.prototype, "sensorInfo", null), D([B({ type: mr, json: { write: !0 } })], K.prototype, "spatialReference", void 0), D([B({ json: { write: !0 } })], K.prototype, "statistics", void 0), D([B({ type: uo, json: { write: !0 } })], K.prototype, "storageInfo", void 0), D([B({ json: { write: !0 } })], K.prototype, "transform", void 0), K = lt = D([Oe("esri.layers.support.RasterInfo")], K);
1910
- const co = K, te = 1, xe = 1 / 111e3;
1911
- function rr(e) {
1912
- let { altitude: t, azimuth: r } = e;
1913
- const { hillshadeType: o, pixelSizePower: u = 1, pixelSizeFactor: i = 1, scalingType: f, isGCS: n, resolution: s } = e, l = o === "multi-directional" ? 2 * e.zFactor : e.zFactor, { x: a, y: c } = s;
1914
- let d = l / (8 * a), C = l / (8 * c);
1915
- if (n && l > 1e-3 && (d /= xe, C /= xe), f === "adjusted")
1916
- if (n) {
1917
- const A = a * xe, P = c * xe;
1918
- d = (l + A ** u * i) / (8 * A), C = (l + P ** u * i) / (8 * P);
1919
- } else
1920
- d = (l + a ** u * i) / (8 * a), C = (l + c ** u * i) / (8 * c);
1921
- let y = (90 - t) * Math.PI / 180, b = Math.cos(y), S = (360 - r + 90) * Math.PI / 180, h = Math.sin(y) * Math.cos(S), p = Math.sin(y) * Math.sin(S);
1922
- const m = [315, 270, 225, 360, 180, 0], g = [60, 60, 60, 60, 60, 90], w = new Float32Array([3, 5, 3, 2, 1, 4]), k = w.reduce((A, P) => A + P), v = w.map((A) => A / k), I = o === "multi-directional" ? m.length : 1, T = new Float32Array(6), E = new Float32Array(6), x = new Float32Array(6);
1923
- if (o === "multi-directional")
1924
- for (let A = 0; A < I; A++)
1925
- t = g[A], r = m[A], y = (90 - t) * Math.PI / 180, b = Math.cos(y), S = (360 - r + 90) * Math.PI / 180, h = Math.sin(y) * Math.cos(S), p = Math.sin(y) * Math.sin(S), T[A] = b, E[A] = h, x[A] = p;
1926
- else
1927
- T.fill(b), E.fill(h), x.fill(p);
1928
- return { resolution: s, factor: [d, C], sinZcosA: h, sinZsinA: p, cosZ: b, sinZcosAs: E, sinZsinAs: x, cosZs: T, weights: v, hillshadeType: ["traditional", "multi-directional"].indexOf(o) };
1929
- }
1930
- function He(e, t) {
1931
- const { width: r, height: o } = e, u = r * o, i = new Uint8Array(u), f = e.mask != null;
1932
- let n;
1933
- if (f) {
1934
- n = new Uint8Array(e.mask);
1935
- for (let k = 0; k < n.length; k++)
1936
- n[k] && (i[k] = 1, n[k] = 1);
1937
- }
1938
- const s = e.pixels[0], l = new Float32Array(u), a = new Float32Array(u);
1939
- let c, d = 0;
1940
- if (t) {
1941
- const { resolution: k } = t, v = k ? (k.x + k.y) / 2 : 1;
1942
- d = 200 * t.zFactor / (v * v), c = new Float32Array(u);
1943
- }
1944
- const C = t == null ? void 0 : t.curvatureType;
1945
- let y, b, S, h, p, m, g, w;
1946
- for (let k = te; k < o - te; k++) {
1947
- const v = k * r;
1948
- for (let I = te; I < r - te; I++) {
1949
- const T = v + I;
1950
- if (!n || n[T] !== 0) {
1951
- if (n) {
1952
- if (n[T - r - 1] + n[T - r] + n[T - r + 1] + n[T - 1] + n[T + 1] + n[T + r - 1] + n[T + r] + n[T + r + 1] < 7) {
1953
- i[T] = 0;
1954
- continue;
1955
- }
1956
- y = n[T - r - 1] ? s[T - r - 1] : s[T], b = n[T - r] ? s[T - r] : s[T], S = n[T - r + 1] ? s[T - r + 1] : s[T], h = n[T - 1] ? s[T - 1] : s[T], p = n[T + 1] ? s[T + 1] : s[T], m = n[T + r - 1] ? s[T + r - 1] : s[T], g = n[T + r] ? s[T + r] : s[T], w = n[T + r + 1] ? s[T + r + 1] : s[T];
1957
- } else
1958
- y = s[T - r - 1], b = s[T - r], S = s[T - r + 1], h = s[T - 1], p = s[T + 1], m = s[T + r - 1], g = s[T + r], w = s[T + r + 1];
1959
- if (l[T] = S + p + p + w - (y + h + h + m), a[T] = m + g + g + w - (y + b + b + S), c != null) {
1960
- const E = s[T], x = 0.5 * (h + p) - E, A = 0.5 * (b + g) - E;
1961
- if (C === "standard")
1962
- c[T] = -d * (x + A);
1963
- else {
1964
- const P = (-y + S + m - w) / 4, O = (-h + p) / 2, R = (b - g) / 2, N = O * O, M = R * R, _ = N + M;
1965
- _ && (c[T] = C === "profile" ? d * (x * N + A * M + P * O * R) / _ : -d * (x * M + A * N - P * O * R) / _);
1966
- }
1967
- }
1968
- }
1969
- }
1970
- }
1971
- return { outMask: f ? i : null, dzxs: l, dzys: a, curvatures: c };
1972
- }
1973
- function Ke(e, t, r) {
1974
- for (let o = 0; o < r; o++)
1975
- e[o * t] = e[o * t + 1], e[(o + 1) * t - 1] = e[(o + 1) * t - 2];
1976
- for (let o = 1; o < t - 1; o++)
1977
- e[o] = e[o + t], e[o + (r - 1) * t] = e[o + (r - 2) * t];
1978
- }
1979
- function ho(e, t) {
1980
- if (!Se(e))
1981
- return e;
1982
- const { factor: r, sinZcosA: o, sinZsinA: u, cosZ: i, sinZcosAs: f, sinZsinAs: n, cosZs: s, weights: l } = rr(t), [a, c] = r, d = t.hillshadeType === "traditional", { width: C, height: y } = e, b = new Uint8Array(C * y), { dzxs: S, dzys: h, outMask: p } = He(e);
1983
- for (let m = te; m < y - te; m++) {
1984
- const g = m * C;
1985
- for (let w = te; w < C - te; w++) {
1986
- const k = g + w;
1987
- if (!p || p[k]) {
1988
- const v = S[k] * a, I = h[k] * c, T = Math.sqrt(1 + v * v + I * I);
1989
- let E = 0;
1990
- if (d) {
1991
- let x = 255 * (i + u * I - o * v) / T;
1992
- x < 0 && (x = 0), E = x;
1993
- } else {
1994
- const x = n.length;
1995
- for (let A = 0; A < x; A++) {
1996
- let P = 255 * (s[A] + n[A] * I - f[A] * v) / T;
1997
- P < 0 && (P = 0), E += P * l[A];
1998
- }
1999
- }
2000
- b[k] = 255 & E;
2001
- }
2002
- }
2003
- }
2004
- return Ke(b, C, y), new ee({ width: C, height: y, pixels: [b], mask: p, pixelType: "u8", validPixelCount: e.validPixelCount, statistics: [{ minValue: 0, maxValue: 255 }] });
2005
- }
2006
- function fo(e, t, r, o) {
2007
- if (!Se(e) || !Se(t))
2008
- return;
2009
- const { min: u, max: i } = o, f = e.pixels[0], { pixels: n, mask: s } = t, l = n[0], a = 255.00001 / (i - u), c = new Uint8ClampedArray(l.length), d = new Uint8ClampedArray(l.length), C = new Uint8ClampedArray(l.length), y = r.length - 1;
2010
- for (let b = 0; b < l.length; b++) {
2011
- if (s && s[b] === 0)
2012
- continue;
2013
- const S = Math.floor((l[b] - u) * a), [h, p] = r[S < 0 ? 0 : S > y ? y : S], m = f[b], g = m * p, w = g * (1 - Math.abs(h % 2 - 1)), k = m - g;
2014
- switch (Math.floor(h)) {
2015
- case 0:
2016
- c[b] = g + k, d[b] = w + k, C[b] = k;
2017
- break;
2018
- case 1:
2019
- c[b] = w + k, d[b] = g + k, C[b] = k;
2020
- break;
2021
- case 2:
2022
- c[b] = k, d[b] = g + k, C[b] = w + k;
2023
- break;
2024
- case 3:
2025
- c[b] = k, d[b] = w + k, C[b] = g + k;
2026
- break;
2027
- case 4:
2028
- c[b] = w + k, d[b] = k, C[b] = g + k;
2029
- break;
2030
- case 5:
2031
- case 6:
2032
- c[b] = g + k, d[b] = k, C[b] = w + k;
2033
- }
2034
- }
2035
- e.pixels = [c, d, C], e.updateStatistics();
2036
- }
2037
- function _o(e, t) {
2038
- if (!Se(e))
2039
- return e;
2040
- const r = t.zFactor, o = t.pixelSizePower ?? 1, u = t.pixelSizeFactor ?? 1, i = t.slopeType, f = t.isGCS, { x: n, y: s } = t.resolution;
2041
- let l = r / (8 * n), a = r / (8 * s);
2042
- f && Math.abs(r - 1) < 1e-4 && (l /= xe, a /= xe), i === "adjusted" && (l = (r + n ** o * u) / (8 * n), a = (r + s ** o * u) / (8 * s));
2043
- const { dzxs: c, dzys: d, outMask: C } = He(e), { width: y, height: b } = e, S = new Float32Array(y * b);
2044
- for (let p = te; p < b - te; p++) {
2045
- const m = p * y;
2046
- for (let g = te; g < y - te; g++) {
2047
- const w = m + g;
2048
- if (!C || C[w]) {
2049
- const k = c[w] * l, v = d[w] * a, I = Math.sqrt(k * k + v * v);
2050
- S[m + g] = i === "percent-rise" ? 100 * I : 57.2957795 * Math.atan(I);
2051
- }
2052
- }
2053
- }
2054
- Ke(S, y, b);
2055
- const h = new ee({ width: y, height: b, pixels: [S], mask: C, pixelType: "f32", validPixelCount: e.validPixelCount });
2056
- return h.updateStatistics(), h;
2057
- }
2058
- function jo(e, t = {}) {
2059
- if (!Se(e))
2060
- return e;
2061
- const { resolution: r } = t, o = r ? 1 / r.x : 1, u = r ? 1 / r.y : 1, { dzxs: i, dzys: f, outMask: n } = He(e), { width: s, height: l } = e, a = new Float32Array(s * l);
2062
- for (let c = te; c < l - te; c++) {
2063
- const d = c * s;
2064
- for (let C = te; C < s - te; C++) {
2065
- const y = d + C;
2066
- if (!n || n[y]) {
2067
- const b = i[y] * o, S = f[y] * u;
2068
- let h = -1;
2069
- b === 0 && S === 0 || (h = 90 - 57.29578 * Math.atan2(S, -b), h < 0 && (h += 360), h === 360 ? h = 0 : h > 360 && (h %= 360)), a[d + C] = h;
2070
- }
2071
- }
2072
- }
2073
- return Ke(a, s, l), new ee({ width: s, height: l, pixels: [a], mask: n, pixelType: "f32", validPixelCount: e.validPixelCount, statistics: [{ minValue: -1, maxValue: 360 }] });
2074
- }
2075
- function zo(e, t) {
2076
- if (!Se(e))
2077
- return e;
2078
- const { curvatures: r, outMask: o } = He(e, t), { width: u, height: i } = e;
2079
- Ke(r, u, i);
2080
- const f = new ee({ width: u, height: i, pixels: [r], mask: o, pixelType: "f32", validPixelCount: e.validPixelCount });
2081
- return f.updateStatistics(), f;
2082
- }
2083
- const Wo = ["random", "ndvi", "ndvi2", "ndvi3", "elevation", "gray", "hillshade"], or = [{ id: "aspect", type: "multipart", colorRamps: [{ fromColor: [190, 190, 190], toColor: [255, 45, 8] }, { fromColor: [255, 45, 8], toColor: [255, 181, 61] }, { fromColor: [255, 181, 61], toColor: [255, 254, 52] }, { fromColor: [255, 254, 52], toColor: [0, 251, 50] }, { fromColor: [0, 251, 50], toColor: [255, 254, 52] }, { fromColor: [0, 253, 255], toColor: [0, 181, 255] }, { fromColor: [0, 181, 255], toColor: [26, 35, 253] }, { fromColor: [26, 35, 253], toColor: [255, 57, 251] }, { fromColor: [255, 57, 251], toColor: [255, 45, 8] }] }, { id: "black-to-white", fromColor: [0, 0, 0], toColor: [255, 255, 255] }, { id: "blue-bright", fromColor: [204, 204, 255], toColor: [0, 0, 224] }, { id: "blue-light-to-dark", fromColor: [211, 229, 232], toColor: [46, 100, 140] }, { id: "blue-green-bright", fromColor: [203, 245, 234], toColor: [48, 207, 146] }, { id: "blue-green-light-to-dark", fromColor: [216, 242, 237], toColor: [21, 79, 74] }, { id: "brown-light-to-dark", fromColor: [240, 236, 170], toColor: [102, 72, 48] }, { id: "brown-to-blue-green-diverging-right", type: "multipart", colorRamps: [{ fromColor: [156, 85, 31], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [33, 130, 145] }] }, { id: "brown-to-blue-green-diverging-dark", type: "multipart", colorRamps: [{ fromColor: [110, 70, 45], toColor: [204, 204, 102] }, { fromColor: [204, 204, 102], toColor: [48, 100, 102] }] }, { id: "coefficient-bias", fromColor: [214, 214, 255], toColor: [0, 57, 148] }, { id: "cold-to-hot-diverging", type: "multipart", colorRamps: [{ fromColor: [69, 117, 181], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [214, 47, 39] }] }, { id: "condition-number", type: "multipart", colorRamps: [{ fromColor: [0, 97, 0], toColor: [255, 255, 0] }, { fromColor: [255, 255, 0], toColor: [255, 34, 0] }] }, { id: "cyan-to-purple", type: "multipart", colorRamps: [{ fromColor: [0, 245, 245], toColor: [0, 0, 245] }, { fromColor: [0, 0, 245], toColor: [245, 0, 245] }] }, { id: "cyan-light-to-blue-dark", type: "multipart", colorRamps: [{ fromColor: [182, 237, 240], toColor: [31, 131, 224] }, { fromColor: [31, 131, 224], toColor: [9, 9, 145] }] }, { id: "distance", fromColor: [255, 200, 0], toColor: [0, 0, 255] }, { id: "elevation1", type: "multipart", colorRamps: [{ fromColor: [175, 240, 233], toColor: [255, 255, 179] }, { fromColor: [255, 255, 179], toColor: [0, 128, 64] }, { fromColor: [0, 128, 64], toColor: [252, 186, 3] }, { fromColor: [252, 186, 3], toColor: [128, 0, 0] }, { fromColor: [120, 0, 0], toColor: [105, 48, 13] }, { fromColor: [105, 48, 13], toColor: [171, 171, 171] }, { fromColor: [171, 171, 171], toColor: [255, 252, 255] }] }, { id: "elevation2", type: "multipart", colorRamps: [{ fromColor: [118, 219, 211], toColor: [255, 255, 199] }, { fromColor: [255, 255, 199], toColor: [255, 255, 128] }, { fromColor: [255, 255, 128], toColor: [217, 194, 121] }, { fromColor: [217, 194, 121], toColor: [135, 96, 38] }, { fromColor: [135, 96, 38], toColor: [150, 150, 181] }, { fromColor: [150, 150, 181], toColor: [181, 150, 181] }, { fromColor: [181, 150, 181], toColor: [255, 252, 255] }] }, { id: "errors", fromColor: [255, 235, 214], toColor: [196, 10, 10] }, { id: "gray-light-to-dark", fromColor: [219, 219, 219], toColor: [69, 69, 69] }, { id: "green-bright", fromColor: [204, 255, 204], toColor: [14, 204, 14] }, { id: "green-light-to-dark", fromColor: [220, 245, 233], toColor: [34, 102, 51] }, { id: "green-to-blue", type: "multipart", colorRamps: [{ fromColor: [32, 204, 16], toColor: [0, 242, 242] }, { fromColor: [0, 242, 242], toColor: [2, 33, 227] }] }, { id: "orange-bright", fromColor: [255, 235, 204], toColor: [240, 118, 5] }, { id: "orange-light-to-dark", fromColor: [250, 233, 212], toColor: [171, 65, 36] }, { id: "partial-spectrum", type: "multipart", colorRamps: [{ fromColor: [242, 241, 162], toColor: [255, 255, 0] }, { fromColor: [255, 255, 0], toColor: [255, 0, 0] }, { fromColor: [252, 3, 69], toColor: [176, 7, 237] }, { fromColor: [176, 7, 237], toColor: [2, 29, 173] }] }, { id: "partial-spectrum-1-diverging", type: "multipart", colorRamps: [{ fromColor: [135, 38, 38], toColor: [240, 149, 12] }, { fromColor: [240, 149, 12], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [74, 80, 181] }, { fromColor: [74, 80, 181], toColor: [39, 32, 122] }] }, { id: "partial-spectrum-2-diverging", type: "multipart", colorRamps: [{ fromColor: [115, 77, 42], toColor: [201, 137, 52] }, { fromColor: [201, 137, 52], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [91, 63, 176] }, { fromColor: [91, 63, 176], toColor: [81, 13, 97] }] }, { id: "pink-to-yellow-green-diverging-bright", type: "multipart", colorRamps: [{ fromColor: [158, 30, 113], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [99, 110, 45] }] }, { id: "pink-to-yellow-green-diverging-dark", type: "multipart", colorRamps: [{ fromColor: [97, 47, 73], toColor: [204, 204, 102] }, { fromColor: [204, 204, 102], toColor: [22, 59, 15] }] }, { id: "precipitation", type: "multipart", colorRamps: [{ fromColor: [194, 82, 60], toColor: [237, 161, 19] }, { fromColor: [237, 161, 19], toColor: [255, 255, 0] }, { fromColor: [255, 255, 0], toColor: [0, 219, 0] }, { fromColor: [0, 219, 0], toColor: [32, 153, 143] }, { fromColor: [32, 153, 143], toColor: [11, 44, 122] }] }, { id: "prediction", type: "multipart", colorRamps: [{ fromColor: [40, 146, 199], toColor: [250, 250, 100] }, { fromColor: [250, 250, 100], toColor: [232, 16, 20] }] }, { id: "purple-bright", fromColor: [255, 204, 255], toColor: [199, 0, 199] }, { id: "purple-to-green-diverging-bright", type: "multipart", colorRamps: [{ fromColor: [77, 32, 150], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [20, 122, 11] }] }, { id: "purple-to-green-diverging-dark", type: "multipart", colorRamps: [{ fromColor: [67, 14, 89], toColor: [204, 204, 102] }, { fromColor: [204, 204, 102], toColor: [24, 79, 15] }] }, { id: "purple-blue-bright", fromColor: [223, 184, 230], toColor: [112, 12, 242] }, { id: "purple-blue-light-to-dark", fromColor: [229, 213, 242], toColor: [93, 44, 112] }, { id: "purple-red-bright", fromColor: [255, 204, 225], toColor: [199, 0, 99] }, { id: "purple-red-light-to-dark", fromColor: [250, 215, 246], toColor: [143, 17, 57] }, { id: "red-bright", fromColor: [255, 204, 204], toColor: [219, 0, 0] }, { id: "red-light-to-dark", fromColor: [255, 224, 224], toColor: [143, 10, 10] }, { id: "red-to-blue-diverging-bright", type: "multipart", colorRamps: [{ fromColor: [196, 69, 57], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [48, 95, 207] }] }, { id: "red-to-blue-diverging-dark", type: "multipart", colorRamps: [{ fromColor: [107, 13, 13], toColor: [204, 204, 102] }, { fromColor: [204, 204, 102], toColor: [13, 53, 97] }] }, { id: "red-to-green", type: "multipart", colorRamps: [{ fromColor: [245, 0, 0], toColor: [245, 245, 0] }, { fromColor: [245, 245, 0], toColor: [0, 245, 0] }] }, { id: "red-to-green-diverging-bright", type: "multipart", colorRamps: [{ fromColor: [186, 20, 20], toColor: [255, 255, 191] }, { fromColor: [255, 255, 191], toColor: [54, 145, 33] }] }, { id: "red-to-green-diverging-dark", type: "multipart", colorRamps: [{ fromColor: [97, 21, 13], toColor: [204, 204, 102] }, { fromColor: [204, 204, 102], toColor: [16, 69, 16] }] }, { id: "slope", type: "multipart", colorRamps: [{ fromColor: [56, 168, 0], toColor: [255, 255, 0] }, { fromColor: [255, 255, 0], toColor: [255, 0, 0] }] }, { id: "spectrum-full-bright", type: "multipart", colorRamps: [{ fromColor: [255, 0, 0], toColor: [255, 255, 0] }, { fromColor: [255, 255, 0], toColor: [0, 255, 255] }, { fromColor: [0, 255, 255], toColor: [0, 0, 255] }] }, { id: "spectrum-full-dark", type: "multipart", colorRamps: [{ fromColor: [153, 0, 0], toColor: [153, 153, 0] }, { fromColor: [153, 153, 0], toColor: [0, 153, 153] }, { fromColor: [0, 153, 153], toColor: [0, 0, 153] }] }, { id: "spectrum-full-light", type: "multipart", colorRamps: [{ fromColor: [255, 153, 153], toColor: [255, 255, 153] }, { fromColor: [255, 255, 153], toColor: [153, 255, 255] }, { fromColor: [153, 255, 255], toColor: [153, 153, 255] }] }, { id: "surface", type: "multipart", colorRamps: [{ fromColor: [112, 153, 89], toColor: [242, 238, 162] }, { fromColor: [242, 238, 162], toColor: [242, 206, 133] }, { fromColor: [242, 206, 133], toColor: [194, 140, 124] }, { fromColor: [194, 140, 124], toColor: [255, 242, 255] }] }, { id: "temperature", type: "multipart", colorRamps: [{ fromColor: [255, 252, 255], toColor: [255, 0, 255] }, { fromColor: [255, 0, 255], toColor: [0, 0, 255] }, { fromColor: [0, 0, 255], toColor: [0, 255, 255] }, { fromColor: [0, 255, 255], toColor: [0, 255, 0] }, { fromColor: [0, 255, 0], toColor: [255, 255, 0] }, { fromColor: [255, 255, 0], toColor: [255, 128, 0] }, { fromColor: [255, 128, 0], toColor: [128, 0, 0] }] }, { id: "white-to-black", fromColor: [255, 255, 255], toColor: [0, 0, 0] }, { id: "yellow-to-dark-red", type: "multipart", colorRamps: [{ fromColor: [255, 255, 128], toColor: [242, 167, 46] }, { fromColor: [242, 167, 46], toColor: [107, 0, 0] }] }, { id: "yellow-to-green-to-dark-blue", type: "multipart", colorRamps: [{ fromColor: [255, 255, 128], toColor: [56, 224, 9] }, { fromColor: [56, 224, 9], toColor: [26, 147, 171] }, { fromColor: [26, 147, 171], toColor: [12, 16, 120] }] }, { id: "yellow-to-red", fromColor: [245, 245, 0], toColor: [255, 0, 0] }, { id: "yellow-green-bright", fromColor: [236, 252, 204], toColor: [157, 204, 16] }, { id: "yellow-green-light-to-dark", fromColor: [215, 240, 175], toColor: [96, 107, 45] }], po = new Vt({ Aspect: "aspect", "Black to White": "black-to-white", "Blue Bright": "blue-bright", "Blue Light to Dark": "blue-light-to-dark", "Blue-Green Bright": "blue-green-bright", "Blue-Green Light to Dark": "blue-green-light-to-dark", "Brown Light to Dark": "brown-light-to-dark", "Brown to Blue Green Diverging, Bright": "brown-to-blue-green-diverging-right", "Brown to Blue Green Diverging, Dark": "brown-to-blue-green-diverging-dark", "Coefficient Bias": "coefficient-bias", "Cold to Hot Diverging": "cold-to-hot-diverging", "Condition Number": "condition-number", "Cyan to Purple": "cyan-to-purple", "Cyan-Light to Blue-Dark": "cyan-light-to-blue-dark", Distance: "distance", "Elevation #1": "elevation1", "Elevation #2": "elevation2", Errors: "errors", "Gray Light to Dark": "gray-light-to-dark", "Green Bright": "green-bright", "Green Light to Dark": "green-light-to-dark", "Green to Blue": "green-to-blue", "Orange Bright": "orange-bright", "Orange Light to Dark": "orange-light-to-dark", "Partial Spectrum": "partial-spectrum", "Partial Spectrum 1 Diverging": "partial-spectrum-1-diverging", "Partial Spectrum 2 Diverging": "partial-spectrum-2-diverging", "Pink to YellowGreen Diverging, Bright": "pink-to-yellow-green-diverging-bright", "Pink to YellowGreen Diverging, Dark": "pink-to-yellow-green-diverging-dark", Precipitation: "precipitation", Prediction: "prediction", "Purple Bright": "purple-bright", "Purple to Green Diverging, Bright": "purple-to-green-diverging-bright", "Purple to Green Diverging, Dark": "purple-to-green-diverging-dark", "Purple-Blue Bright": "purple-blue-bright", "Purple-Blue Light to Dark": "purple-blue-light-to-dark", "Purple-Red Bright": "purple-red-bright", "Purple-Red Light to Dark": "purple-red-light-to-dark", "Red Bright": "red-bright", "Red Light to Dark": "red-light-to-dark", "Red to Blue Diverging, Bright": "red-to-blue-diverging-bright", "Red to Blue Diverging, Dark": "red-to-blue-diverging-dark", "Red to Green": "red-to-green", "Red to Green Diverging, Bright": "red-to-green-diverging-bright", "Red to Green Diverging, Dark": "red-to-green-diverging-dark", Slope: "slope", "Spectrum-Full Bright": "spectrum-full-bright", "Spectrum-Full Dark": "spectrum-full-dark", "Spectrum-Full Light": "spectrum-full-light", Surface: "surface", Temperature: "temperature", "White to Black": "white-to-black", "Yellow to Dark Red": "yellow-to-dark-red", "Yellow to Green to Dark Blue": "yellow-to-green-to-dark-blue", "Yellow to Red": "yellow-to-red", "Yellow-Green Bright": "yellow-green-bright", "Yellow-Green Light to Dark": "yellow-green-light-to-dark" });
2084
- function Fe(e, t) {
2085
- if (!e || !t || e.length !== t.length)
2086
- return !1;
2087
- for (let r = 0; r < e.length; r++)
2088
- if (e[r] > t[r] + 2 || e[r] < t[r] - 2)
2089
- return !1;
2090
- return !0;
2091
- }
2092
- function Ot(e) {
2093
- const t = e.clone();
2094
- return t.fromColor = e.toColor, t.toColor = e.fromColor, t.algorithm = e.algorithm, t;
2095
- }
2096
- function mo(e) {
2097
- var t;
2098
- if (e.type === "multipart") {
2099
- const r = e.clone();
2100
- return (t = r.colorRamps) != null && t.length && (r.colorRamps = r.colorRamps.reverse().map((o) => Ot(o))), r;
2101
- }
2102
- return Ot(e);
2103
- }
2104
- function Dt(e, t) {
2105
- if (!e)
2106
- return;
2107
- const r = t ?? or;
2108
- let o = null;
2109
- return e.type === "algorithmic" ? r.some((u) => {
2110
- if (Fe(e.fromColor.toRgb(), u.fromColor) && Fe(e.toColor.toRgb(), u.toColor))
2111
- return o = u.id, !0;
2112
- }) : e.type === "multipart" && r.some((u) => {
2113
- const i = e.colorRamps, f = u.colorRamps;
2114
- if (i && f && i.length === f.length && !f.some((n, s) => {
2115
- if (!Fe(i[s].fromColor.toRgb(), new yt(n.fromColor).toRgb()) || !Fe(i[s].toColor.toRgb(), new yt(n.toColor).toRgb()))
2116
- return !0;
2117
- })) {
2118
- if (o)
2119
- return !0;
2120
- o = u.id;
2121
- }
2122
- }), o;
2123
- }
2124
- function go(e, t, r = !1) {
2125
- if (!e)
2126
- return;
2127
- let o = !1, u = Dt(e, t);
2128
- return u != null || r || (o = !0, u = Dt(e = mo(e), t)), u ? { id: u, inverted: o } : void 0;
2129
- }
2130
- function yo(e, t = !1) {
2131
- var o;
2132
- const r = typeof e == "string" ? e : (o = go(e, void 0, t)) == null ? void 0 : o.id;
2133
- return r ? po.toJSON(r) : null;
2134
- }
2135
- function Ho(e, t = "esriCIELabAlgorithm") {
2136
- const r = or.find(({ id: o }) => o === e);
2137
- return r ? r.colorRamps ? { type: "multipart", colorRamps: r.colorRamps.map((o) => ({ type: "algorithmic", algorithm: t, fromColor: [...o.fromColor], toColor: [...o.toColor] })) } : { type: "algorithmic", algorithm: t, fromColor: [...r.fromColor], toColor: [...r.toColor] } : null;
2138
- }
2139
- function nr(e) {
2140
- const t = (e = e || {}).numColors || 256, r = e.distanceOffset || 0, o = e.isCustomInterval != null ? e.isCustomInterval : e.distanceInterval !== null && e.distanceInterval !== 1 / (t - 1), u = e.distanceInterval || 1 / (t - 1);
2141
- return { ...e, numColors: t, distanceOffset: r, interpolateAlpha: !!e.interpolateAlpha, distanceInterval: u, isCustomInterval: o, weights: e.weights };
2142
- }
2143
- function Co(e, t, r) {
2144
- const { numColors: o, distanceOffset: u, distanceInterval: i, isCustomInterval: f } = r, n = e.s === 0, s = t.s === 0;
2145
- let l = e.h, a = t.h;
2146
- n && !s ? l = a : s && !n && (t = { ...t, h: l }, a = l);
2147
- let c, d = Math.abs(a - l);
2148
- const C = 360;
2149
- d < C / 2 ? c = (a - l) * i : (d = C - d, c = l > a ? d * i : -d * i);
2150
- const y = (t.s - e.s) * i, b = (t.v - e.v) * i;
2151
- let { s: S, v: h } = e, p = l;
2152
- if (u) {
2153
- const g = u / i;
2154
- p = (p + g * c + C) % C, S += g * y, h += g * b;
2155
- }
2156
- const m = [];
2157
- for (let g = 0; g < o - 1; g++)
2158
- m.push({ h: p, s: S, v: h }), p = (p + c + C) % C, S += y, h += b;
2159
- return m.push(f ? { h: p, s: S, v: h } : t), m;
2160
- }
2161
- function bo(e, t, r) {
2162
- const { numColors: o, distanceOffset: u, distanceInterval: i, isCustomInterval: f } = r;
2163
- let { l: n, a: s, b: l } = e;
2164
- const a = (t.l - n) * i, c = (t.a - s) * i, d = (t.b - l) * i, C = [];
2165
- if (u) {
2166
- const y = u / i;
2167
- n += y * a, s += y * c, l += y * d;
2168
- }
2169
- for (let y = 0; y < o - 1; y++)
2170
- C.push({ l: n, a: s, b: l }), n += a, s += c, l += d;
2171
- return C.push(f ? { l: n, a: s, b: l } : t), C;
2172
- }
2173
- function wo(e, t, r) {
2174
- const { numColors: o, distanceOffset: u, distanceInterval: i, isCustomInterval: f } = r, n = e.h, s = t.h, l = 2 * Math.PI;
2175
- let a;
2176
- if (n <= s) {
2177
- const p = s - n, m = s - n - l;
2178
- a = Math.abs(m) < Math.abs(p) ? m : p;
2179
- } else {
2180
- const p = s + l - n, m = s - n;
2181
- a = Math.abs(m) < Math.abs(p) ? m : p;
2182
- }
2183
- const c = a * i, d = (t.l - e.l) * i, C = (t.c - e.c) * i;
2184
- let { l: y, c: b, h: S } = e;
2185
- if (u) {
2186
- const p = u / i;
2187
- y += p * d, b += p * C, S = (S + p * c + l) % l;
2188
- }
2189
- const h = [];
2190
- for (let p = 0; p < o - 1; p++)
2191
- h.push({ l: y, c: b, h: S }), y += d, b += C, S = (S + c + l) % l;
2192
- return h.push(f ? { l: y, c: b, h: S } : t), h;
2193
- }
2194
- function ir(e, t) {
2195
- let { fromColor: r, toColor: o } = e;
2196
- r = [...r], o = [...o], r.length === 3 && (r = r.concat([255])), o.length === 3 && (o = o.concat([255]));
2197
- const u = e.algorithm || "esriCIELabAlgorithm", i = nr(t), { numColors: f, distanceOffset: n, isCustomInterval: s, interpolateAlpha: l } = i;
2198
- if (f === 1 && n === 0)
2199
- return [r];
2200
- if (f === 2 && n === 0 && !s)
2201
- return [r, o];
2202
- const a = { r: r[0], g: r[1], b: r[2] }, c = { r: o[0], g: o[1], b: o[2] }, d = u === "esriCIELabAlgorithm" ? bo(wt(a), wt(c), i) : u === "esriHSVAlgorithm" ? Co(_e(a), _e(c), i) : wo(vt(a), vt(c), i), C = [], y = r[3] ?? 255, b = ((o[3] ?? 255) - y) / (f - 1);
2203
- for (let S = 0; S < f; S++) {
2204
- const { r: h, g: p, b: m } = br(d[S]), g = l ? Math.round(y + b * S) : 255;
2205
- C.push([h, p, m, g]);
2206
- }
2207
- return C;
2208
- }
2209
- function vo(e, t) {
2210
- const { numColors: r, interpolateAlpha: o } = nr(t);
2211
- let u = t == null ? void 0 : t.weights;
2212
- const { colorRamps: i } = e;
2213
- if (u) {
2214
- const c = u.reduce((d, C) => d + C);
2215
- u = u.map((d) => d / c);
2216
- } else {
2217
- u = [];
2218
- for (let c = 0; c < i.length; c++)
2219
- u[c] = 1 / i.length;
2220
- }
2221
- const f = [], n = 1 / (r - 1);
2222
- let s = 0, l = !1;
2223
- for (let c = 0; c < i.length; c++) {
2224
- const d = f.length, C = l ? 0 : d * n - s;
2225
- s += u[c];
2226
- let y = c === i.length - 1 ? r - 1 - d : (u[c] - C) / n;
2227
- if (l = Math.ceil(y) === y, y = Math.ceil(y), y === 0)
2228
- continue;
2229
- const b = ir(i[c], { numColors: y, interpolateAlpha: o, distanceOffset: C / u[c], distanceInterval: n / u[c] });
2230
- f.push(...b);
2231
- }
2232
- const a = [...i[i.length - 1].toColor];
2233
- return a.length === 3 && a.push(255), f.push(a), f;
2234
- }
2235
- function So(e, t) {
2236
- const r = gr(e) ? e.toJSON() : e;
2237
- return r.type === "multipart" ? vo(r, t) : ir(r, t);
2238
- }
2239
- function Ut(e, t) {
2240
- const r = So(e, t), o = t == null ? void 0 : t.interpolateAlpha;
2241
- return r.forEach((u, i) => {
2242
- u.unshift(i), o || u.pop();
2243
- }), r;
2244
- }
2245
- function Gt(e) {
2246
- const t = _e(e);
2247
- return { type: "HsvColor", Hue: t.h, Saturation: t.s, Value: t.v, AlphaValue: 255 };
2248
- }
2249
- function Nt(e) {
2250
- const t = e.toJSON();
2251
- return { Algorithm: (t == null ? void 0 : t.Algorithm) || "esriHSVAlgorithm", type: "AlgorithmicColorRamp", FromColor: Gt(e.fromColor), ToColor: Gt(e.toColor) };
2252
- }
2253
- function Ko(e) {
2254
- const t = yo(e);
2255
- if (!t)
2256
- return null;
2257
- if (e.type === "algorithmic")
2258
- return { ...Nt(e), Name: t };
2259
- if (e.colorRamps) {
2260
- const r = e.colorRamps.map(Nt);
2261
- return { type: "MultiPartColorRamp", NumColorRamps: r.length, ArrayOfColorRamp: r, Name: t };
2262
- }
2263
- return null;
2264
- }
2265
- function qo(e) {
2266
- const t = e.reverse().map((r) => {
2267
- const o = r.toString(16);
2268
- return o.length < 2 ? "0" + o : o;
2269
- });
2270
- return 4294967295 & Number.parseInt(t.join(""), 16);
2271
- }
2272
- const Jo = new Vt({ none: "none", standardDeviation: "standard-deviation", histogramEqualization: "histogram-equalization", minMax: "min-max", percentClip: "percent-clip", sigmoid: "sigmoid" }), To = { 0: "none", 3: "standardDeviation", 4: "histogramEqualization", 5: "minMax", 6: "percentClip", 9: "sigmoid" }, Ze = 1, ko = [0.299, 0.587, 0.114];
2273
- function ar(e, t = 256) {
2274
- t = Math.min(t, 256);
2275
- const { size: r, counts: o } = e, u = new Uint8Array(r), i = o.reduce((a, c) => a + c / t, 0);
2276
- let f = 0, n = 0, s = 0, l = i;
2277
- for (let a = 0; a < r; a++)
2278
- if (s += o[a], !(a < r - 1 && s + o[a + 1] < l)) {
2279
- for (; f < t - 1 && l < s; )
2280
- f++, l += i;
2281
- for (let c = n; c <= a; c++)
2282
- u[c] = f;
2283
- n = a + 1;
2284
- }
2285
- for (let a = n; a < r; a++)
2286
- u[a] = t - 1;
2287
- return u;
2288
- }
2289
- function Bt(e) {
2290
- const { minCutOff: t, maxCutOff: r, gamma: o, pixelType: u, rounding: i } = e, f = e.outMin || 0, n = e.outMax || 255;
2291
- if (!["u8", "u16", "s8", "s16"].includes(u))
2292
- return null;
2293
- const s = t.length;
2294
- let l, a, c = 0;
2295
- u === "s8" ? c = -127 : u === "s16" && (c = -32767);
2296
- let d = 256;
2297
- ["u16", "s16"].includes(u) && (d = 65536);
2298
- const C = [], y = [], b = n - f;
2299
- for (l = 0; l < s; l++)
2300
- y[l] = r[l] - t[l], C[l] = y[l] === 0 ? 0 : b / y[l];
2301
- let S;
2302
- const h = [];
2303
- let p, m, g;
2304
- if (o && o.length >= s) {
2305
- const w = sr(s, o);
2306
- for (l = 0; l < s; l++) {
2307
- for (g = [], a = 0; a < d; a++)
2308
- if (y[l] !== 0)
2309
- if (p = a + c, S = (p - t[l]) / y[l], m = 1, o[l] > 1 && (m -= (1 / b) ** (S * w[l])), p < r[l] && p > t[l]) {
2310
- const k = m * b * S ** (1 / o[l]) + f;
2311
- g[a] = i === "floor" ? Math.floor(k) : i === "round" ? Math.round(k) : k;
2312
- } else
2313
- p >= r[l] ? g[a] = n : g[a] = f;
2314
- else
2315
- g[a] = f;
2316
- h[l] = g;
2317
- }
2318
- } else
2319
- for (l = 0; l < s; l++) {
2320
- for (g = [], a = 0; a < d; a++)
2321
- if (p = a + c, p <= t[l])
2322
- g[a] = f;
2323
- else if (p >= r[l])
2324
- g[a] = n;
2325
- else {
2326
- const w = (p - t[l]) * C[l] + f;
2327
- g[a] = i === "floor" ? Math.floor(w) : i === "round" ? Math.round(w) : w;
2328
- }
2329
- h[l] = g;
2330
- }
2331
- if (e.contrastOffset != null) {
2332
- const w = Io(e.contrastOffset, e.brightnessOffset);
2333
- for (l = 0; l < s; l++)
2334
- for (g = h[l], a = 0; a < d; a++)
2335
- g[a] = w[g[a]];
2336
- }
2337
- return { lut: h, offset: c };
2338
- }
2339
- function Io(e, t) {
2340
- const r = Math.min(Math.max(e, -100), 100), o = Math.min(Math.max(t ?? 0, -100), 100), u = 255, i = 128;
2341
- let f = 0, n = 0;
2342
- const s = new Uint8Array(256);
2343
- for (f = 0; f < 256; f++)
2344
- r > 0 && r < 100 ? n = (200 * f - 100 * u + 2 * u * o) / (2 * (100 - r)) + i : r <= 0 && r > -100 ? n = (200 * f - 100 * u + 2 * u * o) * (100 + r) / 2e4 + i : r === 100 ? (n = 200 * f - 100 * u + (u + 1) * (100 - r) + 2 * u * o, n = n > 0 ? u : 0) : r === -100 && (n = i), s[f] = n > u ? u : n < 0 ? 0 : n;
2345
- return s;
2346
- }
2347
- function xo(e, t, r) {
2348
- const o = [];
2349
- for (let u = 0; u < t.length; u++) {
2350
- let i = 0, f = 0, n = 0;
2351
- "min" in t[u] ? { min: i, max: f, avg: n } = t[u] : [i, f, n] = t[u];
2352
- let s = n ?? 0;
2353
- e !== "u8" && (s = 255 * (s - i) / (f - i)), r && (s *= ko[u]), o.push(Ao(s));
2354
- }
2355
- return o;
2356
- }
2357
- function Ao(e) {
2358
- if (e <= 0 || e >= 255)
2359
- return Ze;
2360
- let t = 0;
2361
- e !== 150 && (t = e <= 150 ? 45 * Math.cos(0.01047 * e) : 17 * Math.sin(0.021 * e));
2362
- const r = 255, o = e + t, u = Math.log(e / r), i = Math.log(o / r);
2363
- if (i === 0)
2364
- return Ze;
2365
- const f = u / i;
2366
- return isNaN(f) ? Ze : Math.min(9.9, Math.max(0.01, f));
2367
- }
2368
- function Eo(e, t, r, o) {
2369
- let u = 1 / 0, i = -1 / 0, f = 0, n = 0, s = 0, l = 0;
2370
- const a = e.length, c = /* @__PURE__ */ new Map(), d = [];
2371
- for (let v = 0; v < a; v++) {
2372
- const I = e[v];
2373
- if (!t || t[v]) {
2374
- d.push(I);
2375
- const T = (c.get(I) ?? 0) + 1;
2376
- c.set(I, T), T > l && (l = T, s = I), u = I < u ? I : u, i = I > i ? I : i, f += I, n++;
2377
- }
2378
- }
2379
- if (n === 0)
2380
- return { statistics: { min: 0, max: 0, avg: 0, stddev: 0, mode: 0, median: 0 }, histogram: null };
2381
- const C = f / n;
2382
- let y = 0;
2383
- for (let v = 0; v < a; v++)
2384
- t && !t[v] || (y += (e[v] - C) ** 2);
2385
- const b = t ? t.filter((v) => v).length : a, S = b <= 1 ? 0 : Math.sqrt(y / (b - 1));
2386
- d.sort((v, I) => v - I);
2387
- const h = n >>> 1, p = { min: u, max: i, avg: C, stddev: S, mode: s, median: n % 2 ? d[Math.floor(h)] : (d[h - 1] + d[h]) / 2 };
2388
- if (!o)
2389
- return { statistics: p, histogram: null };
2390
- if (["u8", "s8", "u4", "u2", "u1"].includes(r)) {
2391
- const v = i - u + 1, I = new Uint32Array(v);
2392
- for (let T = 0; T < a; T++)
2393
- t && !t[T] || I[e[T] - u]++;
2394
- return { statistics: p, histogram: { min: u - 0.5, max: i + 0.5, size: v, counts: I } };
2395
- }
2396
- const m = 256, g = new Uint32Array(m), w = (i - u) / m;
2397
- if (w === 0)
2398
- return { statistics: p, histogram: { min: u, max: i, size: 1, counts: new Uint32Array(1).fill(n) } };
2399
- const k = new Uint32Array(m + 1);
2400
- for (let v = 0; v < a; v++)
2401
- t && !t[v] || k[Math.floor((e[v] - u) / w)]++;
2402
- for (let v = 0; v < m - 1; v++)
2403
- g[v] = k[v];
2404
- return g[m - 1] = k[m - 1] + k[m], { statistics: p, histogram: { min: u, max: i, size: m, counts: g } };
2405
- }
2406
- function Yo(e) {
2407
- const { pixels: t, mask: r, pixelType: o, bandMasks: u } = e, i = t.map((f, n) => Eo(f, (u == null ? void 0 : u[n]) ?? r, o, !0));
2408
- return { statistics: i.map(({ statistics: f }) => f), histograms: i.map(({ histogram: f }) => f) };
2409
- }
2410
- function Po(e) {
2411
- var y;
2412
- if (!((y = e == null ? void 0 : e.pixels) != null && y.length))
2413
- return null;
2414
- const { pixels: t, mask: r, bandMasks: o, pixelType: u } = e, i = e.width * e.height, f = t.length, n = [], s = [], l = 256;
2415
- let a, c, d, C;
2416
- for (let b = 0; b < f; b++) {
2417
- d = new Uint32Array(l);
2418
- const S = t[b], h = (o == null ? void 0 : o[b]) ?? r;
2419
- if (u === "u8") {
2420
- if (a = 255, c = 0, h) {
2421
- for (let A = 0; A < i; A++)
2422
- if (h[A]) {
2423
- const P = S[A];
2424
- a = P < a ? P : a, c = P > c ? P : c, d[P]++;
2425
- }
2426
- } else
2427
- for (let A = 0; A < i; A++) {
2428
- const P = S[A];
2429
- a = P < a ? P : a, c = P > c ? P : c, d[P]++;
2430
- }
2431
- d = d.slice(a, c + 1);
2432
- } else {
2433
- let A = !1;
2434
- e.statistics || (e.updateStatistics(), A = !0);
2435
- const P = e.statistics;
2436
- a = P[b].minValue, c = P[b].maxValue;
2437
- const O = (c - a) / l;
2438
- if (O === 0) {
2439
- !P || e.validPixelCount || A || e.updateStatistics();
2440
- const R = (e.validPixelCount || e.width * e.height) / l;
2441
- for (let N = 0; N < l; N++)
2442
- d[N] = Math.round(R * (N + 1)) - Math.round(R * N);
2443
- } else {
2444
- C = new Uint32Array(l + 1);
2445
- for (let R = 0; R < i; R++)
2446
- h && !h[R] || C[Math.floor((S[R] - a) / O)]++;
2447
- for (let R = 0; R < l - 1; R++)
2448
- d[R] = C[R];
2449
- d[l - 1] = C[l - 1] + C[l];
2450
- }
2451
- }
2452
- const p = u === "u8" ? a - 0.5 : a, m = u === "u8" ? c + 0.5 : c;
2453
- n.push({ min: p, max: m, size: d.length, counts: d });
2454
- let g = 0, w = 0, k = 0;
2455
- for (let A = 0; A < d.length; A++)
2456
- g += d[A], w += A * d[A];
2457
- const v = w / g;
2458
- for (let A = 0; A < d.length; A++)
2459
- k += d[A] * (A - v) ** 2;
2460
- const I = Math.sqrt(k / (g - 1)), T = (m - p) / d.length, E = (v + (u === "u8" ? 0 : 0.5)) * T + a, x = I * T;
2461
- s.push({ min: a, max: c, avg: E, stddev: x });
2462
- }
2463
- return { statistics: s, histograms: n };
2464
- }
2465
- function Xo(e) {
2466
- const t = [];
2467
- for (let r = 0; r < e.length; r++) {
2468
- const { min: o, max: u, size: i, counts: f } = e[r];
2469
- let n = 0, s = 0;
2470
- for (let y = 0; y < i; y++)
2471
- n += f[y], s += y * f[y];
2472
- const l = s / n;
2473
- let a = 0;
2474
- for (let y = 0; y < i; y++)
2475
- a += f[y] * (y - l) ** 2;
2476
- const c = (u - o) / i, d = (l + 0.5) * c + o, C = Math.sqrt(a / (n - 1)) * c;
2477
- t.push({ min: o, max: u, avg: d, stddev: C });
2478
- }
2479
- return t;
2480
- }
2481
- function Le(e, t) {
2482
- var E;
2483
- const { pixelBlock: r, bandIds: o, returnHistogramLut: u, rasterInfo: i } = t;
2484
- let f = null, n = null, s = e.stretchType;
2485
- if (typeof s == "number" && (s = To[s]), e.dra)
2486
- if (s === "minMax" && (r != null && r.statistics))
2487
- f = r.statistics.map((x) => [x.minValue, x.maxValue, 0, 0]);
2488
- else {
2489
- const x = Po(r);
2490
- f = x != null ? x.statistics : null, n = x != null ? x.histograms : null;
2491
- }
2492
- else
2493
- f = (E = e.statistics) != null && E.length ? e.statistics : i.statistics, n = "histograms" in e ? e.histograms : void 0, n || (n = i.histograms);
2494
- s !== "percentClip" && s !== "histogramEqualization" || n != null && n.length || (s = "minMax");
2495
- const l = (f == null ? void 0 : f.length) || (n == null ? void 0 : n.length) || i.bandCount, a = [], c = [];
2496
- let d, C, y, b, S, h, p, m, g;
2497
- f && !Array.isArray(f[0]) && (f = f.map((x) => [x.min, x.max, x.avg, x.stddev]));
2498
- const [w, k] = yr(i.pixelType);
2499
- if (!(f != null && f.length)) {
2500
- for (f = [], m = 0; m < l; m++)
2501
- f.push([w, k, 1, 1]);
2502
- s === "standardDeviation" && (s = "minMax");
2503
- }
2504
- switch (s) {
2505
- case "none":
2506
- for (m = 0; m < l; m++)
2507
- a[m] = w, c[m] = k;
2508
- break;
2509
- case "minMax":
2510
- for (m = 0; m < l; m++) {
2511
- const x = f[m];
2512
- a[m] = x[0], c[m] = x[1];
2513
- }
2514
- break;
2515
- case "standardDeviation":
2516
- {
2517
- const { numberOfStandardDeviations: x = 2 } = e;
2518
- for (m = 0; m < l; m++) {
2519
- const A = f[m];
2520
- a[m] = A[2] - x * A[3], c[m] = A[2] + x * A[3], a[m] < A[0] && (a[m] = A[0]), c[m] > A[1] && (c[m] = A[1]);
2521
- }
2522
- }
2523
- break;
2524
- case "histogramEqualization":
2525
- for ($e(n), m = 0; m < l; m++)
2526
- a[m] = n[m].min, c[m] = n[m].max;
2527
- break;
2528
- case "percentClip":
2529
- for ($e(n), m = 0; m < n.length; m++) {
2530
- for (d = n[m], S = new Uint32Array(d.size), b = [...d.counts], b.length >= 20 && (b[0] = b[1] = b[2] = b[b.length - 1] = b[b.length - 2] = 0), y = 0, C = (d.max - d.min) / d.size, p = d.min === -0.5 && C === 1 ? 0.5 : 0, g = 0; g < d.size; g++)
2531
- y += b[g], S[g] = y;
2532
- for (h = (e.minPercent || 0) * y / 100, a[m] = d.min + p, g = 0; g < d.size; g++)
2533
- if (S[g] > h) {
2534
- a[m] = d.min + C * (g + p);
2535
- break;
2536
- }
2537
- for (h = (1 - (e.maxPercent || 0) / 100) * y, c[m] = d.max + p, g = d.size - 2; g >= 0; g--)
2538
- if (S[g] < h) {
2539
- c[m] = d.min + C * (g + 2 - p);
2540
- break;
2541
- }
2542
- if (c[m] < a[m]) {
2543
- const x = a[m];
2544
- a[m] = c[m], c[m] = x;
2545
- }
2546
- }
2547
- break;
2548
- default:
2549
- for (m = 0; m < l; m++) {
2550
- const x = f[m];
2551
- a[m] = x[0], c[m] = x[1];
2552
- }
2553
- }
2554
- let v, I, T;
2555
- return s === "histogramEqualization" ? ($e(n), I = n[0].size || 256, v = 0, u && (T = n.map((x) => ar(x)))) : (I = e.max || 255, v = e.min || 0), Ro({ minCutOff: a, maxCutOff: c, outMax: I, outMin: v, histogramLut: T }, o);
2556
- }
2557
- function Ro(e, t) {
2558
- if (t == null || t.length === 0)
2559
- return e;
2560
- const r = Math.max.apply(null, t), { minCutOff: o, maxCutOff: u, outMin: i, outMax: f, histogramLut: n } = e;
2561
- return o.length === t.length || o.length <= r ? e : { minCutOff: t.map((s) => o[s]), maxCutOff: t.map((s) => u[s]), histogramLut: n ? t.map((s) => n[s]) : null, outMin: i, outMax: f };
2562
- }
2563
- function sr(e, t) {
2564
- const r = new Float32Array(e);
2565
- for (let o = 0; o < e; o++)
2566
- t[o] > 1 ? t[o] > 2 ? r[o] = 6.5 + (t[o] - 2) ** 2.5 : r[o] = 6.5 + 100 * (2 - t[o]) ** 4 : r[o] = 1;
2567
- return r;
2568
- }
2569
- function Qe(e, t) {
2570
- var v;
2571
- if (!((v = e == null ? void 0 : e.pixels) != null && v.length))
2572
- return e;
2573
- const { mask: r, bandMasks: o, width: u, height: i, pixels: f } = e, { minCutOff: n, maxCutOff: s, gamma: l } = t, a = t.outMin || 0, c = t.outMax || 255, d = u * i, C = t.outputPixelType || "u8", y = e.pixels.map(() => ee.createEmptyBand(C, d)), b = y.length, S = c - a, h = [], p = [];
2574
- for (let I = 0; I < b; I++)
2575
- p[I] = s[I] - n[I], h[I] = p[I] === 0 ? 0 : S / p[I];
2576
- const m = C.startsWith("u") || C.startsWith("s"), g = l && l.length >= b, w = !!t.isRenderer;
2577
- if (g) {
2578
- const I = sr(b, l);
2579
- for (let T = 0; T < b; T++) {
2580
- const E = (o == null ? void 0 : o[T]) ?? r;
2581
- for (let x = 0; x < d; x++)
2582
- if (E == null || E[x]) {
2583
- if (p[T] === 0) {
2584
- y[T][x] = a;
2585
- continue;
2586
- }
2587
- const A = f[T][x], P = (A - n[T]) / p[T];
2588
- let O = 1;
2589
- if (l[T] > 1 && (O -= (1 / S) ** (P * I[T])), A < s[T] && A > n[T]) {
2590
- const R = O * S * P ** (1 / l[T]) + a;
2591
- y[T][x] = w ? Math.floor(R) : m ? Math.round(R) : R;
2592
- } else
2593
- A >= s[T] ? y[T][x] = c : y[T][x] = a;
2594
- }
2595
- }
2596
- } else
2597
- for (let I = 0; I < b; I++) {
2598
- const T = (o == null ? void 0 : o[I]) ?? r;
2599
- for (let E = 0; E < d; E++)
2600
- if (T == null || T[E]) {
2601
- const x = f[I][E];
2602
- if (x < s[I] && x > n[I]) {
2603
- const A = (x - n[I]) * h[I] + a;
2604
- y[I][E] = w ? Math.floor(A) : m ? Math.round(A) : A;
2605
- } else
2606
- x >= s[I] ? y[I][E] = c : y[I][E] = a;
2607
- }
2608
- }
2609
- const k = new ee({ width: u, height: i, mask: r, bandMasks: o, pixels: y, pixelType: C });
2610
- return k.updateStatistics(), k;
2611
- }
2612
- function Mo(e) {
2613
- var t, r, o;
2614
- return ["u8", "s8"].includes(e.pixelType) && ((r = (t = e.statistics) == null ? void 0 : t[0]) == null ? void 0 : r.min) != null && ((o = e.statistics[0]) == null ? void 0 : o.max) != null && e.bandCount === 1;
2615
- }
2616
- function Lo(e, t) {
2617
- const { attributeTable: r, bandCount: o } = e;
2618
- return r == null && Mo(e) ? !0 : !(r == null || o > 1 || t && r.fields.find((u) => u.name.toLowerCase() === t.toLowerCase()) == null);
2619
- }
2620
- function Oo(e) {
2621
- const { bandCount: t, dataType: r, pixelType: o } = e;
2622
- return r === "elevation" || r === "generic" && t === 1 && (o === "s16" || o === "s32" || o === "f32" || o === "f64");
2623
- }
2624
- function Do(e, t = !1) {
2625
- const { bandCount: r, colormap: o, pixelType: u } = e;
2626
- return r === 1 && (!!(o != null && o.length) || !t && u === "u8");
2627
- }
2628
- function Zo(e, t = !1) {
2629
- const { attributeTable: r, bandCount: o } = e;
2630
- return o === 1 && (!t || r != null || e.histograms != null);
2631
- }
2632
- function Qo(e) {
2633
- const { dataType: t } = e;
2634
- return t === "vector-uv" || t === "vector-magdir";
2635
- }
2636
- function en(e) {
2637
- const { dataType: t } = e;
2638
- return t === "vector-uv" || t === "vector-magdir";
2639
- }
2640
- let we = class extends De {
2641
- constructor(e) {
2642
- super(e);
2643
- }
2644
- bind() {
2645
- const { rendererJSON: e } = this;
2646
- if (!e)
2647
- return { success: !1 };
2648
- let t;
2649
- switch (this.lookup = { rendererJSON: {} }, e.type) {
2650
- case "uniqueValue":
2651
- t = this._updateUVRenderer(e);
2652
- break;
2653
- case "rasterColormap":
2654
- t = this._updateColormapRenderer(e);
2655
- break;
2656
- case "rasterStretch":
2657
- t = this._updateStretchRenderer(e);
2658
- break;
2659
- case "classBreaks":
2660
- t = this._updateClassBreaksRenderer(e);
2661
- break;
2662
- case "rasterShadedRelief":
2663
- t = this._updateShadedReliefRenderer(e);
2664
- break;
2665
- case "vectorField":
2666
- t = this._updateVectorFieldRenderer();
2667
- break;
2668
- case "flowRenderer":
2669
- t = this._updateFlowRenderer();
2670
- }
2671
- return t;
2672
- }
2673
- symbolize(e) {
2674
- let t = e == null ? void 0 : e.pixelBlock;
2675
- if (!Ft(t))
2676
- return t;
2677
- if (e.simpleStretchParams && this.rendererJSON.type === "rasterStretch")
2678
- return this.simpleStretch(t, e.simpleStretchParams);
2679
- try {
2680
- let r;
2681
- switch (t.pixels.length > 3 && (t = t.extractBands(e.bandIds ?? [0, 1, 2])), this.rendererJSON.type) {
2682
- case "uniqueValue":
2683
- case "rasterColormap":
2684
- r = this._symbolizeColormap(t);
2685
- break;
2686
- case "classBreaks":
2687
- r = this._symbolizeClassBreaks(t);
2688
- break;
2689
- case "rasterStretch":
2690
- r = this._symbolizeStretch(t, e.bandIds);
2691
- break;
2692
- case "rasterShadedRelief": {
2693
- const o = e.extent, u = o.spatialReference.isGeographic, i = { x: (o.xmax - o.xmin) / t.width, y: (o.ymax - o.ymin) / t.height };
2694
- r = this._symbolizeShadedRelief(t, { isGCS: u, resolution: i });
2695
- break;
2696
- }
2697
- }
2698
- return r;
2699
- } catch (r) {
2700
- return Ct.getLogger(this).error("symbolize", r.message), t;
2701
- }
2702
- }
2703
- simpleStretch(e, t) {
2704
- if (!Ft(e))
2705
- return e;
2706
- try {
2707
- return e.pixels.length > 3 && (e = e.extractBands([0, 1, 2])), Qe(e, { ...t, isRenderer: !0 });
2708
- } catch (r) {
2709
- return Ct.getLogger(this).error("symbolize", r.message), e;
2710
- }
2711
- }
2712
- generateWebGLParameters(e) {
2713
- if (["uniqueValue", "rasterColormap", "classBreaks"].includes(this.rendererJSON.type)) {
2714
- const { indexedColormap: f, offset: n } = this.lookup.colormapLut || {};
2715
- return { colormap: f, colormapOffset: n, type: "lut" };
2716
- }
2717
- const { pixelBlock: t, isGCS: r, resolution: o, bandIds: u } = e, { rendererJSON: i } = this;
2718
- return i.type === "rasterStretch" ? this._generateStretchWebGLParams(t, i, u) : i.type === "rasterShadedRelief" ? this._generateShadedReliefWebGLParams(i, r, o ?? void 0) : i.type === "vectorField" ? this._generateVectorFieldWebGLParams(i) : null;
2719
- }
2720
- _isLUTChanged(e) {
2721
- if (!this.lookup || !this.lookup.rendererJSON)
2722
- return !0;
2723
- if ("colorRamp" in this.rendererJSON) {
2724
- const t = this.rendererJSON.colorRamp;
2725
- return e ? JSON.stringify(t) !== JSON.stringify(this.lookup.rendererJSON.colorRamp) : (this.rendererJSON, this.lookup.rendererJSON, JSON.stringify(this.rendererJSON) !== JSON.stringify(this.lookup.rendererJSON));
2726
- }
2727
- return JSON.stringify(this.rendererJSON) !== JSON.stringify(this.lookup.rendererJSON);
2728
- }
2729
- _symbolizeColormap(e) {
2730
- return this._isLUTChanged() && !this.bind().success ? e : qe(e, this.lookup.colormapLut);
2731
- }
2732
- _symbolizeClassBreaks(e) {
2733
- const { canUseIndexedLUT: t } = this._analyzeClassBreaks(this.rendererJSON);
2734
- return this._isLUTChanged() && !this.bind().success ? e : t ? qe(e, this.lookup.colormapLut) : Cr(e, this.lookup.remapLut ?? []);
2735
- }
2736
- _symbolizeStretch(e, t) {
2737
- var c, d;
2738
- const { rasterInfo: r } = this, { pixelType: o, bandCount: u } = r, i = this.rendererJSON, f = ["u8", "u16", "s8", "s16"].includes(o);
2739
- let n, s;
2740
- const { dra: l } = i, { gamma: a } = this.lookup;
2741
- if (i.stretchType === "histogramEqualization") {
2742
- const C = l ? null : (c = this.lookup) == null ? void 0 : c.histogramLut, y = Le(i, { rasterInfo: r, pixelBlock: e, bandIds: t, returnHistogramLut: !C }), b = Qe(e, { ...y, gamma: a, isRenderer: !0 });
2743
- s = bt(b, { lut: l ? y.histogramLut : C, offset: 0 });
2744
- } else if (f) {
2745
- if (l) {
2746
- const C = Le(i, { rasterInfo: r, pixelBlock: e, bandIds: t });
2747
- n = Bt({ pixelType: o, ...C, gamma: a, rounding: "floor" });
2748
- } else if (this._isLUTChanged()) {
2749
- if (!this.bind().success)
2750
- return e;
2751
- n = this.lookup ? this.lookup.stretchLut : null;
2752
- } else
2753
- n = this.lookup ? this.lookup.stretchLut : null;
2754
- if (!n)
2755
- return e;
2756
- u > 1 && t != null && t.length === (e == null ? void 0 : e.pixels.length) && (n == null ? void 0 : n.lut.length) === u && (n = { lut: t.map((C) => n.lut[C]), offset: n.offset }), s = bt(e, n);
2757
- } else {
2758
- const C = Le(i, { rasterInfo: r, pixelBlock: e, bandIds: t });
2759
- s = Qe(e, { ...C, gamma: a, isRenderer: !0 });
2760
- }
2761
- if (i.colorRamp) {
2762
- if (this._isLUTChanged(!0) && !this.bind().success)
2763
- return e;
2764
- s = qe(s, (d = this.lookup) == null ? void 0 : d.colormapLut);
2765
- }
2766
- return s;
2767
- }
2768
- _symbolizeShadedRelief(e, t) {
2769
- var n;
2770
- const r = this.rendererJSON, o = { ...r, ...t }, u = ho(e, o);
2771
- if (!r.colorRamp)
2772
- return u;
2773
- let i;
2774
- if (this._isLUTChanged(!0)) {
2775
- if (!this.bind().success)
2776
- return u;
2777
- i = this.lookup ? this.lookup.hsvMap : null;
2778
- } else
2779
- i = this.lookup ? this.lookup.hsvMap : null;
2780
- if (!i)
2781
- return u;
2782
- const f = ((n = this.rasterInfo.statistics) == null ? void 0 : n[0]) ?? { min: 0, max: 8e3 };
2783
- return fo(u, e, i, f), u;
2784
- }
2785
- _isVectorFieldData() {
2786
- const { bandCount: e, dataType: t } = this.rasterInfo;
2787
- return e === 2 && (t === "vector-magdir" || t === "vector-uv");
2788
- }
2789
- _updateVectorFieldRenderer() {
2790
- return this._isVectorFieldData() ? { success: !0 } : { success: !1, error: `Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".` };
2791
- }
2792
- _updateFlowRenderer() {
2793
- return this._isVectorFieldData() ? { success: !0 } : { success: !1, error: `Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".` };
2794
- }
2795
- _updateUVRenderer(e) {
2796
- var l;
2797
- const { bandCount: t, attributeTable: r, pixelType: o } = this.rasterInfo, u = e.field1;
2798
- if (!u)
2799
- return { success: !1, error: "Unsupported renderer; missing UniqueValueRenderer.field." };
2800
- const i = e.defaultSymbol, f = t === 1 && ["u8", "s8"].includes(o);
2801
- if (!Lo(this.rasterInfo, u) && !f)
2802
- return { success: !1, error: "Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table." };
2803
- const n = [];
2804
- if (r != null) {
2805
- const a = r.fields.find((c) => c.name.toLowerCase() === "value");
2806
- if (!a)
2807
- return { success: !1, error: "Unsupported data; the data's raster attribute table does not have a value field." };
2808
- r.features.forEach((c) => {
2809
- var y, b;
2810
- const d = (y = e.uniqueValueInfos) == null ? void 0 : y.find((S) => String(S.value) === String(c.attributes[u])), C = (b = d == null ? void 0 : d.symbol) == null ? void 0 : b.color;
2811
- C ? n.push([c.attributes[a.name]].concat(C)) : i && n.push([c.attributes[a.name]].concat(i.color));
2812
- });
2813
- } else {
2814
- if (u.toLowerCase() !== "value")
2815
- return { success: !1, error: 'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.' };
2816
- (l = e.uniqueValueInfos) == null || l.forEach((a) => {
2817
- var d;
2818
- const c = (d = a == null ? void 0 : a.symbol) == null ? void 0 : d.color;
2819
- c ? n.push([parseInt("" + a.value, 10)].concat(c)) : i && n.push([parseInt("" + a.value, 10)].concat(i == null ? void 0 : i.color));
2820
- });
2821
- }
2822
- if (n.length === 0)
2823
- return { success: !1, error: "Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table." };
2824
- const s = Re({ colormap: n });
2825
- return this.lookup = { rendererJSON: e, colormapLut: s }, this.canRenderInWebGL = this._isColormapSupportedByWebGL(s == null ? void 0 : s.indexedColormap), { success: !0 };
2826
- }
2827
- _updateColormapRenderer(e) {
2828
- if (!Do(this.rasterInfo))
2829
- return { success: !1, error: "Unsupported data; the data source does not have a colormap." };
2830
- const t = e.colormapInfos.map((o) => [o.value].concat(o.color)).sort((o, u) => o[0] - u[0]);
2831
- if (!t || t.length === 0)
2832
- return { success: !1, error: "Unsupported renderer; ColormapRenderer must have meaningful colormapInfos." };
2833
- const r = Re({ colormap: t });
2834
- return this.lookup = { rendererJSON: e, colormapLut: r }, this.canRenderInWebGL = this._isColormapSupportedByWebGL(r == null ? void 0 : r.indexedColormap), { success: !0 };
2835
- }
2836
- _updateShadedReliefRenderer(e) {
2837
- if (!Oo(this.rasterInfo))
2838
- return { success: !1, error: `Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.` };
2839
- if (e.colorRamp) {
2840
- const t = Ut(e.colorRamp, { interpolateAlpha: !0 }), r = Re({ colormap: t }), o = [], u = r.indexedColormap;
2841
- for (let i = 0; i < u.length; i += 4) {
2842
- const f = _e({ r: u[i], g: u[i + 1], b: u[i + 2] });
2843
- o.push([f.h / 60, f.s / 100, 255 * f.v / 100]);
2844
- }
2845
- this.lookup = { rendererJSON: e, colormapLut: r, hsvMap: o };
2846
- } else
2847
- this.lookup = null;
2848
- return this.canRenderInWebGL = !0, { success: !0 };
2849
- }
2850
- _analyzeClassBreaks(e) {
2851
- const { attributeTable: t, pixelType: r } = this.rasterInfo, o = t != null ? t.fields.find((f) => f.name.toLowerCase() === "value") : null, u = t != null ? t.fields.find((f) => f.name.toLowerCase() === e.field.toLowerCase()) : null, i = o != null && u !== null;
2852
- return { canUseIndexedLUT: ["u8", "u16", "s8", "s16"].includes(r) || i, tableValueField: o, tableBreakField: u };
2853
- }
2854
- _updateClassBreaksRenderer(e) {
2855
- const { attributeTable: t } = this.rasterInfo, { canUseIndexedLUT: r, tableValueField: o, tableBreakField: u } = this._analyzeClassBreaks(e), i = e.classBreakInfos;
2856
- if (!(i != null && i.length))
2857
- return { success: !1, error: "Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos." };
2858
- const f = i.sort((c, d) => c.classMaxValue - d.classMaxValue), n = f[f.length - 1];
2859
- let s = e.minValue;
2860
- if (!r) {
2861
- const c = [];
2862
- for (let d = 0; d < f.length; d++)
2863
- c.push({ value: f[d].classMinValue ?? s, mappedColor: f[d].symbol.color }), s = f[d].classMaxValue;
2864
- return c.push({ value: n.classMaxValue, mappedColor: n.symbol.color }), this.lookup = { rendererJSON: e, remapLut: c }, this.canRenderInWebGL = !1, { success: !0 };
2865
- }
2866
- const l = [];
2867
- if (t != null && o != null && u !== null && o !== u) {
2868
- const c = o.name, d = u.name, C = f[f.length - 1], { classMaxValue: y } = C;
2869
- s = e.minValue;
2870
- for (const b of t.features) {
2871
- const S = b.attributes[c], h = b.attributes[d], p = h === y ? C : h < s ? null : f.find(({ classMaxValue: m }) => m > h);
2872
- p && l.push([S].concat(p.symbol.color));
2873
- }
2874
- } else {
2875
- s = Math.floor(e.minValue);
2876
- for (let c = 0; c < f.length; c++) {
2877
- const d = f[c];
2878
- for (let C = s; C < d.classMaxValue; C++)
2879
- l.push([C].concat(d.symbol.color));
2880
- s = Math.ceil(d.classMaxValue);
2881
- }
2882
- n.classMaxValue === s && l.push([n.classMaxValue].concat(n.symbol.color));
2883
- }
2884
- const a = Re({ colormap: l, fillUnspecified: !1 });
2885
- return this.lookup = { rendererJSON: e, colormapLut: a }, this.canRenderInWebGL = this._isColormapSupportedByWebGL(a == null ? void 0 : a.indexedColormap), { success: !0 };
2886
- }
2887
- _isColormapSupportedByWebGL(e) {
2888
- return !!(e != null && e.length) && e.length <= 16384;
2889
- }
2890
- _isHistogramRequired(e) {
2891
- return e === "percentClip" || e === "histogramEqualization";
2892
- }
2893
- _isValidRasterStatistics(e) {
2894
- return e != null && e.length > 0 && e[0].min != null && e[0].max != null;
2895
- }
2896
- _updateStretchRenderer(e) {
2897
- var a, c;
2898
- let { stretchType: t, dra: r } = e;
2899
- if (!(t === "none" || (a = e.statistics) != null && a.length || this._isValidRasterStatistics(this.rasterInfo.statistics) || r))
2900
- return { success: !1, error: "Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used." };
2901
- const o = e.histograms || this.rasterInfo.histograms;
2902
- !this._isHistogramRequired(e.stretchType) || o != null && o.length || r || (t = "minMax");
2903
- const { computeGamma: u, useGamma: i, colorRamp: f } = e;
2904
- let { gamma: n } = e;
2905
- if (i && u && !(n != null && n.length)) {
2906
- const d = (c = e.statistics) != null && c.length ? e.statistics : this.rasterInfo.statistics;
2907
- n = xo(this.rasterInfo.pixelType, d);
2908
- }
2909
- const s = this.rasterInfo.pixelType, l = !r && ["u8", "u16", "s8", "s16"].includes(s);
2910
- if (t === "histogramEqualization") {
2911
- const d = o.map((C) => ar(C));
2912
- this.lookup = { rendererJSON: e, histogramLut: d };
2913
- } else if (l) {
2914
- const d = Le(e, { rasterInfo: this.rasterInfo }), C = Bt({ pixelType: s, ...d, gamma: i ? n : null, rounding: "floor" });
2915
- this.lookup = { rendererJSON: e, stretchLut: C };
2916
- }
2917
- if (f && !this._isStretchColorRampNoop(f)) {
2918
- const d = Ut(f, { interpolateAlpha: !0 });
2919
- this.lookup || (this.lookup = { rendererJSON: e }), this.lookup.colormapLut = Re({ colormap: d }), this.lookup.rendererJSON = e;
2920
- }
2921
- return this.lookup.gamma = i && (n != null && n.length) ? n : null, this.canRenderInWebGL = !0, { success: !0 };
2922
- }
2923
- _isStretchColorRampNoop(e) {
2924
- return e.type === "algorithmic" && ["0,0,0,255", "0,0,0"].includes(e.fromColor.join(",")) && ["255,255,255,255", "255,255,255"].includes(e.toColor.join(","));
2925
- }
2926
- _generateStretchWebGLParams(e, t, r) {
2927
- var m;
2928
- let o = null, u = null;
2929
- const i = (m = this.lookup) == null ? void 0 : m.colormapLut;
2930
- t.colorRamp && i && (o = i.indexedColormap, u = i.offset), t.stretchType === "histogramEqualization" && (t = { ...t, stretchType: "minMax" });
2931
- const { gamma: f } = this.lookup, n = !!(t.useGamma && f && f.some((g) => g !== 1)), { minCutOff: s, maxCutOff: l, outMin: a, outMax: c } = Le(t, { rasterInfo: this.rasterInfo, pixelBlock: e, bandIds: r });
2932
- let d = 0;
2933
- e != null && (d = e.getPlaneCount(), d === 2 && ((e = e.clone()).statistics = [e.statistics[0]], e.pixels = [e.pixels[0]]));
2934
- const { bandCount: C } = this.rasterInfo, y = Math.min(3, (r == null ? void 0 : r.length) || d || C, C), b = new Float32Array(y), S = o || n ? 1 : 255;
2935
- let h;
2936
- for (h = 0; h < s.length; h++)
2937
- b[h] = l[h] === s[h] ? 0 : (c - a) / (l[h] - s[h]) / S;
2938
- const p = new Float32Array(y);
2939
- if (n && f)
2940
- for (h = 0; h < y; h++)
2941
- f[h] > 1 ? f[h] > 2 ? p[h] = 6.5 + (f[h] - 2) ** 2.5 : p[h] = 6.5 + 100 * (2 - f[h]) ** 4 : p[h] = 1;
2942
- return { bandCount: y, outMin: a / S, outMax: c / S, minCutOff: s, maxCutOff: l, factor: b, useGamma: n, gamma: n ? f : [1, 1, 1], gammaCorrection: n ? p : [1, 1, 1], colormap: o, colormapOffset: u, stretchType: t.stretchType, type: "stretch" };
2943
- }
2944
- _generateShadedReliefWebGLParams(e, t = !1, r = { x: 0, y: 0 }) {
2945
- var l, a;
2946
- let o = null, u = null;
2947
- const i = (l = this.lookup) == null ? void 0 : l.colormapLut;
2948
- e.colorRamp && i && (o = i.indexedColormap, u = i.offset);
2949
- const f = { ...e, isGCS: t, resolution: r }, n = rr(f), s = (a = this.rasterInfo.statistics) == null ? void 0 : a[0];
2950
- return { ...n, minValue: (s == null ? void 0 : s.min) ?? 0, maxValue: (s == null ? void 0 : s.max) ?? 8e3, hillshadeType: e.hillshadeType === "traditional" ? 0 : 1, type: "hillshade", colormap: o, colormapOffset: u };
2951
- }
2952
- _generateVectorFieldWebGLParams(e) {
2953
- var h, p, m;
2954
- const { style: t, inputUnit: r, outputUnit: o, visualVariables: u, symbolTileSize: i, flowRepresentation: f } = e;
2955
- let n;
2956
- const s = ((h = this.rasterInfo.statistics) == null ? void 0 : h[0].min) ?? 0, l = ((p = this.rasterInfo.statistics) == null ? void 0 : p[0].max) ?? 50, a = (u == null ? void 0 : u.find((g) => g.type === "sizeInfo")) ?? { type: "sizeInfo", field: "Magnitude", maxDataValue: l, maxSize: 0.8 * i, minDataValue: s, minSize: 0.2 * i }, c = a.minDataValue ?? s, d = a.maxDataValue ?? l, C = a.maxSize != null && a.minSize != null ? [a.minSize / i, a.maxSize / i] : [0.2, 0.8];
2957
- if (t === "wind_speed") {
2958
- const g = (C[0] + C[1]) / 2;
2959
- C[0] = C[1] = g;
2960
- }
2961
- const y = c != null && d != null ? [c, d] : null;
2962
- if (t === "classified_arrow")
2963
- if (c != null && d != null && a != null) {
2964
- n = [];
2965
- const g = (a.maxDataValue - a.minDataValue) / 5;
2966
- for (let w = 0; w < 6; w++)
2967
- n.push(a.minDataValue + g * w);
2968
- } else
2969
- n = [0, 1e-6, 3.5, 7, 10.5, 14];
2970
- const b = f === "flow_to" == (t === "ocean_current_kn" || t === "ocean_current_m") ? 0 : Math.PI, S = u == null ? void 0 : u.find((g) => g.type === "rotationInfo");
2971
- return { breakValues: n, dataRange: y, inputUnit: r, outputUnit: o, symbolTileSize: i, symbolPercentRange: C, style: t || "single_arrow", rotation: b, rotationType: (m = this.rasterInfo.storageInfo) != null && m.tileInfo && this.rasterInfo.dataType === "vector-uv" ? "geographic" : (S == null ? void 0 : S.rotationType) || e.rotationType, type: "vectorField" };
2972
- }
2973
- };
2974
- function Ft(e) {
2975
- return Se(e) && e.validPixelCount !== 0;
2976
- }
2977
- D([B({ json: { write: !0 } })], we.prototype, "rendererJSON", void 0), D([B({ type: co, json: { write: !0 } })], we.prototype, "rasterInfo", void 0), D([B({ json: { write: !0 } })], we.prototype, "lookup", void 0), D([B()], we.prototype, "canRenderInWebGL", void 0), we = D([Oe("esri.renderers.support.RasterSymbolizer")], we);
2978
- const tn = we;
2979
- export {
2980
- qo as A,
2981
- zr as B,
2982
- Wo as C,
2983
- We as D,
2984
- zo as E,
2985
- jr as F,
2986
- Ko as G,
2987
- _o as H,
2988
- Le as I,
2989
- Bt as J,
2990
- sr as K,
2991
- tn as L,
2992
- Qe as M,
2993
- Zt as N,
2994
- $o as P,
2995
- pt as R,
2996
- Vo as S,
2997
- Xt as U,
2998
- co as a,
2999
- ft as b,
3000
- Ae as c,
3001
- $r as d,
3002
- Ut as e,
3003
- Jo as f,
3004
- Xo as g,
3005
- Po as h,
3006
- To as i,
3007
- or as j,
3008
- Zo as k,
3009
- Oo as l,
3010
- Yo as m,
3011
- uo as n,
3012
- Qo as o,
3013
- en as p,
3014
- yo as q,
3015
- Er as r,
3016
- jo as s,
3017
- Lo as t,
3018
- Do as u,
3019
- po as v,
3020
- So as w,
3021
- Ho as x,
3022
- Io as y,
3023
- xe as z
3024
- };