@arcgis/core 4.27.0-next.20230521 → 4.27.0-next.20230522

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 (173) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  5. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  6. package/arcade/functions/featuresetbase.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/0d02856e55d20b99fc8b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{69242c66492717c7388c.js → 0fcb8d408696075338e2.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{1edc5c06874cb12c5478.js → 17f313e548281bb5db3e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b91c155de9a89e4e6971.js → 187c3b971ed0fc4363ef.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{85c6ce93aa41e6b65997.js → 18db07d739a713cc0465.js} +1 -1
  13. package/assets/esri/core/workers/chunks/28286014a575042619ee.js +1 -0
  14. package/assets/esri/core/workers/chunks/{692dfeb2e255fdc0ade2.js → 39288fa69561d21f04f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{2b9d3e60977934a6d471.js → 3bc6b5f0643364749ef8.js} +1 -1
  16. package/assets/esri/core/workers/chunks/45e5ad704d18dd0857ce.js +1 -0
  17. package/assets/esri/core/workers/chunks/{62d9d15f0d00a75da42c.js → 4670b17ae2ed3c13d344.js} +1 -1
  18. package/assets/esri/core/workers/chunks/4d24efa01d1accc5a5f0.js +1 -0
  19. package/assets/esri/core/workers/chunks/52575f021a14dd961de8.js +1 -0
  20. package/assets/esri/core/workers/chunks/{6312783626bacf52df7a.js → 55486c644e8b01326a0d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +1 -0
  22. package/assets/esri/core/workers/chunks/5a4c04bf4f57e74457c5.js +1 -0
  23. package/assets/esri/core/workers/chunks/70d6e5edf05ef7079fa8.js +1 -0
  24. package/assets/esri/core/workers/chunks/71bdf8f10aee0077f681.js +1 -0
  25. package/assets/esri/core/workers/chunks/72b2c3c8e76da699690c.js +1 -0
  26. package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +1 -0
  27. package/assets/esri/core/workers/chunks/791f529e90135398b3d5.js +1 -0
  28. package/assets/esri/core/workers/chunks/8d3abfe6fdc5ac8d6cb7.js +1 -0
  29. package/assets/esri/core/workers/chunks/96d339abcd917f1f0ae1.js +1 -0
  30. package/assets/esri/core/workers/chunks/97cdbec7532cfcdf9ad2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{f3f6035a17f7dcd19675.js → 9ab400a89dd701778d2c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{1488b3d48232844b8bb4.js → 9fe349f43d5ff5a4ac2d.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{22396dd3717d17a5d235.js → a1c31bb8c12831539328.js} +1 -1
  34. package/assets/esri/core/workers/chunks/b4e2dc6b3d06b426e596.js +1 -0
  35. package/assets/esri/core/workers/chunks/{48abcb2d88f22e6e9fde.js → c2cb9fa18c77f0c5104e.js} +1 -1
  36. package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +1 -0
  37. package/assets/esri/core/workers/chunks/d725dbbdeb05322e6d88.js +1 -0
  38. package/assets/esri/core/workers/chunks/df3e497d12ed77bae168.js +1 -0
  39. package/assets/esri/core/workers/chunks/{4d5f71d84c85f45c97ea.js → ed6f6e539a915ba9e64d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/fb080339bfaf32731ca6.js +1 -0
  41. package/assets/esri/themes/base/_core.scss +2 -0
  42. package/assets/esri/themes/base/widgets/_FloorFilter.scss +6 -0
  43. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +40 -0
  44. package/assets/esri/themes/dark/main.css +1 -1
  45. package/assets/esri/themes/light/main.css +1 -1
  46. package/assets/esri/themes/light/view.css +1 -1
  47. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  52. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  53. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  54. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  55. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  56. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  58. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  59. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  60. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  62. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  63. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  64. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  65. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  66. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  67. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  68. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  69. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  70. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  71. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  72. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  75. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  76. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  77. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  78. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  79. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  80. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  81. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  82. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  83. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  84. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  86. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
  87. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
  88. package/chunks/mat4.js +1 -1
  89. package/core/accessorSupport/write.js +1 -1
  90. package/core/fontUtils.js +1 -1
  91. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  92. package/geometry/Mesh.js +1 -1
  93. package/geometry/support/MeshGeoreferencedRelativeVertexSpace.d.ts +4 -0
  94. package/geometry/support/MeshGeoreferencedRelativeVertexSpace.js +5 -0
  95. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +4 -0
  96. package/geometry/support/MeshGeoreferencedVertexSpace.js +5 -0
  97. package/geometry/support/MeshLocalVertexSpace.d.ts +4 -0
  98. package/geometry/support/MeshLocalVertexSpace.js +5 -0
  99. package/geometry/support/MeshTransform.d.ts +4 -0
  100. package/geometry/support/MeshTransform.js +1 -1
  101. package/geometry/support/meshUtils/ElevationSamplerWorker.js +1 -1
  102. package/geometry/support/meshUtils/centerAt.js +1 -1
  103. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  104. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  105. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  106. package/geometry/support/meshUtils/georeference.js +1 -1
  107. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  108. package/geometry/support/meshUtils/merge.js +1 -1
  109. package/geometry/support/meshUtils/offset.js +1 -1
  110. package/geometry/support/meshUtils/primitives.js +1 -1
  111. package/geometry/support/meshUtils/rotate.js +1 -1
  112. package/geometry/support/meshUtils/scale.js +1 -1
  113. package/interfaces.d.ts +227 -1
  114. package/layers/VoxelWasmPerSceneView.js +1 -1
  115. package/layers/graphics/data/attributeSupport.js +1 -1
  116. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  117. package/networks/support/TopologyValidationJobInfo.js +1 -1
  118. package/package.json +1 -1
  119. package/popup/FieldInfo.js +1 -1
  120. package/portal/Portal.js +1 -1
  121. package/rest/support/FeatureSet.js +1 -1
  122. package/rest/support/meshFeatureSet.js +1 -1
  123. package/support/revision.js +1 -1
  124. package/symbols/cim/cimAnalyzer.js +1 -1
  125. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  126. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  127. package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
  128. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  129. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  130. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  131. package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
  132. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  135. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  136. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  137. package/views/3d/state/utils/navigationUtils.js +1 -1
  138. package/views/3d/support/DisplayQualityProfile.js +1 -1
  139. package/views/3d/support/QualitySettings.js +1 -1
  140. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  141. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  142. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  143. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  144. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  145. package/views/interactive/dragEventPipeline.js +1 -1
  146. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  147. package/widgets/Editor/Edits.js +1 -1
  148. package/widgets/Editor/Upload.js +1 -1
  149. package/widgets/Editor/workflowUtils.js +1 -1
  150. package/widgets/Feature/support/featureUtils.js +1 -1
  151. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  152. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +5 -0
  153. package/widgets/UtilityNetworkValidateTopology.js +5 -0
  154. package/assets/esri/core/workers/chunks/163bf2e13abbdd298374.js +0 -1
  155. package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +0 -1
  156. package/assets/esri/core/workers/chunks/2640204c4655aa535ccb.js +0 -1
  157. package/assets/esri/core/workers/chunks/2bf42d060f877566b989.js +0 -1
  158. package/assets/esri/core/workers/chunks/34ec9623a1bece86a82b.js +0 -1
  159. package/assets/esri/core/workers/chunks/3bf52139340827794c3b.js +0 -1
  160. package/assets/esri/core/workers/chunks/52d02021e858820bc4fa.js +0 -1
  161. package/assets/esri/core/workers/chunks/64b8f65e2ef6cbf08380.js +0 -1
  162. package/assets/esri/core/workers/chunks/78aede1e114deefacb54.js +0 -1
  163. package/assets/esri/core/workers/chunks/7ef100158ca28631fcaf.js +0 -1
  164. package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +0 -1
  165. package/assets/esri/core/workers/chunks/964795dfb57f0d0635d0.js +0 -1
  166. package/assets/esri/core/workers/chunks/99ce0a202dcd3d7dc290.js +0 -1
  167. package/assets/esri/core/workers/chunks/abe6c99a1a719543dbe8.js +0 -1
  168. package/assets/esri/core/workers/chunks/c3bf44146fddfe8990f7.js +0 -1
  169. package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +0 -1
  170. package/assets/esri/core/workers/chunks/e15b5d7e46a834eacc57.js +0 -1
  171. package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +0 -1
  172. package/assets/esri/core/workers/chunks/e305d20e4424451cab5b.js +0 -1
  173. package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3036,3172,5732,9880],{99880:(e,t,r)=>{r.d(t,{V:()=>l});var n=r(68773),s=(r(3172),r(20102)),o=r(92604),i=r(81271);const a=o.Z.getLogger("esri.assets");function l(e){if(!n.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(n.default.assetsPath,e)}},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>s});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},88764:(e,t,r)=>{r.d(t,{q:()=>l});var n,s,o,i=r(5732),a={exports:{}};n=a,s=function(){function e(r,n,s,o,i){for(;o>s;){if(o-s>600){var a=o-s+1,l=n-s+1,c=Math.log(a),h=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*h*(a-h)/a)*(l-a/2<0?-1:1);e(r,n,Math.max(s,Math.floor(n-l*h/a+u)),Math.min(o,Math.floor(n+(a-l)*h/a+u)),i)}var d=r[n],f=s,m=o;for(t(r,s,n),i(r[o],d)>0&&t(r,s,o);f<m;){for(t(r,f,m),f++,m--;i(r[f],d)<0;)f++;for(;i(r[m],d)>0;)m--}0===i(r[s],d)?t(r,s,m):t(r,++m,o),m<=n&&(s=m+1),n<=m&&(o=m-1)}}function t(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function r(e,t){return e<t?-1:e>t?1:0}return function(t,n,s,o,i){e(t,n,s||0,o||t.length-1,i||r)}},void 0!==(o=s())&&(n.exports=o);const l=(0,i.g)(a.exports)},2368:(e,t,r)=>{r.d(t,{J:()=>h,j:()=>u});var n=r(43697),s=r(92036),o=(r(80442),r(22974)),i=(r(92604),r(70586)),a=r(31263),l=r(1153),c=r(52011);const h=e=>{let t=class extends e{clone(){const e=(0,i.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,r=e.store,n={},s=new Map;for(const e in t){const i=t[e],l=r?.originOf(e),c=i.clonable;if(i.readOnly||!1===c||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const h=this[e];let u=null;u="function"==typeof c?c(h):"reference"===c?h:(0,o.Vo)(h),null!=h&&null==u||(l===a.s3.DEFAULTS?s.set(e,u):n[e]=u)}const c=new(0,Object.getPrototypeOf(this).constructor)(n);if(s.size){const e=(0,l.vw)(c)?.store;if(e)for(const[t,r]of s)e.set(t,r,a.s3.DEFAULTS)}return c}};return t=(0,n._)([(0,c.j)("esri.core.Clonable")],t),t};let u=class extends(h(s.Z)){};u=(0,n._)([(0,c.j)("esri.core.Clonable")],u)},10661:(e,t,r)=>{r.d(t,{s:()=>s});var n=r(42100);class s extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},24133:(e,t,r)=>{r.d(t,{Q:()=>a});var n=r(67676),s=r(70586),o=r(44553),i=r(88764);class a{constructor(e=9,t){this._compareMinX=u,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),_.prune(),b.prune(),v.prune(),M.prune()}all(e){this._all(this._data,e)}search(e,t){let r=this._data;const n=this._toBBox;if(w(e,r))for(_.clear();r;){for(let s=0,o=r.children.length;s<o;s++){const o=r.children[s],i=r.leaf?n(o):o;w(e,i)&&(r.leaf?t(o):x(e,i)?this._all(o,t):_.push(o))}r=_.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!w(e,t))return!1;for(_.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],o=t.leaf?r(s):s;if(w(e,o)){if(t.leaf||x(e,o))return!0;_.push(s)}}t=_.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new S([]),this}remove(e){if(!e)return this;let t,r=this._data,o=null,i=0,a=!1;const l=this._toBBox(e);for(v.clear(),M.clear();r||v.length>0;){if(r||(r=(0,s.j0)(v.pop()),o=v.data[v.length-1],i=M.pop()??0,a=!0),r.leaf&&(t=(0,n.cq)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),v.push(r),this._condense(v),this;a||r.leaf||!x(r,l)?o?(i++,r=o.children[i],a=!1):r=null:(v.push(r),M.push(i),i=0,o=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let r=e;for(b.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else b.pushArray(r.children);r=b.pop()??null}}_build(e,t,r,n){const s=r-t+1;let o=this._maxEntries;if(s<=o){const n=new S(e.slice(t,r+1));return l(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/o**(n-1)));const i=new O([]);i.height=n;const a=Math.ceil(s/o),c=a*Math.ceil(Math.sqrt(o));y(e,t,r,c,this._compareMinX);for(let s=t;s<=r;s+=c){const t=Math.min(s+c-1,r);y(e,s,t,a,this._compareMinY);for(let r=s;r<=t;r+=a){const s=Math.min(r+a-1,t);i.children.push(this._build(e,r,s,n-1))}}return l(i,this._toBBox),i}_chooseSubtree(e,t,r,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==r;){let r,n=1/0,s=1/0;for(let o=0,i=t.children.length;o<i;o++){const i=t.children[o],a=f(i),l=p(e,i)-a;l<s?(s=l,n=a<n?a:n,r=i):l===s&&a<n&&(n=a,r=i)}t=r||t.children[0]}return t}_insert(e,t,r){const n=this._toBBox,s=r?e:n(e);v.clear();const o=this._chooseSubtree(s,this._data,t,v);for(o.children.push(e),h(o,s);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;this._adjustParentBBoxes(s,v,t)}_split(e,t){const r=e.data[t],n=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,n);const o=this._chooseSplitIndex(r,s,n);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const i=r.children.splice(o,r.children.length-o),a=r.leaf?new S(i):new O(i);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new O([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let n,s,o;n=s=1/0;for(let i=t;i<=r-t;i++){const t=c(e,0,i,this._toBBox),a=c(e,i,r,this._toBBox),l=g(t,a),h=f(t)+f(a);l<n?(n=l,o=i,s=h<s?h:s):l===n&&h<s&&(s=h,o=i)}return o}_chooseSplitAxis(e,t,r){const n=e.leaf?this._compareMinX:u,s=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,r,n)<this._allDistMargin(e,t,r,s)&&e.children.sort(n)}_allDistMargin(e,t,r,n){e.children.sort(n);const s=this._toBBox,o=c(e,0,t,s),i=c(e,r-t,r,s);let a=m(o)+m(i);for(let n=t;n<r-t;n++){const t=e.children[n];h(o,e.leaf?s(t):t),a+=m(o)}for(let n=r-t-1;n>=t;n--){const t=e.children[n];h(i,e.leaf?s(t):t),a+=m(i)}return a}_adjustParentBBoxes(e,t,r){for(let n=r;n>=0;n--)h(t.data[n],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const s=e.data[t-1],o=s.children;o.splice((0,n.cq)(o,r,o.length,s.indexHint),1)}else this.clear();else l(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){c(e,0,e.children.length,t,e)}function c(e,t,r,n,s){s||(s=new S([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let o,i=t;i<r;i++)o=e.children[i],h(s,e.leaf?n(o):o);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,s-r)*Math.max(0,o-n)}function x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function y(e,t,r,n,o){const a=[t,r];for(;a.length;){const t=(0,s.j0)(a.pop()),r=(0,s.j0)(a.pop());if(t-r<=n)continue;const l=r+Math.ceil((t-r)/n/2)*n;(0,i.q)(e,l,r,t,o),a.push(r,l,l,t)}}const _=new o.Z,b=new o.Z,v=new o.Z,M=new o.Z({deallocator:void 0});class q{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends q{constructor(){super(...arguments),this.height=1,this.indexHint=new n.SO}}class S extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class O extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},61787:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var n=r(80442),s=r(24133),o=r(66459);class i{async createIndex(e,t){const r=new Array;if(!e.vertexAttributes||!e.vertexAttributes.position)return new s.Q;const n=this._createMeshData(e),o=null!=t?await t.invoke("createIndexThread",n,{transferList:r}):this.createIndexThread(n).result;return this._createPooledRBush().fromJSON(o)}createIndexThread(e){const t=new Float64Array(e.position),r=this._createPooledRBush();return e.components?this._createIndexComponentsThread(r,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(r,t)}_createIndexAllThread(e,t){const r=new Array(t.length/9);let n=0;for(let e=0;e<t.length;e+=9)r[n++]=a(t,e,e+3,e+6);return e.load(r),{result:e.toJSON()}}_createIndexComponentsThread(e,t,r){let n=0;for(const e of r)n+=e.length/3;const s=new Array(n);let o=0;for(const e of r)for(let r=0;r<e.length;r+=3)s[o++]=a(t,3*e[r],3*e[r+1],3*e[r+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const t=(e.vertexSpace.isRelative?(0,o.I5)({position:e.vertexAttributes.position,normal:null,tangent:null},e.vertexSpace,e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:t}:{position:t,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new s.Q(9,(0,n.Z)("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function a(e,t,r,n){return{minX:Math.min(e[t],e[r],e[n]),maxX:Math.max(e[t],e[r],e[n]),minY:Math.min(e[t+1],e[r+1],e[n+1]),maxY:Math.max(e[t+1],e[r+1],e[n+1]),p0:[e[t],e[t+1],e[t+2]],p1:[e[r],e[r+1],e[r+2]],p2:[e[n],e[n+1],e[n+2]]}}},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var n=r(68773),s=r(40330),o=r(20102),i=r(80442),a=r(22974),l=r(95330),c=r(81271),h=r(19745),u=r(71058),d=r(85958);async function f(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,c.u0)(t.query.toString().replaceAll("+"," ")));const a=(0,c.HK)(e),h=(0,c.jc)(e);h||a||(e=(0,c.Fv)(e));const x={url:e,requestOptions:{...t}};let w=(0,c.oh)(e);if(w){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=M("request:interceptor",e,t)}if((n instanceof Error||n instanceof o.Z)&&(r=M("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(w,x);if(null!=e)return{data:e,getHeader:_,httpStatus:200,requestOptions:x.requestOptions,url:x.url};w.after||w.error||(w=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType&&((0,i.Z)("host-webworker")||(0,i.Z)("host-node")))throw M("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x);if("head"===t.method){if(t.body)throw M("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(a||h)throw M("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,i.Z)("host-webworker")?m||(m=await r.e(9884).then(r.bind(r,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),m)return m.execute(e,t);const y=new AbortController;(0,l.fu)(t,(()=>y.abort()));const b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:w,params:x,redoRequest:!1,useIdentity:p.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},v=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,o=e.controller.signal,i=r.body;let a=null,c=null;if(g&&"HTMLFormElement"in globalThis&&(i instanceof FormData?a=i:i instanceof HTMLFormElement&&(a=new FormData(i))),"string"==typeof i&&(c=i),e.fetchOptions={cache:r.cacheBust&&!("polyfill"in f._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:p.priority,redirect:"follow",signal:o},(a||c)&&(e.fetchOptions.body=a||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||a?.get("token")),!e.hasToken&&n.default.apiKey&&(0,u.r)(t)&&(r.query||(r.query={}),r.query.token=n.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!T(t)&&!(0,l.Hc)(o)){let n;"immediate"===r.authMode?(await q(),n=await s.id.getCredential(t,{signal:o}),e.credential=n):"no-prompt"===r.authMode?(await q(),n=await s.id.getCredential(t,{prompt:!1,signal:o}).catch((()=>{})),e.credential=n):s.id&&(n=s.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await S(e)}while(!await E(e,t,r))}catch(r){const n=M("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(n),n}const o=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,c.kl)(o)){const e=(0,c.P$)(o,!0);e&&p.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(r.authorizedCrossOriginNoCorsDomains)}const i=e.credential;if(i&&s.id){const e=s.id.findServerInfo(i.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,i.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):_,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(b);return w?.after?.(v),v}let m;const p=n.default.request,g="FormData"in globalThis,x=[499,498,403,401],w=["COM_0056","COM_0057","SB_0008"],y=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],_=()=>null,b=Symbol();function v(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||f._corsServers.includes(t)||(0,c.kl)(t)}function M(e,t,r,n){let s="Error";const i={url:r.url,requestOptions:r.requestOptions,getHeader:_,ssl:!1};if(t instanceof o.Z)return t.details?(t.details=(0,a.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=i,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n?.status,o=t.message;o&&(s=o),e&&(i.getHeader=e),i.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,i.subCode=t.subcode,i.messageCode=t.messageCode,"string"==typeof t.details?i.messages=[t.details]:i.messages=t.details,i.raw=b in t?t[b]:t}return(0,l.D_)(t)?(0,l.zE)():new o.Z(e,s,i)}async function q(){s.id||await Promise.all([r.e(7126),r.e(6261),r.e(9255),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function T(e){return y.some((t=>t.test(e)))}async function S(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},o=(0,c.jc)(t)||(0,c.HK)(t),a=r.responseType||"json",u=o?0:null!=r.timeout?r.timeout:p.timeout;let m=!1;if(!o){e.useSSL&&(t=(0,c.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let o={...r.query};e.credentialToken&&(o.token=e.credentialToken);let a=(0,c.B7)(o);(0,i.Z)("esri-url-encodes-apostrophe")&&(a=a.replaceAll("'","%27"));const l=t.length+1+a.length;let u;m="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>p.maxUrlLength;const f=r.useProxy||!!(0,c.ed)(t);if(f){const e=(0,c.b7)(t);u=e.path,!m&&u.length+1+l>p.maxUrlLength&&(m=!0),e.query&&(o={...e.query,...o})}if("HEAD"===n.method&&(m||f)){if(m){if(l>p.maxUrlLength)throw M("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw M("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(f)throw M("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(m?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,c.fl)(t,o):(n.body=(0,c.B7)(o),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,o),f&&(e.useProxy=!0,t=`${u}?${t}`),o.token&&g&&n.body instanceof FormData&&!(0,h.P)(t)&&n.body.set("token",o.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(s.id){const r=s.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(m?(0,c.fl)(t,o):t))}let x,w,y=0,_=!1;u>0&&(y=setTimeout((()=>{_=!0,e.controller.abort()}),u));try{if("native-request-init"===r.responseType)w=n,w.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||m||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!o&&!e.useProxy&&p.proxyUrl&&!v(t)){if(x=await f._abortableFetch(t,n),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!f._corsServers.includes(t)&&f._corsServers.push(t)}(t),"native"===r.responseType)w=x;else if("HEAD"!==n.method)if(x.ok){switch(a){case"array-buffer":w=await x.arrayBuffer();break;case"blob":case"image":w=await x.blob();break;default:w=await x.text()}if(y&&(clearTimeout(y),y=0),"json"===a||"xml"===a||"document"===a)if(w)switch(a){case"json":w=JSON.parse(w);break;case"xml":w=O(w,"application/xml");break;case"document":w=O(w,"text/html")}else w=null;if(w){if("array-buffer"===a||"blob"===a){const e=x.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&w["blob"===a?"size":"byteLength"]<=750)try{const e=await new Response(w).json();e.error&&(w=e)}catch{}}"image"===a&&w instanceof Blob&&(w=await B(URL.createObjectURL(w),e,!0))}}else{w=await x.text();try{w=JSON.parse(w)}catch{}}}else w=await B(t,e)}catch(n){if("AbortError"===n.name){if(_)throw new Error("Timeout exceeded");throw(0,l.zE)("Request canceled")}if(!(!x&&n instanceof TypeError&&p.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||v(t))throw n;e.redoRequest=!0,(0,c.tD)({proxyUrl:p.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{y&&clearTimeout(y)}return[x,w]}function O(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function E(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let o,i;if(r&&(r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[b]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[b]=r,o;let a,l=null;o&&(i=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,a=o.messageCode,a=a?.toUpperCase());const c=n.authMode;if(403===i&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===i)&&void 0!==i&&x.includes(i)&&!T(e.params.url)&&(403!==i||a&&!w.includes(a)&&(null==l||2===l&&e.credentialToken))){await q();try{const t=await s.id.getCredential(e.params.url,{error:M("request:server",o,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function B(e,t,r=!1){const n=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchPriority=p.priority,s.src=e,(0,d.fY)(s,e,r,n)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>o});var n=r(81271);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function o(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>c,fY:()=>a,jH:()=>h,jz:()=>u});var n=r(68773),s=r(80442),o=r(95330),i=r(81271);function a(e,t,r=!1,n){return new Promise(((i,a)=>{if((0,o.Hc)(n))return void a(l());let c=()=>{d(),a(new Error(`Unable to load ${t}`))},h=()=>{const t=e;d(),i(t)},u=()=>{if(!e)return;const t=e;d(),t.src="",a(l())};const d=()=>{(0,s.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",h)),c=null,h=null,e=null,null!=n&&n.removeEventListener("abort",u),u=null,r&&URL.revokeObjectURL(t)};null!=n&&n.addEventListener("abort",u),(0,s.Z)("esri-image-decode")?e.decode().then(h,c):(e.addEventListener("error",c),e.addEventListener("load",h))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){n.default.request.crossOriginNoCorsDomains||(n.default.request.crossOriginNoCorsDomains={});const t=n.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,i.P$)(r)??""]=0:(t[(0,i.P$)("http://"+r)??""]=0,t[(0,i.P$)("https://"+r)??""]=0)}function h(e){const t=n.default.request.crossOriginNoCorsDomains;if(t){let r=(0,i.P$)(e);if(r)return r=r.toLowerCase(),!(0,i.D6)(r,(0,i.TI)())&&t[r]<Date.now()-36e5}return!1}async function u(e){const t=n.default.request.crossOriginNoCorsDomains,r=(0,i.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const s=(0,i.mN)(e);e=s.path,"json"===s.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7655],{28924:(e,t,i)=>{i.d(t,{Z:()=>r});class r{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"}}},67651:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>se,constructFeatureSet:()=>ie,constructFeatureSetFromPortalItem:()=>ce,constructFeatureSetFromRelationship:()=>ae,constructFeatureSetFromUrl:()=>te,convertToFeatureSet:()=>de,createFeatureSetCollectionFromMap:()=>oe,createFeatureSetCollectionFromService:()=>ue,initialiseMetaDataCache:()=>Y});var r=i(3172),s=i(28924),a=i(84328),n=i(38171),l=i(61363),o=i(70409),u=i(85065),d=i(91136),c=i(90961),h=i(3823),f=i(90658),p=i(36515),_=i(95002),y=i(59987),g=i(41534);class m{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i){const r=new m;r.field=e;const s=g.WhereClause.create(t,i),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 y.eS(y.f.MissingStatisticParameters);const t=g.WhereClause.create((0,p.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===a)throw new y.eS(y.f.UnsupportedSqlFunction,{function:""});const n=a.name.toUpperCase().trim();if("MIN"===n){if(r.typeofstat="MIN",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:"min"})}else if("MAX"===n){if(r.typeofstat="MAX",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===n)r.typeofstat="COUNT",r.workingexpr=a.expr;else if("STDEV"===n){if(r.typeofstat="STDDEV",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===n){if(r.typeofstat="SUM",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===n){if(r.typeofstat="AVG",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:n})}else if("AVG"===n){if(r.typeofstat="AVG",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==n)throw new y.eS(y.f.UnsupportedSqlFunction,{function:n});if(r.typeofstat="VAR",r.workingexpr=a.expr,null===s)throw new y.eS(y.f.InvalidFunctionParameters,{function:"var"})}return r}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 w=i(44543),S=i(82971),F=i(1231),b=i(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class C extends d.Z{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 f.dj.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 b.Z([]);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 m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r),t.typeofstat=I(e.statistic),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 g.WhereClause?e.expression:g.WhereClause.create(e.expression,r)};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}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new S.Z({wkid:4326});this.fields=[];const s=new m;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=g.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new F.Z;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,p.y5)(t.expression)){const e=this._parent.getField((0,p.zR)(t.expression,f.Bj.Standardised));if(!e)throw new y.EN(y.H9.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type}else{i.type=this._convertToEsriFieldType((0,p.DT)(t.expression,this._parent.fields));const e=new F.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new o.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new o.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new F.Z;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 a=null!==s.workingexpr&&(0,p.y5)(s.workingexpr)?(0,p.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==a){if(r=this._parent.getField(a),!r)throw new y.EN(y.H9.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==a){if(r=this._parent.getField(a),!r)throw new y.EN(y.H9.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==a&&(r=this._parent.getField(a),!r))throw new y.EN(y.H9.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 c.Z([],[],!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,p.hq)(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 c.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new c.Z(a._candidates.slice(0),a._known.slice(0),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let d=this._parent;if(this._adaptedFields.length>0&&(d=new o.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:d,orderbyclause:new h.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=d;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:e,orderbyclause:new h.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,p.bB)(e,t.tofieldname,(0,p.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,p.bB)(e,t.tofieldname,(0,p.zR)(t.expression,f.Bj.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()];this._featureCache[t.attributes[this.objectIdField]]=new n.Z(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise(((s,a)=>{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,(a=>{null===a?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))}),a)}))}_nextAggregateItem(e,t,i,r,s,a){try{(0,l.Z)(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(let i=0;i<e.features.length;i++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[i]);null!==s&&r.push(s)}else r.push(null);switch(t.typeofstat){case"MIN":i.attributes[t.tofieldname]=(0,_.tj)("min",r,-1);break;case"MAX":i.attributes[t.tofieldname]=(0,_.tj)("max",r,-1);break;case"SUM":i.attributes[t.tofieldname]=(0,_.tj)("sum",r,-1);break;case"COUNT":i.attributes[t.tofieldname]=r.length;break;case"VAR":i.attributes[t.tofieldname]=(0,_.tj)("var",r,-1);break;case"STDDEV":i.attributes[t.tofieldname]=(0,_.tj)("stddev",r,-1);break;case"AVG":i.attributes[t.tofieldname]=(0,_.tj)("avg",r,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:i.expression.calculateValue(e.features[0]);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));return this._featureCache[t.attributes[this.objectIdField]]=new n.Z({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,w.F)(t,w.M.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){d.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var v=i(53073),D=i(63991),R=i(80692),T=i(40330),k=i(33955),x=i(19238),N=i(20102),A=i(80442),E=i(95330),L=i(2981),O=i(10158),P=i(4967),Z=i(53261),j=i(74889),G=i(14165);function B(e,t){return null!=t&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}i(68773),i(67676),i(81271),i(98326),i(56545);var q=i(41818),U=(i(66577),i(16306),i(45091),i(67900),i(8744),i(5396)),M=(i(98732),i(75935)),W=(i(28141),i(58539)),V=i(33586),Q=i(4632);class z extends d.Z{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,this._cachedDateMetaData={},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 f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,f.hd)(e.toJSON());return(0,w.F)(t,w.M.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(0),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=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._layer instanceof Q.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}_isInFeatureSet(){return f.dj.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 G.Z;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}pbfSupportedForQuery(e){const t=this._layer?.capabilities?.query;return!e.outStatistics&&!0===t?.supportsFormatPBF&&!0===t?.supportsQuantizationEditMode}async queryPBF(e){return e.quantizationParameters={mode:"edit"},(await async function(e,t,r,s){return async function(e,t,r,s){const a=r?.infoFor3D;if(!(B(e,a)&&null!=a&&t.assetMaps&&t.features&&t.features.length))return j.Z.fromJSON(t);const{meshFeatureSetFromJSON:n}=await(0,E.Hl)(Promise.all([i.e(6481),i.e(6459),i.e(7697)]).then(i.bind(i,87697)),s);return n(e,a,t)}(t,await async function(e,t,i,r){const s={...r},a=function(e,t){let i=G.Z.from(e);i.sourceSpatialReference=i.sourceSpatialReference??t?.sourceSpatialReference??null,(t?.gdbVersion||t?.dynamicDataSource)&&(i=i===e?i.clone():i,i.gdbVersion=e.gdbVersion||t.gdbVersion,i.dynamicDataSource=e.dynamicDataSource?O.n.from(e.dynamicDataSource):t.dynamicDataSource);const r=t?.infoFor3D;if(null!=r&&B(e,r)){i=i===e?i.clone():i,i.formatOf3DObjects=null;const{supportedFormats:t,queryFormats:s}=r,a=(0,L.S0)("model/gltf-binary",t)??(0,L.Ow)("glb",t),n=(0,L.S0)("model/gltf+json",t)??(0,L.Ow)("gtlf",t);for(const e of s){if(e===a){i.formatOf3DObjects=e;break}e!==n||i.formatOf3DObjects||(i.formatOf3DObjects=e)}if(!i.formatOf3DObjects)throw new N.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==i.outFields||!i.outFields.includes("*")){i=i===e?i.clone():i,null==i.outFields&&(i.outFields=[]);const{originX:t,originY:s,originZ:a,translationX:n,translationY:l,translationZ:o,scaleX:u,scaleY:d,scaleZ:c,rotationX:h,rotationY:f,rotationZ:p,rotationDeg:_}=r.transformFieldRoles;i.outFields.push(t,s,a,n,l,o,u,d,c,h,f,p,_)}}return i}(t,i),n=null!=t.outStatistics?.[0],l=(0,A.Z)("featurelayer-pbf-statistics"),o=!n||l;let u;if("pbf"===i?.format&&o)try{u=await(0,Z.t)(e,a,s)}catch(e){if("query:parsing-pbf"!==e.name)throw e;i.format="json"}return"json"!==i?.format&&o||(u=await(0,P.F)(e,a,s)),function(e,t){if(null!=e&&null!=t)for(const i of t){const t=e.get(i.name);t&&Object.assign(i,t.toJSON())}}(i?.fieldsIndex,u.fields),u}(e,t,r,s),r,s)}(this._layer.parsedUrl,e,{format:"pbf"},{})).unquantize()}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}}executeQuery(e,t){e.returnZ=this.hasZ,e.returnM=this.hasM;const i="execute"===t?P.e:"executeForCount"===t?q.P:U.G,r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(t),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(t,s),s=s.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}async _getFilteredSet(e,t,i,r,s){const a=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let n="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),l=!0);const o=new G.Z;this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.where=null===i?null===t?"1=1":"":(0,p.zR)(i,a),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==n?n.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 c.Z([],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 a="",n=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),n=!0);const l=await this.databaseType();let o=null===i?null===t?"1=1":"":(0,p.zR)(i,l);this._layer.definitionExpression&&this._useDefinitionExpression&&(o=""!==o?"(("+this._layer.definitionExpression+") AND ("+o+"))":this._layer.definitionExpression);let u=this._maxQueryRate();const d=this._layer.capabilities?.query.maxRecordCount;null!=d&&d<u&&(u=d);let h=null;if(!0===this._pageJustIds)h=new c.Z([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:a,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 c.Z([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:a,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,a=e.pagesDefinition.internal.lastPage,n=new G.Z;this._requestStandardised&&(n.sqlFormat="standard"),this.datesInUnknownTimezone&&(n.timeReferenceUnknownClient=!0),n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==a)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(0);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 a=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,a++,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(a>=i&&0===s.length)break}if(0===s.length)return"success";const n=new G.Z;this._requestStandardised&&(n.sqlFormat="standard"),this.datesInUnknownTimezone&&(n.timeReferenceUnknownClient=!0),n.objectIds=s,n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0,!0===this._removeGeometry&&(n.returnGeometry=!1),n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new y.EN(y.H9.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,a,n,l,o){await this._ensureLoaded();const u=await this.databaseType();let d=i.parseTree.column;const c=this._layer.fields??[];for(let e=0;e<c.length;e++)if(c[e].name.toLowerCase()===d.toLowerCase()){d=c[e].name;break}const h=new G.Z;this._requestStandardised&&(h.sqlFormat="standard"),this.datesInUnknownTimezone&&(h.timeReferenceUnknownClient=!0);let f=null===a?null===s?"1=1":"":(0,p.zR)(a,u);this._layer.definitionExpression&&this._useDefinitionExpression&&(f=""!==f?"(("+this._layer.definitionExpression+") AND ("+f+"))":this._layer.definitionExpression),h.where=f,h.spatialRelationship=this._makeRelationshipEnum(r),h.relationParameter=this._makeRelationshipParam(r),h.geometry=null===s?null:s,h.returnDistinctValues=!0,h.returnGeometry=!1,h.outFields=[d];const _=await this.executeQuery(h,"execute");if(this._checkCancelled(o),!_.hasOwnProperty("features"))throw new y.EN(y.H9.InvalidStatResponse);let g=!1;for(let e=0;e<c.length;e++)if(c[e].name===d){"date"===c[e].type&&(g=!0);break}for(let e=0;e<_.features.length;e++){if(g){const t=_.features[e].attributes[d];null!==t?l.push(new Date(t)):l.push(t)}else l.push(_.features[e].attributes[d]);if(l.length>=n)break}return 0===_.features.length?l:_.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<n?{calculated:!0,result:await this._getDistinctPages(e+_.features.length,t,i,r,s,a,n,l,o)}:l}async _distinctStat(e,t,i,r,s,a,n){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,a,[],n)}}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(),a=new G.Z;if(this._requestStandardised&&(a.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===r?null===i?"1=1":"":(0,p.zR)(r,s);return this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),a.where=n,this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.where=n,a.spatialRelationship=this._makeRelationshipEnum(t),a.relationParameter=this._makeRelationshipParam(t),a.geometry=null===i?null:i,a.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(a,"executeForCount")}}async _stats(e,t,i,r,s,a,n){await this._ensureLoaded();const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;if("count"===e)return u?this._countstat(e,i,r,s):{calculated:!1};if(!1===o||!1===(0,p.y5)(t)&&!1===l||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n);if("distinct"===e)return!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,a,n):this._distinctStat(e,t,i,r,s,a,n);const d=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const c=new G.Z;this._requestStandardised&&(c.sqlFormat="standard");let h=null===s?null===r?"1=1":"":(0,p.zR)(s,d);this._layer.definitionExpression&&this._useDefinitionExpression&&(h=""!==h?"(("+this._layer.definitionExpression+") AND ("+h+"))":this._layer.definitionExpression),c.where=h,c.spatialRelationship=this._makeRelationshipEnum(i),c.relationParameter=this._makeRelationshipParam(i),c.geometry=null===r?null:r,this.datesInUnknownTimezone&&(c.timeReferenceUnknownClient=!0);const f=new W.Z;f.statisticType=(0,_.g3)(e),f.onStatisticField=(0,p.zR)(t,d),f.outStatisticFieldName="ARCADE_STAT_RESULT",c.returnGeometry=!1;let g="ARCADE_STAT_RESULT";c.outStatistics=[f];const m=await this.executeQuery(c,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new y.EN(y.H9.InvalidStatResponse);let w=!1;const S=m.fields??[];for(let e=0;e<S.length;e++)if("ARCADE_STAT_RESULT"===S[e].name.toUpperCase()){g=S[e].name,"date"===S[e].type&&(w=!0);break}if(w){let e=m.features[0].attributes[g];return null!==e&&(e=new Date(m.features[0].attributes[g])),{calculated:!0,result:e}}return{calculated:!0,result:m.features[0].attributes[g]}}_stat(e,t,i,r,s,a,n){return this._stats(e,t,i,r,s,a,n)}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,p.y5)(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,a,n){await this._ensureLoaded();const l=await this.databaseType();let o="",u=!1,d=!1;null!==a&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=a.constructClause(),d=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(d=!1,u=!0,o=this._layer.objectIdField);const h=[];for(let e=0;e<t.length;e++){const i=new W.Z;i.onStatisticField=null!==t[e].workingexpr?(0,p.zR)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),h.push(i)}""===o&&(o=e.join(","));let f=this._maxQueryRate();const _=this._layer.capabilities?.query.maxRecordCount;null!=_&&_<f&&(f=_);let y=null===s?null===r?"1=1":"":(0,p.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(y=""!==y?"(("+this._layer.definitionExpression+") AND ("+y+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],d,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:u,generatedOid:n,resultRecordCount:f,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===r?null:r,where:y,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(r=""!==r?"("+r+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const s=e.pagesDefinition.internal.lastRetrieved,a=s,l=e.pagesDefinition.internal.lastPage,o=new G.Z;if(this._requestStandardised&&(o.sqlFormat="standard"),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,this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),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 y.EN(y.H9.InvalidStatResponse);const d=[];if(e.pagesDefinition.internal.lastPage!==l)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[a+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)d.push(new n.Z({attributes:u.features[e].attributes,geometry:null}));return!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,d}static create(e,t,i,r,s){const a=new x.default({url:e,outFields:null===t?["*"]:t});return new z({layer:a,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,s){const a=this._layer.capabilities;if(a?.data.supportsAttachment&&a?.operations.supportsQueryAttachments){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:this._layer,query:a,method:"attachments"});const n=await this._layer.queryAttachments(a),l=[];return n&&n[e]&&n[e].forEach((t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;s&&t.exifInfo&&(r=V.Z.convertJsonToArcade(t.exifInfo,"system",!0)),l.push(new R.Z(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))})),l}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=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t&&t.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const s=r.objectId,a=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new n.Z({geometry:e.geometry?(0,k.im)(e.geometry):null,attributes:e.attributes});a.push(t)}e[s]={features:a,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new y.EN(y.H9.InvalidRequest)}async getFeatureByObjectId(e,t){const i=new G.Z;i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.datesInUnknownTimezone&&(i.timeReferenceUnknownClient=!0),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await(0,P.e)(this._layer.parsedUrl.path,i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=T.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=T.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.substring(0,i):t,t){t+="/rest/info";try{const e=await(0,r.default)(t,{query:{f:"json"}});let i="";return e.data&&e.data.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new z({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 preferredTimeReference(){return void 0===this._cachedDateMetaData.preferredTimeReference&&(this._cachedDateMetaData.preferredTimeReference=this._layer?.preferredTimeReference?.toJSON()??null),this._cachedDateMetaData.preferredTimeReference}get dateFieldsTimeReference(){return void 0===this._cachedDateMetaData.dateFieldsTimeReference&&(this._cachedDateMetaData.dateFieldsTimeReference=this._layer?.dateFieldsTimeReference?.toJSON()??null),this._cachedDateMetaData.dateFieldsTimeReference}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone}get editFieldsInfo(){return void 0===this._cachedDateMetaData.editFieldsInfo&&(this._cachedDateMetaData.editFieldsInfo=this._layer?.editFieldsInfo?.toJSON()??null),this._cachedDateMetaData.editFieldsInfo}get timeInfo(){return void 0===this._cachedDateMetaData.timeInfo&&(this._cachedDateMetaData.timeInfo=this._layer?.timeInfo?.toJSON()??null),this._cachedDateMetaData.timeInfo}}var J=i(17805);class H extends d.Z{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 f.tI}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(0),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}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return f.dj.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 n.Z({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 c.Z([],[],!0,null);const a=this._layer.nativeCapabilities();if(!1===a.canQueryRelated)return new c.Z([],[],!0,null);if(a.capabilities?.queryRelated&&a.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let n="",l=!1;null!==r&&a.capabilities&&a.capabilities.queryRelated&&!0===a.capabilities.queryRelated.supportsOrderBy&&(n=r.constructClause(),l=!0);const o=new M.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 d=!0;!0===this._removeGeometry&&(d=!1),o.returnGeometry=d,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==n?n.split(","):null;const h=await a.source.queryRelatedFeatures(o);this._checkCancelled(s);const f=h[this._findObjectId]?h[this._findObjectId].features:[],p=[];for(let e=0;e<f.length;e++)this._featureCache[f[e].attributes[this._relatedLayer.objectIdField]]=f[e],p.push(f[e].attributes[this._relatedLayer.objectIdField]);const _=t&&null!==e&&""!==e,y=null!=i;return new c.Z(_||y?p:[],_||y?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);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 a="",n=!1;const l=this._layer.nativeCapabilities();null!==r&&l&&l.capabilities?.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(a=r.constructClause(),n=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=t&&null!==e&&""!==e,h=null!=i;let f=null,p=!0;!0===this._removeGeometry&&(p=!1);const _=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);return f=new c.Z(d||h?["GETPAGES"]:[],d||h?[]:["GETPAGES"],n,{outFields:_.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:a,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(f,o,0,0,s),f}_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,a=e.pagesDefinition.internal.lastPage,n=this._layer.nativeCapabilities(),l=new M.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 n.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==a)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 d=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&d&&(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 a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);let n=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(n++,n<=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)))&&!(n>=i&&0===s.length);r++);if(0===s.length)return"success";throw new y.EN(y.H9.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,s,a,n){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 preferredTimeReference(){return this._relatedLayer?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._relatedLayer?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}}var K=i(48039),X=i(65791),$=i(15235);function Y(){null===K.Z.applicationCache&&(K.Z.applicationCache=new K.Z)}async function ee(e,t){if(K.Z.applicationCache){const i=K.Z.applicationCache.getLayerInfo(e);if(i){const r=await i;return new x.default({url:e,outFields:t,sourceJSON:r})}const r=new x.default({url:e,outFields:t}),s=(async()=>(await r.load(),r.sourceJSON))();if(K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,s);try{return await s,r}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return await s,r}return new x.default({url:e,outFields:t})}async function te(e,t,i,r,s,a=null){return ie(await ee(e,["*"]),t,i,r,s,a)}function ie(e,t=null,i=null,r=!0,s=null,a=null){if(e instanceof x.default||e instanceof Q.default){const n={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:a};return 1==!(e.url||!e.source)?new J.Z(n):new z(n)}return ie(e.parent,t,i,r,s,a).filter(g.WhereClause.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),e.parent?.fieldsIndex))}async function re(e){if(null!==K.Z.applicationCache){const t=K.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.default)(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!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return t}async function se(e,t){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null},s=await re(e);if(i.metadata=s,s.controllerDatasetLayers&&void 0!==s.controllerDatasetLayers.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)i.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)i.layerNameLkp[e.id]=e.name;const a=s.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=a;const n=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==K.Z.applicationCache){const e=K.Z.applicationCache.getLayerInfo(i);if(null!==e)return e}const s=(async()=>{const i=await(0,r.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements&&e.layerDataElements[0])return e.layerDataElements[0]}throw new y.EN(y.H9.DataElementsNotFound)})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(i,s);try{return await s}catch(e){throw K.Z.applicationCache.clearLayerInfo(i),e}}return s}(e,a);if(n){i.queryelem=n,i.queryelem&&i.queryelem.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==K.Z.applicationCache){const t=K.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.default)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(s.systemLayers&&void 0!==s.systemLayers.associationsTableId&&null!==s.systemLayers.associationsTableId){const r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG"));let a=await te(e+"/"+s.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null);return await a.load(),i.unVersion>=4&&(a=a.filter(g.WhereClause.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)",a.getFieldsIndex())),await a.load()),{lkp:i.lkp,associations:a,unVersion:i.unVersion,terminals:i.terminals}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}async function ae(e,t,i,r=null,s=null,a=!0,n=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,a,n,l);return new H({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:a,lrucache:n,interceptor:l})}a.Z.registerAction(),C.registerAction(),u.Z.registerAction(),v.Z.registerAction(),D.Z.registerAction();class ne extends s.Z{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overridespref=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overridespref,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(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice(0)).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=[],a=this._map.allLayers.find((t=>{if(t instanceof x.default){if(t.title===e)return!0}else if(t instanceof Q.default){if(t.title===e)return!0;s.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const r=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(r){if(r instanceof x.default)return this._makeAndAddFeatureSet(r,t,i);if(r._materializedTable);else{const e=r.outFields?r:{...r,outFields:["*"]};r._materializedTable=new x.default(e)}return await r._materializedTable.load(),this._makeAndAddFeatureSet(r._materializedTable,t,i)}}for(const r of s){if("not-loaded"===r.loadStatus||"loading"===r.loadStatus)try{await r.load()}catch(e){}const s=r.sublayers.find((t=>t.title===e));if(s)return this._makeAndAddFeatureSet(s,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice(0)).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=[],a=this._map.allLayers.find((t=>{if(t instanceof x.default){if(t.id===e)return!0}else if(t instanceof Q.default){if(t.id===e)return!0;s.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const r=this._map.tables.find((t=>t.id===e));if(r){if(r instanceof x.default)return this._makeAndAddFeatureSet(r,t,i);if(r._materializedTable);else{const e={...r,outFields:["*"]};r._materializedTable=new x.default(e)}return await r._materializedTable.load(),this._makeAndAddFeatureSet(r._materializedTable,t,i)}}for(const r of s){if("not-loaded"===r.loadStatus||"loading"===r.loadStatus)try{await r.load()}catch(e){}const s=r.sublayers.find((t=>t.id===e));if(s)return this._makeAndAddFeatureSet(s,t,i)}return null}}class le extends s.Z{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overridespref=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._overridespref,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);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new le(this._url,this._overridespref,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice(0)).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 a=null;for(const t of s.layers??[])t.name===e&&(a=t);if(!a)for(const t of s.tables??[])t.name===e&&(a=t);if(a){const e=await ee(this._url+"/"+a.id,["*"]);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice(0)).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 a=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(a=t);if(!a)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(a=t);if(a){const e=await ee(this._url+"/"+a.id,["*"]);return this._makeAndAddFeatureSet(e,t,i)}return null}}function oe(e,t,i=null,r=null){return new ne(e,t,i,r)}function ue(e,t,i=null,r=null){return new le(e,t,i,r)}function de(e,t,i,r,s){if(null===e)return null;if(e instanceof x.default){switch(t){case"datasource":return ie(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(e,s,e.outFields,!0,i,r)}return null}if(e instanceof Q.default){switch(t){case"datasource":return ie(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(e,s,e.outFields,!0,i,r)}return null}if(e instanceof X.Z){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}if(e instanceof d.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}async function ce(e,t,i,r,s,a,n,l=null){if(K.Z.applicationCache){const o=K.Z.applicationCache.getLayerInfo(e+":"+a.url);if(o){const e=await o;return ie(new x.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]}),i,r,s,n,l)}}const o=new $.default({id:e,portal:a}).load();K.Z.applicationCache&&K.Z.applicationCache.setLayerInfo(e+":"+a.url,o);try{const e=await o;return ie(new x.default({url:(0,f.US)(e.url??"")+"/"+t,outFields:["*"]}),i,r,s,n,l)}catch(t){throw K.Z.applicationCache&&K.Z.applicationCache.clearLayerInfo(e+":"+a.url),t}}},70409:(e,t,i)=>{i.d(t,{$X:()=>_,QP:()=>y,TO:()=>g,Xx:()=>w,yN:()=>m});var r=i(38171),s=i(48853),a=i(77286),n=i(59987),l=i(91136),o=i(90961),u=i(90658),d=i(36515),c=i(70586),h=i(41534),f=i(82971);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class _ 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 y extends p{constructor(e,t,i){super((0,u.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,d.bB)(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}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,u.Bj.Standardised,this.field.name,this.codefield instanceof h.WhereClause?(0,d.zR)(this.codefield,u.Bj.Standardised):this.codefield,e.parameters);return i.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.WhereClause.create(i,(0,c.s3)(t._parent).getFieldsIndex())}}evaluateNodeToWhereClause(e,t,i=null,r=null,a){let l,o,u,c;switch(e.type){case"interval":return(0,d.TE)(this.evaluateNodeToWhereClause(e.value,t,i,r,a),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,g.BADNESS,a));for(let s=0;s<e.clauses.length;s++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[s].operand,t,i,g.BADNESS,a)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[s].value,t,i,g.BADNESS,a);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,g.BADNESS,a)),r+=" END ",r}case"parameter":{const i=a[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if(i instanceof Date)return(0,d.oX)(i,t,null);if(i instanceof s.iG)return(0,d.mA)(i,t,null);if(i instanceof Array){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):i[r]instanceof Date?e.push((0,d.oX)(i[r],t,null)):i[r]instanceof s.iG?e.push((0,d.mA)(i[r],t,null)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":o=[];for(const s of e.value)o.push(this.evaluateNodeToWhereClause(s,t,i,r,a));return o;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,g.BADNESS,a)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,a)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,a)+") ";case"IS":if("null"!==e.right.type)throw new n.eS(n.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new n.eS(n.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" IS NOT NULL )";case"IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let n=!0;for(const t of e.right.value){if("string"!==t.type){n=!1;break}if(void 0===this.lkp[t.value]){n=!1;break}s.push(this.lkp[t.value].toString())}if(n)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" IN ("+s.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,i,r,a)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,a),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" IN ("+c+")) ";case"NOT IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let n=!0;for(const t of e.right.value){if("string"!==t.type){n=!1;break}if(void 0===this.lkp[t.value]){n=!1;break}s.push(this.lkp[t.value].toString())}if(n)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" NOT IN ("+s.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,i,r,a)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" NOT IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,a),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,a)+" NOT IN ("+c+")) ";case"BETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"NOTBETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" NOT BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)+") ";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,a)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,a)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,a)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return(0,d.oX)(e.value,t,null);case"number":return e.value.toString();case"current-time":return(0,d.vR)("date"===e.mode,t);case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":e.column;case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,g.BADNESS,a);return(0,d.fz)(e.name,r,t)}}throw new n.eS(n.f.UnsupportedSyntax,{node:e.type})}extractValue(e){return this.codefield instanceof h.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}g.BADNESS="_!!!_BAD_LKP_!!!!";class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,d.bB)(e,this.field.name,(0,d.zR)(this._sql,u.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this._sql.calculateValueCompiled(e)}}class w extends l.Z{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.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=u.Qk.point,this.typeIdField="",this.types=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.O3)(t),this._wset=new o.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return(0,c.s3)(this._parent)._isInFeatureSet(e)}async _getFeatures(e,t,i,s){const n=[];-1!==t&&void 0===this._featureCache[t]&&n.push(t);const l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return await this._expandPagedSet(e,l,0,0,s),this._getFeatures(e,t,i,s);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&&n.push(e._known[r]),n.length>=l)));r++);if(0===n.length)return"success";e=new o.Z([],n,e._ordered,null);const d=Math.min(n.length,i);await(this._parent?._getFeatures(e,-1,d,s)),this._checkCancelled(s);const c=[];for(let e=0;e<d;e++){const t=this._parent?._featureFromCache(n[e]);void 0!==t&&c.push({geometry:t.geometry,attributes:t.attributes,id:n[e]})}for(const e of c){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.Z({attributes:t,geometry:(0,a.r1)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new n.EN(n.H9.NeverReach)}async _getFilteredSet(e,t,i,r,s){let a=!1;const n=this._reformulateWithoutAdaptions(i);a=n.cannot,i=n.where;let l=!1;if(null!==r){l=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof _)&&!0===r.scanForField(t.field.name)){if(!(t instanceof y)){r=null,l=!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,d.$e)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const u=await(0,c.s3)(this._parent)._getFilteredSet(e,t,i,r,s);let h;return this._checkCancelled(s),h=!0===a?new o.Z(u._candidates.slice(0).concat(u._known.slice(0)),[],!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)):new o.Z(u._candidates.slice(0),u._known.slice(0),!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)),h}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,d.hq)(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,a,n){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,d.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===i&&null===r?this._manualStat(e,t,a,n):{calculated:!1};const u=await(0,c.s3)(this._parent)._stat(e,t,i,r,s,a,n);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,a,n):{calculated:!1}:u}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 _))return!1;const a=[];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,a.push(t)}else a.push(i)}const n=this._reformulateWithoutAdaptions(s);return!n.cannot&&(null!==(s=n.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,a,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,a,l){if(null===this._parent)throw new n.EN(n.H9.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.EN(n.H9.NeverReach);const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const u=this._reformulateWithoutAdaptions(s);if(u.cannot)throw new n.EN(n.H9.NeverReach);return null!==(s=u.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,s,a,l)}}},84328:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(59987),s=i(91136),a=i(90961),n=i(90658),l=i(36515),o=i(95330),u=i(41534),d=i(82971);class c extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),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.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new d.Z({wkid:4326}),this.geometryType=n.Qk.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 a.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===n.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?n.dj.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.y8)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new a.Z([],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]]=n.dj.InFeatureSet:this._idstates[e[t]]=n.dj.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]]=n.dj.InFeatureSet:this._idstates[e[i]]=n.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,i,r,s){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.$e)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,i,r,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new a.Z(n._candidates.slice(0).concat(n._known.slice(0)),[],n._ordered,this._clonePageDefinition(n.pagesDefinition)):new a.Z(n._candidates.slice(0),n._known.slice(0),n._ordered,this._clonePageDefinition(n.pagesDefinition)),o}async _stat(e,t,i,r,s,a,n){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,a,n):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.$e)(this._whereclause,s));const u=await this._parent._stat(e,t,i,r,o,a,n);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,a,n):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.$e)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,s,a,n,o){if(null===this._parent)throw new r.EN(r.H9.NeverReach);return null!==a?null!==this._whereclause&&(a=(0,l.$e)(this._whereclause,a)):a=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,s,a,n,o)}static registerAction(){s.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new c({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.WhereClause&&(t=e),new c({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,i)=>{i.d(t,{Z:()=>o});var r=i(61363),s=i(59987),a=i(91136),n=i(90961),l=i(3823);class o extends a.Z{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 n.Z([],[],!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 a=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.Z)(this._parent._expandPagedSet(e,a,0,0,s)),this.getIdColumnDictionary(e,t,i,s);let n=i+1;const l=[];for(;n<e._known.length&&"GETPAGES"!==e._known[n];)l.push(e._known[n]),n++;i+=l.length;const o=await(0,r.Z)(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.Z)(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.EN(s.H9.NeverReach)}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s);this._checkCancelled(s);const l=new n.Z(a._candidates.slice(0),a._known.slice(0),a._ordered,this._clonePageDefinition(a.pagesDefinition));let o=!0;if(a._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===i||(e=new n.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){a.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.Z(e)})}}}},63991:(e,t,i)=>{i.d(t,{Z:()=>l});var r=i(59987),s=i(91136),a=i(90961),n=i(90658);class l extends s.Z{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 a.Z(t._candidates.slice(0),t._known.slice(0),!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===n.dj.NotInFeatureSet)return t;const i=this._idstates[e];return i===n.dj.InFeatureSet||i===n.dj.NotInFeatureSet?i:t===n.dj.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=n.dj.InFeatureSet,this._countedin++,n.dj.InFeatureSet):(this._idstates[e]=n.dj.NotInFeatureSet,n.dj.NotInFeatureSet):n.dj.Unknown}async _expandPagedSet(e,t,i,s,a){if(null===this._parent)throw new r.EN(r.H9.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 n=await this._parent._expandPagedSet(e,t,i,s,a);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),n}async _getFeatures(e,t,i,r){const s=[],n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,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>n)));r++);if(0===s.length)return"success";const o=new a.Z([],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 n=await this._getSet(s);return new a.Z(n._candidates.slice(0).concat(n._known.slice(0)),[],!1,this._clonePageDefinition(n.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let a=0;a<e._candidates.length;a++){const l=this._isInFeatureSet(e._candidates[a]);if(l===n.dj.InFeatureSet){if(e._known.push(e._candidates[a]),i+=1,null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),e._known.length>=this._topnum)break}else if(l===n.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),i+=1;else if(l===n.dj.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.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,i)=>{i.d(t,{Z:()=>_});var r=i(38171),s=i(59987),a=i(91136),n=i(90961),l=i(90658),o=i(36515),u=i(9361),d=i(19238),c=i(4632),h=i(16451),f=i(1231),p=i(14165);class _ extends a.Z{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.tI}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(0),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}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.Bj.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this._layer instanceof c.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.dj.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 r.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){let a="",u=!1;if(null!==r&&(a=r.constructClause(),u=!0),this.isTable()&&t&&null!==e&&""!==e)return new n.Z([],[],!0,null);const d=new p.Z;d.returnZ=this.hasZ,d.returnM=this.hasM,d.where=null===i?null===t?"1=1":"":(0,o.zR)(i,l.Bj.Standardised),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==a?a.split(","):null,d.geometry=null===t?null:t,d.returnGeometry=!0,d.relationParameter=this._makeRelationshipParam(e);const c=await this._layer.queryFeatures(d);if(null===c)return new n.Z([],[],u,null);this._checkCancelled(s);const h=[];return c.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];h.push(t),this._featureCache[t]=this._changeFeature(e)})),new n.Z([],h,u,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;const e=new p.Z;if(e.where="1=1",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 n.Z([],e,!1,null),this._wset}e.returnZ=this.hasZ,e.returnM=this.hasM;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 n.Z([],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.EN(s.H9.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(h.Z.fromJSON(t));let a=e.layerDefinition.geometryType;void 0===a&&(a=e.featureSet.geometryType||"");let n=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 a=[];for(let i=0;i<n.length;i++)a.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),a[i].attributes[t]=i;n=a,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.Z?o.push(t):o.push(f.Z.fromJSON(t));let c=a;switch(c||(c=""),c){case"esriGeometryPoint":c="point";break;case"esriGeometryPolyline":c="polyline";break;case"esriGeometryPolygon":c="polygon";break;case"esriGeometryEnvelope":c="extent";break;case"esriGeometryMultipoint":c="multipoint";break;case"":case"esriGeometryNull":c="esriGeometryNull"}if("esriGeometryNull"!==c)for(const e of n)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=c,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of n)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:n,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},y="esriGeometryNull"===c||null===c;y||(p.geometryType=c);const g=new d.default(p);return new _({layer:g,spatialReference:t,isTable:y})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=new p.Z;t.where=this.objectIdField+"="+e.toString(),t.returnZ=this.hasZ,t.returnM=this.hasM;const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeReference(){return this._layer?.preferredTimeReference?.toJSON()??null}get dateFieldsTimeReference(){return this._layer?.dateFieldsTimeReference?.toJSON()??null}get datesInUnknownTimezone(){return this._layer?.datesInUnknownTimezone}get editFieldsInfo(){return this._layer?.editFieldsInfo?.toJSON()??null}get timeInfo(){return this._layer?.timeInfo?.toJSON()??null}}},3823:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{Z:()=>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),a=this.featureValue(t.feature,this._fields[i],i);let n=0;if(n=1===this._directions[i]?r(s,a):-1*r(s,a),0!==n)return n}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}}},66643:(e,t,i)=>{i.d(t,{Ed:()=>u,UI:()=>d,mt:()=>p,q6:()=>f,vr:()=>_});var r=i(43697),s=i(92036),a=i(70586),n=i(95330),l=i(5600),o=i(52011);function u(e,t,i){return(0,n.as)(e.map(((e,r)=>t.apply(i,[e,r]))))}async function d(e,t,i){return(await(0,n.as)(e.map(((e,r)=>t.apply(i,[e,r]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return h(e)}}async function p(e){try{return c(await e)}catch(e){return(0,n.r9)(e),h(e)}}function _(e,t){return new y(e,t)}let y=class extends s.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,a.IM)(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=c(e),this._cleanup()}),(e=>{this._result=h(e),this._cleanup()})),this._abortHandle=(0,n.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,a.hw)(this._abortHandle),this._abortController=null}};(0,r._)([(0,l.Cb)()],y.prototype,"value",null),(0,r._)([(0,l.Cb)()],y.prototype,"error",null),(0,r._)([(0,l.Cb)()],y.prototype,"finished",null),(0,r._)([(0,l.Cb)()],y.prototype,"promise",void 0),(0,r._)([(0,l.Cb)()],y.prototype,"_result",void 0),y=(0,r._)([(0,o.j)("esri.core.asyncUtils.ReactiveTask")],y)},87085:(e,t,i)=>{i.d(t,{Z:()=>w});var r=i(43697),s=(i(66577),i(3172)),a=i(20102),n=i(32448),l=i(10699),o=i(83379),u=i(92604),d=i(95330),c=i(81271),h=i(5600),f=(i(75215),i(67676),i(80442),i(52011)),p=i(68773),_=i(6570),y=i(82971);let g=0,m=class extends(n.Z.EventedMixin((0,l.IG)(o.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new _.Z(-180,-90,180,90,y.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(8008).then(i.bind(i,28008));try{return await r(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||p.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"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):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new a.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.Cb)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.Cb)({type:_.Z})],m.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,r._)([(0,h.Cb)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,r._)([(0,h.Cb)({clonable:!1})],m.prototype,"parent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,r._)([(0,h.Cb)({type:y.Z})],m.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({type:String})],m.prototype,"title",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],m.prototype,"url",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,r._)([(0,f.j)("esri.layers.Layer")],m);const w=m},66677:(e,t,i)=>{i.d(t,{B5:()=>d,DR:()=>h,G:()=>w,M8:()=>_,Nm:()=>y,Qc:()=>c,XG:()=>g,a7:()=>p,ld:()=>f,wH:()=>m});var r=i(81271),s=i(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},n=Object.values(a),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${n.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${n.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!l.test(e)}function c(e){if(null==e)return null;const t=(0,r.mN)(e),i=t.path.match(l)||t.path.match(o);if(!i)return null;const[,s,n,u,d]=i,c=n.indexOf("/");return{title:f(-1!==c?n.slice(c+1):n),serverType:a[u.toLowerCase()],sublayer:null!=d&&""!==d?parseInt(d,10):null,url:{path:s}}}function h(e){const t=(0,r.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function p(e,t){const i=[];if(e){const t=c(e);null!=t&&t.title&&i.push(t.title)}if(t){const e=f(t);i.push(e)}if(2===i.length){if(i[0].toLowerCase().includes(i[1].toLowerCase()))return i[0];if(i[1].toLowerCase().includes(i[0].toLowerCase()))return i[1]}return i.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),i=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&i}function y(e,t){return e?(0,r.Qj)((0,r.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,r.Hu)(t,e.logger);const i=(0,r.mN)(t),s=c(i.path);let a;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(a=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=h(i.path);null!=e&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,r.Qj)(t),layerId:a}}function m(e,t,i,a,n){(0,s.w)(t,a,"url",n),a.url&&null!=e.layerId&&(a.url=(0,r.v_)(a.url,i,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),i=t.includes("/services/"),r=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),a=t.includes("/wmsserver");return i&&(r||s||a)}},2981:(e,t,i)=>{i.d(t,{$6:()=>d,Ow:()=>a,S0:()=>s,d1:()=>n});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return o(function(e,t){return l(t).find((t=>u(t)===e))}(e,t))}function a(e,t){return o(function(e,t){const i=e.toLowerCase();return l(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>i.endsWith(e)))))}(e,t))}function n(e,t){return u(function(e,t){return l(t).find((t=>o(t)===e))}(e,t))}function l(e){return[...r,...e]}function o(e){return e?.[0]}function u(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},14661:(e,t,i)=>{i.d(t,{$o:()=>d,Fj:()=>o,Kz:()=>c,Ss:()=>h,_$:()=>l,ck:()=>u,qj:()=>n});var r=i(44547),s=i(82971),a=i(40488);function n(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,c.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function d(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,a.Sx)(e);const i=s.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const c={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function h(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let a=!s||s.includes("features:user:edit"),n=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?n=a=!0:n&&(a=!0),{features:{edit:a,fullEdit:n},content:{updateItem:l}}}},41818:(e,t,i)=>{i.d(t,{P:()=>n});var r=i(11282),s=i(34599),a=i(14165);async function n(e,t,i){const n=(0,r.en)(e);return(0,s.hH)(n,a.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>n});var r=i(11282),s=i(34599),a=i(14165);async function n(e,t,i){const n=(0,r.en)(e);return(0,s.Ev)(n,a.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>o,e:()=>l});var r=i(11282),s=i(34599),a=i(74889),n=i(14165);async function l(e,t,i){const r=await o(e,t,i);return a.Z.fromJSON(r)}async function o(e,t,i){const a=(0,r.en)(e),l={...i},o=n.Z.from(t),{data:u}=await(0,s.JT)(a,o,o.sourceSpatialReference,l);return u}},53261:(e,t,i)=>{i.d(t,{t:()=>y});var r=i(11282),s=i(70586),a=i(69285),n=i(98732);function l(e,t){return t}function o(e,t,i,r){switch(i){case 0:return h(e,t+r,0);case 1:return"lowerLeft"===e.originPosition?h(e,t+r,1):function({translate:e,scale:t},i,r){return e[r]-i*t[r]}(e,t+r,1)}}function u(e,t,i,r){return 2===i?h(e,t,2):o(e,t,i,r)}function d(e,t,i,r){return 2===i?h(e,t,3):o(e,t,i,r)}function c(e,t,i,r){return 3===i?h(e,t,3):u(e,t,i,r)}function h({translate:e,scale:t},i,r){return e[r]+i*t[r]}class f{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=l,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,a.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const i of e.features)t(i.geometry)}createSpatialReference(){return{}}addField(e,t){const i=e.fields;(0,s.O3)(i),i.push(t);const r=i.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,i)=>this.addCoordinatePoint(e,t,i),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,i)=>this._addCoordinatePolygon(e,t,i),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,i)=>this._addCoordinatePolyline(e,t,i),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,i)=>this._addCoordinateMultipoint(e,t,i),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,i){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:i,queryGeometryType:r}=t,s=(0,n.$g)(i.clone(),i,!1,!1,this._transform),a=(0,n.di)(s,r,!1,!1);e.queryGeometryType=r,e.queryGeometry={...a}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,i){const r=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(r,t,i,0),i){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let i=0;t<=1&&(i=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const r=(0,s.s3)(this._transform,"transform");return this._applyTransform(r,e,t,i)}_addCoordinatePolyline(e,t,i){this._dehydratedAddPointsCoordinate(e.paths,t,i)}_addCoordinatePolygon(e,t,i){this._dehydratedAddPointsCoordinate(e.rings,t,i)}_addCoordinateMultipoint(e,t,i){0===i&&e.points.push([]);const r=this._transformPathLikeValue(t,i);e.points[e.points.length-1].push(r)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,i){0===i&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const r=this._transformPathLikeValue(t,i),s=e[e.length-1];0===i&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=r}_deriveApplyTransform(e){const{hasZ:t,hasM:i}=e;return t&&i?c:t?u:i?d:o}}var p=i(34599),_=(i(74889),i(14165));async function y(e,t,i){const s=(0,r.en)(e),a={...i},n=_.Z.from(t),l=!n.quantizationParameters,{data:o}=await(0,p.qp)(s,n,new f({sourceSpatialReference:n.sourceSpatialReference,applyTransform:l}),a);return o}},28694:(e,t,i)=>{i.d(t,{p:()=>s});var r=i(69285);function s(e,t,i){if(!i||!i.features||!i.hasZ)return;const s=(0,r.k)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,s=i(43697),a=i(96674),n=i(5600),l=i(75215),o=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let d=r=class extends a.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r&&r.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,n.Cb)({type:String})],d.prototype,"contentType",void 0),(0,s._)([(0,n.Cb)()],d.prototype,"exifInfo",void 0),(0,s._)([(0,n.Cb)({readOnly:!0})],d.prototype,"orientationInfo",null),(0,s._)([(0,n.Cb)({type:l.z8})],d.prototype,"id",void 0),(0,s._)([(0,n.Cb)({type:String})],d.prototype,"globalId",void 0),(0,s._)([(0,n.Cb)({type:String})],d.prototype,"keywords",void 0),(0,s._)([(0,n.Cb)({type:String})],d.prototype,"name",void 0),(0,s._)([(0,n.Cb)({json:{read:!1}})],d.prototype,"parentGlobalId",void 0),(0,s._)([(0,n.Cb)({json:{read:!1}})],d.prototype,"parentObjectId",void 0),(0,s._)([(0,n.Cb)({type:l.z8})],d.prototype,"size",void 0),(0,s._)([(0,n.Cb)({json:{read:!1}})],d.prototype,"url",void 0),d=r=(0,s._)([(0,o.j)("esri.layers.support.AttachmentInfo")],d);const c=d}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2278],{46851:(t,e,n)=>{n.d(e,{R:()=>s,a:()=>u,g:()=>i,t:()=>l});let r=1e-6;function i(){return r}const s=Math.random,o=Math.PI/180,a=180/Math.PI;function l(t){return t*o}function u(t){return t*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:s,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:u,toRadian:l},Symbol.toStringTag,{value:"Module"}))},17896:(t,e,n)=>{n.d(e,{A:()=>m,C:()=>f,D:()=>h,a:()=>l,b:()=>u,c:()=>o,d:()=>d,e:()=>M,f:()=>g,g:()=>c,h:()=>_,i:()=>p,j:()=>N,k:()=>v,l:()=>s,m:()=>w,n:()=>x,p:()=>y,q:()=>b,r:()=>P,s:()=>a,t:()=>S,u:()=>z});var r=n(65617),i=n(46851);function s(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function c(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function m(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function p(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function d(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function y(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function x(t,e){const n=e[0],r=e[1],i=e[2];let s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s),t}function M(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function g(t,e,n){const r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2];return t[0]=i*l-s*a,t[1]=s*o-r*l,t[2]=r*a-i*o,t}function _(t,e,n,r){const i=e[0],s=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t}function w(t,e,n){const r=e[0],i=e[1],s=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*s+n[12],t[1]=n[1]*r+n[5]*i+n[9]*s+n[13],t[2]=n[2]*r+n[6]*i+n[10]*s+n[14],t}function S(t,e,n){const r=e[0],i=e[1],s=e[2];return t[0]=r*n[0]+i*n[3]+s*n[6],t[1]=r*n[1]+i*n[4]+s*n[7],t[2]=r*n[2]+i*n[5]+s*n[8],t}function b(t,e,n){const r=n[0],i=n[1],s=n[2],o=n[3],a=e[0],l=e[1],u=e[2];let f=i*u-s*l,h=s*a-r*u,c=r*l-i*a,m=i*c-s*h,p=s*f-r*c,d=r*h-i*f;const y=2*o;return f*=y,h*=y,c*=y,m*=2,p*=2,d*=2,t[0]=a+f+m,t[1]=l+h+p,t[2]=u+c+d,t}const R=(0,r.c)(),C=(0,r.c)();function v(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function P(t,e,n){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2];let o=r*r+i*i+s*s;return o>0?(o=1/Math.sqrt(o),t[0]=r*o,t[1]=i*o,t[2]=s*o,t):(t[0]=0,t[1]=0,t[2]=0,t)}const A=u,I=f,Z=h,N=p,k=d,z=s,G=y;Object.freeze(Object.defineProperty({__proto__:null,abs:function(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t},add:l,angle:function(t,e){o(R,t),o(C,e),x(R,R),x(C,C);const n=M(R,C);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,s){const o=1-s,a=o*o,l=s*s,u=a*o,f=3*s*a,h=3*l*o,c=l*s;return t[0]=e[0]*u+n[0]*f+r[0]*h+i[0]*c,t[1]=e[1]*u+n[1]*f+r[1]*h+i[1]*c,t[2]=e[2]*u+n[2]*f+r[2]*h+i[2]*c,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},copy:o,cross:g,direction:P,dist:N,distance:p,div:Z,divide:h,dot:M,equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],s=t[2],o=e[0],a=e[1],l=e[2],u=(0,i.g)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))},exactEquals:v,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),f=o*(3-2*s);return t[0]=e[0]*a+n[0]*l+r[0]*u+i[0]*f,t[1]=e[1]*a+n[1]*l+r[1]*u+i[1]*f,t[2]=e[2]*a+n[2]*l+r[2]*u+i[2]*f,t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},len:z,length:s,lerp:_,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},mul:I,multiply:f,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},normalize:x,random:function(t,e){e=e||1;const n=i.R,r=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*e;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=s*e,t},rotateX:function(t,e,n,r){const i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[0],s[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),s[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},rotateY:function(t,e,n,r){const i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),s[1]=i[1],s[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},rotateZ:function(t,e,n,r){const i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),s[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),s[2]=i[2],t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:c,scaleAndAdd:m,set:a,sign:function(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t},sqrDist:k,sqrLen:G,squaredDistance:d,squaredLength:y,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:A,subtract:u,transformMat3:S,transformMat4:w,transformQuat:b},Symbol.toStringTag,{value:"Module"}))},65617:(t,e,n)=>{function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function s(t,e,n){return[t,e,n]}function o(t){const e=[0,0,0],n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function a(t,e){return new Float64Array(t,e,3)}function l(){return s(1,1,1)}function u(){return s(1,0,0)}function f(){return s(0,1,0)}function h(){return s(0,0,1)}n.d(e,{O:()=>m,U:()=>y,Z:()=>c,a:()=>i,b:()=>a,c:()=>r,d:()=>p,e:()=>d,f:()=>s,g:()=>o});const c=[0,0,0],m=l(),p=u(),d=f(),y=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:p,UNIT_Y:d,UNIT_Z:y,ZEROS:c,clone:i,create:r,createView:a,fromArray:o,fromValues:s,ones:l,unitX:u,unitY:f,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},98766:(t,e,n)=>{n.d(e,{a:()=>o,b:()=>f,c:()=>i,d:()=>y,e:()=>m,f:()=>p,g:()=>M,h:()=>g,l:()=>x,n:()=>d,s:()=>s});var r=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function s(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function o(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+s*s)}function c(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],s=e[3]-t[3];return n*n+r*r+i*i+s*s}function m(t){const e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}function p(t){const e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function d(t,e){const n=e[0],r=e[1],i=e[2],s=e[3];let o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=s*o),t}function y(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function x(t,e,n,r){const i=e[0],s=e[1],o=e[2],a=e[3];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t[3]=a+r*(n[3]-a),t}function M(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function g(t,e){const n=t[0],i=t[1],s=t[2],o=t[3],a=e[0],l=e[1],u=e[2],f=e[3],h=(0,r.g)();return Math.abs(n-a)<=h*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-l)<=h*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(s-u)<=h*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(o-f)<=h*Math.max(1,Math.abs(o),Math.abs(f))}const _=a,w=l,S=u,b=h,R=c,C=m,v=p;Object.freeze(Object.defineProperty({__proto__:null,add:o,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},copy:i,dist:b,distance:h,div:S,divide:u,dot:y,equals:g,exactEquals:M,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},len:C,length:m,lerp:x,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},mul:w,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},normalize:d,random:function(t,e){const n=r.R;let i,s,o,a,l,u;e=e||1;do{i=2*n()-1,s=2*n()-1,l=i*i+s*s}while(l>=1);do{o=2*n()-1,a=2*n()-1,u=o*o+a*a}while(u>=1);const f=Math.sqrt((1-l)/u);return t[0]=e*i,t[1]=e*s,t[2]=e*o*f,t[3]=e*a*f,t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:f,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t},set:s,sqrDist:R,sqrLen:v,squaredDistance:c,squaredLength:p,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:_,subtract:a,transformMat4:function(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*s+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*s+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*s+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*s+n[15]*o,t},transformQuat:function(t,e,n){const r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2],u=n[3],f=u*r+a*s-l*i,h=u*i+l*r-o*s,c=u*s+o*i-a*r,m=-o*r-a*i-l*s;return t[0]=f*u+m*-o+h*-l-c*-a,t[1]=h*u+m*-a+c*-o-f*-l,t[2]=c*u+m*-l+f*-a-h*-o,t[3]=e[3],t}},Symbol.toStringTag,{value:"Module"}))},36030:(t,e,n)=>{n.d(e,{J:()=>s});var r=n(35454),i=n(5600);function s(t,e={}){const n=t instanceof r.X?t:new r.X(t,e),s={type:e?.ignoreUnknown??1?n.apiValues:String,json:{type:n.jsonValues,read:!e?.readOnly&&{reader:n.read},write:{writer:n.write}}};return void 0!==e?.readOnly&&(s.readOnly=!!e.readOnly),void 0!==e?.default&&(s.json.default=e.default),void 0!==e?.name&&(s.json.name=e.name),void 0!==e?.nonNullable&&(s.nonNullable=e.nonNullable),(0,i.Cb)(s)}},71715:(t,e,n)=>{n.d(e,{r:()=>i});var r=n(5600);function i(t,e,n){let i,s;return void 0===e||Array.isArray(e)?(s=t,n=e,i=[void 0]):(s=e,i=Array.isArray(t)?t:[t]),(t,e)=>{const o=t.constructor.prototype;i.forEach((i=>{const a=(0,r.CJ)(t,i,s);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=o[e],n&&(a.read.source=(a.read.source||[]).concat(n))}))}}},30556:(t,e,n)=>{n.d(e,{c:()=>i});var r=n(5600);function i(t,e,n){let i,s;return void 0===e?(s=t,i=[void 0]):"string"!=typeof e?(s=t,i=[void 0],n=e):(s=e,i=Array.isArray(t)?t:[t]),(t,e)=>{const o=t.constructor.prototype;for(const a of i){const i=(0,r.CJ)(t,a,s);i.write&&"object"==typeof i.write||(i.write={}),n&&(i.write.target=n),i.write.writer=o[e]}}}},22021:(t,e,n)=>{n.d(e,{BV:()=>f,Kt:()=>c,Sf:()=>s,Vl:()=>u,ZF:()=>h,_3:()=>_,jE:()=>M,oK:()=>y,oc:()=>g,t7:()=>l,uZ:()=>o,wt:()=>a});var r=n(17896);n(98766);const i=new Float32Array(1);function s(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function o(t,e,n){return Math.min(Math.max(t,e),n)}function a(t){return 0==(t&t-1)}function l(t,e,n){return t+(e-t)*n}function u(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function h(t){return Math.acos(o(t,-1,1))}function c(t){return Math.asin(o(t,-1,1))}function m(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const d=BigInt("1000000");function y(t){return x(Math.max(-_,Math.min(t,_)))}function x(t){return i[0]=t,i[0]}function M(t,e){const n=(0,r.l)(t),i=c(t[2]/n),s=Math.atan2(t[1]/n,t[0]/n);return(0,r.s)(e,n,i,s),e}function g(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(e,1)&&m(n,1)&&m(r,1))}!function(t){const e=function(t){return p.setFloat64(0,t),p.getBigInt64(0)}(t=Math.abs(t)),n=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(e<=d?d:e-d);Math.abs(t-n)}(1);const _=x(34028234663852886e22)},67900:(t,e,n)=>{n.d(e,{$C:()=>b,CN:()=>O,En:()=>w,Jo:()=>G,_R:()=>R,c9:()=>v,cM:()=>C,gV:()=>z,hd:()=>l,qE:()=>I,ty:()=>S}),n(80442);var r=n(35454),i=n(2109),s=n(68441),o=n(8744),a=n(58116);const l=39.37,u=s.sv.radius*Math.PI/200,f=/UNIT\[([^\]]+)\]\]$/i,h=a.Z,c=/UNIT\[([^\]]+)\]/i,m=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),p=(0,r.w)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),d=t=>t*t,y=t=>t*t*t,x={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:d(.001)},"square-centimeters":{inBaseUnits:d(.01)},"square-decimeters":{inBaseUnits:d(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:d(1e3)},"square-inches":{inBaseUnits:d(.0254)},"square-feet":{inBaseUnits:d(.3048)},"square-yards":{inBaseUnits:d(.9144)},"square-miles":{inBaseUnits:d(1609.344)},"square-us-feet":{inBaseUnits:d(1200/3937)},acres:{inBaseUnits:.0015625*d(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*y(.001)},"cubic-centimeters":{inBaseUnits:1e3*y(.01)},"cubic-decimeters":{inBaseUnits:1e3*y(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*y(1e3)},"cubic-inches":{inBaseUnits:1e3*y(.0254)},"cubic-feet":{inBaseUnits:1e3*y(.3048)},"cubic-yards":{inBaseUnits:1e3*y(.9144)},"cubic-miles":{inBaseUnits:1e3*y(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},M=(()=>{const t={};for(const e in x)for(const n in x[e].units)t[n]=e;return t})();function g(t){const e=M[t];if(!e)throw new Error("unknown type");return e}function _(t,e=null){return e=e||g(t),x[e].baseUnit===t}function w(t,e,n){if(e===n)return t;const r=g(e);if(r!==g(n))throw new Error("incompatible units");const i=_(e,r)?t:function(t,e,n){return t*x[n].units[e].inBaseUnits}(t,e,r);return _(n,r)?i:function(t,e,n){return t/x[n].units[e].inBaseUnits}(i,n,r)}function S(t,e,n){return w(t,e,"meters")/(n*Math.PI/180)}function b(t){return p.fromJSON(t.toLowerCase())||null}function R(t){if(null!=t&&!(0,o.N$)(t))return 1;const e=v(t);return e>1e5?1:e}function C(t){return v(t)>=(0,i.Iu)(t).metersPerDegree?"meters":I(t)}function v(t,e=s.sv.metersPerDegree){return function(t,e=!1){const n=null!=t?t.wkid:null,r=null!=t?t.wkt:null;let i=null;if(n){if((0,o.o$)(n))return s.yr.metersPerDegree;if((0,o.ME)(n))return s.Z1.metersPerDegree;i=h.values[h[n]],!i&&e&&m.has(n)&&(i=u)}else r&&(N(r)?i=P(f.exec(r),i):Z(r)&&(i=P(c.exec(r),i)));return i}(t,!0)??e}function P(t,e){return t&&t[1]?A(t[1]):e}function A(t){return parseFloat(t.split(",")[1])}function I(t){const e=null!=t?t.wkid:null,n=null!=t?t.wkt:null;let r=null;if(e)r=h.units[h[e]];else if(n){const t=N(n)?f:Z(n)?c:null;if(t){const e=t.exec(n);e&&e[1]&&(r=function(t){const e=/[\\"\\']{1}([^\\"\\']+)/.exec(t);let n=e&&e[1];if(!n||!h.units.includes(n)){const e=A(t);n=null;const r=h.values;for(let t=0;t<r.length;++t)if(Math.abs(e-r[t])<k){n=h.units[t];break}}return n}(e[1]))}}return null!=r?b(r):null}function Z(t){return/^GEOCCS/i.test(t)}function N(t){return/^PROJCS/i.test(t)}new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);const k=1e-7,z=(0,r.w)()({esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"}),G=(0,r.w)()({esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"}),O=(0,r.w)()({esriDUDecimalDegrees:"degrees",esriDURadians:"radians"})},6570:(t,e,n)=>{n.d(e,{Z:()=>x});var r,i=n(43697),s=n(19153),o=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(9361),u=n(94139),f=n(82971),h=n(54102),c=n(87416),m=n(8744),p=n(40488);function d(t,e,n){return null==e?n:null==n?e:t(e,n)}let y=r=class extends l.Z{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,r,i){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?f.Z.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:r,spatialReference:i??f.Z.WGS84}}static fromBounds(t,e){return new r({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}static fromPoint(t){return new r({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new u.Z({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new r;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,p.Q8)(e,n)&&(t=e.isWebMercator?(0,p.$)(t):(0,p.Sx)(t,!0)),"point"===t.type?(0,h.aV)(this,t):"extent"===t.type&&(0,h.uP)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,p.Q8)(e,n)&&(t=e.isWebMercator?(0,p.$)(t):(0,p.Sx)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,r=this.height*e;if(this.xmin+=n,this.ymin+=r,this.xmax-=n,this.ymax-=r,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,m.fS)(e,n)&&(0,p.Q8)(e,n)&&(t=e.isWebMercator?(0,p.$)(t):(0,p.Sx)(t,!0)),(0,c.IY)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.min,this.zmin,t.zmin),this.zmax=d(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.min,this.mmin,t.mmin),this.mmax=d(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=d(Math.max,this.zmin,t.zmin),this.zmax=d(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=d(Math.max,this.mmin,t.mmin),this.mmax=d(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,m.C5)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const r=e.isWebMercator?(0,p.Sx)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(r.x=this._normalizeX(r.x,t).x),this.spatialReference=new f.Z((0,s.gx)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:r.x}))}return this}_getCM(t){let e=null;const[n,r]=t.valid,i=this.xmin,s=this.xmax;return i>=n&&i<=r&&s>=n&&s<=r||(e=this.center),e}_normalize(t,e,n){const r=this.spatialReference;if(!r)return this;const i=n??(0,m.C5)(r);if(null==i)return this;const s=this._getParts(i).map((t=>t.extent));if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(i):this.set({xmin:i.valid[0],xmax:i.valid[1]});if(t)return this._shiftCM(i);if(e)return s;let o=!0,a=!0;return s.forEach((t=>{t.hasZ||(o=!1),t.hasM||(a=!1)})),{rings:s.map((t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(o){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(a){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e})),hasZ:o,hasM:a,spatialReference:r}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:i,spatialReference:s}=this,o=this.width,a=this.xmin,l=this.xmax;let u;t=t||(0,m.C5)(s);const[f,h]=t.valid;u=this._normalizeX(this.xmin,t);const c=u.x,p=u.frameId;u=this._normalizeX(this.xmax,t);const d=u.x,y=u.frameId,x=c===d&&o>0;if(o>2*h){const t=new r(a<l?c:d,n,h,i,s),o=new r(f,n,a<l?d:c,i,s),u=new r(0,n,h,i,s),m=new r(f,n,0,i,s),x=[],M=[];t.contains(u)&&x.push(p),t.contains(m)&&M.push(p),o.contains(u)&&x.push(y),o.contains(m)&&M.push(y);for(let t=p+1;t<y;t++)x.push(t),M.push(t);e.push({extent:t,frameIds:[p]},{extent:o,frameIds:[y]},{extent:u,frameIds:x},{extent:m,frameIds:M})}else c>d||x?e.push({extent:new r(c,n,h,i,s),frameIds:[p]},{extent:new r(f,n,d,i,s),frameIds:[y]}):e.push({extent:new r(c,n,d,i,s),frameIds:[p]});this.cache._parts=e}const n=this.hasZ,i=this.hasM;if(n||i){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),i&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}_normalizeX(t,e){const[n,r]=e.valid,i=2*r;let s,o=0;return t>r?(s=Math.ceil(Math.abs(t-r)/i),t-=s*i,o=s):t<n&&(s=Math.ceil(Math.abs(t-n)/i),t+=s*i,o=-s),{x:t,frameId:o}}};(0,i._)([(0,o.Cb)({readOnly:!0})],y.prototype,"cache",null),(0,i._)([(0,o.Cb)({readOnly:!0})],y.prototype,"center",null),(0,i._)([(0,o.Cb)({readOnly:!0})],y.prototype,"extent",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasM",null),(0,i._)([(0,o.Cb)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasZ",null),(0,i._)([(0,o.Cb)({readOnly:!0})],y.prototype,"height",null),(0,i._)([(0,o.Cb)({readOnly:!0})],y.prototype,"width",null),(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],y.prototype,"xmin",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:!0}})],y.prototype,"ymin",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmin",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmin",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:!0}})],y.prototype,"xmax",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:!0}})],y.prototype,"ymax",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmax",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmax",void 0),y=r=(0,i._)([(0,a.j)("esri.geometry.Extent")],y),y.prototype.toJSON.isDefaultToJSON=!0;const x=y},9361:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(96674),s=n(5600),o=(n(75215),n(67676),n(80442),n(71715)),a=n(52011),l=n(82971);let u=class extends i.wq{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=l.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof l.Z)return t;if(null!=t){const n=new l.Z;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,r._)([(0,s.Cb)()],u.prototype,"type",void 0),(0,r._)([(0,s.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,r._)([(0,s.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],u.prototype,"hasM",void 0),(0,r._)([(0,s.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],u.prototype,"hasZ",void 0),(0,r._)([(0,s.Cb)({type:l.Z,json:{write:!0},value:l.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,r._)([(0,o.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,r._)([(0,a.j)("esri.geometry.Geometry")],u);const f=u},65091:(t,e,n)=>{n.d(e,{Z:()=>d});var r,i=n(43697),s=n(22974),o=n(5600),a=(n(75215),n(52011)),l=n(30556),u=n(6570),f=n(9361),h=n(94139),c=n(16238);function m(t){return(e,n)=>null==e?n:null==n?e:t(e,n)}let p=r=class extends f.Z{constructor(...t){super(...t),this.points=[],this.type="multipoint"}normalizeCtorArgs(t,e){if(!t&&!e)return{};const n={};Array.isArray(t)?(n.points=t,n.spatialReference=e):function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?n.spatialReference=t:(t.points&&(n.points=t.points),t.spatialReference&&(n.spatialReference=t.spatialReference),t.hasZ&&(n.hasZ=t.hasZ),t.hasM&&(n.hasM=t.hasM));const r=n.points&&n.points[0];return r&&(void 0===n.hasZ&&void 0===n.hasM?(n.hasZ=r.length>2,n.hasM=!1):void 0===n.hasZ?n.hasZ=r.length>3:void 0===n.hasM&&(n.hasM=r.length>3)),n}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=this.points;if(!t.length)return null;const e=new u.Z,n=this.hasZ,r=this.hasM,i=n?3:2,s=t[0],o=m(Math.min),a=m(Math.max);let l,f,h,c,[p,d]=s,[y,x]=s;for(let e=0,s=t.length;e<s;e++){const s=t[e],[u,m]=s;if(p=o(p,u),d=o(d,m),y=a(y,u),x=a(x,m),n&&s.length>2){const t=s[2];l=o(l,t),h=a(h,t)}if(r&&s.length>i){const t=s[i];f=o(f,t),c=a(c,t)}}return e.xmin=p,e.ymin=d,e.xmax=y,e.ymax=x,e.spatialReference=this.spatialReference,n?(e.zmin=l,e.zmax=h):(e.zmin=void 0,e.zmax=void 0),r?(e.mmin=f,e.mmax=c):(e.mmin=void 0,e.mmax=void 0),e}writePoints(t,e){e.points=(0,s.d9)(this.points)}addPoint(t){return(0,c.l)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}clone(){const t={points:(0,s.d9)(this.points),spatialReference:this.spatialReference};return this.hasZ&&(t.hasZ=!0),this.hasM&&(t.hasM=!0),new r(t)}getPoint(t){if(!this._validateInputs(t))return null;const e=this.points[t],n={x:e[0],y:e[1],spatialReference:this.spatialReference};let r=2;return this.hasZ&&(n.z=e[2],r=3),this.hasM&&(n.m=e[r]),new h.Z(n)}removePoint(t){if(!this._validateInputs(t))return null;const e=new h.Z(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,c.l)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,i._)([(0,o.Cb)({readOnly:!0})],p.prototype,"cache",null),(0,i._)([(0,o.Cb)()],p.prototype,"extent",null),(0,i._)([(0,o.Cb)({type:[[Number]],json:{write:{isRequired:!0}}})],p.prototype,"points",void 0),(0,i._)([(0,l.c)("points")],p.prototype,"writePoints",null),p=r=(0,i._)([(0,a.j)("esri.geometry.Multipoint")],p),p.prototype.toJSON.isDefaultToJSON=!0;const d=p},94139:(t,e,n)=>{n.d(e,{Z:()=>g});var r,i=n(43697),s=n(92604),o=n(5600),a=n(90578),l=(n(67676),n(80442),n(71715)),u=n(52011),f=n(30556),h=n(75215),c=n(9361),m=n(82971),p=n(8744),d=n(40488);const y=[0,0];function x(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let M=r=class extends c.Z{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,r,i){let o;if(Array.isArray(t))o=t,i=e,t=o[0],e=o[1],n=o[2],r=o[3];else if(t&&"object"==typeof t){if(o=t,t=null!=o.x?o.x:o.longitude,e=null!=o.y?o.y:o.latitude,n=o.z,r=o.m,(i=o.spatialReference)&&"esri.geometry.SpatialReference"!==i.declaredClass&&(i=new m.Z(i)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)s.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)s.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&i&&i.isWebMercator){const n=(0,d.hG)(o.longitude,o.latitude,y);t=n[0],e=n[1]}}else x(n)?(i=n,n=null):x(r)&&(i=r,r=null);const a={x:t,y:e};return null==a.x&&null!=a.y?s.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&s.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=i&&(a.spatialReference=i),null!=n&&(a.z=n),null!=r&&(a.m=r),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){const{spatialReference:t,x:e,y:n}=this;if(t){if(t.isWebMercator)return(0,d.R6)(e,n,y)[1];if(t.isGeographic)return n}return null}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,d.hG)(n,t,y)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){const{x:t,y:e,spatialReference:n}=this;if(n){if(n.isWebMercator)return(0,d.R6)(t,e,y)[0];if(n.isGeographic)return t}return null}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,d.hG)(t,e,y)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new r;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return r.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:r,m:i,spatialReference:s}=this,{z:o,m:a}=t;let{x:l,y:u,spatialReference:f}=t;if(!s.equals(f))if(s.isWebMercator&&f.isWGS84)[l,u]=(0,d.hG)(l,u),f=s;else{if(!s.isWGS84||!f.isWebMercator)return!1;[l,u]=(0,d.R6)(l,u),f=s}return e===l&&n===u&&r===o&&i===a&&s.wkid===f.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,p.C5)(this.spatialReference);if(!t)return this;let e=this.x;const[n,r]=t.valid,i=2*r;let s;return e>r?(s=Math.ceil(Math.abs(e-r)/i),e-=s*i):e<n&&(s=Math.ceil(Math.abs(e-n)/i),e+=s*i),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,r=t.y-e.y,i=t.hasZ&&e.hasZ?t.z-e.z:0;return Math.sqrt(n*n+r*r+i*i)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i._)([(0,o.Cb)({readOnly:!0})],M.prototype,"cache",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasM",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasZ",null),(0,i._)([(0,o.Cb)({type:Number})],M.prototype,"latitude",null),(0,i._)([(0,o.Cb)({type:Number})],M.prototype,"longitude",null),(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.p)((t=>isNaN(t)?t:(0,h.q9)(t)))],M.prototype,"x",void 0),(0,i._)([(0,f.c)("x")],M.prototype,"writeX",null),(0,i._)([(0,l.r)("x")],M.prototype,"readX",null),(0,i._)([(0,o.Cb)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],M.prototype,"z",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],M.prototype,"m",void 0),M=r=(0,i._)([(0,u.j)("esri.geometry.Point")],M),M.prototype.toJSON.isDefaultToJSON=!0;const g=M},38913:(t,e,n)=>{n.d(e,{Z:()=>b});var r,i=n(43697),s=n(67676),o=n(22974),a=n(5600),l=(n(75215),n(52011)),u=n(30556),f=n(6570),h=n(9361),c=n(94139),m=n(82971),p=n(35308),d=n(54102),y=n(86662),x=n(49600),M=n(87416),g=n(40488),_=n(16238);function w(t){return!Array.isArray(t[0])}let S=r=class extends h.Z{static fromExtent(t){const e=t.clone().normalize(),n=t.spatialReference;let i=!1,s=!1;for(const t of e)t.hasZ&&(i=!0),t.hasM&&(s=!0);const o={rings:e.map((t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(i&&t.hasZ){const n=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<e.length;t++)e[t].push(n)}if(s&&t.hasM){const n=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<e.length;t++)e[t].push(n)}return e})),spatialReference:n};return i&&(o.hasZ=!0),s&&(o.hasM=!0),new r(o)}constructor(...t){super(...t),this.rings=[],this.type="polygon"}normalizeCtorArgs(t,e){let n,r,i=null,s=null;return t&&!Array.isArray(t)?(i=t.rings??null,e||(t.spatialReference?e=t.spatialReference:t.rings||(e=t)),n=t.hasZ,r=t.hasM):i=t,i=i||[],e=e||m.Z.WGS84,i.length&&i[0]&&null!=i[0][0]&&"number"==typeof i[0][0]&&(i=[i]),s=i[0]&&i[0][0],s&&(void 0===n&&void 0===r?(n=s.length>2,r=s.length>3):void 0===n?n=r?s.length>3:s.length>2:void 0===r&&(r=n?s.length>3:s.length>2)),{rings:i,spatialReference:e,hasZ:n,hasM:r}}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const t=(0,p.tO)(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const e=new c.Z;return e.x=t[0],e.y=t[1],e.spatialReference=this.spatialReference,this.hasZ&&(e.z=t[2]),e}get extent(){const{spatialReference:t}=this,e=(0,x._w)(this);if(!e)return null;const n=new f.Z(e);return n.spatialReference=t,n}get isSelfIntersecting(){return(0,M.Ff)(this.rings)}writeRings(t,e){e.rings=(0,o.d9)(this.rings)}addRing(t){if(!t)return;const e=this.rings,n=e.length;if(w(t)){const r=[];for(let e=0,n=t.length;e<n;e++)r[e]=t[e].toArray();e[n]=r}else e[n]=t.concat();return this.notifyChange("rings"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.rings=(0,o.d9)(this.rings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;if(null!=e!=(null!=n))return!1;if(null!=e&&null!=n&&!e.equals(n))return!1;if(this.rings.length!==t.rings.length)return!1;const r=([t,e,n,r],[i,s,o,a])=>t===i&&e===s&&(null==n&&null==o||n===o)&&(null==r&&null==a||r===a);for(let e=0;e<this.rings.length;e++){const n=this.rings[e],i=t.rings[e];if(!(0,s.fS)(n,i,r))return!1}return!0}contains(t){if(!t)return!1;const e=(0,g.iV)(t,this.spatialReference);return(0,d.CI)(this,null!=e?e:t)}isClockwise(t){let e;return e=w(t)?t.map((t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])):t,(0,y.bu)(e,this.hasM,this.hasZ)}getPoint(t,e){if(!this._validateInputs(t,e))return null;const n=this.rings[t][e],r=this.hasZ,i=this.hasM;return r&&!i?new c.Z(n[0],n[1],n[2],void 0,this.spatialReference):i&&!r?new c.Z(n[0],n[1],void 0,n[2],this.spatialReference):r&&i?new c.Z(n[0],n[1],n[2],n[3],this.spatialReference):new c.Z(n[0],n[1],this.spatialReference)}insertPoint(t,e,n){return this._validateInputs(t,e,!0)?((0,_.l)(this,n),Array.isArray(n)||(n=n.toArray()),this.rings[t].splice(e,0,n),this.notifyChange("rings"),this):this}removePoint(t,e){if(!this._validateInputs(t,e))return null;const n=new c.Z(this.rings[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("rings"),n}removeRing(t){if(!this._validateInputs(t,null))return null;const e=this.rings.splice(t,1)[0],n=this.spatialReference,r=e.map((t=>new c.Z(t,n)));return this.notifyChange("rings"),r}setPoint(t,e,n){return this._validateInputs(t,e)?((0,_.l)(this,n),Array.isArray(n)||(n=n.toArray()),this.rings[t][e]=n,this.notifyChange("rings"),this):this}_validateInputs(t,e,n=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=e){const r=this.rings[t];if(n&&(e<0||e>r.length))return!1;if(!n&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,i._)([(0,a.Cb)({readOnly:!0})],S.prototype,"cache",null),(0,i._)([(0,a.Cb)({readOnly:!0})],S.prototype,"centroid",null),(0,i._)([(0,a.Cb)({readOnly:!0})],S.prototype,"extent",null),(0,i._)([(0,a.Cb)({readOnly:!0})],S.prototype,"isSelfIntersecting",null),(0,i._)([(0,a.Cb)({type:[[[Number]]],json:{write:{isRequired:!0}}})],S.prototype,"rings",void 0),(0,i._)([(0,u.c)("rings")],S.prototype,"writeRings",null),S=r=(0,i._)([(0,l.j)("esri.geometry.Polygon")],S),S.prototype.toJSON.isDefaultToJSON=!0;const b=S},58901:(t,e,n)=>{n.d(e,{Z:()=>y});var r,i=n(43697),s=n(22974),o=n(5600),a=(n(75215),n(52011)),l=n(30556),u=n(6570),f=n(9361),h=n(94139),c=n(82971),m=n(49600),p=n(16238);let d=r=class extends f.Z{constructor(...t){super(...t),this.paths=[],this.type="polyline"}normalizeCtorArgs(t,e){let n,r,i=null,s=null;return t&&!Array.isArray(t)?(i=t.paths??null,e||(t.spatialReference?e=t.spatialReference:t.paths||(e=t)),n=t.hasZ,r=t.hasM):i=t,i=i||[],e=e||c.Z.WGS84,i.length&&i[0]&&null!=i[0][0]&&"number"==typeof i[0][0]&&(i=[i]),s=i[0]&&i[0][0],s&&(void 0===n&&void 0===r?(n=s.length>2,r=!1):void 0===n?n=!r&&s.length>3:void 0===r&&(r=!n&&s.length>3)),{paths:i,spatialReference:e,hasZ:n,hasM:r}}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:t}=this,e=(0,m.Wn)(this);if(!e)return null;const n=new u.Z(e);return n.spatialReference=t,n}writePaths(t,e){e.paths=(0,s.d9)(this.paths)}addPath(t){if(!t)return;const e=this.paths,n=e.length;if(function(t){return!Array.isArray(t[0])}(t)){const r=[];for(let e=0,n=t.length;e<n;e++)r[e]=t[e].toArray();e[n]=r}else e[n]=t.concat();return this.notifyChange("paths"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.paths=(0,s.d9)(this.paths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;const n=this.paths[t][e],r=this.hasZ,i=this.hasM;return r&&!i?new h.Z(n[0],n[1],n[2],void 0,this.spatialReference):i&&!r?new h.Z(n[0],n[1],void 0,n[2],this.spatialReference):r&&i?new h.Z(n[0],n[1],n[2],n[3],this.spatialReference):new h.Z(n[0],n[1],this.spatialReference)}insertPoint(t,e,n){return this._validateInputs(t,e,!0)?((0,p.l)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t].splice(e,0,n),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const e=this.paths.splice(t,1)[0],n=this.spatialReference,r=e.map((t=>new h.Z(t,n)));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;const n=new h.Z(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(t,e,n){return this._validateInputs(t,e)?((0,p.l)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t][e]=n,this.notifyChange("paths"),this):this}_validateInputs(t,e,n=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){const r=this.paths[t];if(n&&(e<0||e>r.length))return!1;if(!n&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,i._)([(0,o.Cb)({readOnly:!0})],d.prototype,"cache",null),(0,i._)([(0,o.Cb)({readOnly:!0})],d.prototype,"extent",null),(0,i._)([(0,o.Cb)({type:[[[Number]]],json:{write:{isRequired:!0}}})],d.prototype,"paths",void 0),(0,i._)([(0,l.c)("paths")],d.prototype,"writePaths",null),d=r=(0,i._)([(0,a.j)("esri.geometry.Polyline")],d),d.prototype.toJSON.isDefaultToJSON=!0;const y=d},82971:(t,e,n)=>{n.d(e,{Z:()=>p});var r,i=n(43697),s=n(96674),o=n(22974),a=n(67900),l=n(75215),u=n(5600),f=n(52011),h=n(30556),c=n(8744);let m=r=class extends s.wq{static fromJSON(t){if(!t)return null;if(t.wkid){if(102100===t.wkid)return r.WebMercator;if(4326===t.wkid)return r.WGS84}const e=new r;return e.read(t),e}constructor(t){super(t),this.latestWkid=null,this.wkid=null,this.wkt=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}normalizeCtorArgs(t){return t&&"object"==typeof t?t:{["string"==typeof t?"wkt":"wkid"]:t}}get isWGS84(){return(0,c.oR)(this)}get isWebMercator(){return(0,c.sS)(this)}get isGeographic(){return(0,c.sT)(this)}get isWrappable(){return(0,c.MP)(this)}get metersPerUnit(){return(0,a.c9)(this)}get unit(){return(0,a.qE)(this)||(this.isGeographic?"degrees":null)}writeWkt(t,e){this.wkid||(e.wkt=t)}clone(){if(this===r.WGS84)return r.WGS84;if(this===r.WebMercator)return r.WebMercator;const t=new r;return null!=this.wkid?(t.wkid=this.wkid,null!=this.latestWkid&&(t.latestWkid=this.latestWkid),null!=this.vcsWkid&&(t.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(t.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(t.wkt=this.wkt),this.imageCoordinateSystem&&(t.imageCoordinateSystem=(0,o.d9)(this.imageCoordinateSystem)),t}equals(t){if(null==t)return!1;if(this.imageCoordinateSystem||t.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==t.imageCoordinateSystem)return!1;const{id:e,referenceServiceName:n}=t.imageCoordinateSystem,{geodataXform:r}=t.imageCoordinateSystem,i=this.imageCoordinateSystem;return null==e||r?JSON.stringify(i)===JSON.stringify(t.imageCoordinateSystem):n?i.id===e&&i.referenceServiceName===n:i.id===e}return(0,c.fS)(this,t)}toJSON(t){return this.write(void 0,t)}};m.GCS_NAD_1927=null,m.WGS84=null,m.WebMercator=null,m.PlateCarree=null,(0,i._)([(0,u.Cb)({readOnly:!0})],m.prototype,"isWGS84",null),(0,i._)([(0,u.Cb)({readOnly:!0})],m.prototype,"isWebMercator",null),(0,i._)([(0,u.Cb)({readOnly:!0})],m.prototype,"isGeographic",null),(0,i._)([(0,u.Cb)({readOnly:!0})],m.prototype,"isWrappable",null),(0,i._)([(0,u.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"latestWkid",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],m.prototype,"metersPerUnit",null),(0,i._)([(0,u.Cb)({readOnly:!0})],m.prototype,"unit",null),(0,i._)([(0,u.Cb)({type:l.z8,json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkt}}}}}}})],m.prototype,"wkid",void 0),(0,i._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:null==this.wkid}}}}}}})],m.prototype,"wkt",void 0),(0,i._)([(0,h.c)("wkt"),(0,h.c)("web-scene","wkt")],m.prototype,"writeWkt",null),(0,i._)([(0,u.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"vcsWkid",void 0),(0,i._)([(0,u.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"latestVcsWkid",void 0),(0,i._)([(0,u.Cb)()],m.prototype,"imageCoordinateSystem",void 0),m=r=(0,i._)([(0,f.j)("esri.geometry.SpatialReference")],m),m.prototype.toJSON.isDefaultToJSON=!0,m.GCS_NAD_1927=new m({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'}),m.WGS84=new m(c.Zn),m.WebMercator=new m(c.R_),m.PlateCarree=new m(c.WR),Object.freeze&&(Object.freeze(m.GCS_NAD_1927),Object.freeze(m.WGS84),Object.freeze(m.WebMercator));const p=m},2109:(t,e,n)=>{n.d(e,{Iu:()=>f,JL:()=>a,e8:()=>h,kU:()=>o,mM:()=>l,pn:()=>u});var r=n(68441),i=n(8744);function s(t){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${t.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const o=s(r.sv),a=s(r.yr),l=s(r.Z1),u={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${r.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`};function f(t){return null!=t&&((0,i.BZ)(t)||(0,i.fS)(t,a))?r.yr:null!=t&&((0,i.V2)(t)||(0,i.fS)(t,l))?r.Z1:r.sv}function h(t){return(0,i.o$)(t)?r.yr:(0,i.ME)(t)?r.Z1:r.sv}},95961:(t,e,n)=>{function r(t){const e=[];for(t.reset();t.nextPath();){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);e.push(n)}return t.reset(),e}function i(t){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);return t.seekPathStart(),e}n.d(e,{M:()=>r,l:()=>i})},68441:(t,e,n)=>{n.d(e,{Z1:()=>o,sv:()=>i,yr:()=>s});class r{constructor(t,e,n,r){this.semiMajorAxis=t,this.flattening=e,this.outerAtmosphereRimWidth=n;const i=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*i,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=r||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}get radius(){return this.semiMajorAxis}}const i=new r(6378137,1/298.257223563,3e5,.006694379990137799),s=new r(3396190,1/169.8944472236118,23e4),o=new r(1737400,0,0)},56726:(t,e,n)=>{var r;n.d(e,{W:()=>r}),function(t){t[t.CGCS2000=4490]="CGCS2000",t[t.GCSMARS2000=104971]="GCSMARS2000",t[t.GCSMARS2000_SPHERE=104905]="GCSMARS2000_SPHERE",t[t.GCSMOON2000=104903]="GCSMOON2000"}(r||(r={}))},58116:(t,e,n)=>{let r;n.d(e,{Z:()=>i});const i={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2};for(r=2e3;r<=2045;r++)i[r]=0;for(r=2056;r<=2065;r++)i[r]=0;for(r=2067;r<=2135;r++)i[r]=0;for(r=2137;r<=2154;r++)i[r]=0;for(r=2161;r<=2170;r++)i[r]=0;for(r=2172;r<=2193;r++)i[r]=0;for(r=2195;r<=2198;r++)i[r]=0;for(r=2200;r<=2203;r++)i[r]=0;for(r=2205;r<=2217;r++)i[r]=0;for(r=2222;r<=2224;r++)i[r]=1;for(r=2225;r<=2250;r++)i[r]=2;for(r=2251;r<=2253;r++)i[r]=1;for(r=2257;r<=2264;r++)i[r]=2;for(r=2274;r<=2279;r++)i[r]=2;for(r=2280;r<=2282;r++)i[r]=1;for(r=2283;r<=2289;r++)i[r]=2;for(r=2290;r<=2292;r++)i[r]=0;for(r=2308;r<=2313;r++)i[r]=0;for(r=2315;r<=2491;r++)i[r]=0;for(r=2494;r<=2866;r++)i[r]=0;for(r=2867;r<=2869;r++)i[r]=1;for(r=2870;r<=2888;r++)i[r]=2;for(r=2891;r<=2895;r++)i[r]=2;for(r=2896;r<=2898;r++)i[r]=1;for(r=2902;r<=2908;r++)i[r]=2;for(r=2915;r<=2920;r++)i[r]=2;for(r=2921;r<=2923;r++)i[r]=1;for(r=2924;r<=2930;r++)i[r]=2;for(r=2931;r<=2962;r++)i[r]=0;for(r=2964;r<=2968;r++)i[r]=2;for(r=2969;r<=2973;r++)i[r]=0;for(r=2975;r<=2991;r++)i[r]=0;for(r=2995;r<=3051;r++)i[r]=0;for(r=3054;r<=3079;r++)i[r]=0;for(r=3081;r<=3088;r++)i[r]=0;for(r=3092;r<=3101;r++)i[r]=0;for(r=3106;r<=3138;r++)i[r]=0;for(r=3146;r<=3151;r++)i[r]=0;for(r=3153;r<=3166;r++)i[r]=0;for(r=3168;r<=3172;r++)i[r]=0;for(r=3174;r<=3203;r++)i[r]=0;for(r=3294;r<=3358;r++)i[r]=0;for(r=3367;r<=3403;r++)i[r]=0;for(r=3408;r<=3416;r++)i[r]=0;for(r=3417;r<=3438;r++)i[r]=2;for(r=3441;r<=3446;r++)i[r]=2;for(r=3447;r<=3450;r++)i[r]=0;for(r=3451;r<=3459;r++)i[r]=2;for(r=3460;r<=3478;r++)i[r]=0;for(r=3554;r<=3559;r++)i[r]=0;for(r=3560;r<=3570;r++)i[r]=2;for(r=3571;r<=3581;r++)i[r]=0;for(r=3594;r<=3597;r++)i[r]=0;for(r=3601;r<=3604;r++)i[r]=0;for(r=3637;r<=3639;r++)i[r]=0;for(r=3665;r<=3667;r++)i[r]=0;for(r=3693;r<=3695;r++)i[r]=0;for(r=3701;r<=3727;r++)i[r]=0;for(r=3728;r<=3739;r++)i[r]=2;for(r=3740;r<=3751;r++)i[r]=0;for(r=3753;r<=3760;r++)i[r]=2;for(r=3761;r<=3773;r++)i[r]=0;for(r=3775;r<=3777;r++)i[r]=0;for(r=3779;r<=3781;r++)i[r]=0;for(r=3783;r<=3785;r++)i[r]=0;for(r=3788;r<=3791;r++)i[r]=0;for(r=3797;r<=3802;r++)i[r]=0;for(r=3814;r<=3816;r++)i[r]=0;for(r=3825;r<=3829;r++)i[r]=0;for(r=3832;r<=3841;r++)i[r]=0;for(r=3844;r<=3852;r++)i[r]=0;for(r=3873;r<=3885;r++)i[r]=0;for(r=3890;r<=3893;r++)i[r]=0;for(r=3907;r<=3912;r++)i[r]=0;for(r=3942;r<=3950;r++)i[r]=0;for(r=3968;r<=3970;r++)i[r]=0;for(r=3973;r<=3976;r++)i[r]=0;for(r=3986;r<=3989;r++)i[r]=0;for(r=3994;r<=3997;r++)i[r]=0;for(r=4048;r<=4051;r++)i[r]=0;for(r=4056;r<=4063;r++)i[r]=0;for(r=4093;r<=4096;r++)i[r]=0;for(r=4390;r<=4398;r++)i[r]=0;for(r=4399;r<=4413;r++)i[r]=2;for(r=4418;r<=4433;r++)i[r]=2;for(r=4455;r<=4457;r++)i[r]=2;for(r=4484;r<=4489;r++)i[r]=0;for(r=4491;r<=4554;r++)i[r]=0;for(r=4568;r<=4589;r++)i[r]=0;for(r=4652;r<=4656;r++)i[r]=0;for(r=4766;r<=4800;r++)i[r]=0;for(r=5014;r<=5016;r++)i[r]=0;for(r=5069;r<=5072;r++)i[r]=0;for(r=5105;r<=5130;r++)i[r]=0;for(r=5173;r<=5188;r++)i[r]=0;for(r=5253;r<=5259;r++)i[r]=0;for(r=5269;r<=5275;r++)i[r]=0;for(r=5292;r<=5311;r++)i[r]=0;for(r=5329;r<=5331;r++)i[r]=0;for(r=5343;r<=5349;r++)i[r]=0;for(r=5355;r<=5357;r++)i[r]=0;for(r=5387;r<=5389;r++)i[r]=0;for(r=5459;r<=5463;r++)i[r]=0;for(r=5479;r<=5482;r++)i[r]=0;for(r=5518;r<=5520;r++)i[r]=0;for(r=5530;r<=5539;r++)i[r]=0;for(r=5550;r<=5552;r++)i[r]=0;for(r=5562;r<=5583;r++)i[r]=0;for(r=5623;r<=5625;r++)i[r]=2;for(r=5631;r<=5639;r++)i[r]=0;for(r=5649;r<=5653;r++)i[r]=0;for(r=5663;r<=5680;r++)i[r]=0;for(r=5682;r<=5685;r++)i[r]=0;for(r=5875;r<=5877;r++)i[r]=0;for(r=5896;r<=5899;r++)i[r]=0;for(r=5921;r<=5940;r++)i[r]=0;for(r=6050;r<=6125;r++)i[r]=0;for(r=6244;r<=6275;r++)i[r]=0;for(r=6328;r<=6348;r++)i[r]=0;for(r=6350;r<=6356;r++)i[r]=0;for(r=6366;r<=6372;r++)i[r]=0;for(r=6381;r<=6387;r++)i[r]=0;for(r=6393;r<=6404;r++)i[r]=0;for(r=6480;r<=6483;r++)i[r]=0;for(r=6511;r<=6514;r++)i[r]=0;for(r=6579;r<=6581;r++)i[r]=0;for(r=6619;r<=6624;r++)i[r]=0;for(r=6625;r<=6627;r++)i[r]=2;for(r=6628;r<=6632;r++)i[r]=0;for(r=6634;r<=6637;r++)i[r]=0;for(r=6669;r<=6692;r++)i[r]=0;for(r=6707;r<=6709;r++)i[r]=0;for(r=6720;r<=6723;r++)i[r]=0;for(r=6732;r<=6738;r++)i[r]=0;for(r=6931;r<=6933;r++)i[r]=0;for(r=6956;r<=6959;r++)i[r]=0;for(r=7005;r<=7007;r++)i[r]=0;for(r=7057;r<=7070;r++)i[r]=2;for(r=7074;r<=7082;r++)i[r]=0;for(r=7109;r<=7118;r++)i[r]=0;for(r=7119;r<=7127;r++)i[r]=1;for(r=7374;r<=7376;r++)i[r]=0;for(r=7528;r<=7586;r++)i[r]=0;for(r=7587;r<=7645;r++)i[r]=2;for(r=7692;r<=7696;r++)i[r]=0;for(r=7755;r<=7787;r++)i[r]=0;for(r=7791;r<=7795;r++)i[r]=0;for(r=7799;r<=7801;r++)i[r]=0;for(r=7803;r<=7805;r++)i[r]=0;for(r=7825;r<=7831;r++)i[r]=0;for(r=7845;r<=7859;r++)i[r]=0;for(r=8013;r<=8032;r++)i[r]=0;for(r=8065;r<=8068;r++)i[r]=1;for(r=8518;r<=8529;r++)i[r]=2;for(r=8533;r<=8536;r++)i[r]=2;for(r=8538;r<=8540;r++)i[r]=2;for(r=8677;r<=8679;r++)i[r]=0;for(r=8836;r<=8840;r++)i[r]=0;for(r=8857;r<=8859;r++)i[r]=0;for(r=8908;r<=8910;r++)i[r]=0;for(r=9154;r<=9159;r++)i[r]=0;for(r=9205;r<=9218;r++)i[r]=0;for(r=9271;r<=9273;r++)i[r]=0;for(r=9295;r<=9297;r++)i[r]=0;for(r=9356;r<=9360;r++)i[r]=0;for(r=9404;r<=9407;r++)i[r]=0;for(r=9476;r<=9482;r++)i[r]=0;for(r=9487;r<=9494;r++)i[r]=0;for(r=9697;r<=9699;r++)i[r]=0;for(r=9821;r<=9865;r++)i[r]=0;for(r=20002;r<=20032;r++)i[r]=0;for(r=20047;r<=20049;r++)i[r]=0;for(r=20062;r<=20092;r++)i[r]=0;for(r=20135;r<=20138;r++)i[r]=0;for(r=20248;r<=20258;r++)i[r]=0;for(r=20348;r<=20358;r++)i[r]=0;for(r=20436;r<=20440;r++)i[r]=0;for(r=20822;r<=20824;r++)i[r]=0;for(r=20904;r<=20932;r++)i[r]=0;for(r=20934;r<=20936;r++)i[r]=0;for(r=21004;r<=21032;r++)i[r]=0;for(r=21035;r<=21037;r++)i[r]=0;for(r=21095;r<=21097;r++)i[r]=0;for(r=21148;r<=21150;r++)i[r]=0;for(r=21207;r<=21264;r++)i[r]=0;for(r=21307;r<=21364;r++)i[r]=0;for(r=21413;r<=21423;r++)i[r]=0;for(r=21453;r<=21463;r++)i[r]=0;for(r=21473;r<=21483;r++)i[r]=0;for(r=21780;r<=21782;r++)i[r]=0;for(r=21891;r<=21894;r++)i[r]=0;for(r=21896;r<=21899;r++)i[r]=0;for(r=22171;r<=22177;r++)i[r]=0;for(r=22181;r<=22187;r++)i[r]=0;for(r=22191;r<=22197;r++)i[r]=0;for(r=22207;r<=22222;r++)i[r]=0;for(r=22234;r<=22236;r++)i[r]=0;for(r=22243;r<=22250;r++)i[r]=0;for(r=22262;r<=22265;r++)i[r]=0;for(r=22307;r<=22322;r++)i[r]=0;for(r=22348;r<=22357;r++)i[r]=0;for(r=22407;r<=22422;r++)i[r]=0;for(r=22462;r<=22465;r++)i[r]=0;for(r=22521;r<=22525;r++)i[r]=0;for(r=22607;r<=22622;r++)i[r]=0;for(r=22641;r<=22646;r++)i[r]=0;for(r=22648;r<=22657;r++)i[r]=0;for(r=22707;r<=22722;r++)i[r]=0;for(r=22762;r<=22765;r++)i[r]=0;for(r=22991;r<=22994;r++)i[r]=0;for(r=23028;r<=23038;r++)i[r]=0;for(r=23830;r<=23853;r++)i[r]=0;for(r=23866;r<=23872;r++)i[r]=0;for(r=23877;r<=23884;r++)i[r]=0;for(r=23886;r<=23894;r++)i[r]=0;for(r=23946;r<=23948;r++)i[r]=0;for(r=24311;r<=24313;r++)i[r]=0;for(r=24342;r<=24347;r++)i[r]=0;for(r=24370;r<=24374;r++)i[r]=10;for(r=24375;r<=24381;r++)i[r]=0;for(r=24718;r<=24721;r++)i[r]=0;for(r=24817;r<=24821;r++)i[r]=0;for(r=24877;r<=24882;r++)i[r]=0;for(r=24891;r<=24893;r++)i[r]=0;for(r=25391;r<=25395;r++)i[r]=0;for(r=25828;r<=25838;r++)i[r]=0;for(r=26191;r<=26195;r++)i[r]=0;for(r=26391;r<=26393;r++)i[r]=0;for(r=26701;r<=26722;r++)i[r]=0;for(r=26729;r<=26799;r++)i[r]=2;for(r=26801;r<=26803;r++)i[r]=2;for(r=26811;r<=26813;r++)i[r]=2;for(r=26847;r<=26870;r++)i[r]=2;for(r=26891;r<=26899;r++)i[r]=0;for(r=26901;r<=26923;r++)i[r]=0;for(r=26929;r<=26946;r++)i[r]=0;for(r=26948;r<=26998;r++)i[r]=0;for(r=27037;r<=27040;r++)i[r]=0;for(r=27205;r<=27232;r++)i[r]=0;for(r=27258;r<=27260;r++)i[r]=0;for(r=27391;r<=27398;r++)i[r]=0;for(r=27561;r<=27564;r++)i[r]=0;for(r=27571;r<=27574;r++)i[r]=0;for(r=27581;r<=27584;r++)i[r]=0;for(r=27591;r<=27594;r++)i[r]=0;for(r=28191;r<=28193;r++)i[r]=0;for(r=28348;r<=28358;r++)i[r]=0;for(r=28402;r<=28432;r++)i[r]=0;for(r=28462;r<=28492;r++)i[r]=0;for(r=29118;r<=29122;r++)i[r]=0;for(r=29168;r<=29172;r++)i[r]=0;for(r=29177;r<=29185;r++)i[r]=0;for(r=29187;r<=29195;r++)i[r]=0;for(r=29900;r<=29903;r++)i[r]=0;for(r=30161;r<=30179;r++)i[r]=0;for(r=30491;r<=30494;r++)i[r]=0;for(r=30729;r<=30732;r++)i[r]=0;for(r=31251;r<=31259;r++)i[r]=0;for(r=31265;r<=31268;r++)i[r]=0;for(r=31275;r<=31279;r++)i[r]=0;for(r=31281;r<=31297;r++)i[r]=0;for(r=31461;r<=31469;r++)i[r]=0;for(r=31491;r<=31495;r++)i[r]=0;for(r=31917;r<=31922;r++)i[r]=0;for(r=31965;r<=32e3;r++)i[r]=0;for(r=32001;r<=32003;r++)i[r]=2;for(r=32005;r<=32031;r++)i[r]=2;for(r=32033;r<=32060;r++)i[r]=2;for(r=32064;r<=32067;r++)i[r]=2;for(r=32074;r<=32077;r++)i[r]=2;for(r=32081;r<=32086;r++)i[r]=0;for(r=32107;r<=32130;r++)i[r]=0;for(r=32133;r<=32159;r++)i[r]=0;for(r=32164;r<=32167;r++)i[r]=2;for(r=32180;r<=32199;r++)i[r]=0;for(r=32201;r<=32260;r++)i[r]=0;for(r=32301;r<=32360;r++)i[r]=0;for(r=32601;r<=32662;r++)i[r]=0;for(r=32664;r<=32667;r++)i[r]=2;for(r=32701;r<=32761;r++)i[r]=0;for(r=53001;r<=53004;r++)i[r]=0;for(r=53008;r<=53019;r++)i[r]=0;for(r=53021;r<=53032;r++)i[r]=0;for(r=53034;r<=53037;r++)i[r]=0;for(r=53042;r<=53046;r++)i[r]=0;for(r=53074;r<=53080;r++)i[r]=0;for(r=54001;r<=54004;r++)i[r]=0;for(r=54008;r<=54019;r++)i[r]=0;for(r=54021;r<=54032;r++)i[r]=0;for(r=54034;r<=54037;r++)i[r]=0;for(r=54042;r<=54046;r++)i[r]=0;for(r=54048;r<=54053;r++)i[r]=0;for(r=54074;r<=54080;r++)i[r]=0;for(r=54098;r<=54101;r++)i[r]=0;for(r=102001;r<=102040;r++)i[r]=0;for(r=102042;r<=102063;r++)i[r]=0;for(r=102065;r<=102067;r++)i[r]=0;for(r=102070;r<=102117;r++)i[r]=0;for(r=102122;r<=102216;r++)i[r]=0;for(r=102221;r<=102377;r++)i[r]=0;for(r=102382;r<=102388;r++)i[r]=0;for(r=102389;r<=102398;r++)i[r]=2;for(r=102399;r<=102444;r++)i[r]=0;for(r=102445;r<=102447;r++)i[r]=2;for(r=102448;r<=102458;r++)i[r]=0;for(r=102459;r<=102468;r++)i[r]=2;for(r=102469;r<=102499;r++)i[r]=0;for(r=102500;r<=102519;r++)i[r]=1;for(r=102520;r<=102524;r++)i[r]=0;for(r=102525;r<=102529;r++)i[r]=2;for(r=102530;r<=102588;r++)i[r]=0;for(r=102590;r<=102598;r++)i[r]=0;for(r=102601;r<=102603;r++)i[r]=0;for(r=102605;r<=102628;r++)i[r]=0;for(r=102629;r<=102646;r++)i[r]=2;for(r=102648;r<=102700;r++)i[r]=2;for(r=102701;r<=102703;r++)i[r]=0;for(r=102707;r<=102730;r++)i[r]=2;for(r=102733;r<=102758;r++)i[r]=2;for(r=102767;r<=102900;r++)i[r]=0;for(r=102901;r<=102933;r++)i[r]=2;for(r=102934;r<=102950;r++)i[r]=13;for(r=102951;r<=102955;r++)i[r]=0;for(r=102961;r<=102963;r++)i[r]=0;for(r=102965;r<=102969;r++)i[r]=0;for(r=102971;r<=102973;r++)i[r]=0;for(r=102975;r<=102989;r++)i[r]=0;for(r=102990;r<=102992;r++)i[r]=1;for(r=102997;r<=103002;r++)i[r]=0;for(r=103003;r<=103008;r++)i[r]=2;for(r=103009;r<=103011;r++)i[r]=0;for(r=103012;r<=103014;r++)i[r]=2;for(r=103019;r<=103021;r++)i[r]=0;for(r=103022;r<=103024;r++)i[r]=2;for(r=103029;r<=103031;r++)i[r]=0;for(r=103032;r<=103034;r++)i[r]=2;for(r=103065;r<=103068;r++)i[r]=0;for(r=103074;r<=103076;r++)i[r]=0;for(r=103077;r<=103079;r++)i[r]=1;for(r=103080;r<=103082;r++)i[r]=0;for(r=103083;r<=103085;r++)i[r]=2;for(r=103090;r<=103093;r++)i[r]=0;for(r=103097;r<=103099;r++)i[r]=0;for(r=103100;r<=103102;r++)i[r]=2;for(r=103107;r<=103109;r++)i[r]=0;for(r=103110;r<=103112;r++)i[r]=2;for(r=103113;r<=103116;r++)i[r]=0;for(r=103117;r<=103120;r++)i[r]=2;for(r=103153;r<=103157;r++)i[r]=0;for(r=103158;r<=103162;r++)i[r]=2;for(r=103163;r<=103165;r++)i[r]=0;for(r=103166;r<=103168;r++)i[r]=1;for(r=103169;r<=103171;r++)i[r]=2;for(r=103186;r<=103188;r++)i[r]=0;for(r=103189;r<=103191;r++)i[r]=2;for(r=103192;r<=103195;r++)i[r]=0;for(r=103196;r<=103199;r++)i[r]=2;for(r=103200;r<=103224;r++)i[r]=0;for(r=103225;r<=103227;r++)i[r]=1;for(r=103232;r<=103237;r++)i[r]=0;for(r=103238;r<=103243;r++)i[r]=2;for(r=103244;r<=103246;r++)i[r]=0;for(r=103247;r<=103249;r++)i[r]=2;for(r=103254;r<=103256;r++)i[r]=0;for(r=103257;r<=103259;r++)i[r]=2;for(r=103264;r<=103266;r++)i[r]=0;for(r=103267;r<=103269;r++)i[r]=2;for(r=103300;r<=103375;r++)i[r]=0;for(r=103381;r<=103383;r++)i[r]=0;for(r=103384;r<=103386;r++)i[r]=1;for(r=103387;r<=103389;r++)i[r]=0;for(r=103390;r<=103392;r++)i[r]=2;for(r=103397;r<=103399;r++)i[r]=0;for(r=103400;r<=103471;r++)i[r]=2;for(r=103476;r<=103478;r++)i[r]=0;for(r=103479;r<=103481;r++)i[r]=2;for(r=103486;r<=103488;r++)i[r]=0;for(r=103489;r<=103491;r++)i[r]=2;for(r=103492;r<=103495;r++)i[r]=0;for(r=103496;r<=103499;r++)i[r]=2;for(r=103528;r<=103543;r++)i[r]=0;for(r=103544;r<=103548;r++)i[r]=2;for(r=103549;r<=103551;r++)i[r]=0;for(r=103552;r<=103554;r++)i[r]=1;for(r=103555;r<=103557;r++)i[r]=2;for(r=103558;r<=103560;r++)i[r]=0;for(r=103571;r<=103573;r++)i[r]=0;for(r=103574;r<=103576;r++)i[r]=2;for(r=103577;r<=103580;r++)i[r]=0;for(r=103581;r<=103583;r++)i[r]=2;for(r=103595;r<=103694;r++)i[r]=0;for(r=103696;r<=103699;r++)i[r]=0;for(r=103700;r<=103793;r++)i[r]=2;for(r=103794;r<=103890;r++)i[r]=0;for(r=103891;r<=103896;r++)i[r]=2;for(r=103900;r<=103971;r++)i[r]=2;for(r=103972;r<=103977;r++)i[r]=0;for(r=112e3;r<=112101;r++)i[r]=0},24470:(t,e,n)=>{n.d(e,{Gv:()=>x,HH:()=>l,SO:()=>f,Ue:()=>i,al:()=>o,cS:()=>p,fS:()=>y,jE:()=>h,jn:()=>u,kK:()=>c,oJ:()=>a,r3:()=>m}),n(80442),n(22021);var r=n(6570);function i(t=M){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function o(t,e,n,r,s=i()){return s[0]=t,s[1]=e,s[2]=n,s[3]=r,s}function a(t,e=i()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function l(t,e){return new r.Z({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:e})}function u(t,e,n){if(null!=e)if("length"in e)d(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function f(t){return function(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}(t)*function(t){return t[1]>=t[3]?0:t[3]-t[1]}(t)}function h(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function c(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function m(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function p(t){return t?s(t,x):i(x)}function d(t){return null!=t&&4===t.length}function y(t,e){return d(t)&&d(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const x=[1/0,1/0,-1/0,-1/0],M=[0,0,0,0]},20322:(t,e,n)=>{n.d(e,{$P:()=>c,C6:()=>y,Cs:()=>m,Yg:()=>d,l1:()=>p,lC:()=>M});var r=n(24470);function i(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function o(t){return void 0!==t.x&&void 0!==t.y}function a(t){return void 0!==t.paths}function l(t){return void 0!==t.rings}function u(t){return function(e,n){return null==e?n:null==n?e:t(e,n)}}const f=u(Math.min),h=u(Math.max);function c(t,e){return a(e)?y(t,e.paths,!1,!1):l(e)?y(t,e.rings,!1,!1):s(e)?M(t,e.points,!1,!1,!1,!1):i(e)?x(t,e):(o(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.x,t[3]=e.y),t)}function m(t){let e,n,i,s;for(t.reset(),e=i=1/0,n=s=-1/0;t.nextPath();){const r=p(t);e=Math.min(r[0],e),i=Math.min(r[1],i),n=Math.max(r[2],n),s=Math.max(r[3],s)}return(0,r.Ue)([e,i,n,s])}function p(t){let e,n,i,s;for(e=i=1/0,n=s=-1/0;t.nextPoint();)e=Math.min(t.x,e),i=Math.min(t.y,i),n=Math.max(t.x,n),s=Math.max(t.y,s);return(0,r.Ue)([e,i,n,s])}function d(t,e){return a(e)?y(t,e.paths,!0,!1):l(e)?y(t,e.rings,!0,!1):s(e)?M(t,e.points,!0,!1,!0,!1):i(e)?x(t,e,0,0,!0,!1):(o(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.x,t[4]=e.y,t[5]=e.z),t)}function y(t,e,n,r){const i=n?3:2;if(!e.length||!e[0].length)return null;let s,o,a,l,[u,c]=e[0][0],[m,p]=e[0][0];for(let t=0;t<e.length;t++){const d=e[t];for(let t=0;t<d.length;t++){const e=d[t],[y,x]=e;if(u=f(u,y),c=f(c,x),m=h(m,y),p=h(p,x),n&&e.length>2){const t=e[2];s=f(s,t),o=h(o,t)}if(r&&e.length>i){const t=e[i];a=f(s,t),l=h(o,t)}}}return n?r?(t[0]=u,t[1]=c,t[2]=s,t[3]=a,t[4]=m,t[5]=p,t[6]=o,t[7]=l,t.length=8,t):(t[0]=u,t[1]=c,t[2]=s,t[3]=m,t[4]=p,t[5]=o,t.length=6,t):r?(t[0]=u,t[1]=c,t[2]=a,t[3]=m,t[4]=p,t[5]=l,t.length=6,t):(t[0]=u,t[1]=c,t[2]=m,t[3]=p,t.length=4,t)}function x(t,e,n,r,i,s){const o=e.xmin,a=e.xmax,l=e.ymin,u=e.ymax;let f=e.zmin,h=e.zmax,c=e.mmin,m=e.mmax;return i?(f=f||0,h=h||0,s?(c=c||0,m=m||0,t[0]=o,t[1]=l,t[2]=f,t[3]=c,t[4]=a,t[5]=u,t[6]=h,t[7]=m,t):(t[0]=o,t[1]=l,t[2]=f,t[3]=a,t[4]=u,t[5]=h,t)):s?(c=c||0,m=m||0,t[0]=o,t[1]=l,t[2]=c,t[3]=a,t[4]=u,t[5]=m,t):(t[0]=o,t[1]=l,t[2]=a,t[3]=u,t)}function M(t,e,n,r,i,s){const o=n?3:2,a=r&&s,l=n&&i;if(!e.length||!e[0].length)return null;let u,c,m,p,[d,y]=e[0],[x,M]=e[0];for(let t=0;t<e.length;t++){const n=e[t],[r,i]=n;if(d=f(d,r),y=f(y,i),x=h(x,r),M=h(M,i),l&&n.length>2){const t=n[2];u=f(u,t),c=h(c,t)}if(a&&n.length>o){const t=n[o];m=f(u,t),p=h(c,t)}}return i?(u=u||0,c=c||0,s?(m=m||0,p=p||0,t[0]=d,t[1]=y,t[2]=u,t[3]=m,t[4]=x,t[5]=M,t[6]=c,t[7]=p,t):(t[0]=d,t[1]=y,t[2]=u,t[3]=x,t[4]=M,t[5]=c,t)):s?(m=m||0,p=p||0,t[0]=d,t[1]=y,t[2]=m,t[3]=x,t[4]=M,t[5]=p,t):(t[0]=d,t[1]=y,t[2]=x,t[3]=M,t)}},35308:(t,e,n)=>{n.d(e,{$G:()=>s,DS:()=>a,NA:()=>f,Vm:()=>l,tO:()=>o});var r=n(95961),i=n(86662);function s(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function o(t){return t?function(t,e){if(!t||!t.length)return null;const n=[],r=[],s=e?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let n=0,i=t.length;n<i;n++){const i=a(t[n],e,s);i&&r.push(i)}if(r.sort(((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r})),r.length&&(n[0]=r[0][0],n[1]=r[0][1],e&&(n[2]=r[0][3]),(n[0]<s[0]||n[0]>s[1]||n[1]<s[2]||n[1]>s[3]||e&&(n[2]<s[4]||n[2]>s[5]))&&(n.length=0)),!n.length){const r=t[0]&&t[0].length?function(t,e){const n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,l=0;for(let u=0,f=t.length;u<f-1;u++){const f=t[u],h=t[u+1];if(f&&h){n[0]=f[0],n[1]=f[1],r[0]=h[0],r[1]=h[1],e&&f.length>2&&h.length>2&&(n[2]=f[2],r[2]=h[2]);const t=(0,i.xA)(n,r);if(t){s+=t;const n=(0,i.Gi)(f,h);o+=t*n[0],a+=t*n[1],e&&n.length>2&&(l+=t*n[2])}}}return s>0?e?[o/s,a/s,l/s]:[o/s,a/s]:t.length?t[0]:null}(t[0],e):null;if(!r)return null;n[0]=r[0],n[1]=r[1],e&&r.length>2&&(n[2]=r[2])}return n}(t.rings,t.hasZ??!1):null}function a(t,e,n){let r=0,i=0,s=0,o=0,a=0;const l=t.length?t[0][0]:0,u=t.length?t[0][1]:0,f=t.length&&e?t[0][2]:0;for(let h=0;h<t.length;h++){const c=t[h],m=t[(h+1)%t.length],[p,d,y]=c,x=p-l,M=d-u,[g,_,w]=m,S=g-l,b=_-u,R=x*b-S*M;if(o+=R,r+=(x+S)*R,i+=(M+b)*R,e&&c.length>2&&m.length>2){const t=y-f,e=w-f,n=x*e-S*t;s+=(t+e)*n,a+=n}p<n[0]&&(n[0]=p),p>n[1]&&(n[1]=p),d<n[2]&&(n[2]=d),d>n[3]&&(n[3]=d),e&&(y<n[4]&&(n[4]=y),y>n[5]&&(n[5]=y))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const h=[r/(6*o)+l,i/(6*o)+u,o];return e&&(n[4]===n[5]||0===a?(h[3]=(n[4]+n[5])/2,h[4]=0):(h[3]=s/(6*a)+f,h[4]=a)),h}function l(t){const{hasZ:e,numPaths:n}=t;if(0===n)return null;const s=[],o=[],l=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const e=a((0,r.l)(t),t.hasZ,l);e&&o.push(e)}if(o.sort(((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r})),o.length&&(s[0]=o[0][0],s[1]=o[0][1],e&&(s[2]=o[0][3]),(s[0]<l[0]||s[0]>l[1]||s[1]<l[2]||s[1]>l[3]||e&&(s[2]<l[4]||s[2]>l[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const n=t.numPoints?function(t){const{hasZ:e}=t,n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,l=0;if(t.nextPoint()){let u=t.x,f=t.y,h=t.z;for(;t.nextPoint();){const c=t.x,m=t.y,p=t.z;n[0]=u,n[1]=f,r[0]=c,r[1]=m,e&&(n[2]=h,r[2]=p);const d=(0,i.xA)(n,r);if(d){s+=d;const t=(0,i.Gi)(n,r);o+=d*t[0],a+=d*t[1],e&&t.length>2&&(l+=d*t[2])}u=c,f=m,h=p}}return s>0?e?[o/s,a/s,l/s]:[o/s,a/s]:t.numPoints?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!n)return null;s[0]=n[0],s[1]=n[1],e&&n.length>2&&(s[2]=n[2])}return s}const u=1e-6;function f(t){let e=0;for(t.reset();t.nextPath();)e+=(0,i.VK)(t);if(e<u){const e=l(t);return e?[e[0],e[1]]:null}const n=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)c(n,r,t);return n[0]*=1/e,n[1]*=1/e,n[0]+=r[0],n[1]+=r[1],n}const h=1/3;function c(t,e,n){if(!t||!n||n.numPoints<3)return null;n.nextPoint();const r=n.x,s=n.y;n.nextPoint();let o,a=n.x-r,l=n.y-s,u=0,f=0;for(;n.nextPoint();)u=n.x-r,f=n.y-s,o=.5*h*(u*l-f*a),t[0]+=o*(a+u),t[1]+=o*(l+f),a=u,l=f;const c=(0,i.VK)(n),m=[r,s];return m[0]-=e[0],m[1]-=e[1],m[0]*=c,m[1]*=c,t[0]+=m[0],t[1]+=m[1],t}},54102:(t,e,n)=>{n.d(e,{CI:()=>f,OQ:()=>a,Qg:()=>l,aV:()=>i,lQ:()=>s,uP:()=>o,wP:()=>h});const r=[0,0];function i(t,e){return null!=e&&u(t,e.x,e.y,e.z)}function s(t,e){if(!e.points||e.points.length)return!1;for(const n of e.points)if(!a(t,n))return!1;return!0}function o(t,e){const{xmin:n,ymin:r,zmin:i,xmax:s,ymax:o,zmax:a}=e;return t.hasZ&&e.hasZ?u(t,n,r,i)&&u(t,n,o,i)&&u(t,s,o,i)&&u(t,s,r,i)&&u(t,n,r,a)&&u(t,n,o,a)&&u(t,s,o,a)&&u(t,s,r,a):u(t,n,r)&&u(t,n,o)&&u(t,s,o)&&u(t,s,r)}function a(t,e){return u(t,e[0],e[1])}function l(t,e){return u(t,e[0],e[1],e[2])}function u(t,e,n,r){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==r||!t.hasZ||r>=t.zmin&&r<=t.zmax)}function f(t,e){return r[1]=e.y,r[0]=e.x,function(t,e){return h(t.rings,e)}(t,r)}function h(t,e){if(!t)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return c(!1,t,e);let n=!1;for(let r=0,i=t.length;r<i;r++)n=c(n,t[r],e);return n}function c(t,e,n){const[r,i]=n;let s=t,o=0;for(let t=0,n=e.length;t<n;t++){o++,o===n&&(o=0);const[a,l]=e[t],[u,f]=e[o];(l<i&&f>=i||f<i&&l>=i)&&a+(i-l)/(f-l)*(u-a)<r&&(s=!s)}return s}},86662:(t,e,n)=>{n.d(e,{Gi:()=>l,Sm:()=>c,Tx:()=>s,VK:()=>m,Zy:()=>h,bu:()=>u,ko:()=>o,xA:()=>i});var r=n(67676);function i(t,e){const n=e[0]-t[0],r=e[1]-t[1];if(t.length>2&&e.length>2){const i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}return Math.sqrt(n*n+r*r)}function s(t,e,n,r){const[i,s]=e,[o,a]=n[r],[l,u]=n[r+1],f=l-o,h=u-a,c=f*f+h*h,m=(i-o)*f+(s-a)*h,p=Math.min(1,Math.max(0,m/c));return t[0]=o+f*p,t[1]=a+h*p,t}function o(t,e,n){let r,i,s,o,l=!1,u=1/0;for(n.reset();n.nextPath();)if(n.nextPoint())for(r=n.x,i=n.y;n.nextPoint();)s=n.x,o=n.y,i>e!=o>e&&t<(s-r)*(e-i)/(o-i)+r&&(l=!l),u=Math.min(u,a(t,e,r,i,s,o)),r=s,i=o;return 0===u?0:(l?1:-1)*Math.sqrt(u)}function a(t,e,n,r,i,s){let o=n,a=r,l=i-o,u=s-a;if(0!==l||0!==u){const n=((t-o)*l+(e-a)*u)/(l*l+u*u);n>1?(o=i,a=s):n>0&&(o+=l*n,a+=u*n)}return l=t-o,u=e-a,l*l+u*u}function l(t,e){return function(t,e,n){const r=t[0]+n*(e[0]-t[0]),i=t[1]+n*(e[1]-t[1]);return t.length>2&&e.length>2?[r,i,t[2]+n*(e[2]-t[2])]:[r,i]}(t,e,.5)}function u(t,e,n){const r=t.length;let i=0,s=0,o=0;for(let a=0;a<r;a++){const l=t[a],u=t[(a+1)%r];let f=2;i+=l[0]*u[1]-u[0]*l[1],l.length>2&&u.length>2&&n&&(s+=l[0]*u[2]-u[0]*l[2],f=3),l.length>f&&u.length>f&&e&&(o+=l[0]*u[f]-u[0]*l[f])}return i<=0&&s<=0&&o<=0}function f(t){const e=t.length;return e>2&&(0,r.fS)(t[0],t[e-1])}function h(t){if("rings"in t)for(const e of t.rings)f(e)||e.push(e[0].slice())}function c(t){if(!t||t.length<3)return 0;let e=0;const n=t.length-1;for(let r=0;r<n;r++)e+=(t[r][0]-t[r+1][0])*(t[r][1]+t[r+1][1]);return e+=(t[n][0]-t[0][0])*(t[n][1]+t[0][1]),-.5*e}function m(t){if(!t||t.numPoints<3)return 0;let e,n,r=0;if(t.seekPathStart(),!t.nextPoint())return 0;e=t.x,n=t.y;const i=e,s=n;for(;t.nextPoint();)r+=(e-t.x)*(n+t.y),e=t.x,n=t.y;return r+=(e-i)*(n+s),-.5*r}n(8744)},49600:(t,e,n)=>{n.d(e,{Wn:()=>c,_w:()=>h,aO:()=>f});var r=n(20322);const i=[];function s(t,e,n,r){return{xmin:t,ymin:e,xmax:n,ymax:r}}function o(t,e,n,r,i,s){return{xmin:t,ymin:e,zmin:n,xmax:r,ymax:i,zmax:s}}function a(t,e,n,r,i,s){return{xmin:t,ymin:e,mmin:n,xmax:r,ymax:i,mmax:s}}function l(t,e,n,r,i,s,o,a){return{xmin:t,ymin:e,zmin:n,mmin:r,xmax:i,ymax:s,zmax:o,mmax:a}}function u(t,e=!1,n=!1){return e?n?l(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):o(t[0],t[1],t[2],t[3],t[4],t[5]):n?a(t[0],t[1],t[2],t[3],t[4],t[5]):s(t[0],t[1],t[2],t[3])}function f(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){const{x:e,y:n,z:r,m:i}=t,u=null!=i;return null!=r?u?l(e,n,r,i,e,n,r,i):o(e,n,r,e,n,r):u?a(e,n,i,e,n,i):s(e,n,e,n)}(t):function(t){return void 0!==t.rings}(t)?h(t):function(t){return void 0!==t.paths}(t)?c(t):function(t){return void 0!==t.points}(t)?function(t){const{hasZ:e,hasM:n,points:s}=t;return u((0,r.lC)(i,s,e??!1,n??!1),e,n)}(t):null:null}function h(t){const{hasZ:e,hasM:n,rings:s}=t,o=(0,r.C6)(i,s,e??!1,n??!1);return o?u(o,e,n):null}function c(t){const{hasZ:e,hasM:n,paths:s}=t,o=(0,r.C6)(i,s,e??!1,n??!1);return o?u(o,e,n):null}},87416:(t,e,n)=>{n.d(e,{Ff:()=>y,IY:()=>g,Nl:()=>m,UT:()=>M,h_:()=>s});var r=n(54102);function i(t,e){return(0,r.aV)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let r,i,s;if(t.xmin<=e.xmin){if(r=e.xmin,t.xmax<r)return!1}else if(r=t.xmin,e.xmax<r)return!1;if(t.ymin<=e.ymin){if(i=e.ymin,t.ymax<i)return!1}else if(i=t.ymin,e.ymax<i)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function o(t,e){const{points:n,hasZ:i}=e,s=i?r.Qg:r.OQ;for(const e of n)if(s(t,e))return!0;return!1}const a=[0,0],l=[0,0],u=[0,0],f=[0,0],h=[a,l,u,f],c=[[u,a],[a,l],[l,f],[f,u]];function m(t,e){return function(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,u[0]=t.xmin,u[1]=t.ymin,f[0]=t.xmax,f[1]=t.ymin;for(const t of h)if((0,r.wP)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,r.OQ)(t,e))return!0;for(let i=1;i<n.length;i++){const s=n[i];if((0,r.OQ)(t,s)||x(e,s,c))return!0;e=s}}return!1}(t,e.rings)}function p(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,u[0]=t.xmin,u[1]=t.ymin,f[0]=t.xmax,f[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let i=e[0];if((0,r.OQ)(t,i))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,r.OQ)(t,s)||x(i,s,c))return!0;i=s}}return!1}const d=[0,0];function y(t){for(let e=0;e<t.length;e++){const n=t[e];for(let r=0;r<n.length-1;r++){const i=n[r],s=n[r+1];for(let n=e+1;n<t.length;n++)for(let e=0;e<t[n].length-1;e++){const r=t[n][e],o=t[n][e+1];if(M(i,s,r,o,d)&&!(d[0]===i[0]&&d[1]===i[1]||d[0]===r[0]&&d[1]===r[1]||d[0]===s[0]&&d[1]===s[1]||d[0]===o[0]&&d[1]===o[1]))return!0}}const r=n.length;if(!(r<=4))for(let t=0;t<r-3;t++){let e=r-1;0===t&&(e=r-2);const i=n[t],s=n[t+1];for(let r=t+2;r<e;r++){const t=n[r],e=n[r+1];if(M(i,s,t,e,d)&&!(d[0]===i[0]&&d[1]===i[1]||d[0]===t[0]&&d[1]===t[1]||d[0]===s[0]&&d[1]===s[1]||d[0]===e[0]&&d[1]===e[1]))return!0}}}return!1}function x(t,e,n){for(let r=0;r<n.length;r++)if(M(t,e,n[r][0],n[r][1]))return!0;return!1}function M(t,e,n,r,i){const[s,o]=t,[a,l]=e,[u,f]=n,[h,c]=r,m=h-u,p=s-u,d=a-s,y=c-f,x=o-f,M=l-o,g=y*d-m*M;if(0===g)return!1;const _=(m*x-y*p)/g,w=(d*x-M*p)/g;return _>=0&&_<=1&&w>=0&&w<=1&&(i&&(i[0]=s+_*(a-s),i[1]=o+_*(l-o)),!0)}function g(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return o;case"esriGeometryPoint":case"point":return i;case"esriGeometryPolygon":case"polygon":return m;case"esriGeometryPolyline":case"polyline":return p}}},8744:(t,e,n)=>{n.d(e,{BZ:()=>w,C5:()=>m,JY:()=>C,ME:()=>S,MP:()=>R,N$:()=>d,QM:()=>g,R_:()=>P,V2:()=>b,WR:()=>A,Zn:()=>v,fS:()=>c,o$:()=>_,oR:()=>y,sS:()=>M,sT:()=>p,yW:()=>x});var r=n(19153),i=n(56726),s=n(58116);const o={102113:!0,102100:!0,3857:!0,3785:!0},a={4326:!0,3785:!0,3857:!0,102113:!0,102100:!0,104905:!0,104971:!0},l='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',u=[-20037508.342788905,20037508.342788905],f=[-20037508.342787,20037508.342787],h={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:u,origin:f,dx:1e-5},102100:{wkTemplate:l,valid:u,origin:f,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:u,origin:f,dx:1e-5},3857:{wkTemplate:l,valid:u,origin:f,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function c(t,e){return t===e||null!=t&&null!=e&&(null!=t.wkid||null!=e.wkid?t.wkid===e.wkid||M(t)&&M(e)||null!=e.latestWkid&&t.wkid===e.latestWkid||null!=t.latestWkid&&e.wkid===t.latestWkid:!(!t.wkt||!e.wkt)&&t.wkt.toUpperCase()===e.wkt.toUpperCase())}function m(t){return C(t)&&t.wkid&&h[t.wkid]||null}function p(t){return!!C(t)&&(t.wkid?null==s.Z[t.wkid]:!!t.wkt&&!!/^\s*GEOGCS/i.test(t.wkt))}function d(t){return!(w(t)||b(t))}function y(t){return C(t)&&4326===t.wkid}function x(t){return C(t)&&t.wkid===i.W.CGCS2000}function M(t){return C(t)&&null!=t.wkid&&!0===o[t.wkid]}function g(t){return C(t)&&32662===t.wkid}function _(t){return t===i.W.GCSMARS2000||t===i.W.GCSMARS2000_SPHERE}function w(t){return C(t)&&null!=t.wkid&&_(t.wkid)}function S(t){return t===i.W.GCSMOON2000}function b(t){return C(t)&&null!=t.wkid&&S(t.wkid)}function R(t){return C(t)&&null!=t.wkid&&!0===a[t.wkid]}function C(t){return null!=t&&(null!=t.wkid&&t.wkid>=2e3||null!=t.wkt)}const v={wkid:4326,wkt:(0,r.gx)(h[4326].wkTemplate,{Central_Meridian:"0.0"})},P={wkid:102100,latestWkid:3857},A={wkid:32662}},40488:(t,e,n)=>{n.d(e,{$:()=>g,Q8:()=>d,R6:()=>M,Sx:()=>_,hG:()=>x,iV:()=>y,mZ:()=>h});var r=n(22974),i=n(82971),s=n(68441),o=n(8744);const a=57.29577951308232,l=.017453292519943;function u(t){return t*a}function f(t){return t*l}function h(t){return Math.PI/2-2*Math.atan(Math.exp(-t/s.sv.radius))}function c(t){return null!=t.wkid||null!=t.wkt}const m=[0,0];function p(t,e,n,r,i){const s=t,o=i;if(o.spatialReference=n,"x"in s&&"x"in o)[o.x,o.y]=e(s.x,s.y,m,r);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=e(s.xmin,s.ymin,m,r),[o.xmax,o.ymax]=e(s.xmax,s.ymax,m,r);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const t="paths"in s?s.paths:s.rings,n=[];let i;for(let s=0;s<t.length;s++){const o=t[s];i=[],n.push(i);for(let t=0;t<o.length;t++)i.push(e(o[t][0],o[t][1],[0,0],r)),o[t].length>2&&i[t].push(o[t][2]),o[t].length>3&&i[t].push(o[t][3])}"paths"in o?o.paths=n:o.rings=n}else if("points"in s&&"points"in o){const t=s.points,n=[];for(let i=0;i<t.length;i++)n[i]=e(t[i][0],t[i][1],[0,0],r),t[i].length>2&&n[i].push(t[i][2]),t[i].length>3&&n[i].push(t[i][3]);o.points=n}return i}function d(t,e){const n=t&&(c(t)?t:t.spatialReference),r=e&&(c(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!r)&&(!!(0,o.fS)(r,n)||(0,o.sS)(r)&&(0,o.oR)(n)||(0,o.sS)(n)&&(0,o.oR)(r))}function y(t,e){if(null==t)return null;const n=t.spatialReference,s=e&&(c(e)?e:e.spatialReference);return d(n,s)?(0,o.fS)(n,s)?(0,r.d9)(t):(0,o.sS)(s)?p(t,x,i.Z.WebMercator,!1,(0,r.d9)(t)):(0,o.oR)(s)?p(t,M,i.Z.WGS84,!1,(0,r.d9)(t)):null:null}function x(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const r=f(e);return n[0]=f(t)*s.sv.radius,n[1]=s.sv.halfSemiMajorAxis*Math.log((1+Math.sin(r))/(1-Math.sin(r))),n}function M(t,e,n=[0,0],r=!1){const i=u(t/s.sv.radius);return n[0]=r?i:i-360*Math.floor((i+180)/360),n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-e/s.sv.radius))),n}function g(t,e=!1,n=(0,r.d9)(t)){return p(t,x,i.Z.WebMercator,e,n)}function _(t,e=!1,n=(0,r.d9)(t)){return p(t,M,i.Z.WGS84,e,n)}},16238:(t,e,n)=>{function r(t,e,n=!1){let{hasM:r,hasZ:i}=t;Array.isArray(e)?4!==e.length||r||i?3===e.length&&n&&!r?(i=!0,r=!1):3===e.length&&r&&i&&(r=!1,i=!1):(r=!0,i=!0):(i=!i&&e.hasZ&&(!r||e.hasM),r=!r&&e.hasM&&(!i||e.hasZ)),t.hasZ=i,t.hasM=r}n.d(e,{l:()=>r})}}]);