@arcgis/core 4.26.0 → 4.26.1

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 (81) hide show
  1. package/arcade/Feature.js +1 -1
  2. package/arcade/arcadeTimeUtils.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/009cd8f27d2357ec9317.js +1 -0
  6. package/assets/esri/core/workers/chunks/03081e28fe59ba2e8040.js +1 -0
  7. package/assets/esri/core/workers/chunks/17ce4b146825adcca307.js +1 -0
  8. package/assets/esri/core/workers/chunks/186f2d0c94fa1eca4959.js +1 -0
  9. package/assets/esri/core/workers/chunks/1fd48420dfbbfdb3b051.js +1 -0
  10. package/assets/esri/core/workers/chunks/226bfa115acb8542f21c.js +1 -0
  11. package/assets/esri/core/workers/chunks/{25abc848a128b24ff66e.js → 3808f33563757fad703d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/38ebf5d20576609566f9.js +1 -0
  13. package/assets/esri/core/workers/chunks/4125b10b1d009f35e75e.js +1 -0
  14. package/assets/esri/core/workers/chunks/48d35993b6ffb76e56e9.js +1 -0
  15. package/assets/esri/core/workers/chunks/5022862c5658e7bb0e04.js +1 -0
  16. package/assets/esri/core/workers/chunks/55782608bee89fa0d6e1.js +1 -0
  17. package/assets/esri/core/workers/chunks/5598996bcf60741aa734.js +1 -0
  18. package/assets/esri/core/workers/chunks/592e9834aa896cdd0e86.js +1 -0
  19. package/assets/esri/core/workers/chunks/5a5e4983c526bf08c7f1.js +1 -0
  20. package/assets/esri/core/workers/chunks/{a6d34147e7dbb1e4609c.js → 5f8acce073b8da5ac6ae.js} +1 -1
  21. package/assets/esri/core/workers/chunks/611c27efa10e4e04d8b6.js +1 -0
  22. package/assets/esri/core/workers/chunks/6ecf0bb8e16159160cde.js +1 -0
  23. package/assets/esri/core/workers/chunks/81949c9d14a8d75c45b6.js +1 -0
  24. package/assets/esri/core/workers/chunks/843a8b87ebecc246598a.js +1 -0
  25. package/assets/esri/core/workers/chunks/84c0a8d41eec91bb5142.js +1 -0
  26. package/assets/esri/core/workers/chunks/85c6a2c7239d0cf73a44.js +1 -0
  27. package/assets/esri/core/workers/chunks/8f3262f33d635cf9f046.js +1 -0
  28. package/assets/esri/core/workers/chunks/9054fd0707a15d037bb9.js +1 -0
  29. package/assets/esri/core/workers/chunks/a2e5b67c1c65a93f3c75.js +1 -0
  30. package/assets/esri/core/workers/chunks/a6e57062917ce1a0afa9.js +1 -0
  31. package/assets/esri/core/workers/chunks/b8b6df646ecf5482c5b4.js +1 -0
  32. package/assets/esri/core/workers/chunks/bcdd71e7475777f0f1bb.js +1 -0
  33. package/assets/esri/core/workers/chunks/{97ba79f9bceb42405573.js → bce1d4d6449a646834a1.js} +1 -1
  34. package/assets/esri/core/workers/chunks/c999e9dd748ae449d66e.js +1 -0
  35. package/assets/esri/core/workers/chunks/cb177fb86cf8cec95e87.js +1 -0
  36. package/assets/esri/core/workers/chunks/{3c557a5728c76843561f.js → d3498d28fd01a0ad3899.js} +1 -1
  37. package/assets/esri/core/workers/chunks/dd698ada6b7c03cfd25c.js +1 -0
  38. package/assets/esri/core/workers/chunks/e26acb83eae5eec87ca1.js +1 -0
  39. package/assets/esri/core/workers/chunks/eca1b840c009e5477b80.js +1 -0
  40. package/assets/esri/core/workers/chunks/fbe981e42e92a32d922d.js +1 -0
  41. package/config.js +1 -1
  42. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  43. package/package.json +1 -1
  44. package/support/revision.js +1 -1
  45. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  46. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  47. package/views/layers/ImageryTileLayerView.js +1 -1
  48. package/widgets/Editor.js +1 -1
  49. package/assets/esri/core/workers/chunks/03a811b5a912d83792dd.js +0 -1
  50. package/assets/esri/core/workers/chunks/0923c0641ca9d9a52efc.js +0 -1
  51. package/assets/esri/core/workers/chunks/1aff09c90f287eeba408.js +0 -1
  52. package/assets/esri/core/workers/chunks/1faf0e2aeabe003e2f64.js +0 -1
  53. package/assets/esri/core/workers/chunks/29662688eedc6df54d4b.js +0 -1
  54. package/assets/esri/core/workers/chunks/2b94b1bc4634f0518890.js +0 -1
  55. package/assets/esri/core/workers/chunks/3664d97f0c2819690cf9.js +0 -1
  56. package/assets/esri/core/workers/chunks/3d457f987e2089d67e89.js +0 -1
  57. package/assets/esri/core/workers/chunks/41d25407888326c91566.js +0 -1
  58. package/assets/esri/core/workers/chunks/4503194b1b1d8908a386.js +0 -1
  59. package/assets/esri/core/workers/chunks/4a264b7cfd0a4bc62be9.js +0 -1
  60. package/assets/esri/core/workers/chunks/4cddaa79af86b0981baa.js +0 -1
  61. package/assets/esri/core/workers/chunks/582d12138e6eea62d6fe.js +0 -1
  62. package/assets/esri/core/workers/chunks/5e9869849d999aac5756.js +0 -1
  63. package/assets/esri/core/workers/chunks/636b4e080d701d5856c7.js +0 -1
  64. package/assets/esri/core/workers/chunks/69c89c01783250811b56.js +0 -1
  65. package/assets/esri/core/workers/chunks/72c827a5388a4b1112e3.js +0 -1
  66. package/assets/esri/core/workers/chunks/7db8a429ef7bf11c5bb6.js +0 -1
  67. package/assets/esri/core/workers/chunks/8d52093b6c4bfd087a12.js +0 -1
  68. package/assets/esri/core/workers/chunks/9b449a036598479ad0b0.js +0 -1
  69. package/assets/esri/core/workers/chunks/9c67598554e0d2b2c14a.js +0 -1
  70. package/assets/esri/core/workers/chunks/9f8aad19c5973e201604.js +0 -1
  71. package/assets/esri/core/workers/chunks/9ff12db2f3dcd5749053.js +0 -1
  72. package/assets/esri/core/workers/chunks/a0e3b837262d6d64f605.js +0 -1
  73. package/assets/esri/core/workers/chunks/a213fb1cd2b5da2b7027.js +0 -1
  74. package/assets/esri/core/workers/chunks/aa864f9ad6b9a92ab328.js +0 -1
  75. package/assets/esri/core/workers/chunks/bb6e4affafef9855b8fd.js +0 -1
  76. package/assets/esri/core/workers/chunks/bd711b7229aa5cfa063b.js +0 -1
  77. package/assets/esri/core/workers/chunks/e384e1daec50f8cdcdd1.js +0 -1
  78. package/assets/esri/core/workers/chunks/eccc725bc3f8047171f7.js +0 -1
  79. package/assets/esri/core/workers/chunks/f3b59aa3b33e3ee70bec.js +0 -1
  80. package/assets/esri/core/workers/chunks/f7ed302a233d4cfb9060.js +0 -1
  81. package/assets/esri/core/workers/chunks/fd03ba4613f8973f8c86.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1227,5159],{3920:(e,t,r)=>{r.d(t,{p:()=>p,r:()=>u});var o=r(43697),s=r(15923),i=r(61247),n=r(5600),a=r(52011),l=r(72762);const p=e=>{let t=class extends e{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new i.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,o._)([(0,n.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,o._)([(0,n.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,o._)([(0,a.j)("esri.core.HandleOwner")],t),t};let u=class extends(p(s.Z)){};u=(0,o._)([(0,a.j)("esri.core.HandleOwner")],u)},42033:(e,t,r)=>{r.d(t,{E:()=>s,_:()=>i});var o=r(70586);async function s(e,t){const{WhereClause:o}=await r.e(1534).then(r.bind(r,41534));return o.create(e,t)}function i(e,t){return(0,o.pC)(e)?(0,o.pC)(t)?`(${e}) AND (${t})`:e:t}},72762:(e,t,r)=>{r.d(t,{t:()=>y});var o=r(43697),s=r(15923),i=r(61247),n=r(70586),a=r(17445),l=r(1654),p=r(5600),u=r(52011);let y=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new i.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,r={}){return this._installWatch(e,t,r,a.YP)}addWhen(e,t,r={}){return this._installWatch(e,t,r,a.gx)}addOnCollectionChange(e,t,{initial:r=!1,final:o=!1}={}){const s=++this._handleId;return this._handles.add([(0,a.on)(e,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:o?e=>t({added:[],removed:e.toArray()}):void 0})],s),{remove:()=>this._handles.remove(s)}}addPromise(e){if((0,n.Wi)(e))return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const r=()=>this._handles.remove(t);return e.then(r,r),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,r={},o){const s=++this._handleId;r.sync||this._installSyncUpdatingWatch(e,s);const i=o(e,t,r);return this._handles.add(i,s),{remove:()=>this._handles.remove(s)}}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),o=(0,a.YP)(e,r,{sync:!0,equals:()=>!1});return this._handles.add(o,t),o}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,o._)([(0,p.Cb)({readOnly:!0})],y.prototype,"updating",void 0),y=(0,o._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],y);const d=-42},16306:(e,t,r)=>{r.d(t,{aX:()=>v});var o=r(68773),s=r(20102),i=r(92604),n=r(70586),a=r(38913),l=r(58901),p=r(73913),u=r(8744),y=r(40488),d=(r(66577),r(3172)),c=r(33955),h=r(11282),f=r(17452);async function m(e,t,r){const o="string"==typeof e?(0,f.mN)(e):e,s=t[0].spatialReference,i=(0,c.Ji)(t[0]),n={...r,query:{...o.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,d.default)(o.path+"/simplify",n);var l;return function(e,t,r){const o=(0,c.q9)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}(a.geometries,i,s)}const g=i.Z.getLogger("esri.geometry.support.normalizeUtils");function S(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g.error(e),new s.Z(e)}const r=(0,p.x3)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const s=e[o][0],i=e[o][1],n=e[o+1][0],a=e[o+1][1],l=Math.sqrt((n-s)*(n-s)+(a-i)*(a-i)),p=(a-i)/l,u=(n-s)/l,y=l/t;if(y>1){for(let e=1;e<=y-1;e++){const o=e*t,n=u*o+s,a=p*o+i;r.push([n,a])}const e=(l+Math.floor(y-1)*t)/2,o=u*e+s,n=p*e+i;r.push([o,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:o,spatialReference:e.spatialReference}):new l.Z({paths:o,spatialReference:e.spatialReference})}(e,1e6);e=(0,y.Sx)(t,!0)}return r&&(e=(0,p.Sy)(e,r)),e}function _(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,p.XZ)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,p.XZ)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,p.XZ)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,p.XZ)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function C(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const s=t.cutIndexes[o],i=t.geometries[o],n=(0,p.x3)(i);for(let e=0;e<n.length;e++){const t=n[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,p.XZ)(r,180);for(let r=0;r<t.length;r++){const t=i.getPoint(e,r);i.setPoint(e,r,t.clone().offset(o,0))}return!0}}))}if(s===r){if(S(e))for(const t of(0,p.x3)(i))e[s]=e[s].addRing(t);else if(w(e))for(const t of(0,p.x3)(i))e[s]=e[s].addPath(t)}else r=s,e[s]=i}return e}async function v(e,t,r){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&g.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??o.Z.geometryServiceUrl;let i,f,S,w,x,O,T,R,N=0;const Z=[],j=[];for(const t of e)if((0,n.Wi)(t))j.push(t);else if(i||(i=t.spatialReference,f=(0,u.C5)(i),S=i.isWebMercator,O=S?102100:4326,w=p.UZ[O].maxX,x=p.UZ[O].minX,T=p.UZ[O].plus180Line,R=p.UZ[O].minus180Line),f)if("mesh"===t.type)j.push(t);else if("point"===t.type)j.push(_(t.clone(),w,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,w,x))),j.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,f);j.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,p.XZ)(e.xmin,x)*(2*w);let o=0===r?t.clone():(0,p.Sy)(t.clone(),r);e.offset(r,0),e.intersects(T)&&e.xmax!==w?(N=e.xmax>N?e.xmax:N,o=b(o,S),Z.push(o),j.push("cut")):e.intersects(R)&&e.xmin!==x?(N=e.xmax*(2*w)>N?e.xmax*(2*w):N,o=b(o,S,360),Z.push(o),j.push("cut")):j.push(o)}else j.push(t.clone());else j.push(t);let M=(0,p.XZ)(N,w),A=-90;const F=M,L=new l.Z;for(;M>0;){const e=360*M-180;L.addPath([[e,A],[e,-1*A]]),A*=-1,M--}if(Z.length>0&&F>0){const t=C(Z,await async function(e,t,r,o){const s=(0,h.en)(e),i=t[0].spatialReference,n={...o,query:{...s.query,f:"json",sr:JSON.stringify(i),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,d.default)(s.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,c.im)(e);return t.spatialReference=i,t}))}}(s,Z,L,r)),o=[],i=[];for(let r=0;r<j.length;r++){const s=j[r];if("cut"!==s)i.push(s);else{const s=t.shift(),a=e[r];(0,n.pC)(a)&&"polygon"===a.type&&a.rings&&a.rings.length>1&&s.rings.length>=a.rings.length?(o.push(s),i.push("simplify")):i.push(S?(0,y.$)(s):s)}}if(!o.length)return i;const a=await m(s,o,r),l=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?l.push(t):l.push(S?(0,y.$)(a.shift()):a.shift())}return l}const I=[];for(let e=0;e<j.length;e++){const t=j[e];if("cut"!==t)I.push(t);else{const e=Z.shift();I.push(!0===S?(0,y.$)(e):e)}}return I}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>n,XZ:()=>a,x3:()=>p});var o=r(58901),s=r(82971),i=r(33955);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator}),minus180Line:new o.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.Z({paths:[[[180,-180],[180,180]]],spatialReference:s.Z.WGS84}),minus180Line:new o.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:s.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=p(e);for(const e of r)for(const r of e)r[0]+=t;return e}function p(e){return(0,i.oU)(e)?e.rings:e.paths}},62128:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Y});var o=r(43697),s=(r(66577),r(38171)),i=(r(9790),r(46791)),n=r(20102),a=r(22974),l=r(70586),p=r(16453),u=r(78286),y=r(20941),d=r(5600),c=r(75215),h=r(71715),f=r(52011),m=r(30556),g=r(44547),S=r(24470),w=r(16306),b=r(8744),_=r(19238),C=(r(67676),r(70921)),v=r(3920);r(80442),r(92604);let x=class extends((0,v.p)(i.Z)){constructor(e){super(e),this.handles.add([this.on("before-add",(e=>{(0,l.Wi)(e.item)&&e.preventDefault()})),this.on("after-add",(e=>this._own(e.item))),this.on("after-remove",(e=>this._release(e.item)))])}get owner(){return this._get("owner")}set owner(e){e!==this._get("owner")&&(this._releaseAll(),this._set("owner",e),this._ownAll())}_ownAll(){for(const e of this.items)this._own(e)}_releaseAll(){for(const e of this.items)this._release(e)}_createNewInstance(e){return this.itemType?new(i.Z.ofType(this.itemType.Type))(e):new i.Z(e)}};(0,o._)([(0,d.Cb)()],x.prototype,"owner",null),x=(0,o._)([(0,f.j)("esri.core.support.OwningCollection")],x);var O=r(87085),T=r(71612),R=r(72965),N=r(52421);let Z=class extends x{_own(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}_release(e){e.layer===this.owner&&(e.layer=null)}};(0,o._)([(0,N.c)({Type:s.Z,ensureType:(0,c.se)(s.Z)})],Z.prototype,"itemType",void 0),Z=(0,o._)([(0,f.j)("esri.support.GraphicsCollection")],Z);var j=r(86787);let M=class extends((0,T.h)((0,R.M)(O.Z))){constructor(e){super(e),this.elevationInfo=null,this.graphics=new Z,this.screenSizePerspectiveEnabled=!0,this.type="graphics",this.internal=!1}destroy(){this.removeAll(),this.graphics.destroy()}add(e){return this.graphics.add(e),this}addMany(e){return this.graphics.addMany(e),this}removeAll(){return this.graphics.removeAll(),this}remove(e){this.graphics.remove(e)}removeMany(e){this.graphics.removeMany(e)}on(e,t){return super.on(e,t)}graphicChanged(e){this.emit("graphic-update",e)}};var A,F;(0,o._)([(0,d.Cb)({type:j.Z})],M.prototype,"elevationInfo",void 0),(0,o._)([(0,d.Cb)((A=Z,F="graphics",{type:A,cast:C.R,set(e){const t=(0,C.Z)(e,this._get(F),A);t.owner=this,this._set(F,t)}}))],M.prototype,"graphics",void 0),(0,o._)([(0,d.Cb)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,o._)([(0,d.Cb)()],M.prototype,"screenSizePerspectiveEnabled",void 0),(0,o._)([(0,d.Cb)({readOnly:!0})],M.prototype,"type",void 0),(0,o._)([(0,d.Cb)({constructOnly:!0})],M.prototype,"internal",void 0),M=(0,o._)([(0,f.j)("esri.layers.GraphicsLayer")],M);const L=M;var I=r(92908),E=r(38009),P=r(16859),J=r(1231),z=r(20256),D=r(4095),W=r(77987),G=r(78724),Q=r(82971),q=r(6570);function k(e){return"markup"===e.featureCollectionType||e.layers.some((e=>null!=e.layerDefinition.visibilityField||!U(e)))}function U({layerDefinition:e,featureSet:t}){const r=e.geometryType??t.geometryType;return K.find((t=>r===t.geometryTypeJSON&&e.drawingInfo?.renderer?.symbol?.type===t.identifyingSymbol.type))}function H(){return new q.Z({xmin:-180,ymin:-90,xmax:180,ymax:90})}const B=new J.Z({name:"OBJECTID",alias:"OBJECTID",type:"oid",nullable:!1,editable:!1}),X=new J.Z({name:"title",alias:"Title",type:"string",nullable:!0,editable:!0});let V=class extends L{constructor(e){super(e),this.visibilityMode="inherited"}initialize(){for(const e of this.graphics)e.sourceLayer=this.layer;this.graphics.on("after-add",(e=>{e.item.sourceLayer=this.layer})),this.graphics.on("after-remove",(e=>{e.item.sourceLayer=null}))}get fullExtent(){const e=this.layer?.spatialReference,t=this.fullBounds;return e?(0,l.Wi)(t)?(0,g.dz)(H(),e).geometry:(0,S.HH)(t,e):null}get fullBounds(){const e=this.layer?.spatialReference;if(!e)return null;const t=(0,S.cS)();return this.graphics.forEach((r=>{const o=(0,l.pC)(r.geometry)?(0,g.dz)(r.geometry,e).geometry:null;(0,l.pC)(o)&&(0,S.jn)(t,"point"===o.type?o:o.extent,t)})),(0,S.fS)(t,S.Gv)?null:t}get sublayers(){return this.graphics}};(0,o._)([(0,d.Cb)({readOnly:!0})],V.prototype,"fullExtent",null),(0,o._)([(0,d.Cb)({readOnly:!0})],V.prototype,"fullBounds",null),(0,o._)([(0,d.Cb)({readOnly:!0})],V.prototype,"sublayers",null),(0,o._)([(0,d.Cb)()],V.prototype,"layer",void 0),(0,o._)([(0,d.Cb)()],V.prototype,"layerId",void 0),(0,o._)([(0,d.Cb)({readOnly:!0})],V.prototype,"visibilityMode",void 0),V=(0,o._)([(0,f.j)("esri.layers.MapNotesLayer.MapNotesSublayer")],V);const K=[{geometryType:"polygon",geometryTypeJSON:"esriGeometryPolygon",id:"polygonLayer",layerId:0,title:"Polygons",identifyingSymbol:(new z.Z).toJSON()},{geometryType:"polyline",geometryTypeJSON:"esriGeometryPolyline",id:"polylineLayer",layerId:1,title:"Polylines",identifyingSymbol:(new D.Z).toJSON()},{geometryType:"multipoint",geometryTypeJSON:"esriGeometryMultipoint",id:"multipointLayer",layerId:2,title:"Multipoints",identifyingSymbol:(new W.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"pointLayer",layerId:3,title:"Points",identifyingSymbol:(new W.Z).toJSON()},{geometryType:"point",geometryTypeJSON:"esriGeometryPoint",id:"textLayer",layerId:4,title:"Text",identifyingSymbol:(new G.Z).toJSON()}];let $=class extends((0,T.h)((0,R.M)((0,E.q)((0,P.I)((0,p.R)(O.Z)))))){constructor(e){super(e),this.capabilities={operations:{supportsMapNotesEditing:!0}},this.featureCollections=null,this.featureCollectionJSON=null,this.featureCollectionType="notes",this.legendEnabled=!1,this.listMode="hide-children",this.minScale=0,this.maxScale=0,this.spatialReference=Q.Z.WGS84,this.sublayers=new i.Z(K.map((e=>new V({id:e.id,layerId:e.layerId,title:e.title,layer:this})))),this.title="Map Notes",this.type="map-notes",this.visibilityMode="inherited"}readCapabilities(e,t,r){return{operations:{supportsMapNotesEditing:!k(t)&&"portal-item"!==r?.origin}}}readFeatureCollections(e,t,r){if(!k(t))return null;const o=t.layers.map((e=>{const t=new _.default;return t.read(e,r),t}));return new i.Z({items:o})}readLegacyfeatureCollectionJSON(e,t){return k(t)?(0,a.d9)(t.featureCollection):null}get fullExtent(){const e=this.spatialReference,t=(0,S.cS)();return(0,l.pC)(this.sublayers)?this.sublayers.forEach((({fullBounds:e})=>(0,l.pC)(e)?(0,S.jn)(t,e,t):t),t):this.featureCollectionJSON?.layers.some((e=>e.layerDefinition.extent))&&this.featureCollectionJSON.layers.forEach((r=>{const o=(0,g.dz)(r.layerDefinition.extent,e).geometry;(0,l.pC)(o)&&(0,S.jn)(t,o,t)})),(0,S.fS)(t,S.Gv)?(0,g.dz)(H(),e).geometry:(0,S.HH)(t,e)}readMinScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.minScale)return e.layerDefinition.minScale;return 0}readMaxScale(e,t){for(const e of t.layers)if(null!=e.layerDefinition.maxScale)return e.layerDefinition.maxScale;return 0}get multipointLayer(){return this._findSublayer("multipointLayer")}get pointLayer(){return this._findSublayer("pointLayer")}get polygonLayer(){return this._findSublayer("polygonLayer")}get polylineLayer(){return this._findSublayer("polylineLayer")}readSpatialReference(e,t){return t.layers.length?Q.Z.fromJSON(t.layers[0].layerDefinition.spatialReference):Q.Z.WGS84}readSublayers(e,t,r){if(k(t))return null;const o=[];let n=t.layers.reduce(((e,t)=>Math.max(e,t.layerDefinition.id??-1)),-1)+1;for(const e of t.layers){const{layerDefinition:t,featureSet:r}=e,i=t.id??n++,a=U(e);if((0,l.pC)(a)){const e=new V({id:a.id,title:t.name,layerId:i,layer:this,graphics:r.features.map((({geometry:e,symbol:t,attributes:r,popupInfo:o})=>s.Z.fromJSON({attributes:r,geometry:e,symbol:t,popupTemplate:o})))});o.push(e)}}return new i.Z(o)}writeSublayers(e,t,r,o){const{minScale:s,maxScale:i}=this;if((0,l.Wi)(e))return;const a=e.some((e=>e.graphics.length>0));if(!this.capabilities.operations.supportsMapNotesEditing)return void(a&&o?.messages?.push(new n.Z("map-notes-layer:editing-not-supported","New map notes cannot be added to this layer")));const p=[];let y=this.spatialReference.toJSON();e:for(const t of e)for(const e of t.graphics)if((0,l.pC)(e.geometry)){y=e.geometry.spatialReference.toJSON();break e}for(const t of K){const r=e.find((e=>t.id===e.id));this._writeMapNoteSublayer(p,r,t,s,i,y,o)}(0,u.RB)("featureCollection.layers",p,t)}get textLayer(){return this._findSublayer("textLayer")}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}read(e,t){"featureCollection"in e&&(e=(0,a.d9)(e),Object.assign(e,e.featureCollection)),super.read(e,t)}async beforeSave(){if((0,l.Wi)(this.sublayers))return;let e=null;const t=[];for(const r of this.sublayers)for(const o of r.graphics)if((0,l.pC)(o.geometry)){const r=o.geometry;e?(0,b.fS)(r.spatialReference,e)||((0,g.Up)(r.spatialReference,e)||(0,g.kR)()||await(0,g.zD)(),o.geometry=(0,g.iV)(r,e)):e=r.spatialReference,t.push(o)}const r=await(0,w.aX)(t.map((e=>e.geometry)));t.forEach(((e,t)=>e.geometry=r[t]))}_findSublayer(e){return(0,l.Wi)(this.sublayers)?null:this.sublayers?.find((t=>t.id===e))??null}_writeMapNoteSublayer(e,t,r,o,s,i,n){const p=[];if(!(0,l.Wi)(t)){for(const e of t.graphics)this._writeMapNote(p,e,r.geometryType,n);this._normalizeObjectIds(p,B),e.push({layerDefinition:{name:t.title,drawingInfo:{renderer:{type:"simple",symbol:(0,a.d9)(r.identifyingSymbol)}},id:t.layerId,geometryType:r.geometryTypeJSON,minScale:o,maxScale:s,objectIdField:"OBJECTID",fields:[B.toJSON(),X.toJSON()],spatialReference:i},featureSet:{features:p,geometryType:r.geometryTypeJSON}})}}_writeMapNote(e,t,r,o){if((0,l.Wi)(t))return;const{geometry:s,symbol:i,popupTemplate:n}=t;if((0,l.Wi)(s))return;if(s.type!==r)return void o?.messages?.push(new y.Z("map-notes-layer:invalid-geometry-type",`Geometry "${s.type}" cannot be saved in "${r}" layer`,{graphic:t}));if((0,l.Wi)(i))return void o?.messages?.push(new y.Z("map-notes-layer:no-symbol","Skipping map notes with no symbol",{graphic:t}));const a={attributes:{...t.attributes},geometry:s.toJSON(),symbol:i.toJSON()};(0,l.pC)(n)&&(a.popupInfo=n.toJSON()),e.push(a)}_normalizeObjectIds(e,t){const r=t.name;let o=(0,I.S)(r,e)+1;const s=new Set;for(const t of e){t.attributes||(t.attributes={});const{attributes:e}=t;(null==e[r]||s.has(e[r]))&&(e[r]=o++),s.add(e[r])}}};(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"capabilities",void 0),(0,o._)([(0,h.r)(["portal-item","web-map"],"capabilities",["layers"])],$.prototype,"readCapabilities",null),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"featureCollections",void 0),(0,o._)([(0,h.r)(["web-map","portal-item"],"featureCollections",["layers"])],$.prototype,"readFeatureCollections",null),(0,o._)([(0,d.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{enabled:!0,target:"featureCollection"}}}}})],$.prototype,"featureCollectionJSON",void 0),(0,o._)([(0,h.r)(["web-map","portal-item"],"featureCollectionJSON",["featureCollection"])],$.prototype,"readLegacyfeatureCollectionJSON",null),(0,o._)([(0,d.Cb)({readOnly:!0,json:{read:!0,write:{enabled:!0,ignoreOrigin:!0}}})],$.prototype,"featureCollectionType",void 0),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"fullExtent",null),(0,o._)([(0,d.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{target:"featureCollection.showLegend",overridePolicy(){return{enabled:null!=this.featureCollectionJSON}}}}}}})],$.prototype,"legendEnabled",void 0),(0,o._)([(0,d.Cb)({type:["show","hide","hide-children"]})],$.prototype,"listMode",void 0),(0,o._)([(0,d.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],$.prototype,"minScale",void 0),(0,o._)([(0,h.r)(["web-map","portal-item"],"minScale",["layers"])],$.prototype,"readMinScale",null),(0,o._)([(0,d.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],$.prototype,"maxScale",void 0),(0,o._)([(0,h.r)(["web-map","portal-item"],"maxScale",["layers"])],$.prototype,"readMaxScale",null),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"multipointLayer",null),(0,o._)([(0,d.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],$.prototype,"operationalLayerType",void 0),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"pointLayer",null),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"polygonLayer",null),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"polylineLayer",null),(0,o._)([(0,d.Cb)({type:Q.Z})],$.prototype,"spatialReference",void 0),(0,o._)([(0,h.r)(["web-map","portal-item"],"spatialReference",["layers"])],$.prototype,"readSpatialReference",null),(0,o._)([(0,d.Cb)({readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],$.prototype,"sublayers",void 0),(0,o._)([(0,h.r)("web-map","sublayers",["layers"])],$.prototype,"readSublayers",null),(0,o._)([(0,m.c)("web-map","sublayers")],$.prototype,"writeSublayers",null),(0,o._)([(0,d.Cb)({readOnly:!0})],$.prototype,"textLayer",null),(0,o._)([(0,d.Cb)()],$.prototype,"title",void 0),(0,o._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],$.prototype,"type",void 0),$=(0,o._)([(0,f.j)("esri.layers.MapNotesLayer")],$);const Y=$},92908:(e,t,r)=>{r.d(t,{S:()=>s,X:()=>o});const o=1;function s(e,t){let r=0;for(const o of t){const t=o.attributes?.[e];"number"==typeof t&&isFinite(t)&&(r=Math.max(r,t))}return r}},54295:(e,t,r)=>{r.d(t,{V:()=>n});var o=r(43697),s=r(5600),i=(r(75215),r(67676),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,o._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,i.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>p});var o=r(43697),s=r(92604),i=r(70586),n=r(5600),a=(r(75215),r(67676),r(52011)),l=r(66677);const p=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,i.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,o._)([(0,n.Cb)()],t.prototype,"title",null),(0,o._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,o._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>y});var o=r(43697),s=r(2368),i=r(35454),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(52011));const p=new i.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,o._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,o._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,o._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const y=u},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var o=r(43697),s=r(2368),i=r(96674),n=r(5600),a=(r(75215),r(67676),r(71715)),l=r(52011),p=r(30556),u=r(72729),y=r(70082);let d=class extends((0,s.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,o._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,o._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,o._)([(0,p.c)("domains")],d.prototype,"writeDomains",null),(0,o._)([(0,n.Cb)({type:[y.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,o._)([(0,l.j)("esri.layers.support.FeatureType")],d);const c=d},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var o,s=r(43697),i=r(46791),n=r(96674),a=r(5600),l=(r(75215),r(67676),r(52011));let p=o=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.Z}clone(){return new o({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,s._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,s._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=o=(0,s._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},72064:(e,t,r)=>{r.d(t,{h:()=>y});var o=r(80442),s=r(70586),i=r(66677);const n={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function a(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function y(e,t){return{analytics:d(e),attachment:c(e),data:h(e),metadata:f(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:S(e),queryTopFeatures:w(e),editing:b(e)}}function d(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:a(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=n[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:a(e,"isDataVersioned",!1),supportsAttachment:a(e,"hasAttachments",!1),supportsM:a(e,"hasM",!1),supportsZ:a(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:a(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const o=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,i.Qc)(r):null,l=o.includes((0,s.pC)(n)&&"MapServer"===n.serverType?"data":"query"),p=o.includes("editing")&&!t.datesInUnknownTimezone;let u=p&&o.includes("create"),y=p&&o.includes("delete"),d=p&&o.includes("update");const c=o.includes("changetracking"),h=t.advancedQueryCapabilities;return p&&!(u||y||d)&&(u=y=d=!0),{supportsCalculate:a(t,"supportsCalculate",!1),supportsTruncate:a(t,"supportsTruncate",!1),supportsValidateSql:a(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:y,supportsEditing:p,supportsChangeTracking:c,supportsQuery:l,supportsQueryAnalytics:a(h,"supportsQueryAnalytic",!1),supportsQueryAttachments:a(h,"supportsQueryAttachments",!1),supportsQueryTopFeatures:a(h,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:a(t,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:a(t,"supportsExceedsLimitStatistics",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,s=e.ownershipBasedAccessControlForFeatures,n=e.archivingInfo,y=e.currentVersion,d=t?.includes("MapServer"),c=!d||y>=(0,o.Z)("mapserver-pbf-version-support"),h=(0,i.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:a(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:a(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:a(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:a(r,"supportsReturningGeometryCentroid",!1),supportsDistance:a(r,"supportsQueryWithDistance",!1),supportsDistinct:a(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:a(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:a(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:a(r,"supportsHavingClause",!1),supportsOrderBy:a(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:a(r,"supportsPagination",!1),supportsQuantization:a(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:a(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:a(e,"supportsReturningQueryGeometry",!1),supportsResultType:a(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:a(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:a(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:a(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:a(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:a(s,"allowOthersToQuery",!0),supportsHistoricMoment:a(n,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:a(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:a(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:a(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:a(r,"supportsFullTextSearch",!1),maxRecordCountFactor:l(e,"maxRecordCountFactor",void 0),maxRecordCount:l(e,"maxRecordCount",void 0),standardMaxRecordCount:l(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:l(e,"tileMaxRecordCount",void 0)}}function S(e){const t=e.advancedQueryCapabilities,r=a(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:a(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function w(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function b(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:a(e,"allowGeometryUpdates",!0),supportsGlobalId:a(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:a(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:a(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:a(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:a(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:a(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:a(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:a(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:a(t,"allowOthersToUpdate",!0)}}},51706:(e,t,r)=>{var o,s;function i(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function n(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?o.Expression:e.field&&"string"==typeof e.field?o.Field:o.Unknown}function l(e,t){const r=t||a(e),i=e.valueUnit||"unknown";return r===o.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}r.d(t,{PS:()=>a,QW:()=>l,RY:()=>o,hL:()=>s,iY:()=>i,qh:()=>n}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(o||(o={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(s||(s={}))},28694:(e,t,r)=>{r.d(t,{p:()=>i});var o=r(70586),s=r(69285);function i(e,t,r){if(!r||!r.features||!r.hasZ)return;const i=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(!(0,o.Wi)(i))for(const e of r.features)i(e.geometry)}},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var o,s=r(43697),i=r(96674),n=r(22974),a=r(5600),l=r(75215),p=r(52011),u=r(30556);let y=o=class extends i.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new o((0,n.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],y.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],y.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,u.c)("start"),(0,u.c)("num")],y.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=o=(0,s._)([(0,p.j)("esri.rest.support.AttachmentQuery")],y),y.from=(0,l.se)(y);const d=y},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var o,s=r(43697),i=r(66577),n=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(70586),y=r(5600),d=(r(75215),r(71715)),c=r(52011),h=r(30556),f=r(82971),m=r(33955),g=r(1231);const S=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=o=class extends l.wq{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){const r=f.Z.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],i=n.Z.fromJSON(s),a=s.geometry&&s.geometry.spatialReference;(0,u.pC)(i.geometry)&&!a&&(i.geometry.spatialReference=r);const l=s.aggregateGeometries,p=i.aggregateGeometries;if(l&&(0,u.pC)(p))for(const e in p){const t=p[e],o=l[e]?.spatialReference;(0,u.pC)(t)&&!o&&(t.spatialReference=r)}o.push(i)}return o}writeGeometryType(e,t,r,o){if(e)return void S.write(e,t,r,o);const{features:s}=this;if(s)for(const e of s)if(e&&(0,u.pC)(e.geometry))return void S.write(e.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=(0,m.im)(e);return o&&!r&&t.spatialReference&&(o.spatialReference=f.Z.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const o=t.features[r];if(o.geometry){const t=e&&e[r];o.geometry=t&&t.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,i=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=i.length;e<t;e++)n?.((0,u.Wg)(i[e].geometry))||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[i,n]}=r,a=this._getHydrationFunction(e,(e=>e*i+o),(e=>s-e*n));for(const{geometry:e}of t)(0,u.pC)(e)&&a&&a(e);return this.transform=null,this}_quantizePoints(e,t,r){let o,s;const i=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===o&&n===s||(i.push([e-o,n-s]),o=e,s=n)}else o=t(a[0]),s=r(a[1]),i.push([o,s])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths,s=[];for(let e=0,i=o.length;e<i;e++){const i=o[e],n=this._quantizePoints(i,t,r);n&&s.push(n)}return s.length>0?((0,m.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths;let s,i;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(s+=o[0],i+=o[1]):(s=o[0],i=o[1]),o[0]=t(s),o[1]=r(i)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const o=e.points;let s,i;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],i+=n[1]):(s=n[0],i=n[1]),n[0]=t(s),n[1]=r(i)}}:null}};(0,s._)([(0,y.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,s._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,y.Cb)({type:[n.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,s._)([(0,d.r)("features")],w.prototype,"readFeatures",null),(0,s._)([(0,y.Cb)({type:[g.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,s._)([(0,y.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:S.read}}})],w.prototype,"geometryType",void 0),(0,s._)([(0,h.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,s._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,s._)([(0,y.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,s._)([(0,y.Cb)({types:i.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,s._)([(0,d.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,s._)([(0,y.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,s._)([(0,h.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,s._)([(0,y.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=o=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},11282:(e,t,r)=>{r.d(t,{cv:()=>a,en:()=>n,lA:()=>i}),r(68773),r(40330);var o=r(22974),s=r(17452);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,s.mN)(e):(0,o.d9)(e)}function a(e,t,r){const o={};for(const s in e){if("declaredClass"===s)continue;const i=e[s];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){o[s]=[];for(let e=0;e<i.length;e++)o[s][e]=a(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(r&&r[s]);o[s]=t?e:JSON.stringify(e)}else o[s]=t?i:JSON.stringify(i);else o[s]=i}return o}r(71058)},58333:(e,t,r)=>{r.d(t,{ET:()=>i,I4:()=>s,eG:()=>l,lF:()=>n,lj:()=>u,qP:()=>a,wW:()=>p});const o=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:o,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:o},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2462],{38171:(e,t,r)=>{r.d(t,{Z:()=>y});var s=r(43697),n=r(66577),i=r(51773),l=r(9790),o=r(2368),a=r(96674),u=r(70586),h=r(99001),c=r(5600),d=(r(75215),r(67676),r(52011)),p=r(33955);function m(e){if(!(0,u.pC)(e))return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let f=class extends((0,o.J)(a.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,h.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,s){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:s}}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),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,u.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:m(this.aggregateGeometries),geometry:(0,u.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,u.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){(0,u.pC)(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,r,s){if(!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(n.attributeName=s),this.layer.graphicChanged(n)}};(0,s._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,p.im)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],f.prototype,"aggregateGeometries",null),(0,s._)([(0,c.Cb)({value:null})],f.prototype,"attributes",null),(0,s._)([(0,c.Cb)({value:null,types:n.qM,json:{read:p.im}})],f.prototype,"geometry",null),(0,s._)([(0,c.Cb)({type:Boolean})],f.prototype,"isAggregate",void 0),(0,s._)([(0,c.Cb)({clonable:"reference"})],f.prototype,"layer",void 0),(0,s._)([(0,c.Cb)({type:i.Z})],f.prototype,"popupTemplate",void 0),(0,s._)([(0,c.Cb)({clonable:"reference"})],f.prototype,"sourceLayer",void 0),(0,s._)([(0,c.Cb)({value:null,types:l.LB})],f.prototype,"symbol",null),(0,s._)([(0,c.Cb)({type:Boolean,value:!0})],f.prototype,"visible",null),f=(0,s._)([(0,d.j)("esri.Graphic")],f),(f||(f={})).generateUID=h.D;const y=f},92835:(e,t,r)=>{r.d(t,{Z:()=>f});var s,n=r(43697),i=r(96674),l=r(70586),o=r(35463),a=r(5600),u=(r(75215),r(67676),r(71715)),h=r(52011),c=r(30556);let d=s=class extends i.wq{static get allTime(){return p}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=(0,l.pC)(this.start)?this.start.getTime():this.start,r=(0,l.pC)(this.end)?this.end.getTime():this.end,s=(0,l.pC)(e.start)?e.start.getTime():e.start,n=(0,l.pC)(e.end)?e.end.getTime():e.end;return t===s&&r===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,o.JE)(t,e))),r=(0,l.yw)(this.end,(t=>{const r=(0,o.JE)(t,e);return t.getTime()===r.getTime()?r:(0,o.Nm)(r,1,e)}));return new s({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=(0,l.R2)(this.start,-1/0,(e=>e.getTime())),r=(0,l.R2)(this.end,1/0,(e=>e.getTime())),n=(0,l.R2)(e.start,-1/0,(e=>e.getTime())),i=(0,l.R2)(e.end,1/0,(e=>e.getTime()));let o,a;if(n>=t&&n<=r?o=n:t>=n&&t<=i&&(o=t),r>=n&&r<=i?a=r:i>=t&&i<=r&&(a=i),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new s;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new s,{start:n,end:i}=this;return(0,l.pC)(n)&&(r.start=(0,o.Nm)(n,e,t)),(0,l.pC)(i)&&(r.end=(0,o.Nm)(i,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=(0,l.pC)(this.start)&&(0,l.pC)(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=(0,l.pC)(this.end)&&(0,l.pC)(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,u.r)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,u.r)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=s=(0,n._)([(0,h.j)("esri.TimeExtent")],d);const p=new d,m=new d({start:void 0,end:void 0}),f=d},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var s=r(43697),n=r(2368),i=r(96674),l=r(35463),o=r(5600),a=(r(75215),r(67676),r(36030)),u=r(52011),h=r(78981);let c=class extends((0,n.J)(i.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.rJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,a.J)(h.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,s._)([(0,u.j)("esri.TimeInterval")],c);const d=c},5732:(e,t,r)=>{r.d(t,{c:()=>s});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},46791:(e,t,r)=>{r.d(t,{Z:()=>A});var s,n=r(43697),i=r(3894),l=r(32448),o=r(22974),a=r(70586),u=r(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(s||(s={}));var h,c=r(1654),d=r(5600),p=r(75215),m=r(52421),f=r(52011),y=r(58971),g=r(10661);const b=new u.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),_=()=>{};function v(e){return e?e instanceof N?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,r,s){const n=Math.min(e.length-r,t.length-s);let i=0;for(;i<n&&e[r+i]===t[s+i];)i++;return i}function x(e,t,r,s){t&&t.forEach(((t,n,i)=>{e.push(t),x(e,r.call(s,t,n,i),r,s)}))}const E=new Set,I=new Set,S=new Set,O=new Map;let T=0,N=h=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof h}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new g.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:T++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof h?{items:e}:e:{}}destroy(){this.removeAll()}*[Symbol.iterator](){yield*this.items}get items(){return(0,y.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(s.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(s.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=_,r.removed=!0,e.splice(e.indexOf(r),1)}}}return this._emitter.on(e,t)}once(e,t){const r=this.on(e,t);return{remove(){r.remove()}}}add(e,t){if((0,y.it)(this._observable),this._emitBeforeChanges(s.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(s.ADD),this}addMany(e,t=this._items.length){if((0,y.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(s.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,v(e)),this._emitAfterChanges(s.ADD),this}at(e){if((0,y.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,y.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return[];const e=this._splice(0,this.length)||[];return this._emitAfterChanges(s.REMOVE),e}clone(){return(0,y.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,y.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,y.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const r=(0,a.j0)(this._splice(0,this.length)),n=r.length;for(let s=0;s<n;s++)e.call(t,r[s],s,r);this._emitAfterChanges(s.REMOVE)}every(e,t){return(0,y.it)(this._observable),this._items.every(e,t)}filter(e,t){let r;return(0,y.it)(this._observable),r=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return(0,y.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,y.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,y.it)(this._observable);const r=[];return x(r,this,e,t),new h(r)}forEach(e,t){return(0,y.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,y.it)(this._observable),this._items[e]}getNextIndex(e){(0,y.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,y.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,y.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,y.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,y.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,y.it)(this._observable);const r=this._items.map(e,t);return new h({items:r})}reorder(e,t=this.length-1){(0,y.it)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(s.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(s.MOVE)}return e}}pop(){if((0,y.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(s.REMOVE),e}push(...e){return(0,y.it)(this._observable),this._emitBeforeChanges(s.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(s.ADD)),this.length}reduce(e,t){(0,y.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,y.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,y.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,y.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(s.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(s.REMOVE),t}removeMany(e){if((0,y.it)(this._observable),!e||!e.length||this._emitBeforeChanges(s.REMOVE))return[];const t=e instanceof h?e.toArray():e,r=this._items,n=[],i=t.length;for(let e=0;e<i;e++){const s=t[e],i=r.indexOf(s);if(i>-1){const s=1+C(t,r,e+1,i+1),l=this._splice(i,s);l&&l.length>0&&n.push.apply(n,l),e+=s-1}}return this._emitAfterChanges(s.REMOVE),n}reverse(){if((0,y.it)(this._observable),this._emitBeforeChanges(s.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(s.MOVE),this}shift(){if((0,y.it)(this._observable),!this.length||this._emitBeforeChanges(s.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(s.REMOVE),e}slice(e=0,t=this.length){return(0,y.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,y.it)(this._observable),this._items.some(e,t)}sort(e){if((0,y.it)(this._observable),!this.length||this._emitBeforeChanges(s.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(s.MOVE),this}splice(e,t,...r){(0,y.it)(this._observable);const n=(t?s.REMOVE:0)|(r.length?s.ADD:0);if(this._emitBeforeChanges(n))return[];const i=this._splice(e,t,r)||[];return this._emitAfterChanges(n),i}toArray(){return(0,y.it)(this._observable),this._items.slice()}toJSON(){return(0,y.it)(this._observable),this.toArray()}toLocaleString(){return(0,y.it)(this._observable),this._items.toLocaleString()}toString(){return(0,y.it)(this._observable),this._items.toString()}unshift(...e){return(0,y.it)(this._observable),!e.length||this._emitBeforeChanges(s.ADD)||(this._splice(0,0,e),this._emitAfterChanges(s.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const s=this._items,n=this.itemType;let i,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(l=s.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let r=0,n=l.length;r<n;r++)i=l[r],t.reset(i),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(r,1),s.splice(e,0,i),e+=1,r-=1,n-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let r=0;r<t;r++)e.reset(l[r]),this.emit("after-remove",e);b.release(e)}}if(r&&r.length){if(n){const e=[];for(const t of r){const r=n.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),i=this.hasEventListener("after-add"),l=e===this.length;if(t||i){const n=b.acquire();n.target=this,n.cancellable=!0;const o=b.acquire();o.target=this,o.cancellable=!1;for(const a of r)t?(n.reset(a),this.emit("before-add",n),n.defaultPrevented||(l?s.push(a):s.splice(e++,0,a),this._set("length",s.length),i&&(o.reset(a),this.emit("after-add",o)))):(l?s.push(a):s.splice(e++,0,a),this._set("length",s.length),o.reset(a),this.emit("after-add",o));b.release(o),b.release(n)}else{if(l)for(const e of r)s.push(e);else s.splice(e,0,...r);this._set("length",s.length)}}return(r&&r.length||l&&l.length)&&this._notifyChangeEvent(r,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=b.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,b.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;E.clear(),I.clear(),S.clear();for(const{added:t,removed:r}of e){if(t)if(0===S.size&&0===I.size)for(const e of t)E.add(e);else for(const e of t)I.has(e)?(S.add(e),I.delete(e)):S.has(e)||E.add(e);if(r)if(0===S.size&&0===E.size)for(const e of r)I.add(e);else for(const e of r)E.has(e)?E.delete(e):(S.delete(e),I.add(e))}const r=i.Z.acquire();E.forEach((e=>{r.push(e)}));const s=i.Z.acquire();I.forEach((e=>{s.push(e)}));const n=this._items,l=t.items,o=i.Z.acquire();if(S.forEach((e=>{l.indexOf(e)!==n.indexOf(e)&&o.push(e)})),t.listeners&&(r.length||s.length||o.length)){const e={target:this,added:r,removed:s,moved:o},n=t.listeners.length;for(let r=0;r<n;r++){const s=t.listeners[r];s.removed||s.callback.call(this,e)}}i.Z.release(r),i.Z.release(s),i.Z.release(o)}E.clear(),I.clear(),S.clear()}};N.ofType=e=>{if(!e)return h;if(O.has(e))return O.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const s=e.typeMap[r].prototype.declaredClass;t?t+=` | ${s}`:t=s}let r=class extends h{};return(0,n._)([(0,m.c)({Type:e,ensureType:"function"==typeof e?(0,p.se)(e):(0,p.N7)(e)})],r.prototype,"itemType",void 0),r=(0,n._)([(0,f.j)(`esri.core.Collection<${t}>`)],r),O.set(e,r),r},(0,n._)([(0,d.Cb)()],N.prototype,"length",void 0),(0,n._)([(0,d.Cb)()],N.prototype,"items",null),N=h=(0,n._)([(0,f.j)("esri.core.Collection")],N);const A=N},57435:(e,t,r)=>{r.d(t,{Z:()=>h});var s=r(43697),n=r(46791),i=r(70586),l=(r(80442),r(20102),r(92604),r(26258),r(87538)),o=r(5600),a=(r(75215),r(67676),r(52011));let u=class extends n.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,i.pC)(this.getCollections)?this.getCollections():null;if((0,i.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,i.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,o.Cb)()],u.prototype,"getCollections",void 0),(0,s._)([(0,o.Cb)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,o.Cb)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,a.j)("esri.core.CollectionFlattener")],u);const h=u},3920:(e,t,r)=>{r.d(t,{p:()=>u,r:()=>h});var s=r(43697),n=r(15923),i=r(61247),l=r(5600),o=r(52011),a=r(72762);const u=e=>{let t=class extends e{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new i.Z}get updatingHandles(){return this._get("updatingHandles")||new a.t}};return(0,s._)([(0,l.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,s._)([(0,l.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,s._)([(0,o.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(n.Z)){};h=(0,s._)([(0,o.j)("esri.core.HandleOwner")],h)},52421:(e,t,r)=>{function s(e){return(t,r)=>{t[r]=e}}r.d(t,{c:()=>s})},17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>a,Z_:()=>f,gx:()=>u,nn:()=>y,on:()=>c,tX:()=>g});var s=r(91460),n=r(50758),i=r(70586),l=r(95330),o=r(26258);function a(e,t,r={}){return h(e,t,r,p)}function u(e,t,r={}){return h(e,t,r,m)}function h(e,t,r={},s){let n=null;const l=r.once?(e,r)=>{s(e)&&((0,i.hw)(n),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(n=(0,o.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return n}function c(e,t,r,l={}){let o=null,u=null,h=null;function c(){o&&u&&(u.remove(),l.onListenerRemove?.(o),o=null,u=null)}function d(e){l.once&&l.once&&(0,i.hw)(h),r(e)}const p=a(e,((e,r)=>{c(),(0,s.vT)(e)&&(o=e,u=(0,s.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return h=(0,n.kB)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,r){if((0,l.Hc)(r))return Promise.reject((0,l.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let o=null;function a(){o=(0,i.hw)(o)}return new Promise(((s,i)=>{o=(0,n.AL)([(0,l.fu)(r,(()=>{a(),i((0,l.zE)())})),h(e,(e=>{a(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,m,t)}function p(e){return!0}function m(e){return!!e}r(87538);const f={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},72762:(e,t,r)=>{r.d(t,{t:()=>c});var s=r(43697),n=r(15923),i=r(61247),l=r(70586),o=r(17445),a=r(1654),u=r(5600),h=r(52011);let c=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new i.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,r={}){return this._installWatch(e,t,r,o.YP)}addWhen(e,t,r={}){return this._installWatch(e,t,r,o.gx)}addOnCollectionChange(e,t,{initial:r=!1,final:s=!1}={}){const n=++this._handleId;return this._handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:s?e=>t({added:[],removed:e.toArray()}):void 0})],n),{remove:()=>this._handles.remove(n)}}addPromise(e){if((0,l.Wi)(e))return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const r=()=>this._handles.remove(t);return e.then(r,r),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,r={},s){const n=++this._handleId;r.sync||this._installSyncUpdatingWatch(e,n);const i=s(e,t,r);return this._handles.add(i,n),{remove:()=>this._handles.remove(n)}}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),s=(0,o.YP)(e,r,{sync:!0,equals:()=>!1});return this._handles.add(s,t),s}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,s._)([(0,u.Cb)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,s._)([(0,h.j)("esri.core.support.WatchUpdatingTracking")],c);const d=-42},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>i,rJ:()=>o}),r(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function i(e,t,r){const s=new Date(e.getTime());if(t&&r){const e=n[r],{getter:i,setter:l,multiplier:o}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[l](s[i]()+t*o)}return s}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,r){return 0===e?0:e*s[t]/s[r]}},91040:(e,t,r)=>{r.d(t,{yZ:()=>n});var s=r(67900);function n(e,t){const r=t||e.extent,n=e.width,i=(0,s.c9)(r&&r.spatialReference);return r&&n?r.width/n*i*s.hd*96:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var s=r(43697),n=r(68773),i=r(38171),l=r(51773),o=r(3172),a=r(46791),u=r(57435),h=r(35454),c=r(22974),d=r(70586),p=r(16453),m=r(95330),f=r(17445),y=r(17452),g=r(5600),b=r(75215),_=r(71715),v=r(52011),w=r(30556),C=r(76169),x=r(6570),E=r(82971),I=r(91040),S=r(8744),O=r(87085),T=r(71612),N=r(38009),A=r(16859),F=r(34760),M=r(72965),L=r(28294),D=r(52162),R=r(66677),j=r(21506),P=r(15923),U=r(3920);r(67676);const Z={visible:"visibleSublayers"};let q=class extends((0,U.p)(P.Z)){constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(Z[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,s=[],n=e=>{const{minScale:r,maxScale:i,sublayers:l,visible:o}=e;o&&(0===t||(0===r||t<=r)&&(0===i||t>=i))&&(l?l.forEach(n):s.push(e))};return r?.forEach(n),s}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:s,version:n}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:s?"TRUE":"FALSE",version:n,layers:t}}};(0,s._)([(0,g.Cb)()],q.prototype,"layer",null),(0,s._)([(0,g.Cb)({readOnly:!0})],q.prototype,"layers",null),(0,s._)([(0,g.Cb)({type:Number})],q.prototype,"scale",void 0),(0,s._)([(0,g.Cb)({readOnly:!0})],q.prototype,"version",null),(0,s._)([(0,g.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),q=(0,s._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],q);var V,B=r(90082),W=r(10699),k=r(90578);let H=0,J=V=class extends((0,W.IG)(p.w)){constructor(e){super(e),this.dimensions=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.addHandles([(0,f.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),f.Z_),(0,f.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),f.Z_),(0,f.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),f.Z_)])}get description(){return this._get("description")}set description(e){this._set("description",e)}get fullExtent(){return this._get("fullExtent")}set fullExtent(e){this._set("fullExtent",e)}readExtent(e,t){return(e=t.extent)?x.Z.fromJSON(e):null}get id(){return this._get("id")??H++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t?.legendUrl??t?.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get name(){return this._get("name")}set name(e){this._set("name",e)}castSublayers(e){return(0,b.se)(a.Z.ofType(V),e)}get title(){return this._get("title")}set title(e){this._set("title",e)}get visible(){return this._get("visible")}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new V;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,s._)([(0,g.Cb)()],J.prototype,"description",null),(0,s._)([(0,g.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,s._)([(0,g.Cb)({value:null})],J.prototype,"fullExtent",null),(0,s._)([(0,_.r)("fullExtent",["extent"])],J.prototype,"readExtent",null),(0,s._)([(0,g.Cb)()],J.prototype,"fullExtents",void 0),(0,s._)([(0,g.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,s._)([(0,g.Cb)({type:String,json:{origins:{"web-document":{read:{source:["legendUrl","legendURL"]},write:{target:"legendUrl",ignoreOrigin:!0}}},read:{source:"legendURL"},write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,s._)([(0,_.r)(["web-document"],"legendUrl")],J.prototype,"readLegendUrl",null),(0,s._)([(0,g.Cb)({value:!0,type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"},origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,s._)([(0,g.Cb)()],J.prototype,"layer",void 0),(0,s._)([(0,g.Cb)()],J.prototype,"maxScale",void 0),(0,s._)([(0,g.Cb)()],J.prototype,"minScale",void 0),(0,s._)([(0,g.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,s._)([(0,g.Cb)({type:String,value:null,json:{read:{source:"name"},write:{ignoreOrigin:!0}}})],J.prototype,"name",null),(0,s._)([(0,g.Cb)()],J.prototype,"parent",void 0),(0,s._)([(0,g.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,s._)([(0,g.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,s._)([(0,g.Cb)()],J.prototype,"sublayers",void 0),(0,s._)([(0,k.p)("sublayers")],J.prototype,"castSublayers",null),(0,s._)([(0,g.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,s._)([(0,g.Cb)({type:String,value:null,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",null),(0,s._)([(0,g.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=V=(0,s._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const Y=J;var G=r(20102);const $={84:4326,83:4269,27:4267};function z(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new G.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const s=ee("Capability",r),n=ee("Service",r),i=s&&ee("Request",s);if(!s||!n||!i)return null;const l=ee("Layer",s);if(!l)return null;const o="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=re("Title",n,"")||re("Name",n,""),u=re("AccessConstraints",n,""),h=/^none$/i.test(u)?"":u,c=re("Abstract",n,""),p=parseInt(re("MaxWidth",n,"5000"),10),m=parseInt(re("MaxHeight",n,"5000"),10),f=ie(i,"GetMap"),y=ne(i,"GetMap"),g=oe(l,o,t);if(!g)return null;let b,_=0;const v=Array.prototype.slice.call(s.childNodes),w=g.sublayers??[],C=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===_?b=e:1===_?(g.name&&(g.name="",C(oe(b,o,t))),C(oe(e,o,t))):C(oe(e,o,t)),_++)}));let E=g.sublayers,I=g.extent;const S=g.fullExtents??[];if(E||(E=[]),0===E.length&&E.push(g),!I){const e=new x.Z(E[0].extent);g.extent=e.toJSON(),I=g.extent}const O=g.spatialReferences.length>0?g.spatialReferences:X(g),T=ne(i,"GetFeatureInfo"),N=T?ie(i,"GetFeatureInfo"):null,A=Q(E),F=g.minScale||0,M=g.maxScale||0,L=g.dimensions??[],D=A.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),R=L.concat(D).filter(ue);let j=null;if(R.length){const e=R.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(d.pC);j={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:h,description:c,dimensions:L,extent:I,fullExtents:S,featureInfoFormats:N,featureInfoUrl:T,mapUrl:y,maxWidth:p,maxHeight:m,maxScale:M,minScale:F,layers:A,spatialReferences:O,supportedImageFormatTypes:f,timeInfo:j,title:a,version:o}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function Q(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Q(r.sublayers)),delete r.sublayers);return t}function K(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const s=t.childNodes[r];if(ae(s)&&s.nodeName===e)return s}return null}function te(e,t){if(null==t)return[];const r=[];for(let s=0;s<t.childNodes.length;s++){const n=t.childNodes[s];ae(n)&&n.nodeName===e&&r.push(n)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function se(e,t,r){if(!e)return null;const s=parseFloat(e.getAttribute("minx")),n=parseFloat(e.getAttribute("miny")),i=parseFloat(e.getAttribute("maxx")),l=parseFloat(e.getAttribute("maxy"));let o,a,u,h;r?(o=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(l)?Number.MAX_VALUE:l,h=isNaN(i)?Number.MAX_VALUE:i):(o=isNaN(s)?-Number.MAX_VALUE:s,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(i)?Number.MAX_VALUE:i,h=isNaN(l)?Number.MAX_VALUE:l);const c=new E.Z({wkid:t});return new x.Z({xmin:o,ymin:a,xmax:u,ymax:h,spatialReference:c})}function ne(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r,s){const n=ee("OnlineResource",r);return n?K("xlink:href",n,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],s=(0,y.mN)(e);for(const e in s.query)s.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+s.query[e]));return s.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function ie(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(d.pC);const s=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&s.push(e)}return s}function le(e,t,r){const s=ee(t,e);if(!s)return r;const{textContent:n}=s;if(null==n||""===n)return r;const i=Number(n);return isNaN(i)?r:i}function oe(e,t,r){if(!e)return null;const s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},n=ee("LatLonBoundingBox",e),i=ee("EX_GeographicBoundingBox",e);let l=null;n&&(l=se(n,4326)),i&&(l=new x.Z(0,0,0,0,new E.Z({wkid:4326})),l.xmin=parseFloat(re("westBoundLongitude",i,"0")),l.ymin=parseFloat(re("southBoundLatitude",i,"0")),l.xmax=parseFloat(re("eastBoundLongitude",i,"0")),l.ymax=parseFloat(re("northBoundLatitude",i,"0"))),n||i||(l=new x.Z(-180,-90,180,90,new E.Z({wkid:4326}))),s.minScale=le(e,"MaxScaleDenominator",0),s.maxScale=le(e,"MinScaleDenominator",0);const o=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const s=parseInt(r.substring(5),10);0===s||isNaN(s)||l||(l="1.3.0"===t?se(e,s,(0,D.A)(s)):se(e,s))}const n=r&&r.indexOf(":");if(n&&n>-1){let i=parseInt(r.substring(n+1,r.length),10);0===i||isNaN(i)||(i=$[i]?$[i]:i);const l="1.3.0"===t?se(e,i,(0,D.A)(i)):se(e,i);l&&s.fullExtents&&s.fullExtents.push(l)}}else if(e.nodeName===o)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=$[t]?$[t]:t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendURL){if("Layer"===e.nodeName){const n=oe(e,t,r);n&&(n.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(n))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(s.legendURL=e.getAttribute("xlink:href"))}}})),s.extent=l?.toJSON(),s.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),s=e.textContent,n=e.getAttribute("unitSymbol")??void 0,i=e.getAttribute("default")??void 0,l="0"!==K("default",e,"0"),o="0"!==K("nearestValue",e,"0"),a="0"!==K("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(s),default:de(i),multipleValues:l,nearestValue:o,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:he(s),unitSymbol:n,default:he(i),multipleValues:l,nearestValue:o}:{name:t,units:r,extent:ce(s),unitSymbol:n,default:ce(i),multipleValues:l,nearestValue:o}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function he(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(d.pC):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(d.pC):r}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?pe(t[2]):void 0}})).filter(d.pC):r.map((e=>new Date(e)))}function pe(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:me(t[1]),months:me(t[2]),days:me(t[3]),hours:me(t[4]),minutes:me(t[5]),seconds:me(t[6])}:null}function me(e){if(!e)return 0;const t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),ge=new Set([3395,54004]),be=new h.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function _e(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,T.h)((0,L.n)((0,F.Q)((0,M.M)((0,N.q)((0,A.I)((0,p.R)(O.Z)))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.url=null,this.version=null,this.addHandles([(0,f.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),f.Z_),(0,f.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),f.Z_),(0,f.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),f.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,d.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(m.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return(0,d.Wi)(this.featureInfoFormats)?null:this.featureInfoFormats.find(_e)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){(0,d.pC)(e)?(_e(e)||ve(e))&&this._override("featureInfoFormat",e):(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat"))}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new E.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Ce(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Ce(t.layers,r)}writeSublayers(e,t,r,s){t.layers=[];const n=new Map,i=e.flatten((({sublayers:e})=>e??[]));for(const e of i)if("number"==typeof e.parent?.id){const t=n.get(e.parent.id);null!=t?t.push(e.id):n.set(e.parent.id,[e.id])}for(const e of i){const r={sublayer:e,...s},i=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(n.has(e.id)&&(i.sublayerIds=n.get(e.id)),!e.sublayers&&e.name){const s=e.write({},r);delete s.id,t.layers.push(s)}}t.visibleLayers=i.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}createExportImageParameters(e,t,r,s){const n=s?.pixelRatio??1,i=(0,I.yZ)({extent:e,width:t})*n,l=new q({layer:this,scale:i}),{xmin:o,ymin:a,xmax:u,ymax:h,spatialReference:c}=e,p=function(e,t){let r=e.wkid;return(0,d.Wi)(t)?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>ge.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,D.A)(p)?`${a},${o},${h},${u}`:`${o},${a},${u},${h}`,f=l.toJSON();return{bbox:m,["1.3.0"===this.version?"crs":"srs"]:null==p||isNaN(p)?void 0:"EPSG:"+p,...f}}async fetchImage(e,t,r,s){const n=this.mapUrl,i=this.createExportImageParameters(e,t,r,s);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=s?.timeExtent?.start,a=s?.timeExtent?.end,u=(0,d.pC)(l)&&(0,d.pC)(a)?l.getTime()===a.getTime()?fe(l):`${fe(l)}/${fe(a)}`:void 0,h={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:s?.signal};return(0,o.default)(n??"",h).then((e=>e.data))}async fetchImageBitmap(e,t,r,s){const n=this.mapUrl??"",i=this.createExportImageParameters(e,t,r,s);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=s?.timeExtent?.start,a=s?.timeExtent?.end,u=(0,d.pC)(l)&&(0,d.pC)(a)?l.getTime()===a.getTime()?fe(l):`${fe(l)}/${fe(a)}`:void 0,h={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:s?.signal},{data:c}=await(0,o.default)(n,h);return(0,B.g)(c,n)}fetchFeatureInfo(e,t,r,s,n){const i=(0,I.yZ)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new q({layer:this,scale:i}).visibleSublayers);if((0,d.Wi)(this.featureInfoUrl)||(0,d.Wi)(l))return Promise.resolve([]);if((0,d.Wi)(this.fetchFeatureInfoFunction)&&(0,d.Wi)(this.featureInfoFormat))return Promise.resolve([]);const o="1.3.0"===this.version?{I:s,J:n}:{x:s,y:n},a={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...o},u={...this.createExportImageParameters(e,t,r),...a},h=this._mixCustomParameters(u);return(0,d.pC)(this.fetchFeatureInfoFunction)?this.fetchFeatureInfoFunction(h):this._defaultFetchFeatureInfoFunction((0,y.fl)(this.featureInfoUrl,h))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?E.Z.WebMercator:new E.Z({wkid:t});return(0,S.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.Z({title:this.title,content:t}),s=new i.Z({sourceLayer:this,popupTemplate:r});return Promise.resolve([s])}async _fetchService(e){if(!this.resourceInfo){const{path:t,query:r}=this.parsedUrl??{};r?.service&&(r.SERVICE=r.service,delete r.service),r?.request&&(r.REQUEST=r.request,delete r.request);const{data:s}=await(0,o.default)(t??"",{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(s)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=n.Z.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Ce(e,t,r){e=e??[];const s=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const n of e){const e=new Y;e.read(n,t),r&&!r.includes(e.name)&&(e.visible=!1),s.set(e.id,e)}const n=[];for(const t of e){const e=null!=t.id?s.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=s.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new a.Z),r.sublayers.push(e)}else n.push(e)}return n}(0,s._)([(0,g.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,s._)([(0,g.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,s._)([(0,g.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,s._)([(0,g.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,s._)([(0,g.Cb)()],we.prototype,"description",void 0),(0,s._)([(0,g.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,s._)([(0,g.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,s._)([(0,_.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,s._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,s._)([(0,g.Cb)()],we.prototype,"fullExtents",void 0),(0,s._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,s._)([(0,g.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,s._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,s._)([(0,g.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,s._)([(0,g.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:be.jsonValues,read:{reader:be.read,source:"format"},write:{writer:be.write,target:"format"}}}}})],we.prototype,"imageFormat",void 0),(0,s._)([(0,_.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,s._)([(0,g.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,s._)([(0,g.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,s._)([(0,g.Cb)()],we.prototype,"imageTransparency",void 0),(0,s._)([(0,g.Cb)(j.rn)],we.prototype,"legendEnabled",void 0),(0,s._)([(0,g.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,s._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,s._)([(0,g.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,s._)([(0,g.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,s._)([(0,g.Cb)()],we.prototype,"resourceInfo",void 0),(0,s._)([(0,g.Cb)({type:E.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,s._)([(0,_.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,s._)([(0,g.Cb)({type:[b.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,s._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,s._)([(0,g.Cb)({type:a.Z.ofType(Y),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,C.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,s._)([(0,_.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,s._)([(0,_.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,s._)([(0,w.c)("sublayers",{layers:{type:[Y]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,s._)([(0,g.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,s._)([(0,g.Cb)(j.HQ)],we.prototype,"url",void 0),(0,s._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,s._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var s=r(43697),n=r(92604),i=r(95330),l=r(5600),o=(r(75215),r(67676),r(52011)),a=r(46791),u=(r(80442),r(20102),r(26258),r(87538));const h=new a.Z,c=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function p(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:p(t,e%t):0}let m=0,f=0;function y(){const e=Date.now();for(const t of h)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of h)t=p(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==f){if(f=t,clearInterval(m),0===f)return void(m=0);m=setInterval(y,f)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){d(e)&&h.push(e)}(this)}),(()=>{}))}destroy(){d(this)&&h.includes(this)&&h.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,s._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var s=r(43697),n=r(92835),i=r(84552),l=r(5600),o=(r(75215),r(67676),r(71715)),a=r(52011),u=r(35671),h=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,n=c.v.fromJSON(r.timeOffsetUnits);return s&&n?new i.Z({value:s,unit:n}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,l.Cb)({type:n.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,l.Cb)({type:i.Z})],t.prototype,"timeOffset",void 0),(0,s._)([(0,o.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,l.Cb)({value:null,type:h.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>n});const s=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function n(e){return null!=e&&s.some((([t,r])=>e>=t&&e<=r))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var s=r(43697),n=r(92835),i=r(84552),l=r(2368),o=r(96674),a=r(70586),u=r(5600),h=(r(75215),r(67676),r(71715)),c=r(52011),d=r(30556),p=r(80216);function m(e,t){return i.Z.fromJSON({value:e,unit:t})}let f=class extends((0,l.J)(o.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new n.Z({start:r,end:s})}writeFullTimeExtent(e,t){e&&(0,a.pC)(e.start)&&(0,a.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]: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,s._)([(0,u.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,s._)([(0,u.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,s._)([(0,h.r)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,s._)([(0,d.c)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,s._)([(0,u.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,s._)([(0,h.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,s._)([(0,d.c)("interval")],f.prototype,"writeInterval",null),(0,s._)([(0,u.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,s._)([(0,u.Cb)({type:p.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"timeReference",void 0),(0,s._)([(0,u.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),f=(0,s._)([(0,c.j)("esri.layers.support.TimeInfo")],f);const y=f},90082:(e,t,r)=>{r.d(t,{g:()=>n});var s=r(20102);async function n(e,t){try{return await createImageBitmap(e)}catch(e){throw new s.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}}},78981:(e,t,r)=>{r.d(t,{v:()=>s});const s=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={},u={get exports(){return a},set exports(e){a=e}};i=u,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,o){if((0,i.Wi)(t)||!t.lengths.length)return null;const l="upperLeft"===o?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const h=e.coords,c=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:_,coords:p}=t,f=r(s,n);let m=0;for(const e of _){const t=a(d,p,m,e,s,n,l);t&&c.push(t),m+=e*f}if(c.sort(((e,t)=>{let i=l*e[2]-l*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),c.length){let e=6*c[0][2];h[0]=c[0][0]/e,h[1]=c[0][1]/e,s&&(e=6*c[0][4],h[2]=0!==e?c[0][3]/e:0),(h[0]<d[0]||h[0]>d[1]||h[1]<d[2]||h[1]>d[3]||s&&(h[2]<d[4]||h[2]>d[5]))&&(h.length=0)}if(!h.length){const e=t.lengths[0]?u(p,0,_[0],s,n):null;if(!e)return null;h[0]=e[0],h[1]=e[1],s&&e.length>2&&(h[2]=e[2])}return e}function a(e,t,s,i,n,a,u=1){const o=r(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,r=i-1;s<r;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function u(e,t,s,i,n){const a=r(i,n);let u=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,r=s-1;t<r;t++,u+=a,d+=a){const t=e[u],s=e[u+1],r=e[u+2],n=e[d],a=e[d+1],g=e[d+2],y=i?l(t,s,r,n,a,g):o(t,s,n,a);if(y)if(_+=y,i){const e=c(t,s,r,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=h(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?i?[p/_,f/_,m/_]:[p/_,f/_]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function h(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},50245:(e,t,s)=>{s.d(t,{q:()=>ue});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(95330),l=s(67900),h=s(60437),c=s(24470),d=s(20322),_=s(33955),p=s(16306),f=s(8744),m=s(98732),g=s(62432),y=s(37427),E=s(61159),I=s(26993),S=s(10402),R=s(17590),T=s(11490),w=s(99514),A=s(59266),F=s(61247),b=(s(80442),s(92604)),x=s(54790),N=s(44553),C=s(17445),O=s(76882),k=s(58971),P=s(10661);class v{constructor(e){this._observable=new P.s,this._value=e}get(){return(0,k.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class L{constructor(){this._tasks=new Array,this._running=new v(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,o.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,o.zE)());else{const i=s?t.abortCallback?.((0,o.zE)()):t.callback(e);(0,o.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,o.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),G=s(15923),M=s(5600),D=(s(75215),s(52011));let B=class extends G.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,M.Cb)()],B.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,M.Cb)()],B.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),B=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],B);const q=new B;var Y,H,V,j;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(Y||(Y={})),(j=H||(H={}))[j.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(V||(V={}));const W=new Map([[V.RESOURCE_CONTROLLER_IMMEDIATE,0],[V.RESOURCE_CONTROLLER,4],[V.SLIDE,0],[V.STREAM_DATA_LOADER,0],[V.ELEVATION_QUERY,0],[V.TERRAIN_SURFACE,1],[V.SURFACE_GEOMETRY_UPDATES,1],[V.LOD_RENDERER,2],[V.GRAPHICS_CORE,2],[V.I3S_CONTROLLER,2],[V.POINT_CLOUD_LAYER,2],[V.FEATURE_TILE_FETCHER,2],[V.OVERLAY,4],[V.STAGE,4],[V.GRAPHICS_DECONFLICTOR,4],[V.FILTER_VISIBILITY,4],[V.SCALE_VISIBILITY,4],[V.FRUSTUM_VISIBILITY,4],[V.CLOUDS_GENERATOR,4],[V.POINT_OF_INTEREST_FREQUENT,6],[V.POINT_OF_INTEREST_INFREQUENT,30],[V.LABELER,8],[V.FEATURE_QUERY_ENGINE,8],[V.FEATURE_TILE_TREE,16],[V.FEATURE_TILE_TREE_ACTIVE,0],[V.ELEVATION_ALIGNMENT,12],[V.TEXT_TEXTURE_ATLAS,12],[V.TEXTURE_UNLOAD,12],[V.LINE_OF_SIGHT_TOOL,16],[V.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[V.SNAPPING,0],[V.SHADOW_ACCUMULATOR,30]]);function Z(e){return W.has(e)?W.get(e):"number"==typeof e?e:1}const z=(0,O.HA)(6.5),X=(0,O.HA)(1),J=(0,O.HA)(30),$=(0,O.HA)(1e3/30),K=(0,O.HA)(100);var ee,te;!function(e){e.Scheduler=class{get updating(){return this._updating.get()}_updatingChanged(){this._updating.set(this._tasks.some((e=>e.needsUpdate)))}constructor(){this._updating=new v(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new x.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Y.INTERACTING,this._tasks=new N.Z,this._runQueue=new N.Z,this._load=0,this._idleStateCallbacks=new N.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,C.YP)((()=>q.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),C.nn);for(const e of Object.keys(V))this.performanceInfo.tasks.set(V[e],new x.Z(V[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:z,INTERACTING_BUDGET:$,IDLE_BUDGET:K,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=Z(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new x.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Y.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Y.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Y.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=z,s=e.frameDuration,i=X;switch(this.state){case Y.IDLE:t=(0,O.HA)(0),s=(0,O.HA)(Math.max(K,e.frameDuration)),i=J;break;case Y.INTERACTING:s=(0,O.HA)(Math.max($,e.frameDuration));case Y.ANIMATING:}return s=(0,O.HA)(s-e.elapsedFrameTime-t),this.state!==Y.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,O.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Y.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Y.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,O.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return te.SCHEDULED;let t=te.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=te.READY:t!==te.READY&&(t=te.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===H.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){b.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,V.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(V))this._frameTaskTimes.set(V[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.get()}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new L,this._handles=new F.Z,this.schedulePriority=this._basePriority,this._task=new v((0,a.pC)(s)?s:this._queue),this._handles.add((0,C.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(se),this._scheduler.removeTask(this),this.schedule=ie.schedule,this.reschedule=ie.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=Z(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Y.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ee||(ee={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(te||(te={}));const se=(()=>{const e=new ee.Budget;return e.enabled=!1,e})(),ie=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,o.Hc)(t)){const e=(0,o.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,o.gx)(e(se))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},re="feature-store:unsupported-query",ne=new u.WJ(2e6);let ae=0;class ue{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:E.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ae+++"$$",ne)),this.fieldsIndex=new w.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==T.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===T.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===T.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===I.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),u=!(0,f.fS)(s.spatialReference,this.spatialReference);u&&await(0,y._W)(s.spatialReference,this.spatialReference);const o="number"==typeof i?i:i.x,l="number"==typeof i?i:i.y,h={xmin:s.x-o,xmax:s.x+o,ymin:s.y-l,ymax:s.y+l,spatialReference:s.spatialReference},c=u?(0,y.iV)(h,this.spatialReference):h;if(!c)return{candidates:[]};const d=(await(0,p.aX)((0,_.im)(s),null,{signal:t}))[0],m=(await(0,p.aX)((0,_.im)(c),null,{signal:t}))[0];if((0,a.Wi)(d)||(0,a.Wi)(m))return{candidates:[]};const g=new I.y(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(m.toJSON()))),t),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(g)),t),await this._reschedule((()=>this._executeTimeQuery(g)),t),await this._reschedule((()=>this._executeAttributesQuery(g)),t);const E=d.toJSON(),S=u?(0,y.iV)(E,this.spatialReference):E,R=u?Math.max(c.xmax-c.xmin,c.ymax-c.ymin)/2:i;return g.createSnappingResponse({...e,point:S,distance:R},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(re,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==T.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const[t,s]=await Promise.all(["getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getBounds(await this._getAllFeatures(),this.spatialReference,this.spatialReference),(0,a.pC)(this._timeExtentPromise)?this._timeExtentPromise:this._timeExtentPromise=(0,R.R)(this.timeInfo,this.featureStore)]);return(0,o.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,h.t8)((0,h.Ue)(),h.Gv);await this.featureStore.forEachBounds(e,(e=>(0,h.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,T.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const n=(0,y.iV)(r,t,s);if(n.spatialReference=(0,T.S2)(s),n.xmax-n.xmin==0){const e=(0,l.c9)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,l.c9)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,l.c9)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}async _schedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(se)}async _reschedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(se)}async _getAllFeaturesQueryEngineResult(e){return new I.y(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if((0,a.Wi)(this._allFeaturesPromise)){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if((0,a.Wi)(e.sceneFilter))return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,u=e.sceneFilter.geometry,o=(0,a.Wi)(n)||(0,f.fS)(n,u.spatialReference)?u:(0,y.iV)(u,n);if(!o)return null;const l=i||r,h=(0,f.JY)(s)&&!(0,f.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,d=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;const s=new Set;for(const e of d)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t);return h(await this._reschedule((async()=>{const r=await(0,S.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new I.y(n,e,this)}),t))}if(!d.length)return new I.y([],e,this);if(this._canExecuteSinglePass(o,e))return h(new I.y(d,e,this));const _=await(0,S.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this._runSpatialFilter(d,(e=>_(c.getGeometry(e))),t);return h(new I.y(p,e,this))}async _executeGeometryQuery(e,t,s){if((0,a.pC)(t)&&0===t.items.length)return t;e=(0,a.pC)(t)?t.query:e;const{geometry:r,outSR:n,spatialRel:u,returnGeometry:o,returnCentroid:l}=e,h=this.featureStore.featureSpatialReference,c=!r||(0,a.Wi)(h)||(0,f.fS)(h,r.spatialReference)?r:(0,y.iV)(r,h),d=o||l,_=(0,f.JY)(n)&&!(0,f.fS)(this.spatialReference,n),p=this._geometryQueryCache&&(0,a.Wi)(t)?_&&d?JSON.stringify({originalFilterGeometry:r,spatialRelationship:u,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:u}):null,m=p?this._geometryQueryCache.get(p):null;if((0,a.pC)(m))return new I.y(m,e,this);const g=async e=>(_&&d&&await this._project(e,n),p&&this._geometryQueryCache.put(p,e.items,e.items.length+1),e);if(!c)return g((0,a.pC)(t)?t:await this._getAllFeaturesQueryEngineResult(e));const E=this.featureAdapter;let R=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===u){if(!R.length)return g((0,a.pC)(t)?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of R)i.add(E.getObjectId(e));const r=(0,a.pC)(t)?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,S.cW)(u,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(E.getObjectId(e))||t(E.getGeometry(e))),s);return new I.y(n,e,this)}),s);return g(n)}if((0,a.pC)(t)){const e=new i.SO;R=R.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!R.length){const t=new I.y([],e,this);return p&&this._geometryQueryCache.put(p,t.items,1),t}if(this._canExecuteSinglePass(c,e))return g(new I.y(R,e,this));const T=await(0,S.cW)(u,c,this.geometryType,this.hasZ,this.hasM),w=await this._runSpatialFilter(R,(e=>T(E.getGeometry(e))),s);return g(new I.y(w,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||(0,a.Wi)(this.aggregateAdapter))return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,R.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);(0,a.Wi)(t)||(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,g.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,a.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,S.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,f.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,y.oj)(e.items.map((e=>(0,T.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,m.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,S.hN)(e)){if((0,_.YX)(e))return[(0,c.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,_.oU)(e))return e.rings.map((e=>(0,c.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,d.$P)((0,c.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,A.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(re,"params should have at least a field or valueExpression",{params:e});(0,g.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,g.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,g.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(re,"outFields should be specified for returnDistinctValues",{query:e});(0,g.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(re,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,g.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,g.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,g.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,g.G3)(t,this.fieldsIndex))throw new r.Z(re,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(re,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,T.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==T.vF)throw t;return new I.y([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>T,P0:()=>R,cW:()=>S});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},E={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function S(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(c=i)?n.h_:(0,n.IY)(c);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}var c;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function R(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===E[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===I[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function T(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={},u={get exports(){return a},set exports(e){a=e}};i=u,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,o){if((0,i.Wi)(t)||!t.lengths.length)return null;const l="upperLeft"===o?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const h=e.coords,c=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:_,coords:p}=t,f=r(s,n);let m=0;for(const e of _){const t=a(d,p,m,e,s,n,l);t&&c.push(t),m+=e*f}if(c.sort(((e,t)=>{let i=l*e[2]-l*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),c.length){let e=6*c[0][2];h[0]=c[0][0]/e,h[1]=c[0][1]/e,s&&(e=6*c[0][4],h[2]=0!==e?c[0][3]/e:0),(h[0]<d[0]||h[0]>d[1]||h[1]<d[2]||h[1]>d[3]||s&&(h[2]<d[4]||h[2]>d[5]))&&(h.length=0)}if(!h.length){const e=t.lengths[0]?u(p,0,_[0],s,n):null;if(!e)return null;h[0]=e[0],h[1]=e[1],s&&e.length>2&&(h[2]=e[2])}return e}function a(e,t,s,i,n,a,u=1){const o=r(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,r=i-1;s<r;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function u(e,t,s,i,n){const a=r(i,n);let u=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,r=s-1;t<r;t++,u+=a,d+=a){const t=e[u],s=e[u+1],r=e[u+2],n=e[d],a=e[d+1],g=e[d+2],y=i?l(t,s,r,n,a,g):o(t,s,n,a);if(y)if(_+=y,i){const e=c(t,s,r,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=h(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?i?[p/_,f/_,m/_]:[p/_,f/_]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function h(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},50245:(e,t,s)=>{s.d(t,{q:()=>ue});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(95330),l=s(67900),h=s(60437),c=s(24470),d=s(20322),_=s(33955),p=s(16306),f=s(8744),m=s(98732),g=s(62432),y=s(37427),E=s(61159),I=s(26993),S=s(10402),T=s(17590),R=s(11490),F=s(99514),w=s(59266),A=s(61247),b=(s(80442),s(92604)),x=s(54790),N=s(44553),C=s(17445),O=s(76882),k=s(58971),v=s(10661);class L{constructor(e){this._observable=new v.s,this._value=e}get(){return(0,k.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class P{constructor(){this._tasks=new Array,this._running=new L(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,o.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,o.zE)());else{const i=s?t.abortCallback?.((0,o.zE)()):t.callback(e);(0,o.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,o.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),M=s(15923),G=s(5600),D=(s(75215),s(52011));let q=class extends M.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,G.Cb)()],q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,G.Cb)()],q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),q=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],q);const B=new q;var Y,H,j,V;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(Y||(Y={})),(V=H||(H={}))[V.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(j||(j={}));const Z=new Map([[j.RESOURCE_CONTROLLER_IMMEDIATE,0],[j.RESOURCE_CONTROLLER,4],[j.SLIDE,0],[j.STREAM_DATA_LOADER,0],[j.ELEVATION_QUERY,0],[j.TERRAIN_SURFACE,1],[j.SURFACE_GEOMETRY_UPDATES,1],[j.LOD_RENDERER,2],[j.GRAPHICS_CORE,2],[j.I3S_CONTROLLER,2],[j.POINT_CLOUD_LAYER,2],[j.FEATURE_TILE_FETCHER,2],[j.OVERLAY,4],[j.STAGE,4],[j.GRAPHICS_DECONFLICTOR,4],[j.FILTER_VISIBILITY,4],[j.SCALE_VISIBILITY,4],[j.FRUSTUM_VISIBILITY,4],[j.CLOUDS_GENERATOR,4],[j.POINT_OF_INTEREST_FREQUENT,6],[j.POINT_OF_INTEREST_INFREQUENT,30],[j.LABELER,8],[j.FEATURE_QUERY_ENGINE,8],[j.FEATURE_TILE_TREE,16],[j.FEATURE_TILE_TREE_ACTIVE,0],[j.ELEVATION_ALIGNMENT,12],[j.TEXT_TEXTURE_ATLAS,12],[j.TEXTURE_UNLOAD,12],[j.LINE_OF_SIGHT_TOOL,16],[j.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[j.SNAPPING,0],[j.SHADOW_ACCUMULATOR,30]]);function W(e){return Z.has(e)?Z.get(e):"number"==typeof e?e:1}const z=(0,O.HA)(6.5),X=(0,O.HA)(1),J=(0,O.HA)(30),$=(0,O.HA)(1e3/30),K=(0,O.HA)(100);var ee,te;!function(e){e.Scheduler=class{get updating(){return this._updating.get()}_updatingChanged(){this._updating.set(this._tasks.some((e=>e.needsUpdate)))}constructor(){this._updating=new L(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new x.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Y.INTERACTING,this._tasks=new N.Z,this._runQueue=new N.Z,this._load=0,this._idleStateCallbacks=new N.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,C.YP)((()=>B.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),C.nn);for(const e of Object.keys(j))this.performanceInfo.tasks.set(j[e],new x.Z(j[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:z,INTERACTING_BUDGET:$,IDLE_BUDGET:K,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=W(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new x.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Y.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Y.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Y.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=z,s=e.frameDuration,i=X;switch(this.state){case Y.IDLE:t=(0,O.HA)(0),s=(0,O.HA)(Math.max(K,e.frameDuration)),i=J;break;case Y.INTERACTING:s=(0,O.HA)(Math.max($,e.frameDuration));case Y.ANIMATING:}return s=(0,O.HA)(s-e.elapsedFrameTime-t),this.state!==Y.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,O.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Y.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Y.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,O.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return te.SCHEDULED;let t=te.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=te.READY:t!==te.READY&&(t=te.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===H.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){b.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,j.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(j))this._frameTaskTimes.set(j[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.get()}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new P,this._handles=new A.Z,this.schedulePriority=this._basePriority,this._task=new L((0,a.pC)(s)?s:this._queue),this._handles.add((0,C.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(se),this._scheduler.removeTask(this),this.schedule=ie.schedule,this.reschedule=ie.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=W(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Y.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ee||(ee={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(te||(te={}));const se=(()=>{const e=new ee.Budget;return e.enabled=!1,e})(),ie=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,o.Hc)(t)){const e=(0,o.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,o.gx)(e(se))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},re="feature-store:unsupported-query",ne=new u.WJ(2e6);let ae=0;class ue{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:E.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ae+++"$$",ne)),this.fieldsIndex=new F.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==R.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==R.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===R.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===R.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===I.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),u=!(0,f.fS)(s.spatialReference,this.spatialReference);u&&await(0,y._W)(s.spatialReference,this.spatialReference);const o="number"==typeof i?i:i.x,l="number"==typeof i?i:i.y,h={xmin:s.x-o,xmax:s.x+o,ymin:s.y-l,ymax:s.y+l,spatialReference:s.spatialReference},c=u?(0,y.iV)(h,this.spatialReference):h;if(!c)return{candidates:[]};const d=(await(0,p.aX)((0,_.im)(s),null,{signal:t}))[0],m=(await(0,p.aX)((0,_.im)(c),null,{signal:t}))[0];if((0,a.Wi)(d)||(0,a.Wi)(m))return{candidates:[]};const g=new I.y(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(m.toJSON()))),t),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(g)),t),await this._reschedule((()=>this._executeTimeQuery(g)),t),await this._reschedule((()=>this._executeAttributesQuery(g)),t);const E=d.toJSON(),S=u?(0,y.iV)(E,this.spatialReference):E,T=u?Math.max(c.xmax-c.xmin,c.ymax-c.ymin)/2:i;return g.createSnappingResponse({...e,point:S,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(re,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==R.vF)throw t;return new I.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const[t,s]=await Promise.all(["getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getBounds(await this._getAllFeatures(),this.spatialReference,this.spatialReference),(0,a.pC)(this._timeExtentPromise)?this._timeExtentPromise:this._timeExtentPromise=(0,T.R)(this.timeInfo,this.featureStore)]);return(0,o.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,h.t8)((0,h.Ue)(),h.Gv);await this.featureStore.forEachBounds(e,(e=>(0,h.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,R.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const n=(0,y.iV)(r,t,s);if(n.spatialReference=(0,R.S2)(s),n.xmax-n.xmin==0){const e=(0,l.c9)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,l.c9)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,l.c9)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}async _schedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(se)}async _reschedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(se)}async _getAllFeaturesQueryEngineResult(e){return new I.y(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if((0,a.Wi)(this._allFeaturesPromise)){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,R.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if((0,a.Wi)(e.sceneFilter))return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,u=e.sceneFilter.geometry,o=(0,a.Wi)(n)||(0,f.fS)(n,u.spatialReference)?u:(0,y.iV)(u,n);if(!o)return null;const l=i||r,h=(0,f.JY)(s)&&!(0,f.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,d=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;const s=new Set;for(const e of d)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t);return h(await this._reschedule((async()=>{const r=await(0,S.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new I.y(n,e,this)}),t))}if(!d.length)return new I.y([],e,this);if(this._canExecuteSinglePass(o,e))return h(new I.y(d,e,this));const _=await(0,S.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this._runSpatialFilter(d,(e=>_(c.getGeometry(e))),t);return h(new I.y(p,e,this))}async _executeGeometryQuery(e,t,s){if((0,a.pC)(t)&&0===t.items.length)return t;e=(0,a.pC)(t)?t.query:e;const{geometry:r,outSR:n,spatialRel:u,returnGeometry:o,returnCentroid:l}=e,h=this.featureStore.featureSpatialReference,c=!r||(0,a.Wi)(h)||(0,f.fS)(h,r.spatialReference)?r:(0,y.iV)(r,h),d=o||l,_=(0,f.JY)(n)&&!(0,f.fS)(this.spatialReference,n),p=this._geometryQueryCache&&(0,a.Wi)(t)?_&&d?JSON.stringify({originalFilterGeometry:r,spatialRelationship:u,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:u}):null,m=p?this._geometryQueryCache.get(p):null;if((0,a.pC)(m))return new I.y(m,e,this);const g=async e=>(_&&d&&await this._project(e,n),p&&this._geometryQueryCache.put(p,e.items,e.items.length+1),e);if(!c)return g((0,a.pC)(t)?t:await this._getAllFeaturesQueryEngineResult(e));const E=this.featureAdapter;let T=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===u){if(!T.length)return g((0,a.pC)(t)?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of T)i.add(E.getObjectId(e));const r=(0,a.pC)(t)?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,S.cW)(u,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(E.getObjectId(e))||t(E.getGeometry(e))),s);return new I.y(n,e,this)}),s);return g(n)}if((0,a.pC)(t)){const e=new i.SO;T=T.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!T.length){const t=new I.y([],e,this);return p&&this._geometryQueryCache.put(p,t.items,1),t}if(this._canExecuteSinglePass(c,e))return g(new I.y(T,e,this));const R=await(0,S.cW)(u,c,this.geometryType,this.hasZ,this.hasM),F=await this._runSpatialFilter(T,(e=>R(E.getGeometry(e))),s);return g(new I.y(F,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||(0,a.Wi)(this.aggregateAdapter))return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,T.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);(0,a.Wi)(t)||(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,g.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,a.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,S.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,f.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,y.oj)(e.items.map((e=>(0,R.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,m.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,S.hN)(e)){if((0,_.YX)(e))return[(0,c.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,_.oU)(e))return e.rings.map((e=>(0,c.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,d.$P)((0,c.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,w.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(re,"params should have at least a field or valueExpression",{params:e});(0,g.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,S.P0)(e,this.geometryType,this.spatialReference),(0,y._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,g.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,g.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(re,"outFields should be specified for returnDistinctValues",{query:e});(0,g.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(re,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,g.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,g.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,g.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,g.G3)(t,this.fieldsIndex))throw new r.Z(re,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(re,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,R.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==R.vF)throw t;return new I.y([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>R,P0:()=>T,cW:()=>S});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},E={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function S(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(c=i)?n.h_:(0,n.IY)(c);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}var c;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===E[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===I[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function R(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},99514:(e,t,s)=>{s.d(t,{Z:()=>a});var i=s(35671);function r(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function n(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class a{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const a of e){const e=a?.name,l=o(a?.name);if(e&&l){const o=u(e);this._fieldsMap.set(e,a),this._fieldsMap.set(o,a),this._normalizedFieldsMap.set(l,a),t.push(o),"date"===(s=a).type||"esriFieldTypeDate"===s.type?(this.dateFields.push(a),this._dateFieldsSet.add(a)):(0,i.H7)(a)&&(this._numericFieldsSet.add(a),this.numericFields.push(a)),r(a)||n(a)||(a.editable=null==a.editable||!!a.editable,a.nullable=null==a.nullable||!!a.nullable)}}var s;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)r(e)||n(e)||e.nullable||void 0!==(0,i.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(o(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function u(e){return e.trim().toLowerCase()}function o(e){return(0,i.q6)(e)?.toLowerCase()??""}}}]);