@arcgis/core 5.0.0-next.31 → 5.0.0-next.33

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 (241) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
  5. package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
  6. package/assets/esri/core/workers/chunks/22f745539ca54d8cd30d.js +1 -0
  7. package/assets/esri/core/workers/chunks/2613e482450b57f2d4f5.js +1 -0
  8. package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
  9. package/assets/esri/core/workers/chunks/{1dfca37f95f2b968aa54.js → 39d2b540738431adec98.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
  11. package/assets/esri/core/workers/chunks/446f76356fc116204ec3.js +1 -0
  12. package/assets/esri/core/workers/chunks/44b6b7418cbf7f778bef.js +1 -0
  13. package/assets/esri/core/workers/chunks/4675ed3ca3e0104d00bf.js +1 -0
  14. package/assets/esri/core/workers/chunks/4df7cc3477bc46fc39af.js +1 -0
  15. package/assets/esri/core/workers/chunks/52ecbaa2d32692d6d8df.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3777b41b4fa2f1418402.js → 55818fe7a7aa1e5c8bbd.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7e6fae3660e7a6a0fa16.js → 5f781ef46ce7c4048c2f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/63933cbcb5c12df09715.js +1 -0
  19. package/assets/esri/core/workers/chunks/706423d801fa9cbf2e90.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e6df4327ac1d9b65b80d.js → 71dd80231ea656a6380c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/725819839434c59102f3.js +1 -0
  22. package/assets/esri/core/workers/chunks/72cebf18da5ec5eeb666.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bd58c027408dc858f23c.js → 77b45957cfe42523c1c8.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
  25. package/assets/esri/core/workers/chunks/852de585a72d902344a6.js +1 -0
  26. package/assets/esri/core/workers/chunks/{25fd0884dd14973c89f5.js → 866a608d489bf56bc371.js} +1 -1
  27. package/assets/esri/core/workers/chunks/871dd5e1f016a04b8d98.js +1 -0
  28. package/assets/esri/core/workers/chunks/892c417f5130b003889d.js +1 -0
  29. package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
  30. package/assets/esri/core/workers/chunks/907083c427d7fb4354e9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
  34. package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
  35. package/assets/esri/core/workers/chunks/{3bacd904cd93c8013f6a.js → ae793d814cf32db9fbde.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{e0b70652da4a7f672cfc.js → b21cf62652ca772108c8.js} +1 -1
  37. package/assets/esri/core/workers/chunks/c2596f48b37092dd566c.js +1 -0
  38. package/assets/esri/core/workers/chunks/c82a974c8448407885e6.js +1 -0
  39. package/assets/esri/core/workers/chunks/c9c2e00fed979c21e2f0.js +1 -0
  40. package/assets/esri/core/workers/chunks/{94005916d321c879bea1.js → cb500d673ca7ec1ef945.js} +1 -1
  41. package/assets/esri/core/workers/chunks/d239a4ef60e348cfb05a.js +1 -0
  42. package/assets/esri/core/workers/chunks/d6d03f22c91f528b97e5.js +1 -0
  43. package/assets/esri/core/workers/chunks/{4ab89c990a82c745c0fd.js → d764b6273974f4bca31b.js} +1 -1
  44. package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +1 -0
  45. package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
  46. package/assets/esri/core/workers/chunks/dc3a4ad62bc041a4f899.js +1 -0
  47. package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
  48. package/assets/esri/core/workers/chunks/df458ad51be27df3d79d.js +1 -0
  49. package/assets/esri/core/workers/chunks/{01b8e680befff83e7d3e.js → e093e745708f722bc1b9.js} +1 -1
  50. package/assets/esri/core/workers/chunks/e32fc0b2c6530d28ce85.js +1 -0
  51. package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +1 -0
  52. package/assets/esri/core/workers/chunks/ea5bf896acfcc3106bf5.js +1 -0
  53. package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
  54. package/assets/esri/core/workers/chunks/{a74e6d505a55ed27f004.js → f11453f24c0b728669d2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/f2ebd6471e1259a6eac0.js +1 -0
  56. package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
  57. package/assets/esri/core/workers/chunks/f3c232fc56a29d51196a.js +1 -0
  58. package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
  59. package/assets/esri/themes/base/widgets/_Attribution.scss +8 -0
  60. package/assets/esri/themes/dark/main.css +1 -1
  61. package/assets/esri/themes/light/main.css +1 -1
  62. package/assets/esri/themes/light/view.css +1 -1
  63. package/chunks/BlendLayers.glsl.js +1 -1
  64. package/chunks/Envelope.js +1 -1
  65. package/chunks/GaussianSplat.glsl.js +2 -2
  66. package/chunks/Geometry.js +1 -1
  67. package/chunks/GlowComposition.glsl.js +5 -5
  68. package/chunks/MultiPathImpl.js +1 -1
  69. package/chunks/Point2D.js +1 -1
  70. package/chunks/UnitFactory.js +1 -1
  71. package/config.js +1 -1
  72. package/core/deprecate.js +1 -1
  73. package/core/keyboard.js +5 -0
  74. package/geometry/SpatialReference.js +1 -1
  75. package/geometry/operators/support/apiConverter.js +1 -1
  76. package/geometry/operators/support/jsonConverter.js +1 -1
  77. package/geometry/support/spatialReferenceUtils.js +1 -1
  78. package/interfaces.d.ts +552 -3
  79. package/kernel.js +1 -1
  80. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  81. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  82. package/layers/graphics/data/AttributesBuilder.js +1 -1
  83. package/layers/graphics/data/QueryEngineResult.js +1 -1
  84. package/layers/mixins/ArcGISImageService.js +1 -1
  85. package/package.json +1 -1
  86. package/portal/schemas/definitions.js +1 -1
  87. package/rest/query/operations/query.js +1 -1
  88. package/rest/support/LocateSetting.d.ts +4 -0
  89. package/rest/support/LocateSetting.js +5 -0
  90. package/rest/support/LocateSettingBase.d.ts +4 -0
  91. package/rest/support/LocateSettingBase.js +5 -0
  92. package/rest/support/LocateSettingSource.d.ts +4 -0
  93. package/rest/support/LocateSettingSource.js +5 -0
  94. package/rest/support/LocateSettings.d.ts +4 -0
  95. package/rest/support/LocateSettings.js +5 -0
  96. package/rest/support/LocateSettingsOverrides.d.ts +4 -0
  97. package/rest/support/LocateSettingsOverrides.js +5 -0
  98. package/rest/support/RouteParameters.js +1 -1
  99. package/statistics/utils.js +1 -1
  100. package/support/revision.js +1 -1
  101. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  102. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  103. package/views/3d/GroundView3D.js +1 -1
  104. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  105. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  106. package/views/3d/layers/I3SMeshView3D.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  108. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  109. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  110. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  111. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  112. package/views/3d/state/ConstraintsManager.js +1 -1
  113. package/views/3d/state/NearFarHeuristic.js +1 -1
  114. package/views/3d/support/Attribution3D.js +5 -0
  115. package/views/3d/support/CombinedElevationProvider.js +1 -1
  116. package/views/3d/support/ElevationRange.js +1 -1
  117. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  118. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +5 -0
  119. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +5 -0
  120. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  121. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  122. package/views/3d/terrain/ElevationBounds.js +1 -1
  123. package/views/3d/terrain/ElevationData.js +1 -1
  124. package/views/3d/terrain/TerrainSurface.js +1 -1
  125. package/views/3d/terrain/Tile.js +1 -1
  126. package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
  127. package/views/3d/terrain/TileCompositor.js +1 -1
  128. package/views/3d/terrain/TileRenderer.js +1 -1
  129. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  130. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  131. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  132. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  133. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  134. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +12 -12
  135. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentDataConstants.js +5 -0
  136. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  137. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  138. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  139. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -13
  140. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +7 -1
  141. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
  142. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
  143. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
  144. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  145. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  146. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  147. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  148. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  149. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  150. package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
  151. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  152. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  153. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  154. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  155. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  156. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  157. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  158. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  159. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  160. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  161. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  162. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  163. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  165. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  166. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  167. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  168. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  169. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  170. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  171. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
  172. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +24 -31
  173. package/views/Attribution.js +5 -0
  174. package/views/DOMContainer.js +1 -1
  175. package/views/SceneView.js +1 -1
  176. package/views/View.js +1 -1
  177. package/views/draw/support/managers/DrawTooltipManager.js +5 -0
  178. package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
  179. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  180. package/views/interactive/tooltip/fields/TooltipField.js +1 -1
  181. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
  182. package/views/layers/LayerView.js +1 -1
  183. package/views/support/AttributionItem.d.ts +4 -0
  184. package/views/support/AttributionItem.js +5 -0
  185. package/views/support/GroundElevationSampler.js +1 -1
  186. package/views/support/LayerViewManager.js +1 -1
  187. package/views/support/attributionUtils.js +5 -0
  188. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  189. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  190. package/views/ui/2d/DefaultUI2D.js +1 -1
  191. package/views/ui/3d/DefaultUI3D.js +1 -1
  192. package/widgets/Attribution/AttributionViewModel.js +1 -1
  193. package/widgets/Attribution.js +1 -1
  194. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  195. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  196. package/widgets/ElevationProfile.js +1 -1
  197. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  198. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  199. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  200. package/widgets/Widget.js +1 -1
  201. package/widgets/support/decorators/accessibleHandler.js +1 -1
  202. package/widgets/support/jsxWidgetSupport.js +1 -1
  203. package/widgets/support/widget.js +1 -1
  204. package/widgets/support/widgetUtils.js +1 -1
  205. package/assets/esri/core/workers/chunks/0a1df5a724fe253b3866.js +0 -1
  206. package/assets/esri/core/workers/chunks/155d74b9c0ef31dc2316.js +0 -1
  207. package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
  208. package/assets/esri/core/workers/chunks/2c8c48433b380da59831.js +0 -1
  209. package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
  210. package/assets/esri/core/workers/chunks/31b5747a254d13acc58e.js +0 -1
  211. package/assets/esri/core/workers/chunks/3ac84e324d212815e252.js +0 -1
  212. package/assets/esri/core/workers/chunks/41a00c77e6f7ce61e476.js +0 -1
  213. package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
  214. package/assets/esri/core/workers/chunks/45729d006db6a569715f.js +0 -1
  215. package/assets/esri/core/workers/chunks/50cf3cbcad2be1c1e210.js +0 -1
  216. package/assets/esri/core/workers/chunks/565358ea8d1bdc4d1ebc.js +0 -1
  217. package/assets/esri/core/workers/chunks/592afe1a41bed3b0cc31.js +0 -1
  218. package/assets/esri/core/workers/chunks/5aeda8a1f2ccabfdf40f.js +0 -1
  219. package/assets/esri/core/workers/chunks/657d9e5145da1306ace8.js +0 -1
  220. package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
  221. package/assets/esri/core/workers/chunks/7f7a81ed8893ab649af7.js +0 -1
  222. package/assets/esri/core/workers/chunks/7ffef8a19166f6b564d8.js +0 -1
  223. package/assets/esri/core/workers/chunks/819781a209608dcdd678.js +0 -1
  224. package/assets/esri/core/workers/chunks/8d57e3a0e5687ce15557.js +0 -1
  225. package/assets/esri/core/workers/chunks/8e9a5d38da40702def80.js +0 -1
  226. package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
  227. package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
  228. package/assets/esri/core/workers/chunks/aac313257a8b1ae75b75.js +0 -1
  229. package/assets/esri/core/workers/chunks/be06c8a58c217a17451b.js +0 -1
  230. package/assets/esri/core/workers/chunks/d56548a994753b08403c.js +0 -1
  231. package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
  232. package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
  233. package/assets/esri/core/workers/chunks/dd95e679618b7b21a7b1.js +0 -1
  234. package/assets/esri/core/workers/chunks/e08a1934d98e7324776d.js +0 -1
  235. package/assets/esri/core/workers/chunks/e5deb72df8b2505fd325.js +0 -1
  236. package/assets/esri/core/workers/chunks/e689a4849f5af3f2f641.js +0 -1
  237. package/assets/esri/core/workers/chunks/f259ad785ce3aa970792.js +0 -1
  238. package/assets/esri/core/workers/chunks/f4919950a9a3703d9da3.js +0 -1
  239. package/assets/esri/core/workers/chunks/f6ce485c082d0d640b01.js +0 -1
  240. package/assets/esri/core/workers/chunks/fd9ef4b8c969962cf72b.js +0 -1
  241. package/layers/support/attributionUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7421],{563:(e,t,r)=>{r.d(t,{QueueProcessor:()=>h,SharedConcurrency:()=>d});var s=r(97768),i=r(74887),n=r(9775),o=r(32587),a=r(76030),u=r(44794);class h{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,u.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??c,this._queue=new n.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const r=this._get(e);if(r)return r;const s=new AbortController,n=(0,i.Tw)(),o=t?(0,i.u7)(t,()=>s.abort()):null,a=(0,i.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),u(),n.reject((0,i.NK)())}),u=()=>{a.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,n),this._controllers.set(e,s),n.promise.then(u,u),this._queue.push(e),this._scheduleNext(),n.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,a._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const r=new AbortController,s=new l(e,r);this._processingItems.set(e,s),this.sharedConcurrency.current.value+=1;try{t=this.process(e,r.signal)}catch(e){this._processError(s,e)}(0,i.$X)(t)?(s.promise=t,t.then(e=>this._processResult(s,e),e=>this._processError(s,e))):this._processResult(s,t)}}class l{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class d{constructor(e){this.limit=e,this.current=(0,u.v)(0)}get full(){return this.current.value>=this.limit}}const c=new d(1/0)},2272:(e,t,r)=>{r.d(t,{Dl:()=>h,gf:()=>d,jV:()=>u,lF:()=>l});var s=r(92602),i=r(70333),n=r(4718),o=r(84952),a=r(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function h(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function l(e,t,r){const s={};for(const i in e){if("declaredClass"===i)continue;const n=e[i];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[i]=n.map(e=>l(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r?.[i]);s[i]=t?e:JSON.stringify(e)}else s[i]=t?n:JSON.stringify(n);else s[i]=n}return s}async function d(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??i.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!i.id&&s.A.request.useIdentity&&await Promise.all([r.e(7330),r.e(168),r.e(148)]).then(r.bind(r,50148));const u=await i.id.getCredential(e,n);return u?.token}},5162:(e,t,r)=>{r.d(t,{HJ:()=>o,Im:()=>l,KN:()=>u});var s=r(39516),i=r(70300),n=r(8446);class o{static async create(e){const{metadata:t,definitionExpression:r}=e,i=r?await(0,s.GP)(r,t.fieldsIndex):null;return new o(t,i,r)}constructor(e,t,r){this.metadata=e,this._clause=t,this._definitionExpression=r}get hash(){return this._definitionExpression}testFeature(e){return null==this._clause||this._clause.testFeature(e)}}class a{constructor(){this.modified=new Map,this.removed=new Set}modify(e){this.modified.set(e.objectId,e),this.removed.has(e.objectId)&&this.removed.delete(e.objectId)}remove(e){this.modified.delete(e),this.removed.add(e)}get isEmpty(){return 0===this.modified.size&&0===this.removed.size}applyWhereClause(e){const t=new a;for(const[r,s]of this.modified)e.testFeature(s)?t.modified.set(r,s):t.removed.add(s.objectId);for(const e of this.removed)t.removed.add(e);return t}}class u extends i.K{constructor(e){super(),this._reader=e,this.chunkId="override",this.normalizedChunkId="override"}static fromFeatures(e,t){const r=n.K.fromOptimizedFeatures(e,t);return new u(r)}get reader(){return this._reader}get queryInfo(){return{}}get first(){return!1}get end(){return!1}get isTiled(){return!1}getTileReader(e){if(!this._reader.getSize())return null;const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}class h{constructor(e,t){this.inner=e,this.isWeak=t,this.lastWeak=null}get isStrong(){return!this.isWeak}}class l{constructor(e){this._parameters=e,this._overrides=new Map,this._update=new a,this._lastCleanup=0}update(e){this._parameters=e}hasOverride(e){return this._overrides.has(e)}onChunkInsert(e){if(this._overrides.size){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId(),r=this._overrides.get(e);if(r?.lastWeak&&(r.lastWeak=null),r?.isWeak){const e=t.readOptimizedFeatureWorldSpace(),s=r.inner?.attributes??{};e.attributes={...s,...e.attributes},r.inner=e,this._update.modify(e),this.invalidate()}}}e.registerOverrides(this)}apply(e,t){const{updateWeak:r,removeWeak:s,update:i,remove:n,release:o}=e.commands;this.invalidate();for(const e of r){const t=new h(e,!0),r=this._overrides.get(e.objectId);r?.isStrong?r.lastWeak=t:(this._overrides.set(e.objectId,t),this._update.modify(e))}for(const e of i){const t=new h(e,!1),r=this._overrides.get(e.objectId);t.lastWeak=r?.isWeak?r:r?.lastWeak??null,this._overrides.set(e.objectId,t),this._update.modify(e)}for(const e of s){const t=new h(null,!0),r=this._overrides.get(e);r?.isStrong?r.lastWeak=t:(this._overrides.set(e,t),this._update.remove(e))}for(const e of n){const t=new h(null,!1),r=this._overrides.get(e);t.lastWeak=r?.isWeak?r:r?.lastWeak??null,this._overrides.set(e,t),this._update.remove(e)}if(o.length){const e=new Set;for(const t of o){const r=this._overrides.get(t);r?.lastWeak?(this._overrides.set(t,r.lastWeak),null==r.lastWeak.inner?this._update.remove(t):this._update.modify(r.lastWeak.inner)):r&&!r.isWeak&&(this._overrides.delete(t),e.add(t))}t.forEachUnsafe(t=>{const r=t.getObjectId();e.has(r)&&(this._update.modify(t.readOptimizedFeatureWorldSpace()),e.delete(r))});for(const t of e.values())this._update.remove(t)}}clearWeakOverrides(){for(const[e,t]of this._overrides.entries())t.isWeak&&this._overrides.delete(e);this.invalidate()}cleanup(e){if(this._overrides.size<1e4)return;const t=performance.now();if(t-this._lastCleanup<1e3)return;this._lastCleanup=t;const r=this._getWeakDeletions();if(!(r.size<1e4)){for(const t of e){const e=t.reader.withoutOverrides().getCursor();for(;e.next();){const t=e.getObjectId();r.delete(t)}}for(const e of r)this._overrides.delete(e);r.size&&this.invalidate()}}takeOverrideUpdate(){const e=this._update;return e.isEmpty?null:(this._update=new a,e.applyWhereClause(this._parameters))}asChunk(){const e=this._parameters;if(this._lastOverrideParametersHash!==e.hash&&(this._lastOverrideParametersHash=e.hash,this._chunk=null),!this._chunk){const t=[];for(const r of this._overrides.values())null!=r.inner&&e.testFeature(r.inner)&&t.push(r.inner);this._chunk=u.fromFeatures(t,e.metadata)}return this._chunk}invalidate(){this._chunk=null}putWeakObjectIdsFromGlobalIds(e,t,r){for(const[s,i]of this._overrides.entries()){if(i.isWeak&&null!=i.inner){const n=i.inner.attributes[r];n&&t.has(n)&&!e.has(n)&&e.set(n,s);continue}if(null!=i.lastWeak&&null!=i.lastWeak.inner){const n=i.lastWeak.inner.attributes[r];n&&t.has(n)&&!e.has(n)&&e.set(n,s)}}}_getWeakDeletions(){const e=new Set;for(const[t,r]of this._overrides.entries())r.isWeak&&null==r.inner&&e.add(t);return e}}},8446:(e,t,r)=>{r.d(t,{K:()=>a});var s=r(90708),i=r(43334),n=r(95466),o=r(99996);class a extends o.Y{static fromFeatures(e,t){const{geometryType:r}=t,i=(0,s.Di)([],e,r,!1,!1,t.featureIdInfo);for(let t=0;t<i.length;t++)i[t].displayId=e[t].displayId;return a.fromOptimizedFeatures(i,t)}static fromFeatureSet(e,t){const r=(0,s.q3)(e,t.featureIdInfo);return a.fromOptimizedFeatureSet(r,t)}static fromOptimizedFeatureSet(e,t){const r=a.fromOptimizedFeatures(e.features,t);return r._exceededTransferLimit=e.exceededTransferLimit,r._transform=e.transform,r._fieldsIndex=new n.A(e.fields),r}static fromOptimizedFeatures(e,t,r){const s=new a(e,t);return s._fieldsIndex=t.fieldsIndex,s._transform=r,s}static empty(e){return new a([],e)}constructor(e,t){super(t),this._exceededTransferLimit=!1,this._featureIndex=-1,this._fieldsIndex=null,this._geometryType=t.geometryType,this._features=e}get fields(){return this._fieldsIndex}get geometryType(){return this._geometryType}get hasFeatures(){return!!this._features.length}get hasNext(){return this._featureIndex+1<this._features.length}get exceededTransferLimit(){return this._exceededTransferLimit}get hasZ(){return!1}get hasM(){return!1}get _current(){return this._features[this._featureIndex]}get usedMemory(){return this._current.usedMemory}getSize(){return this._features.length}getCursor(){return this.copy()}getInTransform(){return this._transform}getAttributeHash(){let e="";for(const t in this._current.attributes)e+=this._current.attributes[t];return e}getIndex(){return this._featureIndex}setIndex(e){this._featureIndex=e}getObjectId(){return this._current?.objectId}getDisplayId(){return this._current.displayId}setDisplayId(e){this._current.displayId=e}copy(){const e=new a(this._features,this.metadata);return this.copyInto(e),e}next(){for(;++this._featureIndex<this._features.length&&!this._getExists(););return this._featureIndex<this._features.length}readGeometryArea(){return(0,i.N3)(this._current)?(0,s.Rk)(this._current.geometry,2):0}_readX(){return(0,i.N3)(this._current)?this._current.geometry.coords[0]:0}_readY(){return(0,i.N3)(this._current)?this._current.geometry.coords[1]:0}_readGeometry(){return(0,i.N3)(this._current)?this._current.geometry??null:null}_readServerCentroid(){return this._current.centroid}_readAttribute(e,t){if(!this._fieldsIndex){const t=this._current.attributes[e];if(void 0!==t)return t;const r=e.toLowerCase();for(const e in this._current.attributes)if(e.toLowerCase()===r)return this._current.attributes[e];return}const r=this._fieldsIndex.get(e);if(!r)return;const s=this._current.attributes[r.name];return null==s?s:t&&this.fields.isDateField(e)?new Date(s):s}_readAttributes(){return this._current.attributes}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._transform=this._transform,e._fieldsIndex=this._fieldsIndex}}},9012:(e,t,r)=>{function s(e,{timeZone:t,timeExtent:r}){return{$view:{scale:e,timeZone:t,timeProperties:{currentStart:r?.start,currentEnd:r?.end}}}}r.d(t,{N:()=>s})},9775:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new i.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach(t=>{e(t)||this._items.delete(t)}),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},16630:(e,t,r)=>{r.d(t,{s:()=>u}),r(44208);var s=r(69397),i=r(92722),n=r(57733),o=r(99996);let a;class u extends o.Y{constructor(e,t,r,i,n,o=new Uint32Array(r.size())){super(e),this._fields=t,this._inner=r,this._chunkId=i,this._fileIndex=n,this._displayIds=o,this._index=-1,this.usedMemory=s.qK,this._size=this._inner.size(),e.featureIdInfo.type,this._chunkId>65535&&console.error("Exceeded max allowed parquet reader size")}destroy(){super.destroy(),this._inner.free()}get fields(){return this._fields}get geometryType(){return this.metadata.geometryType}get hasFeatures(){return!0}get hasNext(){throw new Error("Method not implemented.")}get exceededTransferLimit(){return!1}get hasZ(){return!1}get hasM(){return!1}getInTransform(){return null}getSize(){return this._size}getCursor(){return this.copy()}getAttributeHash(){let e="";for(const t of this.fields.fields)e+=this._readAttribute(t.name,!1)+".";return e}getObjectId(){return this._fileIndex<<24|this._inner.rowId(this._index)}getDisplayId(){return this._displayIds[this._index]}setDisplayId(e){this._displayIds[this._index]=e}setIndex(e){this._index=e}getBoundsXMin(){return this._inner.boundsXMin(this._index)}getBoundsYMin(){return this._inner.boundsYMin(this._index)}getBoundsXMax(){return this._inner.boundsXMax(this._index)}getBoundsYMax(){return this._inner.boundsYMax(this._index)}setBoundsXMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsXMax(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMax(e){throw new Error("InternalError: Setting bounds is unsupported")}getIndex(){return this._index}next(){for(;++this._index<this._size&&!this._getExists(););return this._index<this._size}readGeometryArea(){return this.readGeometryForDisplay()?.area()??0}copy(){const e=new u(this.metadata,this._fields,this._inner,this._chunkId,this._fileIndex,this._displayIds);return this.copyInto(e),e}copyInto(e){super.copyInto(e),e._index=this._index}readGeometryForDisplayTransformed(e){const[t,r]=e.translate,[s,o]=e.scale;return a||(a=n.QuantizedGeometryBuffer.new()),this._inner.transformGeometry(a,t,r,s,o,this._index)?new i.A(a.readLengthsUnsafe(),a.readCoordsUnsafe(),this.hasZ,this.hasM):null}_readGeometry(e){const t=this._inner.readCoords(this._index),r=this._inner.readLengths(this._index);return t&&r?new i.A(r,t,this.hasZ,this.hasM):null}_readX(){return this._inner.readX(this._index)}_readY(){return this._inner.readY(this._index)}_readServerCentroid(){return null}_readAttribute(e,t){const r=this.fields.get(e);if(!r)return;if(null==r.column)return this.getObjectId();const s=this._inner.readAttribute(this._index,r.column);if(null==s)return s;const i=this.fields.isDateField(r.name);return t?null==s?s:i?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._fields.fields)null!=t.column&&(this._inner.isEmpty(t.column)||(e[t.name]=this._readAttribute(t.name,!1)));return e.__OBJECTID=this.getObjectId(),e}}},20437:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(31635),n=r(66552),o=r(25482),a=r(91429),u=r(56507),h=r(80451),l=r(98453),d=r(36005),c=r(93223);const _=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let p=class extends o.o{static{s=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?_.fromJSON(r.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"alias",void 0),(0,i.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],p.prototype,"defaultValue",void 0),(0,i.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,i.Cg)([(0,d.w)("description")],p.prototype,"readDescription",null),(0,i.Cg)([(0,a.MZ)({types:h.gK,json:{read:{reader:h.rS},write:!0}})],p.prototype,"domain",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"editable",void 0),(0,i.Cg)([(0,a.MZ)({type:u.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],p.prototype,"length",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"nullable",void 0),(0,i.Cg)([(0,c.e)(l.m)],p.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)()],p.prototype,"valueType",void 0),(0,i.Cg)([(0,d.w)("valueType",["description"])],p.prototype,"readValueType",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],p.prototype,"visible",void 0),p=s=(0,i.Cg)([(0,a.$K)("esri.layers.support.Field")],p)},28923:(e,t,r)=>{r.d(t,{j:()=>i});var s=r(70300);class i extends s.K{constructor(e,t,r,s,i=0){super(),this._reader=e,this._queryJSON=t,this._page=r,this._end=s,this._fileIndex=i,this.chunkId=`${this._fileIndex}.${this._page}${this.end?"e":""}`,this.normalizedChunkId=this.chunkId}get reader(){return this._reader}get first(){return 0===this._page}get end(){return this._end}get queryInfo(){return{type:"snapshot",chunkId:this.chunkId,queryJSON:this._queryJSON,page:this._page,size:this.size(),end:this.end}}get isTiled(){return!1}getTileReader(e){const t=this.queryFeaturesInBounds(e.bounds);return t.setTransformForDisplay(e.transform),t}}},30661:(e,t,r)=>{r.d(t,{Z:()=>n});var s=r(43334),i=r(8446);class n{static{this.Shared=new n}getObjectId(e){return e.getObjectId()}getAttributes(e){return e.readAttributes()}getAttribute(e,t){return e.readAttribute(t)}getAttributeAsTimestamp(e,t){return e.readAttributeAsTimestamp(t)}cloneWithGeometry(e,t){const r=e.readAttributes(),n=new s.Om(t,r,null,e.getObjectId(),e.getDisplayId()),o=i.K.fromOptimizedFeatures([n],e.metadata);return o.setIndex(0),o}getGeometry(e){return e.readGeometryWorldSpace()}getCentroid(e,t){return e.readCentroidForDisplay()}}},32011:(e,t,r)=>{r.d(t,{d:()=>h});var s=r(19419),i=r(6606),n=r(12359),o=r(95108),a=r(12176);const u=222045e-19;function h(e){if(0===e.totalSize)return null;const t=(0,i.z8)(e);if(!t)return null;const r=4*(Math.abs(t[0])+Math.abs(t[2])+Math.abs(t[1])+Math.abs(t[3])+1)*u;let o=0,a=0;e.reset();for(let t=0;e.nextPath();t++){const r=e.getCurrentRingArea();r>a&&(a=r,o=t)}if(e.seekPath(o),0===e.pathSize)return null;e.seekPathStart();const h=(0,i.B$)(e);if(Math.abs(a)<=2*r*r)return[(h[0]+h[2])/2,(h[1]+h[3])/2];e.seekPathStart();const _=(0,n.w2)(e,(0,s.vt)());if(null===_)return null;if(e.totalPoints<4)return _;const p=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let m=!1,y=d(_,e,!0);0===y.distance&&(m=!0,p[0][0]=_[0],p[0][1]=_[1],y=d(_,e,!1)),f[0]=y.distance,g[0]=0;const b=[NaN,NaN];let I=!1,T=.25,F=-1,S=NaN;do{if(S=NaN,p[1]=c(e,w(h[0],h[2],T),0,t),isNaN(p[1][0])||isNaN(p[1][1])||(y=d(p[1],e,!1),S=y.distance),!isNaN(S)&&S>r&&l(p[1],e))I=!0,f[1]=S,g[1]=x(p[1],_);else if(!isNaN(S)&&S>F&&(F=S,b[0]=p[1][0],b[1]=p[1][1]),T-=.01,T<.1){if(!(F>=0))break;I=!0,f[1]=F,p[1][0]=b[0],p[1][1]=b[1],g[1]=x(p[1],_)}}while(!I);I=!1,T=.5,F=-1;let M=.01,A=1;do{if(S=NaN,p[2]=c(e,w(h[0],h[2],T),0,t),isNaN(p[2][0])||isNaN(p[2][1])||(y=d(p[2],e,!1),S=y.distance),!isNaN(S)&&S>r&&l(p[2],e))I=!0,f[2]=S,g[2]=x(p[2],_);else if(!isNaN(S)&&S>F)F=S,b[0]=p[2][0],b[1]=p[2][1];else if(S>F&&(F=S,b[0]=p[2][0],b[1]=p[2][1]),T=.5+M*A,M+=.01,A*=-1,T<.3||T>.7){if(!(F>=0))break;I=!0,f[2]=F,p[2][0]=b[0],p[2][1]=b[1],g[2]=x(p[2],_)}}while(!I);I=!1,T=.75,F=-1;do{if(S=NaN,p[3]=c(e,w(h[0],h[2],T),0,t),isNaN(p[3][0])||isNaN(p[3][1])||(y=d(p[3],e,!1),S=y.distance),!isNaN(S)&&S>r&&l(p[3],e))I=!0,f[3]=S,g[3]=x(p[3],_);else if(S>F&&(F=S,b[0]=p[3][0],b[1]=p[3][1]),T+=.01,T>.9){if(!(F>=0))break;I=!0,f[3]=F,p[3][0]=b[0],p[3][1]=b[1],g[3]=x(p[3],_)}}while(!I);const C=[0,1,2,3],k=m?0:1;let P;for(let e=k;e<4;e++)for(let e=k;e<3;e++){const t=g[e],r=g[e+1];v(t,r)>0&&(P=C[e],C[e]=C[e+1],C[e+1]=P,g[e]=r,g[e+1]=t)}let O=k,z=0,N=0;for(let e=k;e<4;e++){switch(e){case 0:N=2*f[C[e]];break;case 1:N=1.66666666*f[C[e]];break;case 2:N=1.33333333*f[C[e]];break;case 3:N=f[C[e]]}N>z&&(z=N,O=C[e])}return p[O]}function l(e,t){let r,s,i,n,o=0;for(t.reset();t.nextPath()&&t.nextPoint();)for(r=t.x,s=t.y;t.nextPoint();r=i,s=n)i=t.x,n=t.y,s>e[1]!=n>e[1]&&((i-r)*(e[1]-s)-(n-s)*(e[0]-r)>0?o++:o--);return 0!==o}function d(e,t,r){if(r&&l(e,t))return{coord:e,distance:0};let s=1/0,i=0,n=0,a=[0,0],u=[0,0];const h=[0,0];for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(a[0]=t.x,a[1]=t.y;t.nextPoint();a=u){u=[t.x,t.y],(0,o.gR)(h,e,a,u);const r=x(e,h);r<s&&(s=r,i=h[0],n=h[1])}return{coord:[i,n],distance:Math.sqrt(s)}}function c(e,t,r,i){const n=[t,0];let o=1/0,u=1/0,h=!1,l=!1;const d=[[t,i[1]-1],[t,i[3]+1]],c=[0,0],p=[0,0],f=[0,0],g=[[0,0],[0,0]],m=(0,s.vt)();for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(g[0][0]=e.x,g[0][1]=e.y;e.nextPoint();g[0][0]=g[1][0],g[0][1]=g[1][1]){if(g[1][0]=e.x,g[1][1]=e.y,null===_(m,g))continue;if(p[0]=d[0][0],p[1]=d[0][1],f[0]=d[1][0],f[1]=d[1][1],0===y(m,p,f))continue;if(!(0,a.Ql)(d[0],d[1],g[0],g[1],c))continue;const t=c[1];o>u?t<o&&(o=t,h=!0):t<u&&(u=t,l=!0)}return h&&l?n[1]=(o+u)/2:n[0]=n[1]=NaN,n}function _(e,t){if(t.length<2)return null;e||(e=(0,s.vt)());const[r,i]=t[0],[n,o]=t[1];return e[0]=Math.min(r,n),e[1]=Math.min(i,o),e[2]=Math.max(r,n),e[3]=Math.max(i,o),e}const p=1,f=4,g=3,m=12;function y(e,t,r){let s=b(t,e),i=b(r,e);const n=e[0],o=e[1],a=e[2],u=e[3];if(s&i)return 0;if(!(s|i))return 4;const h=(s?1:0)|(i?2:0);do{const h=r[0]-t[0],l=r[1]-t[1];if(h>l)s&g?(s&p?(t[1]+=l*(n-t[0])/h,t[0]=n):(t[1]+=l*(a-t[0])/h,t[0]=a),s=b(t,e)):i&g?(i&p?(r[1]+=l*(n-r[0])/h,r[0]=n):(r[1]+=l*(a-r[0])/h,r[0]=a),i=b(r,e)):s?(s&f?(t[0]+=h*(o-t[1])/l,t[1]=o):(t[0]+=h*(u-t[1])/l,t[1]=u),s=b(t,e)):(i&f?(r[0]+=h*(o-r[1])/l,r[1]=o):(r[0]+=h*(u-r[1])/l,r[1]=u),i=b(r,e));else if(s&m?(s&f?(t[0]+=h*(o-t[1])/l,t[1]=o):(t[0]+=h*(u-t[1])/l,t[1]=u),s=b(t,e)):i&m?(i&f?(r[0]+=h*(o-r[1])/l,r[1]=o):(r[0]+=h*(u-r[1])/l,r[1]=u),i=b(r,e)):s?(s&p?(t[1]+=l*(n-t[0])/h,t[0]=n):(t[1]+=l*(a-t[0])/h,t[0]=a),s=b(t,e)):(i&p?(r[1]+=l*(n-r[0])/h,r[0]=n):(r[1]+=l*(a-r[0])/h,r[0]=a),i=b(r,e)),s&i)return 0}while(s|i);return h}function b(e,t){return(e[0]<t[0]?1:0)|(e[0]>t[2]?1:0)<<1|(e[1]<t[1]?1:0)<<2|(e[1]>t[3]?1:0)<<3}function w(e,t,r){return e+(t-e)*r}function x(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}function v(e,t){if(e<t)return-1;if(e>t)return 1;if(e===t)return 0;const r=isNaN(e),s=isNaN(t);return r<s?-1:r>s?1:0}},32587:(e,t,r)=>{r.d(t,{A:()=>n});var s=r(62788),i=r(95488);class n{constructor(e){this._observable=new i.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach((r,s)=>e.call(t,r,s,this),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),s=e(t,r);s!==t&&this.set(r,s)}})}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},35258:(e,t,r)=>{r.d(t,{i:()=>n});var s=r(16930),i=r(95466);class n{static minimal(e,t,r=[]){return new n({geometryType:e,fieldsIndex:new i.A(r).toJSON(),featureIdInfo:{type:"object-id",fieldName:t},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null})}static createFeature(e){return new n(e)}constructor(e){let t;this._options=e,this._fieldsIndex=i.A.fromJSON(e.fieldsIndex),e.spatialReference&&(e.spatialReference instanceof s.A?this._spatialReference=e.spatialReference:this._spatialReference=s.A.fromJSON(e.spatialReference)),e.outSpatialReference&&(e.outSpatialReference instanceof s.A?this._outSpatialReference=e.outSpatialReference:this._outSpatialReference=s.A.fromJSON(e.outSpatialReference)),"object-id"===e.featureIdInfo.type&&(t=e.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:t,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}weakCloneWithAdditionalFields(e){return new n({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types})}}},36708:(e,t,r)=>{r.d(t,{C_:()=>c,OH:()=>f,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>u,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function u(e,t,r={}){return l(e,t,r,_)}function h(e,t,r={}){return l(e,t,r,p)}function l(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function d(e,t,r,o={}){let a=null,h=null,l=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.xt)(l),r(e)}const _=u(e,(e,r)=>{d(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return l=(0,i.hA)(()=>{_.remove(),d()}),l}function c(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function u(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{u(),n((0,o.NK)())}),l(e,e=>{u(),s(e)},{sync:!1,once:!0},t??_)])})}(e,p,t)}function _(e){return!0}function p(e){return!!e}r(80559);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},36745:(e,t,r)=>{r.d(t,{z:()=>a});var s=r(4718),i=r(51118),n=r(65864),o=r(92722);class a{static fromOptimized(e,t,r=1){return(new u).initialize(e,t,r)}static fromJSON(e){const[t,r]=l(e),s=(0,n.Pv)(e),i=(0,n.W0)(e);return(new d).initialize(t,r,s,i,1)}static fromOptimizedCIM(e,t,r=1){return(new c).initialize(e,t,r)}static fromJSONCIM(e,t=1){const[r,s]=l(e),i=(0,n.Pv)(e),o=(0,n.W0)(e);return(new _).initialize(r,s,i,o,t)}static fromFeatureSetReader(e){const t=e.readGeometryForDisplay(),r=e.geometryType;return t&&r?this.fromOptimized(t,r):null}static fromFeatureSetReaderCIM(e){const t=e.readGeometryForDisplay(),r=e.geometryType;return t&&r?this.fromOptimizedCIM(t,r):null}static createEmptyOptimized(e,t=!1,r=!1,s=1){return(new c).initialize(new o.A([],[],t,r),e,s)}static createEmptyJSON(e,t=!1,r=!1){return(new d).initialize([],e,t,r,1)}static createEmptyOptimizedCIM(e,t=!1,r=!1,s=1){return(new c).initialize(new o.A([],[],t,r),e,s)}static createEmptyJSONCIM(e,t=!1,r=!1,s=1){return(new _).initialize([],e,t,r,s)}asJSON(){const e=(0,i.x)(this),{hasZ:t,hasM:r}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:e[0][0][0],ymin:e[0][0][1],xmax:e[0][2][0],ymax:e[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:e.flat(),hasZ:t,hasM:r}:"esriGeometryPoint"===this.geometryType?{x:e[0][0][0],y:e[0][0][1],z:t?e[0][0][2]:void 0,m:r?e[0][0][t?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:e,hasZ:t,hasM:r}:{paths:e,hasZ:t,hasM:r}}getCurrentRingArea(){if(this.pathSize<3)return 0;let e,t,r=0;if(this.seekPathStart(),!this.nextPoint())return 0;e=this.x,t=this.y;const s=e,i=t;for(;this.nextPoint();)r+=(e-this.x)*(t+this.y),e=this.x,t=this.y;return r+=(e-s)*(t+i),-.5*r}invertY(){this.yFactor*=-1}}class u extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(e,t,r){return this.geometryType=t,this._stride=e.stride,this._geometry=e,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=r,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(e){if(e>=0&&e<this.totalSize){if(this._pathIndex<e)for(;this._pathIndex<e&&this.nextPath(););else if(this._pathIndex>e)for(;this._pathIndex>e&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(e){const t=this._pathOffset+e*this._stride;return t>=0&&t<this._end&&(this._pointOffset=t,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const e=this._end,t=this._geometry.coords,r=this._pathOffset;return(new u).initialize(new o.A([this.pathSize],t.slice(r,e),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const e=this._end,t=this._stride,r=this._geometry.coords;let s=0;for(let i=this._pathOffset+t;i<e;i+=t){const e=r[i-t],n=r[i-t+1],o=r[i]-e,a=r[i+1]-n;s+=Math.sqrt(o*o+a*a)}return s}startPath(){this._geometry.lengths.push(0)}pushPath(e){this.startPath(),this.pushPoints(e)}pushPoint(e){for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]++}pushXY(e,t){this._geometry.coords.push(e,t),this._geometry.lengths[this.totalSize-1]++}pushPoints(e){for(const t of e)for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]+=e.length}pushCursor(e){const t=e.asOptimized();this._geometry.coords.push(...t.coords),this._geometry.lengths.push(...t.lengths)}asOptimized(){const e=this._geometry.clone();if(1!==this.yFactor)for(let t=1;t<e.coords.length;t+=this._stride)e.coords[t]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(e.lengths.length=0),e}isClosed(){const e=this._geometry.coords,t=this._pathOffset,r=this._end-this._stride;for(let s=0;s<this._stride;s++)if(e[t+s]!==e[r+s])return!1;return!0}clone(){return(new u).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((e,t)=>e+t)}get pathSize(){const{lengths:e}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>e.length-1?0:e[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(e){this._geometry.coords[this._pointOffset]=e}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(e){this._geometry.coords[this._pointOffset+1]=this.yFactor*e}get z(){return this._geometry.coords[this._pointOffset+2]}set z(e){this._geometry.coords[this._pointOffset+2]=e}get m(){const e=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+e]}set m(e){this._geometry.coords[this._pointOffset+3]=e}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function h(e){const t=[e.x,e.y];return e.z&&t.push(e.z),e.m&&t.push(e.m),t}function l(e){return(0,n.Bi)(e)?[e.rings,"esriGeometryPolygon"]:(0,n.Rg)(e)?[e.paths,"esriGeometryPolyline"]:(0,n.U9)(e)?[[e.points],"esriGeometryMultipoint"]:(0,n.ZC)(e)?[[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(e)?[[[h(e)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class d extends a{initialize(e,t,r,s,i){return this._paths=e,this.geometryType=t,this.hasZ=r,this.hasM=s,this._pathIndex=this._pointIndex=-1,this.yFactor=i,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(e){return this._pathIndex=e,this._pointIndex=-1,e>=0&&e<this.totalSize&&(this._currentPath=this._paths[e],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(e){return e>=0&&e<this._currentPath.length&&(this._pointIndex=e,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const e=this._currentPath.length,t=this._currentPath;let r=0;for(let s=1;s<e;s++){const e=t[s-1],i=t[s],n=e[0],o=e[1],a=i[0]-n,u=i[1]-o;r+=Math.sqrt(a*a+u*u)}return r}startPath(){this._paths.push([])}getCurrentPath(){return(new d).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(e){this._paths.push(e)}pushPoint(e){this._paths[this.totalSize-1].push(e)}pushXY(e,t){this._paths[this.totalSize-1].push([e,t])}pushPoints(e){this._paths[this.totalSize-1].push(...e)}pushCursor(e){const t=(0,i.x)(e);for(const e of t)this.pushPath(e)}asOptimized(){const{hasZ:e,hasM:t}=this,r=new o.A([],[],e,t),{coords:s,lengths:i}=r;if("esriGeometryPoint"===this.geometryType)s.push(...this._paths[0][0]),i.length=0;else for(const r of this._paths){for(const i of r)s.push(i[0]),s.push(i[1]*this.yFactor),e&&s.push(i[2]),t&&s.push(i[this._mIndex]);i.push(r.length)}return r}isClosed(){const e=this._currentPath[0],t=this._currentPath[this._currentPath.length-1];for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}clone(){return(new d).initialize((0,s.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(e=>e.length).reduce((e,t)=>e+t)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(e){this._currentPoint[0]=e}get y(){return this.yFactor*this._currentPoint[1]}set y(e){this._currentPoint[1]=this.yFactor*e}get z(){return this._currentPoint[2]}set z(e){this._currentPoint[2]=e}get m(){return this._currentPoint[this._mIndex]}set m(e){this._currentPoint[this._mIndex]=e}get pathIndex(){return this._pathIndex}}class c extends u{initialize(e,t,r){return super.initialize(e,t,r),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(e=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const e=(new c).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return e._controlPoints=this._controlPoints,e}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(e){this._controlPoints[this.pathIndex].add(e)}getControlPointAt(e){return this._controlPoints[this.pathIndex].has(e)}}class _ extends d{initialize(e,t,r,s,i){return super.initialize(e,t,r,s,i)}clone(){return(new _).initialize((0,s.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(e){this._paths[this.pathIndex][e][4]=1}getControlPointAt(e){return 1===this._paths[this.pathIndex][e][4]}}},38976:(e,t,r)=>{r.d(t,{n:()=>n});var s=r(76213),i=r(9012);class n{constructor(e){this._options=e}insert(e,t){const r=e.getCursor(),{arcadeContextInfo:s,scale:n}=this._options,o=(0,i.N)(n,s);for(;r.next();)this._insertFeature(r,o,this._options.sqlOptions,t)}_insertFeature(e,t,r,i){const{featureFilter:n}=this._options;if(null!==n&&!n.check(e,r))return;let o=0,a=0;if("esriGeometryPoint"===e.geometryType)o=e.readXWorldSpace(),a=e.readYWorldSpace();else{if(i){const t=e.readCentroidForDisplay();if(null==t)return;const[r,i]=t.coords;if(r<0||r>s.CQ||i<0||i>s.CQ)return}const t=e.readCentroidWorldSpace();if(null==t)return;o=t.coords[0],a=t.coords[1]}this._insert(e,o,a,t)}}},39357:(e,t,r)=>{r.d(t,{H:()=>a});var s,i=r(31635),n=r(25482),o=r(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},44320:(e,t,r)=>{r.d(t,{I:()=>u});var s=r(65529),i=r(44208),n=r(70328),o=r(30661),a=r(5162);class u{constructor(){this._chunks=new Map,this._chunksToRemove=[],this.events=new s.bk,this.featureAdapter=new o.Z}destroy(){this.clear()}clear(){for(const e of this._chunks.values())this._chunksToRemove.push(e);this._chunks.clear(),this._overrides?.clearWeakOverrides()}get usedMemory(){let e=0;for(const t of this._chunks.values())e+=t.usedMemory;return e}async update(e){if(this._overrides){const t=await a.HJ.create(e);this._overrides.update(t)}this._schema=e}*chunks(){this._overrides&&(yield this._overrides.asChunk()),yield*this._chunks.values()}insert(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.insert`),this._overrides?.onChunkInsert(e),this._chunks.set(e.chunkId,e),this.events.emit("changed")}remove(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e.chunkId}] SourceChunkStore.remove`),this._chunks.delete(e.chunkId),this._chunksToRemove.push(e)}removeById(e){(0,i.A)("esri-2d-update-debug")&&console.debug(`Chunk[${e}] SourceChunkStore.remove`);const t=this._chunks.get(e);this._chunks.delete(e),t&&this._chunksToRemove.push(t)}cleanup(){const e=this._chunksToRemove;return this._chunksToRemove=[],this._overrides?.cleanup(this._chunks.values()),e}async applyOverride(e){if(null==this._overrides){const e=await a.HJ.create(this._schema);this._overrides=new a.Im(e);for(const e of this._chunks.values())this._overrides.onChunkInsert(e)}this._overrides.apply(e,this),this.events.emit("changed");for(const e of this._chunks.values())e.invalidate()}takeOverrideUpdate(){return this._overrides?.takeOverrideUpdate()}refresh(){this.events.emit("refresh")}forEach(e){const t=new Set;for(const r of this.chunks()){const s=r.reader.getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s.copy()),t.add(r))}}}forEachUnsafe(e){const t=new Set;for(const r of this.chunks()){const s=r.reader.getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s),t.add(r))}}}mapObjectIdsFromGlobalIds(e,t){const r=new Map,s=new Set(e);return this._overrides?.putWeakObjectIdsFromGlobalIds(r,s,t),this._forEachUnsafeIgnoreOverrides(e=>{const i=e.readAttribute(t);if(i&&s.has(i)&&!r.has(i)){const t=e.getObjectId();r.set(i,t)}}),r}forEachInBounds(e,t){const r=new Set;for(const s of this.chunks()){const i=s.queryFeaturesInBounds(e);for(;i.next();){const e=i.getObjectId();r.has(e)||(t(i.copy()),r.add(e))}}}forEachBounds(e,t){const r=(0,n.vt)();for(const s of e)s.getBounds(r)&&t(r)}_forEachUnsafeIgnoreOverrides(e){const t=new Set;for(const r of this._chunks.values()){const s=r.reader.withoutOverrides().getCursor();for(;s.next();){const r=s.getObjectId();t.has(r)||(e(s),t.add(r))}}}}},48163:(e,t,r)=>{function s(){return[0,0]}function i(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function o(){return n(1,1)}function a(){return n(1,0)}function u(){return n(0,1)}r.d(t,{Un:()=>h,fA:()=>n,o8:()=>i,vt:()=>s});const h=o(),l=a(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:l,UNIT_Y:d,ZEROS:[0,0],clone:i,create:s,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let s=0;s<r;++s)t[s]=e[s];return t},fromValues:n,ones:o,unitX:a,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},50115:(e,t,r)=>{r.d(t,{OP:()=>o,V4:()=>i,rZ:()=>n}),r(44208);var s=r(53966);function i(e,t,r){if(null==e)return null;const i=t.readArcadeFeature();t.contextTimeZone=r.$view?.timeZone;try{return e.evaluate(i,r)}catch(e){return s.A.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",e),null}}function n(e){return null==e||e===1/0||e===-1/0||"number"==typeof e&&isNaN(e)}function o(e,t,r,s){if(null==e)return null!=s?s:null;const i=t.readArcadeFeature();t.contextTimeZone=r.$view?.timeZone;const o=e.evaluate(i,r);return n(o)?null!=s?s:null:o}},52350:(e,t,r)=>{r.d(t,{e:()=>a});var s=r(69397),i=r(62577),n=r(90708),o=r(99996);class a extends o.Y{static from(e,t){if(e instanceof this){const r=new Set(t),s=e._indices.filter(e=>r.has(e));return new a(e._reader,s)}return new a(e.copy(),t)}constructor(e,t){super(e.metadata),this._currentIndex=-1,this._displayTransform=null,this._reader=e,this._indices=t}setTransformForDisplay(e){const t=this._reader.getInTransform();if(null==t)return void(this._displayTransform=(0,i.Q1)(e));const r=(0,i.Q1)(t),s=(0,i.Q1)(e),[n,o]=r.scale,[a,u]=r.translate,[h,l]=s.scale,[d,c]=s.translate,_=n/h,p=o/l,f=(a-d)/h,g=(u-c)/l;this._displayTransform={originPosition:"lowerLeft",scale:[1/_,1/p,1,1],translate:[-f/_,-g/p,0,0]}}getInTransform(){return this._reader.getInTransform()}get fields(){return this._reader.fields}get hasNext(){return this._currentIndex+1<this._indices.length}getSize(){return this._indices.length}getCursor(){return this.copy()}copy(){const e=new a(this._reader.copy(),this._indices);return e._currentIndex=this._currentIndex,e._displayTransform=this._displayTransform,e._processorAttributes=this._processorAttributes,e}get contextTimeZone(){return this._reader.contextTimeZone}set contextTimeZone(e){this._reader.contextTimeZone=e}get usedMemory(){return s.qK+this._reader.usedMemory}setProcessorAttributes(e){this._processorAttributes=Object.assign(this._processorAttributes??{},e)}_nextIndex(){return++this._currentIndex<this._indices.length&&(this._reader.setIndex(this._indices[this._currentIndex]),!0)}next(){for(;this._nextIndex()&&!this._reader._getExists(););return this._currentIndex<this._indices.length}readXForDisplay(){return this._displayTransform?(0,i.IE)(this._displayTransform,this._reader.readXForDisplay()):this._reader.readXForDisplay()}readYForDisplay(){return this._displayTransform?(0,i.B2)(this._displayTransform,this._reader.readYForDisplay()):this._reader.readYForDisplay()}readGeometryForDisplay(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform):this._reader.readGeometryForDisplay()}readCentroidForDisplay(){const e=this._reader.readCentroidForDisplay()?.clone();if(e){const[t,r]=e.coords;this._displayTransform&&(e.coords[0]=(0,i.IE)(this._displayTransform,t),e.coords[1]=(0,i.B2)(this._displayTransform,r))}return e}get geometryType(){return this._reader.geometryType}get hasFeatures(){return this._reader.hasFeatures}get exceededTransferLimit(){return this._reader.exceededTransferLimit}get hasZ(){return this._reader.hasZ}get hasM(){return this._reader.hasM}readAttribute(e,t=!1){const r=this._reader.readAttribute(e,t);return null==r&&this._processorAttributes?this._processorAttributes[e]:r}readAttributes(){return{...this._processorAttributes,...this._reader.readAttributes()}}joinAttributes(e){return this._reader.joinAttributes(e)}getBounds(e){return this._reader.getBounds(e)}getAttributeHash(){return this._reader.getAttributeHash()}getObjectId(){return this._reader.getObjectId()}getDisplayId(){return this._reader.getDisplayId()}setDisplayId(e){return this._reader.setDisplayId(e)}setIndex(e){return this._reader.setIndex(e)}getIndex(){return this._reader.getIndex()}readXWorldSpace(){return this._reader.readXWorldSpace()}readYWorldSpace(){return this._reader.readYWorldSpace()}_readX(){return this._reader.readXForDisplay()}_readY(){return this._reader.readYForDisplay()}_readServerCentroid(){return this._reader._readServerCentroid()}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return(0,n.zv)(e,this.geometryType,!1,!1)}readGeometryArea(){return this._displayTransform?this._reader.readGeometryForDisplayTransformed(this._displayTransform)?.area()??0:this._reader.readGeometryArea()}readGeometryWorldSpace(){return this._reader.readGeometryWorldSpace()}_readGeometry(){return this._reader._readGeometry()}_readAttribute(e,t){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}_readAttributes(){throw new Error("Error: Should not be called. Underlying _reader should be used instead")}readArcadeFeature(){return this._reader.readArcadeFeature()}geometry(){return this._reader.geometry()}field(e){return this._reader.field(e)}hasField(e){return this._reader.hasField(e)}setField(e,t){return this._reader.setField(e,t)}keys(){return this._reader.keys()}castToText(e=!1){return this._reader.castToText(e)}}},53177:(e,t,r)=>{r.d(t,{A:()=>l});var s,i=r(31635),n=r(4718),o=r(91429),a=r(39357),u=r(76357),h=r(93223);let l=class extends u.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some(e=>(String(e.code)===r&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,o.MZ)({type:[a.H],json:{write:{isRequired:!0}}})],l.prototype,"codedValues",void 0),(0,i.Cg)([(0,h.e)({codedValue:"coded-value"})],l.prototype,"type",void 0),l=s=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],l)},57733:(e,t,r)=>{let s;function i(e){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,e),t}function n(e,t){try{return e.apply(this,t)}catch(e){const t=i(e);s.__wbindgen_exn_store(t)}}r.r(t),r.d(t,{ColumnDescriptor:()=>W,FieldMetadata:()=>Y,GeometryInfo:()=>X,GeometryType:()=>D,MultiscaleGeometryField:()=>U,PageEncodingDescriptor:()=>V,ParquetChunk:()=>$,ParquetFile:()=>K,PrimaryGeometryField:()=>ee,QuantizedGeometryBuffer:()=>re,RangeProviderJs:()=>ie,RowGroup:()=>oe,default:()=>de,enableTracing:()=>M,initSync:()=>le});let o=null;function a(){return null!==o&&0!==o.byteLength||(o=new Uint8Array(s.memory.buffer)),o}let u=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});u.decode();const h=2146435072;let l=0;function d(e,t){return function(e,t){return l+=t,l>=h&&(u=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),u.decode(),l=t),u.decode(a().subarray(e,e+t))}(e>>>=0,t)}function c(e,t){return e>>>=0,a().subarray(e/1,e/1+t)}let _=null;function p(){return null!==_&&0!==_.byteLength||(_=new Uint32Array(s.memory.buffer)),_}function f(e,t){return e>>>=0,p().subarray(e/4,e/4+t)}let g=0;const m=new TextEncoder;function y(e,t,r){if(void 0===r){const r=m.encode(e),s=t(r.length,1)>>>0;return a().subarray(s,s+r.length).set(r),g=r.length,s}let s=e.length,i=t(s,1)>>>0;const n=a();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;n[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=r(i,s,s=o+3*e.length,1)>>>0;const t=a().subarray(i+o,i+s);o+=m.encodeInto(e,t).written,i=r(i,s,o,1)>>>0}return g=o,i}"encodeInto"in m||(m.encodeInto=function(e,t){const r=m.encode(e);return t.set(r),{read:e.length,written:r.length}});let b=null;function w(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==s.memory.buffer)&&(b=new DataView(s.memory.buffer)),b}function x(e){return null==e}const v="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{s.__wbindgen_export_6.get(e.dtor)(e.a,e.b)});function I(e,t,r,i){const n={a:e,b:t,cnt:1,dtor:r},o=(...e)=>{n.cnt++;const t=n.a;n.a=0;try{return i(t,n.b,...e)}finally{0===--n.cnt?(s.__wbindgen_export_6.get(n.dtor)(t,n.b),v.unregister(n)):n.a=t}};return o.original=n,v.register(o,n,n),o}function T(e,t){e>>>=0;const r=w(),i=[];for(let n=e;n<e+4*t;n+=4)i.push(s.__wbindgen_export_2.get(r.getUint32(n,!0)));return s.__externref_drop_slice(e,t),i}let F=null;function S(){return null!==F&&0!==F.byteLength||(F=new Int16Array(s.memory.buffer)),F}function M(){s.enableTracing()}let A=null;function C(){return null!==A&&0!==A.byteLength||(A=new Float64Array(s.memory.buffer)),A}function k(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function P(e,t){const r=t(8*e.length,8)>>>0;return C().set(e,r/8),g=e.length,r}function O(e,t){const r=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const s=i(e[t]);w().setUint32(r+4*t,s,!0)}return g=e.length,r}function z(e,t){const r=t(1*e.length,1)>>>0;return a().set(e,r/1),g=e.length,r}function N(e,t){const r=t(4*e.length,4)>>>0;return p().set(e,r/4),g=e.length,r}function B(e,t,r){s.closure86_externref_shim(e,t,r)}function G(e,t,r,i){s.closure12_externref_shim(e,t,r,i)}const D=Object.freeze({Point:0,0:"Point",Polygon:1,1:"Polygon",Polyline:2,2:"Polyline",Multipoint:3,3:"Multipoint"}),R=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_columndescriptor_free(e>>>0,1));class W{static __wrap(e){e>>>=0;const t=Object.create(W.prototype);return t.__wbg_ptr=e,q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_columndescriptor_free(e,0)}name(){let e,t;try{const r=s.columndescriptor_name(this.__wbg_ptr);return e=r[0],t=r[1],d(r[0],r[1])}finally{s.__wbindgen_free(e,t,1)}}physicalType(){let e,t;try{const r=s.columndescriptor_physicalType(this.__wbg_ptr);return e=r[0],t=r[1],d(r[0],r[1])}finally{s.__wbindgen_free(e,t,1)}}logicalType(){const e=s.columndescriptor_logicalType(this.__wbg_ptr);let t;return 0!==e[0]&&(t=d(e[0],e[1]).slice(),s.__wbindgen_free(e[0],1*e[1],1)),t}encodings(){const e=s.columndescriptor_encodings(this.__wbg_ptr);var t=T(e[0],e[1]).slice();return s.__wbindgen_free(e[0],4*e[1],4),t}pageEncodings(){const e=s.columndescriptor_pageEncodings(this.__wbg_ptr);let t;return 0!==e[0]&&(t=T(e[0],e[1]).slice(),s.__wbindgen_free(e[0],4*e[1],4)),t}numValues(){return s.columndescriptor_numValues(this.__wbg_ptr)}compression(){let e,t;try{const r=s.columndescriptor_compression(this.__wbg_ptr);return e=r[0],t=r[1],d(r[0],r[1])}finally{s.__wbindgen_free(e,t,1)}}compressedSize(){return s.columndescriptor_compressedSize(this.__wbg_ptr)}uncompressedSize(){return s.columndescriptor_uncompressedSize(this.__wbg_ptr)}nullCount(){const e=s.columndescriptor_nullCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}distinctCount(){const e=s.columndescriptor_distinctCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}minValue(){return s.columndescriptor_minValue(this.__wbg_ptr)}maxValue(){return s.columndescriptor_maxValue(this.__wbg_ptr)}}Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);const j="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_fieldmetadata_free(e>>>0,1));class Y{static __wrap(e){e>>>=0;const t=Object.create(Y.prototype);return t.__wbg_ptr=e,j.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,j.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_fieldmetadata_free(e,0)}get column(){return s.__wbg_get_fieldmetadata_column(this.__wbg_ptr)>>>0}set column(e){s.__wbg_set_fieldmetadata_column(this.__wbg_ptr,e)}get name(){let e,t;try{const r=s.fieldmetadata_name(this.__wbg_ptr);return e=r[0],t=r[1],d(r[0],r[1])}finally{s.__wbindgen_free(e,t,1)}}get type(){const e=s.fieldmetadata_esri_type(this.__wbg_ptr);return R[e]}get physicalType(){const e=s.fieldmetadata_physical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=d(e[0],e[1]).slice(),s.__wbindgen_free(e[0],1*e[1],1)),t}get logicalType(){const e=s.fieldmetadata_logical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=d(e[0],e[1]).slice(),s.__wbindgen_free(e[0],1*e[1],1)),t}}Symbol.dispose&&(Y.prototype[Symbol.dispose]=Y.prototype.free);const E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_geometryinfo_free(e>>>0,1));class X{static __wrap(e){e>>>=0;const t=Object.create(X.prototype);return t.__wbg_ptr=e,E.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_geometryinfo_free(e,0)}static new(e,t,r,i,n){k(i,ee);var o=i.__destroy_into_raw();const a=O(n,s.__wbindgen_malloc),u=g,h=s.geometryinfo_new(e,t,r,o,a,u);return X.__wrap(h)}}Symbol.dispose&&(X.prototype[Symbol.dispose]=X.prototype.free);const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_multiscalegeometryfield_free(e>>>0,1));class U{static __wrap(e){e>>>=0;const t=Object.create(U.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof U?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_multiscalegeometryfield_free(e,0)}get level(){return s.__wbg_get_multiscalegeometryfield_level(this.__wbg_ptr)}set level(e){s.__wbg_set_multiscalegeometryfield_level(this.__wbg_ptr,e)}static new(e,t,r,i){const n=y(t,s.__wbindgen_malloc,s.__wbindgen_realloc),o=g,a=P(r,s.__wbindgen_malloc),u=g,h=P(i,s.__wbindgen_malloc),l=g,d=s.multiscalegeometryfield_new(e,n,o,a,u,h,l);return U.__wrap(d)}has_field(e){const t=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=g;return 0!==s.multiscalegeometryfield_has_field(this.__wbg_ptr,t,r)}}Symbol.dispose&&(U.prototype[Symbol.dispose]=U.prototype.free);const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_pageencodingdescriptor_free(e>>>0,1));class V{static __wrap(e){e>>>=0;const t=Object.create(V.prototype);return t.__wbg_ptr=e,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_pageencodingdescriptor_free(e,0)}pageType(){let e,t;try{const r=s.pageencodingdescriptor_pageType(this.__wbg_ptr);return e=r[0],t=r[1],d(r[0],r[1])}finally{s.__wbindgen_free(e,t,1)}}encoding(){let e,t;try{const r=s.pageencodingdescriptor_encoding(this.__wbg_ptr);return e=r[0],t=r[1],d(r[0],r[1])}finally{s.__wbindgen_free(e,t,1)}}count(){return s.pageencodingdescriptor_count(this.__wbg_ptr)}}Symbol.dispose&&(V.prototype[Symbol.dispose]=V.prototype.free);const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_parquetchunk_free(e>>>0,1));class ${static __wrap(e){e>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=e,J.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_parquetchunk_free(e,0)}size(){return s.parquetchunk_size(this.__wbg_ptr)>>>0}isEmpty(e){return 0!==s.parquetchunk_isEmpty(this.__wbg_ptr,e)}rowId(e){return s.parquetchunk_rowId(this.__wbg_ptr,e)}readX(e){const t=s.parquetchunk_readX(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readY(e){const t=s.parquetchunk_readY(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readCoords(e){const t=s.parquetchunk_readCoords(this.__wbg_ptr,e);let r;return 0!==t[0]&&(r=function(e,t){return e>>>=0,C().subarray(e/8,e/8+t)}(t[0],t[1]).slice(),s.__wbindgen_free(t[0],8*t[1],8)),r}readLengths(e){const t=s.parquetchunk_readLengths(this.__wbg_ptr,e);let r;return 0!==t[0]&&(r=f(t[0],t[1]).slice(),s.__wbindgen_free(t[0],4*t[1],4)),r}transformGeometry(e,t,r,i,n,o){k(e,re);const a=s.parquetchunk_transformGeometry(this.__wbg_ptr,e.__wbg_ptr,t,r,i,n,o);return 16777215===a?void 0:0!==a}boundsXMin(e){const t=s.parquetchunk_boundsXMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMin(e){const t=s.parquetchunk_boundsYMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsXMax(e){const t=s.parquetchunk_boundsXMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMax(e){const t=s.parquetchunk_boundsYMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readAttribute(e,t){return s.parquetchunk_readAttribute(this.__wbg_ptr,e,t)}}Symbol.dispose&&($.prototype[Symbol.dispose]=$.prototype.free);const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_parquetfile_free(e>>>0,1));class K{static __wrap(e){e>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=e,Q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_parquetfile_free(e,0)}static fromUrl(e,t,r,i){const n=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),o=g;let a=0;return x(i)||(k(i,X),a=i.__destroy_into_raw()),s.parquetfile_fromUrl(n,o,t,r,a)}static fromBinary(e,t){const r=z(e,s.__wbindgen_malloc),i=g;let n=0;return x(t)||(k(t,X),n=t.__destroy_into_raw()),s.parquetfile_fromBinary(r,i,n)}version(){return s.parquetfile_version(this.__wbg_ptr)}byteLength(){return s.parquetfile_byteLength(this.__wbg_ptr)}numRows(){return s.parquetfile_numRows(this.__wbg_ptr)>>>0}numFields(){return s.parquetfile_numFields(this.__wbg_ptr)>>>0}numColumns(){return s.parquetfile_numColumns(this.__wbg_ptr)>>>0}createdBy(){const e=s.parquetfile_createdBy(this.__wbg_ptr);let t;return 0!==e[0]&&(t=d(e[0],e[1]).slice(),s.__wbindgen_free(e[0],1*e[1],1)),t}keyValueMetadata(e){const t=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=g,i=s.parquetfile_keyValueMetadata(this.__wbg_ptr,t,r);let n;return 0!==i[0]&&(n=d(i[0],i[1]).slice(),s.__wbindgen_free(i[0],1*i[1],1)),n}keys(){const e=s.parquetfile_keys(this.__wbg_ptr);let t;return 0!==e[0]&&(t=T(e[0],e[1]).slice(),s.__wbindgen_free(e[0],4*e[1],4)),t}columnForFieldName(e){const t=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=g,i=s.parquetfile_columnForFieldName(this.__wbg_ptr,t,r);return 4294967297===i?void 0:i}fields(){const e=s.parquetfile_fields(this.__wbg_ptr);var t=T(e[0],e[1]).slice();return s.__wbindgen_free(e[0],4*e[1],4),t}rowGroups(){const e=s.parquetfile_rowGroups(this.__wbg_ptr);var t=T(e[0],e[1]).slice();return s.__wbindgen_free(e[0],4*e[1],4),t}ensureFields(e){const t=N(e,s.__wbindgen_malloc),r=g;return s.parquetfile_ensureFields(this.__wbg_ptr,t,r)}readFirstChunk(e){const t=N(e,s.__wbindgen_malloc),r=g;return s.parquetfile_readFirstChunk(this.__wbg_ptr,t,r)}readChunk(e,t,r,i,n){const o=N(r,s.__wbindgen_malloc),a=g;return s.parquetfile_readChunk(this.__wbg_ptr,e,t,o,a,i,n)}readChunksByRowId(e,t,r,i){const n=N(e,s.__wbindgen_malloc),o=g,a=N(t,s.__wbindgen_malloc),u=g;return s.parquetfile_readChunksByRowId(this.__wbg_ptr,n,o,a,u,r,i)}readAllChunks(e,t,r){const i=N(e,s.__wbindgen_malloc),n=g;return s.parquetfile_readAllChunks(this.__wbg_ptr,i,n,t,r)}queryZChunks(e,t,r,i){const n=N(t,s.__wbindgen_malloc),o=g;return s.parquetfile_queryZChunks(this.__wbg_ptr,e,n,o,r,i)}queryXZChunks(e,t,r){return s.parquetfile_queryXZChunks(this.__wbg_ptr,e,t,r)}}Symbol.dispose&&(K.prototype[Symbol.dispose]=K.prototype.free);const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_primarygeometryfield_free(e>>>0,1));class ee{static __wrap(e){e>>>=0;const t=Object.create(ee.prototype);return t.__wbg_ptr=e,H.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_primarygeometryfield_free(e,0)}static fromNative(e){const t=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=g,i=s.primarygeometryfield_fromNative(t,r);return ee.__wrap(i)}static fromWkb(e){const t=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),r=g,i=s.primarygeometryfield_fromWkb(t,r);return ee.__wrap(i)}static fromLocation(e,t){const r=y(e,s.__wbindgen_malloc,s.__wbindgen_realloc),i=g,n=y(t,s.__wbindgen_malloc,s.__wbindgen_realloc),o=g,a=s.primarygeometryfield_fromLocation(r,i,n,o);return ee.__wrap(a)}}Symbol.dispose&&(ee.prototype[Symbol.dispose]=ee.prototype.free);const te="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_quantizedgeometrybuffer_free(e>>>0,1));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,te.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_quantizedgeometrybuffer_free(e,0)}static new(){const e=s.quantizedgeometrybuffer_new();return re.__wrap(e)}readCoordsUnsafe(){return s.quantizedgeometrybuffer_readCoordsUnsafe(this.__wbg_ptr)}readLengthsUnsafe(){return s.quantizedgeometrybuffer_readLengthsUnsafe(this.__wbg_ptr)}}Symbol.dispose&&(re.prototype[Symbol.dispose]=re.prototype.free);const se="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_rangeproviderjs_free(e>>>0,1));class ie{static __wrap(e){e>>>=0;const t=Object.create(ie.prototype);return t.__wbg_ptr=e,se.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,se.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_rangeproviderjs_free(e,0)}static new(e,t){const r=s.rangeproviderjs_new(e,t);return ie.__wrap(r)}static withFetch(){const e=s.rangeproviderjs_withFetch();return ie.__wrap(e)}}Symbol.dispose&&(ie.prototype[Symbol.dispose]=ie.prototype.free);const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>s.__wbg_rowgroup_free(e>>>0,1));class oe{static __wrap(e){e>>>=0;const t=Object.create(oe.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();s.__wbg_rowgroup_free(e,0)}columnDescriptorForAttribute(e){const t=s.rowgroup_columnDescriptorForAttribute(this.__wbg_ptr,e);return W.__wrap(t)}}Symbol.dispose&&(oe.prototype[Symbol.dispose]=oe.prototype.free);const ae=new Set(["basic","cors","default"]);function ue(){const e={wbg:{}};return e.wbg.__wbg_aborted_bbd6fc8f83561eda=function(e){return e.aborted},e.wbg.__wbg_apply_dc50eb58583d2a57=function(){return n(function(e,t,r){return e.apply(t,r)},arguments)},e.wbg.__wbg_call_13410aac570ffff7=function(){return n(function(e,t){return e.call(t)},arguments)},e.wbg.__wbg_call_a5400b25a865cfd8=function(){return n(function(e,t,r){return e.call(t,r)},arguments)},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let r,i;try{r=e,i=t,console.error(d(e,t))}finally{s.__wbindgen_free(r,i,1)}},e.wbg.__wbg_fieldmetadata_new=function(e){return Y.__wrap(e)},e.wbg.__wbg_get_458e874b43b18b25=function(){return n(function(e,t){return Reflect.get(e,t)},arguments)},e.wbg.__wbg_length_555ae304a7c78975=function(e){return e.length},e.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return e.length},e.wbg.__wbg_multiscalegeometryfield_unwrap=function(e){return U.__unwrap(e)},e.wbg.__wbg_new_2e3c58a15f39f5f9=function(e,t){try{var r={a:e,b:t};return new Promise((e,t)=>{const s=r.a;r.a=0;try{return G(s,r.b,e,t)}finally{r.a=s}})}finally{r.a=r.b=0}},e.wbg.__wbg_new_638ebfaedbf32a5e=function(e){return new Uint8Array(e)},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},e.wbg.__wbg_newnoargs_254190557c45b4ec=function(e,t){return new Function(d(e,t))},e.wbg.__wbg_newwithlength_c2868113efe93526=function(e){return new Array(e>>>0)},e.wbg.__wbg_pageencodingdescriptor_new=function(e){return V.__wrap(e)},e.wbg.__wbg_parquetchunk_new=function(e){return $.__wrap(e)},e.wbg.__wbg_parquetfile_new=function(e){return K.__wrap(e)},e.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,t,r){Uint8Array.prototype.set.call(c(e,t),r)},e.wbg.__wbg_prototypesetcall_c805289d23423a87=function(e,t,r){Uint32Array.prototype.set.call(f(e,t),r)},e.wbg.__wbg_queueMicrotask_25d0739ac89e8c88=function(e){queueMicrotask(e)},e.wbg.__wbg_queueMicrotask_4488407636f5bf24=function(e){return e.queueMicrotask},e.wbg.__wbg_resolve_4055c623acdd6a1b=function(e){return Promise.resolve(e)},e.wbg.__wbg_rowgroup_new=function(e){return oe.__wrap(e)},e.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,t,r){e[t>>>0]=r},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){const r=y(t.stack,s.__wbindgen_malloc,s.__wbindgen_realloc),i=g;w().setInt32(e+4,i,!0),w().setInt32(e+0,r,!0)},e.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){const e="undefined"==typeof global?null:global;return x(e)?0:i(e)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){const e="undefined"==typeof globalThis?null:globalThis;return x(e)?0:i(e)},e.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){const e="undefined"==typeof self?null:self;return x(e)?0:i(e)},e.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){const e="undefined"==typeof window?null:window;return x(e)?0:i(e)},e.wbg.__wbg_then_b33a773d723afa3e=function(e,t,r){return e.then(t,r)},e.wbg.__wbg_then_e22500defe16819f=function(e,t){return e.then(t)},e.wbg.__wbg_valueOf_f1ef20623c7bdd1c=function(e){return e.valueOf()},e.wbg.__wbg_wbindgencbdrop_eb10308566512b88=function(e){const t=e.original;return 1==t.cnt--&&(t.a=0,!0)},e.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(e){return"function"==typeof e},e.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return void 0===e},e.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,t){const r="number"==typeof t?t:void 0;w().setFloat64(e+8,x(r)?0:r,!0),w().setInt32(e+0,!x(r),!0)},e.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,t){throw new Error(d(e,t))},e.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){return d(e,t)},e.wbg.__wbindgen_cast_59b536ec5375efa9=function(e,t){return I(e,t,85,B)},e.wbg.__wbindgen_cast_77bc3e92745e9a35=function(e,t){var r=c(e,t).slice();return s.__wbindgen_free(e,1*t,1),r},e.wbg.__wbindgen_cast_7c316abdc43840a3=function(e,t){return f(e,t)},e.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return e},e.wbg.__wbindgen_cast_b4c60c1010b00353=function(e,t){var r=T(e,t).slice();return s.__wbindgen_free(e,4*t,4),r},e.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return e},e.wbg.__wbindgen_cast_e47ceb6027f5c92c=function(e,t){return function(e,t){return e>>>=0,S().subarray(e/2,e/2+t)}(e,t)},e.wbg.__wbindgen_init_externref_table=function(){const e=s.__wbindgen_export_2,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e}function he(e,t){return s=e.exports,de.__wbindgen_wasm_module=t,b=null,A=null,F=null,_=null,o=null,s.__wbindgen_start(),s}function le(e){if(void 0!==s)return s;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=ue();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),he(new WebAssembly.Instance(e,t),e)}async function de(e){if(void 0!==s)return s;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=ue();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:i}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!ae.has(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}(await e,t);return he(r,i)}},63664:(e,t,r)=>{r.d(t,{B:()=>s});class s{constructor(e){this._statistics=e}get statistics(){return this._statistics}}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>l,e2:()=>c,f:()=>_});var s=r(44208),i=r(4718),n=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function l(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${d(t)} = null;`;for(const t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e){return u.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function _(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},68974:(e,t,r)=>{r.d(t,{H:()=>h,p:()=>u});var s=r(69397),i=r(86211),n=r(38976),o=r(75538);const a=96;function u(e,t){return(0,i.GA)(e)*i.dy*a/t}class h extends n.n{constructor(e){super(e),this._cells=new Map,this._pixelsPerMapUnit=u(e.spatialReference,e.scale)}get usedMemory(){const e=this._cells.values().next().value;return e?(s.RS+e.usedMemory)*this._cells.size:0}put(e){for(const t of this._cells.values()){const r=e.get(t.id);r?r.merge(t):e.set(t.id,t.clone())}}putBounded(e,t,r){const s=[t.xmin,t.ymin,t.xmax,t.ymax],[i,n,o,a]=s,u=Math.floor(i*this._pixelsPerMapUnit/this._options.cellSize),h=Math.floor(n*this._pixelsPerMapUnit/this._options.cellSize),l=Math.ceil(o*this._pixelsPerMapUnit/this._options.cellSize),d=Math.ceil(a*this._pixelsPerMapUnit/this._options.cellSize);for(let t=h;t<=d;t++)for(let r=u;r<=l;r++){const s=`${r}.${t}`,i=this._cells.get(s);if(!i)continue;const n=e.get(i.id);n?i&&!e.has(i.id)&&n.merge(i):e.set(i.id,i.clone())}}_insert(e,t,r,s){const i=t*this._pixelsPerMapUnit,n=r*this._pixelsPerMapUnit,o=Math.floor(i/this._options.cellSize),a=Math.floor(n/this._options.cellSize);this._getCellOrCreate(o,a).insert(e,s,t,r)}_getCellOrCreate(e,t){const r=o.L.createId(e,t);let s=this._cells.get(r);if(!s){const i=1*this._options.cellSize/this._pixelsPerMapUnit;s=o.L.create(e,t,this._options.fields,i),this._cells.set(r,s)}return s}}},70300:(e,t,r)=>{r.d(t,{K:()=>W});var s=r(69397),i=r(11006);function n(e,t){if(!(this instanceof n))return new n(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this.toBBox=t:this._initFormat(t)),this.clear()}function o(e,t,r){if(!r)return t.indexOf(e);for(var s=0;s<t.length;s++)if(r(e,t[s]))return s;return-1}function a(e,t){u(e,0,e.children.length,t,e)}function u(e,t,r,s,i){i||(i=y(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var n,o=t;o<r;o++)n=e.children[o],h(i,e.leaf?s(n):n);return i}function h(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){var r=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,n-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function m(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function b(e,t,r,s,n){for(var o,a=[t,r];a.length;)(r=a.pop())-(t=a.pop())<=s||(o=t+Math.ceil((r-t)/s/2)*s,(0,i.q)(e,o,t,r,n),a.push(t,o,o,r))}n.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],s=this.toBBox;if(!m(e,t))return r;for(var i,n,o,a,u=[];t;){for(i=0,n=t.children.length;i<n;i++)o=t.children[i],m(e,a=t.leaf?s(o):o)&&(t.leaf?r.push(o):g(e,a)?this._all(o,r):u.push(o));t=u.pop()}return r},collides:function(e){var t=this.data,r=this.toBBox;if(!m(e,t))return!1;for(var s,i,n,o,a=[];t;){for(s=0,i=t.children.length;s<i;s++)if(n=t.children[s],m(e,o=t.leaf?r(n):n)){if(t.leaf||g(e,o))return!0;a.push(n)}t=a.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}var s=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var i=this.data;this.data=s,s=i}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(e){return null!=e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=y([]),this},remove:function(e,t){if(null==e)return this;for(var r,s,i,n,a=this.data,u=this.toBBox(e),h=[],l=[];a||h.length;){if(a||(a=h.pop(),s=h[h.length-1],r=l.pop(),n=!0),a.leaf&&-1!==(i=o(e,a.children,t)))return a.children.splice(i,1),h.push(a),this._condense(h),this;n||a.leaf||!g(a,u)?s?(r++,a=s.children[r],n=!1):a=null:(h.push(a),l.push(r),r=0,s=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:d,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t},_build:function(e,t,r,s){var i,n=r-t+1,o=this._maxEntries;if(n<=o)return a(i=y(e.slice(t,r+1)),this.toBBox),i;s||(s=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,s-1))),(i=y([])).leaf=!1,i.height=s;var u,h,l,d,c=Math.ceil(n/o),_=c*Math.ceil(Math.sqrt(o));for(b(e,t,r,_,this.compareMinX),u=t;u<=r;u+=_)for(b(e,u,l=Math.min(u+_-1,r),c,this.compareMinY),h=u;h<=l;h+=c)d=Math.min(h+c-1,l),i.children.push(this._build(e,h,d,s-1));return a(i,this.toBBox),i},_chooseSubtree:function(e,t,r,s){for(var i,n,o,a,u,h,l,d;s.push(t),!t.leaf&&s.length-1!==r;){for(l=d=1/0,i=0,n=t.children.length;i<n;i++)u=c(o=t.children[i]),(h=p(e,o)-u)<d?(d=h,l=u<l?u:l,a=o):h===d&&u<l&&(l=u,a=o);t=a||t.children[0]}return t},_insert:function(e,t,r){var s=this.toBBox,i=r?e:s(e),n=[],o=this._chooseSubtree(i,this.data,t,n);for(o.children.push(e),h(o,i);t>=0&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(i,n,t)},_split:function(e,t){var r=e[t],s=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,s);var n=this._chooseSplitIndex(r,i,s),o=y(r.children.splice(n,r.children.length-n));o.height=r.height,o.leaf=r.leaf,a(r,this.toBBox),a(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(r,o)},_splitRoot:function(e,t){this.data=y([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var s,i,n,o,a,h,l,d;for(h=l=1/0,s=t;s<=r-t;s++)o=f(i=u(e,0,s,this.toBBox),n=u(e,s,r,this.toBBox)),a=c(i)+c(n),o<h?(h=o,d=s,l=a<l?a:l):o===h&&a<l&&(l=a,d=s);return d},_chooseSplitAxis:function(e,t,r){var s=e.leaf?this.compareMinX:l,i=e.leaf?this.compareMinY:d;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,i)&&e.children.sort(s)},_allDistMargin:function(e,t,r,s){e.children.sort(s);var i,n,o=this.toBBox,a=u(e,0,t,o),l=u(e,r-t,r,o),d=_(a)+_(l);for(i=t;i<r-t;i++)n=e.children[i],h(a,e.leaf?o(n):n),d+=_(a);for(i=r-t-1;i>=t;i--)n=e.children[i],h(l,e.leaf?o(n):n),d+=_(l);return d},_adjustParentBBoxes:function(e,t,r){for(var s=r;s>=0;s--)h(t[s],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)0===e[r].children.length?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():a(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}};var w=r(70328);class x{static fromReader(e){const t=[],r=e.copy(),s=(0,w.vt)();for(;r.next();)r.getBounds(s)&&t.push(r.getIndex());const i=n(9,e=>(r.setIndex(e),{minX:r.getBoundsXMin(),minY:r.getBoundsYMin(),maxX:r.getBoundsXMax(),maxY:r.getBoundsYMax()}));return i.load(t),new x(i,t.length)}constructor(e,t){this._index=e,this._size=t}get usedMemory(){return this._size*s.RS}search(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this._index.search(t)}}r(44208);var v=r(34727),I=(r(37585),r(48163)),T=r(39829),F=r(16930),S=r(19419),M=r(79258),A=r(90708),C=r(31464);function k(e,t,r,s){if(s.isWebMercator){const s=(0,v.KJ)(e/M.$O.radius),i=s-360*Math.floor((s+180)/360),n=[0,0];return P(n,0,(0,v.KJ)(Math.PI/2-2*Math.atan(Math.exp(-t/M.$O.radius))),i,r),n}const i=(0,C.Cv)({x:e,y:t},s,F.A.WGS84);if(!i)return null;const n=[0,0];return P(n,0,i.y,i.x,r),n}function P(e,t,r,s,i){i%2&&(i+=1);let n=0,o=0,a=-90,u=90,h=-180,l=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const r=(h+l)/2,i=s>r?1:0;n|=i<<29-(t+5*e),h=(1-i)*h+i*r,l=(1-i)*r+i*l}for(let t=0;t<5;t++){const s=(a+u)/2,i=r>s?1:0;o|=i<<29-(t+5*e),a=(1-i)*a+i*s,u=(1-i)*s+i*u}}e[2*t]=n,e[2*t+1]=o}(0,I.vt)(),(0,I.vt)();var O=r(63664),z=r(92029);class N extends O.B{static create(e,t,r,s){const i=z.o.create(e),n=new Array(32);for(let e=0;e<n.length;e++)n[e]=null;return new N(i,t,r,s,n)}constructor(e,t,r,s,i){super(e),this.xNode=t,this.yNode=r,this.depth=s,this.children=i,this._objectIds=new Set,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._xGeohashTotal=0,this._yGeohashTotal=0,this.next=null}static get estimatedMemory(){let e=0;return e+=2*s.qK,e+=32*s.RS,e+=z.o.estimatedMemory,e}get id(){return`${this.xNode}.${this.yNode}`}get containedObjectIds(){return this._objectIds}get count(){return this._count}clone(){const e=new N(this._statistics.clone(),this.xNode,this.yNode,this.depth,this.children);return e._count=this._count,e._xWorldTotal=this._xWorldTotal,e._yWorldTotal=this._yWorldTotal,e._xGeohashTotal=this._xGeohashTotal,e._yGeohashTotal=this._yGeohashTotal,e.next=this.next,e._objectIds=new Set(this._objectIds),e}insert(e,t,r,s,i,n){this._count+=1,this._xWorldTotal+=t,this._yWorldTotal+=r,this._xGeohashTotal+=s,this._yGeohashTotal+=i,this._statistics.insert(e,n),this._objectIds.add(e.getObjectId())}merge(e){if(0!==e._count){this._count+=e._count,this._xWorldTotal+=e._xWorldTotal,this._yWorldTotal+=e._yWorldTotal,this._xGeohashTotal+=e._xWorldTotal,this._yGeohashTotal+=e._yWorldTotal,this._statistics.merge(e._statistics);for(const t of e._objectIds.values())this._objectIds.add(t)}}getCentroid(e){throw new Error("getCentroid not supported for GeohashNode")}getGeometry(e,t){const r=this._getLngLatBounds(),[s,i,n,o]=r,a=(0,C.Cv)({rings:[[[s,i],[s,o],[n,o],[n,i],[s,i]]]},F.A.WGS84,e),u=(0,A.Ye)(a);return null!=t?(0,A.Nl)(u,"esriGeometryPolygon",t,!1,!1):u}getGeometricCentroid(e,t){const r=this._getLngLatBounds(),[s,i,n,o]=r,a=(0,C.Cv)({x:(s+n)/2,y:(i+o)/2},F.A.WGS84,e),u=(0,A.qN)(a);return null!=t?(0,A.Nl)(u,"esriGeometryPoint",t,!1,!1):u}getAttributes(){const e={aggregateId:this.id};for(const t of this._statistics.values())e[t.field.name]=t.value;return e.aggregateCount=this._count,e}find(e,t,r,s,i,n){if(s>=r)return this;const o=1-s%2,a=3*o+2*(1-o),u=2*o+3*(1-o),h=30-i-a,l=30-n-u,d=((e&7*o+3*(1-o)<<h)>>h)+((t&3*o+7*(1-o)<<l)>>l)*(8*o+4*(1-o)),c=this.children[d];return null==c?null:c.find(e,t,r,s+1,i+a,n+u)}_getLngLatBounds(){const e=this.depth,t=Math.ceil(e/2),r=Math.floor(e/2),s=30-(3*t+2*r),i=30-(2*t+3*r);return function(e,t){let r=-90,s=90,i=-180,n=180;for(let o=0;o<t;o++){const t=Math.ceil((o+1)/2),a=Math.floor((o+1)/2),u=1-o%2,h=30-(3*t+2*a),l=30-(2*t+3*a),d=2*u+3*(1-u),c=(7*u+3*(1-u)<<h&e.geohashX)>>h,_=(3*u+7*(1-u)<<l&e.geohashY)>>l;for(let e=3*u+2*(1-u)-1;e>=0;e--){const t=(i+n)/2,r=c&1<<e?1:0;i=(1-r)*i+r*t,n=(1-r)*t+r*n}for(let e=d-1;e>=0;e--){const t=(r+s)/2,i=_&1<<e?1:0;r=(1-i)*r+i*t,s=(1-i)*t+i*s}}return[i,r,n,s]}({geohashX:this.xNode<<s,geohashY:this.yNode<<i},this.depth)}}class B{constructor(e){this._fields=e,this._size=0,this._depth=0,this._root=N.create(this._fields,0,0,0)}destroy(){}get size(){return this._size}get depth(){return this._depth}get usedMemory(){return this._size*N.estimatedMemory}find(e,t,r){return this._root.find(e,t,r,0,0,0)}insert(e,t,r,s,i,n,o){let a=this._root,u=0,h=0,l=0;for(;null!==a;){if(a.insert(e,t,r,s,i,o),u>=n)return;const d=Math.ceil((u+1)/2),c=Math.floor((u+1)/2),_=1-u%2,p=30-(3*d+2*c),f=30-(2*d+3*c),g=(s&7*_+3*(1-_)<<p)>>p,m=(i&3*_+7*(1-_)<<f)>>f,y=g+m*(8*_+4*(1-_));h=h<<3*_+2*(1-_)|g,l=l<<2*_+3*(1-_)|m,null==a.children[y]&&(a.children[y]=N.create(this._fields,h,l,u+1),this._depth=Math.max(this._depth,u+1),this._size+=1),u+=1,a=a.children[y]}}putBins(e,t){for(const r of this.getNodes(t)){const t=e.get(r.id);t?t.merge(r):e.set(r.id,r.clone())}}getNodes(e){const t=[],{geohashBounds:r,level:s}=e;let i=this._root;for(;null!==i;){const e=i.depth,n=i.xNode,o=i.yNode;if(e>=s){t.push(i),i=i.next;continue}const a=Math.ceil((e+1)/2),u=Math.floor((e+1)/2),h=1-e%2,l=30-(3*a+2*u),d=30-(2*a+3*u),c=~((1<<l)-1),_=~((1<<d)-1),p=(r.xLL&c)>>l,f=(r.yLL&_)>>d,g=(r.xTR&c)>>l,m=(r.yTR&_)>>d,y=n<<3*h+2*(1-h),b=o<<2*h+3*(1-h),w=y+8*h+4*(1-h),x=b+4*h+8*(1-h),v=Math.max(y,p),I=Math.max(b,f),T=Math.min(w,g),F=Math.min(x,m);let S=null,M=null;for(let e=I;e<=F;e++)for(let t=v;t<=T;t++){const r=t-y+(e-b)*(8*h+4*(1-h)),s=i.children[r];s&&(S||(S=s,S.next=i.next),M&&(M.next=s),M=s,s.next=i.next)}i=S||i.next}return t}}var G=r(38976);class D extends G.n{constructor(e){super(e),this._tree=new B(this._options.fields)}get usedMemory(){return this._tree.usedMemory}put(e){throw new Error("Geohash tree does not support put")}putBounded(e,t,r){const{geohashLevel:s,spatialReference:i}=this._options,n=function(e,t,r,s){const i=[e.xmin,e.ymin,e.xmax,e.ymax],n=T.A.fromExtent((0,S.w1)(i,s)),o=(0,C.Cv)(n,s,F.A.WGS84,{extendedParams:{densificationStep:64*t}});if(!o)return null;const a=(0,A.Ye)(o,!1,!1),u=a.coords.filter((e,t)=>!(t%2)),h=a.coords.filter((e,t)=>t%2),l=Math.min(...u),d=Math.min(...h),c=Math.max(...u),_=Math.max(...h),p=k(l,d,r,F.A.WGS84),f=k(c,_,r,F.A.WGS84);return p&&f?{bounds:i,geohashBounds:{xLL:p[0],yLL:p[1],xTR:f[0],yTR:f[1]},level:r}:null}(t,r,s,i);null!=n&&this._tree.putBins(e,n)}_insert(e,t,r,s){const{geohashLevel:i,spatialReference:n}=this._options,o=k(t,r,i,n);o&&this._tree.insert(e,t,r,o[0],o[1],i,s)}}var R=r(68974),q=r(52350);class W{size(){return this.reader.getSize()}get fields(){return this.reader.fields}invalidate(){this._aggregateIndex=null,this._aggregateIndexHash=null,this._spatialIndex=null}get usedMemory(){let e=0;return e+=this.reader.underlyingMemory,this._aggregateIndex&&(e+=this._aggregateIndex.usedMemory),this._spatialIndex&&(e+=this._spatialIndex.usedMemory),e}registerOverrides(e){this.reader.registerOverrides(e),this.invalidate()}queryFeaturesInBounds(e){const t=this._getSpatialIndex().search(e);return q.e.from(this.reader,t)}getAggregateIndex(e){const t=JSON.stringify(e);if(t!==this._aggregateIndexHash){switch(this._aggregateIndexHash=t,e.type){case"grid":this._aggregateIndex=new R.H(e);break;case"geohash":this._aggregateIndex=new D(e)}this._aggregateIndex.insert(this.reader,this.isTiled)}return this._aggregateIndex}_getSpatialIndex(){return this._spatialIndex||(this._spatialIndex=x.fromReader(this.reader)),this._spatialIndex}}},70581:(e,t,r)=>{r.d(t,{DV:()=>p,Hj:()=>g,hD:()=>f});var s=r(11254),i=r(49186),n=(r(44208),r(563)),o=r(84952),a=r(2741);let u=null;async function h(){return u||(u=async function(){const e=await Promise.resolve().then(r.bind(r,57733));return await e.default({module_or_path:(0,a.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),u}var l=r(57733);const d=new n.QueueProcessor({concurrency:8,process:async e=>{const{data:t}=await(0,s.A)(e.url,e.options);return t}}),c=e=>async function(t,r,s,i){const n=e?.(),o=n??{};return await d.push({url:t,options:{responseType:"array-buffer",query:o,headers:{range:`bytes=${r}-${s}`}}})},_=e=>async function(t){if((0,o.w8)(t)){const{data:e}=await(0,s.A)(t,{responseType:"blob"});return e.size}const{data:r}=await(0,s.A)(t,{responseType:"native",method:"head",query:e?.()}),i=r.headers.get("Content-Length");if(null==i)throw new Error("Unable to parse content length");return parseInt(i,10)};async function p(e,t={}){const{ParquetFile:r}=await h(),s=c(t.getCustomParameters),n=_(t.getCustomParameters),o=t.geometryInfo?function(e,t){const r=e.spatialReference.wkid,s=t.wkid;if(!r||!s)throw new i.A("parquet","Unable to create ParquetFile, in and out wkid must be specified");const n=function(e){switch(e){case"esriGeometryPoint":return l.GeometryType.Point;case"esriGeometryPolygon":return l.GeometryType.Polygon;case"esriGeometryPolyline":return l.GeometryType.Polyline;case"esriGeometryMultipoint":return l.GeometryType.Multipoint;default:throw new i.A("parquet",`Found unexpected GeometryType: ${e}`)}}(e.geometryType),o=function(e){switch(e.encoding.type){case"wkb":return l.PrimaryGeometryField.fromWkb(e.encoding.primaryFieldName);case"location":{const{latitudeFieldName:t,longitudeFieldName:r}=e.encoding;return l.PrimaryGeometryField.fromLocation(t,r)}}}(e),a=[];if("xz"===e.displayOptimization?.mode){const t=e.displayOptimization.multiscale;for(const e of t.levels??[]){const[t,r]=e.transform.translate,[s,i]=e.transform.scale,n=new Float64Array([t,r]),o=new Float64Array([s,i]);a.push(l.MultiscaleGeometryField.new(e.level,e.column,n,o))}}return l.GeometryInfo.new(n,r,s,o,a)}(t.geometryInfo,t.outSpatialReference??t.geometryInfo.spatialReference):null;return r.fromUrl(e,s,n,o)}function f(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function g(e){const t=e.keyValueMetadata("esri");return null!=t?JSON.parse(t):null}},73250:(e,t,r)=>{r.d(t,{y:()=>i});var s=r(69397);class i{static fromBuffer(e,t){return new i(e,t)}static create(e,t=4294967295){const r=new Uint32Array(Math.ceil(e/32));return new i(r,t)}constructor(e,t){this._mask=0,this._buf=e,this._mask=t}_getIndex(e){return Math.floor(e/32)}get usedMemory(){return(0,s.Qf)(this._buf)}has(e){const t=this._mask&e;return!!(this._buf[this._getIndex(t)]&1<<t%32)}hasRange(e,t){let r=e,s=t;for(;r%32&&r!==s;){if(this.has(r))return!0;r++}for(;s%32&&r!==s;){if(this.has(r))return!0;s--}if(r===s)return!1;for(let e=r/32;e!==s/32;e++)if(this._buf[e])return!0;return!1}set(e){const t=this._mask&e,r=this._getIndex(t),s=1<<t%32;this._buf[r]|=s}setRange(e,t){let r=e,s=t;for(;r%32&&r!==s;)this.set(r++);for(;s%32&&r!==s;)this.set(s--);if(r!==s)for(let e=r/32;e!==s/32;e++)this._buf[e]=4294967295}unset(e){const t=this._mask&e,r=this._getIndex(t),s=1<<t%32;this._buf[r]&=4294967295^s}resize(e){const t=this._buf,r=new Uint32Array(Math.ceil(e/32));r.set(t),this._buf=r}or(e){for(let t=0;t<this._buf.length;t++)this._buf[t]|=e._buf[t];return this}and(e){for(let t=0;t<this._buf.length;t++)this._buf[t]&=e._buf[t];return this}xor(e){for(let t=0;t<this._buf.length;t++)this._buf[t]^=e._buf[t];return this}ior(e){for(let t=0;t<this._buf.length;t++)this._buf[t]|=~e._buf[t];return this}iand(e){for(let t=0;t<this._buf.length;t++)this._buf[t]&=~e._buf[t];return this}ixor(e){for(let t=0;t<this._buf.length;t++)this._buf[t]^=~e._buf[t];return this}any(){for(let e=0;e<this._buf.length;e++)if(this._buf[e])return!0;return!1}copy(e){for(let t=0;t<this._buf.length;t++)this._buf[t]=e._buf[t];return this}clone(){return new i(this._buf.slice(),this._mask)}clear(){for(let e=0;e<this._buf.length;e++)this._buf[e]=0;return this}forEachSet(e){for(let t=0;t<this._buf.length;t++){let r=this._buf[t],s=32*t;if(r)for(;r;)1&r&&e(s),r>>>=1,s++}}countSet(){let e=0;return this.forEachSet(t=>{e++}),e}}},75538:(e,t,r)=>{r.d(t,{L:()=>a});var s=r(90708),i=r(92722),n=r(63664),o=r(92029);class a extends n.B{static createId(e,t){return`${e}.${t}`}static create(e,t,r,s){return new a(e,t,o.o.create(r),s)}constructor(e,t,r,s){super(r),this.gridX=e,this.gridY=t,this._worldUnitsPerCell=s,this._count=0,this._xWorldTotal=0,this._yWorldTotal=0,this._objectIds=new Set}get id(){return a.createId(this.gridX,this.gridY)}get containedObjectIds(){return this._objectIds}get count(){return this._count}get firstObjectId(){return this._objectIds.values().next().value}get centroidXWorld(){return this._xWorldTotal/this._count}get centroidYWorld(){return this._yWorldTotal/this._count}get usedMemory(){return 48}clone(){const e=new a(this.gridX,this.gridY,this._statistics.clone(),this._worldUnitsPerCell);return e._count=this._count,e._xWorldTotal=this._xWorldTotal,e._yWorldTotal=this._yWorldTotal,e._firstFeatureAttributes=this._firstFeatureAttributes,e._objectIds=new Set(this._objectIds),e}insert(e,t,r,s){0===this._count?this._firstFeatureAttributes=e.readAttributes():this._firstFeatureAttributes=null,this._count+=1,this._xWorldTotal+=r,this._yWorldTotal+=s,this._statistics.insert(e,t),this._objectIds.add(e.getObjectId())}merge(e){if(0!==e._count){this._count+=e._count,this._firstFeatureAttributes=e._firstFeatureAttributes,this._xWorldTotal+=e._xWorldTotal,this._yWorldTotal+=e._yWorldTotal,this._statistics.merge(e._statistics);for(const t of e._objectIds.values())this._objectIds.add(t)}}getCentroidX(e){return null==e?this.centroidXWorld:(0,s.IE)(e,this.centroidXWorld)}getCentroidY(e){return null==e?this.centroidYWorld:(0,s.B2)(e,this.centroidYWorld)}getGeometry(e,t){const r=this.gridX*this._worldUnitsPerCell,n=this.gridY*this._worldUnitsPerCell,o=new i.A([4],[r,n,r+this._worldUnitsPerCell,n,r+this._worldUnitsPerCell,n+this._worldUnitsPerCell,r,n+this._worldUnitsPerCell]);return null!=t?(0,s.Nl)(o,"esriGeometryPolygon",t):o}getCentroid(e){const t=new i.A([],[this.centroidXWorld,this.centroidYWorld]);return null!=e?(0,s.Nl)(t,"esriGeometryPoint",e):t}getGeometricCentroid(e,t){const r=this.gridX*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,n=this.gridY*this._worldUnitsPerCell+.5*this._worldUnitsPerCell,o=new i.A([],[r,n]);return null!=t?(0,s.Nl)(o,"esriGeometryPoint",t):o}getAttributes(){const e={aggregateId:this.id};for(const t of this._statistics.values())e[t.field.name]=t.value;return null!=this._firstFeatureAttributes?{...e,...this._firstFeatureAttributes}:e}}},76213:(e,t,r)=>{r.d(t,{C2:()=>o,CQ:()=>s,DY:()=>i,GR:()=>f,Gh:()=>u,MZ:()=>c,TB:()=>p,U5:()=>a,_M:()=>h,cp:()=>g,eG:()=>n,fq:()=>_,hM:()=>d,ie:()=>l});const s=512,i=29,n=24,o=4,a=6,u=1.05,h=3,l=3,d=4,c=1,_=10,p=256,f=32,g=512},76357:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(31635),i=r(66552),n=r(25482),o=r(91429),a=r(93223);const u=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(u),(0,o.MZ)({json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],h)},80451:(e,t,r)=>{r.d(t,{rS:()=>_,gK:()=>c}),r(44208);var s,i=r(53177),n=r(76357),o=r(31635),a=r(91429),u=r(93223);let h=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};var l;(0,o.Cg)([(0,u.e)({inherited:"inherited"})],h.prototype,"type",void 0),h=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],h);let d=class extends n.A{static{l=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new l({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o.Cg)([(0,a.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],d.prototype,"maxValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],d.prototype,"minValue",void 0),(0,o.Cg)([(0,u.e)({range:"range"})],d.prototype,"type",void 0),d=l=(0,o.Cg)([(0,a.$K)("esri.layers.support.RangeDomain")],d);const c={key:"type",base:n.A,typeMap:{range:d,"coded-value":i.A,inherited:h}};function _(e){if(!e?.type)return null;switch(e.type){case"range":return d.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return h.fromJSON(e)}return null}},92029:(e,t,r)=>{r.d(t,{o:()=>o});var s=r(69397),i=r(50115);const n=Math.PI/180;class o{static create(e){return new o(e.map(e=>function(e){switch(e.statisticType){case"min":return new u(e);case"max":return new h(e);case"avg":return new d(e);case"avg_angle":return new c(e);case"sum":case"count":return new l(e);case"mode":return new _(e)}}(e)))}constructor(e){this._statistics=e}static get estimatedMemory(){return s.qK+4*s.qK}values(){return this._statistics.values()}insert(e,t){for(const r of this._statistics)r.insert(e,t)}merge(e){for(let t=0;t<this._statistics.length;t++){const r=this._statistics[t],s=e._statistics[t];if(r.field.name!==s.field.name)throw new Error("InternalError: Tried to merge incompatible statistics");r.merge(s)}}clone(){return new o(this._statistics.map(e=>e.clone()))}}class a{constructor(e){this.field=e}insert(e,t){if(!this.field.computed)return;const r=this.field.computed.read(e,t);(0,i.rZ)(r)||this._insertValue(r)}}class u extends a{constructor(){super(...arguments),this.type="min",this.value=Number.MAX_VALUE}_insertValue(e){this.value=Math.min(this.value,e)}merge(e){this.value=Math.min(this.value,e.value)}clone(){const e=new u(this.field);return e.value=this.value,e}}class h extends a{constructor(){super(...arguments),this.type="max",this.value=Number.MIN_VALUE}_insertValue(e){this.value=Math.max(this.value,e)}merge(e){this.value=Math.max(this.value,e.value)}clone(){const e=new h(this.field);return e.value=this.value,e}}class l extends a{constructor(){super(...arguments),this.type="sum",this.value=0}_insertValue(e){this.value+=e}merge(e){this.value+=e.value}clone(){const e=new l(this.field);return e.value=this.value,e}}class d extends a{constructor(){super(...arguments),this.type="avg",this._total=0,this._count=0}get value(){return this._total/this._count}_insertValue(e){this._total+=e,this._count+=1}merge(e){this._total+=e._total,this._count+=e._count}clone(){const e=new d(this.field);return e._total=this._total,e._count=this._count,e}}class c extends a{constructor(){super(...arguments),this.type="avg_angle",this._x=0,this._y=0,this._count=0}get value(){const e=this._x/this._count,t=this._y/this._count,r=180/Math.PI;return Math.atan2(t,e)*r}_insertValue(e){this._x=this._x+Math.cos(e*n),this._y=this._y+Math.sin(e*n),this._count+=1}merge(e){this._x+=e._x,this._y+=e._y,this._count+=e._count}clone(){const e=new c(this.field);return e._x=this._x,e._y=this._y,e._count=this._count,e}}class _ extends a{constructor(){super(...arguments),this._frequencies=new Map}get value(){let e,t=0;for(const[r,s]of this._frequencies.entries())s>t&&(t=s,e=r);return e}_insertValue(e){const t=this._frequencies.get(e);null!=t?this._frequencies.set(e,t+1):this._frequencies.set(e,1)}merge(e){for(const[t,r]of e._frequencies.entries()){const e=this._frequencies.get(t);null!=e?this._frequencies.set(t,e+r):this._frequencies.set(t,r)}}clone(){const e=new _(this.field);return e._frequencies=new Map(this._frequencies),e}}},97633:(e,t,r)=>{r.d(t,{P:()=>n});var s=r(69397),i=r(73250);class n{constructor(e){this._valid=i.y.create(e),this._data=new Array(e)}get usedMemory(){let e=this._valid.usedMemory;if(this._data.length>0){const t="string"==typeof this._data[0]?64:s.RS;e+=this._data.length*t}return e}has(e){return this._valid.has(e)}set(e,t){this._valid.set(e),this._data[e]=t}get(e){return this._data[e]}}},98453:(e,t,r)=>{r.d(t,{m:()=>s});const s=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99996:(e,t,r)=>{r.d(t,{Y:()=>P});var s=r(66131),i=r(44208),n=r(69397),o=r(44729),a=r(15032),u=r(36745),h=r(70328),l=r(65864),d=r(32011),c=r(62577),_=r(27647),p=r(90708),f=r(43334),g=r(92722),m=r(98623),y=r(97633);const b=(0,i.A)("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],w=b[0],x=b[1],v=b[2],I=b[3],T=(0,i.A)("featurelayer-simplify-payload-size-factors")??[1,2,4],F=T[0],S=T[1],M=T[2],A=(0,i.A)("featurelayer-simplify-mobile-factor")??2,C=(0,i.A)("esri-mobile"),k=4294967295;class P{constructor(e){this.metadata=e,this.type="FeatureSetReader",this._overrides=null,this._joined=[],this._objectIdToIndex=null,this._boundsBuffer=[],this._caches=new Map,this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}destroy(){}[Symbol.dispose](){this.destroy()}getAreaSimplificationThreshold(e,t){let r=1;const s=C?A:1;t>4e6?r=M*s:t>1e6?r=S*s:t>5e5?r=F*s:t>1e5&&(r=s);let i=0;return e>4e3?i=I*r:e>2e3?i=v*r:e>100?i=x:e>15&&(i=w),i}getBounds(e){!function(e,t){if(!(e.length>t))for(;e.length<=t;)e.push(0)}(this._boundsBuffer,4*this.getIndex()+4);const t=this.getBoundsXMin();if(t===k||!isFinite(t))return!1;if(0===this.getBoundsXMin()){const t=this.readGeometryWorldSpace();if(t?.isPoint&&0===t.coords[0]&&0===t.coords[1])return(0,h.BI)(e,0,0,0,0),!0;if(!t)return this.setBoundsXMin(k),!1;let r=1/0,s=1/0,i=-1/0,n=-1/0;return t.forEachVertex((e,t)=>{r=Math.min(r,e),s=Math.min(s,t),i=Math.max(i,e),n=Math.max(n,t)}),this.setBoundsXMin(r),this.setBoundsYMin(s),this.setBoundsXMax(i),this.setBoundsYMax(n),(0,h.BI)(e,r,s,i,n),!0}const r=this.getBoundsXMin(),s=this.getBoundsYMin(),i=this.getBoundsXMax(),n=this.getBoundsYMax();return(0,h.BI)(e,r,s,i,n),!0}getBoundsXMin(){return this._boundsBuffer[4*this.getIndex()]}setBoundsXMin(e){this._boundsBuffer[4*this.getIndex()]=e}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(e){this._boundsBuffer[4*this.getIndex()+1]=e}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(e){this._boundsBuffer[4*this.getIndex()+2]=e}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(e){this._boundsBuffer[4*this.getIndex()+3]=e}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"string"==typeof t?new Date(t).getTime():"number"==typeof t||null==t?t:null}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const r of this._joined){r.setIndex(this.getIndex());const s=r._readAttribute(e,t);if(void 0!==s)return s}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}registerOverrides(e){this._overrides=e}withoutOverrides(){const e=this.copy();return e._overrides=null,e}readOptimizedFeatureWorldSpace(){const e=this.readGeometryWorldSpace(),t=this.readAttributes(),r=this.readCentroidWorldSpace();return new f.Om(e,t,r,this.getObjectId(),this.getDisplayId())}readLegacyFeatureForDisplay(){const e=this.readCentroidForDisplay();return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyFeatureWorldSpace(){const e=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(e&&{x:e.coords[0],y:e.coords[1]})??null}}readLegacyGeometryForDisplay(){const e=this.readGeometryForDisplay();return(0,p.zv)(e,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const e=this._readX(),t=this.getInTransform();return null==t?e:e*t.scale[0]+t.translate[0]}readYWorldSpace(){const e=this._readY(),t=this.getInTransform();return null==t?e:t.translate[1]-e*t.scale[1]}readGeometryForDisplay(){const e=this._readGeometryDeltaDecoded(!0);if(!e){const e=this._createDeltaQuantizedGeometryFromServerCentroid();return e?e.deltaDecode():null}return e}readGeometryForDisplayTransformed(e){let t=this.readGeometryForDisplay();if(t&&"esriGeometryPolyline"===this.metadata.geometryType&&(t=(0,p.kz)(t,this.metadata.geometryType,e.scale[0])),t&&(t=(0,p.hK)(t,e,this.metadata.geometryType)),!t){const t=this.readCentroidForDisplay();if(!t)return null;const r=(0,c.IE)(e,t.coords[0]),s=(0,c.B2)(e,t.coords[1]);return this._createDeltaQuantizedExtrudedGeometry(r,s).deltaDecode()}return t}readGeometryWorldSpace(){let e=this._readGeometry();if(e||(e=this._createDeltaQuantizedGeometryFromServerCentroid()),!e)return null;const t=e.clone(),r=this.getInTransform();return null!=r&&(0,p.aQ)(t,r),t}readCentroidForDisplay(){const e=this.readGeometryForDisplay();return e?this._computeDisplayCentroid(e):this._readServerCentroid()}readCentroidWorldSpace(){const e=this.readGeometryForDisplay(),t=e?this._computeDisplayCentroid(e):this._readServerCentroid();if(!t)return null;const r=t.clone(),s=this.getInTransform();return null!=s&&(0,p.aQ)(r,s),r}setCache(e){let t=this._caches.get(e);null==t&&(t=new y.P(this.getSize()),this._caches.set(e,t)),this._activeCache=t}setCachedValue(e){this._activeCache.set(this.getIndex(),e)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}get underlyingMemory(){let e=0;e+=(0,n.Qf)(this._boundsBuffer);for(const t of this._caches.values())e+=t.usedMemory;return e}_readGeometryDeltaDecoded(e){const t=this._readGeometry(e);return"esriGeometryPoint"!==this.geometryType&&t&&this.getInTransform()?t.deltaDecode():t}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)||this._joined.some(t=>t.hasField(e))}geometry(){const e=this.readGeometryWorldSpace(),t=(0,p.zv)(e,this.geometryType,this.hasZ,this.hasM),r=(0,l.rS)(t);if(r){if(!this.metadata.outSpatialReference)throw new Error("InternalError: Expected spatial reference to be defined");r.spatialReference=this.metadata.outSpatialReference}return r}autocastArcadeDate(e,t){return t&&t instanceof Date?this.isUnknownDateTimeField(e)?s.lY.unknownDateJSToArcadeDate(t):s.lY.dateJSAndZoneToArcadeDate(t,this.contextTimeZone??m.qU):t}isUnknownDateTimeField(e){return this.metadata.fieldsIndex.getTimeZone(e)===m.L5}field(e){let t=this.fields.get(e);if(t)switch(t.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(this.readAttribute(e,!1));case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(this.readAttribute(e,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(this.readAttribute(e,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(e,this.readAttribute(e,!0));default:return this.readAttribute(e,!1)}for(const r of this._joined)if(r.setIndex(this.getIndex()),t=r.fields.get(e),t)switch(t.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(r._readAttribute(e,!1));case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(r._readAttribute(e,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(r._readAttribute(e,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(e,r._readAttribute(e,!0));default:return this.readAttribute(e,!1)}throw new Error(`Field ${e} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map(e=>e.name)}isEmpty(){return this.fields.fields.length<=0&&null==this.geometry()}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeatureForDisplay());const t=this.readLegacyFeatureForDisplay();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes}};for(const e in r.attributes){const t=r.attributes[e];t instanceof Date&&(r.attributes[e]=t.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}_getExists(){if(this._overrides){const e=this.getObjectId();return!this._overrides.hasOverride(e)}return!0}_computeDisplayCentroid(e){if(null==this.getInTransform())return(0,_.Q)(e);const t=u.z.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=(0,d.d)(t);return r?(r[1]*=-1,new g.A([],r)):null}copyInto(e){e._joined=this._joined,e._overrides=this._overrides,e._objectIdToIndex=this._objectIdToIndex,e._boundsBuffer=this._boundsBuffer,e._activeCache=this._activeCache,e._caches=this._caches,e._contextTimeZone=this._contextTimeZone}_readLegacyGeometryWorldSpace(){const e=this.readGeometryWorldSpace();return(0,p.zv)(e,this.geometryType,!1,!1)}_createDeltaQuantizedGeometryFromServerCentroid(){const e=this._readServerCentroid();if(!e)return null;const[t,r]=e.coords;return this._createDeltaQuantizedExtrudedGeometry(t,r)}_createDeltaQuantizedExtrudedGeometry(e,t){return"esriGeometryPolyline"===this.geometryType?this._createDeltaQuantizedExtrudedLine(e,t):this._createDeltaQuantizedExtrudedQuad(e,t)}_createDeltaQuantizedExtrudedQuad(e,t){return new g.A([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}_createDeltaQuantizedExtrudedLine(e,t){return new g.A([2],[e-1,t+1,1,-1])}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3661],{55537:(t,s,e)=>{function i(t,s){try{if(!t)throw new Error(s)}catch(t){throw t}}e.d(s,{A:()=>L,B:()=>P,C:()=>C,D:()=>F,G:()=>m,a:()=>M,b:()=>w,c:()=>R,d:()=>z,e:()=>v,f:()=>d,g:()=>i,h:()=>x,i:()=>p,j:()=>N,k:()=>b,l:()=>_,m:()=>g,n:()=>E,o:()=>B,p:()=>D,q:()=>q,r:()=>T,s:()=>G,t:()=>A,u:()=>f,v:()=>y,w:()=>I,x:()=>k,y:()=>S,z:()=>Z});class n extends Error{constructor(t,s){super(s),this.m_AdditionalMessage=s,this.m_ErrorType=t,this.name="GeometryError"}what(){return function(t){switch(t){case 1:return"Unknown error";case 2:return"Corrupted geometry";case 3:return"Empty geometry";case 4:return"Math singularity";case 5:return"Buffer is too small";case 6:return"Invalid shape type";case 7:return"Projection out of supported range";case 8:return"Non simple geometry";case 9:return"Cannot calculate geodesic";case 10:return"Notation conversion";case 11:return"Missing grid file";case 12:return"Invalid call";case 13:return"Internal error";case 14:return"Not implemented";case 15:return"IO error";case 16:return"Invalid 3D";case 17:return"An ambiguous geography edge with antipodal points";case 18:return"Geocentric coordinates require ellipsoidal height";case 19:return"Geography cannot be projected into a gnomonic plane or a result of an operation cannot fit into a gnomonic plane";case 20:return"Geometry is too large to be exported in to a given format";case 22:return"Operation is canceled by the user";case 21:return"The operation, such as projection or geodetic computation, cannot be performed without pe-wasm loaded";default:return"unknown error"}}(this.m_ErrorType)}additionalMessage(){return this.m_AdditionalMessage?this.m_AdditionalMessage:""}code(){return this.m_ErrorType}}class r extends n{constructor(t){super(2,t),this.name="CorruptedGeometryError"}}class u extends n{constructor(t){super(3,t),this.name="EmptyGeometryError"}}class h extends n{constructor(t){super(4,t),this.name="MathSingularityError"}}class o extends n{constructor(t){super(21,t),this.name="ProjectionEngineNotLoadedError"}}class a extends n{constructor(t){super(8,t),this.name="NonSimpleGeometryError"}}var m,l;(l=m||(m={}))[l.enumUnknown=0]="enumUnknown",l[l.enumPoint=513]="enumPoint",l[l.enumLine=5122]="enumLine",l[l.enumBezier=5123]="enumBezier",l[l.enumEllipticArc=5124]="enumEllipticArc",l[l.enumEnvelope=3077]="enumEnvelope",l[l.enumMultiPoint=8710]="enumMultiPoint",l[l.enumPolyline=25607]="enumPolyline",l[l.enumPolygon=27656]="enumPolygon",l[l.enumMultipatch=40969]="enumMultipatch",l[l.enumGeometryCollection=3594]="enumGeometryCollection",l[l.enumRationalBezier2=5134]="enumRationalBezier2",l[l.enumBezier2=5135]="enumBezier2",l[l.enumRationalBezier23d=5392]="enumRationalBezier23d",l[l.enumGreatArc3d=5393]="enumGreatArc3d";const c=[0,0,1,1,1,2,0,1,2,3,-1,-1,-1,-1,1,1];function f(t){return c[15&t]}function v(t){return!!(512&t)}function _(t){return!!(1024&t)}function b(t){return!!(2048&t)}function d(t){return!!(4096&t)}function p(t){return!!(8192&t)}function x(t){return!!(16384&t)}function N(t){return!!(32768&t)}function y(t){const s=t.getGeometryType();return p(s)?t.getPointCount():t.isEmpty()?0:s===m.enumEnvelope?4:s===m.enumPoint?1:d(s)?2:void z("missing type")}function g(t){const s=t.getGeometryType();if(x(s))return t.hasNonLinearSegments();if(s===m.enumGeometryCollection){const s=t;for(let t=0,e=s.getGeometryCount();t<e;t++)if(g(s.getGeometry(t)))return!0;return!1}return!!d(s)&&s!==m.enumLine}function T(t){throw new o(t)}function E(t){throw new r(t)}function M(t){throw new Error(t)}function w(t){throw new h(t)}function I(){M("Geometry type is not supported for 3D operations.")}function D(t){throw new n(12,t)}function P(t){throw new u(t)}function A(t){throw new n(14,t)}function q(t){throw new Error(t)}function z(t){throw new n(13,t)}function C(t){throw new Error(t)}function Z(t){throw new a(t)}function B(t){t&&g(t)&&A("Operation does not support curves.")}function R(t){t&&N(t.getGeometryType())&&A("Unsupported geometry type.")}function k(t){t===m.enumGeometryCollection&&M("Geometry_collection instances are not supported in this operation")}function G(t){k(t.getGeometryType())}function S(t){M(`bad wkid: ${t}`)}function L(t){let s="bad wkt: ";s+=t,s+="...",M(s)}function F(t,s){t||M(s)}},83661:(t,s,e)=>{e.d(s,{$:()=>Ls,A:()=>ms,B:()=>vs,C:()=>At,D:()=>Dt,E:()=>a,F:()=>Ht,G:()=>I,H:()=>Ts,I:()=>as,J:()=>ds,K:()=>n,L:()=>Os,M:()=>Bs,N:()=>Tt,O:()=>ls,P:()=>Qs,Q:()=>R,R:()=>Nt,S:()=>Zt,T:()=>ts,U:()=>d,V:()=>ws,W:()=>M,X:()=>l,Y:()=>fs,Z:()=>Ut,_:()=>Fs,a:()=>G,a0:()=>bs,a1:()=>ys,a2:()=>cs,a3:()=>gs,a4:()=>Kt,a5:()=>Jt,a6:()=>p,a7:()=>Pt,a8:()=>Es,a9:()=>ft,aA:()=>ks,aB:()=>Rs,aC:()=>lt,aD:()=>Cs,aE:()=>yt,aF:()=>V,aG:()=>S,aH:()=>at,aI:()=>L,aJ:()=>es,aK:()=>_t,aa:()=>xt,ab:()=>St,ac:()=>As,ad:()=>ct,ae:()=>Ct,af:()=>Z,ag:()=>B,ah:()=>pt,ai:()=>A,aj:()=>Ds,ak:()=>Is,al:()=>zs,am:()=>D,an:()=>P,ao:()=>q,ap:()=>z,aq:()=>x,ar:()=>Gs,as:()=>Ps,at:()=>it,au:()=>nt,av:()=>wt,aw:()=>N,ax:()=>y,ay:()=>et,az:()=>Rt,b:()=>vt,c:()=>bt,d:()=>zt,e:()=>F,f:()=>w,g:()=>Ns,h:()=>Et,i:()=>ss,j:()=>Xt,k:()=>qt,l:()=>Bt,m:()=>It,n:()=>st,o:()=>Gt,p:()=>kt,q:()=>C,r:()=>Wt,s:()=>Ms,t:()=>O,u:()=>gt,v:()=>dt,w:()=>Mt,x:()=>k,y:()=>g,z:()=>E});var i=e(55537);class n{constructor(t){this.sum=t,this.compensation=0}assign(t){return this.compensation=t.compensation,this.sum=t.sum,this}reset(){this.sum=this.compensation=0}resetToStart(t){this.sum=t,this.compensation=0}normalize(){const t=[Number.NaN];this.sum=tt(this.sum,this.compensation,t),this.compensation=t[0]}add(t){const s=this.sum+t;let e;if(Math.abs(this.sum)>=Math.abs(t)){const i=this.sum-s+t;e=this.compensation+i}else{const i=t-s+this.sum;e=this.compensation+i}this.sum=s,this.compensation=e}sub(t){this.add(-t)}addProduct(t,s){const e=[0],i=J(t,s,e);this.add(i),this.add(e[0])}mul(t){const s=new n(0);s.addProduct(this.sum,t),s.addProduct(this.compensation,t),this.assign(s)}getResult(){return this.sum+this.compensation}pe(t){return this.add(t),this}me(t){return this.add(-t),this}}const r=[5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1],u=[-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3];function h(t){let s=0;return 65535n&t||(s+=16,t>>=16n),255n&t||(s+=8,t>>=8n),15n&t||(s+=4,t>>=4n),s+r[Number(BigInt.asUintN(4,t))]}function o(t){let s=0;return 4294967295n&t||(s=32,t>>=32n),s+h(BigInt.asUintN(32,t))}class a{constructor(t,s){if(this.m_EnvelopeType=1,void 0!==t){if(t instanceof a)return this.vmin=t.vmin,void(this.vmax=t.vmax);this.vmin=t,this.vmax=s,this.normalize()}else this.setEmpty()}static construct(t,s){return new a(t,s)}static constructEmpty(){return new a}setCoords(t,s){this.vmin=t,this.vmax=s,this.normalize()}setCoordsFromEnvelope(t){this.vmin=t.vmin,this.vmax=t.vmax}setEmpty(){this.vmin=Number.NaN,this.vmax=Number.NaN}getCenter(){return.5*(this.vmin+this.vmax)}equalsRange(t,s){return Ht(this.vmin,t)&&Ht(this.vmax,s)}equals(t,s){return!(!this.isEmpty()||!t.isEmpty())||(void 0!==s?Math.abs(this.vmin-t.vmin)<=s&&Math.abs(this.vmax-t.vmax)<=s:this.vmin===t.vmin&&this.vmax===t.vmax)}width(){return this.vmax-this.vmin}isEmpty(){return Number.isNaN(this.vmin)||Number.isNaN(this.vmax)}isZero(){return this.vmin===this.vmax}setInfinite(){this.vmin=Number.NEGATIVE_INFINITY,this.vmax=Number.POSITIVE_INFINITY}move(t){this.isEmpty()||(this.vmin+=t,this.vmax+=t)}contains(t){return t.vmin>=this.vmin&&t.vmax<=this.vmax}containsCoordinate(t){return t>=this.vmin&&t<=this.vmax}containsRightExclusive(t){return t>=this.vmin&&t<this.vmax}containsExclusiveCoordinate(t){return t>this.vmin&&t<this.vmax}containsExclusive(t){return t.vmin>this.vmin&&t.vmax<this.vmax}isIntersecting(t){return this.vmin<=t.vmin?this.vmax>=t.vmin:t.vmax>=this.vmin}mergeCoordinate(t){if(this.isEmpty())return this.vmin=t,void(this.vmax=t);this.mergeNeCoordinate(t)}merge(t){if(t.isEmpty())return;const s=t.vmin,e=t.vmax;this.mergeCoordinate(s),this.mergeCoordinate(e)}mergeNe(t){const s=t.vmin,e=t.vmax;this.mergeNeCoordinate(s),this.mergeNeCoordinate(e)}mergeNeCoordinate(t){t<this.vmin?this.vmin=t:t>this.vmax&&(this.vmax=t)}intersect(t){this.isEmpty()||t.isEmpty()?this.setEmpty():(this.vmin<t.vmin&&(this.vmin=t.vmin),this.vmax>t.vmax&&(this.vmax=t.vmax),this.vmin>this.vmax&&this.setEmpty())}inflate(t){this.isEmpty()||(this.vmin-=t,this.vmax+=t,this.vmax<this.vmin&&this.setEmpty())}normalize(){this.vmin<=this.vmax||(this.vmin>this.vmax?this.vmax=bt(this.vmin,this.vmin=this.vmax):this.setEmpty())}isValid(){return this.isEmpty()||this.vmin<=this.vmax}snapClip(t){return Ms(t,this.vmin,this.vmax)}calculateToleranceFromEnvelope(){return this.isEmpty()?Ns():(Math.abs(this.vmin)+Math.abs(this.vmax)+1)*Ns()}static unit(){return m}normalizeNoNAN(){this.vmin>this.vmax&&(this.vmax=bt(this.vmin,this.vmin=this.vmax))}setCoordsNoNAN(t,s){this.vmin=t,this.vmax=s,this.normalizeNoNAN()}clone(){return new a(this.vmin,this.vmax)}}const m=new a(0,1);class l{static getNAN(){return new l(Number.NaN)}constructor(t,s){this.m_value=t??0,this.m_eps=s??0}[Symbol.toPrimitive](t){return this}clone(){return new l(this.m_value,this.m_eps)}assign(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}scaleError(t){this.m_eps*=t}setError(t){this.m_eps=t}set(t,s){return this.m_value=t,this.m_eps=s??0,this}setWithEps(t,s){return void 0===s&&(s=1),this.m_value=t,this.m_eps=l.ulp(t)*s,this}setE(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}precise(){return new l(this.m_value)}value(){return this.m_value}toDouble(){return this.m_value}eps(){return this.m_eps}resetError(){return this.m_eps=0,this}absThis(){return this.m_value=Math.abs(this.m_value),this}add(t){return this.clone().addThis(t)}addE(t){return this.clone().addThisE(t)}addThisE(t){const s=this.m_value+t.m_value,e=this.m_eps+t.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}addThis(t){const s=this.m_value+t,e=this.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}subE(t){return this.clone().subThisE(t)}sub(t){return this.clone().subThis(t)}subThisE(t){const s=this.m_value-t.m_value,e=this.m_eps+t.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}subThis(t){const s=this.m_value-t,e=this.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}setAddE(t,s){return this.m_value=t.m_value+s.m_value,this.m_eps=t.m_eps+s.m_eps+l.ulp(this.m_value),this}setAdd(t,s){return this.m_value=t+s,this.m_eps=l.ulp(this.m_value),this}setAddEN(t,s){return this.m_value=t.m_value+s,this.m_eps=t.m_eps+l.ulp(this.m_value),this}setAddNE(t,s){return this.m_value=t+s.m_value,this.m_eps=s.m_eps+l.ulp(this.m_value),this}setSubE(t,s){return this.m_value=t.m_value-s.m_value,this.m_eps=t.m_eps+s.m_eps+l.ulp(this.m_value),this}setSub(t,s){return this.m_value=t-s,this.m_eps=l.ulp(this.m_value),this}setSubEN(t,s){return this.m_value=t.m_value-s,this.m_eps=t.m_eps+l.ulp(this.m_value),this}setSubNE(t,s){return this.m_value=t-s.m_value,this.m_eps=s.m_eps+l.ulp(this.m_value),this}mulThisE(t){const s=this.m_value*t.m_value;return this.m_eps=this.m_eps*Math.abs(t.m_value)+t.m_eps*Math.abs(this.m_value)+this.m_eps*t.m_eps+l.ulp(s),this.m_value=s,this}mulThis(t){const s=this.m_value*t;return this.m_eps=this.m_eps*Math.abs(t)+l.ulp(s),this.m_value=s,this}mul(t){return this.clone().mulThis(t)}mulE(t){return this.clone().mulThisE(t)}setMulE(t,s){const e=t.m_value*s.m_value;return this.m_eps=t.m_eps*Math.abs(s.m_value)+s.m_eps*Math.abs(t.m_value)+t.m_eps*s.m_eps+l.ulp(e),this.m_value=e,this}setMul(t,s){return this.m_value=t*s,this.m_eps=l.ulp(this.m_value),this}setMulEN(t,s){return this.setE(t),this.mulThis(s)}setMulNE(t,s){return this.setE(s),this.mulThis(t)}mulThisByPower2(t){return this.m_value*=t,this.m_eps*=Math.abs(t),this}static st_mulByPower2(t,s){return new l(t.m_value,t.m_eps).mulThisByPower2(s)}divE(t){return this.clone().divThisE(t)}divThisE(t){const s=Math.abs(t.m_value),e=this.m_value/t.m_value;let i=(this.m_eps+Math.abs(e)*t.m_eps)/s;if(t.m_eps>.01*s){const e=t.m_eps/s;i*=1+(1+e)*e}return this.m_value=e,this.m_eps=i+l.ulp(e),this}divThis(t){const s=Math.abs(t);return this.m_value/=t,this.m_eps=this.m_eps/s+l.ulp(this.m_value),this}setDivE(t,s){return this.setE(t),this.divThisE(s)}setDiv(t,s){return this.m_value=t/s,this.m_eps=l.ulp(this.m_value),this}setDivEN(t,s){return this.setE(t),this.divThis(s)}setDivNE(t,s){return this.set(t),this.divThisE(s)}divThisByPower2(t){return this.m_value/=t,this.m_eps/=Math.abs(t),this}invThis(){return this.setE(p.clone().divThisE(this)),this}sqrt(){return this.clone().sqrtThis()}sqrtThis(){let t,s;return this.m_value>=0?(t=Math.sqrt(this.m_value),s=this.m_value>10*this.m_eps?.5*this.m_eps/t:this.m_value>this.m_eps?t-Math.sqrt(this.m_value-this.m_eps):Math.max(t,Math.sqrt(this.m_value+this.m_eps)-t),s+=l.ulp(t)):this.m_value<-this.m_eps?(t=Number.NaN,s=Number.NaN):(t=0,s=Math.sqrt(this.m_eps)),this.m_value=t,this.m_eps=s,this}sqr(){return this.clone().sqrThis()}sqrThis(){const t=this.m_value*this.m_value;return this.m_eps=2*this.m_eps*Math.abs(this.m_value)+this.m_eps*this.m_eps+l.ulp(t),this.m_value=t,this}setSin(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=s;const i=Math.abs(s),n=Math.abs(t.value());return this.m_eps=(Math.abs(e)+.5*i*t.m_eps)*t.m_eps+l.ulp(i+n),this}static ulp(t){let s=Vt(t);const e=((0x7ff0000000000000n&s)>>52n)-1075n;return e>-1023n?(s=e+0x3ffn<<52n,function(t){return Ot[0]=t,Ft[0]}(s)):0===t?0:Number.MIN_VALUE}setCos(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=e;const i=Math.abs(e),n=Math.abs(t.value());return this.m_eps=(Math.abs(s)+.5*i*t.m_eps)*t.m_eps+l.ulp(i+n),this}static st_cosAndSin(t,s,e){const i=Math.sin(t.m_value),n=Math.cos(t.m_value);e.m_value=i,s.m_value=n;const r=Math.abs(i),u=Math.abs(n),h=Math.abs(t.value());e.m_eps=(Math.abs(n)+.5*r*t.m_eps)*t.m_eps+l.ulp(r+h),s.m_eps=(Math.abs(i)+.5*u*t.m_eps)*t.m_eps+l.ulp(u+h)}negate(){return this.clone().negateThis()}negateThis(){return this.m_value=-this.m_value,this}setAbs(){return this.m_value=Math.abs(this.m_value),this}isInInterval(t){return a.construct(this.m_value-this.m_eps,this.m_value+this.m_eps).isIntersecting(t)}eq(t){return Math.abs(this.m_value-t.m_value)<=this.m_eps+t.m_eps}ne(t){return!this.eq(t)}gt(t){return this.m_value-t.m_value>this.m_eps+t.m_eps}lt(t){return t.m_value-this.m_value>this.m_eps+t.m_eps}ge(t){return!this.lt(t)}le(t){return!this.gt(t)}tolEQ(t,s){return Math.abs(this.m_value-t.m_value)<=s||this.eq(t)}tolNE(t,s){return!this.tolEQ(t,s)}tolGT(t,s){return this.m_value-t.m_value>s&&this.gt(t)}tolLT(t,s){return t.m_value-this.m_value>s&&this.lt(t)}tolGE(t,s){return!this.tolLT(t,s)}tolLE(t,s){return!this.tolGT(t,s)}isZero(){return Math.abs(this.m_value)<=this.m_eps}isFuzzyZero(){return this.isZero()&&0!==this.m_eps}tolIsZero(t){return Math.abs(this.m_value)<=Math.max(this.m_eps,t)}setPi(){this.setE(b)}setEuler(){this.set(2.718281828459045,_())}static size(){return 1}}function c(t,s){const e=jt(t),i=jt(s),n=53-o(e),r=53-o(i);return(n>=0?n:0)+(r>=0?r:0)<=52}function f(t,s){const e=t+s;return e-t===s&&e-s===t}function v(t,s){const e=t-s;return t-e===s&&s+e===t}function _(){return Ts()}l.dimensions=1;const b=new l(Math.PI,.5*_()),d=new l(0,0),p=new l(1,0),x=new l(4,0);function N(t,s,e){return t.addE(s.subE(t).mulE(e))}function y(t,s,e){return s.subE(s.subE(t).mulE(p.subE(e)))}function g(t){let s;if(0===t)s=1;else if(Math.abs(t)>.01)s=function(t){return Math.atanh(t)}(t)/t;else{let e;const i=-36.841361487904734;s=0;const n=t*t;for(let t=2*Math.trunc(i/Math.log(n)+2.5)-1;t>1;t-=2)e=1/t,s=(s+e)*n;s+=1}return s}function T(t){const s=Math.PI*Math.PI/6;let e;if(1===t)e=s;else if(t>1)e=s;else if(0===t)e=t;else if(t<0){const s=1+(t=Math.abs(t)),i=Math.log(s);e=i*i/-2-T(t/s)}else if(t>.5){const i=1-t,n=Math.log(t)*Math.log(i);e=s-T(i)-n}else{e=0;const s=1+Math.trunc(-16*Math.log(10)/Math.log(t)+1.5);let i=s;for(let n=s;n>0;n--,i-=1)e*=t,e+=1/(i*i);e*=t}return e}function E(t,s){const e=s*t;if(Math.abs(s)<.1){let s=0;for(let t=60;t>=1;t--)s*=e,s+=1/t/t;return s*=t,s}return T(e)/s}function M(t,s){return t<s?Bt(t,s):Bt(s,t)}function w(t,s){const e=Math.abs(t);return s>=0?e:-e}function I(t){return Math.round(t)}function D(t,s,e,i,n){n[0]=s[0]+(e[0]-s[0])*i,n[1]=s[1]+(e[1]-s[1])*i,3===t&&(n[2]=s[2]+(e[2]-s[2])*i)}function P(t,s,e,i,n){n[0]=e[0]-(e[0]-s[0])*(1-i),n[1]=e[1]-(e[1]-s[1])*(1-i),3===t&&(n[2]=e[2]-(e[2]-s[2])*(1-i))}function A(t,s,e,i,n){i<=.5?D(t,s,e,i,n):P(t,s,e,i,n)}function q(t,s,e,i,n){n[0]=s[0].addE(e[0].subE(s[0]).mulE(i)),n[1]=s[1].addE(e[1].subE(s[1]).mulE(i))}function z(t,s,e,i,n){n[0]=e[0].subE(e[0].subE(s[0]).mulE(p.subE(i))),n[1]=e[1].subE(e[1].subE(s[1]).mulE(p.subE(i)))}function C(t,s,e){let i;return i=e<=.5?t+(s-t)*e:s-(s-t)*(1-e),i}function Z(t,s,e){return t+(s-t)*e}function B(t,s,e){return s-(s-t)*(1-e)}function R(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e))}function k(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e,i.z=t.z+(s.z-t.z)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e),i.z=s.z-(s.z-t.z)*(1-e))}function G(t){return t*t}function S(t){return t*t*t}function L(t){return 1/Math.sqrt(t)}function F(t){return t<0?-1:t>0?1:0}function O(t,s,e,i){const n=[0],r=[0],u=[0];return tt(J(t,e,n),J(s,i,r),u)+(n[0]+r[0]+u[0])}const Q=[0],U=[0];function V(t,s,e){return function(t,s,e,i){const n=tt(t,s,W),r=tt(n,e,X);return tt(r,W[0]+X[0],i)}(J(t,s,Q),e,Q[0],U)}const j=[0],Y=[0],$=[0],H=[0];function J(t,s,e){const i=t*s;return K(t,j,Y),K(s,$,H),e[0]=Y[0]*H[0]-(i-j[0]*$[0]-Y[0]*$[0]-j[0]*H[0]),i}function K(t,s,e){const i=134217729*t;s[0]=i-(i-t),e[0]=t-s[0]}const W=[0],X=[0];function tt(t,s,e){const i=t+s;return Math.abs(t)>Math.abs(s)?e[0]=t-i+s:e[0]=s-i+t,i}function st(t,s){return t%s}function et(t){const s=1-t;if(0===s)return 1;let e;if(s<=.01){const t=s,i=Math.log(t);e=1+t*(.4431471805599453-.25*i+t*(.05680519270997949-.09375*i+t*(.02183137044373718-.05859375*i+t*(.011544521417308362-.042724609375*i+t*(.00714200031339596-.0336456298828125*i+t*(.004854743337164948-.027757644653320312*i+t*(.003514687963781376-.023627042770385742*i)))))))}else{if(t<.016){const s=t,e=.25,i=.046875,n=.01953125,r=.01068115234375,u=.0067291259765625,h=.004626274108886719,o=.0033752918243408203,a=.0025710230693221092;return As()*(1-s*(e+s*(i+s*(n+s*(r+s*(u+s*(h+s*(o+s*a))))))))}e=rt(0,s,1)-t*ut(0,s,1)/3}return Ms(e,1,As())}function it(t,s,e=Number.NaN){if((0,i.g)(s>=0&&s<=1),0===s)return t;let n=1,r=t;if(r<0&&(r=-r,n=-1),1===s){const t=Math.round(r/Ds()),s=r-t*Ds();return n*(2*t+Math.sin(s))}const u=As(),h=Math.floor(r/u);1&h?r=(h+1)*u-r:r-=h*u;const o=Math.sin(r),a=Number.isNaN(e)?et(s):e;let m;if(1===o)m=a+Math.sqrt(1-s)*(r-u);else{const t=r*r;if(.01424*Math.pow(t,4)<=2*Ts())m=r*(1+t*s*(-1/6+t*((4-3*s)/120-(16+(45*s-60)*s)/5040*t)));else if(s<=.01){const t=Math.sin(2*r),e=Math.sin(4*r),i=Math.sin(6*r),n=Math.sin(8*r),u=Math.sin(10*r);m=r+s*((2*-r+t)/8+s*((-3*r+2*t-.25*e)/64+s*((-20*r+15*t-3*e+i/3)/1024+s*(5*(-140*r+112*t-28*e+16/3*i-.5*n)/65536+7*s*((-63*r+52.5*t-15*e+3.75*i-.625*n+.05*u)/65536+s*(-693*r+594*t-185.625*e+1.375*i-12.375*n+1.8*u-.125*Math.sin(12*r))/1048576)))))}else{const t=o*o,e=Math.cos(r),i=e*e,n=ht(o,e,s);m=o*(rt(i,n,1)-s*t*ut(i,n,1)/3)}}return 1&h?m=a*(h+1)-m:m+=a*h,n*m}function nt(t,s,e=Number.NaN){if(0===t)return 0;let i=1,n=t;t<0&&(n=-n,i=-1);const r=Number.isNaN(e)?et(s):e,u=Math.floor(n/r);1&u?n=(u+1)*r-n:n-=u*r;let h=n<=0?0:n>=r?As():function(t,s,e){if(0===s)return t;if(1===s)return Math.asin(t);let i=0,n=!0;if(t<.2){const e=t*t,r=t*(1+e*s*(1/6+e*((13*s-4)/120+(16-284*s+493*s*s)/5040*e))),u=Math.abs(s*(4944*s-64-31224*s*s+37369*s*s*s)/362880*Math.pow(t,9));if(u<Math.abs(r)*Ts())return r;i=r,n=u>.1*r}if(n){const n=1-s,r=1-t/e,u=Math.sqrt(r*r+n*n),h=Math.atan2(n,t+Ts());i=As()+Math.sqrt(u)*(h-As())}let r=0;for(let n=0;n<7;n++){r=it(i,s,e);const u=ht(Math.sin(i),Math.cos(i),s);if(i-=(r-t)/Math.sqrt(u),n>0&&Math.abs(r-t)<=4*Ts()*t)break}return i}(n,s,r);return 1&u?h=As()*(u+1)-h:h+=As()*u,i*h}function rt(t,s,e){(0,i.g)((0!==t?1:0)+(0!==s?1:0)+1>1);let n=t,r=s,u=e;for(;;){const t=Math.sqrt(n*r)+Math.sqrt(r*u)+Math.sqrt(u*n);n=.25*(n+t),r=.25*(r+t),u=.25*(u+t);const s=(n+r+u)/3,e=(s-n)/s,i=(s-r)/s,h=(s-u)/s;if(Math.abs(e)<=.0024&&Math.abs(i)<=.0024&&Math.abs(h)<=.0024){const t=e*i-h*h,n=e*i*h;return(1+(1/24*t-.1-3/44*n-5*t*t/208+t*n/16)*t+(1/14+3*n/104)*n)/Math.sqrt(s)}}}function ut(t,s,e){(0,i.g)(0!==t||0!==s);let r=t,u=s,h=e;const o=new n(0);let a=1;for(;;){const t=.2*(r+u+3*h),s=(t-r)/t,e=(t-u)/t,i=(t-h)/t;if(Math.abs(s)<=.0015&&Math.abs(e)<=.0015&&Math.abs(i)<=.0015){const n=s*e,r=i*i,u=n-r,h=n-6*r,m=h+u+u,l=3/26,c=h*(9/22*.25*h-.21428571428571427-1.5*l*i*m),f=i*(1/6*m+i*(-.4090909090909091*u+i*l*n));return 3*o.getResult()+a*(1+c+f)/(t*Math.sqrt(t))}const n=Math.sqrt(r),m=Math.sqrt(u),l=Math.sqrt(h),c=n*(m+l)+m*l;o.add(a/(l*(h+c))),a*=.25,r=.25*(r+c),u=.25*(u+c),h=.25*(h+c)}}function ht(t,s,e){return t<.999?1-e*G(t):1-e+e*G(s)}const ot=new class{constructor(t){for(this.values=[[1]];this.values.length<t+1;){const t=this.values.at(-1),s=zt(t.length+1,1);for(let e=1;e<t.length;++e)s[e]=t[e-1]+t[e];this.values.push(s)}}get(t,s){return this.values[t][s]}}(32);function at(t,s){if(t<ot.values.length)return ot.get(t,s);const e=Math.exp(((0,i.g)(0),0));return e+.01>2147483647&&(0,i.q)("The result value of n choose k is out of range"),e+.01}function mt(t,s){if(t.isZero())return t.clone();const e=t.clone().divThis(t);if(s<0)return e.divThis(mt(t,-s));for(t=t.clone(),s=Math.trunc(s);1&s&&e.mulThis(t),s>>=1;)t.mulThis(t);return e}function lt(t,s){if(0===s)return[];const e=t[0].clone().mulDoubleThis(0),i=[];i.length=s;const n=s-1;for(let s=0;s<=n;++s){i[s]=e.clone();for(let e=0;e<=s;++e)i[s].addThis(t[e].clone().mulDoubleThis(at(s,e)/at(n,e)))}return i}function ct(t,s,e,n,r){return 0===t?0===n?s:1===n?e:r:1===t?0===n?s:1===n?e:C(s,e,n):(2===t&&(0,i.t)("angular interpolation"),void(0,i.t)(""))}function ft(t,s,e,n,r,u,h,o){if(0===t)for(let t=0;t<u;++t)n[t+r]=0===h?s[t]:1===h?e[t]:o;else if(1===t)if(0===h)vt(n,s,r,0,u);else if(1===h)vt(n,e,r,0,u);else for(let t=0;t<u;++t)n[t+r]=C(s[t],e[t],h);else if(2===t)if(0===h)vt(n,s,r,0,u);else if(1===h)vt(n,e,r,0,u);else{let t=0;for(let i=0,o=r;i<u;++i,++o)n[o]=C(s[i],e[i],h),t+=n[o]*n[o];if(t>0){t=Math.sqrt(t);for(let s=r;s<r+u;++s)n[s]/=t}else{for(let t=r;t<r+u;++t)n[t]=0;n[r]=1}}else(0,i.t)("")}function vt(t,s,e,i,n){if(0===n)return;let r=0,u=e,h=i;for(;r++<n;)t[u++]=s[h++]}function _t(t,s,e){let i=0;for(let n=0;!i&&n<e;++n)i=t[n]-s[n];return i}function bt(t,s){return t}function dt(t){t.sort((t,s)=>t<s?-1:t>s?1:0)}function pt(t,s){const e=t.slice(0,s);dt(e),vt(t,e,0,0,s)}function xt(t,s,e,i){const n=t.slice(s,s+e);n.sort(i),vt(t,n,s,0,e)}function Nt(t,s){return t<s?-1:t>s?1:0}function yt(t,s,e,i){return t<e?-1:t>e?1:s<i?-1:s>i?1:0}function gt(t,s){if(t.length<2)return t.length;let e=0;for(let i=1;i<t.length;++i)s(t[i],t[e])||(e++,t[i]=bt(t[e],t[e]=t[i]));return 1+e}function Tt(t,s){t[s]=t.at(-1),t.pop()}function Et(t,s=!1){return{[Symbol.dispose](){this.bForget||t()},bForget:s}}function Mt(t,s,e){t.length=s,t.fill(e)}function wt(t,s,e){t.length=e;for(let i=0;i<e;++i)t[i]=new s}function It(t,s){const e=new Array(s);for(let i=0;i<s;++i)e[i]=new t;return e}function Dt(t,s,e){for(let i=0;i<e;++i)t[i].assign(s[i]);return e}function Pt(t,s){const e=t.slice(0,s);for(let t=0;t<s;++t)e[t]=e[t].clone();return e}function At(t){return Array.from({length:t},()=>null)}function qt(t,s){return Array.from({length:s},()=>t())}function zt(t,s){const e=new Array(t);return e.fill(s),e}function Ct(t,s){return s in t&&1===Object.getOwnPropertyNames(t).length}class Zt{constructor(...t){this.m_elts=t}get length(){return this.m_elts.length}at(t){return this.m_elts[t]}[Symbol.dispose](){for(const t of this.m_elts)t[Symbol.dispose]()}}function Bt(t,s){return{first:t,second:s}}const Rt=Math.PI,kt=2*Math.PI,Gt=.5*Math.PI;class St{constructor(t,s){this.m_cr=t,this.m_cc=s,this.m_v=zt(t*s,0)}get(t,s){return this.m_v[t*this.m_cc+s]}set(t,s,e){this.m_v[t*this.m_cc+s]=e}inc(t,s){return++this.m_v[t*this.m_cc+s]}}const Lt=new ArrayBuffer(8),Ft=new Float64Array(Lt),Ot=new BigUint64Array(Lt),Qt=0x0fffffffffffffn;function Ut(){return Number.EPSILON*xs}function Vt(t){return Ft[0]=t,Ot[0]}function jt(t){return Vt(t)&Qt}function Yt(t){return Number((9218868437227405312n&Vt(t))>>52n)}function $t(t){if(0n===t)return-1n;if(1n===t||-1n===t)return 0n;t<0n&&(t=-t);let s=0n,e=512n,i=1n<<s+e;for(;t>=i;)s+=e,e<<=1n,i<<=e;let n=s;e>>=1n;let r=n+e;for(;e>0n;)t<1n<<r||(n=r),e>>=1n,r=n+e;return n}function Ht(t,s){return t===s||Number.isNaN(t)&&Number.isNaN(s)}function Jt(t,s,e){return t===s||Math.abs(t-s)<=e||Number.isNaN(t)&&Number.isNaN(s)}function Kt(t,s){return t<s?-1:t>s?1:0}function Wt(t,s){if(t<s)return-1;if(t>s)return 1;if(t===s)return 0;{const e=Number.isNaN(t),i=Number.isNaN(s);return e<i?-1:e>i?1:0}}function Xt(){return 2147483647}function ts(){return 32767}function ss(){return 2147483647}function es(){return-2147483648}const is=2147483647,ns=BigInt(is),rs=2166136261,us=16777619,hs=14695981039346656037n,os=1099511628211n;function as(t){let s=rs;for(let e=0,i=t.length;e<i;++e)s=(s^t.charCodeAt(e))*us;return s&is}function ms(t,s){return s+2654435769+(t<<6)+(t>>2)&is}function ls(t,s){return ms(t,_s(s))}function cs(t){return ms(3735928559,t)}function fs(t,s){return ms(t,cs(s))}function vs(t){return function(t){let s=rs,e=t;return s=(s^255&e)*us,e>>=8,s=(s^255&e)*us,e>>=8,s=(s^255&e)*us,e>>=8,s=(s^255&e)*us,s&is}(t)}function _s(t){return Number(function(t){let s=hs,e=t;return s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,s&ns}(t))}function bs(t){return _s(Vt(function(t){return Cs(t)}(t)))}function ds(t){return function(t){return 1103515245*t+12345&2147483647}(t)}const ps=100,xs=100;function Ns(){return Number.EPSILON*ps}function ys(){return.38196601125010515}function gs(){return 1.4142135623730951}function Ts(){return Number.EPSILON}function Es(t,s,e){return t===s||t===e}function Ms(t,s,e){return t>=s?t<=e?t:e:s}function ws(t,s,e){const i=t[0];if(i>=s){if(i<=e)return!1;t[0]=e}else t[0]=s;return!0}function Is(t,s){return t>=s?s:t<-s?-s:t}function Ds(){return Rt}function Ps(){return kt}function As(){return Gt}const qs=3*As();function zs(){return qs}function Cs(t){return t+0}function Zs(t){return{v:t}}class Bs{constructor(){this.m_rn=Zs(0n),this.m_rd=Zs(1n),this.m_bNaN=!1,this.m_bNormalized=!1,this.m_power=0,this.m_sign=0}static constructAssign(t,s){const e=t.clone();return void 0!==s&&e.limitPrecisionThis(s),e}static constructDouble(t){return(new Bs).setDouble(t)}static constructInt64(t){return(new Bs).setInt64(t)}static constructRational(t,s){return(new Bs).setRational(t,s)}static constructInt32(t){return this.constructInt64(BigInt(Math.trunc(t)))}[Symbol.toPrimitive](t){return this}compare(t){return this.lt(t)?-1:this.gt(t)?1:0}assignCopy(t){return this.setThis(t)}abs(){return this.clone().absThis()}absThis(){return this.isNAN()||(this.m_sign*=this.m_sign),this}clone(){return(new Bs).setThis(this)}setThis(t){return this.m_bNaN=t.m_bNaN,this.m_bNormalized=t.m_bNormalized,this.m_rn.v=t.m_rn.v,this.m_rd.v=t.m_rd.v,this.m_power=t.m_power,this.m_sign=t.m_sign,this}setZero(){return this.m_rn.v=0n,this.m_rd.v=1n,this.m_bNaN=!1,this.m_power=0,this.m_bNormalized=!0,this.m_sign=0,this}setDouble(t){if(this.setZero(),0===t)return this;if(Number.isInteger(t)&&Math.abs(t)<2147483647)return this.setInt32(t);const s=Vt(t),e=(s&Bs.s_em)>>52n,n=!!(s&Bs.s_sm),r=s&Bs.s_fm;if(e===Bs.s_emax)return r?(this.m_rn.v=this.m_rd.v=0n,this.m_bNaN=!0,this):(this.m_rn.v=n?-1n:1n,this.m_rd.v=0n,this);0n===e&&(0,i.t)("denormalized numbers not yet implemented");const u=e-1023n,h=u>=0n?u:0n,o=u<0n?-u:0n;return this.m_rn.v=(1n<<52n|r)<<h,this.m_rd.v=1n<<52n+o,this.m_sign=n?-1:1,this.m_bNormalized=!1,this.normalizeThis()}setInt64(t){return 0n===t?this.setZero():(this.m_bNaN=!1,this.m_sign=t>0n?1:-1,this.m_rn.v=t>0n?t:-t,this.m_rd.v=1n,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setRational(t,s){return 0n===t?0n===s?this.setNAN():this.setZero():0n===s?t>0n?this.setPositiveInf():this.setNegativeInf():(this.m_sign=(t>0n?1:-1)*(s>0n?1:-1),this.m_rn.v=t>0n?t:-t,this.m_rd.v=s>0n?s:-s,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setInt32(t){return this.setInt64(BigInt(Math.trunc(t)))}getDouble(){return this.convertToDouble()}toDouble(){return this.convertToDouble()}value(){return this.convertToDouble()}isNAN(){return this.m_bNaN}isPositiveInf(){return!this.isNAN()&&0n===this.m_rd.v&&1===this.m_sign}isNegativeInf(){return!this.isNAN()&&0n===this.m_rd.v&&-1===this.m_sign}isFinite(){return!this.isNAN()&&0n!==this.m_rd.v}setNAN(){return this.m_bNaN=!0,this.m_rn.v=0n,this.m_rd.v=0n,this.m_power=0,this.m_bNormalized=!0,this}setPositiveInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=1,this.m_power=0,this}setNegativeInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=-1,this.m_power=0,this}subThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())this.setNAN();else{if(this.isPositiveInf()&&t.isNegativeInf())return this.setPositiveInf(),this;if(this.isNegativeInf()&&t.isNegativeInf())this.setNAN();else if(this.isNegativeInf()&&t.isPositiveInf())return this.setNegativeInf(),this}return this.isNAN()?this:this.opPlusMinus(t,!1)}thisSubAbs(t){return(0,i.g)(0),this}mulThis(t){return t.isNAN()&&this.setNAN(),this.isNAN()?this:(this.m_sign*=t.m_sign,0===this.m_sign?this.setZero():(this.m_rn.v*=t.m_rn.v,this.m_rd.v*=t.m_rd.v,this.m_power+=t.m_power,this.m_bNormalized=!1,this.normalizeThis(),this))}mulDoubleThis(t){return this.mulThis(Bs.constructDouble(t))}thisMulInt64(t){return(0,i.g)(0),this}thisMulInt32(t){return(0,i.g)(0),this}divThis(t){return this.mulThis(t.clone().invertThis())}divDoubleThis(t){return this.divThis(Bs.constructDouble(t))}addDoubleThis(t){return this.addThis(Bs.constructDouble(t))}subDoubleThis(t){return this.subThis(Bs.constructDouble(t))}mul(t){return this.clone().mulThis(t)}mulBigIntThis(t){return this.mulThis(Bs.constructInt64(t))}mulDouble(t){return this.clone().mulThis(Bs.constructDouble(t))}div(t){return this.clone().divThis(t)}divDouble(t){return this.clone().divDoubleThis(t)}add(t){return this.clone().addThis(t)}fmSubThis(t,s){return this.subThis(t.clone().mulThis(s))}fmAddThis(t,s){return this.addThis(t.clone().mulThis(s))}addThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())return this.setPositiveInf(),this;if(this.isPositiveInf()&&t.isNegativeInf())this.setNAN();else{if(this.isNegativeInf()&&t.isNegativeInf())return this.setNegativeInf(),this;this.isNegativeInf()&&t.isPositiveInf()&&this.setNAN()}return this.isNAN()?this:this.opPlusMinus(t,!0)}addDouble(t){return this.clone().addThis(Bs.constructDouble(t))}sub(t){return this.clone().subThis(t)}subDouble(t){return this.clone().subThis(Bs.constructDouble(t))}isZero(){return 0===this.m_sign}equals(t){return this.clone().subThis(t).isZero()}lt(t){return!this.isNAN()&&!t.isNAN()&&!(this.isPositiveInf()&&t.isPositiveInf()||this.isNegativeInf()&&t.isNegativeInf())&&!this.isPositiveInf()&&(!!t.isPositiveInf()||this.clone().sub(t).LZ())}absLessAbs(t){return this.abs().lt(t.abs())}gt(t){return this.clone().sub(t).GZ()}lte(t){return this.sub(t).LEZ()}gte(t){return this.sub(t).GEZ()}normalizeThis(){if(this.m_bNormalized)return this;if(0n===this.m_rn.v)return this.setZero();let t=0,s=0xffffffffn;for(;0n===(this.m_rn.v&s)&&s<=this.m_rn.v;)s<<=32n,t+=32;s&=this.m_rn.v,s>>=BigInt(t),t+=h(BigInt.asUintN(32,s))-1;let e=0;for(s=0xffffffffn;0n===(this.m_rd.v&s)&&s<=this.m_rd.v;)s<<=32n,e+=32;return s&=this.m_rd.v,s>>=BigInt(e),e+=h(BigInt.asUintN(32,s))-1,this.m_rn.v>>=BigInt(t),this.m_rd.v>>=BigInt(e),this.m_power+=t-e,this.m_rn.v>1n&&this.m_rd.v>1n&&(this.m_rn.v%this.m_rd.v===0n?(this.m_rn.v/=this.m_rd.v,this.m_rd.v=1n):this.m_rd.v%this.m_rn.v===0n&&(this.m_rd.v/=this.m_rn.v,this.m_rn.v=1n)),this.m_bNormalized=!0,this}negateThis(){return this.isNAN()||(this.m_sign*=-1),this}negate(){return this.clone().negateThis()}invertThis(){return this.isNAN()?this:this.isPositiveInf()||this.isNegativeInf()?(this.setZero(),this):0n===this.m_rn.v?(this.setPositiveInf(),this):(this.m_rd=bt(this.m_rn,this.m_rn=this.m_rd),this.m_power=-this.m_power,this)}limitPrecisionThis(t){if(0===t)return this;if(this.isZero())return this.setZero();if(!this.isFinite())return this;this.normalizeThis();let s=Number($t(this.m_rn.v));if(s>t){const e=s-t;this.m_rn.v>>=BigInt(s-t),this.m_power+=e}if(s=Number($t(this.m_rd.v)),s>t){const e=s-t;this.m_rd.v>>=BigInt(s-t),this.m_power-=e}return this}hiBitIndex(){return Math.max(Number($t(this.m_rn.v)),Number($t(this.m_rd.v)))}ldexp(t){return this.clone().ldexpThis(t)}ldexpThis(t){return t&&(this.m_bNormalized=!1,this.m_power+=t,this.normalizeThis()),this}static lerp(t,s,e){return Bs.lerpLo(s,s,e)}static lerpLo(t,s,e){return s.sub(t).mulThis(e).addThis(t)}static lerpHi(t,s,e){return s.sub(t).mulThis(Rs.sub(e)).addThis(t)}LZ(){return!this.isNAN()&&-1===this.m_sign}GZ(){return!this.isNAN()&&1===this.m_sign}LEZ(){return!this.isNAN()&&this.m_sign<=0}GEZ(){return!this.isNAN()&&this.m_sign>=0}toString(){return this.toDouble().toString()}sqr(){return this.clone().sqrThis()}sqrThis(){return this.mulThis(this.clone())}static sqrt(t,s){if(t.m_sign<0n&&(0,i.q)("MP_value: sqrt(-1)"),t.isZero())return t.clone();let e=52,n=2220446049250313e-31;for(;e<s;)2*e<=s?(n*=n,e*=2):(n*=2220446049250313e-31,e+=52);e+=52;const r=$t(t.m_rn.v),u=$t(t.m_rd.v);let h,o=t.m_power+Number(r-u);const a=new Bs;Math.abs(o)>200?(1&Math.abs(o)&&(o+=1),h=Bs.constructAssign(t,53).ldexpThis(-o).value(),a.setThis(t).ldexpThis(-o),(0,i.g)(Number.isFinite(h))):(a.setThis(t),h=a.value(),(0,i.g)(Number.isFinite(h)),o=0),h=Math.sqrt(h);const m=Bs.constructDouble(h),l=Bs.constructDouble(n);l.mulThis(m).ldexpThis(1);const c=n*h*2,f=m.clone(),v=new Bs;let _;for(let t=0;t<10;++t){f.mulThis(m),v.setThis(a).subThis(f).absThis();let t=v.value();if(_=1,t<.9)for(;t>c;)t*=t,++_;else _=4;if(v.lte(l))break;for(let t=0;t<_;t++)f.setThis(m).divThis(a).invertThis().addThis(m).ldexpThis(-1).limitPrecisionThis(e),m.setThis(f)}return m.ldexpThis(o/2)}static cubicRoot(t,s){if(t.isZero())return t.clone();let e=52,i=2220446049250313e-31;for(;e<s;)2*e<=s?(i*=i,e*=2):(i*=2220446049250313e-31,e+=52);e+=52;const n=Math.pow(Math.abs(t.value()),1/3),r=Bs.constructDouble(n),u=r.clone();u.sqrThis().mulDoubleThis(3).mulDoubleThis(i),u.limitPrecisionThis(32),t.LZ()&&r.negateThis();for(let s=0;s<10;++s){const s=r.clone();s.sqrThis().mulThis(r);const i=s.clone();if(i.subThis(t),i.absThis().limitPrecisionThis(32),i.lte(u))break;i.setThis(t),i.ldexpThis(1),i.addThis(s);const n=s.clone();n.ldexpThis(1),n.addThis(t),i.divThis(n),r.mulThis(i),r.limitPrecisionThis(e)}return r}isInTheRangeOfDouble(){return(0,i.g)(0),!1}sign(){return this.m_sign}cosAndSin(t,s){(0,i.g)(0)}pow(t){return mt(this,t)}static nan(){return(0,i.g)(0),new Bs}convertToDouble(){if(this.m_bNaN)return Number.NaN;if(this.isZero())return 0;if(0n===this.m_rd.v)return 1===this.m_sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;const t=-1===this.m_sign,s=this.m_rn.v<<(this.m_power>=0?BigInt(this.m_power):0n);let e=this.m_rd.v<<(this.m_power<0?BigInt(-this.m_power):0n);const i=s/e;let n=Number(i);if(BigInt(n)!==i)return t?-n:n;let r=s-i*e;if(r){let t=$t(e)-1023n;t>0n&&(e>>=t,r<<=52n,r>>=t);let s=Number(r);Number.isFinite(s)||(r>>=52n,s=Number(r),t=0n),t>0n&&(s/=Math.pow(2,52)),n+=s/Number(e)}return t?-n:n}signVal(){return 1===this.m_sign?1n:-1===this.m_sign?-1n:0n}opPlusMinus(t,s){const e=Math.min(this.m_power,t.m_power);let i,n;this.m_power>e?(i=BigInt(this.m_power-e),n=0n):(i=0n,n=BigInt(t.m_power-e));const r=this.signVal()*this.m_rn.v*t.m_rd.v<<i,u=t.signVal()*t.m_rn.v*this.m_rd.v<<n;return this.m_rn.v=s?r+u:r-u,this.m_rd.v*=t.m_rd.v,this.m_power=e,this.m_sign=1,this.m_rn.v<0n&&(this.m_sign=-1,this.m_rn.v=-this.m_rn.v),this.m_bNormalized=!1,this.normalizeThis(),this}}Bs.s_sm=0x8000000000000000n,Bs.s_em=0x7ff0000000000000n,Bs.s_fm=0x000fffffffffffffn,Bs.s_emax=0x7ffn;const Rs=Bs.constructInt32(1),ks=Bs.constructInt32(0),Gs=Bs.constructDouble(.5);function Ss(t,s){let e=Yt(t);const i=Yt(s);return e===i?(e-=53-function(t,s){return function(t){let s=0;return 0xffffffff00000000n&t&&(s=32,t>>=32n),s+function(t){let s=0;return 4294901760n&t&&(s+=16,t>>=16n),65280n&t&&(s+=8,t>>=8n),240n&t&&(s+=4,t>>=4n),s+u[Number(BigInt.asUintN(4,t))]+1}(t)}(t^s)}(jt(t),jt(s)),e):e>i?e:i}function Ls(t,s){for(let e=0,i=0,n=t.length;e<n;e+=2,i++)s[i].x=t[e],s[i].y=t[e+1]}function Fs(t){const s=new Float64Array(2*t.length);for(let e=0,i=t.length;e<i;++e){const i=e<<1;s[i]=t[e].x,s[i+1]=t[e].y}return s}function Os(t){const s=It(Qs,t.length);for(let e=0,i=t.length;e<i;++e)s[e].setCoords(t[e][0],t[e][1]);return s}class Qs{static construct(t,s){return new Qs(t,s)}constructor(t,s){void 0!==t?(this.x=t,this.y=s):this.x=this.y=Number.NaN}clone(){return new Qs(this.x,this.y)}assign(t){this.setCoordsPoint2D(t)}setCoords(t,s){return this.x=t,this.y=s,this}setCoordsPoint2D(t){this.x=t.x,this.y=t.y}isEqualPoint2D(t,s){return void 0!==s?Math.abs(this.x-t.x)<=s&&Math.abs(this.y-t.y)<=s:this.x===t.x&&this.y===t.y}isEqual(t,s,e){return void 0!==e?Math.abs(this.x-t)<=e&&Math.abs(this.y-s)<=e:this.x===t&&this.y===s}equalsPoint2D(t,s){return this.isEqualPoint2D(t,s)}setSub(t,s){this.x=t.x-s.x,this.y=t.y-s.y}addThis(t){return this.x+=t.x,this.y+=t.y,this}setAdd(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this}absoluteOther(t){}absolute(){return(0,i.g)(0),this}setNegate(){this.x=-this.x,this.y=-this.y}setNegateOther(t){this.x=-t.x,this.y=-t.y}interpolateThis(t,s){}interpolate(t,s,e){(0,i.g)(0)}scaleAddThis(t,s){this.x=this.x*t+s.x,this.y=this.y*t+s.y}setScaleAdd(t,s,e){this.x=s.x*t+e.x,this.y=s.y*t+e.y}scaleOther(t,s){(0,i.g)(0)}scale(t){this.x*=t,this.y*=t}compare(t){return this.y<t.y?-1:this.y>t.y?1:this.x<t.x?-1:this.x>t.x?1:0}compareX(t){return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0}normalizeOther(t){(0,i.g)(0)}normalize(){const t=this.length();return t?(this.x/=t,this.y/=t):(this.x=1,this.y=0),this}getUnitVector(){return this.clone().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}sqrLength(){return this.x*this.x+this.y*this.y}static averageFast(t,s){return(0,i.g)(0),{}}static average(t,s){const e=new Qs;if(0===s)return e.setNAN(),e;if(1===s)return e.assign(t[0]),e;const i=new n(t[0].x),r=new n(t[0].y);for(let e=1;e<s;e++)i.add(t[e].x),r.add(t[e].y),255&e||(i.normalize(),r.normalize());return e.x=i.getResult()/s,e.y=r.getResult()/s,e}static calculateLength(t,s){const e=new n(0);for(let i=1;i<s;i++)e.add(Qs.distance(t[i],t[i-1]));return e.getResult()}offset(t,s){const e=Qs.distance(t,s),i=Qs.construct(this.x,this.y);if(0===e)return Qs.distance(i,t);const n=s.clone();return n.subThis(t),i.subThis(t),i.crossProduct(n)/e}side(t,s){return t.equals(s)?this.equals(t)?0:1:Qs.orientationRobust(s,t,this)}static sqrDistance(t,s){const e=t.x-s.x,i=t.y-s.y;return e*e+i*i}static sqrDistanceCoords(t,s,e,i){const n=e-t,r=i-s;return n*n+r*r}static distance(t,s){return Math.sqrt(Qs.sqrDistance(t,s))}dotProduct(t){return this.x*t.x+this.y*t.y}dotProductAbs(t){return Math.abs(this.x*t.x)+Math.abs(this.y*t.y)}crossProduct(t){return this.x*t.y-this.y*t.x}crossProductAbs(t){return(0,i.g)(0),0}rotateDirect(t,s){const e=this.x*t-this.y*s,i=this.x*s+this.y*t;this.x=e,this.y=i}rotateReverse(t,s){const e=this.x*t+this.y*s,i=-this.x*s+this.y*t;this.x=e,this.y=i}leftPerpendicularThis(){const t=this.x;this.x=-this.y,this.y=t}leftPerpendicularOther(t){const s=t.x;this.x=-t.y,this.y=s}rightPerpendicularThis(){const t=this.x;this.x=this.y,this.y=-t}rightPerpendicularOther(t){const s=t.x;this.x=t.y,this.y=-s}equals(t){return this.x===t.x&&this.y===t.y}notequals(t){return this.x!==t.x||this.y!==t.y}not(){return!this.x&&!this.y}gt(t){return this.y>t.y||this.y===t.y&&this.x>t.x}gte(t){return!this.lt(t)}lt(t){return this.y<t.y||this.y===t.y&&this.x<t.x}lte(t){return!this.gt(t)}subThis(t){return this.x-=t.x,this.y-=t.y,this}divThis(t){return this.x/=t,this.y/=t,this}add(t){return new Qs(this.x+t.x,this.y+t.y)}sub(t){return new Qs(this.x-t.x,this.y-t.y)}negateThis(){return this.x=-this.x,this.y=-this.y,this}negate(){return new Qs(-this.x,-this.y)}mul(t){return new Qs(this.x*t,this.y*t)}mulThis(t){return this.x*=t,this.y*=t,this}divide(t){return new Qs(this.x/t,this.y/t)}setNAN(){this.x=this.y=Number.NaN}isNAN(){return Number.isNaN(this.x)||Number.isNaN(this.y)}static getNAN(){return new Qs(Number.NaN,Number.NaN)}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)}isZero(){return 0===this.x&&0===this.y}norm(t){switch(t){case 0:{const t=Math.abs(this.x),s=Math.abs(this.y),e=t-s;return e>=0?t:e<=0?s:Number.NaN}case 1:return Math.abs(this.x)+Math.abs(this.y);case 2:return Math.sqrt(this.x*this.x+this.y*this.y);default:(0,i.a)("norm")}}getQuarter(){return Qs.getQuarterCoords(this.x,this.y)}static getQuarterCoords(t,s){return t>0?s>=0?1:4:s>0?2:0===t?4:3}static compareVectors(t,s){const e=t.getQuarter(),i=s.getQuarter();return i===e?Qs.orientationRobustImpl(Qs.construct(0,0),s,t,!0):e<i?-1:1}static compareVectorsOrigin(t,s,e){const i=s.sub(t),n=e.sub(t),r=i.getQuarter(),u=n.getQuarter();return u===r?Qs.orientationRobustImpl(t,e,s,!0):r<u?-1:1}static orientationRobust(t,s,e){return Qs.orientationRobustImpl(t,s,e,!1)}static orientationRobustEx(t,s,e,i){if(t.equals(s)||e.equals(i))return 0;const n=s.x-t.x,r=s.y-t.y,u=i.x-e.x,h=i.y-e.y;{const t=Qs.getQuarterCoords(n,r)-1,s=Qs.getQuarterCoords(u,h)-1,e=Qs.d[t][s];if(0!==e)return e}const o=n*h,a=r*u,m=4*Ts()*(Math.abs(o)+Math.abs(a)),l=o-a;return Math.abs(l)>=m?l<0?-1:l>0?1:0:Qs.orientationRobustExMp(t,s,e,i)}static orientationRobustExMp(t,s,e,i){const n=Bs.constructDouble(s.x),r=Bs.constructDouble(i.x);n.subThis(Bs.constructDouble(t.x)),r.subThis(Bs.constructDouble(e.x));const u=Bs.constructDouble(s.y),h=Bs.constructDouble(i.y);return u.subThis(Bs.constructDouble(t.y)),h.subThis(Bs.constructDouble(e.y)),n.mulThis(h),u.mulThis(r),n.subThis(u),n.LZ()?-1:n.GZ()?1:0}static orientationNonRobust(t,s,e){const i=s.sub(t).crossProduct(e.sub(t));return i<0?-1:i>0?1:0}static orientationRobustImpl(t,s,e,i){if(s.isEqualPoint2D(t)||e.isEqualPoint2D(t)||s.isEqualPoint2D(e))return 0;const n=s.x-t.x,r=s.y-t.y,u=e.x-t.x,h=e.y-t.y;if(!i){const t=Qs.getQuarterCoords(n,r)-1,s=Qs.getQuarterCoords(u,h)-1,e=Qs.d[t][s];if(0!==e)return e}const o=(Math.abs(n)+Math.abs(r)+Math.abs(u)+Math.abs(h))*(Math.abs(s.x)+Math.abs(s.y)+Math.abs(e.x)+Math.abs(e.y))*8*_(),a=n*h-r*u;if(Math.abs(a)>o)return a<0?-1:1;if(v(s.x,t.x)&&v(e.y,t.y)&&v(s.y,t.y)&&v(e.x,t.x)&&c(n,h)&&c(r,u)){const t=n*h,s=r*u;if(v(t,s)){const e=t-s;return e<0?-1:e>0?1:0}}return Qs.orientationRobustMp(t,s,e)}static orientationRobustMp(t,s,e){const i=Bs.constructDouble(s.x),n=Bs.constructDouble(e.x);{const s=Bs.constructDouble(t.x);i.subThis(s),n.subThis(s)}const r=Bs.constructDouble(e.y),u=Bs.constructDouble(s.y);{const s=Bs.constructDouble(t.y);r.subThis(s),u.subThis(s)}return i.mulThis(r),u.mulThis(n),i.subThis(u),i.LZ()?-1:i.GZ()?1:0}static inCircleRobust(t,s,e,i){const n=new l,r=new l;n.set(t.x),n.subThis(i.x),r.set(t.y),r.subThis(i.y);const u=new l,h=new l;u.set(s.x),u.subThis(i.x),h.set(s.y),h.subThis(i.y);const o=new l,a=new l;o.set(e.x),o.subThis(i.x),a.set(e.y),a.subThis(i.y);const m=n.mulE(h).subE(r.mulE(u)),c=u.mulE(a).subE(h.mulE(o)),f=n.mulE(a).subE(r.mulE(o)),v=n.mulE(n).addE(r.mulE(r)),_=u.mulE(u).addE(h.mulE(h)),b=o.mulE(o).addE(a.mulE(a)),d=v.mulE(c).subE(_.mulE(f)).addE(b.mulE(m));if(!d.isFuzzyZero()){const t=d.value();return t<0?-1:t>0?1:0}return Qs.inCircleRobustMp(t,s,e,i)}static inCircleRobustMp(t,s,e,i){do{if(!v(t.x,i.x)||!v(t.y,i.y))break;if(!v(s.x,i.x)||!v(s.y,i.y))break;if(!v(e.x,i.x)||!v(e.y,i.y))break;const n=t.x-i.x,r=t.y-i.y,u=s.x-i.x,h=s.y-i.y,o=e.x-i.x,a=e.y-i.y;if(!c(n,h)||!c(r,u))break;if(!c(u,a)||!c(h,o))break;if(!c(n,a)||!c(r,o))break;if(!c(n,n)||!c(r,r))break;if(!c(u,u)||!c(h,h))break;if(!c(o,o)||!c(a,a))break;const m=n*h,l=r*u,_=u*a,b=h*o,d=n*a,p=r*o,x=n*n,N=r*r,y=u*u,g=h*h,T=o*o,E=a*a;if(!v(m,l))break;if(!v(_,b))break;if(!v(d,p))break;if(!f(x,N))break;if(!f(y,g))break;if(!f(T,E))break;const M=m-l,w=_-b,I=d-p,D=x+N,P=y+g,A=T+E;if(!c(D,w))break;if(!c(P,I))break;if(!c(A,M))break;const q=D*w,z=P*I,C=A*M;if(!v(q,z))break;const Z=q-z;if(!f(Z,C))break;const B=Z+C;return B<0?-1:B>0?1:0}while(0);const n=Bs.constructDouble(i.x),r=Bs.constructDouble(i.y),u=Bs.constructDouble(t.x),h=Bs.constructDouble(t.y);u.subThis(n),h.subThis(r);const o=Bs.constructDouble(s.x),a=Bs.constructDouble(s.y);o.subThis(n),a.subThis(r);const m=Bs.constructDouble(e.x),l=Bs.constructDouble(e.y);m.subThis(n),l.subThis(r);const _=u.mul(a).sub(h.mul(o)),b=o.mul(l).sub(a.mul(m)),d=u.mul(l).sub(h.mul(m)),p=u.mul(u).add(h.mul(h)),x=o.mul(o).add(a.mul(a)),N=m.mul(m).add(l.mul(l)),y=p.mul(b).sub(x.mul(d)).add(N.mul(_));return y.LZ()?-1:y.GZ()?1:0}static inCircleRobustMp3Point(t,s,e){const i=Bs.constructDouble(t.x),n=Bs.constructDouble(t.y),r=Bs.constructDouble(s.x),u=Bs.constructDouble(s.y),h=Bs.constructDouble(e.x),o=Bs.constructDouble(e.y),a=h.mul(h).add(o.mul(o)).sub(h.mul(i).add(o.mul(n)).add(h.mul(r)).add(o.mul(u))).add(i.mul(r).add(n.mul(u)));return a.LZ()?-1:a.GZ()?1:0}static inCircleRobust3Point(t,s,e){const i=new l(t.x),n=new l(t.y),r=new l(s.x),u=new l(s.y),h=new l(e.x),o=new l(e.y),a=h.mulE(h).addE(o.mulE(o)).subE(h.mulE(i).addE(o.mulE(n)).addE(h.mulE(r)).addE(o.mulE(u))).addE(i.mulE(r).addE(n.mulE(u)));if(!a.isFuzzyZero()){const t=a.value();return t<0?-1:t>0?1:0}return Qs.inCircleRobustMp3Point(t,s,e)}static calculateCircleCenterFromThreePoints(t,s,e){if(t.equals(e)||t.equals(s)||e.equals(s))return Qs.getNAN();const i=function(t,s,e){const i=new l(s.x);i.subThis(t.x);const n=new l(s.y);n.subThis(t.y);const r=new l(e.x);r.subThis(t.x);const u=new l(e.y);u.subThis(t.y);const h=i.clone();h.mulThisE(u);let o=n.clone();if(o.mulThisE(r),h.subThisE(o),0===h.value())return Qs.getNAN();h.mulThis(2);const a=i.clone();a.mulThisE(i);const m=n.clone();m.mulThisE(n);const c=a.clone();c.addThisE(m);const f=r.clone();f.mulThisE(r);const v=u.clone();v.mulThisE(u);const _=f.clone();_.addThisE(v);const b=n.clone();b.mulThisE(_),o=u.clone(),o.mulThisE(c),b.subThisE(o),b.divThisE(h);const d=i.clone();d.mulThisE(_),o=r.clone(),o.mulThisE(c),d.subThisE(o),d.divThisE(h);const p=Qs.construct(t.x-b.value(),t.y+d.value()),x=t.sub(p).length(),N=s.sub(p).length(),y=e.sub(p).length(),g=1e-15*(x+Math.abs(t.x)+Math.abs(s.x)+Math.abs(e.x)+Math.abs(t.y)+Math.abs(s.y)+Math.abs(e.y));return Math.abs(x-N)<=g&&Math.abs(x-y)<=g&&b.eps()<g&&d.eps()<g?p:Qs.getNAN()}(t,s,e);return i.isNAN()?function(t,s,e){const i=Bs.constructDouble(s.x);i.subDoubleThis(t.x);const n=Bs.constructDouble(s.y);n.subDoubleThis(t.y);const r=Bs.constructDouble(e.x);r.subDoubleThis(t.x);const u=Bs.constructDouble(e.y);u.subDoubleThis(t.y);const h=i.clone();h.mulThis(u);let o=n.clone();if(o.mulThis(r),h.subThis(o),h.isZero())return Qs.getNAN();h.mulDoubleThis(2);const a=i.clone();a.mulThis(i);const m=n.clone();m.mulThis(n);const l=a.clone();l.addThis(m);const c=r.clone();c.mulThis(r);const f=u.clone();f.mulThis(u);const v=c.clone();v.addThis(f);const _=n.clone();_.mulThis(v),o=u.clone(),o.mulThis(l),_.subThis(o),_.divThis(h);const b=i.clone();return b.mulThis(v),o=r.clone(),o.mulThis(l),b.subThis(o),b.divThis(h),Qs.construct(t.x-_.value(),t.y+b.value())}(t,s,e):i}static calculateAngle(t,s){return Math.atan2(t.crossProduct(s),t.dotProduct(s))}static isBisectorRobust(t,s,e){return(0,i.g)(0),!1}static size(){return 2}get 0(){return this.x}get 1(){return this.y}set 0(t){this.x=t}set 1(t){this.y=t}static compareZorder(t,s){const e=Qs.c_compare_zorder_xx[t.x<0?1:0]|Qs.c_compare_zorder_yy[t.y<0?1:0],i=Qs.c_compare_zorder_xx[s.x<0?1:0]|Qs.c_compare_zorder_yy[s.y<0?1:0];if(e===i){let e=0,i=0;for(let n=0;n<2;++n){const r=Ss(t[n],s[n]);r>e&&(e=r,i=n)}return t[i]<s[i]}return e<i}static lerp(t,s,e){const i=new Qs;return R(t,s,e,i),i}static getClosestCoordinate(t,s,e,i=!1){const n=Qs.getNAN();n.setSub(s,t);const r=n.sqrLength();if(0===r)return.5;if(s.isEqualPoint2D(e))return 1;const u=Qs.getNAN();u.setSub(e,t);let h=u.dotProduct(n)/r;return i||(h<0?h=0:h>1&&(h=1)),h}static intersectLinesAtOnePoint(t,s,e,i){if(t.equals(s)||e.equals(i))return Qs.getNAN();const n=s.x-t.x,r=e.x-i.x,u=s.y-t.y,h=e.y-i.y,o=n*h-r*u;if(!o)return Qs.getNAN();const a=o;if(0===a)return Qs.getNAN();let m=(e.x-t.x)*h-(e.y-t.y)*r;m/=a;const l=new Qs;return R(t,s,m,l),l.isFinite()?l:Qs.getNAN()}toString(){return`[${this.x},${this.y}]`}}Qs.dimensions=2,Qs.d=[[0,1,0,-1],[-1,0,1,0],[0,-1,0,1],[1,0,-1,0]],Qs.c_compare_zorder_xx=[2,0],Qs.c_compare_zorder_yy=[1,0]}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3661],{55537:(t,s,e)=>{function i(t,s){try{if(!t)throw new Error(s)}catch(t){throw t}}e.d(s,{A:()=>S,B:()=>P,C:()=>C,D:()=>F,G:()=>m,a:()=>M,b:()=>w,c:()=>R,d:()=>z,e:()=>v,f:()=>d,g:()=>i,h:()=>x,i:()=>p,j:()=>N,k:()=>b,l:()=>_,m:()=>g,n:()=>E,o:()=>B,p:()=>D,q:()=>q,r:()=>T,s:()=>G,t:()=>A,u:()=>f,v:()=>y,w:()=>I,x:()=>k,y:()=>L,z:()=>Z});class n extends Error{constructor(t,s){super(s),this.m_AdditionalMessage=s,this.m_ErrorType=t,this.name="GeometryError"}what(){return function(t){switch(t){case 1:return"Unknown error";case 2:return"Corrupted geometry";case 3:return"Empty geometry";case 4:return"Math singularity";case 5:return"Buffer is too small";case 6:return"Invalid shape type";case 7:return"Projection out of supported range";case 8:return"Non simple geometry";case 9:return"Cannot calculate geodesic";case 10:return"Notation conversion";case 11:return"Missing grid file";case 12:return"Invalid call";case 13:return"Internal error";case 14:return"Not implemented";case 15:return"IO error";case 16:return"Invalid 3D";case 17:return"An ambiguous geography edge with antipodal points";case 18:return"Geocentric coordinates require ellipsoidal height";case 19:return"Geography cannot be projected into a gnomonic plane or a result of an operation cannot fit into a gnomonic plane";case 20:return"Geometry is too large to be exported in to a given format";case 22:return"Operation is canceled by the user";case 21:return"The operation, such as projection or geodetic computation, cannot be performed without pe-wasm loaded";default:return"unknown error"}}(this.m_ErrorType)}additionalMessage(){return this.m_AdditionalMessage?this.m_AdditionalMessage:""}code(){return this.m_ErrorType}}class r extends n{constructor(t){super(2,t),this.name="CorruptedGeometryError"}}class u extends n{constructor(t){super(3,t),this.name="EmptyGeometryError"}}class h extends n{constructor(t){super(4,t),this.name="MathSingularityError"}}class o extends n{constructor(t){super(21,t),this.name="ProjectionEngineNotLoadedError"}}class a extends n{constructor(t){super(8,t),this.name="NonSimpleGeometryError"}}var m,l;(l=m||(m={}))[l.enumUnknown=0]="enumUnknown",l[l.enumPoint=513]="enumPoint",l[l.enumLine=5122]="enumLine",l[l.enumBezier=5123]="enumBezier",l[l.enumEllipticArc=5124]="enumEllipticArc",l[l.enumEnvelope=3077]="enumEnvelope",l[l.enumMultiPoint=8710]="enumMultiPoint",l[l.enumPolyline=25607]="enumPolyline",l[l.enumPolygon=27656]="enumPolygon",l[l.enumMultipatch=40969]="enumMultipatch",l[l.enumGeometryCollection=3594]="enumGeometryCollection",l[l.enumRationalBezier2=5134]="enumRationalBezier2",l[l.enumBezier2=5135]="enumBezier2",l[l.enumRationalBezier23d=5392]="enumRationalBezier23d",l[l.enumGreatArc3d=5393]="enumGreatArc3d";const c=[0,0,1,1,1,2,0,1,2,3,-1,-1,-1,-1,1,1];function f(t){return c[15&t]}function v(t){return!!(512&t)}function _(t){return!!(1024&t)}function b(t){return!!(2048&t)}function d(t){return!!(4096&t)}function p(t){return!!(8192&t)}function x(t){return!!(16384&t)}function N(t){return!!(32768&t)}function y(t){const s=t.getGeometryType();return p(s)?t.getPointCount():t.isEmpty()?0:s===m.enumEnvelope?4:s===m.enumPoint?1:d(s)?2:void z("missing type")}function g(t){const s=t.getGeometryType();if(x(s))return t.hasNonLinearSegments();if(s===m.enumGeometryCollection){const s=t;for(let t=0,e=s.getGeometryCount();t<e;t++)if(g(s.getGeometry(t)))return!0;return!1}return!!d(s)&&s!==m.enumLine}function T(t){throw new o(t)}function E(t){throw new r(t)}function M(t){throw new Error(t)}function w(t){throw new h(t)}function I(){M("Geometry type is not supported for 3D operations.")}function D(t){throw new n(12,t)}function P(t){throw new u(t)}function A(t){throw new n(14,t)}function q(t){throw new Error(t)}function z(t){throw new n(13,t)}function C(t){throw new Error(t)}function Z(t){throw new a(t)}function B(t){t&&g(t)&&A("Operation does not support curves.")}function R(t){t&&N(t.getGeometryType())&&A("Unsupported geometry type.")}function k(t){t===m.enumGeometryCollection&&M("Geometry_collection instances are not supported in this operation")}function G(t){k(t.getGeometryType())}function S(t){M(`bad wkid: ${t}`)}function L(t){let s="bad wkt: ";s+=t,s+="...",M(s)}function F(t,s){t||M(s)}},83661:(t,s,e)=>{e.d(s,{$:()=>Ls,A:()=>ms,B:()=>vs,C:()=>At,D:()=>Dt,E:()=>a,F:()=>Ht,G:()=>I,H:()=>Ts,I:()=>Tt,J:()=>ls,K:()=>n,L:()=>R,M:()=>Bs,N:()=>as,O:()=>ds,P:()=>Qs,Q:()=>Os,R:()=>Nt,S:()=>Zt,T:()=>ts,U:()=>d,V:()=>ws,W:()=>M,X:()=>l,Y:()=>fs,Z:()=>Ut,_:()=>Fs,a:()=>G,a0:()=>bs,a1:()=>ys,a2:()=>cs,a3:()=>gs,a4:()=>Kt,a5:()=>Jt,a6:()=>p,a7:()=>Pt,a8:()=>Es,a9:()=>ft,aA:()=>ks,aB:()=>Rs,aC:()=>lt,aD:()=>Cs,aE:()=>yt,aF:()=>V,aG:()=>S,aH:()=>at,aI:()=>L,aJ:()=>es,aK:()=>_t,aa:()=>xt,ab:()=>St,ac:()=>As,ad:()=>ct,ae:()=>Ct,af:()=>Z,ag:()=>B,ah:()=>pt,ai:()=>A,aj:()=>Ds,ak:()=>Is,al:()=>zs,am:()=>D,an:()=>P,ao:()=>q,ap:()=>z,aq:()=>x,ar:()=>Gs,as:()=>Ps,at:()=>it,au:()=>nt,av:()=>wt,aw:()=>N,ax:()=>y,ay:()=>et,az:()=>Rt,b:()=>vt,c:()=>bt,d:()=>zt,e:()=>F,f:()=>w,g:()=>Ns,h:()=>Et,i:()=>ss,j:()=>Xt,k:()=>qt,l:()=>Bt,m:()=>It,n:()=>st,o:()=>Gt,p:()=>kt,q:()=>C,r:()=>Wt,s:()=>Ms,t:()=>O,u:()=>gt,v:()=>dt,w:()=>Mt,x:()=>k,y:()=>g,z:()=>E});var i=e(55537);class n{constructor(t){this.sum=t,this.compensation=0}assign(t){return this.compensation=t.compensation,this.sum=t.sum,this}reset(){this.sum=this.compensation=0}resetToStart(t){this.sum=t,this.compensation=0}normalize(){const t=[Number.NaN];this.sum=tt(this.sum,this.compensation,t),this.compensation=t[0]}add(t){const s=this.sum+t;let e;if(Math.abs(this.sum)>=Math.abs(t)){const i=this.sum-s+t;e=this.compensation+i}else{const i=t-s+this.sum;e=this.compensation+i}this.sum=s,this.compensation=e}sub(t){this.add(-t)}addProduct(t,s){const e=[0],i=J(t,s,e);this.add(i),this.add(e[0])}mul(t){const s=new n(0);s.addProduct(this.sum,t),s.addProduct(this.compensation,t),this.assign(s)}getResult(){return this.sum+this.compensation}pe(t){return this.add(t),this}me(t){return this.add(-t),this}}const r=[5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1],u=[-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3];function h(t){let s=0;return 65535n&t||(s+=16,t>>=16n),255n&t||(s+=8,t>>=8n),15n&t||(s+=4,t>>=4n),s+r[Number(BigInt.asUintN(4,t))]}function o(t){let s=0;return 4294967295n&t||(s=32,t>>=32n),s+h(BigInt.asUintN(32,t))}class a{constructor(t,s){if(this.m_EnvelopeType=1,void 0!==t){if(t instanceof a)return this.vmin=t.vmin,void(this.vmax=t.vmax);this.vmin=t,this.vmax=s,this.normalize()}else this.setEmpty()}static construct(t,s){return new a(t,s)}static constructEmpty(){return new a}setCoords(t,s){this.vmin=t,this.vmax=s,this.normalize()}setCoordsFromEnvelope(t){this.vmin=t.vmin,this.vmax=t.vmax}setEmpty(){this.vmin=Number.NaN,this.vmax=Number.NaN}getCenter(){return.5*(this.vmin+this.vmax)}equalsRange(t,s){return Ht(this.vmin,t)&&Ht(this.vmax,s)}equals(t,s){return!(!this.isEmpty()||!t.isEmpty())||(void 0!==s?Math.abs(this.vmin-t.vmin)<=s&&Math.abs(this.vmax-t.vmax)<=s:this.vmin===t.vmin&&this.vmax===t.vmax)}width(){return this.vmax-this.vmin}isEmpty(){return Number.isNaN(this.vmin)||Number.isNaN(this.vmax)}isZero(){return this.vmin===this.vmax}setInfinite(){this.vmin=Number.NEGATIVE_INFINITY,this.vmax=Number.POSITIVE_INFINITY}move(t){this.isEmpty()||(this.vmin+=t,this.vmax+=t)}contains(t){return t.vmin>=this.vmin&&t.vmax<=this.vmax}containsCoordinate(t){return t>=this.vmin&&t<=this.vmax}containsRightExclusive(t){return t>=this.vmin&&t<this.vmax}containsExclusiveCoordinate(t){return t>this.vmin&&t<this.vmax}containsExclusive(t){return t.vmin>this.vmin&&t.vmax<this.vmax}isIntersecting(t){return this.vmin<=t.vmin?this.vmax>=t.vmin:t.vmax>=this.vmin}mergeCoordinate(t){if(this.isEmpty())return this.vmin=t,void(this.vmax=t);this.mergeNeCoordinate(t)}merge(t){if(t.isEmpty())return;const s=t.vmin,e=t.vmax;this.mergeCoordinate(s),this.mergeCoordinate(e)}mergeNe(t){const s=t.vmin,e=t.vmax;this.mergeNeCoordinate(s),this.mergeNeCoordinate(e)}mergeNeCoordinate(t){t<this.vmin?this.vmin=t:t>this.vmax&&(this.vmax=t)}intersect(t){this.isEmpty()||t.isEmpty()?this.setEmpty():(this.vmin<t.vmin&&(this.vmin=t.vmin),this.vmax>t.vmax&&(this.vmax=t.vmax),this.vmin>this.vmax&&this.setEmpty())}inflate(t){this.isEmpty()||(this.vmin-=t,this.vmax+=t,this.vmax<this.vmin&&this.setEmpty())}normalize(){this.vmin<=this.vmax||(this.vmin>this.vmax?this.vmax=bt(this.vmin,this.vmin=this.vmax):this.setEmpty())}isValid(){return this.isEmpty()||this.vmin<=this.vmax}snapClip(t){return Ms(t,this.vmin,this.vmax)}calculateToleranceFromEnvelope(){return this.isEmpty()?Ns():(Math.abs(this.vmin)+Math.abs(this.vmax)+1)*Ns()}static unit(){return m}normalizeNoNAN(){this.vmin>this.vmax&&(this.vmax=bt(this.vmin,this.vmin=this.vmax))}setCoordsNoNAN(t,s){this.vmin=t,this.vmax=s,this.normalizeNoNAN()}clone(){return new a(this.vmin,this.vmax)}}const m=new a(0,1);class l{static getNAN(){return new l(Number.NaN)}constructor(t,s){this.m_value=t??0,this.m_eps=s??0}[Symbol.toPrimitive](t){return this}clone(){return new l(this.m_value,this.m_eps)}assign(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}scaleError(t){this.m_eps*=t}setError(t){this.m_eps=t}set(t,s){return this.m_value=t,this.m_eps=s??0,this}setWithEps(t,s){return void 0===s&&(s=1),this.m_value=t,this.m_eps=l.ulp(t)*s,this}setE(t){return this.m_value=t.m_value,this.m_eps=t.m_eps,this}precise(){return new l(this.m_value)}value(){return this.m_value}toDouble(){return this.m_value}eps(){return this.m_eps}resetError(){return this.m_eps=0,this}absThis(){return this.m_value=Math.abs(this.m_value),this}add(t){return this.clone().addThis(t)}addE(t){return this.clone().addThisE(t)}addThisE(t){const s=this.m_value+t.m_value,e=this.m_eps+t.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}addThis(t){const s=this.m_value+t,e=this.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}subE(t){return this.clone().subThisE(t)}sub(t){return this.clone().subThis(t)}subThisE(t){const s=this.m_value-t.m_value,e=this.m_eps+t.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}subThis(t){const s=this.m_value-t,e=this.m_eps+l.ulp(s);return this.m_value=s,this.m_eps=e,this}setAddE(t,s){return this.m_value=t.m_value+s.m_value,this.m_eps=t.m_eps+s.m_eps+l.ulp(this.m_value),this}setAdd(t,s){return this.m_value=t+s,this.m_eps=l.ulp(this.m_value),this}setAddEN(t,s){return this.m_value=t.m_value+s,this.m_eps=t.m_eps+l.ulp(this.m_value),this}setAddNE(t,s){return this.m_value=t+s.m_value,this.m_eps=s.m_eps+l.ulp(this.m_value),this}setSubE(t,s){return this.m_value=t.m_value-s.m_value,this.m_eps=t.m_eps+s.m_eps+l.ulp(this.m_value),this}setSub(t,s){return this.m_value=t-s,this.m_eps=l.ulp(this.m_value),this}setSubEN(t,s){return this.m_value=t.m_value-s,this.m_eps=t.m_eps+l.ulp(this.m_value),this}setSubNE(t,s){return this.m_value=t-s.m_value,this.m_eps=s.m_eps+l.ulp(this.m_value),this}mulThisE(t){const s=this.m_value*t.m_value;return this.m_eps=this.m_eps*Math.abs(t.m_value)+t.m_eps*Math.abs(this.m_value)+this.m_eps*t.m_eps+l.ulp(s),this.m_value=s,this}mulThis(t){const s=this.m_value*t;return this.m_eps=this.m_eps*Math.abs(t)+l.ulp(s),this.m_value=s,this}mul(t){return this.clone().mulThis(t)}mulE(t){return this.clone().mulThisE(t)}setMulE(t,s){const e=t.m_value*s.m_value;return this.m_eps=t.m_eps*Math.abs(s.m_value)+s.m_eps*Math.abs(t.m_value)+t.m_eps*s.m_eps+l.ulp(e),this.m_value=e,this}setMul(t,s){return this.m_value=t*s,this.m_eps=l.ulp(this.m_value),this}setMulEN(t,s){return this.setE(t),this.mulThis(s)}setMulNE(t,s){return this.setE(s),this.mulThis(t)}mulThisByPower2(t){return this.m_value*=t,this.m_eps*=Math.abs(t),this}static st_mulByPower2(t,s){return new l(t.m_value,t.m_eps).mulThisByPower2(s)}divE(t){return this.clone().divThisE(t)}divThisE(t){const s=Math.abs(t.m_value),e=this.m_value/t.m_value;let i=(this.m_eps+Math.abs(e)*t.m_eps)/s;if(t.m_eps>.01*s){const e=t.m_eps/s;i*=1+(1+e)*e}return this.m_value=e,this.m_eps=i+l.ulp(e),this}divThis(t){const s=Math.abs(t);return this.m_value/=t,this.m_eps=this.m_eps/s+l.ulp(this.m_value),this}setDivE(t,s){return this.setE(t),this.divThisE(s)}setDiv(t,s){return this.m_value=t/s,this.m_eps=l.ulp(this.m_value),this}setDivEN(t,s){return this.setE(t),this.divThis(s)}setDivNE(t,s){return this.set(t),this.divThisE(s)}divThisByPower2(t){return this.m_value/=t,this.m_eps/=Math.abs(t),this}invThis(){return this.setE(p.clone().divThisE(this)),this}sqrt(){return this.clone().sqrtThis()}sqrtThis(){let t,s;return this.m_value>=0?(t=Math.sqrt(this.m_value),s=this.m_value>10*this.m_eps?.5*this.m_eps/t:this.m_value>this.m_eps?t-Math.sqrt(this.m_value-this.m_eps):Math.max(t,Math.sqrt(this.m_value+this.m_eps)-t),s+=l.ulp(t)):this.m_value<-this.m_eps?(t=Number.NaN,s=Number.NaN):(t=0,s=Math.sqrt(this.m_eps)),this.m_value=t,this.m_eps=s,this}sqr(){return this.clone().sqrThis()}sqrThis(){const t=this.m_value*this.m_value;return this.m_eps=2*this.m_eps*Math.abs(this.m_value)+this.m_eps*this.m_eps+l.ulp(t),this.m_value=t,this}setSin(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=s;const i=Math.abs(s),n=Math.abs(t.value());return this.m_eps=(Math.abs(e)+.5*i*t.m_eps)*t.m_eps+l.ulp(i+n),this}static ulp(t){let s=Vt(t);const e=((0x7ff0000000000000n&s)>>52n)-1075n;return e>-1023n?(s=e+0x3ffn<<52n,function(t){return Ot[0]=t,Ft[0]}(s)):0===t?0:Number.MIN_VALUE}setCos(t){const s=Math.sin(t.m_value),e=Math.cos(t.m_value);this.m_value=e;const i=Math.abs(e),n=Math.abs(t.value());return this.m_eps=(Math.abs(s)+.5*i*t.m_eps)*t.m_eps+l.ulp(i+n),this}static st_cosAndSin(t,s,e){const i=Math.sin(t.m_value),n=Math.cos(t.m_value);e.m_value=i,s.m_value=n;const r=Math.abs(i),u=Math.abs(n),h=Math.abs(t.value());e.m_eps=(Math.abs(n)+.5*r*t.m_eps)*t.m_eps+l.ulp(r+h),s.m_eps=(Math.abs(i)+.5*u*t.m_eps)*t.m_eps+l.ulp(u+h)}negate(){return this.clone().negateThis()}negateThis(){return this.m_value=-this.m_value,this}setAbs(){return this.m_value=Math.abs(this.m_value),this}isInInterval(t){return a.construct(this.m_value-this.m_eps,this.m_value+this.m_eps).isIntersecting(t)}eq(t){return Math.abs(this.m_value-t.m_value)<=this.m_eps+t.m_eps}ne(t){return!this.eq(t)}gt(t){return this.m_value-t.m_value>this.m_eps+t.m_eps}lt(t){return t.m_value-this.m_value>this.m_eps+t.m_eps}ge(t){return!this.lt(t)}le(t){return!this.gt(t)}tolEQ(t,s){return Math.abs(this.m_value-t.m_value)<=s||this.eq(t)}tolNE(t,s){return!this.tolEQ(t,s)}tolGT(t,s){return this.m_value-t.m_value>s&&this.gt(t)}tolLT(t,s){return t.m_value-this.m_value>s&&this.lt(t)}tolGE(t,s){return!this.tolLT(t,s)}tolLE(t,s){return!this.tolGT(t,s)}isZero(){return Math.abs(this.m_value)<=this.m_eps}isFuzzyZero(){return this.isZero()&&0!==this.m_eps}tolIsZero(t){return Math.abs(this.m_value)<=Math.max(this.m_eps,t)}setPi(){this.setE(b)}setEuler(){this.set(2.718281828459045,_())}static size(){return 1}}function c(t,s){const e=jt(t),i=jt(s),n=53-o(e),r=53-o(i);return(n>=0?n:0)+(r>=0?r:0)<=52}function f(t,s){const e=t+s;return e-t===s&&e-s===t}function v(t,s){const e=t-s;return t-e===s&&s+e===t}function _(){return Ts()}l.dimensions=1;const b=new l(Math.PI,.5*_()),d=new l(0,0),p=new l(1,0),x=new l(4,0);function N(t,s,e){return t.addE(s.subE(t).mulE(e))}function y(t,s,e){return s.subE(s.subE(t).mulE(p.subE(e)))}function g(t){let s;if(0===t)s=1;else if(Math.abs(t)>.01)s=function(t){return Math.atanh(t)}(t)/t;else{let e;const i=-36.841361487904734;s=0;const n=t*t;for(let t=2*Math.trunc(i/Math.log(n)+2.5)-1;t>1;t-=2)e=1/t,s=(s+e)*n;s+=1}return s}function T(t){const s=Math.PI*Math.PI/6;let e;if(1===t)e=s;else if(t>1)e=s;else if(0===t)e=t;else if(t<0){const s=1+(t=Math.abs(t)),i=Math.log(s);e=i*i/-2-T(t/s)}else if(t>.5){const i=1-t,n=Math.log(t)*Math.log(i);e=s-T(i)-n}else{e=0;const s=1+Math.trunc(-16*Math.log(10)/Math.log(t)+1.5);let i=s;for(let n=s;n>0;n--,i-=1)e*=t,e+=1/(i*i);e*=t}return e}function E(t,s){const e=s*t;if(Math.abs(s)<.1){let s=0;for(let t=60;t>=1;t--)s*=e,s+=1/t/t;return s*=t,s}return T(e)/s}function M(t,s){return t<s?Bt(t,s):Bt(s,t)}function w(t,s){const e=Math.abs(t);return s>=0?e:-e}function I(t){return Math.round(t)}function D(t,s,e,i,n){n[0]=s[0]+(e[0]-s[0])*i,n[1]=s[1]+(e[1]-s[1])*i,3===t&&(n[2]=s[2]+(e[2]-s[2])*i)}function P(t,s,e,i,n){n[0]=e[0]-(e[0]-s[0])*(1-i),n[1]=e[1]-(e[1]-s[1])*(1-i),3===t&&(n[2]=e[2]-(e[2]-s[2])*(1-i))}function A(t,s,e,i,n){i<=.5?D(t,s,e,i,n):P(t,s,e,i,n)}function q(t,s,e,i,n){n[0]=s[0].addE(e[0].subE(s[0]).mulE(i)),n[1]=s[1].addE(e[1].subE(s[1]).mulE(i))}function z(t,s,e,i,n){n[0]=e[0].subE(e[0].subE(s[0]).mulE(p.subE(i))),n[1]=e[1].subE(e[1].subE(s[1]).mulE(p.subE(i)))}function C(t,s,e){let i;return i=e<=.5?t+(s-t)*e:s-(s-t)*(1-e),i}function Z(t,s,e){return t+(s-t)*e}function B(t,s,e){return s-(s-t)*(1-e)}function R(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e))}function k(t,s,e,i){e<=.5?(i.x=t.x+(s.x-t.x)*e,i.y=t.y+(s.y-t.y)*e,i.z=t.z+(s.z-t.z)*e):(i.x=s.x-(s.x-t.x)*(1-e),i.y=s.y-(s.y-t.y)*(1-e),i.z=s.z-(s.z-t.z)*(1-e))}function G(t){return t*t}function S(t){return t*t*t}function L(t){return 1/Math.sqrt(t)}function F(t){return t<0?-1:t>0?1:0}function O(t,s,e,i){const n=[0],r=[0],u=[0];return tt(J(t,e,n),J(s,i,r),u)+(n[0]+r[0]+u[0])}const Q=[0],U=[0];function V(t,s,e){return function(t,s,e,i){const n=tt(t,s,W),r=tt(n,e,X);return tt(r,W[0]+X[0],i)}(J(t,s,Q),e,Q[0],U)}const j=[0],Y=[0],$=[0],H=[0];function J(t,s,e){const i=t*s;return K(t,j,Y),K(s,$,H),e[0]=Y[0]*H[0]-(i-j[0]*$[0]-Y[0]*$[0]-j[0]*H[0]),i}function K(t,s,e){const i=134217729*t;s[0]=i-(i-t),e[0]=t-s[0]}const W=[0],X=[0];function tt(t,s,e){const i=t+s;return Math.abs(t)>Math.abs(s)?e[0]=t-i+s:e[0]=s-i+t,i}function st(t,s){return t%s}function et(t){const s=1-t;if(0===s)return 1;let e;if(s<=.01){const t=s,i=Math.log(t);e=1+t*(.4431471805599453-.25*i+t*(.05680519270997949-.09375*i+t*(.02183137044373718-.05859375*i+t*(.011544521417308362-.042724609375*i+t*(.00714200031339596-.0336456298828125*i+t*(.004854743337164948-.027757644653320312*i+t*(.003514687963781376-.023627042770385742*i)))))))}else{if(t<.016){const s=t,e=.25,i=.046875,n=.01953125,r=.01068115234375,u=.0067291259765625,h=.004626274108886719,o=.0033752918243408203,a=.0025710230693221092;return As()*(1-s*(e+s*(i+s*(n+s*(r+s*(u+s*(h+s*(o+s*a))))))))}e=rt(0,s,1)-t*ut(0,s,1)/3}return Ms(e,1,As())}function it(t,s,e=Number.NaN){if((0,i.g)(s>=0&&s<=1),0===s)return t;let n=1,r=t;if(r<0&&(r=-r,n=-1),1===s){const t=Math.round(r/Ds()),s=r-t*Ds();return n*(2*t+Math.sin(s))}const u=As(),h=Math.floor(r/u);1&h?r=(h+1)*u-r:r-=h*u;const o=Math.sin(r),a=Number.isNaN(e)?et(s):e;let m;if(1===o)m=a+Math.sqrt(1-s)*(r-u);else{const t=r*r;if(.01424*Math.pow(t,4)<=2*Ts())m=r*(1+t*s*(-1/6+t*((4-3*s)/120-(16+(45*s-60)*s)/5040*t)));else if(s<=.01){const t=Math.sin(2*r),e=Math.sin(4*r),i=Math.sin(6*r),n=Math.sin(8*r),u=Math.sin(10*r);m=r+s*((2*-r+t)/8+s*((-3*r+2*t-.25*e)/64+s*((-20*r+15*t-3*e+i/3)/1024+s*(5*(-140*r+112*t-28*e+16/3*i-.5*n)/65536+7*s*((-63*r+52.5*t-15*e+3.75*i-.625*n+.05*u)/65536+s*(-693*r+594*t-185.625*e+1.375*i-12.375*n+1.8*u-.125*Math.sin(12*r))/1048576)))))}else{const t=o*o,e=Math.cos(r),i=e*e,n=ht(o,e,s);m=o*(rt(i,n,1)-s*t*ut(i,n,1)/3)}}return 1&h?m=a*(h+1)-m:m+=a*h,n*m}function nt(t,s,e=Number.NaN){if(0===t)return 0;let i=1,n=t;t<0&&(n=-n,i=-1);const r=Number.isNaN(e)?et(s):e,u=Math.floor(n/r);1&u?n=(u+1)*r-n:n-=u*r;let h=n<=0?0:n>=r?As():function(t,s,e){if(0===s)return t;if(1===s)return Math.asin(t);let i=0,n=!0;if(t<.2){const e=t*t,r=t*(1+e*s*(1/6+e*((13*s-4)/120+(16-284*s+493*s*s)/5040*e))),u=Math.abs(s*(4944*s-64-31224*s*s+37369*s*s*s)/362880*Math.pow(t,9));if(u<Math.abs(r)*Ts())return r;i=r,n=u>.1*r}if(n){const n=1-s,r=1-t/e,u=Math.sqrt(r*r+n*n),h=Math.atan2(n,t+Ts());i=As()+Math.sqrt(u)*(h-As())}let r=0;for(let n=0;n<7;n++){r=it(i,s,e);const u=ht(Math.sin(i),Math.cos(i),s);if(i-=(r-t)/Math.sqrt(u),n>0&&Math.abs(r-t)<=4*Ts()*t)break}return i}(n,s,r);return 1&u?h=As()*(u+1)-h:h+=As()*u,i*h}function rt(t,s,e){(0,i.g)((0!==t?1:0)+(0!==s?1:0)+1>1);let n=t,r=s,u=e;for(;;){const t=Math.sqrt(n*r)+Math.sqrt(r*u)+Math.sqrt(u*n);n=.25*(n+t),r=.25*(r+t),u=.25*(u+t);const s=(n+r+u)/3,e=(s-n)/s,i=(s-r)/s,h=(s-u)/s;if(Math.abs(e)<=.0024&&Math.abs(i)<=.0024&&Math.abs(h)<=.0024){const t=e*i-h*h,n=e*i*h;return(1+(1/24*t-.1-3/44*n-5*t*t/208+t*n/16)*t+(1/14+3*n/104)*n)/Math.sqrt(s)}}}function ut(t,s,e){(0,i.g)(0!==t||0!==s);let r=t,u=s,h=e;const o=new n(0);let a=1;for(;;){const t=.2*(r+u+3*h),s=(t-r)/t,e=(t-u)/t,i=(t-h)/t;if(Math.abs(s)<=.0015&&Math.abs(e)<=.0015&&Math.abs(i)<=.0015){const n=s*e,r=i*i,u=n-r,h=n-6*r,m=h+u+u,l=3/26,c=h*(9/22*.25*h-.21428571428571427-1.5*l*i*m),f=i*(1/6*m+i*(-.4090909090909091*u+i*l*n));return 3*o.getResult()+a*(1+c+f)/(t*Math.sqrt(t))}const n=Math.sqrt(r),m=Math.sqrt(u),l=Math.sqrt(h),c=n*(m+l)+m*l;o.add(a/(l*(h+c))),a*=.25,r=.25*(r+c),u=.25*(u+c),h=.25*(h+c)}}function ht(t,s,e){return t<.999?1-e*G(t):1-e+e*G(s)}const ot=new class{constructor(t){for(this.values=[[1]];this.values.length<t+1;){const t=this.values.at(-1),s=zt(t.length+1,1);for(let e=1;e<t.length;++e)s[e]=t[e-1]+t[e];this.values.push(s)}}get(t,s){return this.values[t][s]}}(32);function at(t,s){if(t<ot.values.length)return ot.get(t,s);const e=Math.exp(((0,i.g)(0),0));return e+.01>2147483647&&(0,i.q)("The result value of n choose k is out of range"),e+.01}function mt(t,s){if(t.isZero())return t.clone();const e=t.clone().divThis(t);if(s<0)return e.divThis(mt(t,-s));for(t=t.clone(),s=Math.trunc(s);1&s&&e.mulThis(t),s>>=1;)t.mulThis(t);return e}function lt(t,s){if(0===s)return[];const e=t[0].clone().mulDoubleThis(0),i=[];i.length=s;const n=s-1;for(let s=0;s<=n;++s){i[s]=e.clone();for(let e=0;e<=s;++e)i[s].addThis(t[e].clone().mulDoubleThis(at(s,e)/at(n,e)))}return i}function ct(t,s,e,n,r){return 0===t?0===n?s:1===n?e:r:1===t?0===n?s:1===n?e:C(s,e,n):(2===t&&(0,i.t)("angular interpolation"),void(0,i.t)(""))}function ft(t,s,e,n,r,u,h,o){if(0===t)for(let t=0;t<u;++t)n[t+r]=0===h?s[t]:1===h?e[t]:o;else if(1===t)if(0===h)vt(n,s,r,0,u);else if(1===h)vt(n,e,r,0,u);else for(let t=0;t<u;++t)n[t+r]=C(s[t],e[t],h);else if(2===t)if(0===h)vt(n,s,r,0,u);else if(1===h)vt(n,e,r,0,u);else{let t=0;for(let i=0,o=r;i<u;++i,++o)n[o]=C(s[i],e[i],h),t+=n[o]*n[o];if(t>0){t=Math.sqrt(t);for(let s=r;s<r+u;++s)n[s]/=t}else{for(let t=r;t<r+u;++t)n[t]=0;n[r]=1}}else(0,i.t)("")}function vt(t,s,e,i,n){if(0===n)return;let r=0,u=e,h=i;for(;r++<n;)t[u++]=s[h++]}function _t(t,s,e){let i=0;for(let n=0;!i&&n<e;++n)i=t[n]-s[n];return i}function bt(t,s){return t}function dt(t){t.sort((t,s)=>t<s?-1:t>s?1:0)}function pt(t,s){const e=t.slice(0,s);dt(e),vt(t,e,0,0,s)}function xt(t,s,e,i){const n=t.slice(s,s+e);n.sort(i),vt(t,n,s,0,e)}function Nt(t,s){return t<s?-1:t>s?1:0}function yt(t,s,e,i){return t<e?-1:t>e?1:s<i?-1:s>i?1:0}function gt(t,s){if(t.length<2)return t.length;let e=0;for(let i=1;i<t.length;++i)s(t[i],t[e])||(e++,t[i]=bt(t[e],t[e]=t[i]));return 1+e}function Tt(t,s){t[s]=t.at(-1),t.pop()}function Et(t,s=!1){return{[Symbol.dispose](){this.bForget||t()},bForget:s}}function Mt(t,s,e){t.length=s,t.fill(e)}function wt(t,s,e){t.length=e;for(let i=0;i<e;++i)t[i]=new s}function It(t,s){const e=new Array(s);for(let i=0;i<s;++i)e[i]=new t;return e}function Dt(t,s,e){for(let i=0;i<e;++i)t[i].assign(s[i]);return e}function Pt(t,s){const e=t.slice(0,s);for(let t=0;t<s;++t)e[t]=e[t].clone();return e}function At(t){return Array.from({length:t},()=>null)}function qt(t,s){return Array.from({length:s},()=>t())}function zt(t,s){const e=new Array(t);return e.fill(s),e}function Ct(t,s){return s in t&&1===Object.getOwnPropertyNames(t).length}class Zt{constructor(...t){this.m_elts=t}get length(){return this.m_elts.length}at(t){return this.m_elts[t]}[Symbol.dispose](){for(const t of this.m_elts)t[Symbol.dispose]()}}function Bt(t,s){return{first:t,second:s}}const Rt=Math.PI,kt=2*Math.PI,Gt=.5*Math.PI;class St{constructor(t,s){this.m_cr=t,this.m_cc=s,this.m_v=zt(t*s,0)}get(t,s){return this.m_v[t*this.m_cc+s]}set(t,s,e){this.m_v[t*this.m_cc+s]=e}inc(t,s){return++this.m_v[t*this.m_cc+s]}}const Lt=new ArrayBuffer(8),Ft=new Float64Array(Lt),Ot=new BigUint64Array(Lt),Qt=0x0fffffffffffffn;function Ut(){return Number.EPSILON*xs}function Vt(t){return Ft[0]=t,Ot[0]}function jt(t){return Vt(t)&Qt}function Yt(t){return Number((9218868437227405312n&Vt(t))>>52n)}function $t(t){if(0n===t)return-1n;if(1n===t||-1n===t)return 0n;t<0n&&(t=-t);let s=0n,e=512n,i=1n<<s+e;for(;t>=i;)s+=e,e<<=1n,i<<=e;let n=s;e>>=1n;let r=n+e;for(;e>0n;)t<1n<<r||(n=r),e>>=1n,r=n+e;return n}function Ht(t,s){return t===s||Number.isNaN(t)&&Number.isNaN(s)}function Jt(t,s,e){return t===s||Math.abs(t-s)<=e||Number.isNaN(t)&&Number.isNaN(s)}function Kt(t,s){return t<s?-1:t>s?1:0}function Wt(t,s){if(t<s)return-1;if(t>s)return 1;if(t===s)return 0;{const e=Number.isNaN(t),i=Number.isNaN(s);return e<i?-1:e>i?1:0}}function Xt(){return 2147483647}function ts(){return 32767}function ss(){return 2147483647}function es(){return-2147483648}const is=2147483647,ns=BigInt(is),rs=2166136261,us=16777619,hs=14695981039346656037n,os=1099511628211n;function as(t){let s=rs;for(let e=0,i=t.length;e<i;++e)s=(s^t.charCodeAt(e))*us;return s&is}function ms(t,s){return s+2654435769+(t<<6)+(t>>2)&is}function ls(t,s){return ms(t,_s(s))}function cs(t){return ms(3735928559,t)}function fs(t,s){return ms(t,cs(s))}function vs(t){return function(t){let s=rs,e=t;return s=(s^255&e)*us,e>>=8,s=(s^255&e)*us,e>>=8,s=(s^255&e)*us,e>>=8,s=(s^255&e)*us,s&is}(t)}function _s(t){return Number(function(t){let s=hs,e=t;return s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,e>>=8n,s=(s^0xffn&e)*os,s&ns}(t))}function bs(t){return _s(Vt(function(t){return Cs(t)}(t)))}function ds(t){return function(t){return 1103515245*t+12345&2147483647}(t)}const ps=100,xs=100;function Ns(){return Number.EPSILON*ps}function ys(){return.38196601125010515}function gs(){return 1.4142135623730951}function Ts(){return Number.EPSILON}function Es(t,s,e){return t===s||t===e}function Ms(t,s,e){return t>=s?t<=e?t:e:s}function ws(t,s,e){const i=t[0];if(i>=s){if(i<=e)return!1;t[0]=e}else t[0]=s;return!0}function Is(t,s){return t>=s?s:t<-s?-s:t}function Ds(){return Rt}function Ps(){return kt}function As(){return Gt}const qs=3*As();function zs(){return qs}function Cs(t){return t+0}function Zs(t){return{v:t}}class Bs{constructor(){this.m_rn=Zs(0n),this.m_rd=Zs(1n),this.m_bNaN=!1,this.m_bNormalized=!1,this.m_power=0,this.m_sign=0}static constructAssign(t,s){const e=t.clone();return void 0!==s&&e.limitPrecisionThis(s),e}static constructDouble(t){return(new Bs).setDouble(t)}static constructInt64(t){return(new Bs).setInt64(t)}static constructRational(t,s){return(new Bs).setRational(t,s)}static constructInt32(t){return this.constructInt64(BigInt(Math.trunc(t)))}[Symbol.toPrimitive](t){return this}compare(t){return this.lt(t)?-1:this.gt(t)?1:0}assignCopy(t){return this.setThis(t)}abs(){return this.clone().absThis()}absThis(){return this.isNAN()||(this.m_sign*=this.m_sign),this}clone(){return(new Bs).setThis(this)}setThis(t){return this.m_bNaN=t.m_bNaN,this.m_bNormalized=t.m_bNormalized,this.m_rn.v=t.m_rn.v,this.m_rd.v=t.m_rd.v,this.m_power=t.m_power,this.m_sign=t.m_sign,this}setZero(){return this.m_rn.v=0n,this.m_rd.v=1n,this.m_bNaN=!1,this.m_power=0,this.m_bNormalized=!0,this.m_sign=0,this}setDouble(t){if(this.setZero(),0===t)return this;if(Number.isInteger(t)&&Math.abs(t)<2147483647)return this.setInt32(t);const s=Vt(t),e=(s&Bs.s_em)>>52n,n=!!(s&Bs.s_sm),r=s&Bs.s_fm;if(e===Bs.s_emax)return r?(this.m_rn.v=this.m_rd.v=0n,this.m_bNaN=!0,this):(this.m_rn.v=n?-1n:1n,this.m_rd.v=0n,this);0n===e&&(0,i.t)("denormalized numbers not yet implemented");const u=e-1023n,h=u>=0n?u:0n,o=u<0n?-u:0n;return this.m_rn.v=(1n<<52n|r)<<h,this.m_rd.v=1n<<52n+o,this.m_sign=n?-1:1,this.m_bNormalized=!1,this.normalizeThis()}setInt64(t){return 0n===t?this.setZero():(this.m_bNaN=!1,this.m_sign=t>0n?1:-1,this.m_rn.v=t>0n?t:-t,this.m_rd.v=1n,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setRational(t,s){return 0n===t?0n===s?this.setNAN():this.setZero():0n===s?t>0n?this.setPositiveInf():this.setNegativeInf():(this.m_sign=(t>0n?1:-1)*(s>0n?1:-1),this.m_rn.v=t>0n?t:-t,this.m_rd.v=s>0n?s:-s,this.m_power=0,this.m_bNormalized=!1,this.normalizeThis())}setInt32(t){return this.setInt64(BigInt(Math.trunc(t)))}getDouble(){return this.convertToDouble()}toDouble(){return this.convertToDouble()}value(){return this.convertToDouble()}isNAN(){return this.m_bNaN}isPositiveInf(){return!this.isNAN()&&0n===this.m_rd.v&&1===this.m_sign}isNegativeInf(){return!this.isNAN()&&0n===this.m_rd.v&&-1===this.m_sign}isFinite(){return!this.isNAN()&&0n!==this.m_rd.v}setNAN(){return this.m_bNaN=!0,this.m_rn.v=0n,this.m_rd.v=0n,this.m_power=0,this.m_bNormalized=!0,this}setPositiveInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=1,this.m_power=0,this}setNegativeInf(){return this.m_rn.v=1n,this.m_rd.v=0n,this.m_bNaN=!1,this.m_bNormalized=!0,this.m_sign=-1,this.m_power=0,this}subThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())this.setNAN();else{if(this.isPositiveInf()&&t.isNegativeInf())return this.setPositiveInf(),this;if(this.isNegativeInf()&&t.isNegativeInf())this.setNAN();else if(this.isNegativeInf()&&t.isPositiveInf())return this.setNegativeInf(),this}return this.isNAN()?this:this.opPlusMinus(t,!1)}thisSubAbs(t){return(0,i.g)(0),this}mulThis(t){return t.isNAN()&&this.setNAN(),this.isNAN()?this:(this.m_sign*=t.m_sign,0===this.m_sign?this.setZero():(this.m_rn.v*=t.m_rn.v,this.m_rd.v*=t.m_rd.v,this.m_power+=t.m_power,this.m_bNormalized=!1,this.normalizeThis(),this))}mulDoubleThis(t){return this.mulThis(Bs.constructDouble(t))}thisMulInt64(t){return(0,i.g)(0),this}thisMulInt32(t){return(0,i.g)(0),this}divThis(t){return this.mulThis(t.clone().invertThis())}divDoubleThis(t){return this.divThis(Bs.constructDouble(t))}addDoubleThis(t){return this.addThis(Bs.constructDouble(t))}subDoubleThis(t){return this.subThis(Bs.constructDouble(t))}mul(t){return this.clone().mulThis(t)}mulBigIntThis(t){return this.mulThis(Bs.constructInt64(t))}mulDouble(t){return this.clone().mulThis(Bs.constructDouble(t))}div(t){return this.clone().divThis(t)}divDouble(t){return this.clone().divDoubleThis(t)}add(t){return this.clone().addThis(t)}fmSubThis(t,s){return this.subThis(t.clone().mulThis(s))}fmAddThis(t,s){return this.addThis(t.clone().mulThis(s))}addThis(t){if(t.isNAN()&&this.setNAN(),this.isPositiveInf()&&t.isPositiveInf())return this.setPositiveInf(),this;if(this.isPositiveInf()&&t.isNegativeInf())this.setNAN();else{if(this.isNegativeInf()&&t.isNegativeInf())return this.setNegativeInf(),this;this.isNegativeInf()&&t.isPositiveInf()&&this.setNAN()}return this.isNAN()?this:this.opPlusMinus(t,!0)}addDouble(t){return this.clone().addThis(Bs.constructDouble(t))}sub(t){return this.clone().subThis(t)}subDouble(t){return this.clone().subThis(Bs.constructDouble(t))}isZero(){return 0===this.m_sign}equals(t){return this.clone().subThis(t).isZero()}lt(t){return!this.isNAN()&&!t.isNAN()&&!(this.isPositiveInf()&&t.isPositiveInf()||this.isNegativeInf()&&t.isNegativeInf())&&!this.isPositiveInf()&&(!!t.isPositiveInf()||this.clone().sub(t).LZ())}absLessAbs(t){return this.abs().lt(t.abs())}gt(t){return this.clone().sub(t).GZ()}lte(t){return this.sub(t).LEZ()}gte(t){return this.sub(t).GEZ()}normalizeThis(){if(this.m_bNormalized)return this;if(0n===this.m_rn.v)return this.setZero();let t=0,s=0xffffffffn;for(;0n===(this.m_rn.v&s)&&s<=this.m_rn.v;)s<<=32n,t+=32;s&=this.m_rn.v,s>>=BigInt(t),t+=h(BigInt.asUintN(32,s))-1;let e=0;for(s=0xffffffffn;0n===(this.m_rd.v&s)&&s<=this.m_rd.v;)s<<=32n,e+=32;return s&=this.m_rd.v,s>>=BigInt(e),e+=h(BigInt.asUintN(32,s))-1,this.m_rn.v>>=BigInt(t),this.m_rd.v>>=BigInt(e),this.m_power+=t-e,this.m_rn.v>1n&&this.m_rd.v>1n&&(this.m_rn.v%this.m_rd.v===0n?(this.m_rn.v/=this.m_rd.v,this.m_rd.v=1n):this.m_rd.v%this.m_rn.v===0n&&(this.m_rd.v/=this.m_rn.v,this.m_rn.v=1n)),this.m_bNormalized=!0,this}negateThis(){return this.isNAN()||(this.m_sign*=-1),this}negate(){return this.clone().negateThis()}invertThis(){return this.isNAN()?this:this.isPositiveInf()||this.isNegativeInf()?(this.setZero(),this):0n===this.m_rn.v?(this.setPositiveInf(),this):(this.m_rd=bt(this.m_rn,this.m_rn=this.m_rd),this.m_power=-this.m_power,this)}limitPrecisionThis(t){if(0===t)return this;if(this.isZero())return this.setZero();if(!this.isFinite())return this;this.normalizeThis();let s=Number($t(this.m_rn.v));if(s>t){const e=s-t;this.m_rn.v>>=BigInt(s-t),this.m_power+=e}if(s=Number($t(this.m_rd.v)),s>t){const e=s-t;this.m_rd.v>>=BigInt(s-t),this.m_power-=e}return this}hiBitIndex(){return Math.max(Number($t(this.m_rn.v)),Number($t(this.m_rd.v)))}ldexp(t){return this.clone().ldexpThis(t)}ldexpThis(t){return t&&(this.m_bNormalized=!1,this.m_power+=t,this.normalizeThis()),this}static lerp(t,s,e){return Bs.lerpLo(s,s,e)}static lerpLo(t,s,e){return s.sub(t).mulThis(e).addThis(t)}static lerpHi(t,s,e){return s.sub(t).mulThis(Rs.sub(e)).addThis(t)}LZ(){return!this.isNAN()&&-1===this.m_sign}GZ(){return!this.isNAN()&&1===this.m_sign}LEZ(){return!this.isNAN()&&this.m_sign<=0}GEZ(){return!this.isNAN()&&this.m_sign>=0}toString(){return this.toDouble().toString()}sqr(){return this.clone().sqrThis()}sqrThis(){return this.mulThis(this.clone())}static sqrt(t,s){if(t.m_sign<0n&&(0,i.q)("MP_value: sqrt(-1)"),t.isZero())return t.clone();let e=52,n=2220446049250313e-31;for(;e<s;)2*e<=s?(n*=n,e*=2):(n*=2220446049250313e-31,e+=52);e+=52;const r=$t(t.m_rn.v),u=$t(t.m_rd.v);let h,o=t.m_power+Number(r-u);const a=new Bs;Math.abs(o)>200?(1&Math.abs(o)&&(o+=1),h=Bs.constructAssign(t,53).ldexpThis(-o).value(),a.setThis(t).ldexpThis(-o),(0,i.g)(Number.isFinite(h))):(a.setThis(t),h=a.value(),(0,i.g)(Number.isFinite(h)),o=0),h=Math.sqrt(h);const m=Bs.constructDouble(h),l=Bs.constructDouble(n);l.mulThis(m).ldexpThis(1);const c=n*h*2,f=m.clone(),v=new Bs;let _;for(let t=0;t<10;++t){f.mulThis(m),v.setThis(a).subThis(f).absThis();let t=v.value();if(_=1,t<.9)for(;t>c;)t*=t,++_;else _=4;if(v.lte(l))break;for(let t=0;t<_;t++)f.setThis(m).divThis(a).invertThis().addThis(m).ldexpThis(-1).limitPrecisionThis(e),m.setThis(f)}return m.ldexpThis(o/2)}static cubicRoot(t,s){if(t.isZero())return t.clone();let e=52,i=2220446049250313e-31;for(;e<s;)2*e<=s?(i*=i,e*=2):(i*=2220446049250313e-31,e+=52);e+=52;const n=Math.pow(Math.abs(t.value()),1/3),r=Bs.constructDouble(n),u=r.clone();u.sqrThis().mulDoubleThis(3).mulDoubleThis(i),u.limitPrecisionThis(32),t.LZ()&&r.negateThis();for(let s=0;s<10;++s){const s=r.clone();s.sqrThis().mulThis(r);const i=s.clone();if(i.subThis(t),i.absThis().limitPrecisionThis(32),i.lte(u))break;i.setThis(t),i.ldexpThis(1),i.addThis(s);const n=s.clone();n.ldexpThis(1),n.addThis(t),i.divThis(n),r.mulThis(i),r.limitPrecisionThis(e)}return r}isInTheRangeOfDouble(){return(0,i.g)(0),!1}sign(){return this.m_sign}cosAndSin(t,s){(0,i.g)(0)}pow(t){return mt(this,t)}static nan(){return(0,i.g)(0),new Bs}convertToDouble(){if(this.m_bNaN)return Number.NaN;if(this.isZero())return 0;if(0n===this.m_rd.v)return 1===this.m_sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;const t=-1===this.m_sign,s=this.m_rn.v<<(this.m_power>=0?BigInt(this.m_power):0n);let e=this.m_rd.v<<(this.m_power<0?BigInt(-this.m_power):0n);const i=s/e;let n=Number(i);if(BigInt(n)!==i)return t?-n:n;let r=s-i*e;if(r){let t=$t(e)-1023n;t>0n&&(e>>=t,r<<=52n,r>>=t);let s=Number(r);Number.isFinite(s)||(r>>=52n,s=Number(r),t=0n),t>0n&&(s/=Math.pow(2,52)),n+=s/Number(e)}return t?-n:n}signVal(){return 1===this.m_sign?1n:-1===this.m_sign?-1n:0n}opPlusMinus(t,s){const e=Math.min(this.m_power,t.m_power);let i,n;this.m_power>e?(i=BigInt(this.m_power-e),n=0n):(i=0n,n=BigInt(t.m_power-e));const r=this.signVal()*this.m_rn.v*t.m_rd.v<<i,u=t.signVal()*t.m_rn.v*this.m_rd.v<<n;return this.m_rn.v=s?r+u:r-u,this.m_rd.v*=t.m_rd.v,this.m_power=e,this.m_sign=1,this.m_rn.v<0n&&(this.m_sign=-1,this.m_rn.v=-this.m_rn.v),this.m_bNormalized=!1,this.normalizeThis(),this}}Bs.s_sm=0x8000000000000000n,Bs.s_em=0x7ff0000000000000n,Bs.s_fm=0x000fffffffffffffn,Bs.s_emax=0x7ffn;const Rs=Bs.constructInt32(1),ks=Bs.constructInt32(0),Gs=Bs.constructDouble(.5);function Ss(t,s){let e=Yt(t);const i=Yt(s);return e===i?(e-=53-function(t,s){return function(t){let s=0;return 0xffffffff00000000n&t&&(s=32,t>>=32n),s+function(t){let s=0;return 4294901760n&t&&(s+=16,t>>=16n),65280n&t&&(s+=8,t>>=8n),240n&t&&(s+=4,t>>=4n),s+u[Number(BigInt.asUintN(4,t))]+1}(t)}(t^s)}(jt(t),jt(s)),e):e>i?e:i}function Ls(t,s){for(let e=0,i=0,n=t.length;e<n;e+=2,i++)s[i].x=t[e],s[i].y=t[e+1]}function Fs(t){const s=new Float64Array(2*t.length);for(let e=0,i=t.length;e<i;++e){const i=e<<1;s[i]=t[e].x,s[i+1]=t[e].y}return s}function Os(t){const s=It(Qs,t.length);for(let e=0,i=t.length;e<i;++e)s[e].setCoords(t[e][0],t[e][1]);return s}class Qs{static construct(t,s){return new Qs(t,s)}constructor(t,s){void 0!==t?(this.x=t,this.y=s):this.x=this.y=Number.NaN}clone(){return new Qs(this.x,this.y)}assign(t){this.setCoordsPoint2D(t)}setCoords(t,s){return this.x=t,this.y=s,this}setCoordsPoint2D(t){this.x=t.x,this.y=t.y}isEqualPoint2D(t,s){return void 0!==s?Math.abs(this.x-t.x)<=s&&Math.abs(this.y-t.y)<=s:this.x===t.x&&this.y===t.y}isEqual(t,s,e){return void 0!==e?Math.abs(this.x-t)<=e&&Math.abs(this.y-s)<=e:this.x===t&&this.y===s}equalsPoint2D(t,s){return this.isEqualPoint2D(t,s)}setSub(t,s){this.x=t.x-s.x,this.y=t.y-s.y}addThis(t){return this.x+=t.x,this.y+=t.y,this}setAdd(t,s){return this.x=t.x+s.x,this.y=t.y+s.y,this}absoluteOther(t){}absolute(){return(0,i.g)(0),this}setNegate(){this.x=-this.x,this.y=-this.y}setNegateOther(t){this.x=-t.x,this.y=-t.y}interpolateThis(t,s){}interpolate(t,s,e){(0,i.g)(0)}scaleAddThis(t,s){this.x=this.x*t+s.x,this.y=this.y*t+s.y}setScaleAdd(t,s,e){this.x=s.x*t+e.x,this.y=s.y*t+e.y}scaleOther(t,s){(0,i.g)(0)}scale(t){this.x*=t,this.y*=t}compare(t){return this.y<t.y?-1:this.y>t.y?1:this.x<t.x?-1:this.x>t.x?1:0}compareX(t){return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0}normalizeOther(t){(0,i.g)(0)}normalize(){const t=this.length();return t?(this.x/=t,this.y/=t):(this.x=1,this.y=0),this}getUnitVector(){return this.clone().normalize()}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}sqrLength(){return this.x*this.x+this.y*this.y}static averageFast(t,s){return(0,i.g)(0),{}}static average(t,s){const e=new Qs;if(0===s)return e.setNAN(),e;if(1===s)return e.assign(t[0]),e;const i=new n(t[0].x),r=new n(t[0].y);for(let e=1;e<s;e++)i.add(t[e].x),r.add(t[e].y),255&e||(i.normalize(),r.normalize());return e.x=i.getResult()/s,e.y=r.getResult()/s,e}static calculateLength(t,s){const e=new n(0);for(let i=1;i<s;i++)e.add(Qs.distance(t[i],t[i-1]));return e.getResult()}offset(t,s){const e=Qs.distance(t,s),i=Qs.construct(this.x,this.y);if(0===e)return Qs.distance(i,t);const n=s.clone();return n.subThis(t),i.subThis(t),i.crossProduct(n)/e}side(t,s){return t.equals(s)?this.equals(t)?0:1:Qs.orientationRobust(s,t,this)}static sqrDistance(t,s){const e=t.x-s.x,i=t.y-s.y;return e*e+i*i}static sqrDistanceCoords(t,s,e,i){const n=e-t,r=i-s;return n*n+r*r}static distance(t,s){return Math.sqrt(Qs.sqrDistance(t,s))}dotProduct(t){return this.x*t.x+this.y*t.y}dotProductAbs(t){return Math.abs(this.x*t.x)+Math.abs(this.y*t.y)}crossProduct(t){return this.x*t.y-this.y*t.x}crossProductAbs(t){return(0,i.g)(0),0}rotateDirect(t,s){const e=this.x*t-this.y*s,i=this.x*s+this.y*t;this.x=e,this.y=i}rotateReverse(t,s){const e=this.x*t+this.y*s,i=-this.x*s+this.y*t;this.x=e,this.y=i}leftPerpendicularThis(){const t=this.x;this.x=-this.y,this.y=t}leftPerpendicularOther(t){const s=t.x;this.x=-t.y,this.y=s}rightPerpendicularThis(){const t=this.x;this.x=this.y,this.y=-t}rightPerpendicularOther(t){const s=t.x;this.x=t.y,this.y=-s}equals(t){return this.x===t.x&&this.y===t.y}notequals(t){return this.x!==t.x||this.y!==t.y}not(){return!this.x&&!this.y}gt(t){return this.y>t.y||this.y===t.y&&this.x>t.x}gte(t){return!this.lt(t)}lt(t){return this.y<t.y||this.y===t.y&&this.x<t.x}lte(t){return!this.gt(t)}subThis(t){return this.x-=t.x,this.y-=t.y,this}divThis(t){return this.x/=t,this.y/=t,this}add(t){return new Qs(this.x+t.x,this.y+t.y)}sub(t){return new Qs(this.x-t.x,this.y-t.y)}negateThis(){return this.x=-this.x,this.y=-this.y,this}negate(){return new Qs(-this.x,-this.y)}mul(t){return new Qs(this.x*t,this.y*t)}mulThis(t){return this.x*=t,this.y*=t,this}divide(t){return new Qs(this.x/t,this.y/t)}setNAN(){this.x=this.y=Number.NaN}isNAN(){return Number.isNaN(this.x)||Number.isNaN(this.y)}static getNAN(){return new Qs(Number.NaN,Number.NaN)}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)}isZero(){return 0===this.x&&0===this.y}norm(t){switch(t){case 0:{const t=Math.abs(this.x),s=Math.abs(this.y),e=t-s;return e>=0?t:e<=0?s:Number.NaN}case 1:return Math.abs(this.x)+Math.abs(this.y);case 2:return Math.sqrt(this.x*this.x+this.y*this.y);default:(0,i.a)("norm")}}getQuarter(){return Qs.getQuarterCoords(this.x,this.y)}static getQuarterCoords(t,s){return t>0?s>=0?1:4:s>0?2:0===t?4:3}static compareVectors(t,s){const e=t.getQuarter(),i=s.getQuarter();return i===e?Qs.orientationRobustImpl(Qs.construct(0,0),s,t,!0):e<i?-1:1}static compareVectorsOrigin(t,s,e){const i=s.sub(t),n=e.sub(t),r=i.getQuarter(),u=n.getQuarter();return u===r?Qs.orientationRobustImpl(t,e,s,!0):r<u?-1:1}static orientationRobust(t,s,e){return Qs.orientationRobustImpl(t,s,e,!1)}static orientationRobustEx(t,s,e,i){if(t.equals(s)||e.equals(i))return 0;const n=s.x-t.x,r=s.y-t.y,u=i.x-e.x,h=i.y-e.y;{const t=Qs.getQuarterCoords(n,r)-1,s=Qs.getQuarterCoords(u,h)-1,e=Qs.d[t][s];if(0!==e)return e}const o=n*h,a=r*u,m=4*Ts()*(Math.abs(o)+Math.abs(a)),l=o-a;return Math.abs(l)>=m?l<0?-1:l>0?1:0:Qs.orientationRobustExMp(t,s,e,i)}static orientationRobustExMp(t,s,e,i){const n=Bs.constructDouble(s.x),r=Bs.constructDouble(i.x);n.subThis(Bs.constructDouble(t.x)),r.subThis(Bs.constructDouble(e.x));const u=Bs.constructDouble(s.y),h=Bs.constructDouble(i.y);return u.subThis(Bs.constructDouble(t.y)),h.subThis(Bs.constructDouble(e.y)),n.mulThis(h),u.mulThis(r),n.subThis(u),n.LZ()?-1:n.GZ()?1:0}static orientationNonRobust(t,s,e){const i=s.sub(t).crossProduct(e.sub(t));return i<0?-1:i>0?1:0}static orientationRobustImpl(t,s,e,i){if(s.isEqualPoint2D(t)||e.isEqualPoint2D(t)||s.isEqualPoint2D(e))return 0;const n=s.x-t.x,r=s.y-t.y,u=e.x-t.x,h=e.y-t.y;if(!i){const t=Qs.getQuarterCoords(n,r)-1,s=Qs.getQuarterCoords(u,h)-1,e=Qs.d[t][s];if(0!==e)return e}const o=(Math.abs(n)+Math.abs(r)+Math.abs(u)+Math.abs(h))*(Math.abs(s.x)+Math.abs(s.y)+Math.abs(e.x)+Math.abs(e.y))*8*_(),a=n*h-r*u;if(Math.abs(a)>o)return a<0?-1:1;if(v(s.x,t.x)&&v(e.y,t.y)&&v(s.y,t.y)&&v(e.x,t.x)&&c(n,h)&&c(r,u)){const t=n*h,s=r*u;if(v(t,s)){const e=t-s;return e<0?-1:e>0?1:0}}return Qs.orientationRobustMp(t,s,e)}static orientationRobustMp(t,s,e){const i=Bs.constructDouble(s.x),n=Bs.constructDouble(e.x);{const s=Bs.constructDouble(t.x);i.subThis(s),n.subThis(s)}const r=Bs.constructDouble(e.y),u=Bs.constructDouble(s.y);{const s=Bs.constructDouble(t.y);r.subThis(s),u.subThis(s)}return i.mulThis(r),u.mulThis(n),i.subThis(u),i.LZ()?-1:i.GZ()?1:0}static inCircleRobust(t,s,e,i){const n=new l,r=new l;n.set(t.x),n.subThis(i.x),r.set(t.y),r.subThis(i.y);const u=new l,h=new l;u.set(s.x),u.subThis(i.x),h.set(s.y),h.subThis(i.y);const o=new l,a=new l;o.set(e.x),o.subThis(i.x),a.set(e.y),a.subThis(i.y);const m=n.mulE(h).subE(r.mulE(u)),c=u.mulE(a).subE(h.mulE(o)),f=n.mulE(a).subE(r.mulE(o)),v=n.mulE(n).addE(r.mulE(r)),_=u.mulE(u).addE(h.mulE(h)),b=o.mulE(o).addE(a.mulE(a)),d=v.mulE(c).subE(_.mulE(f)).addE(b.mulE(m));if(!d.isFuzzyZero()){const t=d.value();return t<0?-1:t>0?1:0}return Qs.inCircleRobustMp(t,s,e,i)}static inCircleRobustMp(t,s,e,i){do{if(!v(t.x,i.x)||!v(t.y,i.y))break;if(!v(s.x,i.x)||!v(s.y,i.y))break;if(!v(e.x,i.x)||!v(e.y,i.y))break;const n=t.x-i.x,r=t.y-i.y,u=s.x-i.x,h=s.y-i.y,o=e.x-i.x,a=e.y-i.y;if(!c(n,h)||!c(r,u))break;if(!c(u,a)||!c(h,o))break;if(!c(n,a)||!c(r,o))break;if(!c(n,n)||!c(r,r))break;if(!c(u,u)||!c(h,h))break;if(!c(o,o)||!c(a,a))break;const m=n*h,l=r*u,_=u*a,b=h*o,d=n*a,p=r*o,x=n*n,N=r*r,y=u*u,g=h*h,T=o*o,E=a*a;if(!v(m,l))break;if(!v(_,b))break;if(!v(d,p))break;if(!f(x,N))break;if(!f(y,g))break;if(!f(T,E))break;const M=m-l,w=_-b,I=d-p,D=x+N,P=y+g,A=T+E;if(!c(D,w))break;if(!c(P,I))break;if(!c(A,M))break;const q=D*w,z=P*I,C=A*M;if(!v(q,z))break;const Z=q-z;if(!f(Z,C))break;const B=Z+C;return B<0?-1:B>0?1:0}while(0);const n=Bs.constructDouble(i.x),r=Bs.constructDouble(i.y),u=Bs.constructDouble(t.x),h=Bs.constructDouble(t.y);u.subThis(n),h.subThis(r);const o=Bs.constructDouble(s.x),a=Bs.constructDouble(s.y);o.subThis(n),a.subThis(r);const m=Bs.constructDouble(e.x),l=Bs.constructDouble(e.y);m.subThis(n),l.subThis(r);const _=u.mul(a).sub(h.mul(o)),b=o.mul(l).sub(a.mul(m)),d=u.mul(l).sub(h.mul(m)),p=u.mul(u).add(h.mul(h)),x=o.mul(o).add(a.mul(a)),N=m.mul(m).add(l.mul(l)),y=p.mul(b).sub(x.mul(d)).add(N.mul(_));return y.LZ()?-1:y.GZ()?1:0}static inCircleRobustMp3Point(t,s,e){const i=Bs.constructDouble(t.x),n=Bs.constructDouble(t.y),r=Bs.constructDouble(s.x),u=Bs.constructDouble(s.y),h=Bs.constructDouble(e.x),o=Bs.constructDouble(e.y),a=h.mul(h).add(o.mul(o)).sub(h.mul(i).add(o.mul(n)).add(h.mul(r)).add(o.mul(u))).add(i.mul(r).add(n.mul(u)));return a.LZ()?-1:a.GZ()?1:0}static inCircleRobust3Point(t,s,e){const i=new l(t.x),n=new l(t.y),r=new l(s.x),u=new l(s.y),h=new l(e.x),o=new l(e.y),a=h.mulE(h).addE(o.mulE(o)).subE(h.mulE(i).addE(o.mulE(n)).addE(h.mulE(r)).addE(o.mulE(u))).addE(i.mulE(r).addE(n.mulE(u)));if(!a.isFuzzyZero()){const t=a.value();return t<0?-1:t>0?1:0}return Qs.inCircleRobustMp3Point(t,s,e)}static calculateCircleCenterFromThreePoints(t,s,e){if(t.equals(e)||t.equals(s)||e.equals(s))return Qs.getNAN();const i=function(t,s,e){const i=new l(s.x);i.subThis(t.x);const n=new l(s.y);n.subThis(t.y);const r=new l(e.x);r.subThis(t.x);const u=new l(e.y);u.subThis(t.y);const h=i.clone();h.mulThisE(u);let o=n.clone();if(o.mulThisE(r),h.subThisE(o),0===h.value())return Qs.getNAN();h.mulThis(2);const a=i.clone();a.mulThisE(i);const m=n.clone();m.mulThisE(n);const c=a.clone();c.addThisE(m);const f=r.clone();f.mulThisE(r);const v=u.clone();v.mulThisE(u);const _=f.clone();_.addThisE(v);const b=n.clone();b.mulThisE(_),o=u.clone(),o.mulThisE(c),b.subThisE(o),b.divThisE(h);const d=i.clone();d.mulThisE(_),o=r.clone(),o.mulThisE(c),d.subThisE(o),d.divThisE(h);const p=Qs.construct(t.x-b.value(),t.y+d.value()),x=t.sub(p).length(),N=s.sub(p).length(),y=e.sub(p).length(),g=1e-15*(x+Math.abs(t.x)+Math.abs(s.x)+Math.abs(e.x)+Math.abs(t.y)+Math.abs(s.y)+Math.abs(e.y));return Math.abs(x-N)<=g&&Math.abs(x-y)<=g&&b.eps()<g&&d.eps()<g?p:Qs.getNAN()}(t,s,e);return i.isNAN()?function(t,s,e){const i=Bs.constructDouble(s.x);i.subDoubleThis(t.x);const n=Bs.constructDouble(s.y);n.subDoubleThis(t.y);const r=Bs.constructDouble(e.x);r.subDoubleThis(t.x);const u=Bs.constructDouble(e.y);u.subDoubleThis(t.y);const h=i.clone();h.mulThis(u);let o=n.clone();if(o.mulThis(r),h.subThis(o),h.isZero())return Qs.getNAN();h.mulDoubleThis(2);const a=i.clone();a.mulThis(i);const m=n.clone();m.mulThis(n);const l=a.clone();l.addThis(m);const c=r.clone();c.mulThis(r);const f=u.clone();f.mulThis(u);const v=c.clone();v.addThis(f);const _=n.clone();_.mulThis(v),o=u.clone(),o.mulThis(l),_.subThis(o),_.divThis(h);const b=i.clone();return b.mulThis(v),o=r.clone(),o.mulThis(l),b.subThis(o),b.divThis(h),Qs.construct(t.x-_.value(),t.y+b.value())}(t,s,e):i}static calculateAngle(t,s){return Math.atan2(t.crossProduct(s),t.dotProduct(s))}static isBisectorRobust(t,s,e){return(0,i.g)(0),!1}static size(){return 2}get 0(){return this.x}get 1(){return this.y}set 0(t){this.x=t}set 1(t){this.y=t}static compareZorder(t,s){const e=Qs.c_compare_zorder_xx[t.x<0?1:0]|Qs.c_compare_zorder_yy[t.y<0?1:0],i=Qs.c_compare_zorder_xx[s.x<0?1:0]|Qs.c_compare_zorder_yy[s.y<0?1:0];if(e===i){let e=0,i=0;for(let n=0;n<2;++n){const r=Ss(t[n],s[n]);r>e&&(e=r,i=n)}return t[i]<s[i]}return e<i}static lerp(t,s,e){const i=new Qs;return R(t,s,e,i),i}static getClosestCoordinate(t,s,e,i=!1){const n=Qs.getNAN();n.setSub(s,t);const r=n.sqrLength();if(0===r)return.5;if(s.isEqualPoint2D(e))return 1;const u=Qs.getNAN();u.setSub(e,t);let h=u.dotProduct(n)/r;return i||(h<0?h=0:h>1&&(h=1)),h}static intersectLinesAtOnePoint(t,s,e,i){if(t.equals(s)||e.equals(i))return Qs.getNAN();const n=s.x-t.x,r=e.x-i.x,u=s.y-t.y,h=e.y-i.y,o=n*h-r*u;if(!o)return Qs.getNAN();const a=o;if(0===a)return Qs.getNAN();let m=(e.x-t.x)*h-(e.y-t.y)*r;m/=a;const l=new Qs;return R(t,s,m,l),l.isFinite()?l:Qs.getNAN()}toString(){return`[${this.x},${this.y}]`}}Qs.dimensions=2,Qs.d=[[0,1,0,-1],[-1,0,1,0],[0,-1,0,1],[1,0,-1,0]],Qs.c_compare_zorder_xx=[2,0],Qs.c_compare_zorder_yy=[1,0]}}]);