@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/09e677ca7532a281d262.js +1 -0
  4. package/assets/esri/core/workers/chunks/0f7ddb063ee0664f2fca.js +1 -0
  5. package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
  6. package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
  7. package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
  8. package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
  10. package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
  11. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
  12. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
  13. package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
  15. package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
  16. package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
  17. package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
  19. package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
  20. package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
  23. package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 6f724f75f85dc3989d60.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
  27. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
  28. package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
  29. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
  30. package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
  31. package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
  32. package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
  33. package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
  34. package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
  35. package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
  36. package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
  37. package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
  38. package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → a49718c74053314ed741.js} +1 -1
  39. package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
  40. package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
  41. package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
  42. package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
  43. package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
  44. package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
  45. package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
  46. package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
  47. package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
  48. package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
  50. package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
  51. package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
  52. package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
  53. package/assets/esri/core/workers/chunks/ea16230a0edfc9f756bd.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
  55. package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
  56. package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
  57. package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
  58. package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
  59. package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
  60. package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
  61. package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
  62. package/assets/esri/themes/base/_View.scss +2 -5
  63. package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
  64. package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
  65. package/assets/esri/themes/dark/main.css +1 -1
  66. package/assets/esri/themes/light/main.css +1 -1
  67. package/assets/esri/themes/light/view.css +1 -1
  68. package/chunks/DefaultMaterial.glsl.js +42 -42
  69. package/chunks/Terrain.glsl.js +7 -7
  70. package/copyright.txt +1 -1
  71. package/geometry/Mesh.js +1 -1
  72. package/geometry/support/DoubleArray.js +1 -1
  73. package/geometry/support/meshUtils/bounds.js +1 -1
  74. package/geometry/support/meshUtils/georeference.js +1 -1
  75. package/interfaces.d.ts +87 -3
  76. package/kernel.js +1 -1
  77. package/layers/OrientedImageryLayer.js +1 -1
  78. package/layers/SceneLayer.js +1 -1
  79. package/layers/VideoLayer.js +1 -1
  80. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  81. package/layers/graphics/editingSupport.js +1 -1
  82. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  83. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  84. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  85. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  86. package/layers/mixins/ArcGISImageService.js +1 -1
  87. package/layers/mixins/ImageryTileMixin.js +1 -1
  88. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  89. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  90. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  91. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  92. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  93. package/layers/support/SubtypeSublayer.js +1 -1
  94. package/layers/support/capabilities.js +1 -1
  95. package/layers/support/editableLayers.js +1 -1
  96. package/layers/support/layerUtils.js +1 -1
  97. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  98. package/layers/video/VideoCameraSensorModel.js +5 -0
  99. package/layers/video/VideoController.js +1 -1
  100. package/layers/video/videoUtils.js +1 -1
  101. package/package.json +1 -1
  102. package/portal/PortalItem.js +1 -1
  103. package/renderers/support/colorRampUtils.js +1 -1
  104. package/request.js +1 -1
  105. package/rest/support/meshFeatureSet.js +1 -1
  106. package/smartMapping/labels/bins.js +5 -0
  107. package/smartMapping/labels/clusters.js +1 -1
  108. package/smartMapping/labels/support/utils.js +5 -0
  109. package/smartMapping/support/binningUtils.js +1 -1
  110. package/support/requestUtils.js +1 -1
  111. package/support/revision.js +1 -1
  112. package/views/2d/layers/features/schemaUtils.js +1 -1
  113. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  114. package/views/3d/layers/I3SMeshView3D.js +1 -1
  115. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  116. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  117. package/views/3d/layers/SceneLayerWorker.js +1 -1
  118. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  119. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
  120. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  121. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  122. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  123. package/views/3d/terrain/TerrainRenderer.js +1 -1
  124. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
  125. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  126. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  127. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  128. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  129. package/views/DOMContainer.js +1 -1
  130. package/views/PopupView.js +1 -1
  131. package/views/ui/DefaultUI.js +1 -1
  132. package/views/ui/UI.js +1 -1
  133. package/webmap/initialViewPropertiesUtils.js +1 -1
  134. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  135. package/widgets/Editor/CreateWorkflow.js +1 -1
  136. package/widgets/Editor/EditorViewModel.js +1 -1
  137. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  138. package/widgets/Editor/UpdateWorkflow.js +1 -1
  139. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  140. package/widgets/Editor/workflowUtils.js +1 -1
  141. package/widgets/Feature/support/featureUtils.js +1 -1
  142. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  143. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  144. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  145. package/widgets/FeatureForm/css.js +1 -1
  146. package/widgets/FeatureForm.js +1 -1
  147. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  148. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  149. package/widgets/OrientedImageryViewer.js +1 -1
  150. package/widgets/Popup.js +1 -1
  151. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
  152. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  153. package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
  154. package/widgets/support/geolocationUtils.js +1 -1
  155. package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +0 -1
  156. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
  157. package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
  158. package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
  159. package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
  160. package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
  161. package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
  162. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
  163. package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
  164. package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
  165. package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
  166. package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
  167. package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
  168. package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
  169. package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
  170. package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
  171. package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
  172. package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
  173. package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
  174. package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
  175. package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
  176. package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
  177. package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
  178. package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
  179. package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
  180. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
  181. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
  182. package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +0 -1
  183. package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
  184. package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
  185. package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
  186. package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
  187. package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
  188. package/layers/orientedImagery/core/Affixes.js +0 -5
  189. package/layers/orientedImagery/core/CameraProperties.js +0 -5
  190. package/layers/orientedImagery/core/ImageProperties.js +0 -5
  191. package/layers/orientedImagery/core/ImageryTypes.js +0 -5
  192. package/layers/orientedImagery/core/imageryUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7589,5732,661,5234,9880],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,n=s(43697),r=s(96674),o=s(70586),a=s(35463),l=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),d=s(30556);let c=i=class extends r.wq{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&s===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),s=(0,o.yw)(this.end,(t=>{const s=(0,a.JE)(t,e);return t.getTime()===s.getTime()?s:(0,a.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;if(n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:r}=this;return null!=n&&(s.start=(0,a.Nm)(n,e,t)),null!=r&&(s.end=(0,a.Nm)(r,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,n._)([(0,h.r)("end")],c.prototype,"readEnd",null),(0,n._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,n._)([(0,h.r)("start")],c.prototype,"readStart",null),(0,n._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=i=(0,n._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,_=new c({start:void 0,end:void 0}),f=c},99880:(e,t,s)=>{s.d(t,{V:()=>l});var i=s(68773),n=(s(3172),s(20102)),r=s(92604),o=s(81271);const a=r.Z.getLogger("esri.assets");function l(e){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,e)}},5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},91303:(e,t,s)=>{var i;s.d(t,{Y:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},2368:(e,t,s)=>{s.d(t,{J:()=>u,j:()=>d});var i=s(43697),n=s(92036),r=(s(80442),s(22974)),o=(s(92604),s(70586)),a=s(31263),l=s(1153),h=s(52011);const u=e=>{let t=class extends e{clone(){const e=(0,o.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),h=o.clonable;if(o.readOnly||!1===h||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const u=this[e];let d=null;d="function"==typeof h?h(u):"reference"===h?u:(0,r.Vo)(u),null!=u&&null==d||(l===a.s3.DEFAULTS?n.set(e,d):i[e]=d)}const h=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.vw)(h)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.s3.DEFAULTS)}return h}};return t=(0,i._)([(0,h.j)("esri.core.Clonable")],t),t};let d=class extends(u(n.Z)){};d=(0,i._)([(0,h.j)("esri.core.Clonable")],d)},32448:(e,t,s)=>{s.d(t,{Z:()=>l});var i=s(43697),n=s(92036),r=s(50758),o=s(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,r.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,o.j)("esri.core.Evented")],s),s};let s=class extends n.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,o.j)("esri.core.Evented")],s),e.EventedAccessor=s}(a||(a={}));const l=a},3920:(e,t,s)=>{s.d(t,{p:()=>h,r:()=>u});var i=s(43697),n=s(92036),r=s(61247),o=s(5600),a=s(52011),l=s(72762);const h=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,a.j)("esri.core.HandleOwner")],t),t};let u=class extends(h(n.Z)){};u=(0,i._)([(0,a.j)("esri.core.HandleOwner")],u)},13867:(e,t,s)=>{s.d(t,{z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return void console.warn("Refusing to cache entry with invalid size "+n);const a=1+Math.max(r,-3)- -3;this._db.set(t,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,e.size+=n,this._checkSizeLimits()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},10661:(e,t,s)=>{s.d(t,{s:()=>n});var i=s(42100);class n extends i.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66643:(e,t,s)=>{s.d(t,{Ed:()=>h,UI:()=>u,mt:()=>_,q6:()=>p,vr:()=>f});var i=s(43697),n=s(92036),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function h(e,t,s){return(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))}async function u(e,t,s){return(await(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function _(e){try{return d(await e)}catch(e){return(0,o.r9)(e),c(e)}}function f(e,t){return new g(e,t)}let g=class extends n.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=c(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],g.prototype,"value",null),(0,i._)([(0,a.Cb)()],g.prototype,"error",null),(0,i._)([(0,a.Cb)()],g.prototype,"finished",null),(0,i._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},43090:(e,t,s)=>{function i(e){return 32+e.length}function n(e){if(!e)return 0;let t=l;for(const s in e)if(e.hasOwnProperty(s)){const n=e[s];switch(typeof n){case"string":t+=i(n);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function r(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let s=h;for(let i=0;i<t;i++)s+=o(e[i]);return s}(e);let t=l;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e){switch(typeof e){case"object":return r(e);case"string":return i(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return h+e.length*t}s.d(t,{Ul:()=>r,do:()=>a,f2:()=>n});const l=32,h=32},24133:(e,t,s)=>{s.d(t,{Q:()=>a});var i=s(67676),n=s(70586),r=s(44553),o=s(88764);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),E.prune(),x.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):m(e,o)?this._all(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||m(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(E.clear(),x.clear();s||E.length>0;){if(s||(s=(0,n.j0)(E.pop()),r=E.data[E.length-1],o=x.pop()??0,a=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),E.push(s),this._condense(E),this;a||s.leaf||!m(s,l)?r?(o++,s=r.children[o],a=!1):s=null:(E.push(s),x.push(o),o=0,r=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else w.pushArray(s.children);s=w.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new S([]);o.height=i;const a=Math.ceil(n/r),h=a*Math.ceil(Math.sqrt(r));v(e,t,s,h,this._compareMinX);for(let n=t;n<=s;n+=h){const t=Math.min(n+h-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);E.clear();const r=this._chooseSubtree(n,this._data,t,E);for(r.children.push(e),u(r,n);t>=0&&E.data[t].children.length>this._maxEntries;)this._split(E,t),t--;this._adjustParentBBoxes(n,E,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new F(o):new S(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,s,this._toBBox),l=g(t,a),u=p(t)+p(a);l<i?(i=l,r=o,n=u<n?u:n):l===i&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=h(e,0,t,n),o=h(e,s-t,s,n);let a=_(r)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=_(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){h(e,0,e.children.length,t,e)}function h(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,r){const a=[t,s];for(;a.length;){const t=(0,n.j0)(a.pop()),s=(0,n.j0)(a.pop());if(t-s<=i)continue;const l=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,l,s,t,r),a.push(s,l,l,t)}}const b=new r.Z,w=new r.Z,E=new r.Z,x=new r.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class F extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>c,YP:()=>l,Z_:()=>f,gx:()=>h,nn:()=>g,on:()=>d,tX:()=>m});var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(e,t,s={}){return u(e,t,s,p)}function h(e,t,s={}){return u(e,t,s,_)}function u(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,r.hw)(u),s(e)}const p=l(e,((e,s)=>{d(),(0,i.vT)(e)&&(a=e,h=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.kB)((()=>{p.remove(),d()})),u}function c(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(87538);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},72762:(e,t,s)=>{s.d(t,{t:()=>d});var i=s(43697),n=s(92036),r=s(61247),o=s(50758),a=s(17445),l=s(1654),h=s(5600),u=s(52011);let d=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,s={}){return this._installWatch(e,t,s,a.YP)}addWhen(e,t,s={}){return this._installWatch(e,t,s,a.gx)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this._handles.add([(0,a.on)(e,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,o.kB)((()=>this._handles.remove(n)))}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(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this._handles.remove(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const r=i(e,t,s);return this._handles.add(r,n),(0,o.kB)((()=>this._handles.remove(n)))}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,a.YP)(e,s,{sync:!0,equals:()=>!1});return this._handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,i._)([(0,h.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,i._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],d);const c=-42},35463:(e,t,s)=>{s.d(t,{JE:()=>o,Nm:()=>r,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=n[s],{getter:r,setter:o,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[r]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>g});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),h=s(37549),u=s(29730),d=s(70272),c=s(5428);const p={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new d.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,u.Y)(new c.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var _=s(11490);const f=(0,o.Ue)();class g{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=p}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,_.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,o.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let n;if(this._markedIds.add(t),s?(e.displayId=s.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,l.$)(null!=n?n:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},1231:(e,t,s)=>{s.d(t,{Z:()=>g});var i,n=s(43697),r=s(35454),o=s(96674),a=s(5600),l=s(75215),h=(s(67676),s(80442),s(36030)),u=s(71715),d=s(52011),c=s(72729),p=s(86719);const _=new r.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,n._)([(0,u.r)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,h.J)(p.v)],f.prototype,"type",void 0),(0,n._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,n._)([(0,u.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,d.j)("esri.layers.support.Field")],f);const g=f},39450:(e,t,s)=>{s.d(t,{Z:()=>u});var i,n=s(43697),r=s(96674),o=s(5600),a=s(75215),l=(s(67676),s(80442),s(52011));let h=i=class extends r.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 i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,n._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=i=(0,n._)([(0,l.j)("esri.layers.support.LOD")],h);const u=h},11145:(e,t,s)=>{s.d(t,{Z:()=>C});var i,n=s(43697),r=s(35454),o=s(96674),a=s(67900),l=s(5600),h=s(75215),u=(s(67676),s(80442),s(71715)),d=s(52011),c=s(30556),p=s(94139),_=s(82971),f=s(24470),g=s(8744),m=s(40488),y=s(39450),v=s(43077);const b=new r.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 w=i=class extends o.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=_.Z.WebMercator,numLODs:o=24}=e;if(!(0,g.JY)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.Z(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.C5)(r),h=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.Z(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,a.c9)(r)*96),d=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*u;d.push(new y.Z({level:e,scale:t,resolution:i}))}else{let e=(0,g.sT)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);d.push(new y.Z({level:0,scale:e,resolution:e*u}));for(let i=1;i<s;i++){const s=e/2**t,n=s*u;d.push(new y.Z({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:d,origin:h,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",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 s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.fS)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.iV)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.f(null,0,0,0,(0,f.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Ue)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],n=this.lods.length;for(let e=0;e<n;e++){const i=this.lods[e],n=i.resolution*t;s.push(new y.Z({level:i.level,scale:i.scale,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var E,x;(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n._)([(0,l.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n._)([(0,l.Cb)({type:p.Z,json:{write:!0}})],w.prototype,"origin",void 0),(0,n._)([(0,u.r)("origin")],w.prototype,"readOrigin",null),(0,n._)([(0,l.Cb)({type:[y.Z],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"scales",void 0),(0,n._)([(0,l.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n._)([(0,u.r)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n._)([(0,c.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],w.prototype,"writeSize",null),(0,n._)([(0,l.Cb)({type:_.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=i=(0,n._)([(0,d.j)("esri.layers.support.TileInfo")],w),E=w||(w={}),(x=E.ExtrapolateOptions||(E.ExtrapolateOptions={}))[x.NONE=0]="NONE",x[x.POWER_OF_TWO=1]="POWER_OF_TWO";const C=w},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},72729:(e,t,s)=>{s.d(t,{im:()=>C,V5:()=>x}),s(80442);var i,n=s(43697),r=s(22974),o=s(5600),a=(s(75215),s(36030)),l=s(52011),h=s(96674);s(67676);let u=i=class extends h.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,n._)([(0,l.j)("esri.layers.support.CodedValue")],u);const d=new(s(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends h.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.j)("esri.layers.support.Domain")],c);const p=c;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,r.d9)(this.codedValues),name:this.name})}};(0,n._)([(0,o.Cb)({type:[u],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,n._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(92604),s(20102);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.J)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.j)("esri.layers.support.InheritedDomain")],y);const v=y;var b;let w=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,n._)([(0,a.J)({range:"range"})],w.prototype,"type",void 0),w=b=(0,n._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const E=w,x={key:"type",base:p,typeMap:{range:w,"coded-value":g,inherited:v}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return E.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,s)=>{s.d(t,{v:()=>i});const i=new(s(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},99282:(e,t,s)=>{s.d(t,{a:()=>r});var i=s(67900),n=s(68441);const r={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",n.sv.radius)}},28694:(e,t,s)=>{s.d(t,{p:()=>n});var i=s(69285);function n(e,t,s){if(!s||!s.features||!s.hasZ)return;const n=(0,i.k)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},86787:(e,t,s)=>{s.d(t,{Z:()=>b});var i,n=s(43697),r=s(35454),o=s(96674),a=s(70586),l=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),u=s(52011),d=s(30556),c=s(35671);let p=i=class extends o.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,u.j)("esri.layers.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(12541);const m=(0,r.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.Cb)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,h.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,d.c)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.Cb)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.Cb)({type:g.f9,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,n._)([(0,u.j)("esri.layers.support.ElevationInfo")],v);const b=v},12541:(e,t,s)=>{s.d(t,{Z7:()=>n,f9:()=>r});var i=s(99282);function n(e){return 1/(i.a[e]||1)}const r=function(){const e=Object.keys(i.a);return e.sort(),e}()},65967:(e,t,s)=>{s.r(t),s.d(t,{default:()=>we});var i=s(43697),n=s(32448),r=s(61247),o=s(95330),a=s(17445),l=s(5600),h=(s(75215),s(67676)),u=(s(80442),s(52011)),d=s(72762),c=s(82971),p=s(57191),_=s(66202),f=s(11145),g=s(14165),m=s(86787),y=s(13867),v=s(30175),b=s(67900),w=s(12541);function E(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s,spatialReference:i}=t;return new C(e,s,i)}return new x}class x{async alignCandidates(e,t){return e}notifyElevationSourceChange(){}}class C{constructor(e,t,s){this._elevationInfo=e,this._alignPointsInFeatures=t,this.spatialReference=s,this._alignmentsCache=new y.z(1024),this._cacheVersion=0,this._metersPerVerticalUnit=(0,b._R)(s)}async alignCandidates(e,t){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t):(this._alignAbsoluteElevationCandidates(e,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t){const{offset:s,unit:i}=t;if(null==s)return;const n=s*((0,w.Z7)(i??"meters")/this._metersPerVerticalUnit);for(const t of e)switch(t.type){case"edge":t.start.z+=n,t.end.z+=n;continue;case"vertex":t.target.z+=n;continue}}async _alignComputedElevationCandidates(e,t){const s=new Map;for(const t of e)(0,v.s1)(s,t.objectId,S).push(t);const[i,n,r]=this._prepareQuery(s),a=await this._alignPointsInFeatures(i,t);if((0,o.k_)(t),r!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t);this._applyCacheAndResponse(i,a,n);const{drapedObjectIds:l,failedObjectIds:h}=a,u=[];for(const t of e){const{objectId:e}=t;l.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||u.push(t)}return u}_prepareQuery(e){const t=[],s=[];for(const[i,n]of e){const e=[];for(const t of n)this._addToQueriesOrCachedResult(i,t.target,e,s),"edge"===t.type&&(this._addToQueriesOrCachedResult(i,t.start,e,s),this._addToQueriesOrCachedResult(i,t.end,e,s));0!==e.length&&t.push({objectId:i,points:e})}return[t,s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=F(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new T(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=F(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class T{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function F(e,{x:t,y:s,z:i}){return`${e}-${t}-${s}-${i??0}}`}function S(){return[]}class I{filter(e,t){return t}notifyElevationSourceChange(){}}class z{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(B),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":A(i,t,s);continue;case"vertex":R(i,t,s);continue}return e}}function M(e){return e.distance<=1}function O(e=!1){return e?new z:new I}function A(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),h=Math.min(1,Math.max(0,l/a)),u=s.x+n*h,d=s.y+r*h,c=s.z+o*h;e.x=u,e.y=d,e.z=c}(a,t,r,o);const l=(t.x-a.x)/s,h=(t.y-a.y)/i,u=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+h*h+u*u)}function R(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,h=Math.sqrt(o*o+a*a+l*l);e.distance=h}function B(e,t){return e.distance-t.distance}var D=s(22974),j=s(19153);function P(e=!1,t){return e?new H(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class H{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.z(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=k(t),r=n.get(e);if(r)for(const e of r)i.push((0,D.d9)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const r=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,o.k_)(t),r!==this._cacheVersion)return this.fetch(e,t);const h=[],{length:u}=a;for(let e=0;e<u;++e){const t=a[e],i=k(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),h.push((0,D.d9)(t))}return i.concat(h)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function k(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,j.hP)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,j.hP)(n).toString()}default:return""}}var Z=s(92036);let Y=class extends Z.Z{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,l.Cb)()],Y.prototype,"updating",void 0),Y=(0,i._)([(0,u.j)("esri.core.AsyncSequence")],Y);var L,V=s(66643),U=s(3920),q=s(50758),X=s(92604),J=s(6570),W=s(24470),G=s(98732),$=s(66677),Q=s(78760),K=s(34599);class ee{constructor(e,t){this.data=e,this.resolution=t,this.state={type:L.CREATED},this.alive=!0}process(e){switch(this.state.type){case L.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case L.FETCH_COUNT:break;case L.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case L.FETCH_FEATURES:break;case L.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case L.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case L.CREATED:case L.FETCH_COUNT:return 0;case L.FETCHED_COUNT:return this.state.featureCount;case L.FETCH_FEATURES:return this.state.previous.featureCount;case L.FETCHED_FEATURES:return this.state.features.length;case L.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case L.CREATED:return"created";case L.FETCH_COUNT:return"fetch-count";case L.FETCHED_COUNT:return"fetched-count";case L.FETCH_FEATURES:return"fetch-features";case L.FETCHED_FEATURES:return"fetched-features";case L.DONE:return"done"}}_gotoFetchCount(e,t){return{type:L.FETCH_COUNT,previous:e,task:(0,V.vr)((async e=>{const s=await(0,V.mt)(t.fetchCount(this,e));this.state.type===L.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:L.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:L.FETCH_FEATURES,previous:e,task:(0,V.vr)((async s=>{const i=await(0,V.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===L.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:L.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:L.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:L.CREATED},e.type){case L.CREATED:case L.FETCHED_COUNT:case L.FETCHED_FEATURES:case L.DONE:break;case L.FETCH_COUNT:case L.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,W.oJ)(e,te),(0,W.kK)(this.data.extent,te))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(L||(L={}));const te=(0,W.Ue)();let se=class extends U.r{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this.updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._pendingEdits=new Y,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,h.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),a.Z_)}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.M8)(this.url))return;const e=(0,V.vr)((async e=>{try{const t=await(0,K.Vr)(this.url,new g.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=J.Z.fromJSON(t.data?.extent)}catch(e){(0,o.r9)(e),X.Z.getLogger(this).warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,q.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)));null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<re}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(oe/(s*s))<ae}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<L.FETCHED_COUNT&&this.updatingHandles.addPromise(s.process(e)),s.state.type<=L.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new ee(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ne,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:h,exceededTransferLimit:u}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=h.length;for(const e of h)n.push(e);if(o=t-r,!l||!u||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.qp)(this.url,e,new Q.J({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ne,signal:t});return(0,G.lM)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.JT)(this.url,e,s,{query:this._configuration.customParameters,timeout:ne,signal:t});return(0,G.h_)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.Z({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,W.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?g.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,h=l*((a||n)&&r?r:o||ie);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/h)),e.num=Math.min(s,e.maxRecordCountFactor*h)):e.num=Math.min(s,h),!0}};(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"url",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"globalIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"store",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,l.Cb)()],se.prototype,"filter",null),(0,i._)([(0,l.Cb)()],se.prototype,"customParameters",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_configuration",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileInfo",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileSize",null),(0,i._)([(0,l.Cb)()],se.prototype,"tilesOfInterest",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"availability",void 0),(0,i._)([(0,l.Cb)()],se.prototype,"hasZ",null),se=(0,i._)([(0,u.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],se);const ie=2e3,ne=6e5,re=1e6,oe=25,ae=1;var le=s(43090),he=s(91303),ue=s(37549),de=s(43077);class ce{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let pe=class extends Z.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*he.Y.MEGABYTES,this._tileBounds=new ue.H,this._tiles=new ce,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,W.Ue)()}add(e,t){const s=[];for(const e of t)this._referenceFeature(e.objectId)===ve.ADDED&&s.push(e);this._addTileStorage(e,new Set(t.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,le.do)(e.lengths,4);return 32+(0,le.do)(e.coords,8)+t}(e.geometry)+(0,le.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(s),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new _e(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ve.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,G.$)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0)){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,W.kK)((0,W.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new ge(e);if(this._tiles.has(e.id))return new ge(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,K.hH)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,f.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&this._tilesAreRelated(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),h=e.children[l];if(null!=h)this._populateChildren(h,t,s,i);else{const n=new fe(e.level+1,r,o);s.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<ye&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s=0;this._forEachLeaf(e,(e=>{const i=this._tiles.get(e.id);if(i){s+=i.byteSize;for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,s),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s){const i=new me(s,e,this.extent);return this._collectMissingTilesRecurse(t,i,1),i.info}_collectMissingTilesRecurse(e,t,s){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,s);const i=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),i):this._collectMissingTilesRecurse(n,t,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ve.ADDED:ve.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ve.REMOVED):(t>0&&this._refCounts.set(e,t),ve.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,l.Cb)({constructOnly:!0})],pe.prototype,"featureStore",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"tileInfo",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"extent",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"maximumByteSize",void 0),pe=(0,i._)([(0,u.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],pe);class _e{constructor(e,t,s){this.data=e,this.objectIds=t,this.byteSize=s}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class ge{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,W.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class me{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new ge(t),null!=s&&(this._extent=(0,W.oJ)(s))}addMissing(e,t,s,i){const n=new de.f(null,e,t,s);this._tileInfo.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,W.kK)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,W.SO)(n.extent))}}const ye=.18751;var ve;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ve||(ve={}));let be=class extends n.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,o.hh)(),this._elevationAligner=E(),this._elevationFilter=O(),this._symbologyCandidatesFetcher=P(),this._handles=new r.Z,this._updatingHandles=new d.t,this._editsUpdatingHandles=new d.t,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={points:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,o.k_)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,o.k_)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear(),this._handles?.destroy()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fields:n}=e.serviceInfo,{hasZ:r}=e,o=c.Z.fromJSON(e.spatialReference);this._spatialReference=o,this._featureStore=new p.Z({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new _.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new se({store:new pe({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:o,sourceSpatialReference:c.Z.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=E(l,{elevationInfo:null!=e.elevationInfo?m.Z.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures,spatialReference:o}),this._elevationFilter=O(l),this._handles.add([(0,a.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),a.Z_),(0,a.YP)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){await this._whenSetup.promise,(0,o.k_)(t);const s=function(e){return{point:e.point,mode:e.mode,distance:e.distance,returnEdge:e.returnEdge,returnVertex:e.returnVertex,query:null!=e.filter?e.filter:{where:"1=1"}}}(e),i=null!=t?t.signal:null,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,o.k_)(i);const r=await this._elevationAligner.alignCandidates(n.candidates,i);(0,o.k_)(i);const a=await this._symbologyCandidatesFetcher.fetch(r,i);(0,o.k_)(i);const l=0===a.length?r:r.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.Z.fromJSON(e.tileInfo):null,Ee}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.refresh(),Ee}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),await(0,a.N1)((()=>!this.updatingExcludingEdits),t),(0,o.k_)(t),Ee}async getDebugInfo(e,t){return(0,o.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t);const s=(0,o.hh)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),Ee}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,o.k_)(t),Ee}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Ee}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Ee}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=P(e,this._getSymbologyCandidates),Ee}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)()],be.prototype,"_isInitializing",void 0),be=(0,i._)([(0,u.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],be);const we=be,Ee={result:{}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(92036),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(8346),r.e(4547),r.e(5235),r.e(6486),r.e(1596),r.e(9393)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(92036),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(8346),r.e(4547),r.e(5235),r.e(4565),r.e(6486),r.e(2920)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5825,2442],{37140:(e,t,r)=>{function n(){const e=new Float32Array(4);return e[3]=1,e}function o(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}r.d(t,{b:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,4)},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}},Symbol.toStringTag,{value:"Module"}))},58995:(e,t,r)=>{r.d(t,{rS:()=>u});var n=r(2109),o=r(82971),i=r(8744);const s=new o.Z(n.kU),a=new o.Z(n.JL),l=new o.Z(n.mM);function u(e){return e&&((0,i.BZ)(e)||(0,i.fS)(e,a))?a:e&&((0,i.V2)(e)||(0,i.fS)(e,l))?l:s}new o.Z(n.pn)},62073:(e,t,r)=>{r(22021),r(17896);var n,o,i=r(65617);r(29268),r(61277),r(12981),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(o=n||(n={}))[o.NONE=0]="NONE",o[o.CLAMP=1]="CLAMP",o[o.INFINITE_MIN=4]="INFINITE_MIN",o[o.INFINITE_MAX=8]="INFINITE_MAX",n.INFINITE_MIN,n.INFINITE_MAX,n.INFINITE_MAX},16451:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),c=r(72729),p=r(70082);let d=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,l.j)("esri.layers.support.FeatureType")],d);const f=d},14147:(e,t,r)=>{r.d(t,{W:()=>u});var n=r(40330),o=r(3172),i=r(95330),s=r(19238),a=r(48522),l=r(15235);class u{constructor(e,t,r,n){this._parsedUrl=e,this._portalItem=t,this._apiKey=r,this.signal=n,this._rootDocument=null;const o=this._parsedUrl?.path.match(/^(.*)\/SceneServer\/layers\/([\d]*)\/?$/i);o&&(this._urlParts={root:o[1],layerId:parseInt(o[2],10)})}async fetch(){if(!this._urlParts)return null;const e=this._portalItem??await this._portalItemFromServiceItemId();if(null==e)return this._loadFromUrl();const t=await this._findAndLoadRelatedPortalItem(e);return null==t?null:this._loadFeatureLayerFromPortalItem(t)}async fetchPortalItem(){if(!this._urlParts)return null;const e=this._portalItem??await this._portalItemFromServiceItemId();return null==e?null:this._findAndLoadRelatedPortalItem(e)}async _fetchRootDocument(){if(null!=this._rootDocument)return this._rootDocument;if(null==this._urlParts)return this._rootDocument={},{};const e={query:{f:"json",token:this._apiKey},responseType:"json",signal:this.signal},t=`${this._urlParts.root}/SceneServer`;try{const r=await(0,o.default)(t,e);this._rootDocument=r.data}catch{this._rootDocument={}}return this._rootDocument}async _fetchServiceOwningPortalUrl(){const e=this._parsedUrl?.path,t=e?n.id?.findServerInfo(e):null;if(t?.owningSystemUrl)return t.owningSystemUrl;const r=e?e.replace(/(.*\/rest)\/.*/i,"$1")+"/info":null;try{const e=(await(0,o.default)(r,{query:{f:"json"},responseType:"json",signal:this.signal})).data.owningSystemUrl;if(e)return e}catch(e){(0,i.r9)(e)}return null}async _findAndLoadRelatedPortalItem(e){try{return(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:this.signal})).find((e=>"Feature Service"===e.type))||null}catch(e){return(0,i.r9)(e),null}}async _loadFeatureLayerFromPortalItem(e){await e.load({signal:this.signal});const t=await this._findMatchingAssociatedSublayerUrl(e.url??"");return new s.default({url:t,portalItem:e}).load({signal:this.signal})}async _loadFromUrl(){const e=await this._findMatchingAssociatedSublayerUrl(`${this._urlParts?.root}/FeatureServer`);return new s.default({url:e}).load({signal:this.signal})}async _findMatchingAssociatedSublayerUrl(e){const t=e.replace(/^(.*FeatureServer)(\/[\d]*\/?)?$/i,"$1"),r=this._urlParts?.layerId,n=this._fetchRootDocument(),i=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:this.signal};return(0,o.default)(t,r)},s=i("anonymous").catch((()=>i("no-prompt"))),[a,l]=await Promise.all([s,n]),u=l&&l.layers,c=a.data&&a.data.layers;if(!Array.isArray(c))throw new Error("expected layers array");if(Array.isArray(u)){for(let e=0;e<Math.min(u.length,c.length);e++)if(u[e].id===r)return`${t}/${c[e].id}`}else if(null!=r&&r<c.length)return`${t}/${c[r].id}`;throw new Error("could not find matching associated sublayer")}async _portalItemFromServiceItemId(){const e=(await this._fetchRootDocument()).serviceItemId;if(!e)return null;const t=new l.default({id:e,apiKey:this._apiKey}),r=await this._fetchServiceOwningPortalUrl();null!=r&&(t.portal=new a.Z({url:r}));try{return t.load({signal:this.signal})}catch(e){return(0,i.r9)(e),null}}}},15506:(e,t,r)=>{r.d(t,{C:()=>n});const n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var n=r(69285);function o(e,t,r){if(!r||!r.features||!r.hasZ)return;const o=(0,n.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var n,o=r(43697),i=r(66577),s=r(38171),a=r(35454),l=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),d=r(52011),f=r(30556),y=r(82971),h=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],i=s.Z.fromJSON(o),a=o.geometry&&o.geometry.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=o.aggregateGeometries,u=i.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}n.push(i)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,i=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)s?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[i,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*i+n),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const i=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===o||(i.push([e-n,s-o]),n=e,o=s)}else n=t(a[0]),o=r(a[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],s=this._quantizePoints(i,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=r(a)}}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let s,a;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,c.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,c.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,p.r)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,f.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,c.Cb)({types:i.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,p.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,c.Cb)({type:y.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,f.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,c.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,o._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>i,I4:()=>o,eG:()=>l,lF:()=>s,lj:()=>c,qP:()=>a,wW:()=>u});const n=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},91891:(e,t,r)=>{r.d(t,{I_:()=>d,W7:()=>h,qM:()=>g});var n=r(20102),o=r(22974),i=r(92604),s=r(25683),a=r(35065);const l=i.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function u(e,t,r){let o="",i=0;for(;i<r;){const s=e[t+i];if(s<128)o+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];o+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);i+=4}}}return o}function c(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=b[s];r.fields[i.property]=a(e,n),n+=w[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function p(e,t,r){const o=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(o.push(u(r,a,i-1)),0!==r[a+i-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=i}return o}function d(e,t){return new(0,w[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function f(e,t,r){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],l=(0,o.d9)(t[r]);if(l.count=i.fields.count??0,"String"===l.valueType){if(l.byteOffset=a,l.byteCount=i.fields[r+"ByteCount"],"UTF-8"!==l.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:l.encoding});if(l.timeEncoding&&"ECMA_ISO8601"!==l.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:l.timeEncoding})}else{if(!S(l.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:l.valueType});{const e=I(l.valueType);a+=a%e!=0?e-a%e:0,l.byteOffset=a,l.byteCount=e*l.valuesPerElement*l.count}}a+=l.byteCount??0,s.entries[r]=l}return s.byteCount=a-s.byteOffset,s}function y(e,t,r){if(t!==e&&l.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function h(e,t){const r=c(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},i=r.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:s},i=m[e]||"_"+e;o.vertexAttributes[i]=r,n+=I(r.valueType)*r.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:a};o.faces[e]=r,n+=I(r.valueType)*r.valuesPerElement*a}}const l=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&l){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:l};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:I(r.valueType))*r.valuesPerElement*l}}return y(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}const m={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function g(e,t,r){if("lepcc-rgb"===e.encoding)return(0,s.IT)(t);if("lepcc-intensity"===e.encoding)return(0,s.ti)(t);if(null!=e.encoding&&""!==e.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(l.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(l.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const o=f(t,e,r);y(o.byteOffset+o.byteCount,t.byteLength,"attribute");const i=o.entries.attributeValues||o.entries.objectIds;if(i){if("String"===i.valueType){const e=o.entries.attributeByteCounts,r=d(t,e),n=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,i);return i.timeEncoding?function(e,t,r){return p(e,t,r).map((e=>{const t=e?Date.parse(e):null;return t&&!Number.isNaN(t)?t:null}))}(e.count,r,n):p(e.count,r,n)}return d(t,i)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const w={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},b={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function S(e){return w.hasOwnProperty(e)}function I(e){return S(e)?w[e].BYTES_PER_ELEMENT:0}},77397:(e,t,r)=>{r.d(t,{xe:()=>S});var n=r(3172),o=(r(67676),r(20102),r(80442),r(95330)),i=r(1533),s=(r(21787),r(46521)),a=(r(52138),r(13598)),l=(r(51305),r(37140)),u=(r(17896),r(65617)),c=(r(2109),r(44547),r(82971),r(58995),r(24470)),p=(r(8744),r(14165),r(91891));r(22303);var d,f,y=r(88669);(f=d||(d={}))[f.INVISIBLE=0]="INVISIBLE",f[f.TRANSPARENT=1]="TRANSPARENT",f[f.OPAQUE=2]="OPAQUE";(0,y.f)(0,0,0,.2),d.OPAQUE;(0,y.f)(0,0,0,.2),d.OPAQUE,r(6206);var h=r(94961),m=r(72119);r(98766),r(60437),r(62073),r(64822),(0,h.a)(),(0,u.c)(),(0,u.c)(),(0,y.c)(),(0,s.c)(),(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let n=0;n<r.length;n++)e[t+n]=r[n];t+=6};r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4])})(),(0,u.c)(),(0,u.c)(),(0,u.c)(),(0,h.a)();var g,w,b=r(51417);function S(e,t,r,i,s){const a=[];for(const n of t)if(n&&s.includes(n.name)){const t=`${e}/nodes/${r}/attributes/${n.key}/0`;a.push({url:t,storageInfo:n})}return(0,o.as)(a.map((e=>(0,n.default)(e.url,{responseType:"array-buffer"}).then((t=>(0,p.qM)(e.storageInfo,t.data)))))).then((e=>{const t=[];for(const r of i){const n={};for(let t=0;t<e.length;t++){const o=e[t].value;null!=o&&(n[a[t].storageInfo.name]=v(o,r))}t.push(n)}return t}))}(0,c.Ue)(),(w=g||(g={}))[w.OUTSIDE=0]="OUTSIDE",w[w.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",w[w.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",w[w.INSIDE=3]="INSIDE";const I=-32768,C=-(2**31);function v(e,t){if(!e)return null;const r=e[t];return(0,i.z3)(e)?r===I?null:r:(0,i.Hx)(e)?r===C?null:r:r!=r?null:r}const T=new Array(24);new b.a(T,3,!0),(0,u.c)(),(0,u.c)(),(0,s.c)(),(0,a.c)(),(0,l.c)(),(0,c.Ue)(),(0,c.Ue)(),function(e=[0,0,0],t=[-1,-1,-1],r=(0,h.a)()){(0,u.a)(e),(0,m.b)(t),(0,l.b)(r)}(),(0,u.c)(),new Array(72),(0,a.c)()},25683:(e,t,r)=>{r.d(t,{Gi:()=>u,IT:()=>y,ti:()=>g});var n=r(20102);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+i.identifierOffset,i.identifierLength)),version:t.getUint16(r+i.versionOffset,o),checksum:t.getUint32(r+i.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function l(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function u(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:u}=s(e,t,r);if(r+=i.byteCount,"LEPCC "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(u>1)throw new n.Z("lepcc-decode-error","Unknown version");const p=l(t,r);if(r+=a.byteCount,p.sizeHi*2**32+p.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*p.count),f=[],y=[],h=[],m=[];if(r=c(e,r,f),r=c(e,r,y),r=c(e,r,h),r=c(e,r,m),r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let g=0,w=0;for(let e=0;e<f.length;e++){w+=f[e];let t=0;for(let r=0;r<y[e];r++){t+=h[g];const e=m[g];d[3*g]=Math.min(p.maxX,p.minX+2*p.errorX*t),d[3*g+1]=Math.min(p.maxY,p.minY+2*p.errorY*w),d[3*g+2]=Math.min(p.maxZ,p.minZ+2*p.errorZ*e),g++}}return{errorX:p.errorX,errorY:p.errorY,errorZ:p.errorZ,result:d}}function c(e,t,r){const n=[];t=p(e,t,n);const o=[];for(let i=0;i<n.length;i++){o.length=0,t=p(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[i])}return t}function p(e,t,r){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,l=!!(32&s),u=(192&s)>>6;let c=0;if(0===u)c=i.getUint32(1,o),t+=5;else if(1===u)c=i.getUint16(1,o),t+=3;else{if(2!==u)throw new n.Z("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(l)throw new n.Z("lepcc-decode-error","LUT not implemented");const p=Math.ceil(c*a/8),d=new Uint8Array(e,t,p);let f=0,y=0,h=0;const m=-1>>>32-a;for(let e=0;e<c;e++){for(;y<a;)f|=d[h]<<y,y+=8,h+=1;r[e]=f&m,f>>>=a,y-=a,y+a>32&&(f|=d[h-1]>>8-y)}return t+h}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function f(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function y(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"ClusterRGB"!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const l=f(t,r);if(r+=d.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===l.lookupMethod||1===l.lookupMethod)&&0===l.compressionMethod){if(3*l.colorMapCount+l.count+r!==e.byteLength||l.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*l.colorMapCount),o=new Uint8Array(e,r+3*l.colorMapCount,l.count),i=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++){const r=o[e];i[3*e]=t[3*r],i[3*e+1]=t[3*r+1],i[3*e+2]=t[3*r+2]}return i}if(0===l.lookupMethod&&0===l.compressionMethod){if(3*l.count+r!==e.byteLength||0!==l.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(l.lookupMethod<=2&&1===l.compressionMethod){if(r+3!==e.byteLength||1!==l.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const o=t.getUint8(r),i=t.getUint8(r+1),s=t.getUint8(r+2),a=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++)a[3*e]=o,a[3*e+1]=i,a[3*e+2]=s;return a}throw new n.Z("lepcc-decode-error","Bad method "+l.lookupMethod+","+l.compressionMethod)}const h={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function m(e,t){return{sizeLo:e.getUint32(t+h.sizeLo,o),sizeHi:e.getUint32(t+h.sizeHi,o),count:e.getUint32(t+h.count,o),scaleFactor:e.getUint16(t+h.scaleFactor,o),bitsPerPoint:e.getUint8(t+h.bitsPerPoint),reserved:e.getUint8(t+h.reserved)}}function g(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"Intensity "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const l=m(t,r);if(r+=h.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const u=new Uint16Array(l.count);if(8===l.bitsPerPoint){if(l.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,l.count);for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}else if(16===l.bitsPerPoint){if(2*l.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,l.count);for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}else{const t=[];if(p(e,r,t)!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}return u}},19833:(e,t,r)=>{r.d(t,{V5:()=>i,e7:()=>o});var n=r(35671);async function o(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:o}=t,{objectIdField:i,typeIdField:s,globalIdField:a,relationships:l}=e;if(r.includes("*"))return["*"];const u=o?await(0,n.CH)(e):[],c=(0,n.Q0)(e.fieldsIndex,[...r,...u]);return s&&c.push(s),c&&i&&e.fieldsIndex?.has(i)&&!c.includes(i)&&c.push(i),c&&a&&e.fieldsIndex?.has(a)&&!c.includes(a)&&c.push(a),l&&l.forEach((t=>{const{keyField:r}=t;c&&r&&e.fieldsIndex?.has(r)&&!c.includes(r)&&c.push(r)})),c}function i(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1993,5732,661,5234,9880],{99880:(t,e,n)=>{n.d(e,{V:()=>l});var s=n(68773),i=(n(3172),n(20102)),r=n(92604),o=n(81271);const a=r.Z.getLogger("esri.assets");function l(t){if(!s.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new i.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(s.default.assetsPath,t)}},5732:(t,e,n)=>{n.d(e,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},52138:(t,e,n)=>{n.d(e,{A:()=>m,a:()=>l,d:()=>p,e:()=>d,f:()=>f,g:()=>y,h:()=>b,i:()=>o,j:()=>M,k:()=>c,m:()=>h,s:()=>r,t:()=>a,w:()=>u,y:()=>v,z:()=>S});var s=n(65617),i=n(46851);function r(t,e,n,s,i,r,o,a,l,h,u,c,d,f,p,m,g){return t[0]=e,t[1]=n,t[2]=s,t[3]=i,t[4]=r,t[5]=o,t[6]=a,t[7]=l,t[8]=h,t[9]=u,t[10]=c,t[11]=d,t[12]=f,t[13]=p,t[14]=m,t[15]=g,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const n=e[1],s=e[2],i=e[3],r=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=s,t[9]=r,t[11]=e[14],t[12]=i,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],_=e[15],y=n*a-s*o,x=n*l-i*o,b=n*h-r*o,M=s*l-i*a,S=s*h-r*a,v=i*h-r*l,w=u*m-c*p,I=u*g-d*p,E=u*_-f*p,F=c*g-d*m,z=c*_-f*m,B=d*_-f*g;let N=y*B-x*z+b*F+M*E-S*I+v*w;return N?(N=1/N,t[0]=(a*B-l*z+h*F)*N,t[1]=(i*z-s*B-r*F)*N,t[2]=(m*v-g*S+_*M)*N,t[3]=(d*S-c*v-f*M)*N,t[4]=(l*E-o*B-h*I)*N,t[5]=(n*B-i*E+r*I)*N,t[6]=(g*b-p*v-_*x)*N,t[7]=(u*v-d*b+f*x)*N,t[8]=(o*z-a*E+h*w)*N,t[9]=(s*E-n*z-r*w)*N,t[10]=(p*S-m*b+_*y)*N,t[11]=(c*b-u*S-f*y)*N,t[12]=(a*I-o*F-l*w)*N,t[13]=(n*F-s*I+i*w)*N,t[14]=(m*x-p*M-g*y)*N,t[15]=(u*M-c*x+d*y)*N,t):null}function h(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=e[4],l=e[5],h=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],_=e[14],y=e[15];let x=n[0],b=n[1],M=n[2],S=n[3];return t[0]=x*s+b*a+M*c+S*m,t[1]=x*i+b*l+M*d+S*g,t[2]=x*r+b*h+M*f+S*_,t[3]=x*o+b*u+M*p+S*y,x=n[4],b=n[5],M=n[6],S=n[7],t[4]=x*s+b*a+M*c+S*m,t[5]=x*i+b*l+M*d+S*g,t[6]=x*r+b*h+M*f+S*_,t[7]=x*o+b*u+M*p+S*y,x=n[8],b=n[9],M=n[10],S=n[11],t[8]=x*s+b*a+M*c+S*m,t[9]=x*i+b*l+M*d+S*g,t[10]=x*r+b*h+M*f+S*_,t[11]=x*o+b*u+M*p+S*y,x=n[12],b=n[13],M=n[14],S=n[15],t[12]=x*s+b*a+M*c+S*m,t[13]=x*i+b*l+M*d+S*g,t[14]=x*r+b*h+M*f+S*_,t[15]=x*o+b*u+M*p+S*y,t}function u(t,e,n){const s=n[0],i=n[1],r=n[2];if(e===t)t[12]=e[0]*s+e[4]*i+e[8]*r+e[12],t[13]=e[1]*s+e[5]*i+e[9]*r+e[13],t[14]=e[2]*s+e[6]*i+e[10]*r+e[14],t[15]=e[3]*s+e[7]*i+e[11]*r+e[15];else{const n=e[0],o=e[1],a=e[2],l=e[3],h=e[4],u=e[5],c=e[6],d=e[7],f=e[8],p=e[9],m=e[10],g=e[11];t[0]=n,t[1]=o,t[2]=a,t[3]=l,t[4]=h,t[5]=u,t[6]=c,t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=g,t[12]=n*s+h*i+f*r+e[12],t[13]=o*s+u*i+p*r+e[13],t[14]=a*s+c*i+m*r+e[14],t[15]=l*s+d*i+g*r+e[15]}return t}function c(t,e,n){const s=n[0],i=n[1],r=n[2];return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,s){let r,o,a,l,h,u,c,d,f,p,m,g,_,y,x,b,M,S,v,w,I,E,F,z,B=s[0],N=s[1],T=s[2],R=Math.sqrt(B*B+N*N+T*T);return R<(0,i.g)()?null:(R=1/R,B*=R,N*=R,T*=R,r=Math.sin(n),o=Math.cos(n),a=1-o,l=e[0],h=e[1],u=e[2],c=e[3],d=e[4],f=e[5],p=e[6],m=e[7],g=e[8],_=e[9],y=e[10],x=e[11],b=B*B*a+o,M=N*B*a+T*r,S=T*B*a-N*r,v=B*N*a-T*r,w=N*N*a+o,I=T*N*a+B*r,E=B*T*a+N*r,F=N*T*a-B*r,z=T*T*a+o,t[0]=l*b+d*M+g*S,t[1]=h*b+f*M+_*S,t[2]=u*b+p*M+y*S,t[3]=c*b+m*M+x*S,t[4]=l*v+d*w+g*I,t[5]=h*v+f*w+_*I,t[6]=u*v+p*w+y*I,t[7]=c*v+m*w+x*I,t[8]=l*E+d*F+g*z,t[9]=h*E+f*F+_*z,t[10]=u*E+p*F+y*z,t[11]=c*E+m*F+x*z,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e,n){if(0===e)return o(t);let s,r,a,l=n[0],h=n[1],u=n[2],c=Math.sqrt(l*l+h*h+u*u);return c<(0,i.g)()?null:(c=1/c,l*=c,h*=c,u*=c,s=Math.sin(e),r=Math.cos(e),a=1-r,t[0]=l*l*a+r,t[1]=h*l*a+u*s,t[2]=u*l*a-h*s,t[3]=0,t[4]=l*h*a-u*s,t[5]=h*h*a+r,t[6]=u*h*a+l*s,t[7]=0,t[8]=l*u*a+h*s,t[9]=h*u*a-l*s,t[10]=u*u*a+r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function m(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e,n){const s=e[0],i=e[1],r=e[2],o=e[3],a=s+s,l=i+i,h=r+r,u=s*a,c=s*l,d=s*h,f=i*l,p=i*h,m=r*h,g=o*a,_=o*l,y=o*h;return t[0]=1-(f+m),t[1]=c+y,t[2]=d-_,t[3]=0,t[4]=c-y,t[5]=1-(u+m),t[6]=p+g,t[7]=0,t[8]=d+_,t[9]=p-g,t[10]=1-(u+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const _=(0,s.c)();function y(t,e,n,s){const i=e[0],r=e[1],o=e[2],a=e[3],l=i+i,h=r+r,u=o+o,c=i*l,d=i*h,f=i*u,p=r*h,m=r*u,g=o*u,_=a*l,y=a*h,x=a*u,b=s[0],M=s[1],S=s[2];return t[0]=(1-(p+g))*b,t[1]=(d+x)*b,t[2]=(f-y)*b,t[3]=0,t[4]=(d-x)*M,t[5]=(1-(c+g))*M,t[6]=(m+_)*M,t[7]=0,t[8]=(f+y)*S,t[9]=(m-_)*S,t[10]=(1-(c+p))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function x(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function b(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function M(t,e){if(t===e)return!0;const n=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5],h=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],_=t[14],y=t[15],x=e[0],b=e[1],M=e[2],S=e[3],v=e[4],w=e[5],I=e[6],E=e[7],F=e[8],z=e[9],B=e[10],N=e[11],T=e[12],R=e[13],Z=e[14],A=e[15],O=(0,i.g)();return Math.abs(n-x)<=O*Math.max(1,Math.abs(n),Math.abs(x))&&Math.abs(s-b)<=O*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(r-M)<=O*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(o-S)<=O*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(a-v)<=O*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(l-w)<=O*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-I)<=O*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(u-E)<=O*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-F)<=O*Math.max(1,Math.abs(c),Math.abs(F))&&Math.abs(d-z)<=O*Math.max(1,Math.abs(d),Math.abs(z))&&Math.abs(f-B)<=O*Math.max(1,Math.abs(f),Math.abs(B))&&Math.abs(p-N)<=O*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(m-T)<=O*Math.max(1,Math.abs(m),Math.abs(T))&&Math.abs(g-R)<=O*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(_-Z)<=O*Math.max(1,Math.abs(_),Math.abs(Z))&&Math.abs(y-A)<=O*Math.max(1,Math.abs(y),Math.abs(A))}function S(t){const e=(0,i.g)(),n=t[0],s=t[1],r=t[2],o=t[4],a=t[5],l=t[6],h=t[8],u=t[9],c=t[10];return Math.abs(1-(n*n+o*o+h*h))<=e&&Math.abs(1-(s*s+a*a+u*u))<=e&&Math.abs(1-(r*r+l*l+c*c))<=e}function v(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const w=h,I=x;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],l=e[6],h=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],_=e[15];return t[0]=a*(d*_-f*g)-c*(l*_-h*g)+m*(l*f-h*d),t[1]=-(s*(d*_-f*g)-c*(i*_-r*g)+m*(i*f-r*d)),t[2]=s*(l*_-h*g)-a*(i*_-r*g)+m*(i*h-r*l),t[3]=-(s*(l*f-h*d)-a*(i*f-r*d)+c*(i*h-r*l)),t[4]=-(o*(d*_-f*g)-u*(l*_-h*g)+p*(l*f-h*d)),t[5]=n*(d*_-f*g)-u*(i*_-r*g)+p*(i*f-r*d),t[6]=-(n*(l*_-h*g)-o*(i*_-r*g)+p*(i*h-r*l)),t[7]=n*(l*f-h*d)-o*(i*f-r*d)+u*(i*h-r*l),t[8]=o*(c*_-f*m)-u*(a*_-h*m)+p*(a*f-h*c),t[9]=-(n*(c*_-f*m)-u*(s*_-r*m)+p*(s*f-r*c)),t[10]=n*(a*_-h*m)-o*(s*_-r*m)+p*(s*h-r*a),t[11]=-(n*(a*f-h*c)-o*(s*f-r*c)+u*(s*h-r*a)),t[12]=-(o*(c*g-d*m)-u*(a*g-l*m)+p*(a*d-l*c)),t[13]=n*(c*g-d*m)-u*(s*g-i*m)+p*(s*d-i*c),t[14]=-(n*(a*g-l*m)-o*(s*g-i*m)+p*(s*l-i*a)),t[15]=n*(a*d-l*c)-o*(s*d-i*c)+u*(s*l-i*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],s=t[2],i=t[3],r=t[4],o=t[5],a=t[6],l=t[7],h=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*o-n*r)*(c*g-d*m)-(e*a-s*r)*(u*g-d*p)+(e*l-i*r)*(u*m-c*p)+(n*a-s*o)*(h*g-d*f)-(n*l-i*o)*(h*m-c*f)+(s*l-i*a)*(h*p-u*f)},equals:M,exactEquals:b,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[3],o=n+n,a=s+s,l=i+i,h=n*o,u=s*o,c=s*a,d=i*o,f=i*a,p=i*l,m=r*o,g=r*a,_=r*l;return t[0]=1-c-p,t[1]=u+_,t[2]=d-g,t[3]=0,t[4]=u-_,t[5]=1-h-p,t[6]=f+m,t[7]=0,t[8]=d+g,t[9]=f-m,t[10]=1-h-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=_,s=-e[0],i=-e[1],r=-e[2],o=e[3],a=e[4],l=e[5],h=e[6],u=e[7],c=s*s+i*i+r*r+o*o;return c>0?(n[0]=2*(a*o+u*s+l*r-h*i)/c,n[1]=2*(l*o+u*i+h*s-a*r)/c,n[2]=2*(h*o+u*r+a*i-l*s)/c):(n[0]=2*(a*o+u*s+l*r-h*i),n[1]=2*(l*o+u*i+h*s-a*r),n[2]=2*(h*o+u*r+a*i-l*s)),g(t,e,n),t},fromRotation:p,fromRotationTranslation:g,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,n,s,i){const r=e[0],o=e[1],a=e[2],l=e[3],h=r+r,u=o+o,c=a+a,d=r*h,f=r*u,p=r*c,m=o*u,g=o*c,_=a*c,y=l*h,x=l*u,b=l*c,M=s[0],S=s[1],v=s[2],w=i[0],I=i[1],E=i[2],F=(1-(m+_))*M,z=(f+b)*M,B=(p-x)*M,N=(f-b)*S,T=(1-(d+_))*S,R=(g+y)*S,Z=(p+x)*v,A=(g-y)*v,O=(1-(d+m))*v;return t[0]=F,t[1]=z,t[2]=B,t[3]=0,t[4]=N,t[5]=T,t[6]=R,t[7]=0,t[8]=Z,t[9]=A,t[10]=O,t[11]=0,t[12]=n[0]+w-(F*w+N*I+Z*E),t[13]=n[1]+I-(z*w+T*I+A*E),t[14]=n[2]+E-(B*w+R*I+O*E),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:m,fromYRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,s,i,r,o){const a=1/(n-e),l=1/(i-s),h=1/(r-o);return t[0]=2*r*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*r*l,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(i+s)*l,t[10]=(o+r)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*r*2*h,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let s=0;return n>0?(s=2*Math.sqrt(n+1),t[3]=.25*s,t[0]=(e[6]-e[9])/s,t[1]=(e[8]-e[2])/s,t[2]=(e[1]-e[4])/s):e[0]>e[5]&&e[0]>e[10]?(s=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/s,t[0]=.25*s,t[1]=(e[1]+e[4])/s,t[2]=(e[8]+e[2])/s):e[5]>e[10]?(s=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/s,t[0]=(e[1]+e[4])/s,t[1]=.25*s,t[2]=(e[6]+e[9])/s):(s=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/s,t[0]=(e[8]+e[2])/s,t[1]=(e[6]+e[9])/s,t[2]=.25*s),t},getScaling:function(t,e){const n=e[0],s=e[1],i=e[2],r=e[4],o=e[5],a=e[6],l=e[8],h=e[9],u=e[10];return t[0]=Math.sqrt(n*n+s*s+i*i),t[1]=Math.sqrt(r*r+o*o+a*a),t[2]=Math.sqrt(l*l+h*h+u*u),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:v,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:S,lookAt:function(t,e,n,s){const r=e[0],a=e[1],l=e[2];let h=r-n[0],u=a-n[1],c=l-n[2];const d=(0,i.g)();if(Math.abs(h)<d&&Math.abs(u)<d&&Math.abs(c)<d)return void o(t);let f=1/Math.sqrt(h*h+u*u+c*c);h*=f,u*=f,c*=f;const p=s[0],m=s[1],g=s[2];let _=m*c-g*u,y=g*h-p*c,x=p*u-m*h;f=Math.sqrt(_*_+y*y+x*x),f?(f=1/f,_*=f,y*=f,x*=f):(_=0,y=0,x=0);let b=u*x-c*y,M=c*_-h*x,S=h*y-u*_;f=Math.sqrt(b*b+M*M+S*S),f?(f=1/f,b*=f,M*=f,S*=f):(b=0,M=0,S=0),t[0]=_,t[1]=b,t[2]=h,t[3]=0,t[4]=y,t[5]=M,t[6]=u,t[7]=0,t[8]=x,t[9]=S,t[10]=c,t[11]=0,t[12]=-(_*r+y*a+x*l),t[13]=-(b*r+M*a+S*l),t[14]=-(h*r+u*a+c*l),t[15]=1},mul:w,multiply:h,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,s){return t[0]=e[0]+n[0]*s,t[1]=e[1]+n[1]*s,t[2]=e[2]+n[2]*s,t[3]=e[3]+n[3]*s,t[4]=e[4]+n[4]*s,t[5]=e[5]+n[5]*s,t[6]=e[6]+n[6]*s,t[7]=e[7]+n[7]*s,t[8]=e[8]+n[8]*s,t[9]=e[9]+n[9]*s,t[10]=e[10]+n[10]*s,t[11]=e[11]+n[11]*s,t[12]=e[12]+n[12]*s,t[13]=e[13]+n[13]*s,t[14]=e[14]+n[14]*s,t[15]=e[15]+n[15]*s,t},ortho:function(t,e,n,s,i,r,o){const a=1/(e-n),l=1/(s-i),h=1/(r-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*a,t[13]=(i+s)*l,t[14]=(o+r)*h,t[15]=1,t},perspective:function(t,e,n,s,i){const r=1/Math.tan(e/2);let o;return t[0]=r/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(s-i),t[10]=(i+s)*o,t[14]=2*i*s*o):(t[10]=-1,t[14]=-2*s),t},perspectiveFromFieldOfView:function(t,e,n,s){const i=Math.tan(e.upDegrees*Math.PI/180),r=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+a),h=2/(i+r);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(o-a)*l*.5,t[9]=(i-r)*h*.5,t[10]=s/(n-s),t[11]=-1,t[12]=0,t[13]=0,t[14]=s*n/(n-s),t[15]=0,t},rotate:d,rotateX:function(t,e,n){const s=Math.sin(n),i=Math.cos(n),r=e[4],o=e[5],a=e[6],l=e[7],h=e[8],u=e[9],c=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=r*i+h*s,t[5]=o*i+u*s,t[6]=a*i+c*s,t[7]=l*i+d*s,t[8]=h*i-r*s,t[9]=u*i-o*s,t[10]=c*i-a*s,t[11]=d*i-l*s,t},rotateY:function(t,e,n){const s=Math.sin(n),i=Math.cos(n),r=e[0],o=e[1],a=e[2],l=e[3],h=e[8],u=e[9],c=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*i-h*s,t[1]=o*i-u*s,t[2]=a*i-c*s,t[3]=l*i-d*s,t[8]=r*s+h*i,t[9]=o*s+u*i,t[10]=a*s+c*i,t[11]=l*s+d*i,t},rotateZ:function(t,e,n){const s=Math.sin(n),i=Math.cos(n),r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],u=e[5],c=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=r*i+h*s,t[1]=o*i+u*s,t[2]=a*i+c*s,t[3]=l*i+d*s,t[4]=h*i-r*s,t[5]=u*i-o*s,t[6]=c*i-a*s,t[7]=d*i-l*s,t},scale:c,set:r,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:I,subtract:x,targetTo:function(t,e,n,s){const i=e[0],r=e[1],o=e[2],a=s[0],l=s[1],h=s[2];let u=i-n[0],c=r-n[1],d=o-n[2],f=u*u+c*c+d*d;f>0&&(f=1/Math.sqrt(f),u*=f,c*=f,d*=f);let p=l*d-h*c,m=h*u-a*d,g=a*c-l*u;return f=p*p+m*m+g*g,f>0&&(f=1/Math.sqrt(f),p*=f,m*=f,g*=f),t[0]=p,t[1]=m,t[2]=g,t[3]=0,t[4]=c*g-d*m,t[5]=d*p-u*g,t[6]=u*m-c*p,t[7]=0,t[8]=u,t[9]=c,t[10]=d,t[11]=0,t[12]=i,t[13]=r,t[14]=o,t[15]=1,t},translate:u,transpose:a},Symbol.toStringTag,{value:"Module"}))},32448:(t,e,n)=>{n.d(e,{Z:()=>l});var s=n(43697),i=n(92036),r=n(50758),o=n(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}}!function(t){class e{constructor(t=null){this._target=t,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(t,e){const n=this._listenersMap&&this._listenersMap.get(t);if(!n)return!1;const s=this._target||this;return[...n].forEach((t=>{t.call(s,e)})),n.length>0}on(t,e){if(Array.isArray(t)){const n=t.map((t=>this.on(t,e)));return(0,r.AL)(n)}if(t.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const n=this._listenersMap.get(t)||[];return n.push(e),this._listenersMap.set(t,n),{remove:()=>{const n=this._listenersMap&&this._listenersMap.get(t)||[],s=n.indexOf(e);s>=0&&n.splice(s,1)}}}once(t,e){const n=this.on(t,(t=>{n.remove(),e.call(null,t)}));return n}hasEventListener(t){const e=this._listenersMap&&this._listenersMap.get(t);return null!=e&&e.length>0}}t.EventEmitter=e,t.EventedMixin=t=>{let n=class extends t{constructor(){super(...arguments),this._emitter=new e}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};return n=(0,s._)([(0,o.j)("esri.core.Evented")],n),n};let n=class extends i.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(t,e){return this._emitter.emit(t,e)}on(t,e){return this._emitter.on(t,e)}once(t,e){return this._emitter.once(t,e)}hasEventListener(t){return this._emitter.hasEventListener(t)}};n=(0,s._)([(0,o.j)("esri.core.Evented")],n),t.EventedAccessor=n}(a||(a={}));const l=a},13867:(t,e,n)=>{n.d(e,{z:()=>i});var s=n(69801);class i{constructor(t,e){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,n=1){this._storage.put(this,t,e,n,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,n)=>{n.d(e,{WJ:()=>a,Xq:()=>o});var s,i,r=n(44553);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(t,e,n){this.name=t,this._storage=e,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),n&&(this._storage.registerRemoveFunc(this.id,n),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,n,s=0){this._storage.put(this,t,e,n,s)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,n){this._storage.updateSize(this,t,e,n)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,n,i,r){e=t.id+e;const o=this._db.get(e);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(e),o.entry!==n&&this._notifyRemove(e,o.entry,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,n,s.ALL);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:n,size:i,lifetime:a,lives:a}),this._size+=i,t.size+=i,this._checkSizeLimits()}updateSize(t,e,n,i){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===n){for(this._size-=r.size,t.size-=r.size;i>this._maxSize;){const t=this._notifyRemove(e,n,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}r.size=i,this._size+=i,t.size+=i,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const n=this._db.get(e);if(n)return this._size-=n.size,t.size-=n.size,this._db.delete(e),++this._hit,n.entry;++this._miss}get(t,e){e=t.id+e;const n=this._db.get(e);if(void 0!==n)return this._db.delete(e),n.lives=n.lifetime,this._db.set(e,n),++this._hit,n.entry;++this._miss}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},n=new Array;this._db.forEach(((t,s)=>{const i=t.lifetime;n[i]=(n[i]||0)+t.size,this._users.forAll((n=>{const{id:i,name:r}=n;if(s.startsWith(i)){const n=e[r]||0;e[r]=n+t.size}}))}));const s={};this._users.forAll((t=>{const n=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[n]||0;e[n]=i,s[n]=Math.round(100*t.hitRate)+"%"}else s[n]="0%"}));const i=Object.keys(e);i.sort(((t,n)=>e[n]-e[t])),i.forEach((n=>t[n]=Math.round(e[n]/2**20)+"MB / "+s[n]));for(let e=n.length-1;e>=0;--e){const s=n[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,n)=>{n.startsWith(e)&&(this._size-=t.size,this._db.delete(n),this._notifyRemove(n,t.entry,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,n){let s;return this._removeFuncs.some((i=>{if(t.startsWith(i[0])){const t=i[1](e,n);return"number"==typeof t&&(s=t),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,n]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,n,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,n=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,n&&(n.size-=e.size);const i=this._notifyRemove(t,e.entry,s.SOME);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let l=0},10661:(t,e,n)=>{n.d(e,{s:()=>i});var s=n(42100);class i extends s.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},66643:(t,e,n)=>{n.d(e,{Ed:()=>h,UI:()=>u,mt:()=>p,q6:()=>f,vr:()=>m});var s=n(43697),i=n(92036),r=n(70586),o=n(95330),a=n(5600),l=n(52011);function h(t,e,n){return(0,o.as)(t.map(((t,s)=>e.apply(n,[t,s]))))}async function u(t,e,n){return(await(0,o.as)(t.map(((t,s)=>e.apply(n,[t,s]))))).map((t=>t.value))}function c(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return c(await t)}catch(t){return d(t)}}async function p(t){try{return c(await t)}catch(t){return(0,o.r9)(t),d(t)}}function m(t,e){return new g(t,e)}let g=class extends i.Z{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=t(n),this.promise.then((t=>{this._result=c(t),this._cleanup()}),(t=>{this._result=d(t),this._cleanup()})),this._abortHandle=(0,o.fu)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.Cb)()],g.prototype,"value",null),(0,s._)([(0,a.Cb)()],g.prototype,"error",null),(0,s._)([(0,a.Cb)()],g.prototype,"finished",null),(0,s._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,s._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},24133:(t,e,n)=>{n.d(e,{Q:()=>a});var s=n(67676),i=n(70586),r=n(44553),o=n(88764);class a{constructor(t=9,e){this._compareMinX=c,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),b.prune(),M.prune(),S.prune(),v.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const s=this._toBBox;if(y(t,n))for(b.clear();n;){for(let i=0,r=n.children.length;i<r;i++){const r=n.children[i],o=n.leaf?s(r):r;y(t,o)&&(n.leaf?e(r):_(t,o)?this._all(r,e):b.push(r))}n=b.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!y(t,e))return!1;for(b.clear();e;){for(let s=0,i=e.children.length;s<i;s++){const i=e.children[s],r=e.leaf?n(i):i;if(y(t,r)){if(e.leaf||_(t,r))return!0;b.push(i)}}e=b.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new E([]),this}remove(t){if(!t)return this;let e,n=this._data,r=null,o=0,a=!1;const l=this._toBBox(t);for(S.clear(),v.clear();n||S.length>0;){if(n||(n=(0,i.j0)(S.pop()),r=S.data[S.length-1],o=v.pop()??0,a=!0),n.leaf&&(e=(0,s.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),S.push(n),this._condense(S),this;a||n.leaf||!_(n,l)?r?(o++,n=r.children[o],a=!1):n=null:(S.push(n),v.push(o),o=0,r=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(M.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else M.pushArray(n.children);n=M.pop()??null}}_build(t,e,n,s){const i=n-e+1;let r=this._maxEntries;if(i<=r){const s=new E(t.slice(e,n+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(i)/Math.log(r)),r=Math.ceil(i/r**(s-1)));const o=new F([]);o.height=s;const a=Math.ceil(i/r),h=a*Math.ceil(Math.sqrt(r));x(t,e,n,h,this._compareMinX);for(let i=e;i<=n;i+=h){const e=Math.min(i+h-1,n);x(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);o.children.push(this._build(t,n,i,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(t,e,n,s){for(;s.push(e),!0!==e.leaf&&s.length-1!==n;){let n,s=1/0,i=1/0;for(let r=0,o=e.children.length;r<o;r++){const o=e.children[r],a=f(o),l=m(t,o)-a;l<i?(i=l,s=a<s?a:s,n=o):l===i&&a<s&&(s=a,n=o)}e=n||e.children[0]}return e}_insert(t,e,n){const s=this._toBBox,i=n?t:s(t);S.clear();const r=this._chooseSubtree(i,this._data,e,S);for(r.children.push(t),u(r,i);e>=0&&S.data[e].children.length>this._maxEntries;)this._split(S,e),e--;this._adjustParentBBoxes(i,S,e)}_split(t,e){const n=t.data[e],s=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,s);const r=this._chooseSplitIndex(n,i,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=n.children.splice(r,n.children.length-r),a=n.leaf?new E(o):new F(o);a.height=n.height,l(n,this._toBBox),l(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new F([t,e]),this._data.height=t.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let s,i,r;s=i=1/0;for(let o=e;o<=n-e;o++){const e=h(t,0,o,this._toBBox),a=h(t,o,n,this._toBBox),l=g(e,a),u=f(e)+f(a);l<s?(s=l,r=o,i=u<i?u:i):l===s&&u<i&&(i=u,r=o)}return r}_chooseSplitAxis(t,e,n){const s=t.leaf?this._compareMinX:c,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,s)<this._allDistMargin(t,e,n,i)&&t.children.sort(s)}_allDistMargin(t,e,n,s){t.children.sort(s);const i=this._toBBox,r=h(t,0,e,i),o=h(t,n-e,n,i);let a=p(r)+p(o);for(let s=e;s<n-e;s++){const e=t.children[s];u(r,t.leaf?i(e):e),a+=p(r)}for(let s=n-e-1;s>=e;s--){const e=t.children[s];u(o,t.leaf?i(e):e),a+=p(o)}return a}_adjustParentBBoxes(t,e,n){for(let s=n;s>=0;s--)u(e.data[s],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],r=i.children;r.splice((0,s.cq)(r,n,r.length,i.indexHint),1)}else this.clear();else l(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){h(t,0,t.children.length,e,t)}function h(t,e,n,s,i){i||(i=new E([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r,o=e;o<n;o++)r=t.children[o],u(i,t.leaf?s(r):r);return i}function u(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function c(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function g(t,e){const n=Math.max(t.minX,e.minX),s=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-s)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function x(t,e,n,s,r){const a=[e,n];for(;a.length;){const e=(0,i.j0)(a.pop()),n=(0,i.j0)(a.pop());if(e-n<=s)continue;const l=n+Math.ceil((e-n)/s/2)*s;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const b=new r.Z,M=new r.Z,S=new r.Z,v=new r.Z({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class I extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class E extends I{constructor(t){super(),this.children=t,this.leaf=!0}}class F extends I{constructor(t){super(),this.children=t,this.leaf=!1}}},14808:(t,e,n)=>{n.d(e,{Qc:()=>u,WU:()=>a,lt:()=>h});var s=n(19153),i=n(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(t=(0,i.Kd)()){let e=(t=t.toLowerCase())in r;if(!e){const n=t.split("-");n.length>1&&n[0]in r&&(t=n[0],e=!0),e||(t="en")}const[n,s,o="#,##0.###"]=r[t];return{decimal:n,group:s,pattern:o}}function a(t,e){const n=o((e={...e}).locale);e.customs=n;const s=e.pattern||n.pattern;return isNaN(t)||Math.abs(t)===1/0?null:function(t,e,n){const s=(n=n||{}).customs.group,i=n.customs.decimal,r=e.split(";"),o=r[0];if((e=r[t<0?1:0]||"-"+o).includes("%"))t*=100;else if(e.includes("‰"))t*=1e3;else{if(e.includes("¤"))throw new Error("currency notation not supported");if(e.includes("E"))throw new Error("exponential notation not supported")}const a=l,h=o.match(a);if(!h)throw new Error("unable to find a number expression in pattern: "+e);return!1===n.fractional&&(n.places=0),e.replace(a,function(t,e,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const s=e.split("."),i="string"==typeof n.places&&n.places.indexOf(",");let r=n.places;i?r=n.places.substring(i+1):+r>=0||(r=(s[1]||[]).length),n.round<0||(t=Number(t.toFixed(Number(r))));const o=String(Math.abs(t)).split("."),a=o[1]||"";if(s[1]||n.places){i&&(n.places=n.places.substring(0,i));const t=void 0!==n.places?n.places:s[1]&&s[1].lastIndexOf("0")+1;+t>a.length&&(o[1]=a.padEnd(Number(t),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=s[0].replace(",","");let h=l.indexOf("0");-1!==h&&(h=l.length-h,h>o[0].length&&(o[0]=o[0].padStart(h,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-h)));let u,c,d=s[0].lastIndexOf(",");if(-1!==d){u=s[0].length-d-1;const t=s[0].substr(0,d);d=t.lastIndexOf(","),-1!==d&&(c=t.length-d-1)}const f=[];for(let t=o[0];t;){const e=t.length-u;f.push(e>0?t.substr(e):t),t=e>0?t.slice(0,e):"",c&&(u=c,c=void 0)}return o[0]=f.reverse().join(n.group||","),o.join(n.decimal||".")}(t,h[0],{decimal:i,group:s,places:n.places,round:n.round}))}(t,s,e)}const l=/[#0,]*[#0](?:\.0*#*)?/;function h(t){const e=o((t=t||{}).locale),n=t.pattern||e.pattern,i=e.group,r=e.decimal;let a=1;if(n.includes("%"))a/=100;else if(n.includes("‰"))a/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const h=n.split(";");1===h.length&&h.push("-"+h[0]);const u=d(h,(e=>(e="(?:"+(0,s.Qs)(e,".")+")").replace(l,(e=>{const n={signed:!1,separator:t.strict?i:[i,""],fractional:t.fractional,decimal:r,exponent:!1},s=e.split(".");let o=t.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?n.fractional=!1:(void 0===o&&(o=t.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==t.fractional&&(n.fractional=!0),!t.places&&+o<s[1].length&&(o+=","+s[1].length),n.places=o);const l=s[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+function(t){"places"in(t=t||{})||(t.places=1/0),"string"!=typeof t.decimal&&(t.decimal="."),"fractional"in t&&!/^0/.test(String(t.places))||(t.fractional=[!0,!1]),"exponent"in t||(t.exponent=[!0,!1]),"eSigned"in t||(t.eSigned=[!0,!1]);const e=c(t),n=d(t.fractional,(e=>{let n="";return e&&0!==t.places&&(n="\\"+t.decimal,t.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+t.places+"}"),n}),!0);let s=e+n;return n&&(s="(?:(?:"+s+")|(?:"+n+"))"),s+d(t.exponent,(e=>e?"([eE]"+c({signed:t.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:u.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:i,decimal:r,factor:a}}function u(t,e){const n=h(e),s=new RegExp("^"+n.regexp+"$").exec(t);if(!s)return NaN;let i=s[1];if(!s[1]){if(!s[2])return NaN;i=s[2],n.factor*=-1}return i=i.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(i)*n.factor}function c(t){return"signed"in(t=t||{})||(t.signed=[!0,!1]),"separator"in t?"groupSize"in t||(t.groupSize=3):t.separator="",d(t.signed,(t=>t?"[-+]":""),!0)+d(t.separator,(e=>{if(!e)return"(?:\\d+)";" "===(e=(0,s.Qs)(e))?e="\\s":" "===e&&(e="\\s\\xa0");const n=t.groupSize,i=t.groupSize2;if(i){const t="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+e+"]\\d{"+i+"})*["+e+"]\\d{"+n+"})";return n-i>0?"(?:"+t+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":t}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+e+"]\\d{"+n+"})*)"}),!0)}const d=(t,e,n)=>{if(!(t instanceof Array))return e(t);const s=[];for(let n=0;n<t.length;n++)s.push(e(t[n]));return f(s.join("|"),Boolean(n))},f=(t,e)=>"("+(e?"?:":"")+t+")"},17445:(t,e,n)=>{n.d(e,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>h,nn:()=>g,on:()=>c,tX:()=>_});var s=n(91460),i=n(50758),r=n(70586),o=n(95330),a=n(26258);function l(t,e,n={}){return u(t,e,n,f)}function h(t,e,n={}){return u(t,e,n,p)}function u(t,e,n={},s){let i=null;const o=n.once?(t,n)=>{s(t)&&((0,r.hw)(i),e(t,n))}:(t,n)=>{s(t)&&e(t,n)};if(i=(0,a.aQ)(t,o,n.sync,n.equals),n.initial){const e=t();o(e,e)}return i}function c(t,e,n,o={}){let a=null,h=null,u=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(t){o.once&&o.once&&(0,r.hw)(u),n(t)}const f=l(t,((t,n)=>{c(),(0,s.vT)(t)&&(a=t,h=(0,s.on)(t,e,d),o.onListenerAdd?.(t))}),{sync:o.sync,initial:!0});return u=(0,i.kB)((()=>{f.remove(),c()})),u}function d(t,e){return function(t,e,n){if((0,o.Hc)(n))return Promise.reject((0,o.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((s,r)=>{a=(0,i.AL)([(0,o.fu)(n,(()=>{l(),r((0,o.zE)())})),u(t,(t=>{l(),s(t)}),{sync:!1,once:!0},e??f)])}))}(t,p,e)}function f(t){return!0}function p(t){return!!t}n(87538);const m={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},16306:(t,e,n)=>{n.d(e,{aX:()=>S});var s=n(68773),i=n(20102),r=n(92604),o=n(38913),a=n(58901),l=n(73913),h=n(8744),u=n(40488),c=(n(66577),n(3172)),d=n(33955),f=n(11282),p=n(81271);async function m(t,e,n){const s="string"==typeof t?(0,p.mN)(t):t,i=e[0].spatialReference,r=(0,d.Ji)(e[0]),o={...n,query:{...s.query,f:"json",sr:i.wkid??JSON.stringify(i),geometries:JSON.stringify((l=e,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((t=>t.toJSON()))}))}},{data:a}=await(0,c.default)(s.path+"/simplify",o);var l;return function(t,e,n){const s=(0,d.q9)(e);return t.map((t=>{const e=s.fromJSON(t);return e.spatialReference=n,e}))}(a.geometries,r,i)}const g=r.Z.getLogger("esri.geometry.support.normalizeUtils");function _(t){return"polygon"===t[0].type}function y(t){return"polyline"===t[0].type}function x(t,e,n){if(e){const e=function(t,e){if(!(t instanceof a.Z||t instanceof o.Z)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw g.error(t),new i.Z(t)}const n=(0,l.x3)(t),s=[];for(const t of n){const n=[];s.push(n),n.push([t[0][0],t[0][1]]);for(let s=0;s<t.length-1;s++){const i=t[s][0],r=t[s][1],o=t[s+1][0],a=t[s+1][1],l=Math.sqrt((o-i)*(o-i)+(a-r)*(a-r)),h=(a-r)/l,u=(o-i)/l,c=l/e;if(c>1){for(let t=1;t<=c-1;t++){const s=t*e,o=u*s+i,a=h*s+r;n.push([o,a])}const t=(l+Math.floor(c-1)*e)/2,s=u*t+i,o=h*t+r;n.push([s,o])}n.push([o,a])}}return function(t){return"polygon"===t.type}(t)?new o.Z({rings:s,spatialReference:t.spatialReference}):new a.Z({paths:s,spatialReference:t.spatialReference})}(t,1e6);t=(0,u.Sx)(e,!0)}return n&&(t=(0,l.Sy)(t,n)),t}function b(t,e,n){if(Array.isArray(t)){const s=t[0];if(s>e){const n=(0,l.XZ)(s,e);t[0]=s+n*(-2*e)}else if(s<n){const e=(0,l.XZ)(s,n);t[0]=s+e*(-2*n)}}else{const s=t.x;if(s>e){const n=(0,l.XZ)(s,e);t=t.clone().offset(n*(-2*e),0)}else if(s<n){const e=(0,l.XZ)(s,n);t=t.clone().offset(e*(-2*n),0)}}return t}function M(t,e){let n=-1;for(let s=0;s<e.cutIndexes.length;s++){const i=e.cutIndexes[s],r=e.geometries[s],o=(0,l.x3)(r);for(let t=0;t<o.length;t++){const e=o[t];e.some((n=>{if(n[0]<180)return!0;{let n=0;for(let t=0;t<e.length;t++){const s=e[t][0];n=s>n?s:n}n=Number(n.toFixed(9));const s=-360*(0,l.XZ)(n,180);for(let n=0;n<e.length;n++){const e=r.getPoint(t,n);r.setPoint(t,n,e.clone().offset(s,0))}return!0}}))}if(i===n){if(_(t))for(const e of(0,l.x3)(r))t[i]=t[i].addRing(e);else if(y(t))for(const e of(0,l.x3)(r))t[i]=t[i].addPath(e)}else n=i,t[i]=r}return t}async function S(t,e,n){if(!Array.isArray(t))return S([t],e);e&&"string"!=typeof e&&g.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof e?e:e?.url??s.default.geometryServiceUrl;let r,p,_,y,v,w,I,E,F=0;const z=[],B=[];for(const e of t)if(null!=e)if(r||(r=e.spatialReference,p=(0,h.C5)(r),_=r.isWebMercator,w=_?102100:4326,y=l.UZ[w].maxX,v=l.UZ[w].minX,I=l.UZ[w].plus180Line,E=l.UZ[w].minus180Line),p)if("mesh"===e.type)B.push(e);else if("point"===e.type)B.push(b(e.clone(),y,v));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map((t=>b(t,y,v))),B.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,p);B.push(t.rings?new o.Z(t):t)}else if(e.extent){const t=e.extent,n=(0,l.XZ)(t.xmin,v)*(2*y);let s=0===n?e.clone():(0,l.Sy)(e.clone(),n);t.offset(n,0),t.intersects(I)&&t.xmax!==y?(F=t.xmax>F?t.xmax:F,s=x(s,_),z.push(s),B.push("cut")):t.intersects(E)&&t.xmin!==v?(F=t.xmax*(2*y)>F?t.xmax*(2*y):F,s=x(s,_,360),z.push(s),B.push("cut")):B.push(s)}else B.push(e.clone());else B.push(e);else B.push(e);let N=(0,l.XZ)(F,y),T=-90;const R=N,Z=new a.Z;for(;N>0;){const t=360*N-180;Z.addPath([[t,T],[t,-1*T]]),T*=-1,N--}if(z.length>0&&R>0){const e=M(z,await async function(t,e,n,s){const i=(0,f.en)(t),r=e[0].spatialReference,o={...s,query:{...i.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,d.Ji)(e[0]),geometries:e}),cutter:JSON.stringify(n)}},a=await(0,c.default)(i.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((t=>{const e=(0,d.im)(t);return e.spatialReference=r,e}))}}(i,z,Z,n)),s=[],r=[];for(let n=0;n<B.length;n++){const i=B[n];if("cut"!==i)r.push(i);else{const i=e.shift(),o=t[n];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&i.rings.length>=o.rings.length?(s.push(i),r.push("simplify")):r.push(_?(0,u.$)(i):i)}}if(!s.length)return r;const o=await m(i,s,n),a=[];for(let t=0;t<r.length;t++){const e=r[t];"simplify"!==e?a.push(e):a.push(_?(0,u.$)(o.shift()):o.shift())}return a}const A=[];for(let t=0;t<B.length;t++){const e=B[t];if("cut"!==e)A.push(e);else{const t=z.shift();A.push(!0===_?(0,u.$)(t):t)}}return A}},73913:(t,e,n)=>{n.d(e,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>h});var s=n(58901),i=n(82971),r=n(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new s.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new s.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=h(t);for(const t of n)for(const n of t)n[0]+=e;return t}function h(t){return(0,r.oU)(t)?t.rings:t.paths}},70171:(t,e,n)=>{let s;n.d(e,{Kd:()=>o,Ze:()=>u,qe:()=>l});const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function r(){return i??globalThis.navigator?.language??"en"}function o(){return void 0===s&&(s=r()),s}const a=[];function l(t){return a.push(t),{remove(){a.splice(a.indexOf(t),1)}}}const h=[];function u(t){return h.push(t),{remove(){a.splice(h.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=r();s!==t&&(s=t,[...h].forEach((e=>{e.call(null,t)})),[...a].forEach((e=>{e.call(null,t)})))}))},37549:(t,e,n)=>{n.d(e,{H:()=>a});var s=n(80442),i=n(24133),r=n(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,s.Z)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach(((n,s)=>{t[e++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((t=>this._idByBounds.has(t)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,r.cS)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,n)}(this._index,t,(t=>e(this._idByBounds.get(t))))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(t,e,n)=>{n.d(e,{Z:()=>g});var s=n(20102),i=n(32448),r=n(92604),o=n(60437),a=n(24470),l=n(98732),h=n(37549),u=n(29730),c=n(70272),d=n(5428);const f={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e)=>new c.u_(e,t.attributes,null,t.objectId),getGeometry:t=>t.geometry,getCentroid:(t,e)=>(null==t.centroid&&(t.centroid=(0,u.Y)(new d.Z,t.geometry,e.hasZ,e.hasM)),t.centroid)};var p=n(11490);const m=(0,o.Ue)();class g{constructor(t){this.geometryInfo=t,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let t=0;return this._featuresById.forEach((e=>{null!=e.geometry&&e.geometry.coords&&(t+=e.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:t/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(t){if(null==this.fullBounds)return null;const[e,n,s,i]=this.fullBounds;return{xmin:e,ymin:n,xmax:s,ymax:i,spatialReference:(0,p.S2)(t)}}add(t){this._add(t),this._emitChanged()}addMany(t){for(const e of t)this._add(e);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(t){const e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(const e of t){const t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(const n of t){const t=this._boundsStore.get(n.objectId);t&&e((0,o.JR)(m,t))}}getFeature(t){return this._featuresById.get(t)}has(t){return this._featuresById.has(t)}forEach(t){this._featuresById.forEach((e=>t(e)))}forEachInBounds(t,e){this._boundsStore.forEachInBounds(t,(t=>{e(this._featuresById.get(t))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let t=!1;this._featuresById.forEach(((e,n)=>{this._markedIds.has(n)||(t=!0,this._remove(e))})),this._markedIds.clear(),t&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;const e=t.objectId;if(null==e)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:t}));const n=this._featuresById.get(e);let i;if(this._markedIds.add(e),n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e)):null!=this.onFeatureAdd&&this.onFeatureAdd(t),null==t.geometry||!t.geometry.coords||!t.geometry.coords.length)return this._boundsStore.set(e,null),void this._featuresById.set(e,t);i=(0,l.$)(null!=i?i:(0,a.Ue)(),t.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t)}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);const e=t.objectId;return this._markedIds.delete(e),this._boundsStore.delete(e),this._featuresById.delete(e),t}}},27793:(t,e,n)=>{n.r(e),n.d(e,{default:()=>H}),n(66577);var s=n(3172),i=n(66643),r=n(20102),o=n(92604),a=n(95330),l=n(81271),h=n(44547),u=n(37455),c=n(8744),d=n(40488),f=n(70272),p=n(5428),m=n(57191),g=n(37427),_=n(66202),y=n(14808),x=n(35671);const b=/^\s*"([\S\s]*)"\s*$/,M=/""/g,S="\n",v=[","," ",";","|","\t"];function*w(t,e,n){let s=0;for(;s<=t.length;){const i=t.indexOf(e,s),r=t.substring(s,i>-1?i:void 0);s+=r.length+e.length,n&&!r.trim()||(yield r)}}function I(t){const e=t.includes("\r\n")?"\r\n":S;return w(t,e,!0)}function E(t,e){return w(t,e,!1)}function F(t,e,n){t=t.trim(),e=e?.trim();const s=[],i=Array.from(new Set([n?.delimiter,...v])).filter((t=>null!=t));for(const n of i){const i=N(t,n).length,r=N(e,n).length??i;i>1&&s.push({weight:Math.min(i,r),delimiter:n})}const r=s.sort((({weight:t},{weight:e})=>e-t)).map((({delimiter:t})=>t));for(const e of r){const s=R(B(t,e).names,n?.longitudeField,n?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:e,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*z(t,e,n,s=(()=>Object.create(null))){const i=I(t);i.next();let r="",o="",a=0,l=s(),h=0;t:for(const t of i){const i=E(t,n);for(const t of i)if(r+=o+t,o="",a+=T(t),a%2==0){if(a>0){const t=b.exec(r);if(!t){l=s(),h=0,r="",a=0;continue t}l[e[h]]=t[1].replaceAll(M,'"'),h++}else l[e[h]]=r,h++;r="",a=0}else o=n;0===a?(yield l,l=s(),h=0):o=S}}function B(t,e){const n=N(t,e).filter((t=>null!=t)),s=n.map((t=>(0,x.q6)(t)));for(let t=s.length-1;t>=0;t--)s[t]||(s.splice(t,1),n.splice(t,1));return{names:s,aliases:n}}function N(t,e){if(!t?.length)return[];const n=[];let s="",i="",r=0;const o=E(t,e);for(const t of o)if(s+=i+t,i="",r+=T(t),r%2==0){if(r>0){const t=b.exec(s);t&&n.push(t[1].replaceAll(M,'"'))}else n.push(s);s="",r=0}else i=e;return n}function T(t){let e=0,n=0;for(n=t.indexOf('"',n);n>=0;)e++,n=t.indexOf('"',n+1);return e}function R(t,e,n){e=(0,x.q6)(e)?.toLowerCase(),n=(0,x.q6)(n)?.toLowerCase();const s=t.map((t=>t.toLowerCase())),i=e?t[s.indexOf(e)]:null,r=n?t[s.indexOf(n)]:null;return{longitudeFieldName:i||t[s.indexOf(j.find((t=>s.includes(t))))],latitudeFieldName:r||t[s.indexOf(X.find((t=>s.includes(t))))]}}function Z(t,e,n,s,i){const r=[],o=z(t,n,e),a=[];for(const t of o){if(10===a.length)break;a.push(t)}for(let t=0;t<n.length;t++){const e=n[t],o=s[t];if(e===i.longitudeFieldName||e===i.latitudeFieldName)r.push({name:e,type:"esriFieldTypeDouble",alias:o});else{let t,n;switch(A(a.map((t=>t[e])))){case"integer":t="esriFieldTypeInteger";break;case"double":t="esriFieldTypeDouble";break;case"date":t="esriFieldTypeDate",n=36;break;default:t="esriFieldTypeString",n=255}r.push({name:e,type:t,alias:o,length:n})}}return r}function A(t){if(!t.length)return"string";const e=/[^+-.,0-9]/;return t.map((t=>{let n=!1;if(""!==t){if(e.test(t))n=!0;else{let e=q(t);if(!isNaN(e))return/[.,]/.test(t)||!Number.isInteger(e)||e>214783647||e<-214783648?"double":"integer";if(t.includes("E")){if(e=Number(t),!isNaN(e))return"double";if(t.includes(",")){if(t=t.replace(",","."),e=Number(t),!isNaN(e))return"double";n=!0}else n=!0}else n=!0}return n?/^[-]?\d*[.,]?\d*$/.test(t)?"string":O(new Date(t),t)?"date":"string":"string"}})).reduce(((t,e)=>void 0===t?e:void 0===e?t:t===e?e:"string"===t||"string"===e?"string":"double"===t||"double"===e?"double":void 0))}function O(t,e){if(!t||"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))return!1;let n=!0;if(!L&&/\d+\W*$/.test(e)){const t=e.match(/[a-zA-Z]{2,}/);if(t){let e=!1,s=0;for(;!e&&s<=t.length;)e=!C.test(t[s]),s++;n=!e}}return n}const q=function(){const t=(0,y.lt)(),e=new RegExp("^"+t.regexp+"$"),n=new RegExp("["+t.group+"\\s\\xa0]","g"),s=t.factor;return i=>{const r=e.exec(i);if(t.factor=s,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],t.factor*=-1}return o=o.replace(n,"").replace(t.decimal,"."),+o*t.factor}}(),C=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,L=Number.isNaN(new Date("technology 10").getTime()),X=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],j=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var Y=n(25278),k=n(99514),P=n(82971);const D=(0,Y.bU)("esriGeometryPoint"),U=["csv"],J=[0,0];class ${constructor(t,e){this.x=t,this.y=e}}class H{constructor(){this._queryEngine=null,this._snapshotFeatures=async t=>{const e=await this._fetch(t);return this._createFeatures(e)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(t,e={}){this._loadOptions=t;const[n]=await Promise.all([this._fetch(e.signal),this._checkProjection(t?.parsingOptions?.spatialReference)]),s=function(t,e){const n=e.parsingOptions||{},s={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},i=s.layerDefinition={name:(0,l.vt)(e.url,U)||"csv",drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},o=I(t),a=o.next().value?.trim(),h=o.next().value?.trim();if(!a)throw new r.Z("csv-layer:empty-csv","CSV is empty",{csv:t});const{delimiter:u,locationInfo:c}=F(a,h,n);if(!u)throw new r.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:h,parsingOptions:n});if(!c)throw new r.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:h,parsingOptions:n});s.locationInfo=c,s.delimiter=u;const{names:d,aliases:f}=B(a,u),p=Z(t,s.delimiter,d,f,s.locationInfo);if(n.fields?.length){const t=new k.Z(n.fields);for(const e of p){const n=t.get(e.name);n&&Object.assign(e,n)}}if(!p.some((t=>"esriFieldTypeOID"===t.type&&(i.objectIdField=t.name,!0)))){const t={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};i.objectIdField=t.name,p.unshift(t)}i.fields=p;const m=new k.Z(i.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=m.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=m.get(s.locationInfo.longitudeFieldName).name),i.timeInfo){const t=i.timeInfo;if(t.startTimeField){const e=m.get(t.startTimeField);e?(t.startTimeField=e.name,e.type="esriFieldTypeDate"):t.startTimeField=null}if(t.endTimeField){const e=m.get(t.endTimeField);e?(t.endTimeField=e.name,e.type="esriFieldTypeDate"):t.endTimeField=null}if(t.trackIdField){const e=m.get(t.trackIdField);t.trackIdField=e?e.name:null}t.startTimeField||t.endTimeField||(i.timeInfo=null)}return s}(n,t);this._locationInfo=s.locationInfo,this._delimiter=s.delimiter,this._queryEngine=this._createQueryEngine(s);const i=await this._createFeatures(n);this._queryEngine.featureStore.addMany(i);const{fullExtent:o,timeExtent:a}=await this._queryEngine.fetchRecomputedExtents();if(s.layerDefinition.extent=o,a){const{start:t,end:e}=a;s.layerDefinition.timeInfo.timeExtent=[t,e]}return s}async applyEdits(){throw new r.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(t,e.signal)}async queryFeatureCount(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(t,e.signal)}async queryObjectIds(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(t,e.signal)}async queryExtent(t={},e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(t,e.signal)}async querySnapping(t,e={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(t,e.signal)}async refresh(t){this._loadOptions.customParameters=t,this._snapshotTask?.abort(),this._snapshotTask=(0,i.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((t=>{this._queryEngine.featureStore.clear(),t&&this._queryEngine.featureStore.addMany(t)}),(t=>{this._queryEngine.featureStore.clear(),(0,a.D_)(t)||o.Z.getLogger("esri.layers.CSVLayer").error(new r.Z("csv-layer:refresh","An error occurred during refresh",{error:t}))})),await this._waitSnapshotComplete();const{fullExtent:e,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:e,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:e,customParameters:n}=this._loadOptions;if(!e)throw new r.Z("csv-layer:invalid-source","url not defined");const i=(0,l.mN)(e);return(await(0,s.default)(i.path,{query:{...i.query,...n},responseType:"text",signal:t})).data}_createQueryEngine(t){const{objectIdField:e,fields:n,extent:s,timeInfo:i}=t.layerDefinition,r=new m.Z({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new _.q({fields:n,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:i,objectIdField:e,spatialReference:s.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:r})}async _createFeatures(t){const{latitudeFieldName:e,longitudeFieldName:n}=this._locationInfo,{objectIdField:s,fieldsIndex:i,spatialReference:r}=this._queryEngine;let o=[];const a=[],l=i.fields.filter((t=>t.name!==s)).map((t=>t.name));let m=0;const g={};for(const t of i.fields)if("esriFieldTypeOID"!==t.type&&"esriFieldTypeGlobalID"!==t.type){const e=(0,x.os)(t);void 0!==e&&(g[t.name]=e)}const _=z(t,l,this._delimiter,(0,Y.Dm)(g,s));for(const t of _){const r=this._parseCoordinateValue(t[e]),l=this._parseCoordinateValue(t[n]);if(null!=l&&null!=r&&!isNaN(r)&&!isNaN(l)){t[e]=r,t[n]=l;for(const s in t)if(s!==e&&s!==n)if(i.isDateField(s)){const e=new Date(t[s]);t[s]=O(e,t[s])?e.getTime():null}else if(i.isNumericField(s)){const e=q(t[s]);isNaN(e)?t[s]=null:t[s]=e}t[s]=m,m++,o.push(new $(l,r)),a.push(t)}}if(!(0,c.fS)({wkid:4326},r))if((0,c.sS)(r))for(const t of o)[t.x,t.y]=(0,d.hG)(t.x,t.y,J);else o=(0,h.oj)(u.N,o,P.Z.WGS84,r,null,null);const y=[];for(let t=0;t<o.length;t++){const{x:e,y:n}=o[t],i=a[t];i[s]=t+1,y.push(new f.u_(new p.Z([],[e,n]),i,null,i[s]))}return y}_parseCoordinateValue(t){if(null==t||""===t)return null;let e=q(t);return(isNaN(e)||Math.abs(e)>181)&&(e=parseFloat(t)),e}async _checkProjection(t){try{await(0,g._W)(c.Zn,t)}catch{throw new r.Z("csv-layer:projection-not-supported","Projection not supported")}}}},25278:(t,e,n)=>{n.d(e,{Dm:()=>u,Hq:()=>c,MS:()=>d,bU:()=>a});var s=n(80442),i=n(22974),r=n(61159),o=n(58333);function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?o.I4:"esriGeometryPolyline"===t?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function u(t,e){if((0,s.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let n=`this.${e} = null;`;for(const e in t)n+=`this${l.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[e]:null,...t})}}function c(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},11282:(t,e,n)=>{n.d(e,{cv:()=>a,en:()=>o,lA:()=>r}),n(68773),n(40330);var s=n(22974),i=n(81271);function r(t,e){return e?{...e,query:{...t??{},...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,i.mN)(t):(0,s.d9)(t)}function a(t,e,n){const s={};for(const i in t){if("declaredClass"===i)continue;const r=t[i];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){s[i]=[];for(let t=0;t<r.length;t++)s[i][t]=a(r[t])}else if("object"==typeof r)if(r.toJSON){const t=r.toJSON(n&&n[i]);s[i]=e?t:JSON.stringify(t)}else s[i]=e?r:JSON.stringify(r);else s[i]=r}return s}n(71058)},58333:(t,e,n)=>{n.d(e,{ET:()=>r,I4:()=>i,eG:()=>l,lF:()=>o,lj:()=>u,qP:()=>a,wW:()=>h});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);