@arcgis/core 6.0.0-next.12 → 6.0.0-next.14

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 (207) hide show
  1. package/arcade/containerUtils.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  3. package/arcade/functions/feature.js +1 -1
  4. package/arcade/functions/featuresetstring.js +1 -1
  5. package/arcade/functions/geomasync.js +1 -1
  6. package/arcade/functions/portal.js +1 -1
  7. package/arcade/functions/string.js +1 -1
  8. package/arcgisGlobal.d.ts +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/{5566f14afb63065e438f.js → 0050916e462e3c9e0627.js} +1 -1
  11. package/assets/esri/core/workers/chunks/02c5d027bdaee67869cf.js +1 -0
  12. package/assets/esri/core/workers/chunks/09bd5df07eab80ae7b15.js +1 -0
  13. package/assets/esri/core/workers/chunks/0da6abe3ceabfe78f7a0.js +1 -0
  14. package/assets/esri/core/workers/chunks/0f617980c7dd9ad0444f.js +1 -0
  15. package/assets/esri/core/workers/chunks/{10445313d0d57b34511b.js → 2145a512d269d64036b0.js} +1 -1
  16. package/assets/esri/core/workers/chunks/21ddb26526bcb2b122c3.js +1 -0
  17. package/assets/esri/core/workers/chunks/22e8c0aad2fe75943865.js +1 -0
  18. package/assets/esri/core/workers/chunks/25f19fc929f25ddd628c.js +1 -0
  19. package/assets/esri/core/workers/chunks/28b74bc77f7c13080074.js +1 -0
  20. package/assets/esri/core/workers/chunks/{2ef5237e4c876d6a4ee0.js → 2bd4ee083ca4ad221f8b.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f4f9d08b2df856e3b694.js → 2eae542fe7f0f6576ac1.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{2aeb5cc32284dd3e4d22.js → 33e4ff228a8c81b99022.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{42323093827adffe56d3.js → 3418877328f4f0830300.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js → 34cbaf844730ac2d92c2.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js → 3c301a689c7853c9fa67.js} +2 -2
  26. package/assets/esri/core/workers/chunks/{02253bdffbd580af22d8.js → 3ff6d1ed3c0f1285f3e7.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{67e4b5651fd7ff7d8cf0.js → 4ac1d3e49e242e373a92.js} +1 -1
  28. package/assets/esri/core/workers/chunks/4df6cb1bee5d0720a43e.js +1 -0
  29. package/assets/esri/core/workers/chunks/{8d0c2de92770a1567536.js → 4e6f40cbdb8c508e6df1.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{dc486a3595b6d57018bb.js → 5bfea0c55aca826de536.js} +1 -1
  31. package/assets/esri/core/workers/chunks/601e1d020b8115497944.js +1 -0
  32. package/assets/esri/core/workers/chunks/62d6e101e9bd9557a410.js +1 -0
  33. package/assets/esri/core/workers/chunks/{2686fe5b62dd0be699c0.js → 634523cc7757da9020e4.js} +1 -1
  34. package/assets/esri/core/workers/chunks/67ebc5a3d46b254b725c.js +1 -0
  35. package/assets/esri/core/workers/chunks/{6e62581d933e7298d1f6.js → 6f4e6022a52de0c54aab.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{a518ae5683367eeda74c.js → 70d3055f15d8b0cf4074.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js → 76ab353d80d786777161.js} +2 -2
  38. package/assets/esri/core/workers/chunks/{45800373650fbc8262e6.js → 7d11710e1586a3d75887.js} +1 -1
  39. package/assets/esri/core/workers/chunks/7f8e327acad48c9e75ea.js +1 -0
  40. package/assets/esri/core/workers/chunks/8052da8be251c3ff2176.js +1 -0
  41. package/assets/esri/core/workers/chunks/{f6e62d2d279a328cbed7.js → 90bdf86f553e2742d67c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/91ebb2ccab1889eb7e81.js +1 -0
  43. package/assets/esri/core/workers/chunks/{3d9d7d3a40b51eb7ee3d.js → 953ba13299e7aa92c1a0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{f46d9a19f79d4a4bd354.js → 9e1a3b6a08c96dcefdde.js} +1 -1
  45. package/assets/esri/core/workers/chunks/9f0a973a0dd28953ce25.js +1 -0
  46. package/assets/esri/core/workers/chunks/a2ad3e620c98e2b2eb06.js +1 -0
  47. package/assets/esri/core/workers/chunks/a34b3d2e11a777e1ff3f.js +1 -0
  48. package/assets/esri/core/workers/chunks/{140f2eeb11e39ab15734.js → aa36c3a9bbaa086e3757.js} +1 -1
  49. package/assets/esri/core/workers/chunks/aadfe34a99c9ec7a0e11.js +1 -0
  50. package/assets/esri/core/workers/chunks/b49df4ebd4be1181b0f9.js +2 -0
  51. package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js → b557824bc1fa163d72a3.js} +2 -2
  52. package/assets/esri/core/workers/chunks/b8337492e2b753aefac4.js +1 -0
  53. package/assets/esri/core/workers/chunks/bc915fb182d463d804e6.js +1 -0
  54. package/assets/esri/core/workers/chunks/{58032aab28a20a327f6c.js → d03b82e962c70a3fd377.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{992f102992c2bed7b34e.js → d5d0fe8e198ff5a902ee.js} +1 -1
  56. package/assets/esri/core/workers/chunks/e2190361247f35b02b32.js +1 -0
  57. package/assets/esri/core/workers/chunks/e2f42aec02bff33b25dd.js +1 -0
  58. package/assets/esri/core/workers/chunks/ead49b513e070951a964.js +1 -0
  59. package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +1 -0
  60. package/assets/esri/core/workers/chunks/ed6e9d7f71bfd2691717.js +1 -0
  61. package/assets/esri/core/workers/chunks/ee6679ef9efa1504e7eb.js +1 -0
  62. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  63. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  64. package/chunks/BlendWeights.glsl.js +10 -10
  65. package/chunks/Blur.glsl.js +2 -2
  66. package/chunks/EdgeDetect.glsl.js +24 -19
  67. package/chunks/HUDMaterial.glsl.js +11 -1
  68. package/chunks/HighlightApply.glsl.js +4 -5
  69. package/chunks/HighlightBlur.glsl.js +5 -5
  70. package/chunks/HighlightDownsample.glsl.js +2 -2
  71. package/chunks/HighlightSharpApply.glsl.js +61 -0
  72. package/chunks/lyr3DMain.js +1 -1
  73. package/chunks/lyr3DWorker.js +2 -2
  74. package/chunks/portal.js +1 -1
  75. package/config.js +1 -1
  76. package/geometry/operators/simplifyOGCOperator.d.ts +10 -4
  77. package/geometry/support/TileClipper.js +1 -1
  78. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  79. package/geometry/support/curves/mathUtils.js +1 -1
  80. package/interfaces.d.ts +1 -1
  81. package/kernel.js +1 -1
  82. package/layers/CSVLayer.d.ts +1 -1
  83. package/layers/CatalogLayer.d.ts +1 -1
  84. package/layers/FeatureLayer.d.ts +1 -1
  85. package/layers/GeoJSONLayer.d.ts +1 -1
  86. package/layers/ParquetLayer.d.ts +1 -1
  87. package/layers/SceneLayer.d.ts +4 -5
  88. package/layers/SceneLayer.js +1 -1
  89. package/layers/SketchLayer.d.ts +4 -2
  90. package/layers/SubtypeGroupLayer.d.ts +1 -1
  91. package/layers/WFSLayer.d.ts +1 -1
  92. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
  93. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  94. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  95. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  96. package/layers/geospatialPDF/projectionToWKTUtils.js +2 -2
  97. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  98. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  99. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  100. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  101. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  102. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  103. package/layers/mixins/ArcGISImageService.d.ts +1 -1
  104. package/layers/raster/datasets/TIFFRaster.js +1 -1
  105. package/layers/raster/datasets/pixelReader.js +1 -1
  106. package/layers/raster/functions/clipUtils.js +1 -1
  107. package/layers/support/FeatureFilter.d.ts +1 -1
  108. package/layers/support/SubtypeSublayer.d.ts +1 -1
  109. package/layers/support/{TimeSeriesCalculation.d.ts → TimeSeriesCalculationMethod.d.ts} +6 -6
  110. package/layers/support/{TimeSeriesCalculation.js → TimeSeriesCalculationMethod.js} +1 -1
  111. package/layers/support/TimeSeriesInfo.d.ts +5 -5
  112. package/layers/support/TimeSeriesInfo.js +1 -1
  113. package/layers/support/fieldUtils.js +1 -1
  114. package/layers/support/timeSeriesUtils.d.ts +6 -2
  115. package/layers/support/timeSeriesUtils.js +1 -1
  116. package/package.json +4 -4
  117. package/portal/schemas/definitions.js +1 -1
  118. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  119. package/smartMapping/statistics/support/timeSeriesUtils.js +1 -1
  120. package/symbols/cim/cimAnalyzer.js +1 -1
  121. package/symbols/cim/types.d.ts +1 -1
  122. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  123. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
  124. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  125. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  126. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  127. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  128. package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +20 -6
  129. package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +2 -2
  130. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  131. package/views/3d/webgl-engine/effects/highlight/HighlightApply.glsl.js +1 -1
  132. package/views/3d/webgl-engine/effects/highlight/HighlightCellGridScreenSpacePassParameters.js +2 -0
  133. package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
  134. package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
  135. package/views/3d/webgl-engine/effects/highlight/HighlightSharpApply.glsl.js +2 -0
  136. package/views/3d/webgl-engine/effects/highlight/HighlightSharpApplyTechnique.js +2 -0
  137. package/views/3d/webgl-engine/effects/smaa/BlendWeights.glsl.js +1 -1
  138. package/views/3d/webgl-engine/effects/smaa/Blur.glsl.js +1 -1
  139. package/views/3d/webgl-engine/effects/smaa/EdgeDetect.glsl.js +1 -1
  140. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  141. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  142. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  143. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  144. package/views/3d/webgl-engine/effects/smaa/SMAAPassParameters.js +1 -1
  145. package/views/3d/webgl-engine/effects/smaa/SMAATechniqueConfiguration.js +2 -0
  146. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  147. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  148. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  149. package/views/draw/DrawTool.js +1 -1
  150. package/views/draw/plugins/MultipointPlugin.js +1 -1
  151. package/views/draw/support/PluginContext.js +1 -1
  152. package/views/draw/support/managers/TooltipManager.js +1 -1
  153. package/views/draw/support/types.d.ts +5 -2
  154. package/views/layers/FeatureLikeLayerView.d.ts +1 -1
  155. package/views/layers/PointCloudLayerView.d.ts +1 -1
  156. package/views/layers/SceneLayerView.d.ts +1 -1
  157. package/views/support/HighlightDefaults.js +1 -1
  158. package/webdoc/applicationProperties/SearchLayerField.d.ts +7 -1
  159. package/webdoc/applicationProperties/SearchLayerField.js +1 -1
  160. package/webdoc/applicationProperties/SearchTableField.d.ts +7 -1
  161. package/webdoc/applicationProperties/SearchTableField.js +1 -1
  162. package/webdoc/applicationProperties/searchMode.js +2 -0
  163. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +10 -0
  164. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  165. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -0
  166. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  167. package/widgets/BatchAttributeForm/inputs/types.d.ts +10 -1
  168. package/widgets/BatchAttributeForm.js +1 -1
  169. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  170. package/widgets/Search/LayerSearchSource.d.ts +23 -1
  171. package/widgets/Search/LayerSearchSource.js +1 -1
  172. package/widgets/Search/support/layerSearchUtils.js +1 -1
  173. package/widgets/Search/types.d.ts +7 -0
  174. package/widgets/support/forms/formUtils.js +1 -1
  175. package/widgets/support/forms/types.d.ts +1 -1
  176. package/assets/esri/core/workers/chunks/0dc66b03ff55d0ea5a09.js +0 -1
  177. package/assets/esri/core/workers/chunks/175c268e64ccd01f8c25.js +0 -1
  178. package/assets/esri/core/workers/chunks/216e6065b224309e1051.js +0 -1
  179. package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +0 -2
  180. package/assets/esri/core/workers/chunks/37d6a264a3f1d8072aa0.js +0 -1
  181. package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +0 -1
  182. package/assets/esri/core/workers/chunks/3f7d583b676b23b3fadb.js +0 -1
  183. package/assets/esri/core/workers/chunks/4503b20ca6a80fb63d72.js +0 -1
  184. package/assets/esri/core/workers/chunks/4a640548032355e57acd.js +0 -1
  185. package/assets/esri/core/workers/chunks/4debf2d9c3465250ef7a.js +0 -1
  186. package/assets/esri/core/workers/chunks/53be85d04cd2da4f391d.js +0 -1
  187. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +0 -1
  188. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +0 -1
  189. package/assets/esri/core/workers/chunks/5982c6a8459c1237b298.js +0 -1
  190. package/assets/esri/core/workers/chunks/74b5c00f93cfc0d59029.js +0 -1
  191. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +0 -1
  192. package/assets/esri/core/workers/chunks/7c2c8f786a30267a5f05.js +0 -1
  193. package/assets/esri/core/workers/chunks/88e54449261ef94e390d.js +0 -1
  194. package/assets/esri/core/workers/chunks/917f53833b853898facc.js +0 -1
  195. package/assets/esri/core/workers/chunks/9e142551163acf752618.js +0 -1
  196. package/assets/esri/core/workers/chunks/aaba33611753c6aada68.js +0 -1
  197. package/assets/esri/core/workers/chunks/af75747b06d79446a855.js +0 -1
  198. package/assets/esri/core/workers/chunks/b5fdcc80d5973b6e26d1.js +0 -1
  199. package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +0 -1
  200. package/assets/esri/core/workers/chunks/dba280c370df13196711.js +0 -1
  201. package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +0 -1
  202. package/assets/esri/core/workers/chunks/f47c7065da3b5001245f.js +0 -1
  203. /package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js.LICENSE.txt → 34cbaf844730ac2d92c2.js.LICENSE.txt} +0 -0
  204. /package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js.LICENSE.txt → 3c301a689c7853c9fa67.js.LICENSE.txt} +0 -0
  205. /package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js.LICENSE.txt → 76ab353d80d786777161.js.LICENSE.txt} +0 -0
  206. /package/assets/esri/core/workers/chunks/{2a1ec30f9ad305763f81.js.LICENSE.txt → b49df4ebd4be1181b0f9.js.LICENSE.txt} +0 -0
  207. /package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js.LICENSE.txt → b557824bc1fa163d72a3.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3713],{59231(e,t,r){r.d(t,{h:()=>h});const s=Symbol.for("controller");let i;const o=e=>i;let n,a=[];const l=e=>{const t=o().manager.X(e);if(void 0!==t)return t;if((e=>"object"==typeof e&&null!==e&&(s in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e))(e))return e;const r=(()=>{const e=n;return n=void 0,e})();return void 0!==r?r:void 0};let h=!1;r.d(t,["a",0,e=>{if(void 0===e)return void(a=[]);const t=a.indexOf(e);a=-1===t?[...a,e]:a.slice(0,t+1),queueMicrotask(()=>a=[])},"b",0,()=>a,"c",0,e=>{h=!0;try{return e()}finally{h=!1}},"d",0,s,"f",0,e=>{n!==e&&(n=e,queueMicrotask(()=>n===e?n=void 0:0))},"i",0,e=>"function"==typeof e?.then,"j",0,async e=>{const t=l(e);return await t.ready,t},"k",0,l,"r",0,o,"s",0,e=>{i!==e&&(i=e,queueMicrotask(()=>i===e?i=void 0:0))},"u",0,async(e,t)=>{const r=l(e);if(void 0===r)return e;if(await r.ready,"function"==typeof t){const e=r.watchExports(r=>t(r,e))}return r.exports}])},64336(e,t,r){r.d(t,{C:()=>p});var s=r(71785),i=r(59231),o=r(58933),n=r(44613);let a;const l=()=>{a?.forEach(({callbacks:e},t)=>{const r=Object.keys(t);e.forEach(e=>e(r))}),a=void 0},h=(e,t,r)=>{const i=e.manager;return i.V!==o.s6&&i.V!==r&&i.S(void 0,void 0),0===i.T.length&&queueMicrotask(()=>i.S(void 0,void 0)),i.V=r,i.T.push((e,i)=>(0,s.UF)(t,void 0,r===i?e:void 0)),r},d=(e=[(0,i.r)(),...(0,i.b)()],t,r)=>{const o=Array.isArray(e)?e:[e];let n=o.length+1;const d=e=>{n-=1,void 0!==e&&(n=Math.min(n,0)),0===n&&t(e)};o.forEach(e=>((e,t,r)=>{const i=Object.keys(e),o=i.length;void 0===a&&queueMicrotask(l),a??=new Map;let n=a.get(e);return void 0===n&&(n={callbacks:[],keyCount:o},a.set(e,n)),n.keyCount!==o&&(n.callbacks.forEach(e=>e(i)),n.callbacks=[],n.keyCount=o),n.callbacks.push(i=>{const n=e=>(0,s.UF)(t,null,e),a=i[o];void 0===a?n(void 0):e[a]===r?n(a):n(void 0)}),r})(e,t=>d(void 0===t?void 0:{key:t,host:e,isReactive:!1}),r));for(const e of o)if("manager"in e&&e.manager.component===e){h(e,t=>d(void 0===t?void 0:{key:t,host:e,isReactive:!0}),r);break}return r},c=((e="",t={},r=(0,i.r)())=>{const s={emit:s=>{""===e&&l();const i=new CustomEvent(e,{detail:s,cancelable:!0,bubbles:!0,composed:!0,...t});return r.el.dispatchEvent(i),i}};return""===e&&d(void 0,t=>e=t.key,s),s}).bind(null,"");var u;u=i.d;class p{constructor(e){this.#e=[],this.#t=[],this.#r=[],this.#s=[],this.#i=[],this.#o=[],this.#n=[],this.#a=[],this.#l=[],this.#h=!1,this.P=Promise.withResolvers(),this.connectedCalled=!1,this.loadedCalled=!1,this[u]=!0,this.#d=[];const t=this,r=e??(0,i.r)(new.target.name);t.#c=r,t.ready=t.P.promise,t.#u=g(t),t.component=r,t.#c.addController(t),void 0===t.#c.manager||((0,i.a)(t),queueMicrotask(()=>t.catchUpLifecycle()))}#e;#t;#r;#s;#i;#o;#n;#a;#l;#h;#c;catchUpLifecycle(){const{manager:e}=this.#c;!e.connectedCalled||this.connectedCalled||this.triggerConnected(),!e.#h||this.triggerLoad().then(()=>e.loadedCalled&&this.triggerLoaded()).catch((0,n.G3)(this.#c))}#u;get exports(){return this.#u}set exports(e){const t=this.#u;t!==e&&(this.#u=e,this.#d.forEach(s.UF),this.connectedCalled&&!1!==this.O&&this.#c.requestUpdate(this.O,t)),this.P.resolve(e)}setProvisionalExports(e,t=!0){this.#u=t?g(e):e,this.#d.forEach(s.UF)}#d;watchExports(e){const t=()=>e(this.#u);return this.#d.push(t),()=>{this.#d.splice(this.#d.indexOf(t),1)}}get use(){return(0,i.s)(this.#c),i.u}get useRef(){return(0,i.s)(this.#c),i.j}get useRefSync(){return(0,i.s)(this.#c),i.k}controllerRemoved(){this.#c.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){this.#e.push(e)}onDisconnected(e){this.#t.push(e)}onLoad(e){this.#r.push(e)}onLoaded(e){this.#s.push(e)}onUpdate(e){this.#i.push(e)}onUpdated(e){this.#o.push(e)}onDestroy(e){this.#n.push(e)}onLifecycle(e){this.#a.push(e),this.connectedCalled&&this.#c.el.isConnected&&this.#p(e)}triggerConnected(){const e=this;e.hostConnected&&(0,s.UF)(e.hostConnected,e),e.#e.forEach(s.UF),e.triggerLifecycle(),e.connectedCalled=!0}triggerDisconnected(){const e=this;e.hostDisconnected&&(0,s.UF)(e.hostDisconnected,e),e.#t.forEach(s.UF),e.#l.forEach(s.UF),e.#l=[]}async triggerLoad(){if(this.#h)return;this.#h=!0;const e=this;e.hostLoad&&await(0,s.ao)(e.hostLoad,e),this.#r.length>0&&await Promise.allSettled(this.#r.map(s.ao)),this.P.resolve(this.#u)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&(0,s.UF)(this.hostLoaded,this),this.#s.forEach(s.UF),this.loadedCalled=!0)}triggerUpdate(e){this.hostUpdate&&(0,s.UF)(this.hostUpdate,this,e),this.#i.forEach(f,e)}triggerUpdated(e){this.hostUpdated&&(0,s.UF)(this.hostUpdated,this,e),this.#o.forEach(f,e)}triggerDestroy(){this.hostDestroy&&(0,s.UF)(this.hostDestroy,this),this.#n.forEach(s.UF)}triggerLifecycle(){this.hostLifecycle&&this.#p(()=>this.hostLifecycle()),this.#a.forEach(this.#p,this)}#p(e){(0,i.s)(this.#c);const t=(0,s.UF)(e);(Array.isArray(t)?t:[t]).forEach(e=>{"function"==typeof e?this.#l.push(e):"object"==typeof e&&"function"==typeof e.remove&&this.#l.push(e.remove)})}}function f(e){(0,s.UF)(e,void 0,this)}const g=e=>{if("object"!=typeof e&&"function"!=typeof e||null===e)return e;const t=new Proxy(e,{get(e,r,s){if("exports"!==r&&"_exports"!==r||!(r in e)||e[r]!==t)return r in e||r in Promise.prototype||"symbol"==typeof r?"function"==typeof e?e[r]:Reflect.get(e,r,s):void 0}});return t},m=p;r.d(t,["G",0,m,"a",0,d,"b",0,c,"p",0,l])},83978(e,t,r){r.d(t,{WF:()=>I,le:()=>b,s6:()=>x,CP:()=>U,zl:()=>C,Bq:()=>P,pf:()=>R});var s=r(64336);r(25856),r(66047);const i=e=>{let t=e;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){const r=t;return r.manager?.loadedCalled||(r.J??r._offspring).push(e),(r.I??r._postLoad).promise}return!1},o={};function n(){}function a(e){for(const t of["Associated","Disabled","Reset","StateRestore"]){const r=`orm${t}Callback`;e.prototype["f"+r]=async function(...e){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${r}`,{detail:e}))}}}const l=Object.defineProperty,h=globalThis.HTMLElement??n;class d extends h{constructor(){super(),this.#f={},this.#g=[],this.I=Promise.withResolvers(),this.H=Promise.withResolvers(),this.J=[];const e=this,t=e.constructor;e._offspring=e.J,e._postLoad=e.I,t.C?.forEach(t=>{Object.hasOwn(e,t)&&(e.#f[t]=e[t],delete e[t])}),t.A?e.#m({a:t.A}):t.B.then(async r=>{await t.K.p,e.#m(await(r.default?.then(e=>"function"==typeof e?{a:e}:e)??r))}).catch(t=>{e.H.reject(t),setTimeout(()=>{throw t})})}static{this.lumina=!0}static F(){for(const e of this.C??[])l(this.prototype,e,{configurable:!0,enumerable:!0,get(){return this.#f[e]},set(t){this.#f[e]=t}});for(const e of this.E??[])l(this.prototype,e,{async value(...t){this.#v||await this.H.promise;const r=this.#v;return await r[e](...t)},configurable:!0});for(const e of this.D??[])l(this.prototype,e,{value(...t){return this.#v[e](...t)},configurable:!0})}static{a(this)}#v;#f;#g;get manager(){return this.#v?.manager}attributeChangedCallback(e,t,r){this.#v?.attributeChangedCallback(e,t,r),this.#v||this.#g.push(e)}connectedCallback(){this.#v?this.#v.connectedCallback?.():queueMicrotask(()=>this.G=i(this))}disconnectedCallback(){this.#v?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#m(e){const t=this.constructor,r=t.L,s=this.#f,i=Object.values(e).find(e=>e.L===r),o=`${r}--lazy`;let n=i;for(;n&&!Object.hasOwn(n,"lumina");)n=Object.getPrototypeOf(n);u(n),!t.A&&(t.A=i,customElements.define(o,i)),i.N=this;const a=document.createElement(o);i.N=void 0,this.#v=a,this.#f=a,this.#g.forEach(e=>a.attributeChangedCallback(e,null,this.getAttribute(e))),Object.entries(s).forEach(c,a);const l=this.isConnected;(l||this.G)&&(a.connectedCallback?.(),l||a.disconnectedCallback())}addController(){}requestUpdate(){this.#v?.requestUpdate()}}function c([e,t]){this[e]=t}const u=e=>{const t=e.prototype,r=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(e,t){r.setAttribute.call(this.el,e,t)},t.removeAttribute=function(e){r.removeAttribute.call(this.el,e)},t.hasAttribute=function(e){return r.hasAttribute.call(this.el,e)},l(t,"isConnected",{get(){return Reflect.get(r,"isConnected",this.el)}}))};var p=r(71785),f=r(60026),g=r(58933),m=r(59231);class v extends s.G{constructor(e){super(e),this.destroyed=!1,this.R=!1,this.V=g.s6,this.T=[],this.#y=new WeakMap,this.#c=e,this.exports=void 0,this.hasDestroy=_ in e&&"function"==typeof e.destroy,g.WF.prototype.addController.call(e,{hostConnected:()=>{if(this.destroyed){const t=e.el.localName;throw e.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${_} prop.`)}void 0!==this.#_&&clearTimeout(this.#_),(0,s.p)();for(const t of e.M)"triggerConnected"in t?t.triggerConnected():(0,p.UF)(t.hostConnected,t)},hostDisconnected:()=>{for(const t of e.M)"triggerDisconnected"in t?t.triggerDisconnected():(0,p.UF)(t.hostDisconnected,t);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(const t of e.M)"triggerUpdate"in t?t.triggerUpdate(this.Q):(0,p.UF)(t.hostUpdate,t,this.Q)},hostUpdated:()=>{for(const t of e.M)"triggerUpdated"in t?t.triggerUpdated(this.Q):(0,p.UF)(t.hostUpdated,t,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),(0,m.a)(void 0),(0,m.s)(e)}#_;#c;async destroy(){if(!this.destroyed){this.#c.el.isConnected&&(this.hasDestroy=!1,this.#c.el.remove()),this.#_=void 0,this.destroyed=!0;for(const e of this.#c.M)"triggerDestroy"in e?e.triggerDestroy():(0,p.UF)(e.hostDestroy,e);this.#c.M.splice(0)}}U(){if(void 0!==this.#_&&clearTimeout(this.#_),!this.#c.el.isConnected&&!this.#c.autoDestroyDisabled){const e=()=>{this.#c.destroy()};this.#_=((e,t)=>{const r=t>4e3?2e3:t/4;let s=0;const i=setInterval(()=>{s+=r,s>=t&&(clearInterval(i),e())},r);return i})(e,y)}}S(e,t){const r=this.T;this.V=g.s6,this.T=[],r.forEach(r=>r(e,t))}#y;W(e,t){("object"==typeof t&&null!==t||"function"==typeof t)&&this.#y.set(t,e)}X(e){return"object"==typeof e&&null!==e||"function"==typeof e?this.#y.get(e):void 0}}let y=1e3;const _="autoDestroyDisabled";var w=r(10845),S=r(84),k=r(66567),A=(r(98171),r(83435));class I extends g.WF{constructor(){super(),this.M=[],this.manager=new v(this);const e=this,t=e.constructor,r=t.N,s=t.K.o,i=I.prototype.shouldUpdate;e.#w=r?.H??Promise.withResolvers(),e.I=r?.I??Promise.withResolvers(),e.J=r?.J??[],e._offspring=e.J,e._postLoad=e.I,e.el=r??e,e.#S=e.enableUpdating,e.enableUpdating=n,e.shouldUpdate!==i&&(e.#k=e.shouldUpdate,e.shouldUpdate=i),s&&(e.#A=new Map,t.elementProperties.forEach((t,r)=>e.#A.set(r,s()))),g.S$&&e.el.setAttribute(t.K.hydratedAttribute,"")}static finalizeStyles(e){const t=super.finalizeStyles(e),r=this.shadowRootOptions===o;return void 0===this.K?.commonStyles||r?t:[this.K.commonStyles,...t]}static createProperty(e,t){const r="number"==typeof t?t:Array.isArray(t)?t[0]:0,s=Array.isArray(t)?t[1]:void 0,i=s?.hasChanged??g.Ec,o={attribute:!!(1&r&&"string"==typeof e)&&(0,f.j1)(e),reflect:!!(2&r),type:4&r?Boolean:8&r?Number:void 0,state:!!(16&r),readOnly:!!(32&r),noAccessor:!!(64&r),useDefault:!!(128&r),c:!1,...s,hasChanged(e,t){const r=i(e,t);return o.c=r,r}};super.createProperty(e,o)}static getPropertyDescriptor(e,t,r){const i=this.K,o=super.getPropertyDescriptor(e,t,r);return r.d=o,{...o,get(){return i.t?.(this.#A.get(e)),o.get?.call(this)},set(t){const i=this.manager;if(r.readOnly&&!m.h&&(i.R||i.connectedCalled))throw Error(`Cannot assign to read-only property "${e}" of ${this.el.localName}. Trying to assign "${t}"`);o.set.call(this,t??void 0),r.c&&this.#A?.get(e)?.notify(),i.T.length>0&&((0,s.p)(),i?.S(e,t))}}}static{this.lumina=!0}static{a(this)}#A;#k;#S;#w;#I;#b;get elementInternals(){return this.#b??=this.el.attachInternals(),this.#b}connectedCallback(){this.hasAttribute("defer-hydration")||this.#U(!0)}#U(e){const t=this.constructor.K.c?.(()=>this.requestUpdate());this.#I=t;const r=!this.manager.connectedCalled;e&&super.connectedCallback(),r?queueMicrotask(()=>this.#C().catch(e=>{this.#w.reject(e),setTimeout(()=>{throw e})})):t&&this.requestUpdate()}#T(e){try{this.#I.clear(),this.constructor.K.r(this.#I,()=>super.update(e))}catch(e){throw this.#I.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#I?.destroy(),this.#I=void 0}createRenderRoot(){const e=this.el.shadowRoot,t=this.constructor,r=t.shadowRootOptions,s=e??(r===o?this.el:this.el.attachShadow(r));if(e)return this.manager.connectedCalled||this.#U(!1),g.WF.prototype.createRenderRoot.call(this),e;if(this.isConnected){const e=s.getRootNode();e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t.elementStyles.map(e=>"styleSheet"in e?e.styleSheet:e)]}return s}async#C(){const e=this.el.G??i(this.el);e&&await e;const t=[];for(const e of this.M)"triggerLoad"in e?t.push(e.triggerLoad()):t.push((0,p.ao)(e.hostLoad,e));await Promise.all(t),await(this.load?.()),this.manager.hasDestroy&&this.manager.onUpdate(e=>e.has(_)&&this.manager.U()),this.#S(!0),this.performUpdate(),this.I.resolve(),await 0;const r=this.J.filter(e=>!e.manager?.loadedCalled);r.length&&await Promise.allSettled(r.map(async e=>await e.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(const e of this.M)"triggerLoaded"in e?e.triggerLoaded():(0,p.UF)(e.hostLoaded,e);this.loaded?.(),this.#w.resolve()}shouldUpdate(e){return this.manager.Q=e,this.#k?.(e)??!0}update(e){this.#I?this.#T(e):super.update(e)}listen(e,t,r){const s=t?.bind(this)??t;this.manager.onLifecycle(()=>(this.el.addEventListener(e,s,r),()=>this.el.removeEventListener(e,s,r)))}listenOn(e,t,r,s){const i=r?.bind(this)??r;this.manager.onLifecycle(()=>(e.addEventListener(t,i,s),()=>e.removeEventListener(t,i,s)))}async componentOnReady(){return await this.#w.promise,this}addController(e){this.M.push(e),!(m.d in e)&&this.renderRoot&&this.el.isConnected&&e.hostConnected?.()}removeController(e){this.M.splice(this.M.indexOf(e),1),e.controllerRemoved?.()}}const b=e=>{let t;const r=e=>{t=new URL(e,globalThis.location?.href||void 0).href},s={...e,getAssetPath(e){const r=new URL(e,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:r,customElement(e,t){t.K=s,t.L=e,g.S$?function(){try{customElements.define(e,t)}catch{}}():customElements.get(e)||customElements.define(e,t)}};return r(e.defaultAssetPath),s},U=e=>"object"==typeof e&&null!=e?(0,w.H)(e):e,C=e=>"object"==typeof e&&null!=e?(0,S.W)(e):e;class T extends k.WL{#x;#P;constructor(e){super(e);const t=this;this.#P=function(e){return t.#x.call(this,e)}}render(e){return"function"==typeof e?(this.#x=e,(0,A.K)(this.#P)):(0,A.K)(e)}}(0,k.u$)(T);const x=g.s6;function P(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}const R={toAttribute:e=>!0===e?"":!1===e?null:e}},49411(e,t,r){r.d(t,{eg:()=>o});const s={},i=(e,t)=>{let r=e;for(;r;){const e=r.closest?.(t);if(e)return e;const s=r.getRootNode?.();if(s===globalThis.document)return;r=s?.host}};function o(e){const t=i(e,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return t?.classList.contains("calcite-mode-dark")||t?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}r.d(t,["Yt",0,(e,t,r)=>(0,(e=>{const t=e.join(","),r=s[t];if(void 0!==r)return r;const i=new Set,o=new MutationObserver(e=>i.forEach(t=>t(e)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:e,subtree:!0});const n={subscribe:e=>(i.add(e),()=>{i.delete(e),0===i.size&&(o.disconnect(),s[t]=void 0)})};return s[t]=n,n})(t).subscribe)(t=>{const s=t.some(t=>((e,t)=>{let r=e;for(;r;){if(r===t)return!0;if(!r.parentNode)return!1;r=r.parentNode instanceof ShadowRoot?r.parentNode.host:r.parentNode}return!1})(e,t.target));s&&r()}),"Zj",0,(e,t,r)=>{const s=i(e,`[${t}]`);return s?.getAttribute(t)??r}])},71785(e,t,r){r.d(t,["UF",0,(e,t,...r)=>{try{return e?.call(t,...r)}catch(t){console.error(t,e)}},"ao",0,async(e,t,...r)=>{try{const s=e?.call(t,...r);return await s}catch(t){console.error(t,e)}}])},44613(e,t,r){const s=new Set;const i=e=>"string"==typeof e?e:"el"in e?e.el.localName:"localName"in e?e.localName:e.declaredClass;r.d(t,["G3",0,e=>{const t=`[${i(e)}] `;return e=>{const r=e instanceof Error&&e.message?e:new Error(String(e));r.message=`${t}${r.message}`,setTimeout(()=>{throw e})}},"Rm",0,(e,t,r,o)=>{const n=i(t);if(o?.once){const t=`${e}${n}${r}`;if(s.has(t))return;s.add(t)}let a;if(o?.detail){a={};for(const[e,t]of Object.entries(o.detail))if("object"!=typeof t&&"function"!=typeof t||null===t)a[e]=t;else{const r=new WeakRef(t);Object.defineProperty(a,e,{enumerable:!0,get:()=>r.deref()})}console[e](`[${n}]: ${r}`,a)}else console[e](`[${n}]: ${r}`)}])},60026(e,t,r){const s=/[A-Z]+(?![a-z])|[A-Z]/gu,i=e=>e.charAt(0).toUpperCase()+e.slice(1);crypto,r.d(t,["TK",0,e=>e.split("-").map(i).join(""),"YF",0,e=>e.charAt(0).toLowerCase()+e.slice(1),"j1",0,e=>e.replace(s,(e,t)=>`${0===t?"":"-"}${e.toLowerCase()}`)])},36708(e,t,r){r.d(t,{C_:()=>u,on:()=>c,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),o=r(97768),n=r(17676),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null,n=r.once?(e,r)=>{s(e)&&((0,o.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,n,r.sync,r.equals),r.initial){let t=e();n(t,t)}return i}function c(e,t,r,n={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),n.onListenerRemove?.(a),a=null,h=null)}function u(e){n.once&&n.once&&(0,o.xt)(d),r(e)}let p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),n.onListenerAdd?.(e))},{sync:n.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,n.G4)(r))return Promise.reject((0,n.NK)());let s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,o.xt)(a)}return new Promise((s,o)=>{a=(0,i.vE)([(0,n.u7)(r,()=>{l(),o((0,n.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559),r.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},16494(e,t,r){var s=r(76361);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup",..."animate.animatetransform.circle.clippath.defs.ellipse.g.image.line.lineargradient.marker.mask.path.pattern.polygon.polyline.radialgradient.rect.stop.svg.switch.symbol.text.textpath.tspan.use".split(".")].reduce((e,t)=>(e[t]=[],e),{}),o="align.alink.alt.bgcolor.border.cellpadding.cellspacing.class.color.cols.colspan.coords.d.dir.face.height.hspace.ismap.lang.marginheight.marginwidth.multiple.nohref.noresize.noshade.nowrap.ref.rel.rev.rows.rowspan.scrolling.shape.span.summary.tabindex.title.usemap.valign.value.vlink.vspace.width".split("."),n=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{let s=`${t}="${r}"`;if(o.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);r.d(t,["Nd",0,a,"W5",0,n])},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>n,yS:()=>o});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function n(){return`{${i()}}`}function a(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>lt});var s=r(70333),i=r(92602),o=r(56507),n=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(17676),u=r(84952),p=r(32198),f=r(91429),g=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],this.creationTime??=Date.now()}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);let t=s.id,r=(this.server?t.findServerInfo(this.server):null)?.owningSystemUrl,i=r?t.findServerInfo(r):null;!1!==e&&(!r||"portal"===this.scope||i?.webTierAuth&&!t.normalizeWebTierAuth)&&(null!=this.expires||null!=this.validity)&&this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&=(this._oAuthCred.destroy(),null);let e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){let e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);let e=6e4*this.tokenRefreshBuffer,t=2**31-1,r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,f.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,g.$)("esri.identity.Credential")],m);const v=m;var y=r(79783),_=r(49411);function w(e){return function(){let e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,_.eg)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(w(e))}r(44208);var k=r(53966),A=r(97768),I=r(61893),b=r(36708),U=r(13069),C=r(62788),T=r(71429),x=r(16494);const P="http://www.w3.org/",R=`${P}2000/svg`,O=`${P}1999/xlink`;let D=[],L=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},M=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),E=e=>{if("string"!=typeof e)throw Error("Style values must be strings")},N=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(M(e[s],t))return s;return-1},j=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let o=i.properties;if(!o||!(void 0===o.key?o.bind:o.key))for(let o=0;o<e.length;o++)if(o!==t){let t=e[o];if(M(t,i))throw Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},$=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},F=[],q=!1,Z=e=>{(e.children||[]).forEach(Z),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{q=!1,F.forEach(Z),F.length=0},z=e=>{F.push(e),q||(q=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},B=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r)return t.style.pointerEvents="none",void r(t,()=>{t.parentNode&&(t.parentNode.removeChild(t),z(e))},e.properties)}t.parentNode&&(t.parentNode.removeChild(t),z(e))},H=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),o=i.length;for(let n=0;n<o;n++){let o=i[n],a=t[o];if("className"===o)throw Error('Property "className" is not supported, use "class".');if("class"===o)Y(e,a,!0);else if("classes"===o){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===o){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],o=a[s];o&&(E(o),r.styleApplyer(e,s,o))}}else if("key"!==o&&null!=a){let i=typeof a;"function"===i?(0===o.lastIndexOf("on",0)&&(s&&(a=s(o,a,e,t)),"oninput"===o&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[o]=a):r.namespace===R?"href"===o?e.setAttributeNS(O,o,a):e.setAttribute(o,a):"string"===i&&"value"!==o?"innerHTML"===o?e[o]=x.W5.sanitize(a):W(e)&&o in e?e[o]=a:e.setAttribute(o,a):e[o]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;let t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)K(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),H(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},K=(e,t,r,s)=>{let i,o=0,n=e.vnodeSelector,a=t.ownerDocument;if(""===n)i=e.domNode=a.createTextNode(e.text),void 0===r?t.appendChild(i):t.insertBefore(i,r);else{for(let l=0;l<=n.length;++l){let h=n.charAt(l);if(l===n.length||"."===h||"#"===h){let h=n.charAt(o-1),d=n.slice(o,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=L(s,{namespace:R})),void 0===s.namespace?(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)):i=e.domNode=a.createElementNS(s.namespace,d),void 0===r?i.parentNode!==t&&t.appendChild(i):t.insertBefore(i,r)),o=l+1}}G(i,e,s)}},Y=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Q=(e,t,r,s)=>{if(!r)return;let i=!1,o=Object.keys(r),n=o.length;for(let a=0;a<n;a++){let n=o[a],l=r[n],h=t[n];if("class"===n)h!==l&&(Y(e,h,!1),Y(e,l,!0));else if("classes"===n){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],o=!!l[s];o!==!!h[s]&&(i=!0,o?t.add(s):t.remove(s))}}else if("styles"===n){let t=Object.keys(l),r=t.length;for(let o=0;o<r;o++){let r=t[o],n=l[r];n!==h[r]&&(i=!0,n?(E(n),s.styleApplyer(e,r,n)):s.styleApplyer(e,r,""))}}else if(!l&&"string"==typeof h&&(l=""),"value"!==n||W(e)){if(l!==h){let t=typeof l;("function"!==t||!s.eventHandlerInterceptor)&&(s.namespace===R?"href"===n?e.setAttributeNS(O,n,l):e.setAttribute(n,l):"string"===t?"innerHTML"===n?e[n]=x.W5.sanitize(l):"role"===n&&""===l?e.removeAttribute(n):W(e)&&n in e?e[n]=l:e.setAttribute(n,l):e[n]!==l&&(e[n]=l),i=!0)}}else{let t=e[n];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[n]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let o=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=L(r,{namespace:R})),e.text!==t.text&&(o=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,o=((e,t,r,s,i)=>{if(r===s)return!1;r||=D,s||=D;let o,n=r.length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<n?r[l]:void 0,c=s[h];if(void 0!==a&&M(a,c))d=J(a,c,i)||d,l++;else{let a=N(r,c,l+1);if(a>=0){for(o=l;o<a;o++)B(r[o]),j(r,o,e,"removed");d=J(r[a],c,i)||d,l=a+1}else K(c,t,l<n?r[l].domNode:void 0,i),$(c),j(s,h,e,"added")}h++}if(n>l)for(o=l;o<n;o++)B(r[o]),j(r,o,e,"removed");return d})(t,s,e.children,t.children,r)||o,o=Q(s,e.properties,t.properties,r)||o,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return o&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let X=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>L(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),X(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),X(t,r)),oe=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),X(t,r)),ne=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),X(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{let o=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;(!r||o||i===t.length-1)&&(s=o)}),s};var de=r(63242),ce=r(2741),ue=r(36563);const pe=Symbol("widget"),fe=Symbol("widget-test-data"),ge=[],me={},ve=new Map;function ye(e,t){let r=t.vnodeSelector;if(ke(r)){let s=t.properties||me,i=s.key||r,o=t.children?.length?t.children:ge,n={key:i,afterCreate:_e,afterUpdate:we,afterRemoved:Se,parentWidget:e,widgetConstructor:r,widgetProperties:{...s,key:i,children:o}};return{vnodeSelector:r.vnodeSelector,properties:n,children:void 0,text:void 0,domNode:null}}let s=t.children;if(s?.length)for(let t=0;t<s.length;++t)s[t]=ye(e,s[t]);return t}function _e(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:o}){let n=new i(o);n.container=e,ve.set(e,n),n.afterCreate?.(n,e),s.addHandles((0,ue.hA)(()=>Se(e))),queueMicrotask(()=>{n[fe].projector?.renderNow()})}function we(e,t,r,{widgetProperties:s}){let i=ve.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Se(e){let t=ve.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),ve.delete(e))}function ke(e){return"function"==typeof e&&e[pe]}const Ae=new Set;new Map;const Ie=new Map;function be(){Ie.clear()}function Ue(e){Ie.delete(e)}var Ce=r(98291),Te=r(76030);function xe(e){return e.matches(":focus-within")||document.activeElement===e}(()=>{let e=new Map;new ResizeObserver(t=>{be();for(let r of t)e.get(r.target)?.(r)})})();var Pe=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Re=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Re(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Pe(i)),t.push(i))}};const Oe=function(...e){let t=Ce.A.acquire();for(let r=0;r<e.length;r++){let s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(let e in s)s[e]&&t.push(e)}let r=t.join(" ");return Ce.A.release(t),r},De=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Le(e,t,...r){return"function"!=typeof e||ke(e)?function(e,t){var r=[...arguments].slice(2);if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var s=[];return Re(r,s),{vnodeSelector:e,properties:t||void 0,children:s,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var Me,Ee;let Ne=0;function je(e,t){let r=Object.prototype.hasOwnProperty;for(let s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?je(e[s],t[s]):e[s]=t[s]);return e}const $e=(e=>{let t,r,s={...ae,...e},i=(u=s,{...le,...u}),o=i.performanceLogger,n=!0,a=!1,l=[],h=[],d=(e,r,n)=>{let a;i.eventHandlerInterceptor=(e,r,i,n)=>function(e){o("domEvent",e);let r,i,n=((e,t)=>{let r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),l=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&l){let t=e.composedPath(),s=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();r=he(a.getLastRender(),s,!0)}else n.reverse(),r=he(a.getLastRender(),n);return r&&(i=s.handleInterceptedEvent(t,r,this,e)),o("domEventProcessed",e),i},s.postProcessProjectionOptions?.(i);let d=n();a=e(r,d,i),i.eventHandlerInterceptor=void 0,l.push(a),h.push(n),s.afterFirstVNodeRendered&&s.afterFirstVNodeRendered(a,d)},c=()=>{if(r=void 0,n){n=!1,o("renderStart",void 0);for(let e=0;e<l.length;e++){let t=h[e]();o("rendered",void 0);try{l[e].update(t)}catch(e){console.error(e)}o("patched",void 0)}o("renderDone",void 0),n=!0}};var u;return s.modifyDoRenderImplementation&&(c=s.modifyDoRenderImplementation(c,l,h)),t={renderNow:c,scheduleRender:()=>{!r&&!a&&(r=requestAnimationFrame(c))},stop:()=>{r&&=void cancelAnimationFrame(r),a=!0},resume:()=>{a=!1,n=!0,t.scheduleRender()},append:(e,t)=>{d(se,e,t)},insertBefore:(e,t)=>{d(ie,e,t)},merge:(e,t)=>{d(oe,e,t)},replace:(e,t)=>{d(ne,e,t)},detach:e=>{for(let t=0;t<h.length;t++)if(h[t]===e)return h.splice(t,1),l.splice(t,1)[0];throw Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){let t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,o)=>{let n=t?.(e,s,i,o),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){let t=e[2].toLowerCase()+e.slice(3),r=e=>n?.call(i,e);i.addEventListener(t,r,a);let s=()=>i.removeEventListener(t,r,a),l=o.afterRemoved;o.afterRemoved=e=>{l?.(e),s()}}return n}},handleInterceptedEvent(e,t,r,s){let{eventPhase:i,type:o}=s,n=i===Event.CAPTURING_PHASE,a=`on${o}${n?"capture":""}`,l=t.properties;(!l||!(a in l))&&(a=`on${o[0].toUpperCase()}${o.slice(1)}${n?"Capture":""}`,!l||!(a in l))||(be(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let Fe=!1,qe=class extends((0,I.g)(a.nJ)){static{this[Me]=!0}constructor(e,t){super(e,t),this[Ee]=!0,this._attached=!1,this._projector=$e,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){let e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,y.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=je((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(let t of e)"rejected"===t.status&&k.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,ue.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));let r="esri-widget-uid-"+(0,U.lk)(),s=this.render.bind(this);this._trackingTarget=new T.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});let i=()=>{if(!this._readyForTrueRender||this.destroyed)return null;let e=s()??{vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0},t=e.properties??={};t.key??=r,ke(e.vnodeSelector)?t.visible=this.visible&&!1!==t.visible:(this.visible?t.styles||={}:(t.class="",t.styles={display:"none"}),t.styles.display??="");let i=0;return e.children?.forEach(e=>{ke(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${i++}`)}),ye(this,e)};this.render=()=>{if(Fe)return i();let e=(t=this,Ie.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),Fe=!0;try{e=(0,C.a)(this._trackingTarget,i)}catch(e){throw k.A.getLogger(this).error(e),e}finally{Fe=!1}return e&&function(e,t){Ie.set(e,t)}(this,e),e};let o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){Ae.add(e),e.finally(()=>Ae.delete(e)).catch(()=>{})}(this._resourcesFetch)}normalizeCtorArgs(e,t){let r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){let e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),!this.viewModel?.destroyed&&!this.viewModel?.destroying&&(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,Ue(this))}get container(){return this._get("container")}set container(e){this._get("container")||this._set("container",function(e){return"string"==typeof e?document.getElementById(e):e??null}(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+Ne++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(Me=pe,Ee=pe,fe)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(Ue(this),this._projector.scheduleRender())}classes(...e){return Oe.apply(this,e)}renderNow(){this.destroyed||(Ue(this),this._projector.renderNow())}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,b.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},b.pc)),this.postInitialize();let e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,y.oQ)(e),(0,b.wB)(()=>this.uiStrings,e)]),this.addHandles((0,b.z7)(()=>this.container,e=>{this.destroyed||(e.closest("[arcgis-widget-wrapped]")||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&=(this._projector.detach(this.render),!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],qe.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],qe.prototype,"container",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],qe.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,f.MZ)()],qe.prototype,"topLayerDisabled",void 0),qe=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],qe);const Ze=qe,Ve="esri-identity-modal",ze={base:Ve,info:`${Ve}__info`,notice:`${Ve}__notice`};let Be=class extends Ze{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){let t=[];for(let r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(4209),r.e(3346),r.e(4985)]).then(()=>r(14985)),dialog:()=>Promise.all([r.e(4209),r.e(3346),r.e(9775),r.e(858)]).then(()=>r(79775)),input:()=>Promise.all([r.e(4209),r.e(3346),r.e(8613),r.e(8477)]).then(()=>r(98613)),label:()=>Promise.all([r.e(4209),r.e(4019)]).then(()=>r(34019)),notice:()=>Promise.all([r.e(4209),r.e(3346),r.e(7210)]).then(()=>r(84065))})}get title(){return this.commonMessages?.auth.signIn}render(){let{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:o,resource:n,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:g,lblSigning:m,lblOk:v}=r;return Le("div",{class:this.classes(ze.base,S(this.container))},Le("form",{bind:this,onsubmit:this._submit},Le("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Le("div",{class:ze.info},(0,y.V2)(i?h:l,{server:o&&/\.arcgis\.com/i.test(o)?"ArcGIS Online":o,resource:`(${n||d})`})),a?Le("calcite-notice",{class:ze.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Le("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Le("calcite-label",null,p,Le("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Le("calcite-label",null,f,Le("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Le("calcite-button",{appearance:"outline",bind:this,slot:"footer-end",type:"button",onclick:this._cancel},g),Le("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e,t){let r=(0,c.YL)(t,1e4),s=(0,c.Mq)(r);await(0,Te.$m)(s);let i=e();if(!i)return;let o=async()=>{"setFocus"in i&&"function"==typeof i.setFocus?await i.setFocus():i instanceof HTMLElement&&i.focus()};for(true;!xe(i)&&!(0,c.G4)(r);)await(0,Te.$m)(s),await o()}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);let t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),De("esri/t9n/common")],Be.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),De("esri/identity/t9n/identity")],Be.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"resource",void 0),Be=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],Be);const He=Be,We="esriJSAPIOAuth";class Je{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){let t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;let e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||=e[t.authNamespace]={},this.appId||=t.appId,r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(We,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){let e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){let e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,o.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}}).catch(()=>{})}if(t?.authNamespace&&t.portalUrl&&this.storage){let r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(We,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){let e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){let t=this.storage.getItem(We);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Je.prototype.declaredClass="esri.identity.OAuthCredential";var Ge,Ke=r(25482);let Ye=class extends Ke.o{static{Ge=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ge.fromJSON(this.toJSON())}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"appId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"authNamespace",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"expiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"flowType",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"forceLogin",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"forceUserId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"locale",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"popup",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"portalUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"userId",void 0),Ye=Ge=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Ye);const Qe=Ye;let Xe=class extends Ke.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Xe.prototype,"webTierAuth",void 0),Xe=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],Xe);const et=Xe;var tt=r(39131);const rt={},st=e=>{let t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},it=(e,t)=>!!(st(e)&&t&&t.some(t=>t.test(e.server)));let ot=null,nt=null;try{ot=window.localStorage,nt=window.sessionStorage}catch{}class at extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"===window.origin?window.location.origin:window.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){let t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){let t=this.oAuthInfos;if(t){for(let r of e){let e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};let t,r=this._sanitizeUrl(e.server),s=this._isServerRsrc(r),i=this.findServerInfo(r),o=!0;i||(i=new et,i.server=this._getServerInstanceRoot(r),s?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(r),i.hasPortal=!0),this.registerServers([i])),t=this._findCredential(r),t?(delete e.server,Object.assign(t,e),o=!1):(t=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:s?"server":"portal"}),t.resources=[r],this.credentials.push(t)),t.emitTokenChange(!1),o||t.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));let t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){let e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new et(t))}),e.length&&this.registerServers(e)}if(r){let e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(let r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(let r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);let s=this._isServerRsrc(e)?"server":"portal";if(t){for(let i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(let t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);let o=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,c.u7)(t.signal,()=>{o.abort()}),(0,c.u7)(o,()=>{a.reject(new n.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(o))return a.promise;t.signal=o.signal;let l,h=this._isAdminResource(e),d=s?this.findCredential(e):null;if(d&&498===r?.details?.httpStatus)d.destroy();else if(d)return l=new n.A("identity-manager:not-authorized","You are currently signed in as: '"+d.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(l),a.promise;let p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{let t=this._getTokenSvcUrl(e);if(!t)return l=new n.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(l),a.promise;f=new et,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(i||(0,u.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,a,h)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){let s,i,a,l,h,d,c,p,f=this._rePortalTokenSvc.test(e.tokenServiceUrl),g=new u.s0(this._appOrigin),m=e.shortLivedTokenValidity;t&&(p=this.tokenValidity||m||this._defaultTokenValidity,p>m&&m>0&&(p=m)),r&&(s=r.isAdmin,i=r.serverUrl,a=r.token,d=r.signal,c=r.ssl,e.customParameters=r.customParameters),s?l=e.adminTokenServiceUrl:(l=e.tokenServiceUrl,h=new u.s0(l.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!c&&"http"===g.scheme&&((0,u.FX)(g.uri,l,!0)||"https"===h.scheme&&g.host===h.host&&"7080"===g.port&&"7443"===h.port)&&(l=l.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));let v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:i,token:a,expiration:p,referer:s||f?this._appOrigin:null,client:s?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:d};return f||(v.withCredentials=!1),(0,o.A)(l,v).then(r=>{let s=r.data;if(!s?.token)return new n.A("identity-manager:authentication-failed","Unable to generate token");let i=e.server;return rt[i]||(rt[i]={}),t&&(rt[i][t.username]=t.password),s.validity=p,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a,l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,o.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new n.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;let t=e.details?.httpStatus;if(498===t)throw i.destroy(),new n.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new n.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){let s=Promise.withResolvers(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},o=()=>{i(),this._oAuthDfd=null,s.reject(new n.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{o()});let a=new He({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",o),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(o=>{i();let n=new v({userId:e.username,server:t.server??void 0,token:o.token,expires:null==o.expires?null:Number(o.expires),ssl:!!o.ssl,isAdmin:r.isAdmin,validity:o.validity});s.resolve(n)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();let i=this._oAuthDfd;s?.signal&&(0,c.u7)(s.signal,()=>{let e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;let o,a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));o=(0,u.$1)(e),a.codeVerifier=o,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=o=null)}else a.codeVerifier=null;this._getCodeChallenge(o).then(i=>{let o=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!o)return void this._doOAuthSignIn(e,t,r,i);let n=new He({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=n,this.emit("dialog-create"),l=n.on("cancel",d),h=n.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});let l,h,d=()=>{p(),this._oAuthDfd=null,i.reject(new n.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){let t,r=this.findServerInfo(e.server),s=r?.owningSystemUrl,i=!!s&&"server"===e.scope,o=i&&it(r,this._legacyFed),n=r.webTierAuth,a=n&&this.normalizeWebTierAuth,l=rt[e.server]?.[e.userId],h=e.resources&&e.resources[0],d=i?this.findServerInfo(s):null,c={username:e.userId,password:l};if(n&&!a)return;i&&!d&&this.serverInfos.some(e=>(this._isIdProvider(s,e.server)&&(d=e),!!d));let u=d?this.findCredential(d.server,e.userId):null;if(!i||u){if(!o){if(i)t={serverUrl:h,token:u?.token,ssl:u?.ssl};else if(a)c=null,t={ssl:e.ssl};else{if(!l){let t;return h&&(h=this._sanitizeUrl(h),e._enqueued=1,t=this._enqueue(h,r,null,null,e.isAdmin,e),t.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),t}e.isAdmin&&(t={isAdmin:!0})}return this.generateToken(i?d:r,i?null:c,t).then(t=>{e.token=t.token,e.expires=null==t.expires?null:Number(t.expires),e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}u?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{let r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(it(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){let r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&=(this._postMessageAuthHandle.remove(),null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));let t=(0,u.zf)(e),r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));let e=(0,u.zf)(t),r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){let t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});let r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,o.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){let t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){let e=new n.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,o,n=-1,a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,o=s?this.findCredential(s,r.userId):void 0,n=this._getIdenticalSvcIdx(e,r),!a)return-1===n&&r.resources.push(e),this._addResource(e,o),r;-1!==n&&(r.resources.splice(n,1),this._removeResource(e,o))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,o=s?this.findCredential(s,t.userId):void 0,n=r,!0))),a)t&&(t.resources.splice(n,1),this._removeResource(e,o));else if(t)return this._addResource(e,o),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(let r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){let t=new u.s0(e);return t.scheme+"://"+t.host+(null==t.port?"":":"+t.port)}_getServerInstanceRoot(e){let t=e.toLowerCase(),r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1===r&&!(0,tt.$E)(t)&&(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,tt.qG)(e),t=(0,tt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){let t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){let s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){let e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else(this._isAdminResource(e)&&this._isAdminResource(t)||!this._isServerRsrc(e)&&!this._isServerRsrc(t)&&this._isPortalDomain(e))&&(r=!0);return r}_isPortalDomain(e){let t=new u.s0(e.toLowerCase()),r=this._portalConfig,s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||=this._portals.some(e=>this._hasSameServerInstance(e,t.uri)),s||=this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,o)=>{-1===r&&i.regex.test(e)&&(r=o),-1===s&&i.regex.test(t)&&(s=o)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?(0===s||4===s)&&(i=!0):1===r?(1===s||2===s)&&(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){let r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&st(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){let i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){let s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",e=s+"/rest/info",r=(0,o.A)(e,{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||=this._getOrigin(e)+this._gwTokenUrl,t){let r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){let s=t._oAuthCred;if(e.code){let i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{let o=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=o.userId,s.storage=i.persist?ot:nt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=o.userId,s.ssl=o.ssl,s.save(),o})}let i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ot:nt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){let t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){let r="access_denied"===e.error,s=new n.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,o.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{let r=await(0,o.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,o.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){let t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0,o=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return o.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(o)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),i||r(new n.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection."))),i}_enqueue(e,t,r,s,i,o){return s||=Promise.withResolvers(),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=o,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;let t=(t,r=!1)=>{let s=e.options_?.resource,i=e.resUrl_,o=e.refresh_,n=r;this.credentials.includes(t)||(o&&this.credentials.includes(o)?(o.userId=t.userId,o.token=t.token,o.expires=t.expires,o.validity=t.validity,o.ssl=t.ssl,o.creationTime=t.creationTime,n=!0,t=o):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(i)||t.resources.push(i),s&&!t.resources.includes(s)&&t.resources.push(s),t.scope=this._isServerRsrc(i)?"server":"portal",r||t.emitTokenChange();let a=this._soReqs,l={};this._soReqs=[],a.forEach(e=>{if(!this._isIdenticalService(i,e.resUrl_)){let r=this._getSuffix(e.resUrl_);l[r]||(l[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),a.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(i),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,o,a,h)=>{let d,p,f=e.sinfo_,g=!e.options_||!1!==e.options_.prompt,m=f.hasPortal&&this._findOAuthInfo(e.resUrl_);if(i)t(new v({userId:i,server:f.server??void 0,token:a??void 0,expires:null==h?null:Number(h),ssl:!!o}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);let s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new n.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new n.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(n.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(m){let i=m._oAuthCred;if(!i){let e=new Je(m,ot),t=new Je(m,nt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,m._oAuthCred=i}if(i.isValid()){d=new v({userId:i.userId??void 0,server:f.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});let o=m.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);o||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(f.server,i.refreshToken,i.appId).then(e=>(d.expires=Date.now()+1e3*e.expires_in,d.token=e.access_token,d)):Promise.resolve(d),e._pendingDfd.then(e=>o?this._exchangeToken(e.server,m.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{let t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(d)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(m.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){let s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,m,f).then(e=>{t(e)}).catch(r)}else{let s=()=>{g?e._pendingDfd=this.oAuthSignIn(e.resUrl_,f,m,e.options_).then(t,r):(p=new n.A("identity-manager:not-authenticated","User is not signed in."),r(p))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(f.server,m.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(d=new v({userId:e.username,server:f.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(d)):s()}).catch(s):s()}}else if(g){if(this._checkProtocol(e.resUrl_,f,r,e.admin_)){let s=e.options_;e.admin_&&(s||={},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,f,s).then(t,r)}}else p=new n.A("identity-manager:not-authenticated","User is not signed in."),r(p)},i=()=>{let s,i,o,n=e.sinfo_,a=n.owningSystemUrl,l=e.options_;if(l&&(s=l.token,i=l.prompt),o=this._findCredential(a,{resource:e.resUrl_}),!o)for(let e of this.credentials)if(this._isIdProvider(a,e.server)){o=e;break}if(o){let s=this.findCredential(e.resUrl_,o.userId);if(s)t(s);else if(it(n,this._legacyFed)){let e=o.toJSON();e.server=n.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(o.server),null,{serverUrl:e.resUrl_,token:o.token,signal:e.options_.signal,ssl:o.ssl})).then(r=>{t(new v({userId:o?.userId,server:n.server??void 0,token:r.token,expires:null==r.expires?null:Number(r.expires),ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,s&&(e.options_.token=null),(e._pendingDfd=this.getCredential(a.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:n.owningTenant,signal:e.options_.signal,prompt:i})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};if(this._errbackFunc=r,e.options_?.signal?.aborted)return void r(new n.A("identity-manager:user-aborted","ABORTED"));if(!e.refresh_&&!e.options_?.token&&!e.options_?.credential){let r=this._findCredential(e.resUrl_,e.options_);if(r)return void t(r,!0)}let o=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{let r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;let e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;let t=new n.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&o?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{let r,s,i,o,n={};return t&&(r=t.user?.username,n.username=r,n.allSSL=t.allSSL,s=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(i=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!r,r&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:n.allSSL}).catch(()=>null).then(e=>(n.portalToken=e?.token,n.tokenExpiration=e?.expires,n)):!r&&s&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:i,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>n):n}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl,i=e.customBaseUrl,n=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;let e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,o.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Qe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,o.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:n,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){let t=this._defaultOAuthInfo.clone();t.portalUrl=e.data.urlKey&&i?"https://"+e.data.urlKey.toLowerCase()+"."+i:s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){let i=r._oAuthCred,o={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(o.hash=window.location.hash),i.stateUID&&(o.uid=i.stateUID);let a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(o),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");let h=this._getAuthorizeUrl(r.portalUrl),d=h+"?"+(0,u.x0)(a);if(r.popup){let e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();let e=this._oAuthDfd;if(e){let t=new n.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{let e=new n.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",r=(0,tt.py)(t);if(r?.portalHostname){let{customBaseUrl:e,portalHostname:t,urlKey:s}=r}return t}_getRedirectURI(e,t){let r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){let e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}at.prototype.declaredClass="esri.identity.IdentityManagerBase";const lt=new at;(0,s.Aq)(lt)},79783(e,t,r){r.d(t,{ud:()=>S,JK:()=>k,oQ:()=>A,V2:()=>b});var s=r(2741),i=r(97770),o=r(73444),n=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),f(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var g=r(56507),m=r(49186);const v={"esri/t9n/basemaps":"esri/support/basemaps/t9n/basemaps","esri/t9n/common":"esri/common/t9n/common","esri/widgets/support/t9n/ColorPicker":"esri/widgets/support/ColorPicker/t9n/ColorPicker","esri/widgets/support/t9n/timezone":"esri/widgets/support/TimezonePicker/t9n/timezone","esri/widgets/support/t9n/uriUtils":"esri/widgets/support/uriUtils/t9n/uriUtils"};async function y(e){if(null!=w.fetchBundleAsset)return w.fetchBundleAsset(e);let t=await(0,g.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){let i=v[r]??r,o=t.exec(i);if(!o)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);let a=o[1]?`${o[1]}/`:"",l=o[2],h=(0,n.xO)(s),d=i.startsWith("esri/"),c=`${a}${l}.json`,u=h?`${a}${l}_${h}.json`:c,p=d?`${a}messages.en.json`:c,f=d?`${a}messages.${h??"en"}.json`:u,g=[...new Set(d?[f,u,p,c]:[f,p])];for(let[t,s]of g.entries())try{return await y(e(s))}catch(e){if(t===g.length-1)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`)}(this.getAssetUrl,this.matcher,e,t)}}const w={},S=n.ud,k=o.JK,A=o.oQ,I=n.ao,b=function(e,t,r={}){let{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i,o=e.indexOf(":");if(-1===o?s=e.trim():(s=e.slice(0,o).trim(),i=e.slice(o+1).trim()),!s)return"";let n=(0,h.wc)(s,t);if(null==n)return"";let a=(i?r?.[i]:null)??r?.[s];return a?u(n,a):i?p(n,i):f(n)}(e,t,s))};var U;I((U={pattern:"esri/",location:s.s},new _(U)))},97770(e,t,r){r.d(t,{Ey:()=>P,F8:()=>x,J2:()=>b,Yq:()=>C,_m:()=>U,iS:()=>T,wj:()=>R});var s=r(66552),i=r(73444),o=r(98623),n=r(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},d={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},g={...f,second:"numeric"},m={hourCycle:"h23"},v={...f,...m},y={...g,...m},_={"short-date":d,"short-date-short-time":{...d,...f},"short-date-short-time-24":{...d,...v},"short-date-long-time":{...d,...g},"short-date-long-time-24":{...d,...y},"short-date-le":d,"short-date-le-short-time":{...d,...f},"short-date-le-short-time-24":{...d,...v},"short-date-le-long-time":{...d,...g},"short-date-le-long-time-24":{...d,...y},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...f},"long-month-day-year-short-time-24":{...c,...v},"long-month-day-year-long-time":{...c,...g},"long-month-day-year-long-time-24":{...c,...y},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...f},"day-short-month-year-short-time-24":{...u,...v},"day-short-month-year-long-time":{...u,...g},"day-short-month-year-long-time-24":{...u,...y},"long-date":p,"long-date-short-time":{...p,...f},"long-date-short-time-24":{...p,...v},"long-date-long-time":{...p,...g},"long-date-long-time-24":{...p,...y},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":g},w=(0,s.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),S={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function k(){let e=(0,i.lR)();return(e&&S[e])??(0,i.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(S.bs="sr-Latn-CS");let A=new WeakMap;const I=_["short-date-short-time"];function b(e){return _[e]}function U(e){let{dateStyle:t,timeStyle:r,hour12:s,year:i,month:o}=e,n={};return t?n.dateStyle=t:i&&(n.year=i,n.month=o||void 0),r&&!n.year&&(n.timeStyle=r,n.hour12="auto"===s?void 0:"always"===s),n}function C(e,t=I){return function(e){let t=A.get(e);if(!t){let r=k(),s=R(e.timeZone??"system"),i={...e,timeZone:s};t=new Intl.DateTimeFormat(r,i),A.set(e,t)}return t}(t).format(e)}function T(e,t=I){return C(new Date(e),{...t,...h,...l})}function x(e,t=I){return C(new Date(`1970-01-01T${e}Z`),{...t,...h,...a})}function P(e,t=I){let r=n.c9.fromISO(e,{setZone:!0});if(!r.isValid)return e;if(t.timeZone)return C(r.toJSDate(),t);let s=0===r.offset?"UTC":t.timeZone,i={...t,timeZone:s};return r.toLocaleString(i,{locale:k()})}function R(e){switch(e){case"system":return o.N;case o.L:return"UTC";default:return e}}(0,i.Ml)(()=>{A=new WeakMap}),r.d(t,["_v",0,w])},10838(e,t,r){r.d(t,{ao:()=>c,ud:()=>u,xO:()=>p});var s=r(49186),i=r(36563),o=r(73444);const n={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,nn:"no",pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){if(function(e){return e in n}(e)){let t=n[e];return!0===t?e:t}return null}const l=[],h=new Map;function d(e){for(let t of h.keys())f(e.pattern,t)&&h.delete(t)}function c(e){return l.includes(e)||(d(e),l.unshift(e)),(0,i.hA)(()=>{let t=l.indexOf(e);t>-1&&(l.splice(t,1),d(e))})}async function u(e){let t=(0,o.JK)();h.has(e)||h.set(e,async function(e,t){let r=[];for(let s of l)if(f(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}throw r.length?new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r}):new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));let r=h.get(e);return r&&await g.add(r),r}function p(e){let t=(0,o.lR)(e);return t?a(e)??a(t):null}function f(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,o.Ml)(()=>{h.clear()});const g=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||=Promise.withResolvers()}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18047(e,t,r){r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let o=new WeakMap,n={};function a(e={}){let t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){let{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){let t=e||n;if(!o.has(t)){let r=(0,s.lR)(),n=r&&i[r]||(0,s.QC)();o.set(t,new Intl.NumberFormat(n,e))}return o.get(t)}(t).format(e)}(0,s.Ml)(()=>{o=new WeakMap,n={}}),new Map}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7237],{11006(t,e,i){function n(t,e,i,n,s){r(t,e,i||0,n||t.length-1,s||o)}function r(t,e,i,n,o){for(;n>i;){if(n-i>600){var l=n-i+1,h=e-i+1,a=Math.log(l),u=.5*Math.exp(2*a/3),f=.5*Math.sqrt(a*u*(l-u)/l)*(h-l/2<0?-1:1);r(t,e,Math.max(i,Math.floor(e-h*u/l+f)),Math.min(n,Math.floor(e+(l-h)*u/l+f)),o)}var c=t[e],d=i,y=n;for(s(t,i,e),o(t[n],c)>0&&s(t,i,n);d<y;){for(s(t,d,y),d++,y--;o(t[d],c)<0;)d++;for(;o(t[y],c)>0;)y--}0===o(t[i],c)?s(t,i,y):s(t,++y,n),y<=e&&(i=y+1),e<=y&&(n=y-1)}}function s(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function o(t,e){return t<e?-1:+(t>e)}i.d(e,{q:()=>n})},69540(t,e,i){var n=i(32198),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),h=i(64108);const a=Symbol("ClonableMixin"),u=t=>{var e;let i=t,r=class extends i{constructor(){super(...arguments),this[e]=!0}static{e=a}clone(t){let e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");let i=e.metadata,n=e.store,r={},h=new Map;for(let e in i){let o=i[e],l=n?.originOf(e),a=o.clonable;if(o.readOnly||!1===a||7!==l&&0!==l&&5!==l&&4!==l)continue;let u=this[e],f=null;if("function"==typeof a)f=a(u,t);else if("reference"===a)f=u;else if(f=(0,s.TU)(u,t),null!=u&&null==f)continue;0===l?h.set(e,f):r[e]=f}let a=new(0,Object.getPrototypeOf(this).constructor)(r);if(h.size){let t=(0,l.oY)(a)?.store;if(t)for(let[e,i]of h)t.set(e,i,0)}return a}};return r=(0,n.Cg)([(0,h.$)("esri.core.Clonable")],r),r},f=u(r.A);i.d(e,["OU",0,u,"Pw",0,f])},67482(t,e,i){function n(t){return null!==r(t)}function r(t){return function(t){let e=s.exec(t);if(!e?.groups)return null;let i=e.groups,n=+i.year,r=i.month-1,o=+i.day,l=+(i.hours??"0"),h=+(i.minutes??"0"),a=+(i.seconds??"0");if(l>23||h>59||a>59)return null;let u,f=i.ms??"0",c=f?+f.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)u=Date.UTC(n,r,o,l,h,a,c);else{let t=+i.offsetHours,e=+i.offsetMinutes;u=6e4*("+"===i.offsetSign?-1:1)*(60*t+e)+Date.UTC(n,r,o,l,h,a,c)}return Number.isNaN(u)?null:u}(t)??function(t){let e=new Date(t),i=e.getTime();return Number.isNaN(i)?null:t.toLowerCase()===e.toUTCString().toLowerCase()?i:null}(t)??function(t){if(!o.test(t))return null;let e=new Date(t);return Number.isNaN(e.getTime())?null:e.getTime()-6e4*e.getTimezoneOffset()}(t)}i.d(e,{C:()=>n,_:()=>r});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(t,e,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[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]]}i.d(e,{o8:()=>r,vt:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m){return[t,e,i,n,r,s,o,l,h,a,u,f,c,d,y,m]}},Symbol.toStringTag,{value:"Module"})),i.d(e,["zK",0,s])},35522(t,e,i){i.d(e,{$A:()=>T,Bw:()=>s,C:()=>o,Cc:()=>P,DI:()=>b,Io:()=>_,Ln:()=>g,Om:()=>I,Qr:()=>f,Re:()=>a,S8:()=>v,T9:()=>m,WQ:()=>h,Z0:()=>A,_S:()=>d,aI:()=>G,ei:()=>B,fw:()=>F,gL:()=>S,hG:()=>x,hZ:()=>l,hs:()=>p,jk:()=>y,lw:()=>u,m3:()=>M,oW:()=>O,t2:()=>Z,tn:()=>c,ze:()=>w});var n=i(51850),r=i(34304);function s(t){let e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function h(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function f(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function p(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function g(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function _(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function x(t,e){let i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function M(t){let e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e=t){let i=e[0],n=e[1],r=e[2],s=i*i+n*n+r*r;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function I(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function T(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2];return t[0]=r*h-s*l,t[1]=s*o-n*h,t[2]=n*l-r*o,t}function P(t,e,i,n){let r=e[0],s=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=s+n*(i[1]-s),t[2]=o+n*(i[2]-o),t}function A(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=i[0]*n+i[4]*r+i[8]*s+i[12],t[1]=i[1]*n+i[5]*r+i[9]*s+i[13],t[2]=i[2]*n+i[6]*r+i[10]*s+i[14],t}function B(t,e,i){let n=e[0],r=e[1],s=e[2];return t[0]=n*i[0]+r*i[3]+s*i[6],t[1]=n*i[1]+r*i[4]+s*i[7],t[2]=n*i[2]+r*i[5]+s*i[8],t}function S(t,e,i){return F(t,e,i[0],i[1],i[2],i[3])}function F(t,e,i,n,r,s){let o=e[0],l=e[1],h=e[2],a=n*h-r*l,u=r*o-i*h,f=i*l-n*o,c=n*f-r*u,d=r*a-i*f,y=i*u-n*a,m=2*s;return t[0]=o+a*m+2*c,t[1]=l+u*m+2*d,t[2]=h+f*m+2*y,t}const C=(0,n.vt)(),R=(0,n.vt)();function Z(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function G(t,e){if(t===e)return!0;let i=t[0],n=t[1],s=t[2],o=e[0],l=e[1],h=e[2],a=(0,r.FD)();return Math.abs(i-o)<=a*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-l)<=a*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-h)<=a*Math.max(1,Math.abs(s),Math.abs(h))}function O(t,e,i){let n=i[0]-e[0],r=i[1]-e[1],s=i[2]-e[2],o=n*n+r*r+s*s;return o>0?(o=1/Math.sqrt(o),t[0]=n*o,t[1]=r*o,t[2]=s*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const j=a,N=u,q=f,Y=_,L=x,X=s,k=M;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:h,angle:function(t,e){v(C,t),v(R,e);let i=I(C,R);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(t,e,i,n,r,s){let o=1-s,l=o*o,h=s*s,a=l*o,u=3*s*l,f=3*h*o,c=h*s;return t[0]=e[0]*a+i[0]*u+n[0]*f+r[0]*c,t[1]=e[1]*a+i[1]*u+n[1]*f+r[1]*c,t[2]=e[2]*a+i[2]*u+n[2]*f+r[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,i=1){return t[0]=Math.min(Math.max(t[0],e),i),t[1]=Math.min(Math.max(t[1],e),i),t[2]=Math.min(Math.max(t[2],e),i),t},copy:o,cross:T,crossAndNormalize:function(t,e,i){let n=e[0],r=e[1],s=e[2],o=i[0],l=i[1],h=i[2],a=r*h-s*l,u=s*o-n*h,f=n*l-r*o,c=Math.sqrt(a*a+u*u+f*f);return t[0]=a/c,t[1]=u/c,t[2]=f/c,t},direction:O,dist:Y,distance:_,div:q,divide:f,dot:I,equals:G,exactEquals:Z,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,i,n,r,s){let o=s*s,l=o*(2*s-3)+1,h=o*(s-2)+s,a=o*(s-1),u=o*(3-2*s);return t[0]=e[0]*l+i[0]*h+n[0]*a+r[0]*u,t[1]=e[1]*l+i[1]*h+n[1]*a+r[1]*u,t[2]=e[2]*l+i[2]*h+n[2]*a+r[2]*u,t},inverse:b,len:X,length:s,lerp:P,max:m,min:y,mul:N,multiply:u,negate:w,normalize:v,random:function(t,e=1){let i=r.Ov,n=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=s*e,t},rotateX:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0],s[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),s[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateY:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),s[1]=r[1],s[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},rotateZ:function(t,e,i,n){let r=[],s=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],s[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),s[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),s[2]=r[2],t[0]=s[0]+i[0],t[1]=s[1]+i[1],t[2]=s[2]+i[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:p,scaleAndAdd:g,scaleTo:function(t,e){return p(t,t,e/X(t))},set:l,sign:d,sqrDist:L,sqrLen:k,squaredDistance:x,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:j,subtract:a,transformMat3:B,transformMat4:A,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:S,transformQuatValues:F},Symbol.toStringTag,{value:"Module"})),i.d(e,["Il",0,X,"jb",0,j,"lo",0,L,"uE",0,k])},75503(t,e,i){i.d(e,{wq:()=>l});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class l{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(),w.prune(),b.prune(),v.prune(),I.prune()}all(t){h(this._data,t)}search(t,e){let i=this._data,n=this._toBBox;if(x(t,i))for(w.clear();i;){for(let r=0,s=i.children.length;r<s;r++){let s=i.children[r],o=i.leaf?n(s):s;x(t,o)&&(i.leaf?e(s):_(t,o)?h(s,e):w.push(s))}i=w.pop()}}collides(t){let e=this._data,i=this._toBBox;if(!x(t,e))return!1;for(w.clear();e;){for(let n=0,r=e.children.length;n<r;n++){let r=e.children[n],s=e.leaf?i(r):r;if(x(t,s)){if(e.leaf||_(t,s))return!0;w.push(r)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),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){let 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 A([]),this}remove(t){if(!t)return this;let e,i=this._data,s=null,o=0,l=!1,h=this._toBBox(t);for(v.clear(),I.clear();i||v.length>0;){if(i||(i=v.pop(),s=v.data[v.length-1],o=I.pop()??0,l=!0),i.leaf&&(e=(0,n.qh)(i.children,(0,r.z)(t),i.children.length,i.indexHint),-1!==e))return i.children.splice(e,1),v.push(i),this._condense(v),this;l||i.leaf||!_(i,h)?s?(o++,i=s.children[o],l=!1):i=null:(v.push(i),I.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,i,n){let r=i-e+1,s=this._maxEntries;if(r<=s){let n=new A(t.slice(e,i+1));return a(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));let o=new B([]);o.height=n;let l=Math.ceil(r/s),h=l*Math.ceil(Math.sqrt(s));M(t,e,i,h,this._compareMinX);for(let r=e;r<=i;r+=h){let e=Math.min(r+h-1,i);M(t,r,e,l,this._compareMinY);for(let i=r;i<=e;i+=l){let r=Math.min(i+l-1,e);o.children.push(this._build(t,i,r,n-1))}}return a(o,this._toBBox),o}_insert(t,e,i){let n=this._toBBox,r=i?t:n(t);v.clear();let s=function(t,e,i,n){for(;n.push(e),!0!==e.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=e.children.length;s<o;s++){let o=e.children[s],l=y(o),h=p(t,o)-l;h<r?(r=h,n=l<n?l:n,i=o):h===r&&l<n&&(n=l,i=o)}e=i||e.children[0]}return e}(r,this._data,e,v);for(s.children.push(t),f(s,r);e>=0&&v.data[e].children.length>this._maxEntries;)this._split(v,e),e--;!function(t,e,i){for(let n=i;n>=0;n--)f(e.data[n],t)}(r,v,e)}_split(t,e){let i=t.data[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);let s=this._chooseSplitIndex(i,r,n);if(!s)return;let o=i.children.splice(s,i.children.length-s),l=i.leaf?new A(o):new B(o);l.height=i.height,a(i,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(i,l)}_splitRoot(t,e){this._data=new B([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,i){let n,r,s;n=r=1/0;for(let o=e;o<=i-e;o++){let e=u(t,0,o,this._toBBox),l=u(t,o,i,this._toBBox),h=g(e,l),a=y(e)+y(l);h<n?(n=h,s=o,r=a<r?a:r):h===n&&a<r&&(r=a,s=o)}return s}_chooseSplitAxis(t,e,i){let n=t.leaf?this._compareMinX:c,r=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);let r=this._toBBox,s=u(t,0,e,r),o=u(t,i-e,i,r),l=m(s)+m(o);for(let n=e;n<i-e;n++){let e=t.children[n];f(s,t.leaf?r(e):e),l+=m(s)}for(let n=i-e-1;n>=e;n--){let e=t.children[n];f(o,t.leaf?r(e):e),l+=m(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let i=t.data[e];if(0===i.children.length)if(e>0){let r=t.data[e-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else a(i,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function h(t,e){let i=t;for(b.clear();i;){if(!0===i.leaf)for(let t of i.children)e((0,r.z)(t));else b.pushArray(i.children);i=b.pop()??null}}function a(t,e){u(t,0,t.children.length,e,t)}function u(t,e,i,n,r){r||=new A([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=e;o<i;o++)s=t.children[o],f(r,t.leaf?n(s):s);return r}function f(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 y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(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){let i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),s=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,i,n,r){let s=[e,i];for(;s.length;){let e=s.pop(),i=s.pop();if(e-i<=n)continue;let l=i+Math.ceil((e-i)/n/2)*n;(0,o.q)(t,l,i,e,r),s.push(i,l,l,e)}}const w=new s.A,b=new s.A,v=new s.A,I=new s.A({deallocator:void 0});class T{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends T{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class B extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},69397(t,e,i){i.d(e,{Qf:()=>l,Qh:()=>s,lM:()=>r});var n=i(34275);function r(t){if(!t)return 0;let e=a;for(let i in t)t.hasOwnProperty(i)&&(e+=o(t[i],!1));return e}function s(t){if(!t)return 0;if("number"==typeof t[0])return l(t);if(Array.isArray(t))return function(t){let e=t.length;if(0===e||"number"==typeof t[0])return h(t,8);let i=u;for(let n=0;n<e;n++)i+=o(t[n]);return i}(t);let e=a;for(let i in t)t.hasOwnProperty(i)&&(e+=o(t[i]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?s(t):a;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...t){return t.reduce((t,e)=>t+(e?(0,n.iu)(e)?e.byteLength+f:Array.isArray(e)?h(e,16):0:0),0)}function h(t,e){return u+t.length*e}const a=32,u=16,f=145},48526(t,e,i){i.d(e,{A:()=>p});var n,r=i(32198),s=i(4576),o=i(4718),l=i(91429),h=i(5443),a=i(91075),u=i(86738),f=i(16930),c=i(90634),d=i(47610),y=i(56993),m=i(43937);let p=n=class extends a.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],e?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=f.A.WGS84,{...t,hasM:i,hasZ:n,points:e,spatialReference:r}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let t=(0,c.ge)(this);return t?new h.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,o.o8)(this.points)}clone(){let{points:t,spatialReference:e,hasM:i,hasZ:r}=this;return new n({points:(0,o.o8)(t),spatialReference:e.clone(),hasM:i,hasZ:r})}equals(t){if(this===t)return!0;if(null==t)return!1;let e=this.spatialReference,i=t.spatialReference;return!(null!=e!=(null!=i)||null!=e&&null!=i&&!e.equals(i))&&(0,s.aI)(this.points,t.points,d.v6)}addPoint(t){return(0,y.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;let e=this.points[t],i={x:e[0],y:e[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=e[2],n=3),this.hasM&&(i.m=e[n]),new u.A(i)}removePoint(t){if(!this._validateInputs(t))return null;let e=new u.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)&&((0,y.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points")),this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,l.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],p.prototype,"points",void 0),(0,r.Cg)([(0,m.K)("points")],p.prototype,"writePoints",null),p=n=(0,r.Cg)([(0,l.$K)("esri.geometry.Multipoint")],p),p.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,i){i.d(e,{A:()=>y});var n,r=i(32198),s=i(4718),o=i(91429),l=i(5443),h=i(91075),a=i(86738),u=i(16930),f=i(90634),c=i(56993),d=i(43937);let y=n=class extends h.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:i,hasZ:n,spatialReference:r}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=u.A.WGS84,{...t,hasM:i,hasZ:n,paths:e,spatialReference:r}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,s.o8)(t)}get extent(){let t=(0,f.Z3)(this),{spatialReference:e}=this;return t?new l.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,s.o8)(this.paths)}addPath(t){if(!t)return;let e=this.paths,i=e.length;if(function(t){return!Array.isArray(t[0])}(t)){let n=[];for(let e=0,i=t.length;e<i;e++)n[e]=t[e].toArray();e[i]=n}else e[i]=t.slice();return this.notifyChange("paths"),this}clone(){let t=new n;return t.spatialReference=this.spatialReference,t.paths=(0,s.o8)(this.paths),t.curvePaths=(0,s.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;let i=this.paths[t][e],n=this.hasZ,r=this.hasM;return n&&!r?new a.A(i[0],i[1],i[2],void 0,this.spatialReference):r&&!n?new a.A(i[0],i[1],void 0,i[2],this.spatialReference):n&&r?new a.A(i[0],i[1],i[2],i[3],this.spatialReference):new a.A(i[0],i[1],this.spatialReference)}insertPoint(t,e,i){return this._validateInputs(t,e,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t].splice(e,0,i),this.notifyChange("paths")),this}removePath(t){if(!this._validateInputs(t,null))return null;let e=this.paths.splice(t,1)[0],i=this.spatialReference,n=e.map(t=>new a.A(t,i));return this.notifyChange("paths"),n}removePoint(t,e){if(!this._validateInputs(t,e))return null;let i=new a.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(t,e,i){return this._validateInputs(t,e)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[t][e]=i,this.notifyChange("paths")),this}_validateInputs(t,e,i=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){let n=this.paths[t];if(i&&(e<0||e>n.length)||!i&&(e<0||e>=n.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],y.prototype,"curvePaths",void 0),(0,r.Cg)([(0,d.K)("curvePaths")],y.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],y.prototype,"paths",void 0),(0,r.Cg)([(0,d.K)("paths")],y.prototype,"writePaths",null),y=n=(0,r.Cg)([(0,o.$K)("esri.geometry.Polyline")],y),y.prototype.toJSON.isDefaultToJSON=!0},4197(t,e,i){i.d(e,{Vj:()=>u,cj:()=>a,jh:()=>s,l5:()=>l,yH:()=>h});var n=i(34275),r=i(9093);function s(t){return t<=1024?Array(t).fill(0):new Float64Array(t)}function o(t){return((0,n.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function l(t,e,i){return Array.isArray(t)?t.slice(e,e+i):t.subarray(e,e+i)}function h(t,e){if(0===e.length)return o(t);if(0===t.length)return o(e);let i=s(t.length+e.length);for(let e=0;e<t.length;++e)i[e]=t[e];for(let n=0;n<e.length;++n)i[t.length+n]=e[n];return i}function a(t){return[...t]}function u(t){let e=(0,r.vt)();for(let i=0;i<16;++i)e[i]=t[i];return e}},6774(t,e,i){i.d(e,{O3:()=>s,Ox:()=>o,bR:()=>n});class n{constructor(t,e){this.x=t,this.y=e}static fromArray(t){return new n(t[0],t[1])}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){return this.x=t,this.y=e,this}normalize(){let t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return this.x/=i,this.y/=i,this}rightPerpendicular(){let t=this.x;return this.x=this.y,this.y=-t,this}leftPerpendicular(){let t=this.x;return this.x=-this.y,this.y=t,this}move(t,e){return this.x+=t,this.y+=e,this}assign(t){return this.x=t.x,this.y=t.y,this}assignAdd(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}assignSub(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}rotate(t,e){let i=this.x,n=this.y;return this.x=i*t-n*e,this.y=i*e+n*t,this}rotateReverse(t,e){let i=this.x,n=this.y;return this.x=i*t+n*e,this.y=-i*e+n*t,this}scale(t){return this.x*=t,this.y*=t,this}length(){let t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}sub(t){return this.x-=t.x,this.y-=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}static distance(t,e){let i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}class r{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class s{constructor(t,e,i,n=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=n,this._pixelMargin=r,this._tileSize=512*n,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;let i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new n(t,e),this._firstPt=new n(t,e),this._dist=0}lineTo(t,e){let i,s,o,l,h,a,u,f,c=this._isIn(t,e),d=new n(t,e),y=n.distance(this._prevPt,d);if(c)this._prevIsIn?this._lineTo(t,e,!0):(i=this._prevPt,s=d,o=this._intersect(s,i),this._start=this._dist+y*(1-this._r),this._lineTo(o.x,o.y,!0),this._lineTo(s.x,s.y,!0));else if(this._prevIsIn)s=this._prevPt,i=d,o=this._intersect(s,i),this._lineTo(o.x,o.y,!0),this._lineTo(i.x,i.y,!1);else{let t=this._prevPt,e=d;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{let i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(l=(this._xmin-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmin,f))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(l=(this._xmax-t.x)/(e.x-t.x),f=t.y+l*(e.y-t.y),f<this._ymin?a=!1:f>this._ymax?a=!0:i.push(new r(l,this._xmax,f))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(l=(this._ymin-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(l=(this._ymax-t.y)/(e.y-t.y),u=t.x+l*(e.x-t.x),u<=this._xmin?h=!1:u>=this._xmax?h=!0:i.push(new r(l,u,this._ymax))),0===i.length)h?a?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):a?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+y*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+y*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=y,this._prevIsIn=c,this._prevPt=d}close(){if(this._line.length>2){let t=this._firstPt,e=this._prevPt;(t.x!==e.x||t.y!==e.y)&&this.lineTo(t.x,t.y);let i=this._line,n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(3===this._type&&t&&l.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(2!==this._type)throw Error("Only valid for lines");this._pushLine();let t=this._lines,e=t.length;if(0===e)return null;let i=[];for(let n=0;n<e;n++)i.push({line:t[n],start:this._starts[n]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,r,s;if(e.x>=this._xmin&&e.x<=this._xmax)r=e.y<=this._ymin?this._ymin:this._ymax,s=(r-t.y)/(e.y-t.y),i=t.x+s*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,s=(i-t.x)/(e.x-t.x),r=t.y+s*(e.y-t.y);else{r=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;let n=(i-t.x)/(e.x-t.x),o=(r-t.y)/(e.y-t.y);n<o?(s=n,r=t.y+n*(e.y-t.y)):(s=o,i=t.x+o*(e.x-t.x))}return this._r=s,new n(i,r)}_pushLine(){this._line&&(1===this._type?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):2===this._type?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):3===this._type&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){3===this._type?(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)),this._isH=!1,this._isV=!1):i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new n(t,e)))}_lineTo(t,e,i){let r,s;if(3!==this._type)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new n(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];let i=r.x===t,o=r.y===e;if(i&&o)return;this._isH&&i||this._isV&&o?(r.x=t,r.y=e,s=this._line[this._line.length-2],s.x===t&&s.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(s=this._line[this._line.length-2],this._isH=s.x===t,this._isV=s.y===e)):(this._isH=s.x===t,this._isV=s.y===e)):(this._line.push(new n(t,e)),this._isH=i,this._isV=o)}else this._line.push(new n(t,e))}}class o{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];let i=this._ratio;this._line.push(new n(t*i,e*i))}lineTo(t,e){let i=this._ratio;this._line.push(new n(t*i,e*i))}close(){let t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}class l{static simplify(t,e,i){if(!i)return;let n=-e,r=t+e,s=-e,o=t+e,h=[],a=[],u=i.length;for(let t=0;t<u;++t){let e=i[t];if(!e||e.length<2)continue;let l,u=e[0],f=e.length;for(let i=1;i<f;++i)l=e[i],u.x===l.x&&(u.x<=n&&(u.y>l.y?(h.push(t),h.push(i),h.push(0),h.push(-1)):(a.push(t),a.push(i),a.push(0),a.push(-1))),u.x>=r&&(u.y<l.y?(h.push(t),h.push(i),h.push(1),h.push(-1)):(a.push(t),a.push(i),a.push(1),a.push(-1)))),u.y===l.y&&(u.y<=s&&(u.x<l.x?(h.push(t),h.push(i),h.push(2),h.push(-1)):(a.push(t),a.push(i),a.push(2),a.push(-1))),u.y>=o&&(u.x>l.x?(h.push(t),h.push(i),h.push(3),h.push(-1)):(a.push(t),a.push(i),a.push(3),a.push(-1)))),u=l}if(0===h.length||0===a.length)return;l.fillParent(i,a,h),l.fillParent(i,h,a);let f=[];l.calcDeltas(f,a,h),l.calcDeltas(f,h,a),l.addDeltas(f,i)}static fillParent(t,e,i){let n=i.length,r=e.length;for(let s=0;s<r;s+=4){let r=e[s],o=e[s+1],l=e[s+2],a=t[r][o-1],u=t[r][o],f=8092,c=-1;for(let e=0;e<n;e+=4){if(i[e+2]!==l)continue;let n=i[e],r=i[e+1],s=t[n][r-1],o=t[n][r];switch(l){case 0:case 1:if(h(a.y,s.y,o.y)&&h(u.y,s.y,o.y)){let t=Math.abs(o.y-s.y);t<f&&(f=t,c=e)}break;case 2:case 3:if(h(a.x,s.x,o.x)&&h(u.x,s.x,o.x)){let t=Math.abs(o.x-s.x);t<f&&(f=t,c=e)}}}e[s+3]=c}}static calcDeltas(t,e,i){let n=e.length;for(let r=0;r<n;r+=4){let n=l.calcDelta(r,e,i,[]);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,n){let r=e[t+3];if(-1===r)return 0;let s=n.length;return s>1&&n[s-2]===r?0:(n.push(r),l.calcDelta(r,i,e,n)+1)}static addDeltas(t,e){let i=t.length,n=0;for(let e=0;e<i;e+=4){let i=t[e+3];i>n&&(n=i)}for(let r=0;r<i;r+=4){let i=e[t[r]],s=t[r+1],o=n-t[r+3];switch(t[r+2]){case 0:i[s-1].x-=o,i[s].x-=o,1===s&&(i[i.length-1].x-=o),s===i.length-1&&(i[0].x-=o);break;case 1:i[s-1].x+=o,i[s].x+=o,1===s&&(i[i.length-1].x+=o),s===i.length-1&&(i[0].x+=o);break;case 2:i[s-1].y-=o,i[s].y-=o,1===s&&(i[i.length-1].y-=o),s===i.length-1&&(i[0].y-=o);break;case 3:i[s-1].y+=o,i[s].y+=o,1===s&&(i[i.length-1].y+=o),s===i.length-1&&(i[0].y+=o)}}}}const h=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},70328(t,e,i){i.d(e,{BI:()=>A,C:()=>o,DC:()=>c,Ej:()=>x,Ie:()=>T,Jt:()=>P,Lu:()=>w,Ne:()=>b,RF:()=>f,TF:()=>g,VL:()=>y,aI:()=>S,fA:()=>l,gE:()=>a,gX:()=>_,hZ:()=>I,iT:()=>d,is:()=>B,pg:()=>M,uJ:()=>p,vI:()=>v,vY:()=>h,vt:()=>s,w1:()=>u,yr:()=>m}),i(35522);var n=i(5443),r=(i(19419),i(4197));function s(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e){for(let i=0;i<6;i++)t[i]=e[i];return t}function l(t,e,i,n,r,o,l=s()){return l[0]=t,l[1]=e,l[2]=i,l[3]=n,l[4]=r,l[5]=o,l}function h(t,e=s()){return function(t,e,i,n=s()){return I(n,F),function(t,e,i=0,n=e.length/3){let r=t[0],s=t[1],o=t[2],l=t[3],h=t[4],a=t[5];for(let t=0;t<n;t++)r=Math.min(r,e[i+3*t]),s=Math.min(s,e[i+3*t+1]),o=Math.min(o,e[i+3*t+2]),l=Math.max(l,e[i+3*t]),h=Math.max(h,e[i+3*t+1]),a=Math.max(a,e[i+3*t+2]);t[0]=r,t[1]=s,t[2]=o,t[3]=l,t[4]=h,t[5]=a}(n,t,e,i),n}(t,0,t.length/3,e)}function a(t,e=(0,r.jh)(24)){let[i,n,s,o,l,h]=t;return e[0]=i,e[1]=n,e[2]=s,e[3]=i,e[4]=n,e[5]=h,e[6]=i,e[7]=l,e[8]=s,e[9]=i,e[10]=l,e[11]=h,e[12]=o,e[13]=n,e[14]=s,e[15]=o,e[16]=n,e[17]=h,e[18]=o,e[19]=l,e[20]=s,e[21]=o,e[22]=l,e[23]=h,e}function u(t,e){return isFinite(t[2])||isFinite(t[5])?new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}):new n.A({xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function f(t,e,i=t){i[0]=Math.min(t[0],e[0]),i[1]=Math.min(t[1],e[1]),i[2]=Math.min(t[2],e[2]),i[3]=Math.max(t[3],e[3]),i[4]=Math.max(t[4],e[4]),i[5]=Math.max(t[5],e[5])}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function d(t,[e,i,n]){!function(t,e,i,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.min(t[2],n),t[3]=Math.max(t[3],e),t[4]=Math.max(t[4],i),t[5]=Math.max(t[5],n)}(t,e,i,n)}function y(t){return t[0]>=t[3]?0:t[3]-t[0]}function m(t){return t[1]>=t[4]?0:t[4]-t[1]}function p(t){return t[2]>=t[5]?0:t[5]-t[2]}function g(t){let e=y(t),i=p(t),n=m(t);return e*e+i*i+n*n}function _(t,e=[0,0,0]){return e[0]=t[0]+y(t)/2,e[1]=t[1]+m(t)/2,e[2]=t[2]+p(t)/2,e}function x(t,e=[0,0,0]){return e[0]=y(t),e[1]=m(t),e[2]=p(t),e}function M(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function w(t,e){return e[0]=t[3],e[1]=t[4],e[2]=t[5],e}function b(t,e,i=t){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i!==t&&(i[3]=t[3],i[4]=t[4],i[5]=t[5]),i}function v(t,e,i=t){return i[3]=e[0],i[4]=e[1],i[5]=e[2],i!==t&&(i[0]=t[0],i[1]=t[1],i[2]=t[2]),t}function I(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}function T(t){return t?I(t,F):s(F)}function P(t,e){return t[0]=e[0],t[1]=e[1],t[2]=-1/0,t[3]=e[2],t[4]=e[3],t[5]=1/0,t}function A(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=-1/0,t[3]=n,t[4]=r,t[5]=1/0,t}function B(t){return 6===t.length}function S(t,e,i){if(null==t||null==e)return t===e;if(!B(t)||!B(e))return!1;if(i){for(let n=0;n<t.length;n++)if(!i(t[n],e[n]))return!1}else for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];s(),i.d(e,["qv",0,F,"v_",0,C])},60408(t,e,i){function n(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function r(t){return void 0!==t.points}function s(t){return void 0!==t.x&&void 0!==t.y}function o(t){return void 0!==t.paths||void 0!==t.curvePaths}function l(t){return void 0!==t.rings||void 0!==t.curveRings}function h(t){return"object"==typeof t&&"vertexAttributes"in t}function a(t){return t?s(t)?"esriGeometryPoint":o(t)?"esriGeometryPolyline":l(t)?"esriGeometryPolygon":n(t)?"esriGeometryEnvelope":r(t)?"esriGeometryMultipoint":null:null}function u(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function f(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}i.d(e,{$B:()=>a,Bi:()=>l,Pv:()=>u,Rg:()=>o,U9:()=>r,W0:()=>f,ZC:()=>n,fT:()=>s,uW:()=>h})},65864(t,e,i){i.d(e,{rS:()=>u,xD:()=>c});var n=i(5443),r=i(91075),s=i(48526),o=i(86738),l=i(39829),h=i(82799),a=i(60408);function u(t){return null==t?null:t instanceof r.A?t:(0,a.fT)(t)?o.A.fromJSON(t):(0,a.Rg)(t)?h.A.fromJSON(t):(0,a.Bi)(t)?l.A.fromJSON(t):(0,a.U9)(t)?s.A.fromJSON(t):(0,a.ZC)(t)?n.A.fromJSON(t):null}const f={esriGeometryPoint:o.A,esriGeometryPolyline:h.A,esriGeometryPolygon:l.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:l.A};function c(t){return t&&f[t]||null}},43334(t,e,i){i.d(e,{N3:()=>l,Om:()=>o});var n=i(69397),r=i(27647),s=i(92722);class o{constructor(t,e,i,n,r=0,s=null,o=null){this.geometry=t,this.attributes=e,this.centroid=i,this.objectId=n,this.displayId=r,this.distance=s,this.vertexCount=o}static fromJSON(t){let e=t.geometry?s.A.fromJSON(t.geometry):null,i=t.centroid?s.A.fromJSON(t.centroid):null,n=t.objectId;return new o(e,t.attributes,i,n,void 0,t.distance,t.vertexCount)}weakClone(){return new o(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new o(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(t){return this.centroid??=(0,r.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(t){return!!t.geometry?.coords?.length}},58512(t,e,i){i.d(e,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let t=new n;return t.globalIdFieldName=this.globalIdFieldName,t.geohashFieldName=this.geohashFieldName,t.geometryProperties=this.geometryProperties,t.geometryType=this.geometryType,t.spatialReference=this.spatialReference,t.hasZ=this.hasZ,t.hasM=this.hasM,t.features=this.features,t.fields=this.fields,t.transform=this.transform,t.exceededTransferLimit=this.exceededTransferLimit,t.uniqueIdField=this.uniqueIdField,t.queryGeometry=this.queryGeometry,t.queryGeometryType=this.queryGeometryType,t}}},92722(t,e,i){i.d(e,{A:()=>r});var n=i(69397);class r{constructor(t=[],e=[],i=!1,n=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:t,coords:e,hasZ:i,hasM:n}){return new r(t,e,i||!1,n||!1)}static fromRect([t,e,i,n]){let s=i-t,o=n-e;return new r([5],[t,e,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let t=0,e=0;for(let i of this.lengths){if(i<3)continue;let{stride:n}=this,r=this.coords[n*e],s=this.coords[n*e+1];for(let o=1;o<i;o+=1){let i=n*(e+o),l=this.coords[i],h=this.coords[i+1];t+=-.5*(l-r)*(h+s),r=l,s=h}e+=i}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);let{stride:i}=this;for(let n of this.lengths){for(let r=0;r<n;r++){let n=i*(e+r);t(this.coords[n],this.coords[n+1])}e+=n}}deltaDecode(){let t=this.clone(),{coords:e,lengths:i}=t,n=0,{stride:r}=this;for(let t of i){for(let i=1;i<t;i++){let t=r*(n+i);e[t]+=e[t-r],e[t+1]+=e[t+1-r]}n+=t}return t}clone(t){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let e=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return t?(t.set(s),new r(e,t,this.hasZ,this.hasM)):new r(e,Array.from(s),this.hasZ,this.hasM)}justXY(){let{stride:t,size:e}=this;if(2===t)return this;let i=Array(e*t);for(let e=0,n=0;e<i.length;e+=t)i[n++]=this.coords[e],i[n++]=this.coords[e+1];return new r(this.lengths,i,!1,!1)}}},27647(t,e,i){i.d(e,{Q:()=>s});var n=i(92722);function r(t,e){return t?e?4:3:e?3:2}function s(t){if(null==t||!t?.lengths.length)return null;let{lengths:e,coords:i,stride:r,hasZ:s,hasM:h}=t,a=new n.A([],[],s,!1),u=a.coords,f=[],c=s?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],d=0;for(let t of e){let e=o(c,i,d,t,s,h);e&&f.push(e),d+=t*r}if(f.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&s&&(i=t[4]-e[4]),i}),f.length){let t=6*f[0][2];u[0]=f[0][0]/t,u[1]=f[0][1]/t,s&&(t=6*f[0][4],u[2]=0===t?0:f[0][3]/t),(u[0]<c[0]||u[0]>c[1]||u[1]<c[2]||u[1]>c[3]||s&&(u[2]<c[4]||u[2]>c[5]))&&(u.length=0)}if(!u.length){let n=t.lengths[0]?l(i,0,e[0],s,h):null;if(!n)return null;u[0]=n[0],u[1]=n[1],s&&(u[2]=n[2]??0)}return a}function o(t,e,i,n,s,o){let l=r(s,o),h=i,a=i+l,u=0,f=0,c=0,d=0,y=0;for(let i=0,r=n-1;i<r;i++,h+=l,a+=l){let i=e[h],n=e[h+1],r=e[h+2],o=e[a],l=e[a+1],m=e[a+2],p=i*l-o*n;d+=p,u+=(i+o)*p,f+=(n+l)*p,s&&(p=i*m-o*r,c+=(r+m)*p,y+=p),i<t[0]&&(t[0]=i),i>t[1]&&(t[1]=i),n<t[2]&&(t[2]=n),n>t[3]&&(t[3]=n),s&&(r<t[4]&&(t[4]=r),r>t[5]&&(t[5]=r))}if(d>0&&(d*=-1),y>0&&(y*=-1),!d)return null;let m=[u,f,.5*d];return s&&(m[3]=c,m[4]=.5*y),m}function l(t,e,i,n,s){let o=r(n,s),l=e,c=e+o,d=0,y=0,m=0,p=0;for(let e=0,r=i-1;e<r;e++,l+=o,c+=o){let e=t[l],i=t[l+1],r=t[l+2],s=t[c],o=t[c+1],g=t[c+2],_=n?a(e,i,r,s,o,g):h(e,i,s,o);if(_)if(d+=_,n){let t=f(e,i,r,s,o,g);y+=_*t[0],m+=_*t[1],p+=_*t[2]}else{let t=u(e,i,s,o);y+=_*t[0],m+=_*t[1]}}return d>0?n?[y/d,m/d,p/d]:[y/d,m/d]:i>0?n?[t[e],t[e+1],t[e+2]]:[t[e],t[e+1]]:null}function h(t,e,i,n){let r=i-t,s=n-e;return Math.sqrt(r*r+s*s)}function a(t,e,i,n,r,s){let o=n-t,l=r-e,h=s-i;return Math.sqrt(o*o+l*l+h*h)}function u(t,e,i,n){return[t+.5*(i-t),e+.5*(n-e)]}function f(t,e,i,n,r,s){return[t+.5*(n-t),e+.5*(r-e),i+.5*(s-i)]}},6518(t,e,i){i.d(e,{F:()=>l});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("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){let t=Array(this._idByBounds.size),e=0;this._idByBounds.forEach((i,n)=>{t[e++]=n}),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;let t=(0,s.Ie)();for(let 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){let 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,i){(function(t){o.minX=t[0],o.minY=t[1],o.maxX=t[2],o.maxY=t[3]})(e),t.search(o,i)}(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){let 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()))}}},83221(t,e,i){i.d(e,{A:()=>d});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),l=i(70328),h=i(19419),a=i(90708),u=i(6518),f=i(37730);const c=(0,l.vt)();class d{constructor(t){this.geometryInfo=t,this._boundsStore=new u.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=f.T}get usedMemory(){return this._usedMemory}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;let[e,i,n,r]=this.fullBounds;return{xmin:e,ymin:i,xmax:n,ymax:r,spatialReference:t}}add(t){this._add(t),this._emitChanged()}addMany(t){for(let e of t)this._add(e);this._emitChanged()}upsertMany(t){let e=t.map(t=>this._upsert(t));return this._emitChanged(),e.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(t){let e=this._featuresById.get(t);return e?(this._remove(e),this._emitChanged(),e):null}removeManyById(t){this._boundsStore.invalidateIndex();for(let e of t){let t=this._featuresById.get(e);t&&this._remove(t)}this._emitChanged()}forEachBounds(t,e){for(let i of t){let t=this._boundsStore.get(i.objectId);t&&e((0,l.Jt)(c,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))})}_emitChanged(){this.events.emit("changed",void 0)}_add(t){if(!t)return;let e=t.objectId;if(null==e)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t}));let i,n=this._featuresById.get(e);n?(t.displayId=n.displayId,i=this._boundsStore.get(e),this._boundsStore.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(t),t.geometry?.coords?.length?(i=(0,a.jQ)(i??(0,h.vt)(),t.geometry),null!=i&&this._boundsStore.set(e,i),this._featuresById.set(e,t),this._usedMemory+=this.estimateFeatureUsedMemory?.(t)??0):(this._boundsStore.set(e,null),this._featuresById.set(e,t))}_upsert(t){let e=t?.objectId;if(null==e)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:t})),null;let i=this._featuresById.get(e);if(!i)return this._add(t),t;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:s}=t;for(let t in s)i.attributes[t]=s[t];return n&&(i.geometry=n,this._boundsStore.set(e,(0,a.jQ)((0,h.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(t){null!=this.onFeatureRemove&&this.onFeatureRemove(t);let e=t.objectId;return this._boundsStore.delete(e),this._featuresById.delete(e),this._usedMemory-=this.estimateFeatureUsedMemory?.(t)??0,t}}},54339(t,e,i){function n(t,e){switch(e.type){case"object-id":case"unique-id-simple":return t.attributes[e.fieldName];case"unique-id-composite":{let i=[];for(let n of e.fieldNames)i.push(t.attributes[n]??null);return JSON.stringify(i)}}}function r(t,e){if("uniqueIdFields"in e&&e.uniqueIdFields?.length){if(1===e.uniqueIdFields.length)return t.attributes?.[e.uniqueIdFields[0]];let i=e.uniqueIdFields.map(e=>t.attributes?.[e]);return JSON.stringify(i)}return"objectIdField"in e&&e.objectIdField?t.attributes?.[e.objectIdField]:null}i.d(e,{W:()=>n,r:()=>r})},37730(t,e,i){var n=i(43334);const r={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,e,i)=>new n.Om(e,t.attributes,null,t.objectId,t.displayId,t.distance,t.vertexCount),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};i.d(e,["T",0,r])},31464(t,e,i){i.d(e,{Cv:()=>d,Nk:()=>c,lK:()=>m});var n=i(4576),r=i(99917),s=i(60408),o=i(21325),l=i(28735);const h=[0,0];function a(t,e){let i=(0,o.K8)(t)?l.je:l.tD;if((0,s.fT)(e)){let t={x:0,y:0};return[t.x,t.y]=i(e.x,e.y,h),null!=e.z&&(t.z=e.z),null!=e.m&&(t.m=e.m),t}if((0,s.ZC)(e)){let t={xmin:0,ymin:0,xmax:0,ymax:0};return[t.xmin,t.ymin]=i(e.xmin,e.ymin,h),[t.xmax,t.ymax]=i(e.xmax,e.ymax,h),e.hasZ&&(t.zmin=e.zmin,t.zmax=e.zmax,t.hasZ=!0),e.hasM&&(t.mmin=e.mmin,t.mmax=e.mmax,t.hasM=!0),t}if((0,s.Bi)(e))return{rings:u(e.rings,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.Rg)(e))return{paths:u(e.paths,i),hasM:e.hasM,hasZ:e.hasZ};if((0,s.U9)(e))return{points:f(e.points,i),hasM:e.hasM,hasZ:e.hasZ};throw Error()}function u(t,e){let i=[];for(let n of t)i.push(f(n,e));return i}function f(t,e){let i=[];for(let n of t){let t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function c(t,e){if(!t||!e)return;let i=Array.isArray(t)?t.map(t=>null==t.geometry?null:t.geometry.spatialReference).filter(n.Ru):[t];await(0,r.initializeProjection)(i.map(t=>({source:t,dest:e})))}function d(t,e,i,n){if(!t)return null;if(i||(i=e,e=t.spatialReference),!(0,o.fn)(e)||!(0,o.fn)(i)||(0,o.aI)(e,i))return t;if((0,l.y7)(e,i)){let e=a(i,t);return e.spatialReference=i,e}let[s]=(0,r.projectMany)([t],e,i,n);return s}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,o.aI)(e,i))return t;let r={geometries:t,inSpatialReference:e,outSpatialReference:i,options:n,resolve:Promise.withResolvers()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;let t=this._jobs.shift();if(!t)return;let e,{geometries:i,inSpatialReference:n,outSpatialReference:s,resolve:o,options:h}=t,u=i.filter(t=>null!=t);e=(0,l.y7)(n,s)&&null==h?.extendedParams?u.map(t=>a(s,t)):(0,r.projectMany)(u,n,s,h);let f=0,c=i.map(t=>null==t?null:e[f++]);o.resolve(c),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(t,e,i,n){return y.push(t,e,i,n)}},90708(t,e,i){i.d(e,{Ap:()=>A,B2:()=>p,DF:()=>b,Di:()=>Z,E2:()=>R,IE:()=>m,Nl:()=>X,PR:()=>T,Rk:()=>U,Ux:()=>O,Ye:()=>S,ZF:()=>q,aQ:()=>V,jH:()=>L,jQ:()=>D,kz:()=>k,oN:()=>G,q3:()=>Y,qN:()=>v,zv:()=>j});var n=i(49186),r=i(53966),s=i(97768),o=i(70328),l=i(19419),h=i(60408),a=i(43334),u=i(58512),f=i(92722),c=i(54339);const d=()=>r.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function m({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function p({scale:t,translate:e},i){return Math.round((e[1]-i)/t[1])}function g({scale:t,translate:e},i){return Math.round((i-e[0])/t[0])}function _({scale:t,translate:e},i){return Math.round((i-e[1])/t[1])}function x({scale:t,translate:e},i,n){return i*t[n]+e[n]}function M(t,e,i){return e&&(t.hasZ=!0),i&&(t.hasM=!0),t}function w(t,e,i,n){if(e&&n&&t!==i)return(e,i,n,r)=>{n[r++]=e[i++],n[r++]=e[i++],t?i++:n[r++]=0,n[r++]=e[i++]??0};let r=+!!i+2+ +!!n,s=r-((!t&&i?1:0)+(!e&&n?1:0));return(t,e,i,n)=>{for(let o=0;o<r;++o)i[n++]=o<s?t[e++]??0:0}}function b(t,e,i){if(!t)return null;let{coords:n,hasZ:r,hasM:s}=t,[o,l]=n,h=r?n[2]:0,a=s?n[+!!r+2]:0;return{x:o,y:l,z:e?h:void 0,m:i?a:void 0}}function v(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{x:n,y:r,z:s,m:o}=t,l=[n,r];return e&&l.push(s??0),i&&l.push(o??0),new f.A([],l,e,i)}function I(t,e,i){if(null==t)return null;let{coords:n,stride:r,hasZ:s,hasM:o}=t,l=w(s,o,e,i),h=[];for(let t=0;t<n.length;t+=r){let e=[];l(n,t,e,0),h.push(e)}return M({points:h},e,i)}function T(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{points:n,hasZ:r,hasM:s}=t,o=new f.A([n.length],[],e,i),{coords:l,stride:a}=o,u=0,c=w(r??!1,s??!1,e,i);for(let t of n)c(t,0,l,u),u+=a;return o}function P(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({paths:u},e,i)}function A(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{paths:n,hasZ:r,hasM:s}=t,o=w(r??!1,s??!1,e,i),l=new f.A([],[],e,i),{lengths:a,coords:u,stride:c}=l,d=0;for(let t of n){for(let e of t)o(e,0,u,d),d+=c;a.push(t.length)}return l}function B(t,e,i){if(!t)return null;let{coords:n,lengths:r,stride:s,hasZ:o,hasM:l}=t,h=0,a=w(o,l,e,i),u=[];for(let t of r){let e=[];for(let i=0;i<t;i++){let t=[];a(n,h,t,0),h+=s,e.push(t)}u.push(e)}return M({rings:u},e,i)}function S(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){let{rings:n,hasZ:r,hasM:s}=t,o=new f.A([],[],e,i),{lengths:l,coords:a,stride:u}=o,c=0,d=w(r??!1,s??!1,e,i);for(let t of n){for(let e of t)d(e,0,a,c),c+=u;l.push(t.length)}return o}const F=[],C=[];function R(t,e,i,n,r){F[0]=t;let[s]=Z(C,F,e,i,n,r);return W(F),W(C),s}function Z(t,e,i,r,s,o){if(W(t),!i){for(let i of e){let e=(0,c.W)(i,o);t.push(new a.Om(null,i.attributes,null,e,void 0,i.distance,i.vertexCount))}return t}switch(i){case"esriGeometryPoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?v(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryMultipoint":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o}=s,l=(0,h.Pv)(e),u=(0,h.W0)(e);t.push(new a.Om(e?T(e,i&&l,n&&u):null,o,null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolyline":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?A(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(t,e,i,n,r){for(let s of e){let{geometry:e,attributes:o,centroid:l}=s,u=(0,h.Pv)(e),f=(0,h.W0)(e);t.push(new a.Om(e?S(e,i&&u,n&&f):null,o,l?v(l,!1,!1):null,(0,c.W)(s,r),s.displayId,s.distance,s.vertexCount))}return t}(t,e,r,s,o);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`)),W(t)}return t}function G(t,e,i,n){C[0]=t,N(F,C,e,i,n);let r=F[0];return W(F),W(C),r}function O(t,e=(0,h.Pv)(t),i=(0,h.W0)(t)){return null==t?null:(0,h.fT)(t)?v(t,e,i):(0,h.Bi)(t)?S(t,e,i):(0,h.Rg)(t)?A(t,e,i):(0,h.U9)(t)?T(t,e,i):void d().error("convertFromGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`))}function j(t,e,i,r){if(null==t)return null;let s="coords"in t?t:t.geometry;if(null==s)return null;switch(e){case"esriGeometryPoint":return b(s,i,r);case"esriGeometryMultipoint":return I(s,i,r);case"esriGeometryPolyline":return P(s,i,r);case"esriGeometryPolygon":return B(s,i,r);default:return d().error("convertToGeometry:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`)),null}}function N(t,e,i,r,s){if(W(t),null==i)return function(t,e){for(let i of e)t.push({attributes:i.attributes});return t}(t,e);switch(i){case"esriGeometryPoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({attributes:s,geometry:b(r,i,n)});return t}(t,e,r,s);case"esriGeometryMultipoint":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&I(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolyline":return function(t,e,i,n){for(let{geometry:r,attributes:s}of e)t.push({geometry:r&&P(r,i,n),attributes:s});return t}(t,e,r,s);case"esriGeometryPolygon":return function(t,e,i,n){for(let{geometry:r,attributes:s,centroid:o}of e){let e=B(r,i,n),l=b(o,!1,!1);t.push(o?{geometry:e,attributes:s,centroid:l}:{geometry:e,attributes:s})}return t}(t,e,r,s);default:d().error("convertToFeatureSet:unknown-geometry",new n.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`))}return t}function q(t){let{spatialReference:e,transform:i,fields:n,hasM:r,hasZ:s,features:o,geometryType:l,exceededTransferLimit:h,queryGeometry:a,queryGeometryType:u}=t,f={features:N([],o,l,s,r),fields:n,geometryType:l,spatialReference:e,queryGeometry:j(a,u,s,r)};return i&&(f.transform=i),h&&(f.exceededTransferLimit=h),r&&(f.hasM=r),s&&(f.hasZ=s),f}function Y(t,e){let i=new u.A,{hasM:n,hasZ:r,features:s,spatialReference:o,geometryType:l,exceededTransferLimit:h,transform:a,fields:f,globalIdFieldName:c}=t;return f&&(i.fields=f),i.geometryType=l??null,i.spatialReference=o??null,s&&Z(i.features,s,l,r,n,e),h&&(i.exceededTransferLimit=h),n&&(i.hasM=n),r&&(i.hasZ=r),a&&(i.transform=a),c&&(i.globalIdFieldName=c),i}function L(t,e){let{geometryType:i,features:n}=e;if(!t)return e;for(let e=0;e<n.length;e++){let r=n[e],s=r.weakClone();s.geometry=X(r.geometry,i,t),s.centroid=X(r.centroid,"esriGeometryPoint",t),n[e]=s}return e.transform=t,e}function X(t,e,i,n,r,s=!1){if(null==t||!t?.coords.length)return null;let o=y[e],{coords:l,lengths:h,stride:a,hasZ:u,hasM:c}=t;n??=u,r??=c;let d=new f.A([],[],n,r),x=d.stride,M=w(u,c,n,r),b=0,v=[0,0,0,0].slice(x),I=s?g:m,T=s?_:p;function P(){M(l,b,v,0),b+=a,v[0]=I(i,v[0]),v[1]=T(i,v[1])}if(t.isPoint)return P(),d.coords.push(...v),d;let A=0;for(let t of h){if(t<o)continue;let e=1;P(),d.coords.push(...v);let[i,n]=v;for(let r=1;r<t;r++){P();let[t,r]=v;(i!==t||n!==r)&&(s||(v[0]-=i,v[1]-=n),d.coords.push(...v),i=t,n=r,e++)}e>=o?(d.lengths.push(e),A=d.coords.length):W(d.coords,A)}return W(d.coords,A),d.coords.length?d:null}function k(t,e,i,n=t.hasZ,r=t.hasM){if(!t.coords.length)return null;let s=y[e],{coords:o,lengths:l,stride:h,hasZ:a,hasM:u}=t,c=new f.A([],[],n,r),d=c.stride,m=w(a,u,n,r);if(t.isPoint)return m(o,0,c.coords,0),c;let p=0,g=i*i;for(let t of l){if(t<s){p+=t*h;continue}let e=c.coords.length/d,i=p,n=p+(t-1)*h;m(o,i,c.coords,c.coords.length),E(c.coords,o,h,g,m,i,n),m(o,n,c.coords,c.coords.length);let r=c.coords.length/d-e;r>=s?c.lengths.push(r):W(c.coords,e*d),p+=t*h}return c.coords.length?c:null}function z(t,e,i,n){let r=t[e],s=t[e+1],o=t[i],l=t[i+1],h=t[n],a=t[n+1],u=o,f=l,c=h-u,d=a-f;if(0!==c||0!==d){let t=((r-u)*c+(s-f)*d)/(c*c+d*d);t>1?(u=h,f=a):t>0&&(u+=c*t,f+=d*t)}return c=r-u,d=s-f,c*c+d*d}function E(t,e,i,n,r,s,o){let l,h=n,a=0;for(let t=s+i;t<o;t+=i)l=z(e,t,s,o),l>h&&(a=t,h=l);h>n&&(a-s>i&&E(t,e,i,n,r,s,a),r(e,a,t,t.length),o-a>i&&E(t,e,i,n,r,a,o))}function D(t,e){if(!e?.coords?.length)return null;let i=1/0,n=1/0,r=-1/0,s=-1/0,{coords:h,stride:a}=e;for(let t=0;t<h.length;t+=a){let e=h[t],o=h[t+1];i=Math.min(i,e),r=Math.max(r,e),n=Math.min(n,o),s=Math.max(s,o)}return(0,o.is)(t)?(0,o.BI)(t,i,n,r,s):(0,l.fA)(i,n,r,s,t),t}function V(t,e){let{coords:i,lengths:n,stride:r,hasZ:o,hasM:l}=t;if(!i.length)return void(n.length=0);(0,s.Lw)(e);let{originPosition:h,scale:a,translate:u}=e,f=$;f.originPosition=h;let c=f.scale;c[0]=a[0]??1,c[1]=-(a[1]??1),c[2]=a[2]??1,c[3]=a[3]??1;let d=f.translate;if(d[0]=u[0]??0,d[1]=u[1]??0,d[2]=u[2]??0,d[3]=u[3]??0,l&&!o&&(c[2]=c[3],d[2]=d[3]),!n.length){for(let t=0;t<r;++t)i[t]=x(f,i[t],t);return void(n.length=0)}let y=0;for(let t=0;t<n.length;t++){let e=n[t];n[t]=e;for(let t=0;t<r;++t)i[y+t]=x(f,i[y+t],t);let s=i[y],o=i[y+1];y+=r;for(let t=1;t<e;t++,y+=r){s+=i[y]*c[0],o+=i[y+1]*c[1],i[y]=s,i[y+1]=o;for(let t=2;t<r;++t)i[y+t]=x(f,i[y+t],t)}}}function J(t,e,i,n){let r=0,s=t[n*e],o=t[n*(e+1)];for(let l=1;l<i;l++){let i=s+t[n*(e+l)],h=o+t[n*(e+l)+1],a=(i-s)*(h+o);s=i,o=h,r+=a}return.5*r}function U(t,e){let{coords:i,lengths:n}=t,r=0,s=0;for(let t=0;t<n.length;t++){let o=n[t];s+=J(i,r,o,e),r+=o}return Math.abs(s)}function W(t,e=0){t.length!==e&&(t.length=e)}const $={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(t,e,i){i.d(e,{BM:()=>T,bd:()=>P,sO:()=>I,xD:()=>f});var n=i(67482),r=i(49186),s=i(21325),o=i(90708),l=i(43334),h=i(92722),a=i(30524);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function f(t){return u[t]}function*c(t){switch(t.type){case"Feature":yield t;break;case"FeatureCollection":for(let e of t.features)e&&(yield e)}}function*d(t){if(t)switch(t.type){case"Point":yield t.coordinates;break;case"LineString":case"MultiPoint":yield*t.coordinates;break;case"MultiLineString":case"Polygon":for(let e of t.coordinates)yield*e;break;case"MultiPolygon":for(let e of t.coordinates)for(let t of e)yield*t}}function y(t){for(let e of t)if(e.length>2)return!0;return!1}function m(t){let e=0;for(let i=0;i<t.length;i++){let n=t[i],r=t[(i+1)%t.length];e+=n[0]*r[1]-r[0]*n[1]}return e<=0}function p(t){let e=t[0],i=t[t.length-1];(e[0]!==i[0]||e[1]!==i[1]||e[2]!==i[2])&&t.push(e)}function g(t,e){let{coordinates:i,type:n}=t,r=e.hasZ??!1;switch(n){case"Point":return new h.A([],[...i],r,!1);case"LineString":return(0,o.Ap)({paths:[i],hasZ:!0},r,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:!0},r,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:!0},r,!1);case"Polygon":case"MultiPolygon":{let t=new h.A([],[],r,!1);for(let e of"Polygon"===n?[i]:i){_(t,e[0],r);for(let i=1;i<e.length;i++)x(t,e[i],r)}return t}}}function _(t,e,i){p(e),function(t){return!m(t)}(e)?w(t,e,i):M(t,e,i)}function x(t,e,i){p(e),function(t){return m(t)}(e)?w(t,e,i):M(t,e,i)}function M(t,e,i){for(let n of e)b(t,n,i);t.lengths.push(e.length)}function w(t,e,i){for(let n=e.length-1;n>=0;n--)b(t,e[n],i);t.lengths.push(e.length)}function b(t,[e,i,n],r){t.coords.push(e,i),r&&t.coords.push(n||0)}function v(t){switch(typeof t){case"string":return(0,n.C)(t)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(t,e=4326){if(!t)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==t.type&&"FeatureCollection"!==t.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:t});let{crs:i}=t;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:e})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${e})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function T(t,e={}){let i,n=[],r=new Set,s=new Set,o=!1,l=null,h=!1,{geometryType:u=null}=e;for(let e of c(t)){let{geometry:t,properties:c,id:m}=e;if((!t||(u||=f(t.type),f(t.type)===u))&&(o||=y(d(t)),h||(h=null!=m,h&&(i=typeof m,c&&(l=Object.keys(c).filter(t=>c[t]===m)))),c&&l&&h&&null!=m&&(l.length>1?l=l.filter(t=>c[t]===m):1===l.length&&(l=c[l[0]]===m?l:[])),c))for(let t in c){if(r.has(t))continue;let e=v(c[t]);if("unknown"===e){s.add(t);continue}s.delete(t),r.add(t);let i=(0,a.rS)(t);i&&n.push({name:i,alias:t,type:e})}}let m=(0,a.rS)(1===l?.length&&l[0]||null)??void 0;if(m)for(let t of n)if(t.name===m&&(0,a.WA)(t)){t.type="esriFieldTypeOID";break}return{fields:n,geometryType:u,hasZ:o,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(s)}}function P(t,e){return Array.from(function*(t,e={}){let{geometryType:i,objectIdField:n}=e;for(let r of t){let{geometry:t,properties:s,id:o}=r;if(t&&f(t.type)!==i)continue;let h,a=s||{};n&&(h=a[n],null!=o&&!h&&(a[n]=h=o)),yield new l.Om(t&&g(t,e),a,null,h)}}(c(t),e))}},14289(t,e,i){i.r(e),i.d(e,{default:()=>B});var n=i(56507),r=i(17676),s=i(19419),o=i(21325),l=i(6774),h=i(90708),a=i(92722),u=i(83221),f=i(31464),c=i(85113);const d=new TextEncoder;class y{constructor(){this._bytes=[]}finish(){return new Uint8Array(this._bytes)}writeBooleanField(t,e){this._writeTag(t,0),this.writeVarint(+!!e)}writeDoubleField(t,e){this._writeTag(t,1);let i=new ArrayBuffer(8);new DataView(i).setFloat64(0,e,!0),this._writeBytes(new Uint8Array(i))}writeMessage(t,e,i){this._writeTag(t,2);let n=this._bytes.length;for(let t=0;t<5;t++)this._bytes.push(0);let r=this._bytes.length;e(i,this),this._writeMessageLength(n,this._bytes.length-r)}writeStringField(t,e){let i=d.encode(e);this._writeTag(t,2),this.writeVarint(i.byteLength),this._writeBytes(i)}writeSVarintField(t,e){this._writeTag(t,0),this.writeVarint(e<0?2*-e-1:2*e)}writeVarint(t){for(;t>127;)this._bytes.push(127&t|128),t=Math.floor(t/128);this._bytes.push(t)}writeVarintField(t,e){this._writeTag(t,0),this.writeVarint(e)}_writeBytes(t){for(let e of t)this._bytes.push(e)}_writeMessageLength(t,e){let i=0;for(;e>127;)this._bytes[t+i++]=127&e|128,e=Math.floor(e/128);this._bytes[t+i++]=e,this._bytes.splice(t+i,5-i)}_writeTag(t,e){this.writeVarint(t<<3|e)}}function m(t,e,i){let n=new y;return n.writeMessage(3,p,{cursor:e,extent:i,keyIndices:new Map,keys:[],name:t,valueIndices:new Map,values:[]}),Uint8Array.from(n.finish()).buffer}function p(t,e){for(e.writeVarintField(15,1),e.writeStringField(1,t.name),e.writeVarintField(5,t.extent);t.cursor.next();)e.writeMessage(2,g,t);for(let i of t.keys)e.writeStringField(3,i);for(let i of t.values)e.writeMessage(4,M,i)}function g(t,e){let i=t.cursor.getId();"number"==typeof i&&e.writeVarintField(1,i),e.writeMessage(2,_,t),e.writeVarintField(3,t.cursor.getType()),e.writeMessage(4,x,t.cursor)}function _(t,e){let i=t.cursor.getAttributes();if(i)for(let n of Object.keys(i)){let r=w(i[n]);if(null==r)continue;let s=t.keyIndices.get(n);s??(s=t.keys.length,t.keyIndices.set(n,s),t.keys.push(n));let o=`${typeof r}:${r}`,l=t.valueIndices.get(o);l??(l=t.values.length,t.valueIndices.set(o,l),t.values.push(r)),e.writeVarint(s),e.writeVarint(l)}}function x(t,e){let i=t.getType(),n=0,r=0;for(let s=0;s<t.getPathCount();s++){let o=t.getPathLength(s),l=1===i?o:1;e.writeVarint(b(1,l));let h=3===i?o-1:o;for(let o=0;o<h;o++){1===o&&1!==i&&e.writeVarint(b(2,h-1));let l=t.getX(s,o),a=t.getY(s,o);e.writeVarint(v(l-n)),e.writeVarint(v(a-r)),n=l,r=a}3===i&&e.writeVarint(b(7,1))}}function M(t,e){"string"==typeof t?e.writeStringField(1,t):"boolean"==typeof t?e.writeBooleanField(7,t):Number.isInteger(t)?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t)}function w(t){return"string"==typeof t||"boolean"==typeof t||"number"==typeof t?t:null==t?null:JSON.stringify(t)??null}function b(t,e){return(e<<3)+(7&t)}function v(t){return t<<1^t>>31}const I=4096,T=20037508.342787,P=2*T,A=[{geometryType:"esriGeometryPolygon",vectorTileGeometryType:3},{geometryType:"esriGeometryPolyline",vectorTileGeometryType:2},{geometryType:"esriGeometryPoint",vectorTileGeometryType:1},{geometryType:"esriGeometryMultipoint",vectorTileGeometryType:1}];class B{constructor(){this._buffer=128,this._featureIds=new Map,this._name="",this._stores=[],this._tolerance=.375}destroy(){for(let{store:t}of this._stores)t.clear();this._featureIds.clear(),this._stores.length=0}async initialize({definition:t,name:e,requestOptions:i},s={}){if(null==t.data)throw Error(`GeoJSON source '${e}' must define a data property.`);if(!0===t.lineMetrics)throw Error("GeoJSON lineMetrics are not supported.");if(t.promoteId&&t.generateId)throw Error("GeoJSON promoteId and generateId cannot be used together.");let o="string"==typeof t.data?(await(0,n.A)(t.data,{...i,responseType:"json",signal:s.signal})).data:t.data;(0,r.Te)(s),(0,c.sO)(o),this.destroy(),this._buffer=t.buffer??128,this._name=e,this._tolerance=t.tolerance??.375;let l=0;for(let{geometryType:e,vectorTileGeometryType:i}of A){let n=(0,c.bd)(o,{geometryType:e,hasZ:!1}),r=S(o,e,t);if(0===n.length)continue;let s=new u.A({geometryType:e,hasM:!1,hasZ:!1}),h=[],a=0;for(let t of n){let i=F(t.geometry,e);i&&(t.objectId=l++,t.geometry=i,this._featureIds.set(t.objectId,r[a++]??null),h.push(t))}h.length>0&&(s.addMany(h),this._stores.push({geometryType:e,store:s,vectorTileGeometryType:i}))}return(0,r.Te)(s),{geometryTypes:["polygon","line","point"].filter(t=>this._stores.some(({vectorTileGeometryType:e})=>e===function(t){switch(t){case"polygon":return 3;case"line":return 2;case"point":return 1}}(t)))}}requestTile({col:t,level:e,row:i},n={}){(0,r.Te)(n);let s=this._getTileFeatures(e,i,t),o=s.length>0?m(this._name,new R(s),I):new ArrayBuffer(0);return(0,r.Te)(n),{result:o,transferList:[o]}}_getTileFeatures(t,e,i){let n=P/2**t,r=i*n-20037508.342787,o=T-e*n,l=n/I,h=this._buffer*l,a=this._tolerance*l,u=[];for(let t of[-40075016.685574,0,P]){let e=(0,s.fA)(r-h-t,o-n-h,r+n+h-t,o+h),i={scale:[l,-l,1,1],translate:[r-t,o,0,0]};for(let{geometryType:t,store:n,vectorTileGeometryType:r}of this._stores)n.forEachInBounds(e,e=>{let n=C(e,t,r,i,a,this._buffer);n&&u.push({attributes:e.attributes,geometry:n,id:this._featureIds.get(e.objectId),type:r})})}return u}}function S(t,e,i){let n=[],r="FeatureCollection"===t.type?t.features:[t];for(let t=0;t<r.length;t++){let s=r[t];if(!s.geometry||(0,c.xD)(s.geometry.type)!==e)continue;let o=i.promoteId?s.properties?.[i.promoteId]:!0===i.generateId?t:s.id;n.push("number"==typeof o||"string"==typeof o?o:null)}return n}function F(t,e){return t?(0,h.Ux)((0,f.Cv)((0,h.zv)(t,e,!1,!1),o.KK,o.ch))??null:null}function C(t,e,i,n,r,s){if(!t.geometry)return null;let o=r>0?(0,h.kz)(t.geometry,e,r,!1,!1):t.geometry;return function(t,e,i){if(!t)return null;let n=new l.O3(0,0,0,8,i/8);if(n.setExtent(I),n.reset(e),1===e)for(let e=0;e<t.size;e++){let i=e*t.stride;n.moveTo(t.coords[i],t.coords[i+1])}else{let i=0;for(let r of t.lengths){n.moveTo(t.coords[i],t.coords[i+1]);for(let e=1;e<r;e++){let r=i+e*t.stride;n.lineTo(t.coords[r],t.coords[r+1])}3===e&&n.close(),i+=r*t.stride}}let r=n.result();if(!r)return null;let s=1===e?[r.length]:r.map(t=>t.length),o=[];for(let t of r)for(let e of t)o.push(e.x,e.y);return new a.A(s,o)}((0,h.Nl)(o,e,n,!1,!1,!0),i,s)}class R{constructor(t){this._features=t,this._index=-1,this._pathOffsets=[]}get _feature(){return this._features[this._index]}destroy(){}getAttributes(){return this._feature.attributes}getId(){return this._feature.id}getPathCount(){return 1===this._feature.type?1:this._feature.geometry.lengths.length}getPathLength(t){return 1===this._feature.type?this._feature.geometry.size:this._feature.geometry.lengths[t]}getType(){return this._feature.type}getX(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)]}getY(t,e){return this._feature.geometry.coords[this._getCoordinateIndex(t,e)+1]}next(){return!(++this._index>=this._features.length||(this._pathOffsets=function(t){let e=Array(t.lengths.length),i=0;for(let n=0;n<t.lengths.length;n++)e[n]=i,i+=t.lengths[n];return e}(this._feature.geometry),0))}_getCoordinateIndex(t,e){return(1===this._feature.type?e:this._pathOffsets[t]+e)*this._feature.geometry.stride}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[858,8477],{30858(t,e,n){n.d(e,{Dk:()=>m,aK:()=>v,yr:()=>j,jH:()=>L,oW:()=>w});var s=n(64336),o=n(59231);var r=n(58933),a=n(49411),c=n(44613);const i="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),l=new Set(i),h="en",p={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},u={},g=async(t,e)=>{const n=`${e}${t}.json`;try{const t=await fetch(n);if(t.ok)return await t.json()}catch(t){return(0,c.Rm)("error","intl",`An unknown error occurred while fetching localization strings at ${n}`,{detail:{error:t}}),{}}return t===h?{}:await g(h,e)},b=t=>{const[e,n]=t.split("-"),s=e.toLowerCase();let o=s;return n&&(o=`${s}-${n.toUpperCase()}`),o=p[o]??o,l.has(o)?o:n?b(s):h},d=t=>{const e=(0,a.Zj)(t,"lang",globalThis.navigator?.language||"en");return{lang:e,t9nLocale:b(e)}},m=t=>x(void 0,t),v=t=>e=>x(e,t);class f extends s.C{constructor(t,e){super(t);const n=this.exports;try{(0,o.s)(this.component);const t=e(this.component,this),s=this.exports!==n;if((0,o.i)(t)){s||this.setProvisionalExports(t);const e=t.then(t=>{this.exports=t,super.catchUpLifecycle()}).catch(t=>{this.P.reject(t)});this.onLoad(async()=>await e)}else s&&void 0===t||(this.exports=t),queueMicrotask(()=>super.catchUpLifecycle())}catch(t){this.P.reject(t)}}catchUpLifecycle(){}}const x=(k=f,(...t)=>{const e=(0,o.b)(),n=new k(...t),r=n.exports;(0,o.a)(e.at(-1));const a=n.component.manager;a.W(n,r),n.watchExports(a.W.bind(a,n)),(0,o.f)(n);const c=[n.component,...e].reverse();return(0,s.a)(c,t=>void 0===t?void 0:((t,{host:e,key:n,isReactive:s},r)=>{const a=e,c=a[n]!==t.exports,i=a[n]!==r,l=r!==t.exports;if(c&&!i&&l&&(a[n]=t.exports),e===t.component){if(s){const e=t.component.manager;i&&e.W(t,a[n]),t.onUpdate(s=>{if(s.has(n)){const s=a[n];s!==t.exports&&e.W(t,s)}})}t.O=s?void 0:n}const h=t.component.constructor.elementProperties.get(n)?.readOnly;t.watchExports(()=>{a[n]!==t.exports&&(h?(0,o.c)(()=>{a[n]=t.exports}):a[n]=t.exports)})})(n,t,r),r)});var k;const w=(t,e)=>new y(t,e);class y extends s.C{#t;#e;#n;constructor(t,e){super(),r.S$||(this.#e=t,this.#n=e,this.#t=new MutationObserver(n=>{n.forEach(n=>{t.includes(n.attributeName)&&e.call(this.component,this.component.el.getAttribute(n.attributeName),n.oldValue,n.attributeName)})}))}hostConnected(){this.#e.forEach(t=>{this.component.el.hasAttribute(t)&&this.#n.call(this.component,this.component.el.getAttribute(t),null,t)}),this.#t.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#e})}hostDisconnected(){this.#t.disconnect()}}const L=()=>m((t,e)=>{e.exports="ltr",e.onLifecycle(()=>{const n=()=>{const n=(0,a.Zj)(t.el,"dir","ltr");e.exports="rtl"===n?"rtl":"ltr"};return n(),(0,a.Yt)(t.el,["dir"],n)})}),j=t=>(e={})=>m((n,s)=>{const o=d(n.el),r={_lang:o.lang,_t9nLocale:o.t9nLocale,_loading:!0},i=n;s.onLifecycle(()=>((e,o,r,h)=>{let p;const b=()=>(async(t,e,n=t.localName.split("-").slice(1).join("-"))=>{const{lang:s,t9nLocale:o}=d(t),r=`${e}/${n}/t9n`,a=null===n?{}:await(async(t,e,n="")=>{const s=`${e}/${n}`,o=`${s}${t}.json`;return u[o]??=g(t,s),await u[o]})(o,r,"messages.");return{lang:s,t9nLocale:o,t9nStrings:a}})(e,t("./assets"),h).then(t=>{p?.lang===t.lang&&p.t9nLocale===t.t9nLocale&&p.t9nStrings===t.t9nStrings||(({t9nLocale:t,t9nStrings:e,lang:o})=>{const r={...e,_lang:o,_t9nLocale:t,_loading:!1};s.exports=r;const a=e.componentLabel;"string"==typeof a&&"label"in n&&null==n.label&&(n.label??=a),l(i.messageOverrides)})(t),p=t}).catch(t=>{(0,c.Rm)("error","intl","Error updating component locale state",{detail:{error:t}})});return queueMicrotask(b),(0,a.Yt)(e,["lang"],b)})(n.el,0,0,e.name));const l=t=>{const e=s.exports,n=e._original??e,o=$(n,t);t&&(o._original=n),s.exports=o};return"messageOverrides"in i&&s.onUpdate(t=>{t.has("messageOverrides")&&l(i.messageOverrides)}),e.blocking?(s.setProvisionalExports(r,!1),s.ready):r}),$=(t,e)=>{if(!e)return t;const n={...t};return Object.entries(e).forEach(([e,s])=>{void 0!==t[e]&&(n[e]="object"==typeof s?$(t[e],s):s??t[e])}),n}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429(e,a,t){t.d(a,{v:()=>n});var r=t(7861);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){let t=this._serviceMetadatas.get(e);if(t)return t;let n=await(0,r.L)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){let{id:a}=e;if(!a)return null;let{_itemDatas:t}=this;if(t.has(a))return t.get(a);let r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){let t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009(e,a,t){t.d(a,{L:()=>o});var r=t(70333),n=t(56507),l=t(49186),s=t(17676),i=t(60694),u=t(20655),c=t(80812);async function o(e,a){let t=(0,i.qg)(e);if(!t)throw new l.A("invalid-url","Invalid scene service url");let o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){let a=(await y(e)).serviceItemId;if(!a)return null;let t=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){let a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;let t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{let a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(t.portal=new u.A({url:l}));try{return await t.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(o),null==o.sceneLayerItem)return f(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);let m=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{let t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;let r=new c.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,s.QP)(e),null}}(o);if(!m?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=m;let d=await f(m.url,o);return d.portalItem=m,d}async function y(e){if(e.rootDocument)return e.rootDocument;let a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{e.rootDocument=(await(0,n.A)(e.sceneServerUrl,a)).data}catch{e.rootDocument={}}return e.rootDocument}async function f(e,a){let t=(0,i.qg)(e);if(!t)throw new l.A("invalid-feature-service-url","Invalid feature service url");let r=t.url.path,s=a.layerId;if(null==s)return{serverUrl:r};let u=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,f=e=>{let t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},m=f("anonymous").catch(()=>f("no-prompt")),[d,L]=await Promise.all([m,u]),p=L?.layers,w=d.data&&d.data.layers;if(!Array.isArray(w))throw Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,w.length);e++)if(p[e].id===s)return{serverUrl:r,layerId:w[e].id}}else if(null!=s&&s<w.length)return{serverUrl:r,layerId:w[s].id};throw Error("could not find matching associated sublayer")}},23154(e,a,t){t.d(a,{A6:()=>i,Aq:()=>L,Jo:()=>d,QM:()=>s});var r=t(77548),n=t(7861);const l=new Set(["Annotation Layer","Catalog Layer","Dimension Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){let{serviceJSON:t,layersJSON:r,...n}=await i(e,a);o(t);let l={serviceJSON:t,...n};return r&&(o(r),l.layersJSON=r),l}async function i(e,a){let{loadContext:t,...l}=a||{},s=t?await t.fetchServiceMetadata(e,l):await(0,n.L)(e,l),i=(0,r.G$)();m(s);let u={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return u;let c=`${(0,r.$x)()??e}/layers`,o=t?await t.fetchServiceMetadata(c,l):await(0,n.L)(c,l);return m(o),u.layersJSON={layers:o.layers,tables:o.tables},u}function u(e){return l.has(e.type)}function c(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(u),e.tables=e.tables?.filter(c)}function y(e){e.type||="Feature Layer"}function f(e){e.type||="Table"}function m(e){e.layers?.forEach(y),e.tables?.forEach(f)}function d(e){if(!e)return"FeatureLayer";switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"DimensionFeatureLayer";case"Annotation Layer":return"AnnotationFeatureLayer"}return null}function L(e,a){if(!e)return a?"Table":"ArcGISFeatureLayer";switch(e){case"Annotation Layer":return"ArcGISAnnotationLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"ArcGISDimensionLayer";case"Feature Layer":return"ArcGISFeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Parcel Layer":return"ParcelLayer";case"Table":return"Table";case"Topology Layer":return"TopologyLayer";case"Trace Network Layer":return"TraceNetworkLayer";case"Utility Network Layer":return"UtilityNetworkLayer";default:return null}}},2976(e,a,t){const r={AnnotationFeatureLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(2889),t.e(4674),t.e(7283),t.e(7537)]).then(()=>t(20737))).default,BingMapsLayer:async()=>(await Promise.all([t.e(8278),t.e(7865),t.e(6554),t.e(6684)]).then(()=>t(17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(7005),t.e(9480),t.e(6377),t.e(9389)]).then(()=>t(82411))).default,CSVLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(4718)]).then(()=>t(68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(8247),t.e(4674),t.e(893),t.e(7283),t.e(7013),t.e(2522),t.e(3312)]).then(()=>t(83508))).default,DimensionFeatureLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(2889),t.e(4674),t.e(7283),t.e(8361)]).then(()=>t(25077))).default,DimensionLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(3813)]).then(()=>t(71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9953),t.e(8732),t.e(3483)]).then(()=>t(38732))).default,FeatureLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(5853)]).then(()=>t(18589))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9177),t.e(6475)]).then(()=>t(36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(3864)]).then(()=>t(15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(9657)]).then(()=>t(63201))).default,GroupLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6569)]).then(()=>t(85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(893),t.e(7074),t.e(9800),t.e(7772),t.e(8768)]).then(()=>t(87772))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7074),t.e(2754),t.e(9800),t.e(9235),t.e(3500),t.e(1003),t.e(2806),t.e(7870)]).then(()=>t(90124))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9953),t.e(9177),t.e(6451),t.e(9229)]).then(()=>t(61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9953),t.e(7552),t.e(1843),t.e(7005),t.e(9480),t.e(9177),t.e(8197),t.e(6451),t.e(3527)]).then(()=>t(49013))).default,KMLLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(1722),t.e(1214),t.e(6854),t.e(8441)]).then(()=>t(162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(9696),t.e(8245),t.e(7173),t.e(3902),t.e(4934),t.e(8692)]).then(()=>t(28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(1588),t.e(9695)]).then(()=>t(49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(9696),t.e(8245),t.e(7173),t.e(3902),t.e(4934),t.e(3309)]).then(()=>t(93309))).default,MapImageLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(4674),t.e(893),t.e(6884),t.e(2241)]).then(()=>t(7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(7173),t.e(4403)]).then(()=>t(96299))).default,MediaLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(9894),t.e(2491)]).then(()=>t(90182))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(6377),t.e(9908),t.e(8118)]).then(()=>t(65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(7269),t.e(349)]).then(()=>t(40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(4051),t.e(931)]).then(()=>t(16852))).default,ParquetLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(3819),t.e(5952),t.e(2156)]).then(()=>t(99680))).default,PointCloudLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(2869),t.e(7984),t.e(7885)]).then(()=>t(77885))).default,RouteLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(1722),t.e(1214),t.e(6854),t.e(9385)]).then(()=>t(39622))).default,SceneLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(7005),t.e(9480),t.e(6377),t.e(4844)]).then(()=>t(2e4))).default,SketchLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(7173),t.e(4152)]).then(()=>t(15056))).default,StreamLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8686)]).then(()=>t(79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(2889),t.e(8247),t.e(4674),t.e(7283),t.e(4780)]).then(()=>t(97483))).default,TileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(4674),t.e(893),t.e(6884),t.e(6811)]).then(()=>t(71756))).default,UnknownLayer:async()=>(await Promise.all([t.e(9917),t.e(146)]).then(()=>t(146))).default,UnsupportedLayer:async()=>(await Promise.all([t.e(9917),t.e(5165)]).then(()=>t(45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(9953),t.e(5228),t.e(7499),t.e(9260)]).then(()=>t(50638))).default,VideoLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(3910),t.e(5128),t.e(4674),t.e(9894),t.e(6875)]).then(()=>t(86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(1588),t.e(6650)]).then(()=>t(96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(2869),t.e(167)]).then(()=>t(90167))).default,WCSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7074),t.e(2754),t.e(9800),t.e(9235),t.e(3500),t.e(2806),t.e(2061)]).then(()=>t(20521))).default,WFSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(5688)]).then(()=>t(21901))).default,WMSLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(1904)]).then(()=>t(51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(7269),t.e(309)]).then(()=>t(20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(7269)]).then(()=>t(47314))).default};t.d(a,["U",0,r])},66964(e,a,t){t.d(a,{Ju:()=>w,K8:()=>g,XH:()=>h,Y5:()=>p,_r:()=>i,bO:()=>c,l:()=>P,nu:()=>v,pJ:()=>o,rc:()=>y});var r=t(60694),n=t(92009),l=t(23154),s=t(77548);function i(e,a){let{id:t,name:r}=e,n={id:t,name:r};return u(n,e,a),n}function u(e,a,t){let r=(0,l.Aq)(a.type,t);r&&(e.layerType=r)}async function c(e,a,t){let r,n;if(function(e){return!!e&&Array.isArray(e.layers)&&Array.isArray(e.tables)}(e)&&f(e))n=e;else{let l=await t.fetchServiceMetadata(a,{customParameters:o(e)?.customParameters});r=(0,s.G$)(),n=m(e,l),d(n,l)}return L(n),{data:n,preferredHost:r}}function o(e){if(!e)return null;let{layers:a,tables:t}=e;return a?.[0]??t?.[0]??null}function y(e,a){return null==a?null:[...e.layers??[],...e.tables??[]].find(e=>e.id===a)}function f(e){return[...e.layers??[],...e.tables??[]].every(e=>!!e.layerType)}function m(e,a){return{...e,layers:e?.layers??a.layers?.map(e=>i(e))??[],tables:e?.tables??a.tables?.map(e=>i(e,!0))??[]}}function d(e,a){let t=e.layers??[],r=e.tables??[],n=[...a.layers??[],...a.tables??[]];for(let e of[...t,...r]){let{id:a,layerType:t}=e;if(t)continue;let l=n.find(({id:e})=>e===a);l&&u(e,l,r.includes(e))}}function L(e){e.layers=e.layers?.filter(I),e.tables=e.tables?.filter(I)}async function p(e,a,t){if(e?.layers?.length||e?.tables?.length){if(!f(e)){let n=(0,r.qg)(a)?.url.path;if(!n)return;d(e,await t.fetchServiceMetadata(n,{customParameters:o(e)?.customParameters}))}L(e)}}function w(e,a){return[...e.layers??[],...e.tables??[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function h(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}const S=new Set(["ArcGISAnnotationLayer","ArcGISDimensionLayer","ArcGISFeatureLayer","CatalogLayer","OrientedImageryLayer","SubtypeGroupLayer","SubtypeGroupTable","Table"]);function I(e){return!!e.layerType&&S.has(e.layerType)}function P(e){switch(e){case"annotation-feature":return["ArcGISAnnotationLayer"];case"catalog":return["CatalogLayer"];case"dimension-feature":return["ArcGISDimensionLayer"];case"feature":return["ArcGISFeatureLayer","Table"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function g(e){switch(e){case"ArcGISAnnotationLayer":return"AnnotationFeatureLayer";case"ArcGISDimensionLayer":return"DimensionFeatureLayer";case"ArcGISFeatureLayer":case"Table":return"FeatureLayer";case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return null}async function v(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){let r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(e=>i(e))}let{serverUrl:r,portalItem:l}=await(0,n.L)(e.url,{sceneLayerItem:e,customParameters:o(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==r)return a.tables=[],a;if(!a.tables&&l){let e=await l.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(({id:e,name:a})=>({id:e,name:a}));else{let n=await t.fetchServiceMetadata(r,{customParameters:o(e)?.customParameters}).catch(()=>null);a.tables=n?.tables?.map(e=>i(e,!0))}}if(a.tables)for(let e of a.tables)e.url=`${r}/${e.id}`;return a}},10407(e,a,t){t.d(a,{It:()=>m,LG:()=>s,OM:()=>c,Sm:()=>o,Y:()=>i,bK:()=>u,sQ:()=>y});var r=t(99917),n=t(16930),l=t(28735);function s(e,a){if(!i(e,a)){let t=e.typeKeywords;t?t.push(a):e.typeKeywords=[a]}}function i(e,a){return!!e.typeKeywords?.includes(a)}function u(e){return i(e,f.HOSTED_SERVICE)}function c(e,a){let t=e.typeKeywords;if(t){let e=t.indexOf(a);e>-1&&t.splice(e,1)}}function o(e,a,t){t?s(e,a):c(e,a)}async function y(e){let a,t=e.clone().normalize();if(t.length>1)for(let e of t)a?e.width>a.width&&(a=e):a=e;else a=t[0];return async function(e){let a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,l.ci)(e);let t=n.A.WGS84;return await(0,r.initializeProjection)(a,t),(0,r.project)(e,t)}(a)}const f={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function m(e){let{portal:a,isOrgItem:t,itemControl:r}=e,n=a.user?.privileges,l=!n||n.includes("features:user:edit"),s=!!t&&!!n?.includes("features:user:fullEdit"),i="update"===r||"admin"===r;return i?s=l=!0:s&&(l=!0),{features:{edit:l,fullEdit:s},content:{updateItem:i}}}t.d(a,["mm",0,f])},45613(e,a,t){t.d(a,{fromItem:()=>m,n:()=>d});var r=t(49186),n=t(44208),l=t(92009),s=t(23154),i=t(22429),u=t(2976),c=t(77548),o=t(80812),y=t(66964),f=t(10407);async function m(e){let{portalItem:a}=e;a&&!(a instanceof o.default)&&(a=new o.default(a));let t=await async function(e){return await e.load(),async function(e){let a=e.className,t=u.U[a];return{constructor:await t(),properties:e.properties}}(await d(e,new i.v))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:e.typeKeywords.includes("GaussianSplat")?{className:"GaussianSplatLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();let a=(0,f.Y)(e,"Map Notes"),t=(0,f.Y)(e,"Markup");if(a||t)return{className:(0,n.A)("sketch-layer-enabled")?"SketchLayer":"MapNotesLayer"};if((0,f.Y)(e,"Route Layer"))return{className:"RouteLayer"};let r=await e.fetchData();return 1===(0,y.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){let t=await L(e,a);if("object"==typeof t){let{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();let t=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};let r=(await a.fetchItemData(e))?.layerType;if("ArcGISTiledImageServiceLayer"===r)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===r)return{className:"ImageryLayer"};let n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),l=n.cacheType?.toLowerCase(),s=n.capabilities?.toLowerCase().includes("tilesonly"),i=n.tileInfo?.format?.toLowerCase()??"",u=null==l&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===l||u||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){let{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Parquet Feature Layer":return{className:"ParquetLayer"};case"Scene Service":return async function(e,a){let t=await L(e,a,async()=>{try{if(!e.url)return[];let{serverUrl:t}=await(0,l.L)(e.url,{sceneLayerItem:e});return(await a.fetchServiceMetadata(t))?.tables??[]}catch{return[]}});if("object"==typeof t){let r,n={};if(null==t.id?r=e.url:(n.layerId=t.id,r=`${e.url}/layers/${t.id}`),e.typeKeywords?.length)for(let a of Object.keys(c.XX))if(e.typeKeywords.includes(a))return{className:c.XX[a]};let l=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,e=>(0,y.pJ)(e)?.customParameters)});return{className:c.XX[l?.layerType]||"SceneLayer",properties:n}}return!1===t&&"Voxel"===(await a.fetchServiceMetadata(e.url))?.layerType?{className:"VoxelLayer"}:{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await L(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function L(e,a,t){let{url:n,type:l}=e,i="Feature Service"===l;if(!n)return{};if(/\/\d+$/.test(n)){if(i){let t=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,y.pJ)(e)?.customParameters)});(0,c.Gh)(e,(0,c.G$)());let{id:l,type:i}=t,u=(0,s.Jo)(i);if(!u)throw new r.A("from-portal-item:unsupported",`'${n}' has unsupported type: '${i}'`);return{id:l,className:u,sourceJSON:t}}return{}}if("Video Service"===l)return!(((await a.fetchServiceMetadata(n)).layers?.length??0)>1)&&{};await e.load();let u=await a.fetchItemData(e);if(i){let{data:t,preferredHost:l}=await(0,y.bO)(u,n,a);if(0===(0,y.XH)(t))throw new r.A("from-portal-item:no-data",`The feature service '${n}' does not have any supported layers or tables`);(0,c.Gh)(e,l);let s=p(t);if("object"==typeof s){let e=(0,y.rc)(t,s.id);return{id:s.id,className:(0,y.K8)(e?.layerType)}}return s}if("Scene Service"===l&&(u=await(0,y.nu)(e,u,a)),(0,y.XH)(u)>0)return p(u);let o=await a.fetchServiceMetadata(n);return t&&(o.tables=await t()),p(o)}function p(e){return 1===(0,y.XH)(e)&&{id:(0,y.pJ)(e)?.id}}},7861(e,a,t){t.d(a,{L:()=>n});var r=t(56507);async function n(e,a){return(await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{2272(e,t,i){i.d(t,{Dl:()=>a,gf:()=>d,jV:()=>u,lF:()=>f});var n=i(92602),r=i(70333),s=i(4718),o=i(84952),l=i(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function f(e,t,i){let n={};for(let r in e){if("declaredClass"===r)continue;let s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))n[r]=s.map(e=>f(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(i?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?s:JSON.stringify(s);else n[r]=s}return n}async function d(e,t,s){return function(e,t){return e?t&&(0,l.Qc)(e)?t:(0,l.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t)||(!r.id&&n.A.request.useIdentity&&await Promise.all([i.e(6361),i.e(7644),i.e(7715)]).then(()=>i(50148)),(await r.id.getCredential(e,s))?.token)}},32186(e,t,i){i.r(t),i.d(t,{deleteForwardEdits:()=>o});var n=i(56507),r=i(49186),s=i(2272);async function o(e,t,i,o){if(!t)throw new r.A("post:missing-guid","guid for version is missing");let l=(0,s.Dl)(e),u=i.toJSON(),a=(0,s.jV)(l.query,{query:(0,s.lF)({...u,f:"json"}),...o,method:"post"});t.startsWith("{")&&(t=t.slice(1,-1));let f=`${l.path}/versions/${t}/deleteForwardEdits`,{data:d}=await(0,n.A)(f,a);return d}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2186],{2272(e,t,i){i.d(t,{Dl:()=>a,gf:()=>d,jV:()=>u,lF:()=>f});var n=i(92602),r=i(70333),s=i(4718),o=i(84952),l=i(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.An)(e):(0,s.o8)(e)}function f(e,t,i){let n={};for(let r in e){if("declaredClass"===r)continue;let s=e[r];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))n[r]=s.map(e=>f(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(i?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?s:JSON.stringify(s);else n[r]=s}return n}async function d(e,t,s){return function(e,t){return e?t&&(0,l.Qc)(e)?t:(0,l.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t)||(!r.id&&n.A.request.useIdentity&&await Promise.all([i.e(6361),i.e(7644),i.e(3713)]).then(()=>i(50148)),(await r.id.getCredential(e,s))?.token)}},32186(e,t,i){i.r(t),i.d(t,{deleteForwardEdits:()=>o});var n=i(56507),r=i(49186),s=i(2272);async function o(e,t,i,o){if(!t)throw new r.A("post:missing-guid","guid for version is missing");let l=(0,s.Dl)(e),u=i.toJSON(),a=(0,s.jV)(l.query,{query:(0,s.lF)({...u,f:"json"}),...o,method:"post"});t.startsWith("{")&&(t=t.slice(1,-1));let f=`${l.path}/versions/${t}/deleteForwardEdits`,{data:d}=await(0,n.A)(f,a);return d}}}]);