@arcgis/core 4.28.0-rc.2 → 4.28.0-rc.4
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/ArcadeDate.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0e354096ad8817971eed.js → 02d235849ba93541d7ad.js} +1 -1
- package/assets/esri/core/workers/chunks/0422c5160491fbcf01dc.js +1 -0
- package/assets/esri/core/workers/chunks/1da721608993783dc9cf.js +1 -0
- package/assets/esri/core/workers/chunks/224e79f6c172da444e0a.js +1 -0
- package/assets/esri/core/workers/chunks/{ca3d5803cdf035d7389d.js → 30776102fbab294bfe7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{61dec8399919b278b636.js → 3ac9001b19a90faf5573.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa6103e3d4e857b0035b.js → 3dcb2a82e1e4b520c9c9.js} +11 -8
- package/assets/esri/core/workers/chunks/41081c921037e543a22f.js +1 -0
- package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +1 -0
- package/assets/esri/core/workers/chunks/4adf3a8c6b49c381a633.js +1 -0
- package/assets/esri/core/workers/chunks/{2721aa6b6941b28b9758.js → 63c8bf00120a4e67f5b0.js} +1 -1
- package/assets/esri/core/workers/chunks/6bc1f6f8a2408fa4bb6a.js +1 -0
- package/assets/esri/core/workers/chunks/74951370a341f02d3714.js +1 -0
- package/assets/esri/core/workers/chunks/78e49a70193e5adea17c.js +1 -0
- package/assets/esri/core/workers/chunks/7b8377b3a9f78f9d3613.js +1 -0
- package/assets/esri/core/workers/chunks/{fd28400141a6751327ae.js → 7cf7f2b991a7cbdad2ce.js} +1 -1
- package/assets/esri/core/workers/chunks/830d99e6c58a52a58973.js +1 -0
- package/assets/esri/core/workers/chunks/{1a723bb4a341f645e5fe.js → 83b8141f0c80e3448012.js} +1 -1
- package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +1 -0
- package/assets/esri/core/workers/chunks/934c32c49bb9e21482fd.js +1 -0
- package/assets/esri/core/workers/chunks/{a4341ec0fe89b865d849.js → a160576f21ada91995ac.js} +1 -1
- package/assets/esri/core/workers/chunks/a1e16c33f1843dbdce26.js +1 -0
- package/assets/esri/core/workers/chunks/{d07235ce2765a25b9be4.js → a50ec5b647a160199cb2.js} +1 -1
- package/assets/esri/core/workers/chunks/b6bd31674076e543d8b2.js +1 -0
- package/assets/esri/core/workers/chunks/{77923afde29ae1ff10ca.js → b6e86e179f99b5cf8dff.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +1 -0
- package/assets/esri/core/workers/chunks/{562eafa5090827ebb7ec.js → c87e9280681c20d042b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b3d5f044c96e2c2af11.js → d191267d91a53db42956.js} +1 -1
- package/assets/esri/core/workers/chunks/ffa330a19a09679212fb.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +9 -13
- package/assets/esri/themes/base/widgets/_Features.scss +5 -0
- package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
- package/assets/esri/themes/base/widgets/_Popup.scss +0 -1
- package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +3 -3
- 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/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +1506 -314
- package/intl/date.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroupLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/queryValidationUtils.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/utils.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/Subtype.d.ts +4 -0
- package/layers/support/Subtype.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/portal/support/jsonContext.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/rest/featureService/FeatureService.d.ts +4 -0
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/featureService/utils.d.ts +4 -0
- package/rest/query/operations/query.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/versionManagement/VersionManagementService.d.ts +4 -0
- package/versionManagement/VersionManagementService.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
- package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOPool.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/VisibleElements.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +4 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00da3c16741a9bc47f3a.js +0 -1
- package/assets/esri/core/workers/chunks/0e4646d14fa0775bf463.js +0 -1
- package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +0 -1
- package/assets/esri/core/workers/chunks/51b8913dff24e693bd25.js +0 -1
- package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +0 -1
- package/assets/esri/core/workers/chunks/7388fd97e7b1a2142744.js +0 -1
- package/assets/esri/core/workers/chunks/7648f3341b7dff2825c3.js +0 -1
- package/assets/esri/core/workers/chunks/92d8f75e616afa5c761e.js +0 -1
- package/assets/esri/core/workers/chunks/9c77d69a13ec22cdd760.js +0 -1
- package/assets/esri/core/workers/chunks/a821fa1870b83fed5d31.js +0 -1
- package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +0 -1
- package/assets/esri/core/workers/chunks/b251d8a856dc8b9406e0.js +0 -1
- package/assets/esri/core/workers/chunks/c416df0668f6c596095f.js +0 -1
- package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +0 -1
- package/assets/esri/core/workers/chunks/f0d342303fc20e266d27.js +0 -1
- package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +0 -1
- package/assets/esri/core/workers/chunks/fc95b1a36ed68b851400.js +0 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -4
- package/widgets/DirectionalPad.d.ts +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9059,7873,5732,7865],{92835:(e,t,r)=>{r.d(t,{Z:()=>f});var i,s=r(43697),n=r(96674),o=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),d=r(30556),c=r(25031);let p=i=class extends n.wq{static get allTime(){return h}static get empty(){return y}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(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({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,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=c.By){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 i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.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,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t,r=c.By){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t,r)),null!=a&&(s.end=(0,o.Nm)(a,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 h.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 i({start:t,end:r})}};(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s._)([(0,l.r)("end")],p.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],p.prototype,"writeEnd",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s._)([(0,l.r)("start")],p.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],p.prototype,"writeStart",null),p=i=(0,s._)([(0,u.j)("esri.TimeExtent")],p);const h=new p,y=new p({start:void 0,end:void 0}),f=p},5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>s});var i="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}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),n=(r(66643),r(20102),r(92604),r(26258),r(87538)),o=r(5600),a=r(52011);let l=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.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 i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const u=l},10699:(e,t,r)=>{r.d(t,{IG:()=>o,iv:()=>a});var i=r(43697),s=r(52011);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,s.j)("esri.core.Identifiable")],l)},17445:(e,t,r)=>{r.d(t,{N1:()=>p,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>m,on:()=>c,tX:()=>b}),r(66643),r(46791);var i=r(91460),s=r(50758),n=r(70586),o=r(95330),a=r(26258);function l(e,t,r={}){return d(e,t,r,h)}function u(e,t,r={}){return d(e,t,r,y)}function d(e,t,r={},i){let s=null;const o=r.once?(e,r)=>{i(e)&&((0,n.hw)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,a.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function c(e,t,r,o={}){let a=null,u=null,d=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function p(e){o.once&&o.once&&(0,n.hw)(d),r(e)}const h=l(e,((e,r)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return d=(0,s.kB)((()=>{h.remove(),c()})),d}function p(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((i,n)=>{a=(0,s.AL)([(0,o.fu)(r,(()=>{l(),n((0,o.zE)())})),d(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??h)])}))}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(87538);const f={sync:!0},m={initial:!0},b={sync:!0,initial:!0}},41123:(e,t,r)=>{r.d(t,{D:()=>s,z:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s()}}`}},40504:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var i=r(43697),s=r(57435),n=r(68668),o=r(92604),a=r(16453),l=r(95330),u=r(17445),d=r(5600),c=(r(75215),r(67676),r(80442),r(1153)),p=r(71715),h=r(52011),y=r(30556),f=r(31263),m=r(87085),b=r(71612),v=r(38009),g=r(16859),w=r(72965),_=r(87344),I=r(15235),C=r(46791),E=r(70921);function P(e,t,r){let i,s;if(e)for(let n=0,o=e.length;n<o;n++){if(i=e.at(n),i?.[t]===r)return i;if("group"===i?.type&&(s=P(i.layers,t,r),s))return s}}const S=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new C.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||o.Z.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>r(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,E.Z)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof m.Z){const i=e;i.parent===this?this.reorder(i,t):r.add(i,t)}else(0,l.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):o.Z.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let i=r.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(r.add(e,i),i+=1):this.reorder(e,i)}))}findLayerById(e){return P(this.layers,"id",e)}findLayerByUid(e){return P(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,i._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,i._)([(0,h.j)("esri.support.LayersMixin")],t),t};function T(e,t,r){if(e)for(let i=0,s=e.length;i<s;i++){const s=e.at(i);if(s[t]===r)return s;if("group"===s?.type){const e=T(s.tables,t,r);if(e)return e}}}const L=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new C.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&o.Z.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,E.Z)(e,this._get("tables")))}findTableById(e){return T(this.tables,"id",e)}findTableByUid(e){return T(this.tables,"uid",e)}};return(0,i._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,i._)([(0,h.j)("esri.support.TablesMixin")],t),t},A=Symbol("WebScene");var U=r(12259),x=r(35755),O=r(15650);let Z=class extends((0,b.h)((0,w.M)((0,v.q)((0,g.I)(L(S((0,a.R)(m.Z)))))))){constructor(e){var t;super(e),this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group",this._debouncedSaveOperations=(0,l.Ds)((async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(821).then(r.bind(r,30821));switch(e){case U.x.SAVE:return s(this,t);case U.x.SAVE_AS:return n(this,i,t)}}))}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,u.YP)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&A in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,u.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),o.Z.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")})),t))}),u.tX),(0,u.YP)((()=>this.visible),this._onVisibilityChange.bind(this),u.Z_)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,r,i){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,O.Nw)(e,i.webmap?i.webmap.getLayerJSONFromResourceInfo(e):null,i);t?.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}readPortalItem(e,t,r){const{itemId:i,layerType:s}=t;if("GroupLayer"===s&&i)return new I.default({id:i,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}async beforeSave(){return(0,x.Pl)(this)}load(e){const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Group Layer","Scene Service"],layerModuleTypeMap:_.T},e).catch((e=>{if((0,l.r9)(e),this.originIdOf("portalItem")===f.s3.USER)throw e}));return this.addResolvingPromise(t),Promise.resolve(this)}async loadAll(){return(0,n.G)(this,(e=>{e(this.layers,this.tables)}))}async save(e){return this._debouncedSaveOperations(U.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(U.x.SAVE_AS,t,e)}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,u.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),u.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,c.vw)(this).initialized)return;const r=this.layers;let i=r.find((e=>e.visible));switch(e){case"exclusive":r.length&&!i&&(i=r.at(0),i.visible=!0),this._turnOffOtherLayers(i);break;case"inherited":r.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,i._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],Z.prototype,"allLayers",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],Z.prototype,"allTables",void 0),(0,i._)([(0,d.Cb)()],Z.prototype,"fullExtent",void 0),(0,i._)([(0,d.Cb)({json:{read:!0,write:!0}})],Z.prototype,"blendMode",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],Z.prototype,"layers",void 0),(0,i._)([(0,y.c)("layers")],Z.prototype,"_writeLayers",null),(0,i._)([(0,d.Cb)({type:["GroupLayer"]})],Z.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.Cb)({json:{origins:{"web-map":{read:!1,write:{overridePolicy:e=>({enabled:"Group Layer"===e?.type})}},"web-scene":{read:!1,write:!1}}}})],Z.prototype,"portalItem",null),(0,i._)([(0,p.r)("web-map","portalItem",["itemId"])],Z.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-map","portalItem",{itemId:{type:String}})],Z.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)()],Z.prototype,"spatialReference",void 0),(0,i._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],Z.prototype,"type",void 0),(0,i._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],Z.prototype,"visibilityMode",null),Z=(0,i._)([(0,h.j)("esri.layers.GroupLayer")],Z);const F=Z},87085:(e,t,r)=>{r.d(t,{Z:()=>g});var i=r(43697),s=(r(66577),r(3172)),n=r(20102),o=r(32448),a=r(10699),l=r(83379),u=r(92604),d=r(95330),c=r(17452),p=r(5600),h=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),f=r(6570),m=r(82971);let b=0,v=class extends(o.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",s=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.Z)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],v.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,p.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,p.Cb)({type:m.Z})],v.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,p.Cb)()],v.prototype,"url",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.j)("esri.layers.Layer")],v);const g=v},16859:(e,t,r)=>{r.d(t,{I:()=>I});var i=r(43697),s=r(68773),n=r(40330),o=r(3172),a=r(66643),l=r(20102),u=r(92604),d=r(70586),c=r(95330),p=r(17452),h=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),b=r(84230),v=r(48522),g=r(15235),w=r(86082),_=r(14661);const I=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,d.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 g.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.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,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,b.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!s||!(0,p.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new g.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,c.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,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.Z.getDefault();if(s&&s.loaded&&(0,p.Fv)(s.restUrl)===(0,p.Fv)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,d=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?w.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},97873:(e,t,r)=>{r.d(t,{FO:()=>c,W7:()=>p,addOrUpdateResource:()=>a,fetchResources:()=>o,removeAllResources:()=>u,removeResource:()=>l});var i=r(3172),s=r(20102),n=r(17452);async function o(e,t={},r){await e.load(r);const i=(0,n.v_)(e.itemUrl,"resources"),{start:s=1,num:o=10,sortOrder:a="asc",sortField:l="created"}=t,u={query:{start:s,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(i,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const o=e.portalItem;await o.load(i);const a=(0,n.v_)(o.userItemUrl,"add"===t?"addResources":"updateResources"),[l,u]=d(e.path),c=new FormData;return l&&"."!==l&&c.append("resourcesPrefix",l),null!=i&&i.compress&&c.append("compress","true"),c.append("fileName",u),c.append("file",r,u),c.append("f","json"),i?.access&&c.append("access",i.access),await o.portal.request(a,{method:"post",body:c,signal:i?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new s.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function c(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.Z)(e.url,{responseType:"blob"})).data}function p(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=d(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}},12259:(e,t,r)=>{var i;r.d(t,{x:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},35755:(e,t,r)=>{r.d(t,{Hn:()=>l,Pl:()=>y,bx:()=>u});var i=r(66643),s=r(20102),n=r(95330),o=r(41123),a=r(97873);async function l(e,t,r=null){const i=await d(e,t,r);await c(i,t,r)}async function u(e,t,r,i,s=null){const n=await d(r,i,s);await e.update({data:t}),await c(n,i,s)}async function d(e,t,r=null){if(!t?.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const l=new Set(t.resources.toKeep.map((e=>e.resource.path))),u=new Set,d=[];l.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const s of t.resources.toUpdate)if(i.delete(s.resource.path),l.has(s.resource.path)||u.has(s.resource.path)){const{resource:t,content:i,finish:n,error:l}=s,u=(0,a.W7)(t,(0,o.D)());e.paths.push(u.path),d.push(p({resource:u,content:i,compress:s.compress,finish:n,error:l},r))}else e.paths.push(s.resource.path),d.push(h(s,r)),u.add(s.resource.path);for(const s of t.resources.toAdd)e.paths.push(s.resource.path),i.has(s.resource.path)?i.delete(s.resource.path):d.push(p(s,r));if(0===d.length)return i;const c=await(0,n.UO)(d);if((0,n.k_)(r),c.length>0)throw new s.Z("save:resources","Failed to save one or more resources",{errors:c});return i}async function c(e,t,r=null){if(!e||!t.portalItem)return;const i=[];for(const s of e){const e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,n.as)(i)}async function p(e,t){const r={...null!=t?t:{},compress:e.compress},s=await(0,i.q6)(e.resource.portalItem.addResource(e.resource,await(0,a.FO)(e.content),r));if(!0!==s.ok)throw e.error?.(s.error),s.error;e.finish?.(e.resource)}async function h(e,t){const r=await(0,i.q6)(e.resource.update(await(0,a.FO)(e.content),t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}async function y(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8758],{48758:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>v});var a=n(48853),i=n(28228),r=n(33586),s=n(27535),l=n(15274),o=n(28924),u=n(67651),f=n(12384),c=n(61363),d=n(26520),m=n(70409),y=n(84328),h=n(85065),p=n(63991),w=n(75148),g=n(17805),F=n(3823),I=n(90658),D=n(36515),E=n(24240),T=n(95330),C=n(8968),b=n(19238),N=n(1231),x=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 A(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function H(e){if(null===e)return null;const t={type:A(e,"type",""),name:A(e,"name","")};if("range"===t.type)t.range=A(e,"range",[]);else{t.codedValues=[];for(const n of A(e,"codedValues",[]))t.codedValues.push({name:A(n,"name",""),code:A(n,"code",null)})}return t}function L(e){if(null===e)return null;const t={},n=A(e,"wkt",null);null!==n&&(t.wkt=n);const a=A(e,"wkid",null);return null!==a&&(t.wkid=a),t}function Z(e){if(null===e)return null;const t={hasZ:A(e,"hasz",!1),hasM:A(e,"hasm",!1)},n=A(e,"spatialreference",null);n&&(t.spatialReference=L(n));const a=A(e,"x",null);if(null!==a)return t.x=a,t.y=A(e,"y",null),t;const i=A(e,"rings",null);if(null!==i)return t.rings=i,t;const r=A(e,"paths",null);if(null!==r)return t.paths=r,t;const s=A(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const a=A(e,n,null);null!==a&&(t[n]=a)}return t}function $(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function v(e){"async"===e.mode&&(e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,(async(e,i,l)=>{if((0,c.E)(l,1,2,t,n),(0,c.n)(l[0]))return"Unknown";if((0,c.m)(l[0]))return"Unknown";if((0,c.u)(l[0])){if(await l[0].load(),1===l.length||null===l[1])return l[0].datesInUnknownTimezone?$("unknown"):$(l[0].dateFieldsTimeZone);if(!(l[1]instanceof r.Z)||!1===l[1].hasField("type"))throw new s.aV(t,s.rH.InvalidParameter,n);const e=l[1].field("type");if(!1===(0,c.c)(e))throw new s.aV(t,s.rH.InvalidParameter,n);switch((0,c.j)(e).toLowerCase()){case"preferredtimezone":return $(l[0].preferredTimeZone);case"editfieldsinfo":return $(l[0].editFieldsInfo?.timeZone??null);case"timeinfo":return $(l[0].timeInfo?.timeZone??null);case"field":if(l[1].hasField("fieldname")&&(0,c.c)(l[1].field("fieldname")))return $(l[0].fieldTimeZone((0,c.j)(l[1].field("fieldname"))))}throw new s.aV(t,s.rH.InvalidParameter,n)}const o=(0,c.l)(l[0],(0,c.L)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?a.iG.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u}))},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{(0,c.E)(i,1,3,t,n);const r=i[0];if((0,c.k)(r)){if(1===i.length)return r.toSQLWithKeyword();if(2===i.length)return r.changeTimeZone((0,c.j)(i[1])).toSQLWithKeyword();throw new s.aV(t,s.rH.InvalidParameter,n)}if((0,c.m)(r))return r.toSQLWithKeyword();if((0,c.u)(r)){if(3!==i.length)throw new s.aV(t,s.rH.InvalidParameter,n);await r.load();const e=(0,c.j)(i[1]);if((0,c.m)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,c.k)(i[2]))throw new s.aV(t,s.rH.InvalidParameter,n);const a=r.fieldTimeZone(e);return null===a?i[2].toSQLWithKeyword():i[2].changeTimeZone(a).toSQLWithKeyword()}throw new s.aV(t,s.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,c.E)(i,2,4,t,n),i[0]instanceof o.Z){const e=(0,c.j)(i[1]);let a=(0,c.H)(i[2],null);const r=(0,c.h)((0,c.H)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,c.o)(a))throw new s.aV(t,s.rH.InvalidParameter,n);return i[0].featureSetById(e,r,a)}throw new s.aV(t,s.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,c.E)(i,1,2,t,n),(0,c.r)(i[0])){let e=(0,c.H)(i[1],"datasource");return null===e&&(e="datasource"),e=(0,c.j)(e).toLowerCase(),(0,u.convertToFeatureSet)(i[0].fullSchema(),e,t.lrucache,t.interceptor,t.spatialReference)}throw new s.aV(t,s.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,c.E)(r,2,5,t,n),null===r[0])throw new s.aV(t,s.rH.PortalRequired,n);if(r[0]instanceof i.Z){const e=(0,c.j)(r[1]),a=(0,c.j)(r[2]);let i=(0,c.H)(r[3],null);const l=(0,c.h)((0,c.H)(r[4],!0));if(null===i&&(i=["*"]),!1===(0,c.o)(i))throw new s.aV(t,s.rH.InvalidParameter,n);let o=null;return o=t.services?.portal?t.services.portal:x.Z.getDefault(),o=(0,d._)(r[0],o),(0,u.constructFeatureSetFromPortalItem)(e,a,t.spatialReference,i,l,o,t.lrucache,t.interceptor)}if(!1===(0,c.c)(r[0]))throw new s.aV(t,s.rH.PortalRequired,n);const l=(0,c.j)(r[0]),o=(0,c.j)(r[1]);let f=(0,c.H)(r[2],null);const m=(0,c.h)((0,c.H)(r[3],!0));if(null===f&&(f=["*"]),!1===(0,c.o)(f))throw new s.aV(t,s.rH.InvalidParameter,n);return(0,u.constructFeatureSetFromPortalItem)(l,o,t.spatialReference,f,m,t.services?.portal??x.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,c.E)(i,2,4,t,n),i[0]instanceof o.Z){const e=(0,c.j)(i[1]);let a=(0,c.H)(i[2],null);const r=(0,c.h)((0,c.H)(i[3],!0));if(null===a&&(a=["*"]),!1===(0,c.o)(a))throw new s.aV(t,s.rH.InvalidParameter,n);return i[0].featureSetByName(e,r,a)}throw new s.aV(t,s.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,c.E)(i,1,1,t,n);let l=i[0];const o={layerDefinition:{geometryType:"",objectIdField:"",hasM:!1,hasZ:!1,globalIdField:"",typeIdField:"",fields:[]},featureSet:{geometryType:"",features:[]}};if((0,c.c)(l))l=JSON.parse(l),void 0!==l.layerDefinition?(o.layerDefinition=l.layerDefinition,o.featureSet=l.featureSet,l.layerDefinition.spatialReference&&(o.layerDefinition.spatialReference=l.layerDefinition.spatialReference)):(o.featureSet.features=l.features,o.featureSet.geometryType=l.geometryType,o.layerDefinition.geometryType=o.featureSet.geometryType,o.layerDefinition.objectIdField=l.objectIdFieldName??"",o.layerDefinition.typeIdField=l.typeIdFieldName,o.layerDefinition.globalIdField=l.globalIdFieldName,o.layerDefinition.fields=l.fields,l.spatialReference&&(o.layerDefinition.spatialReference=l.spatialReference));else{if(!(i[0]instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{l=JSON.parse(i[0].castToText(!0));const e=A(l,"layerdefinition");if(null!==e){o.layerDefinition.geometryType=A(e,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.globalIdField=A(e,"globalidfield",""),o.layerDefinition.objectIdField=A(e,"objectidfield",""),o.layerDefinition.typeIdField=A(e,"typeidfield",""),o.layerDefinition.hasZ=!0===A(e,"hasz",!1),o.layerDefinition.hasM=!0===A(e,"hasm",!1);const t=A(e,"spatialreference",null);t&&(o.layerDefinition.spatialReference=L(t));for(const t of A(e,"fields",[])){const e={name:A(t,"name",""),alias:A(t,"alias",""),type:A(t,"type",""),nullable:A(t,"nullable",!0),editable:A(t,"editable",!0),length:A(t,"length",null),domain:H(A(t,"domain"))};o.layerDefinition.fields.push(e)}const n=A(l,"featureset",null);if(n){const e={};for(const t of o.layerDefinition.fields)e[t.name.toLowerCase()]=t.name;for(const t of A(n,"features",[])){const n={},a=A(t,"attributes",{});for(const t in a)n[e[t.toLowerCase()]]=a[t];o.featureSet.features.push({attributes:n,geometry:Z(A(t,"geometry",null))})}}}else{o.layerDefinition.hasZ=!0===A(l,"hasz",!1),o.layerDefinition.hasM=!0===A(l,"hasm",!1),o.layerDefinition.geometryType=A(l,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.objectIdField=A(l,"objectidfieldname",""),o.layerDefinition.typeIdField=A(l,"typeidfieldname","");const e=A(l,"spatialreference",null);e&&(o.layerDefinition.spatialReference=L(e));let t=A(l,"fields",null);if((0,c.o)(t))for(const e of t){const t={name:A(e,"name",""),alias:A(e,"alias",""),type:A(e,"type",""),nullable:A(e,"nullable",!0),editable:A(e,"editable",!0),length:A(e,"length",null),domain:H(A(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=A(l,"features",null);if((0,c.o)(a))for(const e of a){const t={},a=A(e,"attributes",{});for(const e in a)t[n[e.toLowerCase()]]=a[e];o.featureSet.features.push({attributes:t,geometry:Z(A(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,c.o)(e.layerDefinition.fields)&&!1!==(0,c.o)(e.featureSet.features)}(o))throw new s.aV(t,s.rH.InvalidParameter,n);return""===(o?.layerDefinition?.geometryType||"")&&(o.layerDefinition.geometryType="esriGeometryNull"),g.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,c.E)(r,2,2,t,n),(0,c.o)(r[0])||(0,c.q)(r[0])){const e=[];let a=r[0];a instanceof f.Z&&(a=a.toArray());let i=null;if(!(0,c.i)(r[1]))throw new s.aV(t,s.rH.InvalidParameter,n);i=r[1].createFunction(t);for(const t of a){const n=i(t);(0,T.y8)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,c.u)(r[0])){const n=await r[0].load(),a=C.WhereClause.create(r[1],n.getFieldsIndex(),n.dateFieldsTimeZoneDefaultUTC),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 s={};for(let e=0;e<i.length;e++)s[i[e]]=n[e];return a.parameters=s,new y.Z({parentfeatureset:r[0],whereclause:a})}return new y.Z({parentfeatureset:r[0],whereclause:a})}throw new s.aV(t,s.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,c.E)(i,2,2,t,n),(0,c.u)(i[0])){const e=new F.Z(i[1]);return new h.Z({parentfeatureset:i[0],orderbyclause:e})}throw new s.aV(t,s.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,c.E)(i,2,2,t,n),(0,c.u)(i[0]))return new p.Z({parentfeatureset:i[0],topnum:i[1]});if((0,c.o)(i[0]))return(0,c.g)(i[1])>=i[0].length?i[0].slice(0):i[0].slice(0,(0,c.g)(i[1]));if((0,c.q)(i[0]))return(0,c.g)(i[1])>=i[0].length()?i[0].slice(0):i[0].slice(0,(0,c.g)(i[1]));throw new s.aV(t,s.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,c.E)(i,1,1,t,n),(0,c.u)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=l.Z.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,c.o)(i[0])?0===i[0].length?null:i[0][0]:(0,c.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,c.E)(i,1,2,t,n);const l={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof r.Z){if(i[1].hasField("minsize")&&(l.minsize=(0,c.g)(i[1].field("minsize"))),i[1].hasField("metadata")&&(l.returnMetadata=(0,c.h)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(l.maxsize=(0,c.g)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,c.a2)(i[1].field("types"),!1);e.length>0&&(l.types=e)}}else if(null!==i[1])throw new s.aV(t,s.rH.InvalidParameter,n);if((0,c.r)(i[0])){let e=i[0]._layer;return e instanceof b.default&&(e=(0,u.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===e||!1===(0,c.u)(e)?[]:(await e.load(),e.queryAttachments(i[0].field(e.objectIdField),l.minsize,l.maxsize,l.types,l.returnMetadata))}if(null===i[0])return[];throw new s.aV(t,s.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,c.E)(i,2,4,t,n);const r=i[0],l=(0,c.j)(i[1]);let o=(0,c.H)(i[2],null);const f=(0,c.h)((0,c.H)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,c.o)(o))throw new s.aV(t,s.rH.InvalidParameter,n);if(null===i[0])return null;if(!(0,c.r)(i[0]))throw new s.aV(t,s.rH.InvalidParameter,n);let d=r._layer;if(d instanceof b.default&&(d=(0,u.constructFeatureSet)(d,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===d)return null;if(!1===(0,c.u)(d))return null;d=await d.load();const m=d.relationshipMetaData().filter((e=>e.name===l));if(0===m.length)return null;if(void 0!==m[0].relationshipTableId&&null!==m[0].relationshipTableId&&m[0].relationshipTableId>-1)return(0,u.constructFeatureSetFromRelationship)(d,m[0],r.field(d.objectIdField),d.spatialReference,o,f,t.lrucache,t.interceptor);let y=d.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,u.constructFeatureSetFromUrl)(y,d.spatialReference,o,f,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 d.getFeatureByObjectId(r.field(d.objectIdField),[m[0].keyField]);if(e){const t=C.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex(),h.dateFieldsTimeZoneDefaultUTC);return t.parameters={id:e.attributes[m[0].keyField]},h.filter(t)}return new w.Z({parentfeatureset:h})}const g=C.WhereClause.create(p[0].keyField+"= @id",h.getFieldsIndex(),h.dateFieldsTimeZoneDefaultUTC);return g.parameters={id:r.field(m[0].keyField)},h.filter(g)}))},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,c.E)(i,2,3,t,n);const r=i[0],l=(0,c.j)((0,c.H)(i[1],"")).toLowerCase(),o=(0,c.c)(i[2])?(0,c.j)(i[2]):null;if(null===i[0])return null;if(!(0,c.r)(i[0]))throw new s.aV(t,s.rH.InvalidParameter,n);let f=r._layer;if(f instanceof b.default&&(f=(0,u.constructFeatureSet)(f,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===f)return null;if(!1===(0,c.u)(f))return null;await f.load();const d=f.serviceUrl(),y=await(0,u.constructAssociationMetaDataFeatureSetFromUrl)(d,t.spatialReference);let h=null,p=null,w=!1;if(null!==o&&""!==o&&void 0!==o){for(const e of y.terminals)e.terminalName===o&&(p=e.terminalId);null===p&&(w=!0)}const g=y.associations.getFieldsIndex(),F=g.get("TOGLOBALID").name,D=g.get("FROMGLOBALID").name,E=g.get("TOTERMINALID").name,T=g.get("FROMTERMINALID").name,x=g.get("FROMNETWORKSOURCEID").name,S=g.get("TONETWORKSOURCEID").name,A=g.get("ASSOCIATIONTYPE").name,H=g.get("ISCONTENTVISIBLE").name,L=g.get("OBJECTID").name;for(const e of f.fields)if("global-id"===e.type){h=r.field(e.name);break}let Z=null,$=new m.yN(new N.Z({name:"percentalong",alias:"percentalong",type:"double"}),C.WhereClause.create("0",y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC)),v=new m.yN(new N.Z({name:"side",alias:"side",type:"string"}),C.WhereClause.create("''",y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));const P="globalid",V="globalId",R={};for(const e in y.lkp)R[e]=y.lkp[e].sourceId;const W=new m.TO(new N.Z({name:"classname",alias:"classname",type:"string"}),null,R);let k="";switch(l){case"midspan":{k=`((${F}='${h}') OR ( ${D}='${h}')) AND (${A} IN (5))`,W.codefield=C.WhereClause.create(`CASE WHEN (${F}='${h}') THEN ${x} ELSE ${S} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC);const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=P,e.alias=P,Z=new m.yN(e,C.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC)),$=y.unVersion>=4?new m.$X(m.Xx.findField(y.associations.fields,g.get("PERCENTALONG").name)):new m.yN(new N.Z({name:"percentalong",alias:"percentalong",type:"double"}),C.WhereClause.create("0",y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));break}case"junctionedge":{k=`((${F}='${h}') OR ( ${D}='${h}')) AND (${A} IN (4,6))`,W.codefield=C.WhereClause.create(`CASE WHEN (${F}='${h}') THEN ${x} ELSE ${S} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC);const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=P,e.alias=P,Z=new m.yN(e,C.WhereClause.create(`CASE WHEN (${D}='${h}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC)),v=new m.yN(new N.Z({name:"side",alias:"side",type:"string"}),C.WhereClause.create(`CASE WHEN (${A}=4) THEN 'from' ELSE 'to' END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));break}case"connected":{let e=`${F}='@T'`,t=`${D}='@T'`;null!==p&&(e+=` AND ${E}=@A`,t+=` AND ${T}=@A`),k="(("+e+") OR ("+t+"))",k=(0,c.S)(k,"@T",h??""),e=(0,c.S)(e,"@T",h??""),null!==p&&(e=(0,c.S)(e,"@A",p.toString()),k=(0,c.S)(k,"@A",p.toString())),W.codefield=C.WhereClause.create("CASE WHEN "+e+` THEN ${x} ELSE ${S} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC);const n=(0,I.JW)(m.Xx.findField(y.associations.fields,D));n.name=P,n.alias=P,Z=new m.yN(n,C.WhereClause.create("CASE WHEN "+e+` THEN ${D} ELSE ${F} END`,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC));break}case"container":k=`${F}='${h}' AND ${A} = 2`,null!==p&&(k+=` AND ${E} = `+p.toString()),W.codefield=x,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,D),P,P);break;case"content":k=`(${D}='${h}' AND ${A} = 2)`,null!==p&&(k+=` AND ${T} = `+p.toString()),W.codefield=S,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,F),P,P);break;case"structure":k=`(${F}='${h}' AND ${A} = 3)`,null!==p&&(k+=` AND ${E} = `+p.toString()),W.codefield=x,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,D),P,V);break;case"attached":k=`(${D}='${h}' AND ${A} = 3)`,null!==p&&(k+=` AND ${T} = `+p.toString()),W.codefield=S,k="( "+k+" )",Z=new m.QP(m.Xx.findField(y.associations.fields,F),P,V);break;default:throw new s.aV(t,s.rH.InvalidParameter,n)}return w&&(k="1 <> 1"),new m.Xx({parentfeatureset:y.associations,adaptedFields:[new m.$X(m.Xx.findField(y.associations.fields,L)),new m.$X(m.Xx.findField(y.associations.fields,H)),Z,v,W,$],extraFilter:k?C.WhereClause.create(k,y.associations.getFieldsIndex(),y.associations.dateFieldsTimeZoneDefaultUTC):null})}))},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,l)=>{if((0,c.E)(l,3,3,t,n),!(0,c.u)(l[0]))throw new s.aV(t,s.rH.InvalidParameter,n);const o=await l[0].load(),u=[],f=[];let d=!1,m=[];if((0,c.c)(l[1]))m.push(l[1]);else if(l[1]instanceof r.Z)m.push(l[1]);else if((0,c.o)(l[1]))m=l[1];else{if(!(0,c.q)(l[1]))throw new s.aV(t,s.rH.InvalidParameter,n);m=l[1].toArray()}for(const e of m)if((0,c.c)(e)){const t=C.WhereClause.create((0,c.j)(e),o.getFieldsIndex(),o.dateFieldsTimeZoneDefaultUTC),n=!0===(0,D.y5)(t)?(0,c.j)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(d=!0)}else{if(!(e instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(d=!0),!a)throw new s.aV(t,s.rH.InvalidParameter,n);u.push({name:a,expression:C.WhereClause.create(i||a,o.getFieldsIndex(),o.dateFieldsTimeZoneDefaultUTC)})}}if(m=[],(0,c.c)(l[2]))m.push(l[2]);else if((0,c.o)(l[2]))m=l[2];else if((0,c.q)(l[2]))m=l[2].toArray();else{if(!(l[2]instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);m.push(l[2])}for(const e of m){if(!(e instanceof r.Z))throw new s.aV(t,s.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 s.aV(t,s.rH.InvalidParameter,n);f.push({name:a,statistic:i.toLowerCase(),expression:C.WhereClause.create(r,o.getFieldsIndex(),o.dateFieldsTimeZoneDefaultUTC)})}}if(d){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of f)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)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 u)await S(n.expression,e,t);for(const n of f)await S(n.expression,e,t);return l[0].groupby(u,f)}))},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,(async(a,i,l)=>{if((0,c.u)(l[0])){(0,c.E)(l,2,2,t,n);const a=await l[0].load(),i=[];let o=[];if((0,c.c)(l[1]))o.push(l[1]);else if(l[1]instanceof r.Z)o.push(l[1]);else if((0,c.o)(l[1]))o=l[1];else{if(!(0,c.q)(l[1]))throw new s.aV(t,s.rH.InvalidParameter,n);o=l[1].toArray()}let u=!1;for(const e of o)if((0,c.c)(e)){const t=C.WhereClause.create((0,c.j)(e),a.getFieldsIndex(),a.dateFieldsTimeZoneDefaultUTC),n=!0===(0,D.y5)(t)?(0,c.j)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof r.Z))throw new s.aV(t,s.rH.InvalidParameter,n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",l=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(u=!0),!r)throw new s.aV(t,s.rH.InvalidParameter,n);i.push({name:r,expression:C.WhereClause.create(l||r,a.getFieldsIndex(),a.dateFieldsTimeZoneDefaultUTC)})}}if(u){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 l[0].groupby(i,[])}return function(e,t,n,a){if(1===a.length){if((0,c.o)(a[0]))return(0,E.t)(e,a[0],-1);if((0,c.q)(a[0]))return(0,E.t)(e,a[0].toArray(),-1)}return(0,E.t)(e,a,-1)}("distinct",0,0,l)}))}),e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,(async(e,a,i)=>{if((0,c.E)(i,1,1,t,n),!(0,c.u)(i[0]))return null;const s=await i[0].getFeatureSetInfo();return s?r.Z.convertObjectToArcadeDictionary({layerId:s.layerId,layerName:s.layerName,itemId:s.itemId,serviceLayerUrl:s.serviceLayerUrl,webMapLayerId:s.webMapLayerId??null,webMapLayerTitle:s.webMapLayerTitle??null,className:null,objectClassId:null},(0,c.L)(t),!1,!1):null}))},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1})}},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")})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[178,5732,447,7701],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>o});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>c});var i=r(92036),o=r(46791),n=r(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.Z}function l(e){return e instanceof o.Z?Object.keys(e.items):a(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=o.filter((e=>!i.includes(e))),c=i.filter((e=>!o.includes(e))),y=i.filter((r=>o.includes(r)&&p(e,r)!==p(t,r))).concat(n,c).sort(),f=u(e);if(f&&s.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h;const m=a(e)&&a(t);for(const i of y){const o=p(e,i),n=p(t,i);let s;if((m||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;s={type:"complete",oldValue:o,newValue:n}}else s="object"==typeof o&&"object"==typeof n&&u(o)===u(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=s&&(null!=h?h.diff[i]=s:h={type:"partial",diff:{[i]:s}})}}return h}function c(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function y(e,t){for(const r of t)if(c(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>v,HH:()=>s,JR:()=>f,TC:()=>a,Tn:()=>d,Ue:()=>o,al:()=>n,bZ:()=>h,cS:()=>y,dp:()=>p,fS:()=>g,is:()=>m,op:()=>u,pp:()=>l,t8:()=>c});var i=r(6570);function o(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=s,a}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?c(e,v):o(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,r,i,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];o()},44958:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var i=r(43697),o=r(20102),n=r(35454),s=r(5600),a=r(90578),l=r(52011),p=r(19238),u=r(2368),d=r(96674),c=(r(75215),r(67676),r(80442),r(92036));const y=[2155,2194,2204,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2314,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2964,2965,2966,2967,2968,2992,2994,3080,3089,3091,3102,3359,3359,3361,3363,3365,3366,3404,3407,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3441,3442,3443,3444,3445,3446,3451,3452,3453,3454,3455,3456,3457,3458,3459,3479,3481,3483,3485,3487,3490,3492,3494,3496,3498,3500,3502,3504,3506,3508,3510,3512,3515,3517,3519,3521,3523,3525,3527,3529,3531,3533,3535,3537,3539,3541,3543,3545,3547,3549,3551,3553,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3582,3584,3586,3588,3590,3593,3598,3600,3605,3608,3610,3612,3614,3616,3618,3620,3622,3624,3626,3628,3630,3632,3634,3636,3640,3642,3644,3646,3648,3650,3652,3654,3656,3658,3660,3662,3664,3668,3670,3672,3674,3676,3677,3679,3680,3682,3683,3686,3688,3690,3692,3696,3698,3700,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3753,3754,3755,3756,3757,3758,3759,3760,3991,3992,4217,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4438,4439,4455,4456,4457,5466,5588,5589,5623,5624,5625,5646,5654,5655,6128,6129,6141,6200,6201,6202,6391,6405,6407,6409,6411,6413,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6441,6443,6445,6447,6449,6451,6453,6455,6457,6459,6461,6463,6465,6467,6469,6471,6473,6475,6477,6479,6484,6486,6488,6490,6492,6494,6496,6499,6501,6503,6505,6507,6510,6515,6517,6519,6521,6523,6525,6527,6529,6531,6533,6535,6537,6539,6541,6543,6545,6547,6549,6551,6553,6555,6557,6559,6561,6563,6565,6568,6570,6572,6574,6576,6578,6582,6584,6586,6588,6590,6593,6595,6597,6599,6601,6603,6605,6607,6609,6612,6614,6616,6618,6625,6626,6627,6633,6785,6787,6789,6791,6793,6795,6797,6799,6801,6803,6805,6807,6809,6811,6813,6815,6817,6819,6821,6823,6825,6827,6829,6831,6833,6835,6837,6839,6841,6843,6845,6847,6849,6851,6853,6855,6857,6859,6861,6863,6868,6880,6885,6887,6923,6925,6966,6997,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7132,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7558,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,24100,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26791,26792,26793,26794,26795,26796,26797,26798,26799,26801,26802,26803,26811,26812,26813,26814,26815,26819,26820,26821,26822,26825,26826,26830,26831,26832,26833,26836,26837,26841,26842,26843,26844,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,32001,32002,32003,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32064,32065,32066,32067,32074,32075,32076,32077,32099,32164,32165,32166,32167,32664,32665,32666,32667,65061,102120,102121,102629,102630,102631,102632,102633,102634,102635,102636,102637,102638,102639,102640,102641,102642,102643,102644,102645,102646,102648,102649,102650,102651,102652,102653,102654,102655,102656,102657,102658,102659,102660,102661,102662,102663,102664,102665,102666,102667,102668,102669,102670,102671,102672,102673,102674,102675,102676,102677,102678,102679,102680,102681,102682,102683,102684,102685,102686,102687,102688,102689,102690,102691,102692,102693,102694,102695,102696,102697,102698,102700,102704,102707,102708,102709,102710,102711,102712,102713,102714,102715,102716,102717,102718,102719,102720,102721,102722,102723,102724,102725,102726,102727,102728,102729,102730,102733,102734,102735,102736,102737,102738,102739,102740,102741,102742,102743,102744,102745,102746,102747,102748,102749,102750,102751,102752,102753,102754,102755,102756,102757,102758,102761,102766],f=[5614,5702,6130,6131,6132,6358,6359,6360],h=[115700,4326];function m(e){return y.includes(e)?"feet":"meters"}function g(e,t){return"number"==typeof e?f.includes(e)?"feet":"meters":m(t)}function v(e,t){return h.includes(e)||4326===t?"ellipsoidal":"gravity-related-height"}let b=class extends c.Z{get isAdvanced(){return!1}getInfo(){const{horizontalWKID:e,verticalWKID:t}=this;let r=e,i=t;const o=this;if(4===o.type){const{properties:e}=o;r=4326,i=e.verticalWKID}return{heightModel:v(r,i),heightUnit:g(i,r),horizontalUnit:m(r)}}};(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"x",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"y",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"z",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"type",void 0),b=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientation")],b);const w=b;let C=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=1}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],C.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"heading",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"pitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"roll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"z",void 0),C=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationHPR")],C);const _=C;let S=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=2}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],S.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"omega",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"phi",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"kappa",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"z",void 0),S=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationOPK")],S);const j=S;let T=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],T.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"yaw",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"pitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"roll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"z",void 0),T=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationYPR")],T);const F=T;r(96187);let x=class extends d.wq{constructor(){super(...arguments),this.url=null}};(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],x.prototype,"lod",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],x.prototype,"rasterFunction",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],x);let N=class extends d.wq{};var P;(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],N.prototype,"constantElevation",void 0),N=(0,i._)([(0,l.j)("esri.layers.orientedImagery.cor.ElevationSourceDefinitions.ConstantElevation")],N),function(e){e[e.HPR=1]="HPR",e[e.OPK=2]="OPK",e[e.YPR=3]="YPR",e[e.LTP=4]="LTP"}(P||(P={}));const D=new n.X({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),I=new n.X({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),O=new Map;O.set(`${P.OPK}`,{desc:"Using Omega Phi Kappa",constructor:j}),O.set(`${P.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:_}),O.set(`${P.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:F});const R=new Map;function A(e,t,r){return{name:`orientedImageryProperties.${e}`,write:!t||{target:`orientedImageryProperties.${e}`,writer:t},origins:{service:{name:`orientedImageryInfo.orientedImageryProperties.${e}`,write:t,read:r}}}}R.set(`${P.HPR}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,heading:a,pitch:l,roll:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.YPR}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,yaw:a,pitch:l,roll:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.OPK}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,omega:a,phi:l,kappa:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.LTP}`,(function(e){const[t,r,i,o,n,s,...a]=e,l=R.get(s);return l?{type:t,latitude:r,longitude:i,ellipsoidRadius:o,squaredEccentricity:n,properties:l([s,"",...a])}:null}));let M=class extends p.default{constructor(){super(...arguments),this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.type="oriented-imagery",this.timeIntervalUnit=null,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:r}=this;return function(e,t,r){return e?"constantElevation"in e?new N(e):function(e,t,r){let{url:i}=e;return i?(i=function(e,t,r){return t&&(e=`${t}${e}`),r&&(e+=`${r}`),e}(i,t,r),new x({...e,url:i})):null}(e,t,r):e}(e,t,r)}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.Z("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};(0,i._)([(0,s.Cb)({type:Number,json:A("cameraHeading")})],M.prototype,"cameraHeading",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraHeight")})],M.prototype,"cameraHeight",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraPitch")})],M.prototype,"cameraPitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraRoll")})],M.prototype,"cameraRoll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("coveragePercent")})],M.prototype,"coveragePercent",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("demPathPrefix")})],M.prototype,"demPathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("demPathSuffix")})],M.prototype,"demPathSuffix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("depthImagePathPrefix")})],M.prototype,"depthImagePathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("depthImagePathSuffix")})],M.prototype,"depthImagePathSuffix",void 0),(0,i._)([(0,s.Cb)({type:Object,json:A("elevationSource")})],M.prototype,"elevationSource",void 0),(0,i._)([(0,s.Cb)()],M.prototype,"effectiveElevationSource",null),(0,i._)([(0,s.Cb)({type:Number,json:A("farDistance")})],M.prototype,"farDistance",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],M.prototype,"geometryType",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("horizontalFieldOfView")})],M.prototype,"horizontalFieldOfView",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("horizontalMeasurementUnit")})],M.prototype,"horizontalMeasurementUnit",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("imagePathPrefix")})],M.prototype,"imagePathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("imagePathSuffix")})],M.prototype,"imagePathSuffix",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("imageRotation")})],M.prototype,"imageRotation",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("maximumDistance")})],M.prototype,"maximumDistance",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("nearDistance")})],M.prototype,"nearDistance",void 0),(0,i._)([(0,s.Cb)({type:["OrientedImageryLayer"]})],M.prototype,"operationalLayerType",void 0),(0,i._)([(0,s.Cb)({json:A("orientationAccuracy",((e,t)=>{e&&(t.orientationAccuracy=e.join(","))}))}),(0,a.p)((e=>e?e.trim().split(",").map(Number):null))],M.prototype,"orientationAccuracy",void 0),(0,i._)([(0,s.Cb)({json:{...A("orientedImageryType",I.write,I.read),type:I.apiValues}})],M.prototype,"orientedImageryType",void 0),(0,i._)([(0,s.Cb)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],M.prototype,"type",void 0),(0,i._)([(0,s.Cb)({json:{...A("timeIntervalUnit",D.write,D.read),type:D.apiValues}})],M.prototype,"timeIntervalUnit",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("verticalFieldOfView")})],M.prototype,"verticalFieldOfView",void 0),(0,i._)([(0,s.Cb)({json:{...A("verticalMeasurementUnit"),type:new n.X({Feet:"feet",Meter:"meter"}).apiValues}})],M.prototype,"verticalMeasurementUnit",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("videoPathPrefix")})],M.prototype,"videoPathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("videoPathSuffix")})],M.prototype,"videoPathSuffix",void 0),M=(0,i._)([(0,l.j)("esri.layers.OrientedImageryLayer")],M);const z=M},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,o.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var i=r(43697),o=r(92604),n=r(95330),s=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const c=new u.Z,y=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let m=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=h(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(v,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.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,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.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,i._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),o=r(2368),n=r(35454),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),o=r(2368),n=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),p=r(30556),u=r(72729),d=r(70082);let c=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,p.c)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,s.Cb)({type:[d.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],c);const y=c},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var i,o=r(43697),n=r(35454),s=r(96674),a=r(5600),l=r(75215),p=(r(67676),r(80442),r(36030)),u=r(71715),d=r(52011),c=r(72729),y=r(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=i=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,u.r)("description")],h.prototype,"readDescription",null),(0,o._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],h.prototype,"domain",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,o._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,o._)([(0,p.J)(y.v)],h.prototype,"type",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"valueType",void 0),(0,o._)([(0,u.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,o._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,o._)([(0,d.j)("esri.layers.support.Field")],h);const m=h},99514:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),o=r(96674),n=r(92604),s=r(35671),a=r(25031);class l{static fromJSON(e){return new l(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new l(e.fields??[],c(e))}static fromLayerJSON(e){return new l(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=u(t);if(t&&i){const o=p(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(i,e),r.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,s.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.Dl)(e)||(0,s.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,s.Dl)(e)||(0,s.Se)(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(p(e))??this._normalizedFieldsMap.get(u(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),a.pt):d.has(t.type)?a._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function p(e){return e.trim().toLowerCase()}function u(e){return(0,s.q6)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:o}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,a.Jv)(e.dateFieldsTimeReference):null,u=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.dateFieldsTimeReference?(0,a.Jv)(o.dateFieldsTimeReference):l??a.pt:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,a.Jv)(i.timeReference):l:null,y=new Map([[p(o?.creationDateField??""),u],[p(o?.editDateField??""),u],[p(n),c],[p(s),c]]);for(const{name:i,type:o}of e.fields)if(d.has(o))t.set(i,a._4);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(i,null);else if(r)t.set(i,a._4);else{const e=y.get(p(i??""))??l;t.set(i,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var i,o=r(43697),n=r(46791),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let p=i=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,o._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},72729:(e,t,r)=>{r.d(t,{im:()=>j,V5:()=>S}),r(80442);var i,o=r(43697),n=r(22974),s=r(5600),a=(r(75215),r(36030)),l=r(52011),p=r(96674);r(67676);let u=i=class extends p.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,o._)([(0,l.j)("esri.layers.support.CodedValue")],u);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends p.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,l.j)("esri.layers.support.Domain")],c);const y=c;var f;let h=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,s.Cb)({type:[u],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,o._)([(0,a.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=f=(0,o._)([(0,l.j)("esri.layers.support.CodedValueDomain")],h);const m=h;var g;r(92604),r(20102);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,a.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,o._)([(0,l.j)("esri.layers.support.InheritedDomain")],v);const b=v;var w;let C=w=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,o._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=w=(0,o._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const _=C,S={key:"type",base:y,typeMap:{range:C,"coded-value":m,inherited:b}};function j(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54275:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),o=r(66677);function n(e,t,r){return!!a(e,t,r)}function s(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:f(e),metadata:h(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:v(e),queryTopFeatures:b(e),editing:w(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function h(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,o.Qc)(r):null,a=i.includes(null!=s&&"MapServer"===s.serverType?"data":"query"),l=i.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&i.includes("create"),u=l&&i.includes("delete"),d=l&&i.includes("update");const c=i.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,i.Z)("mapserver-pbf-version-support"),f=(0,o.M8)(t),h=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsOrderBy:n(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:n(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(a,"allowOthersToQuery",!0),supportsHistoricMoment:n(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&h.has("pbf"),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),maxRecordCountFactor:s(e,"maxRecordCountFactor",void 0),maxRecordCount:s(e,"maxRecordCount",void 0),standardMaxRecordCount:s(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:s(e,"tileMaxRecordCount",void 0)}}function v(e){const t=e.advancedQueryCapabilities,r=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function b(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1),zDefault:s(e,"zDefault",void 0)}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(69285);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,o=r(43697),n=r(66577),s=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(5600),d=(r(75215),r(71715)),c=r(52011),y=r(30556),f=r(82971),h=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=s.Z.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=o.aggregateGeometries,p=n.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[n,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*n+i),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,o;const n=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===o||(n.push([e-i,s-o]),i=e,o=s)}else i=t(a[0]),o=r(a[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],s=this._quantizePoints(n,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=r(a)}}if(i&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let s,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.Cb)({type:[s.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.Cb)({types:n.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>o,eG:()=>l,lF:()=>s,lj:()=>u,qP:()=>a,wW:()=>p});const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3831,2664],{65845:(e,t,r)=>{r.d(t,{D:()=>o});var n=r(81153);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,n.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function n(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>n})},32664:(e,t,r)=>{r.d(t,{save:()=>S,saveAs:()=>N});var n=r(67676),o=(r(20102),r(19238)),a=r(64383),i=r(66677),s=r(52104),l=r(84230),u=(r(33516),r(14661));const p="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function m(e){return{isValid:(0,l.fP)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function d(e){const t=[],r=[];for(const{layer:n,layerJSON:o}of e)n.isTable?r.push(o):t.push(o);return{layers:t,tables:r}}function h(e){return d([e])}async function g(e,t){return/\/\d+\/?$/.test(e.url)?h(t[0]):async function(e,t){if(!t)return d(e);const{layer:{url:r,customParameters:n,apiKey:a}}=e[0];let i=await t.fetchData("json");null!=i?.layers&&null!=i.tables||(i=await async function(e,t,r){e||={},e.layers||=[],e.tables||=[];const{url:n,customParameters:a,apiKey:i}=t,{serviceJSON:l,layersJSON:u}=await(0,s.V)(n,{customParameters:a,apiKey:i}),p=w(e.layers,l.layers,r),c=w(e.tables,l.tables,r);e.layers=p.itemResources,e.tables=c.itemResources;const y=[...p.added,...c.added],f=u?[...u.layers,...u.tables]:[];return await async function(e,t,r,n){const a=t.map((({id:e})=>new o.default({url:r,layerId:e,sourceJSON:n.find((({id:t})=>t===e))})));await Promise.allSettled(a.map((e=>e.load()))),a.forEach((t=>{const{layerId:r,loaded:n,defaultPopupTemplate:o}=t;n&&null!=o&&v(t,{id:r,popupInfo:o.toJSON()},e)}))}(e,y,n,f),e}(i,{url:r??"",customParameters:n,apiKey:a},e.map((e=>e.layer.layerId))));for(const t of e)v(t.layer,t.layerJSON,i);return i}(t,e)}function w(e,t,r){const o=(0,n.e5)(e,t,((e,t)=>e.id===t.id));e=e.filter((e=>!o.removed.some((t=>t.id===e.id))));const a=o.added.map((({id:e})=>({id:e})));return a.forEach((({id:t})=>{e.push({id:t})})),{itemResources:e,added:a.filter((({id:e})=>!r.includes(e)))}}function v(e,t,r){e.isTable?b(r.tables,t):b(r.layers,t)}function b(e,t){const r=e.findIndex((({id:e})=>e===t.id));-1===r?e.push(t):e[r]=t}async function x(e,t){const{url:r,layerId:n,title:o,fullExtent:a,isTable:s}=e,l=(0,i.Qc)(r);t.url="FeatureServer"===l?.serverType?r:`${r}/${n}`,t.title||=o,t.extent=null,s||null==a||(t.extent=await(0,u.$o)(a)),(0,u.ck)(t,u.Kz.METADATA),(0,u.ck)(t,u.Kz.MULTI_LAYER),(0,u.qj)(t,u.Kz.SINGLE_LAYER),s&&(0,u.qj)(t,u.Kz.TABLE)}async function S(e,t){return(0,a.a1)({layer:e,itemType:p,validateLayer:m,createItemData:(e,t)=>g(t,[e]),errorNamePrefix:y},t)}async function N(e,t,r){return(0,a.po)({layer:e,itemType:p,validateLayer:m,createItemData:(e,t)=>Promise.resolve(h(e)),errorNamePrefix:f,newItem:t,setItemProperties:x},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>g,po:()=>w});var n=r(20102),o=r(65845),a=r(48522),i=r(15235),s=r(33516),l=r(14661),u=r(14769);async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){const o=r(e);if(!o.isValid)throw new n.Z(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function c(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function y(e){const{item:t,itemType:r,errorNamePrefix:o,layer:a,validateItem:i}=e;if((0,u.w)(t),t.type!==r)throw new n.Z(`${o}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:a});if(i){const e=i(t);if(!e.isValid)throw new n.Z(`${o}:invalid-parameters`,e.errorMessage,{layer:a})}}function f(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:o}=t;if(!o)throw new n.Z(`${r}:portal-item-not-set`,c(t,"requires the portalItem property to be set"));if(!o.loaded)throw new n.Z(`${r}:portal-item-not-loaded`,c(t,"cannot be saved to a portal item that does not exist or is inaccessible"));y({...e,item:o})}function m(e){const{newItem:t,itemType:r}=e;let n=i.default.from(t);return n.id&&(n=n.clone(),n.id=null),n.type??=r,n.portal??=a.Z.getDefault(),y({...e,item:n}),n}async function d(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const o=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new n.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new n.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),o}function h(e){(0,l.qj)(e,l.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:n,createJSONContext:a}=e;await p(e),f(e);const i=r.portalItem,l=a?a(i):(0,s.Yv)(i),u=await d(r,l,t),c=await n({layer:r,layerJSON:u},i);return h(i),await i.update({data:c}),(0,o.D)(l),i}async function w(e,t){const{layer:r,createItemData:n,createJSONContext:a,setItemProperties:i}=e;await p(e);const l=m(e),u=a?a(l):(0,s.Yv)(l),c=await d(r,u,t),y=await n({layer:r,layerJSON:c},l);return await i(r,l),h(l),await async function(e,t,r){const n=e.portal;await n.signIn(),await(n.user?.addItem({item:e,data:t,folder:r?.folder}))}(l,y,t),r.portalItem=l,(0,o.D)(u),l}},16451:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(43697),o=r(2368),a=r(96674),i=r(5600),s=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),p=r(72729),c=r(70082);let y=class extends((0,o.J)(a.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,i.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,n._)([(0,i.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,i.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,n._)([(0,s.r)("domains")],y.prototype,"readDomains",null),(0,n._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,n._)([(0,i.Cb)({type:[c.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,n._)([(0,l.j)("esri.layers.support.FeatureType")],y);const f=y},52104:(e,t,r)=>{r.d(t,{V:()=>o});var n=r(96187);async function o(e,t){const r=await(0,n.T)(e,t);r.layers=r.layers.filter(a);const o={serviceJSON:r};if((r.currentVersion??0)<10.5)return o;const i=await(0,n.T)(e+"/layers",t);return o.layersJSON={layers:i.layers.filter(a),tables:i.tables},o}function a(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},33516:(e,t,r)=>{r.d(t,{M4:()=>l,Yv:()=>i,ht:()=>a,wk:()=>s});var n=r(17452),o=r(48522);function a(e){return{origin:"portal-item",url:(0,n.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,n.mN)(e.itemUrl):null,portal:e.portal||o.Z.getDefault(),portalItem:e}}function s(e){return{origin:"web-map",url:(0,n.mN)(e.itemUrl),portal:e.portal||o.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e){return{origin:"web-map",messages:[],writtenProperties:[],url:e.itemUrl?(0,n.mN)(e.itemUrl):null,portal:e.portal||o.Z.getDefault(),portalItem:e}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var n=r(69285);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,n.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var n,o=r(43697),a=r(66577),i=r(38171),s=r(35454),l=r(96674),u=r(22974),p=r(5600),c=(r(75215),r(71715)),y=r(52011),f=r(30556),m=r(82971),d=r(33955),h=r(1231);const g=new s.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],a=i.Z.fromJSON(o),s=o.geometry?.spatialReference;null==a.geometry||s||(a.geometry.spatialReference=r);const l=o.aggregateGeometries,u=a.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}n.push(a)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,d.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=m.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,a=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=a.length;e<t;e++)i?.(a[e].geometry)||(a.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[a,i]}=r;let s=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*a+n),(e=>o-e*i),s,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const a=[];for(let i=0,s=e.length;i<s;i++){const s=e[i];if(i>0){const e=t(s[0]),i=r(s[1]);e===n&&i===o||(a.push([e-n,i-o]),n=e,o=i)}else n=t(s[0]),o=r(s[1]),a.push([n,o])}return a.length>0?a:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,d.oU)(e)?e.rings:e.paths,o=[];for(let e=0,a=n.length;e<a;e++){const a=n[e],i=this._quantizePoints(a,t,r);i&&o.push(i)}return o.length>0?((0,d.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const a=(0,d.oU)(e)?e.rings:e.paths;let i,s;for(let e=0,n=a.length;e<n;e++){const n=a[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(i+=o[0],s+=o[1]):(i=o[0],s=o[1]),o[0]=t(i),o[1]=r(s)}}if(n&&o)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=a.length;e<t;e++){const t=a[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const a=e.points;let i,s;for(let e=0,n=a.length;e<n;e++){const n=a[e];e>0?(i+=n[0],s+=n[1]):(i=n[0],s=n[1]),n[0]=t(i),n[1]=r(s)}if(n&&o)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=n(t[2])}else if(o)for(let e=0,t=a.length;e<t;e++){const t=a[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[i.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,f.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:a.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:m.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,f.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,o._)([(0,y.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},96187:(e,t,r)=>{r.d(t,{T:()=>o});var n=r(3172);async function o(e,t){const{data:r}=await(0,n.Z)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return r}},14769:(e,t,r)=>{r.d(t,{w:()=>i});var n=r(68773),o=r(20102),a=r(71058);function i(e){if(n.default.apiKey&&(0,a.r)(e.portal.url))throw new o.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2725,5732,7701],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>s});var i="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}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(66643),r(20102),r(92604),r(26258),r(87538)),n=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,o.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 i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],a.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,i._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},22862:(e,t,r)=>{r.d(t,{Hg:()=>h,V7:()=>c,uD:()=>y});var i=r(92036),s=r(46791),o=r(1153);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=s.filter((e=>!i.includes(e))),y=i.filter((e=>!s.includes(e))),c=i.filter((r=>s.includes(r)&&u(e,r)!==u(t,r))).concat(o,y).sort(),h=p(e);if(h&&n.has(h)&&c.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of c){const s=u(e,i),o=u(t,i);let n;if((m||"function"!=typeof s&&"function"!=typeof o)&&s!==o&&(null!=s||null!=o)){if(r&&r[i]&&"function"==typeof r[i])n=r[i]?.(s,o);else if(s instanceof Date&&o instanceof Date){if(s.getTime()===o.getTime())continue;n={type:"complete",oldValue:s,newValue:o}}else n="object"==typeof s&&"object"==typeof o&&p(s)===p(o)?d(s,o):{type:"complete",oldValue:s,newValue:o};null!=n&&(null!=f?f.diff[i]=n:f={type:"partial",diff:{[i]:n}})}}return f}function y(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function c(e,t){for(const r of t)if(y(e,r))return!0;return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>g,HH:()=>n,JR:()=>h,TC:()=>l,Tn:()=>d,Ue:()=>s,al:()=>o,bZ:()=>f,cS:()=>c,dp:()=>u,fS:()=>b,is:()=>m,op:()=>p,pp:()=>a,t8:()=>y});var i=r(6570);function s(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,n,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=o,l[5]=n,l}function n(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function c(e){return e?y(e,g):s(g)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function b(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];s()},54295:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(43697),s=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},7944:(e,t,r)=>{r.d(t,{O:()=>g});var i=r(43697),s=r(3172),o=r(30175),n=r(95330),l=r(17452),a=r(23670),u=r(5600),p=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),y=r(31263),c=r(6570),h=r(82971),f=r(66677),m=r(21506),b=r(14661);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),l=!!t.exportTilesAllowed,u=r.includes("tilemap"),p=r.includes("data"),d="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),c="tile"!==i,h=t.cimVersion&&a.G.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:l,supportsIdentify:o,supportsQuery:p,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:s,supportsSublayerVisibility:d,supportsSublayerDefinitionExpression:y,supportsCIMSymbols:m}:null,exportTiles:l?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.Fj)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.k_)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.Fj)(this.portalItem)&&e.originIdOf("url")<y.s3.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,l.v_)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.Z)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>y.s3.SERVICE)try{o=(await this._fetchAllLayersAndTablesFromService(i)).get(r.mapLayerId)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.Qc)(e),i=(0,o.s1)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.Z)((0,l.v_)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map;for(const r of e.data.layers)t.set(r.id,r);return{result:t}}),(e=>({error:e}))))),a=await i;if((0,n.k_)(t),"result"in a)return a.result;throw a.error}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,p.r)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:c.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)(m.C_)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:h.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.r)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,d.j)("esri.layers.mixins.ArcGISMapService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(43697),s=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>v});var i=r(43697),s=r(92604),o=r(95330),n=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),p=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const y=new p.Z,c=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,b=0;function g(){const e=Date.now();let t=!1;for(const r of y){const i=r.deref();i?i.refreshInterval&&e-(c.get(i)??0)+5>=6e4*i.refreshInterval&&(c.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of y){const i=r.deref();i&&(t=f(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?c.get(i)||c.set(i,e):c.delete(i))}if(t!==b){if(b=t,clearInterval(m),0===b)return void(m=0);m=setInterval(g,b)}}));const v=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.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,o.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,i._)([(0,n.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},10343:(e,t,r)=>{r.d(t,{x:()=>g});var i=r(43697),s=r(46791),o=r(57435),n=r(20102),l=r(92604),a=r(17445),u=r(5600),p=(r(75215),r(67676),r(80442),r(1153)),d=r(52011),y=r(31263),c=r(49867),h=r(32073);const f=l.Z.getLogger("esri.layers.TileLayer"),m=s.Z.ofType(c.Z);function b(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&b(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[y.s3.SERVICE]:{},[y.s3.PORTAL_ITEM]:{},[y.s3.WEB_SCENE]:{},[y.s3.WEB_MAP]:{}},this.addHandles((0,a.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),a.Z_))}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,y.M9)(t.origin);if(i<y.s3.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>y.s3.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,p.vw)(this);n.setDefaultOrigin(o),this._set("sublayers",new m(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,y.M9)("web-document"===e?"web-map":e);let r=y.s3.SERVICE,i=this.sublayersSourceJSON[y.s3.SERVICE].layers,s=this.sublayersSourceJSON[y.s3.SERVICE].context,o=null;const n=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h.ac)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const l=[y.s3.PORTAL_ITEM,y.s3.WEB_SCENE,y.s3.WEB_MAP].filter((e=>e>r&&e<=t));let a=null;for(const e of l){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(a={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new c.Z;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),p=new Map,d=new Set;if(a)for(const e of a.layers)p.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)d.add(e);return b(u,(e=>{a&&e.read(p.get(e.id),a.context),o&&e.read({defaultVisibility:d.has(e.id)},o.context)})),{origin:(0,y.x3)(r),sublayers:new m({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{f.error(new n.Z("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:s.Z.ofType(c.Z)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.Cb)({value:null,type:m,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=(0,i._)([(0,d.j)("esri.layers.mixins.SublayersOwner")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(35454),n=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const d=p},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),d=r(70082);let y=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[d.Z],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],y);const c=y},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var i,s=r(43697),o=r(35454),n=r(96674),l=r(5600),a=r(75215),u=(r(67676),r(80442),r(36030)),p=r(71715),d=r(52011),y=r(72729),c=r(86719);const h=new o.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends n.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],f.prototype,"description",void 0),(0,s._)([(0,p.r)("description")],f.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:y.V5,json:{read:{reader:y.im},write:!0}})],f.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,s._)([(0,u.J)(c.v)],f.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],f.prototype,"valueType",void 0),(0,s._)([(0,p.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,s._)([(0,d.j)("esri.layers.support.Field")],f);const m=f},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(20102),s=r(96674),o=r(92604),n=r(35671),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],y(e))}static fromLayerJSON(e){return new a(e.fields??[],y(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=p(t);if(t&&i){const s=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,n.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,n.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,n.Dl)(e)||(0,n.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,n.Dl)(e)||(0,n.Se)(e)||e.nullable||void 0!==(0,n.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(p(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):d.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,n.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function p(e){return(0,n.q6)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function y(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",n=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,p=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,l.Jv)(s.dateFieldsTimeReference):a??l.pt:null,y=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,l.Jv)(i.timeReference):a:null,c=new Map([[u(s?.creationDateField??""),p],[u(s?.editDateField??""),p],[u(o),y],[u(n),y]]);for(const{name:i,type:s}of e.fields)if(d.has(s))t.set(i,l._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,l._4);else{const e=c.get(u(i??""))??a;t.set(i,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>p});var i,s=r(43697),o=r(46791),n=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let u=i=class extends n.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],u);const p=u},49867:(e,t,r)=>{r.d(t,{Z:()=>$});var i,s=r(43697),o=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),l=r(3172),a=r(9790),u=r(46791),p=r(20102),d=r(80442),y=r(10699),c=r(22974),h=r(83379),f=r(92604),m=r(16453),b=r(42033),g=r(17452),v=r(5600),S=r(90578),w=r(71715),_=r(52011),I=r(30556),C=r(75215),F=r(31263),T=r(1153),x=r(49735),E=r(16451),O=r(1231),A=r(99514),L=r(54306),D=r(30707),M=r(56765),j=r(54275),R=r(10158),P=r(42843),V=r(56545),N=r(14165),Z=r(32163),q=r(6570),Q=r(86973);function z(e){return null!=e&&"esriSMS"===e.type}function k(e,t,r){const i=this.originIdOf(t)>=(0,F.M9)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function B(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.M9)(r.origin)||this._isOverridden(t))}}function J(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function U(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.M9)(r.origin))}}let G=0;const H=new Set;H.add("layer"),H.add("parent"),H.add("loaded"),H.add("loadStatus"),H.add("loadError"),H.add("loadWarnings");let W=i=class extends((0,m.R)((0,y.IG)(h.Z))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.sourceJSON=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new p.Z("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,l.Z)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service"}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s},data:{supportsAttachment:o}}=(0,j.h)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:o},query:{supportsFormatPBF:s}}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:t.minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new A.Z(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??G++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeOID"===e.type)return e.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const r=t.layerDefinition;return 1-.01*((null!=r?.transparency?r.transparency:r?.drawingInfo?.transparency)??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,C.vU)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{spatialReference:e}=this.layer,t="gdbVersion"in this.layer?this.layer.gdbVersion:void 0,{capabilities:r,fieldsIndex:i}=this,s=(0,d.Z)("featurelayer-pbf")&&r?.query.supportsFormatPBF,o=r?.operations?.supportsQueryAttachments??!1;return new x.Z({url:this.url,pbfSupported:s,fieldsIndex:i,gdbVersion:t,sourceSpatialReference:e,queryAttachmentsSupported:o})}set renderer(e){if(e)for(const t of e.getSymbols())if((0,a.dU)(t)){f.Z.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new P.R({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,C.se)(u.Z.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,g.B7)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,T.vw)(this),t=new i;return(0,T.vw)(t).store=e.clone(H),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,Z.eZ)(this,e)}createQuery(){return new N.Z({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const{layer:e}=this,t=e?.parsedUrl,i=new(0,(await Promise.all([r.e(6569),r.e(6404),r.e(4680),r.e(9238)]).then(r.bind(r,19238))).default)({url:t?.path});return t&&this.source&&("map-layer"===this.source.type?i.layerId=this.source.mapLayerId:i.dynamicDataSource=this.source),null!=e?.refreshInterval&&(i.refreshInterval=e.refreshInterval),this.definitionExpression&&(i.definitionExpression=this.definitionExpression),this.floorInfo&&(i.floorInfo=(0,c.d9)(this.floorInfo)),this.originIdOf("labelingInfo")>F.s3.SERVICE&&(i.labelingInfo=(0,c.d9)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.s3.DEFAULTS&&(i.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.s3.DEFAULTS&&(i.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.s3.DEFAULTS&&(i.visible=this.visible),this.originIdOf("minScale")>F.s3.DEFAULTS&&(i.minScale=this.minScale),this.originIdOf("maxScale")>F.s3.DEFAULTS&&(i.maxScale=this.maxScale),this.originIdOf("opacity")>F.s3.DEFAULTS&&(i.opacity=this.opacity),this.originIdOf("popupTemplate")>F.s3.DEFAULTS&&(i.popupTemplate=(0,c.d9)(this.popupTemplate)),this.originIdOf("renderer")>F.s3.SERVICE&&(i.renderer=(0,c.d9)(this.renderer)),"data-layer"===this.source?.type&&(i.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.s3.DEFAULTS&&(i.title=this.title),"map-image"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),"tile"===e?.type&&e.originIdOf("customParameters")>F.s3.DEFAULTS&&(i.customParameters=e.customParameters),i}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=V.Z.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new p.Z("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:l,start:a,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||l?.length>0||n||a||u))throw new p.Z("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new p.Z("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.Z("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.Z("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,b._)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>F.s3.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>F.s3.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.s3.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.s3.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&f.Z.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,D.a)(this.labelingInfo,Q.M.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>F.s3.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)z(e.symbol)&&t(e.symbol);"symbol"in e&&z(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&z(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification"}const n=(0,T.vw)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{const t=this.layer?.capabilities?.exportMap?.supportsSublayersChanges;null==t||t||(f.Z.getLogger(this).error(new p.Z("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;f.Z.getLogger(i).error(new p.Z("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};W.test={isMapImageLayerOverridePolicy:e=>e===J||e===k,isTileImageLayerOverridePolicy:e=>e===B},(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"capabilities",void 0),(0,s._)([(0,w.r)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],W.prototype,"readCapabilities",null),(0,s._)([(0,v.Cb)()],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,v.Cb)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:k}}})],W.prototype,"definitionExpression",null),(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,s._)([(0,w.r)("service","maxScaleRange",["minScale","maxScale"])],W.prototype,"readMaxScaleRange",null),(0,s._)([(0,v.Cb)({type:[O.Z],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],W.prototype,"fields",void 0),(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"fieldsIndex",null),(0,s._)([(0,v.Cb)({type:M.Z,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:k},origins:{"web-scene":{read:!1,write:!1}}}})],W.prototype,"floorInfo",null),(0,s._)([(0,v.Cb)({type:q.Z,json:{read:{source:"layerDefinition.extent"}}})],W.prototype,"fullExtent",void 0),(0,s._)([(0,v.Cb)({type:Q.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:Q.M.read}}}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,v.Cb)({type:String})],W.prototype,"globalIdField",void 0),(0,s._)([(0,w.r)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],W.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,v.Cb)({type:C.z8,json:{write:{ignoreOrigin:!0}}})],W.prototype,"id",null),(0,s._)([(0,v.Cb)({value:null,type:[L.Z],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:J}}})],W.prototype,"labelingInfo",null),(0,s._)([(0,I.c)("labelingInfo")],W.prototype,"writeLabelingInfo",null),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:J}}})],W.prototype,"labelsVisible",null),(0,s._)([(0,v.Cb)({value:null})],W.prototype,"layer",null),(0,s._)([(0,v.Cb)({type:String,json:{write:{overridePolicy:B}}})],W.prototype,"layerItemId",void 0),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:U}}})],W.prototype,"legendEnabled",void 0),(0,s._)([(0,v.Cb)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],W.prototype,"listMode",null),(0,s._)([(0,v.Cb)({type:Number,value:0,json:{write:{overridePolicy:J}}})],W.prototype,"minScale",null),(0,s._)([(0,w.r)("minScale",["minScale","layerDefinition.minScale"])],W.prototype,"readMinScale",null),(0,s._)([(0,v.Cb)({type:Number,value:0,json:{write:{overridePolicy:J}}})],W.prototype,"maxScale",null),(0,s._)([(0,w.r)("maxScale",["maxScale","layerDefinition.maxScale"])],W.prototype,"readMaxScale",null),(0,s._)([(0,v.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,w.r)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],W.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,v.Cb)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:J}}})],W.prototype,"opacity",null),(0,s._)([(0,w.r)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],W.prototype,"readOpacity",null),(0,s._)([(0,I.c)("opacity")],W.prototype,"writeOpacity",null),(0,s._)([(0,v.Cb)({json:{type:C.z8,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:J}}})],W.prototype,"parent",void 0),(0,s._)([(0,I.c)("parent")],W.prototype,"writeParent",null),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:U,writer(e,t,r){t[r]=!e}}}})],W.prototype,"popupEnabled",void 0),(0,s._)([(0,v.Cb)({type:o.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:U}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,v.Cb)({readOnly:!0})],W.prototype,"queryTask",null),(0,s._)([(0,v.Cb)({types:n.A,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:J},origins:{"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:J}}}}})],W.prototype,"renderer",null),(0,s._)([(0,v.Cb)({types:{key:"type",base:null,typeMap:{"data-layer":R.n,"map-layer":P.R}},cast(e){if(e){if("mapLayerId"in e)return(0,C.TJ)(P.R,e);if("dataSource"in e)return(0,C.TJ)(R.n,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:J}}})],W.prototype,"source",null),(0,s._)([(0,v.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,v.Cb)({value:null,json:{type:[C.z8],write:{target:"subLayerIds",allowNull:!0,overridePolicy:J}}})],W.prototype,"sublayers",null),(0,s._)([(0,S.p)("sublayers")],W.prototype,"castSublayers",null),(0,s._)([(0,I.c)("sublayers")],W.prototype,"writeSublayers",null),(0,s._)([(0,v.Cb)({type:String,json:{name:"name",write:{overridePolicy:U}}})],W.prototype,"title",void 0),(0,s._)([(0,v.Cb)({type:String})],W.prototype,"typeIdField",void 0),(0,s._)([(0,v.Cb)({json:{read:!1},readOnly:!0,value:"sublayer"})],W.prototype,"type",void 0),(0,s._)([(0,w.r)("typeIdField",["layerDefinition.typeIdField"])],W.prototype,"readTypeIdField",null),(0,s._)([(0,v.Cb)({type:[E.Z],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],W.prototype,"types",void 0),(0,s._)([(0,v.Cb)({type:String,json:{name:"layerUrl",write:{overridePolicy:B}}})],W.prototype,"url",null),(0,s._)([(0,v.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:J}}})],W.prototype,"visible",null),(0,s._)([(0,I.c)("visible")],W.prototype,"writeVisible",null),W=i=(0,s._)([(0,_.j)("esri.layers.support.Sublayer")],W);const $=W},72729:(e,t,r)=>{r.d(t,{im:()=>C,V5:()=>I}),r(80442);var i,s=r(43697),o=r(22974),n=r(5600),l=(r(75215),r(36030)),a=r(52011),u=r(96674);r(67676);let p=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,n.Cb)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],p);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,l.J)(d)],y.prototype,"type",void 0),y=(0,s._)([(0,a.j)("esri.layers.support.Domain")],y);const c=y;var h;let f=h=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,n.Cb)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=h=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var b;r(92604),r(20102);let g=b=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,s._)([(0,l.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=b=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],g);const v=g;var S;let w=S=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,n.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],w.prototype,"type",void 0),w=S=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],w);const _=w,I={key:"type",base:c,typeMap:{range:w,"coded-value":m,inherited:v}};function C(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},90082:(e,t,r)=>{r.d(t,{V:()=>n,g:()=>o});var i=r(20102),s=r(95330);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),o}async function n(e,t,r,o,n){let l;try{l=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.k_)(n),l}},54275:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),s=r(66677);function o(e,t,r){return!!l(e,t,r)}function n(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function p(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:y(e),attachment:c(e),data:h(e),metadata:f(e),operations:m(e.capabilities,e,t),query:b(e,t),queryRelated:g(e),queryTopFeatures:v(e),editing:S(e)}}function y(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryAnalytics")}}function c(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:p(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function h(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function f(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],n=r?(0,s.Qc)(r):null,l=i.includes(null!=n&&"MapServer"===n.serverType?"data":"query"),a=i.includes("editing")&&!t.datesInUnknownTimezone;let u=a&&i.includes("create"),p=a&&i.includes("delete"),d=a&&i.includes("update");const y=i.includes("changetracking"),c=t.advancedQueryCapabilities;return a&&!(u||p||d)&&(u=p=d=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:a,supportsChangeTracking:y,supportsQuery:l,supportsQueryAnalytics:o(c,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(c,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(c,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:o(t,"supportsAsyncConvert3D",!1)}}function b(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,d=e.currentVersion,y=t?.includes("MapServer"),c=!y||d>=(0,i.Z)("mapserver-pbf-version-support"),h=(0,s.M8)(t),f=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:u(r),supportsCentroid:o(r,"supportsReturningGeometryCentroid",!1),supportsDistance:o(r,"supportsQueryWithDistance",!1),supportsDistinct:o(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(r,"supportsHavingClause",!1),supportsOrderBy:o(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(r,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:o(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:o(l,"allowOthersToQuery",!0),supportsHistoricMoment:o(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:c&&f.has("pbf"),supportsDisjointSpatialRelationship:o(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(r,"supportsQueryWithCacheHint",!1)||p(r,"query"),supportsDefaultSpatialReference:o(r,"supportsDefaultSR",!1),supportsCompactGeometry:h,supportsFullTextSearch:o(r,"supportsFullTextSearch",!1),maxRecordCountFactor:n(e,"maxRecordCountFactor",void 0),maxRecordCount:n(e,"maxRecordCount",void 0),standardMaxRecordCount:n(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:n(e,"tileMaxRecordCount",void 0)}}function g(e){const t=e.advancedQueryCapabilities,r=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:p(t,"queryRelated")}}function v(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryTopFilter")}}function S(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:o(r,"supportsAsyncApplyEdits",!1),zDefault:n(e,"zDefault",void 0)}}},32073:(e,t,r)=>{r.d(t,{FN:()=>o,QV:()=>s,ac:()=>l});var i=r(31263);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r))||e.originIdOf("renderer")>i.s3.SERVICE||e.originIdOf("labelingInfo")>i.s3.SERVICE||e.originIdOf("opacity")>i.s3.SERVICE||e.originIdOf("labelsVisible")>i.s3.SERVICE}))||!n(e,t)}function n(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function l(e){return!!e&&e.some((e=>null!=e.minScale||null!=e.layerDefinition?.minScale))}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),o=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),d=(r(75215),r(71715)),y=r(52011),c=r(30556),h=r(82971),f=r(33955),m=r(1231);const b=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[n.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,d.r)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,c.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,d.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:h.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,c.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,y.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const v=g},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>a,lF:()=>n,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|