@arcgis/core 4.32.0-next.20250105 → 4.32.0-next.20250107
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/AttributeBinsGraphic.js +5 -0
- package/README.md +1 -1
- package/applications/MapViewer/templateUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/000771f8eefcd6af0fda.js +1 -0
- package/assets/esri/core/workers/chunks/{9372d08ba8bf3342c48f.js → 011ccfd3acee83e7dc68.js} +1 -1
- package/assets/esri/core/workers/chunks/03af4a51043677ffcd0f.js +1 -0
- package/assets/esri/core/workers/chunks/{d07da8b63d83af179a2c.js → 05943caacfd28c383810.js} +1 -1
- package/assets/esri/core/workers/chunks/{9f495ad57cdbfa90c5b8.js → 095aeb19e2207c8361ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{67c7bdc0c91a8f803ea8.js → 11cb25dfab7c8467897a.js} +1 -1
- package/assets/esri/core/workers/chunks/{42aa697b4718b75b8cb2.js → 1abeba63bf623a746d5c.js} +2 -2
- package/assets/esri/core/workers/chunks/{42aa697b4718b75b8cb2.js.LICENSE.txt → 1abeba63bf623a746d5c.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{a57cead317eb2fc9afd8.js → 206194cf069ad4bcc3ad.js} +1 -1
- package/assets/esri/core/workers/chunks/{0673d811c496143fc3d4.js → 2779cf112299b612a73a.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd37c9cc720587665fd3.js → 304b88ade7551130ad3a.js} +1 -1
- package/assets/esri/core/workers/chunks/{aedff36d3fec86abb9fb.js → 30a84ddf0384bb52fdbe.js} +1 -1
- package/assets/esri/core/workers/chunks/{367af4aa7e170c8553e3.js → 33a13544b9e5f4f20bce.js} +1 -1
- package/assets/esri/core/workers/chunks/{dce55e7f76adecc055c3.js → 35d9457109d0631a1ca8.js} +1 -1
- package/assets/esri/core/workers/chunks/{00c0fbe19c12691cf2c3.js → 368a36be515e60e35154.js} +1 -1
- package/assets/esri/core/workers/chunks/{3a90163b76b0bc7f21d2.js → 3767defbd9c4b2e86886.js} +1 -1
- package/assets/esri/core/workers/chunks/3a3e9701e5d7b05f41b7.js +1 -0
- package/assets/esri/core/workers/chunks/{9a498f2c007f4d78d4dd.js → 4234539a9721104acafb.js} +1 -1
- package/assets/esri/core/workers/chunks/{76fa5c7c87831ad25cde.js → 435c037ccba71f1e22d3.js} +1 -1
- package/assets/esri/core/workers/chunks/4387c47ae1b36d770f1d.js +1 -0
- package/assets/esri/core/workers/chunks/{88c68881cbdf4e911832.js → 4423aac6e44c3dbf184e.js} +1 -1
- package/assets/esri/core/workers/chunks/44ec3c77339b9765aaa4.js +1 -0
- package/assets/esri/core/workers/chunks/4b77c8d994498899631a.js +1 -0
- package/assets/esri/core/workers/chunks/62f8949a2d9076f3c1ea.js +2 -0
- package/assets/esri/core/workers/chunks/{c8cd6ba5600d8ff8db0b.js.LICENSE.txt → 62f8949a2d9076f3c1ea.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{664aa401887b59abd7b7.js → 6400f39a965900f66ce7.js} +1 -1
- package/assets/esri/core/workers/chunks/{ddce265c46e4dfeb6c6d.js → 66d40a486aa3caa76106.js} +1 -1
- package/assets/esri/core/workers/chunks/6b3ee691646fbc39445c.js +1 -0
- package/assets/esri/core/workers/chunks/{533a7fd64b17bb294545.js → 6c58f792e2ae3736f662.js} +1 -1
- package/assets/esri/core/workers/chunks/{370b230fd2d7703d0698.js → 6efb36bc2205203ff44d.js} +2 -2
- package/assets/esri/core/workers/chunks/{370b230fd2d7703d0698.js.LICENSE.txt → 6efb36bc2205203ff44d.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{a90611cdc86190799560.js → 7a43fda8984549a084b8.js} +1 -1
- package/assets/esri/core/workers/chunks/7b753da3b8a6d75abf20.js +1 -0
- package/assets/esri/core/workers/chunks/{9b020c47ca9ff5de9bb8.js → 7db356976198c4df76c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c56698cf1c669371865.js → 81816410cb1453938593.js} +1 -1
- package/assets/esri/core/workers/chunks/{4ffaa2c5ab47a599ee9f.js → 82266ca8002554198208.js} +1 -1
- package/assets/esri/core/workers/chunks/{f19d3c855f6e93544918.js → 8be0151a24c9af76a976.js} +1 -1
- package/assets/esri/core/workers/chunks/{d9e396adf3354ee68339.js → 8f2b2d2dc9935b0d2039.js} +1 -1
- package/assets/esri/core/workers/chunks/907a91266e25cc4b9d42.js +1 -0
- package/assets/esri/core/workers/chunks/{a77aa86896bbb0e088df.js → 9857491cafa0278d9ae6.js} +1 -1
- package/assets/esri/core/workers/chunks/{993db7646a8fc60179eb.js → 98da074899c82f0ded0b.js} +1 -1
- package/assets/esri/core/workers/chunks/{3bb94da29dac3367ecc6.js → a1edd3f68e691ea39594.js} +1 -1
- package/assets/esri/core/workers/chunks/b07710e01494a6cda097.js +1 -0
- package/assets/esri/core/workers/chunks/{6a4305eb1e52b80ecb5c.js → b8ea84adff5619040494.js} +3 -3
- package/assets/esri/core/workers/chunks/{005727711cca0614c2ab.js → c05e0bd145a1c27d6857.js} +2 -2
- package/assets/esri/core/workers/chunks/{005727711cca0614c2ab.js.LICENSE.txt → c05e0bd145a1c27d6857.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/c4374b6bc5c8dc6435c7.js +1 -0
- package/assets/esri/core/workers/chunks/c49707b577f3805f0142.js +1 -0
- package/assets/esri/core/workers/chunks/c5a928dcff7dc8a8cc9f.js +2 -0
- package/assets/esri/core/workers/chunks/{f4e3db71d1adae717535.js.LICENSE.txt → c5a928dcff7dc8a8cc9f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/cac79b64a7dade8bf486.js +2 -0
- package/assets/esri/core/workers/chunks/{bf0a0ca7fdac98f06a89.js.LICENSE.txt → cac79b64a7dade8bf486.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{2cccaf50134c65944e0a.js → d0876eed5249b029f9f0.js} +1 -1
- package/assets/esri/core/workers/chunks/{178f606c8896ae5f39de.js → d1dbbab4a4c6072c182f.js} +1 -1
- package/assets/esri/core/workers/chunks/{8e42fb623f56942958d8.js → d74b5dc60f02892d03e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{9ad7d095e614e7e8d7f5.js → dca0eb66116e4b5403fc.js} +1 -1
- package/assets/esri/core/workers/chunks/e27b8674a3492db51f2e.js +1 -0
- package/assets/esri/core/workers/chunks/{756c2f7c8659deab6c96.js → e2d987c39a6ef318511c.js} +2 -2
- package/assets/esri/core/workers/chunks/{756c2f7c8659deab6c96.js.LICENSE.txt → e2d987c39a6ef318511c.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{943428cf643e87ccfaad.js → e7e26b71f9eb28421936.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0adabf6d71a27f3183b.js → e80b0646a7e0e466ea65.js} +1 -1
- package/assets/esri/core/workers/chunks/e9c21907fabcedbd32ae.js +1 -0
- package/assets/esri/core/workers/chunks/{f9af0473878d960a02f2.js → f6d6bc43ac1c13892d44.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ed7c8138231de3a3b96.js → f8c960df1dabab120c70.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdd8a5eb07466541f1f9.js → fd95b19f02d8dfef2baf.js} +1 -1
- package/assets/esri/widgets/support/GridControls/t9n/GridControls_ja.json +1 -1
- package/chunks/bufferOperator.js +1 -1
- package/chunks/geodesicBufferOperator.js +1 -1
- package/chunks/terrainUtilsPlanar.js +1 -1
- package/chunks/terrainUtilsSpherical.js +1 -1
- package/core/MemCachePool.js +1 -1
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/interfaces.d.ts +101 -5
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/data/queryValidationUtils.js +1 -1
- package/layers/graphics/sources/WFSSource.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +2 -2
- package/renderers/RasterStretchRenderer.js +1 -1
- package/rest/query/executeAttributeBinsQuery.js +1 -1
- package/rest/support/AttributeBinsFeatureSet.js +5 -0
- package/rest/support/AttributeBinsQuery.js +1 -1
- package/rest/support/BinParametersAttributes.js +1 -1
- package/rest/support/BinParametersBase.js +1 -1
- package/rest/support/DateBinParameters.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/NormalizationBinParametersMixin.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/TopFeaturesQuery.js +1 -1
- package/smartMapping/renderers/dotDensity.js +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/BitmapContainer.js +1 -1
- package/views/2d/engine/BitmapTileContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/input/handlers/DragPan.js +1 -1
- package/views/2d/input/handlers/DragRotate.js +1 -1
- package/views/2d/input/handlers/MouseWheelZoom.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/DragRotate.js +1 -1
- package/views/3d/input/handlers/DragZoom.js +1 -1
- package/views/3d/input/handlers/MouseWheelZoom.js +1 -1
- package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/GroupLayerView3D.js +5 -0
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/terrainUtilsPlanar.js +1 -1
- package/views/3d/terrain/terrainUtilsSpherical.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +4 -4
- package/views/View2D.js +1 -1
- package/views/draw/support/HighlightHelper.js +1 -1
- package/views/input/handlers/support.js +1 -1
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/navigation/Navigation.js +1 -1
- package/views/navigation/NavigationActionMap.d.ts +4 -0
- package/views/navigation/NavigationActionMap.js +5 -0
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/textureUtils.js +5 -0
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/support/tableUtils.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/assets/esri/core/workers/chunks/0a3bf1b74cce1b6b7ed8.js +0 -1
- package/assets/esri/core/workers/chunks/0d2411a941c42acb8cc2.js +0 -1
- package/assets/esri/core/workers/chunks/13720b1d97fb7d80e972.js +0 -1
- package/assets/esri/core/workers/chunks/14b87f3dd9942e6b19d0.js +0 -1
- package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +0 -1
- package/assets/esri/core/workers/chunks/1a713cc601c6fcd97d2f.js +0 -1
- package/assets/esri/core/workers/chunks/3029354194f1a3030c5c.js +0 -1
- package/assets/esri/core/workers/chunks/318a39b56851e707edad.js +0 -1
- package/assets/esri/core/workers/chunks/53cd990b2c988518de6d.js +0 -1
- package/assets/esri/core/workers/chunks/5a0eb9dfe668cf290462.js +0 -1
- package/assets/esri/core/workers/chunks/9f0ebeae8a3ba360284b.js +0 -1
- package/assets/esri/core/workers/chunks/a3cef3837f4df9ab022e.js +0 -1
- package/assets/esri/core/workers/chunks/bf0a0ca7fdac98f06a89.js +0 -2
- package/assets/esri/core/workers/chunks/c8cd6ba5600d8ff8db0b.js +0 -2
- package/assets/esri/core/workers/chunks/ea250d66089967976c05.js +0 -1
- package/assets/esri/core/workers/chunks/ecf317c6c790b3cc83bf.js +0 -1
- package/assets/esri/core/workers/chunks/f4e3db71d1adae717535.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1469],{13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>s,vD:()=>n,yS:()=>o});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 o(){return`{${s().toUpperCase()}}`}function n(){return`{${s()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var i=r(90237),s=(r(59456),r(13874)),o=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),n=r(92071),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),p=r(50498),u=r(4146),d=r(49186),c=r(92474),y=r(799),m=r(75321),h=r(4071),f=r(22671),g=r(16930);let v=class extends c.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:s,customParameters:o,effectiveMaxRecordCount:n}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:n,queryParameters:{apiKey:s,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,m.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,y.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCurrentUser:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:h.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??m.QE,r=(0,m.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[m.QE],s=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return s.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:s,customParameters:o,fields:n,geometryType:l,hasZ:a,objectIdField:u,timeInfo:c,url:h}=e,f={fields:n?.map((e=>e.toJSON())),geometryType:p.Y.toJSON(l),hasZ:a??!1,objectIdField:u,timeInfo:c?.toJSON()},g={apiKey:i,customParameters:o,signal:r},v=await(0,m.Ki)(h,g),[w,_]=await Promise.all([(0,m.Px)(v,g),(0,m.bV)(v,g)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new d.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const M=_.collections.find((({id:e})=>e===s));if(!M)throw new d.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const x=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,m.GA)(v,g):null,I=await(0,m.GL)(M,f,g),T=this._getMaxRecordCount(x),S=this._getCapabilities(I.hasZ,T),A=this._getStorageSpatialReference(M).toJSON(),F=this._getSupportedSpatialReferences(M,_),Z=new RegExp(`^${(0,y.Cj)(m.vJ)}`,"i"),b={};for(const e of F){const t=(0,m.J0)(e);null!=t&&(b[t]||(b[t]=e.replace(Z,"")))}this.featureDefinition={capabilities:S,collection:M,layerDefinition:I,spatialReference:A,supportedCrs:b}}};(0,i._)([(0,l.MZ)()],v.prototype,"featureDefinition",void 0),(0,i._)([(0,l.MZ)({constructOnly:!0})],v.prototype,"layer",void 0),(0,i._)([(0,l.MZ)()],v.prototype,"type",void 0),v=(0,i._)([(0,a.$)("esri.layers.graphics.sources.OGCFeatureSource")],v);var w=r(52136),_=r(63074),M=r(69208),x=r(87718),I=r(76294),T=r(16131),S=r(32756),A=r(8303),F=r(54310),Z=r(25036),b=r(82935),E=r(10873),P=r(33143),R=r(20437),O=r(17036),j=r(30524),C=r(81457),U=r(39383),D=r(61956),N=r(30291),G=r(5443);const B=(0,O.p)();let $=class extends((0,w.p)((0,M.d)((0,I.J)((0,x.F)((0,_.dM)((0,S.fY)((0,b.e)((0,Z.j)((0,T.q)((0,A.A)((0,F.J)((0,n.P)(u.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new v({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,j.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,N.tn)(this,e)}createQuery(){return new D.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const s=t?.feature?.attributes,o=this.typeIdField&&s?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(D.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,j.yp)(this.renderer,this.fieldsIndex),(0,j.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],$.prototype,"capabilities",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],$.prototype,"collectionId",void 0),(0,i._)([(0,l.MZ)({type:String})],$.prototype,"copyright",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],$.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],$.prototype,"description",void 0),(0,i._)([(0,l.MZ)({type:String})],$.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)({type:Number})],$.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,l.MZ)(E.Yj)],$.prototype,"elevationInfo",void 0),(0,i._)([(0,l.MZ)({type:[R.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],$.prototype,"fields",void 0),(0,i._)([(0,l.MZ)(B.fieldsIndex)],$.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.MZ)({readOnly:!0,type:G.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],$.prototype,"fullExtent",void 0),(0,i._)([(0,l.MZ)({type:p.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.g.read}}}}})],$.prototype,"geometryType",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],$.prototype,"hasZ",void 0),(0,i._)([(0,l.MZ)({type:Boolean,readOnly:!0})],$.prototype,"isTable",null),(0,i._)([(0,l.MZ)({type:[C.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}}}})],$.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)(E.kF)],$.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)(E.fV)],$.prototype,"legendEnabled",void 0),(0,i._)([(0,l.MZ)({type:Number})],$.prototype,"maxRecordCount",void 0),(0,i._)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],$.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)({type:["OGCFeatureLayer"]})],$.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.MZ)(E.M6)],$.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],$.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({types:o.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],$.prototype,"renderer",null),(0,i._)([(0,l.MZ)(E.PY)],$.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],$.prototype,"source",void 0),(0,i._)([(0,l.MZ)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],$.prototype,"spatialReference",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],$.prototype,"title",void 0),(0,i._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],$.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:String,readOnly:!0})],$.prototype,"typeIdField",void 0),(0,i._)([(0,l.MZ)({type:[P.A]})],$.prototype,"types",void 0),(0,i._)([(0,l.MZ)(E.OZ)],$.prototype,"url",void 0),$=(0,i._)([(0,a.$)("esri.layers.OGCFeatureLayer")],$);const L=$},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1}},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));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.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var i=r(90237),s=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new l.A;return s.read(i,r),[s]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const o=e.find((e=>!!e.field));o&&(0,s.sM)(r,[o.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(90237),s=r(92602),o=r(70333),n=r(78888),l=r(60999),a=r(49186),p=r(53966),u=r(97768),d=r(74887),c=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),_=r(41318),M=r(10407);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.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(1204).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.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,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let n,l;if(s)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,p=!1,u=!1;if(!l)return{features:{edit:a,fullEdit:p},content:{updateItem:u}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:p},content:{updateItem:u}}}_getUserPrivileges(e,t){const r=(0,M.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.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=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const a=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?_.A.fromJSON(u.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.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>m});var i=r(90237),s=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),n=r(40608),l=r(89317),a=r(30524),p=r(96184),u=r(73133),d=r(79677),c=r(10184);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},m=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=u.j.fromJSON(r.timeOffsetUnits);return i&&s?new c.A({value:i,unit:s}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.MZ)(y)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.TemporalLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(69540),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new o.J({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(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,a.$)("esri.layers.support.FeatureTemplate")],u);const d=u},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),s=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(80451),d=r(29005);let c=class extends(s.A.ClonableMixin(o.A)){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.rS)(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.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],c);const y=c},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,s=r(90237),o=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new o.J({asc:"ascending",desc:"descending"});let u=i=class extends n.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,s._)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=i=(0,s._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const d=u},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(90237),s=r(69540),o=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(79677),d=r(10184),c=r(56400);function y(e,t){return d.A.fromJSON({value:e,unit:t})}let m=class extends(s.A.ClonableMixin(o.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,i._)([(0,n.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,i._)([(0,n.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,i._)([(0,l.w)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.K)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,i._)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,i._)([(0,n.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,i._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,i._)([(0,p.K)("interval")],m.prototype,"writeInterval",null),(0,i._)([(0,n.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,i._)([(0,n.MZ)((0,c.P6)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,i._)([(0,n.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),(0,i._)([(0,n.MZ)({type:[Date],json:{read:!1}})],m.prototype,"stops",void 0),m=(0,i._)([(0,a.$)("esri.layers.support.TimeInfo")],m);const h=m},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),s=r(53966),o=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,s=r(90237),o=r(59456),n=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),m=r(16930),h=r(65864),f=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.A{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.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.A.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,p=o.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[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 g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)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.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=m.A.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.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let 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 p=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),l,a);for(const{geometry:e}of t)null!=e&&p&&p(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,h.Bi)(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,h.Bi)(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,h.Bi)(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,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,s._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,s._)([(0,y.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:m.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s._)([(0,y.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v},10184:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),s=r(69540),o=r(25482),n=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),p=r(40608),u=r(73133);let d=class extends(s.A.ClonableMixin(o.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(u.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i._)([(0,p.$)("esri.time.TimeInterval")],d);const c=d}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5242],{13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>o,vD:()=>n,yS:()=>s});const i="randomUUID"in crypto;function o(){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 s(){return`{${o().toUpperCase()}}`}function n(){return`{${o()}}`}function l(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$});var i=r(90237),o=(r(59456),r(13874)),s=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),n=r(92071),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),p=r(50498),u=r(4146),d=r(49186),c=r(92474),y=r(799),m=r(75321),h=r(4071),f=r(22671),g=r(16930);let v=class extends c.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:o,customParameters:s,effectiveMaxRecordCount:n}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:n,queryParameters:{apiKey:o,customParameters:s},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,m.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,y.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCurrentUser:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:h.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??m.QE,r=(0,m.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[m.QE],o=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,s=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return o.filter((e=>!s.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:o,customParameters:s,fields:n,geometryType:l,hasZ:a,objectIdField:u,timeInfo:c,url:h}=e,f={fields:n?.map((e=>e.toJSON())),geometryType:p.Y.toJSON(l),hasZ:a??!1,objectIdField:u,timeInfo:c?.toJSON()},g={apiKey:i,customParameters:s,signal:r},v=await(0,m.Ki)(h,g),[w,_]=await Promise.all([(0,m.Px)(v,g),(0,m.bV)(v,g)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new d.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const M=_.collections.find((({id:e})=>e===o));if(!M)throw new d.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const x=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,m.GA)(v,g):null,T=await(0,m.GL)(M,f,g),I=this._getMaxRecordCount(x),S=this._getCapabilities(T.hasZ,I),F=this._getStorageSpatialReference(M).toJSON(),A=this._getSupportedSpatialReferences(M,_),Z=new RegExp(`^${(0,y.Cj)(m.vJ)}`,"i"),b={};for(const e of A){const t=(0,m.J0)(e);null!=t&&(b[t]||(b[t]=e.replace(Z,"")))}this.featureDefinition={capabilities:S,collection:M,layerDefinition:T,spatialReference:F,supportedCrs:b}}};(0,i._)([(0,l.MZ)()],v.prototype,"featureDefinition",void 0),(0,i._)([(0,l.MZ)({constructOnly:!0})],v.prototype,"layer",void 0),(0,i._)([(0,l.MZ)()],v.prototype,"type",void 0),v=(0,i._)([(0,a.$)("esri.layers.graphics.sources.OGCFeatureSource")],v);var w=r(52136),_=r(63074),M=r(69208),x=r(87718),T=r(76294),I=r(16131),S=r(32756),F=r(8303),A=r(54310),Z=r(25036),b=r(82935),P=r(10873),E=r(33143),R=r(20437),O=r(17036),j=r(30524),C=r(81457),U=r(39383),D=r(61956),z=r(30291),N=r(5443);const G=(0,O.p)();let B=class extends((0,w.p)((0,M.d)((0,T.J)((0,x.F)((0,_.dM)((0,S.fY)((0,b.e)((0,Z.j)((0,I.q)((0,F.A)((0,A.J)((0,n.P)(u.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new v({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,j.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,z.tn)(this,e)}createQuery(){return new D.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const o=t?.feature?.attributes,s=this.typeIdField&&o?.[this.typeIdField];return null!=s&&this.types&&(i=this.types.some((t=>t.id==s&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(D.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,j.yp)(this.renderer,this.fieldsIndex),(0,j.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],B.prototype,"capabilities",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:!0}})],B.prototype,"collectionId",void 0),(0,i._)([(0,l.MZ)({type:String})],B.prototype,"copyright",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],B.prototype,"description",void 0),(0,i._)([(0,l.MZ)({type:String})],B.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)({type:Number})],B.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,l.MZ)(P.Yj)],B.prototype,"elevationInfo",void 0),(0,i._)([(0,l.MZ)({type:[R.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],B.prototype,"fields",void 0),(0,i._)([(0,l.MZ)(G.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.MZ)({readOnly:!0,type:N.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],B.prototype,"fullExtent",void 0),(0,i._)([(0,l.MZ)({type:p.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.g.read}}}}})],B.prototype,"geometryType",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],B.prototype,"hasZ",void 0),(0,i._)([(0,l.MZ)({type:Boolean,readOnly:!0})],B.prototype,"isTable",null),(0,i._)([(0,l.MZ)({type:[C.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.w},write:!0}}}})],B.prototype,"labelingInfo",void 0),(0,i._)([(0,l.MZ)(P.kF)],B.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)(P.fV)],B.prototype,"legendEnabled",void 0),(0,i._)([(0,l.MZ)({type:Number})],B.prototype,"maxRecordCount",void 0),(0,i._)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],B.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)({type:["OGCFeatureLayer"]})],B.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.MZ)(P.M6)],B.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({types:s.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:s.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],B.prototype,"renderer",null),(0,i._)([(0,l.MZ)(P.PY)],B.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],B.prototype,"source",void 0),(0,i._)([(0,l.MZ)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],B.prototype,"spatialReference",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],B.prototype,"title",void 0),(0,i._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:String,readOnly:!0})],B.prototype,"typeIdField",void 0),(0,i._)([(0,l.MZ)({type:[E.A]})],B.prototype,"types",void 0),(0,i._)([(0,l.MZ)(P.OZ)],B.prototype,"url",void 0),B=(0,i._)([(0,a.$)("esri.layers.OGCFeatureLayer")],B);const $=B},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1}},52136:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));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,o.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>n});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>p});var i=r(90237),o=r(93637),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const o=new l.A;return o.read(i,r),[o]}const p={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.sM)(r,[s.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,s.MZ)(p)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(90237),o=r(92602),s=r(70333),n=r(78888),l=r(60999),a=r(49186),p=r(53966),u=r(97768),d=r(74887),c=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),_=r(41318),M=r(10407);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.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(1204).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,i);let n,l;if(o)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,p=!1,u=!1;if(!l)return{features:{edit:a,fullEdit:p},content:{updateItem:u}};try{if(o?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:p},content:{updateItem:u}}}_getUserPrivileges(e,t){const r=(0,M.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.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=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,c.S8)(o.restUrl)===(0,c.S8)(i))return o.user;const a=`${i}/community/self`,p=null!=e?e.signal:null,u=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return u.ok?_.A.fromJSON(u.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.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>m});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),n=r(40608),l=r(89317),a=r(30524),p=r(96184),u=r(73133),d=r(79677),c=r(10184);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},m=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,o=u.j.fromJSON(r.timeOffsetUnits);return i&&o?new c.A({value:i,unit:o}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,o.MZ)({type:d.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,o.MZ)({type:c.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,o.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,o.MZ)(y)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.TemporalLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),o=r(69540),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new s.J({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(o.A.ClonableMixin(n.A)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,l.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,a.$)("esri.layers.support.FeatureTemplate")],u);const d=u},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),o=r(69540),s=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(80451),d=r(29005);let c=class extends(o.A.ClonableMixin(s.A)){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.rS)(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.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],c);const y=c},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,o=r(90237),s=r(66552),n=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const p=new s.J({asc:"ascending",desc:"descending"});let u=i=class extends n.A{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,o._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,o._)([(0,l.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],u.prototype,"order",void 0),u=i=(0,o._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const d=u},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(90237),o=r(69540),s=r(25482),n=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),p=r(43937),u=r(79677),d=r(10184),c=r(56400);function y(e,t){return d.A.fromJSON({value:e,unit:t})}let m=class extends(o.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?u.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,i._)([(0,n.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,i._)([(0,n.MZ)({type:u.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,i._)([(0,l.w)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.K)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,i._)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,i._)([(0,n.MZ)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,i._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,i._)([(0,p.K)("interval")],m.prototype,"writeInterval",null),(0,i._)([(0,n.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,i._)([(0,n.MZ)((0,c.P6)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,i._)([(0,n.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),(0,i._)([(0,n.MZ)({type:[Date],json:{read:!1}})],m.prototype,"stops",void 0),m=(0,i._)([(0,a.$)("esri.layers.support.TimeInfo")],m);const h=m},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),o=r(53966),s=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");o.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||o.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,o=r(90237),s=r(59456),n=r(52106),l=r(66552),a=r(25482),p=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),m=r(16930),h=r(65864),f=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}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.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=m.A.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.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let 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,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.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:[s,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 p=this._getHydrationFunction(e,(e=>e*s+i),(e=>o-e*n),l,a);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=m.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=r.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(const e in p){const t=p[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o;const s=[];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===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(l[0]),o=r(l[1]),s.push([i,o])}return s.length>0?s: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.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,h.Bi)(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 s=(0,h.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=r(l)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[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=s.length;e<t;e++){const t=s[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=s.length;e<t;e++){const t=s[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 s=e.points;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[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&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,y.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.MZ)({types:s.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.MZ)({type:m.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,y.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>p});var i=r(90237),o=r(66552),s=r(53966),n=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const p=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",d="field",c=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&u||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,l.e)(p,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},10184:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),o=r(69540),s=r(25482),n=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),p=r(40608),u=r(73133);let d=class extends(o.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(u.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i._)([(0,p.$)("esri.time.TimeInterval")],d);const c=d}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7339],{11006:(e,t,s)=>{function i(e,t,s,i,a){r(e,t,s||0,i||e.length-1,a||n)}function r(e,t,s,i,n){for(;i>s;){if(i-s>600){var o=i-s+1,l=t-s+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(s,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),n)}var d=e[t],p=s,m=i;for(a(e,s,t),n(e[i],d)>0&&a(e,s,i);p<m;){for(a(e,p,m),p++,m--;n(e[p],d)<0;)p++;for(;n(e[m],d)>0;)m--}0===n(e[s],d)?a(e,s,m):a(e,++m,i),m<=t&&(s=m+1),t<=m&&(i=m-1)}}function a(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function n(e,t){return e<t?-1:e>t?1:0}s.d(t,{q:()=>i})},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),a=s(95488);class n{constructor(e,t){this._observable=new a.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new n(e,t)}},7320:(e,t,s)=>{s.d(t,{g:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),a=e.hasZ(t),n=e.hasM(t);return a&&(i.z=e.getPointZ(t)),n&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),a=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);a.zmin=s.vmin,a.zmax=s.vmax}if(r){const s=e.getMExtent(t);a.mmin=s.vmin,a.mmax=s.vmax}return a}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class a{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class n{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},19730:(e,t,s)=>{s.d(t,{do:()=>N,ux:()=>C});var i=s(4576),r=s(49186),a=(s(44208),s(25482)),n=s(4718),o=s(97768),l=s(74887),u=s(83047),c=s(57251),h=s(70328),d=s(19419),p=s(537),m=s(65864),f=s(21325),y=s(90708),g=s(95538),_=s(51441),x=s(31464);class T{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[s,i]of this._storage){if(!(i.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(s)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new v(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let I=0;class v{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var E=s(99352),S=s(8384),R=s(58727),F=s(62798),w=s(62660),A=s(86420),b=s(95466),M=s(63076);class N{constructor(e){this._changeHandle=null,this.capabilities={query:E.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new T,this.timeInfo=e.timeInfo,this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=a.A.isSerializable(e.fieldsIndex)?e.fieldsIndex:b.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(t){if(t!==R.v8)throw t;return new S.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(e){if(e!==R.v8)throw e;return 0}}async executeQueryForExtent(e,t){const s=(0,l.Mq)(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===R.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(e){if(e===R.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const s=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(t){if(t!==R.v8)throw t;return new S.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=(0,l.Mq)(t);let i;e=(0,n.o8)(e);try{e=await this.schedule((()=>(0,R.iJ)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,F.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(t){if(t!==R.v8)throw t;i=new S.G([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=(0,l.Mq)(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=(0,l.Mq)(s),{field:r,field2:a,field3:n,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:a,field3:n,valueExpression:o},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=(0,l.Mq)(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=(0,l.Mq)(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,A.W)(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=(0,h.hZ)((0,h.vt)(),h.qv);await this.featureStore.forEachBounds(e,(e=>(0,h.RF)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,_.ag)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const a=(0,x.Cv)(r,t,s);if(a.spatialReference=(0,_.ag)(s),a.xmax-a.xmin==0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(M.Bb)}async reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(M.Bb)}async _getAllFeaturesQueryEngineResult(e){return new S.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?(0,n.zI)(t.slice()):this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,n.o8)(e),e=await this.schedule((()=>(0,R.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,F.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,o=null==a||(0,f.aI)(a,n.spatialReference)?n:(0,x.Cv)(n,a);if(!o)return null;const l=i||r,u=(0,f.fn)(s)&&!(0,f.aI)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(C(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,w.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),a=await this.runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new S.G(a,e,this)}),t);return u(r)}if(!h.length)return new S.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new S.G(h,e,this));const d=await(0,w.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new S.G(p,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:a,returnGeometry:n,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new S.G(u,e,this);const c=(0,f.fn)(a)&&!(0,f.aI)(this.spatialReference,a),h=n||o,d=async e=>(c&&h&&await this._project(e,a),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,f.aI)(p,r.spatialReference)?r:(0,x.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const y=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(C(r))),s);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of g)i.add(y.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),s),a=await this.reschedule((async()=>{const t=await(0,w.xt)(_,m,this.geometryType,this.hasZ,this.hasM),a=await this.runSpatialFilter(r,(e=>!i.has(y.getObjectId(e))||t(y.getGeometry(e))),s);return new S.G(a,e,this)}),s);return d(a)}if(null!=t){const e=new i.vW;g=g.filter((s=>(0,i.qh)(t.items,s,t.items.length,e)>=0))}if(!g.length){const t=new S.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new S.G(g,e,this));const T=await(0,w.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>T(y.getGeometry(e))),s);return d(new S.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,A.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,g.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this.reschedule((e=>a(e)),s)}};return this.reschedule((e=>a(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,a=new Map,n=this.featureAdapter.getAttribute;for(const s of e.items){const e=n(s,t),i=n(s,r),o=a.get(e);(!o||i>n(o,r))&&a.set(e,s)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:a,resultType:n,cacheHint:o}=e;if("tile"!==n&&!o)return null;const l=i||r;return(0,f.fn)(a)&&!(0,f.aI)(this.spatialReference,a)&&l?JSON.stringify([t,s,a]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,w.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,f.aI)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,c.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,x.lK)(e.items.map((e=>(0,_.pL)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=(0,n.zI)(r.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,y.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,n.o8)(e);try{e=await this.schedule((()=>(0,R.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,F.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(t){if(t!==R.v8)throw t;return new S.G([],e,this)}}get test(){}}function C(e){if((0,w.tC)(e)){if((0,m.ZC)(e))return[(0,d.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map((e=>(0,d.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,p.Rg)((0,d.vt)(),e)]}},99352:(e,t,s)=>{s.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1}},8384:(e,t,s)=>{s.d(t,{G:()=>R});var i=s(4718),r=s(88930),a=s(12359),n=s(90634),o=s(62577),l=s(21325),u=s(95538),c=s(51441),h=s(30524),d=s(50201),p=s(1873),m=s(71386);class f{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,u.Wq)(t),r=this.fieldsIndex.get(i),a=r?null:(0,u.j4)(i,s),n=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:n,clause:a})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,a=this.fieldsIndex.get(t.field),n=(0,h.zD)(a)||(0,h.Ah)(a),o=(0,h.OH)(a);return e.map((e=>{let a=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(a=`${(0,p.gJ)(a)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(a=`${a}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof a&&s&&(n?a=a?new Date(a).getTime():null:o&&(a=a?(0,d.rb)(a):null)),i&&Number.isFinite(a)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;a=(0,p.zS)(a,i,s,r)}return a}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:a}=await(0,m.lw)(),n=a.hasGeometryOperations(t);n&&await a.enableGeometryOperations();const o=a.createFunction(t),l=a.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:n?{...(0,c.pL)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},h=a.createExecContext(t,l,r);return a.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var y=s(31464),g=s(58727);function _(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function x(e,t,s,i,r,a=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:a}}var T=s(5834),I=s(59977),v=s(11440),E=s(60909);const S="bin";class R{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const a=new Map,n=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!n.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,a);s.push(t)}n.set(l,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=n.get(l);for(const t in u){const{data:i,items:r}=u[t],a=i.join(",");s&&!e.validateItems(r,s)||o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=w(this.hasZ,this.hasM),{point:r,mode:a}=e,n="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType,h=this._getPointCreator(a,this.spatialReference,t),d=new A(null,0),p=new A(null,0),m={x:0,y:0,z:0};for(const t of this.items){const a=s.getGeometry(t);if(null==a)continue;const{coords:f}=a,y=a.isPoint?b:a.lengths;if(d.coords=f,p.coords=f,e.returnEdge){let e=0;for(let a=0;a<y.length;a++){const c=y[a],f=e;for(let a=0;a<c;a++,e+=i){if(!u&&a===c-1)continue;const y=d;y.coordsIndex=e;const g=p;g.coordsIndex=a===c-1?f:e+i;const _=m;if(!F(m,r,y,g))continue;const T=(r.x-_.x)/n,I=(r.y-_.y)/o,v=T*T+I*I;v<=1&&l.candidates.push(x(s.getObjectId(t),h(_),Math.sqrt(v),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let a=0;a<y.length;a++){const c=y[a],m=e,f=p;f.coordsIndex=m;for(let a=0;a<c;a++,e+=i){const i=d;if(i.coordsIndex=e,u&&a===c-1&&i.x===f.x&&i.y===f.y)continue;const p=(r.x-i.x)/n,m=(r.y-i.y)/o,y=p*p+m*m;y<=1&&l.candidates.push(_(s.getObjectId(t),h(i),Math.sqrt(y)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const a=[];for(let t=0;t<y.length;t++){a.push(e);const s=y[t];e+=s*i,!u&&s>1&&a.push(e-i)}for(const e of a){const i=d;i.coordsIndex=e;const a=(r.x-i.x)/n,u=(r.y-i.y)/o,c=a*a+u*u;c<=1&&l.candidates.push(_(s.getObjectId(t),h(i),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,l.aI)(t,s)?e=>e:e=>(0,y.Cv)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:i,minValue:n,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:n,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:a,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:a,timeZone:n},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,n)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const t=i.split(" "),r=t[0],a=this.fieldsIndex.get(r),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(a?.type,n);e.sort(((e,t)=>{const i=s(e,r,a),n=s(t,r,a);return o(i,n)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:n}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&f,hasZ:r&&m,objectIdFieldName:a,spatialReference:(0,c.ag)(u||n),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const s=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:a,quantizationParameters:n,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=i&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,a,((e,t,i)=>s.getFieldValue(e,t,i))),this.geometryType&&(l||u)){const e=(0,o.VV)(n)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const i of I){const r=this.featureAdapter.getGeometry(i),a={attributes:s.getAttributes(i),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_)};t&&r&&!a.geometry&&(a.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(i,this),e)),x[T++]=a}else if(!l&&u)for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_)}}else for(const e of I){const t=s.getAttributes(e);t&&(x[T++]={attributes:t})}const v=d||0;if(null!=p){const e=v+p;x=x.slice(v,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,s=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{const t=w(this.hasZ,this.hasM),s=this.featureAdapter;e=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/t>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],r=new Map,a=new Map,n=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,v=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!n.has(f)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,r);e.push(i)}n.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=n.get(f);if(!e)continue;const s=Object.keys(e);for(const i of s){const{count:s,data:a,items:n,itemPositions:h}=e[i],p=a.join(",");if(!d||l.validateItems(n,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(m,n);e.aggregateGeometries[s]=t}else{let i=null;if(v)i=s;else{const e=this._getAttributeValues(l,f,t,r),s=h.map((t=>e[t]));i=T&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,null,l.returnDistinctValues)}e.attributes[u]=i}let i=0;c.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++i]=a[s])),o.set(p,e)}}}else if(I){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(m,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,f,t,r);s.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,a,l.returnDistinctValues)}const E="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;i.push({name:u,alias:u,type:E||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[s];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:i,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(9930),s.e(3656)]).then(s.bind(s,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=i(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,n.v)(y):(0,n.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,a.l8)(y):(0,a.Z4)((0,n.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:a}=e;let n=null;return n=s?.has(r)?s.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:i}):(0,p.G_)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,n),n["var"===a?"variance":a]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:a,orderBy:n}=i,o=this.fieldsIndex.get(s);return(0,p.qg)(t,{value:a,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const r=this.fieldsIndex.get(t),a=s.map((s=>e.getFieldValue(s,t,r)));return i.set(t,a),a}_calculateUniqueValues(e,t,s){const i={},r=t.length;for(let a=0;a<r;a++){const r=t[a],n=[];for(const t of e)n.push(t[a]);const o=n.join(",");null==i[o]?i[o]={count:1,data:n,items:[r],itemPositions:[a]}:(s||i[o].count++,i[o].items.push(r),i[o].itemPositions.push(a))}return i}async _getDataValues(e,t,s=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:a,scale:n,timeZone:o}=e;return a?r.getExpressionValues(t,a,{viewingMode:"map",scale:n,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,i.o8)(e),s)}async _calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,r=t.min??0,a=t.max??0,n=i.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=s[t];if(null!=o&&o>=r&&o<=a){const e=(0,p.Ak)(i,o);e>-1&&(n[e].count++,n[e].items.push(l))}}return n}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:s,outAlias:i,valueType:r}=t,a=[],n=[{name:i??s,alias:i??s,type:r??"esriFieldTypeString"},{name:S,alias:S,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],((e,t,s)=>o.getFieldValue(e,t,s)));const c=this._getAttributeValues(o,s,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(a.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[i??s]:t}})))),o.fields)for(const e of o.fields)n.some((t=>t.name===e.name))||n.push(e)}return{fields:n,features:a}}async _createBinsResponse(e,t){const s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.A.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(E.A.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,normalizationField:r,numBins:a,normalizationType:n,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),h=(0,p.sU)(c,{field:i,normalizationField:r,normalizationType:n,normalizationTotal:o,numBins:a,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:a,start:n,end:o}=e,l=a.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=a.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},s),m=(0,h.OH)(this.fieldsIndex.get(i)),f=(0,p.sU)(d,{field:i,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(n,m),maxValue:(0,g.dO)(o,m)},!0),y=await this._calculateHistogramBins(d,f,s);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,r=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},s),a=(0,h.OH)(this.fieldsIndex.get(i)),n=e.boundaries.map((e=>(0,g.dO)(e,a))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<n.length-1;e++)o.push([n[e],n[e+1]]);const l={intervals:o,min:n.at(0),max:n.at(-1)},u=await this._calculateHistogramBins(r,l,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:r,start:a,end:n}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),l=(0,h.OH)(this.fieldsIndex.get(i)),u=(0,p.sU)(o,{field:i,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(a,l),maxValue:(0,g.dO)(n,l)},!0),c=await this._calculateHistogramBins(o,u,s);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,r=i||"lowerBoundary",a=s||"upperBoundary",n=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:a,alias:a,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:S,alias:S,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const s of e){const{minValue:e,maxValue:i,items:h}=s,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[a]=i,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[S]=++c,"flat"===t.bin.jsonStyle?n.push(...p.features.map((({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:{...t,[u??e]:e,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>({...t,[u??e]:e}))),n.push(d))):(t.bin?.splitBy&&(d.attributes[S]=++c),p=await this._createStatisticsQueryResponse(t,h,d),n.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&n.reverse(),{fields:o,features:n}}}function F(e,t,s,i){const r=i.x-s.x,a=i.y-s.y,n=t.x-s.x,o=t.y-s.y,l=r*r+a*a;if(0===l)return!1;const u=n*r+o*a,c=Math.min(1,Math.max(0,u/l));return e.x=s.x+r*c,e.y=s.y+a*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},95538:(e,t,s)=>{s.d(t,{VW:()=>h,SY:()=>_,Wq:()=>g,j4:()=>y,vl:()=>c,MG:()=>x,eD:()=>f,SN:()=>m});var i=s(49186),r=s(66344),a=s(88368),n=s(98453);const o=new class{constructor(e,t){this._cache=new r.q(e),this._invalidCache=new r.q(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=a.default.create(e,{fieldsIndex:t});return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t.uid}:${e}`;return this._invalidCache.get(s)??null}}(50,500),l="unsupported-query",u=" as ",c=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),h=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...c,...h]);function p(e,t,s={}){const r=y(t,e);if(!r){const s=o.getError(t,e);throw new i.A(l,"invalid SQL expression",{expression:t,error:s})}const a=s.expressionName||"expression";if(s.validateStandardized&&!r.isStandardized)throw new i.A(l,`${a} is not standard`,{expression:t});if(s.validateAggregate&&!r.isAggregate)throw new i.A(l,`${a} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function m(e,t,s,i){if(!s)return!0;const r="where clause";return x(e,t,p(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i}),!0}function f(e,t,s,r,a){if(!s)return!0;const n="having clause",o=p(e,s,{validateAggregate:!0,expressionName:n});x(e,t,o,{expressionName:n,query:a});const u=y(s,e),c=u?.getExpressions().every((t=>{const{aggregateType:s,field:i}=t,a=e.get(i)?.name;return r.some((t=>{const{onStatisticField:i,statisticType:r}=t,n=e.get(i)?.name;return n===a&&r.toLowerCase().trim()===s}))}));if(!c)throw new i.A(l,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function y(e,t){return e?o.get(e,t):null}function g(e){return/\((.*?)\)/.test(e)?e:e.split(u)[0]}function _(e){return e.split(u)[1]}function x(e,t,s,r={}){const a=new Map;if(function(e,t,s,i,r){const a=r.includes("*")?[...s,...r.filter((e=>"*"!==e))]:r;for(const r of a)if(t.get(r))T(e,t,s,i,r);else try{const a=p(t,g(r),{validateStandardized:!0});for(const r of a)T(e,t,s,i,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(a,e,t,r.allowedFieldTypes??d,s),a.size){const e=r.expressionName??"expression";throw new i.A(l,`${e} contains invalid or missing fields`,{errors:Array.from(a.values()),query:r.query})}}function T(e,t,s,i,r){const a=t.get(r);a?s.has(a.name)?"all"!==i&&!1===i?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(i,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},51441:(e,t,s)=>{s.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var i=s(90708),r=s(92722);const a=new r.A,n=new r.A,o=new r.A,l={esriGeometryPoint:i.DF,esriGeometryPolyline:i.BW,esriGeometryPolygon:i.z5,esriGeometryMultipoint:i.qK};function u(e,t,s,r=e.hasZ,a=e.hasM){if(null==t)return null;const n=e.hasZ&&r,l=e.hasM&&a;if(s){const u=(0,i.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,a);return(0,i.DF)(u,n,l)}return(0,i.DF)(t,n,l)}function c(e,t,s,r,u,c,h=t,d=s){const p=t&&h,m=s&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,i.kz)(n,f,t,s,e,u,h,d);return c&&(r=(0,i.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,i.Nl)(o,f,t,s,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,i.Q4)(a,f,t,s,h,d),l[e]?.(a,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},31464:(e,t,s)=>{s.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var i=s(4576),r=s(74887),a=s(57251),n=s(7320),o=s(21325),l=s(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function p(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.Ru):[e];await(0,a.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,s,i){if(!e)return null;if(s||(s=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(s)||(0,o.aI)(t,s))return e;if((0,l.y7)(t,s)){const t=(0,o.K8)(s)?m(e):f(e);return t.spatialReference=s,t}return(0,a.projectMany)(n.g,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.aI)(t,s))return e;const a={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.Tw)()};return this._jobs.push(a),this._timer??=setTimeout(this._process,10),a.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.y7)(s,i)?(0,o.K8)(i)?r(t.map(m)):r(t.map(f)):r((0,a.projectMany)(n.g,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},58727:(e,t,s)=>{s.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var i=s(49186),r=s(66552),a=s(83047),n=s(57251),o=s(90634),l=s(65864),u=s(17136),c=s(21325),h=s(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,s){const i=e.bin;return i.onField&&(i.onField=i.onField.trim()),i.onExpression?.value&&(i.onExpression.value=i.onExpression.value.trim()),i.splitBy&&(i.splitBy.value&&(i.splitBy.value=i.splitBy.value.trim()),i.splitBy.outAlias&&(i.splitBy.outAlias=i.splitBy.outAlias.trim())),i.stackBy&&(i.stackBy.value&&(i.stackBy.value=i.stackBy.value.trim()),i.stackBy.outAlias&&(i.stackBy.outAlias=i.stackBy.outAlias.trim())),"normalizationField"in i.parameters&&i.parameters.normalizationField&&(i.parameters.normalizationField=i.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,s)}async function y(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:a,outStatistics:n}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e]=a[e].trim();if(n)for(let e=0;e<n.length;e++)n[e].onStatisticField&&(n[e].onStatisticField=n[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,s)}async function g(e,t,r){if(!e)return null;let{where:n}=e;if(e.where=n=n?.trim(),(!n||/^1 *= *1$/.test(n)||t&&t===n)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const o=n.spatialReference,u=r?d.fromJSON(r):(0,a.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?n:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(n,c.KK))),m=await s.e(9159).then(s.bind(s,49159));await m.load();const f=m.execute(p,t,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new i.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,i=s&&_(m,r)?{densificationStep:8*s}:void 0,a=t.toJSON(),n=(0,h.Cv)(a,a.spatialReference,r,i);if(!n)throw p;n.spatialReference=r,e.geometry=n}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(s,t)&&!(0,n.canProjectWithoutEngine)(s,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},62798:(e,t,s)=>{s.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var i=s(49186),r=s(95538),a=s(31464),n=s(62660),o=s(71386);const l="unsupported-query";async function u(e,t){const s=e.bin;if(!s.onField&&!s.onExpression?.value||"autoIntervalBin"===s.type&&null==s.parameters.numberOfBins||"dateBin"===s.type&&(null==s.parameters.number||null==s.parameters.unit)||"fixedBoundariesBin"===s.type&&null==s.parameters.boundaries||"fixedIntervalBin"===s.type&&null==s.parameters.interval)throw new i.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:s,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,s){const{outStatistics:a,groupByFieldsForStatistics:n,having:o}=s,u=n?.length,c=a?.length;if(o){if(!u||!c)throw new i.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});(0,r.eD)(e,t,o,a,s)}if(c){if(null==(h=a)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=a.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:s}),u&&(0,r.MG)(e,t,n,{expressionName:"groupByFieldsForStatistics",query:s});for(const n of a){const{onStatisticField:a,statisticType:o}=n;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in n))e.get(a)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[a],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:s});else{const{statisticParameters:e}=n;if(!e)throw new i.A(l,"statisticParameters should be set for percentile type",{definition:n,query:s})}}}var h}(t,u,e),Promise.all([(0,n.c0)(e,s,o),(0,a.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,s){const{outFields:a,orderByFields:n,returnDistinctValues:o,outStatistics:u}=s,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(n&&n.length>0){const i=" asc",a=" desc",o=n.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(a)?t.split(a)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:s})}if(a&&a.length>0)(0,r.MG)(e,t,a,{expressionName:"outFields",query:s,allowedFieldTypes:"all"});else if(o)throw new i.A(l,"outFields should be specified for returnDistinctValues",{query:s});(0,r.SN)(e,t,s.where,s)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:s,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.A(l,"Unsupported query options",{query:e});return h(s,u,e),Promise.all([m(s,u,t,e),(0,n.c0)(e,r,o),(0,a.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,s,a){let n=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,o.lw)();n=e.extractFieldNames(s.valueExpression)}if(s.field&&n.push(s.field),s.field2&&n.push(s.field2),s.field3&&n.push(s.field3),s.normalizationField&&n.push(s.normalizationField),!n.length&&!s.valueExpression)throw new i.A(l,"field or valueExpression is required",{params:s});(0,r.MG)(e,t,n,{expressionName:"statistics",query:a})}},62660:(e,t,s)=>{s.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var i=s(49186),r=s(94078),a=s(12176),n=s(65864),o=s(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,a){const n=l(r,a),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=n)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const a=l(t,s),{coords:n,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,n,a,c,e,i,r),c+=e*a;return u}function h(e,t,s,i,r,a,n){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<n&&d>=n||d<n&&c>=n)&&r+(n-c)/(d-c)*(h-r)<a&&(o=!o)}return o}var d=s(90708),p=s(92722),m=s(51441),f=s(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([s.e(9192),s.e(3299),s.e(7360)]).then(s.bind(s,55284)),esriSpatialRelContains:()=>Promise.all([s.e(9192),s.e(3299),s.e(1867)]).then(s.bind(s,29127)),esriSpatialRelCrosses:()=>Promise.all([s.e(9192),s.e(3299),s.e(9700)]).then(s.bind(s,85672)),esriSpatialRelDisjoint:()=>Promise.all([s.e(9192),s.e(3299),s.e(1598)]).then(s.bind(s,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([s.e(9192),s.e(3299),s.e(1414)]).then(s.bind(s,46178)),esriSpatialRelTouches:()=>Promise.all([s.e(9192),s.e(3299),s.e(2503)]).then(s.bind(s,83547)),esriSpatialRelWithin:()=>Promise.all([s.e(9192),s.e(3299),s.e(9265)]).then(s.bind(s,85445)),esriSpatialRelRelation:null};async function x(e,t,s,i,o){if((0,n.Bi)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===s){const s=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(s,!1,!1,e,i,o)}}if((0,n.ZC)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(s,i,o,e));if("esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(s,i,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=s)?a.xB:(0,a.xK)(l);return r=>e(t,(0,m.pL)(s,i,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(s,i,o,e))}async function T(e,t,s){const{spatialRel:r,geometry:a}=e;if(a){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new i.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(a.spatialReference)&&(0,o.fn)(s)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,n.$B)(e)]}(a))throw new i.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new i.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,n.ZC)(e))return!0;if((0,n.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},86420:(e,t,s)=>{s.d(t,{I:()=>a,W:()=>r});var i=s(4718);async function r(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:r,endTimeField:a}=e;let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&a)await t.forEach((e=>{const t=s.getAttribute((0,i.zI)(e),r),l=s.getAttribute((0,i.zI)(e),a);null==t||isNaN(t)||(n=Math.min(n,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||a;await t.forEach((t=>{const r=s.getAttribute((0,i.zI)(t),e);null==r||isNaN(r)||(n=Math.min(n,r),o=Math.max(o,r))}))}return{start:n,end:o}}function a(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:a,end:n}=t;if(null===a&&null===n)return null;if(void 0===a&&void 0===n)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?a=>{const n=e(a,t),o=e(a,s);return(null==n||n<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,a,n):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const a=e(r,t);return null!=a&&a>=s&&a<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,a,n)}},5834:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),a=s(10107),n=s(56507),o=(s(87811),s(44208),s(93223)),l=s(40608),u=s(53275),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,i._)([(0,a.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,a.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,n.dp)(d)},53275:(e,t,s)=>{s.d(t,{A:()=>y});var i=s(90237),r=s(69540),a=s(66552),n=s(25482),o=s(10107),l=(s(44208),s(53966),s(87811),s(93223)),u=s(40608),c=s(98453),h=s(56507);let d=class extends(r.A.ClonableMixin(n.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,i._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,i._)([(0,l.e)(c.m)],d.prototype,"valueType",void 0),d=(0,i._)([(0,u.$)("esri.rest.support.BinParametersAttributes")],d);const p=d;d.from=(0,h.dp)(d);const m=new a.J({naturalLog:"natural-log",squareRoot:"square-root"});let f=class extends(r.A.ClonableMixin(n.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],f.prototype,"expression",void 0),(0,i._)([(0,l.e)(c.m,{name:"onExpression.valueType"})],f.prototype,"expressionValueType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],f.prototype,"field",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"firstDayOfWeek",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"hideUpperBound",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],f.prototype,"splitBy",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],f.prototype,"stackBy",void 0),(0,i._)([(0,l.e)(m)],f.prototype,"transformation",void 0),f=(0,i._)([(0,u.$)("esri.rest.support.BinParametersBase")],f);const y=f},59977:(e,t,s)=>{s.d(t,{A:()=>x});var i=s(90237),r=s(93637),a=s(10107),n=s(56507),o=(s(87811),s(44208),s(93223)),l=s(40608),u=s(53275),c=s(69540),h=s(66552),d=s(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,i._)([(0,a.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,i._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,i._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,s){(0,r.sM)(s,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const s=e.parameters[t];return s?"string"==typeof s?s:new Date(s):null}m.from=(0,n.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,i._)([(0,a.MZ)({cast:e=>e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,i._)([(0,a.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,i._)([(0,a.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,i._)([(0,a.MZ)({cast:e=>e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,i._)([(0,a.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,i._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,i._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,n.dp)(_)},11440:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(90237),r=s(93637),a=s(10107),n=s(56507),o=(s(87811),s(44208),s(93223)),l=s(40608),u=s(53275);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,i._)([(0,a.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,s){(0,r.sM)(s,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,i._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,i._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,n.dp)(c)},60909:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),a=s(10107),n=s(56507),o=(s(87811),s(44208),s(93223)),l=s(40608),u=s(53275),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,i._)([(0,a.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,i._)([(0,a.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,n.dp)(d)},41366:(e,t,s)=>{s.d(t,{K:()=>d,Q:()=>u});var i=s(90237),r=s(66552),a=s(53966),n=s(10107),o=(s(44208),s(87811),s(93223)),l=s(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,s=null!=this.normalizationTotal;return t||s?(e=t&&h||s&&c||null,t&&s&&a.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},63076:(e,t,s)=>{s.d(t,{W6:()=>v,Bb:()=>P});var i=s(71511),r=(s(44208),s(53966)),a=s(97768),n=s(61604),o=s(3694),l=s(74887),u=s(36708),c=s(44794),h=s(78659);const d=Symbol("Yield");class p{constructor(){this._tasks=new Array,this._runningTasks=(0,c.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return d;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.push(new m(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}unshift(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.unshift(new m(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,l.G4)(t.signal);if(s&&!t.abortCallback)t.reject((0,l.NK)());else{const i=s?t.abortCallback?.((0,l.NK)()):t.callback(e);(0,l.$X)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0}}class m{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var f=s(90237),y=s(69622),g=s(10107),_=(s(87811),s(40608));let x=class extends y.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,f._)([(0,g.MZ)()],x.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,f._)([(0,g.MZ)()],x.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),x=(0,f._)([(0,_.$)("esri.views.support.debugFlags")],x);const T=new x;var I,v,E;(E=I||(I={}))[E.ANIMATING=0]="ANIMATING",E[E.INTERACTING=1]="INTERACTING",E[E.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(v||(v={}));const S=new Map([[v.RESOURCE_CONTROLLER_IMMEDIATE,0],[v.RESOURCE_CONTROLLER,4],[v.SLIDE,0],[v.STREAM_DATA_LOADER,0],[v.ELEVATION_QUERY,0],[v.TERRAIN_SURFACE,1],[v.SURFACE_GEOMETRY_UPDATES,1],[v.LOD_RENDERER,2],[v.GRAPHICS_CORE,2],[v.I3S_CONTROLLER,2],[v.POINT_CLOUD_LAYER,2],[v.FEATURE_TILE_FETCHER,2],[v.CLOUDS_GENERATOR,2],[v.OVERLAY,4],[v.STAGE,4],[v.GRAPHICS_DECONFLICTOR,4],[v.FILTER_VISIBILITY,4],[v.SCALE_VISIBILITY,4],[v.FRUSTUM_VISIBILITY,4],[v.POINT_OF_INTEREST_FREQUENT,6],[v.POINT_OF_INTEREST_INFREQUENT,30],[v.LABELER,8],[v.FEATURE_QUERY_ENGINE,8],[v.FEATURE_TILE_TREE,16],[v.FEATURE_TILE_TREE_ACTIVE,0],[v.ELEVATION_ALIGNMENT,12],[v.ELEVATION_ALIGNMENT_SCENE,14],[v.TEXT_TEXTURE_ATLAS,12],[v.TEXTURE_UNLOAD,12],[v.LINE_OF_SIGHT_TOOL,16],[v.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[v.SNAPPING,0],[v.SHADOW_ACCUMULATOR,30],[v.MAPVIEW_FETCH_QUEUE,0],[v.MAPVIEW_LAYERVIEW_UPDATE,2],[v.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function R(e){return S.has(e)?S.get(e):"number"==typeof e?e:1}const F=(0,h.l5)(6.5),w=(0,h.l5)(1),A=(0,h.l5)(30),b=(0,h.l5)(1e3/30),M=(0,h.l5)(100);var N,C;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,c.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new n.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=I.INTERACTING,this._tasks=new o.A,this._runQueue=new o.A,this._load=0,this._idleStateCallbacks=new o.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,u.wB)((()=>T.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),u.Vh);for(const e of Object.keys(v))this.performanceInfo.tasks.set(v[e],new n.A(v[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,s){const i=new t(this,e,s);return this._tasks.push(i),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new n.A(e)),i}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===I.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===I.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==I.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=F,s=e.frameDuration,i=w;switch(this.state){case I.IDLE:t=(0,h.l5)(0),s=(0,h.l5)(Math.max(M,e.frameDuration)),i=A;break;case I.INTERACTING:s=(0,h.l5)(Math.max(b,e.frameDuration));case I.ANIMATING:}return s=(0,h.l5)(s-e.elapsedFrameTime-t),this.state!==I.IDLE&&s<w&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,h.l5)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case I.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case I.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,h.l5)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return C.SCHEDULED;let t=C.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=C.READY:t!==C.READY&&(t=C.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===d&&(t.blockFrame=this._frameNumber)}catch(e){r.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,v.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const s=this._budget.now()-e;if(t.runtime+=s,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+s),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(v))this._frameTaskTimes.set(v[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new p,this._handles=new i.A,this._basePriority=R(t),this.schedulePriority=this._basePriority,this._task=(0,c.v)(null!=s?s:this._queue),this._handles.add((0,u.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(P),this._scheduler.removeTask(this),this.schedule=O.schedule,this.reschedule=O.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=R(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=I.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(N||(N={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(C||(C={}));const P=(()=>{const e=new N.Budget;return e.enabled=!1,e})(),O=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,l.G4)(t)){const e=(0,l.NK)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,l.z7)(e(P))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,i,r)=>{r.d(i,{computeObjectLayerResourceSize:()=>l}),r(78888);var t=r(49186),o=r(66344),s=r(51850),n=r(70328),u=r(8887);let c=new o.q(50);async function l(e,i=null){if(!e.isPrimitive){const i=e.resource?.href;if(!i)throw new t.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(i);if(void 0!==o)return o;const{fetch:u}=await Promise.all([r.e(690),r.e(3030),r.e(2944),r.e(9899),r.e(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,i,r)=>{r.d(i,{computeObjectLayerResourceSize:()=>l}),r(78888);var t=r(49186),o=r(66344),s=r(51850),n=r(70328),u=r(8887);let c=new o.q(50);async function l(e,i=null){if(!e.isPrimitive){const i=e.resource?.href;if(!i)throw new t.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(i);if(void 0!==o)return o;const{fetch:u}=await Promise.all([r.e(690),r.e(3030),r.e(2944),r.e(9899),r.e(4172),r.e(2728),r.e(4948)]).then(r.bind(r,64304)),l=await u(i,{disableTextures:!0,spherical:!0,doublePrecisionRequiresObfuscation:!0}),a=(0,n.Ej)(l.referenceBoundingBox,(0,s.vt)());return c.put(i,a),a}if(!e.resource?.primitive)throw new t.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,n.vt)((0,u.Fq)(e.resource.primitive));if(null!=i)for(let e=0;e<o.length;e++)o[e]*=i;return(0,n.Ej)(o,(0,s.vt)())}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1277,7561],{21277:(t,e,r)=>{r.r(e),r.d(e,{executeForTopIds:()=>n});var i=r(2272),o=r(24645),s=r(57561);async function n(t,e,r){const n=(0,i.Dl)(t);return(await(0,o.KW)(n,s.default.from(e),{...r})).data.objectIds}},24645:(t,e,r)=>{r.d(e,{$K:()=>h,KW:()=>c,Yb:()=>y,xs:()=>m});var i=r(78888),o=r(84952),s=r(65864),n=r(17136),l=r(21325),u=r(10536),p=r(58501);const a="Layer does not support extent calculation.";function d(t,e){const r=t.geometry,i=t.toJSON(),o=i;if(null!=r&&(o.geometry=JSON.stringify(r),o.geometryType=(0,s.$B)(r),o.inSR=(0,l.YX)(r.spatialReference)),i.topFilter?.groupByFields&&(o.topFilter.groupByFields=i.topFilter.groupByFields.join(",")),i.topFilter?.orderByFields&&(o.topFilter.orderByFields=i.topFilter.orderByFields.join(",")),i.topFilter&&(o.topFilter=JSON.stringify(o.topFilter)),i.objectIds&&(o.objectIds=i.objectIds.join(",")),i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),i.outFields&&!(e?.returnCountOnly||e?.returnExtentOnly||e?.returnIdsOnly)?i.outFields.includes("*")?o.outFields="*":o.outFields=i.outFields.join(","):delete o.outFields,i.outSR?o.outSR=(0,l.YX)(i.outSR):r&&i.returnGeometry&&(o.outSR=o.inSR),i.returnGeometry&&delete i.returnGeometry,i.timeExtent){const t=i.timeExtent,{start:e,end:r}=t;null==e&&null==r||(o.time=e===r?e:`${e??"null"},${r??"null"}`),delete i.timeExtent}return o}async function y(t,e,r,i){const o=await w(t,e,"json",i);return(0,p.q)(e,r,o.data),o}async function c(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:w(t,e,"json",r,{returnIdsOnly:!0})}async function h(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:w(t,e,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((t=>{const e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features)throw new Error(a);if(e.hasOwnProperty("count"))throw new Error(a);return t}))}function m(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):w(t,e,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}function w(t,e,r,s={},l={}){const p="string"==typeof t?(0,o.An)(t):t,a=e.geometry?[e.geometry]:[];return s.responseType="json",(0,n.el)(a,null,s).then((t=>{const n=t?.[0];null!=n&&((e=e.clone()).geometry=n);const a=(0,u.z)({...p.query,f:r,...l,...d(e,l)});return(0,i.A)((0,o.fj)(p.path,"queryTopFeatures"),{...s,query:{...a,...s.query}})}))}},57561:(t,e,r)=>{r.r(e),r.d(e,{default:()=>R});var i,o=r(90237),s=r(59456),n=r(66552),l=r(25482),u=r(4718),p=r(10107),a=r(56507),d=r(40608),y=r(43937),c=r(65864);r(44208),r(53966),r(87811);let h=i=class extends l.A{constructor(t){super(t),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],h.prototype,"groupByFields",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],h.prototype,"topCount",void 0),(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],h.prototype,"orderByFields",void 0),h=i=(0,o._)([(0,d.$)("esri.rest.support.TopFilter")],h);const m=h;var w,F=r(79677),v=r(16930);const j=new n.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),S=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let f=w=class extends l.A{constructor(t){super(t),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10}clone(){return new w((0,u.o8)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"cacheHint",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],f.prototype,"distance",void 0),(0,o._)([(0,p.MZ)({types:s.yR,json:{read:c.rS,write:!0}})],f.prototype,"geometry",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],f.prototype,"geometryPrecision",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],f.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],f.prototype,"num",void 0),(0,o._)([(0,p.MZ)({json:{write:!0}})],f.prototype,"objectIds",void 0),(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],f.prototype,"outFields",void 0),(0,o._)([(0,p.MZ)({type:v.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],f.prototype,"outSpatialReference",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],f.prototype,"resultType",void 0),(0,o._)([(0,p.MZ)({json:{write:!0}})],f.prototype,"returnGeometry",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],f.prototype,"returnM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],f.prototype,"returnZ",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],f.prototype,"start",void 0),(0,o._)([(0,y.K)("start"),(0,y.K)("num")],f.prototype,"writeStart",null),(0,o._)([(0,p.MZ)({type:String,json:{read:{source:"spatialRel",reader:j.read},write:{target:"spatialRel",writer:j.write}}})],f.prototype,"spatialRelationship",void 0),(0,o._)([(0,p.MZ)({type:F.A,json:{write:!0}})],f.prototype,"timeExtent",void 0),(0,o._)([(0,p.MZ)({type:m,json:{write:!0}})],f.prototype,"topFilter",void 0),(0,o._)([(0,p.MZ)({type:String,json:{read:S.read,write:{writer:S.write,overridePolicy(t){return{enabled:null!=t&&null!=this.distance
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1277,7561],{21277:(t,e,r)=>{r.r(e),r.d(e,{executeForTopIds:()=>n});var i=r(2272),o=r(24645),s=r(57561);async function n(t,e,r){const n=(0,i.Dl)(t);return(await(0,o.KW)(n,s.default.from(e),{...r})).data.objectIds}},24645:(t,e,r)=>{r.d(e,{$K:()=>h,KW:()=>c,Yb:()=>y,xs:()=>m});var i=r(78888),o=r(84952),s=r(65864),n=r(17136),l=r(21325),u=r(10536),p=r(58501);const a="Layer does not support extent calculation.";function d(t,e){const r=t.geometry,i=t.toJSON(),o=i;if(null!=r&&(o.geometry=JSON.stringify(r),o.geometryType=(0,s.$B)(r),o.inSR=(0,l.YX)(r.spatialReference)),i.topFilter?.groupByFields&&(o.topFilter.groupByFields=i.topFilter.groupByFields.join(",")),i.topFilter?.orderByFields&&(o.topFilter.orderByFields=i.topFilter.orderByFields.join(",")),i.topFilter&&(o.topFilter=JSON.stringify(o.topFilter)),i.objectIds&&(o.objectIds=i.objectIds.join(",")),i.orderByFields&&(o.orderByFields=i.orderByFields.join(",")),i.outFields&&!(e?.returnCountOnly||e?.returnExtentOnly||e?.returnIdsOnly)?i.outFields.includes("*")?o.outFields="*":o.outFields=i.outFields.join(","):delete o.outFields,i.outSR?o.outSR=(0,l.YX)(i.outSR):r&&i.returnGeometry&&(o.outSR=o.inSR),i.returnGeometry&&delete i.returnGeometry,i.timeExtent){const t=i.timeExtent,{start:e,end:r}=t;null==e&&null==r||(o.time=e===r?e:`${e??"null"},${r??"null"}`),delete i.timeExtent}return o}async function y(t,e,r,i){const o=await w(t,e,"json",i);return(0,p.q)(e,r,o.data),o}async function c(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:w(t,e,"json",r,{returnIdsOnly:!0})}async function h(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:w(t,e,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((t=>{const e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features)throw new Error(a);if(e.hasOwnProperty("count"))throw new Error(a);return t}))}function m(t,e,r){return null!=e.timeExtent&&e.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):w(t,e,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}function w(t,e,r,s={},l={}){const p="string"==typeof t?(0,o.An)(t):t,a=e.geometry?[e.geometry]:[];return s.responseType="json",(0,n.el)(a,null,s).then((t=>{const n=t?.[0];null!=n&&((e=e.clone()).geometry=n);const a=(0,u.z)({...p.query,f:r,...l,...d(e,l)});return(0,i.A)((0,o.fj)(p.path,"queryTopFeatures"),{...s,query:{...a,...s.query}})}))}},57561:(t,e,r)=>{r.r(e),r.d(e,{default:()=>R});var i,o=r(90237),s=r(59456),n=r(66552),l=r(25482),u=r(4718),p=r(10107),a=r(56507),d=r(40608),y=r(43937),c=r(65864);r(44208),r(53966),r(87811);let h=i=class extends l.A{constructor(t){super(t),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],h.prototype,"groupByFields",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],h.prototype,"topCount",void 0),(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],h.prototype,"orderByFields",void 0),h=i=(0,o._)([(0,d.$)("esri.rest.support.TopFilter")],h);const m=h;var w,F=r(79677),v=r(16930);const j=new n.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),S=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let f=w=class extends l.A{constructor(t){super(t),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10}clone(){return new w((0,u.o8)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,o._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"cacheHint",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],f.prototype,"distance",void 0),(0,o._)([(0,p.MZ)({types:s.yR,json:{read:c.rS,write:!0}})],f.prototype,"geometry",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],f.prototype,"geometryPrecision",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{write:!0}})],f.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],f.prototype,"num",void 0),(0,o._)([(0,p.MZ)({json:{write:!0}})],f.prototype,"objectIds",void 0),(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),(0,o._)([(0,p.MZ)({type:[String],json:{write:!0}})],f.prototype,"outFields",void 0),(0,o._)([(0,p.MZ)({type:v.A,json:{read:{source:"outSR"},write:{target:"outSR"}}})],f.prototype,"outSpatialReference",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],f.prototype,"resultType",void 0),(0,o._)([(0,p.MZ)({json:{write:!0}})],f.prototype,"returnGeometry",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],f.prototype,"returnM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],f.prototype,"returnZ",void 0),(0,o._)([(0,p.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],f.prototype,"start",void 0),(0,o._)([(0,y.K)("start"),(0,y.K)("num")],f.prototype,"writeStart",null),(0,o._)([(0,p.MZ)({type:String,json:{read:{source:"spatialRel",reader:j.read},write:{target:"spatialRel",writer:j.write}}})],f.prototype,"spatialRelationship",void 0),(0,o._)([(0,p.MZ)({type:F.A,json:{write:!0}})],f.prototype,"timeExtent",void 0),(0,o._)([(0,p.MZ)({type:m,json:{write:!0}})],f.prototype,"topFilter",void 0),(0,o._)([(0,p.MZ)({type:String,json:{read:S.read,write:{writer:S.write,overridePolicy(t){return{enabled:null!=t&&null!=this.distance}}}}})],f.prototype,"units",void 0),(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],f.prototype,"where",void 0),f=w=(0,o._)([(0,d.$)("esri.rest.support.TopFeaturesQuery")],f),f.from=(0,a.dp)(f);const R=f}}]);
|