@arcgis/core 4.34.0-next.16 → 4.34.0-next.18

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 (171) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/analysis/DimensionAnalysis.js +1 -1
  4. package/analysis/DimensionSimpleStyle.js +1 -1
  5. package/analysis/DirectLineMeasurementAnalysis.js +1 -1
  6. package/analysis/LengthDimension.js +1 -1
  7. package/analysis/LineOfSightAnalysis.js +1 -1
  8. package/analysis/SliceAnalysis.js +1 -1
  9. package/analysis/SlicePlane.js +1 -1
  10. package/analysis/ViewshedAnalysis.js +1 -1
  11. package/assets/esri/core/workers/RemoteClient.js +1 -1
  12. package/assets/esri/core/workers/chunks/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
  13. package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
  14. package/assets/esri/core/workers/chunks/{58f403f956b7b3467344.js → 42da01bd3f401a017c0f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4325fdd96d9ea344132e.js +1 -0
  16. package/assets/esri/core/workers/chunks/{a6bcae413e62cd879b46.js → 5859e425c9bca96b6c80.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5bfccd5dffda74740aa4.js +1 -0
  18. package/assets/esri/core/workers/chunks/68374cf42a069436830d.js +1 -0
  19. package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
  20. package/assets/esri/core/workers/chunks/85753105268aeff84e69.js +1 -0
  21. package/assets/esri/core/workers/chunks/{2990145d7ac3af0d68be.js → 8599df135928d73da4a3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
  23. package/assets/esri/core/workers/chunks/872f151a3a2bc9052be0.js +1 -0
  24. package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
  25. package/assets/esri/core/workers/chunks/974c6b0e3a1f1dd523fa.js +1 -0
  26. package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
  28. package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
  29. package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
  30. package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/aeabe203da7bcdd580cf.js +1 -0
  32. package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
  33. package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
  34. package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
  35. package/assets/esri/core/workers/chunks/{243eb8a317333ec2715b.js → f3e179b48bca50c94538.js} +1 -1
  36. package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
  37. package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_Legend.scss +2 -0
  39. package/assets/esri/themes/dark/main.css +1 -1
  40. package/assets/esri/themes/light/main.css +1 -1
  41. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  42. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  43. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  63. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  67. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  68. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  69. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  70. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  71. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  72. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  73. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  74. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  76. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  77. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  78. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  79. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  80. package/chunks/sphere.js +1 -1
  81. package/config.js +1 -1
  82. package/core/accessorSupport/trackingUtils.js +1 -1
  83. package/core/arrayUtils.js +1 -1
  84. package/core/sql.js +1 -1
  85. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  86. package/geometry/support/sphere.js +1 -1
  87. package/interfaces.d.ts +60 -43
  88. package/kernel.js +1 -1
  89. package/layers/FeatureLayer.js +1 -1
  90. package/layers/SubtypeGroupLayer.js +1 -1
  91. package/layers/VectorTileLayer.js +1 -1
  92. package/layers/VideoLayer.js +1 -1
  93. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  94. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  95. package/layers/orientedImagery/core/utils.js +1 -1
  96. package/layers/orientedImagery/transformations/updateElevation.js +1 -1
  97. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  98. package/layers/orientedImagery/transformations/utils.js +1 -1
  99. package/layers/support/SubtypeSublayer.js +1 -1
  100. package/layers/support/TitleCreator.js +1 -1
  101. package/layers/support/fieldUtils.js +1 -1
  102. package/layers/video/VideoCameraSensorModel.js +1 -1
  103. package/layers/video/VideoController.js +1 -1
  104. package/networks/UtilityNetwork.js +1 -1
  105. package/package.json +1 -1
  106. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  107. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  108. package/rest/knowledgeGraphService.js +1 -1
  109. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  110. package/support/revision.js +1 -1
  111. package/symbols/support/jsonUtils.js +1 -1
  112. package/symbols/support/previewCIMSymbol.js +1 -1
  113. package/symbols/support/previewSymbol2D.js +1 -1
  114. package/symbols/support/svgUtils.js +1 -1
  115. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  117. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  118. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  119. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  120. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  121. package/views/3d/FocusAreasView.js +1 -1
  122. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  123. package/views/3d/analysis/Slice/SliceController.js +1 -1
  124. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  125. package/views/3d/camera/intersectionUtils.js +1 -1
  126. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  127. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  128. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  129. package/views/3d/state/ViewState.js +1 -1
  130. package/views/3d/state/ViewStateManager.js +1 -1
  131. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  132. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  133. package/views/3d/state/utils/navigationUtils.js +1 -1
  134. package/views/3d/terrain/OverlayManager.js +1 -1
  135. package/views/3d/terrain/TerrainSurface.js +1 -1
  136. package/views/3d/terrain/TileRenderer.js +1 -1
  137. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  138. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  139. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  140. package/views/SceneView.js +1 -1
  141. package/views/analysis/analysisViewUtils.js +1 -1
  142. package/views/support/drapedUtils.js +1 -1
  143. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  144. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  145. package/widgets/Expand.js +1 -1
  146. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  147. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  148. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  149. package/widgets/LineOfSight/LineOfSightTarget.js +1 -1
  150. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  151. package/widgets/OrientedImageryViewer.js +1 -1
  152. package/widgets/support/GridControls.js +1 -1
  153. package/widgets/support/SelectionList/LayerItem.js +1 -1
  154. package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
  155. package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
  156. package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
  157. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
  158. package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
  159. package/assets/esri/core/workers/chunks/54814a269d44855f0673.js +0 -1
  160. package/assets/esri/core/workers/chunks/632d1a1287dde980479e.js +0 -1
  161. package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
  162. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
  163. package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
  164. package/assets/esri/core/workers/chunks/948c5454881e661c3bdc.js +0 -1
  165. package/assets/esri/core/workers/chunks/95507ff0a243e451b99e.js +0 -1
  166. package/assets/esri/core/workers/chunks/9959a91c8de6fef499c2.js +0 -1
  167. package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
  168. package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
  169. package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
  170. package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
  171. package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788,3186,3447,3651,4697,7060,8407],{5503:(e,t,i)=>{i.d(t,{A:()=>E});var r,s=i(90237),n=i(98291),a=i(65529),l=i(36563),o=i(4718),u=i(93687);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(r||(r={}));var c,h=i(11932),d=i(56507),f=i(62788),p=i(10107),y=i(7695),_=i(40608),g=i(95488),m=i(12195);class w{constructor(e,t,i,r,s){this.target=e,this.added=t,this.removed=i,this.start=r,this.deleteCount=s}}const b=new u.A(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1}));function F(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function S(e){return e?e instanceof k?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function v(e){if(e?.length)return e[0]}function I(e,t,i,r){const s=Math.min(e.length-i,t.length-r);let n=0;for(;n<s&&e[i+n]===t[r+n];)n++;return n}function A(e,t,i,r){t&&t.forEach(((t,s,n)=>{e.push(t),A(e,i.call(r,t,s,n),i,r)}))}const T=new Set,x=new Set,C=new Set,D=new Map;let R=0,k=class extends a.A.EventedAccessor{static{c=this}static{this.ofType=e=>{if(!e)return c;if(D.has(e))return D.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const r=e.typeMap[i].prototype.declaredClass;t?t+=` | ${r}`:t=r}let i=class extends c{};return(0,s._)([(0,y.u)({Type:e,ensureType:"function"==typeof e?(0,d.dp)(e):(0,d.aq)(e)})],i.prototype,"itemType",void 0),i=(0,s._)([(0,_.$)(`esri.core.Collection<${t}>`)],i),D.set(e,i),i}}static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new g.I,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:R++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(r.ADD)||(this._splice(0,this.length,S(e)),this._emitAfterChanges(r.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)((()=>{i.removed=!0,e.splice(e.indexOf(i),1)}))}return this._emitter.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,r=this.on(e,(e=>{i()?.call(null,e),r.remove()}));return r}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(r.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(r.ADD),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(r.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,S(e)),this._emitAfterChanges(r.ADD),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(r.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(o.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(S);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const i=this._splice(0,this.length),s=i.length;for(let r=0;r<s;r++)e.call(t,i[r],r,i);this._emitAfterChanges(r.REMOVE)}destroyAll(){this.drain(F)}destroyMany(e){const t=this.removeMany(e);return t.forEach(F),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const i=[];return A(i,this,e,t),new c(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const i=this._items.map(e,t);return new c({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(r.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(r.MOVE)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const e=v(this._splice(this.length-1,1));return this._emitAfterChanges(r.REMOVE),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(r.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(r.ADD)),this.length}reduce(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(r.REMOVE))return;const t=v(this._splice(e,1));return this._emitAfterChanges(r.REMOVE),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(r.REMOVE))return[];const t=e instanceof c?e.toArray():e,i=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const r=t[e],n=i.indexOf(r);if(n>-1){const r=1+I(t,i,e+1,n+1),a=this._splice(n,r);a&&a.length>0&&s.push.apply(s,a),e+=r-1}}return this._emitAfterChanges(r.REMOVE),s}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(r.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(r.MOVE),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const e=v(this._splice(0,1));return this._emitAfterChanges(r.REMOVE),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(r.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?r.REMOVE:0)|(i.length?r.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(s),n}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map((t=>(0,m.W)(t)?t.toJSON(e):t))}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(r.ADD)||(this._splice(0,0,e),this._emitAfterChanges(r.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const r=this._items,s=this.itemType;let n,a;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,h._)((()=>this._dispatchChange()))),e<0&&(e+=this.length),t){if(a=r.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let i=0,s=a.length;i<s;i++)n=a[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(a.splice(i,1),r.splice(e,0,n),e+=1,i-=1,s-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=a.length;for(let i=0;i<t;i++)e.reset(a[i]),this.emit("after-remove",e);b.release(e)}}if(i?.length){if(s){const e=[];for(const t of i){const i=s.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),a=e===this.length;if(t||n){const s=b.acquire();s.target=this,s.cancellable=!0;const l=b.acquire();l.target=this,l.cancellable=!1;for(const o of i)t?(s.reset(o),this.emit("before-add",s),s.defaultPrevented||(a?r.push(o):r.splice(e++,0,o),this._set("length",r.length),n&&(l.reset(o),this.emit("after-add",l)))):(a?r.push(o):r.splice(e++,0,o),this._set("length",r.length),l.reset(o),this.emit("after-add",l));b.release(l),b.release(s)}else{if(a)for(const e of i)r.push(e);else r.splice(e,0,...i);this._set("length",r.length)}}if((i?.length||a?.length)&&this._notifyChangeEvent(i,a),this.hasEventListener("after-splice")){const r=new w(this,i,a,e,t);this.emit("after-splice",r)}return a}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=b.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,b.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;T.clear(),x.clear(),C.clear();for(const{added:t,removed:i}of e){if(t)if(0===C.size&&0===x.size)for(const e of t)T.add(e);else for(const e of t)x.has(e)?(C.add(e),x.delete(e)):C.has(e)||T.add(e);if(i)if(0===C.size&&0===T.size)for(const e of i)x.add(e);else for(const e of i)T.has(e)?T.delete(e):(C.delete(e),x.add(e))}const i=n.A.acquire();T.forEach((e=>{i.push(e)}));const r=n.A.acquire();x.forEach((e=>{r.push(e)}));const s=this._items,a=t.items,l=n.A.acquire();if(C.forEach((e=>{a.indexOf(e)!==s.indexOf(e)&&l.push(e)})),t.listeners&&(i.length||r.length||l.length)){const e={target:this,added:i,removed:r,moved:l},s=t.listeners.length;for(let i=0;i<s;i++){const r=t.listeners[i];r.removed||r.callback.call(this,e)}}n.A.release(i),n.A.release(r),n.A.release(l)}T.clear(),x.clear(),C.clear()}};(0,s._)([(0,p.MZ)()],k.prototype,"_updating",void 0),(0,s._)([(0,p.MZ)()],k.prototype,"length",void 0),(0,s._)([(0,p.MZ)()],k.prototype,"items",null),(0,s._)([(0,p.MZ)({readOnly:!0})],k.prototype,"updating",null),k=c=(0,s._)([(0,_.$)("esri.core.Collection")],k);const E=k},6797:(e,t,i)=>{i.d(t,{Mj:()=>d,Ui:()=>p,w2:()=>f});var r=i(69622),s=i(5503),n=i(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.A}function o(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=o(e),s=o(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter((e=>!r.includes(e))),d=r.filter((e=>!s.includes(e))),f=r.filter((i=>s.includes(i)&&u(e,i)!==u(t,i))).concat(n,d).sort(),p=c(e);if(p&&a.has(p)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const _=l(e)&&l(t);for(const r of f){const s=u(e,r),n=u(t,r);let a;if((_||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])a=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;a={type:"complete",oldValue:s,newValue:n}}else a="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=a&&(null!=y?y.diff[r]=a:y={type:"partial",diff:{[r]:a}})}}return y}function d(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},7695:(e,t,i)=>{function r(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>r})},10407:(e,t,i)=>{i.d(t,{It:()=>f,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>o,mm:()=>d,sQ:()=>h});var r=i(98988),s=i(16930),n=i(28735);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?a(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",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",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function f(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},17311:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69622),n=i(4576),a=i(60999),l=i(5503),o=i(10107),u=(i(44208),i(53966),i(40608)),c=i(30524),h=i(43668);let d=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)((()=>(0,h.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([i.e(4560),i.e(9926)]).then(i.bind(i,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),r=this.fieldsIndex.get(i.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){return(await this.getTitles(e,[t],i)).get(t)??""}async getTitles(e,t,i){const r=new Map,s=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,o=l&&a;t.forEach((t=>{const i=o?n({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,s).global,layer:e,text:l}):"";r.set(t,i)}))}catch{}return r}async _checkAndReQueryGraphics(e,t){const i=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(n.Ru);if(i.length!==t.length)return t;if(t.some((e=>!(0,c.Kl)(e,this.requiredFields)))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=i;const s=await e.queryFeatures(r);if(s?.features.length===t.length)return s.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),r=e?.name??i.fieldName;i.fieldName=r,t.set(r.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const n={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:n,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,r._)([(0,o.MZ)()],d.prototype,"_featureUtils",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,r._)([(0,o.MZ)()],d.prototype,"displayField",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,r._)([(0,o.MZ)()],d.prototype,"fieldsIndex",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"fieldInfoMap",null),(0,r._)([(0,o.MZ)()],d.prototype,"fields",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"objectIdField",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"requiredFields",null),d=(0,r._)([(0,u.$)("esri.layers.support.TitleCreator")],d)},22671:(e,t,i)=>{i.d(t,{A:()=>m});var r,s=i(90237),n=i(52106),a=i(66552),l=i(25482),o=i(4718),u=i(10107),c=(i(44208),i(53966),i(36005)),h=i(40608),d=i(43937),f=i(16930),p=i(65864),y=i(50498),_=i(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=r=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,p.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/i)));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+r),(e=>s-e*a),l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=f.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],a=i.fromJSON(n),l=n.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=r);const o=n.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],i=o[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}s.push(a)}return s}_quantizePoints(e,t,i){let r,s;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===s||(n.push([e-r,a-s]),r=e,s=a)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,p.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],a=this._quantizePoints(n,t,i);a&&s.push(a)}return s.length>0?((0,p.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,p.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],m.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],m.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[_.A],json:{write:!0}})],m.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,s._)([(0,d.K)("geometryType")],m.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:f.A,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s._)([(0,d.K)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],m.prototype,"transform",void 0),m=r=(0,s._)([(0,h.$)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,i)=>{i.d(t,{O9:()=>n,dw:()=>a,mj:()=>s});var r=i(59247);function s(e,t){const i=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===i[t].type))}function n(e,t){const i=e.length>t.length?e:t,s=e.length>t.length?t:e;for(let e=s.length;e<i.length;e++)s.push((0,r.sK)(i[e]))}function a(e){const t=e[0];return!!t&&"type"in t}},30235:(e,t,i)=>{i.d(t,{A:()=>p});var r=i(52106),s=i(87449),n=i(11221),a=i(89169),l=i(33325),o=i(80609),u=i(39516),c=i(91075),h=i(13600),d=i(33143),f=i(20437);class p extends n.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type||this._layer.objectIdField===i.name)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.zl.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){let n="",c=!1;if(null!==r&&(n=r.constructClause(),c=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.A([],[],!0,null);const h=this._createQuery();h.where=(0,u.mA)(h.where,null===i?null===t?"1=1":"":(0,o.YY)(i,l.zl.Standardised)),h.spatialRelationship=this._makeRelationshipEnum(e),h.outSpatialReference=this.spatialReference,h.orderByFields=""!==n?n.split(","):null,h.geometry=null===t?null:t,h.relationParameter=this._makeRelationshipParam(e);const d=await this._layer.queryFeatures(h);if(null===d)return new a.A([],[],c,null);this._checkCancelled(s);const f=[];return d.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];f.push(t),this._featureCache[t]=this._changeFeature(e)})),new a.A([],f,c,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;if(await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)})),this._wset=new a.A([],e,!1,null),this._wset}const e=this._createQuery();e.where="1=1";const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)})),this._wset=new a.A([],i,!1,null),this._wset}async _getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)));s++);if(0===r.length)return"success";throw new s.dr(s.D_.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField??"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(d.A.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,s=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.A?o.push(t):o.push(f.A.fromJSON(t));let u=n;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof c.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const y={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:s,typeIdField:r,objectIdField:i,spatialReference:t},_="esriGeometryNull"===u||null===u;_||(y.geometryType=u);const g=new h.default(y);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&g.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new p({layer:g,spatialReference:t,isTable:_})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,i)=>{i.d(t,{BI:()=>_,D3:()=>p,XJ:()=>y,lc:()=>f,mX:()=>m,rU:()=>g,tH:()=>v});var r=i(799);const s="__begin__",n="__end__",a=new RegExp(s,"ig"),l=new RegExp(n,"ig"),o=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',h=c+" + ",d=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function _(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return m(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function m(e){let t;return e?(t=(0,r.HC)(e,(e=>s+'$feature["'+e+'"]'+n)),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,h).replaceAll(l,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=b.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},32756:(e,t,i)=>{i.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var r=i(90237),s=i(93637),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),l=i(91880);function o(e,t,i){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const s=new l.A;return s.read(r,i),[s]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,i,r){const n=e.find((e=>!!e.field));n&&(0,s.sM)(i,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,n.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,a.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69540),n=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),o=i(40608),u=i(43937),c=i(80451),h=i(29005);let d=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,a.MZ)({type:[h.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,o.$)("esri.layers.support.FeatureType")],d)},35704:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(87449),s=i(11221),n=i(89169),a=i(33325),l=i(80609),o=i(74887),u=i(88368),c=i(16930);class h extends s.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new c.A({wkid:4326}),this.geometryType=a.ik.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.A(t._candidates.slice().concat(t._known.slice()),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.J6.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.J6.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.$X)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new n.A([],e,!1,null),s=Math.min(t,e.length);if(await(this._parent?._getFeatures(r,-1,s,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=a.J6.InFeatureSet:this._idstates[e[t]]=a.J6.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===l[i]?this._idstates[e[i]]=a.J6.InFeatureSet:this._idstates[e[i]]=a.J6.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,i,r,s){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.kg)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,r,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new n.A(a._candidates.slice().concat(a._known.slice()),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.A(a._candidates.slice(),a._known.slice(),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,r,s,n,a){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.kg)(this._whereclause,s));const u=await this._parent._stat(e,t,i,r,o,n,a);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.kg)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o){if(null===this._parent)throw new r.dr(r.D_.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.kg)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o)}static registerAction(){s.A._featuresetFunctions.filter=function(e){if("function"==typeof e)return new h({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.A&&(t=e),new h({parentfeatureset:this,whereclause:t})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>_,on:()=>h,pc:()=>g,wB:()=>o,z7:()=>u});var r=i(37955),s=i(36563),n=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,p)}function c(e,t,i={},r){let s=null;const a=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return s}function h(e,t,i,a={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function d(e){a.once&&a.once&&(0,n.xt)(c),i(e)}const f=o(e,((e,i)=>{h(),(0,r.wb)(e)&&(l=e,u=(0,r.on)(e,t,d),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return c=(0,s.hA)((()=>{f.remove(),h()})),c}function d(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,n.xt)(l)}return new Promise(((r,n)=>{l=(0,s.vE)([(0,a.u7)(i,(()=>{o(),n((0,a.NK)())})),c(e,(e=>{o(),r(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const y={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},39516:(e,t,i)=>{let r;async function s(){return null==r&&(r=Promise.all([i.e(8368),i.e(4123)]).then(i.bind(i,44123)).then((e=>new e.WhereClauseCache(500,500)))),r}async function n(e,t){const i=await s(),r=i.get(e,t);if(null==r)throw i.getError(e,t);return r}function a(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function l(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}i.d(t,{GP:()=>n,IW:()=>l,mA:()=>a})},40334:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>se,constructFeatureSet:()=>ie,constructFeatureSetFromPortalItem:()=>he,constructFeatureSetFromRelationship:()=>ne,constructFeatureSetFromUrl:()=>te,convertToFeatureSet:()=>ce,createFeatureSetCollectionFromMap:()=>oe,createFeatureSetCollectionFromService:()=>ue,initialiseMetaDataCache:()=>X});var r=i(78888);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var n=i(78878),a=i(35704),l=i(52106),o=i(59534),u=i(68423),c=i(86691),h=i(87449),d=i(11221),f=i(89169),p=i(87594),y=i(33325),_=i(80609),g=i(1262),m=i(88368);class w{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new w;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,r){const s=new w;s.field=e;const n=m.A.create(t,{fieldsIndex:i,timeZone:r}),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new g.L8(g.Z7.MissingStatisticParameters);const t=m.A.create((0,_.Mi)(e.parseTree.args.value[0],y.zl.Standardised,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(n);if(null===a)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(s.typeofstat="MIN",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"min"})}else if("MAX"===l){if(s.typeofstat="MAX",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===l)s.typeofstat="COUNT",s.workingexpr=a.expr;else if("STDEV"===l){if(s.typeofstat="STDDEV",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===l){if(s.typeofstat="SUM",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:l})}else if("AVG"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==l)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:l});if(s.typeofstat="VAR",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"var"})}return s}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var b=i(53966),F=i(80200),S=i(74639),v=i(44729),I=i(55612),A=i(15032),T=i(16930),x=i(20437),C=i(95466);const D=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends d.A{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return y.J6.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new C.A([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new w;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),t.typeofstat=D.lookup(e.statistic)??"COUNT",this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=y.ik.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new T.A({wkid:4326});this.fields=[];const s=new w;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=m.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new x.A;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,_.DA)(t.expression)){const e=this._parent.getField((0,_.YY)(t.expression,y.zl.Standardised));if(!e)throw new h.dr(h.D_.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type,t.sqlType=e.type}else{i.type=this._convertToEsriFieldType((0,_.IY)(t.expression,this._parent.fields));const e=new x.A;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.Gr(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=i.type}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.IO(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new x.A;let r=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),i.name=s.tofieldname,i.alias=i.name;const n=null!==s.workingexpr&&(0,_.DA)(s.workingexpr)?(0,_.YY)(s.workingexpr,y.zl.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(r=this._parent.getField(n),!r)throw new h.dr(h.D_.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(r=this._parent.getField(n),!r)throw new h.dr(h.D_.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(r=this._parent.getField(n),!r))throw new h.dr(h.D_.AggregationFieldNotFound);i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?(await this._expandPagedSet(e,s,0,0,r),this._getFeatures(e,t,i,r)):"success"}async _getFilteredSet(e,t,i,r,s){if(""!==e)return new f.A([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,_.Ju)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(s),n=!0===l.nowhereclause?new f.A(a._candidates.slice().concat(a._known.slice()),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new f.A(a._candidates.slice(),a._known.slice(),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let o=this._parent;if(this._adaptedFields.length>0&&(o=new u.a({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new f.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:o,orderbyclause:new p.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=o;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.A({parentfeatureset:e,whereclause:t})}n=new f.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:e,orderbyclause:new p.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.workingexpr,y.zl.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.expression,y.zl.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const r=await this._getAgregagtePhysicalPage(e,t,i);for(const e of r){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];if(null!=this._featureCache[t.attributes[this.objectIdField]])throw b.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new h.dr(h.D_.NeverReach);this._featureCache[t.attributes[this.objectIdField]]=new l.A(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(r.length):this._nextAggregateItem(e,t,i,r,(n=>{null===n?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))}),n)}))}_nextAggregateItem(e,t,i,r,s,a){try{(0,n.a0)(e.pagesDefinition.internal.iterator.next()).then((n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,r,s,a)}}),a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const r=[];for(const i of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(i);null!==e&&(e instanceof v.n||e instanceof A.k?r.push(e.toNumber()):e instanceof I.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);i.attributes[t.tofieldname]=(0,S.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:m.A.convertValueToStorageFormat(i.expression.calculateValue(e.features[0]),i.sqlType);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));if(null!=this._featureCache[t.attributes[this.objectIdField]])throw b.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new h.dr(h.D_.NeverReach);return this._featureCache[t.attributes[this.objectIdField]]=new l.A({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,F.d)(t,F.T.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){d.A._featuresetFunctions.groupby=function(e,t){return new R({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var k=i(54784),E=i(54461),L=i(70333),N=i(61454),M=i(66395),O=i(50145),P=i(4576),j=i(39516),G=i(65864),B=i(21325),q=i(13600),U=i(54546),Z=i(61956),V=i(7562);class W extends d.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,F.d)(t,F.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=y.zl.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=y.zl.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=y.zl.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=y.zl.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return y.J6.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new Z.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const i="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let r=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);r=this.recentlyUsedQueries.getFromCache(t),null===r&&(r=i(e),this.recentlyUsedQueries.addToCache(t,r),r=r.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===r&&(r=i(e)),r}async _getFilteredSet(e,t,i,r,s){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new f.A([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=this._createQuery();o.where=(0,j.mA)(o.where,null===i?null===t?"1=1":"":(0,_.YY)(i,n)),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(s),new f.A([],u,l,null)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),a=!0);const l=await this.databaseType(),o=null===i?null===t?"1=1":"":(0,_.YY)(i,l);let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);let h=null;if(!0===this._pageJustIds)h=new f.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new f.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,u,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._createQuery();a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=(0,j.mA)(a.where,e.pagesDefinition.where),a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[s+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const s=t._featureMap[e._known[r]];null!==s&&(i=!0,this._featureCache[e._known[r]]=s)}}if(!1===i&&(e._known[r]!==t&&s.push(e._known[r]),s.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===s.length)break}if(0===s.length)return"success";const a=this._createQuery();a.objectIds=s,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new h.dr(h.D_.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,r,s,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=i.parseTree.column;const d=this._layer.fields??[];for(let e=0;e<d.length;e++)if(d[e].name.toLowerCase()===c.toLowerCase()){c=d[e].name;break}const f=this._createQuery();f.where=(0,j.mA)(f.where,null===n?null===s?"1=1":"":(0,_.YY)(n,u)),f.spatialRelationship=this._makeRelationshipEnum(r),f.relationParameter=this._makeRelationshipParam(r),f.geometry=null===s?null:s,f.returnDistinctValues=!0,f.returnGeometry=!1,f.outFields=[c];const p=await this.executeQuery(f,"execute");if(this._checkCancelled(o),!p.hasOwnProperty("features"))throw new h.dr(h.D_.InvalidStatResponse);let y=!1;for(let e=0;e<d.length;e++)if(d[e].name===c){"date"===d[e].type&&(y=!0);break}for(let e=0;e<p.features.length;e++){if(y){const t=p.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(p.features[e].attributes[c]);if(l.length>=a)break}return 0===p.features.length?l:p.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+p.features.length,t,i,r,s,n,a,l,o)}:l}async _distinctStat(e,t,i,r,s,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,r){const s=await this.databaseType();if(this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};const n=this._createQuery();return n.where=(0,j.mA)(n.where,null===r?null===i?"1=1":"":(0,_.YY)(r,s)),n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===i?null:i,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,i,r,s,n,a){await this._ensureLoaded();const l=this._layer.capabilities?.query,o=!!l?.supportsSqlExpression,u=!!l?.supportsStatistics,c=!!l?.supportsDistinct;if("count"===e)return c?this._countstat(e,i,r,s):{calculated:!1};if(!1===u||!1===(0,_.DA)(t)&&!1===o||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===c?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,r,s,n,a);const d=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const f=this._createQuery();f.where=(0,j.mA)(f.where,null===s?null===r?"1=1":"":(0,_.YY)(s,d)),f.spatialRelationship=this._makeRelationshipEnum(i),f.relationParameter=this._makeRelationshipParam(i),f.geometry=null===r?null:r;const p=new V.A;p.statisticType=(0,O.Dp)(e),p.onStatisticField=(0,_.YY)(t,d),p.outStatisticFieldName="ARCADE_STAT_RESULT",f.returnGeometry=!1;let y="ARCADE_STAT_RESULT";f.outStatistics=[p];const g=await this.executeQuery(f,"execute");if(!g.hasOwnProperty("features")||0===g.features.length)throw new h.dr(h.D_.InvalidStatResponse);let m=!1;const w=g.fields??[];for(let e=0;e<w.length;e++)if("ARCADE_STAT_RESULT"===w[e].name.toUpperCase()){y=w[e].name,"date"===w[e].type&&(m=!0);break}if(m){let e=g.features[0].attributes[y];return null!==e&&(e=new Date(g.features[0].attributes[y])),{calculated:!0,result:e}}return{calculated:!0,result:g.features[0].attributes[y]}}_stat(e,t,i,r,s,n,a){return this._stats(e,t,i,r,s,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities?.query,s=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,_.DA)(t[e].workingexpr)&&!1===s)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){await this._ensureLoaded();const l=await this.databaseType();let o=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();o={keyFields:e.map(((e,i)=>({name:t.normalizeFieldName(e)??e,asc:null==n||1===n._directions[i]})))}}let u="",c=!1;null!=n&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==o||(0,P.MJ)(e,0,e.length,n._fields,0,Math.min(n._fields.length,e.length),((e,t)=>e.toLowerCase()===t.toLowerCase())))&&(u=n.constructClause(),c=!0),""===u&&(u=e.join(","));const h=[];for(let e=0;e<t.length;e++){const i=new V.A;i.onStatisticField=null!==t[e].workingexpr?(0,_.YY)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),h.push(i)}let d=this._maxQueryRate();const p=this._layer.capabilities?.query.maxRecordCount;null!=p&&p<d&&(d=p);const y=null===s?null===r?"1=1":"":(0,_.YY)(s,l);return new f.A([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:!1,generatedOid:a,resultRecordCount:d,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===r?null:r,where:y,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:o}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;if(!0===e.pagesDefinition.useOIDpagination&&(r=(0,j.mA)(r,e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString())),null!=e.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new h.dr(h.D_.NotImplemented);r=(0,j.mA)(r,(0,_.YY)(e.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const s=e.pagesDefinition.internal.lastRetrieved,n=s,a=e.pagesDefinition.internal.lastPage,o=this._createQuery();if(o.where=(0,j.mA)(o.where,r),o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new h.dr(h.D_.InvalidStatResponse);const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.A({attributes:u.features[e].attributes,geometry:null}));return e.pagesDefinition.internal.keysetPagination?0!==u.features.length&&u.exceededTransferLimit?function(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new h.dr(h.D_.NeverReach);const t=[];for(let i=0;i<e.length;i++){const r=e[i],s=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${i}`];for(let t=0;t<i;t++){const i=e[t];s.push(`"${i.name.replaceAll('"','""')}" = @last_${t}`)}t.push(s.join(" AND "))}const i=t.join(" OR ");return m.A.create(i)}(e.keyFields));for(let i=0;i<e.keyFields.length;i++){const r=e.keyFields[i].name;e.clause.parameters[`last_${i}`]=t.attributes[r]}}(e.pagesDefinition.internal.keysetPagination,c.at(-1)):e.pagesDefinition.internal.fullyResolved=!0:!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,i,r,s){const n=new q.default({url:e,outFields:null===t?["*"]:t});return new W({layer:n,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,s){const n=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(n)){const a={objectIds:[e],returnMetadata:s};(t&&t>0||i&&i>0)&&(a.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(a.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:n,query:a,method:"attachments"});const l=await n.queryAttachments(new U.A(a)),o=[];return l&&l[e]&&l[e].forEach((t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;s&&t.exifInfo&&(r=M.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new N.A(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))})),o}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,B.YX)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t?.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const s=r.objectId,n=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.A({geometry:e.geometry?(0,G.rS)(e.geometry):null,attributes:e.attributes});n.push(t)}e[s]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new h.dr(h.D_.InvalidRequest)}async getFeatureByObjectId(e,t){const i=this._createQuery();i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=(0,j.mA)(i.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await this._layer.queryFeatures(i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=L.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=L.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.slice(0,i):t,t){t+="/rest/info";try{const e=await(0,r.A)(t,{query:{f:"json"}});let i="";return e.data?.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new W({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const s=await(0,r.A)(i,{responseType:"json",query:{f:"json"}});e=s?.data?.name??null,t=s?.data?.serviceItemId??null}const s=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var J=i(30235),z=i(26591);class Q extends d.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return y.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new f.A([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new f.A([],[],!0,null);if(n.capabilities?.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new z.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let c=!0;!0===this._removeGeometry&&(c=!1),o.returnGeometry=c,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const h=await n.source.queryRelatedFeatures(o);this._checkCancelled(s);const d=h[this._findObjectId]?h[this._findObjectId].features:[],p=[];for(let e=0;e<d.length;e++)this._featureCache[d[e].attributes[this._relatedLayer.objectIdField]]=d[e],p.push(d[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,_=null!=i;return new f.A(y||_?p:[],y||_?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==r&&!0===l.capabilities?.queryRelated.supportsOrderBy&&(n=r.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=t&&null!==e&&""!==e,h=null!=i;let d=null,p=!0;!0===this._removeGeometry&&(p=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);return d=new f.A(c||h?["GETPAGES"]:[],c||h?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(d,o,0,0,s),d}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new z.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[s+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const c=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&c&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,r){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)))&&!(a>=i&&0===s.length);r++);if(0===s.length)return"success";throw new h.dr(h.D_.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,s,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,r,s){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,s){return this._relatedLayer.queryAttachments(e,t,i,r,s)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var $=i(23732),Y=i(92474),K=i(4146),H=i(80812);function X(){null===$.A.applicationCache&&($.A.applicationCache=new $.A)}async function ee(e,t,i){if($.A.applicationCache){const i=$.A.applicationCache.getLayerInfo(e);if(i){const r=await i;return new q.default({url:e,outFields:t,sourceJSON:r})}const r=new q.default({url:e,outFields:t}),s=(async()=>(await r.load(),r.sourceJSON))();if($.A.applicationCache){$.A.applicationCache.setLayerInfo(e,s);try{return await s,r}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return await s,r}if(null!=i){const r=i.getCachedLayerMetadata(e);if(r){const i=await r;return new q.default({url:e,outFields:t,sourceJSON:i})}const s=new q.default({url:e,outFields:t}),n=(async()=>(await s.load(),s.sourceJSON))();i.setCachedLayerMetadata(e,n);try{return await n,s}catch(t){throw i.removeCachedLayerMetadata(e,n),t}}return new q.default({url:e,outFields:t})}async function te(e,t,i,r,s,n=null){return ie(await ee(e,["*"],s),t,i,r,s,n)}function ie(e,t=null,i=null,r=!0,s=null,n=null){switch(e.type){case"catalog-footprint":return ie(e.parent,t,i,r,s,n);case"subtype-sublayer":{const a=ie(e.parent,t,i,r,s,n);return a.filter(m.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:a.dateFieldsTimeZoneDefaultUTC}))}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new J.A({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n};return!e.url&&e.source?new J.A(a):new W(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function re(e,t){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const i=t.getCachedServiceMetadata(e);if(null!=i)return i}const i=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,i);try{return await i}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,i);try{return await i}catch(r){throw t.removeCachedServiceMetadata(e,i),r}}return i}async function se(e,t,i){const s={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},n=await re(e,null);if(s.metadata=n,void 0!==n.controllerDatasetLayers?.utilityNetworkLayerId&&null!==n.controllerDatasetLayers.utilityNetworkLayerId){if(n.layers)for(const e of n.layers)s.layerNameLkp[e.id]=e.name;if(n.tables)for(const e of n.tables)s.layerNameLkp[e.id]=e.name;const a=n.controllerDatasetLayers.utilityNetworkLayerId;s.networkId=a;const l=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==$.A.applicationCache){const e=$.A.applicationCache.getLayerInfo(i);if(null!==e)return e}const s=(async()=>{const i=await(0,r.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new h.dr(h.D_.DataElementsNotFound)})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(i,s);try{return await s}catch(e){throw $.A.applicationCache.clearLayerInfo(i),e}}return s}(e,a);if(l){s.queryelem=l,s.queryelem?.dataElement&&void 0!==s.queryelem.dataElement.schemaGeneration&&(s.unVersion=s.queryelem.dataElement.schemaGeneration),s.lkp={},s.queryelem.dataElement.domainNetworks||(s.queryelem.dataElement.domainNetworks=[]);for(const e of s.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}}if(s.queryelem.dataElement.terminalConfigurations)for(const e of s.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)s.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const n=await async function(e){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(void 0!==n.systemLayers?.associationsTableId&&null!==n.systemLayers.associationsTableId){let r=null;if(i&&s.unVersion<8){const i=[];s.unVersion>=4&&(i.push("STATUS"),i.push("PERCENTALONG")),r=await te(e+"/"+n.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...i],!1,null,null),await r.load(),s.unVersion>=4&&(r=r.filter(m.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})),await r.load())}return{lkp:s.lkp,associations:r,unVersion:s.unVersion,terminals:s.terminals,layerIdLookup:s.layerIdLookup,sourceIdLookup:s.sourceIdLookup}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function ne(e,t,i,r=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await te(o,r,s,n,a,l);return new Q({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})}a.A.registerAction(),R.registerAction(),c.A.registerAction(),k.A.registerAction(),E.A.registerAction();class ae extends s{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async featureSetByName(e,t=!0,i=null){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=this._map.allLayers.find((t=>(0,y.eB)(t)&&t.title===e));if(null!=s)return this._makeAndAddFeatureSet(s,t,i);if(this._map.allTables){const r=this._map.allTables.find((t=>(0,y.eB)(t)&&t.title===e));if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=this._map.allLayers.find((t=>(0,y.eB)(t)&&t.id===e));if(s)return this._makeAndAddFeatureSet(s,t,i);if(this._map.allTables){const r=this._map.allTables.find((t=>(0,y.eB)(t)&&t.id===e));if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}}class le extends s{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async _loadMetaData(){const e=await re(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new le(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])t.name===e&&(n=t);if(!n)for(const t of s.tables??[])t.name===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}}function oe(e,t,i=null,r=null){return new ae(e,t,i,r)}function ue(e,t,i=null,r=null){return new le(e,t,i,r)}function ce(e,t,i,r,s){if(null===e)return null;if((0,n.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof K.A&&(0,y.NI)(e)){const n=e;switch(t){case"datasource":return ie(n,s,"outFields"in n?n.outFields:null,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(n,s,"outFields"in n?n.outFields:null,!0,i,r)}return null}if((0,n.$)(e)){switch(t){case"datasource":return ie(e.parent,s,e.parent.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(e,s,e.parent.outFields,!0,i,r)}return null}return null}async function he(e,t,i,r,s,n,a,l=null){if($.A.applicationCache){const o=$.A.applicationCache.getLayerInfo(e+":"+n.url);if(o)return de(await o,t,i,r,s,a,l)}if(null!=a){const o=a.getCachedPortalItem(n.url,e);if(null!=o)return await de(await o,t,i,r,s,a,l)}const o=new H.default({id:e,portal:n}).load();$.A.applicationCache?$.A.applicationCache.setLayerInfo(e+":"+n.url,o):null!=a&&a.setCachedPortalItem(n.url,e,o);try{return await de(await o,t,i,r,s,a,l)}catch(t){throw $.A.applicationCache&&$.A.applicationCache.clearLayerInfo(e+":"+n.url),null!=a&&a.removeCachedPortalItem(n.url,e,o),t}}async function de(e,t,i,r,s,n,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await ee((0,y.Qi)(e.url??"")+"/"+t,["*"],n);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=n){const t=n.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=K.A.fromPortalItem(e);n.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(i){throw n.removeCachedPortalItemLayer(e.portal.url,e.id,t),i}}}else l=await K.A.fromPortalItem(e)}return ie(l,i,r,s,n,a)}},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var r=i(90237),s=i(66552),n=i(53966),a=i(10107),l=(i(44208),i(87811),i(93223)),o=i(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,r._)([(0,l.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,r._)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,i)=>{i.d(t,{Ch:()=>a,mW:()=>n});var r=i(34727),s=i(39516);function n(e,t){return{...t,filterMode:e.mode}}function a(e,t,i){const n=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],h(r));return t}(e);if(n&&((0,r.gg)(t,n[0])||(0,r.ZH)(i,n[1])))return"";const a=Array.from(l(e,t,i)),o=function(e,t,i){if(0===e.length)return!0;const s=c(e.at(0)?.minScale),n=h(e.at(-1)?.maxScale);if((0,r.ZH)(s,t)||(0,r.gg)(n,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],s=e[t+1];if((0,r.ZH)(c(s.minScale),h(i.maxScale)))return!0}return!1}(a,t,i)?"1=1":a.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,s.IW)(e,t)),"");return o&&"1=1"!==o?o:""}function*l(e,t,i){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)o(r.minScale,r.maxScale,t,i)&&(yield r)}}function o(e,t,i,s){return e=c(e),i=c(i),t=h(t),!(!(0,r.Sp)(i,e)&&(s??i)>e||(0,r.Hx)(t,i)||void 0!==s&&(0,r.Sp)(s,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function h(e){return e||0}},46140:(e,t,i)=>{i.d(t,{R:()=>s});var r=i(49186);let s=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,i=""){const[s,n]=t.split("."),a=/^\s*\d+\s*$/;if(!s?.match||!a.test(s))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),o=parseInt(n,10);return new e(l,o,i)}}},50498:(e,t,i)=>{i.d(t,{Ye:()=>h,gy:()=>c,yR:()=>d});var r=i(66552),s=i(5443),n=i(91075),a=i(48526),l=i(86738),o=i(39829),u=i(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>b});var r,s=i(90237),n=i(13874),a=i(69540),l=i(51447),o=i(25482),u=i(53966),c=i(36708),h=i(24326),d=i(10107),f=(i(44208),i(87811),i(40608)),p=i(12195),y=i(65864),_=i(50498),g=i(54339),m=i(33910);function w(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let b=class extends(a.A.ClonableMixin(o.A)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,p.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,c.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,s._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,s._)([(0,d.MZ)({value:null})],b.prototype,"attributes",null),(0,s._)([(0,d.MZ)({value:null,types:_.yR,json:{read:y.rS}})],b.prototype,"geometry",null),(0,s._)([(0,d.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],b.prototype,"layer",void 0),(0,s._)([(0,d.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,s._)([(0,d.MZ)({type:n.A,value:null})],b.prototype,"popupTemplate",null),(0,s._)([(0,d.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,s._)([(0,d.MZ)({value:null,types:m.Es})],b.prototype,"symbol",null),(0,s._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,s._)([(0,d.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=r=(0,s._)([(0,f.$)("esri.Graphic")],b)},54461:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(87449),s=i(11221),n=i(89169),a=i(33325);class l extends s.A{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.A(t._candidates.slice(),t._known.slice(),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.J6.NotInFeatureSet)return t;const i=this._idstates[e];return i===a.J6.InFeatureSet||i===a.J6.NotInFeatureSet?i:t===a.J6.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=a.J6.InFeatureSet,this._countedin++,a.J6.InFeatureSet):(this._idstates[e]=a.J6.NotInFeatureSet,a.J6.NotInFeatureSet):a.J6.Unknown}async _expandPagedSet(e,t,i,s,n){if(null===this._parent)throw new r.dr(r.D_.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,s,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,r){const s=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);-1!==t&&void 0===this._featureCache[t]&&s.push(t);let l=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>a)));r++);if(0===s.length)return"success";const o=new n.A([],s,!1,null),u=Math.min(s.length,i);await this._parent._getFeatures(o,-1,u,r);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(s[e]);void 0!==t&&(this._featureCache[s[e]]=t)}return"success"}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const a=await this._getSet(s);return new n.A(a._candidates.slice().concat(a._known.slice()),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.J6.InFeatureSet){if(e._known.push(e._candidates[n]),i+=1,null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.J6.NotInFeatureSet)null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),i+=1;else if(l===a.J6.Unknown)break;if(i>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){s.A._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},55674:(e,t,i)=>{i.d(t,{Ad:()=>f,Gj:()=>_,QY:()=>d,lL:()=>g,xR:()=>p});var r=i(66131),s=i(49186),n=(i(44208),i(44729)),a=i(15032),l=i(65864),o=i(95466),u=i(43668),c=i(98623);const h=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const i of h)t.hasArcadeDependency(i)&&e.add(i);return e}function f(e,t){return y.create(e,t,null,["$feature","$view"])}function p(e,t,i){return y.create(e,t,i,["$feature","$view","$config"])}class y{static async create(e,t,i,r){const{arcade:n,Dictionary:a}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=n.scriptUsesGeometryEngine(l);o&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,o);const c={vars:r.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},h=n.compileScript(l,c);let d=null;null!=i&&(d=new a(i),d.immutable=!0);const f=new a;return f.immutable=!1,f.setField("scale",0),new y(e,n,l,h,t,f,d,a)}constructor(e,t,i,r,s,n,a,l){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=s,this._viewDict=n,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new _,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=i?r.lY.epochToArcadeDate(s,i):r.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class _{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,i){const r=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const i=this._getField(e);if(i){const t=this._boundTarget.attributes[i.name];if(null==t)return null;switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},59247:(e,t,i)=>{i.d(t,{bv:()=>o,Fk:()=>u,yG:()=>c,$b:()=>h,Nd:()=>d,jm:()=>f,sK:()=>_});var r=i(40876),s=i(90629);function n(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const a=n();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:n,fromValues:function(e,t,i,r,s,n,a,l,o,u,c,h,d,f,p,y){const _=new Float32Array(16);return _[0]=e,_[1]=t,_[2]=i,_[3]=r,_[4]=s,_[5]=n,_[6]=a,_[7]=l,_[8]=o,_[9]=u,_[10]=c,_[11]=h,_[12]=d,_[13]=f,_[14]=p,_[15]=y,_}},Symbol.toStringTag,{value:"Module"}));var l=i(58083);class o{constructor(e,t,i){this.strength=e,this.radius=t,this.threshold=i,this.type="bloom"}interpolate(e,t,i){this.strength=p(e.strength,t.strength,i),this.radius=p(e.radius,t.radius,i),this.threshold=p(e.threshold,t.threshold,i)}clone(){return new o(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:y(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,i){this.radius=Math.round(p(e.radius,t.radius,i))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:y(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.amount=p(e.amount,t.amount,i),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||n();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,l.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const i=1-2*t,r=(0,l.hZ)(e,i,0,0,t,0,i,0,t,0,0,i,t,0,0,0,1);return(0,l.mg)(r,r)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,l.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e)}}}class h{constructor(e,t,i,r){this.offsetX=e,this.offsetY=t,this.blurRadius=i,this.color=r,this.type="drop-shadow"}interpolate(e,t,i){this.offsetX=p(e.offsetX,t.offsetX,i),this.offsetY=p(e.offsetY,t.offsetY,i),this.blurRadius=p(e.blurRadius,t.blurRadius,i),this.color[0]=Math.round(p(e.color[0],t.color[0],i)),this.color[1]=Math.round(p(e.color[1],t.color[1],i)),this.color[2]=Math.round(p(e.color[2],t.color[2],i)),this.color[3]=p(e.color[3],t.color[3],i)}clone(){return new h(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:y(this.offsetX),yoffset:y(this.offsetY),blurRadius:y(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.angle=p(e.angle,t.angle,i),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||n();this._colorMatrix=((e,t)=>{const i=Math.sin(t*Math.PI/180),r=Math.cos(t*Math.PI/180),s=(0,l.hZ)(e,.213+.787*r-.213*i,.715-.715*r-.715*i,.072-.072*r+.928*i,0,.213-.213*r+.143*i,.715+.285*r+.14*i,.072-.072*r-.283*i,0,.213-.213*r-.787*i,.715-.715*r+.715*i,.072+.928*r+.072*i,0,0,0,0,1);return(0,l.mg)(s,s)})(e,this.angle)}}class f{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,i){this.amount=p(e.amount,t.amount,i)}clone(){return new f(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function p(e,t,i){return e+(t-e)*i}function y(e){return Math.round(1e3*(0,s.PN)(e))/1e3}function _(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new f(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new h(0,0,0,[...(0,r.TS)("transparent")]);case"bloom":return new o(0,0,1)}}},60999:(e,t,i)=>{i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>c,UT:()=>y,jJ:()=>u});var r=i(90237),s=i(69622),n=i(97768),a=i(74887),l=i(10107),o=i(40608);function u(e,t,i){return(0,a.Lx)(e.map(((e,r)=>t.apply(i,[e,r]))))}async function c(e,t,i){return(await(0,a.Lx)(e.map(((e,r)=>t.apply(i,[e,r]))))).map((e=>e.value))}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function p(e){try{return h(await e)}catch(e){return(0,a.QP)(e),d(e)}}function y(e,t){return new _(e,t)}let _=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=h(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r._)([(0,l.MZ)()],_.prototype,"value",null),(0,r._)([(0,l.MZ)()],_.prototype,"error",null),(0,r._)([(0,l.MZ)()],_.prototype,"finished",null),(0,r._)([(0,l.MZ)()],_.prototype,"promise",void 0),(0,r._)([(0,l.MZ)()],_.prototype,"_result",void 0),_=(0,r._)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],_)},61760:(e,t,i)=>{i.d(t,{PU:()=>a,YW:()=>o,ex:()=>s,hv:()=>l,zp:()=>n}),i(34727);var r=i(90629);i(87317),i(91829);const s=2.4;function n(e){return(0,r.PN)(e*s)}function a(e){return(0,r.Lz)(e)/s}function l(e,t,i){const r=Math.sqrt(e**2+t**2)/i;return r>1?0:3/(Math.PI*i**2)*(1-r**2)**2}function o(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},65529:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(90237),s=i(69622),n=i(36563),a=i(40608);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let i=this._listenersMap?.get(e);if(!i)return!1;const r=this._target||this;let s=!1;for(const e of i.slice()){const i="deref"in e?e.deref():e;i?i?.call(r,t):s=!0}return s&&(i=i.filter((e=>!("deref"in e)||null!=e.deref())),this._listenersMap.set(e,i)),i.length>0}on(e,t){if(Array.isArray(e)){const i=e.map((e=>this.on(e,t)));return(0,n.vE)(i)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),(0,n.hA)((()=>{const i=this._listenersMap?.get(e),r=i?.indexOf(t)??-1;r>=0&&i.splice(r,1)}))}once(e,t){const i=this.on(e,(e=>{i.remove();const r="deref"in t?t.deref():t;r?.call(null,e)}));return i}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let i=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return i=(0,r._)([(0,a.$)("esri.core.Evented")],i),i};let i=class extends s.A{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};i=(0,r._)([(0,a.$)("esri.core.Evented.EventedAccessor")],i),e.EventedAccessor=i}(l||(l={}));const o=l},68423:(e,t,i)=>{i.d(t,{Gr:()=>m,IO:()=>y,a:()=>w,bV:()=>g,p8:()=>_});var r=i(52106),s=i(78502),n=i(87449),a=i(11221),l=i(89169),o=i(33325),u=i(80609),c=i(97768),h=i(1262),d=i(88368),f=i(16930);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends p{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class _ extends p{constructor(e,t,i){super((0,o.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,u.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends p{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,o.zl.Standardised,this.field.name,this.codefield instanceof d.A?(0,u.YY)(this.codefield,o.zl.Standardised):this.codefield,e.parameters);return i.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:d.A.create(i,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,i=null,r=null,s){let n,a,l,c;switch(e.type){case"interval":return(0,u.oj)(this.evaluateNodeToWhereClause(e.value,t,i,r,s),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,g.BADNESS,s));for(let n=0;n<e.clauses.length;n++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,i,g.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,i,g.BADNESS,s);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,g.BADNESS,s)),r+=" END ",r}case"parameter":{const i=s[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if((0,o.$P)(i))return(0,u.bm)(i,t);if((0,o.Lk)(i))return(0,u.bm)(i,t);if((0,o.eg)(i))return(0,u.F1)(i,t);if((0,o.rX)(i))return(0,u.R8)(i,t);if((0,o.f0)(i))return(0,u.Nf)(i,t);if(Array.isArray(i)){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):(0,o.$P)(i[r])||(0,o.Lk)(i[r])?e.push((0,u.bm)(i[r],t)):(0,o.eg)(i[r])?e.push((0,u.F1)(i[r],t)):(0,o.rX)(i[r])?e.push((0,u.R8)(i[r],t)):(0,o.f0)(i[r])?e.push((0,u.Nf)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,i,r,s));return a;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,g.BADNESS,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"IS":if("null"!==e.right.type)throw new h.L8(h.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new h.L8(h.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NOT NULL )";case"IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+c+")) ";case"NOT IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+c+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,u.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,u.Kb)(e.column);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,g.BADNESS,s);return(0,u.F6)(e.name,r,t)}}throw new h.L8(h.Z7.UnsupportedSyntax,{node:e.type})}extractValue(e){if(this.codefield instanceof d.A){const t=this.codefield.calculateValueCompiled(e);return this.reverseLkp[d.A.convertValueToStorageFormat(t)]}return this.reverseLkp[e.attributes[this.codefield]]}}class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,u.bD)(e,this.field.name,(0,u.YY)(this._sql,o.zl.Standardised),t.getFieldsIndex())}}extractValue(e){return d.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends a.A{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new f.A({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=o.ik.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.Lw)(t),this._wset=new l.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,n){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return await this._expandPagedSet(e,o,0,0,n),this._getFeatures(e,t,i,n);let u=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&a.push(e._known[r]),a.length>=o)));r++);if(0===a.length)return"success";e=new l.A([],a,e._ordered,null);const c=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,c,n)),this._checkCancelled(n);const h=[];for(let e=0;e<c;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&h.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of h){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.A({attributes:t,geometry:(0,s.Yq)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new n.dr(n.D_.NeverReach)}async _getFilteredSet(e,t,i,r,s){let n=!1;const a=this._reformulateWithoutAdaptions(i);n=a.cannot,i=a.where;let o=!1;if(null!==r){o=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===r.scanForField(t.field.name)){if(!(t instanceof _)){r=null,o=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,u.kg)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const c=await this._parent._getFilteredSet(e,t,i,r,s);let h;return this._checkCancelled(s),h=!0===n?new l.A(c._candidates.slice().concat(c._known.slice()),[],!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)):new l.A(c._candidates.slice(),c._known.slice(),!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)),h}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,u.Ju)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}async _stat(e,t,i,r,s,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(s),l=l||o.cannot,null!==(s=o.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};const c=await this._parent._stat(e,t,i,r,s,n,a);return!1===c.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:c}async _canDoAggregates(e,t,i,r,s){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof y))return!1;const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(s);return!a.cannot&&(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,a,l){if(null===this._parent)throw new n.dr(n.D_.NeverReach);const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new n.dr(n.D_.NeverReach);const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const c=this._reformulateWithoutAdaptions(s);if(c.cannot)throw new n.dr(n.D_.NeverReach);return null!==(s=c.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,s,a,l)}}},73681:(e,t,i)=>{i.d(t,{n:()=>o});var r=i(49186),s=i(53966),n=i(46140),a=i(95466),l=i(55674);class o{static async from(e,t,i){const a=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),h={};if(t)for(const e in t)h[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const f=await(0,l.xR)(e.expression,null,h);if(!f)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!a||!a.greaterEqual(4,0);p&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(i,p);return new o(p,c,f,y)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,r){try{return this._reader.bind(e,i,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,i)=>{i.d(t,{Gh:()=>_,tk:()=>d,BR:()=>h,wI:()=>c,G$:()=>p,$x:()=>f,Ov:()=>o,W_:()=>u,OP:()=>y,TU:()=>l,XX:()=>a});var r=i(70333),s=i(78888),n=(i(5503),i(84952));i(36563),i(36708),new WeakMap;const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function l(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function u(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function c(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function h(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function d(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function f(e,t){const i=p(t);return!i||(0,n.FX)(e,`https://${i}`,!0)?null:(0,n.hf)(e,i)}function p(e){return e?.preferredHost}function y(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function _(e,t){if(!t||!y(e))return;const i=f(e.url,{preferredHost:t});i&&(e.url=i)}},86691:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(78878),s=i(87449),n=i(11221),a=i(89169),l=i(87594);class o extends n.A{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const r=new a.A([],[],!0,null);for(let e=0;e<i.length;e++)r._known.push(i[e].id);return r}async getIdColumnDictionary(e,t,i,s){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.a0)(this._parent._expandPagedSet(e,n,0,0,s)),this.getIdColumnDictionary(e,t,i,s);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,r.a0)(this._parent._getFeatureBatch(l,s));this._checkCancelled(s);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,s)}return e._candidates.length>0?(await(0,r.a0)(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new s.dr(s.D_.NeverReach)}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s);this._checkCancelled(s);const l=new a.A(n._candidates.slice(),n._known.slice(),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===i||(e=new a.A(e._candidates.slice().concat(e._known.slice()),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.A._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.A(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},87594:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{A:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let i=0;i<this._fields.length;i++){const s=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(s,n):-1*r(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},91880:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(90237),n=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends a.A{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=r=(0,s._)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,i)=>{var r;i.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256,9405],{4146:(t,e,r)=>{r.d(e,{A:()=>v});var i=r(90237),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),d=r(84952),h=r(10107),p=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),m=r(92602),g=r(64272);let b=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(e)}catch(t){const r=e?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i._)([(0,h.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,h.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,h.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,h.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,h.MZ)({type:f.A})],v.prototype,"spatialReference",void 0),(0,i._)([(0,h.MZ)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,h.MZ)()],v.prototype,"url",void 0),(0,i._)([(0,h.MZ)({type:g.T})],v.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,p.$)("esri.layers.Layer")],v)},4197:(t,e,r)=>{r.d(e,{jh:()=>n,l5:()=>o,xm:()=>s});var i=r(34275);function n(t,e=!1){return t<=i.y9?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function s(t){return((0,i.iu)(t)?t.byteLength/8:t.length)<=i.y9?Array.from(t):new Float64Array(t)}function o(t,e,r){return Array.isArray(t)?t.slice(e,e+r):t.subarray(e,e+r)}},4902:(t,e,r)=>{r.d(e,{A:()=>c});var i=r(90237),n=r(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,i._)([(0,n.$)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,i._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,n.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},6867:(t,e,r)=>{r.d(e,{i:()=>d});var i=r(58083),n=r(9093),s=r(38954),o=r(51850),a=r(87317),l=r(91829),u=r(71351),c=r(29878);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.g)(p,this.ray.direction,this.distance),(0,s.l)(p))}withinDistance(t){return!!h(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!h(this)&&((0,s.g)(p,this.ray.direction,this.distance),(0,s.f)(t,this.ray.origin,p),!0)}getTransformedNormal(t){return(0,s.c)(y,this.normal),y[3]=0,(0,a.t)(y,y,this.transformation),(0,s.c)(t,y),(0,s.n)(t,t)}constructor(t){this.intersector=c.d.OBJECT,this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,u.vt)(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=c.d.OBJECT,(0,u.C)(t,this._ray)}set(t,e,r,a,l,u,c){this.intersector=t,this.distance=r,(0,s.c)(this.normal,a??o.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=e,this.drapedLayerOrder=u,this.renderPriority=c}copy(t){(0,u.C)(t.ray,this._ray),this.intersector=t.intersector,this.distance=t.distance,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.renderPriority=t.renderPriority,(0,s.c)(this.normal,t.normal),(0,i.C)(this.transformation,t.transformation)}}function h(t){return null!=t?.distance}const p=(0,o.vt)(),y=(0,l.vt)()},29878:(t,e,r)=>{var i;r.d(e,{d:()=>i}),function(t){t[t.OBJECT=0]="OBJECT",t[t.HUD=1]="HUD",t[t.TERRAIN=2]="TERRAIN",t[t.OVERLAY=3]="OVERLAY",t[t.I3S=4]="I3S",t[t.PCL=5]="PCL",t[t.LOD=6]="LOD",t[t.VOXEL=7]="VOXEL",t[t.TILES3D=8]="TILES3D"}(i||(i={}))},59693:(t,e,r)=>{r.d(e,{xH:()=>a,N1:()=>u}),r(38954);var i=r(51850),n=r(71351),s=(r(62258),r(58083),r(70328),r(97937),r(6867)),o=r(65215);function a(t,e){return l(t)===l(e)}function l(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let r=null;return r=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==r?null:`o-${e}-${r}`}r(29878),o.R,o.H,o.R,o.R,o.R,s.i,r(87582),(0,i.vt)();const u={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}}};(0,n.vt)(),(0,i.vt)()},62258:(t,e,r)=>{var i,n;(n=i||(i={}))[n.MIN=0]="MIN",n[n.MINMAX=1]="MINMAX",n[n.ALL=2]="ALL"},62885:(t,e,r)=>{r.d(e,{H:()=>s,V:()=>n});var i=r(5503);function n(t,e,r=i.A){return e||(e=new r),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,r)=>{r.d(e,{T:()=>h});var i,n=r(90237),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),d=r(98623);let h=class extends s.A{static{i=this}static get allTime(){return p}static get empty(){return y}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===i&&r===n}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,t,e));let n=this.end;if(n){const r=(0,o.lL)(n,t,e);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,t,e)}return new i({start:r,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return n>=e&&n<=r?o=n:e>=n&&e<=s&&(o=e),r>=n&&r<=s?a=r:s>=e&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,r)),null!=a&&(n.end=(0,o.S1)(a,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,c.K)("start")],h.prototype,"writeStart",null),h=i=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const p=new h,y=new h({start:void 0,end:void 0})},65215:(t,e,r)=>{r.d(e,{H:()=>i,R:()=>n});class i{constructor(t){this.layerViewUid=t}}class n extends i{constructor(t,e){super(t),this.graphicUid=e}}},69540:(t,e,r)=>{r.d(e,{A:()=>h});var i=r(90237),n=r(69622),s=(r(44208),r(4718)),o=(r(53966),r(97768)),a=r(35666),l=r(88620),u=r(40608);const c=t=>{let e=class extends t{clone(){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,i={},n=new Map;for(const t in e){const o=e[t],l=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[t];let d=null;d="function"==typeof u?u(c):"reference"===u?c:(0,s.TU)(c),null!=c&&null==d||(l===a.Gr.DEFAULTS?n.set(t,d):i[t]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const t=(0,l.oY)(u)?.store;if(t)for(const[e,r]of n)t.set(e,r,a.Gr.DEFAULTS)}return u}};return e=(0,i._)([(0,u.$)("esri.core.Clonable")],e),e};let d=class extends(c(n.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=c;const h=d},70328:(t,e,r)=>{r.d(e,{BI:()=>b,Ej:()=>h,Ie:()=>m,Jt:()=>g,Ne:()=>p,RF:()=>c,aI:()=>_,fA:()=>o,gE:()=>l,hZ:()=>f,iT:()=>d,is:()=>v,qv:()=>M,vI:()=>y,vY:()=>a,v_:()=>A,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(t=A){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e,r,i,n,o,a=s()){return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function a(t,e=s()){return function(t,e,r,i=s()){return f(i,M),function(t,e,r=0,i=e.length/3){let n=t[0],s=t[1],o=t[2],a=t[3],l=t[4],u=t[5];for(let t=0;t<i;t++)n=Math.min(n,e[r+3*t]),s=Math.min(s,e[r+3*t+1]),o=Math.min(o,e[r+3*t+2]),a=Math.max(a,e[r+3*t]),l=Math.max(l,e[r+3*t+1]),u=Math.max(u,e[r+3*t+2]);t[0]=n,t[1]=s,t[2]=o,t[3]=a,t[4]=l,t[5]=u}(i,t,e,r),i}(t,0,t.length/3,e)}function l(t,e=(0,n.jh)(24)){const[r,i,s,o,a,l]=t;return e[0]=r,e[1]=i,e[2]=s,e[3]=r,e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=s,e[9]=r,e[10]=a,e[11]=l,e[12]=o,e[13]=i,e[14]=s,e[15]=o,e[16]=i,e[17]=l,e[18]=o,e[19]=a,e[20]=s,e[21]=o,e[22]=a,e[23]=l,e}function u(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new i.A(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function d(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function h(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function p(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function y(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function f(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 m(t){return t?f(t,M):s(M)}function g(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function b(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=i,t[4]=n,t[5]=Number.POSITIVE_INFINITY,t}function v(t){return 6===t.length}function _(t,e,r){if(null==t||null==e)return t===e;if(!v(t)||!v(e))return!1;if(r){for(let i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1}else for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],A=[0,0,0,0,0,0];s()},78553:(t,e,r)=>{r.d(e,{D:()=>s,p:()=>n});var i=r(56507);function n(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,r)=>{r.d(e,{A:()=>p});var i=r(90237),n=r(69540),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i._)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);const l=a;var u=r(69622),c=r(4902),d=r(25482);let h=0,p=class extends(d.A.JSONSupportMixin(n.A.ClonableMixin(c.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,i._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],p.prototype,"id",void 0),(0,i._)([(0,s.MZ)({clonable:!1,value:null})],p.prototype,"parent",null),(0,i._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],p.prototype,"origin",void 0),p=(0,i._)([(0,o.$)("esri.analysis.Analysis")],p)},87582:(t,e,r)=>{r(6867);var i=r(65215);r(29878),i.R},92071:(t,e,r)=>{r.d(e,{P:()=>v,L:()=>_});var i=r(90237),n=r(69622),s=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((t,r)=>{e.set(r,(0,o.o8)(t),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(i),r)}))}return e}get(t,e){const r=void 0===e?this._values:this._originStores[e];return r?r.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=r){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,r),i!==e}return!1}delete(t,e=a.Gr.USER){const r=this._originStores[e];if(!r)return;const i=r.get(t);if(r.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let r=e-1;r>=0;r--){const e=this._originStores[r];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,r);break}}}return i}has(t,e){const r=void 0===e?this._values:this._originStores[e];return!!r&&r.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const r=this._originStores[e],i=r?.get(t),n=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),n!==i}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=r(45917),c=r(88620),d=r(40608);const h=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,c.oY)(this),r=e.store,i=new l;e.store=i,(0,s.k)(e,r,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const r=p(this),i=(0,a.aB)(e);if("string"==typeof t)return r.get(t,i);const n={};return t.forEach((t=>{n[t]=r.get(t,i)})),n}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return p(this).originOf(t)}revert(t,e){const r=p(this),i=(0,a.aB)(e),n=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?r.keys(i):[t]:t,s.forEach((t=>{n.invalidate(t),r.revert(t,i),n.commit(t)}))}};return e=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function p(t){return(0,c.oY)(t).store}let y=class extends(h(n.A)){};y=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),m=r(49422);const g=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,r){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(r))}removeOrigin(t){const e=b(this),r=(0,a.aB)(t),i=e.keys(r);for(const t of i)e.originOf(t)===r&&e.set(t,e.get(t,r),a.Gr.USER)}updateOrigin(t,e){const r=b(this),i=(0,a.aB)(e),n=(0,f.Jt)(this,t);for(let e=i+1;e<a.AU;++e)r.delete(t,e);r.set(t,n,i)}toJSON(t){return this.write({},t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function b(t){return(0,c.oY)(t).store}const v=t=>{let e=class extends(g(h(t))){constructor(...t){super(...t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],e),e};let _=class extends(v(n.A)){};_=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],_)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256,9405],{4146:(t,e,r)=>{r.d(e,{A:()=>v});var i=r(90237),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),d=r(84952),h=r(10107),p=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),m=r(92602),g=r(64272);let b=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(e)}catch(t){const r=e?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i._)([(0,h.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,h.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,h.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,h.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,h.MZ)({type:f.A})],v.prototype,"spatialReference",void 0),(0,i._)([(0,h.MZ)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,h.MZ)()],v.prototype,"url",void 0),(0,i._)([(0,h.MZ)({type:g.T})],v.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,p.$)("esri.layers.Layer")],v)},4197:(t,e,r)=>{r.d(e,{jh:()=>n,l5:()=>o,xm:()=>s});var i=r(34275);function n(t,e=!1){return t<=i.y9?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function s(t){return((0,i.iu)(t)?t.byteLength/8:t.length)<=i.y9?Array.from(t):new Float64Array(t)}function o(t,e,r){return Array.isArray(t)?t.slice(e,e+r):t.subarray(e,e+r)}},4902:(t,e,r)=>{r.d(e,{A:()=>c});var i=r(90237),n=r(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,i._)([(0,n.$)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,i._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,n.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},6867:(t,e,r)=>{r.d(e,{i:()=>d});var i=r(58083),n=r(9093),s=r(38954),o=r(51850),a=r(87317),l=r(91829),u=r(71351),c=r(29878);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.g)(p,this.ray.direction,this.distance),(0,s.l)(p))}withinDistance(t){return!!h(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!h(this)&&((0,s.g)(p,this.ray.direction,this.distance),(0,s.f)(t,this.ray.origin,p),!0)}getTransformedNormal(t){return(0,s.c)(y,this.normal),y[3]=0,(0,a.t)(y,y,this.transformation),(0,s.c)(t,y),(0,s.n)(t,t)}constructor(t){this.intersector=c.d.OBJECT,this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,u.vt)(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=c.d.OBJECT,(0,u.C)(t,this._ray)}set(t,e,r,a,l,u,c){this.intersector=t,this.distance=r,(0,s.c)(this.normal,a??o.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=e,this.drapedLayerOrder=u,this.renderPriority=c}copy(t){(0,u.C)(t.ray,this._ray),this.intersector=t.intersector,this.distance=t.distance,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.renderPriority=t.renderPriority,(0,s.c)(this.normal,t.normal),(0,i.C)(this.transformation,t.transformation)}}function h(t){return null!=t?.distance}const p=(0,o.vt)(),y=(0,l.vt)()},29878:(t,e,r)=>{var i;r.d(e,{d:()=>i}),function(t){t[t.OBJECT=0]="OBJECT",t[t.HUD=1]="HUD",t[t.TERRAIN=2]="TERRAIN",t[t.OVERLAY=3]="OVERLAY",t[t.I3S=4]="I3S",t[t.PCL=5]="PCL",t[t.LOD=6]="LOD",t[t.VOXEL=7]="VOXEL",t[t.TILES3D=8]="TILES3D"}(i||(i={}))},59693:(t,e,r)=>{r.d(e,{xH:()=>a,N1:()=>u}),r(38954);var i=r(51850),n=r(71351),s=(r(62258),r(58083),r(70328),r(97937),r(6867)),o=r(65215);function a(t,e){return l(t)===l(e)}function l(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let r=null;return r=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==r?null:`o-${e}-${r}`}r(29878),o.R,o.H,o.R,o.R,o.R,s.i,r(87582),(0,i.vt)();const u={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}}};(0,n.vt)(),(0,i.vt)()},62258:(t,e,r)=>{var i,n;(n=i||(i={}))[n.MIN=0]="MIN",n[n.MINMAX=1]="MINMAX",n[n.ALL=2]="ALL"},62885:(t,e,r)=>{r.d(e,{H:()=>s,V:()=>n});var i=r(5503);function n(t,e,r=i.A){return e||(e=new r),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,r)=>{r.d(e,{T:()=>h});var i,n=r(90237),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),d=r(98623);let h=class extends s.A{static{i=this}static get allTime(){return p}static get empty(){return y}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===i&&r===n}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,t,e));let n=this.end;if(n){const r=(0,o.lL)(n,t,e);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,t,e)}return new i({start:r,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return n>=e&&n<=r?o=n:e>=n&&e<=s&&(o=e),r>=n&&r<=s?a=r:s>=e&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,r)),null!=a&&(n.end=(0,o.S1)(a,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,c.K)("start")],h.prototype,"writeStart",null),h=i=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const p=new h,y=new h({start:void 0,end:void 0})},65215:(t,e,r)=>{r.d(e,{H:()=>i,R:()=>n});class i{constructor(t){this.layerViewUid=t}}class n extends i{constructor(t,e){super(t),this.graphicUid=e}}},69540:(t,e,r)=>{r.d(e,{A:()=>h});var i=r(90237),n=r(69622),s=(r(44208),r(4718)),o=(r(53966),r(97768)),a=r(35666),l=r(88620),u=r(40608);const c=t=>{let e=class extends t{clone(){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,i={},n=new Map;for(const t in e){const o=e[t],l=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[t];let d=null;d="function"==typeof u?u(c):"reference"===u?c:(0,s.TU)(c),null!=c&&null==d||(l===a.Gr.DEFAULTS?n.set(t,d):i[t]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const t=(0,l.oY)(u)?.store;if(t)for(const[e,r]of n)t.set(e,r,a.Gr.DEFAULTS)}return u}};return e=(0,i._)([(0,u.$)("esri.core.Clonable")],e),e};let d=class extends(c(n.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=c;const h=d},70328:(t,e,r)=>{r.d(e,{BI:()=>b,Ej:()=>h,Ie:()=>m,Jt:()=>g,Ne:()=>p,RF:()=>c,aI:()=>_,fA:()=>o,gE:()=>l,hZ:()=>f,iT:()=>d,is:()=>v,qv:()=>M,vI:()=>y,vY:()=>a,v_:()=>A,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(t=A){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e,r,i,n,o,a=s()){return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function a(t,e=s()){return function(t,e,r,i=s()){return f(i,M),function(t,e,r=0,i=e.length/3){let n=t[0],s=t[1],o=t[2],a=t[3],l=t[4],u=t[5];for(let t=0;t<i;t++)n=Math.min(n,e[r+3*t]),s=Math.min(s,e[r+3*t+1]),o=Math.min(o,e[r+3*t+2]),a=Math.max(a,e[r+3*t]),l=Math.max(l,e[r+3*t+1]),u=Math.max(u,e[r+3*t+2]);t[0]=n,t[1]=s,t[2]=o,t[3]=a,t[4]=l,t[5]=u}(i,t,e,r),i}(t,0,t.length/3,e)}function l(t,e=(0,n.jh)(24)){const[r,i,s,o,a,l]=t;return e[0]=r,e[1]=i,e[2]=s,e[3]=r,e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=s,e[9]=r,e[10]=a,e[11]=l,e[12]=o,e[13]=i,e[14]=s,e[15]=o,e[16]=i,e[17]=l,e[18]=o,e[19]=a,e[20]=s,e[21]=o,e[22]=a,e[23]=l,e}function u(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new i.A(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function d(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function h(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function p(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function y(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function f(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 m(t){return t?f(t,M):s(M)}function g(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function b(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=i,t[4]=n,t[5]=Number.POSITIVE_INFINITY,t}function v(t){return 6===t.length}function _(t,e,r){if(null==t||null==e)return t===e;if(!v(t)||!v(e))return!1;if(r){for(let i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1}else for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],A=[0,0,0,0,0,0];s()},78553:(t,e,r)=>{r.d(e,{D:()=>s,p:()=>n});var i=r(56507);function n(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,r)=>{r.d(e,{A:()=>p});var i=r(90237),n=r(69540),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i._)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);const l=a;var u=r(69622),c=r(4902),d=r(25482);let h=0,p=class extends(d.A.JSONSupportMixin(n.A.ClonableMixin(c.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}equals(t){return!0}};(0,i._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],p.prototype,"id",void 0),(0,i._)([(0,s.MZ)({clonable:!1,value:null})],p.prototype,"parent",null),(0,i._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],p.prototype,"origin",void 0),p=(0,i._)([(0,o.$)("esri.analysis.Analysis")],p)},87582:(t,e,r)=>{r(6867);var i=r(65215);r(29878),i.R},92071:(t,e,r)=>{r.d(e,{P:()=>v,L:()=>_});var i=r(90237),n=r(69622),s=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((t,r)=>{e.set(r,(0,o.o8)(t),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(i),r)}))}return e}get(t,e){const r=void 0===e?this._values:this._originStores[e];return r?r.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=r){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,r),i!==e}return!1}delete(t,e=a.Gr.USER){const r=this._originStores[e];if(!r)return;const i=r.get(t);if(r.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let r=e-1;r>=0;r--){const e=this._originStores[r];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,r);break}}}return i}has(t,e){const r=void 0===e?this._values:this._originStores[e];return!!r&&r.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const r=this._originStores[e],i=r?.get(t),n=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),n!==i}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=r(45917),c=r(88620),d=r(40608);const h=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,c.oY)(this),r=e.store,i=new l;e.store=i,(0,s.k)(e,r,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const r=p(this),i=(0,a.aB)(e);if("string"==typeof t)return r.get(t,i);const n={};return t.forEach((t=>{n[t]=r.get(t,i)})),n}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return p(this).originOf(t)}revert(t,e){const r=p(this),i=(0,a.aB)(e),n=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?r.keys(i):[t]:t,s.forEach((t=>{n.invalidate(t),r.revert(t,i),n.commit(t)}))}};return e=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function p(t){return(0,c.oY)(t).store}let y=class extends(h(n.A)){};y=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),m=r(49422);const g=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,r){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(r))}removeOrigin(t){const e=b(this),r=(0,a.aB)(t),i=e.keys(r);for(const t of i)e.originOf(t)===r&&e.set(t,e.get(t,r),a.Gr.USER)}updateOrigin(t,e){const r=b(this),i=(0,a.aB)(e),n=(0,f.Jt)(this,t);for(let e=i+1;e<a.AU;++e)r.delete(t,e);r.set(t,n,i)}toJSON(t){return this.write({},t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function b(t){return(0,c.oY)(t).store}const v=t=>{let e=class extends(g(h(t))){constructor(...t){super(...t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],e),e};let _=class extends(v(n.A)){};_=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],_)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7883],{27883:(e,t,n)=>{n.d(t,{resolveWebStyleSymbol:()=>b});var o=n(61473),r=n(49186),l=n(84952),s=n(20655),i=n(97159),a=n(73838),c=n(98751),u=n(85594),y=n(57212),m=n(33910);const f=["web-gltf","web","cim"];function b(e,t,n){const o=e.name;return null==o?Promise.reject(new r.A("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference")):"Esri2DPointSymbolsStyle"===e.styleName?function(e,t,n){const o=u.jg.replaceAll(/\{SymbolName\}/gi,e),r=null!=t.portal?t.portal:s.A.getDefault();return(0,u.yA)(o,n).then((e=>{const t=(0,u.bo)(e.data);return(0,a.rS)(t,{portal:r,url:(0,l.An)((0,l.nM)(o)),origin:"portal-item"})}))}(o,t,n):(0,u.cF)(e,t,n).then((e=>p(e,o,t,u.o5,n)))}async function p(e,t,n,b,p){const d=null!=n?.portal?n.portal:s.A.getDefault(),g={portal:d,url:(0,l.An)(e.baseUrl)},S=function(e,t){return t.items.find((t=>t.name===e))}(t,e.data);if(!S)throw new r.A("symbolstyleutils:symbol-name-not-found",`The symbol name '${t}' could not be found`,{symbolName:t});const w=p?.acceptedFormats??f,A=b(S,w);if(!A)throw new r.A("symbolstyleutils:symbol-reference-no-accepted-format",`The symbol name '${t}' does not have an accepted format (one of ${w})`,{symbolName:t});const{url:h,format:C}=A;let M=(0,i.f)(h,g),v=S.thumbnail?.href??null;const k=S.thumbnail?.imageData;(0,o.b5)()&&(M=(0,o.EM)(M)??"",v=(0,o.EM)(v));const L={portal:d,url:(0,l.An)((0,l.nM)(M)),origin:"portal-item"};return(0,u.yA)(M,p).then((o=>{const r="cim"===C?(0,u.bo)(o.data):o.data,l=(0,a.rS)(r,L);if(l&&(0,m.wk)(l)){if(v){const e=(0,i.f)(v,g);l.thumbnail=new y.V({url:e})}else k&&(l.thumbnail=new y.V({url:`data:image/png;base64,${k}`}));e.styleUrl?l.styleOrigin=new c.A({portal:n.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(l.styleOrigin=new c.A({portal:n.portal,styleName:e.styleName,name:t}))}return l}))}},59868:(e,t,n)=>{n.d(t,{A7:()=>c,Cx:()=>u,Hk:()=>y,UK:()=>a}),n(44208);var o=n(94985),r=n(31593),l=n(53930),s=n(68249),i=n(93470);const a=l.A.fromJSON(i.Cb),c=r.A.fromJSON(i.yM),u=o.A.fromJSON(i.WR),y=s.A.fromJSON(i.JZ);l.A.fromJSON(i.nC),r.A.fromJSON(i.HW),o.A.fromJSON(i.b6)},61473:(e,t,n)=>{function o(e){return e=e||globalThis.location.hostname,c.some((t=>null!=e?.match(t)))}function r(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(l)||null!=t.match(i)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}n.d(t,{EM:()=>r,b5:()=>o});const l=/^devext\.arcgis\.com$/,s=/^qaext\.arcgis\.com$/,i=/^[\w-]*\.mapsdevext\.arcgis\.com$/,a=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,l,s,/^jsapps\.esri\.com$/,i,a]},73838:(e,t,n)=>{n.d(t,{rS:()=>E,M9:()=>U,oO:()=>x});var o=n(49186),r=n(93637),l=n(77548),s=n(37757),i=n(13313),a=n(97887),c=n(68548),u=n(58592),y=n(75981),m=n(65365),f=n(94985),b=n(31593),p=n(53930),d=n(68249),g=n(68197),S=n(5503),w=(n(44208),n(90629)),A=n(27845),h=n(11506),C=n(39065),M=n(59868),v=n(93470);y.A.fromSimpleMarkerSymbol(M.UK),a.A.fromSimpleLineSymbol(M.A7),m.A.fromSimpleFillSymbol(M.Cx),new c.A({symbolLayers:new S.A([new A.A({material:{color:v.fT},edges:new C.A({size:(0,w.PN)(1),color:new g.A(v.JR)})})])});const k=new a.A({symbolLayers:new S.A([new h.A({material:{color:new g.A([0,0,0])},size:(0,w.PN)(1)})])}),L=new m.A({symbolLayers:new S.A([new A.A({outline:{color:new g.A([0,0,0]),size:(0,w.PN)(1)}})])});var $=n(33910);const I="#useCIMFallbackSymbology()",N={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function U(e,t,n,o){const l=T(e,{},{context:o,isLabelSymbol:!1});null!=l&&(0,r.sM)(n,l,t)}function x(e,t,n,o){const r=T(e,{},{context:o,isLabelSymbol:!0});null!=r&&(t[n]=r)}function D(e){return(0,$.wk)(e)||e instanceof s.A}function T(e,t,n){if(null==e)return null;const{context:r,isLabelSymbol:g}=n,S=r?.origin,w=r?.messages;if("web-scene"===S&&!D(e)){const n=function(e,t=N){if(!e)return{symbol:null};const{retainId:n=N.retainId,ignoreDrivers:r=N.ignoreDrivers,hasLabelingContext:l=N.hasLabelingContext,retainCIM:g=N.retainCIM,cimFallbackEnabled:S=N.cimFallbackEnabled}=t;let w=null;if((0,$.wk)(e))w=e.clone();else if("web-style"===e.type)w=e.clone();else if("cim"===e.type){const n=e.data?.symbol?.type;switch(n){case"CIMPointSymbol":w=g?e.clone():y.A.fromCIMSymbol(e);break;case"CIMLineSymbol":S&&(w=k.clone(),t?.logWarning?.(I,"Unsupported CIM line symbology converted to fallback 3D line symbology"));break;case"CIMPolygonSymbol":S&&(w=L.clone(),t?.logWarning?.(I,"Unsupported CIM polygon symbology converted to fallback 3D polygon symbology"))}if(!w)return{error:new o.A("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${n||"unknown"}' is unsupported in 3D`,{symbol:e})}}else if(e instanceof b.A)w=a.A.fromSimpleLineSymbol(e);else if(e instanceof p.A)w=y.A.fromSimpleMarkerSymbol(e);else if(e instanceof u.A)w=y.A.fromPictureMarkerSymbol(e);else if(e instanceof f.A)w=t.geometryType&&"mesh"===t.geometryType?c.A.fromSimpleFillSymbol(e):m.A.fromSimpleFillSymbol(e);else{if(!(e instanceof d.A))return{error:new o.A("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};w=l?i.A.fromTextSymbol(e):y.A.fromTextSymbol(e)}return n&&w&&"cim"!==w.type&&(w.id=e.id),!r||"cim"===w.type||w instanceof s.A||w.symbolLayers.forEach((e=>e.ignoreDrivers=!0)),{symbol:w}}(e,{retainCIM:!0,hasLabelingContext:g});return null!=n.symbol?n.symbol.write(t,r):(w?.push(new o.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:r,error:n.error})),null)}return(0,l.TU)(r?.layer)&&(A=e,"polygon-3d"===A?.type||"line-3d"===A?.type)?(w?.push(new o.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported on layers of type '${r?.layer?.declaredClass}'.`,{symbol:e,context:r})),null):("web-map"===S||"portal-item"===S&&!(0,l.TU)(r?.layer))&&D(e)?(w?.push(new o.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:r})),null):e.write(t,r);var A}function E(e,t){return(0,$.Bu)(e,null,t)}},77548:(e,t,n)=>{n.d(t,{Gh:()=>d,tk:()=>m,BR:()=>y,wI:()=>u,G$:()=>b,$x:()=>f,Ov:()=>a,W_:()=>c,OP:()=>p,TU:()=>i,XX:()=>s});var o=n(70333),r=n(78888),l=(n(5503),n(84952));n(36563),n(36708),new WeakMap;const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function i(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function c(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const n=o.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;const l=e.toLowerCase().indexOf("/rest/services");if(-1===l)return null;const s=`${e.slice(0,l)}/rest/info`,i=null!=t?t.signal:null,{data:a}=await(0,r.A)(s,{query:{f:"json"},responseType:"json",signal:i});return a?.owningSystemUrl||null}function y(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function m(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function f(e,t){const n=b(t);return!n||(0,l.FX)(e,`https://${n}`,!0)?null:(0,l.hf)(e,n)}function b(e){return e?.preferredHost}function p(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function d(e,t){if(!t||!p(e))return;const n=f(e.url,{preferredHost:t});n&&(e.url=n)}},85594:(e,t,n)=>{n.d(t,{jg:()=>S,cF:()=>y,bo:()=>m,yA:()=>p,o5:()=>f});var o=n(78888),r=n(49186),l=n(44208),s=n(74887),i=n(84952),a=n(20655),c=n(16405);const u=new Map;function y(e,t,n){return null!=e?.styleUrl?async function(e,t){try{return{data:(await p(e,t)).data,baseUrl:(0,i.nM)(e),styleUrl:e}}catch(e){return(0,s.QP)(e),null}}(e.styleUrl,n):null!=e?.styleName?function(e,t,n){const o=null!=t.portal?t.portal:a.A.getDefault();let l;const s=`${o.url} - ${o.user?.username} - ${e}`,i=u.get(s);if(i)return i;const y=function(e,t,n){return t.load(n).then((()=>{const o=new c.A({disableExtraQuery:!0,query:`owner:${d} AND type:${g} AND typekeywords:"${e}"`});return t.queryItems(o,n)})).then((({results:t})=>{let o=null;const l=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some((e=>e.toLowerCase()===l));if(t&&e.type===g&&e.owner===d){o=e;break}}if(!o)throw new r.A("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return o.load(n)}))}(e,o,n).then((e=>(l=e,e.fetchData()))).then((t=>({data:t,baseUrl:l.itemUrl??"",styleName:e})));return u.set(s,y),y}(e.styleName,t,n):Promise.reject(new r.A("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function m(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function f(e,t){for(const n of t)switch(n){case"cim":if(e.cimRef)return{format:n,url:encodeURI(e.cimRef)};break;case"web-gltf-basisu":{const t=b(e,"gltf_basisu");if(t)return{format:n,url:t};break}case"web-gltf":{const t=b(e,"gltf");if(t)return{format:n,url:t};break}case"web":{const t=b(e,"gltf");if(t)return{format:"web-gltf",url:t};if(e.webRef)return{format:n,url:encodeURI(e.webRef)};break}}}function b(e,t){if(!(0,l.A)("enable-feature:force-wosr"))return e.formatInfos?.find((e=>e.type===t))?.href}function p(e,t){const n={responseType:"json",query:{f:"json"},...t};return(0,o.A)((0,i.S8)(e),n)}const d="esri_en",g="Style",S="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},93470:(e,t,n)=>{n.d(t,{Cb:()=>l,HW:()=>u,JR:()=>r,JZ:()=>a,WR:()=>i,b6:()=>y,fT:()=>o,nC:()=>c,yM:()=>s});const o=[252,146,31,255],r=[153,153,153,255],l={type:"esriSMS",style:"esriSMSCircle",size:6,color:o,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:o},i={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},c={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},y={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);