@arcgis/core 4.28.0-next.20230911 → 4.28.0-next.20230913
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.
- package/arcade/Feature.js +1 -1
- package/arcade/arcadeTimeUtils.js +1 -1
- package/arcade/executionError.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/errorsupport.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0920312e3c7b63c2e253.js +1 -0
- package/assets/esri/core/workers/chunks/0cb007ab5db0a2a598ec.js +1 -0
- package/assets/esri/core/workers/chunks/0cc61f1b2c0473ded5c2.js +1 -0
- package/assets/esri/core/workers/chunks/0f804e3f888cb4998f46.js +1 -0
- package/assets/esri/core/workers/chunks/189dd81cf95bd8417ee3.js +1 -0
- package/assets/esri/core/workers/chunks/1a723bb4a341f645e5fe.js +1 -0
- package/assets/esri/core/workers/chunks/24c717492ea1b35310d8.js +1 -0
- package/assets/esri/core/workers/chunks/{3ce73dd4113dbc7d11de.js → 2eb58dc339b2bb03d9e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{38c07a8574352a7f2f6d.js → 2ff0dbd5eb7ca57bb7fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{768f3db2705fa9e57641.js → 49dfdc0463450491df9d.js} +1 -1
- package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +1 -0
- package/assets/esri/core/workers/chunks/{56ed099745360888604e.js → 67f01c71280fa0759742.js} +1 -1
- package/assets/esri/core/workers/chunks/{f62842807744bdfaced7.js → 67fab13f56b340076763.js} +1 -1
- package/assets/esri/core/workers/chunks/6d94b358e8d1cf79bba3.js +1 -0
- package/assets/esri/core/workers/chunks/718607d7a3b33fc33b0a.js +1 -0
- package/assets/esri/core/workers/chunks/{4c63d6b9460aa6ae9843.js → 860417f4138f53d315ba.js} +2 -2
- package/assets/esri/core/workers/chunks/8aa7e994b74f66522c37.js +1 -0
- package/assets/esri/core/workers/chunks/9fa485b04b997b0a5509.js +1 -0
- package/assets/esri/core/workers/chunks/a047fcf3c7307a69b63c.js +1 -0
- package/assets/esri/core/workers/chunks/a753d9874801cd448946.js +1 -0
- package/assets/esri/core/workers/chunks/c51233ad51823cb98c35.js +1 -0
- package/assets/esri/core/workers/chunks/c61f20d91a5c432b07dc.js +1 -0
- package/assets/esri/core/workers/chunks/d3d11242e5af57ba77f4.js +1 -0
- package/assets/esri/core/workers/chunks/dbf343d1fb746f99bb6e.js +1 -0
- package/assets/esri/core/workers/chunks/{271ec1d1666bf6dc3dda.js → dc74b4ec85e8e3de5b27.js} +1 -1
- package/assets/esri/core/workers/chunks/e8a8791d765ab6c450dd.js +1 -0
- package/assets/esri/core/workers/chunks/{5fe7b5665710ec6d3046.js → eb0d1c5c96f735c162d3.js} +1 -1
- package/assets/esri/themes/base/widgets/_Sketch.scss +0 -5
- package/assets/esri/themes/base/widgets/_SketchTooltipControls.scss +0 -5
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/HUDMaterial.glsl.js +38 -45
- package/chunks/languageUtils.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/sql/AggregateFunctions.js +1 -1
- package/core/sql/DateOnly.js +1 -1
- package/core/sql/SqlTimestampOffset.js +1 -1
- package/core/sql/TimeOnly.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/geometry/GeometryCursor.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/labelPoint.js +1 -1
- package/geometry/support/meshUtils/bounds.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +190 -144
- package/layers/ImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/csv/csv.js +1 -1
- package/layers/support/FetchAssociatedFeatureLayer.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -3
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/labels/bins.js +1 -1
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/labels/support/utils.js +1 -1
- package/smartMapping/popup/support/clusterUtils.js +1 -1
- package/smartMapping/support/clusterUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/DisplayId.js +1 -1
- package/views/2d/engine/webgl/Utils.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/settings.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/animation/easing.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/support/SketchTooltipControls/SketchTooltipControlsViewModel.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/assets/esri/core/workers/chunks/055575ed2ab78be0bdb2.js +0 -1
- package/assets/esri/core/workers/chunks/0ee90a0b4d09a56c0d48.js +0 -1
- package/assets/esri/core/workers/chunks/15056f91d87f11b00bcc.js +0 -1
- package/assets/esri/core/workers/chunks/344e40934c98d6fe66ae.js +0 -1
- package/assets/esri/core/workers/chunks/558049fcac3a82a093fc.js +0 -1
- package/assets/esri/core/workers/chunks/5c41eb67d19b8710118a.js +0 -1
- package/assets/esri/core/workers/chunks/5d183ac1a8b68ba9c656.js +0 -1
- package/assets/esri/core/workers/chunks/610d4a5d2511fa81460e.js +0 -1
- package/assets/esri/core/workers/chunks/6755bb1f2a6575a8e082.js +0 -1
- package/assets/esri/core/workers/chunks/84173936b309712ba9b3.js +0 -1
- package/assets/esri/core/workers/chunks/877302d6e39a0d530aab.js +0 -1
- package/assets/esri/core/workers/chunks/a07dc782e69111e2eeaf.js +0 -1
- package/assets/esri/core/workers/chunks/b825019841247d173072.js +0 -1
- package/assets/esri/core/workers/chunks/bed1bc13b168fae46404.js +0 -1
- package/assets/esri/core/workers/chunks/c8dd21a332559c99815c.js +0 -1
- package/assets/esri/core/workers/chunks/ccc3564e76c0ec5c0228.js +0 -1
- package/assets/esri/core/workers/chunks/d0a81c7ec8a84eeadd31.js +0 -1
- package/assets/esri/core/workers/chunks/e7a852b319c1d89eddc5.js +0 -1
- package/assets/esri/core/workers/chunks/ebde11fdccb437954ce7.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1574,5732,2596],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,s=r(43697),i=r(66577),o=r(51773),l=r(9790),a=r(2368),u=r(96674),c=r(99001),p=r(5600),m=(r(75215),r(67676),r(80442),r(52011)),d=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,c.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}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))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}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&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=n),"attributes"===e&&(s.attributeName=n),this.layer.graphicChanged(s)}};(0,s._)([(0,p.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,d.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,s._)([(0,p.Cb)({value:null})],y.prototype,"attributes",null),(0,s._)([(0,p.Cb)({value:null,types:i.qM,json:{read:d.im}})],y.prototype,"geometry",null),(0,s._)([(0,p.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,s._)([(0,p.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,s._)([(0,p.Cb)({type:o.Z})],y.prototype,"popupTemplate",void 0),(0,s._)([(0,p.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,s._)([(0,p.Cb)({value:null,types:l.LB})],y.prototype,"symbol",null),(0,s._)([(0,p.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,s._)([(0,m.j)("esri.Graphic")],y),(y||(y={})).generateUID=c.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>h});var n,s=r(43697),i=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let p=n=class extends i.wq{static get allTime(){return m}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===n&&r===s}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,e,t));let s=this.end;if(s){const r=(0,o.JE)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.Nm)(r,1,e,t)}return new n({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=r?o=s:t>=s&&t<=i&&(o=t),r>=s&&r<=i?l=r:i>=t&&i<=r&&(l=i),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new n;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return n.empty}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const s=new n,{start:i,end:l}=this;return null!=i&&(s.start=(0,o.Nm)(i,e,t,r)),null!=l&&(s.end=(0,o.Nm)(l,e,t,r)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=n=(0,s._)([(0,u.j)("esri.TimeExtent")],p);const m=new p,d=new p({start:void 0,end:void 0}),h=p},84552:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(43697),s=r(2368),i=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),c=r(78981);let p=class extends((0,s.J)(i.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,a.J)(c.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,n._)([(0,u.j)("esri.TimeInterval")],p);const m=p},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>s});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},25929:(e,t,r)=>{r.d(t,{M:()=>h,a:()=>f,e:()=>m,f:()=>s,i:()=>c,p:()=>p,r:()=>o,t:()=>i,w:()=>l});var n=r(17452);function s(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,n.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.PF)(e,t.portalItem.itemUrl);null!=r&&u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return d(e,t&&t.portal)}function i(e,t,r=h.YES){if(null==e)return e;!(0,n.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const i=d(r,t.portal),o=d(s,t.portal);s=(0,n.PF)(o,i,i),null!=s&&s!==o&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=m(s,t?.portal),(0,n.YP)(s)&&(s=(0,n.Fv)(s)),t?.resources&&t?.portalItem&&!(0,n.YP)(s)&&!(0,n.HK)(s)&&r===h.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function o(e,t,r){return s(e,r)}function l(e,t,r,n){const s=i(e,n);void 0!==s&&(t[r]=s)}const a=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function c(e){const t=e?.match(a)??null;return t?.[1]??null}function p(e){const t=e?.match(a)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.fZ)(r);return{prefix:null,filename:e,extension:t}}const{path:i,extension:o}=(0,n.fZ)(r.slice(s+1));return{prefix:r.slice(0,s),filename:i,extension:o}}function m(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function d(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.TI)();return(0,n.D6)(s,`${s.scheme}://${r}`)?(0,n.Ie)(e,t.portalHostname,r):(0,n.Ie)(e,r,t.portalHostname)}var h,y;(y=h||(h={}))[y.YES=0]="YES",y[y.NO=1]="NO";const f=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return h},ensureMainOnlineDomain:m,fromJSON:s,itemIdFromResourceUrl:c,prefixAndFilenameFromResourceUrl:p,read:o,toJSON:i,write:l},Symbol.toStringTag,{value:"Module"}))},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),s=r(46791),i=(r(66643),r(20102),r(92604),r(26258),r(87538)),o=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,n._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,n._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,n._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},17445:(e,t,r)=>{r.d(t,{N1:()=>m,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>p,tX:()=>g}),r(66643),r(46791);var n=r(91460),s=r(50758),i=r(70586),o=r(95330),l=r(26258);function a(e,t,r={}){return c(e,t,r,d)}function u(e,t,r={}){return c(e,t,r,h)}function c(e,t,r={},n){let s=null;const o=r.once?(e,r)=>{n(e)&&((0,i.hw)(s),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(s=(0,l.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function p(e,t,r,o={}){let l=null,u=null,c=null;function p(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function m(e){o.once&&o.once&&(0,i.hw)(c),r(e)}const d=a(e,((e,r)=>{p(),(0,n.vT)(e)&&(l=e,u=(0,n.on)(e,t,m),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,s.kB)((()=>{d.remove(),p()})),c}function m(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let l=null;function a(){l=(0,i.hw)(l)}return new Promise(((n,i)=>{l=(0,s.AL)([(0,o.fu)(r,(()=>{a(),i((0,o.zE)())})),c(e,(e=>{a(),n(e)}),{sync:!1,once:!0},t??d)])}))}(e,h,t)}function d(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>o,rJ:()=>a});var n=r(23756),s=r(17126);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(e,t,r,i="system"){const o=new s.vF((0,n.f1)(i)),l=s.ou.fromJSDate(e,{zone:o}),a="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[a]:t}).toJSDate()}function l(e,t,r="system"){const i=new s.vF((0,n.f1)(r)),o=s.ou.fromJSDate(e,{zone:i});if("decades"===t||"centuries"===t){const e=o.startOf("year"),{year:r}=e,n=r-r%("decades"===t?10:100);return e.set({year:n}).toJSDate()}const l=u(t);return o.startOf(l).toJSDate()}function a(e,t,r){return 0===e?0:e*i[t]/i[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},91040:(e,t,r)=>{r.d(t,{yZ:()=>i});var n=r(67900);const s=96;function i(e,t){const r=t||e.extent,i=e.width,o=(0,n.c9)(r&&r.spatialReference);return r&&i?r.width/i*o*n.hd*s:0}},23756:(e,t,r)=>{r.d(t,{Ze:()=>_,Xr:()=>f,p6:()=>x,f1:()=>C});var n=r(35454),s=r(70171);const i="system",o="unknown",l="UTC";r(17126);const a=Intl.DateTimeFormat().resolvedOptions().timeZone,u={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},p={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},d={hour:"numeric",minute:"numeric"},h={...d,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...d},"short-date-short-time-24":{...u,...d,hour12:!1},"short-date-long-time":{...u,...h},"short-date-long-time-24":{...u,...h,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...d},"short-date-le-short-time-24":{...u,...d,hour12:!1},"short-date-le-long-time":{...u,...h},"short-date-le-long-time-24":{...u,...h,hour12:!1},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...d},"long-month-day-year-short-time-24":{...c,...d,hour12:!1},"long-month-day-year-long-time":{...c,...h},"long-month-day-year-long-time-24":{...c,...h,hour12:!1},"day-short-month-year":p,"day-short-month-year-short-time":{...p,...d},"day-short-month-year-short-time-24":{...p,...d,hour12:!1},"day-short-month-year-long-time":{...p,...h},"day-short-month-year-long-time-24":{...p,...h,hour12:!1},"long-date":m,"long-date-short-time":{...m,...d},"long-date-short-time-24":{...m,...d,hour12:!1},"long-date-long-time":{...m,...h},"long-date-long-time-24":{...m,...h,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":d,"long-time":h},f=(0,n.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),g={ar:"ar-u-nu-latn-ca-gregory"};let b=new WeakMap;const v=y["short-date-short-time"];function w(e){let t=b.get(e);if(!t){const r=(0,s.Kd)(),n=g[r]||r,i=I(e);t=new Intl.DateTimeFormat(n,i),b.set(e,t)}return t}function _(e){return y[e]}function x(e,t=v){return w(t).format(e)}function I(e){const t=C(e.timeZone??i);return{...e,timeZone:t}}function C(e){switch(e){case i:return a;case o:return l;default:return e}}(0,s.Ze)((()=>{b=new WeakMap}))},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),s=r(68773),i=r(38171),o=r(51773),l=r(3172),a=r(46791),u=r(57435),c=r(35454),p=r(22974),m=r(16453),d=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),I=r(82971),C=r(91040),S=r(8744),T=r(87085),E=r(71612),N=r(38009),F=r(16859),O=r(34760),P=r(72965),U=r(28294),L=r(52162),j=r(66677),R=r(21506),A=r(92036),M=r(67676);r(80442);const D={visible:"visibleSublayers"};let Z=class extends A.Z{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(D[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],s=e=>{const{minScale:r,maxScale:i,sublayers:o,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===i||t>=i))&&(o?o.forEach(s):n.push(e))};return r?.forEach(s),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:s,layers:t}}};(0,n._)([(0,f.Cb)()],Z.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],Z);var $,k=r(90082),q=r(10699),H=r(90578);let B=0,J=$=class extends((0,q.IG)(m.w)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??B++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.se)(a.Z.ofType($),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new $;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,H.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=$=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const G=J;var W=r(20102);const V={84:4326,83:4269,27:4267};function Y(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 W.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=Q("Capability",r),s=Q("Service",r),i=n&&Q("Request",n);if(!n||!s||!i)return null;const o=Q("Layer",n);if(!o)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=te("Title",s,"")||te("Name",s,""),u=te("AccessConstraints",s,""),c=/^none$/i.test(u)?"":u,p=te("Abstract",s,""),m=parseInt(te("MaxWidth",s,"5000"),10),d=parseInt(te("MaxHeight",s,"5000"),10),h=se(i,"GetMap"),y=ne(i,"GetMap"),f=oe(o,l,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(oe(g,l,t))),_(oe(e,l,t))):_(oe(e,l,t)),b++)}));let I=f.sublayers,C=f.extent;const S=f.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(f),!C){const e=new x.Z(I[0].extent);f.extent=e.toJSON(),C=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:z(f),E=ne(i,"GetFeatureInfo"),N=E?se(i,"GetFeatureInfo"):null,F=X(I),O=f.minScale||0,P=f.maxScale||0,U=f.dimensions??[],L=F.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),j=U.concat(L).filter(ae);let R=null;if(j.length){const e=j.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(M.pC);R={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:c,description:p,dimensions:U,extent:C,fullExtents:S,featureInfoFormats:N,featureInfoUrl:E,mapUrl:y,maxWidth:m,maxHeight:d,maxScale:P,minScale:O,layers:F,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:R,title:a,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 X(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(X(r.sublayers)),delete r.sublayers);return t}function K(e,t,r){return t.getAttribute(e)??r}function Q(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(le(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const s=t.childNodes[n];le(s)&&s.nodeName===e&&r.push(s)}return r}function te(e,t,r){return Q(e,t)?.textContent??r}function re(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),i=parseFloat(e.getAttribute("maxx")),o=parseFloat(e.getAttribute("maxy"));let l,a,u,c;r?(l=isNaN(s)?-Number.MAX_VALUE:s,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(o)?Number.MAX_VALUE:o,c=isNaN(i)?Number.MAX_VALUE:i):(l=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(i)?Number.MAX_VALUE:i,c=isNaN(o)?Number.MAX_VALUE:o);const p=new I.Z({wkid:t});return new x.Z({xmin:l,ymin:a,xmax:u,ymax:c,spatialReference:p})}function ne(e,t){const r=Q(t,e);if(r){const e=Q("DCPType",r);if(e){const t=Q("HTTP",e);if(t){const e=Q("Get",t);if(e){let t=function(e,t,r,n){const s=Q("OnlineResource",r);return s?K("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=[],n=(0,y.mN)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function se(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",Q(t,e)).map((({textContent:e})=>e)).filter(M.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function ie(e,t,r){const n=Q(t,e);if(!n)return r;const{textContent:s}=n;if(null==s||""===s)return r;const i=Number(s);return isNaN(i)?r:i}function oe(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},s=Q("LatLonBoundingBox",e),i=Q("EX_GeographicBoundingBox",e);let o=null;s&&(o=re(s,4326)),i&&(o=new x.Z(0,0,0,0,new I.Z({wkid:4326})),o.xmin=parseFloat(te("westBoundLongitude",i,"0")),o.ymin=parseFloat(te("southBoundLatitude",i,"0")),o.xmax=parseFloat(te("eastBoundLongitude",i,"0")),o.ymax=parseFloat(te("northBoundLatitude",i,"0"))),s||i||(o=new x.Z(-180,-90,180,90,new I.Z({wkid:4326}))),n.minScale=ie(e,"MaxScaleDenominator",0),n.maxScale=ie(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)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(l);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||o||(o="1.3.0"===t?re(e,n,(0,L.A)(n)):re(e,n))}const s=r&&r.indexOf(":");if(s&&s>-1){let i=parseInt(r.substring(s+1,r.length),10);0===i||isNaN(i)||(i=V[i]??i);const o="1.3.0"===t?re(e,i,(0,L.A)(i)):re(e,i);o&&n.fullExtents&&n.fullExtents.push(o)}}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=V[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const s=oe(e,t,r);s&&(s.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(s))}}else{const t=Q("LegendURL",e);if(t){const e=Q("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=o?.toJSON(),n.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,s=e.getAttribute("unitSymbol")??void 0,i=e.getAttribute("default")??void 0,o="0"!==K("default",e,"0"),l="0"!==K("nearestValue",e,"0"),a="0"!==K("current",e,"0");return ae({name:t,units:r})?{name:"time",units:"ISO8601",extent:pe(n),default:pe(i),multipleValues:o,nearestValue:l,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:s,default:ue(i),multipleValues:o,nearestValue:l}:{name:t,units:r,extent:ce(n),unitSymbol:s,default:ce(i),multipleValues:o,nearestValue:l}})),n}function le(e){return e.nodeType===Node.ELEMENT_NODE}function ae(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(M.pC):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(M.pC):r}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?me(t[2]):void 0}})).filter(M.pC):r.map((e=>new Date(e)))}function me(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:de(t[1]),months:de(t[2]),days:de(t[3]),hours:de(t[4]),minutes:de(t[5]),seconds:de(t[6])}:null}function de(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 c.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,E.h)((0,U.n)((0,O.Q)((0,P.M)((0,N.q)((0,F.I)((0,m.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.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(d.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const s=new Map,i=e.flatten((({sublayers:e})=>e??[]));for(const e of i)if("number"==typeof e.parent?.id){const t=s.get(e.parent.id);null!=t?t.push(e.id):s.set(e.parent.id,[e.id])}for(const e of i){const r={sublayer:e,...n},i=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(s.has(e.id)&&(i.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=i.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const s=n?.pixelRatio??1,i=(0,C.yZ)({extent:e,width:t})*s,o=new Z({layer:this,scale:i}),{xmin:l,ymin:a,xmax:u,ymax:c,spatialReference:p}=e,m=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(p,this.spatialReferences),d="1.3.0"===this.version&&(0,L.A)(m)?`${a},${l},${c},${u}`:`${l},${a},${u},${c}`,h=o.toJSON();return{bbox:d,["1.3.0"===this.version?"crs":"srs"]:null==m||isNaN(m)?void 0:"EPSG:"+m,...h}}async fetchImage(e,t,r,n){const s=this.mapUrl,i=this.createExportImageParameters(e,t,r,n);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=o&&null!=a?o.getTime()===a.getTime()?he(o):`${he(o)}/${he(a)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:n?.signal};return(0,l.Z)(s??"",c).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const s=this.mapUrl??"",i=this.createExportImageParameters(e,t,r,n);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=o&&null!=a?o.getTime()===a.getTime()?he(o):`${he(o)}/${he(a)}`:void 0,c={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:n?.signal},{data:p}=await(0,l.Z)(s,c);return(0,k.g)(p,s,n?.signal)}fetchFeatureInfo(e,t,r,n,s){const i=(0,C.yZ)({extent:e,width:t}),o=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new Z({layer:this,scale:i}).visibleSublayers);if(null==this.featureInfoUrl||null==o)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:n,J:s}:{x:n,y:s},a={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},u={...this.createExportImageParameters(e,t,r),...a},c=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(c):this._defaultFetchFeatureInfoFunction((0,y.fl)(this.featureInfoUrl,c))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,j.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,S.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new o.Z({title:this.title,content:t}),n=new i.Z({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,l.Z)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=Y(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=s.default.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,p.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new G;e.read(s,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const s=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new a.Z),r.sublayers.push(e)}else s.push(e)}return s}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.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"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(R.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:a.Z.ofType(G),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[G]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(R.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>x});var n=r(43697),s=r(68773),i=r(40330),o=r(3172),l=r(66643),a=r(20102),u=r(92604),c=r(70586),p=r(95330),m=r(17452),d=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.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{load:n}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,_.Ss)(r);let s,o;if(n)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!s||!(0,m.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(i.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=i.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,m.Fv)(s.restUrl)===(0,m.Fv)(n))return s.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.Z.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,n=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&n&&!(0,m.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,n._)([(0,d.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,n._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var n=r(43697),s=r(92604),i=r(95330),o=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),c=r(46791),p=(r(66643),r(20102),r(26258),r(87538));const m=new c.Z,d=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&m.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let f=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of m){const n=r.deref();n?n.refreshInterval&&e-(d.get(n)??0)+5>=6e4*n.refreshInterval&&(d.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=m.length-1;e>=0;e--)m.at(e).deref()||m.removeAt(e)}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const r of m){const n=r.deref();n&&(t=y(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?d.get(n)||d.set(n,e):d.delete(n))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(b,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=m.find((t=>t.deref()===e));t&&m.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>m});var n=r(43697),s=r(92835),i=r(84552),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),c=r(76259),p=r(78981);const m=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,s=p.v.fromJSON(r.timeOffsetUnits);return n&&s?new i.Z({value:n,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,o.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,o.Cb)({type:i.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,o.Cb)({value:null,type:c.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),s=r(92835),i=r(84552),o=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),p=r(30556),m=r(80216);function d(e,t){return i.Z.fromJSON({value:e,unit:t})}let h=class extends((0,o.J)(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]),n=new Date(t.timeExtent[1]);return new s.Z({start:r,end:n})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,p.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,p.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,a.Cb)({type:m.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,c.j)("esri.layers.support.TimeInfo")],h);const y=h},66677:(e,t,r)=>{r.d(t,{B5:()=>c,DR:()=>m,G:()=>v,M8:()=>y,Nm:()=>f,Qc:()=>p,XG:()=>g,a7:()=>h,ld:()=>d,wH:()=>b});var n=r(17452),s=r(25929);const i={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(i),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return!!l.test(e)}function p(e){if(null==e)return null;const t=(0,n.mN)(e),r=t.path.match(l)||t.path.match(a);if(!r)return null;const[,s,o,u,c]=r,p=o.indexOf("/");return{title:d(-1!==p?o.slice(p+1):o),serverType:i[u.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function m(e){const t=(0,n.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=p(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=d(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,n.Qj)((0,n.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,n.Hu)(t,e.logger);const r=(0,n.mN)(t),s=p(r.path);let i;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(i=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=m(r.path);null!=e&&(t=e.serviceUrl,i=e.sublayerId)}return{url:(0,n.Qj)(t),layerId:i}}function b(e,t,r,i,o){(0,s.w)(t,i,"url",o),i.url&&null!=e.layerId&&(i.url=(0,n.v_)(i.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),n=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),i=t.includes("/wmsserver");return r&&(n||s||i)}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>i});var n=r(20102),s=r(95330);async function i(e,t,r){let i;try{i=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),i}async function o(e,t,r,i,o){let l;try{l=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${i}`,{error:e,level:t,row:r,col:i})}return(0,s.k_)(o),l}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(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})},31134:(e,t,r)=>{r.d(t,{Z:()=>m});var n,s=r(43697),i=r(96674),o=r(62357),l=r(5600),a=r(90578),u=(r(67676),r(80442),r(52011)),c=r(61565);let p=n=class extends i.wq{constructor(e){super(e),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(e){return(0,o.t_)(e)}clone(){return new n({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,s._)([(0,l.Cb)({type:c.JT,json:{default:"none",write:!0}})],p.prototype,"decoration",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"family",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.textSymbol3D})}}})],p.prototype,"size",void 0),(0,s._)([(0,a.p)("size")],p.prototype,"castSize",null),(0,s._)([(0,l.Cb)({type:c.g6,json:{default:"normal",write:!0}})],p.prototype,"style",void 0),(0,s._)([(0,l.Cb)({type:c.vC,json:{default:"normal",write:!0}})],p.prototype,"weight",void 0),p=n=(0,s._)([(0,u.j)("esri.symbols.Font")],p);const m=p},61565:(e,t,r)=>{r.d(t,{Ck:()=>a,JT:()=>i,Nj:()=>c,c9:()=>p,g6:()=>o,vC:()=>l,x0:()=>u});var n=r(22021),s=r(75215);const i=["none","underline","line-through"],o=["normal","italic","oblique"],l=["normal","lighter","bold","bolder"],a={type:Number,cast:e=>{const t=(0,s.q9)(e);return 0===t?1:(0,n.uZ)(t,.1,4)},nonNullable:!0},u={type:["left","right","center"],nonNullable:!0},c={type:["baseline","top","middle","bottom"],nonNullable:!0},p=8}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1574,5732,2596],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,s=r(43697),i=r(66577),o=r(51773),l=r(9790),a=r(2368),u=r(96674),c=r(99001),p=r(5600),m=(r(75215),r(67676),r(80442),r(52011)),d=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,c.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}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))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}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&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=n),"attributes"===e&&(s.attributeName=n),this.layer.graphicChanged(s)}};(0,s._)([(0,p.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,d.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,s._)([(0,p.Cb)({value:null})],y.prototype,"attributes",null),(0,s._)([(0,p.Cb)({value:null,types:i.qM,json:{read:d.im}})],y.prototype,"geometry",null),(0,s._)([(0,p.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,s._)([(0,p.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,s._)([(0,p.Cb)({type:o.Z})],y.prototype,"popupTemplate",void 0),(0,s._)([(0,p.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,s._)([(0,p.Cb)({value:null,types:l.LB})],y.prototype,"symbol",null),(0,s._)([(0,p.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,s._)([(0,m.j)("esri.Graphic")],y),(y||(y={})).generateUID=c.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>h});var n,s=r(43697),i=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let p=n=class extends i.wq{static get allTime(){return m}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===n&&r===s}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,e,t));let s=this.end;if(s){const r=(0,o.JE)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.Nm)(r,1,e,t)}return new n({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=r?o=s:t>=s&&t<=i&&(o=t),r>=s&&r<=i?l=r:i>=t&&i<=r&&(l=i),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new n;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return n.empty}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const s=new n,{start:i,end:l}=this;return null!=i&&(s.start=(0,o.Nm)(i,e,t,r)),null!=l&&(s.end=(0,o.Nm)(l,e,t,r)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return m.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],p.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],p.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=n=(0,s._)([(0,u.j)("esri.TimeExtent")],p);const m=new p,d=new p({start:void 0,end:void 0}),h=p},84552:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(43697),s=r(2368),i=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),c=r(78981);let p=class extends((0,s.J)(i.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,a.J)(c.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,n._)([(0,u.j)("esri.TimeInterval")],p);const m=p},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>s});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},25929:(e,t,r)=>{r.d(t,{M:()=>h,a:()=>f,e:()=>m,f:()=>s,i:()=>c,p:()=>p,r:()=>o,t:()=>i,w:()=>l});var n=r(17452);function s(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,n.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.PF)(e,t.portalItem.itemUrl);null!=r&&u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return d(e,t&&t.portal)}function i(e,t,r=h.YES){if(null==e)return e;!(0,n.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const i=d(r,t.portal),o=d(s,t.portal);s=(0,n.PF)(o,i,i),null!=s&&s!==o&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=m(s,t?.portal),(0,n.YP)(s)&&(s=(0,n.Fv)(s)),t?.resources&&t?.portalItem&&!(0,n.YP)(s)&&!(0,n.HK)(s)&&r===h.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function o(e,t,r){return s(e,r)}function l(e,t,r,n){const s=i(e,n);void 0!==s&&(t[r]=s)}const a=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function c(e){const t=e?.match(a)??null;return t?.[1]??null}function p(e){const t=e?.match(a)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.fZ)(r);return{prefix:null,filename:e,extension:t}}const{path:i,extension:o}=(0,n.fZ)(r.slice(s+1));return{prefix:r.slice(0,s),filename:i,extension:o}}function m(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function d(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.TI)();return(0,n.D6)(s,`${s.scheme}://${r}`)?(0,n.Ie)(e,t.portalHostname,r):(0,n.Ie)(e,r,t.portalHostname)}var h,y;(y=h||(h={}))[y.YES=0]="YES",y[y.NO=1]="NO";const f=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return h},ensureMainOnlineDomain:m,fromJSON:s,itemIdFromResourceUrl:c,prefixAndFilenameFromResourceUrl:p,read:o,toJSON:i,write:l},Symbol.toStringTag,{value:"Module"}))},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),s=r(46791),i=(r(66643),r(20102),r(92604),r(26258),r(87538)),o=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,n._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,n._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,n._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},17445:(e,t,r)=>{r.d(t,{N1:()=>m,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>p,tX:()=>g}),r(66643),r(46791);var n=r(91460),s=r(50758),i=r(70586),o=r(95330),l=r(26258);function a(e,t,r={}){return c(e,t,r,d)}function u(e,t,r={}){return c(e,t,r,h)}function c(e,t,r={},n){let s=null;const o=r.once?(e,r)=>{n(e)&&((0,i.hw)(s),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(s=(0,l.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function p(e,t,r,o={}){let l=null,u=null,c=null;function p(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function m(e){o.once&&o.once&&(0,i.hw)(c),r(e)}const d=a(e,((e,r)=>{p(),(0,n.vT)(e)&&(l=e,u=(0,n.on)(e,t,m),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,s.kB)((()=>{d.remove(),p()})),c}function m(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let l=null;function a(){l=(0,i.hw)(l)}return new Promise(((n,i)=>{l=(0,s.AL)([(0,o.fu)(r,(()=>{a(),i((0,o.zE)())})),c(e,(e=>{a(),n(e)}),{sync:!1,once:!0},t??d)])}))}(e,h,t)}function d(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>o,rJ:()=>a});var n=r(23756),s=r(17126);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(e,t,r,i="system"){const o=new s.vF((0,n.f1)(i)),l=s.ou.fromJSDate(e,{zone:o}),a="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[a]:t}).toJSDate()}function l(e,t,r="system"){const i=new s.vF((0,n.f1)(r)),o=s.ou.fromJSDate(e,{zone:i});if("decades"===t||"centuries"===t){const e=o.startOf("year"),{year:r}=e,n=r-r%("decades"===t?10:100);return e.set({year:n}).toJSDate()}const l=u(t);return o.startOf(l).toJSDate()}function a(e,t,r){return 0===e?0:e*i[t]/i[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},91040:(e,t,r)=>{r.d(t,{yZ:()=>i});var n=r(67900);const s=96;function i(e,t){const r=t||e.extent,i=e.width,o=(0,n.c9)(r&&r.spatialReference);return r&&i?r.width/i*o*n.hd*s:0}},23756:(e,t,r)=>{r.d(t,{Ze:()=>_,Xr:()=>f,p6:()=>x,f1:()=>C});var n=r(35454),s=r(70171);const i="system",o="unknown",l="UTC";r(17126);const a=Intl.DateTimeFormat().resolvedOptions().timeZone,u={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},p={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},d={hour:"numeric",minute:"numeric"},h={...d,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...d},"short-date-short-time-24":{...u,...d,hour12:!1},"short-date-long-time":{...u,...h},"short-date-long-time-24":{...u,...h,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...d},"short-date-le-short-time-24":{...u,...d,hour12:!1},"short-date-le-long-time":{...u,...h},"short-date-le-long-time-24":{...u,...h,hour12:!1},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...d},"long-month-day-year-short-time-24":{...c,...d,hour12:!1},"long-month-day-year-long-time":{...c,...h},"long-month-day-year-long-time-24":{...c,...h,hour12:!1},"day-short-month-year":p,"day-short-month-year-short-time":{...p,...d},"day-short-month-year-short-time-24":{...p,...d,hour12:!1},"day-short-month-year-long-time":{...p,...h},"day-short-month-year-long-time-24":{...p,...h,hour12:!1},"long-date":m,"long-date-short-time":{...m,...d},"long-date-short-time-24":{...m,...d,hour12:!1},"long-date-long-time":{...m,...h},"long-date-long-time-24":{...m,...h,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":d,"long-time":h},f=(0,n.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),g={ar:"ar-u-nu-latn-ca-gregory"};let b=new WeakMap;const v=y["short-date-short-time"];function w(e){let t=b.get(e);if(!t){const r=(0,s.Kd)(),n=g[r]||r,i=I(e);t=new Intl.DateTimeFormat(n,i),b.set(e,t)}return t}function _(e){return y[e]}function x(e,t=v){return w(t).format(e)}function I(e){const t=C(e.timeZone??i);return{...e,timeZone:t}}function C(e){switch(e){case i:return a;case o:return l;default:return e}}(0,s.Ze)((()=>{b=new WeakMap}))},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),s=r(68773),i=r(38171),o=r(51773),l=r(3172),a=r(46791),u=r(57435),c=r(35454),p=r(22974),m=r(16453),d=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),I=r(82971),C=r(91040),S=r(8744),T=r(87085),E=r(71612),N=r(38009),F=r(16859),O=r(34760),P=r(72965),U=r(28294),L=r(52162),j=r(66677),R=r(21506),A=r(92036),M=r(67676);r(80442);const D={visible:"visibleSublayers"};let Z=class extends A.Z{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(D[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],s=e=>{const{minScale:r,maxScale:i,sublayers:o,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===i||t>=i))&&(o?o.forEach(s):n.push(e))};return r?.forEach(s),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:s,layers:t}}};(0,n._)([(0,f.Cb)()],Z.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],Z);var $,k=r(90082),q=r(10699),H=r(90578);let B=0,J=$=class extends((0,q.IG)(m.w)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??B++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.se)(a.Z.ofType($),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new $;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,H.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=$=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const G=J;var W=r(20102);const V={84:4326,83:4269,27:4267};function Y(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 W.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=Q("Capability",r),s=Q("Service",r),i=n&&Q("Request",n);if(!n||!s||!i)return null;const o=Q("Layer",n);if(!o)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=te("Title",s,"")||te("Name",s,""),u=te("AccessConstraints",s,""),c=/^none$/i.test(u)?"":u,p=te("Abstract",s,""),m=parseInt(te("MaxWidth",s,"5000"),10),d=parseInt(te("MaxHeight",s,"5000"),10),h=se(i,"GetMap"),y=ne(i,"GetMap"),f=oe(o,l,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(oe(g,l,t))),_(oe(e,l,t))):_(oe(e,l,t)),b++)}));let I=f.sublayers,C=f.extent;const S=f.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(f),!C){const e=new x.Z(I[0].extent);f.extent=e.toJSON(),C=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:z(f),E=ne(i,"GetFeatureInfo"),N=E?se(i,"GetFeatureInfo"):null,F=X(I),O=f.minScale||0,P=f.maxScale||0,U=f.dimensions??[],L=F.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),j=U.concat(L).filter(ae);let R=null;if(j.length){const e=j.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(M.pC);R={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:c,description:p,dimensions:U,extent:C,fullExtents:S,featureInfoFormats:N,featureInfoUrl:E,mapUrl:y,maxWidth:m,maxHeight:d,maxScale:P,minScale:O,layers:F,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:R,title:a,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 X(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(X(r.sublayers)),delete r.sublayers);return t}function K(e,t,r){return t.getAttribute(e)??r}function Q(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(le(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const s=t.childNodes[n];le(s)&&s.nodeName===e&&r.push(s)}return r}function te(e,t,r){return Q(e,t)?.textContent??r}function re(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),i=parseFloat(e.getAttribute("maxx")),o=parseFloat(e.getAttribute("maxy"));let l,a,u,c;r?(l=isNaN(s)?-Number.MAX_VALUE:s,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(o)?Number.MAX_VALUE:o,c=isNaN(i)?Number.MAX_VALUE:i):(l=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(i)?Number.MAX_VALUE:i,c=isNaN(o)?Number.MAX_VALUE:o);const p=new I.Z({wkid:t});return new x.Z({xmin:l,ymin:a,xmax:u,ymax:c,spatialReference:p})}function ne(e,t){const r=Q(t,e);if(r){const e=Q("DCPType",r);if(e){const t=Q("HTTP",e);if(t){const e=Q("Get",t);if(e){let t=function(e,t,r,n){const s=Q("OnlineResource",r);return s?K("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=[],n=(0,y.mN)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function se(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",Q(t,e)).map((({textContent:e})=>e)).filter(M.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function ie(e,t,r){const n=Q(t,e);if(!n)return r;const{textContent:s}=n;if(null==s||""===s)return r;const i=Number(s);return isNaN(i)?r:i}function oe(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},s=Q("LatLonBoundingBox",e),i=Q("EX_GeographicBoundingBox",e);let o=null;s&&(o=re(s,4326)),i&&(o=new x.Z(0,0,0,0,new I.Z({wkid:4326})),o.xmin=parseFloat(te("westBoundLongitude",i,"0")),o.ymin=parseFloat(te("southBoundLatitude",i,"0")),o.xmax=parseFloat(te("eastBoundLongitude",i,"0")),o.ymax=parseFloat(te("northBoundLatitude",i,"0"))),s||i||(o=new x.Z(-180,-90,180,90,new I.Z({wkid:4326}))),n.minScale=ie(e,"MaxScaleDenominator",0),n.maxScale=ie(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)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(l);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||o||(o="1.3.0"===t?re(e,n,(0,L.A)(n)):re(e,n))}const s=r&&r.indexOf(":");if(s&&s>-1){let i=parseInt(r.substring(s+1,r.length),10);0===i||isNaN(i)||(i=V[i]??i);const o="1.3.0"===t?re(e,i,(0,L.A)(i)):re(e,i);o&&n.fullExtents&&n.fullExtents.push(o)}}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=V[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const s=oe(e,t,r);s&&(s.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(s))}}else{const t=Q("LegendURL",e);if(t){const e=Q("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=o?.toJSON(),n.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,s=e.getAttribute("unitSymbol")??void 0,i=e.getAttribute("default")??void 0,o="0"!==K("default",e,"0"),l="0"!==K("nearestValue",e,"0"),a="0"!==K("current",e,"0");return ae({name:t,units:r})?{name:"time",units:"ISO8601",extent:pe(n),default:pe(i),multipleValues:o,nearestValue:l,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:s,default:ue(i),multipleValues:o,nearestValue:l}:{name:t,units:r,extent:ce(n),unitSymbol:s,default:ce(i),multipleValues:o,nearestValue:l}})),n}function le(e){return e.nodeType===Node.ELEMENT_NODE}function ae(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(M.pC):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(M.pC):r}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?me(t[2]):void 0}})).filter(M.pC):r.map((e=>new Date(e)))}function me(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:de(t[1]),months:de(t[2]),days:de(t[3]),hours:de(t[4]),minutes:de(t[5]),seconds:de(t[6])}:null}function de(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 c.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,E.h)((0,U.n)((0,O.Q)((0,P.M)((0,N.q)((0,F.I)((0,m.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.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(d.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const s=new Map,i=e.flatten((({sublayers:e})=>e??[]));for(const e of i)if("number"==typeof e.parent?.id){const t=s.get(e.parent.id);null!=t?t.push(e.id):s.set(e.parent.id,[e.id])}for(const e of i){const r={sublayer:e,...n},i=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(s.has(e.id)&&(i.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=i.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const s=n?.pixelRatio??1,i=(0,C.yZ)({extent:e,width:t})*s,o=new Z({layer:this,scale:i}),{xmin:l,ymin:a,xmax:u,ymax:c,spatialReference:p}=e,m=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(p,this.spatialReferences),d="1.3.0"===this.version&&(0,L.A)(m)?`${a},${l},${c},${u}`:`${l},${a},${u},${c}`,h=o.toJSON();return{bbox:d,["1.3.0"===this.version?"crs":"srs"]:null==m||isNaN(m)?void 0:"EPSG:"+m,...h}}async fetchImage(e,t,r,n){const s=this.mapUrl,i=this.createExportImageParameters(e,t,r,n);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=o&&null!=a?o.getTime()===a.getTime()?he(o):`${he(o)}/${he(a)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:n?.signal};return(0,l.Z)(s??"",c).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const s=this.mapUrl??"",i=this.createExportImageParameters(e,t,r,n);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=o&&null!=a?o.getTime()===a.getTime()?he(o):`${he(o)}/${he(a)}`:void 0,c={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:n?.signal},{data:p}=await(0,l.Z)(s,c);return(0,k.g)(p,s,n?.signal)}fetchFeatureInfo(e,t,r,n,s){const i=(0,C.yZ)({extent:e,width:t}),o=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new Z({layer:this,scale:i}).visibleSublayers);if(null==this.featureInfoUrl||null==o)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:n,J:s}:{x:n,y:s},a={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},u={...this.createExportImageParameters(e,t,r),...a},c=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(c):this._defaultFetchFeatureInfoFunction((0,y.fl)(this.featureInfoUrl,c))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,j.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,S.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new o.Z({title:this.title,content:t}),n=new i.Z({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,l.Z)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=Y(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=s.default.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,p.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new G;e.read(s,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const s=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new a.Z),r.sublayers.push(e)}else s.push(e)}return s}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.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"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(R.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:a.Z.ofType(G),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[G]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(R.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>x});var n=r(43697),s=r(68773),i=r(40330),o=r(3172),l=r(66643),a=r(20102),u=r(92604),c=r(70586),p=r(95330),m=r(17452),d=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.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{load:n}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,_.Ss)(r);let s,o;if(n)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!s||!(0,m.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(i.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=i.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,m.Fv)(s.restUrl)===(0,m.Fv)(n))return s.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.Z.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,n=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&n&&!(0,m.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.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,n._)([(0,d.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,n._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var n=r(43697),s=r(92604),i=r(95330),o=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),c=r(46791),p=(r(66643),r(20102),r(26258),r(87538));const m=new c.Z,d=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&m.push(new WeakRef(e))}function y(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:y(t,e%t):0}let f=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of m){const n=r.deref();n?n.refreshInterval&&e-(d.get(n)??0)+5>=6e4*n.refreshInterval&&(d.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=m.length-1;e>=0;e--)m.at(e).deref()||m.removeAt(e)}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const r of m){const n=r.deref();n&&(t=y(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?d.get(n)||d.set(n,e):d.delete(n))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(b,g)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=m.find((t=>t.deref()===e));t&&m.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>m});var n=r(43697),s=r(92835),i=r(84552),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),c=r(76259),p=r(78981);const m=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,s=p.v.fromJSON(r.timeOffsetUnits);return n&&s?new i.Z({value:n,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,o.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,o.Cb)({type:i.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,o.Cb)({value:null,type:c.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),s=r(92835),i=r(84552),o=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),p=r(30556),m=r(80216);function d(e,t){return i.Z.fromJSON({value:e,unit:t})}let h=class extends((0,o.J)(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]),n=new Date(t.timeExtent[1]);return new s.Z({start:r,end:n})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,p.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,p.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,a.Cb)({type:m.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,c.j)("esri.layers.support.TimeInfo")],h);const y=h},66677:(e,t,r)=>{r.d(t,{B5:()=>c,DR:()=>m,G:()=>v,M8:()=>y,Nm:()=>f,Qc:()=>p,XG:()=>g,a7:()=>h,ld:()=>d,wH:()=>b});var n=r(17452),s=r(25929);const i={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(i),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return!!l.test(e)}function p(e){if(null==e)return null;const t=(0,n.mN)(e),r=t.path.match(l)||t.path.match(a);if(!r)return null;const[,s,o,u,c]=r,p=o.indexOf("/");return{title:d(-1!==p?o.slice(p+1):o),serverType:i[u.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function m(e){const t=(0,n.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=p(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=d(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,n.Qj)((0,n.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,n.Hu)(t,e.logger);const r=(0,n.mN)(t),s=p(r.path);let i;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(i=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=m(r.path);null!=e&&(t=e.serviceUrl,i=e.sublayerId)}return{url:(0,n.Qj)(t),layerId:i}}function b(e,t,r,i,o){(0,s.w)(t,i,"url",o),i.url&&null!=e.layerId&&(i.url=(0,n.v_)(i.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),n=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),i=t.includes("/wmsserver");return r&&(n||s||i)}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>i});var n=r(20102),s=r(95330);async function i(e,t,r){let i;try{i=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),i}async function o(e,t,r,i,o){let l;try{l=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${i}`,{error:e,level:t,row:r,col:i})}return(0,s.k_)(o),l}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(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})},31134:(e,t,r)=>{r.d(t,{Z:()=>m});var n,s=r(43697),i=r(96674),o=r(62357),l=r(5600),a=r(90578),u=(r(67676),r(80442),r(52011)),c=r(61565);let p=n=class extends i.wq{constructor(e){super(e),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(e){return(0,o.t_)(e)}clone(){return new n({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,s._)([(0,l.Cb)({type:c.JT,json:{default:"none",write:!0}})],p.prototype,"decoration",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"family",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.textSymbol3D})}}})],p.prototype,"size",void 0),(0,s._)([(0,a.p)("size")],p.prototype,"castSize",null),(0,s._)([(0,l.Cb)({type:c.g6,json:{default:"normal",write:!0}})],p.prototype,"style",void 0),(0,s._)([(0,l.Cb)({type:c.vC,json:{default:"normal",write:!0}})],p.prototype,"weight",void 0),p=n=(0,s._)([(0,u.j)("esri.symbols.Font")],p);const m=p},61565:(e,t,r)=>{r.d(t,{Ck:()=>a,JT:()=>i,Nj:()=>c,c9:()=>p,g6:()=>o,vC:()=>l,x0:()=>u});var n=r(22021),s=r(75215);const i=["none","underline","line-through"],o=["normal","italic","oblique"],l=["normal","lighter","bold","bolder"],a={type:Number,cast:e=>{const t=(0,s.q9)(e);return 0===t?1:(0,n.uZ)(t,.1,4)},nonNullable:!0},u={type:["left","right","center"],nonNullable:!0},c={type:["baseline","top","middle","bottom"],nonNullable:!0},p=8}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8758],{48758:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>$});var a=n(48853),i=n(28228),r=n(33586),l=n(27535),s=n(15274),o=n(28924),f=n(67651),u=n(12384),d=n(61363),c=n(26520),m=n(70409),y=n(84328),h=n(85065),p=n(63991),F=n(75148),w=n(17805),g=n(3823),I=n(90658),D=n(36515),T=n(24240),E=n(95330),x=n(8968),Z=n(19238),C=n(1231),N=n(48522);async function S(e,t,n){const a=e.getVariables();if(a.length>0){const i=[];for(let e=0;e<a.length;e++){const r={name:a[e]};i.push(await t.evaluateIdentifier(n,r))}const r={};for(let e=0;e<a.length;e++)r[a[e]]=i[e];return e.parameters=r,e}return e}function b(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function A(e){if(null===e)return null;const t={type:b(e,"type",""),name:b(e,"name","")};if("range"===t.type)t.range=b(e,"range",[]);else{t.codedValues=[];for(const n of b(e,"codedValues",[]))t.codedValues.push({name:b(n,"name",""),code:b(n,"code",null)})}return t}function H(e){if(null===e)return null;const t={},n=b(e,"wkt",null);null!==n&&(t.wkt=n);const a=b(e,"wkid",null);return null!==a&&(t.wkid=a),t}function R(e){if(null===e)return null;const t={hasZ:b(e,"hasz",!1),hasM:b(e,"hasm",!1)},n=b(e,"spatialreference",null);n&&(t.spatialReference=H(n));const a=b(e,"x",null);if(null!==a)return t.x=a,t.y=b(e,"y",null),t;const i=b(e,"rings",null);if(null!==i)return t.rings=i,t;const r=b(e,"paths",null);if(null!==r)return t.paths=r,t;const l=b(e,"points",null);if(null!==l)return t.points=l,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const a=b(e,n,null);null!==a&&(t[n]=a)}return t}function L(e){return"utc"===e?.toLowerCase()?"UTC":e}function $(e){"async"===e.mode&&(e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,(async(e,i,s)=>{if((0,d.E)(s,1,2,t,n),(0,d.n)(s[0]))return"unknown";if((0,d.m)(s[0]))return"unknown";if((0,d.u)(s[0])){if(await s[0].load(),1===s.length||null===s[1])return L(s[0].dateTimeReferenceFieldIndex.layerDateFieldsTimeZone);if(!(s[1]instanceof r.Z)||!1===s[1].hasField("type"))throw new l.aV(t,l.rH.InvalidParameter,n);const e=s[1].field("type");if(!1===(0,d.c)(e))throw new l.aV(t,l.rH.InvalidParameter,n);switch((0,d.j)(e).toLowerCase()){case"preferredtimezone":return L(s[0].dateTimeReferenceFieldIndex.layerPreferredTimeZone);case"editfieldsinfo":return L(s[0].dateTimeReferenceFieldIndex.layerEditFieldsTimeZone);case"timeinfo":return L(s[0].dateTimeReferenceFieldIndex.layerTimeInfoTimeZone);case"field":if(s[1].hasField("fieldname")&&(0,d.c)(s[1].field("fieldname")))return L(s[0].dateTimeReferenceFieldIndex.fieldTimeZone((0,d.j)(s[1].field("fieldname"))))}throw new l.aV(t,l.rH.InvalidParameter,n)}const o=(0,d.l)(s[0],(0,d.L)(t));if(null===o)return null;const f=o.timeZone;return"system"===f?a.iG.systemTimeZoneCanonicalName:"utc"===f.toLowerCase()?"UTC":f}))},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,d.E)(i,1,3,t,n);const r=i[0];if((0,d.k)(r)){if(1===i.length)return r.toSQLWithKeyword();if(2===i.length)return r.changeTimeZone((0,d.j)(i[1])).toSQLWithKeyword();throw new l.aV(t,l.rH.InvalidParameter,n)}if((0,d.m)(r))return r.toSQLWithKeyword();if((0,d.u)(r)){if(3!==i.length)throw new l.aV(t,l.rH.InvalidParameter,n);await r.load();const e=(0,d.j)(i[1]);if((0,d.m)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,d.k)(i[2]))throw new l.aV(t,l.rH.InvalidParameter,n);const a=r.fieldTimeZone(e);return null===a?i[2].toSQLWithKeyword():i[2].changeTimeZone(a).toSQLWithKeyword()}throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,((e,a,i)=>{if((0,d.E)(i,2,4,t,n),i[0]instanceof o.Z){const e=(0,d.j)(i[1]);let a=(0,d.H)(i[2],null);const r=(0,d.h)((0,d.H)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,d.o)(a))throw new l.aV(t,l.rH.InvalidParameter,n);return i[0].featureSetById(e,r,a)}throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"featuresetbyid",min:2,max:4}),e.functions.getfeatureset=function(t,n){return e.standardFunctionAsync(t,n,((e,a,i)=>{if((0,d.E)(i,1,2,t,n),(0,d.r)(i[0])){let e=(0,d.H)(i[1],"datasource");return null===e&&(e="datasource"),e=(0,d.j)(e).toLowerCase(),(0,f.convertToFeatureSet)(i[0].fullSchema(),e,t.lrucache,t.interceptor,t.spatialReference)}throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,((e,a,r)=>{if((0,d.E)(r,2,5,t,n),null===r[0])throw new l.aV(t,l.rH.PortalRequired,n);if(r[0]instanceof i.Z){const e=(0,d.j)(r[1]),a=(0,d.j)(r[2]);let i=(0,d.H)(r[3],null);const s=(0,d.h)((0,d.H)(r[4],!0));if(null===i&&(i=["*"]),!1===(0,d.o)(i))throw new l.aV(t,l.rH.InvalidParameter,n);let o=null;return o=t.services&&t.services.portal?t.services.portal:N.Z.getDefault(),o=(0,c._)(r[0],o),(0,f.constructFeatureSetFromPortalItem)(e,a,t.spatialReference,i,s,o,t.lrucache,t.interceptor)}if(!1===(0,d.c)(r[0]))throw new l.aV(t,l.rH.PortalRequired,n);const s=(0,d.j)(r[0]),o=(0,d.j)(r[1]);let u=(0,d.H)(r[2],null);const m=(0,d.h)((0,d.H)(r[3],!0));if(null===u&&(u=["*"]),!1===(0,d.o)(u))throw new l.aV(t,l.rH.InvalidParameter,n);return(0,f.constructFeatureSetFromPortalItem)(s,o,t.spatialReference,u,m,t.services?.portal??N.Z.getDefault(),t.lrucache,t.interceptor)}))},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,((e,a,i)=>{if((0,d.E)(i,2,4,t,n),i[0]instanceof o.Z){const e=(0,d.j)(i[1]);let a=(0,d.H)(i[2],null);const r=(0,d.h)((0,d.H)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,d.o)(a))throw new l.aV(t,l.rH.InvalidParameter,n);return i[0].featureSetByName(e,r,a)}throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,((e,a,i)=>{(0,d.E)(i,1,1,t,n);let s=i[0];const o={layerDefinition:{geometryType:"",objectIdField:"",hasM:!1,hasZ:!1,globalIdField:"",typeIdField:"",fields:[]},featureSet:{geometryType:"",features:[]}};if((0,d.c)(s))s=JSON.parse(s),void 0!==s.layerDefinition?(o.layerDefinition=s.layerDefinition,o.featureSet=s.featureSet,s.layerDefinition.spatialReference&&(o.layerDefinition.spatialReference=s.layerDefinition.spatialReference)):(o.featureSet.features=s.features,o.featureSet.geometryType=s.geometryType,o.layerDefinition.geometryType=o.featureSet.geometryType,o.layerDefinition.objectIdField=s.objectIdFieldName??"",o.layerDefinition.typeIdField=s.typeIdFieldName,o.layerDefinition.globalIdField=s.globalIdFieldName,o.layerDefinition.fields=s.fields,s.spatialReference&&(o.layerDefinition.spatialReference=s.spatialReference));else{if(!(i[0]instanceof r.Z))throw new l.aV(t,l.rH.InvalidParameter,n);{s=JSON.parse(i[0].castToText(!0));const e=b(s,"layerdefinition");if(null!==e){o.layerDefinition.geometryType=b(e,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.globalIdField=b(e,"globalidfield",""),o.layerDefinition.objectIdField=b(e,"objectidfield",""),o.layerDefinition.typeIdField=b(e,"typeidfield",""),o.layerDefinition.hasZ=!0===b(e,"hasz",!1),o.layerDefinition.hasM=!0===b(e,"hasm",!1);const t=b(e,"spatialreference",null);t&&(o.layerDefinition.spatialReference=H(t));for(const t of b(e,"fields",[])){const e={name:b(t,"name",""),alias:b(t,"alias",""),type:b(t,"type",""),nullable:b(t,"nullable",!0),editable:b(t,"editable",!0),length:b(t,"length",null),domain:A(b(t,"domain"))};o.layerDefinition.fields.push(e)}const n=b(s,"featureset",null);if(n){const e={};for(const t of o.layerDefinition.fields)e[t.name.toLowerCase()]=t.name;for(const t of b(n,"features",[])){const n={},a=b(t,"attributes",{});for(const t in a)n[e[t.toLowerCase()]]=a[t];o.featureSet.features.push({attributes:n,geometry:R(b(t,"geometry",null))})}}}else{o.layerDefinition.hasZ=!0===b(s,"hasz",!1),o.layerDefinition.hasM=!0===b(s,"hasm",!1),o.layerDefinition.geometryType=b(s,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.objectIdField=b(s,"objectidfieldname",""),o.layerDefinition.typeIdField=b(s,"typeidfieldname","");const e=b(s,"spatialreference",null);e&&(o.layerDefinition.spatialReference=H(e));let t=b(s,"fields",null);if((0,d.o)(t))for(const e of t){const t={name:b(e,"name",""),alias:b(e,"alias",""),type:b(e,"type",""),nullable:b(e,"nullable",!0),editable:b(e,"editable",!0),length:b(e,"length",null),domain:A(b(e,"domain"))};o.layerDefinition.fields.push(t)}else t=null,o.layerDefinition.fields=t;const n={};for(const e of o.layerDefinition.fields)n[e.name.toLowerCase()]=e.name;let a=b(s,"features",null);if((0,d.o)(a))for(const e of a){const t={},a=b(e,"attributes",{});for(const e in a)t[n[e.toLowerCase()]]=a[e];o.featureSet.features.push({attributes:t,geometry:R(b(e,"geometry",null))})}else a=null,o.featureSet.features=a}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e,t){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,d.o)(e.layerDefinition.fields)&&!1!==(0,d.o)(e.featureSet.features)}(o))throw new l.aV(t,l.rH.InvalidParameter,n);return""===(o?.layerDefinition?.geometryType||"")&&(o.layerDefinition.geometryType="esriGeometryNull"),w.Z.create(o,t.spatialReference)}))},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,r)=>{if((0,d.E)(r,2,2,t,n),(0,d.o)(r[0])||(0,d.q)(r[0])){const e=[];let a=r[0];a instanceof u.Z&&(a=a.toArray());let i=null;if(!(0,d.i)(r[1]))throw new l.aV(t,l.rH.InvalidParameter,n);i=r[1].createFunction(t);for(const t of a){const n=i(t);(0,E.y8)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,d.u)(r[0])){const n=await r[0].load(),a=x.WhereClause.create(r[1],n.getFieldsIndex(),{timeZone:n.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}),i=a.getVariables();if(i.length>0){const n=[];for(let a=0;a<i.length;a++){const r={name:i[a]};n.push(await e.evaluateIdentifier(t,r))}const l={};for(let e=0;e<i.length;e++)l[i[e]]=n[e];return a.parameters=l,new y.Z({parentfeatureset:r[0],whereclause:a})}return new y.Z({parentfeatureset:r[0],whereclause:a})}throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,d.E)(i,2,2,t,n),(0,d.u)(i[0])){const e=new g.Z(i[1]);return new h.Z({parentfeatureset:i[0],orderbyclause:e})}throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,d.E)(i,2,2,t,n),(0,d.u)(i[0]))return new p.Z({parentfeatureset:i[0],topnum:i[1]});if((0,d.o)(i[0]))return(0,d.g)(i[1])>=i[0].length?i[0].slice(0):i[0].slice(0,(0,d.g)(i[1]));if((0,d.q)(i[0]))return(0,d.g)(i[1])>=i[0].length()?i[0].slice(0):i[0].slice(0,(0,d.g)(i[1]));throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,d.E)(i,1,1,t,n),(0,d.u)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=s.Z.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeReference);return e._underlyingGraphic=n,e}return n}return(0,d.o)(i[0])?0===i[0].length?null:i[0][0]:(0,d.q)(i[0])?0===i[0].length()?null:i[0].get(0):null}))},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,d.E)(i,1,2,t,n);const s={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof r.Z){if(i[1].hasField("minsize")&&(s.minsize=(0,d.g)(i[1].field("minsize"))),i[1].hasField("metadata")&&(s.returnMetadata=(0,d.h)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(s.maxsize=(0,d.g)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,d.a2)(i[1].field("types"),!1);e.length>0&&(s.types=e)}}else if(null!==i[1])throw new l.aV(t,l.rH.InvalidParameter,n);if((0,d.r)(i[0])){let e=i[0]._layer;return e instanceof Z.default&&(e=(0,f.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===e||!1===(0,d.u)(e)?[]:(await e.load(),e.queryAttachments(i[0].field(e.objectIdField),s.minsize,s.maxsize,s.types,s.returnMetadata))}if(null===i[0])return[];throw new l.aV(t,l.rH.InvalidParameter,n)}))},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,d.E)(i,2,4,t,n);const r=i[0],s=(0,d.j)(i[1]);let o=(0,d.H)(i[2],null);const u=(0,d.h)((0,d.H)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,d.o)(o))throw new l.aV(t,l.rH.InvalidParameter,n);if(null===i[0])return null;if(!(0,d.r)(i[0]))throw new l.aV(t,l.rH.InvalidParameter,n);let c=r._layer;if(c instanceof Z.default&&(c=(0,f.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===c)return null;if(!1===(0,d.u)(c))return null;c=await c.load();const m=c.relationshipMetaData().filter((e=>e.name===s));if(0===m.length)return null;if(void 0!==m[0].relationshipTableId&&null!==m[0].relationshipTableId&&m[0].relationshipTableId>-1)return(0,f.constructFeatureSetFromRelationship)(c,m[0],r.field(c.objectIdField),c.spatialReference,o,u,t.lrucache,t.interceptor);let y=c.serviceUrl();if(!y)return null;y="/"===y.charAt(y.length-1)?y+m[0].relatedTableId.toString():y+"/"+m[0].relatedTableId.toString();const h=await(0,f.constructFeatureSetFromUrl)(y,c.spatialReference,o,u,t.lrucache,t.interceptor);await h.load();let p=h.relationshipMetaData();if(p=p.filter((e=>e.id===m[0].id)),!1===r.hasField(m[0].keyField)||null===r.field(m[0].keyField)){const e=await c.getFeatureByObjectId(r.field(c.objectIdField),[m[0].keyField]);if(e){const t=x.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex(),{timeZone:h.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[m[0].keyField]},h.filter(t)}return new F.Z({parentfeatureset:h})}const w=x.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex(),{timeZone:h.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC});return w.parameters={id:r.field(m[0].keyField)},h.filter(w)}))},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,d.E)(i,2,3,t,n);const r=i[0],s=(0,d.j)((0,d.H)(i[1],"")).toLowerCase(),o=(0,d.c)(i[2])?(0,d.j)(i[2]):null;if(null===i[0])return null;if(!(0,d.r)(i[0]))throw new l.aV(t,l.rH.InvalidParameter,n);let u=r._layer;if(u instanceof Z.default&&(u=(0,f.constructFeatureSet)(u,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===u)return null;if(!1===(0,d.u)(u))return null;await u.load();const c=u.serviceUrl(),y=await(0,f.constructAssociationMetaDataFeatureSetFromUrl)(c,t.spatialReference);let h=null,p=null,F=!1;if(null!==o&&""!==o&&void 0!==o){for(const e of y.terminals)e.terminalName===o&&(p=e.terminalId);null===p&&(F=!0)}const w=y.associations.getFieldsIndex(),g=w.get("TOGLOBALID").name,D=w.get("FROMGLOBALID").name,T=w.get("TOTERMINALID").name,E=w.get("FROMTERMINALID").name,N=w.get("FROMNETWORKSOURCEID").name,S=w.get("TONETWORKSOURCEID").name,b=w.get("ASSOCIATIONTYPE").name,A=w.get("ISCONTENTVISIBLE").name,H=w.get("OBJECTID").name;for(const e of u.fields)if("global-id"===e.type){h=r.field(e.name);break}let R=null,L=new m.yN(new C.Z({name:"percentalong",alias:"percentalong",type:"double"}),x.WhereClause.create("0",y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC})),$=new m.yN(new C.Z({name:"side",alias:"side",type:"string"}),x.WhereClause.create("''",y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}));const v="globalid",P="globalId",V={};for(const e in y.lkp)V[e]=y.lkp[e].sourceId;const W=new m.TO(new C.Z({name:"classname",alias:"classname",type:"string"}),null,V);let j="";switch(s){case"midspan":{j=`((${g}='${h}') OR ( ${D}='${h}')) AND (${b} IN (5))`,W.codefield=x.WhereClause.create(`CASE WHEN (${g}='${h}') THEN ${N} ELSE ${S} END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC});const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=v,e.alias=v,R=new m.yN(e,x.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${g} ELSE ${D} END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC})),L=y.unVersion>=4?new m.$X(m.Xx.findField(y.associations.fields,w.get("PERCENTALONG").name)):new m.yN(new C.Z({name:"percentalong",alias:"percentalong",type:"double"}),x.WhereClause.create("0",y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{j=`((${g}='${h}') OR ( ${D}='${h}')) AND (${b} IN (4,6))`,W.codefield=x.WhereClause.create(`CASE WHEN (${g}='${h}') THEN ${N} ELSE ${S} END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC});const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=v,e.alias=v,R=new m.yN(e,x.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${g} ELSE ${D} END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC})),$=new m.yN(new C.Z({name:"side",alias:"side",type:"string"}),x.WhereClause.create(`CASE WHEN (${b}=4) THEN 'from' ELSE 'to' END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${g}='@T'`,t=`${D}='@T'`;null!==p&&(e+=` AND ${T}=@A`,t+=` AND ${E}=@A`),j="(("+e+") OR ("+t+"))",j=(0,d.S)(j,"@T",h??""),e=(0,d.S)(e,"@T",h??""),null!==p&&(e=(0,d.S)(e,"@A",p.toString()),j=(0,d.S)(j,"@A",p.toString())),W.codefield=x.WhereClause.create("CASE WHEN "+e+` THEN ${N} ELSE ${S} END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC});const n=(0,I.JW)(m.Xx.findField(y.associations.fields,D));n.name=v,n.alias=v,R=new m.yN(n,x.WhereClause.create("CASE WHEN "+e+` THEN ${D} ELSE ${g} END`,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}));break}case"container":j=`${g}='${h}' AND ${b} = 2`,null!==p&&(j+=` AND ${T} = `+p.toString()),W.codefield=N,j="( "+j+" )",R=new m.QP(m.Xx.findField(y.associations.fields,D),v,v);break;case"content":j=`(${D}='${h}' AND ${b} = 2)`,null!==p&&(j+=` AND ${E} = `+p.toString()),W.codefield=S,j="( "+j+" )",R=new m.QP(m.Xx.findField(y.associations.fields,g),v,v);break;case"structure":j=`(${g}='${h}' AND ${b} = 3)`,null!==p&&(j+=` AND ${T} = `+p.toString()),W.codefield=N,j="( "+j+" )",R=new m.QP(m.Xx.findField(y.associations.fields,D),v,P);break;case"attached":j=`(${D}='${h}' AND ${b} = 3)`,null!==p&&(j+=` AND ${E} = `+p.toString()),W.codefield=S,j="( "+j+" )",R=new m.QP(m.Xx.findField(y.associations.fields,g),v,P);break;default:throw new l.aV(t,l.rH.InvalidParameter,n)}return F&&(j="1 <> 1"),new m.Xx({parentfeatureset:y.associations,adaptedFields:[new m.$X(m.Xx.findField(y.associations.fields,H)),new m.$X(m.Xx.findField(y.associations.fields,A)),R,$,W,L],extraFilter:j?x.WhereClause.create(j,y.associations.getFieldsIndex(),{timeZone:y.associations.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}):null})}))},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,s)=>{if((0,d.E)(s,3,3,t,n),!(0,d.u)(s[0]))throw new l.aV(t,l.rH.InvalidParameter,n);const o=await s[0].load(),f=[],u=[];let c=!1,m=[];if((0,d.c)(s[1]))m.push(s[1]);else if(s[1]instanceof r.Z)m.push(s[1]);else if((0,d.o)(s[1]))m=s[1];else{if(!(0,d.q)(s[1]))throw new l.aV(t,l.rH.InvalidParameter,n);m=s[1].toArray()}for(const e of m)if((0,d.c)(e)){const t=x.WhereClause.create((0,d.j)(e),o.getFieldsIndex(),{timeZone:o.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}),n=!0===(0,D.y5)(t)?(0,d.j)(e):"%%%%FIELDNAME";f.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof r.Z))throw new l.aV(t,l.rH.InvalidParameter,n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(c=!0),!a)throw new l.aV(t,l.rH.InvalidParameter,n);f.push({name:a,expression:x.WhereClause.create(i||a,o.getFieldsIndex(),{timeZone:o.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC})})}}if(m=[],(0,d.c)(s[2]))m.push(s[2]);else if((0,d.o)(s[2]))m=s[2];else if((0,d.q)(s[2]))m=s[2].toArray();else{if(!(s[2]instanceof r.Z))throw new l.aV(t,l.rH.InvalidParameter,n);m.push(s[2])}for(const e of m){if(!(e instanceof r.Z))throw new l.aV(t,l.rH.InvalidParameter,n);{const a=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",r=e.hasField("expression")?e.field("expression"):"";if(!a||!i||!r)throw new l.aV(t,l.rH.InvalidParameter,n);u.push({name:a,statistic:i.toLowerCase(),expression:x.WhereClause.create(r,o.getFieldsIndex(),{timeZone:o.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of f)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of f)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of f)await S(n.expression,e,t);for(const n of u)await S(n.expression,e,t);return s[0].groupby(f,u)}))},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,s)=>{if((0,d.u)(s[0])){(0,d.E)(s,2,2,t,n);const a=await s[0].load(),i=[];let o=[];if((0,d.c)(s[1]))o.push(s[1]);else if(s[1]instanceof r.Z)o.push(s[1]);else if((0,d.o)(s[1]))o=s[1];else{if(!(0,d.q)(s[1]))throw new l.aV(t,l.rH.InvalidParameter,n);o=s[1].toArray()}let f=!1;for(const e of o)if((0,d.c)(e)){const t=x.WhereClause.create((0,d.j)(e),a.getFieldsIndex(),{timeZone:a.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC}),n=!0===(0,D.y5)(t)?(0,d.j)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(f=!0)}else{if(!(e instanceof r.Z))throw new l.aV(t,l.rH.InvalidParameter,n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(f=!0),!r)throw new l.aV(t,l.rH.InvalidParameter,n);i.push({name:r,expression:x.WhereClause.create(s||r,a.getFieldsIndex(),{timeZone:a.dateTimeReferenceFieldIndex.layerDateFieldsTimeZoneDefaultUTC})})}}if(f){const e={};for(const t of a.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)await S(n.expression,e,t);return s[0].groupby(i,[])}return function(e,t,n,a){if(1===a.length){if((0,d.o)(a[0]))return(0,T.t)(e,a[0],-1);if((0,d.q)(a[0]))return(0,T.t)(e,a[0].toArray(),-1)}return(0,T.t)(e,a,-1)}("distinct",0,0,s)}))})}},26520:(e,t,n)=>{n.d(t,{_:()=>i});var a=n(48522);function i(e,t){return null===e?t:new a.Z({url:e.field("url")})}}}]);
|