@arcgis/core 4.24.0-next.20220520 → 4.24.0-next.20220521

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 (49) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{26646a7545a194e67441.js → 27572edd67242e1b6646.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{d94c5f36d52cf71f0bb9.js → 27f974dae930eb12fe38.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2b708cc5ba0edd6c80e1.js +1 -0
  5. package/assets/esri/core/workers/chunks/{c5fadaa98749ffb490f5.js → 3c258ac11c963b7d9509.js} +1 -1
  6. package/assets/esri/core/workers/chunks/40d70d446abe357d6f43.js +1 -0
  7. package/assets/esri/core/workers/chunks/5cf2064bfd9d0847d9ec.js +1 -0
  8. package/assets/esri/core/workers/chunks/{f5089121d845ec594008.js → 6ac32325a961f1cf3c1b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1c2805cc97dcee70e60d.js → 816ae3f0513ecf856f8f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{8033531b0cc706b40d86.js → 8523d45cf4765eddc380.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{a5ee17cdc9eb23ebeaf0.js → 85f2f6a50cf1b6c7ce82.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{c40d9caf5189be2c698e.js → 87b83dfce3ee252aba94.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{6e48b0db65bcaaace838.js → 8cd8dad8bcd5c0ef445e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{54711b8a98104eeec833.js → 8ec860742695e5bbbcb2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{e51f0e71f2a55af604d3.js → 93c4e01b237a6b3f871f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3e94e35f44aadbb332ff.js → aae70408958f6ee7279e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7e150c38e25fbb8bacaf.js → b476a80ef81c211685be.js} +1 -1
  18. package/assets/esri/core/workers/chunks/b8db486a3dba68a8030a.js +1 -0
  19. package/assets/esri/core/workers/chunks/{82b6535a30287c74ba13.js → c0e6dbecdbd30066a82c.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{66e8a253312d72a8e7f9.js → c4115e8d1eb2ca6bb605.js} +1 -1
  21. package/assets/esri/core/workers/chunks/cd04bae81e5fc27ec97b.js +1 -0
  22. package/assets/esri/core/workers/chunks/{24217129d492e170f0f0.js → f668ccaf8bd0be0ab57b.js} +1 -1
  23. package/core/CollectionFlattener.js +1 -1
  24. package/core/promiseUtils.js +1 -1
  25. package/interfaces.d.ts +78 -2
  26. package/layers/FeatureLayer.js +1 -1
  27. package/layers/SubtypeGroupLayer.js +1 -1
  28. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  29. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  30. package/layers/mixins/ArcGISImageService.js +1 -1
  31. package/layers/mixins/refresh.js +1 -1
  32. package/layers/support/FeatureReductionCluster.js +1 -1
  33. package/layers/support/capabilities.js +1 -1
  34. package/package.json +1 -1
  35. package/support/revision.js +1 -1
  36. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  37. package/views/2d/engine/webgl/TextureManager.js +1 -1
  38. package/views/2d/engine/webgl/animatedFormats/BaseAnimatableTextureResource.js +1 -1
  39. package/views/2d/engine/webgl/animatedFormats/apng.js +1 -1
  40. package/views/2d/engine/webgl/animatedFormats/gif.js +1 -1
  41. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  42. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  43. package/views/2d/layers/features/schemaUtils.js +1 -1
  44. package/views/SceneView.js +1 -1
  45. package/assets/esri/core/workers/chunks/128f461007ef039d4f73.js +0 -1
  46. package/assets/esri/core/workers/chunks/672da24bbf86718bf48d.js +0 -1
  47. package/assets/esri/core/workers/chunks/824a700ba611e6c4fa9a.js +0 -1
  48. package/assets/esri/core/workers/chunks/be4bf1e4cbe2a593f8b3.js +0 -1
  49. package/assets/esri/core/workers/chunks/d6315aa9eedf79a7bca1.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5906],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(43697),s=r(66577),n=r(51773),a=r(78223),l=r(2368),o=r(96674),u=r(70586),p=r(99001),d=r(5600),c=(r(67676),r(80442),r(75215),r(52011)),m=r(33955);function h(e){if(!(0,u.pC)(e))return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let y=class extends((0,l.J)(o.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}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&&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:h(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,i){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}};(0,i._)([(0,d.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.im)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,d.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,d.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,d.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,d.Cb)({type:n.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,d.Cb)({value:null,types:a.LB})],y.prototype,"symbol",null),(0,i._)([(0,d.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=(0,i._)([(0,c.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),a=r(35463),l=r(5600),o=(r(67676),r(80442),r(75215),r(52011)),u=r(78981);let p=i=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,a.rJ)(this.value,this.unit,"milliseconds")}clone(){return new i({value:this.value,unit:this.unit})}};(0,s._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),(0,s._)([(0,l.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],p.prototype,"unit",void 0),p=i=(0,s._)([(0,o.j)("esri.TimeInterval")],p);const d=p},57435:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(80539),n=r(3920),a=r(70586),l=(r(20102),r(92604),r(26258),r(87538)),o=r(5600),u=(r(67676),r(80442),r(75215),r(52011));let p=class extends((0,n.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,a.pC)(this.getCollections)?this.getCollections():null;if((0,a.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,a.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],p.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"itemFilterFunction",void 0),p=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],p);const d=p},91040:(e,t,r)=>{r.d(t,{yZ:()=>s});var i=r(67900);function s(e,t){const r=t||e.extent,s=e.width,n=(0,i.c9)(r&&r.spatialReference);return r&&s?r.width/s*n*i.hd*96:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>we});var i=r(43697),s=r(68773),n=r(38171),a=r(51773),l=r(3172),o=r(80539),u=r(57435),p=r(3920),d=r(35454),c=r(22974),m=r(70586),h=r(16453),y=r(95330),f=r(17445),g=r(17452),b=r(5600),v=r(75215),w=r(71715),_=r(52011),x=r(30556),C=r(76169),I=r(6570),S=r(82971),E=r(91040),N=r(8744),T=r(87085),O=r(71612),F=r(38009),U=r(16859),L=r(34760),R=r(72965),j=r(28294),P=r(52162),A=r(66677),M=r(21506),D=r(15923);r(67676),r(80442);const Z={visible:"visibleSublayers"};let q=class extends((0,p.p)(D.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(){const{visibleSublayers:e}=this;return e.filter((e=>e.name)).map((e=>e.name)).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,i=[],s=e=>{const{minScale:r,maxScale:n,sublayers:a,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===n||t>=n))&&(a?a.forEach(s):i.unshift(e))};return r?.forEach(s),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:s,layers:t}}};(0,i._)([(0,b.Cb)()],q.prototype,"layer",null),(0,i._)([(0,b.Cb)({readOnly:!0})],q.prototype,"layers",null),(0,i._)([(0,b.Cb)({type:Number})],q.prototype,"scale",void 0),(0,i._)([(0,b.Cb)({readOnly:!0})],q.prototype,"version",null),(0,i._)([(0,b.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),q=(0,i._)([(0,_.j)("esri.layers.support.ExportWMSImageParameters")],q);var k,V=r(61247),B=r(90578);let W=0,$=k=class extends h.w{constructor(e){super(e),this._sublayersHandles=new V.Z,this.dimensions=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.legendUrl=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.popupEnabled=!1,this.queryable=!1,this.spatialReferences=null}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)?I.Z.fromJSON(e):null}get id(){const e=this._get("id");return null==e?W++:e}set id(e){this._set("id",e)}readLegendUrl(e,t){return t?t.legendUrl||t.legendURL:null}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}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)}set sublayers(e){const t=this._get("sublayers");t&&(t.forEach((e=>{e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this._sublayersHandles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))])),this._set("sublayers",e)}castSublayers(e){return(0,v.se)(o.Z.ofType(k),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 k;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()))),this.hasOwnProperty("featureInfoFormat")&&(e.featureInfoFormat=this.featureInfoFormat),this.hasOwnProperty("featureInfoUrl")&&(e.featureInfoUrl=this.featureInfoUrl),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,i._)([(0,b.Cb)()],$.prototype,"description",null),(0,i._)([(0,b.Cb)({readOnly:!0})],$.prototype,"dimensions",void 0),(0,i._)([(0,b.Cb)({value:null})],$.prototype,"fullExtent",null),(0,i._)([(0,w.r)("fullExtent",["extent"])],$.prototype,"readExtent",null),(0,i._)([(0,b.Cb)()],$.prototype,"fullExtents",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"featureInfoFormat",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"featureInfoUrl",void 0),(0,i._)([(0,b.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],$.prototype,"id",null),(0,i._)([(0,b.Cb)({type:String,json:{origins:{"web-document":{read:{source:["legendUrl","legendURL"]},write:{target:"legendUrl",ignoreOrigin:!0}}},read:{source:"legendURL"},write:{ignoreOrigin:!0}}})],$.prototype,"legendUrl",void 0),(0,i._)([(0,w.r)(["web-document"],"legendUrl")],$.prototype,"readLegendUrl",null),(0,i._)([(0,b.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}}}})],$.prototype,"legendEnabled",void 0),(0,i._)([(0,b.Cb)({value:null})],$.prototype,"layer",null),(0,i._)([(0,b.Cb)()],$.prototype,"maxScale",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"minScale",void 0),(0,i._)([(0,b.Cb)({readOnly:!0})],$.prototype,"effectiveScaleRange",null),(0,i._)([(0,b.Cb)({type:String,value:null,json:{read:{source:"name"},write:{ignoreOrigin:!0}}})],$.prototype,"name",null),(0,i._)([(0,b.Cb)()],$.prototype,"parent",void 0),(0,i._)([(0,b.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],$.prototype,"popupEnabled",void 0),(0,i._)([(0,b.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],$.prototype,"queryable",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"sublayers",null),(0,i._)([(0,B.p)("sublayers")],$.prototype,"castSublayers",null),(0,i._)([(0,b.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],$.prototype,"spatialReferences",void 0),(0,i._)([(0,b.Cb)({type:String,value:null,json:{write:{ignoreOrigin:!0}}})],$.prototype,"title",null),(0,i._)([(0,b.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],$.prototype,"visible",null),$=k=(0,i._)([(0,_.j)("esri.layers.support.WMSSublayer")],$);const H=$;var G=r(20102);const J={84:4326,83:4269,27:4267};function X(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 i=K("Capability",r),s=K("Service",r),n=K("Request",i);if(!i||!s||!n)return null;const a=K("Layer",i);if(!a)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=te("Title",s,"")||te("Name",s,""),u=te("AccessConstraints",s,""),p=/^none$/i.test(u)?"":u,d=te("Abstract",s,""),c=parseInt(te("MaxWidth",s,"5000"),10),m=parseInt(te("MaxHeight",s,"5000"),10),h=se(n,"GetMap"),y=ie(n,"GetMap"),f=ae(a,l,t);let g,b,v,w=0;if(Array.prototype.slice.call(i.childNodes).forEach((e=>{"Layer"===e.nodeName&&(0===w?g=e:1===w?(f.name&&(f.name="",f.sublayers.push(ae(g,l,t))),f.sublayers.push(ae(e,l,t))):f.sublayers.push(ae(e,l,t)),w++)})),!f)return null;const _=f.fullExtents;if(b=f.sublayers,b||(b=[]),0===b.length&&b.push(f),v=f.extent,!v){const e=new I.Z(b[0].extent);f.extent=e.toJSON(),v=f.extent}const x=f.spatialReferences.length>0?f.spatialReferences:z(f),C=ie(n,"GetFeatureInfo");let S;if(C){const e=se(n,"GetFeatureInfo");e.includes("text/html")?S="text/html":e.includes("text/plain")&&(S="text/plain")}if(!S){const e=t=>{t&&(t.queryable=!1,t.sublayers&&t.sublayers.forEach((t=>{e(t)})))};e(f)}const E=Q(b),N=f.minScale||0,T=f.maxScale||0,O=f.dimensions,F=E.reduce(((e,t)=>e.concat(t.dimensions)),[]),U=O.concat(F).filter(oe);let L=null;if(U.length>0){let e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY;U.forEach((r=>{const{extent:i}=r;!function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(i)?i.forEach((r=>{e=Math.min(e,r.min.getTime()),t=Math.max(t,r.max.getTime())})):i.forEach((r=>{e=Math.min(e,r.getTime()),t=Math.max(t,r.getTime())}))})),L={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[e,t]}}return{copyright:p,description:d,dimensions:O,extent:v,fullExtents:_,featureInfoFormat:S,featureInfoUrl:C,mapUrl:y,maxWidth:c,maxHeight:m,maxScale:T,minScale:N,layers:E,spatialReferences:x,supportedImageFormatTypes:h,timeInfo:L,title:o,version:l}}function z(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=z(t);if(e.length>0)return e}return[]}function Q(e){let t=[];return e.forEach((e=>{t.push(e),e.sublayers&&e.sublayers.length&&(t=t.concat(Q(e.sublayers)),delete e.sublayers)})),t}function Y(e,t,r){return t.getAttribute(e)??r}function K(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(le(i)&&i.nodeName===e)return i}return null}function ee(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];le(s)&&s.nodeName===e&&r.push(s)}return r}function te(e,t,r){const i=K(e,t);return i?i.textContent:r}function re(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),n=parseFloat(e.getAttribute("maxx")),a=parseFloat(e.getAttribute("maxy"));let l,o,u,p;r?(l=isNaN(s)?-Number.MAX_VALUE:s,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(a)?Number.MAX_VALUE:a,p=isNaN(n)?Number.MAX_VALUE:n):(l=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(n)?Number.MAX_VALUE:n,p=isNaN(a)?Number.MAX_VALUE:a);const d=new S.Z({wkid:t});return new I.Z({xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d})}function ie(e,t){const r=K(t,e);if(r){const e=K("DCPType",r);if(e){const t=K("HTTP",e);if(t){const e=K("Get",t);if(e){let t=function(e,t,r,i){const s=K("OnlineResource",r);return s?Y("xlink:href",s,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=[],i=(0,g.mN)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function se(e,t){const r=ee("Operation",e);if(0===r.length)return ee("Format",K(t,e)).map((e=>e.textContent));const i=[];return r.forEach((e=>{e.getAttribute("name")===t&&ee("Format",e).forEach((e=>{i.push(e.textContent)}))})),i}function ne(e,t,r){const i=K(t,e);if(!i)return r;const{textContent:s}=i;if(null==s||""===s)return r;const n=Number(s);return isNaN(n)?r:n}function ae(e,t,r){if(!e)return null;const i={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},s=K("LatLonBoundingBox",e),n=K("EX_GeographicBoundingBox",e);let a=null;s&&(a=re(s,4326)),n&&(a=new I.Z(0,0,0,0,new S.Z({wkid:4326})),a.xmin=parseFloat(te("westBoundLongitude",n,"0")),a.ymin=parseFloat(te("southBoundLatitude",n,"0")),a.xmax=parseFloat(te("eastBoundLongitude",n,"0")),a.ymax=parseFloat(te("northBoundLatitude",n,"0"))),s||n||(a=new I.Z(-180,-90,180,90,new S.Z({wkid:4326}))),i.minScale=ne(e,"MaxScaleDenominator",0),i.maxScale=ne(e,"MinScaleDenominator",0);const l=["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)i.name=e.textContent||"";else if("Title"===e.nodeName)i.title=e.textContent||"";else if("Abstract"===e.nodeName)i.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(l);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.substring(5),10);0===i||isNaN(i)||a||(a="1.3.0"===t?re(e,i,(0,P.A)(i)):re(e,i))}const s=r&&r.indexOf(":");if(s&&s>-1){let n=parseInt(r.substring(s+1,r.length),10);0===n||isNaN(n)||(n=J[n]?J[n]:n);const a="1.3.0"===t?re(e,n,(0,P.A)(n)):re(e,n);i.fullExtents.push(a)}}else if(e.nodeName===l)e.textContent.split(" ").forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=J[t]?J[t]:t;i.spatialReferences.includes(e)||i.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||i.legendURL){if("Layer"===e.nodeName){const s=ae(e,t,r);s&&(s.parentLayerId=i.id,i.sublayers||(i.sublayers=[]),i.sublayers.push(s))}}else{const t=K("LegendURL",e);if(t){const e=K("OnlineResource",t);e&&(i.legendURL=e.getAttribute("xlink:href"))}}})),i.extent=a?.toJSON(),i.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,s=e.getAttribute("unitSymbol"),n=e.getAttribute("default"),a="0"!==Y("default",e,"0"),l="0"!==Y("nearestValue",e,"0"),o="0"!==Y("current",e,"0");return oe({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(i),default:de(n),multipleValues:a,nearestValue:l,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(i),unitSymbol:s,default:ue(n),multipleValues:a,nearestValue:l}:{name:t,units:r,extent:pe(i),unitSymbol:s,default:pe(n),multipleValues:a,nearestValue:l}})),i}function le(e){return e.nodeType===Node.ELEMENT_NODE}function oe(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return null;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((e=>e)):r.map((e=>parseFloat(e)))}function pe(e){if(!e)return null;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((e=>e)):r}function de(e){if(!e)return null;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]?ce(t[2]):void 0}})).filter((e=>e)):r.map((e=>new Date(e)))}function ce(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 he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new d.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});let be=class extends((0,p.p)((0,O.h)((0,j.n)((0,L.Q)((0,R.M)((0,F.q)((0,U.I)((0,h.R)(T.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.featureInfoFormat=null,this.featureInfoUrl=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;const t="wms-sublayer";this.own((0,f.YP)((()=>this.sublayers),((e,r)=>{if(r){for(const e of r)e.layer=null;this.handles.remove(t)}if(e){for(const t of e)t.parent=this,t.layer=this;this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],t)}}),f.Z_))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,m.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return new I.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]})}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new S.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference&&this.spatialReference.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return ve(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return ve(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const s=new Map,n=e.flatten((({sublayers:e})=>e&&e.toArray())).toArray();n.forEach((e=>{"number"==typeof e.parent.id&&(s.has(e.parent.id)?s.get(e.parent.id).push(e.id):s.set(e.parent.id,[e.id]))})),n.forEach((e=>{const r={sublayer:e,...i},n=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},r);if(s.has(e.id)&&(n.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}})),t.visibleLayers=n.filter((e=>e.visible&&!e.sublayers)).map((e=>e.name))}createExportImageParameters(e,t,r,i){const s=i&&i.pixelRatio||1,n=(0,E.yZ)({extent:e,width:t})*s,a=new q({layer:this,scale:n}),{xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return(0,m.Wi)(t)?r:(!t.includes(r)&&e.latestWkid&&(r=e.latestWkid),ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(d,this.spatialReferences),h="1.3.0"===this.version&&(0,P.A)(c)?`${o},${l},${p},${u}`:`${l},${o},${u},${p}`,y=a.toJSON();return{bbox:h,["1.3.0"===this.version?"crs":"srs"]:isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,i){const s=this.mapUrl,n=this.createExportImageParameters(e,t,r,i);if(!n.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const a=i?.timeExtent?.start,o=i?.timeExtent?.end,u=(0,m.pC)(a)&&(0,m.pC)(o)?a.getTime()===o.getTime()?he(a):`${he(a)}/${he(o)}`:void 0,p={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...n,time:u,...this.refreshParameters}),signal:i?.signal};return(0,l.default)(s,p).then((e=>e.data))}fetchFeatureInfo(e,t,r,i,s){const l=(0,E.yZ)({extent:e,width:t}),o=function(e){return e.length?e.filter((e=>e.popupEnabled&&e.name&&e.queryable)).map((e=>e.name)).join(","):""}(new q({layer:this,scale:l}).visibleSublayers);if(!this.featureInfoUrl||!o)return null;const u="1.3.0"===this.version?{I:i,J:s}:{x:i,y:s},p={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...u},d={...this.createExportImageParameters(e,t,r),...p},c=this._mixCustomParameters(d),m=(0,g.fl)(this.featureInfoUrl,c),h=document.createElement("iframe");h.src=m,h.style.border="none",h.style.margin="0",h.style.width="100%",h.setAttribute("sandbox","");const y=new a.Z({title:this.title,content:h});return new n.Z({sourceLayer:this,popupTemplate:y})}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,A.G)(this.url)||this.spatialReferences.some((t=>{const r=900913===t?S.Z.WebMercator:new S.Z({wkid:t});return(0,N.fS)(r,e)}))}async _fetchService(e){if(!this.resourceInfo){this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request);const t=await(0,l.default)(this.parsedUrl.path,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...this.parsedUrl.query,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=X(t.data)}if(this.parsedUrl){const e=new g.R9(this.parsedUrl.path);"https"!==e.scheme||e.port&&"443"!==e.port||s.Z.request.httpsDomains.includes(e.host)||s.Z.request.httpsDomains.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 ve(e,t,r){const i=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new H;e.read(s,t),-1===r?.indexOf(e.name)&&(e.visible=!1),i.set(e.id,e)}const s=[];for(const t of e){const e=i.get(t.id);if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);r.sublayers||(r.sublayers=new o.Z),r.sublayers.unshift(e)}else s.unshift(e)}return s}(0,i._)([(0,b.Cb)({readOnly:!0})],be.prototype,"allSublayers",void 0),(0,i._)([(0,b.Cb)({json:{type:Object,write:!0}})],be.prototype,"customParameters",void 0),(0,i._)([(0,b.Cb)({json:{type:Object,write:!0}})],be.prototype,"customLayerParameters",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:!0}})],be.prototype,"copyright",void 0),(0,i._)([(0,b.Cb)()],be.prototype,"description",void 0),(0,i._)([(0,b.Cb)({readOnly:!0})],be.prototype,"dimensions",void 0),(0,i._)([(0,b.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],be.prototype,"fullExtent",void 0),(0,i._)([(0,w.r)(["web-document","portal-item"],"fullExtent",["extent"])],be.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,x.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],be.prototype,"writeFullExtent",null),(0,i._)([(0,b.Cb)()],be.prototype,"fullExtents",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"featureInfoFormat",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"featureInfoUrl",void 0),(0,i._)([(0,b.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],be.prototype,"imageFormat",void 0),(0,i._)([(0,w.r)("imageFormat",["supportedImageFormatTypes"])],be.prototype,"readImageFormat",null),(0,i._)([(0,b.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],be.prototype,"imageMaxHeight",void 0),(0,i._)([(0,b.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],be.prototype,"imageMaxWidth",void 0),(0,i._)([(0,b.Cb)()],be.prototype,"imageTransparency",void 0),(0,i._)([(0,b.Cb)(M.rn)],be.prototype,"legendEnabled",void 0),(0,i._)([(0,b.Cb)({type:["show","hide","hide-children"]})],be.prototype,"listMode",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"mapUrl",void 0),(0,i._)([(0,b.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],be.prototype,"isReference",void 0),(0,i._)([(0,b.Cb)({type:["WMS"]})],be.prototype,"operationalLayerType",void 0),(0,i._)([(0,b.Cb)()],be.prototype,"resourceInfo",void 0),(0,i._)([(0,b.Cb)({type:S.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],be.prototype,"spatialReference",void 0),(0,i._)([(0,w.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],be.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,b.Cb)({type:[v.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],be.prototype,"spatialReferences",void 0),(0,i._)([(0,x.c)(["web-document","portal-item"],"spatialReferences")],be.prototype,"writeSpatialReferences",null),(0,i._)([(0,b.Cb)({type:o.Z.ofType(H),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}}}}})],be.prototype,"sublayers",void 0),(0,i._)([(0,w.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],be.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,w.r)("service","sublayers",["layers"])],be.prototype,"readSublayers",null),(0,i._)([(0,x.c)("sublayers",{layers:{type:[H]},visibleLayers:{type:[String]}})],be.prototype,"writeSublayers",null),(0,i._)([(0,b.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],be.prototype,"type",void 0),(0,i._)([(0,b.Cb)(M.HQ)],be.prototype,"url",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"version",void 0),be=(0,i._)([(0,_.j)("esri.layers.WMSLayer")],be);const we=be},16859:(e,t,r)=>{r.d(t,{I:()=>w});var i=r(43697),s=r(40330),n=r(3172),a=r(66643),l=r(20102),o=r(92604),u=r(70586),p=r(95330),d=r(17452),c=r(5600),m=(r(67676),r(80442),r(75215),r(71715)),h=r(52011),y=r(30556),f=r(65587),g=r(15235),b=r(86082);const v=o.Z.getLogger("esri.layers.mixins.PortalLayer"),w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||v.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url);if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,l=f.Z.getDefault();if(l&&l.loaded&&(0,d.Fv)(l.restUrl)===(0,d.Fv)(i))return l.user;const o=`${i}/community/self`,p=(0,u.pC)(e)?e.signal:null,c=await(0,a.q6)((0,n.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:p}));return c.ok?b.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var i=r(43697),s=r(92604),n=r(95330),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),o=r(80539),u=(r(20102),r(26258),r(87538));const p=new o.Z,d=new WeakMap;function c(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(d.get(t)??0)+5>=6e4*t.refreshInterval&&(d.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=m(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?d.get(r)||d.set(r,e):d.delete(r);if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){c(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){c(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,a.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(43697),s=r(92835),n=r(84552),a=r(5600),l=(r(67676),r(80442),r(75215),r(71715)),o=r(52011),u=r(35671),p=r(30547),d=r(78981);const c=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 i=r.timeOffset,s=d.v.fromJSON(r.timeOffsetUnits);return i&&s?new n.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,a.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,a.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,a.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[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 s(e){return i.some((([t,r])=>e>=t&&e<=r))}},30547:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(92835),a=r(84552),l=r(96674),o=r(22974),u=r(70586),p=r(5600),d=(r(75215),r(71715)),c=r(52011),m=r(30556);r(67676),r(80442);let h=i=class extends l.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new i({respectsDaylightSaving:e,timezone:t})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"respectsDaylightSaving",void 0),(0,s._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],h.prototype,"readRespectsDaylightSaving",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],h.prototype,"timezone",void 0),h=i=(0,s._)([(0,c.j)("esri.layers.support.TimeReference")],h);const y=h;var f,g=r(78981);let b=f=class extends l.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]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new a.Z({value:t.timeInterval,unit:g.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new a.Z({value:t.defaultTimeInterval,unit:g.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const r=e.toJSON();t.timeInterval=r.value,t.timeIntervalUnits=r.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:n,fullTimeExtent:a,trackIdField:l,useTime:u}=this;return new f({cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:(0,o.d9)(n),fullTimeExtent:(0,o.d9)(a),trackIdField:l,useTime:u})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],b.prototype,"cumulative",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],b.prototype,"endField",void 0),(0,s._)([(0,p.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"fullTimeExtent",void 0),(0,s._)([(0,d.r)("fullTimeExtent",["timeExtent"])],b.prototype,"readFullTimeExtent",null),(0,s._)([(0,m.c)("fullTimeExtent")],b.prototype,"writeFullTimeExtent",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],b.prototype,"hasLiveData",void 0),(0,s._)([(0,p.Cb)({type:a.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"interval",void 0),(0,s._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],b.prototype,"readInterval",null),(0,s._)([(0,m.c)("interval")],b.prototype,"writeInterval",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],b.prototype,"startField",void 0),(0,s._)([(0,p.Cb)({type:y,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"timeReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"trackIdField",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],b.prototype,"useTime",void 0),b=f=(0,s._)([(0,c.j)("esri.layers.support.TimeInfo")],b);const v=b},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(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
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5906],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(43697),s=r(66577),n=r(51773),a=r(78223),l=r(2368),o=r(96674),u=r(70586),p=r(99001),d=r(5600),c=(r(67676),r(80442),r(75215),r(52011)),m=r(33955);function h(e){if(!(0,u.pC)(e))return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let y=class extends((0,l.J)(o.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}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&&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:h(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,i){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}};(0,i._)([(0,d.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.im)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,d.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,d.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,d.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,d.Cb)({type:n.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,d.Cb)({value:null,types:a.LB})],y.prototype,"symbol",null),(0,i._)([(0,d.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=(0,i._)([(0,c.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),a=r(35463),l=r(5600),o=(r(67676),r(80442),r(75215),r(52011)),u=r(78981);let p=i=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,a.rJ)(this.value,this.unit,"milliseconds")}clone(){return new i({value:this.value,unit:this.unit})}};(0,s._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),(0,s._)([(0,l.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],p.prototype,"unit",void 0),p=i=(0,s._)([(0,o.j)("esri.TimeInterval")],p);const d=p},57435:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(80539),n=r(3920),a=r(70586),l=(r(80442),r(20102),r(92604),r(26258),r(87538)),o=r(5600),u=(r(67676),r(75215),r(52011));let p=class extends((0,n.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,a.pC)(this.getCollections)?this.getCollections():null;if((0,a.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,a.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],p.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"itemFilterFunction",void 0),p=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],p);const d=p},91040:(e,t,r)=>{r.d(t,{yZ:()=>s});var i=r(67900);function s(e,t){const r=t||e.extent,s=e.width,n=(0,i.c9)(r&&r.spatialReference);return r&&s?r.width/s*n*i.hd*96:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>we});var i=r(43697),s=r(68773),n=r(38171),a=r(51773),l=r(3172),o=r(80539),u=r(57435),p=r(3920),d=r(35454),c=r(22974),m=r(70586),h=r(16453),y=r(95330),f=r(17445),g=r(17452),b=r(5600),v=r(75215),w=r(71715),_=r(52011),x=r(30556),C=r(76169),I=r(6570),S=r(82971),E=r(91040),N=r(8744),T=r(87085),O=r(71612),F=r(38009),U=r(16859),L=r(34760),R=r(72965),j=r(28294),P=r(52162),A=r(66677),M=r(21506),D=r(15923);r(67676),r(80442);const Z={visible:"visibleSublayers"};let q=class extends((0,p.p)(D.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(){const{visibleSublayers:e}=this;return e.filter((e=>e.name)).map((e=>e.name)).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,i=[],s=e=>{const{minScale:r,maxScale:n,sublayers:a,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===n||t>=n))&&(a?a.forEach(s):i.unshift(e))};return r?.forEach(s),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:s,layers:t}}};(0,i._)([(0,b.Cb)()],q.prototype,"layer",null),(0,i._)([(0,b.Cb)({readOnly:!0})],q.prototype,"layers",null),(0,i._)([(0,b.Cb)({type:Number})],q.prototype,"scale",void 0),(0,i._)([(0,b.Cb)({readOnly:!0})],q.prototype,"version",null),(0,i._)([(0,b.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),q=(0,i._)([(0,_.j)("esri.layers.support.ExportWMSImageParameters")],q);var k,V=r(61247),B=r(90578);let W=0,$=k=class extends h.w{constructor(e){super(e),this._sublayersHandles=new V.Z,this.dimensions=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.legendUrl=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.popupEnabled=!1,this.queryable=!1,this.spatialReferences=null}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)?I.Z.fromJSON(e):null}get id(){const e=this._get("id");return null==e?W++:e}set id(e){this._set("id",e)}readLegendUrl(e,t){return t?t.legendUrl||t.legendURL:null}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}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)}set sublayers(e){const t=this._get("sublayers");t&&(t.forEach((e=>{e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this._sublayersHandles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))])),this._set("sublayers",e)}castSublayers(e){return(0,v.se)(o.Z.ofType(k),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 k;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()))),this.hasOwnProperty("featureInfoFormat")&&(e.featureInfoFormat=this.featureInfoFormat),this.hasOwnProperty("featureInfoUrl")&&(e.featureInfoUrl=this.featureInfoUrl),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,i._)([(0,b.Cb)()],$.prototype,"description",null),(0,i._)([(0,b.Cb)({readOnly:!0})],$.prototype,"dimensions",void 0),(0,i._)([(0,b.Cb)({value:null})],$.prototype,"fullExtent",null),(0,i._)([(0,w.r)("fullExtent",["extent"])],$.prototype,"readExtent",null),(0,i._)([(0,b.Cb)()],$.prototype,"fullExtents",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"featureInfoFormat",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"featureInfoUrl",void 0),(0,i._)([(0,b.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],$.prototype,"id",null),(0,i._)([(0,b.Cb)({type:String,json:{origins:{"web-document":{read:{source:["legendUrl","legendURL"]},write:{target:"legendUrl",ignoreOrigin:!0}}},read:{source:"legendURL"},write:{ignoreOrigin:!0}}})],$.prototype,"legendUrl",void 0),(0,i._)([(0,w.r)(["web-document"],"legendUrl")],$.prototype,"readLegendUrl",null),(0,i._)([(0,b.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}}}})],$.prototype,"legendEnabled",void 0),(0,i._)([(0,b.Cb)({value:null})],$.prototype,"layer",null),(0,i._)([(0,b.Cb)()],$.prototype,"maxScale",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"minScale",void 0),(0,i._)([(0,b.Cb)({readOnly:!0})],$.prototype,"effectiveScaleRange",null),(0,i._)([(0,b.Cb)({type:String,value:null,json:{read:{source:"name"},write:{ignoreOrigin:!0}}})],$.prototype,"name",null),(0,i._)([(0,b.Cb)()],$.prototype,"parent",void 0),(0,i._)([(0,b.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],$.prototype,"popupEnabled",void 0),(0,i._)([(0,b.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],$.prototype,"queryable",void 0),(0,i._)([(0,b.Cb)()],$.prototype,"sublayers",null),(0,i._)([(0,B.p)("sublayers")],$.prototype,"castSublayers",null),(0,i._)([(0,b.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],$.prototype,"spatialReferences",void 0),(0,i._)([(0,b.Cb)({type:String,value:null,json:{write:{ignoreOrigin:!0}}})],$.prototype,"title",null),(0,i._)([(0,b.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],$.prototype,"visible",null),$=k=(0,i._)([(0,_.j)("esri.layers.support.WMSSublayer")],$);const H=$;var G=r(20102);const J={84:4326,83:4269,27:4267};function X(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 i=K("Capability",r),s=K("Service",r),n=K("Request",i);if(!i||!s||!n)return null;const a=K("Layer",i);if(!a)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=te("Title",s,"")||te("Name",s,""),u=te("AccessConstraints",s,""),p=/^none$/i.test(u)?"":u,d=te("Abstract",s,""),c=parseInt(te("MaxWidth",s,"5000"),10),m=parseInt(te("MaxHeight",s,"5000"),10),h=se(n,"GetMap"),y=ie(n,"GetMap"),f=ae(a,l,t);let g,b,v,w=0;if(Array.prototype.slice.call(i.childNodes).forEach((e=>{"Layer"===e.nodeName&&(0===w?g=e:1===w?(f.name&&(f.name="",f.sublayers.push(ae(g,l,t))),f.sublayers.push(ae(e,l,t))):f.sublayers.push(ae(e,l,t)),w++)})),!f)return null;const _=f.fullExtents;if(b=f.sublayers,b||(b=[]),0===b.length&&b.push(f),v=f.extent,!v){const e=new I.Z(b[0].extent);f.extent=e.toJSON(),v=f.extent}const x=f.spatialReferences.length>0?f.spatialReferences:z(f),C=ie(n,"GetFeatureInfo");let S;if(C){const e=se(n,"GetFeatureInfo");e.includes("text/html")?S="text/html":e.includes("text/plain")&&(S="text/plain")}if(!S){const e=t=>{t&&(t.queryable=!1,t.sublayers&&t.sublayers.forEach((t=>{e(t)})))};e(f)}const E=Q(b),N=f.minScale||0,T=f.maxScale||0,O=f.dimensions,F=E.reduce(((e,t)=>e.concat(t.dimensions)),[]),U=O.concat(F).filter(oe);let L=null;if(U.length>0){let e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY;U.forEach((r=>{const{extent:i}=r;!function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(i)?i.forEach((r=>{e=Math.min(e,r.min.getTime()),t=Math.max(t,r.max.getTime())})):i.forEach((r=>{e=Math.min(e,r.getTime()),t=Math.max(t,r.getTime())}))})),L={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[e,t]}}return{copyright:p,description:d,dimensions:O,extent:v,fullExtents:_,featureInfoFormat:S,featureInfoUrl:C,mapUrl:y,maxWidth:c,maxHeight:m,maxScale:T,minScale:N,layers:E,spatialReferences:x,supportedImageFormatTypes:h,timeInfo:L,title:o,version:l}}function z(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=z(t);if(e.length>0)return e}return[]}function Q(e){let t=[];return e.forEach((e=>{t.push(e),e.sublayers&&e.sublayers.length&&(t=t.concat(Q(e.sublayers)),delete e.sublayers)})),t}function Y(e,t,r){return t.getAttribute(e)??r}function K(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(le(i)&&i.nodeName===e)return i}return null}function ee(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];le(s)&&s.nodeName===e&&r.push(s)}return r}function te(e,t,r){const i=K(e,t);return i?i.textContent:r}function re(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),n=parseFloat(e.getAttribute("maxx")),a=parseFloat(e.getAttribute("maxy"));let l,o,u,p;r?(l=isNaN(s)?-Number.MAX_VALUE:s,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(a)?Number.MAX_VALUE:a,p=isNaN(n)?Number.MAX_VALUE:n):(l=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(n)?Number.MAX_VALUE:n,p=isNaN(a)?Number.MAX_VALUE:a);const d=new S.Z({wkid:t});return new I.Z({xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d})}function ie(e,t){const r=K(t,e);if(r){const e=K("DCPType",r);if(e){const t=K("HTTP",e);if(t){const e=K("Get",t);if(e){let t=function(e,t,r,i){const s=K("OnlineResource",r);return s?Y("xlink:href",s,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=[],i=(0,g.mN)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function se(e,t){const r=ee("Operation",e);if(0===r.length)return ee("Format",K(t,e)).map((e=>e.textContent));const i=[];return r.forEach((e=>{e.getAttribute("name")===t&&ee("Format",e).forEach((e=>{i.push(e.textContent)}))})),i}function ne(e,t,r){const i=K(t,e);if(!i)return r;const{textContent:s}=i;if(null==s||""===s)return r;const n=Number(s);return isNaN(n)?r:n}function ae(e,t,r){if(!e)return null;const i={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},s=K("LatLonBoundingBox",e),n=K("EX_GeographicBoundingBox",e);let a=null;s&&(a=re(s,4326)),n&&(a=new I.Z(0,0,0,0,new S.Z({wkid:4326})),a.xmin=parseFloat(te("westBoundLongitude",n,"0")),a.ymin=parseFloat(te("southBoundLatitude",n,"0")),a.xmax=parseFloat(te("eastBoundLongitude",n,"0")),a.ymax=parseFloat(te("northBoundLatitude",n,"0"))),s||n||(a=new I.Z(-180,-90,180,90,new S.Z({wkid:4326}))),i.minScale=ne(e,"MaxScaleDenominator",0),i.maxScale=ne(e,"MinScaleDenominator",0);const l=["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)i.name=e.textContent||"";else if("Title"===e.nodeName)i.title=e.textContent||"";else if("Abstract"===e.nodeName)i.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(l);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.substring(5),10);0===i||isNaN(i)||a||(a="1.3.0"===t?re(e,i,(0,P.A)(i)):re(e,i))}const s=r&&r.indexOf(":");if(s&&s>-1){let n=parseInt(r.substring(s+1,r.length),10);0===n||isNaN(n)||(n=J[n]?J[n]:n);const a="1.3.0"===t?re(e,n,(0,P.A)(n)):re(e,n);i.fullExtents.push(a)}}else if(e.nodeName===l)e.textContent.split(" ").forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=J[t]?J[t]:t;i.spatialReferences.includes(e)||i.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||i.legendURL){if("Layer"===e.nodeName){const s=ae(e,t,r);s&&(s.parentLayerId=i.id,i.sublayers||(i.sublayers=[]),i.sublayers.push(s))}}else{const t=K("LegendURL",e);if(t){const e=K("OnlineResource",t);e&&(i.legendURL=e.getAttribute("xlink:href"))}}})),i.extent=a?.toJSON(),i.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,s=e.getAttribute("unitSymbol"),n=e.getAttribute("default"),a="0"!==Y("default",e,"0"),l="0"!==Y("nearestValue",e,"0"),o="0"!==Y("current",e,"0");return oe({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(i),default:de(n),multipleValues:a,nearestValue:l,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(i),unitSymbol:s,default:ue(n),multipleValues:a,nearestValue:l}:{name:t,units:r,extent:pe(i),unitSymbol:s,default:pe(n),multipleValues:a,nearestValue:l}})),i}function le(e){return e.nodeType===Node.ELEMENT_NODE}function oe(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return null;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((e=>e)):r.map((e=>parseFloat(e)))}function pe(e){if(!e)return null;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((e=>e)):r}function de(e){if(!e)return null;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]?ce(t[2]):void 0}})).filter((e=>e)):r.map((e=>new Date(e)))}function ce(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 he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new d.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});let be=class extends((0,p.p)((0,O.h)((0,j.n)((0,L.Q)((0,R.M)((0,F.q)((0,U.I)((0,h.R)(T.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.featureInfoFormat=null,this.featureInfoUrl=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;const t="wms-sublayer";this.own((0,f.YP)((()=>this.sublayers),((e,r)=>{if(r){for(const e of r)e.layer=null;this.handles.remove(t)}if(e){for(const t of e)t.parent=this,t.layer=this;this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],t)}}),f.Z_))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,m.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return new I.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]})}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new S.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference&&this.spatialReference.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return ve(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return ve(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const s=new Map,n=e.flatten((({sublayers:e})=>e&&e.toArray())).toArray();n.forEach((e=>{"number"==typeof e.parent.id&&(s.has(e.parent.id)?s.get(e.parent.id).push(e.id):s.set(e.parent.id,[e.id]))})),n.forEach((e=>{const r={sublayer:e,...i},n=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},r);if(s.has(e.id)&&(n.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}})),t.visibleLayers=n.filter((e=>e.visible&&!e.sublayers)).map((e=>e.name))}createExportImageParameters(e,t,r,i){const s=i&&i.pixelRatio||1,n=(0,E.yZ)({extent:e,width:t})*s,a=new q({layer:this,scale:n}),{xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return(0,m.Wi)(t)?r:(!t.includes(r)&&e.latestWkid&&(r=e.latestWkid),ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(d,this.spatialReferences),h="1.3.0"===this.version&&(0,P.A)(c)?`${o},${l},${p},${u}`:`${l},${o},${u},${p}`,y=a.toJSON();return{bbox:h,["1.3.0"===this.version?"crs":"srs"]:isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,i){const s=this.mapUrl,n=this.createExportImageParameters(e,t,r,i);if(!n.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const a=i?.timeExtent?.start,o=i?.timeExtent?.end,u=(0,m.pC)(a)&&(0,m.pC)(o)?a.getTime()===o.getTime()?he(a):`${he(a)}/${he(o)}`:void 0,p={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...n,time:u,...this.refreshParameters}),signal:i?.signal};return(0,l.default)(s,p).then((e=>e.data))}fetchFeatureInfo(e,t,r,i,s){const l=(0,E.yZ)({extent:e,width:t}),o=function(e){return e.length?e.filter((e=>e.popupEnabled&&e.name&&e.queryable)).map((e=>e.name)).join(","):""}(new q({layer:this,scale:l}).visibleSublayers);if(!this.featureInfoUrl||!o)return null;const u="1.3.0"===this.version?{I:i,J:s}:{x:i,y:s},p={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...u},d={...this.createExportImageParameters(e,t,r),...p},c=this._mixCustomParameters(d),m=(0,g.fl)(this.featureInfoUrl,c),h=document.createElement("iframe");h.src=m,h.style.border="none",h.style.margin="0",h.style.width="100%",h.setAttribute("sandbox","");const y=new a.Z({title:this.title,content:h});return new n.Z({sourceLayer:this,popupTemplate:y})}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,A.G)(this.url)||this.spatialReferences.some((t=>{const r=900913===t?S.Z.WebMercator:new S.Z({wkid:t});return(0,N.fS)(r,e)}))}async _fetchService(e){if(!this.resourceInfo){this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request);const t=await(0,l.default)(this.parsedUrl.path,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...this.parsedUrl.query,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=X(t.data)}if(this.parsedUrl){const e=new g.R9(this.parsedUrl.path);"https"!==e.scheme||e.port&&"443"!==e.port||s.Z.request.httpsDomains.includes(e.host)||s.Z.request.httpsDomains.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 ve(e,t,r){const i=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new H;e.read(s,t),-1===r?.indexOf(e.name)&&(e.visible=!1),i.set(e.id,e)}const s=[];for(const t of e){const e=i.get(t.id);if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);r.sublayers||(r.sublayers=new o.Z),r.sublayers.unshift(e)}else s.unshift(e)}return s}(0,i._)([(0,b.Cb)({readOnly:!0})],be.prototype,"allSublayers",void 0),(0,i._)([(0,b.Cb)({json:{type:Object,write:!0}})],be.prototype,"customParameters",void 0),(0,i._)([(0,b.Cb)({json:{type:Object,write:!0}})],be.prototype,"customLayerParameters",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:!0}})],be.prototype,"copyright",void 0),(0,i._)([(0,b.Cb)()],be.prototype,"description",void 0),(0,i._)([(0,b.Cb)({readOnly:!0})],be.prototype,"dimensions",void 0),(0,i._)([(0,b.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],be.prototype,"fullExtent",void 0),(0,i._)([(0,w.r)(["web-document","portal-item"],"fullExtent",["extent"])],be.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,x.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],be.prototype,"writeFullExtent",null),(0,i._)([(0,b.Cb)()],be.prototype,"fullExtents",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"featureInfoFormat",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"featureInfoUrl",void 0),(0,i._)([(0,b.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],be.prototype,"imageFormat",void 0),(0,i._)([(0,w.r)("imageFormat",["supportedImageFormatTypes"])],be.prototype,"readImageFormat",null),(0,i._)([(0,b.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],be.prototype,"imageMaxHeight",void 0),(0,i._)([(0,b.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],be.prototype,"imageMaxWidth",void 0),(0,i._)([(0,b.Cb)()],be.prototype,"imageTransparency",void 0),(0,i._)([(0,b.Cb)(M.rn)],be.prototype,"legendEnabled",void 0),(0,i._)([(0,b.Cb)({type:["show","hide","hide-children"]})],be.prototype,"listMode",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"mapUrl",void 0),(0,i._)([(0,b.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],be.prototype,"isReference",void 0),(0,i._)([(0,b.Cb)({type:["WMS"]})],be.prototype,"operationalLayerType",void 0),(0,i._)([(0,b.Cb)()],be.prototype,"resourceInfo",void 0),(0,i._)([(0,b.Cb)({type:S.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],be.prototype,"spatialReference",void 0),(0,i._)([(0,w.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],be.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,b.Cb)({type:[v.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],be.prototype,"spatialReferences",void 0),(0,i._)([(0,x.c)(["web-document","portal-item"],"spatialReferences")],be.prototype,"writeSpatialReferences",null),(0,i._)([(0,b.Cb)({type:o.Z.ofType(H),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}}}}})],be.prototype,"sublayers",void 0),(0,i._)([(0,w.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],be.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,w.r)("service","sublayers",["layers"])],be.prototype,"readSublayers",null),(0,i._)([(0,x.c)("sublayers",{layers:{type:[H]},visibleLayers:{type:[String]}})],be.prototype,"writeSublayers",null),(0,i._)([(0,b.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],be.prototype,"type",void 0),(0,i._)([(0,b.Cb)(M.HQ)],be.prototype,"url",void 0),(0,i._)([(0,b.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],be.prototype,"version",void 0),be=(0,i._)([(0,_.j)("esri.layers.WMSLayer")],be);const we=be},16859:(e,t,r)=>{r.d(t,{I:()=>w});var i=r(43697),s=r(40330),n=r(3172),a=r(66643),l=r(20102),o=r(92604),u=r(70586),p=r(95330),d=r(17452),c=r(5600),m=(r(67676),r(80442),r(75215),r(71715)),h=r(52011),y=r(30556),f=r(65587),g=r(15235),b=r(86082);const v=o.Z.getLogger("esri.layers.mixins.PortalLayer"),w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||v.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url);if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,l=f.Z.getDefault();if(l&&l.loaded&&(0,d.Fv)(l.restUrl)===(0,d.Fv)(i))return l.user;const o=`${i}/community/self`,p=(0,u.pC)(e)?e.signal:null,c=await(0,a.q6)((0,n.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:p}));return c.ok?b.default.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var i=r(43697),s=r(92604),n=r(95330),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),o=r(80539),u=(r(20102),r(26258),r(87538));const p=new o.Z,d=new WeakMap;function c(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(d.get(t)??0)+5>=6e4*t.refreshInterval&&(d.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=m(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?d.get(r)||d.set(r,e):d.delete(r);if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){c(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){c(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,a.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(43697),s=r(92835),n=r(84552),a=r(5600),l=(r(67676),r(80442),r(75215),r(71715)),o=r(52011),u=r(35671),p=r(30547),d=r(78981);const c=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 i=r.timeOffset,s=d.v.fromJSON(r.timeOffsetUnits);return i&&s?new n.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,a.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,a.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,a.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[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 s(e){return i.some((([t,r])=>e>=t&&e<=r))}},30547:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(92835),a=r(84552),l=r(96674),o=r(22974),u=r(70586),p=r(5600),d=(r(75215),r(71715)),c=r(52011),m=r(30556);r(67676),r(80442);let h=i=class extends l.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new i({respectsDaylightSaving:e,timezone:t})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"respectsDaylightSaving",void 0),(0,s._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],h.prototype,"readRespectsDaylightSaving",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],h.prototype,"timezone",void 0),h=i=(0,s._)([(0,c.j)("esri.layers.support.TimeReference")],h);const y=h;var f,g=r(78981);let b=f=class extends l.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]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new a.Z({value:t.timeInterval,unit:g.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new a.Z({value:t.defaultTimeInterval,unit:g.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const r=e.toJSON();t.timeInterval=r.value,t.timeIntervalUnits=r.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:n,fullTimeExtent:a,trackIdField:l,useTime:u}=this;return new f({cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:(0,o.d9)(n),fullTimeExtent:(0,o.d9)(a),trackIdField:l,useTime:u})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],b.prototype,"cumulative",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],b.prototype,"endField",void 0),(0,s._)([(0,p.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"fullTimeExtent",void 0),(0,s._)([(0,d.r)("fullTimeExtent",["timeExtent"])],b.prototype,"readFullTimeExtent",null),(0,s._)([(0,m.c)("fullTimeExtent")],b.prototype,"writeFullTimeExtent",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],b.prototype,"hasLiveData",void 0),(0,s._)([(0,p.Cb)({type:a.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"interval",void 0),(0,s._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],b.prototype,"readInterval",null),(0,s._)([(0,m.c)("interval")],b.prototype,"writeInterval",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],b.prototype,"startField",void 0),(0,s._)([(0,p.Cb)({type:y,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"timeReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"trackIdField",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],b.prototype,"useTime",void 0),b=f=(0,s._)([(0,c.j)("esri.layers.support.TimeInfo")],b);const v=b},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(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([[3128],{57435:(e,t,r)=>{r.d(t,{Z:()=>p});var i=r(43697),s=r(80539),l=r(3920),o=r(70586),n=(r(20102),r(92604),r(26258),r(87538)),a=r(5600),u=(r(67676),r(80442),r(75215),r(52011));let y=class extends((0,l.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,o.pC)(this.getCollections)?this.getCollections():null;if((0,o.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,o.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,a.Cb)()],y.prototype,"getCollections",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"getChildrenFunction",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"itemFilterFunction",void 0),y=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],y);const p=y},23670:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(20102);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){const[r,l]=e.split("."),o=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(o))throw new i.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!l||!l.match||!l.match(o))throw new i.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const n=parseInt(r,10),a=parseInt(l,10);return new s(n,a,t)}}},42033:(e,t,r)=>{r.d(t,{E:()=>s,_:()=>l});var i=r(70586);async function s(e,t){const{WhereClause:i}=await Promise.resolve().then(r.bind(r,41534));return i.create(e,t)}function l(e,t){return(0,i.pC)(e)?(0,i.pC)(t)?`(${e}) AND (${t})`:e:t}},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),l=(r(67676),r(80442),r(75215),r(52011));const o=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,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},7944:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(43697),s=r(3172),l=r(95330),o=r(17452),n=r(23670),a=r(5600),u=(r(67676),r(80442),r(75215),r(71715)),y=r(52011),p=r(6570),d=r(82971),c=r(21506);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s=r.includes("data"),l=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),y="tile"!==i&&!!t.supportsDynamicLayers,p="tile"!==i&&(!t.tileInfo||y),d="tile"!==i&&(!t.tileInfo||y),c="tile"!==i,h=t.cimVersion&&n.G.parse(t.cimVersion),f=h?.since(1,4)??!1,b=h?.since(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:l,supportsQuery:s,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:y,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:d,supportsCIMSymbols:b}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchSublayerInfo(e,t){return await this.fetchAllLayersAndTables(t),this._allLayersAndTablesMap.get(e)}async fetchAllLayersAndTables(e){await this.load(e),this._allLayersAndTablesPromise||(this._allLayersAndTablesPromise=(0,s.default)((0,o.mN)(this.url).path+"/layers",{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{this._allLayersAndTablesMap=new Map;for(const t of e.data.layers)this._allLayersAndTablesMap.set(t.id,t);return{result:e.data}}),(e=>({error:e}))));const t=await this._allLayersAndTablesPromise;if((0,l.k_)(e),"result"in t)return t.result;throw t.error}};return(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,u.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,a.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,a.Cb)({type:p.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,a.Cb)(c.id)],t.prototype,"id",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,a.Cb)(c.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,a.Cb)({type:d.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,y.j)("esri.layers.mixins.ArcGISMapService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>u});var i=r(43697),s=r(92604),l=r(70586),o=r(5600),n=(r(67676),r(80442),r(75215),r(52011)),a=r(66677);const u=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,a.Qc)(this.url);if((0,l.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,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>m});var i=r(43697),s=r(80539),l=r(57435),o=r(20102),n=r(92604),a=r(17445),u=r(5600),y=(r(67676),r(80442),r(1153)),p=(r(75215),r(52011)),d=r(31263),c=r(49867),h=r(32073);const f=n.Z.getLogger("esri.layers.TileLayer"),b=s.Z.ofType(c.Z);function g(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&g(e.sublayers,t)}))}const m=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new l.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[d.s3.SERVICE]:{},[d.s3.PORTAL_ITEM]:{},[d.s3.WEB_SCENE]:{},[d.s3.WEB_MAP]:{}},this.own((0,a.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),a.Z_))}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,d.M9)(t.origin);if(i<d.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>d.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:l}=this.createSublayersForOrigin("web-document"),o=(0,y.vw)(this);o.setDefaultOrigin(l),this._set("sublayers",new b(s)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,d.M9)("web-document"===e?"web-map":e);let r=d.s3.SERVICE,i=this.sublayersSourceJSON[d.s3.SERVICE].layers,s=this.sublayersSourceJSON[d.s3.SERVICE].context,l=null;const o=[d.s3.PORTAL_ITEM,d.s3.WEB_SCENE,d.s3.WEB_MAP].filter((e=>e<=t));for(const e of o){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(l={visibleLayers:t.visibleLayers,context:t.context}))}const n=[d.s3.PORTAL_ITEM,d.s3.WEB_SCENE,d.s3.WEB_MAP].filter((e=>e>r&&e<=t));let a=null;for(const e of n){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(a={layers:t,context:i}),r&&(l={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new c.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),y=new Map,p=new Set;if(a)for(const e of a.layers)y.set(e.id,e);if(l)for(const e of l.visibleLayers)p.add(e);return g(u,(e=>{a&&e.read(y.get(e.id),a.context),l&&e.read({defaultVisibility:p.has(e.id)},l.context)})),{origin:(0,d.x3)(r),sublayers:new b({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.handles.add(e.on("before-changes",(e=>{f.error(new o.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(c.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:b,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},56765:(e,t,r)=>{r.d(t,{Z:()=>y});var i,s=r(43697),l=r(80539),o=r(96674),n=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let u=i=class extends o.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],u);const y=u},49867:(e,t,r)=>{r.d(t,{Z:()=>z});var i,s=r(43697),l=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(18746),r(5499),r(84382),r(30687),r(91423),r(32400)),n=r(3172),a=r(78223),u=r(80539),y=r(20102),p=r(3920),d=r(10699),c=r(22974),h=r(83379),f=r(92604),b=r(70586),g=r(16453),m=r(42033),v=r(17452),S=r(5600),I=r(1153),w=r(90578),_=r(71715),C=r(52011),E=r(30556),x=r(75215),L=r(31263),O=r(16451),D=r(1231),F=r(99514),P=r(2319),T=r(56765),A=r(10158),j=r(42843),V=r(57444),M=r(32163),N=r(6570);function Z(e){return e&&"esriSMS"===e.type}function R(e,t,r){const i=this.originIdOf(t)>=(0,L.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function k(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&this._isOverridden(t)}}function U(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function $(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,L.M9)(r.origin))}}const J=f.Z.getLogger("esri.layers.support.Sublayer");let B=0;const W=new Set;W.add("layer"),W.add("parent"),W.add("loaded"),W.add("loadStatus"),W.add("loadError"),W.add("loadWarnings");let q=i=class extends((0,p.p)((0,g.R)((0,d.IG)(h.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null}async load(e){return this.addResolvingPromise((async()=>{if(!this.layer&&!this.url)throw new y.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});let t=null;if(!this.layer||this.originIdOf("url")>L.s3.SERVICE||"data-layer"===this.source?.type)t=(await(0,n.default)(this.url,{responseType:"json",query:{f:"json"},...e})).data;else{let r=this.id;"map-layer"===this.source?.type&&(r=this.source.mapLayerId),t=await this.layer.fetchSublayerInfo(r,e)}t&&(this.sourceJSON=t,this.read({layerDefinition:t},{origin:"service"}))})()),this}readCapabilities(e,t){const r=(e=(t=t.layerDefinition||t).capabilities||e)?e.toLowerCase().split(",").map((e=>e.trim())):[];return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r.includes("query")}}}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get fieldsIndex(){return new F.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){const e=this._get("id");return null==e?B++:e}set id(e){this._get("id")!==e&&(!1!==this.get("layer.capabilities.exportMap.supportsDynamicLayers")?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*(null!=r.transparency?r.transparency:r.drawingInfo.transparency)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){if(e)for(const t of e.getSymbols())if((0,a.dU)(t)){J.warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new j.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.get("sublayers.length")&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,v.B7)(r)}`}set url(e){e?this._override("url",e):this._clearOverride("url")}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,I.vw)(this),t=new i;return(0,I.vw)(t).store=e.clone(W),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,M.eZ)(this,e)}createQuery(){return new V.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=this.layer?.parsedUrl,t=new(0,(await Promise.all([r.e(6105),r.e(8326),r.e(3121)]).then(r.bind(r,3121))).default)({url:e.path});return e&&this.source&&("map-layer"===this.source.type?t.layerId=this.source.mapLayerId:t.dynamicDataSource=this.source),null!=this.layer.refreshInterval&&(t.refreshInterval=this.layer.refreshInterval),this.definitionExpression&&(t.definitionExpression=this.definitionExpression),this.floorInfo&&(t.floorInfo=(0,c.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>L.s3.SERVICE&&(t.labelingInfo=(0,c.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>L.s3.DEFAULTS&&(t.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>L.s3.DEFAULTS&&(t.legendEnabled=this.legendEnabled),this.originIdOf("visible")>L.s3.DEFAULTS&&(t.visible=this.visible),this.originIdOf("minScale")>L.s3.DEFAULTS&&(t.minScale=this.minScale),this.originIdOf("maxScale")>L.s3.DEFAULTS&&(t.maxScale=this.maxScale),this.originIdOf("opacity")>L.s3.DEFAULTS&&(t.opacity=this.opacity),this.originIdOf("popupTemplate")>L.s3.DEFAULTS&&(t.popupTemplate=(0,c.d9)(this.popupTemplate)),this.originIdOf("renderer")>L.s3.SERVICE&&(t.renderer=(0,c.d9)(this.renderer)),"data-layer"===this.source?.type&&(t.dynamicDataSource=this.source.clone()),this.originIdOf("title")>L.s3.DEFAULTS&&(t.title=this.title),"map-image"===this.layer.type&&this.layer.originIdOf("customParameters")>L.s3.DEFAULTS&&(t.customParameters=this.layer.customParameters),"tile"===this.layer.type&&this.layer.originIdOf("customParameters")>L.s3.DEFAULTS&&(t.customParameters=this.layer.customParameters),t}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.get("capabilities.operations.supportsQuery"))throw new y.Z("Sublayer.queryFeatures","this layer doesn't support queries.");const[{executeQuery:i},{default:s}]=await Promise.all([Promise.resolve().then(r.bind(r,34599)),r.e(4889).then(r.bind(r,74889))]),l=await i(this.url,V.Z.from(e),this.layer?.spatialReference??null,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}}),o=s.fromJSON(l.data);if(o?.features)for(const e of o.features)e.sourceLayer=this;return o}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,m._)(e,this.definitionExpression);(0,b.pC)(r)&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>L.s3.SERVICE));if(s){const e=t.drawingInfo={};i.renderer>L.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>L.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>L.s3.SERVICE&&(e.labelingInfo=this.labelingInfo?this.labelingInfo.map((e=>e.write({},{origin:"service",layer:this.layer}))):null,e.showLabels=!0),i.opacity>L.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r="uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:[];for(const e of r)Z(e.symbol)&&t(e.symbol);"symbol"in e&&Z(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&Z(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,l;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",l="supportsModification"}const o=(0,I.vw)(this).getDefaultOrigin();if("service"!==o){if(s&&!1===this.get(`layer.capabilities.exportMap.${s}`))return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(l&&!1===this.get(`capabilities.exportMap.${l}`))return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${l}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.get("layer.capabilities.exportMap.supportsSublayersChanges");null==t||t||(J.error(new y.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){J.error(new y.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${this.layer.id}'`,{reason:t,sublayer:this,layer:this.layer}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};q.test={isMapImageLayerOverridePolicy:e=>e===U||e===R,isTileImageLayerOverridePolicy:e=>e===k},(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"capabilities",void 0),(0,s._)([(0,_.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],q.prototype,"readCapabilities",null),(0,s._)([(0,S.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:R}}})],q.prototype,"definitionExpression",null),(0,s._)([(0,S.Cb)({type:[D.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],q.prototype,"fields",void 0),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"fieldsIndex",null),(0,s._)([(0,S.Cb)({type:T.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:R},origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"floorInfo",null),(0,s._)([(0,S.Cb)({type:N.Z,json:{read:{source:"layerDefinition.extent"}}})],q.prototype,"fullExtent",void 0),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"globalIdField",void 0),(0,s._)([(0,_.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],q.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,S.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],q.prototype,"id",null),(0,s._)([(0,S.Cb)({value:null,type:[P.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:U}}})],q.prototype,"labelingInfo",null),(0,s._)([(0,E.c)("labelingInfo")],q.prototype,"writeLabelingInfo",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:U}}})],q.prototype,"labelsVisible",null),(0,s._)([(0,S.Cb)({value:null})],q.prototype,"layer",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:$}}})],q.prototype,"legendEnabled",void 0),(0,s._)([(0,S.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],q.prototype,"listMode",null),(0,s._)([(0,S.Cb)({type:Number,value:0,json:{write:{overridePolicy:U}}})],q.prototype,"minScale",null),(0,s._)([(0,_.r)("minScale",["minScale","layerDefinition.minScale"])],q.prototype,"readMinScale",null),(0,s._)([(0,S.Cb)({type:Number,value:0,json:{write:{overridePolicy:U}}})],q.prototype,"maxScale",null),(0,s._)([(0,_.r)("maxScale",["maxScale","layerDefinition.maxScale"])],q.prototype,"readMaxScale",null),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"effectiveScaleRange",null),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"objectIdField",void 0),(0,s._)([(0,_.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],q.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,S.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:U}}})],q.prototype,"opacity",null),(0,s._)([(0,_.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],q.prototype,"readOpacity",null),(0,s._)([(0,E.c)("opacity")],q.prototype,"writeOpacity",null),(0,s._)([(0,S.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:U}}})],q.prototype,"parent",void 0),(0,s._)([(0,E.c)("parent")],q.prototype,"writeParent",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:$,writer(e,t,r){t[r]=!e}}}})],q.prototype,"popupEnabled",void 0),(0,s._)([(0,S.Cb)({type:l.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:$}}})],q.prototype,"popupTemplate",void 0),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,S.Cb)({types:o.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:U},origins:{"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:U}}}}})],q.prototype,"renderer",null),(0,s._)([(0,S.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":A.n,"map-layer":j.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(j.R,e);if("dataSource"in e)return(0,x.TJ)(A.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:U}}})],q.prototype,"source",null),(0,s._)([(0,S.Cb)()],q.prototype,"sourceJSON",void 0),(0,s._)([(0,S.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:U}}})],q.prototype,"sublayers",null),(0,s._)([(0,w.p)("sublayers")],q.prototype,"castSublayers",null),(0,s._)([(0,E.c)("sublayers")],q.prototype,"writeSublayers",null),(0,s._)([(0,S.Cb)({type:String,json:{name:"name",write:{overridePolicy:$}}})],q.prototype,"title",void 0),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"typeIdField",void 0),(0,s._)([(0,_.r)("typeIdField",["layerDefinition.typeIdField"])],q.prototype,"readTypeIdField",null),(0,s._)([(0,S.Cb)({type:[O.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],q.prototype,"types",void 0),(0,s._)([(0,S.Cb)({type:String,json:{read:{source:"layerUrl"},write:{target:"layerUrl",overridePolicy:k}}})],q.prototype,"url",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:U}}})],q.prototype,"visible",null),(0,s._)([(0,E.c)("visible")],q.prototype,"writeVisible",null),q=i=(0,s._)([(0,C.j)("esri.layers.support.Sublayer")],q);const z=q},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>l,ac:()=>a});var i=r(70586),s=r(31263);function l(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&((0,i.Wi)(t.gdbVersion)||t.gdbVersion===r))||e.originIdOf("renderer")>s.s3.SERVICE||e.originIdOf("labelingInfo")>s.s3.SERVICE||e.originIdOf("opacity")>s.s3.SERVICE||e.originIdOf("labelsVisible")>s.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||(0,i.Wi)(t))return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let s=0;const l=r.length;for(const{id:t}of e){for(;s<l&&r[s]!==t;)s++;if(s>=l)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},51706:(e,t,r)=>{var i,s;function l(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function o(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function a(e,t){const r=t||n(e),l=e.valueUnit||"unknown";return r===i.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===l?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}r.d(t,{PS:()=>n,QW:()=>a,RY:()=>i,hL:()=>s,iY:()=>l,qh:()=>o}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),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={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3128],{57435:(e,t,r)=>{r.d(t,{Z:()=>p});var i=r(43697),s=r(80539),l=r(3920),o=r(70586),n=(r(80442),r(20102),r(92604),r(26258),r(87538)),a=r(5600),u=(r(67676),r(75215),r(52011));let y=class extends((0,l.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,n.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,o.pC)(this.getCollections)?this.getCollections():null;if((0,o.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,o.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,a.Cb)()],y.prototype,"getCollections",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"getChildrenFunction",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"itemFilterFunction",void 0),y=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],y);const p=y},23670:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(20102);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){const[r,l]=e.split("."),o=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(o))throw new i.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!l||!l.match||!l.match(o))throw new i.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const n=parseInt(r,10),a=parseInt(l,10);return new s(n,a,t)}}},42033:(e,t,r)=>{r.d(t,{E:()=>s,_:()=>l});var i=r(70586);async function s(e,t){const{WhereClause:i}=await Promise.resolve().then(r.bind(r,41534));return i.create(e,t)}function l(e,t){return(0,i.pC)(e)?(0,i.pC)(t)?`(${e}) AND (${t})`:e:t}},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),l=(r(67676),r(80442),r(75215),r(52011));const o=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,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},7944:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(43697),s=r(3172),l=r(95330),o=r(17452),n=r(23670),a=r(5600),u=(r(67676),r(80442),r(75215),r(71715)),y=r(52011),p=r(6570),d=r(82971),c=r(21506);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s=r.includes("data"),l=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),y="tile"!==i&&!!t.supportsDynamicLayers,p="tile"!==i&&(!t.tileInfo||y),d="tile"!==i&&(!t.tileInfo||y),c="tile"!==i,h=t.cimVersion&&n.G.parse(t.cimVersion),f=h?.since(1,4)??!1,b=h?.since(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:l,supportsQuery:s,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:y,supportsSublayerVisibility:p,supportsSublayerDefinitionExpression:d,supportsCIMSymbols:b}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchSublayerInfo(e,t){return await this.fetchAllLayersAndTables(t),this._allLayersAndTablesMap.get(e)}async fetchAllLayersAndTables(e){await this.load(e),this._allLayersAndTablesPromise||(this._allLayersAndTablesPromise=(0,s.default)((0,o.mN)(this.url).path+"/layers",{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{this._allLayersAndTablesMap=new Map;for(const t of e.data.layers)this._allLayersAndTablesMap.set(t.id,t);return{result:e.data}}),(e=>({error:e}))));const t=await this._allLayersAndTablesPromise;if((0,l.k_)(e),"result"in t)return t.result;throw t.error}};return(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,u.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,a.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,a.Cb)({type:p.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,a.Cb)(c.id)],t.prototype,"id",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,a.Cb)(c.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,a.Cb)({type:d.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,y.j)("esri.layers.mixins.ArcGISMapService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>u});var i=r(43697),s=r(92604),l=r(70586),o=r(5600),n=(r(67676),r(80442),r(75215),r(52011)),a=r(66677);const u=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,a.Qc)(this.url);if((0,l.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,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>m});var i=r(43697),s=r(80539),l=r(57435),o=r(20102),n=r(92604),a=r(17445),u=r(5600),y=(r(67676),r(80442),r(1153)),p=(r(75215),r(52011)),d=r(31263),c=r(49867),h=r(32073);const f=n.Z.getLogger("esri.layers.TileLayer"),b=s.Z.ofType(c.Z);function g(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&g(e.sublayers,t)}))}const m=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new l.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[d.s3.SERVICE]:{},[d.s3.PORTAL_ITEM]:{},[d.s3.WEB_SCENE]:{},[d.s3.WEB_MAP]:{}},this.own((0,a.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),a.Z_))}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,d.M9)(t.origin);if(i<d.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>d.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:l}=this.createSublayersForOrigin("web-document"),o=(0,y.vw)(this);o.setDefaultOrigin(l),this._set("sublayers",new b(s)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,d.M9)("web-document"===e?"web-map":e);let r=d.s3.SERVICE,i=this.sublayersSourceJSON[d.s3.SERVICE].layers,s=this.sublayersSourceJSON[d.s3.SERVICE].context,l=null;const o=[d.s3.PORTAL_ITEM,d.s3.WEB_SCENE,d.s3.WEB_MAP].filter((e=>e<=t));for(const e of o){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(l={visibleLayers:t.visibleLayers,context:t.context}))}const n=[d.s3.PORTAL_ITEM,d.s3.WEB_SCENE,d.s3.WEB_MAP].filter((e=>e>r&&e<=t));let a=null;for(const e of n){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(a={layers:t,context:i}),r&&(l={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new c.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),y=new Map,p=new Set;if(a)for(const e of a.layers)y.set(e.id,e);if(l)for(const e of l.visibleLayers)p.add(e);return g(u,(e=>{a&&e.read(y.get(e.id),a.context),l&&e.read({defaultVisibility:p.has(e.id)},l.context)})),{origin:(0,d.x3)(r),sublayers:new b({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.handles.add(e.on("before-changes",(e=>{f.error(new o.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(c.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:b,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,p.j)("esri.layers.mixins.SublayersOwner")],t),t}},56765:(e,t,r)=>{r.d(t,{Z:()=>y});var i,s=r(43697),l=r(80539),o=r(96674),n=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let u=i=class extends o.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],u);const y=u},49867:(e,t,r)=>{r.d(t,{Z:()=>z});var i,s=r(43697),l=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(18746),r(5499),r(84382),r(30687),r(91423),r(32400)),n=r(3172),a=r(78223),u=r(80539),y=r(20102),p=r(3920),d=r(10699),c=r(22974),h=r(83379),f=r(92604),b=r(70586),g=r(16453),m=r(42033),v=r(17452),S=r(5600),I=r(1153),w=r(90578),_=r(71715),C=r(52011),E=r(30556),x=r(75215),L=r(31263),O=r(16451),D=r(1231),F=r(99514),P=r(2319),T=r(56765),A=r(10158),j=r(42843),V=r(57444),M=r(32163),N=r(6570);function Z(e){return e&&"esriSMS"===e.type}function R(e,t,r){const i=this.originIdOf(t)>=(0,L.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function k(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&this._isOverridden(t)}}function U(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function $(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,L.M9)(r.origin))}}const J=f.Z.getLogger("esri.layers.support.Sublayer");let B=0;const W=new Set;W.add("layer"),W.add("parent"),W.add("loaded"),W.add("loadStatus"),W.add("loadError"),W.add("loadWarnings");let q=i=class extends((0,p.p)((0,g.R)((0,d.IG)(h.Z)))){constructor(e){super(e),this.capabilities=void 0,this.fields=null,this.fullExtent=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.types=null}async load(e){return this.addResolvingPromise((async()=>{if(!this.layer&&!this.url)throw new y.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});let t=null;if(!this.layer||this.originIdOf("url")>L.s3.SERVICE||"data-layer"===this.source?.type)t=(await(0,n.default)(this.url,{responseType:"json",query:{f:"json"},...e})).data;else{let r=this.id;"map-layer"===this.source?.type&&(r=this.source.mapLayerId),t=await this.layer.fetchSublayerInfo(r,e)}t&&(this.sourceJSON=t,this.read({layerDefinition:t},{origin:"service"}))})()),this}readCapabilities(e,t){const r=(e=(t=t.layerDefinition||t).capabilities||e)?e.toLowerCase().split(",").map((e=>e.trim())):[];return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r.includes("query")}}}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get fieldsIndex(){return new F.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){const e=this._get("id");return null==e?B++:e}set id(e){this._get("id")!==e&&(!1!==this.get("layer.capabilities.exportMap.supportsDynamicLayers")?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*(null!=r.transparency?r.transparency:r.drawingInfo.transparency)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.vU)(this.parent.id):t.parentLayerId=-1}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){if(e)for(const t of e.getSymbols())if((0,a.dU)(t)){J.warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new j.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.get("sublayers.length")&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,v.B7)(r)}`}set url(e){e?this._override("url",e):this._clearOverride("url")}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,I.vw)(this),t=new i;return(0,I.vw)(t).store=e.clone(W),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,M.eZ)(this,e)}createQuery(){return new V.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=this.layer?.parsedUrl,t=new(0,(await Promise.all([r.e(6105),r.e(8326),r.e(3121)]).then(r.bind(r,3121))).default)({url:e.path});return e&&this.source&&("map-layer"===this.source.type?t.layerId=this.source.mapLayerId:t.dynamicDataSource=this.source),null!=this.layer.refreshInterval&&(t.refreshInterval=this.layer.refreshInterval),this.definitionExpression&&(t.definitionExpression=this.definitionExpression),this.floorInfo&&(t.floorInfo=(0,c.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>L.s3.SERVICE&&(t.labelingInfo=(0,c.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>L.s3.DEFAULTS&&(t.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>L.s3.DEFAULTS&&(t.legendEnabled=this.legendEnabled),this.originIdOf("visible")>L.s3.DEFAULTS&&(t.visible=this.visible),this.originIdOf("minScale")>L.s3.DEFAULTS&&(t.minScale=this.minScale),this.originIdOf("maxScale")>L.s3.DEFAULTS&&(t.maxScale=this.maxScale),this.originIdOf("opacity")>L.s3.DEFAULTS&&(t.opacity=this.opacity),this.originIdOf("popupTemplate")>L.s3.DEFAULTS&&(t.popupTemplate=(0,c.d9)(this.popupTemplate)),this.originIdOf("renderer")>L.s3.SERVICE&&(t.renderer=(0,c.d9)(this.renderer)),"data-layer"===this.source?.type&&(t.dynamicDataSource=this.source.clone()),this.originIdOf("title")>L.s3.DEFAULTS&&(t.title=this.title),"map-image"===this.layer.type&&this.layer.originIdOf("customParameters")>L.s3.DEFAULTS&&(t.customParameters=this.layer.customParameters),"tile"===this.layer.type&&this.layer.originIdOf("customParameters")>L.s3.DEFAULTS&&(t.customParameters=this.layer.customParameters),t}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t&&t.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.get("capabilities.operations.supportsQuery"))throw new y.Z("Sublayer.queryFeatures","this layer doesn't support queries.");const[{executeQuery:i},{default:s}]=await Promise.all([Promise.resolve().then(r.bind(r,34599)),r.e(4889).then(r.bind(r,74889))]),l=await i(this.url,V.Z.from(e),this.layer?.spatialReference??null,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}}),o=s.fromJSON(l.data);if(o?.features)for(const e of o.features)e.sourceLayer=this;return o}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,m._)(e,this.definitionExpression);(0,b.pC)(r)&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>L.s3.SERVICE));if(s){const e=t.drawingInfo={};i.renderer>L.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>L.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>L.s3.SERVICE&&(e.labelingInfo=this.labelingInfo?this.labelingInfo.map((e=>e.write({},{origin:"service",layer:this.layer}))):null,e.showLabels=!0),i.opacity>L.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r="uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:[];for(const e of r)Z(e.symbol)&&t(e.symbol);"symbol"in e&&Z(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&Z(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,l;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",l="supportsModification"}const o=(0,I.vw)(this).getDefaultOrigin();if("service"!==o){if(s&&!1===this.get(`layer.capabilities.exportMap.${s}`))return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(l&&!1===this.get(`capabilities.exportMap.${l}`))return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${l}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.get("layer.capabilities.exportMap.supportsSublayersChanges");null==t||t||(J.error(new y.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){J.error(new y.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${this.layer.id}'`,{reason:t,sublayer:this,layer:this.layer}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};q.test={isMapImageLayerOverridePolicy:e=>e===U||e===R,isTileImageLayerOverridePolicy:e=>e===k},(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"capabilities",void 0),(0,s._)([(0,_.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],q.prototype,"readCapabilities",null),(0,s._)([(0,S.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:R}}})],q.prototype,"definitionExpression",null),(0,s._)([(0,S.Cb)({type:[D.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],q.prototype,"fields",void 0),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"fieldsIndex",null),(0,s._)([(0,S.Cb)({type:T.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:R},origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"floorInfo",null),(0,s._)([(0,S.Cb)({type:N.Z,json:{read:{source:"layerDefinition.extent"}}})],q.prototype,"fullExtent",void 0),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"globalIdField",void 0),(0,s._)([(0,_.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],q.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,S.Cb)({type:x.z8,json:{write:{ignoreOrigin:!0}}})],q.prototype,"id",null),(0,s._)([(0,S.Cb)({value:null,type:[P.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:U}}})],q.prototype,"labelingInfo",null),(0,s._)([(0,E.c)("labelingInfo")],q.prototype,"writeLabelingInfo",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:U}}})],q.prototype,"labelsVisible",null),(0,s._)([(0,S.Cb)({value:null})],q.prototype,"layer",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:$}}})],q.prototype,"legendEnabled",void 0),(0,s._)([(0,S.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],q.prototype,"listMode",null),(0,s._)([(0,S.Cb)({type:Number,value:0,json:{write:{overridePolicy:U}}})],q.prototype,"minScale",null),(0,s._)([(0,_.r)("minScale",["minScale","layerDefinition.minScale"])],q.prototype,"readMinScale",null),(0,s._)([(0,S.Cb)({type:Number,value:0,json:{write:{overridePolicy:U}}})],q.prototype,"maxScale",null),(0,s._)([(0,_.r)("maxScale",["maxScale","layerDefinition.maxScale"])],q.prototype,"readMaxScale",null),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"effectiveScaleRange",null),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"objectIdField",void 0),(0,s._)([(0,_.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],q.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,S.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:U}}})],q.prototype,"opacity",null),(0,s._)([(0,_.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],q.prototype,"readOpacity",null),(0,s._)([(0,E.c)("opacity")],q.prototype,"writeOpacity",null),(0,s._)([(0,S.Cb)({json:{type:x.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:U}}})],q.prototype,"parent",void 0),(0,s._)([(0,E.c)("parent")],q.prototype,"writeParent",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:$,writer(e,t,r){t[r]=!e}}}})],q.prototype,"popupEnabled",void 0),(0,s._)([(0,S.Cb)({type:l.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:$}}})],q.prototype,"popupTemplate",void 0),(0,s._)([(0,S.Cb)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,s._)([(0,S.Cb)({types:o.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:U},origins:{"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:U}}}}})],q.prototype,"renderer",null),(0,s._)([(0,S.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":A.n,"map-layer":j.R}},cast(e){if(e){if("mapLayerId"in e)return(0,x.TJ)(j.R,e);if("dataSource"in e)return(0,x.TJ)(A.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:U}}})],q.prototype,"source",null),(0,s._)([(0,S.Cb)()],q.prototype,"sourceJSON",void 0),(0,s._)([(0,S.Cb)({value:null,json:{type:[x.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:U}}})],q.prototype,"sublayers",null),(0,s._)([(0,w.p)("sublayers")],q.prototype,"castSublayers",null),(0,s._)([(0,E.c)("sublayers")],q.prototype,"writeSublayers",null),(0,s._)([(0,S.Cb)({type:String,json:{name:"name",write:{overridePolicy:$}}})],q.prototype,"title",void 0),(0,s._)([(0,S.Cb)({type:String})],q.prototype,"typeIdField",void 0),(0,s._)([(0,_.r)("typeIdField",["layerDefinition.typeIdField"])],q.prototype,"readTypeIdField",null),(0,s._)([(0,S.Cb)({type:[O.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],q.prototype,"types",void 0),(0,s._)([(0,S.Cb)({type:String,json:{read:{source:"layerUrl"},write:{target:"layerUrl",overridePolicy:k}}})],q.prototype,"url",null),(0,s._)([(0,S.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:U}}})],q.prototype,"visible",null),(0,s._)([(0,E.c)("visible")],q.prototype,"writeVisible",null),q=i=(0,s._)([(0,C.j)("esri.layers.support.Sublayer")],q);const z=q},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>l,ac:()=>a});var i=r(70586),s=r(31263);function l(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&((0,i.Wi)(t.gdbVersion)||t.gdbVersion===r))||e.originIdOf("renderer")>s.s3.SERVICE||e.originIdOf("labelingInfo")>s.s3.SERVICE||e.originIdOf("opacity")>s.s3.SERVICE||e.originIdOf("labelsVisible")>s.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e||!e.length||(0,i.Wi)(t))return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let s=0;const l=r.length;for(const{id:t}of e){for(;s<l&&r[s]!==t;)s++;if(s>=l)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale))}},51706:(e,t,r)=>{var i,s;function l(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function o(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?i.Expression:e.field&&"string"==typeof e.field?i.Field:i.Unknown}function a(e,t){const r=t||n(e),l=e.valueUnit||"unknown";return r===i.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===l?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}r.d(t,{PS:()=>n,QW:()=>a,RY:()=>i,hL:()=>s,iY:()=>l,qh:()=>o}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(i||(i={})),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={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[639],{24133:(e,t,i)=>{i.d(t,{Q:()=>a});var s=i(67676),n=i(70586),r=i(44553),o=i(88764);class a{constructor(e=9,t){this.compareMinX=h,this.compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),b.prune(),B.prune(),F.prune()}all(e){this._all(this.data,e)}search(e,t){let i=this.data;const s=this._toBBox;if(_(e,i))for(x.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;_(e,o)&&(i.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}i=x.pop()}}collides(e){let t=this.data;const i=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=new M([]),this}remove(e){if(!e)return this;let t,i=this.data,r=null,o=0,a=!1;const l=this._toBBox(e);for(B.clear(),F.clear();i||B.length>0;){if(i||(i=(0,n.j0)(B.pop()),r=B.data[B.length-1],o=F.pop()??0,a=!0),i.leaf&&(t=(0,s.cq)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),B.push(i),this._condense(B),this;a||i.leaf||!g(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(B.push(i),F.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){let i=e;for(b.clear();i;){if(!0===i.leaf)for(const e of i.children)t(e);else b.pushArray(i.children);i=b.pop()??null}}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new M(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new v([]);o.height=s;const a=Math.ceil(n/r),d=a*Math.ceil(Math.sqrt(r));I(e,t,i,d,this.compareMinX);for(let n=t;n<=i;n+=d){const t=Math.min(n+d-1,i);I(e,n,t,a,this.compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);B.clear();const r=this._chooseSubtree(n,this.data,t,B);for(r.children.push(e),u(r,n);t>=0&&B.data[t].children.length>this._maxEntries;)this._split(B,t),t--;this._adjustParentBBoxes(n,B,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(r,i.children.length-r),a=i.leaf?new M(o):new v(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=new v([e,t]),this.data.height=e.height+1,l(this.data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),l=y(t,a),u=p(t)+p(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this.compareMinX:h,n=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=d(e,0,t,n),o=d(e,i-t,i,n);let a=m(r)+m(o);for(let s=t;s<i-t;s++){const t=e.children[s];u(r,e.leaf?n(t):t),a+=m(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];u(o,e.leaf?n(t):t),a+=m(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)u(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.cq)(r,i,r.length,n.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,s,n){n||(n=new M([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],u(n,e.leaf?s(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function I(e,t,i,s,r){const a=[t,i];for(;a.length;){const t=(0,n.j0)(a.pop()),i=(0,n.j0)(a.pop());if(t-i<=s)continue;const l=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,l,i,t,r),a.push(i,l,l,t)}}const x=new r.Z,b=new r.Z,B=new r.Z,F=new r.Z({deallocator:void 0});class S extends class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class M extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class v extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,i)=>{i.d(t,{H:()=>o});var s=i(80442),n=i(24133);const r={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,s.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){r.minX=e[0],r.minY=e[1],r.maxX=e[2],r.maxY=e[3]})(t),e.search(r,i)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,i)=>{i.d(t,{Z:()=>f});var s=i(20102),n=i(32448),r=i(92604),o=i(70586),a=i(60437),l=i(24470),d=i(98732),u=i(37549),h=i(29730),c=i(70272),p=i(5428);const m={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,h.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class f{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=m}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){if(!this.numFeatures)return null;const e=(0,l.Ue)(l.Gv);return this._featuresById.forEach((t=>{const i=this._boundsStore.get(t.objectId);i&&(e[0]=Math.min(i[0],e[0]),e[1]=Math.min(i[1],e[1]),e[2]=Math.max(i[2],e[2]),e[3]=Math.max(i[3],e[3]))})),e}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{(0,o.pC)(t.geometry)&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t,i){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(i,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,i)=>{this._markedIds.has(i)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(this._markedIds.add(t),i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,d.$)((0,o.pC)(n)?n:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(n)&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){return(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},92908:(e,t,i)=>{i.d(t,{S:()=>n,X:()=>s});const s=1;function n(e,t){let i=0;for(const s of t){const t=s.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},30639:(e,t,i)=>{i.r(t),i.d(t,{default:()=>B});var s=i(20102),n=i(70586),r=i(33955),o=i(8744),a=i(98732),l=i(92908),d=i(57191),u=i(37427),h=i(41006),c=i(25278),p=i(23095),m=i(99514),f=i(86719),y=i(35671);const g=o.Zn,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:o.Zn},I={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function x(e){return(0,r.wp)(e)?null!=e.z:!!e.hasZ}function b(e){return(0,r.wp)(e)?null!=e.m:!!e.hasM}class B{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine&&this._queryEngine&&this._queryEngine.destroy(),this._queryEngine=this._fieldsIndex=this._createDefaultAttributes=null}async load(e){const t=[],{features:i}=e,n=this._inferLayerProperties(i,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:n.hasM,a=null!=e.hasZ?e.hasZ:n.hasZ,p=!e.spatialReference&&!n.spatialReference,x=p?g:e.spatialReference||n.spatialReference,b=p?_:null,B=e.geometryType||n.geometryType,F=!B;let S=e.objectIdField||n.objectIdField,M=e.timeInfo;if(!F&&(p&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!B))throw new s.Z("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!S)throw new s.Z("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&S!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${S}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),S=n.objectIdField),S&&!n.objectIdField){let e=null;r.some((t=>t.name===S&&(e=t,!0)))?(e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:S,name:S,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new s.Z("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===S&&(e.type="esriFieldTypeOID"),!f.v.jsonValues.includes(e.type))throw new s.Z("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}const v={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,y.os)(e);void 0!==t&&(v[e.name]=t)}if(this._fieldsIndex=new m.Z(r),this._createDefaultAttributes=(0,c.Dm)(v,S),M){if(M.startTimeField){const e=this._fieldsIndex.get(M.startTimeField);e?(M.startTimeField=e.name,e.type="esriFieldTypeDate"):M.startTimeField=null}if(M.endTimeField){const e=this._fieldsIndex.get(M.endTimeField);e?(M.endTimeField=e.name,e.type="esriFieldTypeDate"):M.endTimeField=null}if(M.trackIdField){const e=this._fieldsIndex.get(M.trackIdField);e?M.trackIdField=e.name:(M.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:M}}))}M.startTimeField||M.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:M}}),M=null)}const w={warnings:t,featureErrors:[],layerDefinition:{...I,drawingInfo:(0,c.bU)(B),templates:(0,c.Hq)(v),extent:b,geometryType:B,objectIdField:S,fields:r,hasZ:!!a,hasM:!!o,timeInfo:M},assignedObjectIds:{}};if(this._queryEngine=new h.q({fields:r,geometryType:B,hasM:o,hasZ:a,objectIdField:S,spatialReference:x,featureStore:new d.Z({geometryType:B,hasM:o,hasZ:a}),timeInfo:M,cacheSpatialQueries:!0}),!i||!i.length)return this._nextObjectId=l.X,w;const E=(0,l.S)(S,i);return this._nextObjectId=E+1,await(0,u._W)(i,x),this._loadInitialFeatures(w,i)}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,p.b)(t,i),(0,u._W)(e.adds,t),(0,u._W)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let i,s,o=null,a=null,l=null;for(const t of e){const e=t.geometry;if(!(0,n.Wi)(e)&&(o||(o=(0,r.Ji)(e)),a||(a=e.spatialReference),null==i&&(i=x(e)),null==s&&(s=b(e)),o&&a&&null!=i&&null!=s))break}if(t&&t.length){let e=null;t.some((t=>{const i="esriFieldTypeOID"===t.type,s=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,i||s}))&&(l=e.name)}return{geometryType:o,spatialReference:a,objectIdField:l,hasM:s,hasZ:i}}_loadInitialFeatures(e,t){const{geometryType:i,hasM:s,hasZ:o,objectIdField:l,spatialReference:d,featureStore:h}=this._queryEngine,c=[];for(const s of t){if(null!=s.uid&&(e.assignedObjectIds[s.uid]=-1),s.geometry&&i!==(0,r.Ji)(s.geometry)){e.featureErrors.push((0,p.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,p.O0)(this._fieldsIndex,t,s.attributes,!0,e.warnings);o?e.featureErrors.push(o):(this._assignObjectId(t,s.attributes,!0),s.attributes=t,null!=s.uid&&(e.assignedObjectIds[s.uid]=s.attributes[l]),(0,n.pC)(s.geometry)&&(s.geometry=(0,u.iV)(s.geometry,s.geometry.spatialReference,d)),c.push(s))}if(h.addMany((0,a.Yn)([],c,i,o,s,l)),e.layerDefinition.extent=this._queryEngine.fullExtent,e.layerDefinition.timeInfo){const{start:t,end:i}=this._queryEngine.timeExtent;e.layerDefinition.timeInfo.timeExtent=[t,i]}return e}_applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t&&t.length&&this._applyAddEdits(n,t),i&&i.length&&this._applyUpdateEdits(n,i),s&&s.length){for(const e of s)n.deleteResults.push((0,p.d1)(e));this._queryEngine.featureStore.removeManyById(s)}return{fullExtent:this._queryEngine.fullExtent,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:o,hasZ:l,objectIdField:d,spatialReference:h,featureStore:c}=this._queryEngine,m=[];for(const o of t){if(o.geometry&&s!==(0,r.Ji)(o.geometry)){i.push((0,p.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),a=(0,p.O0)(this._fieldsIndex,t,o.attributes);if(a)i.push(a);else{if(this._assignObjectId(t,o.attributes),o.attributes=t,null!=o.uid){const t=o.attributes[d];e.uidToObjectId[o.uid]=t}(0,n.pC)(o.geometry)&&(o.geometry=(0,u.iV)((0,p.og)(o.geometry,h),o.geometry.spatialReference,h)),m.push(o),i.push((0,p.d1)(o.attributes[d]))}}c.addMany((0,a.Yn)([],m,s,l,o,d))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:o,objectIdField:l,spatialReference:d,featureStore:h}=this._queryEngine;for(const c of t){const{attributes:t,geometry:m}=c,f=t&&t[l];if(null==f){e.push((0,p.av)(`Identifier field ${l} missing`));continue}if(!h.has(f)){e.push((0,p.av)(`Feature with object id ${f} missing`));continue}const y=(0,a.EI)(h.getFeature(f),i,o,s);if((0,n.pC)(m)){if(i!==(0,r.Ji)(m)){e.push((0,p.av)("Incorrect geometry type."));continue}y.geometry=(0,u.iV)((0,p.og)(m,d),m.spatialReference,d)}if(t){const i=(0,p.O0)(this._fieldsIndex,y.attributes,t);if(i){e.push(i);continue}}h.add((0,a.XA)(y,i,o,s,l)),e.push((0,p.d1)(f))}}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;i&&t&&isFinite(t[s])?e[s]=t[s]:e[s]=this._nextObjectId++}}},25278:(e,t,i)=>{i.d(t,{Dm:()=>u,Hq:()=>h,MS:()=>c,bU:()=>a});var s=i(80442),n=i(22974),r=i(61159),o=i(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function u(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this.${t} = null;`;for(const t in e)i+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function c(e,t){return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},23095:(e,t,i)=>{i.d(t,{O0:()=>h,av:()=>a,b:()=>f,d1:()=>d,og:()=>m});var s=i(8744),n=i(35671);class r{constructor(){this.code=null,this.description=null}}class o{constructor(e){this.error=new r,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function a(e){return new o(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new l(e)}const u=new Set;function h(e,t,i,s=!1,r){u.clear();for(const o in i){const l=e.get(o);if(!l)continue;const d=i[o],h=c(l,d);if(h!==d&&r&&r.push({name:"invalid-value-type",message:"attribute value was converted to match the field type",details:{field:l,originalValue:d,sanitizedValue:h}}),u.add(l.name),l&&(s||l.editable)){const e=(0,n.Qc)(l,h);if(e)return a((0,n.vP)(e,l,h));t[l.name]=h}}for(const t of e.requiredFields)if(!u.has(t.name))return a(`missing required field "${t.name}"`);return null}function c(e,t){let i=t;return"string"==typeof t&&(0,n.H7)(e)?i=parseFloat(t):null!=t&&(0,n.qN)(e)&&"string"!=typeof t&&(i=String(t)),(0,n.Pz)(i)}let p;function m(e,t){if(!e||!(0,s.JY)(t))return e;if("rings"in e||"paths"in e){if(!p)throw new TypeError("geometry engine not loaded");return p.simplify(t,e)}return e}async function f(e,t){!(0,s.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return p||(p=await Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247)),p)}()}},86719:(e,t,i)=>{i.d(t,{v:()=>s});const s=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},58333:(e,t,i)=>{i.d(t,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>u,qP:()=>a,wW:()=>d});const s=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={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},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[639],{24133:(e,t,i)=>{i.d(t,{Q:()=>a});var s=i(67676),n=i(70586),r=i(44553),o=i(88764);class a{constructor(e=9,t){this.compareMinX=h,this.compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),b.prune(),F.prune(),B.prune()}all(e){this._all(this.data,e)}search(e,t){let i=this.data;const s=this._toBBox;if(_(e,i))for(x.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;_(e,o)&&(i.leaf?t(r):g(e,o)?this._all(r,t):x.push(r))}i=x.pop()}}collides(e){let t=this.data;const i=this._toBBox;if(!_(e,t))return!1;for(x.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=new M([]),this}remove(e){if(!e)return this;let t,i=this.data,r=null,o=0,a=!1;const l=this._toBBox(e);for(F.clear(),B.clear();i||F.length>0;){if(i||(i=(0,n.j0)(F.pop()),r=F.data[F.length-1],o=B.pop()??0,a=!0),i.leaf&&(t=(0,s.cq)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),F.push(i),this._condense(F),this;a||i.leaf||!g(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(F.push(i),B.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){let i=e;for(b.clear();i;){if(!0===i.leaf)for(const e of i.children)t(e);else b.pushArray(i.children);i=b.pop()??null}}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new M(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new v([]);o.height=s;const a=Math.ceil(n/r),d=a*Math.ceil(Math.sqrt(r));I(e,t,i,d,this.compareMinX);for(let n=t;n<=i;n+=d){const t=Math.min(n+d-1,i);I(e,n,t,a,this.compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);F.clear();const r=this._chooseSubtree(n,this.data,t,F);for(r.children.push(e),u(r,n);t>=0&&F.data[t].children.length>this._maxEntries;)this._split(F,t),t--;this._adjustParentBBoxes(n,F,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(r,i.children.length-r),a=i.leaf?new M(o):new v(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=new v([e,t]),this.data.height=e.height+1,l(this.data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),l=y(t,a),u=p(t)+p(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this.compareMinX:h,n=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=d(e,0,t,n),o=d(e,i-t,i,n);let a=m(r)+m(o);for(let s=t;s<i-t;s++){const t=e.children[s];u(r,e.leaf?n(t):t),a+=m(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];u(o,e.leaf?n(t):t),a+=m(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)u(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.cq)(r,i,r.length,n.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,s,n){n||(n=new M([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],u(n,e.leaf?s(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function I(e,t,i,s,r){const a=[t,i];for(;a.length;){const t=(0,n.j0)(a.pop()),i=(0,n.j0)(a.pop());if(t-i<=s)continue;const l=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,l,i,t,r),a.push(i,l,l,t)}}const x=new r.Z,b=new r.Z,F=new r.Z,B=new r.Z({deallocator:void 0});class S extends class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class M extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class v extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,i)=>{i.d(t,{H:()=>o});var s=i(80442),n=i(24133);const r={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,s.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){r.minX=e[0],r.minY=e[1],r.maxX=e[2],r.maxY=e[3]})(t),e.search(r,i)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,i)=>{i.d(t,{Z:()=>f});var s=i(20102),n=i(32448),r=i(92604),o=i(70586),a=i(60437),l=i(24470),d=i(98732),u=i(37549),h=i(29730),c=i(70272),p=i(5428);const m={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,h.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class f{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=m}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){if(!this.numFeatures)return null;const e=(0,l.Ue)(l.Gv);return this._featuresById.forEach((t=>{const i=this._boundsStore.get(t.objectId);i&&(e[0]=Math.min(i[0],e[0]),e[1]=Math.min(i[1],e[1]),e[2]=Math.max(i[2],e[2]),e[3]=Math.max(i[3],e[3]))})),e}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{(0,o.pC)(t.geometry)&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t,i){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(i,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,i)=>{this._markedIds.has(i)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(this._markedIds.add(t),i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,d.$)((0,o.pC)(n)?n:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(n)&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){return(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},92908:(e,t,i)=>{i.d(t,{S:()=>n,X:()=>s});const s=1;function n(e,t){let i=0;for(const s of t){const t=s.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},30639:(e,t,i)=>{i.r(t),i.d(t,{default:()=>F});var s=i(20102),n=i(70586),r=i(33955),o=i(8744),a=i(98732),l=i(92908),d=i(57191),u=i(37427),h=i(41006),c=i(25278),p=i(23095),m=i(99514),f=i(86719),y=i(35671);const g=o.Zn,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:o.Zn},I={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function x(e){return(0,r.wp)(e)?null!=e.z:!!e.hasZ}function b(e){return(0,r.wp)(e)?null!=e.m:!!e.hasM}class F{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine&&this._queryEngine&&this._queryEngine.destroy(),this._queryEngine=this._fieldsIndex=this._createDefaultAttributes=null}async load(e){const t=[],{features:i}=e,n=this._inferLayerProperties(i,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:n.hasM,a=null!=e.hasZ?e.hasZ:n.hasZ,p=!e.spatialReference&&!n.spatialReference,x=p?g:e.spatialReference||n.spatialReference,b=p?_:null,F=e.geometryType||n.geometryType,B=!F;let S=e.objectIdField||n.objectIdField,M=e.timeInfo;if(!B&&(p&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!F))throw new s.Z("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!S)throw new s.Z("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&S!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${S}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),S=n.objectIdField),S&&!n.objectIdField){let e=null;r.some((t=>t.name===S&&(e=t,!0)))?(e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:S,name:S,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new s.Z("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===S&&(e.type="esriFieldTypeOID"),!f.v.jsonValues.includes(e.type))throw new s.Z("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}const v={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,y.os)(e);void 0!==t&&(v[e.name]=t)}if(this._fieldsIndex=new m.Z(r),this._createDefaultAttributes=(0,c.Dm)(v,S),M){if(M.startTimeField){const e=this._fieldsIndex.get(M.startTimeField);e?(M.startTimeField=e.name,e.type="esriFieldTypeDate"):M.startTimeField=null}if(M.endTimeField){const e=this._fieldsIndex.get(M.endTimeField);e?(M.endTimeField=e.name,e.type="esriFieldTypeDate"):M.endTimeField=null}if(M.trackIdField){const e=this._fieldsIndex.get(M.trackIdField);e?M.trackIdField=e.name:(M.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:M}}))}M.startTimeField||M.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:M}}),M=null)}const w={warnings:t,featureErrors:[],layerDefinition:{...I,drawingInfo:(0,c.bU)(F),templates:(0,c.Hq)(v),extent:b,geometryType:F,objectIdField:S,fields:r,hasZ:!!a,hasM:!!o,timeInfo:M},assignedObjectIds:{}};if(this._queryEngine=new h.q({fields:r,geometryType:F,hasM:o,hasZ:a,objectIdField:S,spatialReference:x,featureStore:new d.Z({geometryType:F,hasM:o,hasZ:a}),timeInfo:M,cacheSpatialQueries:!0}),!i||!i.length)return this._nextObjectId=l.X,w;const T=(0,l.S)(S,i);return this._nextObjectId=T+1,await(0,u._W)(i,x),this._loadInitialFeatures(w,i)}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,p.b)(t,i),(0,u._W)(e.adds,t),(0,u._W)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let i,s,o=null,a=null,l=null;for(const t of e){const e=t.geometry;if(!(0,n.Wi)(e)&&(o||(o=(0,r.Ji)(e)),a||(a=e.spatialReference),null==i&&(i=x(e)),null==s&&(s=b(e)),o&&a&&null!=i&&null!=s))break}if(t&&t.length){let e=null;t.some((t=>{const i="esriFieldTypeOID"===t.type,s=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,i||s}))&&(l=e.name)}return{geometryType:o,spatialReference:a,objectIdField:l,hasM:s,hasZ:i}}_loadInitialFeatures(e,t){const{geometryType:i,hasM:s,hasZ:o,objectIdField:l,spatialReference:d,featureStore:h}=this._queryEngine,c=[];for(const s of t){if(null!=s.uid&&(e.assignedObjectIds[s.uid]=-1),s.geometry&&i!==(0,r.Ji)(s.geometry)){e.featureErrors.push((0,p.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,p.O0)(this._fieldsIndex,t,s.attributes,!0,e.warnings);o?e.featureErrors.push(o):(this._assignObjectId(t,s.attributes,!0),s.attributes=t,null!=s.uid&&(e.assignedObjectIds[s.uid]=s.attributes[l]),(0,n.pC)(s.geometry)&&(s.geometry=(0,u.iV)(s.geometry,s.geometry.spatialReference,d)),c.push(s))}if(h.addMany((0,a.Yn)([],c,i,o,s,l)),e.layerDefinition.extent=this._queryEngine.fullExtent,e.layerDefinition.timeInfo){const{start:t,end:i}=this._queryEngine.timeExtent;e.layerDefinition.timeInfo.timeExtent=[t,i]}return e}_applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t&&t.length&&this._applyAddEdits(n,t),i&&i.length&&this._applyUpdateEdits(n,i),s&&s.length){for(const e of s)n.deleteResults.push((0,p.d1)(e));this._queryEngine.featureStore.removeManyById(s)}return{fullExtent:this._queryEngine.fullExtent,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:o,hasZ:l,objectIdField:d,spatialReference:h,featureStore:c}=this._queryEngine,m=[];for(const o of t){if(o.geometry&&s!==(0,r.Ji)(o.geometry)){i.push((0,p.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),a=(0,p.O0)(this._fieldsIndex,t,o.attributes);if(a)i.push(a);else{if(this._assignObjectId(t,o.attributes),o.attributes=t,null!=o.uid){const t=o.attributes[d];e.uidToObjectId[o.uid]=t}(0,n.pC)(o.geometry)&&(o.geometry=(0,u.iV)((0,p.og)(o.geometry,h),o.geometry.spatialReference,h)),m.push(o),i.push((0,p.d1)(o.attributes[d]))}}c.addMany((0,a.Yn)([],m,s,l,o,d))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:o,objectIdField:l,spatialReference:d,featureStore:h}=this._queryEngine;for(const c of t){const{attributes:t,geometry:m}=c,f=t&&t[l];if(null==f){e.push((0,p.av)(`Identifier field ${l} missing`));continue}if(!h.has(f)){e.push((0,p.av)(`Feature with object id ${f} missing`));continue}const y=(0,a.EI)(h.getFeature(f),i,o,s);if((0,n.pC)(m)){if(i!==(0,r.Ji)(m)){e.push((0,p.av)("Incorrect geometry type."));continue}y.geometry=(0,u.iV)((0,p.og)(m,d),m.spatialReference,d)}if(t){const i=(0,p.O0)(this._fieldsIndex,y.attributes,t);if(i){e.push(i);continue}}h.add((0,a.XA)(y,i,o,s,l)),e.push((0,p.d1)(f))}}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;i&&t&&isFinite(t[s])?e[s]=t[s]:e[s]=this._nextObjectId++}}},25278:(e,t,i)=>{i.d(t,{Dm:()=>u,Hq:()=>h,MS:()=>c,bU:()=>a});var s=i(80442),n=i(22974),r=i(61159),o=i(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function u(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this.${t} = null;`;for(const t in e)i+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},23095:(e,t,i)=>{i.d(t,{O0:()=>h,av:()=>a,b:()=>f,d1:()=>d,og:()=>m});var s=i(8744),n=i(35671);class r{constructor(){this.code=null,this.description=null}}class o{constructor(e){this.error=new r,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function a(e){return new o(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new l(e)}const u=new Set;function h(e,t,i,s=!1,r){u.clear();for(const o in i){const l=e.get(o);if(!l)continue;const d=i[o],h=c(l,d);if(h!==d&&r&&r.push({name:"invalid-value-type",message:"attribute value was converted to match the field type",details:{field:l,originalValue:d,sanitizedValue:h}}),u.add(l.name),l&&(s||l.editable)){const e=(0,n.Qc)(l,h);if(e)return a((0,n.vP)(e,l,h));t[l.name]=h}}for(const t of e.requiredFields)if(!u.has(t.name))return a(`missing required field "${t.name}"`);return null}function c(e,t){let i=t;return"string"==typeof t&&(0,n.H7)(e)?i=parseFloat(t):null!=t&&(0,n.qN)(e)&&"string"!=typeof t&&(i=String(t)),(0,n.Pz)(i)}let p;function m(e,t){if(!e||!(0,s.JY)(t))return e;if("rings"in e||"paths"in e){if(!p)throw new TypeError("geometry engine not loaded");return p.simplify(t,e)}return e}async function f(e,t){!(0,s.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return p||(p=await Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247)),p)}()}},86719:(e,t,i)=>{i.d(t,{v:()=>s});const s=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},58333:(e,t,i)=>{i.d(t,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>u,qP:()=>a,wW:()=>d});const s=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={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},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);