@arcgis/core 4.34.0-next.52 → 4.34.0-next.53

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 (87) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{35fc8a64674005b1d1d7.js → 0a4357af5b8c0532b439.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{b87ed14fde381f79bc9f.js → 17776d9d3558d45ea7b5.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2efa4d8fe5454f8b2a05.js +1 -0
  5. package/assets/esri/core/workers/chunks/{a69e885336eb5d2729fd.js → 3505988ce3839cdbbc98.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{46ab551bd19e52e73649.js → 3800764932a1c32cb29f.js} +1 -1
  7. package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +1 -0
  8. package/assets/esri/core/workers/chunks/{77493aa2118d462612a0.js → 43bd338bb0de375b9bb7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{5a016dcd3192d42d363e.js → 5fc414fc2cfc68828c5b.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{ecd673eccf89643df07a.js → 659f7e99b2d524ef53fb.js} +2 -2
  11. package/assets/esri/core/workers/chunks/{037bc400257bc13b3ec8.js → 772e81e9162e2240a7a6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{f1de768b0a6d345f7e39.js → 8f6ff09e7d2f01b79faf.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{cfa8b17cf1349f6ed355.js → 9e9be7f6ea32957f1088.js} +1 -1
  14. package/assets/esri/core/workers/chunks/9fef330b241f958b55df.js +1 -0
  15. package/assets/esri/core/workers/chunks/aab349d4624b78ef429f.js +1 -0
  16. package/assets/esri/core/workers/chunks/b9f5672093727c6f92c9.js +1 -0
  17. package/assets/esri/core/workers/chunks/bcc233a86e01ff1eac16.js +1 -0
  18. package/assets/esri/core/workers/chunks/cac060a187f3a27a19ba.js +1 -0
  19. package/assets/esri/core/workers/chunks/cda27c0fafd687dfa72e.js +1 -0
  20. package/assets/esri/core/workers/chunks/{82a390be9500b629f6bc.js → d0bf1fc6e3c198bc565d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/dd2b5f115d156b5b212e.js +1 -0
  22. package/assets/esri/core/workers/chunks/e28d3ed65c3a76a044c8.js +1 -0
  23. package/assets/esri/core/workers/chunks/f75ddd79be506423be09.js +1 -0
  24. package/assets/esri/core/workers/chunks/{c5b2a261d8c216ca4a10.js → f8505bf69795f5293a79.js} +1 -1
  25. package/assets/esri/core/workers/chunks/fae6030a81cb91a91b69.js +1 -0
  26. package/assets/esri/core/workers/chunks/ff7962063d132c1ec814.js +1 -0
  27. package/assets/esri/themes/base/widgets/_FloorFilter.scss +23 -19
  28. package/assets/esri/themes/dark/main.css +1 -1
  29. package/assets/esri/themes/light/main.css +1 -1
  30. package/assets/esri/themes/light/view.css +1 -1
  31. package/config.js +1 -1
  32. package/interfaces.d.ts +2 -2
  33. package/kernel.js +1 -1
  34. package/layers/KMLLayer.js +1 -1
  35. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  36. package/layers/graphics/data/QueryEngine.js +1 -1
  37. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  38. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  39. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  40. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  41. package/layers/support/ElevationQuery.js +1 -1
  42. package/layers/support/ExportImageParameters.js +1 -1
  43. package/networks/UtilityNetwork.js +1 -1
  44. package/package.json +3 -3
  45. package/portal/Portal.js +1 -1
  46. package/renderers/support/rasterRendererHelper.js +1 -1
  47. package/renderers/support/utils.js +1 -1
  48. package/rest/featureService/FeatureService.js +1 -1
  49. package/rest/print.js +1 -1
  50. package/support/revision.js +1 -1
  51. package/views/3d/analysis/ElevationProfile/HoveredPointsVisualization.js +1 -1
  52. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  53. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  54. package/views/3d/terrain/TerrainSurface.js +1 -1
  55. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  56. package/views/draw/Draw.js +1 -1
  57. package/views/draw/support/Box.js +1 -1
  58. package/views/draw/support/GraphicMover.js +1 -1
  59. package/views/draw/support/Reshape.js +1 -1
  60. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  61. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  62. package/views/layers/support/popupUtils.js +1 -1
  63. package/views/support/PromiseQueue.js +5 -0
  64. package/views/support/Scheduler.js +1 -1
  65. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  66. package/widgets/FloorFilter/css.js +1 -1
  67. package/widgets/FloorFilter.js +1 -1
  68. package/widgets/HistogramRangeSlider.js +1 -1
  69. package/widgets/Sketch/SketchViewModel.js +1 -1
  70. package/widgets/support/ItemList.js +1 -1
  71. package/assets/esri/core/workers/chunks/0874b88d5ae7c2b78b3b.js +0 -1
  72. package/assets/esri/core/workers/chunks/0c129b78e5cfe96795e1.js +0 -1
  73. package/assets/esri/core/workers/chunks/1a3a4c2c642899be37a0.js +0 -1
  74. package/assets/esri/core/workers/chunks/37a97e690786814bf0b3.js +0 -1
  75. package/assets/esri/core/workers/chunks/48e64f99720907017778.js +0 -1
  76. package/assets/esri/core/workers/chunks/4d544e3e19ce07c2c195.js +0 -1
  77. package/assets/esri/core/workers/chunks/8c1bd9bcfc59497de3b5.js +0 -1
  78. package/assets/esri/core/workers/chunks/8cc700da2ac58849a708.js +0 -1
  79. package/assets/esri/core/workers/chunks/9b7fee0adffeee8d45ae.js +0 -1
  80. package/assets/esri/core/workers/chunks/9d30fed26e0d84ef893b.js +0 -1
  81. package/assets/esri/core/workers/chunks/b29f0b32787edb4e75cf.js +0 -1
  82. package/assets/esri/core/workers/chunks/c87bb42f825c39f9cce3.js +0 -1
  83. package/assets/esri/core/workers/chunks/f667096ea325f690c4a6.js +0 -1
  84. package/assets/esri/core/workers/chunks/f9f94b5efa9a64cdb407.js +0 -1
  85. package/layers/graphics/data/executeQueryForSnapping.js +0 -5
  86. package/layers/support/PromiseQueue.js +0 -5
  87. /package/assets/esri/core/workers/chunks/{ecd673eccf89643df07a.js.LICENSE.txt → 659f7e99b2d524ef53fb.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4980],{9093:(t,e,n)=>{function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>r,vt:()=>o,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:r,create:o,fromValues:function(t,e,n,o,r,i,s,c,u,a,h,d,l,f,m,p){return[t,e,n,o,r,i,s,c,u,a,h,d,l,f,m,p]}},Symbol.toStringTag,{value:"Module"}))},11964:(t,e,n)=>{n.d(e,{Cr:()=>h,H6:()=>f,LV:()=>a,_I:()=>l,kb:()=>d,vt:()=>u});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),c=n(32114);function u(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function a(t,e){const n=m.get();return n.origin=t,n.vector=e,n}function h(t,e,n=u()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function d(t,e){const n=(0,i.d)(c.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),u=(0,o.qE)(r/s,0,1),a=(0,i.d)(c.rq.get(),(0,i.g)(c.rq.get(),t.vector,u),n);return(0,i.e)(a,a)}function l(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,s){const{vector:u,origin:a}=t,h=(0,i.d)(c.rq.get(),e,a),d=(0,i.e)(u,h)/(0,i.k)(u);return(0,i.g)(s,u,(0,o.qE)(d,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)();const m=new r.I(()=>u())},27444:(t,e,n)=>{n.r(e),n.d(e,{default:()=>G});var o=n(31635),r=n(74887),i=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(38954),c=n(51850),u=n(11964),a=n(97937),h=n(93687),d=n(15142),l=n(82919),f=n(71351),m=n(620);class p{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),N[0]=null,B.prune(),H.prune()}add(t){const e=Array.from(t);this._grow(e);const n=g.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));g.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=g.acquire();for(const o of t){const t=e??(0,a.j)(this.objectToBoundingSphere(o),L);E(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}g.release(n),this._shrink()}update(t,e){if(!E(e[3])&&this._isDegenerate(t))return;const n=function(t){return N[0]=t,N}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,f.LV)(t,e);_(this._root,t=>{if(!function(t,e){return y((0,a.a)(e.bounds),2*-e.halfSize,D),y((0,a.a)(e.bounds),2*e.halfSize,k),(0,m.O_)(t.origin,t.direction,D,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,f.LV)(t,e);_(this._root,t=>{if(!function(t,e,n){return y((0,a.a)(e.bounds),2*-e.halfSize,D),y((0,a.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(D,k),(0,m.O_)(t.origin,t.direction,D,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),!0})}forEach(t){_(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,c=1/0,u=null;const h=O(t,e),d=s=>{if(--r,!o(s))return;const h=this.objectToBoundingSphere(s);if(!(0,l.m7)(n,h))return;const d=w(t,e,(0,a.a)(h)),f=d-h[3],m=d+h[3];f<i&&(i=f,c=m,u=s)};return b(this._root,o=>{if(r<=0||!(0,l.m7)(n,o.bounds))return!1;if((0,s.g)(P,h,o.halfSize),(0,s.f)(P,P,(0,a.a)(o.bounds)),w(t,e,P)>c)return!1;const i=o.node;return i.terminals.forAll(t=>d(t)),null!==i.residents&&i.residents.forAll(t=>d(t)),!0},t,e),u}forEachInDepthRange(t,e,n,o,r,i,c){let u=-1/0,h=1/0;const d={setRange:t=>{1===n?(u=Math.max(u,t.near),h=Math.min(h,t.far)):(u=Math.max(u,-t.far),h=Math.min(h,-t.near))}};d.setRange(o);const f=w(e,n,t),m=O(e,n),p=O(e,-n),g=t=>{if(!c(t))return;const o=this.objectToBoundingSphere(t),s=(0,a.a)(o),m=w(e,n,s)-f,p=m-o[3],g=m+o[3];p>h||g<u||!(0,l.m7)(i,o)||r(t,d)};b(this._root,t=>{if(!(0,l.m7)(i,t.bounds))return!1;if((0,s.g)(P,m,t.halfSize),(0,s.f)(P,P,(0,a.a)(t.bounds)),w(e,n,P)-f>h)return!1;if((0,s.g)(P,p,t.halfSize),(0,s.f)(P,P,(0,a.a)(t.bounds)),w(e,n,P)-f<u)return!1;const o=t.node;return o.terminals.forAll(t=>g(t)),null!==o.residents&&o.residents.forAll(t=>g(t)),!0},e,n)}forEachNode(t){_(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=(0,a.g)(e),o=(0,a.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,a.g)(r),c=n+i;return!((0,s.s)((0,a.a)(r),o)-c*c<=0)||t(e)};let i=!0;const c=t=>{i&&(i=r(t))};_(this._root,t=>{const e=(0,a.g)(t.bounds),r=n+e;if((0,s.s)((0,a.a)(t.bounds),o)-r*r>0)return!1;const u=t.node;return u.terminals.forAll(c),i&&null!==u.residents&&u.residents.forAll(c),i}),i&&this.forEachDegenerateObject(c)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,a.p)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,a.p)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=g.acquire().init(t);this._add(e.at(n),o),g.release(o)}}_grow(t){if(M(t,t=>this.objectToBoundingSphere(t),R),E(R[3])&&!this._fitsInsideTree(R))if(j(this._root.node))(0,a.j)(R,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(R);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(R,t):this._growRootAsSubNode(t),g.release(t)}}_rebuildTree(t,e){(0,a.q)(I,e.bounds),I[3]=e.halfSize,M([t,I],t=>t,V);const n=g.acquire().init(this._root);this._root.initFrom(null,V,V[3]),this._root.increaseHalfSize(1.25),_(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),g.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return _(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),c=n[t]+e-(r[t]+i),u=Math.max(0,Math.ceil(s/(2*i))),a=Math.max(0,Math.ceil(c/(2*i)))+1,h=2**Math.ceil(Math.log(u+a)*Math.LOG2E);o=Math.max(o,h),F[t].min=u,F[t].max=a}for(let t=0;t<3;t++){let e=F[t].min,n=F[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=r[t]-i-e*i*2;q[t]=c+(n+e)*i}const s=o*i;return q[3]=s*z,g.acquire().initFrom(null,q,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,a.q)(R,this._root.bounds),R[3]=this._root.halfSize,this._root.init(t),t.advanceTo(R,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!E(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),o=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new p(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class g{constructor(){this.bounds=(0,a.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:g.createEmptyNode(),e&&(0,a.j)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=g.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=T[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e?.(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new d.A({shrink:!0}),residents:new d.A({shrink:!0})}}static{this._pool=new h.A(g)}static acquire(){return g._pool.acquire()}static release(t){g._pool.release(t)}static clearPool(){g._pool.prune()}}function _(t,e){let n=g.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(g.acquire().init(n).advance(t));g.release(n)}}function b(t,e,n,o=1){let r=g.acquire().init(t);const i=[r];for(function(t,e,n){if(!H.length)for(let t=0;t<8;++t)H.push({index:0,distance:0});for(let n=0;n<8;++n){const o=T[n];H.data[n].index=n,H.data[n].distance=w(t,e,o)}H.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=H.data[t].index}(n,o,U);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=U[t];r.node.children[e]&&i.push(g.acquire().init(r).advance(e))}g.release(r)}}function v(t,e,n){B.clear();const o=n.advanceTo(e,(t,e)=>{B.push(t.node),B.push(e)})?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=B.length-2;t>=0&&S(B.data[t],B.data[t+1]);t-=2);}function S(t,e){return e>=0&&(t.children[e]=null),!!j(t)&&(null===t.residents&&(t.residents=new d.A({shrink:!0})),!0)}function j(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function A(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function x(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function y(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function M(t,e,n){D[0]=1/0,D[1]=1/0,D[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);E(t[3])&&(A(D,t),x(k,t))}(0,a.k)(n,(0,s.m)(J,D,k,.5)),n[3]=Math.max(k[0]-D[0],k[1]-D[1],k[2]-D[2])/2}function O(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,C[r]);i<o&&(o=i,n=C[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function E(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const T=[(0,c.fA)(-1,-1,-1),(0,c.fA)(1,-1,-1),(0,c.fA)(-1,1,-1),(0,c.fA)(1,1,-1),(0,c.fA)(-1,-1,1),(0,c.fA)(1,-1,1),(0,c.fA)(-1,1,1),(0,c.fA)(1,1,1)],C=[(0,c.fA)(-1,-1,-1),(0,c.fA)(-1,-1,1),(0,c.fA)(-1,1,-1),(0,c.fA)(-1,1,1),(0,c.fA)(1,-1,-1),(0,c.fA)(1,-1,1),(0,c.fA)(1,1,-1),(0,c.fA)(1,1,1)],z=Math.sqrt(3),N=[null],q=(0,a.c)(),P=(0,c.vt)(),D=(0,c.vt)(),k=(0,c.vt)(),B=new d.A,L=(0,a.c)(),R=(0,a.c)(),I=(0,a.c)(),V=(0,a.c)(),F=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],H=new d.A,U=[0,0,0,0,0,0,0,0],J=(0,c.vt)();var W=n(431);function Q(t,e,n){const o=K;(0,s.g)(o,t,.5),(0,s.b)(o,o,e,.5);const r=(0,s.j)(o,t);return(0,s.f)(o,o,n),(0,a.r)(o,r)}const K=(0,c.vt)();let $=class{constructor(){this._idToComponent=new Map,this._components=new p(t=>t.bounds),this._edges=new p(t=>t.bounds),this._tmpLineSegment=(0,u.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,r.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor(e=>(this._addCandidates(t,e,n),n.length<1e3),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0},t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new Y(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=W.HY.createView(t.locations),o=new Array(n.count),r=(0,c.vt)(),i=(0,c.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const c=Q(r,i,t.origin),u=new Z(e,s,c);o[s]=u}this._edges.add(o);const{objectIds:s,origin:u}=t;e.info={locations:n,objectIds:s,origin:u}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,c=o.locations,u=c.position0.getVec(e.index,this._tmpP1),a=c.position1.getVec(e.index,this._tmpP2);(0,s.f)(u,u,r),(0,s.f)(a,a,r);const h=i[c.componentIndex.get(e.index)];this._addEdgeCandidate(t,h,u,a,n),X(t,h,u,n),X(t,h,a,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,a.a)(t.bounds),h=(0,u.Cr)(n,o,this._tmpLineSegment),d=(0,u._I)(h,i,this._tmpP3);(0,a.A)(t.bounds,d)&&r.push({type:"edge",objectId:e,target:(0,c.o8)(d),distance:(0,s.j)(i,d),start:(0,c.o8)(n),end:(0,c.o8)(o)})}};$=(0,o.Cg)([(0,i.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],$);const G=$;function X(t,e,n,o){if(!t.returnVertex||!(0,a.A)(t.bounds,n))return;const r=(0,a.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,c.o8)(n),distance:(0,s.j)(r,n)})}class Y{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++Y.uid}static{this.uid=0}}class Z{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},27921:(t,e,n)=>{n.d(e,{$Q:()=>w,C:()=>a,Cr:()=>f,LV:()=>u,O_:()=>l,Qj:()=>h,T7:()=>y,Tj:()=>O,Ui:()=>x,_I:()=>E,fA:()=>d,gv:()=>M,lU:()=>m,mN:()=>T,mP:()=>j,mR:()=>A,vE:()=>z,vt:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function c(t=N){return[t[0],t[1],t[2],t[3]]}function u(t=N[0],e=N[1],n=N[2],o=N[3]){return d(t,e,n,o,s.Km.get())}function a(t,e){return d(e[0],e[1],e[2],e[3],t)}function h(t){return t}function d(t,e,n,o,r=c()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function l(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function f(t,e,n,o=c()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],u=t[0]-e[0],a=t[1]-e[1],h=t[2]-e[2],d=i*h-s*a,l=s*u-r*h,f=r*a-i*u,m=d*d+l*l+f*f,p=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return o[0]=d*p,o[1]=l*p,o[2]=f*p,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function m(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(g,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(g,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(b,c),c++,(0,r.d)(v,g,_),(0,r.n)(v,v),(0,r.d)(S,_,b),(0,r.n)(S,S),u=!(0,r.q)(g,b)&&!(0,r.q)(_,b)&&Math.abs((0,r.e)(v,S))<p;return u?(f(g,_,b,t),!0):(0!==o||1!==i||2!==s)&&m(t,e,n,0,1,2)}n(32728);const p=.99619469809,g=(0,i.vt)(),_=(0,i.vt)(),b=(0,i.vt)(),v=(0,i.vt)(),S=(0,i.vt)();function j(t,e,n){return e!==t&&a(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(b,e,t),l(n,b,o)}function x(t,e,n){return null!=e&&C(z(t,e.origin,e.direction,q,n))}function y(t,e,n){return C(z(t,e.origin,e.vector,0,n))}function M(t,e,n){return C(z(t,e.origin,e.vector,1,n))}function O(t,e){return T(t,e)>=0}function w(t,e){const n=(0,r.e)(t,e.ray.direction),o=-T(t,e.ray.origin);if(o<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return o>0;if((o<0||n<0)&&!(o<0&&n<0))return!0;const i=o/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function E(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function T(t,e){return(0,r.e)(t,e)+t[3]}function C(t){return 0===t||1===t}function z(t,e,n,i,s){const c=(0,r.e)(t,n),u=T(t,e);if(0===c)return u>=0?2:3;let a=-u/c;return 1&i&&(a=(0,o.qE)(a,0,1)),!(4&i)&&a<0||!(8&i)&&a>1?u>=0?2:3:((0,r.f)(s,e,(0,r.g)(s,n,a)),u>=0?0:1)}const N=[0,0,1,0],q=8},31635:(t,e,n)=>{function o(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function r(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var o,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=e[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=e[Symbol.dispose],n&&(r=o)}if("function"!=typeof o)throw new TypeError("Object not disposable.");r&&(o=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:o,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>o,hk:()=>s,mS:()=>r}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var o=new Error(n);return o.name="SuppressedError",o.error=t,o.suppressed=e,o};function s(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,o=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===o)return o=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return o|=2,Promise.resolve(i).then(r,function(t){return e(t),r()})}else o|=1}catch(t){e(t)}if(1===o)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},32728:(t,e,n)=>{n.d(e,{nu:()=>s,wp:()=>i}),n(34727);var o=n(38954),r=n(51850);function i(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),r=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,o.i)(t,n,r,i),t}function s(t,e,n,i=(0,r.vt)()){const s=(0,o.l)(t),a=(0,o.l)(e),h=(0,o.e)(t,e)/(s*a);if(h<.9999999999999999){const r=Math.acos(h),d=((1-n)*s+n*a)/Math.sin(r),l=d/s*Math.sin((1-n)*r),f=d/a*Math.sin(n*r);return(0,o.g)(c,t,l),(0,o.g)(u,e,f),(0,o.f)(i,c,u)}return(0,o.m)(i,t,e,n)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const c=(0,r.vt)(),u=(0,r.vt)()},82919:(t,e,n)=>{n.d(e,{DV:()=>_,C:()=>p,vt:()=>f,Qy:()=>m,ui:()=>g,ST:()=>S,bU:()=>j,pw:()=>v,m7:()=>b,c8:()=>x});var o=n(4341),r=n(58083),i=n(38954),s=n(51850),c=n(87317),u=n(91829),a=n(71351);function h(t){return t?{ray:(0,a.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,a.vt)(),c0:0,c1:Number.MAX_VALUE}}new o.I(()=>h());var d=n(27921),l=n(32114);function f(t){return t?[(0,d.vt)(t[0]),(0,d.vt)(t[1]),(0,d.vt)(t[2]),(0,d.vt)(t[3]),(0,d.vt)(t[4]),(0,d.vt)(t[5])]:[(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)()]}function m(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function p(t,e){for(let n=0;n<y;n++)(0,d.C)(t[n],e[n]);return t}function g(t,e,n,o=E){const s=(0,r.lw)(l.Rc.get(),e,t);(0,r.B8)(s,s);for(let t=0;t<M;++t){const e=(0,c.t)(l.Km.get(),O[t],s);(0,i.i)(o[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}_(n,o)}function _(t,e){(0,d.Cr)(e[4],e[0],e[3],t[0]),(0,d.Cr)(e[1],e[5],e[6],t[1]),(0,d.Cr)(e[4],e[5],e[1],t[2]),(0,d.Cr)(e[3],e[2],e[6],t[3]),(0,d.Cr)(e[0],e[1],e[2],t[4]),(0,d.Cr)(e[5],e[4],e[7],t[5])}function b(t,e){for(let n=0;n<y;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}function v(t,e){return A(t,function(t,e=h()){return(0,a.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,w.get()))}function S(t,e,n){return A(t,function(t,e,n=h()){const o=(0,i.l)(t.vector);return(0,a.fA)(t.origin,e,n.ray),n.c0=0,n.c1=o,n}(e,n,w.get()))}function j(t,e){for(let n=0;n<y;n++)if((0,d.mN)(t[n],e)>0)return!1;return!0}function A(t,e){for(let n=0;n<y;n++)if(!(0,d.$Q)(t[n],e))return!1;return!0}const x={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},y=6,M=8,O=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],w=new o.I(h),E=m()},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3492],{63492:(e,t,n)=>{n.d(t,{ElevationQuery:()=>q});var i=n(60999),s=n(49186),l=n(97768),a=n(74887),o=n(83047),r=n(48526),c=n(86738),u=n(82799),h=n(98988),f=n(19419),p=(n(44208),n(36563)),m=n(53966),d=n(28735);const y=()=>m.A.getLogger("esri.layers.support.ElevationSampler");class x{queryElevation(e){return function(e,t){const n=T(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":!function(e,t,n){e.z=n.elevationAt(t.x,t.y)}(e,n,t);break;case"polyline":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const l=e.paths[s],a=t.paths[s];for(let e=0;e<l.length;e++){const t=l[e],s=a[e];g.x=s[0],g.y=s[1],i&&(t[3]=t[2]),t[2]=n.elevationAt(g.x,g.y)}}e.hasZ=!0}(e,n,t);break;case"multipoint":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const l=e.points[s],a=t.points[s];g.x=a[0],g.y=a[1],i&&(l[3]=l[2]),l[2]=n.elevationAt(g.x,g.y)}e.hasZ=!0}(e,n,t)}return e}(e.clone(),this)}on(){return(0,p.hA)()}projectIfRequired(e,t){return T(e,t)}}class v extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){super(),this.tile=e,this.noDataValue=n;const i=e.tile.extent;this.extent=(0,f.w1)(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const s=(0,o.GA)(t.spatialReference),l=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:l,max:l}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,f.Rj)(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,i=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${i})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class w extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let i;super(),"number"==typeof t?(this.noDataValue=t,i=null):(i=t,this.noDataValue=n),this.samplers=i?e.map(e=>new v(e,i,this.noDataValue)):e;const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:e,max:t}=s.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<this.samplers.length;e++){const t=this.samplers[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else this.extent=(0,f.w1)((0,f.vt)(),i.spatialReference),this.demResolution={min:0,max:0}}elevationAt(e,t){let n,i=!1;for(const s of this.samplers)if(s.containsAt(e,t)&&(i=!0,n=s.elevationAt(e,t),n!==s.noDataValue))return n;return null!=n?n:(i||y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function T(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const i=(0,d.Cv)(e,t);return i||y().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}const g=new c.A;class R{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class A{constructor(e,t=null){if(this.tile=e,null!=t&&null!=e){const n=e.extent;this._samplerData=new R(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:i,dx:s,dy:l,y1:a,x0:o}=this._samplerData,{width:r,values:c,noDataValue:u}=i,h=_(l*(a-t),0,n),f=_(s*(e-o),0,n),p=Math.floor(h),m=Math.floor(f),d=p*r+m,y=d+r,x=c[d],v=c[y],w=c[d+1],T=c[y+1];if(x!==u&&v!==u&&w!==u&&T!==u){const e=f-m,t=x+(w-x)*e;return t+(v+(T-v)*e-t)*(h-p)}}}function _(e,t,n){return e<t?t:e>n?n:e}var E=n(72802);class q{async queryAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const i=D.fromGeometry(t);let l=!1;n?.returnSampleInfo||(l=!0);const a={...b,...n,returnSampleInfo:!0},o=await this.query(e[e.length-1],i,a),r=await this._queryAllContinue(e,o,a);return r.geometry=r.geometry.export(),l&&delete r.sampleInfo,r}async query(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof D)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new s.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...b,...n},a=new z(e,t.spatialReference,i),r=i.signal;return await e.load({signal:r}),await async function(e,t,n){let i;const l=e.layer.tileInfo.spatialReference;if(t instanceof D?i=await t.project(l,n):(await(0,h.initializeProjection)([{source:t.spatialReference,dest:l}],{signal:n}),i=(0,h.project)(t,l)),!i)throw new s.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${l.wkid}'`);e.geometry=D.fromGeometry(i)}(a,t,r),await this._selectTiles(a,r),await F(a,r),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let i=e.options.noDataValue;if(n){const e=n.sample(t.x,t.y);null!=e?i=e:t.elevationTile=null}t.z=i})}(a),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,l.Lw)(n);const i={geometry:n.export(),noDataValue:e.options.noDataValue};return e.options.returnSampleInfo&&(i.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,o.GA)(t.spatialReference);return e.geometry.coordinates.map(i=>{let s=-1;return i.elevationTile&&i.elevationTile!==e.outsideExtentTile&&(s=t.lodAt(i.elevationTile.tile.level).resolution*n),{demResolution:s}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),i}(a,r)}async createSampler(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n};return this._createSampler(e,t,i)}async createSamplerAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n,returnSampleInfo:!0},l=await this._createSampler(e[e.length-1],t,i);return this._createSamplerAllContinue(e,t,l,i)}async _createSampler(e,t,n,i){const s=n.signal;await e.load({signal:s});const l=t.spatialReference,a=e.tileInfo.spatialReference;l.equals(a)||(await(0,h.initializeProjection)([{source:l,dest:a}],{signal:s}),t=(0,h.project)(t,a));const o=new M(e,t,n,i);return await this._selectTiles(o,s),await F(o,s),new w(o.elevationTiles,o.layer.tileInfo,o.options.noDataValue)}async _createSamplerAllContinue(e,t,n,i){if(e.pop(),!e.length)return n;const s=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,f.VY)(e.extent)),l=await this._createSampler(e[e.length-1],t,i,s);if(0===l.samplers.length)return n;const a=n.samplers.concat(l.samplers),o=new w(a,i.noDataValue);return this._createSamplerAllContinue(e,t,o,i)}async _queryAllContinue(e,t,n){const i=e.pop(),s=t.geometry.coordinates,a=t.sampleInfo;(0,l.Lw)(a);const o=[],r=[];for(let t=0;t<s.length;t++){const n=a[t];n.demResolution>=0?n.source||(n.source=i):e.length&&(o.push(s[t]),r.push(t))}if(!e.length||0===o.length)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,n),h=u.sampleInfo;if(!h)throw new Error("no sampleInfo");return r.forEach((e,t)=>{s[e].z=u.geometry.coordinates[t].z,a[e].demResolution=h[t].demResolution}),this._queryAllContinue(e,t,n)}async _selectTiles(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new A(null);t.sample=()=>e.options.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const i=e.x,s=e.y;(i<n.xmin||i>n.xmax||s<n.ymin||s>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.options.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=t/(0,o.GA)(n.spatialReference),l=k(n,i);let a=l[0],r=0;for(let e=1;e<l.length;e++){const t=l[e];Math.abs(t.resolution-s)<Math.abs(a.resolution-s)&&(a=t,r=e)}return r}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(e,t);else{if("auto"!==n)throw new s.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}async _selectTilesFinestContiguous(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=V(n,i,e.options.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const l=i.tilemapCache,o=e.getTilesToFetch();try{if(l&&!$(l))await(0,a.qr)(Promise.all(o.map(e=>l.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await F(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(i){(0,a.QP)(i),await this._selectTilesFinestContiguousAt(e,t-1,n)}}async _selectTilesAuto(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,i=V(t,n,e.options.minDemResolution);e.selectTilesAtLOD(i,e.options.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const i={},s=e=>{null!=e.id&&(e.id in i?i[e.id]++:(i[e.id]=1,n++))},l=e=>{if(null==e.id)return;const t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(s,l);let a=!0;for(;a&&(a=!1,e.forEachTileToFetch(i=>{n<=e.options.maximumAutoTileRequests||(l(i),t.upsampleTile(i)&&(a=!0),s(i))},l),a););}(e);const n=e.layer.tilemapCache;if(!n||$(n))return this._selectTilesAutoPrefetchUpsample(e,t);const s=e.getTilesToFetch(),l={},o=s.map(async e=>{const s=new E.U(null,0,0,0,(0,f.vt)()),o=await(0,i.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,s,{signal:t}));!1!==o.ok?null!=e.id&&(l[e.id]=s):(0,a.QP)(o.error)});await(0,a.qr)(Promise.all(o),t),e.remapTiles(l)}async _selectTilesAutoPrefetchUpsample(e,t){const n=e.layer.tileInfo;await F(e,t);let i=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?i=!0:t()}),i&&await this._selectTilesAutoPrefetchUpsample(e,t)}}class D{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new D;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,h.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new r.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,h.project)(n,e);if(!i)return null;const s=this.coordinates.map((e,t)=>{const n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),l=this.clone(s);return l.spatialReference=e,l}static fromGeometry(e){const t=new D;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof D)t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const i=e.clone(t);return i.spatialReference=n,i};else switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?[new C(n.x,n.y,n.z,n.m)]:i?[new C(n.x,n.y,n.z)]:s?[new C(n.x,n.y,null,n.m)]:[new C(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new c.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new c.A(t[0].x,t[0].y,t[0].z,n);break}case"multipoint":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?n.points.map(e=>new C(e[0],e[1],e[2],e[3])):i?n.points.map(e=>new C(e[0],e[1],e[2])):s?n.points.map(e=>new C(e[0],e[1],null,e[2])):n.points.map(e=>new C(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new r.A({points:t.map(e=>[e.x,e.y,e.z,e.m]),hasZ:!0,hasM:!0,spatialReference:n}):new r.A(t.map(e=>[e.x,e.y,e.z]),n);break}case"polyline":{const n=e,i=[],s=[],{hasZ:l,hasM:a}=e;let o=0;for(const e of n.paths)if(s.push([o,o+e.length]),o+=e.length,l&&a)for(const t of e)i.push(new C(t[0],t[1],t[2],t[3]));else if(l)for(const t of e)i.push(new C(t[0],t[1],t[2]));else if(a)for(const t of e)i.push(new C(t[0],t[1],null,t[2]));else for(const t of e)i.push(new C(t[0],t[1]));t.coordinates=i,t._exporter=(t,n)=>{const i=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),l=s.map(e=>i.slice(e[0],e[1]));return new u.A({paths:l,hasM:e.hasM,hasZ:!0,spatialReference:n})};break}}return t}}class C{constructor(e,t,n=null,i=null,s=null,l=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=s,this.elevationTile=l}clone(){return new C(this.x,this.y,this.z,this.m)}}class I{constructor(e,t){this.layer=e,this.options=t}}class z extends I{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(i,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){const e={},t=[];for(const n of this.geometry.coordinates){const i=n.tile;if(!i)continue;const s=n.tile?.id;n.elevationTile||!s||e[s]||(e[s]=i,t.push(i))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>{t.tile=null})}}class M extends I{constructor(e,t,n,i){super(e,n),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent),this.maskExtents=i}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n);if(!e)return i.length-1;const s=this.extent;if(null==s)return-1;for(let n=i.length-1;n>=0;n--){const l=i[n],a=l.resolution*t.size[0],o=l.resolution*t.size[1];if(Math.ceil(s.width/a)*Math.ceil(s.height/o)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=S(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void(t&&t(n));let i=!1;e(n,()=>i=!0),i?t&&t(n):this._candidateTiles.push(n)}),this._candidateTiles=S(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:i}=this.layer,s=k(n,i)[e],l=n.tileAt(s.level,t.xmin,t.ymin),a=l.extent;if(null==a)return;const o=s.resolution*n.size[0],r=s.resolution*n.size[1],c=Math.ceil((t.xmax-a[0])/o),u=Math.ceil((t.ymax-a[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const i=new E.U(null,l.level,l.row-e,l.col+t);n.updateTileInfo(i),this._tileIsMasked(i)||this._candidateTiles.push(i)}}_tileIsMasked(e){return!!this.maskExtents&&this.maskExtents.some(t=>e.extent&&(0,f.gR)(t,e.extent))}}function V(e,t,n=0){const i=k(e,t);let s=i.length-1;if(n>0){const t=n/(0,o.GA)(e.spatialReference),l=i.findIndex(e=>e.resolution<t);0===l?s=0:l>0&&(s=l-1)}return s}const b={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0};function k(e,t){const n=e.lods;if($(t)){const{effectiveMinLOD:e,effectiveMaxLOD:i}=t;return n.filter(t=>t.level>=e&&t.level<=i)}return n}async function F(e,t){const n=e.getTilesToFetch(),i={},s=e.options.cache,l=e.options.noDataValue,o=n.map(async n=>{if(null==n.id)return;const a=`${e.layer.uid}:${n.id}:${l}`,o=null!=s?s.get(a):null,r=null!=o?o:await e.layer.fetchTile(n.level,n.row,n.col,{noDataValue:l,signal:t});null!=s&&s.put(a,r),i[n.id]=new A(n,r)});await(0,a.qr)(Promise.allSettled(o),t),e.populateElevationTiles(i)}function S(e,t){const n={},i=[];for(const s of e){const e=s.id;e&&!n[e]?(n[e]=s,i.push(s)):t&&t(s)}const s=i.sort((e,t)=>e.level-t.level);return s.filter((e,n)=>{for(let i=0;i<n;i++){const n=s[i].extent;if(n&&e.extent&&(0,f.gR)(n,e.extent))return t&&t(e),!1}return!0})}function $(e){return null!=e?.tileInfo}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3492],{63492:(e,t,n)=>{n.d(t,{ElevationQuery:()=>q});var i=n(60999),s=n(49186),l=n(97768),a=n(74887),o=n(83047),r=n(48526),c=n(86738),u=n(82799),h=n(98988),f=n(19419),p=(n(44208),n(36563)),m=n(53966),d=n(28735);const y=()=>m.A.getLogger("esri.layers.support.ElevationSampler");class x{queryElevation(e){return function(e,t){const n=T(e,t.spatialReference);if(!n)return null;switch(e.type){case"point":!function(e,t,n){e.z=n.elevationAt(t.x,t.y)}(e,n,t);break;case"polyline":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.paths.length;s++){const l=e.paths[s],a=t.paths[s];for(let e=0;e<l.length;e++){const t=l[e],s=a[e];g.x=s[0],g.y=s[1],i&&(t[3]=t[2]),t[2]=n.elevationAt(g.x,g.y)}}e.hasZ=!0}(e,n,t);break;case"multipoint":!function(e,t,n){g.spatialReference=t.spatialReference;const i=e.hasM&&!e.hasZ;for(let s=0;s<e.points.length;s++){const l=e.points[s],a=t.points[s];g.x=a[0],g.y=a[1],i&&(l[3]=l[2]),l[2]=n.elevationAt(g.x,g.y)}e.hasZ=!0}(e,n,t)}return e}(e.clone(),this)}on(){return(0,p.hA)()}projectIfRequired(e,t){return T(e,t)}}class v extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){super(),this.tile=e,this.noDataValue=n;const i=e.tile.extent;this.extent=(0,f.w1)(i,t.spatialReference),this.extent.zmin=e.zmin,this.extent.zmax=e.zmax,this._aaExtent=i;const s=(0,o.GA)(t.spatialReference),l=t.lodAt(e.tile.level).resolution*s;this.demResolution={min:l,max:l}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,f.Rj)(this._aaExtent,e,t)}elevationAt(e,t){if(!this.containsAt(e,t)){const n=this.extent,i=`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`;return y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler extent (${i})`),this.noDataValue}return this.tile.sample(e,t)??this.noDataValue}}class w extends x{get spatialReference(){return this.extent.spatialReference}constructor(e,t,n){let i;super(),"number"==typeof t?(this.noDataValue=t,i=null):(i=t,this.noDataValue=n),this.samplers=i?e.map(e=>new v(e,i,this.noDataValue)):e;const s=this.samplers[0];if(s){this.extent=s.extent.clone();const{min:e,max:t}=s.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<this.samplers.length;e++){const t=this.samplers[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else this.extent=(0,f.w1)((0,f.vt)(),i.spatialReference),this.demResolution={min:0,max:0}}elevationAt(e,t){let n,i=!1;for(const s of this.samplers)if(s.containsAt(e,t)&&(i=!0,n=s.elevationAt(e,t),n!==s.noDataValue))return n;return null!=n?n:(i||y().warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}}function T(e,t){if(null==e)return null;const n=e.spatialReference;if(n.equals(t))return e;const i=(0,d.Cv)(e,t);return i||y().error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),i}const g=new c.A;class R{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class A{constructor(e,t=null){if(this.tile=e,null!=t&&null!=e){const n=e.extent;this._samplerData=new R(t,n)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:n,data:i,dx:s,dy:l,y1:a,x0:o}=this._samplerData,{width:r,values:c,noDataValue:u}=i,h=_(l*(a-t),0,n),f=_(s*(e-o),0,n),p=Math.floor(h),m=Math.floor(f),d=p*r+m,y=d+r,x=c[d],v=c[y],w=c[d+1],T=c[y+1];if(x!==u&&v!==u&&w!==u&&T!==u){const e=f-m,t=x+(w-x)*e;return t+(v+(T-v)*e-t)*(h-p)}}}function _(e,t,n){return e<t?t:e>n?n:e}var E=n(72802);class q{async queryAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const i=D.fromGeometry(t);let l=!1;n?.returnSampleInfo||(l=!0);const a={...b,...n,returnSampleInfo:!0},o=await this.query(e[e.length-1],i,a),r=await this._queryAllContinue(e,o,a);return r.geometry=r.geometry.export(),l&&delete r.sampleInfo,r}async query(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof D)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new s.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const i={...b,...n},a=new z(e,t.spatialReference,i),r=i.signal;return await e.load({signal:r}),await async function(e,t,n){let i;const l=e.layer.tileInfo.spatialReference;if(t instanceof D?i=await t.project(l,n):(await(0,h.initializeProjection)([{source:t.spatialReference,dest:l}],{signal:n}),i=(0,h.project)(t,l)),!i)throw new s.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${l.wkid}'`);e.geometry=D.fromGeometry(i)}(a,t,r),await this._selectTiles(a,r),await F(a,r),function(e){e.geometry.coordinates.forEach(t=>{const n=t.elevationTile;let i=e.options.noDataValue;if(n){const e=n.sample(t.x,t.y);null!=e?i=e:t.elevationTile=null}t.z=i})}(a),async function(e,t){const n=await e.geometry.project(e.outSpatialReference,t);(0,l.Lw)(n);const i={geometry:n.export(),noDataValue:e.options.noDataValue};return e.options.returnSampleInfo&&(i.sampleInfo=function(e){const t=e.layer.tileInfo,n=(0,o.GA)(t.spatialReference);return e.geometry.coordinates.map(i=>{let s=-1;return i.elevationTile&&i.elevationTile!==e.outsideExtentTile&&(s=t.lodAt(i.elevationTile.tile.level).resolution*n),{demResolution:s}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),i}(a,r)}async createSampler(e,t,n){if(!e)throw new s.A("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n};return this._createSampler(e,t,i)}async createSamplerAll(e,t,n){if(!(e=n?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new s.A("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new s.A("elevation-query:invalid-extent","Invalid or undefined extent");const i={...b,...n,returnSampleInfo:!0},l=await this._createSampler(e[e.length-1],t,i);return this._createSamplerAllContinue(e,t,l,i)}async _createSampler(e,t,n,i){const s=n.signal;await e.load({signal:s});const l=t.spatialReference,a=e.tileInfo.spatialReference;l.equals(a)||(await(0,h.initializeProjection)([{source:l,dest:a}],{signal:s}),t=(0,h.project)(t,a));const o=new M(e,t,n,i);return await this._selectTiles(o,s),await F(o,s),new w(o.elevationTiles,o.layer.tileInfo,o.options.noDataValue)}async _createSamplerAllContinue(e,t,n,i){if(e.pop(),!e.length)return n;const s=n.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,f.VY)(e.extent)),l=await this._createSampler(e[e.length-1],t,i,s);if(0===l.samplers.length)return n;const a=n.samplers.concat(l.samplers),o=new w(a,i.noDataValue);return this._createSamplerAllContinue(e,t,o,i)}async _queryAllContinue(e,t,n){const i=e.pop(),s=t.geometry.coordinates,a=t.sampleInfo;(0,l.Lw)(a);const o=[],r=[];for(let t=0;t<s.length;t++){const n=a[t];n.demResolution>=0?n.source||(n.source=i):e.length&&(o.push(s[t]),r.push(t))}if(!e.length||0===o.length)return t;const c=t.geometry.clone(o),u=await this.query(e[e.length-1],c,n),h=u.sampleInfo;if(!h)throw new Error("no sampleInfo");return r.forEach((e,t)=>{s[e].z=u.geometry.coordinates[t].z,a[e].demResolution=h[t].demResolution}),this._queryAllContinue(e,t,n)}async _selectTiles(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new A(null);t.sample=()=>e.options.noDataValue,e.outsideExtentTile=t;const n=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const i=e.x,s=e.y;(i<n.xmin||i>n.xmax||s<n.ymin||s>n.ymax)&&(e.elevationTile=t)})}(e);const n=e.options.demResolution;if("number"==typeof n)!function(e,t){const n=function(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=t/(0,o.GA)(n.spatialReference),l=k(n,i);let a=l[0],r=0;for(let e=1;e<l.length;e++){const t=l[e];Math.abs(t.resolution-s)<Math.abs(a.resolution-s)&&(a=t,r=e)}return r}(e,t);e.selectTilesAtLOD(n)}(e,n);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(e,t);else{if("auto"!==n)throw new s.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(e,t)}}async _selectTilesFinestContiguous(e,t){const{tileInfo:n,tilemapCache:i}=e.layer,s=V(n,i,e.options.minDemResolution);await this._selectTilesFinestContiguousAt(e,s,t)}async _selectTilesFinestContiguousAt(e,t,n){const i=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const l=i.tilemapCache,o=e.getTilesToFetch();try{if(l&&!$(l))await(0,a.qr)(Promise.all(o.map(e=>l.fetchAvailability(e.level,e.row,e.col,{signal:n}))),n);else if(await F(e,n),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(i){(0,a.QP)(i),await this._selectTilesFinestContiguousAt(e,t-1,n)}}async _selectTilesAuto(e,t){(function(e){const{tileInfo:t,tilemapCache:n}=e.layer,i=V(t,n,e.options.minDemResolution);e.selectTilesAtLOD(i,e.options.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let n=0;const i={},s=e=>{null!=e.id&&(e.id in i?i[e.id]++:(i[e.id]=1,n++))},l=e=>{if(null==e.id)return;const t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(s,l);let a=!0;for(;a&&(a=!1,e.forEachTileToFetch(i=>{n<=e.options.maximumAutoTileRequests||(l(i),t.upsampleTile(i)&&(a=!0),s(i))},l),a););}(e);const n=e.layer.tilemapCache;if(!n||$(n))return this._selectTilesAutoPrefetchUpsample(e,t);const s=e.getTilesToFetch(),l={},o=s.map(async e=>{const s=new E.U(null,0,0,0,(0,f.vt)()),o=await(0,i.Ke)(n.fetchAvailabilityUpsample(e.level,e.row,e.col,s,{signal:t}));!1!==o.ok?null!=e.id&&(l[e.id]=s):(0,a.QP)(o.error)});await(0,a.qr)(Promise.all(o),t),e.remapTiles(l)}async _selectTilesAutoPrefetchUpsample(e,t){const n=e.layer.tileInfo;await F(e,t);let i=!1;e.forEachTileToFetch((e,t)=>{n.upsampleTile(e)?i=!0:t()}),i&&await this._selectTilesAutoPrefetchUpsample(e,t)}}class D{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new D;return t.geometry=this.geometry,t.spatialReference=this.spatialReference,t.coordinates=e||this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,h.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const n=new r.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,h.project)(n,e);if(!i)return null;const s=this.coordinates.map((e,t)=>{const n=e.clone(),s=i.points[t];return n.x=s[0],n.y=s[1],n}),l=this.clone(s);return l.spatialReference=e,l}static fromGeometry(e){const t=new D;if(t.geometry=e,t.spatialReference=e.spatialReference,e instanceof D)t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,n)=>{const i=e.clone(t);return i.spatialReference=n,i};else switch(e.type){case"point":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?[new C(n.x,n.y,n.z,n.m)]:i?[new C(n.x,n.y,n.z)]:s?[new C(n.x,n.y,null,n.m)]:[new C(n.x,n.y)],t._exporter=(t,n)=>e.hasM?new c.A(t[0].x,t[0].y,t[0].z,t[0].m,n):new c.A(t[0].x,t[0].y,t[0].z,n);break}case"multipoint":{const n=e,{hasZ:i,hasM:s}=n;t.coordinates=i&&s?n.points.map(e=>new C(e[0],e[1],e[2],e[3])):i?n.points.map(e=>new C(e[0],e[1],e[2])):s?n.points.map(e=>new C(e[0],e[1],null,e[2])):n.points.map(e=>new C(e[0],e[1])),t._exporter=(t,n)=>e.hasM?new r.A({points:t.map(e=>[e.x,e.y,e.z,e.m]),hasZ:!0,hasM:!0,spatialReference:n}):new r.A(t.map(e=>[e.x,e.y,e.z]),n);break}case"polyline":{const n=e,i=[],s=[],{hasZ:l,hasM:a}=e;let o=0;for(const e of n.paths)if(s.push([o,o+e.length]),o+=e.length,l&&a)for(const t of e)i.push(new C(t[0],t[1],t[2],t[3]));else if(l)for(const t of e)i.push(new C(t[0],t[1],t[2]));else if(a)for(const t of e)i.push(new C(t[0],t[1],null,t[2]));else for(const t of e)i.push(new C(t[0],t[1]));t.coordinates=i,t._exporter=(t,n)=>{const i=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),l=s.map(e=>i.slice(e[0],e[1]));return new u.A({paths:l,hasM:e.hasM,hasZ:!0,spatialReference:n})};break}}return t}}class C{constructor(e,t,n=null,i=null,s=null,l=null){this.x=e,this.y=t,this.z=n,this.m=i,this.tile=s,this.elevationTile=l}clone(){return new C(this.x,this.y,this.z,this.m)}}class I{constructor(e,t){this.layer=e,this.options=t}}class z extends I{constructor(e,t,n){super(e,n),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(i,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const n=t.tile?.id;t.tile=n?e[n]:null}}getTilesToFetch(){const e={},t=[];for(const n of this.geometry.coordinates){const i=n.tile;if(!i)continue;const s=n.tile?.id;n.elevationTile||!s||e[s]||(e[s]=i,t.push(i))}return t}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>{t.tile=null})}}class M extends I{constructor(e,t,n,i){super(e,n),this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent),this.maskExtents=i}selectTilesAtLOD(e,t){const n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:n}=this.layer,i=k(t,n);if(!e)return i.length-1;const s=this.extent;if(null==s)return-1;for(let n=i.length-1;n>=0;n--){const l=i[n],a=l.resolution*t.size[0],o=l.resolution*t.size[1];if(Math.ceil(s.width/a)*Math.ceil(s.height/o)<=e)return n}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const n=t.id&&e[t.id];n&&(this._fetchedCandidates.add(t),this.elevationTiles.push(n))}}remapTiles(e){this._candidateTiles=S(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const n=this._candidateTiles;this._candidateTiles=[],n.forEach(n=>{if(this._fetchedCandidates.has(n))return void t?.(n);let i=!1;e(n,()=>i=!0),i?t?.(n):this._candidateTiles.push(n)}),this._candidateTiles=S(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:n,tilemapCache:i}=this.layer,s=k(n,i)[e],l=n.tileAt(s.level,t.xmin,t.ymin),a=l.extent;if(null==a)return;const o=s.resolution*n.size[0],r=s.resolution*n.size[1],c=Math.ceil((t.xmax-a[0])/o),u=Math.ceil((t.ymax-a[1])/r);for(let e=0;e<u;e++)for(let t=0;t<c;t++){const i=new E.U(null,l.level,l.row-e,l.col+t);n.updateTileInfo(i),this._tileIsMasked(i)||this._candidateTiles.push(i)}}_tileIsMasked(e){return!!this.maskExtents&&this.maskExtents.some(t=>e.extent&&(0,f.gR)(t,e.extent))}}function V(e,t,n=0){const i=k(e,t);let s=i.length-1;if(n>0){const t=n/(0,o.GA)(e.spatialReference),l=i.findIndex(e=>e.resolution<t);0===l?s=0:l>0&&(s=l-1)}return s}const b={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0};function k(e,t){const n=e.lods;if($(t)){const{effectiveMinLOD:e,effectiveMaxLOD:i}=t;return n.filter(t=>t.level>=e&&t.level<=i)}return n}async function F(e,t){const n=e.getTilesToFetch(),i={},s=e.options.cache,l=e.options.noDataValue,o=n.map(async n=>{if(null==n.id)return;const a=`${e.layer.uid}:${n.id}:${l}`,o=null!=s?s.get(a):null,r=null!=o?o:await e.layer.fetchTile(n.level,n.row,n.col,{noDataValue:l,signal:t});null!=s&&s.put(a,r),i[n.id]=new A(n,r)});await(0,a.qr)(Promise.allSettled(o),t),e.populateElevationTiles(i)}function S(e,t){const n={},i=[];for(const s of e){const e=s.id;e&&!n[e]?(n[e]=s,i.push(s)):t?.(s)}const s=i.sort((e,t)=>e.level-t.level);return s.filter((e,n)=>{for(let i=0;i<n;i++){const n=s[i].extent;if(n&&e.extent&&(0,f.gR)(n,e.extent))return t?.(e),!1}return!0})}function $(e){return null!=e?.tileInfo}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7656],{7656:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var i=r(31635),s=r(78888),a=r(49186),o=r(81583),n=r(92071),l=r(74887),d=r(83047),u=r(10107),p=r(56507),y=(r(44208),r(87811),r(36005)),m=r(40608),c=r(43937),h=r(35666),f=r(5443),g=r(83960),v=r(21325),b=r(4146),I=r(52136),w=r(98534),x=r(18768),S=r(63074),C=r(69208),T=r(16131),M=r(8303),O=r(54310),Z=r(25036),E=r(91921),N=r(82935),L=r(10873),F=r(65008),P=r(39516);function j(e,t){return"floorInfo"in t&&t.floorInfo?.floorField?function(e,t){if(!e?.length)return null;const r=e.filter(e=>""!==e).map(e=>`'${e}'`);return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}(e,t.floorInfo.floorField):null}r(53966);var U=r(63389);const A={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"};let D=class extends F.A{constructor(e){super(e),this.floors=null,this.scale=0}destroy(){this.layer=null}get dynamicLayers(){if(!this.hasDynamicLayers)return null;const e=this.visibleSublayers.map(e=>{const t=j(this.floors,e);return e.toExportImageJSON(t)});return e.length?JSON.stringify(e):null}get hasDynamicLayers(){return this.layer&&(0,U.Sk)(this.visibleSublayers,this.layer.serviceSublayers,this.layer.gdbVersion)}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.allSublayers.on("change",()=>this.notifyChange("visibleSublayers")),e.on("sublayer-update",e=>this.notifyChange(A[e.propertyName]))],"layer"))}get layers(){const e=this.visibleSublayers;return e?e.length?"show:"+e.map(e=>e.id).join(","):"show:-1":null}get layerDefs(){const e=!!this.floors?.length,t=this.visibleSublayers.filter(t=>null!=t.definitionExpression||e&&null!=t.floorInfo);return t.length?JSON.stringify(t.reduce((e,t)=>{const r=j(this.floors,t),i=(0,P.mA)(r,t.definitionExpression);return null!=i&&(e[t.id]=i),e},{})):null}get version(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers");const e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}get visibleSublayers(){const e=[];if(!this.layer)return e;const t=this.layer.sublayers,r=this.scale,i=t=>{t.visible&&(0===r||(0,g.zx)(r,t.minScale,t.maxScale))&&(t.sublayers?t.sublayers.forEach(i):e.unshift(t))};t?.forEach(i);const s=this._get("visibleSublayers");return!s||s.length!==e.length||s.some((t,r)=>e[r]!==t)?e:s}toJSON(){const e=this.layer;let t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t={...t,layers:this.layers,layerDefs:this.layerDefs},t}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"dynamicLayers",null),(0,i.Cg)([(0,u.MZ)()],D.prototype,"floors",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"hasDynamicLayers",null),(0,i.Cg)([(0,u.MZ)()],D.prototype,"layer",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"layers",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"layerDefs",null),(0,i.Cg)([(0,u.MZ)({type:Number})],D.prototype,"scale",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"version",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"visibleSublayers",null),D=(0,i.Cg)([(0,m.$)("esri.layers.support.ExportImageParameters")],D);var _=r(33446),J=r(15775),k=r(91908),R=r(88625),V=r(64272),$=r(56400);let q=class extends((0,S.dM)((0,N.e)((0,Z.j)((0,E.I)((0,w.V)((0,x.b)((0,T.q)((0,M.A)((0,n.P)((0,O.J)((0,I.p)((0,C.d)(b.A))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new D({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.elevationInfo=new R.A({mode:"on-the-ground"}),this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:a}=await r.e(390).then(r.bind(r,10390));switch(e){case 0:return s(this,t);case 1:return a(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(l.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("PNG32")?"png32":"png24"}get loaded(){return super.loaded}set portalItem(e){super.portalItem=e}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).toArray();let a=!1;const o=(0,h.aB)(i.origin);let n;if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(3===o){const e=this.createSublayersForOrigin("service").sublayers;a=(0,U.Zx)(s,e,2)}else if(o>3){const e=this.createSublayersForOrigin("portal-item");a=(0,U.Zx)(s,e.sublayers,(0,h.aB)(e.origin)),n=e.originWithPartialOverrides}const l=[],d={writeSublayerStructure:a,...i,minimumWritableOrigin:n};let u=a||this.hasVisibleLayersForOrigin(o);s.forEach(e=>{const t=e.write({},d);l.push(t),u=u||"user"===e.originOf("visible")}),l.some(e=>Object.keys(e).length>1)&&(t.layers=l),u&&(t.visibleLayers=s.filter(e=>e.visible).map(e=>e.id))}createExportImageParameters(e,t,r,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=i?.floors??null,this._exportImageParameters.scale=i?.scale||(0,g.X_)({extent:e,width:t})*s;const a=this._exportImageParameters.toJSON(),o=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},n=e?.spatialReference,l=(0,v.YX)(n);if(i?.scale&&e){const r=e.width/t*((0,d.GA)(e?.spatialReference)*d.dy);a.dpi=i.scale/r}a.dpi*=s;const u={};if(i?.timeExtent){const{start:e,end:t}=i.timeExtent.toJSON();u.time=e&&t&&e===t?""+e:`${e??"null"},${t??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(u.time="null,null");return{bbox:e?e.xmin+","+e.ymin+","+e.xmax+","+e.ymax:void 0,bboxSR:l,imageSR:l,size:t+","+r,...a,...o,...u}}async fetchImage(e,t,r,i){const{data:s}=await this._fetchImage("image",e,t,r,i);return s}async fetchImageBitmap(e,t,r,i){const{data:s,url:a}=await this._fetchImage("blob",e,t,r,i);return(0,_.m)(s,a,i?.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:r}=await(0,s.A)(this.url,t),{extent:i,fullExtent:a,timeExtent:o}=r,n=i||a;return{fullExtent:n&&f.A.fromJSON(n),timeExtent:o&&V.T.fromJSON({start:o[0],end:o[1]})}}loadAll(){return(0,o.g)(this,e=>{e(this.allSublayers),e(this.subtables)})}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,k.D)(this,e)}async _fetchImage(e,t,r,i,o){const n={responseType:e,signal:o?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,r,i,o),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},d=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new a.A("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await(0,s.A)(d,n);return{data:e,url:d}}catch(e){if((0,l.zf)(e))throw e;throw new a.A("mapimagelayer:image-fetch-error",`Unable to load image: ${d}`,{error:e})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:r}=await(0,s.A)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});r&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};(0,i.Cg)([(0,u.MZ)((0,$.P6)("dateFieldsTimeReference"))],q.prototype,"dateFieldsTimeZone",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean})],q.prototype,"datesInUnknownTimezone",void 0),(0,i.Cg)([(0,u.MZ)()],q.prototype,"dpi",void 0),(0,i.Cg)([(0,u.MZ)()],q.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,u.MZ)()],q.prototype,"gdbVersion",void 0),(0,i.Cg)([(0,u.MZ)()],q.prototype,"imageFormat",void 0),(0,i.Cg)([(0,y.w)("imageFormat",["supportedImageFormatTypes"])],q.prototype,"readImageFormat",null),(0,i.Cg)([(0,u.MZ)({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],q.prototype,"imageMaxHeight",void 0),(0,i.Cg)([(0,u.MZ)({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],q.prototype,"imageMaxWidth",void 0),(0,i.Cg)([(0,u.MZ)()],q.prototype,"imageTransparency",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],q.prototype,"isReference",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],q.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,u.MZ)({type:["ArcGISMapServiceLayer"]})],q.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],q.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)((0,$.P6)("preferredTimeReference"))],q.prototype,"preferredTimeZone",void 0),(0,i.Cg)([(0,u.MZ)()],q.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,u.MZ)({json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,i.Cg)([(0,c.K)("sublayers",{layers:{type:[J.A]},visibleLayers:{type:[p.jz]}})],q.prototype,"writeSublayers",null),(0,i.Cg)([(0,u.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],q.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1},readOnly:!0,value:"map-image"})],q.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)(L.OZ)],q.prototype,"url",void 0),q=(0,i.Cg)([(0,m.$)("esri.layers.MapImageLayer")],q);const B=q},26253:(e,t,r)=>{r.d(t,{T:()=>p});var i=r(31635),s=r(69540),a=r(25482),o=r(88930),n=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends((0,s.O)(a.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i.Cg)([(0,d.$)("esri.time.TimeInterval")],p)},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(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:()=>c});var i=r(31635),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),n=r(89317),l=r(30524),d=r(96184),u=r(73133),p=r(64272),y=r(26253);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:n.K}}},c=e=>{const t=e;let r=class extends t{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 i=r.timeOffset,s=u.j.fromJSON(r.timeOffsetUnits);return i&&s?new y.T({value:i,unit:s}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:p.T,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:y.T})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,a.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:d.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(m)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},83960:(e,t,r)=>{r.d(t,{X_:()=>o,oW:()=>l,zx:()=>n});var i=r(34727),s=r(83047);const a=96;function o(e,t){const r=t||e.extent,i=e.width,o=(0,s.GA)(r?.spatialReference);return r&&i?r.width/i*o*s.dy*a:0}function n(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}function l(e,t){return(0,i.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},91908:(e,t,r)=>{r.d(t,{D:()=>a});var i=r(60694);const s=[];function a(e,t){if((0,i.Wo)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},96184:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),s=r(69540),a=r(25482),o=r(10107),n=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),d=r(43937),u=r(64272),p=r(26253),y=r(56400);function m(e,t){return p.T.fromJSON({value:e,unit:t})}let c=class extends((0,s.O)(a.o)){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?u.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,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],c.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:u.T,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,n.w)("fullTimeExtent",["timeExtent"])],c.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,d.K)("fullTimeExtent")],c.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"interval",void 0),(0,i.Cg)([(0,n.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],c.prototype,"readInterval",null),(0,i.Cg)([(0,d.K)("interval")],c.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,y.P6)("timeReference",!0))],c.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],c.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],c.prototype,"stops",void 0),c=(0,i.Cg)([(0,l.$)("esri.layers.support.TimeInfo")],c)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,8106],{4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>o,l5:()=>a,xm:()=>s});var r=i(34275),n=i(9093);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 a(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},6797:(e,t,i)=>{i.d(t,{Mj:()=>d,Ui:()=>g,w2:()=>m});var r=i(65008),n=i(7762),o=i(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof r.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=l(e),n=l(t);if(0===r.length&&0===n.length)return;if(!r.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=n.filter(e=>!r.includes(e)),d=r.filter(e=>!n.includes(e)),m=r.filter(i=>n.includes(i)&&u(e,i)!==u(t,i)).concat(o,d).sort(),g=c(e);if(g&&s.has(g)&&m.length)return{type:"complete",oldValue:e,newValue:t};let y;const h=a(e)&&a(t);for(const r of m){const n=u(e,r),o=u(t,r);let s;if((h||"function"!=typeof n&&"function"!=typeof o)&&n!==o&&(null!=n||null!=o)){if(i&&i[r]&&"function"==typeof i[r])s=i[r]?.(n,o);else if(n instanceof Date&&o instanceof Date){if(n.getTime()===o.getTime())continue;s={type:"complete",oldValue:n,newValue:o}}else s="object"==typeof n&&"object"==typeof o&&c(n)===c(o)?p(n,o):{type:"complete",oldValue:n,newValue:o};null!=s&&(null!=y?y.diff[r]=s:y={type:"partial",diff:{[r]:s}})}}return y}function d(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}(e,t)}function m(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function g(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(31635),n=i(92602),o=i(70333),s=i(78888),a=i(60999),l=i(49186),u=i(53966),c=i(97768),p=i(74887),d=i(84952),m=i(10107),g=(i(44208),i(87811),i(36005)),y=i(40608),h=i(43937),f=i(77548),M=i(20655),w=i(80812),I=i(41318),A=i(10407);const b=e=>{const t=e;let b=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!o.id?.findCredential(this.url),n=e===i.id;if(n&&i.portal.user)return this._getUserPrivileges(i,r);let s,a;if(n)s=i.portal.url;else try{s=await(0,f.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,d.b8)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(n?await i.reload():(i=new w.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,A.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=o.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=M.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(r))return n.user;const l=`${r}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?I.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||M.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,m.MZ)({type:w.default})],b.prototype,"portalItem",null),(0,r.Cg)([(0,g.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,r.Cg)([(0,h.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,r.Cg)([(0,m.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,r.Cg)([(0,y.$)("esri.layers.mixins.PortalLayer")],b),b},C={credential:null,user:null}},9093:(e,t,i)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>n,vt:()=>r,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:r,fromValues:function(e,t,i,r,n,o,s,a,l,u,c,p,d,m,g,y){return[e,t,i,r,n,o,s,a,l,u,c,p,d,m,g,y]}},Symbol.toStringTag,{value:"Module"}))},12711:(e,t,i)=>{i.d(t,{$P:()=>B,I8:()=>A,Mm:()=>v,PD:()=>b,ci:()=>j,fp:()=>C,m7:()=>S,w6:()=>T});var r=i(68197),n=(i(83047),i(20437)),o=i(76353),s=(i(86162),i(67730),i(80498)),a=(i(46981),i(36280)),l=i(93618),u=i(18031),c=i(30943),p=(i(88542),i(67369)),d=i(88178),m=i(94833),g=(i(2024),i(48940)),y=(i(72500),i(9760),i(84892),i(1626)),h=i(94985);const f=.25,M=y.A.fromJSON({type:"multipart",colorRamps:[{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]}),w=y.A.fromJSON(p.vj[0]),I=new Set(["scientific","standard-time","vector-uv","vector-magdir","vector-u","vector-v","vector-magnitude","vector-direction"]);function A(e){return e.presetRenderers?.find(({method:t,value:i})=>"raster-function-template"===t?i===e.rasterFunctionName:"variable"===t&&i===e.variableName)}function b(e,t){const{attributeTable:i,colormap:n}=e;if((0,d.rd)(e)){const t=function(e){if(!(0,d.rd)(e))return null;let t;if(null!=e.statistics&&e.statistics.length&&("vector-magdir"===e.dataType||"vector-uv"===e.dataType)){const{minMagnitude:i,maxMagnitude:r}=function(e,t){let i,r;if("vector-magdir"===e)i=t[0].min,r=t[0].max;else{const e=t[0].min,n=t[0].max,o=t[1].min,s=t[1].max;i=0,r=Math.max(Math.abs(e),Math.abs(o),Math.abs(n),Math.abs(s))}return{minMagnitude:i,maxMagnitude:r}}(e.dataType,e.statistics);t=[new g.A({field:"Magnitude",minSize:10,maxSize:40,minDataValue:i,maxDataValue:r})]}const i=null!=e.multidimensionalInfo?k.get(e.multidimensionalInfo.variables[0].unit):void 0,r=new u.A({visualVariables:t,inputUnit:i,rotationType:"geographic"});return r.visualVariables=[...r.sizeVariables,...r.rotationVariables],r}(e);if(null!=t)return t}if(t?.rasterFunctionColorRamp){const i=D(e,t);return i.colorRamp=t.rasterFunctionColorRamp,i}if(null!=n){const t=function(e){if(!(0,d.FA)(e))return null;let t;const{attributeTable:i,colormap:r}=e;if(null!=i){const e=Z(i,"value"),r=L(i,null,!0);"string"===r.type&&(t={},i.features.forEach(i=>{const n=i.attributes;t[n[e.name]]=r?n[r.name]:n[e.name]}))}return s.A.createFromColormap(r,t)}(e);if(null!=t)return t}if(null!=i){const t=function(e,t){if(!(0,d.hu)(e,t))return null;const{attributeTable:i,statistics:n}=e,o=L(i,t),s=Z(i,"red"),a=Z(i,"green"),u=Z(i,"blue"),g=new c.A,y=[],f=new Set,M=!!(s&&a&&u);if(null!=i)i.features.forEach(e=>{const t=e.attributes[o.name];if(!f.has(e.attributes[o.name])&&null!=t){f.add(t);const n=M&&("single"===s.type||"double"===s.type)&&("single"===a.type||"double"===a.type)&&("single"===u.type||"double"===u.type)&&!i.features.some(e=>e.attributes[s.name]>1||e.attributes[a.name]>1||e.attributes[u.name]>1),l=n?255:1;y.push(new m.A({value:e.attributes[o.name],label:e.attributes[o.name]+"",symbol:new h.A({style:"solid",outline:null,color:new r.A(M?[e.attributes[s.name]*l,e.attributes[a.name]*l,e.attributes[u.name]*l,1]:[0,0,0,0])})}))}});else if(n?.[0])for(let e=n[0].min;e<=n[0].max;e++)y.push(new m.A({value:e,label:e.toString(),symbol:new h.A({style:"solid",outline:null,color:new r.A([0,0,0,0])})}));if(y.sort((e,t)=>e.value&&"string"==typeof e.value.valueOf()?0:e.value>t.value?1:-1),!M){const e=(0,p.R8)(w,{numColors:y.length});y.forEach((t,i)=>t.symbol.color=new r.A(e[i].slice(1,4))),g.colorRamp=w}return new l.A({field:o.name,uniqueValueInfos:y,authoringInfo:g})}(e);if(null!=t)return t}return D(e,t)}function C(e,t=!1){const i=["raster-stretch"];return(0,d.FA)(e,t)&&i.push("raster-colormap"),(0,d.hu)(e)&&i.push("unique-value"),(0,d.xX)(e,t)&&i.push("class-breaks"),(0,d.iL)(e)&&i.push("raster-shaded-relief"),(0,d.rd)(e)&&i.push("vector-field"),(0,d.QJ)(e)&&i.push("flow"),i}function v(e){return(0,o.q)(e)&&"Colormap"===e.rasterFunction.functionName?e.rasterFunction.colorRamp:void 0}function T(e,t,i){const r=i?.toLowerCase().replace("bicubic","cubic"),n=["nearest","bilinear","cubic","majority"].find(e=>e===r);return"Map"===t?n??"bilinear":"standard-time"===e.dataType?n??"nearest":"thematic"===e.dataType||e.attributeTable||e.colormap?"nearest"===n||"majority"===n?n:"nearest":n??"bilinear"}function D(e,t){e=S(e,t?.variableName);const{bandCount:i}=e;let{bandIds:r,stretchType:n}=t||{};r?.some(e=>e>=i)&&(r=null);let o=e.statistics,s=e.histograms;i>1?(r=r?.length?r:j(e),o=null==o?null:r?.map(e=>o[e]),s=null==s?null:r?.map(e=>s[e])):r=[0],null==n&&(n=function(e){let t="percent-clip";const{pixelType:i,dataType:r,histograms:n,statistics:o,multidimensionalInfo:s}=e,a=I.has(r)||"generic"===r&&null!=s;return"u8"!==i||"processed"!==r&&null!=n&&null!=o?"u8"===i||"elevation"===r||a?t="min-max":null!=n?t="percent-clip":null!=o&&(t="min-max"):t="none",t}(e)),t?.includeStatisticsInStretch&&("percent-clip"===n||"histogram-equalization"===n)&&e.statistics?.length&&(n="min-max");let l=!1;switch(n){case"none":l=!1;break;case"percent-clip":l=!s?.length;break;default:l=!o?.length}const{dataType:u}=e,c=1===r?.length&&I.has(u)?M:null,p=new a.A({stretchType:n,dynamicRangeAdjustment:l,colorRamp:c,outputMin:0,outputMax:255,gamma:1===r?.length?[1]:[1,1,1],useGamma:!1});return"percent-clip"===n?p.maxPercent=p.minPercent=f:"standard-deviation"===n&&(p.numberOfStandardDeviations=2),l||null==e.multidimensionalInfo&&!t?.includeStatisticsInStretch||("percent-clip"===n?p.histograms=s:"min-max"!==n&&"standard-deviation"!==n||(p.customStatistics=o?.map(e=>({...e})))),p}function S(e,t){const{multidimensionalInfo:i}=e;if(!t||!i)return e;const r=i.variables.find(e=>e.name===t);if(!r)return e;if(e=e.clone(),r){const{statistics:t,histograms:i}=r;t?.length&&(e.statistics=t.map(e=>({min:e.min,max:e.max,avg:e.avg,stddev:e.stddev}))),i?.length&&(e.histograms=i)}return e}function j(e){const t=e.bandCount;if(1===t)return null;if(2===t)return[0];const{bandInfos:i}=e;let r;if(i.length===t){const{red:e,green:t,blue:n,nir:o}=function(e){const t={};for(let i=0;i<e.length;i++){const r=e[i].name.toLowerCase();"red"===r?t.red=i:"green"===r?t.green=i:"blue"===r?t.blue=i:"nearinfrared"!==r&&"nearinfrared_1"!==r&&"nir"!==r||(t.nir=i)}if(null==t.blue||null==t.green||null==t.red||null==t.nir){const i=N(e);if(t.blue??=x(i,480),t.green??=x(i,550),t.red??=x(i,660),null==t.nir){const r=N(e,800);t.nir=x(r,810)??x(i,810)}}return t}(i);null!=e&&null!=t&&null!=n?r=[e,t,n]:null!=o&&null!=e&&null!=t&&(r=[o,e,t])}return!r&&t>=3&&(r=[0,1,2]),r}function x(e,t,i=60){let r,n=i;for(const i of e){const e=Math.abs(i.wavelength-t);e<=n&&(n=e,r=i.index)}return r}function N(e,t){return e.map(({name:e,minWavelength:i,maxWavelength:r},n)=>/thermal/i.test(e)||/pan/i.test(e)||null!=t&&null!=r&&r<t?null:{wavelength:null!=i&&null!=r?(i+r)/2:i??r??0,index:n}).filter(e=>null!=e)}function L(e,t,i){let r;return null!=e?(r=t?e.fields.find(e=>t.toLowerCase()===e.name.toLowerCase()):function(e){let t;for(let i=0;i<e.length;i++){const r=e[i].name.toLowerCase();if("string"===e[i].type){if(r.startsWith("class")){t=e[i];break}null==t&&(r.endsWith("name")||r.endsWith("type"))&&(t=e[i])}}return t}(e.fields),r||(i||(r=e.fields.find(e=>"string"===e.type)),r||(r=Z(e,"value")))):r=new n.A({name:"value"}),r}function Z(e,t){return null==e?null:e.fields.find(e=>e.name.toLowerCase()===t)}const k=new Map([["m/s","meter-per-second"],["km/h","kilometer-per-hour"],["knots","knots"],["ft/s","feet-per-second"],["mph","mile-per-hour"]]);function R(e){return{color:e.symbolLayers[0].material?.color,type:"esriSFS",style:"esriSFSSolid"}}function B(e){if("uniqueValue"===e.type){const t=e.uniqueValueInfos,i=t?.[0].symbol;return i?.symbolLayers?.length&&(e.uniqueValueInfos=t?.map(e=>({value:e.value,label:e.label,symbol:e.symbol?R(e.symbol):null}))),e}if("classBreaks"===e.type){const t=e.classBreakInfos,i=t[0].symbol;return i?.symbolLayers?.length&&(e.classBreakInfos=t.map(e=>({classMinValue:e.classMinValue,classMaxValue:e.classMaxValue,label:e.label,symbol:e.symbol?R(e.symbol):null}))),e}return e}},17136:(e,t,i)=>{i.d(t,{O7:()=>C,el:()=>b});var r=i(92602),n=i(49186),o=i(53966),s=i(39829),a=i(82799),l=i(80754),u=i(21325),c=i(28735),p=i(78888),d=i(65864),m=i(2272),g=i(84952),y=i(92300);const h=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function f(e){return"polygon"===e[0].type}function M(e){return"polyline"===e[0].type}function w(e,t,i){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new n.A("internal:geometry",e)}const i=(0,l.r8)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const n=e[r][0],o=e[r][1],s=e[r+1][0],a=e[r+1][1],l=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),u=(a-o)/l,c=(s-n)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,s=c*r+n,a=u*r+o;i.push([s,a])}const e=(l+Math.floor(p-1)*t)/2,r=c*e+n,s=u*e+o;i.push([r,s])}i.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function I(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,l.kd)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,l.kd)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,l.kd)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,l.kd)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function A(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const n=t.cutIndexes[r],o=t.geometries[r],s=(0,l.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=o.getPoint(e,i);o.setPoint(e,i,t.clone().offset(r,0))}return!0}})}if(n===i){if(f(e))for(const t of(0,l.r8)(o))e[n]=e[n].addRing(t);else if(M(e))for(const t of(0,l.r8)(o))e[n]=e[n].addPath(t)}else i=n,e[n]=o}return e}async function b(e,t,i){if(!Array.isArray(e))return b([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let o,f,M,C,v,T,D,S,j=0;const x=[],N=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,f=(0,u.Vp)(o),M=o.isWebMercator,T=M?102100:4326,C=l.j7[T].maxX,v=l.j7[T].minX,D=l.j7[T].plus180Line,S=l.j7[T].minus180Line),f)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(I(t.clone(),C,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>I(e,C,v)),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);N.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,v)*(2*C);let r=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(D)&&o!==C?(j=o>j?o:j,r=w(r,M),x.push(r),N.push("cut")):e.intersects(S)&&n!==v?(j=o*(2*C)>j?o*(2*C):j,r=w(r,M,360),x.push(r),N.push("cut")):N.push(r)}else N.push(t.clone());else N.push(t);else N.push(t);let L=(0,l.kd)(j,C),Z=-90;const k=L,R=new a.A;for(;L>0;){const e=360*L-180;R.addPath([[e,Z],[e,-1*Z]]),Z*=-1,L--}if(x.length>0&&k>0){const t=A(x,await async function(e,t,i,r){const n=(0,m.Dl)(e),o=t[0].spatialReference,s={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(o),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,p.A)(n.path+"/cut",s),{cutIndexes:l,geometries:c=[]}=a.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,d.rS)(e);return t.spatialReference=o,t})}}(n,x,R,i)),r=[],o=[];for(let i=0;i<N.length;i++){const n=N[i];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[i];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(r.push(n),o.push("simplify")):o.push(M?(0,c.Gh)(n):n)}}if(!r.length)return o;const s=await async function(e,t,i){const r="string"==typeof e?(0,g.An)(e):e,n=t[0].spatialReference,o=(0,d.$B)(t[0]),s={...i,query:{...r.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,p.A)(r.path+"/simplify",s);return(0,y.V)(a.geometries,o,n)}(n,r,i),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(M?(0,c.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)B.push(t);else{const e=x.shift();B.push(!0===M?(0,c.Gh)(e):e)}}return B}function C(e,t,i){const r=(0,u.Vp)(i);if(null==r)return e;const[n,o]=r.valid,s=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<n&&(l=-Math.ceil(Math.abs(e-n)/s));let c=e+(a-l)*s;const p=c-t;return p>o?c-=s:p<n&&(c+=s),c}},18031:(e,t,i)=>{i.d(t,{A:()=>N});var r,n=i(31635),o=i(68197),s=i(52106),a=i(66552),l=i(25482),u=i(4718),c=i(10107),p=(i(44208),i(53966),i(93223)),d=i(36005),m=i(40608),g=i(86738),y=i(17136),h=i(14636),f=i(86162),M=i(63988),w=i(88542),I=i(23461),A=i(48940),b=i(29266),C=i(58592),v=i(31593),T=i(53930),D=i(37531);const S=new Set(["esriMetersPerSecond","esriKilometersPerHour","esriKnots","esriFeetPerSecond","esriMilesPerHour"]),j=new a.J({beaufort_ft:"beaufort-ft",beaufort_km:"beaufort-km",beaufort_kn:"beaufort-kn",beaufort_m:"beaufort-m",beaufort_mi:"beaufort-mi",classified_arrow:"classified-arrow",ocean_current_kn:"ocean-current-kn",ocean_current_m:"ocean-current-m",simple_scalar:"simple-scalar",single_arrow:"single-arrow",wind_speed:"wind-barb"}),x=new a.J({flow_from:"flow-from",flow_to:"flow-to"});let N=r=class extends((0,M.h)(l.o)){constructor(e){super(e),this.attributeField="Magnitude",this.flowRepresentation="flow-from",this.rotationType="arithmetic",this.style="single-arrow",this.symbolTileSize=50,this.type="vector-field"}readInputUnit(e,t){return S.has(e)?h.MD.fromJSON(e):null}readOutputUnit(e,t){return S.has(e)?h.MD.fromJSON(e):null}get styleRenderer(){const e=this.style,t=this.attributeField,i=this._createStyleRenderer(e);return i.field=t,i}set visualVariables(e){super.visualVariables=e}get sizeVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)"size"===t.type&&e.push(t);if(0===e.length){const t=new A.A({field:"Magnitude",minSize:.2*this.symbolTileSize,maxSize:.8*this.symbolTileSize});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}get rotationVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)"rotation"===t.type&&e.push(t);if(0===e.length){const t=new I.A({field:"Direction",rotationType:this.rotationType});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}clone(){return new r({attributeField:this.attributeField,flowRepresentation:this.flowRepresentation,rotationType:this.rotationType,symbolTileSize:this.symbolTileSize,style:this.style,visualVariables:(0,u.o8)(this.visualVariables),inputUnit:this.inputUnit,outputUnit:this.outputUnit})}async getGraphicsFromPixelData(e,t=!1,i=[]){const r=new Array,n=(0,h.KL)(this.inputUnit,this.outputUnit),o=this.rotationVariables[0]?.rotationType||this.rotationType,a=t?(0,h.FI)(e.pixelBlock,"vector-uv",o,n):(0,h.Rn)(e.pixelBlock,"vector-magdir",n);if(null==a)return r;const l=e.extent,u=null!=a.mask&&a.mask.length>0;let c=0;const p=(l.xmax-l.xmin)/a.width,d=(l.ymax-l.ymin)/a.height;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++,c++){let n=new g.A({x:l.xmin+t*p+p/2,y:l.ymax-e*d-d/2,spatialReference:l.spatialReference});n=(await(0,y.el)(n))[0];const o=i.some(e=>e.intersects(n));if((!u||a.mask[c])&&!o){const e={Magnitude:a.pixels[0][c],Direction:a.pixels[1][c]},t=new s.A({geometry:new g.A({x:n.x,y:n.y,spatialReference:l.spatialReference}),attributes:e});t.symbol=this._getVisualVariablesAppliedSymbol(t),r.push(t)}}return r}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getClassBreakInfos(){return this.styleRenderer?.classBreakInfos}getDefaultSymbol(){return this.styleRenderer?.defaultSymbol}_getDefaultSymbol(e){return new T.A({path:"M14,32 14,18 9,23 16,3 22,23 17,18 17,32 z",outline:new v.A({width:0}),size:20,color:e||new o.A([0,92,230])})}_getVisualVariablesAppliedSymbol(e){if(!e)return;const t=this.styleRenderer?.getSymbol(e)?.clone(),i=this.sizeVariables,r=this.rotationVariables;if(i&&i.length&&this.sizeVariables.forEach(i=>(0,D.UQ)(t,(0,b.Yz)([i],e))),r&&r.length){const i="flow-to"===this.flowRepresentation==("ocean-current-kn"===this.style||"ocean-current-m"===this.style)?0:180;e.attributes.Direction=e.attributes.Direction+i,this.rotationVariables.forEach(i=>(0,D.GG)(t,(0,b.UT)(i,e),i.axis))}return t}_createStyleRenderer(e){let t={defaultSymbol:this._getDefaultSymbol(),classBreakInfos:[]};switch(e){case"single-arrow":t=this._createSingleArrowRenderer();break;case"beaufort-kn":t=this._createBeaufortKnotsRenderer();break;case"beaufort-m":t=this._createBeaufortMeterRenderer();break;case"beaufort-ft":t=this._createBeaufortFeetRenderer();break;case"beaufort-mi":t=this._createBeaufortMilesRenderer();break;case"beaufort-km":t=this._createBeaufortKilometersRenderer();break;case"ocean-current-m":t=this._createCurrentMeterRenderer();break;case"ocean-current-kn":t=this._createCurrentKnotsRenderer();break;case"simple-scalar":t=this._createSimpleScalarRenderer();break;case"wind-barb":t=this._createWindBarbsRenderer();break;case"classified-arrow":t=this._createClassifiedArrowRenderer()}return new f.A(t)}_createSingleArrowRenderer(){return{defaultSymbol:this._getDefaultSymbol()}}_createBeaufortKnotsRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([214,47,39])),classBreakInfos:this._getClassBreaks([0,1,3,6,10,16,21,27,33,40,47,55,63],[[40,146,199],[89,162,186],[129,179,171],[160,194,155],[191,212,138],[218,230,119],[250,250,100],[252,213,83],[252,179,102],[250,141,52],[247,110,42],[240,71,29]])}}_createBeaufortMeterRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([214,47,39])),classBreakInfos:this._getClassBreaks([0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7],[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortFeetRenderer(){const e=this._getDefaultSymbol(new o.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map(e=>3.28084*e),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortMilesRenderer(){const e=this._getDefaultSymbol(new o.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map(e=>2.23694*e),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortKilometersRenderer(){const e=this._getDefaultSymbol(new o.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map(e=>3.6*e),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createCurrentMeterRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([177,177,177])),classBreakInfos:this._getClassBreaks([0,.5,1,1.5,2],[[78,26,153],[179,27,26],[202,128,26],[177,177,177]])}}_createCurrentKnotsRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([177,177,177])),classBreakInfos:this._getClassBreaks([0,.25,.5,1,1.5,2,2.5,3,3.5,4],[[0,0,0],[0,37,100],[78,26,153],[151,0,100],[179,27,26],[177,78,26],[202,128,26],[177,179,52],[177,177,177]])}}_createClassifiedArrowRenderer(){const e=this._getDefaultSymbol(new o.A([56,168,0]));let t=[0,1e-6,3.5,7,10.5,14];if(this.sizeVariables?.length){const e=this.sizeVariables[0].minDataValue,i=this.sizeVariables[0].maxDataValue;if(e&&i){const r=(i-e)/5;t=Array.from(Array(6).keys()).map(t=>e+r*t)}}return{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[56,168,0],[139,309,0],[255,255,0],[255,128,0],[255,0,0]])}}_createSimpleScalarRenderer(){return{defaultSymbol:C.A.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAQAAABLVLlLAAAABGdBTUEAAYagMeiWXwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAABIAAAASABGyWs+AAAC3ElEQVRIx9XXvW4cVRQH8N982btpsIREJECyiCXsxX4DKh6AliqGKCBBE2SlwlHgAbBD/AKmyEYUeQ1KahPZSZQvBCkQLTHZ7KGY8Xodz4w3a1NwbzVzz/znfJ//zbStVC5q3icKak9GAs2QIdDx3PtW/S011NW3p+M5Eomh11ipTIKe6+4LQzHaQ+G+63pIZNJJQXMpljwTwj1brpgx5w1zZlyx5Z4QnllEIm2xeeSUHBf0hV0bejo1Uh09G3aFvgXk7cCJFBc9EdaRVuHJJaOdKyTV2TVhYLMduNR0Q9gxL5GaaTDw8GzejrDRBpxWoGsySRW0dttKuattwNkIlFw2YXgzOdYq4Ox49PlM+JrKd5OusjTWhBuVxUfMX/KXXZ3WEmkuqa67wspR4BTbwtKr/5u4fFgStse/T7EifFPnnYl9zPq4vmUOPrRndgoHjDti1gOPqlyXoifcRNGQzUd31lDyfHmob1Gp35vSr+P6vilcQ5Egtyd8YF/ySg9NhPM+9M/IOaHwp5+PSZayXTvCogEUwlatC3J8LLwYtcWB8EuDXQVuCkV5/B4eNHb7wGBs87LBDS+xjdVSn09wq1G8dFM+9tSUhIGneLvUdniKxKpTYljCpu3j7rVWlHj/P23v4NPGUEyeCQnexe9lJjzEQqMjJs+EzNAX6B98dBZVRmroJx95x/A/6gln18EyfCUsl+qdXb/tjvfbw+mwforpUOBz4XLVoBwAn3aWnfeH246NyBXhrq7TTN5lNSP9RkU+puUJm3W2Tsdq0nZWM07srk7MwQrZSRysjjGWBLRJNsNbfj2JMR4AbxpU1XLAb9Mxfpsq5EjMuuiR8L0JiHOOBX3hiUvOmavN0nMueSzcceFk0BK4pMqLo7vDD1Z0qrtDx7Itt4Xwm9UqbMmk8S0Dtuzb2pvOU99Z1nLTOfleNmvfZfP2pYZmPfajwosKdDBNpacNpVGGsWX9CyDI8Xq/Sj6QAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE0LTExLTEwVDAzOjE3OjU4LTA1OjAwF+tHyQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNC0xMS0xMFQwMzoxNzo1OC0wNTowMGa2/3UAAAAASUVORK5CYII=",height:20,width:20,type:"esriPMS",angle:0})}}_createWindBarbsRenderer(){const e=Array.from(Array(31).keys()).map(e=>5*e),t=[{range:"0-5",path:"M20 20 M5 20 A15 15 0 1 0 35 20 A15 15 0 1 0 5 20 M20 20 M10 20 A10 10 0 1 0 30 20 A10 10 0 1 0 10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTIwIDIwIE01IDIwIEExNSAxNSAwIDEgMCAzNSAyMCBBMTUgMTUgMCAxIDAgNSAyMCBNMjAgMjAgTTEwIDIwIEExMCAxMCAwIDEgMCAzMCAyMCBBMTAgMTAgMCAxIDAgMTAgMjAiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"5-10",path:"M25 0 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"10-15",path:"M25 0 L25 40 L10 45 L25 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"15-20",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjEyIDAgMTUgNDUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"20-25",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"25-30",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIEwyNSAzNSBNMjUgMzAgTDE3LjUgMzIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"30-35",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"35-40",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"40-45",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"45-50",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"50-55",path:"M25 0 L25 40 L10 40 L25 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"55-60",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxNy41IDMyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"60-65",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"65-70",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"70-75",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"75-80",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"80-85",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"85-90",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxNy41IDE3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"90-95",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"95-100",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20 L25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCBMMjUgMTUgTTI1IDEwIEwxNy41IDEyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"100-105",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"105-110",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDE3LjUgMjcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"110-115",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"115-120",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDE3LjUgMjIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"120-125",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"125-130",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDE3LjUgMTcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"130-135",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"135-140",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDE3LjUgMTIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"140-145",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"145-150",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IE0yNSAxMCBNMjUgNSBMMTcuNSA3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="}],i=C.A.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACgAAAApCAQAAADtq6NDAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEY0lEQVRIx5XXWWxWRRQH8N+d+31tUdGAVjGglYJABFEBY91jfDAg7piYaFTccA++uMQEFRcSXlATtxiXqMQt4G4iisYl0ai4sIQYtVFZ1KIFKdTS0l4f7vRCS5fPebozc+bM/2z/Mzcx0AgSiUxXnKfIdMn875FIhX53U2n/B/s+kKM4UINTjTBZImixxnrv+9a2iL6zEoUBXcoudrWj/OtHm3wt02lfU9Qao9OnHvIhgmww84MEl1qnxfNmGrqHxAizLdPpC6chGcAxKGGcL+30gOERf1BSpUqVslQSV8d5ReZFe8VQ9avufJn31cWwlJV7iafKStGOE/1qvfH9qUxxu8ydUdmuSKbGO8YUdT2inKLG69pM70tliktl5qIkCAJGmusDG7Vqsc0WjZa4UBlBiA5YZIcjYzB7qDtH5kaUJFLs7RGZTZ42W4PRRmtwvbdt1+wGiaS4drEtDttdZYIDNVuAclR3vA3+dI3qHqmVSy7U6Tv1MScCPvPR7nIpFlsdCy3FdTLPGhK92e2CUITjMJ9ocwKxnsZqc3O3JwMma3d6UVLnyVxB4aXemZqvPqLdpJhW3KVVbY4yYImPo6M5Urv50fj+0z/FG9YaEiENs8UtMfXUaTeTePNHlhXfA1UU+2lyD1Il3Gtt9+adfpNG7dNlpg2U/T3KYLZ2dUWFdTgp3/rQ4sK973qnInV5TIf40x3dhvrJPBiqyWUo4wAtLqhQYS71qK+QKOFRywmGK/kpikzV6WMKhh58vGWs4TIJNjiEYLIuP8Tt4/zmLyqk+AyrJSbF+Qq1DgqRUPMxyl+9q3IQhX/rMCJ6tEunriDs1oSyQZKlr9AkhT2ZIARbJfaJS1vtVbHB+Rgi0RK/y1q1BWsEEyLoz40xtGKcARPVWB1BTPO7f4LNtpkUl1aoMbViLyZo0GRjPD3BxnxjqXeLYlvhqYrzMMG3HoyJXa3JjfnGlbYYFlP7Jh3qKsKY4hQ7TY0nG+xwRL61n63mxHtqNHosigyMLmClNwvuecFnOZB88nNBDzNkzhxEZaKMBVoKapggMzvHHXBEpNSSFAvtcFRsVn0bW8LlMmcXs+c0Kne3gRR32+zg4uXwjC6zit6Wt4a8LXVfcp/MtQXHn2ynGbuCmb8GvvFeJLEE82ReU9/n6+dkq2x3buG9Wn94smcgAw631RPR7BTH+kbmHReZoEpOdEe7zWqZl40s0JWs9Hmv7hjBHqPDwsjGKVJnWWqjbdZp1KhJi0aPmxYZsIRhlttgeF+Jlke41QcOQKoqilSb6HJzSvNG3G/UoWnxwsmt+sVaYwd63dRbqdnMyCPVeyRPvpYgdavM22oGKoMUVRbJfOWMwidJ8Zzb1UvmWK/VVUXzHaTjjrVYh1897HT7xxYEVUaa5SWb/WO+YUWa9SrwvigzM8YlzlYv2GSdVCYxxlBtVnnFq5olwp5/BEk/OLsf5LUmG2+inRJdVvjZ97ZH9/zP34ug1O91pf4p+D+JYBpvrKxfbwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNC0xMS0xMFQwMzoxMjowOS0wNTowMB9ViV0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTQtMTEtMTBUMDM6MTI6MDktMDU6MDBuCDHhAAAAAElFTkSuQmCC",height:20,width:20,type:"esriPMS",angle:0}),r=e.map((r,n)=>{let o;if(n!==e.length-1)if(0===n)o={minValue:r,maxValue:e[n+1],symbol:i};else{const i=C.A.fromJSON({type:"esriPMS",imageData:t[n].imageData,contentType:"image/svg+xml",height:32,width:32,angle:0});o={minValue:r,maxValue:e[n+1],symbol:i}}return new w.A(o)});return{defaultSymbol:i,classBreakInfos:r}}_getClassBreaks(e,t){return t.map((t,i)=>new w.A({minValue:e[i],maxValue:e[i+1],symbol:this._getDefaultSymbol(new o.A(t))}))}};(0,n.Cg)([(0,c.MZ)({type:["Magnitude"],json:{write:!0}})],N.prototype,"attributeField",void 0),(0,n.Cg)([(0,c.MZ)({type:x.apiValues,json:{type:x.jsonValues,read:{reader:x.read},write:{writer:x.write}}})],N.prototype,"flowRepresentation",void 0),(0,n.Cg)([(0,c.MZ)({type:["geographic","arithmetic"],json:{write:!0}})],N.prototype,"rotationType",void 0),(0,n.Cg)([(0,c.MZ)({type:j.apiValues,json:{type:j.jsonValues,read:{reader:j.read},write:{writer:j.write}}})],N.prototype,"style",void 0),(0,n.Cg)([(0,c.MZ)({json:{write:!0}})],N.prototype,"symbolTileSize",void 0),(0,n.Cg)([(0,c.MZ)({type:h.MD.apiValues,json:{type:h.MD.jsonValues,write:{writer:h.MD.write}}})],N.prototype,"inputUnit",void 0),(0,n.Cg)([(0,d.w)("inputUnit")],N.prototype,"readInputUnit",null),(0,n.Cg)([(0,c.MZ)({type:h.MD.apiValues,json:{type:h.MD.jsonValues,read:{reader:h.MD.read},write:{writer:h.MD.write}}})],N.prototype,"outputUnit",void 0),(0,n.Cg)([(0,d.w)("outputUnit")],N.prototype,"readOutputUnit",null),(0,n.Cg)([(0,p.e)({vectorField:"vector-field"})],N.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)({type:f.A})],N.prototype,"styleRenderer",null),(0,n.Cg)([(0,c.MZ)({type:A.A})],N.prototype,"sizeVariables",null),(0,n.Cg)([(0,c.MZ)({type:I.A})],N.prototype,"rotationVariables",null),N=r=(0,n.Cg)([(0,m.$)("esri.renderers.VectorFieldRenderer")],N)},22048:(e,t,i)=>{i.d(t,{A:()=>h});var r,n=i(31635),o=i(25482),s=i(4718),a=i(10107),l=(i(44208),i(53966),i(40608)),u=i(43937),c=i(86738),p=i(65864),d=i(50498),m=i(85675),g=i(22796),y=i(64272);let h=r=class extends o.o{constructor(e){super(e),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,p.$B)(e),t[i]=e.toJSON())}clone(){return new r((0,s.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};(0,n.Cg)([(0,a.MZ)({types:d.yR,json:{read:p.rS}})],h.prototype,"geometry",void 0),(0,n.Cg)([(0,u.K)("geometry")],h.prototype,"writeGeometry",null),(0,n.Cg)([(0,a.MZ)({type:m.A,json:{write:!0}})],h.prototype,"mosaicRule",void 0),(0,n.Cg)([(0,a.MZ)({type:g.A,json:{write:!0,name:"renderingRule"}})],h.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],h.prototype,"pixelSize",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"raster",void 0),(0,n.Cg)([(0,a.MZ)({type:y.T,json:{read:{source:"time"},write:{target:"time"}}})],h.prototype,"timeExtent",void 0),h=r=(0,n.Cg)([(0,l.$)("esri.rest.support.ImageHistogramParameters")],h)},22671:(e,t,i)=>{i.d(t,{A:()=>M});var r,n=i(31635),o=i(52106),s=i(66552),a=i(25482),l=i(4718),u=i(10107),c=(i(44208),i(53966),i(36005)),p=i(40608),d=i(43937),m=i(16930),g=i(65864),y=i(50498),h=i(20437);const f=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let M=r=class extends a.o{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,o.A)}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,g.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=m.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((n-e)/i));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,n],scale:[o,s]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,e=>e*o+r,e=>n-e*s,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=m.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=i.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}n.push(s)}return n}_quantizePoints(e,t,i){let r,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=i(a[1]);e===r&&s===n||(o.push([e-r,s-n]),r=e,n=s)}else r=t(a[0]),n=i(a[1]),o.push([r,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,g.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],s=this._quantizePoints(o,t,i);s&&n.push(s)}return n.length>0?((0,g.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,n){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,g.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];for(let e=0,n=r.length;e<n;e++){const n=r[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=i(a)}}if(r&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=n(i[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=n(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=i(a)}if(r&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2]),t[3]=n(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],M.prototype,"features",void 0),(0,n.Cg)([(0,c.w)("features")],M.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],M.prototype,"geometryType",void 0),(0,n.Cg)([(0,d.K)("geometryType")],M.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],M.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],M.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,c.w)("queryGeometry")],M.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:m.A,json:{write:!0}})],M.prototype,"spatialReference",void 0),(0,n.Cg)([(0,d.K)("spatialReference")],M.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],M.prototype,"transform",void 0),M=r=(0,n.Cg)([(0,p.$)("esri.rest.support.FeatureSet")],M),M.prototype.toJSON.isDefaultToJSON=!0},22796:(e,t,i)=>{i.d(t,{A:()=>L});var r=i(31635),n=i(25482),o=i(4718),s=i(10107),a=(i(44208),i(53966),i(93223)),l=i(36005),u=i(40608),c=i(43937),p=i(66552),d=i(56507),m=(i(87811),i(13868));let g=class extends n.o{constructor(){super(...arguments),this.pixelType="unknown"}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],g.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],g.prototype,"description",void 0),(0,r.Cg)([(0,s.MZ)({type:d.jz,json:{type:d.jz,write:!0,name:"_object_id"}})],g.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{type:m.e8.jsonValues,read:m.e8.read,write:{writer:m.e8.write,isRequired:!0}}})],g.prototype,"pixelType",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],g.prototype,"type",void 0),g=(0,r.Cg)([(0,u.$)("esri.layers.support.RasterFunctionInfo")],g);const y=g;let h=class extends n.o{constructor(){super(...arguments),this.isDataset=!1,this.isPublic=!1,this.type="RasterFunctionVariable"}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{type:d.jz,write:!0,name:"_object_id"}})],h.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"isDataset",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"isPublic",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],h.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"type",void 0),h=(0,r.Cg)([(0,u.$)("esri.layers.support.RasterFunctionVariable")],h);const f={key:"type",base:null,typeMap:{RasterFunctionVariable:h}};let M=class extends n.o{};(0,r.Cg)([(0,s.MZ)({types:f,json:{types:f,name:"MatchVariable"}})],M.prototype,"matchVariable",void 0),(0,r.Cg)([(0,s.MZ)({types:f,json:{types:f,name:"UnionDimension"}})],M.prototype,"unionDimension",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{type:d.jz,write:!0,name:"_object_id"}})],M.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],M.prototype,"type",void 0),M=(0,r.Cg)([(0,u.$)("esri.layers.support.RasterFunctionProperties")],M);const w=M,I=new p.J({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let A=class extends n.o{constructor(){super(...arguments),this.description="",this.functionType="mosaic",this.type="RasterFunctionTemplate"}};var b;(0,r.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],A.prototype,"aliases",void 0),(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:{isRequired:!0}}})],A.prototype,"arguments",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],A.prototype,"description",void 0),(0,r.Cg)([(0,s.MZ)({type:y,json:{write:{isRequired:!0},name:"function"}})],A.prototype,"functionInfo",void 0),(0,r.Cg)([(0,s.MZ)({type:I.apiValues,json:{type:[0,1,2],read:I.read,write:{writer:I.write,isRequired:!0}}})],A.prototype,"functionType",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"group",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"help",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{type:d.jz,write:!0,name:"_object_id"}})],A.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],A.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0,name:"definition"}})],A.prototype,"queryDefinition",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"tag",void 0),(0,r.Cg)([(0,s.MZ)({type:w,json:{write:!0}})],A.prototype,"properties",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"thumbnail",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"thumbnailEx",void 0),(0,r.Cg)([(0,s.MZ)({json:{type:["RasterFunctionTemplate"],write:!0}})],A.prototype,"type",void 0),A=(0,r.Cg)([(0,u.$)("esri.layers.support.RasterFunctionTemplate")],A);const C=new Set(["raster","raster2","dem","fillraster"]),v=new Set(["rasters"]),T=e=>e?.rasterFunction?L.fromJSON(e):e,D=e=>e&&e instanceof L?e.toJSON():e,S=e=>e?.functionName&&!e.declaredClass,j=e=>S(e)?new L(e):e,x=e=>e?A.fromJSON({type:"RasterFunctionTemplate",...e}):void 0,N={types:{key:"type",base:null,typeMap:{RasterFunctionTemplate:A}},json:{write:!0,name:"rasterFunctionDefinition",read:x}};let L=b=class extends n.o{constructor(e){super(e),this.functionName=null,this.outputPixelType="unknown",this.variableName=null,this.functionDefinition=null}set functionArguments(e){if(e){const t=Object.keys(e);if(t.some(t=>C.has(t.toLowerCase())&&S(e[t]))||t.some(t=>v.has(t.toLowerCase())&&Array.isArray(e[t])&&e[t].some(e=>S(e)))){e=(0,o.o8)(e);for(const i of t)C.has(i.toLowerCase())?e[i]=j(e[i]):v.has(i.toLowerCase())&&Array.isArray(e[i])&&(e[i]=e[i].map(e=>j(e)))}}this._set("functionArguments",e)}readFunctionArguments(e){return(e=>{if(null==e)return null;e=(0,o.o8)(e);const t={};for(const i of Object.keys(e))C.has(i.toLowerCase())?t[i]=T(e[i]):v.has(i.toLowerCase())&&Array.isArray(e[i])?t[i]=e[i].map(T):t[i]=e[i];return t})(e)}writeFunctionArguments(e,t,i){const r={};for(const t of Object.keys(e))C.has(t.toLowerCase())?r[t]=D(e[t]):v.has(t.toLowerCase())&&Array.isArray(e[t])?r[t]=e[t].map(D):r[t]=D(e[t]);t[i]=r}readFunctionName(e,t){const i=t.rasterFunctionInfos;return t.name||(i?.length&&"None"!==i[0].name?i[0].name:t.rasterFunction||t.rasterFunctionDefinition?.name)}get rasterFunctionDefinition(){return this.functionDefinition?.toJSON()}set rasterFunctionDefinition(e){this.functionDefinition=x(e)}get hasClipFunction(){return this.rasterFunctionDefinition?JSON.stringify(this.rasterFunctionDefinition).includes('"type":"ClipFunction"'):JSON.stringify(this).includes('"rasterFunction":"Clip"')}clone(){return new b({functionName:this.functionName,functionArguments:(0,o.o8)(this.functionArguments),outputPixelType:this.outputPixelType,variableName:this.variableName,rasterFunctionDefinition:(0,o.o8)(this.rasterFunctionDefinition)})}};(0,r.Cg)([(0,s.MZ)({json:{type:Object,name:"rasterFunctionArguments"}})],L.prototype,"functionArguments",null),(0,r.Cg)([(0,l.w)("functionArguments")],L.prototype,"readFunctionArguments",null),(0,r.Cg)([(0,c.K)("functionArguments")],L.prototype,"writeFunctionArguments",null),(0,r.Cg)([(0,s.MZ)({json:{type:String,write:{target:"rasterFunction"}}})],L.prototype,"functionName",void 0),(0,r.Cg)([(0,l.w)("functionName",["rasterFunction","rasterFunctionInfos","rasterFunctionDefinition"])],L.prototype,"readFunctionName",null),(0,r.Cg)([(0,a.e)({C128:"c128",C64:"c64",F32:"f32",F64:"f64",S16:"s16",S32:"s32",S8:"s8",U1:"u1",U16:"u16",U2:"u2",U32:"u32",U4:"u4",U8:"u8",UNKNOWN:"unknown"},{ignoreUnknown:!1,default:"unknown"})],L.prototype,"outputPixelType",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{read:!0,write:!0}})],L.prototype,"variableName",void 0),(0,r.Cg)([(0,s.MZ)()],L.prototype,"rasterFunctionDefinition",null),(0,r.Cg)([(0,s.MZ)(N)],L.prototype,"functionDefinition",void 0),(0,r.Cg)([(0,s.MZ)()],L.prototype,"hasClipFunction",null),L=b=(0,r.Cg)([(0,u.$)("esri.layers.support.RasterFunction")],L)},26253:(e,t,i)=>{i.d(t,{T:()=>p});var r=i(31635),n=i(69540),o=i(25482),s=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(73133);let p=class extends((0,n.O)(o.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,r.Cg)([(0,l.e)(c.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r.Cg)([(0,u.$)("esri.time.TimeInterval")],p)},30291:(e,t,i)=>{i.d(t,{tn:()=>u});var r=i(13874),n=i(30524),o=i(89893),s=(i(84424),i(80737),i(96808),i(66159)),a=(i(67336),i(92094),i(23721),i(47582),i(41227)),l=i(68780);function u({displayField:e,editFieldsInfo:t,fields:i,objectIdField:l,title:u},m){if(!i)return null;const y=function(e,t){const i=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:i}){const r=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===r&&(e=e.slice()),!0!==i&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||g,sortDisabled:t?.sortDisabled}).map(t=>new a.A({fieldName:t.name,isEditable:(0,n.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:i})}))}({editFieldsInfo:t,fields:i,objectIdField:l},m);if(!y.length)return null;const h=function(e){const t=(0,n.mB)(e),{titleBase:i}=e;return t?`${i}: {${t.trim()}}`:i??""}({titleBase:u,fields:i,displayField:e}),f=[new s.A,new o.A];return new r.A({title:h,content:f,fieldInfos:y})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:m(e)?-1:m(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,n.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function m(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const g=["geometry","blob","raster","guid","xml"]},34606:(e,t,i)=>{i.d(t,{A:()=>f});var r,n=i(31635),o=i(25482),s=i(4718),a=i(10107),l=(i(44208),i(53966),i(40608)),u=i(43937),c=i(48526),p=i(86738),d=i(65864),m=i(50498),g=i(85675),y=i(13868),h=i(64272);let f=r=class extends o.o{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.raster=void 0,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,d.$B)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new c.A({spatialReference:e[0].spatialReference,points:e.map(({x:e,y:t})=>[e,t])});this._set("locations",e),this.geometry=t}}clone(){return new r((0,s.o8)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,n.Cg)([(0,a.MZ)({types:m.yR,json:{read:d.rS}})],f.prototype,"geometry",void 0),(0,n.Cg)([(0,u.K)("geometry")],f.prototype,"writeGeometry",null),(0,n.Cg)([(0,a.MZ)({type:[p.A]})],f.prototype,"locations",null),(0,n.Cg)([(0,a.MZ)({type:String,json:{type:y.SZ.jsonValues,read:y.SZ.read,write:y.SZ.write}})],f.prototype,"interpolation",void 0),(0,n.Cg)([(0,a.MZ)({type:g.A,json:{write:!0}})],f.prototype,"mosaicRule",void 0),(0,n.Cg)([(0,a.MZ)({type:[String],json:{write:!0}})],f.prototype,"outFields",void 0),(0,n.Cg)([(0,a.MZ)({type:p.A,json:{write:!0}})],f.prototype,"pixelSize",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"raster",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"returnFirstValueOnly",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"sampleDistance",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"sampleCount",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],f.prototype,"sliceId",void 0),(0,n.Cg)([(0,a.MZ)({type:h.T,json:{read:{source:"time"},write:{target:"time"}}})],f.prototype,"timeExtent",void 0),f=r=(0,n.Cg)([(0,l.$)("esri.rest.support.ImageSampleParameters")],f)},36280:(e,t,i)=>{i.d(t,{A:()=>g});var r,n=i(31635),o=i(25482),s=i(4718),a=i(10107),l=(i(44208),i(53966),i(93223)),u=i(36005),c=i(40608),p=i(43937),d=i(70274),m=i(95349);let g=r=class extends o.o{constructor(e){super(e),this.colorRamp=null,this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.maxPercent=null,this.minPercent=null,this.numberOfStandardDeviations=null,this.outputMax=null,this.outputMin=null,this.sigmoidStrengthLevel=null,this.histograms=null,this.customStatistics=null,this.useGamma=!1,this.stretchType="none",this.type="raster-stretch"}readColorRamp(e){if(e)return(0,m.r)(e)}readCustomStatistics(e){return e?.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))}writeCustomStatistics(e,t,i){e?.length&&(t[i]=e.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]))}readStretchType(e,t){let i=t.stretchType;return"number"==typeof i&&(i=d.x[i]),d.u.read(i)}clone(){return new r({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,customStatistics:(0,s.o8)(this.customStatistics),gamma:(0,s.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,colorRamp:(0,s.o8)(this.colorRamp),histograms:(0,s.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment})}};(0,n.Cg)([(0,a.MZ)({types:m.g,json:{write:!0}})],g.prototype,"colorRamp",void 0),(0,n.Cg)([(0,u.w)("colorRamp")],g.prototype,"readColorRamp",null),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"computeGamma",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:{target:"dra"},read:{source:"dra"}}})],g.prototype,"dynamicRangeAdjustment",void 0),(0,n.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"gamma",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"maxPercent",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"minPercent",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"numberOfStandardDeviations",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{read:{source:"max"},write:{target:"max"}}})],g.prototype,"outputMax",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{read:{source:"min"},write:{target:"min"}}})],g.prototype,"outputMin",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"sigmoidStrengthLevel",void 0),(0,n.Cg)([(0,a.MZ)()],g.prototype,"histograms",void 0),(0,n.Cg)([(0,a.MZ)({json:{type:[[Number]],name:"statistics",write:!0}})],g.prototype,"customStatistics",void 0),(0,n.Cg)([(0,u.w)("customStatistics")],g.prototype,"readCustomStatistics",null),(0,n.Cg)([(0,p.K)("customStatistics")],g.prototype,"writeCustomStatistics",null),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"useGamma",void 0),(0,n.Cg)([(0,a.MZ)({type:d.u.apiValues,json:{type:d.u.jsonValues,write:d.u.write}})],g.prototype,"stretchType",void 0),(0,n.Cg)([(0,u.w)("stretchType",["stretchType"])],g.prototype,"readStretchType",null),(0,n.Cg)([(0,l.e)({rasterStretch:"raster-stretch"})],g.prototype,"type",void 0),g=r=(0,n.Cg)([(0,c.$)("esri.renderers.RasterStretchRenderer")],g)},37531:(e,t,i)=>{i.d(t,{dt:()=>d,GG:()=>f,UQ:()=>h,Sx:()=>c});var r=i(68197),n=i(60999),o=(i(44208),i(51850)),s=(i(76369),i(62046)),a=(i(2741),i(78888),i(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new r.A([128,128,128]);var l=i(28975),u=i(33910);function c(e,t){if(!e)return null;let i=null;return(0,u.wk)(e)?i=function(e){const t=e.symbolLayers;if(!t)return null;let i=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(i="water"===e.type?e.color:e.material?e.material.color:null)}),i?new r.A(i):null}(e):(0,u.$y)(e)&&(i="cim"===e.type?(0,s.Nk)(e):e.color?new r.A(e.color):null),i?p(i,t):null}function p(e,t){if(null==t||null==e)return e;const i=e.toRgba();return i[3]=i[3]*t,new r.A(i)}function d(e,t,i){e&&(t||null!=i)&&(t&&(t=new r.A(t)),(0,u.wk)(e)?function(e,t,i){const n=e.symbolLayers;if(!n)return;const o=(e,n=!1)=>{let o=t??e??null;return null!=i?.override&&(!o&&n&&(o=new r.A([255,255,255])),o&&(o.a=i.override)),p(o,i?.add)};n.forEach(e=>{if("water"===e.type)return void(e.color=p(e.color,i?.add));const t=null!=e.material?e.material.color:null,r=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:r}):e.material.color=r,"outline"in e&&e.outline?.color&&null!=i?.add&&(e.outline.color=p(e.outline.color,i.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))})}(e,t,i):(0,u.$y)(e)&&function(e,t,i){t=t??e.color,null!=i?.override&&t&&(t.a=i.override),t&&(e.color=p(t,i?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,i?.add))}(e,t,i))}function m(e){for(const t of e)if("number"==typeof t)return t;return null}function g(e,t,i){for(let r=0;r<3;r++){const n=e[r];switch(n){case"symbol-value":{const e=i[r];return null!=e?e/t[r]:1}case"proportional":break;default:if(n&&t[r])return n/t[r]}}return null}function y(e,t,i,r){switch(e){case"proportional":return i*r;case"symbol-value":return null!=t?t:i;default:return e}}async function h(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const r=e.symbolLayers;r&&await(0,n.jJ)(r,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const i=t[2];"number"==typeof i&&(e.size=i)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const i=m(t);null!=i&&(e.size=i)}(e,t);break;case"path":!function(e,t){const i=g(t,o.Un,[e.width,void 0,e.height]);null!=i&&(e.width=y(t[0],e.width,1,i),e.height=y(t[2],e.height,1,i))}(e,t);break;case"object":await async function(e,t){const{resourceSize:r,symbolSize:n}=await async function(e){const{computeObjectLayerResourceSize:t}=await i.e(5404).then(i.bind(i,95404)),r=await t(e,10),{width:n,height:o,depth:s}=e,a=[n,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/r[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=r[e]*l);return{resourceSize:r,symbolSize:a}}(e),o=g(t,r,n);null!=o&&(e.width=y(t[0],n[0],r[0],o),e.depth=y(t[1],n[1],r[1],o),e.height=y(t[2],n[2],r[2],o))}(e,t)}}(e,t))}(e,t):void((0,u.$y)(e)&&function(e,t){const i=m(t);if(null!=i)switch(e.type){case"simple-marker":e.size=i;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=i,e.height=i*t):(e.width=i*t,e.height=i);break}case"simple-line":e.width=i;break;case"text":e.font.size=i}}(e,t))}function f(e,t,i){if(e&&null!=t)if((0,u.wk)(e)){const r=e.symbolLayers;r&&r.forEach(e=>{if("object"===e.type)switch(i){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else(0,u.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},43577:(e,t,i)=>{i.d(t,{A:()=>g});var r,n=i(31635),o=i(25482),s=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),l=i(5443),u=i(91075),c=i(39829),p=i(65864),d=i(45617);const m={base:u.A,key:"type",typeMap:{extent:l.A,polygon:c.A}};let g=r=class extends o.o{constructor(e){super(e),this.areaOfInterest=null,this.subsetDefinitions=null}get dimensions(){const{subsetDefinitions:e}=this;if(null==e||0===e.length)return[];const t=new Map;e.forEach(e=>{if(!e.dimensionName)return;let i,r;if(Array.isArray(e.values[0])){const t=e.values;i=t[0][0],r=t[e.values.length-1][1]}else{const t=e.values;i=t[0],r=t[e.values.length-1]}if(t.has(e.dimensionName)){const n=t.get(e.dimensionName);n[0]=Math.min(i,n[0]),n[1]=Math.max(r,n[1])}else t.set(e.dimensionName,[i,r])});const i=[];for(const e of t)i.push({name:e[0],extent:e[1]});return i}get variables(){const{subsetDefinitions:e}=this;if(null==e||0===e.length)return[];const t=new Set;return e.forEach(e=>{e.variableName&&t.add(e.variableName)}),[...t]}clone(){const e=this.subsetDefinitions?.map(e=>e.clone()),t=this.areaOfInterest?this.areaOfInterest.clone():this.areaOfInterest;return new r({areaOfInterest:t,subsetDefinitions:e})}};(0,n.Cg)([(0,s.MZ)({types:m,json:{read:p.rS,write:!0}})],g.prototype,"areaOfInterest",void 0),(0,n.Cg)([(0,s.MZ)({readOnly:!0})],g.prototype,"dimensions",null),(0,n.Cg)([(0,s.MZ)({readOnly:!0})],g.prototype,"variables",null),(0,n.Cg)([(0,s.MZ)({type:[d.A],json:{write:!0}})],g.prototype,"subsetDefinitions",void 0),g=r=(0,n.Cg)([(0,a.$)("esri.layers.support.MultidimensionalSubset")],g)},45617:(e,t,i)=>{i.d(t,{A:()=>c});var r,n=i(31635),o=i(25482),s=i(4718),a=i(10107),l=i(56507),u=i(40608);let c=r=class extends o.o{constructor(e){super(e),this.variableName=null,this.dimensionName=null,this.values=[],this.isSlice=!1}clone(){return new r({variableName:this.variableName,dimensionName:this.dimensionName,values:(0,s.o8)(this.values),isSlice:this.isSlice})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"variableName",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"dimensionName",void 0),(0,n.Cg)([(0,a.MZ)({type:l.gK.array(l.gK.oneOf([l.gK.native(Number),l.gK.array(l.gK.native(Number))])),json:{write:!0}})],c.prototype,"values",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"isSlice",void 0),c=r=(0,n.Cg)([(0,u.$)("esri.layers.support.DimensionalDefinition")],c)},46981:(e,t,i)=>{i.d(t,{A:()=>d});var r,n=i(31635),o=i(25482),s=i(4718),a=i(10107),l=(i(44208),i(53966),i(93223)),u=i(36005),c=i(40608),p=i(95349);let d=r=class extends o.o{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.colorRamp=null,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.scalingType="none",this.type="raster-shaded-relief",this.zFactor=1}readColorRamp(e){return(0,p.r)(e)}clone(){return new r({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,scalingType:this.scalingType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,colorRamp:(0,s.o8)(this.colorRamp)})}};(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],d.prototype,"altitude",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],d.prototype,"azimuth",void 0),(0,n.Cg)([(0,a.MZ)({types:p.g,json:{write:!0}})],d.prototype,"colorRamp",void 0),(0,n.Cg)([(0,u.w)("colorRamp")],d.prototype,"readColorRamp",null),(0,n.Cg)([(0,a.MZ)({type:["traditional","multi-directional"],json:{write:{isRequired:!0}}})],d.prototype,"hillshadeType",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],d.prototype,"pixelSizePower",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],d.prototype,"pixelSizeFactor",void 0),(0,n.Cg)([(0,a.MZ)({type:["none","adjusted"],json:{write:{isRequired:!0}}})],d.prototype,"scalingType",void 0),(0,n.Cg)([(0,l.e)({rasterShadedRelief:"raster-shaded-relief"}),(0,a.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],d.prototype,"zFactor",void 0),d=r=(0,n.Cg)([(0,c.$)("esri.renderers.RasterShadedReliefRenderer")],d)},49410:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(31635),n=i(25482),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),a=i(86738);let l=class extends n.o{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],l.prototype,"attributes",void 0),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],l.prototype,"location",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],l.prototype,"locationId",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],l.prototype,"rasterId",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],l.prototype,"pixelValue",void 0),l=(0,r.Cg)([(0,s.$)("esri.rest.support.ImageSample")],l)},51508:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(31635),n=i(25482),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),a=i(49410);let l=class extends n.o{constructor(){super(...arguments),this.samples=[]}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"samples",void 0),l=(0,r.Cg)([(0,s.$)("esri.rest.support.ImageSampleResult")],l)},52106:(e,t,i)=>{i.d(t,{A:()=>I});var r,n=i(31635),o=i(13874),s=i(69540),a=i(51447),l=i(25482),u=i(53966),c=i(36708),p=i(24326),d=i(10107),m=(i(44208),i(87811),i(40608)),g=i(12195),y=i(65864),h=i(50498),f=i(54339),M=i(33910);function w(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let I=class extends((0,s.O)(l.o)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i&&"object"==typeof i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,f.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,g.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(n.action=r),"attributes"===e&&(n.attributeName=r),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],I.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,d.MZ)({value:null})],I.prototype,"attributes",null),(0,n.Cg)([(0,d.MZ)({value:null,types:h.yR,json:{read:y.rS}})],I.prototype,"geometry",null),(0,n.Cg)([(0,d.MZ)({type:Boolean})],I.prototype,"isAggregate",void 0),(0,n.Cg)([(0,d.MZ)({clonable:!1})],I.prototype,"layer",void 0),(0,n.Cg)([(0,d.MZ)({clonable:"reference"})],I.prototype,"origin",void 0),(0,n.Cg)([(0,d.MZ)({type:o.A,value:null})],I.prototype,"popupTemplate",null),(0,n.Cg)([(0,d.MZ)({clonable:"reference"})],I.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,d.MZ)({value:null,types:M.Es})],I.prototype,"symbol",null),(0,n.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],I.prototype,"_version",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,value:!0})],I.prototype,"visible",null),I=r=(0,n.Cg)([(0,m.$)("esri.Graphic")],I)},54339:(e,t,i)=>{function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>n})},62046:(e,t,i)=>{i.d(t,{Fe:()=>c,Nk:()=>o});var r=i(68197),n=i(93397);function o(e){const t=[];return s((0,n.lW)(e),t),t.length?new r.A((0,n.e6)(t[0])):null}function s(e,t){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const r="CIMPolygonSymbol"===e.type;if(i?.symbolLayers)for(const e of i.symbolLayers)if(!(e.colorLocked||r&&((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{s(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const i of e)if(i.join(".")===t.join("."))return;e.push(t)}function l(e,t){const i=t.colorRamp?.type;switch(i){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function c(e,t,i){t instanceof r.A||(t=new r.A(t));const o=(0,n.lW)(e);o&&p(o,t,i)}function p(e,t,i){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===r?.type;if(r?.symbolLayers)for(const e of r.symbolLayers){if(e.colorLocked)continue;if(o)if(i){const{layersToColor:t}=i;if(((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))&&"fill"===t||(0,n.jn)(e)&&"outline"===t)continue}else if((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))continue;const r=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=r;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{p(e.symbol,t,i)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=r;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,i)}}}function d(e,t){const i=e.colorRamp?.type;switch(i){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&m(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":m(e.colorRamp,t)}}function m(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const i=t.clone();i.a=0,e.toColor=i.toArray()}}},63660:(e,t,i)=>{i.d(t,{G:()=>m});var r=i(31635),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),s=i(49186),a=i(29953),l=i(14140);class u{constructor(){this._workerThread=null,this._destroyed=!1}async initialize(){const e=await(0,a.ho)("RasterWorker");this._destroyed?e.close():this._workerThread=e}destroy(){this._destroyed=!0,this._workerThread&&(this._workerThread.close(),this._workerThread=null)}async convertVectorFieldData(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=e.pixelBlock.getTransferableObject().pixelBlock,r=await this._workerThread.invoke("convertVectorFieldData",{pixelBlock:i,type:e.dataType},t);return r?new l.A(r):null}async convertPixelBlockToFeatures(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=await this._workerThread.invoke("convertPixelBlockToFeatures",{pixelBlock:e.pixelBlock.toJSON(),extent:e.extent.toJSON(),fieldNames:e.fieldNames,skipFactor:e.skipFactor,pixelIdOffset:e.pixelIdOffset,imageRowSize:e.imageRowSize},t),r=e.extent.spatialReference?.toJSON();return i.forEach(e=>e.geometry.spatialReference=r),i}computeStatisticsHistograms(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const{transferList:i,pixelBlock:r}=e.pixelBlock.getTransferableObject();return t?.transferPixelsToWorker&&(t={...t,transferList:i}),this._workerThread.invoke("computeStatisticsHistograms",{...e,pixelBlock:r},t)}async decode(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=await this._workerThread.invoke("decode",e,{...t,transferList:[e.data]});return i?new l.A(i):null}async symbolize(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=e.pixelBlock?.getTransferableObject().pixelBlock,r={extent:e.extent?.toJSON(),pixelBlock:i,simpleStretchParams:e.simpleStretchParams,bandIds:e.bandIds},n=await this._workerThread.invoke("symbolize",r,t);return n?new l.A(n):null}async highlightPixels(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i={pixelBlock:e.pixelBlock?.toJSON(),renderedPixelBlock:e.renderedPixelBlock?.toJSON(),highlightOptions:e.highlightOptions},r=await this._workerThread.invoke("highlightPixels",i,t);e.renderedPixelBlock.pixels=r.pixels,e.renderedPixelBlock.mask=r.mask,e.renderedPixelBlock.maskIsAlpha=r.maskIsAlpha}async updateSymbolizer(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=e?.rendererJSON?.histograms;await Promise.all(this._workerThread.broadcast("updateSymbolizer",{symbolizerJSON:e.toJSON(),histograms:i},t))}async updateRasterFunction(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");await Promise.all(this._workerThread.broadcast("updateRasterFunction",{rasterFunctionJSON:e.toJSON()},t))}async process(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=await this._workerThread.invoke("process",{extent:e.extent?.toJSON(),primaryPixelSizes:e.primaryPixelSizes?.map(e=>null!=e?e.toJSON():null),primaryPixelBlocks:e.primaryPixelBlocks.map(e=>e?.getTransferableObject().pixelBlock),primaryRasterIds:e.primaryRasterIds},t);return i?new l.A(i):null}async stretch(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const i={srcPixelBlock:e.pixelBlock.getTransferableObject().pixelBlock,stretchParams:e.stretchParams},r=await this._workerThread.invoke("stretch",i,t);return r?new l.A(r):null}async split(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const i={srcPixelBlock:e.pixelBlock.getTransferableObject().pixelBlock,tileSize:e.tileSize,maximumPyramidLevel:e.maximumPyramidLevel,useBilinear:e.useBilinear},r=await this._workerThread.invoke("split",i,t);return r&&r.forEach((e,t)=>{r.set(t,e?l.A.fromJSON(e):null)}),r}async clipTile(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const i=e.pixelBlock.getTransferableObject().pixelBlock,r={...e,pixelBlock:i},n=await this._workerThread.invoke("clipTile",r,t);return n?l.A.fromJSON(n):null}async estimateStatisticsHistograms(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.pixelBlock)return null;const i={srcPixelBlock:e.pixelBlock.getTransferableObject().pixelBlock};return await this._workerThread.invoke("estimateStatisticsHistograms",i,t)}async mosaicAndTransform(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");if(!e?.srcPixelBlocks?.length)return{pixelBlock:null};const i=e.srcPixelBlocks.map(e=>e?.getTransferableObject()),r={...e,srcPixelBlocks:i.map(e=>e?.pixelBlock)};if(t?.transferPixelsToWorker){const e=i.flatMap(e=>e?.transferList).filter(e=>null!=e);t={...t,transferList:e}}const n=await this._workerThread.invoke("mosaicAndTransform",r,t);return{pixelBlock:n.pixelBlock?new l.A(n.pixelBlock):null,localNorthDirections:n.localNorthDirections}}async createFlowMesh(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i={buffer:e.flowData.data.buffer,maskBuffer:e.flowData.mask.buffer,width:e.flowData.width,height:e.flowData.height},{meshType:r,simulationSettings:n}=e,o=await this._workerThread.invoke("createFlowMesh",{meshType:r,flowData:i,simulationSettings:n},{...t,transferList:[i.buffer,i.maskBuffer]});return{vertexData:new Float32Array(o.vertexBuffer),indexData:new Uint32Array(o.indexBuffer)}}getProjectionOffsetGrid(e,t){if(!this._workerThread)throw new s.A("raster-jobhandler:no-connection","no available worker connection");const i=null!=e.datumTransformation?e.datumTransformation.steps.map(e=>({wkid:e.wkid,wkt:e.wkt,isInverse:e.isInverse})):null,r=null!=e.rasterTransform?e.rasterTransform.toJSON():null,n={projectedExtent:e.projectedExtent.toJSON(),srcBufferExtent:e.srcBufferExtent.toJSON(),pixelSize:e.pixelSize,hasWrapAround:e.hasWrapAround,spacing:e.spacing,datumTransformationSteps:i,rasterTransform:r,isAdaptive:e.isAdaptive,includeGCSGrid:e.includeGCSGrid};return this._workerThread.invoke("getProjectionOffsetGrid",n,t)}}var c=i(14636),p=i(12711),d=i(4095);const m=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this._rasterJobHandlerConfig={instance:null,refCount:0,connectionPromise:null}}get _rasterJobHandler(){return this._rasterJobHandlerConfig.instance}increaseRasterJobHandlerUsage(){this._rasterJobHandlerConfig.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandlerConfig.refCount--,this._rasterJobHandlerConfig.refCount<=0&&this._shutdownJobHandler()}async convertVectorFieldData(e,t,i){if(null==e)return null;const r=this._rasterJobHandler;return r?r.convertVectorFieldData({pixelBlock:e,dataType:t},i):(0,c.FI)(e,t)}async createFlowMesh(e,t){const i=this._rasterJobHandler;return i?i.createFlowMesh(e,t):(0,d.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}_initJobHandler(){const{_rasterJobHandlerConfig:e}=this;if(e.connectionPromise)return e.connectionPromise;const t=new u;return e.connectionPromise=t.initialize().then(()=>{e.instance=t,this.notifyChange("_rasterJobHandler")},()=>{}),e.connectionPromise}_shutdownJobHandler(){const{_rasterJobHandlerConfig:e}=this;e.instance?.destroy(),e.instance=null,e.connectionPromise=null,e.refCount=0,this.notifyChange("_rasterJobHandler"),this._cachedRendererJson=void 0}async _updateSymbolizer(e,t,i,r){const n=this._rasterJobHandlerConfig.instance;if(!n)return;const o=(0,p.$P)({...t.toJSON(),variableName:i});JSON.stringify(this._cachedRendererJson)!==JSON.stringify(o)&&(r&&(e.rasterInfo=r),e.rendererJSON=o,e.bind(),await n.updateSymbolizer(e),this._cachedRendererJson=t.toJSON())}async _symbolize(e,t){const{pixelData:i,bandIds:r,simpleStretchParams:n}=e,o=this._rasterJobHandler;if(o){const e=await o.symbolize({...i,simpleStretchParams:n,bandIds:r},t);return{extent:i.extent,pixelBlock:e}}const s=e.symbolizer.symbolize({...i,simpleStretchParams:n,bandIds:r});return{extent:i.extent,pixelBlock:s}}};return(0,r.Cg)([(0,n.MZ)({clonable:!1})],i.prototype,"_rasterJobHandler",null),(0,r.Cg)([(0,n.MZ)({clonable:!1})],i.prototype,"_cachedRendererJson",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],i.prototype,"_rasterJobHandlerConfig",void 0),i=(0,r.Cg)([(0,o.$)("esri.layers.mixins.RasterJobHandlerMixin")],i),i}},67730:(e,t,i)=>{i.d(t,{A:()=>f});var r,n=i(31635),o=i(68197),s=i(66552),a=i(25482),l=i(90629),u=i(10107),c=i(56507),p=(i(44208),i(87811),i(93223)),d=i(40608),m=i(63988),g=i(30943),y=i(20061);const h=new s.J({flow_from:"flow-from",flow_to:"flow-to"});let f=r=class extends((0,m.h)(a.o)){constructor(e){super(e),this.density=.8,this.color=new o.A([255,255,255,1]),this.maxPathLength=200,this.trailWidth=1.5,this.flowSpeed=10,this.trailLength=100,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null,this.legendOptions=null,this.trailCap="butt",this.background="none"}set visualVariables(e){super.visualVariables=e}clone(){const{density:e,maxPathLength:t,trailWidth:i,flowSpeed:n,trailLength:o,smoothing:s,flowRepresentation:a,trailCap:l,background:u}=this,c=this.color.clone(),p=(this.visualVariables||[]).map(e=>e.clone()),d=this.authoringInfo?.clone(),m=this.legendOptions?.clone();return new r({density:e,color:c,maxPathLength:t,trailWidth:i,flowSpeed:n,trailLength:o,trailCap:l,background:u,smoothing:s,flowRepresentation:a,visualVariables:p,authoringInfo:d,legendOptions:m})}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}};(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],f.prototype,"density",void 0),(0,n.Cg)([(0,u.MZ)({type:o.A,json:{type:[c.jz],write:{allowNull:!0}}})],f.prototype,"color",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0}})],f.prototype,"maxPathLength",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0}})],f.prototype,"trailWidth",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],f.prototype,"flowSpeed",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],f.prototype,"trailLength",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!1}})],f.prototype,"smoothing",void 0),(0,n.Cg)([(0,u.MZ)({type:h.apiValues,json:{type:h.jsonValues,read:{reader:h.read},write:{writer:h.write}}})],f.prototype,"flowRepresentation",void 0),(0,n.Cg)([(0,p.e)({flowRenderer:"flow"}),(0,u.MZ)({json:{write:{isRequired:!0}}})],f.prototype,"type",void 0),(0,n.Cg)([(0,u.MZ)({type:g.A,json:{write:!0}})],f.prototype,"authoringInfo",void 0),(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:!0}})],f.prototype,"legendOptions",void 0),(0,n.Cg)([(0,u.MZ)({type:["butt","round"],json:{write:!0}})],f.prototype,"trailCap",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"background",void 0),f=r=(0,n.Cg)([(0,d.$)("esri.renderers.FlowRenderer")],f)},69208:(e,t,i)=>{i.d(t,{d:()=>s});var r=i(31635),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const s=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,r.Cg)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],i),i}},70328:(e,t,i)=>{i.d(t,{BI:()=>w,DC:()=>p,Ej:()=>m,Ie:()=>f,Jt:()=>M,Ne:()=>g,RF:()=>c,aI:()=>A,fA:()=>s,gE:()=>l,hZ:()=>h,iT:()=>d,is:()=>I,qv:()=>b,vI:()=>y,vY:()=>a,v_:()=>C,vt:()=>o,w1:()=>u});var r=i(5443),n=(i(19419),i(4197));function o(e=C){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=n,a[5]=s,a}function a(e,t=o()){return function(e,t,i,r=o()){return h(r,b),function(e,t,i=0,r=t.length/3){let n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)n=Math.min(n,t[i+3*e]),o=Math.min(o,t[i+3*e+1]),s=Math.min(s,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(r,e,t,i),r}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[i,r,o,s,a,l]=e;return t[0]=i,t[1]=r,t[2]=o,t[3]=i,t[4]=r,t[5]=l,t[6]=i,t[7]=a,t[8]=o,t[9]=i,t[10]=a,t[11]=l,t[12]=s,t[13]=r,t[14]=o,t[15]=s,t[16]=r,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{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 c(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 p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(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 m(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 g(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function y(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function h(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 f(e){return e?h(e,b):o(b)}function M(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 w(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function I(e){return 6===e.length}function A(e,t,i){if(null==e||null==t)return e===t;if(!I(e)||!I(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];o()},73133:(e,t,i)=>{i.d(t,{j:()=>r});const r=(0,i(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})},74797:(e,t,i)=>{i.d(t,{AL:()=>M,DV:()=>y,ER:()=>n,F_:()=>a,Nd:()=>m,Oo:()=>o,dy:()=>d,eS:()=>b,h4:()=>C,jC:()=>f,nq:()=>g,rZ:()=>p,y6:()=>h});var r=i(20437);const n="Raster.",o="Raster.Dim.",s=".Max",a={servicePixelValue:"Raster.ServicePixelValue",rawServicePixelValue:"Raster.ServicePixelValue.Raw",itemPixelValue:"Raster.ItemPixelValue",magnitude:"Raster.Magnitude",direction:"Raster.Direction",variable:"Raster.Variable"},l=new Map([["quarters","Quarter"],["months","Month"],["weeks","Week of the year"],["days","Day of the year"]]);function u(e,t){return new r.A({name:e,alias:t,domain:null,editable:!1,length:50,type:"string"})}function c(e,t){return new r.A({name:e,alias:t,domain:null,editable:!1,type:"double"})}function p(e){return u(a.servicePixelValue,e??"Service Pixel Value")}function d(e){return u(a.rawServicePixelValue,e??"Raw Service Pixel Value")}function m(){return u(a.itemPixelValue,"Item Pixel Value")}function g(e){return u(`${a.servicePixelValue}.${e}`,e)}function y(e){return c(`${a.magnitude}`,"Magnitude"+(e?` (${e})`:""))}function h(){return c(`${a.direction}`,"Direction (°)")}function f(e){return e.fields.filter(e=>"oid"!==e.type&&"value"!==e.name.toLowerCase()).map(e=>{const t=e.clone();return t.name=`${n}${e.name}`,t})}function M(e){const t=new Set,i=new Set,n=new Map;return e.variables.forEach(({dimensions:e})=>{e.forEach(e=>{if(e.recurring)n.set(e.name,e.unit);else{const r="ISO8601"===e.unit?.trim()?t:i;r.add(e.name),e.hasRanges&&r.add(`${e.name}${s}`)}})}),[u(a.variable,"Variable"),...[...t].map(e=>function(e,t){return new r.A({name:e,alias:t,domain:null,editable:!1,type:"date"})}(`${o}${e}`,I(e))),...[...i].map(e=>c(`${o}${e}`,I(e))),...[...n].map(([e,t])=>c(`${o}${e}`,w(e,t)))]}function w(e,t){return t=t?.toLowerCase(),t&&l.has(t)?l.get(t):I(e)}function I(e){const t=e.endsWith(s),i=t?e.slice(0,-4):e,r="StdTime"===i?"Standard Time":"StdZ"===i?"Standard Z":i;return t?`${r} Max`:r}function A(e,t){return t?new Date(e):e}function b(e,t,i){i?.length&&(t[a.variable]=i[0].variableName,i.forEach(({dimensionName:i,values:r})=>{if(i&&r?.length){const n=`${o}${i}`,a=e.find(({name:e})=>e===n);if(!a)return;const l="date"===a.type,u=r[0];if(Array.isArray(u)){if(t[`${o}${i}`]=A(u[0],l),null!=u[1]){const r=`${o}${i}${s}`;if(e.some(({name:e})=>e===r)){const e=A(u[1],l);t[r]=e}}}else t[`${o}${i}`]=A(u,l)}}))}function C(e,t){if(t.pixelType.startsWith("f")&&e.forEach(({format:e,fieldName:t})=>{e&&t&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)}),t.multidimensionalInfo){const i=t.multidimensionalInfo.variables.flatMap(({dimensions:e})=>e);e.forEach(({format:e,fieldName:t})=>{if(e&&t?.startsWith(o)){const r=t.slice(o.length),n=`${r}${s}`,a=i.find(({name:e})=>e===r||e===n);a?.values?.every(e=>Number.isInteger(e))&&(e.places=0)}})}}},76353:(e,t,i)=>{function r(e){return"Function"===e?.datasetFormat}function n(e){return r(e)?e.primaryRasters.rasters:[e]}i.d(t,{p:()=>n,q:()=>r})},77301:(e,t,i)=>{i.d(t,{$E:()=>C,DY:()=>f,NG:()=>b,QW:()=>s,Rp:()=>m,XU:()=>g,Xg:()=>A,ct:()=>y,fy:()=>h,xx:()=>a,z2:()=>M});var r=i(4576),n=i(45617);function o(e,t,i){const r=t.shift();if(0===i.length){const e=[];i.push({sliceId:-1,multidimensionalDefinition:e})}const n=i.length;for(let t=0;t<n;t++){const t=i.shift().multidimensionalDefinition;r.values?.forEach(n=>{i.push({sliceId:-1,multidimensionalDefinition:[...t,{variableName:e,dimensionName:r.name,values:[n]}]})})}t.length&&o(e,t,i)}function s(e,t){const i=[];let r=0;return(t?e.variables.filter(e=>e.name.toLowerCase()===t.toLowerCase()):[...e.variables].sort((e,t)=>e.name>t.name?1:-1)).forEach(e=>{const t=[],n=[...e.dimensions].sort((e,t)=>e.name>t.name?-1:1);o(e.name,n,t),t.forEach(e=>{i.push({...e,sliceId:r++})})}),i}function a(e,t,i){let r=e;if(t&&(t=[...t].sort((e,t)=>e.dimensionName<t.dimensionName?-1:1)).forEach(({dimensionName:e,values:t,isSlice:i})=>{t.length&&(r=r.filter(r=>{const n=r.multidimensionalDefinition.find(t=>t.dimensionName===e);if(null==n)return!1;const o=n.values[0];return"number"==typeof o?"number"==typeof t[0]?t.includes(o):t.some(e=>e[0]<=o&&e[1]>=o):"number"==typeof t[0]?t.some(e=>o[0]<=e&&o[1]>=e):i?t.some(e=>e[0]===o[0]&&e[0]===o[1]):t.some(e=>e[0]>=o[0]&&e[0]<=o[1]||e[1]>=o[0]&&e[1]<=o[1]||e[0]<o[0]&&e[1]>o[1])}))}),r.length&&null!=i?.start&&null!=i.end){const e=i.start.getTime(),t=i.end.getTime(),n=r[0].multidimensionalDefinition.findIndex(e=>"StdTime"===e.dimensionName);n>-1&&(r=r.filter(i=>{const r=i.multidimensionalDefinition[n].values[0];return e<=r&&t>=r}))}return r.map(e=>e.sliceId)}function l(e,t){return Array.isArray(e)?t[0]===t[1]?e[0]===t[0]||e[1]===t[0]:e[0]>=t[0]&&e[0]<=t[1]&&e[1]>=t[0]&&e[1]<=t[1]:e>=t[0]&&e<=t[1]}function u(e,t){return e[0]<=t[0]&&e[1]>=t[0]||e[0]<=t[1]&&e[1]>=t[1]||e[0]>=t[0]&&e[1]<=t[1]}function c(e){return 1===e.length?[e[0],e[0]]:[e[0],e[e.length-1]]}function p(e,t,i){if(!t?.subsetDefinitions?.length)return e;let r;if(i){const{variables:n}=t;if(n.length&&!n.includes(i))return null;const o=t.subsetDefinitions.find(t=>t.dimensionName===e.name&&t.variableName===i);if(!o?.values?.length)return e;r=c(o.values)}else{const i=t.dimensions.find(({name:t})=>t===e.name);r=i?.extent}const n=r;if(!n?.length)return e;const o=e.values.filter(e=>l(e,n));return{...e,extent:[...n],values:o}}function d(e,t,i){if(!t?.subsetDefinitions?.length)return!1;const{variables:r}=t;if(r.length&&e.some(({variableName:e})=>e&&!r.includes(e)))return!0;for(let r=0;r<e.length;r++){const n=e[r],o=t.subsetDefinitions.find(e=>(""===n.variableName||e.variableName===n.variableName)&&e.dimensionName===n.dimensionName);if(o?.values.length){const e=c(o.values);if(n.isSlice||2!==n.values.length||Array.isArray(n.values[0])||n.values[0]===n.values[1]||!i){if(n.values.some(t=>!l(t,e)))return!0}else if(!u(n.values,e))return!0}}return!1}function m(e,t){if(null==e)return{isOutside:!1};const{geometry:i,timeExtent:r,multidimensionalDefinition:o}=t;let s=null;if(null!=r&&(s=function(e,t){const i=e.dimensions.find(({name:e})=>"StdTime"===e);if(null==i||null==t.start&&null==t.end)return t;t=t.clone();const{start:r,end:o}=t.toJSON(),s=r===o?[r]:null!=r&&null!=o?[r,o]:[r??o];return 2===s.length&&i?.extent.length&&(s[0]=Math.max(s[0],i.extent[0]),s[1]=Math.min(s[1],i.extent[1]??i.extent[0]),s[1]<s[0])||d([new n.A({variableName:"",dimensionName:"StdTime",isSlice:1===s.length,values:s})],e,!0)?null:(t.start=new Date(s[0]),t.end=new Date(s[1]??s[0]),t)}(e,r),null==s))return{isOutside:!0};const{areaOfInterest:a}=e;if(a&&i){const e="point"===i.type?i:"extent"===i.type?i.center:"polygon"===i.type?i.centroid:null;if(e&&!a.contains(e))return{isOutside:!0}}return null!=o&&o.length&&d(o,e,!0)?{isOutside:!0}:{isOutside:!1,intersection:{geometry:i,timeExtent:s,multidimensionalDefinition:o}}}function g(e){const{rasterInfo:t,multidimensionalSubset:i}=e,{multidimensionalInfo:r}=t;if(null==r)return null;let n=e.multidimensionalDefinition?.length?e.multidimensionalDefinition:h(t,{multidimensionalSubset:i});if(!n?.length)return null;if(n.some(e=>!e.dimensionName)){const{variableName:e}=n[0],r=h(t,{multidimensionalSubset:i,variableName:e});r?.forEach(e=>{const t=n?.find(({dimensionName:t})=>t===e.dimensionName);t?.values?.length&&(e.values=t.values,e.isSlice=t.isSlice)}),n=r}const{timeExtent:o}=e;if(null!=n&&null!=o&&(null!=o.start||null!=o.end)){n=n.map(e=>e.clone());const e=r.variables.find(({name:e})=>e===n[0].variableName)?.dimensions?.find(({name:e})=>"StdTime"===e),t=n.find(({dimensionName:e})=>"StdTime"===e);if(!e||!t)return null;const{start:i,end:s}=o,a=null==i?null:i.getTime(),l=null==s?null:s.getTime(),u=a??l,c=l??a;if(null!=e.values){const i=e.values.filter(e=>{if(Array.isArray(e)){if(u===c)return e[0]<=u&&e[1]>=u;const t=e[0]<=u&&e[1]>u||e[0]<c&&e[1]>=c,i=e[0]>=u&&e[1]<=c||e[0]<u&&e[1]>c;return t||i}return u===c?e===u:e>=u&&e<=c});if(i.length){const e=i.sort((e,t)=>{const i=Array.isArray(e)?e[0]:e,r=Array.isArray(e)?e[1]:e,n=Array.isArray(t)?t[0]:t,o=Array.isArray(t)?t[1]:t;return u===c?i-n:Math.abs(r-c)-Math.abs(o-c)})[0];t.values=[e]}else n=null}else if(e.hasRegularIntervals&&e.extent){const[i,r]=e.extent;u>r||c<i?n=null:t.values=u===c?[u]:[Math.max(i,u),Math.min(r,c)]}}return null!=n&&d(n,i)?null:n}function y(e,t={}){const{multidimensionalInfo:i,keyProperties:r}=e;if(null==i)return null;const{variableName:n,multidimensionalSubset:o,multidimensionalDefinition:s}=t,a=null!=s?s[0]?.variableName:null,l=n||a||r?.DefaultVariable;let{variables:u}=i;return o?.variables?.length&&(u=u.filter(({name:e})=>o.variables.includes(e))),l?u.find(({name:e})=>e===l)??u[0]:u[0]}function h(e,t={}){const i=y(e,t);if(!i)return null;const r=[],{dimensions:o,name:s}=i;if(0===o.length)return[new n.A({variableName:s,dimensionName:"",values:[],isSlice:!0})];for(let e=0;e<o.length;e++){const i=p(o[e],t.multidimensionalSubset,s);if(!i)return null;const{values:a,extent:l}=i;let u=a?.[0]??l?.[0];"stdz"===i.name.toLowerCase()&&!i.hasRanges&&l&&Math.abs(l[1])<=Math.abs(l[0])&&(u=a?.length?a[a.length-1]:l[1]),r.push(new n.A({variableName:s,dimensionName:i.name,values:[u],isSlice:!t.useRangeForRangedDimensionInfo||!!i.hasRanges}))}return r}function f(e){return!!e?.length&&e.some(e=>{if(null==e.values)return!0;const t=e.values.length;return 0===t||t>1||!e.isSlice&&Array.isArray(e.values[0])})}function M(e,t){if(null==t||null==e)return null;let i=t.variables.map(e=>({...e}));return e?.variables?.length&&(i=i.filter(({name:t})=>e.variables.includes(t)),i.forEach(t=>{t.dimensions=t.dimensions.map(i=>p(i,e,t.name)).filter(r.Ru)})),i}function w(e,t){const{values:i}=t;if(i?.length){const t=Array.isArray(i[0]),r=Array.isArray(e);return t!==r?-1:t&&r?i.findIndex(t=>t[0]===e[0]&&t[1]===e[1]):i.indexOf(e)}const{extent:r}=t;if(Array.isArray(e)||!r||e<r[0]||e>r[1])return-1;const n=t.interval||1;if("ISO8601"!==t.unit)return Math.round((e-r[0])/n);const o=r[0];let s=-1;switch(t.intervalUnit?.toLowerCase()||"days"){case"seconds":s=Math.round((e-o)/1e3/n);break;case"minutes":s=Math.round((e-o)/6e4/n);break;case"hours":s=Math.round((e-o)/36e5/n);break;case"days":s=Math.round((e-o)/864e5/n);break;case"months":{const t=new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear(),i=new Date(o).getUTCMonth(),r=new Date(e).getUTCMonth();s=0===t?r-i:r+11-i+12*(t-1)}break;case"years":s=Math.round((new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear())/n);break;case"decades":s=Math.round((new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear())/10/n)}return s}function I(e){let t=e.values?.length;if(t)return t;const{extent:i,unit:r}=e,n=e.interval||1,o=i?i[1]-i[0]:0;if("ISO8601"!==r)return Math.round(o/n);switch(e.intervalUnit?.toLowerCase()??"seconds"){case"seconds":t=Math.round(o/1e3/n);break;case"minutes":t=Math.round(o/6e4/n);break;case"hours":t=Math.round(o/36e5/n);break;case"days":t=Math.round(o/864e5/n);break;case"months":if(i){const e=new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear(),r=new Date(i[0]).getUTCMonth(),n=new Date(i[1]).getUTCMonth();t=0===e?n-r+1:n+11-r+12*(e-1)+1}else t=0;break;case"years":t=i?Math.round((new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear())/n):0;break;case"decades":t=i?Math.round((new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear())/10/n):0;break;default:t=0}return t}function A(e){if(2!==e.extent?.length||!e.interval)return[];const{extent:[t,i],interval:r}=e;if("ISO8601"===e.unit){const n=e.intervalUnit?.toLowerCase()??"days";return["decades","years","months","days","hours","minutes","seconds"].includes(n)?function(e,t,i,r){const n=[];let o=e;const s=new Date(e);for(;o<=t;)switch(n.push(o),r){case"decades":s.setUTCFullYear(s.getUTCFullYear()+10*i),o=s.getTime();break;case"years":s.setUTCFullYear(s.getUTCFullYear()+i),o=s.getTime();break;case"months":s.setUTCMonth(s.getUTCMonth()+i),o=s.getTime();break;case"days":o+=864e5*i;break;case"hours":o+=36e5*i;break;case"minutes":o+=6e4*i;break;case"seconds":o+=1e3*i}return 1===n.length?n[1]=t:n[n.length-1]=t,n}(t,i,r,n):[]}const n=Math.round((i-t)/r);return Array.from({length:n},(e,o)=>o===n-1?i:t+o*r)}function b(e,t){let i=0;const r=e[0].variableName,n=[...t.variables].sort((e,t)=>e.name>t.name?1:-1);for(let t=0;t<n.length;t++){const o=n[t],s=[...o.dimensions].sort((e,t)=>e.name>t.name?-1:1);if(o.name!==r){i+=s.map(e=>I(e)).reduce((e,t)=>e*t);continue}const a=s.map(e=>I(e)),l=s.length;for(let t=0;t<l;t++){const r=e.find(e=>e.dimensionName===s[t].name);if(null==r)return null;const n=w(r.values[0],s[t]);if(-1===n)return null;a.shift(),i+=t===l-1?n:n*a.reduce((e,t)=>e*t)}break}return i}function C(e){return Math.round(24*(e-25569)*3600*1e3)}},80498:(e,t,i)=>{i.d(t,{A:()=>m});var r=i(31635),n=i(25482),o=i(10107),s=(i(44208),i(53966),i(87811),i(93223)),a=i(40608),l=i(68197),u=i(56507);let c=class extends n.o{constructor(e){super(e),this.value=null,this.label=null,this.color=null}};(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:{isRequired:!0}}})],c.prototype,"value",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{type:[u.jz],write:{isRequired:!0}}})],c.prototype,"color",void 0),c=(0,r.Cg)([(0,a.$)("esri.renderers.support.ColormapInfo")],c);var p,d=i(67369);let m=p=class extends n.o{constructor(e){super(e),this.colormapInfos=null,this.type="raster-colormap"}static createFromColormap(e,t){if(!e)return null;const i=5===e[0].length,r=[...e].sort((e,t)=>e[0]-t[0]).map(e=>c.fromJSON({value:e[0],color:i?e.slice(1,5):e.slice(1,4).concat([255]),label:t?t[e[0]]??"":e[0]}));return new p({colormapInfos:r})}static createFromColorramp(e){const t=(0,d.R8)(e);return p.createFromColormap(t)}clone(){return new p({colormapInfos:this.colormapInfos.map(e=>e.toJSON())})}extractColormap(){return this.colormapInfos.map(({value:e,color:t})=>[e,t.r,t.g,t.b,t.a>1?t.a:255*t.a&255]).sort((e,t)=>e[0]-t[0])}};(0,r.Cg)([(0,o.MZ)({type:[c],json:{write:{isRequired:!0}}})],m.prototype,"colormapInfos",void 0),(0,r.Cg)([(0,s.e)({rasterColormap:"raster-colormap"}),(0,o.MZ)({json:{write:{isRequired:!0}}})],m.prototype,"type",void 0),m=p=(0,r.Cg)([(0,a.$)("esri.renderers.RasterColormapRenderer")],m)},80754:(e,t,i)=>{i.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var r=i(82799),n=i(16930),o=i(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},82935:(e,t,i)=>{i.d(t,{B:()=>m,e:()=>g});var r=i(31635),n=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),s=i(40608),a=i(89317),l=i(30524),u=i(96184),c=i(73133),p=i(64272),d=i(26253);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},g=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,n=c.j.fromJSON(i.timeOffsetUnits);return r&&n?new d.T({value:r,unit:n}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r.Cg)([(0,n.MZ)({type:p.T,json:{write:!1}})],i.prototype,"timeExtent",void 0),(0,r.Cg)([(0,n.MZ)({type:d.T})],i.prototype,"timeOffset",void 0),(0,r.Cg)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],i.prototype,"readOffset",null),(0,r.Cg)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],i.prototype,"timeInfo",null),(0,r.Cg)([(0,n.MZ)(m)],i.prototype,"useViewTime",void 0),i=(0,r.Cg)([(0,s.$)("esri.layers.mixins.TemporalLayer")],i),i}},85675:(e,t,i)=>{i.d(t,{A:()=>w});var r,n=i(31635),o=i(66552),s=i(25482),a=i(4718),l=i(10107),u=i(79901),c=i(36005),p=i(40608),d=i(43937),m=i(56507),g=i(86738),y=i(45617),h=i(22796);const f=(0,o.O)()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),M=(0,o.O)()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});let w=r=class extends s.o{constructor(e){super(e),this.ascending=!0,this.itemRasterFunction=null,this.lockRasterIds=null,this.method="none",this.multidimensionalDefinition=null,this.objectIds=null,this.operation="first",this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending}readMethod(e,t){return function(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return M.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)}writeMultidimensionalDefinition(e,t,i){null!=e&&(e=e.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t)).length&&(t[i]=e.map(e=>e.toJSON()))}readOperation(e,t){const i=t.mosaicOperation,r=t.mosaicOperator?.toLowerCase(),n=i||(r?f.toJSON(r):null);return f.fromJSON(n)||"first"}castSortValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:`${e}`}clone(){return new r({ascending:this.ascending,itemRasterFunction:(0,a.o8)(this.itemRasterFunction),lockRasterIds:(0,a.o8)(this.lockRasterIds),method:this.method,multidimensionalDefinition:(0,a.o8)(this.multidimensionalDefinition),objectIds:(0,a.o8)(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:(0,a.o8)(this.viewpoint),where:this.where})}};(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],w.prototype,"ascending",void 0),(0,n.Cg)([(0,c.w)("ascending",["ascending","sortAscending"])],w.prototype,"readAscending",null),(0,n.Cg)([(0,l.MZ)({type:h.A,json:{name:"itemRenderingRule",write:!0}})],w.prototype,"itemRasterFunction",void 0),(0,n.Cg)([(0,l.MZ)({type:[m.jz],json:{write:{overridePolicy(){return{enabled:"lock-raster"===this.method}}}}})],w.prototype,"lockRasterIds",void 0),(0,n.Cg)([(0,l.MZ)({type:M.apiValues,json:{type:M.jsonValues,write:{target:"mosaicMethod",writer:M.write,isRequired:!0}}})],w.prototype,"method",void 0),(0,n.Cg)([(0,c.w)("method",["mosaicMethod","defaultMosaicMethod"])],w.prototype,"readMethod",null),(0,n.Cg)([(0,l.MZ)({type:[y.A],json:{write:!0}})],w.prototype,"multidimensionalDefinition",void 0),(0,n.Cg)([(0,d.K)("multidimensionalDefinition")],w.prototype,"writeMultidimensionalDefinition",null),(0,n.Cg)([(0,l.MZ)({type:[m.jz],json:{name:"fids",write:!0}})],w.prototype,"objectIds",void 0),(0,n.Cg)([(0,l.MZ)({type:f.apiValues,json:{type:f.jsonValues,read:{reader:f.read},write:{target:"mosaicOperation",writer:f.write}}})],w.prototype,"operation",void 0),(0,n.Cg)([(0,c.w)("operation",["mosaicOperation","mosaicOperator"])],w.prototype,"readOperation",null),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{overridePolicy(){return{enabled:"attribute"===this.method}}}}})],w.prototype,"sortField",void 0),(0,n.Cg)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],w.prototype,"sortValue",void 0),(0,n.Cg)([(0,u.w)("sortValue")],w.prototype,"castSortValue",null),(0,n.Cg)([(0,l.MZ)({type:g.A,json:{write:!0}})],w.prototype,"viewpoint",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],w.prototype,"where",void 0),w=r=(0,n.Cg)([(0,p.$)("esri.layers.support.MosaicRule")],w)},92300:(e,t,i)=>{i.d(t,{V:()=>o,X:()=>n});var r=i(65864);function n(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,i){const n=(0,r.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},94359:(e,t,i)=>{i.d(t,{Gj:()=>d,LF:()=>g,uy:()=>p});var r=i(67076),n=i(86162),o=i(67730),s=i(80498),a=i(46981),l=i(36280),u=i(93618),c=i(18031);const p={key:"type",base:null,typeMap:{"class-breaks":n.A,flow:o.A,"raster-colormap":s.A,"raster-shaded-relief":a.A,"raster-stretch":l.A,"unique-value":u.A,"vector-field":c.A}},d={...p,typeMap:{...p.typeMap}};delete d.typeMap["vector-field"];const m={classBreaks:n.A,flowRenderer:o.A,rasterColormap:s.A,rasterShadedRelief:a.A,rasterStretch:l.A,uniqueValue:u.A,vectorField:c.A};function g(e,t){if(!e)return null;if("classBreaks"===e.type&&e.classificationMethod){const t=e.authoringInfo||{classificationMethod:""};t.classificationMethod=e.classificationMethod,e.authoringInfo=t}"vectorField"===e.type&&e.visualVariables&&!Array.isArray(e.visualVariables)&&(e.visualVariables=[e.visualVariables]);const i=(n=e)&&m[n.type]||null;var n;if(i){const r=new i;return r.read(e,t),r}return t?.messages&&e&&t.messages.push(new r.A("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:t})),null}},96184:(e,t,i)=>{i.d(t,{A:()=>g});var r=i(31635),n=i(69540),o=i(25482),s=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),u=i(43937),c=i(64272),p=i(26253),d=i(56400);function m(e,t){return p.T.fromJSON({value:e,unit:t})}let g=class extends((0,n.O)(o.o)){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?c.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,r.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],g.prototype,"cumulative",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],g.prototype,"endField",void 0),(0,r.Cg)([(0,s.MZ)({type:c.T,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"fullTimeExtent",void 0),(0,r.Cg)([(0,a.w)("fullTimeExtent",["timeExtent"])],g.prototype,"readFullTimeExtent",null),(0,r.Cg)([(0,u.K)("fullTimeExtent")],g.prototype,"writeFullTimeExtent",null),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"hasLiveData",void 0),(0,r.Cg)([(0,s.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"interval",void 0),(0,r.Cg)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],g.prototype,"readInterval",null),(0,r.Cg)([(0,u.K)("interval")],g.prototype,"writeInterval",null),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],g.prototype,"startField",void 0),(0,r.Cg)([(0,s.MZ)((0,d.P6)("timeReference",!0))],g.prototype,"timeZone",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],g.prototype,"trackIdField",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],g.prototype,"useTime",void 0),(0,r.Cg)([(0,s.MZ)({type:[Date],json:{read:!1}})],g.prototype,"stops",void 0),g=(0,r.Cg)([(0,l.$)("esri.layers.support.TimeInfo")],g)}}]);