@arcgis/core 4.27.0-next.20230419 → 4.27.0-next.20230421

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 (203) hide show
  1. package/WebMap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/arcadeAsyncRuntime.js +1 -1
  4. package/arcade/arcadeCompiler.js +1 -1
  5. package/arcade/arcadeRuntime.js +1 -1
  6. package/arcade/executionError.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0d805fd9cd9ff3a636ca.js +1 -0
  10. package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
  13. package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1db5e4c8244dbc21590c.js +1 -0
  16. package/assets/esri/core/workers/chunks/2a1a5a1969e80a10dcca.js +1 -0
  17. package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
  18. package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
  19. package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f7aa972cb3903847b3bf.js → 47bf38d910e71ac39bb8.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
  23. package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
  24. package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
  25. package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
  26. package/assets/esri/core/workers/chunks/588256e65685ff21d2e9.js +1 -0
  27. package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
  29. package/assets/esri/core/workers/chunks/6adb58f1bffc5d1c03bd.js +1 -0
  30. package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
  32. package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
  33. package/assets/esri/core/workers/chunks/812cba53143565a825f1.js +1 -0
  34. package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
  35. package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
  36. package/assets/esri/core/workers/chunks/88f9dededcf60fd011ef.js +1 -0
  37. package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
  38. package/assets/esri/core/workers/chunks/8ae7fea9f7fda38dd207.js +1 -0
  39. package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
  41. package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
  43. package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
  45. package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
  46. package/assets/esri/core/workers/chunks/b833b4ea2973bb16792e.js +1 -0
  47. package/assets/esri/core/workers/chunks/be4aa835a7abfc809126.js +1 -0
  48. package/assets/esri/core/workers/chunks/c2ec6e904f96173a7b83.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
  51. package/assets/esri/core/workers/chunks/{7f3b0856f594df2b044e.js → c727d38f71e52bee17e1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
  53. package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
  54. package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
  55. package/assets/esri/core/workers/chunks/{edb4568fe281b5609092.js → d244e50c981146f018d2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
  61. package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
  63. package/assets/esri/core/workers/chunks/f1a4165c2710ca90e5ea.js +1 -0
  64. package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
  65. package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
  66. package/chunks/WaterSurface.glsl.js +35 -20
  67. package/chunks/index.js +1 -1
  68. package/core/Loadable.js +1 -1
  69. package/core/Promise.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/watch.js +1 -1
  72. package/core/accessorSupport/write.js +1 -1
  73. package/core/promiseUtils.js +1 -1
  74. package/core/watchUtils.js +1 -1
  75. package/core/workers/Connection.js +1 -1
  76. package/core/workers/RemoteClient.js +1 -1
  77. package/core/workers/workerFactory.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/geometry/support/meshUtils/External.js +1 -1
  80. package/geometry/support/meshUtils/Metadata.js +1 -1
  81. package/intl/messages.js +1 -1
  82. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  83. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  84. package/layers/graphics/data/attributeSupport.js +1 -1
  85. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  86. package/layers/mixins/ArcGISMapService.js +1 -1
  87. package/layers/support/PromiseQueue.js +1 -1
  88. package/layers/support/Sublayer.js +1 -1
  89. package/layers/support/TileKey.js +1 -1
  90. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  91. package/networks/Network.js +1 -1
  92. package/package.json +1 -1
  93. package/portal/schemas/definitions.js +1 -1
  94. package/renderers/support/RasterSymbolizer.js +1 -1
  95. package/renderers/support/rasterRendererChecks.js +5 -0
  96. package/renderers/support/rasterRendererHelper.js +1 -1
  97. package/request.js +1 -1
  98. package/rest/query/operations/query.js +1 -1
  99. package/smartMapping/raster/renderers/uniqueValue.js +1 -1
  100. package/support/featureFlags.js +1 -1
  101. package/support/revision.js +1 -1
  102. package/symbols/support/previewSymbol3D.js +1 -1
  103. package/symbols/support/styleUtils.js +1 -1
  104. package/symbols/support/symbolLayerUtils.js +1 -1
  105. package/symbols/support/utils.js +1 -1
  106. package/symbols/support/webStyleSymbolUtils.js +1 -1
  107. package/views/2d/engine/webgl/TextureManager.js +1 -1
  108. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  109. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  110. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  111. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  112. package/views/2d/layers/features/sources/DrillDownFeatureSource.js +1 -1
  113. package/views/2d/layers/features/sources/PagedFeatureSource.js +1 -1
  114. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  115. package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
  116. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  117. package/views/2d/layers/features/tileRenderers.js +1 -1
  118. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  119. package/views/2d/layers/support/webStyleUtils.js +1 -1
  120. package/views/3d/input/SceneInputManager.js +1 -1
  121. package/views/3d/interactive/manipulatorUtils.js +1 -1
  122. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  123. package/views/3d/layers/GraphicsView3D.js +1 -1
  124. package/views/3d/layers/I3SMeshView3D.js +1 -1
  125. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  127. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  128. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  129. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  130. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  131. package/views/3d/layers/graphics/webStyleUtils.js +5 -0
  132. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  133. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  134. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  135. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  137. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  138. package/views/LayerViewManager.js +1 -1
  139. package/views/PopupView.js +1 -1
  140. package/views/SceneView.js +1 -1
  141. package/views/ViewAnimation.js +1 -1
  142. package/views/input/BrowserEventSource.js +1 -1
  143. package/views/input/InputManager.js +1 -1
  144. package/views/interactive/coordinateHelper.js +1 -1
  145. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  146. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  147. package/views/support/QueueProcessor.js +1 -1
  148. package/views/ui/DefaultUI.js +1 -1
  149. package/views/ui/UI.js +1 -1
  150. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  151. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  152. package/widgets/Editor/Upload.js +1 -1
  153. package/widgets/Editor/deprecationUtils.js +1 -1
  154. package/widgets/Editor/modelUploadUtils.js +1 -1
  155. package/widgets/Editor.js +1 -1
  156. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  157. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  158. package/widgets/Feature/FeatureViewModel.js +1 -1
  159. package/widgets/Feature/support/featureUtils.js +1 -1
  160. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  161. package/widgets/Popup.js +1 -1
  162. package/widgets/support/decorators/accessibleHandler.js +1 -1
  163. package/assets/esri/core/workers/chunks/0948a40569b2408edefb.js +0 -1
  164. package/assets/esri/core/workers/chunks/192e3eeed50768c77c65.js +0 -1
  165. package/assets/esri/core/workers/chunks/1d1b9856f2f44d0c2144.js +0 -1
  166. package/assets/esri/core/workers/chunks/203115cc836e7b364eec.js +0 -1
  167. package/assets/esri/core/workers/chunks/20ad44b1a7adfed4c6c4.js +0 -1
  168. package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
  169. package/assets/esri/core/workers/chunks/41ae9037c70461d5fdc7.js +0 -1
  170. package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
  171. package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
  172. package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
  173. package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
  174. package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
  175. package/assets/esri/core/workers/chunks/6b065e581bcf743079cf.js +0 -1
  176. package/assets/esri/core/workers/chunks/6c54579981a7bd483f1a.js +0 -1
  177. package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
  178. package/assets/esri/core/workers/chunks/7da1fd3629362b81b43c.js +0 -1
  179. package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
  180. package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
  181. package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
  182. package/assets/esri/core/workers/chunks/8374d89e995f0d15c042.js +0 -1
  183. package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
  184. package/assets/esri/core/workers/chunks/8f553ae2f1aba4e0371f.js +0 -1
  185. package/assets/esri/core/workers/chunks/8fec9979ae2b0e3a878f.js +0 -1
  186. package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
  187. package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
  188. package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
  189. package/assets/esri/core/workers/chunks/b059cd03f31ead61abb4.js +0 -1
  190. package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
  191. package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
  192. package/assets/esri/core/workers/chunks/b976d5599672665561ec.js +0 -1
  193. package/assets/esri/core/workers/chunks/c260ac058e63a5c0cf60.js +0 -1
  194. package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
  195. package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
  196. package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
  197. package/assets/esri/core/workers/chunks/eec12b5666819bf2119d.js +0 -1
  198. package/assets/esri/core/workers/chunks/ef05496c1faf08d247f1.js +0 -1
  199. package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
  200. package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
  201. package/views/layers/GraphicsView.js +0 -5
  202. /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
  203. /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6748,9880],{66748:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>_});var r=n(40330),o=n(77286),s=n(61363),a=n(71201),i=n(6570),l=n(9361),c=n(8667),u=n(65091),f=n(94139),d=n(38913),h=n(58901),m=n(33955),g=n(27535),y=n(33586),w=n(28228),p=n(26520),v=n(67900);function b(e){return 0===r.i8.indexOf("4.")?d.Z.fromExtent(e):new d.Z({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function A(e,t,n){if((0,s.y)(e,2,2,t,n),e[0]instanceof l.Z&&e[1]instanceof l.Z);else if(e[0]instanceof l.Z&&null===e[1]);else if(e[1]instanceof l.Z&&null===e[0]);else if(null!==e[0]||null!==e[1])throw new g.aV(t,g.rH.InvalidParameter,n)}async function k(e,t){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let n=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(n=(0,a._R)(e.spatialReference)/(0,v.c9)(e.spatialReference));let r=0;if("polyline"===e.type)for(const t of e.paths)for(let e=1;e<t.length;e++)r+=(0,a.AW)(t[e],t[e-1],n);else if("polygon"===e.type)for(const t of e.rings){for(let e=1;e<t.length;e++)r+=(0,a.AW)(t[e],t[e-1],n);(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||void 0!==t[0][2]&&t[0][2]!==t[t.length-1][2])&&(r+=(0,a.AW)(t[0],t[t.length-1],n))}else"extent"===e.type&&(r+=2*(0,a.AW)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],n),r+=2*(0,a.AW)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],n),r*=2,r+=4*Math.abs((0,s.A)(e.zmax,0)*n-(0,s.A)(e.zmin,0)*n));const o=new h.Z({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return(0,c.sz)(o,t)}function _(e){"async"===e.mode&&(e.functions.disjoint=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null===o[0]||null===o[1]||(0,c.ED)(o[0],o[1]))))},e.functions.intersects=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.kK)(o[0],o[1]))))},e.functions.touches=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.W4)(o[0],o[1]))))},e.functions.crosses=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.jU)(o[0],o[1]))))},e.functions.within=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.uh)(o[0],o[1]))))},e.functions.contains=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.r3)(o[0],o[1]))))},e.functions.overlaps=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.Nm)(o[0],o[1]))))},e.functions.equals=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>((0,s.y)(o,2,2,t,n),o[0]===o[1]||(o[0]instanceof l.Z&&o[1]instanceof l.Z?(0,c.fS)(o[0],o[1]):!(!(0,s.k)(o[0])||!(0,s.k)(o[1]))&&o[0].equals(o[1])))))},e.functions.relate=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,3,3,t,n),o[0]instanceof l.Z&&o[1]instanceof l.Z)return(0,c.LV)(o[0],o[1],(0,s.j)(o[2]));if(o[0]instanceof l.Z&&null===o[1])return!1;if(o[1]instanceof l.Z&&null===o[0])return!1;if(null===o[0]&&null===o[1])return!1;throw new g.aV(t,g.rH.InvalidParameter,n)}))},e.functions.intersection=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null===o[0]||null===o[1]?null:(0,c.wf)(o[0],o[1]))))},e.functions.union=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{const i=[];if(0===(a=(0,s.G)(a)).length)throw new g.aV(t,g.rH.WrongNumberOfParameters,n);if(1===a.length)if((0,s.m)(a[0])){const e=(0,s.G)(a[0]);for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);i.push(e[r])}}else{if(!(0,s.x)(a[0])){if(a[0]instanceof l.Z)return(0,s.q)((0,o.r1)(a[0]),t.spatialReference);if(null===a[0])return null;throw new g.aV(t,g.rH.InvalidParameter,n)}{const e=(0,s.G)(a[0].toArray());for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);i.push(e[r])}}}else for(let e=0;e<a.length;e++)if(null!==a[e]){if(!(a[e]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);i.push(a[e])}return 0===i.length?null:(0,c.G0)(i)}))},e.functions.difference=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>(A(a=(0,s.G)(a),t,n),null!==a[0]&&null===a[1]?(0,o.r1)(a[0]):null===a[0]?null:(0,c.e5)(a[0],a[1]))))},e.functions.symmetricdifference=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>(A(a=(0,s.G)(a),t,n),null===a[0]&&null===a[1]?null:null===a[0]?(0,o.r1)(a[1]):null===a[1]?(0,o.r1)(a[0]):(0,c.Sp)(a[0],a[1]))))},e.functions.clip=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,2,2,t,n),!(o[1]instanceof i.Z)&&null!==o[1])throw new g.aV(t,g.rH.InvalidParameter,n);if(null===o[0])return null;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return null===o[1]?null:(0,c.oq)(o[0],o[1])}))},e.functions.cut=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,2,t,n),!(a[1]instanceof h.Z)&&null!==a[1])throw new g.aV(t,g.rH.InvalidParameter,n);if(null===a[0])return[];if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return null===a[1]?[(0,o.r1)(a[0])]:(0,c.z7)(a[0],a[1])}))},e.functions.area=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumArea((0,o.EI)((0,s.A)(a[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.J)(a[0],t.spatialReference);return null===e?0:(0,c.CJ)(e,(0,o.EI)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.CJ)(a[0],(0,o.EI)((0,s.A)(a[1],-1)))}))},e.functions.areageodetic=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumArea((0,o.EI)((0,s.A)(a[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.J)(a[0],t.spatialReference);return null===e?0:(0,c.Y4)(e,(0,o.EI)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.Y4)(a[0],(0,o.EI)((0,s.A)(a[1],-1)))}))},e.functions.length=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumLength((0,o.Lz)((0,s.A)(a[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.H)(a[0],t.spatialReference);return null===e?0:(0,c.sz)(e,(0,o.Lz)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.sz)(a[0],(0,o.Lz)((0,s.A)(a[1],-1)))}))},e.functions.length3d=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.H)(a[0],t.spatialReference);return null===e?0:!0===e.hasZ?k(e,(0,o.Lz)((0,s.A)(a[1],-1))):(0,c.sz)(e,(0,o.Lz)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return!0===a[0].hasZ?k(a[0],(0,o.Lz)((0,s.A)(a[1],-1))):(0,c.sz)(a[0],(0,o.Lz)((0,s.A)(a[1],-1)))}))},e.functions.lengthgeodetic=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumLength((0,o.Lz)((0,s.A)(a[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.H)(a[0],t.spatialReference);return null===e?0:(0,c.kQ)(e,(0,o.Lz)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.kQ)(a[0],(0,o.Lz)((0,s.A)(a[1],-1)))}))},e.functions.distance=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{a=(0,s.G)(a),(0,s.y)(a,2,3,t,n);let i=a[0];((0,s.m)(a[0])||(0,s.x)(a[0]))&&(i=(0,s.K)(a[0],t.spatialReference));let u=a[1];if(((0,s.m)(a[1])||(0,s.x)(a[1]))&&(u=(0,s.K)(a[1],t.spatialReference)),!(i instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);if(!(u instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.TE)(i,u,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.distancegeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{a=(0,s.G)(a),(0,s.y)(a,2,3,t,n);const i=a[0],l=a[1];if(!(i instanceof f.Z))throw new g.aV(t,g.rH.InvalidParameter,n);if(!(l instanceof f.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const u=new h.Z({paths:[],spatialReference:i.spatialReference});return u.addPath([i,l]),(0,c.kQ)(u,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.densify=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const u=(0,s.g)(a[1]);if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);if(u<=0)throw new g.aV(t,g.rH.InvalidParameter,n);return a[0]instanceof d.Z||a[0]instanceof h.Z?(0,c.Cz)(a[0],u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]instanceof i.Z?(0,c.Cz)(b(a[0]),u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]}))},e.functions.densifygeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const u=(0,s.g)(a[1]);if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);if(u<=0)throw new g.aV(t,g.rH.InvalidParameter,n);return a[0]instanceof d.Z||a[0]instanceof h.Z?(0,c.j2)(a[0],u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]instanceof i.Z?(0,c.j2)(b(a[0]),u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]}))},e.functions.generalize=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,4,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.D$)(a[0],i,(0,s.h)((0,s.A)(a[2],!0)),(0,o.Lz)((0,s.A)(a[3],-1)))}))},e.functions.buffer=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);return 0===i?(0,o.r1)(a[0]):(0,c.f3)(a[0],i,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.buffergeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);return 0===i?(0,o.r1)(a[0]):(0,c.rd)(a[0],i,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.offset=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,6,t,n),null===a[0])return null;if(!(a[0]instanceof d.Z||a[0]instanceof h.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);const l=(0,s.g)((0,s.A)(a[4],10));if(isNaN(l))throw new g.aV(t,g.rH.InvalidParameter,n);const u=(0,s.g)((0,s.A)(a[5],0));if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.cv)(a[0],i,(0,o.Lz)((0,s.A)(a[2],-1)),(0,s.j)((0,s.A)(a[3],"round")).toLowerCase(),l,u)}))},e.functions.rotate=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{o=(0,s.G)(o),(0,s.y)(o,2,3,t,n);let a=o[0];if(null===a)return null;if(!(a instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);a instanceof i.Z&&(a=d.Z.fromExtent(a));const u=(0,s.g)(o[1]);if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);const h=(0,s.A)(o[2],null);if(null===h)return(0,c.U1)(a,u);if(h instanceof f.Z)return(0,c.U1)(a,u,h);throw new g.aV(t,g.rH.InvalidParameter,n)}))},e.functions.centroid=function(t,n){return e.standardFunctionAsync(t,n,((e,r,c)=>{if(c=(0,s.G)(c),(0,s.y)(c,1,1,t,n),null===c[0])return null;let m=c[0];if(((0,s.m)(c[0])||(0,s.x)(c[0]))&&(m=(0,s.K)(c[0],t.spatialReference)),null===m)return null;if(!(m instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return m instanceof f.Z?(0,s.q)((0,o.r1)(c[0]),t.spatialReference):m instanceof d.Z?m.centroid:m instanceof h.Z?(0,a.s9)(m):m instanceof u.Z?(0,a.Ay)(m):m instanceof i.Z?m.center:null}))},e.functions.multiparttosinglepart=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{a=(0,s.G)(a),(0,s.y)(a,1,1,t,n);const y=[];if(null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);if(a[0]instanceof f.Z)return[(0,s.q)((0,o.r1)(a[0]),t.spatialReference)];if(a[0]instanceof i.Z)return[(0,s.q)((0,o.r1)(a[0]),t.spatialReference)];const w=await(0,c.og)(a[0]);if(w instanceof d.Z){const e=[],t=[];for(let n=0;n<w.rings.length;n++)if(w.isClockwise(w.rings[n])){const t=(0,m.im)({rings:[w.rings[n]],hasZ:!0===w.hasZ,hazM:!0===w.hasM,spatialReference:w.spatialReference.toJSON()});e.push(t)}else t.push({ring:w.rings[n],pt:w.getPoint(n,0)});for(let n=0;n<t.length;n++)for(let r=0;r<e.length;r++)if(e[r].contains(t[n].pt)){e[r].addRing(t[n].ring);break}return e}if(w instanceof h.Z){const e=[];for(let t=0;t<w.paths.length;t++){const n=(0,m.im)({paths:[w.paths[t]],hasZ:!0===w.hasZ,hazM:!0===w.hasM,spatialReference:w.spatialReference.toJSON()});e.push(n)}return e}if(a[0]instanceof u.Z){const e=(0,s.q)((0,o.r1)(a[0]),t.spatialReference);for(let t=0;t<e.points.length;t++)y.push(e.getPoint(t));return y}return null}))},e.functions.issimple=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,1,1,t,n),null===o[0])return!0;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.Gg)(o[0])}))},e.functions.simplify=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,1,1,t,n),null===o[0])return null;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.og)(o[0])}))},e.functions.convexhull=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,1,1,t,n),null===o[0])return null;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.JI)(o[0])}))},e.functions.getuser=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{(0,s.y)(o,0,2,t,n);let a=(0,s.A)(o[1],""),i=!0===a;if(a=!0===a||!1===a?"":(0,s.j)(a),0===o.length||o[0]instanceof w.Z){let e=null;t.services&&t.services.portal&&(e=t.services.portal),o.length>0&&(e=(0,p._)(o[0],e));const n=await(0,p.q)(e,a,i);if(n){const e=JSON.parse(JSON.stringify(n));for(const t of["lastLogin","created","modified"])void 0!==e[t]&&null!==e[t]&&(e[t]=new Date(e[t]));return y.Z.convertObjectToArcadeDictionary(e,(0,s.C)(t))}return null}let l=null;if((0,s.T)(o[0])&&(l=o[0]),l){if(i=!1,a)return null;await l.load();const e=await l.getOwningSystemUrl();if(!e){if(!a){const e=await l.getIdentityUser();return e?y.Z.convertObjectToArcadeDictionary({username:e},(0,s.C)(t)):null}return null}let n=null;t.services&&t.services.portal&&(n=t.services.portal),n=(0,p._)(new w.Z(e),n);const r=await(0,p.q)(n,a,i);if(r){const e=JSON.parse(JSON.stringify(r));for(const t of["lastLogin","created","modified"])void 0!==e[t]&&null!==e[t]&&(e[t]=new Date(e[t]));return y.Z.convertObjectToArcadeDictionary(e,(0,s.C)(t))}return null}throw new g.aV(t,g.rH.InvalidParameter,n)}))})}},26520:(e,t,n)=>{n.d(t,{_:()=>a,q:()=>i});var r=n(40330),o=n(3172),s=n(65587);function a(e,t){return null===e?t:new s.Z({url:e.field("url")})}async function i(e,t,n){const s=r.id?.findCredential(e.restUrl);if(!s)return null;if("loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===n)return e.user.sourceJSON;if(""===t){const t=await(0,o.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===n?{}:{returnUserLicenseTypeExtensions:!0}}});if(t.data){const e=t.data;if(e&&e.username)return e}return null}const a=await(0,o.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}});if(a.data){const e=a.data;return e.error?null:e}return null}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),o=(n(3172),n(20102)),s=n(92604),a=n(17452);const i=s.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw i.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},64830:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(70586);class o{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,r.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,r.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),o=n(92604),s=n(95330),a=n(64830),i=n(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new a.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let o=!0;const a=e=>{(0,s.k_)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const l=e[o];(0,s.y8)(l)?this._clientPromises[o]=l.then((e=>(this._clients[o]=new i.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),a(n),this._clients[o])),(()=>(a(r),null))):(this._clients[o]=new i.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[o]=Promise.resolve(this._clients[o]),a(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let o=0;o<this._clientPromises.length;++o){const s=this._clientPromises[o];r[o]=s.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.deferred.reject((0,s.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,n){let r;Array.isArray(n)?(o.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const a=(0,s.dD)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,deferred:a});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return a.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((o=>{o&&(t[r]=o.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,n)=>{n.d(t,{bA:()=>z});var r=n(20102),o=n(80442),s=n(95330),a=n(80903),i=n(728),l=n(40330),c=n(92604),u=n(70586),f=n(94362),d=n(99880),h=n(68773),m=(n(2587),n(17452));const g={};function y(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=g.baseUrl),t}var w=n(41213);class p{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class v{constructor(){this._dispatcher=new p,this._workerPostMessage({type:f.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,w.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,f.QM)(e);if(t&&t.type===f.MessageType.OPEN){const{modulePath:e,jobId:n}=t;let r=await i.default.loadWorker(e);r||(r=await import(e));const o=i.default.connect(r);this._workerPostMessage({type:f.MessageType.OPENED,jobId:n,data:o})}}}var b=n(70171),A=n(17202);const k=c.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:_}=f.MessageType;let Z,P;const L="Failed to create Worker. Fallback to execute module in main thread";async function I(e){return new Promise((t=>{function n(o){const s=(0,f.QM)(o);s&&s.type===_&&(e.removeEventListener("message",n),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",r),k.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",n),e.addEventListener("error",r)}e.addEventListener("message",n),e.addEventListener("error",r)}))}function E(){let e;if(null!=h.default.default){const t={...h.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.default));e.assetsPath=(0,m.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,m.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,o.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,m.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,m.hF)(e.workers.workerPath):e.workers.workerPath=(0,m.hF)((0,d.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.default.workers.loaderConfig,n=y({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:A.r,fullVersion:l.bR,revision:A.$};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:r})}let S=0;const{ABORT:H,INVOKE:N,OPEN:M,OPENED:R,RESPONSE:O}=f.MessageType;class V{static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return I(new v);if(!Z&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${E()}'`);Z=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(Z)try{e=new Worker(Z,{name:"esri-worker-"+S++})}catch(t){k.warn(L,P),e=new v}else k.warn(L,P),e=new v;return I(e)}();return new V(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,r=(0,f.jt)();return new Promise(((t,o)=>{const a={resolve:t,reject:o,abortHandle:(0,s.$F)(n,(()=>{this._outJobs.delete(r),this._post({type:H,jobId:r})}))};this._outJobs.set(r,a),this._post({type:M,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,f.QM)(e);if(t)switch(t.type){case R:this._onOpenedMessage(t);break;case O:this._onResponseMessage(t);break;case H:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);r&&(r.controller&&r.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:o}=e,a=o?new AbortController:null,i=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,r,{signal:a?a.signal:null})}catch(e){return void this._post({type:O,jobId:n,error:(0,f.AB)(e)})}(0,s.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:O,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),e||(e={message:"Error encountered at method"+t}),(0,s.D_)(e)||this._post({type:O,jobId:n,error:(0,f.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:O,jobId:n},u)}_onOpenedMessage(e){const{jobId:t,data:n}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,u.hw)(r.abortHandle),r.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:o}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.hw)(s.abortHandle),n?s.reject(r.Z.fromJSON(JSON.parse(n))):s.resolve(o))}_post(e,t,n){return(0,f.oi)(this.worker,e,t,n)}}const D=Math.min(navigator.hardwareConcurrency-1,(0,o.Z)("workers-pool-size"));let F=(0,o.Z)("esri-mobile")?Math.min(D,3):(0,o.Z)("host-browser")?D:0;F||(F=(0,o.Z)("safari")&&(0,o.Z)("mac")?7:2);let j=0;const x=[];async function C(e,t){const n=new a.Z;return await n.open(e,t),n}async function z(e,t={}){if("string"!=typeof e)throw new r.Z("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(n="local"),"local"===n){let n=await i.default.loadWorker(e);n||(n=await import(e)),(0,s.k_)(t.signal);const r=t.client||n;return C([i.default.connect(n)],{...t,client:r})}if(await async function(){if(J)return J;T=new AbortController;const e=[];for(let t=0;t<F;t++){const n=V.create(t).then((e=>(x[t]=e,e)));e.push(n)}return J=Promise.all(e),J}(),(0,s.k_)(t.signal),"dedicated"===n){const n=j++%F;return C([await x[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,F);if(n<F){const r=new Array(n);for(let o=0;o<n;++o){const n=j++%F;r[o]=x[n].open(e,t)}return C(r,t)}}return C(x.map((n=>n.open(e,t))),t)}let T,J=null},8667:(e,t,n)=>{n.d(t,{CJ:()=>D,Cz:()=>O,D$:()=>R,ED:()=>v,G0:()=>E,Gg:()=>k,JI:()=>Z,LV:()=>A,Nm:()=>b,Sp:()=>L,TE:()=>m,U1:()=>M,W4:()=>w,Y4:()=>j,cv:()=>S,e5:()=>P,f3:()=>H,fS:()=>g,j2:()=>V,jU:()=>h,kK:()=>y,kQ:()=>x,og:()=>_,oq:()=>u,r3:()=>d,rd:()=>N,sz:()=>F,uh:()=>p,wf:()=>I,z7:()=>f}),n(66577);var r=n(78346),o=(n(94139),n(33955));function s(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function a(e){return e?Array.isArray(e)?e.map(a):e.toJSON?e.toJSON():e:e}function i(e){return Array.isArray(e)?e.map((e=>(0,o.im)(e))):(0,o.im)(e)}let l;async function c(e,t){return(await async function(){return l||(l=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:a(t)})}async function u(e,t){return i(await c("clip",[s(e),e,t]))}async function f(e,t){return i(await c("cut",[s(e),e,t]))}function d(e,t){return c("contains",[s(e),e,t])}function h(e,t){return c("crosses",[s(e),e,t])}function m(e,t,n){return c("distance",[s(e),e,t,n])}function g(e,t){return c("equals",[s(e),e,t])}function y(e,t){return c("intersects",[s(e),e,t])}function w(e,t){return c("touches",[s(e),e,t])}function p(e,t){return c("within",[s(e),e,t])}function v(e,t){return c("disjoint",[s(e),e,t])}function b(e,t){return c("overlaps",[s(e),e,t])}function A(e,t,n){return c("relate",[s(e),e,t,n])}function k(e){return c("isSimple",[s(e),e])}async function _(e){return i(await c("simplify",[s(e),e]))}async function Z(e,t=!1){return i(await c("convexHull",[s(e),e,t]))}async function P(e,t){return i(await c("difference",[s(e),e,t]))}async function L(e,t){return i(await c("symmetricDifference",[s(e),e,t]))}async function I(e,t){return i(await c("intersect",[s(e),e,t]))}async function E(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return i(await c("union",[s(n),n]))}async function S(e,t,n,r,o,a){return i(await c("offset",[s(e),e,t,n,r,o,a]))}async function H(e,t,n,r=!1){const o=[s(e),e,t,n,r];return i(await c("buffer",o))}async function N(e,t,n,r,o,a){const l=[s(e),e,t,n,r,o,a];return i(await c("geodesicBuffer",l))}async function M(e,t,n){if(null==e)throw new C;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new C;const o=e.constructor.fromJSON(await c("rotate",[r,e,t,n]));return o.spatialReference=r,o}async function R(e,t,n,r){return i(await c("generalize",[s(e),e,t,n,r]))}async function O(e,t,n){return i(await c("densify",[s(e),e,t,n]))}async function V(e,t,n,r=0){return i(await c("geodesicDensify",[s(e),e,t,n,r]))}function D(e,t){return c("planarArea",[s(e),e,t])}function F(e,t){return c("planarLength",[s(e),e,t])}function j(e,t,n){return c("geodesicArea",[s(e),e,t,n])}function x(e,t,n){return c("geodesicLength",[s(e),e,t,n])}class C extends Error{constructor(){super("Illegal Argument Exception")}}},2587:(e,t,n)=>{n(90344),n(18848),n(940),n(70171);var r=n(94443),o=n(3172),s=n(20102);async function a(e){if(null!=i.fetchBundleAsset)return i.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}const i={};var l,c=n(99880);(0,r.tz)((l={pattern:"esri/",location:c.V},new class{constructor({base:e="",pattern:t,location:n=new URL(window.location.href)}){let r;r="string"==typeof n?e=>new URL(e,new URL(n,window.location.href)).href:n instanceof URL?e=>new URL(e,n).href:n,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=r,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,n,o){const i=t.exec(n);if(!i)throw new s.Z("esri-intl:invalid-bundle",`Bundle id "${n}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",c=i[2],u=(0,r.Su)(o),f=`${l}${c}.json`,d=u?`${l}${c}_${u}.json`:f;let h;try{h=await a(e(d))}catch(t){if(d===f)throw new s.Z("intl:unknown-bundle",`Bundle "${n}" cannot be loaded`,{error:t});try{h=await a(e(f))}catch(e){throw new s.Z("intl:unknown-bundle",`Bundle "${n}" cannot be loaded`,{error:e})}}return h}(this.getAssetUrl,this.matcher,e,t)}}(l)))},90344:(e,t,n)=>{n.d(t,{D5:()=>l,LJ:()=>P,Xr:()=>p,Ze:()=>k,cZ:()=>u,i$:()=>L,o5:()=>c,o8:()=>Z,p6:()=>_});var r=n(35454),o=n(70171),s=n(17126);const a={year:void 0,month:void 0,day:void 0,weekday:void 0},i={hour:void 0,minute:void 0,second:void 0},l={timeZoneName:"short"},c={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},u={timeZone:"Etc/UTC"},f={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},h={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},y={...g,second:"numeric"},w={"short-date":f,"short-date-short-time":{...f,...g},"short-date-short-time-24":{...f,...g,hour12:!1},"short-date-long-time":{...f,...y},"short-date-long-time-24":{...f,...y,hour12:!1},"short-date-le":f,"short-date-le-short-time":{...f,...g},"short-date-le-short-time-24":{...f,...g,hour12:!1},"short-date-le-long-time":{...f,...y},"short-date-le-long-time-24":{...f,...y,hour12:!1},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...g},"long-month-day-year-short-time-24":{...d,...g,hour12:!1},"long-month-day-year-long-time":{...d,...y},"long-month-day-year-long-time-24":{...d,...y,hour12:!1},"day-short-month-year":h,"day-short-month-year-short-time":{...h,...g},"day-short-month-year-short-time-24":{...h,...g,hour12:!1},"day-short-month-year-long-time":{...h,...y},"day-short-month-year-long-time-24":{...h,...y,hour12:!1},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...g,hour12:!1},"long-date-long-time":{...m,...y},"long-date-long-time-24":{...m,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":y},p=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),v={ar:"ar-u-nu-latn-ca-gregory"};let b=new WeakMap,A=w["short-date-short-time"];function k(e){return e?w[e]:null}function _(e,t){return function(e){const t=e||A;let n=b.get(t);if(!n){const e=(0,o.Kd)(),r=v[e]||e;n=new Intl.DateTimeFormat(r,t),b.set(t,n)}return n}(t).format(e)}function Z(e,t){return _(new Date(e),{...t,...u,...i})}function P(e,t){return _(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function L(e,t){const n=s.ou.fromISO(e,{setZone:!0}),r=(0,o.Kd)(),a=v[r]??r;return n.toLocaleString(t,{locale:a})}(0,o.Ze)((()=>{b=new WeakMap,A=w["short-date-short-time"]}))},94443:(e,t,n)=>{n.d(t,{ME:()=>h,Su:()=>m,tz:()=>d});var r=n(20102),o=n(95330),s=n(70171);const a=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,i={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){return e in i}const c=[],u=new Map;function f(e){for(const t of u.keys())g(e.pattern,t)&&u.delete(t)}function d(e){return c.includes(e)||(f(e),c.unshift(e)),{remove(){const t=c.indexOf(e);t>-1&&(c.splice(t,1),f(e))}}}async function h(e){const t=(0,s.Kd)();u.has(e)||u.set(e,async function(e,t){const n=[];for(const r of c)if(g(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=u.get(e);return n&&await y.add(n),n}function m(e){if(!a.test(e))return null;const t=a.exec(e);if(null===t)return null;const[,n,r]=t,o=n+(r?"-"+r.toUpperCase():"");return l(o)?o:l(n)?n:null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{u.clear()}));const y=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,o.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,n)=>{n.d(t,{sh:()=>l,uf:()=>c});var r=n(70586),o=n(70171);const s={ar:"ar-u-nu-latn"};let a=new WeakMap,i={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function c(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||i;if(!a.has(t)){const n=(0,o.Kd)(),r=s[(0,o.Kd)()]||n;a.set(t,new Intl.NumberFormat(r,e))}return(0,r.j0)(a.get(t))}(t).format(e)}(0,o.Ze)((()=>{a=new WeakMap,i={}}))},940:(e,t,n)=>{n.d(t,{n:()=>c});var r=n(92604),o=n(78286),s=n(19153),a=n(90344),i=n(18848);const l=r.Z.getLogger("esri.intl.substitute");function c(e,t,n={}){const{format:r={}}=n;return(0,s.gx)(e,(e=>function(e,t,n){let r,s;const a=e.indexOf(":");if(-1===a?r=e.trim():(r=e.slice(0,a).trim(),s=e.slice(a+1).trim()),!r)return"";const i=(0,o.hS)(r,t);if(null==i)return"";const l=(s?n?.[s]:null)??n?.[r];return l?u(i,l):s?f(i,s):d(i)}(e,t,r)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,i.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),d(e)}}function f(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,i.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,i.uf)(e):d(e)}}function d(e){switch(typeof e){case"string":return e;case"number":return(0,i.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6748,9880],{66748:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>_});var r=n(40330),o=n(77286),s=n(61363),a=n(71201),i=n(6570),l=n(9361),c=n(8667),u=n(65091),f=n(94139),h=n(38913),d=n(58901),m=n(33955),g=n(27535),y=n(33586),w=n(28228),p=n(26520),v=n(67900);function b(e){return 0===r.i8.indexOf("4.")?h.Z.fromExtent(e):new h.Z({spatialReference:e.spatialReference,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}function A(e,t,n){if((0,s.y)(e,2,2,t,n),e[0]instanceof l.Z&&e[1]instanceof l.Z);else if(e[0]instanceof l.Z&&null===e[1]);else if(e[1]instanceof l.Z&&null===e[0]);else if(null!==e[0]||null!==e[1])throw new g.aV(t,g.rH.InvalidParameter,n)}async function k(e,t){if("polygon"!==e.type&&"polyline"!==e.type&&"extent"!==e.type)return 0;let n=1;(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid)&&(n=(0,a._R)(e.spatialReference)/(0,v.c9)(e.spatialReference));let r=0;if("polyline"===e.type)for(const t of e.paths)for(let e=1;e<t.length;e++)r+=(0,a.AW)(t[e],t[e-1],n);else if("polygon"===e.type)for(const t of e.rings){for(let e=1;e<t.length;e++)r+=(0,a.AW)(t[e],t[e-1],n);(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||void 0!==t[0][2]&&t[0][2]!==t[t.length-1][2])&&(r+=(0,a.AW)(t[0],t[t.length-1],n))}else"extent"===e.type&&(r+=2*(0,a.AW)([e.xmin,e.ymin,0],[e.xmax,e.ymin,0],n),r+=2*(0,a.AW)([e.xmin,e.ymin,0],[e.xmin,e.ymax,0],n),r*=2,r+=4*Math.abs((0,s.A)(e.zmax,0)*n-(0,s.A)(e.zmin,0)*n));const o=new d.Z({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:[[0,0],[0,r]]});return(0,c.sz)(o,t)}function _(e){"async"===e.mode&&(e.functions.disjoint=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null===o[0]||null===o[1]||(0,c.ED)(o[0],o[1]))))},e.functions.intersects=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.kK)(o[0],o[1]))))},e.functions.touches=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.W4)(o[0],o[1]))))},e.functions.crosses=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.jU)(o[0],o[1]))))},e.functions.within=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.uh)(o[0],o[1]))))},e.functions.contains=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.r3)(o[0],o[1]))))},e.functions.overlaps=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null!==o[0]&&null!==o[1]&&(0,c.Nm)(o[0],o[1]))))},e.functions.equals=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>((0,s.y)(o,2,2,t,n),o[0]===o[1]||(o[0]instanceof l.Z&&o[1]instanceof l.Z?(0,c.fS)(o[0],o[1]):!(!(0,s.k)(o[0])||!(0,s.k)(o[1]))&&o[0].equals(o[1])))))},e.functions.relate=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,3,3,t,n),o[0]instanceof l.Z&&o[1]instanceof l.Z)return(0,c.LV)(o[0],o[1],(0,s.j)(o[2]));if(o[0]instanceof l.Z&&null===o[1])return!1;if(o[1]instanceof l.Z&&null===o[0])return!1;if(null===o[0]&&null===o[1])return!1;throw new g.aV(t,g.rH.InvalidParameter,n)}))},e.functions.intersection=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>(A(o=(0,s.G)(o),t,n),null===o[0]||null===o[1]?null:(0,c.wf)(o[0],o[1]))))},e.functions.union=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{const i=[];if(0===(a=(0,s.G)(a)).length)throw new g.aV(t,g.rH.WrongNumberOfParameters,n);if(1===a.length)if((0,s.m)(a[0])){const e=(0,s.G)(a[0]);for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);i.push(e[r])}}else{if(!(0,s.x)(a[0])){if(a[0]instanceof l.Z)return(0,s.q)((0,o.r1)(a[0]),t.spatialReference);if(null===a[0])return null;throw new g.aV(t,g.rH.InvalidParameter,n)}{const e=(0,s.G)(a[0].toArray());for(let r=0;r<e.length;r++)if(null!==e[r]){if(!(e[r]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);i.push(e[r])}}}else for(let e=0;e<a.length;e++)if(null!==a[e]){if(!(a[e]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);i.push(a[e])}return 0===i.length?null:(0,c.G0)(i)}))},e.functions.difference=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>(A(a=(0,s.G)(a),t,n),null!==a[0]&&null===a[1]?(0,o.r1)(a[0]):null===a[0]?null:(0,c.e5)(a[0],a[1]))))},e.functions.symmetricdifference=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>(A(a=(0,s.G)(a),t,n),null===a[0]&&null===a[1]?null:null===a[0]?(0,o.r1)(a[1]):null===a[1]?(0,o.r1)(a[0]):(0,c.Sp)(a[0],a[1]))))},e.functions.clip=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,2,2,t,n),!(o[1]instanceof i.Z)&&null!==o[1])throw new g.aV(t,g.rH.InvalidParameter,n);if(null===o[0])return null;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return null===o[1]?null:(0,c.oq)(o[0],o[1])}))},e.functions.cut=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,2,t,n),!(a[1]instanceof d.Z)&&null!==a[1])throw new g.aV(t,g.rH.InvalidParameter,n);if(null===a[0])return[];if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return null===a[1]?[(0,o.r1)(a[0])]:(0,c.z7)(a[0],a[1])}))},e.functions.area=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumArea((0,o.EI)((0,s.A)(a[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.J)(a[0],t.spatialReference);return null===e?0:(0,c.CJ)(e,(0,o.EI)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.CJ)(a[0],(0,o.EI)((0,s.A)(a[1],-1)))}))},e.functions.areageodetic=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumArea((0,o.EI)((0,s.A)(a[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.J)(a[0],t.spatialReference);return null===e?0:(0,c.Y4)(e,(0,o.EI)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.Y4)(a[0],(0,o.EI)((0,s.A)(a[1],-1)))}))},e.functions.length=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumLength((0,o.Lz)((0,s.A)(a[1],-1)),!1,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.H)(a[0],t.spatialReference);return null===e?0:(0,c.sz)(e,(0,o.Lz)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.sz)(a[0],(0,o.Lz)((0,s.A)(a[1],-1)))}))},e.functions.length3d=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.H)(a[0],t.spatialReference);return null===e?0:!0===e.hasZ?k(e,(0,o.Lz)((0,s.A)(a[1],-1))):(0,c.sz)(e,(0,o.Lz)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return!0===a[0].hasZ?k(a[0],(0,o.Lz)((0,s.A)(a[1],-1))):(0,c.sz)(a[0],(0,o.Lz)((0,s.A)(a[1],-1)))}))},e.functions.lengthgeodetic=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{if((0,s.y)(a,1,2,t,n),null===(a=(0,s.G)(a))[0])return 0;if((0,s.T)(a[0])){const e=await a[0].sumLength((0,o.Lz)((0,s.A)(a[1],-1)),!0,t.abortSignal);if(t.abortSignal.aborted)throw new g.aV(t,g.rH.Cancelled,n);return e}if((0,s.m)(a[0])||(0,s.x)(a[0])){const e=(0,s.H)(a[0],t.spatialReference);return null===e?0:(0,c.kQ)(e,(0,o.Lz)((0,s.A)(a[1],-1)))}if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.kQ)(a[0],(0,o.Lz)((0,s.A)(a[1],-1)))}))},e.functions.distance=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{a=(0,s.G)(a),(0,s.y)(a,2,3,t,n);let i=a[0];((0,s.m)(a[0])||(0,s.x)(a[0]))&&(i=(0,s.K)(a[0],t.spatialReference));let u=a[1];if(((0,s.m)(a[1])||(0,s.x)(a[1]))&&(u=(0,s.K)(a[1],t.spatialReference)),!(i instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);if(!(u instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.TE)(i,u,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.distancegeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{a=(0,s.G)(a),(0,s.y)(a,2,3,t,n);const i=a[0],l=a[1];if(!(i instanceof f.Z))throw new g.aV(t,g.rH.InvalidParameter,n);if(!(l instanceof f.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const u=new d.Z({paths:[],spatialReference:i.spatialReference});return u.addPath([i,l]),(0,c.kQ)(u,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.densify=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const u=(0,s.g)(a[1]);if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);if(u<=0)throw new g.aV(t,g.rH.InvalidParameter,n);return a[0]instanceof h.Z||a[0]instanceof d.Z?(0,c.Cz)(a[0],u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]instanceof i.Z?(0,c.Cz)(b(a[0]),u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]}))},e.functions.densifygeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const u=(0,s.g)(a[1]);if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);if(u<=0)throw new g.aV(t,g.rH.InvalidParameter,n);return a[0]instanceof h.Z||a[0]instanceof d.Z?(0,c.j2)(a[0],u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]instanceof i.Z?(0,c.j2)(b(a[0]),u,(0,o.Lz)((0,s.A)(a[2],-1))):a[0]}))},e.functions.generalize=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,4,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.D$)(a[0],i,(0,s.h)((0,s.A)(a[2],!0)),(0,o.Lz)((0,s.A)(a[3],-1)))}))},e.functions.buffer=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);return 0===i?(0,o.r1)(a[0]):(0,c.f3)(a[0],i,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.buffergeodetic=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,3,t,n),null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);return 0===i?(0,o.r1)(a[0]):(0,c.rd)(a[0],i,(0,o.Lz)((0,s.A)(a[2],-1)))}))},e.functions.offset=function(t,n){return e.standardFunctionAsync(t,n,((e,r,a)=>{if(a=(0,s.G)(a),(0,s.y)(a,2,6,t,n),null===a[0])return null;if(!(a[0]instanceof h.Z||a[0]instanceof d.Z))throw new g.aV(t,g.rH.InvalidParameter,n);const i=(0,s.g)(a[1]);if(isNaN(i))throw new g.aV(t,g.rH.InvalidParameter,n);const l=(0,s.g)((0,s.A)(a[4],10));if(isNaN(l))throw new g.aV(t,g.rH.InvalidParameter,n);const u=(0,s.g)((0,s.A)(a[5],0));if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.cv)(a[0],i,(0,o.Lz)((0,s.A)(a[2],-1)),(0,s.j)((0,s.A)(a[3],"round")).toLowerCase(),l,u)}))},e.functions.rotate=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{o=(0,s.G)(o),(0,s.y)(o,2,3,t,n);let a=o[0];if(null===a)return null;if(!(a instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);a instanceof i.Z&&(a=h.Z.fromExtent(a));const u=(0,s.g)(o[1]);if(isNaN(u))throw new g.aV(t,g.rH.InvalidParameter,n);const d=(0,s.A)(o[2],null);if(null===d)return(0,c.U1)(a,u);if(d instanceof f.Z)return(0,c.U1)(a,u,d);throw new g.aV(t,g.rH.InvalidParameter,n)}))},e.functions.centroid=function(t,n){return e.standardFunctionAsync(t,n,((e,r,c)=>{if(c=(0,s.G)(c),(0,s.y)(c,1,1,t,n),null===c[0])return null;let m=c[0];if(((0,s.m)(c[0])||(0,s.x)(c[0]))&&(m=(0,s.K)(c[0],t.spatialReference)),null===m)return null;if(!(m instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return m instanceof f.Z?(0,s.q)((0,o.r1)(c[0]),t.spatialReference):m instanceof h.Z?m.centroid:m instanceof d.Z?(0,a.s9)(m):m instanceof u.Z?(0,a.Ay)(m):m instanceof i.Z?m.center:null}))},e.functions.multiparttosinglepart=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,a)=>{a=(0,s.G)(a),(0,s.y)(a,1,1,t,n);const y=[];if(null===a[0])return null;if(!(a[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);if(a[0]instanceof f.Z)return[(0,s.q)((0,o.r1)(a[0]),t.spatialReference)];if(a[0]instanceof i.Z)return[(0,s.q)((0,o.r1)(a[0]),t.spatialReference)];const w=await(0,c.og)(a[0]);if(w instanceof h.Z){const e=[],t=[];for(let n=0;n<w.rings.length;n++)if(w.isClockwise(w.rings[n])){const t=(0,m.im)({rings:[w.rings[n]],hasZ:!0===w.hasZ,hazM:!0===w.hasM,spatialReference:w.spatialReference.toJSON()});e.push(t)}else t.push({ring:w.rings[n],pt:w.getPoint(n,0)});for(let n=0;n<t.length;n++)for(let r=0;r<e.length;r++)if(e[r].contains(t[n].pt)){e[r].addRing(t[n].ring);break}return e}if(w instanceof d.Z){const e=[];for(let t=0;t<w.paths.length;t++){const n=(0,m.im)({paths:[w.paths[t]],hasZ:!0===w.hasZ,hazM:!0===w.hasM,spatialReference:w.spatialReference.toJSON()});e.push(n)}return e}if(a[0]instanceof u.Z){const e=(0,s.q)((0,o.r1)(a[0]),t.spatialReference);for(let t=0;t<e.points.length;t++)y.push(e.getPoint(t));return y}return null}))},e.functions.issimple=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,1,1,t,n),null===o[0])return!0;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.Gg)(o[0])}))},e.functions.simplify=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,1,1,t,n),null===o[0])return null;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.og)(o[0])}))},e.functions.convexhull=function(t,n){return e.standardFunctionAsync(t,n,((e,r,o)=>{if(o=(0,s.G)(o),(0,s.y)(o,1,1,t,n),null===o[0])return null;if(!(o[0]instanceof l.Z))throw new g.aV(t,g.rH.InvalidParameter,n);return(0,c.JI)(o[0])}))},e.functions.getuser=function(t,n){return e.standardFunctionAsync(t,n,(async(e,r,o)=>{(0,s.y)(o,0,2,t,n);let a=(0,s.A)(o[1],""),i=!0===a;if(a=!0===a||!1===a?"":(0,s.j)(a),0===o.length||o[0]instanceof w.Z){let e=null;t.services&&t.services.portal&&(e=t.services.portal),o.length>0&&(e=(0,p._)(o[0],e));const n=await(0,p.q)(e,a,i);if(n){const e=JSON.parse(JSON.stringify(n));for(const t of["lastLogin","created","modified"])void 0!==e[t]&&null!==e[t]&&(e[t]=new Date(e[t]));return y.Z.convertObjectToArcadeDictionary(e,(0,s.C)(t))}return null}let l=null;if((0,s.T)(o[0])&&(l=o[0]),l){if(i=!1,a)return null;await l.load();const e=await l.getOwningSystemUrl();if(!e){if(!a){const e=await l.getIdentityUser();return e?y.Z.convertObjectToArcadeDictionary({username:e},(0,s.C)(t)):null}return null}let n=null;t.services&&t.services.portal&&(n=t.services.portal),n=(0,p._)(new w.Z(e),n);const r=await(0,p.q)(n,a,i);if(r){const e=JSON.parse(JSON.stringify(r));for(const t of["lastLogin","created","modified"])void 0!==e[t]&&null!==e[t]&&(e[t]=new Date(e[t]));return y.Z.convertObjectToArcadeDictionary(e,(0,s.C)(t))}return null}throw new g.aV(t,g.rH.InvalidParameter,n)}))})}},26520:(e,t,n)=>{n.d(t,{_:()=>a,q:()=>i});var r=n(40330),o=n(3172),s=n(65587);function a(e,t){return null===e?t:new s.Z({url:e.field("url")})}async function i(e,t,n){const s=r.id?.findCredential(e.restUrl);if(!s)return null;if("loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===n)return e.user.sourceJSON;if(""===t){const t=await(0,o.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===n?{}:{returnUserLicenseTypeExtensions:!0}}});if(t.data){const e=t.data;if(e&&e.username)return e}return null}const a=await(0,o.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}});if(a.data){const e=a.data;return e.error?null:e}return null}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),o=(n(3172),n(20102)),s=n(92604),a=n(17452);const i=s.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw i.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},64830:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(70586);class o{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._items=new Set}get length(){return this._items.size}clear(){this._items.clear()}last(){if(0===this._items.size)return;let e;for(e of this._items);return e}peek(){if(0!==this._items.size)return this._peeker(this._items)}push(e){this.contains(e)||this._items.add(e)}contains(e){return this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete((0,r.j0)(e)),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete((0,r.j0)(e)),e}remove(e){this._items.delete(e)}filter(e){return this._items.forEach((t=>{e(t)||this._items.delete(t)})),this}}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),o=n(92604),s=n(95330),a=n(64830),i=n(728);class l{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new a.Z}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let o=!0;const a=e=>{(0,s.k_)(t.signal),o&&(o=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let o=0;o<e.length;++o){const l=e[o];(0,s.y8)(l)?this._clientPromises[o]=l.then((e=>(this._clients[o]=new i.default(e,t,(()=>this._ongoingJobsQueue.pop()??null)),a(n),this._clients[o])),(()=>(a(r),null))):(this._clients[o]=new i.default(l,t,(()=>this._ongoingJobsQueue.pop()??null)),this._clientPromises[o]=Promise.resolve(this._clients[o]),a(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let o=0;o<this._clientPromises.length;++o){const s=this._clientPromises[o];r[o]=s.then((r=>r?.invoke(e,t,n)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,s.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0}invoke(e,t,n){let r;Array.isArray(n)?(o.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n;const a=(0,s.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:a});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return a.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((o=>{o&&(t[r]=o.openPort()),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},78346:(e,t,n)=>{n.d(t,{bA:()=>z});var r=n(20102),o=n(80442),s=n(95330),a=n(80903),i=n(728),l=n(40330),c=n(92604),u=n(70586),f=n(94362),h=n(99880),d=n(68773),m=(n(2587),n(17452));const g={};function y(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=g.baseUrl),t}var w=n(41213);class p{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...n)=>e[t](...n)}))}}class v{constructor(){this._dispatcher=new p,this._workerPostMessage({type:f.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,n){this._dispatcher.addEventListener(e,t,n)}removeEventListener(e,t,n){this._dispatcher.removeEventListener(e,t,n)}_workerPostMessage(e){(0,w.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,f.QM)(e);if(t&&t.type===f.MessageType.OPEN){const{modulePath:e,jobId:n}=t;let r=await i.default.loadWorker(e);r||(r=await import(e));const o=i.default.connect(r);this._workerPostMessage({type:f.MessageType.OPENED,jobId:n,data:o})}}}var b=n(70171),A=n(17202);const k=c.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:_}=f.MessageType;let Z,P;const L="Failed to create Worker. Fallback to execute module in main thread";async function I(e){return new Promise((t=>{function n(o){const s=(0,f.QM)(o);s&&s.type===_&&(e.removeEventListener("message",n),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",n),e.removeEventListener("error",r),k.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",n),e.addEventListener("error",r)}e.addEventListener("message",n),e.addEventListener("error",r)}))}function E(){let e;if(null!=d.default.default){const t={...d.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(d.default));e.assetsPath=(0,m.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,m.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,o.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1,"polylabel-placement-enabled":(0,o.Z)("polylabel-placement-enabled")},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,m.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,m.hF)(e.workers.workerPath):e.workers.workerPath=(0,m.hF)((0,h.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=d.default.workers.loaderConfig,n=y({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:A.r,fullVersion:l.bR,revision:A.$};return JSON.stringify({esriConfig:e,loaderConfig:n,kernelInfo:r})}let S=0;const{ABORT:H,INVOKE:N,OPEN:M,OPENED:R,RESPONSE:O}=f.MessageType;class V{static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return I(new v);if(!Z&&!P)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${E()}'`);Z=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){P=e||{}}let e;if(Z)try{e=new Worker(Z,{name:"esri-worker-"+S++})}catch(t){k.warn(L,P),e=new v}else k.warn(L,P),e=new v;return I(e)}();return new V(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:n}=t,r=(0,f.jt)();return new Promise(((t,o)=>{const a={resolve:t,reject:o,abortHandle:(0,s.$F)(n,(()=>{this._outJobs.delete(r),this._post({type:H,jobId:r})}))};this._outJobs.set(r,a),this._post({type:M,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,f.QM)(e);if(t)switch(t.type){case R:this._onOpenedMessage(t);break;case O:this._onResponseMessage(t);break;case H:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);r&&(r.controller&&r.controller.abort(),t.delete(n))}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:o}=e,a=o?new AbortController:null,i=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,r,{signal:a?a.signal:null})}catch(e){return void this._post({type:O,jobId:n,error:(0,f.AB)(e)})}(0,s.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:O,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),e||(e={message:"Error encountered at method"+t}),(0,s.D_)(e)||this._post({type:O,jobId:n,error:(0,f.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:O,jobId:n},u)}_onOpenedMessage(e){const{jobId:t,data:n}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,u.hw)(r.abortHandle),r.resolve(n))}_onResponseMessage(e){const{jobId:t,error:n,data:o}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,u.hw)(s.abortHandle),n?s.reject(r.Z.fromJSON(JSON.parse(n))):s.resolve(o))}_post(e,t,n){return(0,f.oi)(this.worker,e,t,n)}}const D=Math.min(navigator.hardwareConcurrency-1,(0,o.Z)("workers-pool-size"));let F=(0,o.Z)("esri-mobile")?Math.min(D,3):(0,o.Z)("host-browser")?D:0;F||(F=(0,o.Z)("safari")&&(0,o.Z)("mac")?7:2);let j=0;const x=[];async function C(e,t){const n=new a.Z;return await n.open(e,t),n}async function z(e,t={}){if("string"!=typeof e)throw new r.Z("workers:undefined-module","modulePath is missing");let n=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(n="local"),"local"===n){let n=await i.default.loadWorker(e);n||(n=await import(e)),(0,s.k_)(t.signal);const r=t.client||n;return C([i.default.connect(n)],{...t,client:r})}if(await async function(){if(J)return J;T=new AbortController;const e=[];for(let t=0;t<F;t++){const n=V.create(t).then((e=>(x[t]=e,e)));e.push(n)}return J=Promise.all(e),J}(),(0,s.k_)(t.signal),"dedicated"===n){const n=j++%F;return C([await x[n].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const n=Math.min(t.maxNumWorkers,F);if(n<F){const r=new Array(n);for(let o=0;o<n;++o){const n=j++%F;r[o]=x[n].open(e,t)}return C(r,t)}}return C(x.map((n=>n.open(e,t))),t)}let T,J=null},8667:(e,t,n)=>{n.d(t,{CJ:()=>D,Cz:()=>O,D$:()=>R,ED:()=>v,G0:()=>E,Gg:()=>k,JI:()=>Z,LV:()=>A,Nm:()=>b,Sp:()=>L,TE:()=>m,U1:()=>M,W4:()=>w,Y4:()=>j,cv:()=>S,e5:()=>P,f3:()=>H,fS:()=>g,j2:()=>V,jU:()=>d,kK:()=>y,kQ:()=>x,og:()=>_,oq:()=>u,r3:()=>h,rd:()=>N,sz:()=>F,uh:()=>p,wf:()=>I,z7:()=>f}),n(66577);var r=n(78346),o=(n(94139),n(33955));function s(e){return Array.isArray(e)?e[0]?.spatialReference:e?.spatialReference}function a(e){return e?Array.isArray(e)?e.map(a):e.toJSON?e.toJSON():e:e}function i(e){return Array.isArray(e)?e.map((e=>(0,o.im)(e))):(0,o.im)(e)}let l;async function c(e,t){return(await async function(){return l||(l=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:a(t)})}async function u(e,t){return i(await c("clip",[s(e),e,t]))}async function f(e,t){return i(await c("cut",[s(e),e,t]))}function h(e,t){return c("contains",[s(e),e,t])}function d(e,t){return c("crosses",[s(e),e,t])}function m(e,t,n){return c("distance",[s(e),e,t,n])}function g(e,t){return c("equals",[s(e),e,t])}function y(e,t){return c("intersects",[s(e),e,t])}function w(e,t){return c("touches",[s(e),e,t])}function p(e,t){return c("within",[s(e),e,t])}function v(e,t){return c("disjoint",[s(e),e,t])}function b(e,t){return c("overlaps",[s(e),e,t])}function A(e,t,n){return c("relate",[s(e),e,t,n])}function k(e){return c("isSimple",[s(e),e])}async function _(e){return i(await c("simplify",[s(e),e]))}async function Z(e,t=!1){return i(await c("convexHull",[s(e),e,t]))}async function P(e,t){return i(await c("difference",[s(e),e,t]))}async function L(e,t){return i(await c("symmetricDifference",[s(e),e,t]))}async function I(e,t){return i(await c("intersect",[s(e),e,t]))}async function E(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return i(await c("union",[s(n),n]))}async function S(e,t,n,r,o,a){return i(await c("offset",[s(e),e,t,n,r,o,a]))}async function H(e,t,n,r=!1){const o=[s(e),e,t,n,r];return i(await c("buffer",o))}async function N(e,t,n,r,o,a){const l=[s(e),e,t,n,r,o,a];return i(await c("geodesicBuffer",l))}async function M(e,t,n){if(null==e)throw new C;const r=e.spatialReference;if(null==(n=n??function(e){return"xmin"in e?e.center:"x"in e?e:e.extent?.center}(e)))throw new C;const o=e.constructor.fromJSON(await c("rotate",[r,e,t,n]));return o.spatialReference=r,o}async function R(e,t,n,r){return i(await c("generalize",[s(e),e,t,n,r]))}async function O(e,t,n){return i(await c("densify",[s(e),e,t,n]))}async function V(e,t,n,r=0){return i(await c("geodesicDensify",[s(e),e,t,n,r]))}function D(e,t){return c("planarArea",[s(e),e,t])}function F(e,t){return c("planarLength",[s(e),e,t])}function j(e,t,n){return c("geodesicArea",[s(e),e,t,n])}function x(e,t,n){return c("geodesicLength",[s(e),e,t,n])}class C extends Error{constructor(){super("Illegal Argument Exception")}}},2587:(e,t,n)=>{n(90344),n(18848),n(940),n(70171);var r=n(94443),o=n(3172),s=n(20102);async function a(e){if(null!=i.fetchBundleAsset)return i.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}const i={};var l,c=n(99880);(0,r.tz)((l={pattern:"esri/",location:c.V},new class{constructor({base:e="",pattern:t,location:n=new URL(window.location.href)}){let r;r="string"==typeof n?e=>new URL(e,new URL(n,window.location.href)).href:n instanceof URL?e=>new URL(e,n).href:n,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=r,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,n,o){const i=t.exec(n);if(!i)throw new s.Z("esri-intl:invalid-bundle",`Bundle id "${n}" is not compatible with the pattern "${t}"`);const l=i[1]?`${i[1]}/`:"",c=i[2],u=(0,r.Su)(o),f=`${l}${c}.json`,h=u?`${l}${c}_${u}.json`:f;let d;try{d=await a(e(h))}catch(t){if(h===f)throw new s.Z("intl:unknown-bundle",`Bundle "${n}" cannot be loaded`,{error:t});try{d=await a(e(f))}catch(e){throw new s.Z("intl:unknown-bundle",`Bundle "${n}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}(l)))},90344:(e,t,n)=>{n.d(t,{D5:()=>l,LJ:()=>P,Xr:()=>p,Ze:()=>k,cZ:()=>u,i$:()=>L,o5:()=>c,o8:()=>Z,p6:()=>_});var r=n(35454),o=n(70171),s=n(17126);const a={year:void 0,month:void 0,day:void 0,weekday:void 0},i={hour:void 0,minute:void 0,second:void 0},l={timeZoneName:"short"},c={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},u={timeZone:"Etc/UTC"},f={year:"numeric",month:"numeric",day:"numeric"},h={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},y={...g,second:"numeric"},w={"short-date":f,"short-date-short-time":{...f,...g},"short-date-short-time-24":{...f,...g,hour12:!1},"short-date-long-time":{...f,...y},"short-date-long-time-24":{...f,...y,hour12:!1},"short-date-le":f,"short-date-le-short-time":{...f,...g},"short-date-le-short-time-24":{...f,...g,hour12:!1},"short-date-le-long-time":{...f,...y},"short-date-le-long-time-24":{...f,...y,hour12:!1},"long-month-day-year":h,"long-month-day-year-short-time":{...h,...g},"long-month-day-year-short-time-24":{...h,...g,hour12:!1},"long-month-day-year-long-time":{...h,...y},"long-month-day-year-long-time-24":{...h,...y,hour12:!1},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...g},"day-short-month-year-short-time-24":{...d,...g,hour12:!1},"day-short-month-year-long-time":{...d,...y},"day-short-month-year-long-time-24":{...d,...y,hour12:!1},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...g,hour12:!1},"long-date-long-time":{...m,...y},"long-date-long-time-24":{...m,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":y},p=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),v={ar:"ar-u-nu-latn-ca-gregory"};let b=new WeakMap,A=w["short-date-short-time"];function k(e){return e?w[e]:null}function _(e,t){return function(e){const t=e||A;let n=b.get(t);if(!n){const e=(0,o.Kd)(),r=v[e]||e;n=new Intl.DateTimeFormat(r,t),b.set(t,n)}return n}(t).format(e)}function Z(e,t){return _(new Date(e),{...t,...u,...i})}function P(e,t){return _(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function L(e,t){const n=s.ou.fromISO(e,{setZone:!0}),r=(0,o.Kd)(),a=v[r]??r;return n.toLocaleString(t,{locale:a})}(0,o.Ze)((()=>{b=new WeakMap,A=w["short-date-short-time"]}))},94443:(e,t,n)=>{n.d(t,{ME:()=>d,Su:()=>m,tz:()=>h});var r=n(20102),o=n(95330),s=n(70171);const a=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,i={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){return e in i}const c=[],u=new Map;function f(e){for(const t of u.keys())g(e.pattern,t)&&u.delete(t)}function h(e){return c.includes(e)||(f(e),c.unshift(e)),{remove(){const t=c.indexOf(e);t>-1&&(c.splice(t,1),f(e))}}}async function d(e){const t=(0,s.Kd)();u.has(e)||u.set(e,async function(e,t){const n=[];for(const r of c)if(g(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){n.push(e)}if(n.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:n});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const n=u.get(e);return n&&await y.add(n),n}function m(e){if(!a.test(e))return null;const t=a.exec(e);if(null===t)return null;const[,n,r]=t,o=n+(r?"-"+r.toUpperCase():"");return l(o)?o:l(n)?n:null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{u.clear()}));const y=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,o.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,n)=>{n.d(t,{sh:()=>l,uf:()=>c});var r=n(70586),o=n(70171);const s={ar:"ar-u-nu-latn"};let a=new WeakMap,i={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function c(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||i;if(!a.has(t)){const n=(0,o.Kd)(),r=s[(0,o.Kd)()]||n;a.set(t,new Intl.NumberFormat(r,e))}return(0,r.j0)(a.get(t))}(t).format(e)}(0,o.Ze)((()=>{a=new WeakMap,i={}}))},940:(e,t,n)=>{n.d(t,{n:()=>c});var r=n(92604),o=n(78286),s=n(19153),a=n(90344),i=n(18848);const l=r.Z.getLogger("esri.intl.substitute");function c(e,t,n={}){const{format:r={}}=n;return(0,s.gx)(e,(e=>function(e,t,n){let r,s;const a=e.indexOf(":");if(-1===a?r=e.trim():(r=e.slice(0,a).trim(),s=e.slice(a+1).trim()),!r)return"";const i=(0,o.hS)(r,t);if(null==i)return"";const l=(s?n?.[s]:null)??n?.[r];return l?u(i,l):s?f(i,s):h(i)}(e,t,r)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,i.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),h(e)}}function f(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,i.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,i.uf)(e):h(e)}}function h(e){switch(typeof e){case"string":return e;case"number":return(0,i.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5653],{51773:(t,e,i)=>{i.d(e,{Z:()=>tt});var o=i(43697),r=i(2368),s=i(46791),n=i(96674),l=i(22974),a=i(92604),p=i(95330),d=i(5600),h=i(90578),c=i(71715),u=i(52011),y=i(30556),m=i(75215),f=i(35671),v=i(84649),g=i(63801),_=i(48074),w=i(38745),b=i(9190),I=i(10214),C=i(71423),x=i(44951);const F={base:null,key:"type",typeMap:{attachment:v.Z,media:I.Z,text:x.Z,expression:w.Z,field:b.Z,relationship:C.Z}};var j,Z=i(11223),S=i(422);i(67676),i(80442);let T=j=class extends n.wq{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new j({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],T.prototype,"returnTopmostRaster",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],T.prototype,"showNoDataRecords",void 0),T=j=(0,o._)([(0,u.j)("esri.popup.LayerOptions")],T);const N=T;var O,R=i(44729);let E=O=class extends n.wq{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new O({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,l.d9)(this.orderByFields):null})}};(0,o._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],E.prototype,"showRelatedRecords",void 0),(0,o._)([(0,d.Cb)({type:[R.Z],json:{write:!0}})],E.prototype,"orderByFields",void 0),E=O=(0,o._)([(0,u.j)("esri.popup.RelatedRecordsInfo")],E);const M=E;var A,D=i(79742),L=i(15923),P=i(10699);let U=A=class extends((0,P.IG)(L.Z)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new A({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};(0,o._)([(0,d.Cb)()],U.prototype,"active",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"className",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"disabled",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"icon",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"id",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"indicator",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"title",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"type",void 0),(0,o._)([(0,d.Cb)()],U.prototype,"visible",void 0),U=A=(0,o._)([(0,u.j)("esri.support.actions.ActionBase")],U);const B=U;var J;let k=J=class extends B{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new J({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,o._)([(0,d.Cb)()],k.prototype,"image",void 0),k=J=(0,o._)([(0,u.j)("esri.support.Action.ActionButton")],k);const $=k;var q;let H=q=class extends B{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new q({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,o._)([(0,d.Cb)()],H.prototype,"image",void 0),(0,o._)([(0,d.Cb)()],H.prototype,"value",void 0),H=q=(0,o._)([(0,u.j)("esri.support.Action.ActionToggle")],H);const Y=H,V=a.Z.getLogger("esri.PopupTemplate"),z="relationships/",W="expression/",K=s.Z.ofType({key:"type",defaultKeyValue:"button",base:B,typeMap:{button:$,toggle:Y}}),G={base:g.Z,key:"type",typeMap:{media:I.Z,custom:_.Z,text:x.Z,attachments:v.Z,fields:b.Z,expression:w.Z,relationship:C.Z}},X=["attachments","fields","media","text","expression","relationship"];let Q=class extends((0,r.J)(n.wq)){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map((t=>(0,m.N7)(G,t))):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,p.y8)(t)?t:(V.error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:i}=e;return Array.isArray(i)&&i.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,i):this._readPopupInfo(e)}writeContent(t,e,i,o){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter((t=>X.includes(t.type))).map((t=>t&&t.toJSON(o))),e.popupElements.forEach((t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)}))):e.description=t}writeFieldInfos(t,e,i,o){const{content:r}=this,s=Array.isArray(r)?r:null;if(t){const i=s?s.filter((t=>"fields"===t.type)):[],r=i.length&&i.every((t=>t.fieldInfos?.length));e.fieldInfos=t.filter(Boolean).map((t=>{const e=t.toJSON(o);return r&&(e.visible=!1),e}))}if(s)for(const t of s)"fields"===t.type&&this._writeFieldsContent(t,e)}writeLayerOptions(t,e,i,o){e[i]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(o)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e){const i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,[...i,...this._getContentExpressionInfos(this.content,i)]),(0,f.gd)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const e=new Set;return await this.collectRequiredFields(e,t),[...e].sort()}_writeFieldsContent(t,e){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const i=(0,l.d9)(t.fieldInfos);Array.isArray(e.fieldInfos)?i.forEach((t=>{const i=e.fieldInfos.find((e=>e.fieldName.toLowerCase()===t.fieldName.toLowerCase()));i?i.visible=!0:e.fieldInfos.push(t)})):e.fieldInfos=i}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const i=t.orderByFields?.map((e=>this._toFieldOrderJSON(e,t.relationshipId)))||[],o=[...e.relatedRecordsInfo?.orderByFields||[],...i];e.relatedRecordsInfo={showRelatedRecords:!0,...o?.length&&{orderByFields:o}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const i=(0,l.d9)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...i]:e.mediaInfos=i}_readPopupInfoElements(t,e,i){const o={description:!1,mediaInfos:!1};return i.map((i=>"media"===i.type?(i.mediaInfos||!e||o.mediaInfos||(i.mediaInfos=e,o.mediaInfos=!0),I.Z.fromJSON(i)):"text"===i.type?(i.text||!t||o.description||(i.text=t,o.description=!0),x.Z.fromJSON(i)):"attachments"===i.type?v.Z.fromJSON(i):"fields"===i.type?b.Z.fromJSON(i):"expression"===i.type?w.Z.fromJSON(i):"relationship"===i.type?C.Z.fromJSON(i):void 0)).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:i}=t;if(!e?.startsWith(z))return null;const o=e.replace(z,"").split("/");if(2!==o.length)return null;const r=parseInt(o[0],10),s=o[1];return"number"==typeof r&&s?C.Z.fromJSON({relationshipId:r,orderByFields:[{field:s,order:i}]}):null}_toFieldOrderJSON(t,e){const{order:i,field:o}=t;return{field:`${z}${e}/${o}`,order:i}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:i,relatedRecordsInfo:o={showRelatedRecords:!1}}){const r=[];t?r.push(new x.Z({text:t})):r.push(new b.Z),Array.isArray(e)&&e.length&&r.push(I.Z.fromJSON({mediaInfos:e})),i&&r.push(v.Z.fromJSON({displayType:"auto"}));const{showRelatedRecords:s,orderByFields:n}=o;return s&&n?.length&&n.forEach((t=>{const e=this._toRelationshipContent(t);e&&r.push(e)})),r.length?r:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce(((t,e)=>[...t,...this._getMediaInfoFields(e)]),[])]}return"text"===e?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:e,title:i,value:o}=t,r=o||{},{fields:s,normalizeField:n,tooltipField:l,sourceURL:a,linkURL:p}=r,d=[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(a),...this._extractFieldNames(p),...s??[]];return n&&d.push(n),l&&d.push(l),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce(((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]]),e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce(((t,e)=>[...t,...this._getContentElementFields(e)]),[]):[]}async _collectExpressionInfoFields(t,e,i){i&&await Promise.all(i.map((i=>(0,f.io)(t,e,i.expression))))}_getFieldInfoFields(t){return t?t.filter((t=>void 0===t.visible||!!t.visible)).map((t=>t.fieldName)).filter((t=>!t.startsWith(z)&&!t.startsWith(W))):[]}_getActionsFields(t){return t?t.toArray().reduce(((t,e)=>[...t,...this._getActionFields(e)]),[]):[]}_getActionFields(t){const{className:e,title:i,type:o}=t,r="button"===o||"toggle"===o?t.image:"";return[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||"string"!=typeof t)return[];const e=t.match(/{[^}]*}/g);if(!e)return[];const i=/\{(\w+):.+\}/,o=e.filter((t=>!(0===t.indexOf(`{${z}`)||0===t.indexOf(`{${W}`)))).map((t=>t.replace(i,"{$1}")));return o?o.map((t=>t.slice(1,-1))):[]}};(0,o._)([(0,d.Cb)({type:K})],Q.prototype,"actions",void 0),(0,o._)([(0,d.Cb)()],Q.prototype,"content",void 0),(0,o._)([(0,h.p)("content")],Q.prototype,"castContent",null),(0,o._)([(0,c.r)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],Q.prototype,"readContent",null),(0,o._)([(0,y.c)("content",{popupElements:{type:s.Z.ofType(F)},showAttachments:{type:Boolean},mediaInfos:{type:s.Z.ofType(D.V)},description:{type:String},relatedRecordsInfo:{type:M}})],Q.prototype,"writeContent",null),(0,o._)([(0,d.Cb)({type:[Z.Z],json:{write:!0}})],Q.prototype,"expressionInfos",void 0),(0,o._)([(0,d.Cb)({type:[S.Z]})],Q.prototype,"fieldInfos",void 0),(0,o._)([(0,y.c)("fieldInfos")],Q.prototype,"writeFieldInfos",null),(0,o._)([(0,d.Cb)({type:N})],Q.prototype,"layerOptions",void 0),(0,o._)([(0,y.c)("layerOptions")],Q.prototype,"writeLayerOptions",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Q.prototype,"lastEditInfoEnabled",void 0),(0,o._)([(0,d.Cb)()],Q.prototype,"outFields",void 0),(0,o._)([(0,d.Cb)()],Q.prototype,"overwriteActions",void 0),(0,o._)([(0,d.Cb)()],Q.prototype,"returnGeometry",void 0),(0,o._)([(0,d.Cb)({json:{type:String}})],Q.prototype,"title",void 0),(0,o._)([(0,y.c)("title")],Q.prototype,"writeTitle",null),Q=(0,o._)([(0,u.j)("esri.PopupTemplate")],Q);const tt=Q},90344:(t,e,i)=>{i.d(e,{D5:()=>a,LJ:()=>F,Xr:()=>g,Ze:()=>I,cZ:()=>d,i$:()=>j,o5:()=>p,o8:()=>x,p6:()=>C});var o=i(35454),r=i(70171),s=i(17126);const n={year:void 0,month:void 0,day:void 0,weekday:void 0},l={hour:void 0,minute:void 0,second:void 0},a={timeZoneName:"short"},p={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},d={timeZone:"Etc/UTC"},h={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},y={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},f={...m,second:"numeric"},v={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...m,hour12:!1},"short-date-long-time":{...h,...f},"short-date-long-time-24":{...h,...f,hour12:!1},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...m,hour12:!1},"short-date-le-long-time":{...h,...f},"short-date-le-long-time-24":{...h,...f,hour12:!1},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...m},"long-month-day-year-short-time-24":{...c,...m,hour12:!1},"long-month-day-year-long-time":{...c,...f},"long-month-day-year-long-time-24":{...c,...f,hour12:!1},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...m},"day-short-month-year-short-time-24":{...u,...m,hour12:!1},"day-short-month-year-long-time":{...u,...f},"day-short-month-year-long-time-24":{...u,...f,hour12:!1},"long-date":y,"long-date-short-time":{...y,...m},"long-date-short-time-24":{...y,...m,hour12:!1},"long-date-long-time":{...y,...f},"long-date-long-time-24":{...y,...f,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":f},g=(0,o.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),_={ar:"ar-u-nu-latn-ca-gregory"};let w=new WeakMap,b=v["short-date-short-time"];function I(t){return t?v[t]:null}function C(t,e){return function(t){const e=t||b;let i=w.get(e);if(!i){const t=(0,r.Kd)(),o=_[t]||t;i=new Intl.DateTimeFormat(o,e),w.set(e,i)}return i}(e).format(t)}function x(t,e){return C(new Date(t),{...e,...d,...l})}function F(t,e){return C(new Date(`1970-01-01T${t}Z`),{...e,...d,...n})}function j(t,e){const i=s.ou.fromISO(t,{setZone:!0}),o=(0,r.Kd)(),n=_[o]??o;return i.toLocaleString(e,{locale:n})}(0,r.Ze)((()=>{w=new WeakMap,b=v["short-date-short-time"]}))},18848:(t,e,i)=>{i.d(e,{sh:()=>a,uf:()=>p});var o=i(70586),r=i(70171);const s={ar:"ar-u-nu-latn"};let n=new WeakMap,l={};function a(t={}){const e={};return null!=t.digitSeparator&&(e.useGrouping=t.digitSeparator),null!=t.places&&(e.minimumFractionDigits=e.maximumFractionDigits=t.places),e}function p(t,e){return Object.is(t,-0)&&(t=0),function(t){const e=t||l;if(!n.has(e)){const i=(0,r.Kd)(),o=s[(0,r.Kd)()]||i;n.set(e,new Intl.NumberFormat(o,t))}return(0,o.j0)(n.get(e))}(e).format(t)}(0,r.Ze)((()=>{n=new WeakMap,l={}}))},16859:(t,e,i)=>{i.d(e,{I:()=>I});var o=i(43697),r=i(68773),s=i(40330),n=i(3172),l=i(66643),a=i(20102),p=i(92604),d=i(70586),h=i(95330),c=i(17452),u=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),m=i(52011),f=i(30556),v=i(84230),g=i(65587),_=i(15235),w=i(86082),b=i(14661);const I=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,i){if(e.itemId)return new _.default({id:e.itemId,portal:i&&i.portal})}writePortalItem(t,e){t&&t.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem&&this.portalItem.id)try{const o=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(e),await o.load({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,h.D_)(t)||p.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,h.r9)(t),!0))))}async _setUserPrivileges(t,e){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:i,fullEdit:o},content:{updateItem:r}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",o),this._set("userHasUpdateItemPrivileges",r)}catch(t){(0,h.r9)(t)}}async _fetchUserPrivileges(t,e){let i=this.portalItem;if(!t||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(e);const o=t===i.id;if(o&&i.portal.user)return(0,b.Ss)(i);let r,n;if(o)r=i.portal.url;else try{r=await(0,v.oP)(this.url,e)}catch(t){(0,h.r9)(t)}if(!r||!(0,c.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(s.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,h.r9)(t)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await i.reload():(i=new _.default({id:t,portal:{url:r}}),await i.load(e)),i.portal.user)return(0,b.Ss)(i)}catch(t){(0,h.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,h.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?s.id?.findCredential(this.url):null;if(!e)return!0;const i=C.credential===e?C.user:await this._fetchEditingUser(t);return C.credential=e,C.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const o=`${i.owningSystemUrl}/sharing/rest`,r=g.Z.getDefault();if(r&&r.loaded&&(0,c.Fv)(r.restUrl)===(0,c.Fv)(o))return r.user;const a=`${o}/community/self`,p=null!=t?t.signal:null,d=await(0,l.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return d.ok?w.default.fromJSON(d.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const i=e&&e.portal,o=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return i&&o&&!(0,c.tm)(o.restUrl,i.restUrl)?(e.messages&&e.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,o._)([(0,u.Cb)({type:_.default})],e.prototype,"portalItem",null),(0,o._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,o._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,o._)([(0,u.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,o._)([(0,u.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,o._)([(0,u.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,o._)([(0,m.j)("esri.layers.mixins.PortalLayer")],e),e},C={credential:null,user:null}},11223:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(96674),n=i(5600),l=(i(75215),i(67676),i(80442),i(52011));let a=o=class extends s.wq{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new o({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"expression",void 0),(0,r._)([(0,n.Cb)({type:["string","number"],json:{write:!0}})],a.prototype,"returnType",void 0),a=o=(0,r._)([(0,l.j)("esri.popup.ExpressionInfo")],a);const p=a},422:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r=i(43697),s=i(35454),n=i(96674),l=i(22974),a=i(5600),p=(i(75215),i(36030)),d=i(52011),h=i(29986);let c=o=class extends n.wq{constructor(t){super(t),this.fieldName=null,this.format=null,this.isEditable=!1,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new o({fieldName:this.fieldName,format:this.format?(0,l.d9)(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0),(0,r._)([(0,a.Cb)({type:h.Z,json:{write:!0}})],c.prototype,"format",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0,default:!1}})],c.prototype,"isEditable",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,r._)([(0,p.J)(new s.X({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],c.prototype,"stringFieldOption",void 0),(0,r._)([(0,a.Cb)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],c.prototype,"statisticType",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"tooltip",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"visible",void 0),c=o=(0,r._)([(0,d.j)("esri.popup.FieldInfo")],c);const u=c},84649:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(63801);let a=o=class extends l.Z{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new o({description:this.description,displayType:this.displayType,title:this.title})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,r._)([(0,s.Cb)({type:["auto","preview","list"],json:{write:!0}})],a.prototype,"displayType",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.content.AttachmentsContent")],a);const p=a},41463:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="bar-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.BarChartMediaInfo")],p);const d=p},87131:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="column-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.ColumnChartMediaInfo")],p);const d=p},63801:(t,e,i)=>{i.d(e,{Z:()=>a});var o=i(43697),r=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let l=class extends r.wq{constructor(t){super(t),this.type=null}};(0,o._)([(0,s.Cb)({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=(0,o._)([(0,n.j)("esri.popup.content.Content")],l);const a=l},48074:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(63801);let p=o=class extends a.Z{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new o({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,s.d9)(this.outFields):null})}};(0,r._)([(0,n.Cb)()],p.prototype,"creator",void 0),(0,r._)([(0,n.Cb)()],p.prototype,"destroyer",void 0),(0,r._)([(0,n.Cb)()],p.prototype,"outFields",void 0),(0,r._)([(0,n.Cb)({type:["custom"],readOnly:!0})],p.prototype,"type",void 0),p=o=(0,r._)([(0,l.j)("esri.popup.content.CustomContent")],p);const d=p},38745:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(96674);let a=o=class extends l.wq{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new o({title:this.title,expression:this.expression})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"expression",void 0),(0,r._)([(0,s.Cb)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"returnType",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.ElementExpressionInfo")],a);const p=a;var d,h=i(63801);let c=d=class extends h.Z{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new d({expressionInfo:this.expressionInfo?.clone()})}};(0,r._)([(0,s.Cb)({type:p,json:{write:!0}})],c.prototype,"expressionInfo",void 0),(0,r._)([(0,s.Cb)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=d=(0,r._)([(0,n.j)("esri.popup.content.ExpressionContent")],c);const u=c},9190:(t,e,i)=>{i.d(e,{Z:()=>c});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(30556),p=i(422),d=i(63801);let h=o=class extends d.Z{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map((t=>t.toJSON()))}clone(){return new o((0,s.d9)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],h.prototype,"attributes",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,r._)([(0,n.Cb)({type:[p.Z]})],h.prototype,"fieldInfos",void 0),(0,r._)([(0,a.c)("fieldInfos")],h.prototype,"writeFieldInfos",null),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],h.prototype,"type",void 0),h=o=(0,r._)([(0,l.j)("esri.popup.content.FieldsContent")],h);const c=h},13151:(t,e,i)=>{i.d(e,{Z:()=>u});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(35320),a=i(96674);let p=o=class extends a.wq{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new o({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"linkURL",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"sourceURL",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.support.ImageMediaInfoValue")],p);const d=p;var h;let c=h=class extends l.Z{constructor(t){super(t),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new h({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:Number,json:{write:!0}})],c.prototype,"refreshInterval",void 0),(0,r._)([(0,s.Cb)({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:d,json:{write:!0}})],c.prototype,"value",void 0),c=h=(0,r._)([(0,n.j)("esri.popup.content.ImageMediaInfo")],c);const u=c},55869:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="line-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.LineChartMediaInfo")],p);const d=p},10214:(t,e,i)=>{i.d(e,{Z:()=>g});var o,r=i(43697),s=i(22974),n=i(5600),l=(i(75215),i(71715)),a=i(52011),p=i(30556),d=i(41463),h=i(87131),c=i(63801),u=i(13151),y=i(55869),m=i(13353),f=i(79742);let v=o=class extends c.Z{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map((t=>"image"===t.type?u.Z.fromJSON(t):"barchart"===t.type?d.Z.fromJSON(t):"columnchart"===t.type?h.Z.fromJSON(t):"linechart"===t.type?y.Z.fromJSON(t):"piechart"===t.type?m.Z.fromJSON(t):void 0)).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map((t=>t.toJSON()))}clone(){return new o((0,s.d9)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r._)([(0,n.Cb)()],v.prototype,"activeMediaInfoIndex",void 0),(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],v.prototype,"attributes",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],v.prototype,"description",void 0),(0,r._)([(0,n.Cb)({types:[f.V]})],v.prototype,"mediaInfos",void 0),(0,r._)([(0,l.r)("mediaInfos")],v.prototype,"readMediaInfos",null),(0,r._)([(0,p.c)("mediaInfos")],v.prototype,"writeMediaInfos",null),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],v.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],v.prototype,"type",void 0),v=o=(0,r._)([(0,a.j)("esri.popup.content.MediaContent")],v);const g=v},13353:(t,e,i)=>{i.d(e,{Z:()=>d});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(50379),a=i(87102);let p=o=class extends l.Z{constructor(t){super(t),this.type="pie-chart"}clone(){return new o({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,s.Cb)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:a.l.write}})],p.prototype,"type",void 0),p=o=(0,r._)([(0,n.j)("esri.popup.content.PieChartMediaInfo")],p);const d=p},71423:(t,e,i)=>{i.d(e,{Z:()=>h});var o=i(43697),r=i(2368),s=i(5600),n=i(75215),l=(i(67676),i(80442),i(52011)),a=i(63801),p=i(44729);let d=class extends((0,r.J)(a.Z)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"displayCount",void 0),(0,o._)([(0,s.Cb)({type:["list"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,o._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"relationshipId",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=(0,o._)([(0,l.j)("esri.popup.content.RelationshipContent")],d);const h=d},44951:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(63801);let a=o=class extends l.Z{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new o({text:this.text})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"text",void 0),(0,r._)([(0,s.Cb)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=o=(0,r._)([(0,n.j)("esri.popup.content.TextContent")],a);const p=a},50379:(t,e,i)=>{i.d(e,{Z:()=>v});var o,r=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),l=i(35320),a=i(96674),p=i(22974),d=i(15923);let h=o=class extends d.Z{constructor(t){super(t),this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new o({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r._)([(0,s.Cb)()],h.prototype,"fieldName",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"tooltip",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"value",void 0),h=o=(0,r._)([(0,n.j)("esri.popup.content.support.ChartMediaInfoValueSeries")],h);const c=h;var u;let y=u=class extends a.wq{constructor(t){super(t),this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new u({fields:(0,p.d9)(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};(0,r._)([(0,s.Cb)({type:[String],json:{write:!0}})],y.prototype,"fields",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizeField",void 0),(0,r._)([(0,s.Cb)({type:[c],json:{read:!1}})],y.prototype,"series",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],y.prototype,"tooltipField",void 0),y=u=(0,r._)([(0,n.j)("esri.popup.content.support.ChartMediaInfoValue")],y);const m=y;let f=class extends l.Z{constructor(t){super(t),this.type=null,this.value=null}};(0,r._)([(0,s.Cb)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],f.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:m,json:{write:!0}})],f.prototype,"value",void 0),f=(0,r._)([(0,n.j)("esri.popup.content.mixins.ChartMediaInfo")],f);const v=f},35320:(t,e,i)=>{i.d(e,{Z:()=>a});var o=i(43697),r=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let l=class extends r.wq{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"altText",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"caption",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=(0,o._)([(0,n.j)("esri.popup.content.mixins.MediaInfo")],l);const a=l},87102:(t,e,i)=>{i.d(e,{l:()=>o});const o=(0,i(35454).w)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},79742:(t,e,i)=>{i.d(e,{V:()=>a});var o=i(41463),r=i(87131),s=i(13151),n=i(55869),l=i(13353);const a={base:i(35320).Z,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":o.Z,"column-chart":r.Z,"line-chart":n.Z,"pie-chart":l.Z,image:s.Z}}},29986:(t,e,i)=>{i.d(e,{Z:()=>u});var o=i(43697),r=i(2368),s=i(96674),n=i(5600),l=i(75215),a=(i(67676),i(80442),i(36030)),p=i(52011),d=i(90344),h=i(18848);let c=class extends((0,r.J)(s.wq)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}formatNumber(t){return(0,h.uf)(t,(0,h.sh)(this))}formatDate(t,e=!1){return this.dateFormat?(0,d.p6)(t,{...(0,d.Ze)(this.dateFormat),...e&&d.cZ}):this.formatNumber(t)}formatDateOnly(t){return(0,d.o8)(t,{...(0,d.Ze)(this.dateFormat)})}formatTimeOnly(t){return(0,d.LJ)(t,{...(0,d.Ze)(this.dateFormat)})}formatTimestamp(t){return(0,d.i$)(t,{...(0,d.Ze)(this.dateFormat),...d.o5,...d.D5})}formatRasterPixelValue(t){return t.includes("-")?t:t.trim().includes(",")?this._formatDelimitedString(t,",",", "):t.trim().includes(";")?this._formatDelimitedString(t,";","; "):t.trim().includes(" ")?this._formatDelimitedString(t," "," "):this.formatNumber(Number(t))}_formatDelimitedString(t,e,i){return t&&e&&i?t.trim().split(e).map((t=>this.formatNumber(Number(t)))).join(i):t}};(0,o._)([(0,a.J)(d.Xr)],c.prototype,"dateFormat",void 0),(0,o._)([(0,n.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),(0,o._)([(0,n.Cb)({type:l.z8,json:{write:!0}})],c.prototype,"places",void 0),c=(0,o._)([(0,p.j)("esri.popup.support.FieldInfoFormat")],c);const u=c},44729:(t,e,i)=>{i.d(e,{Z:()=>p});var o,r=i(43697),s=i(96674),n=i(5600),l=(i(75215),i(67676),i(80442),i(52011));let a=o=class extends s.wq{constructor(t){super(t),this.field=null,this.order=null}clone(){return new o({field:this.field,order:this.order})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"field",void 0),(0,r._)([(0,n.Cb)({type:["asc","desc"],json:{write:!0}})],a.prototype,"order",void 0),a=o=(0,r._)([(0,l.j)("esri.popup.support.RelatedRecordsInfoFieldOrder")],a);const p=a}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4475],{84475:(e,t,s)=>{s.r(t),s.d(t,{DictionaryLoader:()=>d});var i=s(22303),o=s(3172),n=s(20102),r=(s(80442),s(92604)),l=s(13867),a=s(95330),c=s(19153),u=s(99514),h=s(59266),f=s(17386);const m="esri.renderers.support.DictionaryLoader",y={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class d{constructor(e,t,s){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new l.Z(100),this._fieldIndex=null,this._dictionaryPromise=null,this.url=e,this.config=t,this.fieldMap=s}getSymbolFields(){return this._symbolFields}async getSymbolAsync(e,t){let s;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{s=await this._dictionaryPromise}catch(e){if((0,a.D_)(e))return this._dictionaryPromise=null,null}const o={};if(this.fieldMap)for(const t of this._symbolFields){const s=this._getFieldName(this.fieldMap[t]);o[t]=s?""+e.attributes[s]:""}let n=null;try{n=s?.(o,t)}catch(e){return null}if(!n||"string"!=typeof n)return null;const r=(0,c.hP)(n).toString(),l=this._symbolCache.get(r);if(l)return l.catch((()=>{this._symbolCache.pop(r)})),l;const u=n.split(";"),h=[],f=[];for(const e of u)if(e)if(e.includes("po:")){const t=e.substr(3).split("|");if(3===t.length){const e=t[0],s=t[1];let o=t[2];if("DashTemplate"===s)o=o.split(" ").map((e=>Number(e)));else if("Color"===s){const e=new i.Z(o).toRgba();o=[e[0],e[1],e[2],255*e[3]]}else o=Number(o);f.push({primitiveName:e,propertyName:s,value:o})}}else if(e.includes("|")){for(const t of e.split("|"))if(this._itemNames.has(t)){h.push(t);break}}else this._itemNames.has(e)&&h.push(e);const m=null==e.geometry||!e.geometry.hasZ&&"point"===e.geometry.type,y=this._cimPartsToCIMSymbol(h,f,m,t);return this._symbolCache.put(r,y,1),y}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void r.Z.getLogger(m).error("no valid URL!");const t=(0,o.default)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},signal:null!=e?e.signal:null}),[{data:s}]=await Promise.all([t,(0,h.LC)()]);if(!s)throw this._dictionaryPromise=null,new n.Z("esri.renderers.DictionaryRenderer","Bad dictionary data!");const i=s.expression,l=s.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+s.cimRefTemplateUrl,this._itemNames=new Set(s.itemsNames),this._symbolFields=l.symbol;const a={};if(this.config){const e=this.config;for(const t in e)a[t]=e[t]}if(l.configuration)for(const e of l.configuration)a.hasOwnProperty(e.name)||(a[e.name]=e.value);const c=[];if(null!=e&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const s=this.fieldMap[t],i=e.fields.filter((e=>e.name.toLowerCase()===s?.toLowerCase()));i.length>0&&c.push({...i[0],type:"esriFieldTypeString"})}c.length>0&&(this._fieldIndex=new u.Z(c));const f=(0,h.pp)(i,null!=e?e.spatialReference:null,c,a).then((e=>{const t={scale:0};return(s,i)=>{if(null==e)return null;const o=e.repurposeFeature({geometry:null,attributes:s});return t.scale=null!=i?i.scale??void 0:void 0,e.evaluate({$feature:o,$view:t})}})).catch((e=>(r.Z.getLogger(m).error("Creating dictinoary expression failed:",e),null)));return this._dictionaryPromise=f,f}async _cimPartsToCIMSymbol(e,t,s,i){const o=new Array(e.length);for(let t=0;t<e.length;t++)o[t]=this._getSymbolPart(e[t],i);const n=await Promise.all(o),r=this.fieldMap;if(r)for(const e of n)p(e,r);return new f.Z({data:this._combineSymbolParts(n,t,s)})}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const s=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=(0,o.default)(s,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,i);try{return(await i).data}catch(t){throw this._ongoingRequests.delete(e),t}}_combineSymbolParts(e,t,s){if(!e||0===e.length)return null;const i={...e[0]};if(e.length>1){i.symbolLayers=[];for(const t of e){const e=t;i.symbolLayers.unshift(...e.symbolLayers)}}return s&&(i.callout=y),{type:"CIMSymbolReference",symbol:i,primitiveOverrides:t}}_getFieldName(e){if(null!==this._fieldIndex){const t=this._fieldIndex.get(e);return t?t.name:e}return e}}function p(e,t){if(!e)return;const s=e.symbolLayers;if(!s)return;let i=s.length;for(;i--;){const e=s[i];e&&!1!==e.enable&&"CIMVectorMarker"===e.type&&g(e,t)}}function g(e,t){const s=e.markerGraphics;if(s)for(const e of s){if(!e)continue;const s=e.symbol;if(s)switch(s.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":p(s,t);break;case"CIMTextSymbol":s.fieldMap=t}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9169],{29169:(e,t,i)=>{i.d(t,{default:()=>m});var s=i(20102),r=i(92604),o=i(24470),a=i(20322),n=i(10402),h=i(17590),l=i(11490),d=i(14165),u=i(74259);const c=r.Z.getLogger("esri.views.2d.layers.features.support.whereUtils"),_={getAttribute:(e,t)=>e.field(t)};async function y(e,t){const r=await Promise.resolve().then(i.bind(i,41534));try{const i=r.WhereClause.create(e,t);if(!i.isStandardized){const e=new s.Z("mapview - bad input","Unable to apply filter's definition expression, as expression is not standardized.",i);c.error(e)}return e=>{const t=e.readArcadeFeature();return i.testFeature(t,_)}}catch(t){return c.warn("mapview-bad-where-clause","Encountered an error when evaluating where clause",e),e=>!0}}class m{constructor(e){this._geometryBounds=(0,o.Ue)(),this._idToVisibility=new Map,this._serviceInfo=e}get hash(){return this._hash}check(e){return this._applyFilter(e)}clear(){const e=this._resetAllHiddenIds();return this.update(),{show:e,hide:[]}}invalidate(){this._idToVisibility.forEach(((e,t)=>{this._idToVisibility.set(t,0)}))}setKnownIds(e){for(const t of e)this._idToVisibility.set(t,1)}setTrue(e){const t=[],i=[],s=new Set(e);return this._idToVisibility.forEach(((e,r)=>{const o=!!(1&this._idToVisibility.get(r)),a=s.has(r);!o&&a?t.push(r):o&&!a&&i.push(r),this._idToVisibility.set(r,a?3:0)})),{show:t,hide:i}}createQuery(){const{geometry:e,spatialRel:t,where:i,timeExtent:s,objectIds:r}=this;return d.Z.fromJSON({geometry:e,spatialRel:t,where:i,timeExtent:s,objectIds:r})}async update(e,t){this._hash=JSON.stringify(e);const i=await(0,l.j6)(e,null,t);await Promise.all([this._setGeometryFilter(i),this._setIdFilter(i),this._setAttributeFilter(i),this._setTimeFilter(i)])}async _setAttributeFilter(e){if(!e||!e.where)return this._clause=null,void(this.where=null);this._clause=await y(e.where,this._serviceInfo.fieldsIndex),this.where=e.where}_setIdFilter(e){this._idsToShow=e&&e.objectIds&&new Set(e.objectIds),this._idsToHide=e&&e.hiddenIds&&new Set(e.hiddenIds),this.objectIds=e&&e.objectIds}async _setGeometryFilter(e){if(!e||!e.geometry)return this._spatialQueryOperator=null,this.geometry=null,void(this.spatialRel=null);const t=e.geometry,i=e.spatialRel||"esriSpatialRelIntersects",s=await(0,n.cW)(i,t,this._serviceInfo.geometryType,this._serviceInfo.hasZ,this._serviceInfo.hasM);(0,a.$P)(this._geometryBounds,t),this._spatialQueryOperator=s,this.geometry=t,this.spatialRel=i}_setTimeFilter(e){if(this.timeExtent=this._timeOperator=null,e&&e.timeExtent)if(this._serviceInfo.timeInfo)this.timeExtent=e.timeExtent,this._timeOperator=(0,h.y)(this._serviceInfo.timeInfo,e.timeExtent,u.k);else{const t=new s.Z("feature-layer-view:time-filter-not-available","Unable to apply time filter, as layer doesn't have time metadata.",e.timeExtent);r.Z.getLogger("esri.views.2d.layers.features.controllers.FeatureFilter").error(t)}}_applyFilter(e){return this._filterByGeometry(e)&&this._filterById(e)&&this._filterByTime(e)&&this._filterByExpression(e)}_filterByExpression(e){return!this.where||this._clause(e)}_filterById(e){return(!this._idsToHide||!this._idsToHide.size||!this._idsToHide.has(e.getObjectId()))&&(!this._idsToShow||!this._idsToShow.size||this._idsToShow.has(e.getObjectId()))}_filterByGeometry(e){if(!this.geometry)return!0;const t=e.readHydratedGeometry();return!!t&&this._spatialQueryOperator(t)}_filterByTime(e){return null==this._timeOperator||this._timeOperator(e)}_resetAllHiddenIds(){const e=[];return this._idToVisibility.forEach(((t,i)=>{1&t||(this._idToVisibility.set(i,1),e.push(i))})),e}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8828],{18828:(e,t,n)=>{n.r(t),n.d(t,{executeScript:()=>z,extend:()=>Y,functionHelper:()=>_});var r=n(17057),a=n(92089),o=n(33586),i=n(27535),l=n(15274),s=n(9609),c=n(61363),u=n(90077),f=n(84211),w=n(13976),p=n(66748),d=n(12834),h=n(38176),g=n(58130),v=n(27360),m=n(9361),y=n(82971);function b(e){return e&&"function"==typeof e.then}const V=100;async function S(e,t){const n=[];for(let r=0;r<t.arguments.length;r++)n.push(await C(e,t.arguments[r]));return n}async function x(e,t,n){return!0===t.preparsed?n(e,null,t.arguments):n(e,t,await S(e,t))}class H extends s.Rm{constructor(e,t){super(),this.definition=null,this.context=null,this.definition=e,this.context=t}createFunction(e){return(...t)=>{const n={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeReference:this.context.timeReference??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,localScope:{},depthCounter:{depth:e.depthCounter+1},globalScope:this.context.globalScope};if(n.depthCounter.depth>64)throw new i.aV(e,i.rH.MaximumCallDepth,null);return D(this.definition,n,t,null)}}call(e,t){return I(e,t,((n,r,a)=>{const o={spatialReference:e.spatialReference,services:e.services,console:e.console,libraryResolver:e.libraryResolver,exports:e.exports,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,localScope:{},abortSignal:e.abortSignal,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1}};if(o.depthCounter.depth>64)throw new i.aV(e,i.rH.MaximumCallDepth,t);return D(this.definition,o,a,t)}))}marshalledCall(e,t,n,r){return r(e,t,(async(a,o,i)=>{const l={spatialReference:e.spatialReference,globalScope:n.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,abortSignal:e.abortSignal,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,localScope:{}};return i=i.map((t=>!(0,c.i)(t)||t instanceof s.Vg?t:(0,s.aq)(t,e,r))),(0,s.aq)(await D(this.definition,l,i,t),n,r)}))}}class R extends r.P{constructor(e){super(e)}async global(e){const t=this.executingContext.globalScope[e.toLowerCase()];if(t.valueset||(t.value=await C(this.executingContext,t.node),t.valueset=!0),(0,c.i)(t.value)&&!(t.value instanceof s.Vg)){const e=new s.Vg;e.fn=t.value,e.parameterEvaluator=I,e.context=this.executingContext,t.value=e}return t.value}setGlobal(e,t){if((0,c.i)(t))throw new i.aV(null,i.rH.AssignModuleFunction,null);this.executingContext.globalScope[e.toLowerCase()]={value:t,valueset:!0,node:null}}hasGlobal(e){return void 0===this.executingContext.exports[e]&&(e=e.toLowerCase()),void 0!==this.executingContext.exports[e]}async loadModule(e){let t=e.spatialReference;null==t&&(t=new y.Z({wkid:102100})),this.moduleScope=U({},e.customfunctions,e.timeReference),this.executingContext={spatialReference:t,services:e.services,libraryResolver:new a.s(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},abortSignal:void 0===e.abortSignal||null===e.abortSignal?{aborted:!1}:e.abortSignal,globalScope:this.moduleScope,console:e.console??W,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,localScope:null,depthCounter:{depth:1}},await C(this.executingContext,this.source.syntax)}}async function I(e,t,n){if(!0===t.preparsed){const r=n(e,null,t.arguments);return b(r),r}const r=n(e,t,await S(e,t));return b(r),r}async function C(e,t,n){if(t.breakpoint&&!0!==n){const n=t.breakpoint();return await n,C(e,t,!0)}try{switch(t?.type){case"VariableDeclarator":return await async function(e,t){let n=null;if(n=null===t.init?null:await C(e,t.init),null!==e.localScope){if(n===c.v&&(n=null),"Identifier"!==t.id.type)throw new i.aV(e,i.rH.InvalidIdentifier,t);const r=t.id.name.toLowerCase();return null!=e.localScope&&(e.localScope[r]={value:n,valueset:!0,node:t.init}),c.v}if("Identifier"!==t.id.type)throw new i.aV(e,i.rH.InvalidIdentifier,t);const r=t.id.name.toLowerCase();return n===c.v&&(n=null),e.globalScope[r]={value:n,valueset:!0,node:t.init},c.v}(e,t);case"ImportDeclaration":return await async function(e,t){const n=t.specifiers[0].local.name.toLowerCase(),r=e.libraryResolver.loadLibrary(n);let a=null;return e.libraryResolver._moduleSingletons?.has(r.uri)?a=e.libraryResolver._moduleSingletons.get(r.uri):(a=new R(r),await a.loadModule(e),e.libraryResolver._moduleSingletons?.set(r.uri,a)),e.globalScope[n]={value:a,valueset:!0,node:t},c.v}(e,t);case"ExportNamedDeclaration":return await async function(e,t){if(await C(e,t.declaration),"FunctionDeclaration"===t.declaration.type)e.exports[t.declaration.id.name.toLowerCase()]="function";else if("VariableDeclaration"===t.declaration.type)for(const n of t.declaration.declarations)e.exports[n.id.name.toLowerCase()]="variable";return c.v}(e,t);case"VariableDeclaration":return await E(e,t,0);case"BlockStatement":case"Program":return await async function(e,t){return B(e,t,0)}(e,t);case"FunctionDeclaration":return await async function(e,t){const n=t.id.name.toLowerCase();return e.globalScope[n]={valueset:!0,node:null,value:new H(t,e)},c.v}(e,t);case"ReturnStatement":return await async function(e,t){if(null===t.argument)return new c.R(c.v);const n=await C(e,t.argument);return new c.R(n)}(e,t);case"IfStatement":return await async function(e,t){const n=await C(e,t.test);if(!0===n)return C(e,t.consequent);if(!1===n)return null!==t.alternate?C(e,t.alternate):c.v;throw new i.aV(e,i.rH.BooleanConditionRequired,t)}(e,t);case"ExpressionStatement":return await async function(e,t){if("AssignmentExpression"===t.expression.type)return C(e,t.expression);if("CallExpression"===t.expression.type){const n=await C(e,t.expression);return n===c.v?c.v:new c.I(n)}const n=await C(e,t.expression);return n===c.v?c.v:new c.I(n)}(e,t);case"UpdateExpression":return await async function(e,t){const n=t.argument;if("MemberExpression"===n.type){const r={t:null},a=await C(e,n.object);let l=null;r.t=a,!0===n.computed?l=await C(e,n.property):"Identifier"===n.property.type&&(l=n.property.name);const s=r.t;let u;if((0,c.m)(s)){if(!(0,c.b)(l))throw new i.aV(e,i.rH.ArrayAccessorMustBeNumber,t);if(l<0&&(l=s.length+l),l<0||l>=s.length)throw new i.aV(e,i.rH.OutOfBounds,t);u=(0,c.g)(s[l]),s[l]="++"===t.operator?u+1:u-1}else if(s instanceof o.Z){if(!1===(0,c.c)(l))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0!==s.hasField(l))throw new i.aV(e,i.rH.FieldNotFound,t,{key:l});u=(0,c.g)(s.field(l)),s.setField(l,"++"===t.operator?u+1:u-1)}else if(s instanceof R){if(!1===(0,c.c)(l))throw new i.aV(e,i.rH.ModuleAccessorMustBeString,t);if(!0!==s.hasGlobal(l))throw new i.aV(e,i.rH.ModuleExportNotFound,t);u=(0,c.g)(await s.global(l)),s.setGlobal(l,"++"===t.operator?u+1:u-1)}else{if(!(0,c.w)(s))throw(0,c.x)(s)?new i.aV(e,i.rH.Immutable,t):new i.aV(e,i.rH.InvalidParameter,t);if(!1===(0,c.c)(l))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0!==s.hasField(l))throw new i.aV(e,i.rH.FieldNotFound,t,{key:l});u=(0,c.g)(s.field(l)),s.setField(l,"++"===t.operator?u+1:u-1)}return!1===t.prefix?u:"++"===t.operator?u+1:u-1}const r="Identifier"===t.argument.type?t.argument.name.toLowerCase():"";if(!r)throw new i.aV(e,i.rH.InvalidIdentifier,t);let a;if(null!=e.localScope&&void 0!==e.localScope[r])return a=(0,c.g)(e.localScope[r].value),e.localScope[r]={value:"++"===t.operator?a+1:a-1,valueset:!0,node:t},!1===t.prefix?a:"++"===t.operator?a+1:a-1;if(void 0!==e.globalScope[r])return a=(0,c.g)(e.globalScope[r].value),e.globalScope[r]={value:"++"===t.operator?a+1:a-1,valueset:!0,node:t},!1===t.prefix?a:"++"===t.operator?a+1:a-1;throw new i.aV(e,i.rH.InvalidIdentifier,t)}(e,t);case"AssignmentExpression":return await async function(e,t){const n=t.left;if("MemberExpression"===n.type){const r=await C(e,n.object);let a=null;if(!0===n.computed)a=await C(e,n.property);else{if("Identifier"!==n.property.type)throw new i.aV(e,i.rH.InvalidIdentifier,t);a=n.property.name}const l=await C(e,t.right);if((0,c.m)(r)){if(!(0,c.b)(a))throw new i.aV(e,i.rH.ArrayAccessorMustBeNumber,t);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new i.aV(e,i.rH.OutOfBounds,t);if(a===r.length){if("="!==t.operator)throw new i.aV(e,i.rH.OutOfBounds,t);r[a]=N(l,t.operator,r[a],t,e)}else r[a]=N(l,t.operator,r[a],t,e)}else if(r instanceof o.Z){if(!1===(0,c.c)(a))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0===r.hasField(a))r.setField(a,N(l,t.operator,r.field(a),t,e));else{if("="!==t.operator)throw new i.aV(e,i.rH.FieldNotFound,t,{key:a});r.setField(a,N(l,t.operator,null,t,e))}}else if(r instanceof R){if(!1===(0,c.c)(a))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0!==r.hasGlobal(a))throw new i.aV(e,i.rH.ModuleExportNotFound,t);r.setGlobal(a,N(l,t.operator,await r.global(a),t,e))}else{if(!(0,c.w)(r))throw(0,c.x)(r)?new i.aV(e,i.rH.Immutable,t):new i.aV(e,i.rH.InvalidParameter,t);if(!1===(0,c.c)(a))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0===r.hasField(a))r.setField(a,N(l,t.operator,r.field(a),t,e));else{if("="!==t.operator)throw new i.aV(e,i.rH.FieldNotFound,t,{key:a});r.setField(a,N(l,t.operator,null,t,e))}}return c.v}const r=n.name.toLowerCase();if(null!=e.localScope&&void 0!==e.localScope[r]){const n=await C(e,t.right);return e.localScope[r]={value:N(n,t.operator,e.localScope[r].value,t,e),valueset:!0,node:t.right},c.v}if(void 0!==e.globalScope[r]){const n=await C(e,t.right);return e.globalScope[r]={value:N(n,t.operator,e.globalScope[r].value,t,e),valueset:!0,node:t.right},c.v}throw new i.aV(e,i.rH.InvalidIdentifier,t)}(e,t);case"ForStatement":return await function(e,t){try{return null!==t.init?C(e,t.init).then((()=>new Promise(((n,r)=>{A(e,t,{testResult:!0,lastAction:c.v},(e=>{n(e)}),(e=>{r(e)}),0)})))):new Promise(((n,r)=>{A(e,t,{testResult:!0,lastAction:c.v},(e=>{n(e)}),(e=>{r(e)}),0)}))}catch(e){return Promise.reject(e)}}(e,t);case"WhileStatement":return await async function(e,t){const n={testResult:!0,lastAction:c.v};if(n.testResult=await C(e,t.test),!1===n.testResult)return c.v;if(!0!==n.testResult)throw new i.aV(e,i.rH.BooleanConditionRequired,t);for(;!0===n.testResult&&(n.lastAction=await C(e,t.body),n.lastAction!==c.o)&&!(n.lastAction instanceof c.R);)if(n.testResult=await C(e,t.test),!0!==n.testResult&&!1!==n.testResult)throw new i.aV(e,i.rH.BooleanConditionRequired,t);return n.lastAction instanceof c.R?n.lastAction:c.v}(e,t);case"ForInStatement":return await async function(e,t){return new Promise(((n,r)=>{C(e,t.right).then((a=>{try{let l=null;l="VariableDeclaration"===t.left.type?C(e,t.left):Promise.resolve(),l.then((()=>{try{let l="";if("VariableDeclaration"===t.left.type){const e=t.left.declarations[0].id;"Identifier"===e.type&&(l=e.name)}else"Identifier"===t.left.type&&(l=t.left.name);if(!l)throw new i.aV(e,i.rH.InvalidIdentifier,t);l=l.toLowerCase();let s=null;if(null!=e.localScope&&void 0!==e.localScope[l]&&(s=e.localScope[l]),null===s&&void 0!==e.globalScope[l]&&(s=e.globalScope[l]),null===s)return void r(new i.aV(e,i.rH.InvalidIdentifier,t));(0,c.m)(a)||(0,c.c)(a)?O(e,t,a,{reject:r,resolve:n},s):(0,c.x)(a)?function(e,t,n,r,a,o){try{if(void 0===o&&(o="i"),0===n.length)return void r.resolve(c.v);k(e,t,n,a,0,o,(e=>{r.resolve(e)}),(e=>{r.reject(e)}),0)}catch(e){r.reject(e)}}(e,t,a,{reject:r,resolve:n},s):a instanceof o.Z||(0,c.w)(a)?function(e,t,n,r,a){try{O(e,t,n.keys(),r,a,"k")}catch(e){r.reject(e)}}(e,t,a,{reject:r,resolve:n},s):(0,c.T)(a)?L(a.iterator(e.abortSignal),e,t,a,s,(e=>{n(e)}),(e=>{r(e)}),0):O(e,t,[],{reject:r,resolve:n},s)}catch(e){r(e)}}),r)}catch(e){r(e)}}),r)}))}(e,t);case"BreakStatement":return c.o;case"EmptyStatement":return c.v;case"ContinueStatement":return c.p;case"TemplateElement":return await async function(e,t){return t.value?t.value.cooked:""}(0,t);case"TemplateLiteral":return await async function(e,t){const n=[];for(let r=0;r<t.expressions.length;r++){const a=await C(e,t.expressions[r]);n[r]=(0,c.j)(a)}let r="",a=0;for(const o of t.quasis)r+=o.value?o.value.cooked:"",!1===o.tail&&(r+=n[a]?P(n[a],e,t):"",a++);return r}(e,t);case"Identifier":return await j(e,t);case"MemberExpression":return await async function(e,t){const n=await C(e,t.object);if(null===n)throw new i.aV(e,i.rH.MemberOfNull,t);if(!1===t.computed){if("Identifier"===t.property.type){if(n instanceof o.Z||(0,c.w)(n))return n.field(t.property.name);if(n instanceof m.Z)return(0,d.Z)(n,t.property.name,e,t);if(n instanceof R){if(!n.hasGlobal(t.property.name))throw new i.aV(e,i.rH.InvalidIdentifier,t);return n.global(t.property.name)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}let r=await C(e,t.property);if(n instanceof o.Z||(0,c.w)(n)){if((0,c.c)(r))return n.field(r);throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if(n instanceof R){if((0,c.c)(r))return n.global(r);throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if(n instanceof m.Z){if((0,c.c)(r))return(0,d.Z)(n,r,e,t);throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if((0,c.m)(n)){if((0,c.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new i.aV(e,i.rH.OutOfBounds,t);return n[r]}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if((0,c.x)(n)){if((0,c.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length()+r),r>=n.length()||r<0)throw new i.aV(e,i.rH.OutOfBounds,t);return n.get(r)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if((0,c.c)(n)){if((0,c.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new i.aV(e,i.rH.OutOfBounds,t);return n[r]}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}(e,t);case"Literal":return t.value;case"CallExpression":return await async function(e,t){if("MemberExpression"===t.callee.type){const n=await C(e,t.callee.object);if(!(n instanceof R))throw new i.aV(e,i.rH.FuncionNotFound,t);const r=!1===t.callee.computed?t.callee.property.name:await C(e,t.callee.property);if(!n.hasGlobal(r))throw new i.aV(e,i.rH.FuncionNotFound,t);const a=await n.global(r);if(!(0,c.i)(a))throw new i.aV(e,i.rH.CallNonFunction,t);return a.call(e,t)}if("Identifier"!==t.callee.type)throw new i.aV(e,i.rH.FuncionNotFound,t);if(null!=e.localScope&&void 0!==e.localScope[t.callee.name.toLowerCase()]){const n=e.localScope[t.callee.name.toLowerCase()];if((0,c.i)(n.value))return n.value.call(e,t);throw new i.aV(e,i.rH.CallNonFunction,t)}if(void 0!==e.globalScope[t.callee.name.toLowerCase()]){const n=e.globalScope[t.callee.name.toLowerCase()];if((0,c.i)(n.value))return n.value.call(e,t);throw new i.aV(e,i.rH.CallNonFunction,t)}throw new i.aV(e,i.rH.FuncionNotFound,t)}(e,t);case"UnaryExpression":return await async function(e,t){const n=await C(e,t.argument);if((0,c.a)(n)){if("!"===t.operator)return!n;if("-"===t.operator)return-1*(0,c.g)(n);if("+"===t.operator)return 1*(0,c.g)(n);if("~"===t.operator)return~(0,c.g)(n);throw new i.aV(e,i.rH.UnsupportedUnaryOperator,t)}if("-"===t.operator)return-1*(0,c.g)(n);if("+"===t.operator)return 1*(0,c.g)(n);if("~"===t.operator)return~(0,c.g)(n);throw new i.aV(e,i.rH.UnsupportedUnaryOperator,t)}(e,t);case"BinaryExpression":return await async function(e,t){const n=[];n[0]=await C(e,t.left),n[1]=await C(e,t.right);const r=n[0],a=n[1];switch(t.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,c.u)((0,c.g)(r),(0,c.g)(a),t.operator);case"==":return(0,c.s)(r,a);case"!=":return!(0,c.s)(r,a);case"<":case">":case"<=":case">=":return(0,c.r)(r,a,t.operator);case"+":return(0,c.c)(r)||(0,c.c)(a)?(0,c.j)(r)+(0,c.j)(a):(0,c.g)(r)+(0,c.g)(a);case"-":return(0,c.g)(r)-(0,c.g)(a);case"*":return(0,c.g)(r)*(0,c.g)(a);case"/":return(0,c.g)(r)/(0,c.g)(a);case"%":return(0,c.g)(r)%(0,c.g)(a);default:throw new i.aV(e,i.rH.UnsupportedOperator,t)}}(e,t);case"LogicalExpression":return await async function(e,t){const n=await C(e,t.left);let r=null;if(!(0,c.a)(n))throw new i.aV(e,i.rH.LogicalExpressionOnlyBoolean,t);switch(t.operator){case"||":if(!0===n)return n;if(r=await C(e,t.right),(0,c.a)(r))return r;throw new i.aV(e,i.rH.LogicExpressionOrAnd,t);case"&&":if(!1===n)return n;if(r=await C(e,t.right),(0,c.a)(r))return r;throw new i.aV(e,i.rH.LogicExpressionOrAnd,t);default:throw new i.aV(e,i.rH.LogicExpressionOrAnd,t)}}(e,t);case"ArrayExpression":return await async function(e,t){const n=[];for(let r=0;r<t.elements.length;r++)n.push(await C(e,t.elements[r]));for(let r=0;r<n.length;r++){if((0,c.i)(n[r]))throw new i.aV(e,i.rH.NoFunctionInArray,t);n[r]===c.v&&(n[r]=null)}return n}(e,t);case"ObjectExpression":return await async function(e,t){const n=[];for(let r=0;r<t.properties.length;r++)n[r]=await C(e,t.properties[r]);const r={},a=new Map;for(let o=0;o<n.length;o++){const l=n[o];if((0,c.i)(l.value))throw new i.aV(e,i.rH.NoFunctionInDictionary,t);if(!1===(0,c.c)(l.key))throw new i.aV(e,i.rH.KeyMustBeString,t);let s=l.key.toString();const u=s.toLowerCase();a.has(u)?s=a.get(u):a.set(u,s),l.value===c.v?r[s]=null:r[s]=l.value}const l=new o.Z(r);return l.immutable=!1,l}(e,t);case"Property":return await async function(e,t){const n=await C(e,t.value);return"Identifier"===t.key.type?{key:t.key.name,value:n}:{key:await C(e,t.key),value:n}}(e,t);default:throw new i.aV(e,i.rH.Unrecognised,t)}}catch(n){throw(0,i.VO)(e,t,n)}}async function F(e,t,n){const r=await C(e,t.body);return n.lastAction=r,n.lastAction===c.o||n.lastAction instanceof c.R?(n.testResult=!1,n):null!==t.update?(await C(e,t.update),n):n}function A(e,t,n,r,a,o){try{(async function(e,t,n){if(null!==t.test){const r=await C(e,t.test);if(!0===e.abortSignal?.aborted)throw new i.aV(e,i.rH.Cancelled,t);if(n.testResult=r,!1===n.testResult)return n;if(!0!==n.testResult)throw new i.aV(e,i.rH.BooleanConditionRequired,t);return F(e,t,n)}return F(e,t,n)})(e,t,n).then((()=>{try{!0===n.testResult?++o>V?(o=0,setTimeout((()=>{A(e,t,n,r,a,o)}),0)):A(e,t,n,r,a,o):n.lastAction instanceof c.R?r(n.lastAction):r(c.v)}catch(e){a(e)}}),(e=>{a(e)}))}catch(e){a(e)}}function M(e,t,n,r,a,o,i,l,s,u){try{if(r<=o)return void l(c.v);a.value="k"===i?n[o]:o,C(e,t.body).then((f=>{try{f instanceof c.R?l(f):f===c.o?l(c.v):++u>V?(u=0,setTimeout((()=>{M(e,t,n,r,a,o+1,i,l,s,u)}),0)):M(e,t,n,r,a,o+1,i,l,s,u)}catch(e){s(e)}}),(e=>{s(e)}))}catch(e){s(e)}}function k(e,t,n,r,a,o,i,l,s){try{if(n.length()<=a)return void i(c.v);r.value="k"===o?n.get(a):a,C(e,t.body).then((u=>{u instanceof c.R?i(u):u===c.o?i(c.v):++s>V?(s=0,setTimeout((()=>{k(e,t,n,r,a+1,o,i,l,s)}),0)):k(e,t,n,r,a+1,o,i,l,s)}),(e=>{l(e)}))}catch(e){l(e)}}function O(e,t,n,r,a,o){try{if(void 0===o&&(o="i"),0===n.length)return void r.resolve(c.v);M(e,t,n,n.length,a,0,o,(e=>{r.resolve(e)}),(e=>{r.reject(e)}),0)}catch(e){r.reject(e)}}function L(e,t,n,r,a,o,i,s){try{e.next().then((u=>{try{if(null===u)o(c.v);else{const f=l.Z.createFromGraphicLikeObject(u.geometry,u.attributes,r,t.timeReference);f._underlyingGraphic=u,a.value=f,C(t,n.body).then((l=>{try{l===c.o?o(c.v):l instanceof c.R?o(l):++s>V?(s=0,setTimeout((()=>{L(e,t,n,r,a,o,i,s)}),0)):L(e,t,n,r,a,o,i,s)}catch(e){i(e)}}),(e=>{i(e)}))}}catch(e){i(e)}}),(e=>{i(e)}))}catch(e){i(e)}}function N(e,t,n,r,a){switch(t){case"=":return e===c.v?null:e;case"/=":return(0,c.g)(n)/(0,c.g)(e);case"*=":return(0,c.g)(n)*(0,c.g)(e);case"-=":return(0,c.g)(n)-(0,c.g)(e);case"+=":return(0,c.c)(n)||(0,c.c)(e)?(0,c.j)(n)+(0,c.j)(e):(0,c.g)(n)+(0,c.g)(e);case"%=":return(0,c.g)(n)%(0,c.g)(e);default:throw new i.aV(a,i.rH.UnsupportedOperator,r)}}async function B(e,t,n){if(n>=t.body.length)return c.v;const r=await C(e,t.body[n]);return r instanceof c.R||r===c.o||r===c.p||n===t.body.length-1?r:B(e,t,n+1)}async function E(e,t,n){return n>=t.declarations.length||(await C(e,t.declarations[n]),n===t.declarations.length-1||await E(e,t,n+1)),c.v}async function j(e,t){const n=t.name.toLowerCase();if(null!=e.localScope&&void 0!==e.localScope[n]){const t=e.localScope[n];if(!0===t.valueset)return t.value;if(null!==t.d)return t.d;t.d=C(e,t.node);const r=await t.d;return t.value=r,t.valueset=!0,r}if(void 0!==e.globalScope[n]){const t=e.globalScope[n];if(!0===t.valueset)return t.value;if(null!==t.d)return t.d;t.d=C(e,t.node);const r=await t.d;return t.value=r,t.valueset=!0,r}throw new i.aV(e,i.rH.InvalidIdentifier,t)}function P(e,t,n){if((0,c.i)(e))throw new i.aV(t,i.rH.NoFunctionInTemplateLiteral,n);return e}const K={};async function Z(e,t,n,r){const a=await C(e,t.arguments[n]);if((0,c.s)(a,r))return C(e,t.arguments[n+1]);const o=t.arguments.length-n;return 1===o?C(e,t.arguments[n]):2===o?null:3===o?C(e,t.arguments[n+2]):Z(e,t,n+2,r)}async function q(e,t,n,r){if(!0===r)return C(e,t.arguments[n+1]);if(3==t.arguments.length-n)return C(e,t.arguments[n+2]);const a=await C(e,t.arguments[n+2]);if(!1===(0,c.a)(a))throw new i.aV(e,i.rH.ModuleExportNotFound,t.arguments[n+2]);return q(e,t,n+2,a)}async function D(e,t,n,r){const a=e.body;if(n.length!==e.params.length)throw new i.aV(t,i.rH.WrongNumberOfParameters,null);for(let r=0;r<n.length;r++){const a=e.params[r];"Identifier"===a.type&&null!=t.localScope&&(t.localScope[a.name.toLowerCase()]={d:null,value:n[r],valueset:!0,node:null})}const o=await C(t,a);if(o instanceof c.R)return o.value;if(o===c.o)throw new i.aV(t,i.rH.UnexpectedToken,r);if(o===c.p)throw new i.aV(t,i.rH.UnexpectedToken,r);return o instanceof c.I?o.value:o}(0,w.r)(K,x),(0,v.r)(K,x),(0,h.r)(K,x),(0,d.r)(K,x),(0,g.r)(K,x),(0,p.registerFunctions)({functions:K,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:x,standardFunctionAsync:I}),K.iif=async function(e,t){(0,c.y)(null===t.arguments?[]:t.arguments,3,3,e,t);const n=await C(e,t.arguments[0]);if(!1===(0,c.a)(n))throw new i.aV(e,i.rH.BooleanConditionRequired,t);return C(e,n?t.arguments[1]:t.arguments[2])},K.decode=async function(e,t){if(t.arguments.length<2)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);if(2===t.arguments.length)return C(e,t.arguments[1]);if((t.arguments.length-1)%2==0)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);return Z(e,t,1,await C(e,t.arguments[0]))},K.when=async function(e,t){if(t.arguments.length<3)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);if(t.arguments.length%2==0)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);const n=await C(e,t.arguments[0]);if(!1===(0,c.a)(n))throw new i.aV(e,i.rH.BooleanConditionRequired,t.arguments[0]);return q(e,t,0,n)};const G={fixSpatialReference:c.q,parseArguments:S,standardFunction:x,standardFunctionAsync:I,evaluateIdentifier:j};for(const e in K)K[e]={value:new s.Bx(K[e]),valueset:!0,node:null};const T=function(){};function U(e,t,n){const r=new T;null==e&&(e={}),null==t&&(t={});const a=new o.Z({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});a.immutable=!1,r.textformatting={value:a,valueset:!0,node:null};for(const e in t)r[e]={value:new s.Bx(t[e]),native:!0,valueset:!0,node:null};for(const t in e)e[t]&&"esri.Graphic"===e[t].declaredClass?r[t]={value:l.Z.createFromGraphic(e[t],n),valueset:!0,node:null}:r[t]={value:e[t],valueset:!0,node:null};return r}function W(e){console.log(e)}T.prototype=K,T.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null},T.prototype.pi={value:Math.PI,valueset:!0,node:null};const _=G;function Y(e){const t={mode:"async",compiled:!1,functions:{},signatures:[],standardFunction:x,standardFunctionAsync:I,evaluateIdentifier:j};for(let n=0;n<e.length;n++)e[n].registerFunctions(t);for(const e in t.functions)K[e]={value:new s.Bx(t.functions[e]),valueset:!0,node:null},T.prototype[e]=K[e];for(let e=0;e<t.signatures.length;e++)(0,u.gW)(t.signatures[e],"async")}async function z(e,t){let n=t.spatialReference;null==n&&(n=new y.Z({wkid:102100}));let r=null;e.usesModules&&(r=new a.s(new Map,e.loadedModules));const o=U(t.vars,t.customfunctions,t.timeReference),l={spatialReference:n,services:t.services,exports:{},libraryResolver:r,abortSignal:void 0===t.abortSignal||null===t.abortSignal?{aborted:!1}:t.abortSignal,globalScope:o,console:t.console??W,timeReference:t.timeReference??null,lrucache:t.lrucache,interceptor:t.interceptor,localScope:null,depthCounter:{depth:1}};let s=await C(l,e);if(s instanceof c.R&&(s=s.value),s instanceof c.I&&(s=s.value),s===c.v&&(s=null),s===c.o)throw new i.aV(l,i.rH.IllegalResult,null);if(s===c.p)throw new i.aV(l,i.rH.IllegalResult,null);if((0,c.i)(s))throw new i.aV(l,i.rH.IllegalResult,null);return s}Y([f.A])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8828],{18828:(e,t,n)=>{n.r(t),n.d(t,{executeScript:()=>z,extend:()=>Y,functionHelper:()=>_});var r=n(17057),a=n(92089),o=n(33586),i=n(27535),l=n(15274),s=n(9609),c=n(61363),u=n(90077),f=n(84211),w=n(13976),p=n(66748),d=n(12834),h=n(38176),g=n(58130),v=n(27360),m=n(9361),y=n(82971);function b(e){return e&&"function"==typeof e.then}const V=100;async function S(e,t){const n=[];for(let r=0;r<t.arguments.length;r++)n.push(await C(e,t.arguments[r]));return n}async function x(e,t,n){return!0===t.preparsed?n(e,null,t.arguments):n(e,t,await S(e,t))}class H extends s.Rm{constructor(e,t){super(),this.definition=null,this.context=null,this.definition=e,this.context=t}createFunction(e){return(...t)=>{const n={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeReference:this.context.timeReference??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,localScope:{},depthCounter:{depth:e.depthCounter+1},globalScope:this.context.globalScope};if(n.depthCounter.depth>64)throw new i.aV(e,i.rH.MaximumCallDepth,null);return D(this.definition,n,t,null)}}call(e,t){return I(e,t,((n,r,a)=>{const o={spatialReference:e.spatialReference,services:e.services,console:e.console,libraryResolver:e.libraryResolver,exports:e.exports,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,localScope:{},abortSignal:e.abortSignal,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1}};if(o.depthCounter.depth>64)throw new i.aV(e,i.rH.MaximumCallDepth,t);return D(this.definition,o,a,t)}))}marshalledCall(e,t,n,r){return r(e,t,(async(a,o,i)=>{const l={spatialReference:e.spatialReference,globalScope:n.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,abortSignal:e.abortSignal,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,localScope:{}};return i=i.map((t=>!(0,c.i)(t)||t instanceof s.Vg?t:(0,s.aq)(t,e,r))),(0,s.aq)(await D(this.definition,l,i,t),n,r)}))}}class R extends r.P{constructor(e){super(e)}async global(e){const t=this.executingContext.globalScope[e.toLowerCase()];if(t.valueset||(t.value=await C(this.executingContext,t.node),t.valueset=!0),(0,c.i)(t.value)&&!(t.value instanceof s.Vg)){const e=new s.Vg;e.fn=t.value,e.parameterEvaluator=I,e.context=this.executingContext,t.value=e}return t.value}setGlobal(e,t){if((0,c.i)(t))throw new i.aV(null,i.rH.AssignModuleFunction,null);this.executingContext.globalScope[e.toLowerCase()]={value:t,valueset:!0,node:null}}hasGlobal(e){return void 0===this.executingContext.exports[e]&&(e=e.toLowerCase()),void 0!==this.executingContext.exports[e]}async loadModule(e){let t=e.spatialReference;null==t&&(t=new y.Z({wkid:102100})),this.moduleScope=U({},e.customfunctions,e.timeReference),this.executingContext={spatialReference:t,services:e.services,libraryResolver:new a.s(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},abortSignal:void 0===e.abortSignal||null===e.abortSignal?{aborted:!1}:e.abortSignal,globalScope:this.moduleScope,console:e.console??W,lrucache:e.lrucache,timeReference:e.timeReference??null,interceptor:e.interceptor,localScope:null,depthCounter:{depth:1}},await C(this.executingContext,this.source.syntax)}}async function I(e,t,n){if(!0===t.preparsed){const r=n(e,null,t.arguments);return b(r),r}const r=n(e,t,await S(e,t));return b(r),r}async function C(e,t,n){if(t.breakpoint&&!0!==n){const n=t.breakpoint();return await n,C(e,t,!0)}try{switch(t?.type){case"VariableDeclarator":return await async function(e,t){let n=null;if(n=null===t.init?null:await C(e,t.init),null!==e.localScope){if(n===c.v&&(n=null),"Identifier"!==t.id.type)throw new i.aV(e,i.rH.InvalidIdentifier,t);const r=t.id.name.toLowerCase();return null!=e.localScope&&(e.localScope[r]={value:n,valueset:!0,node:t.init}),c.v}if("Identifier"!==t.id.type)throw new i.aV(e,i.rH.InvalidIdentifier,t);const r=t.id.name.toLowerCase();return n===c.v&&(n=null),e.globalScope[r]={value:n,valueset:!0,node:t.init},c.v}(e,t);case"ImportDeclaration":return await async function(e,t){const n=t.specifiers[0].local.name.toLowerCase(),r=e.libraryResolver.loadLibrary(n);let a=null;return e.libraryResolver._moduleSingletons?.has(r.uri)?a=e.libraryResolver._moduleSingletons.get(r.uri):(a=new R(r),await a.loadModule(e),e.libraryResolver._moduleSingletons?.set(r.uri,a)),e.globalScope[n]={value:a,valueset:!0,node:t},c.v}(e,t);case"ExportNamedDeclaration":return await async function(e,t){if(await C(e,t.declaration),"FunctionDeclaration"===t.declaration.type)e.exports[t.declaration.id.name.toLowerCase()]="function";else if("VariableDeclaration"===t.declaration.type)for(const n of t.declaration.declarations)e.exports[n.id.name.toLowerCase()]="variable";return c.v}(e,t);case"VariableDeclaration":return await E(e,t,0);case"BlockStatement":case"Program":return await async function(e,t){return B(e,t,0)}(e,t);case"FunctionDeclaration":return await async function(e,t){const n=t.id.name.toLowerCase();return e.globalScope[n]={valueset:!0,node:null,value:new H(t,e)},c.v}(e,t);case"ReturnStatement":return await async function(e,t){if(null===t.argument)return new c.R(c.v);const n=await C(e,t.argument);return new c.R(n)}(e,t);case"IfStatement":return await async function(e,t){const n=await C(e,t.test);if(!0===n)return C(e,t.consequent);if(!1===n)return null!==t.alternate?C(e,t.alternate):c.v;throw new i.aV(e,i.rH.BooleanConditionRequired,t)}(e,t);case"ExpressionStatement":return await async function(e,t){if("AssignmentExpression"===t.expression.type)return C(e,t.expression);if("CallExpression"===t.expression.type){const n=await C(e,t.expression);return n===c.v?c.v:new c.I(n)}const n=await C(e,t.expression);return n===c.v?c.v:new c.I(n)}(e,t);case"UpdateExpression":return await async function(e,t){const n=t.argument;if("MemberExpression"===n.type){const r={t:null},a=await C(e,n.object);let l=null;r.t=a,!0===n.computed?l=await C(e,n.property):"Identifier"===n.property.type&&(l=n.property.name);const s=r.t;let u;if((0,c.m)(s)){if(!(0,c.b)(l))throw new i.aV(e,i.rH.ArrayAccessorMustBeNumber,t);if(l<0&&(l=s.length+l),l<0||l>=s.length)throw new i.aV(e,i.rH.OutOfBounds,t);u=(0,c.g)(s[l]),s[l]="++"===t.operator?u+1:u-1}else if(s instanceof o.Z){if(!1===(0,c.c)(l))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0!==s.hasField(l))throw new i.aV(e,i.rH.FieldNotFound,t,{key:l});u=(0,c.g)(s.field(l)),s.setField(l,"++"===t.operator?u+1:u-1)}else if(s instanceof R){if(!1===(0,c.c)(l))throw new i.aV(e,i.rH.ModuleAccessorMustBeString,t);if(!0!==s.hasGlobal(l))throw new i.aV(e,i.rH.ModuleExportNotFound,t);u=(0,c.g)(await s.global(l)),s.setGlobal(l,"++"===t.operator?u+1:u-1)}else{if(!(0,c.w)(s))throw(0,c.x)(s)?new i.aV(e,i.rH.Immutable,t):new i.aV(e,i.rH.InvalidParameter,t);if(!1===(0,c.c)(l))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0!==s.hasField(l))throw new i.aV(e,i.rH.FieldNotFound,t,{key:l});u=(0,c.g)(s.field(l)),s.setField(l,"++"===t.operator?u+1:u-1)}return!1===t.prefix?u:"++"===t.operator?u+1:u-1}const r="Identifier"===t.argument.type?t.argument.name.toLowerCase():"";if(!r)throw new i.aV(e,i.rH.InvalidIdentifier,t);let a;if(null!=e.localScope&&void 0!==e.localScope[r])return a=(0,c.g)(e.localScope[r].value),e.localScope[r]={value:"++"===t.operator?a+1:a-1,valueset:!0,node:t},!1===t.prefix?a:"++"===t.operator?a+1:a-1;if(void 0!==e.globalScope[r])return a=(0,c.g)(e.globalScope[r].value),e.globalScope[r]={value:"++"===t.operator?a+1:a-1,valueset:!0,node:t},!1===t.prefix?a:"++"===t.operator?a+1:a-1;throw new i.aV(e,i.rH.InvalidIdentifier,t)}(e,t);case"AssignmentExpression":return await async function(e,t){const n=t.left;if("MemberExpression"===n.type){const r=await C(e,n.object);let a=null;if(!0===n.computed)a=await C(e,n.property);else{if("Identifier"!==n.property.type)throw new i.aV(e,i.rH.InvalidIdentifier,t);a=n.property.name}const l=await C(e,t.right);if((0,c.m)(r)){if(!(0,c.b)(a))throw new i.aV(e,i.rH.ArrayAccessorMustBeNumber,t);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new i.aV(e,i.rH.OutOfBounds,t);if(a===r.length){if("="!==t.operator)throw new i.aV(e,i.rH.OutOfBounds,t);r[a]=N(l,t.operator,r[a],t,e)}else r[a]=N(l,t.operator,r[a],t,e)}else if(r instanceof o.Z){if(!1===(0,c.c)(a))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0===r.hasField(a))r.setField(a,N(l,t.operator,r.field(a),t,e));else{if("="!==t.operator)throw new i.aV(e,i.rH.FieldNotFound,t,{key:a});r.setField(a,N(l,t.operator,null,t,e))}}else if(r instanceof R){if(!1===(0,c.c)(a))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0!==r.hasGlobal(a))throw new i.aV(e,i.rH.ModuleExportNotFound,t);r.setGlobal(a,N(l,t.operator,await r.global(a),t,e))}else{if(!(0,c.w)(r))throw(0,c.x)(r)?new i.aV(e,i.rH.Immutable,t):new i.aV(e,i.rH.InvalidParameter,t);if(!1===(0,c.c)(a))throw new i.aV(e,i.rH.KeyAccessorMustBeString,t);if(!0===r.hasField(a))r.setField(a,N(l,t.operator,r.field(a),t,e));else{if("="!==t.operator)throw new i.aV(e,i.rH.FieldNotFound,t,{key:a});r.setField(a,N(l,t.operator,null,t,e))}}return c.v}const r=n.name.toLowerCase();if(null!=e.localScope&&void 0!==e.localScope[r]){const n=await C(e,t.right);return e.localScope[r]={value:N(n,t.operator,e.localScope[r].value,t,e),valueset:!0,node:t.right},c.v}if(void 0!==e.globalScope[r]){const n=await C(e,t.right);return e.globalScope[r]={value:N(n,t.operator,e.globalScope[r].value,t,e),valueset:!0,node:t.right},c.v}throw new i.aV(e,i.rH.InvalidIdentifier,t)}(e,t);case"ForStatement":return await function(e,t){try{return null!==t.init?C(e,t.init).then((()=>new Promise(((n,r)=>{A(e,t,{testResult:!0,lastAction:c.v},(e=>{n(e)}),(e=>{r(e)}),0)})))):new Promise(((n,r)=>{A(e,t,{testResult:!0,lastAction:c.v},(e=>{n(e)}),(e=>{r(e)}),0)}))}catch(e){return Promise.reject(e)}}(e,t);case"WhileStatement":return await async function(e,t){const n={testResult:!0,lastAction:c.v};if(n.testResult=await C(e,t.test),!1===n.testResult)return c.v;if(!0!==n.testResult)throw new i.aV(e,i.rH.BooleanConditionRequired,t);for(;!0===n.testResult&&(n.lastAction=await C(e,t.body),n.lastAction!==c.o)&&!(n.lastAction instanceof c.R);)if(n.testResult=await C(e,t.test),!0!==n.testResult&&!1!==n.testResult)throw new i.aV(e,i.rH.BooleanConditionRequired,t);return n.lastAction instanceof c.R?n.lastAction:c.v}(e,t);case"ForInStatement":return await async function(e,t){return new Promise(((n,r)=>{C(e,t.right).then((a=>{try{let l=null;l="VariableDeclaration"===t.left.type?C(e,t.left):Promise.resolve(),l.then((()=>{try{let l="";if("VariableDeclaration"===t.left.type){const e=t.left.declarations[0].id;"Identifier"===e.type&&(l=e.name)}else"Identifier"===t.left.type&&(l=t.left.name);if(!l)throw new i.aV(e,i.rH.InvalidIdentifier,t);l=l.toLowerCase();let s=null;if(null!=e.localScope&&void 0!==e.localScope[l]&&(s=e.localScope[l]),null===s&&void 0!==e.globalScope[l]&&(s=e.globalScope[l]),null===s)return void r(new i.aV(e,i.rH.InvalidIdentifier,t));(0,c.m)(a)||(0,c.c)(a)?O(e,t,a,{reject:r,resolve:n},s):(0,c.x)(a)?function(e,t,n,r,a,o){try{if(void 0===o&&(o="i"),0===n.length)return void r.resolve(c.v);k(e,t,n,a,0,o,(e=>{r.resolve(e)}),(e=>{r.reject(e)}),0)}catch(e){r.reject(e)}}(e,t,a,{reject:r,resolve:n},s):a instanceof o.Z||(0,c.w)(a)?function(e,t,n,r,a){try{O(e,t,n.keys(),r,a,"k")}catch(e){r.reject(e)}}(e,t,a,{reject:r,resolve:n},s):(0,c.T)(a)?L(a.iterator(e.abortSignal),e,t,a,s,(e=>{n(e)}),(e=>{r(e)}),0):O(e,t,[],{reject:r,resolve:n},s)}catch(e){r(e)}}),r)}catch(e){r(e)}}),r)}))}(e,t);case"BreakStatement":return c.o;case"EmptyStatement":return c.v;case"ContinueStatement":return c.p;case"TemplateElement":return await async function(e,t){return t.value?t.value.cooked:""}(0,t);case"TemplateLiteral":return await async function(e,t){const n=[];for(let r=0;r<t.expressions.length;r++){const a=await C(e,t.expressions[r]);n[r]=(0,c.j)(a)}let r="",a=0;for(const o of t.quasis)r+=o.value?o.value.cooked:"",!1===o.tail&&(r+=n[a]?P(n[a],e,t):"",a++);return r}(e,t);case"Identifier":return await j(e,t);case"MemberExpression":return await async function(e,t){const n=await C(e,t.object);if(null===n)throw new i.aV(e,i.rH.MemberOfNull,t);if(!1===t.computed){if("Identifier"===t.property.type){if(n instanceof o.Z||(0,c.w)(n))return n.field(t.property.name);if(n instanceof m.Z)return(0,d.Z)(n,t.property.name,e,t);if(n instanceof R){if(!n.hasGlobal(t.property.name))throw new i.aV(e,i.rH.InvalidIdentifier,t);return n.global(t.property.name)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}let r=await C(e,t.property);if(n instanceof o.Z||(0,c.w)(n)){if((0,c.c)(r))return n.field(r);throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if(n instanceof R){if((0,c.c)(r))return n.global(r);throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if(n instanceof m.Z){if((0,c.c)(r))return(0,d.Z)(n,r,e,t);throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if((0,c.m)(n)){if((0,c.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new i.aV(e,i.rH.OutOfBounds,t);return n[r]}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if((0,c.x)(n)){if((0,c.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length()+r),r>=n.length()||r<0)throw new i.aV(e,i.rH.OutOfBounds,t);return n.get(r)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}if((0,c.c)(n)){if((0,c.b)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=n.length+r),r>=n.length||r<0)throw new i.aV(e,i.rH.OutOfBounds,t);return n[r]}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}throw new i.aV(e,i.rH.InvalidMemberAccessKey,t)}(e,t);case"Literal":return t.value;case"CallExpression":return await async function(e,t){if("MemberExpression"===t.callee.type){const n=await C(e,t.callee.object);if(!(n instanceof R))throw new i.aV(e,i.rH.FunctionNotFound,t);const r=!1===t.callee.computed?t.callee.property.name:await C(e,t.callee.property);if(!n.hasGlobal(r))throw new i.aV(e,i.rH.FunctionNotFound,t);const a=await n.global(r);if(!(0,c.i)(a))throw new i.aV(e,i.rH.CallNonFunction,t);return a.call(e,t)}if("Identifier"!==t.callee.type)throw new i.aV(e,i.rH.FunctionNotFound,t);if(null!=e.localScope&&void 0!==e.localScope[t.callee.name.toLowerCase()]){const n=e.localScope[t.callee.name.toLowerCase()];if((0,c.i)(n.value))return n.value.call(e,t);throw new i.aV(e,i.rH.CallNonFunction,t)}if(void 0!==e.globalScope[t.callee.name.toLowerCase()]){const n=e.globalScope[t.callee.name.toLowerCase()];if((0,c.i)(n.value))return n.value.call(e,t);throw new i.aV(e,i.rH.CallNonFunction,t)}throw new i.aV(e,i.rH.FunctionNotFound,t)}(e,t);case"UnaryExpression":return await async function(e,t){const n=await C(e,t.argument);if((0,c.a)(n)){if("!"===t.operator)return!n;if("-"===t.operator)return-1*(0,c.g)(n);if("+"===t.operator)return 1*(0,c.g)(n);if("~"===t.operator)return~(0,c.g)(n);throw new i.aV(e,i.rH.UnsupportedUnaryOperator,t)}if("-"===t.operator)return-1*(0,c.g)(n);if("+"===t.operator)return 1*(0,c.g)(n);if("~"===t.operator)return~(0,c.g)(n);throw new i.aV(e,i.rH.UnsupportedUnaryOperator,t)}(e,t);case"BinaryExpression":return await async function(e,t){const n=[];n[0]=await C(e,t.left),n[1]=await C(e,t.right);const r=n[0],a=n[1];switch(t.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,c.u)((0,c.g)(r),(0,c.g)(a),t.operator);case"==":return(0,c.s)(r,a);case"!=":return!(0,c.s)(r,a);case"<":case">":case"<=":case">=":return(0,c.r)(r,a,t.operator);case"+":return(0,c.c)(r)||(0,c.c)(a)?(0,c.j)(r)+(0,c.j)(a):(0,c.g)(r)+(0,c.g)(a);case"-":return(0,c.g)(r)-(0,c.g)(a);case"*":return(0,c.g)(r)*(0,c.g)(a);case"/":return(0,c.g)(r)/(0,c.g)(a);case"%":return(0,c.g)(r)%(0,c.g)(a);default:throw new i.aV(e,i.rH.UnsupportedOperator,t)}}(e,t);case"LogicalExpression":return await async function(e,t){const n=await C(e,t.left);let r=null;if(!(0,c.a)(n))throw new i.aV(e,i.rH.LogicalExpressionOnlyBoolean,t);switch(t.operator){case"||":if(!0===n)return n;if(r=await C(e,t.right),(0,c.a)(r))return r;throw new i.aV(e,i.rH.LogicExpressionOrAnd,t);case"&&":if(!1===n)return n;if(r=await C(e,t.right),(0,c.a)(r))return r;throw new i.aV(e,i.rH.LogicExpressionOrAnd,t);default:throw new i.aV(e,i.rH.LogicExpressionOrAnd,t)}}(e,t);case"ArrayExpression":return await async function(e,t){const n=[];for(let r=0;r<t.elements.length;r++)n.push(await C(e,t.elements[r]));for(let r=0;r<n.length;r++){if((0,c.i)(n[r]))throw new i.aV(e,i.rH.NoFunctionInArray,t);n[r]===c.v&&(n[r]=null)}return n}(e,t);case"ObjectExpression":return await async function(e,t){const n=[];for(let r=0;r<t.properties.length;r++)n[r]=await C(e,t.properties[r]);const r={},a=new Map;for(let o=0;o<n.length;o++){const l=n[o];if((0,c.i)(l.value))throw new i.aV(e,i.rH.NoFunctionInDictionary,t);if(!1===(0,c.c)(l.key))throw new i.aV(e,i.rH.KeyMustBeString,t);let s=l.key.toString();const u=s.toLowerCase();a.has(u)?s=a.get(u):a.set(u,s),l.value===c.v?r[s]=null:r[s]=l.value}const l=new o.Z(r);return l.immutable=!1,l}(e,t);case"Property":return await async function(e,t){const n=await C(e,t.value);return"Identifier"===t.key.type?{key:t.key.name,value:n}:{key:await C(e,t.key),value:n}}(e,t);default:throw new i.aV(e,i.rH.Unrecognised,t)}}catch(n){throw(0,i.VO)(e,t,n)}}async function F(e,t,n){const r=await C(e,t.body);return n.lastAction=r,n.lastAction===c.o||n.lastAction instanceof c.R?(n.testResult=!1,n):null!==t.update?(await C(e,t.update),n):n}function A(e,t,n,r,a,o){try{(async function(e,t,n){if(null!==t.test){const r=await C(e,t.test);if(!0===e.abortSignal?.aborted)throw new i.aV(e,i.rH.Cancelled,t);if(n.testResult=r,!1===n.testResult)return n;if(!0!==n.testResult)throw new i.aV(e,i.rH.BooleanConditionRequired,t);return F(e,t,n)}return F(e,t,n)})(e,t,n).then((()=>{try{!0===n.testResult?++o>V?(o=0,setTimeout((()=>{A(e,t,n,r,a,o)}),0)):A(e,t,n,r,a,o):n.lastAction instanceof c.R?r(n.lastAction):r(c.v)}catch(e){a(e)}}),(e=>{a(e)}))}catch(e){a(e)}}function M(e,t,n,r,a,o,i,l,s,u){try{if(r<=o)return void l(c.v);a.value="k"===i?n[o]:o,C(e,t.body).then((f=>{try{f instanceof c.R?l(f):f===c.o?l(c.v):++u>V?(u=0,setTimeout((()=>{M(e,t,n,r,a,o+1,i,l,s,u)}),0)):M(e,t,n,r,a,o+1,i,l,s,u)}catch(e){s(e)}}),(e=>{s(e)}))}catch(e){s(e)}}function k(e,t,n,r,a,o,i,l,s){try{if(n.length()<=a)return void i(c.v);r.value="k"===o?n.get(a):a,C(e,t.body).then((u=>{u instanceof c.R?i(u):u===c.o?i(c.v):++s>V?(s=0,setTimeout((()=>{k(e,t,n,r,a+1,o,i,l,s)}),0)):k(e,t,n,r,a+1,o,i,l,s)}),(e=>{l(e)}))}catch(e){l(e)}}function O(e,t,n,r,a,o){try{if(void 0===o&&(o="i"),0===n.length)return void r.resolve(c.v);M(e,t,n,n.length,a,0,o,(e=>{r.resolve(e)}),(e=>{r.reject(e)}),0)}catch(e){r.reject(e)}}function L(e,t,n,r,a,o,i,s){try{e.next().then((u=>{try{if(null===u)o(c.v);else{const f=l.Z.createFromGraphicLikeObject(u.geometry,u.attributes,r,t.timeReference);f._underlyingGraphic=u,a.value=f,C(t,n.body).then((l=>{try{l===c.o?o(c.v):l instanceof c.R?o(l):++s>V?(s=0,setTimeout((()=>{L(e,t,n,r,a,o,i,s)}),0)):L(e,t,n,r,a,o,i,s)}catch(e){i(e)}}),(e=>{i(e)}))}}catch(e){i(e)}}),(e=>{i(e)}))}catch(e){i(e)}}function N(e,t,n,r,a){switch(t){case"=":return e===c.v?null:e;case"/=":return(0,c.g)(n)/(0,c.g)(e);case"*=":return(0,c.g)(n)*(0,c.g)(e);case"-=":return(0,c.g)(n)-(0,c.g)(e);case"+=":return(0,c.c)(n)||(0,c.c)(e)?(0,c.j)(n)+(0,c.j)(e):(0,c.g)(n)+(0,c.g)(e);case"%=":return(0,c.g)(n)%(0,c.g)(e);default:throw new i.aV(a,i.rH.UnsupportedOperator,r)}}async function B(e,t,n){if(n>=t.body.length)return c.v;const r=await C(e,t.body[n]);return r instanceof c.R||r===c.o||r===c.p||n===t.body.length-1?r:B(e,t,n+1)}async function E(e,t,n){return n>=t.declarations.length||(await C(e,t.declarations[n]),n===t.declarations.length-1||await E(e,t,n+1)),c.v}async function j(e,t){const n=t.name.toLowerCase();if(null!=e.localScope&&void 0!==e.localScope[n]){const t=e.localScope[n];if(!0===t.valueset)return t.value;if(null!==t.d)return t.d;t.d=C(e,t.node);const r=await t.d;return t.value=r,t.valueset=!0,r}if(void 0!==e.globalScope[n]){const t=e.globalScope[n];if(!0===t.valueset)return t.value;if(null!==t.d)return t.d;t.d=C(e,t.node);const r=await t.d;return t.value=r,t.valueset=!0,r}throw new i.aV(e,i.rH.InvalidIdentifier,t)}function P(e,t,n){if((0,c.i)(e))throw new i.aV(t,i.rH.NoFunctionInTemplateLiteral,n);return e}const K={};async function Z(e,t,n,r){const a=await C(e,t.arguments[n]);if((0,c.s)(a,r))return C(e,t.arguments[n+1]);const o=t.arguments.length-n;return 1===o?C(e,t.arguments[n]):2===o?null:3===o?C(e,t.arguments[n+2]):Z(e,t,n+2,r)}async function q(e,t,n,r){if(!0===r)return C(e,t.arguments[n+1]);if(3==t.arguments.length-n)return C(e,t.arguments[n+2]);const a=await C(e,t.arguments[n+2]);if(!1===(0,c.a)(a))throw new i.aV(e,i.rH.ModuleExportNotFound,t.arguments[n+2]);return q(e,t,n+2,a)}async function D(e,t,n,r){const a=e.body;if(n.length!==e.params.length)throw new i.aV(t,i.rH.WrongNumberOfParameters,null);for(let r=0;r<n.length;r++){const a=e.params[r];"Identifier"===a.type&&null!=t.localScope&&(t.localScope[a.name.toLowerCase()]={d:null,value:n[r],valueset:!0,node:null})}const o=await C(t,a);if(o instanceof c.R)return o.value;if(o===c.o)throw new i.aV(t,i.rH.UnexpectedToken,r);if(o===c.p)throw new i.aV(t,i.rH.UnexpectedToken,r);return o instanceof c.I?o.value:o}(0,w.r)(K,x),(0,v.r)(K,x),(0,h.r)(K,x),(0,d.r)(K,x),(0,g.r)(K,x),(0,p.registerFunctions)({functions:K,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:x,standardFunctionAsync:I}),K.iif=async function(e,t){(0,c.y)(null===t.arguments?[]:t.arguments,3,3,e,t);const n=await C(e,t.arguments[0]);if(!1===(0,c.a)(n))throw new i.aV(e,i.rH.BooleanConditionRequired,t);return C(e,n?t.arguments[1]:t.arguments[2])},K.decode=async function(e,t){if(t.arguments.length<2)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);if(2===t.arguments.length)return C(e,t.arguments[1]);if((t.arguments.length-1)%2==0)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);return Z(e,t,1,await C(e,t.arguments[0]))},K.when=async function(e,t){if(t.arguments.length<3)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);if(t.arguments.length%2==0)throw new i.aV(e,i.rH.WrongNumberOfParameters,t);const n=await C(e,t.arguments[0]);if(!1===(0,c.a)(n))throw new i.aV(e,i.rH.BooleanConditionRequired,t.arguments[0]);return q(e,t,0,n)};const G={fixSpatialReference:c.q,parseArguments:S,standardFunction:x,standardFunctionAsync:I,evaluateIdentifier:j};for(const e in K)K[e]={value:new s.Bx(K[e]),valueset:!0,node:null};const T=function(){};function U(e,t,n){const r=new T;null==e&&(e={}),null==t&&(t={});const a=new o.Z({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});a.immutable=!1,r.textformatting={value:a,valueset:!0,node:null};for(const e in t)r[e]={value:new s.Bx(t[e]),native:!0,valueset:!0,node:null};for(const t in e)e[t]&&"esri.Graphic"===e[t].declaredClass?r[t]={value:l.Z.createFromGraphic(e[t],n),valueset:!0,node:null}:r[t]={value:e[t],valueset:!0,node:null};return r}function W(e){console.log(e)}T.prototype=K,T.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null},T.prototype.pi={value:Math.PI,valueset:!0,node:null};const _=G;function Y(e){const t={mode:"async",compiled:!1,functions:{},signatures:[],standardFunction:x,standardFunctionAsync:I,evaluateIdentifier:j};for(let n=0;n<e.length;n++)e[n].registerFunctions(t);for(const e in t.functions)K[e]={value:new s.Bx(t.functions[e]),valueset:!0,node:null},T.prototype[e]=K[e];for(let e=0;e<t.signatures.length;e++)(0,u.gW)(t.signatures[e],"async")}async function z(e,t){let n=t.spatialReference;null==n&&(n=new y.Z({wkid:102100}));let r=null;e.usesModules&&(r=new a.s(new Map,e.loadedModules));const o=U(t.vars,t.customfunctions,t.timeReference),l={spatialReference:n,services:t.services,exports:{},libraryResolver:r,abortSignal:void 0===t.abortSignal||null===t.abortSignal?{aborted:!1}:t.abortSignal,globalScope:o,console:t.console??W,timeReference:t.timeReference??null,lrucache:t.lrucache,interceptor:t.interceptor,localScope:null,depthCounter:{depth:1}};let s=await C(l,e);if(s instanceof c.R&&(s=s.value),s instanceof c.I&&(s=s.value),s===c.v&&(s=null),s===c.o)throw new i.aV(l,i.rH.IllegalResult,null);if(s===c.p)throw new i.aV(l,i.rH.IllegalResult,null);if((0,c.i)(s))throw new i.aV(l,i.rH.IllegalResult,null);return s}Y([f.A])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9157],{91303:(e,t,i)=>{var l;i.d(t,{Y:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},3920:(e,t,i)=>{i.d(t,{p:()=>h,r:()=>c});var l=i(43697),s=i(15923),n=i(61247),r=i(5600),a=i(52011),o=i(72762);const h=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new n.Z,this._updatingHandles=new o.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,l._)([(0,r.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,l._)([(0,r.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,l._)([(0,a.j)("esri.core.HandleOwner")],t),t};let c=class extends(h(s.Z)){};c=(0,l._)([(0,a.j)("esri.core.HandleOwner")],c)},72762:(e,t,i)=>{i.d(t,{t:()=>c});var l=i(43697),s=i(15923),n=i(61247),r=i(17445),a=i(1654),o=i(5600),h=i(52011);let c=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new n.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,i={}){return this._installWatch(e,t,i,r.YP)}addWhen(e,t,i={}){return this._installWatch(e,t,i,r.gx)}addOnCollectionChange(e,t,{initial:i=!1,final:l=!1}={}){const s=++this._handleId;return this._handles.add([(0,r.on)(e,"after-changes",this._createSyncUpdatingCallback(),r.Z_),(0,r.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:l?e=>t({added:[],removed:e.toArray()}):void 0})],s),{remove:()=>this._handles.remove(s)}}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(p)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this._handles.remove(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,i={},l){const s=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,s);const n=l(e,t,i);return this._handles.add(n,s),{remove:()=>this._handles.remove(s)}}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),l=(0,r.YP)(e,i,{sync:!0,equals:()=>!1});return this._handles.add(l,t),l}_createSyncUpdatingCallback(){return()=>{this._handles.remove(p),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(p))})),p)}}};(0,l._)([(0,o.Cb)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,l._)([(0,h.j)("esri.core.support.WatchUpdatingTracking")],c);const p=-42},17287:(e,t,i)=>{i.d(t,{Y:()=>o});var l=i(43697),s=i(92604),n=i(5600),r=(i(75215),i(67676),i(80442),i(52011)),a=i(66677);const o=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,l._)([(0,n.Cb)()],t.prototype,"title",null),(0,l._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,r.j)("esri.layers.mixins.ArcGISService")],t),t}},39450:(e,t,i)=>{i.d(t,{Z:()=>c});var l,s=i(43697),n=i(96674),r=i(5600),a=i(75215),o=(i(67676),i(80442),i(52011));let h=l=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,s._)([(0,r.Cb)({type:a.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,s._)([(0,r.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,s._)([(0,r.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,s._)([(0,r.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,s._)([(0,r.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,s._)([(0,r.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=l=(0,s._)([(0,o.j)("esri.layers.support.LOD")],h);const c=h},11145:(e,t,i)=>{i.d(t,{Z:()=>C});var l,s=i(43697),n=i(35454),r=i(96674),a=i(67900),o=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),d=i(30556),u=i(94139),f=i(82971),v=i(24470),m=i(8744),_=i(40488),y=i(39450),g=i(43077);const w=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=l=class extends r.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:n=f.Z.WebMercator,numLODs:r=24}=e;if(!(0,m.JY)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new y.Z({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new y.Z({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new u.Z(0,0,n),size:[s,s],spatialReference:n})}const o=(0,m.C5)(n),h=e.origin?new u.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new u.Z(o?{x:o.origin[0],y:o.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,a.c9)(n)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*c;p.push(new y.Z({level:e,scale:t,resolution:l}))}else{let e=(0,m.sT)(n)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new y.Z({level:0,scale:e,resolution:e*c}));for(let l=1;l<i;l++){const i=e/2**t,s=i*c;p.push(new y.Z({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:h,size:[s,s],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e}))),this._set("scales",l),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let n,r;if("number"==typeof t)n=t,r=i;else if((0,m.fS)(t.spatialReference,this.spatialReference))n=t.x,r=t.y,l=i;else{const e=(0,_.iV)(t,this.spatialReference);if(null==e)return null;n=e.x,r=e.y,l=i}const a=s.resolution*this.size[0],o=s.resolution*this.size[1];return l||(l=new g.f(null,0,0,0,(0,v.Ue)())),l.level=e,l.row=Math.floor((this.origin.y-r)/o+.001),l.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,n=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],n=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+s,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],s=this.lods.length;for(let e=0;e<s;e++){const l=this.lods[e],s=l.resolution*t;i.push(new y.Z({level:l.level,scale:l.scale,resolution:s}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var S,O;(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,s._)([(0,o.Cb)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,s._)([(0,o.Cb)({type:u.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,s._)([(0,c.r)("origin")],b.prototype,"readOrigin",null),(0,s._)([(0,o.Cb)({type:[y.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"minScale",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"maxScale",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,s._)([(0,o.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,s._)([(0,c.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,s._)([(0,d.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],b.prototype,"writeSize",null),(0,s._)([(0,o.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,s._)([(0,p.j)("esri.layers.support.TileInfo")],b),(O=(S=b||(b={})).ExtrapolateOptions||(S.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const C=b},43077:(e,t,i)=>{i.d(t,{f:()=>l});class l{constructor(e,t,i,l,s=undefined){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},28589:(e,t,i)=>{i.d(t,{y:()=>T});var l,s=i(43697),n=i(3172),r=i(15923),a=i(91303),o=i(20102),h=i(3920),c=i(92604),p=i(13867),d=i(44553),u=i(95330),f=i(17445),v=i(1654),m=i(17452),_=i(5600),y=i(90578),g=i(67676),w=(i(80442),i(52011)),b=i(43077),S=i(22974),O=i(1533);class C{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,S.d9)(t));const l=this.location.width,s=this.location.height;let n=!0,r=!0;const a=function(e,t=!1){return e<=O.DB?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let o=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,a[o]|=1<<t):n=!1,31===t&&++o}r?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,O.Xw)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.default,{row:l,col:s,width:r,height:a}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if("vector-tile"===e.service.type)t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;else{const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:s,width:r,height:a},valid:!0,data:(0,g.a9)(r*a,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==a))throw new o.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:a}});return C.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new C(e))}_validateJSON(e){if(!e||!e.location)throw new o.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function z(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let T=l=class extends((0,h.p)(r.Z)){constructor(e){super(e),this._pendingTilemapRequests={},this._availableLevels={},this.levels=5,this.cacheByteSize=2*a.Y.MEGABYTES,this.request=n.default,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new p.Z(this.cacheByteSize),this.addHandles([(0,f.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition())),(0,f.YP)((()=>this.layer?.tileInfo?.lods),(e=>this._initializeAvailableLevels(e)),f.tX)]),this._initializeTilemapDefinition()}castLevels(e){return e<=2?(c.Z.getLogger(this.declaredClass).error("Minimum levels for Tilemap is 3, but got ",e),3):e}get size(){return 1<<this.levels}fetchTilemap(e,t,i,l){if(!this._availableLevels[e])return Promise.reject(new o.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const r=l&&l.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.fu)(r,(()=>t((0,u.zE)())));const i=z(s);let n=this._pendingTilemapRequests[i];if(!n){n=C.fromDefinition(s,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[i];this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)}))}getAvailability(e,t,i){if(!this._availableLevels[e])return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return this._availableLevels[e]?this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof C){const s=l.getAvailability(t,i);if("unavailable"===s)throw new o.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}if((0,u.D_)(l))throw l;return"unknown"})):Promise.reject(new o.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`))}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const n=this.layer.tileInfo;n.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch((e=>{if((0,u.D_)(e))throw e;if(n.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n,r){if(!this._prefetchingEnabled||null==e)return;const a=`prefetch-${e}`;if(this.handles.has(a))return;const o=new AbortController;r.then((()=>o.abort()),(()=>o.abort()));let h=!1;const c={remove(){h||(h=!0,o.abort())}};if(this.handles.add(c,a),await(0,v.MU)(10,o.signal).catch((()=>{})),h||(h=!0,this.handles.remove(a)),(0,u.Hc)(o))return;const p=new b.f(e,t,i,s),d={...n,signal:o.signal},f=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&f.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,d);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.B7)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=z(l);return this._tilemapCache.get(s)}_initializeAvailableLevels(e){this._availableLevels={},e&&e.forEach((e=>this._availableLevels[e.level]=!0))}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};T._maxPrefetch=4,T._prefetches=new d.Z({initialSize:l._maxPrefetch}),(0,s._)([(0,_.Cb)({constructOnly:!0,type:Number})],T.prototype,"levels",void 0),(0,s._)([(0,y.p)("levels")],T.prototype,"castLevels",null),(0,s._)([(0,_.Cb)({readOnly:!0,type:Number})],T.prototype,"size",null),(0,s._)([(0,_.Cb)({constructOnly:!0,type:Number})],T.prototype,"cacheByteSize",void 0),(0,s._)([(0,_.Cb)({constructOnly:!0})],T.prototype,"layer",void 0),(0,s._)([(0,_.Cb)({constructOnly:!0})],T.prototype,"request",void 0),T=l=(0,s._)([(0,w.j)("esri.layers.support.TilemapCache")],T)},45322:(e,t,i)=>{i.d(t,{d:()=>n,h:()=>s});var l=i(11145);const s={type:l.Z,json:{origins:{service:{read:{source:["tileInfo","minScale","maxScale","minLOD","maxLOD"],reader:n}}}}};function n(e,t,i,s){if(!e)return null;const{minScale:n,maxScale:r,minLOD:a,maxLOD:o}=t;if(null!=a&&null!=o)return s&&s.ignoreMinMaxLOD?l.Z.fromJSON(e):l.Z.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=a&&e<=o))});if(0!==n&&0!==r){const t=e=>Math.round(1e4*e)/1e4,i=n?t(n):1/0,s=r?t(r):-1/0;return l.Z.fromJSON({...e,lods:e.lods.filter((e=>{const l=t(e.scale);return l<=i&&l>=s}))})}return l.Z.fromJSON(e)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9157],{91303:(e,t,i)=>{var l;i.d(t,{Y:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},3920:(e,t,i)=>{i.d(t,{p:()=>h,r:()=>c});var l=i(43697),s=i(15923),n=i(61247),r=i(5600),a=i(52011),o=i(72762);const h=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new n.Z,this._updatingHandles=new o.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,l._)([(0,r.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,l._)([(0,r.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,l._)([(0,a.j)("esri.core.HandleOwner")],t),t};let c=class extends(h(s.Z)){};c=(0,l._)([(0,a.j)("esri.core.HandleOwner")],c)},72762:(e,t,i)=>{i.d(t,{t:()=>c});var l=i(43697),s=i(15923),n=i(61247),r=i(17445),a=i(1654),o=i(5600),h=i(52011);let c=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new n.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,i={}){return this._installWatch(e,t,i,r.YP)}addWhen(e,t,i={}){return this._installWatch(e,t,i,r.gx)}addOnCollectionChange(e,t,{initial:i=!1,final:l=!1}={}){const s=++this._handleId;return this._handles.add([(0,r.on)(e,"after-changes",this._createSyncUpdatingCallback(),r.Z_),(0,r.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:l?e=>t({added:[],removed:e.toArray()}):void 0})],s),{remove:()=>this._handles.remove(s)}}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(p)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this._handles.remove(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,i={},l){const s=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,s);const n=l(e,t,i);return this._handles.add(n,s),{remove:()=>this._handles.remove(s)}}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),l=(0,r.YP)(e,i,{sync:!0,equals:()=>!1});return this._handles.add(l,t),l}_createSyncUpdatingCallback(){return()=>{this._handles.remove(p),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(p))})),p)}}};(0,l._)([(0,o.Cb)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,l._)([(0,h.j)("esri.core.support.WatchUpdatingTracking")],c);const p=-42},17287:(e,t,i)=>{i.d(t,{Y:()=>o});var l=i(43697),s=i(92604),n=i(5600),r=(i(75215),i(67676),i(80442),i(52011)),a=i(66677);const o=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,l._)([(0,n.Cb)()],t.prototype,"title",null),(0,l._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,r.j)("esri.layers.mixins.ArcGISService")],t),t}},39450:(e,t,i)=>{i.d(t,{Z:()=>c});var l,s=i(43697),n=i(96674),r=i(5600),a=i(75215),o=(i(67676),i(80442),i(52011));let h=l=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,s._)([(0,r.Cb)({type:a.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,s._)([(0,r.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,s._)([(0,r.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,s._)([(0,r.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,s._)([(0,r.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,s._)([(0,r.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=l=(0,s._)([(0,o.j)("esri.layers.support.LOD")],h);const c=h},11145:(e,t,i)=>{i.d(t,{Z:()=>C});var l,s=i(43697),n=i(35454),r=i(96674),a=i(67900),o=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),d=i(30556),u=i(94139),f=i(82971),v=i(24470),m=i(8744),_=i(40488),y=i(39450),g=i(43077);const w=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=l=class extends r.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:n=f.Z.WebMercator,numLODs:r=24}=e;if(!(0,m.JY)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new y.Z({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new y.Z({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new u.Z(0,0,n),size:[s,s],spatialReference:n})}const o=(0,m.C5)(n),h=e.origin?new u.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new u.Z(o?{x:o.origin[0],y:o.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,a.c9)(n)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*c;p.push(new y.Z({level:e,scale:t,resolution:l}))}else{let e=(0,m.sT)(n)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new y.Z({level:0,scale:e,resolution:e*c}));for(let l=1;l<i;l++){const i=e/2**t,s=i*c;p.push(new y.Z({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:h,size:[s,s],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e}))),this._set("scales",l),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let n,r;if("number"==typeof t)n=t,r=i;else if((0,m.fS)(t.spatialReference,this.spatialReference))n=t.x,r=t.y,l=i;else{const e=(0,_.iV)(t,this.spatialReference);if(null==e)return null;n=e.x,r=e.y,l=i}const a=s.resolution*this.size[0],o=s.resolution*this.size[1];return l||(l=new g.f(null,0,0,0,(0,v.Ue)())),l.level=e,l.row=Math.floor((this.origin.y-r)/o+.001),l.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,n=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],n=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+s,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],s=this.lods.length;for(let e=0;e<s;e++){const l=this.lods[e],s=l.resolution*t;i.push(new y.Z({level:l.level,scale:l.scale,resolution:s}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var S,O;(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,s._)([(0,o.Cb)({type:String,json:{read:w.read,write:w.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,s._)([(0,o.Cb)({type:u.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,s._)([(0,c.r)("origin")],b.prototype,"readOrigin",null),(0,s._)([(0,o.Cb)({type:[y.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"minScale",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"maxScale",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,s._)([(0,o.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,s._)([(0,c.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,s._)([(0,d.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],b.prototype,"writeSize",null),(0,s._)([(0,o.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,s._)([(0,p.j)("esri.layers.support.TileInfo")],b),(O=(S=b||(b={})).ExtrapolateOptions||(S.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const C=b},43077:(e,t,i)=>{i.d(t,{f:()=>l});class l{constructor(e,t,i,l,s=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},28589:(e,t,i)=>{i.d(t,{y:()=>T});var l,s=i(43697),n=i(3172),r=i(15923),a=i(91303),o=i(20102),h=i(3920),c=i(92604),p=i(13867),d=i(44553),u=i(95330),f=i(17445),v=i(1654),m=i(17452),_=i(5600),y=i(90578),g=i(67676),w=(i(80442),i(52011)),b=i(43077),S=i(22974),O=i(1533);class C{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,S.d9)(t));const l=this.location.width,s=this.location.height;let n=!0,r=!0;const a=function(e,t=!1){return e<=O.DB?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let o=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,a[o]|=1<<t):n=!1,31===t&&++o}r?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,O.Xw)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.default,{row:l,col:s,width:r,height:a}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if("vector-tile"===e.service.type)t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;else{const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:s,width:r,height:a},valid:!0,data:(0,g.a9)(r*a,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==a))throw new o.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:a}});return C.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new C(e))}_validateJSON(e){if(!e||!e.location)throw new o.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function z(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let T=l=class extends((0,h.p)(r.Z)){constructor(e){super(e),this._pendingTilemapRequests={},this._availableLevels={},this.levels=5,this.cacheByteSize=2*a.Y.MEGABYTES,this.request=n.default,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new p.Z(this.cacheByteSize),this.addHandles([(0,f.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition())),(0,f.YP)((()=>this.layer?.tileInfo?.lods),(e=>this._initializeAvailableLevels(e)),f.tX)]),this._initializeTilemapDefinition()}castLevels(e){return e<=2?(c.Z.getLogger(this.declaredClass).error("Minimum levels for Tilemap is 3, but got ",e),3):e}get size(){return 1<<this.levels}fetchTilemap(e,t,i,l){if(!this._availableLevels[e])return Promise.reject(new o.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const r=l&&l.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.fu)(r,(()=>t((0,u.zE)())));const i=z(s);let n=this._pendingTilemapRequests[i];if(!n){n=C.fromDefinition(s,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[i];this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)}))}getAvailability(e,t,i){if(!this._availableLevels[e])return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return this._availableLevels[e]?this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof C){const s=l.getAvailability(t,i);if("unavailable"===s)throw new o.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}if((0,u.D_)(l))throw l;return"unknown"})):Promise.reject(new o.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`))}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const n=this.layer.tileInfo;n.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch((e=>{if((0,u.D_)(e))throw e;if(n.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n,r){if(!this._prefetchingEnabled||null==e)return;const a=`prefetch-${e}`;if(this.handles.has(a))return;const o=new AbortController;r.then((()=>o.abort()),(()=>o.abort()));let h=!1;const c={remove(){h||(h=!0,o.abort())}};if(this.handles.add(c,a),await(0,v.MU)(10,o.signal).catch((()=>{})),h||(h=!0,this.handles.remove(a)),(0,u.Hc)(o))return;const p=new b.f(e,t,i,s),d={...n,signal:o.signal},f=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&f.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,d);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.B7)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=z(l);return this._tilemapCache.get(s)}_initializeAvailableLevels(e){this._availableLevels={},e&&e.forEach((e=>this._availableLevels[e.level]=!0))}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};T._maxPrefetch=4,T._prefetches=new d.Z({initialSize:l._maxPrefetch}),(0,s._)([(0,_.Cb)({constructOnly:!0,type:Number})],T.prototype,"levels",void 0),(0,s._)([(0,y.p)("levels")],T.prototype,"castLevels",null),(0,s._)([(0,_.Cb)({readOnly:!0,type:Number})],T.prototype,"size",null),(0,s._)([(0,_.Cb)({constructOnly:!0,type:Number})],T.prototype,"cacheByteSize",void 0),(0,s._)([(0,_.Cb)({constructOnly:!0})],T.prototype,"layer",void 0),(0,s._)([(0,_.Cb)({constructOnly:!0})],T.prototype,"request",void 0),T=l=(0,s._)([(0,w.j)("esri.layers.support.TilemapCache")],T)},45322:(e,t,i)=>{i.d(t,{d:()=>n,h:()=>s});var l=i(11145);const s={type:l.Z,json:{origins:{service:{read:{source:["tileInfo","minScale","maxScale","minLOD","maxLOD"],reader:n}}}}};function n(e,t,i,s){if(!e)return null;const{minScale:n,maxScale:r,minLOD:a,maxLOD:o}=t;if(null!=a&&null!=o)return s&&s.ignoreMinMaxLOD?l.Z.fromJSON(e):l.Z.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=a&&e<=o))});if(0!==n&&0!==r){const t=e=>Math.round(1e4*e)/1e4,i=n?t(n):1/0,s=r?t(r):-1/0;return l.Z.fromJSON({...e,lods:e.lods.filter((e=>{const l=t(e.scale);return l<=i&&l>=s}))})}return l.Z.fromJSON(e)}}}]);