@arcgis/core 4.33.0-next.20250507 → 4.33.0-next.20250508

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 (156) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/arcade/batchExec.js +5 -0
  3. package/arcade/functions/aiServices.js +1 -1
  4. package/arcade.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/029a118e6dfb3f544a5c.js +1 -0
  7. package/assets/esri/core/workers/chunks/037af6379f3e9278633b.js +1 -0
  8. package/assets/esri/core/workers/chunks/0516bd18334d3af6c555.js +1 -0
  9. package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +1 -0
  10. package/assets/esri/core/workers/chunks/0bbb38f59f37c51c72f0.js +1 -0
  11. package/assets/esri/core/workers/chunks/10e6dffa57aa1a626708.js +1 -0
  12. package/assets/esri/core/workers/chunks/1abd026ed12c863e1d94.js +1 -0
  13. package/assets/esri/core/workers/chunks/1eef9cf19634c038b59b.js +1 -0
  14. package/assets/esri/core/workers/chunks/{7cd32b10ed0e18e44ef2.js → 2b01e3bce78541620a86.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{cd81df932b87583b7e4c.js → 306e262f148b3057b11b.js} +1 -1
  16. package/assets/esri/core/workers/chunks/352b7dcd1633e0c98194.js +1 -0
  17. package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +1 -0
  18. package/assets/esri/core/workers/chunks/391b1c3e736a62befbaf.js +1 -0
  19. package/assets/esri/core/workers/chunks/{cbec01223d51cdb9ee79.js → 3c45603af279ad7fed8c.js} +1 -1
  20. package/assets/esri/core/workers/chunks/40e556a0645af8658658.js +1 -0
  21. package/assets/esri/core/workers/chunks/4402336db7210cd583e0.js +1 -0
  22. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +1 -0
  23. package/assets/esri/core/workers/chunks/{5383dc4814b0ba42e871.js → 47cd99ab3ed11a931084.js} +1 -1
  24. package/assets/esri/core/workers/chunks/47f64a340b5d56bf9e59.js +1 -0
  25. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +1 -0
  26. package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +1 -0
  27. package/assets/esri/core/workers/chunks/5ddf463c85c33428e807.js +1 -0
  28. package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +319 -0
  29. package/assets/esri/core/workers/chunks/{875a0e2d023094c8e15e.js → 66e79aa02b3aa12b3778.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{a5a43d54684747561aa9.js → 6b42bcfbb60432e3ed1f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +39 -0
  32. package/assets/esri/core/workers/chunks/6e5d8a6b29c06a27998c.js +1 -0
  33. package/assets/esri/core/workers/chunks/6eabced7123a65d47292.js +1 -0
  34. package/assets/esri/core/workers/chunks/6f506303017903b9a06f.js +1 -0
  35. package/assets/esri/core/workers/chunks/6f6bf67a7960b7e9b03e.js +1 -0
  36. package/assets/esri/core/workers/chunks/{52a3d0e041717da7697e.js → 736cb9f74bf050b70f4c.js} +1 -1
  37. package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +1 -0
  38. package/assets/esri/core/workers/chunks/{85d87cd1bf7eecd54100.js → 752ef63d910852b7be44.js} +1 -1
  39. package/assets/esri/core/workers/chunks/7c49a8877bd744daa3d5.js +1 -0
  40. package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +1 -0
  41. package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +1 -0
  42. package/assets/esri/core/workers/chunks/83fcc6f770ad084b8ab9.js +1 -0
  43. package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +1 -0
  44. package/assets/esri/core/workers/chunks/85efb318cda7260221ae.js +1 -0
  45. package/assets/esri/core/workers/chunks/86138c297095af1ac604.js +1 -0
  46. package/assets/esri/core/workers/chunks/8b74b609de4f70e1a75c.js +1 -0
  47. package/assets/esri/core/workers/chunks/90f93091fe088875f80f.js +1 -0
  48. package/assets/esri/core/workers/chunks/91a02ee91f61cf841111.js +1 -0
  49. package/assets/esri/core/workers/chunks/9aedd7874da7c63865d6.js +1 -0
  50. package/assets/esri/core/workers/chunks/9ca480eb8b2312381ccf.js +1 -0
  51. package/assets/esri/core/workers/chunks/a0d2bd5d4ed3c90f6b1c.js +1 -0
  52. package/assets/esri/core/workers/chunks/a73c6b4bc5baf440f85a.js +1 -0
  53. package/assets/esri/core/workers/chunks/b5d68d8460b7c15001dd.js +1 -0
  54. package/assets/esri/core/workers/chunks/b816b608f31954128246.js +1 -0
  55. package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +1 -0
  56. package/assets/esri/core/workers/chunks/bd7b54db7fd278b15500.js +1 -0
  57. package/assets/esri/core/workers/chunks/c1175477dfcdee90a453.js +1 -0
  58. package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +1 -0
  59. package/assets/esri/core/workers/chunks/c2f925167a43f63289a7.js +1 -0
  60. package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +1 -0
  61. package/assets/esri/core/workers/chunks/cb80b7ddc9acf625d754.js +1 -0
  62. package/assets/esri/core/workers/chunks/{812d8554144ef5a7cd4b.js → cd4fb107489594c57438.js} +1 -1
  63. package/assets/esri/core/workers/chunks/cd5c380196db7fb55242.js +1 -0
  64. package/assets/esri/core/workers/chunks/d874d24568b1acedebc4.js +1 -0
  65. package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +1 -0
  66. package/assets/esri/core/workers/chunks/e662c86b8bafc5512d3d.js +1 -0
  67. package/assets/esri/core/workers/chunks/e697dd4508f02dcfe329.js +1 -0
  68. package/assets/esri/core/workers/chunks/ed6d0fea159dea638c2f.js +1 -0
  69. package/assets/esri/themes/base/widgets/_Daylight.scss +0 -4
  70. package/assets/esri/themes/base/widgets/_ShadowCast.scss +27 -28
  71. package/assets/esri/themes/dark/main.css +1 -1
  72. package/assets/esri/themes/light/main.css +1 -1
  73. package/assets/esri/themes/light/view.css +1 -1
  74. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast.json +1 -1
  75. package/chunks/aiServices.js +1 -1
  76. package/interfaces.d.ts +50 -3
  77. package/layers/KnowledgeGraphLayer.js +1 -1
  78. package/layers/LinkChartLayer.js +1 -1
  79. package/layers/MapImageLayer.js +1 -1
  80. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  81. package/layers/mixins/SublayersOwner.js +1 -1
  82. package/layers/support/Sublayer.js +1 -1
  83. package/package.json +1 -1
  84. package/rest/print.js +1 -1
  85. package/rest/support/JobInfo.js +1 -1
  86. package/rest/support/TranslateContent.js +1 -1
  87. package/rest/support/TranslateParameters.js +1 -1
  88. package/rest/support/TranslateResult.js +1 -1
  89. package/support/loadArcade.js +1 -1
  90. package/support/revision.js +1 -1
  91. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js +1 -1
  92. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  93. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  94. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  95. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  96. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  97. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  98. package/views/3d/state/controllers/InteractiveController.js +1 -1
  99. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  100. package/widgets/Daylight/DaylightViewModel.js +1 -1
  101. package/widgets/Daylight/css.js +1 -1
  102. package/widgets/Daylight.js +1 -1
  103. package/widgets/FeatureForm.js +1 -1
  104. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  105. package/widgets/ShadowCast/css.js +1 -1
  106. package/assets/esri/core/workers/chunks/00e49ed684cc167c4481.js +0 -1
  107. package/assets/esri/core/workers/chunks/02e1332e91393ee985e8.js +0 -1
  108. package/assets/esri/core/workers/chunks/0366d46c78aa3b4a0523.js +0 -1
  109. package/assets/esri/core/workers/chunks/076a205298026e926d70.js +0 -1
  110. package/assets/esri/core/workers/chunks/07adf428f5fdba5c7cdf.js +0 -1
  111. package/assets/esri/core/workers/chunks/1349d4ea29fbf41e22bc.js +0 -1
  112. package/assets/esri/core/workers/chunks/2934fd7ec0c07371c4fe.js +0 -1
  113. package/assets/esri/core/workers/chunks/2a72f272051721767ca1.js +0 -319
  114. package/assets/esri/core/workers/chunks/2a9f206c23f69045d3f2.js +0 -1
  115. package/assets/esri/core/workers/chunks/2ac2c9cb88a7d1249b56.js +0 -1
  116. package/assets/esri/core/workers/chunks/2ad47c0ba1680f7d5e03.js +0 -1
  117. package/assets/esri/core/workers/chunks/2b3aa568356f4b70afe8.js +0 -1
  118. package/assets/esri/core/workers/chunks/35002d23c5b9f37c6331.js +0 -1
  119. package/assets/esri/core/workers/chunks/35b138f6d0687c5bee4f.js +0 -1
  120. package/assets/esri/core/workers/chunks/4957450197305498d327.js +0 -1
  121. package/assets/esri/core/workers/chunks/4b63f36189730396721b.js +0 -1
  122. package/assets/esri/core/workers/chunks/55def679b9f1c7c4d4d3.js +0 -1
  123. package/assets/esri/core/workers/chunks/598fade09fa4da759ac2.js +0 -1
  124. package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +0 -1
  125. package/assets/esri/core/workers/chunks/6118144588af9cd8e49b.js +0 -1
  126. package/assets/esri/core/workers/chunks/62c5030557595c9a7c37.js +0 -1
  127. package/assets/esri/core/workers/chunks/62d1e6e7d8685ffc152f.js +0 -1
  128. package/assets/esri/core/workers/chunks/687a11f49772bf5e1f5a.js +0 -1
  129. package/assets/esri/core/workers/chunks/6b554b42e16ad32b433d.js +0 -1
  130. package/assets/esri/core/workers/chunks/6fc39a58f3011291c602.js +0 -1
  131. package/assets/esri/core/workers/chunks/7978b66cdfe078960ddd.js +0 -1
  132. package/assets/esri/core/workers/chunks/7fa70851868f80eaccfc.js +0 -1
  133. package/assets/esri/core/workers/chunks/8d09cc782dae1dcfc6c4.js +0 -1
  134. package/assets/esri/core/workers/chunks/8ec0a762ec73d1f91fce.js +0 -1
  135. package/assets/esri/core/workers/chunks/919673d958045ab94c95.js +0 -1
  136. package/assets/esri/core/workers/chunks/9321e3244ccb1ee9985a.js +0 -1
  137. package/assets/esri/core/workers/chunks/97a4f8504e76c877893b.js +0 -1
  138. package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
  139. package/assets/esri/core/workers/chunks/a1278a1c4a913c671989.js +0 -1
  140. package/assets/esri/core/workers/chunks/a2452958b0ced28fc1e5.js +0 -1
  141. package/assets/esri/core/workers/chunks/aed72cbac8d463b1d2e0.js +0 -1
  142. package/assets/esri/core/workers/chunks/af44ba2ee6c7670ddcc1.js +0 -1
  143. package/assets/esri/core/workers/chunks/b2f1d1721a9dd88a1adf.js +0 -1
  144. package/assets/esri/core/workers/chunks/b52a738ca2b5c39f8e15.js +0 -1
  145. package/assets/esri/core/workers/chunks/b60504e6326464a512df.js +0 -1
  146. package/assets/esri/core/workers/chunks/b79e8d1e3f2c214549b7.js +0 -1
  147. package/assets/esri/core/workers/chunks/ba4aafa8dfa76006c3e7.js +0 -1
  148. package/assets/esri/core/workers/chunks/bbcc5c5ef7cb92c2e213.js +0 -39
  149. package/assets/esri/core/workers/chunks/bceb837623aa79fcfbed.js +0 -1
  150. package/assets/esri/core/workers/chunks/bfd39cd1d83291ba014b.js +0 -1
  151. package/assets/esri/core/workers/chunks/ca8c631172902c6623fa.js +0 -1
  152. package/assets/esri/core/workers/chunks/cf008faa999e8d07116f.js +0 -1
  153. package/assets/esri/core/workers/chunks/dcb9ab790e694328d02c.js +0 -1
  154. package/assets/esri/core/workers/chunks/e93222c65bd28203ddf7.js +0 -1
  155. package/assets/esri/core/workers/chunks/ea70cabea50960dc8167.js +0 -1
  156. package/assets/esri/core/workers/chunks/f07b3aecff90a6a400d8.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3543,7367],{71163:(e,n,t)=>{t.d(n,{C:()=>c});var r=t(29953);let a,o,i=!1;function l(){return a??=(0,r.ho)("arcadeGeometryOperatorsWorker").then((e=>{o=e,i=!0,a=void 0}))}async function c(e,n){return i?o.apply("invokeGeometryOp",[e,n]):(await l(),c(e,n))}},80672:(e,n,t)=>{t.d(n,{R:()=>a});var r=t(20655);function a(e,n){return null===e?n:new r.A({url:e.field("url")})}},87367:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>A});var r=t(47609),a=t(66395),o=t(85935),i=t(78502),l=t(78878),c=t(80672),s=t(81844),u=t(71163),f=t(5443),d=t(91075),w=t(48526),p=t(86738),h=t(39829),y=t(82799),g=t(65864),m=t(20655),v=t(70333),S=t(78888);async function D(e,n,t){const r=v.id?.findCredential(e.restUrl);if(!r)return null;if("loaded"===e.loadStatus&&""===n&&e.user?.sourceJSON&&!1===t)return e.user.sourceJSON;const a={responseType:"json",query:{f:"json"}};if(t&&(a.query.returnUserLicenseTypeExtensions=!0),""===n){const n=await(0,S.A)(e.restUrl+"/community/self",a);if(n.data){const e=n.data;if(e?.username)return e}return null}const o=await(0,S.A)(e.restUrl+"/community/users/"+n,a);if(o.data){const e=o.data;return e.error?null:e}return null}var b=t(54218);function X(e){if(null==e)return e;switch(typeof e){case"string":case"number":return e;default:throw new o.D$(null,o.TX.InvalidParameter,null)}}function A(e){"async"===e.mode&&(e.functions.disjoint=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]||null===a[1]||(0,u.C)("disjoint",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.intersects=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("intersects",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.touches=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("touches",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.crosses=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("crosses",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.within=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("within",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.contains=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("contains",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.overlaps=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null!==a[0]&&null!==a[1]&&(0,u.C)("overlaps",[a[0].toJSON(),a[1].toJSON()]))))},e.functions.equals=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>((0,l.D)(a,2,2,n,t),a[0]===a[1]||(a[0]instanceof d.A&&a[1]instanceof d.A?(0,u.C)("equals",[a[0].toJSON(),a[1].toJSON()]):((0,l.g)(a[0])&&(0,l.g)(a[1])||!!((0,l.k)(a[0])&&(0,l.k)(a[1])||(0,l.j)(a[0])&&(0,l.j)(a[1])))&&a[0].equals(a[1])))))},e.functions.relate=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,3,3,n,t),a[0]instanceof d.A&&a[1]instanceof d.A)return(0,u.C)("relate",[a[0].toJSON(),a[1].toJSON(),(0,l.f)(a[2])]);if(a[0]instanceof d.A&&null===a[1])return!1;if(a[1]instanceof d.A&&null===a[0])return!1;if(null===a[0]&&null===a[1])return!1;throw new o.D$(n,o.TX.InvalidParameter,t)}))},e.functions.intersection=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]||null===a[1]?null:(0,g.rS)(await(0,u.C)("intersection",[a[0].toJSON(),a[1].toJSON()])))))},e.functions.union=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(0===(a=(0,l.E)(a)).length)throw new o.D$(n,o.TX.WrongNumberOfParameters,t);const c=[];if(1===a.length)if((0,b.cy)(a[0])){for(const e of(0,l.E)(a[0]))if(null!==e){if(!(e instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);c.push(e.toJSON())}}else{if(!(0,l.m)(a[0])){if(a[0]instanceof d.A)return(0,l.F)((0,i.Yq)(a[0]),n.spatialReference);if(null===a[0])return null;throw new o.D$(n,o.TX.InvalidParameter,t)}for(const e of(0,l.E)(a[0].toArray()))if(null!==e){if(!(e instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);c.push(e.toJSON())}}else for(const e of a)if(null!==e){if(!(e instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);c.push(e.toJSON())}return 0===c.length?null:(0,g.rS)(await(0,u.C)("union",[c]))}))},e.functions.difference=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]?null:null===a[1]?(0,i.Yq)(a[0]):(0,g.rS)(await(0,u.C)("difference",[a[0].toJSON(),a[1].toJSON()])))))},e.functions.symmetricdifference=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>(a=(0,l.E)(a),(0,s.ZL)(a,n,t),null===a[0]&&null===a[1]?null:null===a[0]?(0,i.Yq)(a[1]):null===a[1]?(0,i.Yq)(a[0]):(0,g.rS)(await(0,u.C)("symmetricDifference",[a[0].toJSON(),a[1].toJSON()])))))},e.functions.clip=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,2,n,t),!(a[1]instanceof f.A)&&null!==a[1])throw new o.D$(n,o.TX.InvalidParameter,t);if(null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return null===a[1]?null:(0,g.rS)(await(0,u.C)("clip",[a[0].toJSON(),a[1].toJSON()]))}))},e.functions.cut=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,2,n,t),!(a[1]instanceof y.A)&&null!==a[1])throw new o.D$(n,o.TX.InvalidParameter,t);if(null===a[0])return[];if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return null===a[1]?[(0,i.Yq)(a[0])]:(await(0,u.C)("cut",[a[0].toJSON(),a[1].toJSON()])).map((e=>(0,g.rS)(e)))}))},e.functions.area=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if((0,l.D)(a,1,2,n,t),a=(0,l.E)(a),(0,l.p)(a[0])){const e=await a[0].sumArea(X(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}let i=a[0];if(((0,b.cy)(i)||(0,l.m)(i))&&(i=(0,l.G)(a[0],n.spatialReference)),null===i)return 0;if(!(i instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("area",[i.toJSON(),X(a[1])])}))},e.functions.areageodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{(0,l.D)(a,1,3,n,t);let i=(a=(0,l.E)(a))[0];((0,b.cy)(i)||(0,l.m)(i))&&(i=(0,l.G)(i,n.spatialReference));const c=X(a[1]),f=(0,s.rE)(a[2])??"geodesic";if((0,l.p)(i)){const e=await i.sumArea(c,f,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}if(null==i)return 0;if(!(0,l.l)(i))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("geodeticArea",[i.toJSON(),c,f])}))},e.functions.length=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if((0,l.D)(a,1,2,n,t),a=(0,l.E)(a),(0,l.p)(a[0])){const e=await a[0].sumLength(X(a[1]),null,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}let i=a[0];if(((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(i=(0,l.H)(a[0],n.spatialReference)),null===i)return 0;if(!(i instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("length",[i.toJSON(),X(a[1])])}))},e.functions.length3d=function(n,r){return e.standardFunctionAsync(n,r,(async(e,a,i)=>{if((0,l.D)(i,1,2,n,r),null===(i=(0,l.E)(i))[0])return 0;let c=i[0];if(((0,b.cy)(i[0])||(0,l.m)(i[0]))&&(c=(0,l.H)(i[0],n.spatialReference)),null===c)return 0;if(!(c instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,r);if(!0===c.hasZ){const{convertFromSpatialReferenceUnit:e,toLengthUnit:n}=await Promise.resolve().then(t.bind(t,40547)),r=(0,s.UI)(c);return e(c.spatialReference,n(i[1]),r)}return(0,u.C)("length",[c.toJSON(),X(i[1])])}))},e.functions.lengthgeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{(0,l.D)(a,1,3,n,t);let i=(a=(0,l.E)(a))[0];((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(i=(0,l.H)(a[0],n.spatialReference));const c=X(a[1]),f=(0,s.rE)(a[2])??"geodesic";if((0,l.p)(i)){const e=await i.sumLength(c,f,n.abortSignal);if(n.abortSignal.aborted)throw new o.D$(n,o.TX.Cancelled,t);return e}if(null===i)return 0;if(!(0,l.l)(i))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("geodeticLength",[i.toJSON(),c,f])}))},e.functions.distance=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,3,n,t);let i=a[0];if(((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(i=(0,l.J)(a[0],n.spatialReference)),!(i instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);let c=a[1];if(((0,b.cy)(a[1])||(0,l.m)(a[1]))&&(c=(0,l.J)(a[1],n.spatialReference)),!(c instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("distance",[i.toJSON(),c.toJSON(),X(a[2])])}))},e.functions.distancegeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,4,n,t);const i=a[0];if(!(i instanceof p.A))throw new o.D$(n,o.TX.InvalidParameter,t);const c=a[1];if(!(c instanceof p.A))throw new o.D$(n,o.TX.InvalidParameter,t);const f=new y.A({paths:[],spatialReference:i.spatialReference});return f.addPath([i,c]),(0,u.C)("geodeticLength",[f.toJSON(),X(a[2]),(0,s.rE)(a[3])??"geodesic"])}))},e.functions.densify=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,3,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=(0,l.t)(a[1]);if(isNaN(i))throw new o.D$(n,o.TX.InvalidParameter,t);if(i<=0)throw new o.D$(n,o.TX.InvalidParameter,t);switch(a[0].type){case"polygon":case"polyline":case"extent":return(0,g.rS)(await(0,u.C)("densify",[a[0].toJSON(),i,X(a[2])]));default:return a[0]}}))},e.functions.densifygeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,4,n,t);const i=a[0];if(null==i)return null;if(!(0,l.l)(i))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.t)(a[1]);if(isNaN(c))throw new o.D$(n,o.TX.InvalidParameter,t);if(c<=0)throw new o.D$(n,o.TX.InvalidParameter,t);const f=X(a[2]),d=(0,s.rE)(a[3])??"geodesic";switch(i.type){case"polygon":case"polyline":case"extent":return(0,g.rS)(await(0,u.C)("geodeticDensify",[i.toJSON(),c,f,d]));default:return i}}))},e.functions.generalize=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,4,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=(0,l.t)(a[1]);if(isNaN(i))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.e)((0,l.K)(a[2],!0));return(0,g.rS)(await(0,u.C)("generalize",[a[0].toJSON(),i,X(a[3]),{removeDegenerateParts:c}]))}))},e.functions.buffer=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,3,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.t)(a[1]);if(isNaN(c))throw new o.D$(n,o.TX.InvalidParameter,t);return 0===c?(0,i.Yq)(a[0]):(0,g.rS)(await(0,u.C)("buffer",[a[0].toJSON(),c,X(a[2])]))}))},e.functions.buffergeodetic=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{a=(0,l.E)(a),(0,l.D)(a,2,4,n,t);const c=a[0];if(null==c)return null;if(!(0,l.l)(c))throw new o.D$(n,o.TX.InvalidParameter,t);const f=(0,l.t)(a[1]);if(isNaN(f))throw new o.D$(n,o.TX.InvalidParameter,t);if(0===f)return(0,i.Yq)(c);const d=X(a[2]),w=(0,s.rE)(a[3])??"geodesic";return(0,g.rS)(await(0,u.C)("geodesicBuffer",[c.toJSON(),f,d,w]))}))},e.functions.offset=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,6,n,t),null===a[0])return null;if(!(a[0]instanceof h.A||a[0]instanceof y.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=(0,l.t)(a[1]);if(isNaN(i))throw new o.D$(n,o.TX.InvalidParameter,t);const c=(0,l.f)(a[3]??"round").toLowerCase();let s;switch(c){case"round":case"bevel":case"miter":case"square":s=c;break;default:s="round"}const f=(0,l.t)((0,l.K)(a[4],10));if(isNaN(f))throw new o.D$(n,o.TX.InvalidParameter,t);const d=(0,l.t)((0,l.K)(a[5],0));if(isNaN(d))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)(await(0,u.C)("offset",[a[0].toJSON(),i,X(a[2]),{joins:s,miterLimit:f,flattenError:d}]))}))},e.functions.rotate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,2,3,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);const i=a[0]instanceof f.A?h.A.fromExtent(a[0]):a[0],c=(0,l.t)(a[1]);if(isNaN(c))throw new o.D$(n,o.TX.InvalidParameter,t);const s=(0,l.K)(a[2],null);if(null===s){const e="point"===i.type?i:i.extent?.center;return(0,g.rS)(await(0,u.C)("rotate",[i.toJSON(),c,e?.x,e?.y]))}if(s instanceof p.A)return(0,g.rS)(await(0,u.C)("rotate",[i.toJSON(),c,s.x,s.y]));throw new o.D$(n,o.TX.InvalidParameter,t)}))},e.functions.centroid=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,2,n,t),null===a[0])return null;const i=(0,l.f)(a[1]??"geometric").toLowerCase();if("geometric"!==i&&"labelpoint"!==i)throw new o.D$(n,o.TX.InvalidParameter,t);let c=a[0];if(((0,b.cy)(a[0])||(0,l.m)(a[0]))&&(c="geometric"===i?(0,l.J)(a[0],n.spatialReference):(0,l.G)(a[0],n.spatialReference),null===c))return null;if(!(c instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)("geometric"===i?await(0,u.C)("centroid",[c.toJSON()]):await(0,u.C)("labelPoint",[c.toJSON()]))}))},e.functions.measuretocoordinate=function(n,t){return e.standardFunctionAsync(n,t,s.Cd)},e.functions.pointtocoordinate=function(n,t){return e.standardFunctionAsync(n,t,s.kr)},e.functions.distancetocoordinate=function(n,t){return e.standardFunctionAsync(n,t,s.Bn)},e.functions.multiparttosinglepart=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);if(a[0]instanceof p.A)return[(0,l.F)((0,i.Yq)(a[0]),n.spatialReference)];if(a[0]instanceof f.A)return[(0,l.F)((0,i.Yq)(a[0]),n.spatialReference)];const c=(0,g.rS)(await(0,u.C)("simplify",[a[0].toJSON()]));if(c instanceof h.A){const e=[],n=[];for(let t=0;t<c.rings.length;t++)if(c.isClockwise(c.rings[t])){const n=(0,g.rS)({rings:[c.rings[t]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(n)}else n.push({ring:c.rings[t],pt:c.getPoint(t,0)});for(let t=0;t<n.length;t++)for(let r=0;r<e.length;r++)if(e[r].contains(n[t].pt)){e[r].addRing(n[t].ring);break}return e}if(c instanceof y.A){const e=[];for(let n=0;n<c.paths.length;n++){const t=(0,g.rS)({paths:[c.paths[n]],hasZ:!0===c.hasZ,hasM:!0===c.hasM,spatialReference:c.spatialReference.toJSON()});e.push(t)}return e}if(a[0]instanceof w.A){const e=[],t=(0,l.F)((0,i.Yq)(a[0]),n.spatialReference);for(let n=0;n<t.points.length;n++)e.push(t.getPoint(n));return e}return null}))},e.functions.issimple=function(n,t){return e.standardFunctionAsync(n,t,((e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return!0;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,u.C)("isSimple",[a[0].toJSON()])}))},e.functions.simplify=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)(await(0,u.C)("simplify",[a[0].toJSON()]))}))},e.functions.convexhull=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,a)=>{if(a=(0,l.E)(a),(0,l.D)(a,1,1,n,t),null===a[0])return null;if(!(a[0]instanceof d.A))throw new o.D$(n,o.TX.InvalidParameter,t);return(0,g.rS)(await(0,u.C)("convexHull",[a[0].toJSON()]))}))},e.functions.getuser=function(n,t){return e.standardFunctionAsync(n,t,(async(e,i,s)=>{(0,l.D)(s,0,2,n,t);let u=(0,l.K)(s[1],""),f=!0===u;if(u=!0===u||!1===u?"":(0,l.f)(u),0===s.length||s[0]instanceof r.A){let e;e=n.services?.portal?n.services.portal:m.A.getDefault(),s.length>0&&(e=(0,c.R)(s[0],e));const t=await D(e,u,f);if(t){const e=JSON.parse(JSON.stringify(t));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return a.A.convertObjectToArcadeDictionary(e,(0,l.L)(n))}return null}let d=null;if((0,l.p)(s[0])&&(d=s[0]),d){if(f=!1,u)return null;await d.load();const e=await d.getOwningSystemUrl();if(!e){if(!u){const e=await d.getIdentityUser();return e?a.A.convertObjectToArcadeDictionary({username:e},(0,l.L)(n)):null}return null}let t;t=n.services?.portal?n.services.portal:m.A.getDefault(),t=(0,c.R)(new r.A(e),t);const o=await D(t,u,f);if(o){const e=JSON.parse(JSON.stringify(o));for(const n of["lastLogin","created","modified"])void 0!==e[n]&&null!==e[n]&&(e[n]=new Date(e[n]));return a.A.convertObjectToArcadeDictionary(e,(0,l.L)(n))}return null}throw new o.D$(n,o.TX.InvalidParameter,t)}))},e.functions.nearestcoordinate=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,l.E)(i),(0,l.D)(i,2,2,n,t),!(i[0]instanceof d.A||null===i[0]))throw new o.D$(n,o.TX.InvalidParameter,t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(n,o.TX.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof f.A?h.A.fromExtent(i[0]):i[0],s=await(0,u.C)("getNearestCoordinate",[c.toJSON(),i[1].toJSON(),{calculateLeftRightSide:!0}]);return null===s?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,g.rS)(s.coordinate),distance:s.distance,sideOfLine:0===s.distance?"straddle":s.rightSide?"right":"left"},(0,l.L)(n),!1,!0)}))},e.functions.nearestvertex=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,i)=>{if(i=(0,l.E)(i),(0,l.D)(i,2,2,n,t),!(i[0]instanceof d.A||null===i[0]))throw new o.D$(n,o.TX.InvalidParameter,t);if(!(i[1]instanceof p.A||null===i[1]))throw new o.D$(n,o.TX.InvalidParameter,t);if(null===i[0]||null===i[1])return null;const c=i[0]instanceof f.A?h.A.fromExtent(i[0]):i[0],s=await(0,u.C)("getNearestVertex",[c.toJSON(),i[1].toJSON()]);return null===s?null:a.A.convertObjectToArcadeDictionary({coordinate:(0,g.rS)(s.coordinate),distance:s.distance,sideOfLine:0===s.distance?"straddle":s.rightSide?"right":"left"},(0,l.L)(n),!1,!0)}))})}},93543:(e,n,t)=>{t.r(n),t.d(n,{executeScript:()=>_,extend:()=>Y});var r=t(48938),a=t(99719),o=t(72888),i=t(15695),l=t(66395),c=t(85935),s=t(93833),u=t(92400),f=t(78878),d=t(19157),w=t(42208),p=t(63680),h=t(81113),y=t(32091),g=t(87367),m=t(41217),v=t(36770),S=t(47346),D=t(29304),b=(t(44208),t(91075)),X=t(16930),A=t(54218);async function T(e,n){const t=[];for(let r=0;r<n.arguments.length;r++)t.push(await x(e,n.arguments[r]));return t}async function $(e,n,t){return!0===n.preparsed?t(e,null,n.arguments):t(e,n,await T(e,n))}class N extends u.fF{constructor(e,n){super(),this.definition=null,this.context=null,this.definition=e,this.context=n}createFunction(e){return(...n)=>{const t={spatialReference:this.context.spatialReference,console:this.context.console,lrucache:this.context.lrucache,timeZone:this.context.timeZone??null,exports:this.context.exports,libraryResolver:this.context.libraryResolver,interceptor:this.context.interceptor,services:this.context.services,abortSignal:this.context.abortSignal,localScope:{},depthCounter:{depth:e.depthCounter+1},globalScope:this.context.globalScope};if(t.depthCounter.depth>64)throw new c.D$(e,c.TX.MaximumCallDepth,null);return O(this.definition,t,n,null)}}call(e,n){return F(e,n,((t,r,a)=>{const o={spatialReference:e.spatialReference,services:e.services,console:e.console,libraryResolver:e.libraryResolver,exports:e.exports,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:{},abortSignal:e.abortSignal,globalScope:e.globalScope,depthCounter:{depth:e.depthCounter.depth+1}};if(o.depthCounter.depth>64)throw new c.D$(e,c.TX.MaximumCallDepth,n);return O(this.definition,o,a,n)}))}marshalledCall(e,n,t,r){return r(e,n,(async(a,o,i)=>{const l={spatialReference:e.spatialReference,services:e.services,globalScope:t.globalScope,depthCounter:{depth:e.depthCounter.depth+1},libraryResolver:e.libraryResolver,exports:e.exports,console:e.console,abortSignal:e.abortSignal,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:{}};return i=i.map((n=>!(0,f.i)(n)||n instanceof u.CU?n:(0,u.o6)(n,e,r))),(0,u.o6)(await O(this.definition,l,i,n),t,r)}))}}async function O(e,n,t,a){const o=e.body;if(t.length!==e.params.length)throw new c.D$(n,c.TX.WrongNumberOfParameters,null);for(let a=0;a<t.length;a++){const o=e.params[a];"Identifier"===o.type&&null!=n.localScope&&(n.localScope[(0,r.X)(o)]={value:t[a]})}const i=await C(n,o);if(i instanceof f.R)return i.value;if(i===f.w)throw new c.D$(n,c.TX.UnexpectedToken,a);if(i===f.x)throw new c.D$(n,c.TX.UnexpectedToken,a);return i instanceof f.I?i.value:i}class I extends a.x{constructor(e){super(),this.source=e}global(e){const n=this.executingContext.globalScope[(0,r.X)(e)];if((0,f.i)(n.value)&&!(n.value instanceof u.CU)){const t=new u.CU;return t.fn=n.value,t.parameterEvaluator=F,t.context=this.executingContext,this.executingContext.globalScope[(0,r.X)(e)]={value:t},t}return n.value}setGlobal(e,n){if((0,f.i)(n))throw new c.D$(null,c.TX.AssignModuleFunction,null);this.executingContext.globalScope[(0,r.X)(e)]={value:n}}hasGlobal(e){return void 0===this.executingContext.exports[e]&&(e=(0,r.X)(e)),void 0!==this.executingContext.exports[e]}async loadModule(e){const n=e.spatialReference??X.A.WebMercator;this.moduleScope=z(null,null,e.timeZone),this.executingContext={spatialReference:n,services:e.services,libraryResolver:new o.a(e.libraryResolver._moduleSingletons,this.source.syntax.loadedModules),exports:{},abortSignal:e.abortSignal??r._,globalScope:this.moduleScope,console:e.console??V,lrucache:e.lrucache,timeZone:e.timeZone??null,interceptor:e.interceptor,localScope:null,depthCounter:{depth:1}},await k(this.executingContext,this.source.syntax)}}async function F(e,n,t){return!0===n.preparsed?t(e,null,n.arguments):t(e,n,await T(e,n))}async function x(e,n){n.breakpoint&&await n.breakpoint();try{switch(n.type){case"UpdateExpression":return await async function(e,n){const t=n.argument;if("CallExpression"===t.type)throw new c.D$(e,c.TX.NeverReach,n);if("MemberExpression"===t.type){const r=await x(e,t.object);let a,o;if(!0===t.computed)a=await x(e,t.property);else{if("Identifier"!==t.property.type)throw new c.D$(e,c.TX.Unrecognized,n);a=t.property.name}if((0,A.cy)(r)){if(!(0,A.Et)(a))throw new c.D$(e,c.TX.ArrayAccessorMustBeNumber,n);if(a<0&&(a=r.length+a),a<0||a>=r.length)throw new c.D$(e,c.TX.OutOfBounds,n);o=(0,f.t)(r[a]),r[a]="++"===n.operator?o+1:o-1}else if(r instanceof l.A){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0!==r.hasField(a))throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});o=(0,f.t)(r.field(a)),r.setField(a,"++"===n.operator?o+1:o-1)}else if(r instanceof I){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.ModuleAccessorMustBeString,n);if(!0!==r.hasGlobal(a))throw new c.D$(e,c.TX.ModuleExportNotFound,n);o=(0,f.t)(r.global(a)),r.setGlobal(a,"++"===n.operator?o+1:o-1)}else{if(!(0,f.n)(r))throw(0,f.m)(r)?new c.D$(e,c.TX.Immutable,n):new c.D$(e,c.TX.InvalidParameter,n);if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0!==r.hasField(a))throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});o=(0,f.t)(r.field(a)),r.setField(a,"++"===n.operator?o+1:o-1)}return!1===n.prefix?o:"++"===n.operator?o+1:o-1}const a=(0,r.X)(t);let o;if(null!=e.localScope&&void 0!==e.localScope[a])return o=(0,f.t)(e.localScope[a].value),e.localScope[a]={value:"++"===n.operator?o+1:o-1},!1===n.prefix?o:"++"===n.operator?o+1:o-1;if(void 0!==e.globalScope[a])return o=(0,f.t)(e.globalScope[a].value),e.globalScope[a]={value:"++"===n.operator?o+1:o-1},!1===n.prefix?o:"++"===n.operator?o+1:o-1;throw new c.D$(e,c.TX.InvalidIdentifier,n)}(e,n);case"AssignmentExpression":return await async function(e,n){const t=n.left;if("MemberExpression"===t.type){const r=await x(e,t.object);let a;if(!0===t.computed)a=await x(e,t.property);else{if("Identifier"!==t.property.type)throw new c.D$(e,c.TX.InvalidIdentifier,n);a=t.property.name}const o=await x(e,n.right);if((0,A.cy)(r)){if(!(0,A.Et)(a))throw new c.D$(e,c.TX.ArrayAccessorMustBeNumber,n);if(a<0&&(a=r.length+a),a<0||a>r.length)throw new c.D$(e,c.TX.OutOfBounds,n);if(a===r.length){if("="!==n.operator)throw new c.D$(e,c.TX.OutOfBounds,n);r[a]=P(o,n.operator,r[a],n,e)}else r[a]=P(o,n.operator,r[a],n,e)}else if(r instanceof l.A){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0===r.hasField(a))r.setField(a,P(o,n.operator,r.field(a),n,e));else{if("="!==n.operator)throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});r.setField(a,P(o,n.operator,null,n,e))}}else if(r instanceof I){if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0!==r.hasGlobal(a))throw new c.D$(e,c.TX.ModuleExportNotFound,n);r.setGlobal(a,P(o,n.operator,r.global(a),n,e))}else{if(!(0,f.n)(r))throw(0,f.m)(r)?new c.D$(e,c.TX.Immutable,n):new c.D$(e,c.TX.InvalidParameter,n);if(!1===(0,A.Kg)(a))throw new c.D$(e,c.TX.KeyAccessorMustBeString,n);if(!0===r.hasField(a))r.setField(a,P(o,n.operator,r.field(a),n,e));else{if("="!==n.operator)throw new c.D$(e,c.TX.FieldNotFound,n,{key:a});r.setField(a,P(o,n.operator,null,n,e))}}return f.v}const a=(0,r.X)(t);if(null!=e.localScope&&void 0!==e.localScope[a]){const t=await x(e,n.right);return e.localScope[a]={value:P(t,n.operator,e.localScope[a].value,n,e)},f.v}if(void 0!==e.globalScope[a]){const t=await x(e,n.right);return e.globalScope[a]={value:P(t,n.operator,e.globalScope[a].value,n,e)},f.v}throw new c.D$(e,c.TX.InvalidIdentifier,n)}(e,n);case"TemplateLiteral":return await async function(e,n){let t="",r=0;for(const a of n.quasis)if(t+=a.value?a.value.cooked:"",!1===a.tail){if(n.expressions[r]){const a=await x(e,n.expressions[r]);if((0,f.i)(a))throw new c.D$(e,c.TX.NoFunctionInTemplateLiteral,n);t+=(0,f.f)(a)}r++}return t}(e,n);case"Identifier":return K(e,n);case"MemberExpression":return await async function(e,n){const t=await x(e,n.object);if(null===t)throw new c.D$(e,c.TX.MemberOfNull,n);if(!1===n.computed){if("Identifier"===n.property.type){if(t instanceof l.A||(0,f.y)(t))return t.field(n.property.name);if(t instanceof b.A)return(0,i.Bl)(t,n.property.name,e,n);if(t instanceof I){if(!t.hasGlobal(n.property.name))throw new c.D$(e,c.TX.InvalidIdentifier,n);return t.global(n.property.name)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}let r=await x(e,n.property);if(t instanceof l.A||(0,f.y)(t)){if((0,A.Kg)(r))return t.field(r);throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if(t instanceof I){if((0,A.Kg)(r))return t.global(r);throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if(t instanceof b.A){if((0,A.Kg)(r))return(0,i.Bl)(t,r,e,n);throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if((0,A.cy)(t)){if((0,A.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new c.D$(e,c.TX.OutOfBounds,n);return t[r]}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if((0,f.m)(t)){if((0,A.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length()+r),r>=t.length()||r<0)throw new c.D$(e,c.TX.OutOfBounds,n);return t.get(r)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}if((0,A.Kg)(t)){if((0,A.Et)(r)&&isFinite(r)&&Math.floor(r)===r){if(r<0&&(r=t.length+r),r>=t.length||r<0)throw new c.D$(e,c.TX.OutOfBounds,n);return t[r]}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}throw new c.D$(e,c.TX.InvalidMemberAccessKey,n)}(e,n);case"Literal":return n.value;case"CallExpression":return await async function(e,n){if("MemberExpression"===n.callee.type){const t=await x(e,n.callee.object);if(!(t instanceof I))throw new c.D$(e,c.TX.FunctionNotFound,n);const r=!1===n.callee.computed?n.callee.property.name:await x(e,n.callee.property);if(!t.hasGlobal(r))throw new c.D$(e,c.TX.FunctionNotFound,n);const a=t.global(r);if(!(0,f.i)(a))throw new c.D$(e,c.TX.CallNonFunction,n);return a.call(e,n)}if("Identifier"!==n.callee.type)throw new c.D$(e,c.TX.FunctionNotFound,n);const t=(0,r.X)(n.callee);if(null!=e.localScope&&void 0!==e.localScope[t]){const r=e.localScope[t];if((0,f.i)(r.value))return r.value.call(e,n);throw new c.D$(e,c.TX.CallNonFunction,n)}if(void 0!==e.globalScope[t]){const r=e.globalScope[t];if((0,f.i)(r.value))return r.value.call(e,n);throw new c.D$(e,c.TX.CallNonFunction,n)}throw new c.D$(e,c.TX.FunctionNotFound,n)}(e,n);case"UnaryExpression":return await async function(e,n){const t=await x(e,n.argument);if((0,A.Lm)(t)){if("!"===n.operator)return!t;if("-"===n.operator)return-1*(0,f.t)(t);if("+"===n.operator)return 1*(0,f.t)(t);if("~"===n.operator)return~(0,f.t)(t);throw new c.D$(e,c.TX.UnsupportedUnaryOperator,n)}if("-"===n.operator)return-1*(0,f.t)(t);if("+"===n.operator)return 1*(0,f.t)(t);if("~"===n.operator)return~(0,f.t)(t);throw new c.D$(e,c.TX.UnsupportedUnaryOperator,n)}(e,n);case"BinaryExpression":return await async function(e,n){const t=await x(e,n.left),r=await x(e,n.right);switch(n.operator){case"|":case"<<":case">>":case">>>":case"^":case"&":return(0,f.B)((0,f.t)(t),(0,f.t)(r),n.operator);case"==":return(0,f.A)(t,r);case"!=":return!(0,f.A)(t,r);case"<":case">":case"<=":case">=":return(0,f.z)(t,r,n.operator);case"+":return(0,A.Kg)(t)||(0,A.Kg)(r)?(0,f.f)(t)+(0,f.f)(r):(0,f.t)(t)+(0,f.t)(r);case"-":return(0,f.t)(t)-(0,f.t)(r);case"*":return(0,f.t)(t)*(0,f.t)(r);case"/":return(0,f.t)(t)/(0,f.t)(r);case"%":return(0,f.t)(t)%(0,f.t)(r);default:throw new c.D$(e,c.TX.UnsupportedOperator,n)}}(e,n);case"LogicalExpression":return await async function(e,n){const t=await x(e,n.left);if(!(0,A.Lm)(t))throw new c.D$(e,c.TX.LogicalExpressionOnlyBoolean,n);switch(n.operator){case"||":{if(!0===t)return t;const r=await x(e,n.right);if((0,A.Lm)(r))return r;throw new c.D$(e,c.TX.LogicExpressionOrAnd,n)}case"&&":{if(!1===t)return t;const r=await x(e,n.right);if((0,A.Lm)(r))return r;throw new c.D$(e,c.TX.LogicExpressionOrAnd,n)}default:throw new c.D$(e,c.TX.LogicExpressionOrAnd,n)}}(e,n);case"ArrayExpression":return await async function(e,n){const t=[];for(let r=0;r<n.elements.length;r++)t.push(await x(e,n.elements[r]));for(let r=0;r<t.length;r++){if((0,f.i)(t[r]))throw new c.D$(e,c.TX.NoFunctionInArray,n);t[r]===f.v&&(t[r]=null)}return t}(e,n);case"ObjectExpression":return await async function(e,n){const t=[];for(let r=0;r<n.properties.length;r++){const a=n.properties[r],o=await x(e,a.value),i="Identifier"===a.key.type?a.key.name:await x(e,a.key);t[r]={key:i,value:o}}const r={},a=new Map;for(let o=0;o<t.length;o++){const i=t[o];if((0,f.i)(i.value))throw new c.D$(e,c.TX.NoFunctionInDictionary,n);if(!1===(0,A.Kg)(i.key))throw new c.D$(e,c.TX.KeyMustBeString,n);let l=i.key.toString();const s=l.toLowerCase();a.has(s)?l=a.get(s):a.set(s,l),i.value===f.v?r[l]=null:r[l]=i.value}const o=new l.A(r);return o.immutable=!1,o}(e,n);default:throw new c.D$(e,c.TX.Unrecognized,n)}}catch(t){throw(0,c.Nh)(e,n,t)}}async function C(e,n){n.breakpoint&&await n.breakpoint();try{switch(n.type){case"ImportDeclaration":return await async function(e,n){const t=(0,r.X)(n.specifiers[0].local),a=e.libraryResolver.loadLibrary(t);let o;return e.libraryResolver._moduleSingletons?.has(a.uri)?o=e.libraryResolver._moduleSingletons.get(a.uri):(o=new I(a),await o.loadModule(e),e.libraryResolver._moduleSingletons?.set(a.uri,o)),e.globalScope[t]={value:o},f.v}(e,n);case"ExportNamedDeclaration":return await async function(e,n){if(await C(e,n.declaration),"FunctionDeclaration"===n.declaration.type)e.exports[(0,r.X)(n.declaration.id)]="function";else if("VariableDeclaration"===n.declaration.type)for(const t of n.declaration.declarations)e.exports[(0,r.X)(t.id)]="variable";return f.v}(e,n);case"VariableDeclaration":return await M(e,n,0);case"BlockStatement":return await k(e,n);case"FunctionDeclaration":return await async function(e,n){const t=(0,r.X)(n.id);return e.globalScope[t]={value:new N(n,e)},f.v}(e,n);case"ReturnStatement":return await async function(e,n){if(null===n.argument)return new f.R(f.v);const t=await x(e,n.argument);return new f.R(t)}(e,n);case"IfStatement":return await async function(e,n){const t=await x(e,n.test);if(!0===t)return C(e,n.consequent);if(!1===t)return null!==n.alternate?C(e,n.alternate):f.v;throw new c.D$(e,c.TX.BooleanConditionRequired,n)}(e,n);case"ExpressionStatement":return await async function(e,n){const t=await x(e,n.expression);return t===f.v?f.v:new f.I(t)}(e,n);case"ForStatement":return await async function(e,n){try{for(null!==n.init&&("VariableDeclaration"===n.init.type?await C(e,n.init):await x(e,n.init));;){if(null!==n.test){const t=await x(e,n.test);if(!0===e.abortSignal?.aborted)throw new c.D$(e,c.TX.Cancelled,n);if(!1===t)break;if(!0!==t)throw new c.D$(e,c.TX.BooleanConditionRequired,n)}const t=await C(e,n.body);if(t===f.w)break;if(t instanceof f.R)return t;null!==n.update&&await x(e,n.update)}return f.v}catch(e){throw e}}(e,n);case"WhileStatement":return await async function(e,n){let t=await x(e,n.test);if(!1===t)return f.v;if(!0!==t)throw new c.D$(e,c.TX.BooleanConditionRequired,n);for(;!0===t;){const r=await C(e,n.body);if(r===f.w)break;if(r instanceof f.R)return r;if(t=await x(e,n.test),!0!==t&&!1!==t)throw new c.D$(e,c.TX.BooleanConditionRequired,n)}return f.v}(e,n);case"ForInStatement":return await async function(e,n){const t=await x(e,n.right);"VariableDeclaration"===n.left.type&&await C(e,n.left);const a=(0,r.X)("VariableDeclaration"===n.left.type?n.left.declarations[0].id:n.left);let o=null;if(null!=e.localScope&&void 0!==e.localScope[a]&&(o=e.localScope[a]),null===o&&void 0!==e.globalScope[a]){const n=e.globalScope[a].value;o=e.globalScope[a]={value:n}}if(null===o)throw new c.D$(e,c.TX.InvalidIdentifier,n);return(0,A.cy)(t)||(0,A.Kg)(t)?await E(e,n,t,o):(0,f.m)(t)?await R(e,n,t,o):t instanceof l.A||(0,f.y)(t)?await E(e,n,t.keys(),o,"k"):(0,f.p)(t)?await J(e,n,t,o):(0,f.l)(t)?await E(e,n,(0,i.T)(t),o,"k"):f.v}(e,n);case"ForOfStatement":return await async function(e,n){const t=await x(e,n.right);"VariableDeclaration"===n.left.type&&await C(e,n.left);const a=(0,r.X)("VariableDeclaration"===n.left.type?n.left.declarations[0].id:n.left);let o=null;if(null!=e.localScope&&void 0!==e.localScope[a]&&(o=e.localScope[a]),null===o&&void 0!==e.globalScope[a]){const n=e.globalScope[a].value;o=e.globalScope[a]={value:n}}if(null===o)throw new c.D$(e,c.TX.InvalidIdentifier,n);return(0,A.cy)(t)||(0,A.Kg)(t)?await E(e,n,t,o,"k"):(0,f.m)(t)?await R(e,n,t,o,"k"):t instanceof l.A||(0,f.y)(t)?await async function(e,n,t,r){for(const a of t.keys()){const o=t.field(a);r.value=new l.A({key:a,value:o});const i=await C(e,n.body);if(i===f.w)break;if(i instanceof f.R)return i}return f.v}(e,n,t,o):(0,f.p)(t)?await J(e,n,t,o):(0,f.l)(t)?await async function(e,n,t,r){for(const a of(0,i.T)(t)){const o=(0,i.Bl)(t,a,e,n,1);r.value=new l.A({key:a,value:o});const c=await C(e,n.body);if(c===f.w)break;if(c instanceof f.R)return c}return f.v}(e,n,t,o):f.v}(e,n);case"BreakStatement":return f.w;case"EmptyStatement":return f.v;case"ContinueStatement":return f.x;default:throw new c.D$(e,c.TX.Unrecognized,n)}}catch(t){throw(0,c.Nh)(e,n,t)}}async function E(e,n,t,r,a="i"){const o=t.length;for(let i=0;i<o;i++){if("k"===a){if(i>=t.length)throw new c.D$(e,c.TX.OutOfBounds,n);r.value=t[i]}else r.value=i;const o=await C(e,n.body);if(o===f.w)break;if(o instanceof f.R)return o}return f.v}async function R(e,n,t,r,a="i"){const o=t.length();for(let i=0;i<o;i++){r.value="k"===a?t.get(i):i;const o=await C(e,n.body);if(o===f.w)break;if(o instanceof f.R)return o}return f.v}async function J(e,n,t,r){const a=t.iterator(e.abortSignal);let o;for(;null!=(o=await a.next());){const a=s.A.createFromGraphicLikeObject(o.geometry,o.attributes,t,e.timeZone);a._underlyingGraphic=o,r.value=a;const i=await C(e,n.body);if(i===f.w)break;if(i instanceof f.R)return i}return f.v}function P(e,n,t,r,a){switch(n){case"=":return e===f.v?null:e;case"/=":return(0,f.t)(t)/(0,f.t)(e);case"*=":return(0,f.t)(t)*(0,f.t)(e);case"-=":return(0,f.t)(t)-(0,f.t)(e);case"+=":return(0,A.Kg)(t)||(0,A.Kg)(e)?(0,f.f)(t)+(0,f.f)(e):(0,f.t)(t)+(0,f.t)(e);case"%=":return(0,f.t)(t)%(0,f.t)(e);default:throw new c.D$(a,c.TX.UnsupportedOperator,r)}}async function k(e,n){return L(e,n,0)}async function L(e,n,t){if(t>=n.body.length)return f.v;const r=await C(e,n.body[t]);return r instanceof f.R||r===f.w||r===f.x||t===n.body.length-1?r:L(e,n,t+1)}async function M(e,n,t){return t>=n.declarations.length||(await async function(e,n){let t=null;if(t=null===n.init?null:await x(e,n.init),null!==e.localScope){if(t===f.v&&(t=null),"Identifier"!==n.id.type)throw new c.D$(e,c.TX.InvalidIdentifier,n);const a=(0,r.X)(n.id);return void(null!=e.localScope&&(e.localScope[a]={value:t}))}if("Identifier"!==n.id.type)throw new c.D$(e,c.TX.InvalidIdentifier,n);const a=(0,r.X)(n.id);t===f.v&&(t=null),e.globalScope[a]={value:t}}(e,n.declarations[t]),t===n.declarations.length-1||await M(e,n,t+1)),f.v}function K(e,n){const t=(0,r.X)(n);if(null!=e.localScope&&void 0!==e.localScope[t])return e.localScope[t].value;if(void 0!==e.globalScope[t])return e.globalScope[t].value;throw new c.D$(e,c.TX.InvalidIdentifier,n)}async function B(e,n){(0,f.D)(null===n.arguments?[]:n.arguments,3,3,e,n);const t=await x(e,n.arguments[0]);if(!1===(0,A.Lm)(t))throw new c.D$(e,c.TX.BooleanConditionRequired,n);return x(e,t?n.arguments[1]:n.arguments[2])}async function U(e,n){(0,f.D)(null===n.arguments?[]:n.arguments,2,3,e,n);const t=await x(e,n.arguments[0]);if(3===n.arguments.length){const r=await x(e,n.arguments[1]),a=(0,i.jd)(t,r);return null!=a&&""!==a?a:x(e,n.arguments[2])}return null==t||""===t?x(e,n.arguments[1]):t}async function j(e,n){if(n.arguments.length<2)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);if(2===n.arguments.length)return x(e,n.arguments[1]);if((n.arguments.length-1)%2==0)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);return Z(e,n,1,await x(e,n.arguments[0]))}async function Z(e,n,t,r){const a=await x(e,n.arguments[t]);if((0,f.A)(a,r))return x(e,n.arguments[t+1]);const o=n.arguments.length-t;return 1===o?x(e,n.arguments[t]):2===o?null:3===o?x(e,n.arguments[t+2]):Z(e,n,t+2,r)}async function q(e,n){if(n.arguments.length<3)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);if(n.arguments.length%2==0)throw new c.D$(e,c.TX.WrongNumberOfParameters,n);const t=await x(e,n.arguments[0]);if(!1===(0,A.Lm)(t))throw new c.D$(e,c.TX.BooleanConditionRequired,n.arguments[0]);return G(e,n,0,t)}async function G(e,n,t,r){if(!0===r)return x(e,n.arguments[t+1]);if(3==n.arguments.length-t)return x(e,n.arguments[t+2]);const a=await x(e,n.arguments[t+2]);if(!1===(0,A.Lm)(a))throw new c.D$(e,c.TX.ModuleExportNotFound,n.arguments[t+2]);return G(e,n,t+2,a)}const W=function(){const e=Object.create(null);(0,h.d)(e,$),(0,D.d)(e,$),(0,y.d)(e,$,K),(0,v.d)(e,$),(0,m.d)(e,$),(0,S.d)(e,$),(0,g.registerFunctions)({functions:e,compiled:!1,signatures:null,evaluateIdentifier:null,mode:"async",standardFunction:$,standardFunctionAsync:F}),e.iif=B,e.defaultvalue=U,e.decode=j,e.when=q;const n=function(){const e=new l.A({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});e.immutable=!1,this.textformatting={value:e}};(n.prototype=Object.create(null)).infinity=Object.freeze({value:Number.POSITIVE_INFINITY}),n.prototype.pi=Object.freeze({value:Math.PI});for(const[t,r]of Object.entries(e))n.prototype[t]=Object.freeze({value:new u.UQ(r)});return n}();function Y(e){const n={mode:"async",compiled:!1,functions:Object.create(null),signatures:[],standardFunction:$,standardFunctionAsync:F,evaluateIdentifier:K};for(let t=0;t<e.length;t++)e[t].registerFunctions(n);for(const[e,t]of Object.entries(n.functions))W.prototype[e]=Object.freeze({value:new u.UQ(t)});for(let e=0;e<n.signatures.length;e++)(0,d.WC)(n.signatures[e],"async")}function z(e,n,t){const r=new W;null==e&&(e={}),null==n&&(n={});for(const e in n)r[e]={value:new u.UQ(n[e])};for(const n in e)r[n]={value:(0,A.DU)(e[n])?s.A.createFromGraphic(e[n],t):e[n]};return r}function V(e){console.log(e)}async function _(e,n){const t=n.spatialReference??X.A.WebMercator;let a=null;e.usesModules&&(a=new o.a(new Map,e.loadedModules));const i=z(n.vars,n.customfunctions,n.timeZone),l={spatialReference:t,services:n.services,exports:{},libraryResolver:a,abortSignal:n.abortSignal??r._,globalScope:i,console:n.console??V,timeZone:n.timeZone??null,lrucache:n.lrucache,interceptor:n.interceptor,localScope:null,depthCounter:{depth:1}},s=await k(l,e);if(s instanceof f.R||s instanceof f.I){const e=s.value;if((0,f.C)(e))return null;if((0,f.i)(e))throw new c.D$(l,c.TX.IllegalResult,null);return e}if((0,f.C)(s))return null;if(s===f.w)throw new c.D$(l,c.TX.IllegalResult,null);if(s===f.x)throw new c.D$(l,c.TX.IllegalResult,null);throw new c.D$(l,c.TX.NeverReach,null)}Y([p.A]),Y([w.A])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3720],{4197:(e,t,n)=>{n.d(t,{jh:()=>o,l5:()=>i,xm:()=>s});var r=n(34275);function o(e,t=!1){return e<=r.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=r.y9?Array.from(e):new Float64Array(e)}function i(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}},27647:(e,t,n)=>{function r(e,t){return e?t?4:3:t?3:2}function o(e,t,n,o){if(!t?.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const l=e.coords,u=[],c=n?[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],{lengths:h,coords:a}=t,f=r(n,o);let d=0;for(const e of h){const t=s(c,a,d,e,n,o);t&&u.push(t),d+=e*f}if(u.sort(((e,t)=>{let r=e[2]-t[2];return 0===r&&n&&(r=e[4]-t[4]),r})),u.length){let e=6*u[0][2];l[0]=u[0][0]/e,l[1]=u[0][1]/e,n&&(e=6*u[0][4],l[2]=0!==e?u[0][3]/e:0),(l[0]<c[0]||l[0]>c[1]||l[1]<c[2]||l[1]>c[3]||n&&(l[2]<c[4]||l[2]>c[5]))&&(l.length=0)}if(!l.length){const e=t.lengths[0]?i(a,0,h[0],n,o):null;if(!e)return null;l[0]=e[0],l[1]=e[1],n&&e.length>2&&(l[2]=e[2])}return e}function s(e,t,n,o,s,i){const l=r(s,i);let u=n,c=n+l,h=0,a=0,f=0,d=0,m=0;for(let n=0,r=o-1;n<r;n++,u+=l,c+=l){const n=t[u],r=t[u+1],o=t[u+2],i=t[c],l=t[c+1],g=t[c+2];let y=n*l-i*r;d+=y,h+=(n+i)*y,a+=(r+l)*y,s&&(y=n*g-i*o,f+=(o+g)*y,m+=y),n<e[0]&&(e[0]=n),n>e[1]&&(e[1]=n),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),s&&(o<e[4]&&(e[4]=o),o>e[5]&&(e[5]=o))}if(d>0&&(d*=-1),m>0&&(m*=-1),!d)return null;const g=[h,a,.5*d];return s&&(g[3]=f,g[4]=.5*m),g}function i(e,t,n,o,s){const i=r(o,s);let a=t,f=t+i,d=0,m=0,g=0,y=0;for(let t=0,r=n-1;t<r;t++,a+=i,f+=i){const t=e[a],n=e[a+1],r=e[a+2],s=e[f],i=e[f+1],I=e[f+2],p=o?u(t,n,r,s,i,I):l(t,n,s,i);if(p)if(d+=p,o){const e=h(t,n,r,s,i,I);m+=p*e[0],g+=p*e[1],y+=p*e[2]}else{const e=c(t,n,s,i);m+=p*e[0],g+=p*e[1]}}return d>0?o?[m/d,g/d,y/d]:[m/d,g/d]:n>0?o?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,n,r){const o=n-e,s=r-t;return Math.sqrt(o*o+s*s)}function u(e,t,n,r,o,s){const i=r-e,l=o-t,u=s-n;return Math.sqrt(i*i+l*l+u*u)}function c(e,t,n,r){return[e+.5*(n-e),t+.5*(r-t)]}function h(e,t,n,r,o,s){return[e+.5*(r-e),t+.5*(o-t),n+.5*(s-n)]}n.d(t,{Q:()=>o})},43334:(e,t,n)=>{n.d(t,{N3:()=>l,Om:()=>i});var r=n(69397),o=n(27647),s=n(92722);class i{constructor(e=null,t={},n,r,o=0){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=o}static fromJSON(e){const t=e.geometry?s.A.fromJSON(e.geometry):null,n=e.centroid?s.A.fromJSON(e.centroid):null,r=e.objectId;return new i(t,e.attributes,n,r)}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,o.Q)(new s.A,this.geometry,e.hasZ,e.hasM),this.centroid}get usedMemory(){return 128+(0,r.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,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 r;return e.objectIdFieldName=this.objectIdFieldName,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}}},69397:(e,t,n)=>{n.d(t,{$B:()=>o,Qf:()=>c,Qh:()=>l,RS:()=>s,ez:()=>f,lM:()=>i,qK:()=>a});var r=n(34275);function o(e){return 32+e.length}const s=16;function i(e){if(!e)return 0;let t=a;for(const n in e)e.hasOwnProperty(n)&&(t+=u(e[n],!1));return t}function l(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let n=f;for(let r=0;r<t;r++)n+=u(e[r]);return n}(e);let t=a;for(const n in e)e.hasOwnProperty(n)&&(t+=u(e[n]));return t}function u(e,t=!0){switch(typeof e){case"object":return t?l(e):a;case"string":return o(e);case"number":return s;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce(((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+d:Array.isArray(t)?h(t,s):0:0)),0)}function h(e,t){return f+e.length*t}const a=32,f=16,d=145},70328:(e,t,n)=>{n.d(t,{BI:()=>p,Ej:()=>f,Ie:()=>y,Jt:()=>I,Ne:()=>d,RF:()=>h,aI:()=>b,fA:()=>i,gE:()=>u,hZ:()=>g,iT:()=>a,is:()=>N,qv:()=>T,vI:()=>m,vY:()=>l,v_:()=>F,vt:()=>s,w1:()=>c});var r=n(5443),o=(n(19419),n(4197));function s(e=F){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,n,r,o,i,l=s()){return l[0]=e,l[1]=t,l[2]=n,l[3]=r,l[4]=o,l[5]=i,l}function l(e,t=s()){return function(e,t,n,r=s()){return g(r,T),function(e,t,n=0,r=t.length/3){let o=e[0],s=e[1],i=e[2],l=e[3],u=e[4],c=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[n+3*e]),s=Math.min(s,t[n+3*e+1]),i=Math.min(i,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),u=Math.max(u,t[n+3*e+1]),c=Math.max(c,t[n+3*e+2]);e[0]=o,e[1]=s,e[2]=i,e[3]=l,e[4]=u,e[5]=c}(r,e,t,n),r}(e,0,e.length/3,t)}function u(e,t=(0,o.jh)(24)){const[n,r,s,i,l,u]=e;return t[0]=n,t[1]=r,t[2]=s,t[3]=n,t[4]=r,t[5]=u,t[6]=n,t[7]=l,t[8]=s,t[9]=n,t[10]=l,t[11]=u,t[12]=i,t[13]=r,t[14]=s,t[15]=i,t[16]=r,t[17]=u,t[18]=i,t[19]=l,t[20]=s,t[21]=i,t[22]=l,t[23]=u,t}function c(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function m(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?g(e,T):s(T)}function I(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function p(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function N(e){return 6===e.length}function b(e,t,n){if(null==e||null==t)return e===t;if(!N(e)||!N(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],F=[0,0,0,0,0,0];s()},90708:(e,t,n)=>{n.d(t,{B2:()=>T,BW:()=>_,Ch:()=>ie,DF:()=>A,Di:()=>B,E2:()=>U,IE:()=>b,Nl:()=>te,Q4:()=>le,Rk:()=>ce,Ux:()=>J,Ye:()=>L,ZF:()=>H,eU:()=>z,eY:()=>X,hK:()=>ae,jH:()=>ee,jQ:()=>se,kz:()=>ne,oN:()=>Q,q3:()=>W,qK:()=>S,qN:()=>Y,z5:()=>R,zv:()=>$});var r=n(49186),o=n(53966),s=n(97768),i=n(70328),l=n(19419),u=n(65864),c=n(43334),h=n(58512),a=n(92722);function f(e,t){return e?t?4:3:t?3:2}const d=()=>o.A.getLogger("esri.layers.graphics.featureConversionUtils"),m={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0},g=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s},y=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s,e[n+2]=t[r+2]},I=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s,e[n+2]=t[r+3]},p=(e,t,n,r,o,s)=>{e[n]=o,e[n+1]=s,e[n+2]=t[r+2],e[n+3]=t[r+3]};function N(e,t,n,r){if(e){if(n)return t&&r?p:y;if(t&&r)return I}else if(t&&r)return y;return g}function b({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}function T({scale:e,translate:t},n){return Math.round((t[1]-n)/e[1])}function F({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}function M({scale:e,translate:t},n){return Math.round((n-t[1])/e[1])}function w({scale:e,translate:t},n,r){return n*e[r]+t[r]}function A(e,t,n){return e?t?n?Z(e):P(e):n?O(e):G(e):null}function G(e){const t=e.coords;return{x:t[0],y:t[1]}}function x(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function P(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function E(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function O(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function v(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function Z(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function j(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function q(e,t){return e&&t?j:e?E:t?v:x}function Y(e,t,n=q(null!=t.z,null!=t.m)){return n(e,t)}function S(e,t,n){if(null==e)return null;const r=f(t,n),o=[];for(let t=0;t<e.coords.length;t+=r){const n=[];for(let o=0;o<r;o++)n.push(e.coords[t+o]);o.push(n)}return t?n?{points:o,hasZ:t,hasM:n}:{points:o,hasZ:t}:n?{points:o,hasM:n}:{points:o}}function V(e,t,n=f(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const r=e.coords;let o=0;for(const e of t.points)for(let t=0;t<n;t++)r[o++]=e[t];return e}function _(e,t,n){if(!e)return null;const r=f(t,n),{coords:o,lengths:s}=e,i=[];let l=0;for(const e of s){const t=[];for(let n=0;n<e;n++){const e=[];for(let t=0;t<r;t++)e.push(o[l++]);t.push(e)}i.push(t)}return t?n?{paths:i,hasZ:t,hasM:n}:{paths:i,hasZ:t}:n?{paths:i,hasM:n}:{paths:i}}function k(e,t,n=f(t.hasZ,t.hasM)){const{lengths:r,coords:o}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<n;e++)o[s++]=t[e];r.push(e.length)}return e}function R(e,t,n){if(!e)return null;const r=f(t,n),{coords:o,lengths:s}=e,i=[];let l=0;for(const e of s){const t=[];for(let n=0;n<e;n++){const e=[];for(let t=0;t<r;t++)e.push(o[l++]);t.push(e)}i.push(t)}return t?n?{rings:i,hasZ:t,hasM:n}:{rings:i,hasZ:t}:n?{rings:i,hasM:n}:{rings:i}}function L(e,t,n=t.hasZ,r=t.hasM){return z(e,t.rings,n,r)}function z(e,t,n,r){const o=f(n,r),{lengths:s,coords:i}=e;let l=0;fe(e);for(const e of t){for(const t of e)for(let e=0;e<o;e++)i[l++]=t[e];s.push(e.length)}return e}const C=[],D=[];function U(e,t,n,r,o){C[0]=e;const[s]=B(D,C,t,n,r,o);return de(C),de(D),s}function B(e,t,n,o,s,i){if(de(e),!n){for(const n of t){const t=i?n.attributes[i]:void 0;e.push(new c.Om(null,n.attributes,null,t))}return e}switch(n){case"esriGeometryPoint":return function(e,t,n,r,o){const s=q(n,r);for(const{geometry:n,attributes:r}of t){const t=null!=n?s(new a.A,n):null;e.push(new c.Om(t,r,null,o?r[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryMultipoint":return function(e,t,n,r,o){const s=f(n,r);for(const{geometry:n,attributes:r}of t){const t=null!=n?V(new a.A,n,s):null;e.push(new c.Om(t,r,null,o?r[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolyline":return function(e,t,n,r,o){const s=f(n,r);for(const{geometry:n,attributes:r,centroid:i}of t){const t=null!=n?k(new a.A,n,s):null,l=null!=i?Y(new a.A,i):null;e.push(new c.Om(t,r,l,o?r[o]:void 0))}return e}(e,t,o,s,i);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,n,r,o){for(const{geometry:s,centroid:i,attributes:l}of t){const t=null!=s?L(new a.A,s,n,r):null,u=o?l[o]:void 0;null!=i?e.push(new c.Om(t,l,x(new a.A,i),u)):e.push(new c.Om(t,l,null,u))}return e}(e,t,o,s,i);default:d().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${n}'`)),de(e)}return e}function Q(e,t,n,r){D[0]=e,K(C,D,t,n,r);const o=C[0];return de(C),de(D),o}function J(e,t,n){if(null==e)return null;const o=new a.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==n&&(n=e.hasM),(0,u.fT)(e)?q(null!=t?t:null!=e.z,null!=n?n:null!=e.m)(o,e):(0,u.Bi)(e)?L(o,e,t,n):(0,u.Rg)(e)?k(o,e,f(t,n)):(0,u.U9)(e)?V(o,e,f(t,n)):void d().error("convertFromGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function $(e,t,n,o){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=G;return n&&o?e=Z:n?e=P:o&&(e=O),e(s)}case"esriGeometryMultipoint":return S(s,n,o);case"esriGeometryPolyline":return _(s,n,o);case"esriGeometryPolygon":return R(s,n,o);default:return d().error("convertToGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function K(e,t,n,o,s){if(de(e),null==n)return function(e,t){for(const n of t)e.push({attributes:n.attributes});return e}(e,t);switch(n){case"esriGeometryPoint":return function(e,t,n,r){let o=G;n&&r?o=Z:n?o=P:r&&(o=O);for(const n of t){const{geometry:t,attributes:r}=n,s=null!=t?o(t):null;e.push({attributes:r,geometry:s})}return e}(e,t,o,s);case"esriGeometryMultipoint":return function(e,t,n,r){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?S(o,n,r):null});return e}(e,t,o,s);case"esriGeometryPolyline":return function(e,t,n,r){for(const{geometry:o,attributes:s}of t)e.push({attributes:s,geometry:null!=o?_(o,n,r):null});return e}(e,t,o,s);case"esriGeometryPolygon":return function(e,t,n,r){for(const{geometry:o,attributes:s,centroid:i}of t){const t=null!=o?R(o,n,r):null;if(null!=i){const n=G(i);e.push({attributes:s,centroid:n,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,o,s);default:d().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${n}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:n,transform:r,fields:o,hasM:s,hasZ:i,features:l,geometryType:u,exceededTransferLimit:c,uniqueIdField:h,queryGeometry:a,queryGeometryType:f}=e,d={features:K([],l,u,i,s),fields:o,geometryType:u,objectIdFieldName:t,spatialReference:n,uniqueIdField:h,queryGeometry:$(a,f,!1,!1)};return r&&(d.transform=r),c&&(d.exceededTransferLimit=c),s&&(d.hasM=s),i&&(d.hasZ=i),d}function W(e,t){const n=new h.A,{hasM:o,hasZ:s,features:i,objectIdFieldName:l,spatialReference:u,geometryType:c,exceededTransferLimit:a,transform:f,fields:m}=e;return m&&(n.fields=m),n.geometryType=c??null,n.objectIdFieldName=l??t??null,n.spatialReference=u??null,n.objectIdFieldName?(i&&B(n.features,i,c,s,o,n.objectIdFieldName),a&&(n.exceededTransferLimit=a),o&&(n.hasM=o),s&&(n.hasZ=s),f&&(n.transform=f),n):(d().error(new r.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),n)}function X(e){const{transform:t,features:n,hasM:r,hasZ:o}=e;if(!t)return e;for(const e of n)null!=e.geometry&&ie(e.geometry,e.geometry,r,o,t),null!=e.centroid&&ie(e.centroid,e.centroid,r,o,t);return e.transform=null,e}function ee(e,t){const{geometryType:n,features:r,hasM:o,hasZ:s}=t;if(!e)return t;for(let t=0;t<r.length;t++){const i=r[t],l=i.weakClone();l.geometry=new a.A,te(l.geometry,i.geometry,o,s,n,e),i.centroid&&(l.centroid=new a.A,te(l.centroid,i.centroid,o,s,"esriGeometryPoint",e)),r[t]=l}return t.transform=e,t}function te(e,t,n,r,o,s,i=n,l=r){if(fe(e),!t?.coords.length)return null;const u=m[o],{coords:c,lengths:h}=t,a=f(n,r),d=f(n&&i,r&&l),g=N(n,r,i,l);if(!h.length)return g(e.coords,c,0,0,b(s,c[0]),T(s,c[1])),fe(e,a,0),e;let y,I,p,F,M=0,w=0,A=w;for(const t of h){if(t<u)continue;let n=0;w=A,p=y=b(s,c[M]),F=I=T(s,c[M+1]),g(e.coords,c,w,M,p,F),n++,M+=a,w+=d;for(let r=1;r<t;r++,M+=a)p=b(s,c[M]),F=T(s,c[M+1]),p===y&&F===I||(g(e.coords,c,w,M,p-y,F-I),w+=d,n++,y=p,I=F);n>=u&&(e.lengths.push(n),A=w)}return de(e.coords,A),e.coords.length?e:null}function ne(e,t,n,r,o,s,i=n,l=r){if(fe(e),!t?.coords.length)return null;const u=m[o],{coords:c,lengths:h}=t,a=f(n,r),d=f(n&&i,r&&l),g=N(n,r,i,l);if(!h.length)return g(e.coords,c,0,0,c[0],c[1]),fe(e,a,0),e;let y=0;const I=s*s;for(const t of h){if(t<u){y+=t*a;continue}const n=e.coords.length/d,r=y,o=y+(t-1)*a;g(e.coords,c,e.coords.length,r,c[r],c[r+1]),oe(e.coords,c,a,I,g,r,o),g(e.coords,c,e.coords.length,o,c[o],c[o+1]);const s=e.coords.length/d-n;s>=u?e.lengths.push(s):de(e.coords,n*d),y+=t*a}return e.coords.length?e:null}function re(e,t,n,r){const o=e[t],s=e[t+1],i=e[n],l=e[n+1],u=e[r],c=e[r+1];let h=i,a=l,f=u-h,d=c-a;if(0!==f||0!==d){const e=((o-h)*f+(s-a)*d)/(f*f+d*d);e>1?(h=u,a=c):e>0&&(h+=f*e,a+=d*e)}return f=o-h,d=s-a,f*f+d*d}function oe(e,t,n,r,o,s,i){let l,u=r,c=0;for(let e=s+n;e<i;e+=n)l=re(t,e,s,i),l>u&&(c=e,u=l);u>r&&(c-s>n&&oe(e,t,n,r,o,s,c),o(e,t,e.length,c,t[c],t[c+1]),i-c>n&&oe(e,t,n,r,o,c,i))}function se(e,t,n,r){if(!t?.coords?.length)return null;const o=f(n,r);let s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=o){const n=e[t],r=e[t+1];s=Math.min(s,n),c=Math.max(c,n),u=Math.min(u,r),h=Math.max(h,r)}}return(0,i.is)(e)?(0,i.BI)(e,s,u,c,h):(0,l.fA)(s,u,c,h,e),e}function ie(e,t,n,r,o){const{coords:i,lengths:l}=t,u=f(n,r);if(!i.length)return e!==t&&fe(e),e;(0,s.Lw)(o);const{originPosition:c,scale:h,translate:a}=o,d=me;d.originPosition=c;const m=d.scale;m[0]=h[0]??1,m[1]=-(h[1]??1),m[2]=h[2]??1,m[3]=h[3]??1;const g=d.translate;if(g[0]=a[0]??0,g[1]=a[1]??0,g[2]=a[2]??0,g[3]=a[3]??0,!l.length){for(let t=0;t<u;++t)e.coords[t]=w(d,i[t],t);return e!==t&&fe(e,u,0),e}let y=0;for(let t=0;t<l.length;t++){const n=l[t];e.lengths[t]=n;for(let t=0;t<u;++t)e.coords[y+t]=w(d,i[y+t],t);let r=e.coords[y],o=e.coords[y+1];y+=u;for(let t=1;t<n;t++,y+=u){r+=i[y]*m[0],o+=i[y+1]*m[1],e.coords[y]=r,e.coords[y+1]=o;for(let t=2;t<u;++t)e.coords[y+t]=w(d,i[y+t],t)}}return e!==t&&fe(e,i.length,l.length),e}function le(e,t,n,r,o,s){if(fe(e),e.lengths.push(...t.lengths),n===o&&r===s)for(let n=0;n<t.coords.length;n++)e.coords.push(t.coords[n]);else{const i=f(n,r),l=N(n,r,o,s),u=t.coords;for(let t=0;t<u.length;t+=i)l(e.coords,u,e.coords.length,t,u[t],u[t+1])}return e}function ue(e,t,n,r){let o=0,s=e[r*t],i=e[r*(t+1)];for(let l=1;l<n;l++){const n=s+e[r*(t+l)],u=i+e[r*(t+l)+1],c=(n-s)*(u+i);s=n,i=u,o+=c}return.5*o}function ce(e,t){const{coords:n,lengths:r}=e;let o=0,s=0;for(let e=0;e<r.length;e++){const i=r[e];s+=ue(n,o,i,t),o+=i}return Math.abs(s)}function he(e,t,n,r){return 0==e*r-n*t&&e*n+t*r>0}function ae(e,t,n,r,o){const s=f(r,o);if(!e.lengths.length){if(e.coords.length<2)return null;const[n,r]=e.coords,o=F(t,n),s=M(t,r);return new a.A([],[o,s])}const i=new a.A([],[0,0]),l=m[n],u="esriGeometryPolygon"===n||"esriGeometryPolyline"===n;let c=0,h=0;for(let n=0;n<e.lengths.length;n++){const r=e.lengths[n],o=h;let a=F(t,e.coords[s*c]),f=M(t,e.coords[s*c+1]);i.coords[h++]=a,i.coords[h++]=f;let d=0,m=0,g=1;for(let n=1;n<r;n++){const r=F(t,e.coords[s*(n+c)]),o=M(t,e.coords[s*(n+c)+1]);if(r!==a||o!==f){const e=r-a,t=o-f;u&&he(d,m,e,t)?(i.coords[h-2]+=e,i.coords[h-1]+=t,a+=e,f+=t):(i.coords[h++]=r,i.coords[h++]=o,a=r,f=o,d=e,m=t,g+=1)}}g<l?h=o:i.lengths.push(g),c+=r}return 0===i.lengths.length?null:i}function fe(e,t=0,n=0){de(e.lengths,n),de(e.coords,t)}function de(e,t=0){e.length!==t&&(e.length=t)}const me={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},92722:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(69397);class o{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new o(e.lengths,e.coords)}static fromRect(e){const[t,n,r,s]=e,i=r-t,l=s-n;return new o([5],[t,n,i,0,0,l,-i,0,0,-l])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}area(){let e=0,t=0;if(!this.lengths.length)return 0;for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];if(r<3)continue;let o=this.coords[2*t],s=this.coords[2*t+1];for(let n=1;n<r;n+=1){const r=this.coords[2*(n+t)],i=this.coords[2*(n+t)+1];e+=-.5*(r-o)*(i+s),o=r,s=i}t+=r}return e}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;for(const e of n){for(let n=1;n<e;n++)t[2*(r+n)]+=t[2*(r+n)-2],t[2*(r+n)+1]+=t[2*(r+n)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new o([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),n=this.coords.slice(0,t);return e?(e.set(n),new o(this.lengths,e)):new o(Array.from(this.lengths),Array.from(n))}}},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1904],{8303:(e,t,r)=>{r.d(t,{A:()=>_});var n=r(90237),i=r(92602),s=r(70333),l=r(78888),a=r(60999),o=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),m=r(10107),y=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),x=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.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,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,c.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,p=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,x.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.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 r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=v.A.getDefault();if(i&&i.loaded&&(0,c.S8)(i.restUrl)===(0,c.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&n&&!(0,c.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.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,n._)([(0,m.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,n._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},26253:(e,t,r)=>{r.d(t,{T:()=>d});var n=r(90237),i=r(69540),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.t)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,n._)([(0,u.$)("esri.time.TimeInterval")],d)},33446:(e,t,r)=>{r.d(t,{C:()=>l,m:()=>s});var n=r(49186),i=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.Te)(l),a}},38458:(e,t,r)=>{r.d(t,{m:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},38961:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(5503),s=r(36708),l=r(10107),a=r(40608),o=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.fm)((()=>this._refresh()),s.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.MZ)()],u.prototype,"getCollections",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n._)([(0,a.$)("esri.core.CollectionFlattener")],u)},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Me});var n=r(90237),i=r(92602),s=r(52106),l=r(13874),a=r(78888),o=r(5503),u=r(38961),p=r(49186),d=r(66552),c=r(4718),m=r(92071),y=r(74887),h=r(36708),f=r(84952),g=r(10107),v=r(56507),w=r(36005),b=r(40608),x=r(43937),_=r(49422),I=r(5443),M=r(16930),E=r(83960),S=r(21325),T=r(4146),A=r(63074),F=r(16131),N=r(8303),O=r(54310),P=r(25036),U=r(82935),Z=r(38458),R=r(60694),L=r(10873),C=r(69622);r(44208),r(53966),r(87811);const j={visible:"visibleSublayers"};let $=class extends C.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,g.MZ)()],$.prototype,"layer",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,n._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,n._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,n._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],$);var H,q=r(33446),B=r(4902),D=r(79901);let k=0,V=H=class extends(B.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.OH),(0,h.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.OH)])}get id(){return this._get("id")??k++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,v.dp)(o.A.ofType(H),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,g.MZ)()],V.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({type:I.A,json:{name:"extent"}})],V.prototype,"fullExtent",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],V.prototype,"id",null),(0,n._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],V.prototype,"legendUrl",void 0),(0,n._)([(0,w.w)("legendUrl",["legendUrl","legendURL"])],V.prototype,"readLegendUrl",null),(0,n._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],V.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"layer",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"maxScale",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"minScale",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],V.prototype,"effectiveScaleRange",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"name",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"parent",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],V.prototype,"popupEnabled",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],V.prototype,"queryable",void 0),(0,n._)([(0,g.MZ)()],V.prototype,"sublayers",void 0),(0,n._)([(0,D.w)("sublayers")],V.prototype,"castSublayers",null),(0,n._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],V.prototype,"spatialReferences",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,n._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],V.prototype,"visible",null),V=H=(0,n._)([(0,b.$)("esri.layers.support.WMSSublayer")],V);var W=r(4576),G=r(96285);const X={84:4326,83:4269,27:4267};function J(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=Y("Capability",r),i=Y("Service",r),s=n&&Y("Request",n);if(!n||!i||!s)return null;const l=Y("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=te("Title",i,"")||te("Name",i,""),u=te("AccessConstraints",i,""),d=/^none$/i.test(u)?"":u,c=te("Abstract",i,""),m=parseInt(te("MaxWidth",i,"5000"),10),y=parseInt(te("MaxHeight",i,"5000"),10),h=ie(s,"GetMap"),f=ne(s,"GetMap"),g=le(l,a,t);if(!g)return null;let v,w=0;const b=Array.prototype.slice.call(n.childNodes),x=g.sublayers??[],_=e=>{null!=e&&x.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===w?v=e:1===w?(g.name&&(g.name="",_(le(v,a,t))),_(le(e,a,t))):_(le(e,a,t)),w++)}));const I=g.sublayers??[],M=g.fullExtents??[];0===I.length&&I.push(g),g.extent??=I[0].extent;const E=g.spatialReferences.length>0?g.spatialReferences:K(g),S=ne(s,"GetFeatureInfo"),T=S?ie(s,"GetFeatureInfo"):null,A=Q(I),F=g.minScale||0,N=g.maxScale||0,O=g.dimensions??[],P=A.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),U=O.concat(P).filter(oe);let Z=null;if(U.length){const e=U.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(W.Ru);Z={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:d,description:c,dimensions:O,extent:g.extent,fullExtents:M,featureInfoFormats:T,featureInfoUrl:S,mapUrl:f,maxWidth:m,maxHeight:y,maxScale:N,minScale:F,layers:A,spatialReferences:E,supportedImageFormatTypes:h,timeInfo:Z,title:o,version:a}}function K(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=K(t);if(e.length>0)return e}return[]}function Q(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Q(r.sublayers)),delete r.sublayers);return t}function z(e,t,r){return t.getAttribute(e)??r}function Y(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(ae(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];ae(i)&&i.nodeName===e&&r.push(i)}return r}function te(e,t,r){return Y(e,t)?.textContent??r}function re(e,t,r){const n=parseFloat(e.getAttribute("minx")??"0"),i=parseFloat(e.getAttribute("miny")??"0"),s=parseFloat(e.getAttribute("maxx")??"0"),l=parseFloat(e.getAttribute("maxy")??"0");return{xmin:r?isNaN(i)?-Number.MAX_VALUE:i:isNaN(n)?-Number.MAX_VALUE:n,ymin:r?isNaN(n)?-Number.MAX_VALUE:n:isNaN(i)?-Number.MAX_VALUE:i,xmax:r?isNaN(l)?Number.MAX_VALUE:l:isNaN(s)?Number.MAX_VALUE:s,ymax:r?isNaN(s)?Number.MAX_VALUE:s:isNaN(l)?Number.MAX_VALUE:l,spatialReference:{wkid:t}}}function ne(e,t){const r=Y(t,e);if(r){const e=Y("DCPType",r);if(e){const t=Y("HTTP",e);if(t){const e=Y("Get",t);if(e){let t=function(e,t,r){const n=Y("OnlineResource",r);return n?z("xlink:href",n,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],n=(0,f.An)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function ie(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",Y(t,e)).map((({textContent:e})=>e)).filter(W.Ru);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function se(e,t,r){const n=Y(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function le(e,t,r){if(!e)return null;const n=e.getAttribute("queryable")?.toLowerCase(),i="1"===n||"true"===n,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:i,spatialReferences:[],sublayers:null},l=Y("LatLonBoundingBox",e),a=Y("EX_GeographicBoundingBox",e),o=l?re(l,4326):a?{xmin:parseFloat(te("westBoundLongitude",a,"0")),ymin:parseFloat(te("southBoundLatitude",a,"0")),xmax:parseFloat(te("eastBoundLongitude",a,"0")),ymax:parseFloat(te("northBoundLatitude",a,"0")),spatialReference:{wkid:4326}}:{xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};s.minScale=se(e,"MaxScaleDenominator",0),s.maxScale=se(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u),n=r?.indexOf(":");if(n&&n>-1){let i=parseInt(r.slice(n+1),10);0===i||isNaN(i)||(i=X[i]??i);const l="1.3.0"===t?re(e,i,(0,Z.m)(i)):re(e,i);l&&s.fullExtents&&s.fullExtents.push(l)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,n]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(n,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=X[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const n=le(e,t,r);n&&(n.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(n))}}else{const t=Y("LegendURL",e);if(t){const e=Y("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=o,s.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==z("default",e,"0"),a="0"!==z("nearestValue",e,"0"),o="0"!==z("current",e,"0");return oe({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(n),default:de(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:i,default:ue(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function oe(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(W.Ru):r.map((e=>parseFloat(e)))}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(W.Ru):r}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:ce(t[0]),max:ce(t[1]),resolution:t.length>=3&&"0"!==t[2]?me(t[2]):void 0}})).filter(W.Ru):r.map((e=>ce(e)))}function ce(e){return G.c9.fromISO(e,{zone:G.mQ.utcInstance}).toJSDate()}function me(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:ye(t[1]),months:ye(t[2]),days:ye(t[3]),hours:ye(t[4]),minutes:ye(t[5]),seconds:ye(t[6])}:null}function ye(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function fe(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${he(t)}`:`${t?he(t):"0000-01-01T00:00:00Z"}/${r?he(r):"9999-12-31T23:59:59Z"}`}const ge=new Set([102100,3857,102113,900913]),ve=new Set([3395,54004]),we=new d.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function xe(e){return"text/plain"===e}let _e=class extends((0,A.dM)((0,U.e)((0,O.J)((0,P.j)((0,F.q)((0,N.A)((0,m.P)(T.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new I.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(xe)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||xe(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Ie(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Ie(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,f.a6)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,E.X_)({extent:e,width:t})*i,l=new $({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ge.has(r)?t.find((e=>ge.has(e)))||t.find((e=>ve.has(e)))||102100:r)}(d,this.spatialReferences),m="1.3.0"===this.version&&(0,Z.m)(c)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,y=l.toJSON(),h="1.3.0"===this.version?"crs":"srs";return{bbox:m,[h]:null==c||isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=fe(n?.timeExtent),o={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal};return(0,a.A)(i??"",o).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=fe(n?.timeExtent),o={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:l,...this.refreshParameters}),signal:n?.signal},{data:u}=await(0,a.A)(i,o);return(0,q.m)(u,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,E.X_)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,S.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=encodeURI((0,f.yM)(e)),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.A({title:this.title,content:t}),n=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=J(n)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=i.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Ie(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new V;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.A),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,g.MZ)({readOnly:!0})],_e.prototype,"allSublayers",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],_e.prototype,"customParameters",void 0),(0,n._)([(0,g.MZ)({json:{type:Object,write:!0}})],_e.prototype,"customLayerParameters",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:!0}})],_e.prototype,"copyright",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"description",void 0),(0,n._)([(0,g.MZ)({readOnly:!0})],_e.prototype,"dimensions",void 0),(0,n._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],_e.prototype,"fullExtent",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"fullExtent",["extent"])],_e.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,x.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],_e.prototype,"writeFullExtent",null),(0,n._)([(0,g.MZ)({type:[I.A]})],_e.prototype,"fullExtents",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"featureInfoFormat",null),(0,n._)([(0,g.MZ)({type:[String],readOnly:!0})],_e.prototype,"featureInfoFormats",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"featureInfoUrl",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:we.jsonValues,read:{reader:we.read,source:"format"},write:{writer:we.write,target:"format"}}}}})],_e.prototype,"imageFormat",void 0),(0,n._)([(0,w.w)("imageFormat",["supportedImageFormatTypes"])],_e.prototype,"readImageFormat",null),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],_e.prototype,"imageMaxHeight",void 0),(0,n._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],_e.prototype,"imageMaxWidth",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"imageTransparency",void 0),(0,n._)([(0,g.MZ)(L.fV)],_e.prototype,"legendEnabled",void 0),(0,n._)([(0,g.MZ)({type:["show","hide","hide-children"]})],_e.prototype,"listMode",void 0),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"mapUrl",void 0),(0,n._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],_e.prototype,"isReference",void 0),(0,n._)([(0,g.MZ)({type:["WMS"]})],_e.prototype,"operationalLayerType",void 0),(0,n._)([(0,g.MZ)()],_e.prototype,"resourceInfo",void 0),(0,n._)([(0,g.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],_e.prototype,"spatialReference",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],_e.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,g.MZ)({type:[v.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],_e.prototype,"spatialReferences",void 0),(0,n._)([(0,x.K)(["web-document","portal-item"],"spatialReferences")],_e.prototype,"writeSpatialReferences",null),(0,n._)([(0,g.MZ)({type:o.A.ofType(V),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],_e.prototype,"sublayers",void 0),(0,n._)([(0,w.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],_e.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,w.w)("service","sublayers",["layers"])],_e.prototype,"readSublayers",null),(0,n._)([(0,x.K)("sublayers",{layers:{type:[V]},visibleLayers:{type:[String]}})],_e.prototype,"writeSublayers",null),(0,n._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],_e.prototype,"type",void 0),(0,n._)([(0,g.MZ)(L.OZ)],_e.prototype,"url",null),(0,n._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],_e.prototype,"version",void 0),_e=(0,n._)([(0,b.$)("esri.layers.WMSLayer")],_e);const Me=_e},64272:(e,t,r)=>{r.d(t,{T:()=>c});var n,i=r(90237),s=r(25482),l=r(88930),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),d=r(98623);let c=class extends s.A{static{n=this}static get allTime(){return m}static get empty(){return y}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===n&&r===i}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,e,t));let i=this.end;if(i){const r=(0,l.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,e,t)}return new n({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;return i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null==l||null==a||isNaN(l)||isNaN(a)?n.empty:new n({start:l===-1/0?null:new Date(l),end:a===1/0?null:new Date(a)})}offset(e,t,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new n,{start:s,end:a}=this;return null!=s&&(i.start=(0,l.S1)(s,e,t,r)),null!=a&&(i.end=(0,l.S1)(a,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.w)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.K)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.w)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.K)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.$)("esri.time.TimeExtent")],c);const m=new c,y=new c({start:void 0,end:void 0})},73133:(e,t,r)=>{r.d(t,{j:()=>n});const n=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>y});var n=r(90237),i=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),a=r(89317),o=r(30524),u=r(96184),p=r(73133),d=r(64272),c=r(26253);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=p.j.fromJSON(r.timeOffsetUnits);return n&&i?new c.T({value:n,unit:i}):null}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,i.MZ)({type:d.T,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,i.MZ)({type:c.T})],t.prototype,"timeOffset",void 0),(0,n._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,i.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,i.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},83960:(e,t,r)=>{r.d(t,{X_:()=>l,oW:()=>o,zx:()=>a});var n=r(34727),i=r(83047);const s=96;function l(e,t){const r=t||e.extent,n=e.width,l=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*l*i.dy*s:0}function a(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function o(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},96184:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(90237),i=r(69540),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),u=r(43937),p=r(64272),d=r(26253),c=r(56400);function m(e,t){return d.T.fromJSON({value:e,unit:t})}let y=class extends(i.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,n._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,n._)([(0,l.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,n._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,n._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,n._)([(0,l.MZ)({type:d.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,n._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,n._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,n._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,n._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,n._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,n._)([(0,o.$)("esri.layers.support.TimeInfo")],y)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(7036)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(6213),t.e(2944),t.e(8947),t.e(958),t.e(4654),t.e(2921),t.e(1999)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(9070)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(1956),t.e(4796),t.e(4111),t.e(8506),t.e(364),t.e(8628),t.e(2593),t.e(2696),t.e(4178)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await Promise.all([t.e(6131),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(6131),t.e(9953),t.e(9186),t.e(6976)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(5483)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4927)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(3474)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(6131),t.e(3562),t.e(8256)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(9953),t.e(1956),t.e(364),t.e(984),t.e(2439),t.e(272)]).then(t.bind(t,58434))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(9953),t.e(984),t.e(6049),t.e(2439),t.e(7677),t.e(5943)]).then(t.bind(t,35943))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(6131),t.e(9172),t.e(132)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(6131),t.e(8947),t.e(9172),t.e(3642)]).then(t.bind(t,74660))).default,KMLLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(5026)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(6760),t.e(1806),t.e(7475),t.e(2083),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(6131),t.e(6213),t.e(8596),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(6760),t.e(1806),t.e(7475),t.e(2083),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(1956),t.e(4796),t.e(4111),t.e(364),t.e(4341),t.e(7656),t.e(6928)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(7475),t.e(2936)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(6131),t.e(2763)]).then(t.bind(t,19647))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(1956),t.e(4796),t.e(3029),t.e(2905),t.e(4934)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(4111),t.e(8506),t.e(3600),t.e(9835)]).then(t.bind(t,97927))).default,PointCloudLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(8947),t.e(7984),t.e(6528)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(7634)]).then(t.bind(t,64185))).default,SceneLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(1956),t.e(4796),t.e(6213),t.e(2944),t.e(8947),t.e(958),t.e(4654),t.e(2921),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(1956),t.e(4796),t.e(3029),t.e(505)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1956),t.e(4796),t.e(4111),t.e(8506),t.e(1162)]).then(t.bind(t,59929))).default,TileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(1956),t.e(4796),t.e(4111),t.e(364),t.e(9186),t.e(4341),t.e(8535)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(9186),t.e(9949),t.e(5013),t.e(4937)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await t.e(6875).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(6131),t.e(6213),t.e(8596),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(6131),t.e(8948),t.e(8947),t.e(1389)]).then(t.bind(t,16183))).default,WCSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(9953),t.e(984),t.e(6049),t.e(2439),t.e(7677),t.e(9547)]).then(t.bind(t,19547))).default,WFSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(13),t.e(2106),t.e(8988),t.e(6728),t.e(1214),t.e(9953),t.e(1956),t.e(4796),t.e(3029),t.e(7396)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(8948),t.e(2106),t.e(6728),t.e(1904)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(6131),t.e(8219),t.e(6773)]).then(t.bind(t,47314))).default}},22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(77548),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly"),c=s.tileInfo?.format?.toLowerCase()??"",u=null==i&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(c);return"map"===i||u||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,l:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer")))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return["CatalogLayer"];case"feature":return["ArcGISFeatureLayer"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData().catch((()=>null));if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters}).catch((()=>null));a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return await t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),p=w?.layers,h=m.data&&m.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,h.length);e++)if(p[e].id===i)return{serverUrl:r,layerId:h[e].id}}else if(null!=i&&i<h.length)return{serverUrl:r,layerId:h[i].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186,4178,4342,5483,9070],{13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),s=r(69622),n=r(60999),o=r(5503),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(30524),c=r(43668);let p=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new o.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){try{const{attributes:i}=t,s=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(r.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const r=this._createFormattedAttributes(e,t,s).global;return n({attributes:i,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:r,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const r=t.getObjectId();if(null==r)return t;if(!(0,u.Kl)(this.requiredFields,t)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const i=await e.queryFeatures(t);if(1===i?.features.length)return i.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const n={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:n,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,i._)([(0,a.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,i._)([(0,a.MZ)()],p.prototype,"_featureUtils",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,i._)([(0,a.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,i._)([(0,a.MZ)()],p.prototype,"displayField",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,a.MZ)()],p.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"fieldInfoMap",null),(0,i._)([(0,a.MZ)()],p.prototype,"fields",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)()],p.prototype,"requiredFields",null),p=(0,i._)([(0,l.$)("esri.layers.support.TitleCreator")],p)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(90237),n=r(52106),o=r(66552),a=r(25482),l=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),p=r(40608),d=r(43937),h=r(16930),f=r(65864),y=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=h.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),a=n.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=i);const l=n.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(o)}return s}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(a[0]),s=r(a[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,f.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],_.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],_.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,s._)([(0,d.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,s._)([(0,d.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,s._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>f,XJ:()=>y,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>T});var i=r(799);const s="__begin__",n="__end__",o=new RegExp(s,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',p=c+" + ",d=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return T(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,(e=>s+'$feature["'+e+'"]'+n)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,p).replaceAll(a,d)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,b=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function T(e){if(!e)return null;let t=w.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=b.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(90237),s=r(93637),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new a.A;return s.read(i,r),[s]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,s.sM)(r,[n.toJSON()],t)}}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,n.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),p=r(29005);let d=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[p.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],d)},39516:(e,t,r)=>{let i;async function s(){return null==i&&(i=r.e(4123).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),i}async function n(e,t){const r=await s(),i=r.get(e,t);if(null==i)throw r.getError(e,t);return i}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>n,IW:()=>a,mA:()=>o})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var i=r(90237),s=r(66552),n=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&c||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>n});var i=r(34727),s=r(39516);function n(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const n=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],p(i));return t}(e);if(n&&((0,i.gg)(t,n[0])||(0,i.ZH)(r,n[1])))return"";const o=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const s=c(e.at(0)?.minScale),n=p(e.at(-1)?.maxScale);if((0,i.ZH)(s,t)||(0,i.gg)(n,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],s=e[t+1];if((0,i.ZH)(c(s.minScale),p(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,s.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)l(i.minScale,i.maxScale,t,r)&&(yield i)}}function l(e,t,r,s){return e=c(e),r=c(r),t=p(t),!(!(0,i.Sp)(r,e)&&(s??r)>e||(0,i.Hx)(t,r)||void 0!==s&&(0,i.Sp)(s,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(s,10),l=parseInt(n,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>d,lL:()=>g,xR:()=>f});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return y.create(e,t,null,["$feature","$view"])}function f(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let a;try{a=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce(((e,t)=>({...e,[t]:null})),{}),spatialReference:t,useAsync:!1},p=n.compileScript(a,c);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new y(e,n,a,p,t,h,d,o)}constructor(e,t,r,i,s,n,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(this._boundTarget.attributes[r.name]);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(this._boundTarget.attributes[r.name]);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(this._boundTarget.attributes[r.name]);case"date":case"esriFieldTypeDate":{const t=this._boundTarget.attributes[r.name];return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU)}default:return this._boundTarget.attributes[r.name]}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map((e=>e.name))}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},64714:(e,t,r)=>{r.d(t,{F0:()=>a,Vx:()=>c,e2:()=>d,f:()=>h});var i=r(44208),s=r(4718),n=r(99352),o=r(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${p(t)} = null;`;for(const t in e)r+=`this${p(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function p(e){return l.test(e)?`.${e}`:`["${e}"]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},72256:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var i=r(90237),s=r(49186),n=r(74887),o=r(84952),a=r(10107),l=r(44208),u=(r(53966),r(87811),r(36005)),c=r(40608),p=r(16930),d=r(13600),h=r(92474),f=r(29953),y=r(5443),m=r(22671);let g=class extends h.A{constructor(e){super(e),this.type="csv",this.refresh=(0,n.sg)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return t&&(this.sourceJSON.extent=t),r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return m.A.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:r.count,extent:y.A.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?e.toJSON():null,t)}async _startWorker(e){this._connection=await(0,f.ho)("CSVSourceWorker",{strategy:(0,l.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{url:t,delimiter:r,fields:i,latitudeField:s,longitudeField:n,spatialReference:o,timeInfo:a}=this.loadOptions,u=await this._connection.invoke("load",{url:t,customParameters:this.customParameters,parsingOptions:{delimiter:r,fields:i?.map((e=>e.toJSON())),latitudeField:s,longitudeField:n,spatialReference:o?.toJSON(),timeInfo:a?.toJSON()}},{signal:e});this.locationInfo=u.locationInfo,this.sourceJSON=u.layerDefinition,this.delimiter=u.delimiter}};(0,i._)([(0,a.MZ)()],g.prototype,"type",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"loadOptions",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"customParameters",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"locationInfo",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"sourceJSON",void 0),(0,i._)([(0,a.MZ)()],g.prototype,"delimiter",void 0),g=(0,i._)([(0,c.$)("esri.layers.graphics.sources.CSVSource")],g);var _=r(64714),v=r(61956),w=r(97159);function x(e,t){throw new s.A(t,`CSVLayer (title: ${e.title}, id: ${e.id}) cannot be saved to a portal item`)}let b=class extends d.default{constructor(...e){super(...e),this.geometryType="point",this.capabilities=(0,_.f)(!1,!1),this.delimiter=null,this.editingEnabled=!1,this.fields=null,this.latitudeField=null,this.locationType="coordinates",this.longitudeField=null,this.operationalLayerType="CSV",this.outFields=["*"],this.path=null,this.spatialReference=p.A.WGS84,this.source=null,this.type="csv"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["CSV"],supportsData:!1},e).catch(n.QP).then((async()=>this.initLayerProperties(await this.createGraphicsSource(t))));return this.addResolvingPromise(r),Promise.resolve(this)}get isTable(){return this.loaded&&null==this.geometryType}readWebMapLabelsVisible(e,t){return null!=t.showLabels?t.showLabels:!!t.layerDefinition?.drawingInfo?.labelingInfo}set url(e){if(!e)return void this._set("url",e);const t=(0,o.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async createGraphicsSource(e){const t=new g({loadOptions:{delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},customParameters:this.customParameters??void 0});return this._set("source",t),await t.load({signal:e}),this.read({locationInfo:t.locationInfo,columnDelimiter:t.delimiter},{origin:"service",url:this.parsedUrl}),t}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(v.A.from(e)||this.createQuery()))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(v.A.from(e)||this.createQuery())}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(v.A.from(e)||this.createQuery())))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(v.A.from(e)||this.createQuery())))}read(e,t){super.read(e,t),t&&"service"===t.origin&&this.revert(["latitudeField","longitudeField"],"service")}write(e,t){return super.write(e,{...t,writeLayerSchema:!0})}clone(){throw new s.A("csv-layer:clone",`CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`)}async save(e){return x(this,"csv-layer:save")}async saveAs(e,t){return x(this,"csv-layer:save-as")}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_verifyFields(){}_verifySource(){}_hasMemorySource(){return!1}};(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],b.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({type:[","," ",";","|","\t"],json:{read:{source:"columnDelimiter"},write:{target:"columnDelimiter",ignoreOrigin:!0}}})],b.prototype,"delimiter",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:Boolean,json:{origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"editingEnabled",void 0),(0,i._)([(0,a.MZ)({json:{read:{source:"layerDefinition.fields"},write:{target:"layerDefinition.fields"}}})],b.prototype,"fields",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!0})],b.prototype,"isTable",null),(0,i._)([(0,u.w)("web-map","labelsVisible",["layerDefinition.drawingInfo.labelingInfo","showLabels"])],b.prototype,"readWebMapLabelsVisible",null),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"locationInfo.latitudeFieldName"},write:{target:"locationInfo.latitudeFieldName",ignoreOrigin:!0}}})],b.prototype,"latitudeField",void 0),(0,i._)([(0,a.MZ)({type:["show","hide"]})],b.prototype,"listMode",void 0),(0,i._)([(0,a.MZ)({type:["coordinates"],json:{read:{source:"locationInfo.locationType"},write:{target:"locationInfo.locationType",ignoreOrigin:!0,isRequired:!0}}})],b.prototype,"locationType",void 0),(0,i._)([(0,a.MZ)({type:String,json:{read:{source:"locationInfo.longitudeFieldName"},write:{target:"locationInfo.longitudeFieldName",ignoreOrigin:!0}}})],b.prototype,"longitudeField",void 0),(0,i._)([(0,a.MZ)({type:["CSV"]})],b.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.MZ)()],b.prototype,"outFields",void 0),(0,i._)([(0,a.MZ)({type:String,json:{origins:{"web-scene":{read:!1,write:!1}},read:!1,write:!1}})],b.prototype,"path",void 0),(0,i._)([(0,a.MZ)({json:{read:!1},cast:null,type:g,readOnly:!0})],b.prototype,"source",void 0),(0,i._)([(0,a.MZ)({json:{read:!1},value:"csv",readOnly:!0})],b.prototype,"type",void 0),(0,i._)([(0,a.MZ)({json:{read:w.r,write:{isRequired:!0,ignoreOrigin:!0,writer:w.w}}})],b.prototype,"url",null),b=(0,i._)([(0,c.$)("esri.layers.CSVLayer")],b);const T=b},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const h=await(0,a.xR)(e.expression,null,p);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const f=!o||!o.greaterEqual(4,0);f&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,f);return new l(f,c,h,y)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map((e=>({...e,type:"esriFieldTypeString"})));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t?"":""+this._boundTarget.attributes[t.name]}}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,s=r(90237),n=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends o.A{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,s._)([(0,l.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},99352:(e,t,r)=>{r.d(t,{F:()=>i,P:()=>s});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},s={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);