@arcgis/core 5.0.0-next.39 → 5.0.0-next.40

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 (174) hide show
  1. package/Basemap.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +1 -0
  4. package/assets/esri/core/workers/chunks/0429ca6ba562ae29897e.js +1 -0
  5. package/assets/esri/core/workers/chunks/{a6324f5f560ffadc6e5d.js → 061def9163a09c804b5c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +1 -0
  7. package/assets/esri/core/workers/chunks/{1de216d9850c39c1735d.js → 1357cc637524cd254974.js} +1 -1
  8. package/assets/esri/core/workers/chunks/13839d220e5c62404923.js +1 -0
  9. package/assets/esri/core/workers/chunks/1c0fb4795a52204882a8.js +1 -0
  10. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +1 -0
  11. package/assets/esri/core/workers/chunks/{52ecbaa2d32692d6d8df.js → 1f6ead46b723630db897.js} +1 -1
  12. package/assets/esri/core/workers/chunks/218b2b767b40d85fb713.js +1 -0
  13. package/assets/esri/core/workers/chunks/2c9865e34f32fb5683e5.js +1 -0
  14. package/assets/esri/core/workers/chunks/{48d1a443b324753921de.js → 2db7a7607657f1d669f7.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2f8cf7d9ff1f4de19a4c.js +1 -0
  16. package/assets/esri/core/workers/chunks/{6330d8767ba1d5329daa.js → 31b074ae2162a3508d2a.js} +1 -1
  17. package/assets/esri/core/workers/chunks/338570424337be05cef5.js +1 -0
  18. package/assets/esri/core/workers/chunks/{a59433c78ed01febca6d.js → 3767617c0dfc7d801441.js} +1 -1
  19. package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +1 -0
  20. package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +1 -0
  21. package/assets/esri/core/workers/chunks/3f33708eb39c7169a226.js +1 -0
  22. package/assets/esri/core/workers/chunks/4278b35fb6fd578c403e.js +1 -0
  23. package/assets/esri/core/workers/chunks/{3f8849c49f0e3ce7eb6b.js → 44f036cc21e3a2308f69.js} +1 -1
  24. package/assets/esri/core/workers/chunks/46daa1ff5b412a97edc9.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a5d25c71aa4dfaa878cf.js → 4c4a55be41ba105c091c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/537de53ef1e9101468f5.js +1 -0
  27. package/assets/esri/core/workers/chunks/679088064420a906aa7f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +1 -0
  29. package/assets/esri/core/workers/chunks/75643711d9585ee26a15.js +1 -0
  30. package/assets/esri/core/workers/chunks/7ba13b52fce1060fbb2a.js +1 -0
  31. package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +1 -0
  32. package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +1 -0
  33. package/assets/esri/core/workers/chunks/816227de5bd42b437df4.js +1 -0
  34. package/assets/esri/core/workers/chunks/926c2a0e21b7aa1a86e4.js +1 -0
  35. package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +1 -0
  36. package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +1 -0
  37. package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +1 -0
  38. package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +1 -0
  39. package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +1 -0
  40. package/assets/esri/core/workers/chunks/9f6c63a580b28ab715bd.js +1 -0
  41. package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +1 -0
  42. package/assets/esri/core/workers/chunks/b7bcff9a64f41a0a0b6a.js +1 -0
  43. package/assets/esri/core/workers/chunks/c0b15510a8cab98df77f.js +1 -0
  44. package/assets/esri/core/workers/chunks/c367c7e553be3682f2db.js +1 -0
  45. package/assets/esri/core/workers/chunks/cfd2839e218610a222e5.js +1 -0
  46. package/assets/esri/core/workers/chunks/{014dbe6fa93a277b08f7.js → d0014b4a8c013f59b113.js} +1 -1
  47. package/assets/esri/core/workers/chunks/d08ee45c501102deea20.js +1 -0
  48. package/assets/esri/core/workers/chunks/d42273394f575e71dd55.js +1 -0
  49. package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +1 -0
  50. package/assets/esri/core/workers/chunks/da1e61f355fb943085dc.js +1 -0
  51. package/assets/esri/core/workers/chunks/dddb6cb44cbe4dc1af97.js +1 -0
  52. package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +1 -0
  53. package/assets/esri/core/workers/chunks/f65f1798f398bc549463.js +1 -0
  54. package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +1 -0
  55. package/assets/esri/core/workers/chunks/{06462b267ff8d5984882.js → fb9643b74cf35221ff98.js} +1 -1
  56. package/chunks/Envelope.js +1 -1
  57. package/chunks/GaussianSplat.glsl.js +2 -2
  58. package/chunks/MultiPathImpl.js +1 -1
  59. package/chunks/Point2D.js +1 -1
  60. package/chunks/UnitFactory.js +1 -1
  61. package/config.js +1 -1
  62. package/core/has.js +1 -1
  63. package/form/FormTemplate.js +1 -1
  64. package/form/elements/GroupElement.js +1 -1
  65. package/form/elements/inputs/attachments/AttachmentInput.js +1 -1
  66. package/geometry/FlatGeometry.js +5 -0
  67. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  68. package/geometry/operators/support/jsonConverter.js +1 -1
  69. package/geometry/support/aaBoundingBox.js +1 -1
  70. package/geometry/support/aaBoundingRect.js +1 -1
  71. package/geometry/support/boundsUtils.js +1 -1
  72. package/interfaces.d.ts +259 -7
  73. package/kernel.js +1 -1
  74. package/layers/BaseElevationLayer.js +1 -1
  75. package/layers/BaseTileLayer.js +1 -1
  76. package/layers/CSVLayer.js +1 -1
  77. package/layers/FeatureLayer.js +1 -1
  78. package/layers/GeoJSONLayer.js +1 -1
  79. package/layers/GroupLayer.js +1 -1
  80. package/layers/MapImageLayer.js +1 -1
  81. package/layers/MediaLayer.js +1 -1
  82. package/layers/OrientedImageryLayer.js +1 -1
  83. package/layers/ParquetLayer.js +1 -1
  84. package/layers/VectorTileLayer.js +1 -1
  85. package/layers/VideoLayer.js +1 -1
  86. package/layers/WMSLayer.js +1 -1
  87. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  88. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  89. package/layers/mixins/ArcGISImageService.js +1 -1
  90. package/layers/mixins/ImageryTileMixin.js +1 -1
  91. package/layers/mixins/PortalLayer.js +1 -1
  92. package/layers/mixins/TemporalLayer.js +1 -1
  93. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  94. package/layers/mixins/operationalLayers.js +1 -1
  95. package/layers/support/LocalMediaElementSource.js +1 -1
  96. package/layers/support/ParquetEncodingBase.js +1 -1
  97. package/layers/support/ParquetEncodingLocation.js +1 -1
  98. package/layers/support/ParquetEncodingWkb.js +1 -1
  99. package/layers/support/Sublayer.js +1 -1
  100. package/layers/support/WMSSublayer.js +1 -1
  101. package/layers/support/layersCreator.js +1 -1
  102. package/layers/support/lazyLayerLoader.js +1 -1
  103. package/layers/support/parquetUtils.js +1 -1
  104. package/libs/parquet/parquet.js +1 -1
  105. package/package.json +2 -2
  106. package/renderers/FlowRenderer.js +1 -1
  107. package/renderers/VectorFieldRenderer.js +1 -1
  108. package/renderers/visualVariables/support/ColorSizeStop.js +1 -1
  109. package/renderers/visualVariables/support/SizeStop.js +1 -1
  110. package/support/LayersMixin.js +1 -1
  111. package/support/TablesMixin.js +1 -1
  112. package/support/revision.js +1 -1
  113. package/symbols/edges/Edges3D.js +1 -1
  114. package/versionManagement/VersionManager.d.ts +4 -0
  115. package/versionManagement/VersionManager.js +5 -0
  116. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  117. package/views/2d/layers/LayerView2D.js +1 -1
  118. package/views/3d/GroundView3D.js +1 -1
  119. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  120. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  121. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  122. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  123. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  124. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  125. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  126. package/views/input/gamepad/GamepadInputDevice.js +1 -1
  127. package/views/layers/support/{Geometry.js → GeometryClipArea.js} +1 -1
  128. package/views/webgl/capabilities/Capabilities.js +1 -1
  129. package/views/webgl/capabilities/load.js +1 -1
  130. package/webdoc/support/writeUtils.js +1 -1
  131. package/widgets/FeatureTable/FieldColumn.js +1 -1
  132. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  133. package/assets/esri/core/workers/chunks/09ac2bbc7327e6e6b5a2.js +0 -1
  134. package/assets/esri/core/workers/chunks/1432e789aa4cba627337.js +0 -1
  135. package/assets/esri/core/workers/chunks/1a9ed3c59a9a8bafb251.js +0 -1
  136. package/assets/esri/core/workers/chunks/1c857191e5898aba50fe.js +0 -1
  137. package/assets/esri/core/workers/chunks/234ffd08c2be03a0b9fe.js +0 -1
  138. package/assets/esri/core/workers/chunks/2d0d8243ed0c21f8a498.js +0 -1
  139. package/assets/esri/core/workers/chunks/31675811cacdb6fd96cf.js +0 -1
  140. package/assets/esri/core/workers/chunks/39d2b540738431adec98.js +0 -1
  141. package/assets/esri/core/workers/chunks/48820e12d94eb49c0a65.js +0 -1
  142. package/assets/esri/core/workers/chunks/4c278fb2d51ca6226050.js +0 -1
  143. package/assets/esri/core/workers/chunks/4d6706d6dbe578653c28.js +0 -1
  144. package/assets/esri/core/workers/chunks/4ff40eea70d19c934504.js +0 -1
  145. package/assets/esri/core/workers/chunks/59ce992d3a5e7c32b9fb.js +0 -1
  146. package/assets/esri/core/workers/chunks/5e30acfda04f7fc2b676.js +0 -1
  147. package/assets/esri/core/workers/chunks/6052eccb9395c8efb295.js +0 -1
  148. package/assets/esri/core/workers/chunks/61369838aa337d0156c5.js +0 -1
  149. package/assets/esri/core/workers/chunks/690a40d2eef52bfc149f.js +0 -1
  150. package/assets/esri/core/workers/chunks/6b820f14c110d9da118e.js +0 -1
  151. package/assets/esri/core/workers/chunks/7fd2366ee1fc81fa8c56.js +0 -1
  152. package/assets/esri/core/workers/chunks/8d9e622cec13f5cea726.js +0 -1
  153. package/assets/esri/core/workers/chunks/9110287f272141f60c35.js +0 -1
  154. package/assets/esri/core/workers/chunks/98997841ec3955287ba2.js +0 -1
  155. package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +0 -1
  156. package/assets/esri/core/workers/chunks/a9577a700b6a7b69d6aa.js +0 -1
  157. package/assets/esri/core/workers/chunks/ad4fcb73cfe9a1e4b710.js +0 -1
  158. package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +0 -1
  159. package/assets/esri/core/workers/chunks/b48aceaeefa07214e430.js +0 -1
  160. package/assets/esri/core/workers/chunks/bcfa98b6866a96c194cb.js +0 -1
  161. package/assets/esri/core/workers/chunks/c052fb8c952cda0b5d13.js +0 -1
  162. package/assets/esri/core/workers/chunks/c0d6f8e55349f4f5cd58.js +0 -1
  163. package/assets/esri/core/workers/chunks/c1a4d1ec0125617374b4.js +0 -1
  164. package/assets/esri/core/workers/chunks/c582fb447c89d732cfff.js +0 -1
  165. package/assets/esri/core/workers/chunks/cb500d673ca7ec1ef945.js +0 -1
  166. package/assets/esri/core/workers/chunks/ce99abfdcd71ff9e4e36.js +0 -1
  167. package/assets/esri/core/workers/chunks/cf0e2c91b330b1d0ef77.js +0 -1
  168. package/assets/esri/core/workers/chunks/d764b6273974f4bca31b.js +0 -1
  169. package/assets/esri/core/workers/chunks/d87dc2eeffabd3507143.js +0 -1
  170. package/assets/esri/core/workers/chunks/dca6a61fd239cf1ff90c.js +0 -1
  171. package/assets/esri/core/workers/chunks/edc3d98f33d7bf959154.js +0 -1
  172. package/assets/esri/core/workers/chunks/f1381c5a2a1de1ef9139.js +0 -1
  173. package/assets/esri/core/workers/chunks/f6148611d883a59f8fb8.js +0 -1
  174. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9801],{17136:(e,t,r)=>{r.d(t,{Y_:()=>v,O7:()=>N,el:()=>I});var n=r(92602),s=r(69052),o=r(49186),i=r(53966),c=r(39829),a=r(82799),u=r(16930),l=r(80754),h=r(21325),f=r(28735),d=r(11254),g=r(65864),y=r(2272),m=r(84952),p=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function S(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof c.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new o.A("internal:geometry",e)}const r=(0,l.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],o=e[n][1],i=e[n+1][0],c=e[n+1][1],a=Math.sqrt((i-s)*(i-s)+(c-o)*(c-o)),u=(c-o)/a,l=(i-s)/a,h=a/t;if(h>1){for(let e=1;e<=h-1;e++){const n=e*t,i=l*n+s,c=u*n+o;r.push([i,c])}const e=(a+Math.floor(h-1)*t)/2,n=l*e+s,i=u*e+o;r.push([n,i])}r.push([i,c])}}return function(e){return"polygon"===e.type}(e)?new c.A({rings:n,spatialReference:e.spatialReference}):new a.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,f.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function A(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function k(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],o=t.geometries[n],i=(0,l.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}})}if(s===r){if(_(e))for(const t of(0,l.r8)(o))e[s]=e[s].addRing(t);else if(b(e))for(const t of(0,l.r8)(o))e[s]=e[s].addPath(t)}else r=s,e[s]=o}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let o,i,u,_,b,N,M,v,F=0;const x=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,i=(0,h.Vp)(o),u=o.isWebMercator,N=u?102100:4326,_=l.j7[N].maxX,b=l.j7[N].minX,M=l.j7[N].plus180Line,v=l.j7[N].minus180Line),i)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(A(t.clone(),_,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>A(e,_,b)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);R.push(e.rings?new c.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,b)*(2*_);let n=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(M)&&o!==_?(F=o>F?o:F,n=S(n,u),x.push(n),R.push("cut")):e.intersects(v)&&s!==b?(F=o*(2*_)>F?o*(2*_):F,n=S(n,u,360),x.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let T=(0,l.kd)(F,_),C=-90;const P=T,q=new a.A;for(;T>0;){const e=360*T-180;q.addPath([[e,C],[e,-1*C]]),C*=-1,T--}if(x.length>0&&P>0){const t=k(x,await async function(e,t,r,n){const s=(0,y.Dl)(e),o=t[0].spatialReference,i={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},c=await(0,d.A)(s.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=c.data;return{cutIndexes:a,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=o,t})}}(s,x,q,r)),n=[],o=[];for(let r=0;r<R.length;r++){const s=R[r];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(n.push(s),o.push("simplify")):o.push(u?(0,f.Gh)(s):s)}}if(!n.length)return o;const i=await async function(e,t,r){const n="string"==typeof e?(0,m.An)(e):e,s=t[0].spatialReference,o=(0,g.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,h.YX)(s),geometries:JSON.stringify((0,p.X)(t))}},{data:c}=await(0,d.A)(n.path+"/simplify",i);return(0,p.V)(c.geometries,o,s)}(s,n,r),c=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?c.push(t):c.push(u?(0,f.Gh)(i.shift()):i.shift())}return c}const L=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)L.push(t);else{const e=x.shift();L.push(!0===u?(0,f.Gh)(e):e)}}return L}function N(e,t,r){const n=(0,h.Vp)(r);if(null==n)return e;const[s,o]=n.valid,i=2*o;let c=0,a=0;t>o?c=Math.ceil(Math.abs(t-o)/i):t<s&&(c=-Math.ceil(Math.abs(t-s)/i)),e>o?a=Math.ceil(Math.abs(e-o)/i):e<s&&(a=-Math.ceil(Math.abs(e-s)/i));let u=e+(c-a)*i;const l=u-t;return l>o?u-=i:l<s&&(u+=i),u}function M(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new s.hr(r,n)}const v=M(u.A.WGS84);M(u.A.WebMercator)},27647:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(92722);function s(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:s,hasZ:o,hasM:a}=e,u=new n.A([],[],o,!1),l=u.coords,h=[],f=o?[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];let d=0;for(const e of t){const t=i(f,r,d,e,o,a);t&&h.push(t),d+=e*s}if(h.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,o&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<f[0]||l[0]>f[1]||l[1]<f[2]||l[1]>f[3]||o&&(l[2]<f[4]||l[2]>f[5]))&&(l.length=0)}if(!l.length){const n=e.lengths[0]?c(r,0,t[0],o,a):null;if(!n)return null;l[0]=n[0],l[1]=n[1],o&&(l[2]=n[2]??0)}return u}function i(e,t,r,n,o,i){const c=s(o,i);let a=r,u=r+c,l=0,h=0,f=0,d=0,g=0;for(let r=0,s=n-1;r<s;r++,a+=c,u+=c){const r=t[a],n=t[a+1],s=t[a+2],i=t[u],c=t[u+1],y=t[u+2];let m=r*c-i*n;d+=m,l+=(r+i)*m,h+=(n+c)*m,o&&(m=r*y-i*s,f+=(s+y)*m,g+=m),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),o&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),g>0&&(g*=-1),!d)return null;const y=[l,h,.5*d];return o&&(y[3]=f,y[4]=.5*g),y}function c(e,t,r,n,o){const i=s(n,o);let c=t,f=t+i,d=0,g=0,y=0,m=0;for(let t=0,s=r-1;t<s;t++,c+=i,f+=i){const t=e[c],r=e[c+1],s=e[c+2],o=e[f],i=e[f+1],p=e[f+2],w=n?u(t,r,s,o,i,p):a(t,r,o,i);if(w)if(d+=w,n){const e=h(t,r,s,o,i,p);g+=w*e[0],y+=w*e[1],m+=w*e[2]}else{const e=l(t,r,o,i);g+=w*e[0],y+=w*e[1]}}return d>0?n?[g/d,y/d,m/d]:[g/d,y/d]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,n){const s=r-e,o=n-t;return Math.sqrt(s*s+o*o)}function u(e,t,r,n,s,o){const i=n-e,c=s-t,a=o-r;return Math.sqrt(i*i+c*c+a*a)}function l(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function h(e,t,r,n,s,o){return[e+.5*(n-e),t+.5*(s-t),r+.5*(o-r)]}},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>k});var n=r(31635),s=r(11254),o=r(49186),i=r(53966),c=r(74887),a=r(84952),u=r(91429),l=r(16930),h=r(65864),f=r(62815),d=r(65529);let g=class extends d.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new o.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,n.Cg)([(0,u.MZ)({readOnly:!0})],g.prototype,"connectionError",null),g=(0,n.Cg)([(0,u.$K)("esri.layers.support.StreamConnection")],g);let y=class extends g{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,f.N)(t,n,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,a.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){const s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new o.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new o.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,c.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new o.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const n=new WebSocket(e);n.onopen=()=>{if(n.onopen=null,this.destroyed)return n.onclose=null,void n.close();n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n)},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,c.Tw)(),n=t.onmessage,{filter:s,outFields:a,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch(e){}c&&"object"==typeof c||(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),c.spatialReference?.wkid!==u?.wkid&&(i.A.getLogger(this).error(new o.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==c.format&&(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),s&&c.filter!==s&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set filter, but server doesn't support it")),a&&c.outFields!==a&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:s,outFields:a,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,n.Cg)([(0,u.MZ)()],y.prototype,"connectionStatus",null),(0,n.Cg)([(0,u.MZ)()],y.prototype,"errorString",void 0),y=(0,n.Cg)([(0,u.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],y);var m=r(80893),p=r(61956);const w={maxQueryDepth:5,maxRecordCountFactor:3};let _=class extends y{constructor(e){super({...w,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,s.A)(e.path,{query:t,responseType:"json"}),n=(await r).data;return this._serviceDefinition=n,n}_fetchWebSocketUrl(e,t){const r=e[0],{urls:n,token:s}=r,o=this._inferWebSocketBaseUrl(n);return(0,a.a6)(`${o}/subscribe`,{outSR:""+t.wkid,token:s})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new o.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const n=JSON.stringify({filter:this._serializeFilter(e,t)});let s=!1;const a=(0,c.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),a.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,a.resolve())},r.send(n),setTimeout(()=>{s||(this.destroyed||this._websocket!==r||i.A.getLogger(this).error(new o.A("geoevent-connection","Server timed out when setting filter")),a.reject())},1e4),a.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new o.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:s,geometry:c}=n;for(const t in s)e.attributes[t]=s[t];return c&&(e.geometry=c),e.geometry||e.centroid||i.A.getLogger(this).error(new o.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;const s=await n;if(!s)return;for(const e of s.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(7330),r.e(3508),r.e(6554),r.e(2869),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:n}=await t.load(),s=n.query.supportsMaxRecordCountFactor,o=n.query.supportsPagination,i=n.query.supportsCentroid,c=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,u=s?a*c:a,h=new p.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),i&&(h.returnCentroid=!0),s&&(h.maxRecordCountFactor=c),o)return h.num=u,t.destroy(),this._queryPages(e,h);const f=await(0,m.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),f}async _queryPages(e,t,r=[],n=0){t.start=null!=t.num?n*t.num:null;const s=await(0,m.eW)(e,t,this._config.sourceSpatialReference);return s.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(s.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>s.features.push(e)),s)}_addRelatedFeatures(e){const t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};_=(0,n.Cg)([(0,u.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],_);var b=r(64108);let S=class extends g{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,f.N)(t,n,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function A(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function k(e,t,r,n,s,o,i,c,a){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:n,filter:A(s,o),maxReconnectionAttempts:i,maxReconnectionInterval:c,customParameters:a};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new y(u):new _(u):new S(u)}(0,n.Cg)([(0,u.MZ)()],S.prototype,"connectionStatus",void 0),(0,n.Cg)([(0,u.MZ)()],S.prototype,"errorString",void 0),S=(0,n.Cg)([(0,b.$)("esri.layers.support.ClientSideConnection")],S)},43334:(e,t,r)=>{r.d(t,{N3:()=>c,Om:()=>i});var n=r(69397),s=r(27647),o=r(92722);class i{constructor(e=null,t={},r,n,s=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=s}static fromJSON(e){const t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,n=e.objectId;return new i(t,e.attributes,r,n)}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new i(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function c(e){return!!e.geometry?.coords?.length}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var n=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},69052:(e,t,r)=>{r.d(t,{hr:()=>s,ie:()=>a,uC:()=>c});var n=r(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,n,s=0,o=!1){return(n-=s)<t?n+=i(e,t-n):n>r&&(n-=i(e,n-r)),o&&n===r&&(n=t),n+s}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const c=new s(0,2*Math.PI),a=(new s(-Math.PI,Math.PI),new s(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>s,Qf:()=>u,Qh:()=>c,RS:()=>o,ez:()=>f,lM:()=>i,qK:()=>h});var n=r(34275);function s(e){return 32+e.length}const o=16;function i(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function c(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=f;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?c(e):h;case"string":return s(e);case"number":return o;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,o):0:0),0)}function l(e,t){return f+e.length*t}const h=32,f=16,d=145},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>a,kd:()=>c,r8:()=>u});var n=r(82799),s=r(16930),o=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>s});var n=r(65864);function s(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,r){const s=(0,n.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){const o=r-e,i=n-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let s=this.coords[n*t],o=this.coords[n*t+1];for(let i=1;i<r;i+=1){const r=n*(t+i),c=this.coords[r],a=this.coords[r+1];e+=-.5*(c-s)*(a+o),s=c,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let s=0;s<n;s++){const n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;const{stride:s}=this;for(const e of r){for(let r=1;r<e;r++){const e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:r,size:n}=this,o=this.coords.slice(0,n*r);return e?(e.set(o),new s(t,e)):new s(t,Array.from(o),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9801],{17136:(e,t,r)=>{r.d(t,{Y_:()=>v,O7:()=>N,el:()=>I});var n=r(92602),s=r(69052),o=r(49186),i=r(53966),c=r(39829),a=r(82799),u=r(16930),l=r(80754),h=r(21325),f=r(28735),d=r(11254),g=r(65864),y=r(2272),m=r(84952),p=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function _(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function S(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof c.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new o.A("internal:geometry",e)}const r=(0,l.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const s=e[n][0],o=e[n][1],i=e[n+1][0],c=e[n+1][1],a=Math.sqrt((i-s)*(i-s)+(c-o)*(c-o)),u=(c-o)/a,l=(i-s)/a,h=a/t;if(h>1){for(let e=1;e<=h-1;e++){const n=e*t,i=l*n+s,c=u*n+o;r.push([i,c])}const e=(a+Math.floor(h-1)*t)/2,n=l*e+s,i=u*e+o;r.push([n,i])}r.push([i,c])}}return function(e){return"polygon"===e.type}(e)?new c.A({rings:n,spatialReference:e.spatialReference}):new a.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,f.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function A(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function k(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const s=t.cutIndexes[n],o=t.geometries[n],i=(0,l.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(n,0))}return!0}})}if(s===r){if(_(e))for(const t of(0,l.r8)(o))e[s]=e[s].addRing(t);else if(b(e))for(const t of(0,l.r8)(o))e[s]=e[s].addPath(t)}else r=s,e[s]=o}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let o,i,u,_,b,N,M,v,F=0;const x=[],R=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,i=(0,h.Vp)(o),u=o.isWebMercator,N=u?102100:4326,_=l.j7[N].maxX,b=l.j7[N].minX,M=l.j7[N].plus180Line,v=l.j7[N].minus180Line),i)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(A(t.clone(),_,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>A(e,_,b)),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);R.push(e.rings?new c.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,b)*(2*_);let n=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(M)&&o!==_?(F=o>F?o:F,n=S(n,u),x.push(n),R.push("cut")):e.intersects(v)&&s!==b?(F=o*(2*_)>F?o*(2*_):F,n=S(n,u,360),x.push(n),R.push("cut")):R.push(n)}else R.push(t.clone());else R.push(t);else R.push(t);let T=(0,l.kd)(F,_),C=-90;const P=T,q=new a.A;for(;T>0;){const e=360*T-180;q.addPath([[e,C],[e,-1*C]]),C*=-1,T--}if(x.length>0&&P>0){const t=k(x,await async function(e,t,r,n){const s=(0,y.Dl)(e),o=t[0].spatialReference,i={...n,responseType:"json",query:{...s.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},c=await(0,d.A)(s.path+"/cut",i),{cutIndexes:a,geometries:u=[]}=c.data;return{cutIndexes:a,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=o,t})}}(s,x,q,r)),n=[],o=[];for(let r=0;r<R.length;r++){const s=R[r];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(n.push(s),o.push("simplify")):o.push(u?(0,f.Gh)(s):s)}}if(!n.length)return o;const i=await async function(e,t,r){const n="string"==typeof e?(0,m.An)(e):e,s=t[0].spatialReference,o=(0,g.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,h.YX)(s),geometries:JSON.stringify((0,p.X)(t))}},{data:c}=await(0,d.A)(n.path+"/simplify",i);return(0,p.V)(c.geometries,o,s)}(s,n,r),c=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?c.push(t):c.push(u?(0,f.Gh)(i.shift()):i.shift())}return c}const L=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)L.push(t);else{const e=x.shift();L.push(!0===u?(0,f.Gh)(e):e)}}return L}function N(e,t,r){const n=(0,h.Vp)(r);if(null==n)return e;const[s,o]=n.valid,i=2*o;let c=0,a=0;t>o?c=Math.ceil(Math.abs(t-o)/i):t<s&&(c=-Math.ceil(Math.abs(t-s)/i)),e>o?a=Math.ceil(Math.abs(e-o)/i):e<s&&(a=-Math.ceil(Math.abs(e-s)/i));let u=e+(c-a)*i;const l=u-t;return l>o?u-=i:l<s&&(u+=i),u}function M(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new s.hr(r,n)}const v=M(u.A.WGS84);M(u.A.WebMercator)},27647:(e,t,r)=>{r.d(t,{Q:()=>o});var n=r(92722);function s(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e)return null;if(!e?.lengths.length)return null;const{lengths:t,coords:r,stride:s,hasZ:o,hasM:a}=e,u=new n.A([],[],o,!1),l=u.coords,h=[],f=o?[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];let d=0;for(const e of t){const t=i(f,r,d,e,o,a);t&&h.push(t),d+=e*s}if(h.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),h.length){let e=6*h[0][2];l[0]=h[0][0]/e,l[1]=h[0][1]/e,o&&(e=6*h[0][4],l[2]=0!==e?h[0][3]/e:0),(l[0]<f[0]||l[0]>f[1]||l[1]<f[2]||l[1]>f[3]||o&&(l[2]<f[4]||l[2]>f[5]))&&(l.length=0)}if(!l.length){const n=e.lengths[0]?c(r,0,t[0],o,a):null;if(!n)return null;l[0]=n[0],l[1]=n[1],o&&(l[2]=n[2]??0)}return u}function i(e,t,r,n,o,i){const c=s(o,i);let a=r,u=r+c,l=0,h=0,f=0,d=0,g=0;for(let r=0,s=n-1;r<s;r++,a+=c,u+=c){const r=t[a],n=t[a+1],s=t[a+2],i=t[u],c=t[u+1],y=t[u+2];let m=r*c-i*n;d+=m,l+=(r+i)*m,h+=(n+c)*m,o&&(m=r*y-i*s,f+=(s+y)*m,g+=m),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),n<e[2]&&(e[2]=n),n>e[3]&&(e[3]=n),o&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),g>0&&(g*=-1),!d)return null;const y=[l,h,.5*d];return o&&(y[3]=f,y[4]=.5*g),y}function c(e,t,r,n,o){const i=s(n,o);let c=t,f=t+i,d=0,g=0,y=0,m=0;for(let t=0,s=r-1;t<s;t++,c+=i,f+=i){const t=e[c],r=e[c+1],s=e[c+2],o=e[f],i=e[f+1],p=e[f+2],w=n?u(t,r,s,o,i,p):a(t,r,o,i);if(w)if(d+=w,n){const e=h(t,r,s,o,i,p);g+=w*e[0],y+=w*e[1],m+=w*e[2]}else{const e=l(t,r,o,i);g+=w*e[0],y+=w*e[1]}}return d>0?n?[g/d,y/d,m/d]:[g/d,y/d]:r>0?n?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,n){const s=r-e,o=n-t;return Math.sqrt(s*s+o*o)}function u(e,t,r,n,s,o){const i=n-e,c=s-t,a=o-r;return Math.sqrt(i*i+c*c+a*a)}function l(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function h(e,t,r,n,s,o){return[e+.5*(n-e),t+.5*(s-t),r+.5*(o-r)]}},30624:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>k});var n=r(31635),s=r(11254),o=r(49186),i=r(53966),c=r(74887),a=r(84952),u=r(91429),l=r(16930),h=r(65864),f=r(62815),d=r(65529);let g=class extends d.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new o.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,n.Cg)([(0,u.MZ)({readOnly:!0})],g.prototype,"connectionError",null),g=(0,n.Cg)([(0,u.$K)("esri.layers.support.StreamConnection")],g);let y=class extends g{constructor(e){super({}),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,f.N)(t,n,r),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,a.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){const s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(i.A.getLogger(this).error(new o.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.A.getLogger(this).error(new o.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,c.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.A.getLogger(this).error(new o.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{const n=new WebSocket(e);n.onopen=()=>{if(n.onopen=null,this.destroyed)return n.onclose=null,void n.close();n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n)},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,c.Tw)(),n=t.onmessage,{filter:s,outFields:a,spatialReference:u}=this._config;return r.timeout(e),t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch(e){}c&&"object"==typeof c||(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),c.spatialReference?.wkid!==u?.wkid&&(i.A.getLogger(this).error(new o.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${u.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==c.format&&(i.A.getLogger(this).error(new o.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),s&&c.filter!==s&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set filter, but server doesn't support it")),a&&c.outFields!==a&&i.A.getLogger(this).error(new o.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:s,outFields:a,format:"json",spatialReference:{wkid:u.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,n.Cg)([(0,u.MZ)()],y.prototype,"connectionStatus",null),(0,n.Cg)([(0,u.MZ)()],y.prototype,"errorString",void 0),y=(0,n.Cg)([(0,u.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],y);var m=r(80893),p=r(61956);const w={maxQueryDepth:5,maxRecordCountFactor:3};let _=class extends y{constructor(e){super({...w,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,s.A)(e.path,{query:t,responseType:"json"}),n=(await r).data;return this._serviceDefinition=n,n}_fetchWebSocketUrl(e,t){const r=e[0],{urls:n,token:s}=r,o=this._inferWebSocketBaseUrl(n);return(0,a.a6)(`${o}/subscribe`,{outSR:""+t.wkid,token:s})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.A.getLogger(this).error(new o.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const n=JSON.stringify({filter:this._serializeFilter(e,t)});let s=!1;const a=(0,c.Tw)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.A.getLogger(this).error(new o.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),a.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,a.resolve())},r.send(n),setTimeout(()=>{s||(this.destroyed||this._websocket!==r||i.A.getLogger(this).error(new o.A("geoevent-connection","Server timed out when setting filter")),a.reject())},1e4),a.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(e?.geometry)try{const t=(0,h.rS)(e.geometry);if("extent"!==t.type)throw new o.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return i.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:s,geometry:c}=n;for(const t in s)e.attributes[t]=s[t];return c&&(e.geometry=c),e.geometry||e.centroid||i.A.getLogger(this).error(new o.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;const s=await n;if(!s)return;for(const e of s.features)this.onFeature(this._enrich(e))}catch(e){i.A.getLogger(this).error(new o.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(4903),r.e(1214),r.e(9953),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(812),r.e(655),r.e(2561)]).then(r.bind(r,68654))).default)({url:e}),{capabilities:n}=await t.load(),s=n.query.supportsMaxRecordCountFactor,o=n.query.supportsPagination,i=n.query.supportsCentroid,c=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,u=s?a*c:a,h=new p.A;if(h.outFields=this._config.outFields??["*"],h.where=this._config.filter?.where??"1=1",h.returnGeometry=!0,h.returnExceededLimitFeatures=!0,h.outSpatialReference=l.A.fromJSON(this._config.spatialReference),i&&(h.returnCentroid=!0),s&&(h.maxRecordCountFactor=c),o)return h.num=u,t.destroy(),this._queryPages(e,h);const f=await(0,m.eW)(e,h,this._config.sourceSpatialReference);return t.destroy(),f}async _queryPages(e,t,r=[],n=0){t.start=null!=t.num?n*t.num:null;const s=await(0,m.eW)(e,t,this._config.sourceSpatialReference);return s.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(s.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>s.features.push(e)),s)}_addRelatedFeatures(e){const t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};_=(0,n.Cg)([(0,u.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],_);var b=r(64108);let S=class extends g{constructor(e){super({}),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,f.N)(t,n,r)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function A(e,t){if(null==e&&null==t)return null;const r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}function k(e,t,r,n,s,o,i,c,a){const u={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:n,filter:A(s,o),maxReconnectionAttempts:i,maxReconnectionInterval:c,customParameters:a};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new y(u):new _(u):new S(u)}(0,n.Cg)([(0,u.MZ)()],S.prototype,"connectionStatus",void 0),(0,n.Cg)([(0,u.MZ)()],S.prototype,"errorString",void 0),S=(0,n.Cg)([(0,b.$)("esri.layers.support.ClientSideConnection")],S)},43334:(e,t,r)=>{r.d(t,{N3:()=>c,Om:()=>i});var n=r(69397),s=r(27647),o=r(92722);class i{constructor(e=null,t={},r,n,s=0){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=s}static fromJSON(e){const t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,n=e.objectId;return new i(t,e.attributes,r,n)}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){const e=this.geometry?.clone(),t=new i(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t}ensureCentroid(e){return this.centroid??=(0,s.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,n.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function c(e){return!!e.geometry?.coords?.length}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var n=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,n.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},58512:(e,t,r)=>{r.d(t,{A:()=>n});class n{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},69052:(e,t,r)=>{r.d(t,{hr:()=>s,ie:()=>a,uC:()=>c});var n=r(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,n,s=0,o=!1){return(n-=s)<t?n+=i(e,t-n):n>r&&(n-=i(e,n-r)),o&&n===r&&(n=t),n+s}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const c=new s(0,2*Math.PI),a=(new s(-Math.PI,Math.PI),new s(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>s,Qf:()=>u,Qh:()=>c,RS:()=>o,ez:()=>f,lM:()=>i,qK:()=>h});var n=r(34275);function s(e){return 32+e.length}const o=16;function i(e){if(!e)return 0;let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function c(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=f;for(let n=0;n<t;n++)r+=a(e[n]);return r}(e);let t=h;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?c(e):h;case"string":return s(e);case"number":return o;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,o):0:0),0)}function l(e,t){return f+e.length*t}const h=32,f=16,d=145},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>a,kd:()=>c,r8:()=>u});var n=r(82799),s=r(16930),o=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>s});var n=r(65864);function s(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,r){const s=(0,n.xD)(t);return e.map(e=>{const t=s.fromJSON(e);return t.spatialReference=r,t})}},92722:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(69397);class s{constructor(e=[],t=[],r=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:n}){return new s(e,t,r||!1,n||!1)}static fromRect([e,t,r,n]){const o=r-e,i=n-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const r of this.lengths){if(r<3)continue;const{stride:n}=this;let s=this.coords[n*t],o=this.coords[n*t+1];for(let i=1;i<r;i+=1){const r=n*(t+i),c=this.coords[r],a=this.coords[r+1];e+=-.5*(c-s)*(a+o),s=c,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:r}=this;for(const n of this.lengths){for(let s=0;s<n;s++){const n=r*(t+s);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let n=0;const{stride:s}=this;for(const e of r){for(let r=1;r<e;r++){const e=s*(n+r);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}n+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:r,size:n}=this,o=this.coords.slice(0,n*r);return e?(e.set(o),new s(t,e)):new s(t,Array.from(o),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const r=new Array(t*e);for(let t=0,n=0;t<r.length;t+=e)r[n++]=this.coords[t],r[n++]=this.coords[t+1];return new s(this.lengths,r,!1,!1)}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[146],{146:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(31635),i=n(49186),s=n(25728),l=n(76030),o=n(91429),a=n(4146),u=n(8303);let c=class extends((0,u.A)((0,s.P)(a.A))){constructor(e){super(e),this.resourceInfo=null,this.type="unknown"}initialize(){this.addResolvingPromise(new Promise((e,t)=>{(0,l._)(()=>{const e=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let n="Unknown layer type";e&&(n+=" "+e),t(new i.A("layer:unknown-layer-type",n,{layerType:e}))})}))}read(e,t){super.read({resourceInfo:e},t)}write(e,t){return null}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],c.prototype,"resourceInfo",void 0),(0,r.Cg)([(0,o.MZ)({type:["show","hide"]})],c.prototype,"listMode",void 0),(0,r.Cg)([(0,o.MZ)({json:{read:!1},readOnly:!0,value:"unknown"})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,o.$K)("esri.layers.UnknownLayer")],c);const p=c},159:(e,t,n)=>{n.d(t,{A:()=>a});var r,i=n(31635),s=n(69622),l=n(91429),o=n(99157);let a=r=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new r;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,i.Cg)([(0,l.MZ)({type:[o.A],nonNullable:!0})],a.prototype,"steps",void 0),a=r=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],a)},8303:(e,t,n)=>{n.d(t,{A:()=>I});var r=n(31635),i=n(92602),s=n(70333),l=n(11254),o=n(60999),a=n(49186),u=n(53966),c=n(97768),p=n(74887),f=n(84952),h=n(91429),d=n(77548),g=n(20655),y=n(80812),m=n(41318),v=n(10407),w=n(36005),M=n(43937);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new y.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await n.e(1204).then(n.bind(n,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!s.id?.findCredential(this.url),i=e===n.id;if(i&&n.portal.user)return this._getUserPrivileges(n,r);let l,o;if(i)l=n.portal.url;else try{l=await(0,d.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!l||!(0,f.b8)(l,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,u=!1,c=!1;if(!o)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(i?await n.reload():(n=new y.default({id:e,portal:{url:l}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,r)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const n=(0,v.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const n=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=s.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,f.S8)(i.restUrl)===(0,f.S8)(r))return i.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?m.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return n&&r&&!(0,f.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,h.MZ)({type:y.default})],I.prototype,"portalItem",null),(0,r.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,r.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,r.Cg)([(0,h.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,r.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],I),I},_={credential:null,user:null}},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>i});var r=n(37539);function i(e,t,n,i,s,l,o=Math.floor(e.length/3)){const a=(0,r.jd)(t,s);if(null==a)return!1;if(a===r.pO){if(e===i&&n===l)return!0;const t=n+3*o;for(let r=n,s=l;r<t;r++,s++)i[s]=e[r]??0;return!0}const u=n+3*o;for(let t=n,r=l;t<u;t+=3,r+=3)a(e,t,i,r);return!0}},10407:(e,t,n)=>{n.d(t,{It:()=>h,LG:()=>l,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>a,mm:()=>f,sQ:()=>p});var r=n(91218),i=n(16930),s=n(28735);function l(e,t){if(!o(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return o(e,f.HOSTED_SERVICE)}function u(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function c(e,t,n){n?l(e,t):u(e,t)}async function p(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const n=i.A.WGS84;return await(0,r.initializeProjection)(t,n),(0,r.project)(e,n)}(n)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:n,itemControl:r}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),l=!!n&&!!i?.includes("features:user:fullEdit");const o="update"===r||"admin"===r;return o?l=s=!0:l&&(s=!0),{features:{edit:s,fullEdit:l},content:{updateItem:o}}}},25728:(e,t,n)=>{n.d(t,{P:()=>w,L:()=>M});var r=n(31635),i=n(69622),s=n(76953),l=n(4718),o=n(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new a,n=this._originStores[0];n&&n.forEach((e,n)=>{t.set(n,(0,l.o8)(e),0)});for(let n=2;n<o.AU;n++){const r=this._originStores[n];r&&r.forEach((r,i)=>{e&&e.has(i)||t.set(i,(0,l.o8)(r),n)})}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=7){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=7){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=n(45917),c=n(88620),p=n(64108);const f=e=>{const t=e;let n=class extends t{constructor(...e){super(...e);const t=(0,c.oY)(this),n=t.store,r=new a;t.store=r,(0,s.k)(t,n,r)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const n=h(this),r=(0,o.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach(e=>{i[e]=n.get(e,r)}),i}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const n=h(this),r=(0,o.aB)(t),i=(0,c.oY)(this);let s;s="string"==typeof e?"*"===e?n.keys(r):[e]:e,s.forEach(e=>{i.invalidate(e),n.revert(e,r),i.commit(e)})}};return n=(0,r.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],n),n};function h(e){return(0,c.oY)(e).store}f(i.A);var d=n(91429),g=n(16649),y=n(49422);const m=e=>{const t=e;let n=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,c.oY)(this).clearOrigin(e,(0,o.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,c.oY)(this).setAtOrigin(e,t,(0,o.aB)(n))}removeOrigin(e){const t=v(this),n=(0,o.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),7)}updateOrigin(e,t){const n=v(this),r=(0,o.aB)(t),i=(0,g.Jt)(this,e);for(let t=r+1;t<o.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return n=(0,r.Cg)([(0,d.$K)("esri.core.WriteableMultiOriginJSONMixin")],n),n.prototype.toJSON.isDefaultToJSON=!0,n};function v(e){return(0,c.oY)(e).store}const w=e=>{const t=m(f(e));let n=class extends t{};return n=(0,r.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],n),n},M=w(i.A)},37539:(e,t,n)=>{n.d(t,{pO:()=>g,jd:()=>f,Tp:()=>h,w5:()=>p});var r=n(34727),i=n(86211),s=n(73941),l=n(79258);Math.PI;const o=l.$O.radius,a=l.$O.eccentricitySquared,u={a1:o*a,a2:o*a*o*a,a3:o*a*a/2,a4:o*a*o*a*2.5,a5:o*a+o*a*a/2,a6:1-a};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=n(21325);const p={2:{5:g,7:null,9:null,10:g,1:P,6:null,8:null,0:null,3:m,11:v,2:g,4:E},5:{5:g,7:null,9:null,10:g,1:P,6:null,8:null,0:null,3:m,11:v,2:g,4:E},7:{5:null,7:g,9:null,10:g,1:null,6:_,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:g,10:g,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,n,r){const i=e[t]/T,s=L-2*Math.atan(Math.exp(-e[t+1]/T)),l=T+(e[t+2]??0),o=Math.cos(s)*l;n[r]=Math.cos(i)*o,n[r+1]=Math.sin(i)*o,n[r+2]=Math.sin(s)*l},6:null,8:null,0:null,3:g,11:function(e,t,n,r){y(e,t,n,r),v(n,r,n,r)},2:y,4:function(e,t,n,r){y(e,t,n,r),E(n,r,n,r)}},4:{5:x,7:null,9:null,10:x,1:function(e,t,n,r){x(e,t,n,r),P(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){x(e,t,n,r),m(n,r,n,r)},11:function(e,t,n,r){x(e,t,n,r),v(n,r,n,r)},2:x,4:g},1:{5:S,7:null,9:null,10:S,1:g,6:null,8:null,0:null,3:function(e,t,n,r){S(e,t,n,r),m(n,r,n,r)},11:function(e,t,n,r){S(e,t,n,r),v(n,r,n,r)},2:S,4:function(e,t,n,r){S(e,t,n,r),E(n,r,n,r)}},6:{5:null,7:A,9:null,10:A,1:null,6:g,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:O,10:O,1:null,6:null,8:g,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:g,3:null,11:null,2:null,4:null},10:{5:g,7:g,9:g,10:g,1:P,6:_,8:I,0:null,3:m,11:v,2:g,4:E},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,r){w(e,t,n,r),P(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){w(e,t,n,r),m(n,r,n,r)},11:g,2:w,4:function(e,t,n,r){w(e,t,n,r),E(n,r,n,r)}}};function f(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const n=d(e,C.source),r=d(t,C.dest);return 0===n&&0===r?(0,c.aI)(e,t)?C.projector=g:C.projector=null:C.projector=p[n][r],C}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function g(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t]??0)}function y(e,t,n,r){n[r]=b*(e[t]/T),n[r+1]=b*(L-2*Math.atan(Math.exp(-e[t+1]/T))),n[r+2]=e[t+2]??0}function m(e,t,n,i){!function(e,t,n,i,s){const l=.4999999*Math.PI,o=(0,r.qE)(k*e[t+1],-l,l),a=Math.sin(o);n[i++]=k*e[t]*s.radius,n[i++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[i]=e[t+2]??0}(e,t,n,i,l.$O)}function v(e,t,n,r){n[r]=e[t]*U,n[r+1]=e[t+1]*U,n[r+2]=e[t+2]??0}function w(e,t,n,r){n[r]=e[t]*j,n[r+1]=e[t+1]*j,n[r+2]=e[t+2]??0}function M(e,t,n,r,i){const s=i+(e[t+2]??0),l=k*e[t],o=k*e[t+1],a=Math.cos(o)*s;n[r]=Math.cos(l)*a,n[r+1]=Math.sin(l)*a,n[r+2]=Math.sin(o)*s}function I(e,t,n,r){M(e,t,n,r,l.Sw.radius)}function _(e,t,n,r){M(e,t,n,r,l.sH.radius)}function P(e,t,n,r){M(e,t,n,r,l.$O.radius)}function R(e,t,n,i,s){const l=e[t],o=e[t+1],a=e[t+2]??0,u=Math.sqrt(l*l+o*o+a*a),c=(0,r.YN)(a/(0===u?1:u)),p=Math.atan2(o,l);n[i++]=b*p,n[i++]=b*c,n[i]=u-s}function O(e,t,n,r){R(e,t,n,r,l.Sw.radius)}function A(e,t,n,r){R(e,t,n,r,l.sH.radius)}function S(e,t,n,r){R(e,t,n,r,l.$O.radius)}function E(e,t,n,r){!function(e,t,n,r,i){const s=k*e[t],l=k*e[t+1],o=e[t+2]??0,a=Math.sin(l),u=Math.cos(l),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);n[r++]=(c+o)*u*Math.cos(s),n[r++]=(c+o)*u*Math.sin(s),n[r++]=(c*(1-i.eccentricitySquared)+o)*a}(e,t,n,r,l.$O)}function x(e,t,n,r){const i=u,s=e[t],o=e[t+1],a=e[t+2]??0;let c,p,f,h,d,g,y,m,v,w,M,I,_,P,R,O,A,S,E,x,C;c=Math.abs(a),p=s*s+o*o,f=Math.sqrt(p),h=p+a*a,d=Math.sqrt(h),x=Math.atan2(o,s),g=a*a/h,y=p/h,P=i.a2/d,R=i.a3-i.a4/d,y>.3?(m=c/d*(1+y*(i.a1+P+g*R)/d),E=Math.asin(m),w=m*m,v=Math.sqrt(1-w)):(v=f/d*(1-g*(i.a5-P-y*R)/d),E=Math.acos(v),w=1-v*v,m=Math.sqrt(w)),M=1-l.$O.eccentricitySquared*w,I=l.$O.radius/Math.sqrt(M),_=i.a6*I,P=f-I*v,R=c-_*m,A=v*P+m*R,O=v*R-m*P,S=O/(_/M+A),E+=S,C=A+O*S/2,a<0&&(E=-E),n[r++]=b*x,n[r++]=b*E,n[r]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:g},k=(0,r.kU)(1),b=(0,r.KJ)(1),L=.5*Math.PI,T=l.$O.radius,U=T*Math.PI/180,j=180/(T*Math.PI)},60999:(e,t,n)=>{n.d(t,{DZ:()=>d,Ke:()=>h,Tj:()=>c,UT:()=>g,aD:()=>m,jJ:()=>u});var r=n(31635),i=n(69622),s=n(97768),l=n(74887),o=n(10107),a=n(64108);function u(e,t,n){return(0,l.Lx)(e.map((e,r)=>t.apply(n,[e,r])))}async function c(e,t,n){return(await(0,l.Lx)(e.map((e,r)=>t.apply(n,[e,r])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function f(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return f(e)}}async function d(e){try{return p(await e)}catch(e){return(0,l.QP)(e),f(e)}}function g(e,t){return new y(e,t)}let y=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=f(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],y.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],y.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],y.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],y.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],y.prototype,"_result",void 0),y=(0,r.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],y);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},62815:(e,t,n)=>{n.d(t,{N:()=>l});var r=n(86211),i=n(73941),s=n(21325);function l(e,t,n){if(null==t||null==n||n.vcsWkid||(0,s.aI)(t,n)||(0,i.xP)(t)||(0,i.xP)(n))return null;const l=(0,r.G9)(t)/(0,r.G9)(n);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,l);default:return null}}},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Y,initializeProjection:()=>D,isEqualBaseGCS:()=>K,isLoaded:()=>C,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>b,load:()=>T,project:()=>U,projectExtent:()=>ne,projectMany:()=>j,projectMultipoint:()=>F,projectOrLoad:()=>Z,projectOrLoadMany:()=>G,projectPoint:()=>J,projectPolygon:()=>ee,projectPolyline:()=>V,projectWithZConversion:()=>q,projectWithoutEngine:()=>N,requiresLoad:()=>L,test:()=>z,tryProjectWithZConversion:()=>B,unload:()=>H});var r=n(49186),i=n(74887),s=n(62788),l=n(95488),o=n(51850),a=n(21276),u=n(73941),c=n(5443),p=n(91075),f=n(48526),h=n(86738),d=n(39829),g=n(82799),y=n(16930),m=n(159),v=n(9762),w=n(37539);function M(e,t,n,r,i,s){return I[0]=e,I[1]=t,I[2]=n,(0,v.projectBuffer)(I,r,0,i,s,0)}const I=(0,o.vt)();var _=n(21325),P=n(62815);let R=null,O=null,A=null,S=null,E={};const x=new l.I;function C(){return!!(O?.isLoaded()&&A?.isLoaded()&&S?.isLoaded())}function k(){return!!C()||((0,s.gc)(x),T(),!1)}function b(e,t){return!e||!t||Y(e,t)||k()}function L(e,t){return!Y(e,t)&&!C()}async function T(e){null==R&&(R=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(O=e,O.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(A=e,A.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(S=e,S.load()))])),await R,(0,i.Te)(e),x.notify()}function U(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),j(e,e[0].spatialReference,t,n)):((0,a.f)(e),j([e],e.spatialReference,t,n)[0])}function j(e,t,n,r){if(null==t||null==n)return e;if(Y(t,n,r))return e.map(e=>N(e,t,n));if(null==r?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>N(e,t,y.A.WGS84)).map(e=>B(e,n));if(null==r?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>B(e,y.A.WGS84)).map(e=>N(e,y.A.WGS84,n));if(!C())throw new $;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:S.getTransformation(t,n,r.areaOfInterestExtent)||new m.A};else if(!r?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let i=E[e];i||(i=S.getTransformation(t,n)||new m.A,E[e]=i),r={geographicTransformation:i}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?O.executeMany(e,n,r):A.executeMany(e,n,r)}function Z(e,t){const n=G([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function G(e,t){if(!C())for(const n of e)if(null!=n&&!(0,_.aI)(n.spatialReference,t)&&(0,_.fn)(n.spatialReference)&&(0,_.fn)(t)&&!Y(n.spatialReference,t))return(0,s.gc)(x),{pending:T(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,_.aI)(e.spatialReference,t)?e:(0,_.fn)(e.spatialReference)&&(0,_.fn)(t)?B(e,t):null)}}class $ extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function H(){R=null,O=null,A=null,S=null,E={}}const z={get loadPromise(){return R}};function B(e,t){try{const n=U(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,P.N)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof $))throw e;return null}}async function q(e,t,n){const r=e.spatialReference;return null!=r&&null!=t&&await D(r,t,null,n),B(e,t)}function Y(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,_.aI)(e,t)||(0,_.fn)(e)&&(0,_.fn)(t)&&!!(0,w.jd)(e,t))}function K(e,t){if((0,_.aI)(e,t))return!0;if(!(0,_.fn)(e)||!(0,_.fn)(t))return!1;const n=(0,_.oT)(e)||(0,_.K8)(e)||(0,_.x1)(e),r=(0,_.oT)(t)||(0,_.K8)(t)||(0,_.x1)(t);return n&&r}async function D(e,t,n,r){if(C())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,options:i}of e)if(t&&n&&!Y(t,n,i))return T(r)}else if(e&&t&&!Y(e,t,n))return T(r);return(0,i.NO)(r)}function N(e,t,n){return e?"x"in e?W(e,t,new h.A,n,0):"xmin"in e?re(e,t,new c.A,n,0):"rings"in e?te(e,t,new d.A,n,0):"paths"in e?X(e,t,new g.A,n,0):"points"in e?Q(e,t,new f.A,n,0):null:null}function J(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=W(e,e.spatialReference,t,n,r)}function W(e,t,n,r,i){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:i,(0,v.projectBuffer)(se,t,0,se,r,0)?(n.x=se[0],n.y=se[1],n.spatialReference=r,void 0!==s||(0,u.xP)(r)?(n.z=se[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function F(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=Q(e,e.spatialReference,t,n,r)}function Q(e,t,n,r,i){const{points:s,hasZ:l,hasM:o}=e,a=[],c=s.length,p=[];for(const e of s)p.push(e[0],e[1],l?e[2]:i);if(!(0,v.projectBuffer)(p,t,0,p,r,0,c))return null;const f=l||(0,u.xP)(r);for(let e=0;e<c;++e){const t=3*e,n=p[t],r=p[t+1];f&&o?a.push([n,r,p[t+2],s[e][3]]):f?a.push([n,r,p[t+2]]):o?a.push([n,r,s[e][2]]):a.push([n,r])}return n.points=a,n.spatialReference=r,n.hasZ=l,n.hasM=o,n}function V(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,r)}function X(e,t,n,r,i){const{paths:s,hasZ:l,hasM:o}=e,a=[];if(!ie(s,l??!1,o??!1,t,a,r,i))return null;const c=l||(0,u.xP)(r);return n.paths=a,n.spatialReference=r,n.hasZ=c,n.hasM=o,n}function ee(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,r)}function te(e,t,n,r,i){const{rings:s,hasZ:l,hasM:o}=e,a=[];if(!ie(s,l??!1,o??!1,t,a,r,i))return null;const c=l||(0,u.xP)(r);return n.rings=a,n.spatialReference=r,n.hasZ=c,n.hasM=o,n}function ne(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=re(e,e.spatialReference,t,n,r)}function re(e,t,n,r,i){const{xmin:s,ymin:l,xmax:o,ymax:a,hasZ:c,hasM:p}=e;if(!M(s,l,c?e.zmin:i,t,se,r))return null;const f=c||(0,u.xP)(r);return n.xmin=se[0],n.ymin=se[1],f&&(n.zmin=se[2]),M(o,a,c?e.zmax:i,t,se,r)?(n.xmax=se[0],n.ymax=se[1],f&&(n.zmax=se[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function ie(e,t,n,r,i,s,l=0){const o=new Array;for(const n of e)for(const e of n)o.push(e[0],e[1],t?e[2]:l);if(!(0,v.projectBuffer)(o,r,0,o,s,0))return!1;let a=0;i.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const r of t)c&&n?e.push([o[a++],o[a++],o[a++],r[3]]):c?e.push([o[a++],o[a++],o[a++]]):n?(e.push([o[a++],o[a++],r[2]]),a++):(e.push([o[a++],o[a++]]),a++);i.push(e)}return!0}const se=(0,o.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>o});var r,i=n(31635),s=n(69622),l=n(91429);let o=r=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,l.MZ)()],o.prototype,"isInverse",void 0),(0,i.Cg)([(0,l.MZ)()],o.prototype,"wkt",void 0),(0,i.Cg)([(0,l.MZ)()],o.prototype,"wkid",void 0),o=r=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)}}]);