@arcgis/core 4.32.0-next.20241222 → 4.32.0-next.20241224
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/assets/components/assets/icon/plugConnection16.json +1 -0
- package/assets/components/assets/icon/plugConnection24.json +1 -0
- package/assets/components/assets/icon/plugConnection32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9dd167db3f2e68b71cea.js → 178f606c8896ae5f39de.js} +1 -1
- package/assets/esri/core/workers/chunks/{0acaf73a938fc933560f.js → 250a810dd4e1ff293564.js} +1 -1
- package/assets/esri/core/workers/chunks/756c2f7c8659deab6c96.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{0b2da288fc8cdb025e85.js → 801dbea20966806db1c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{dfd9432ba01881d0a4d9.js → a100fb789d72410f8d4f.js} +2 -2
- package/assets/esri/core/workers/chunks/{dfd9432ba01881d0a4d9.js.LICENSE.txt → a100fb789d72410f8d4f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{3c155f9bc6b9c868170d.js → a1cd84b70030c94d7908.js} +1 -1
- package/assets/esri/core/workers/chunks/b1e4813f0c73fc2a483c.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/bab541feca7ab4d3f993.js +1 -0
- package/assets/esri/core/workers/chunks/bf0a0ca7fdac98f06a89.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{cfe4b8101ea96d6996d3.js → e16d2521f006724697c2.js} +2 -2
- package/assets/esri/core/workers/chunks/{cfe4b8101ea96d6996d3.js.LICENSE.txt → e16d2521f006724697c2.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/e1913990f30d285b3b15.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/e2f91098793b8742fae6.js +1 -0
- package/assets/esri/core/workers/chunks/ebf9caf2dc8af89afec2.js.LICENSE.txt +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/interfaces.d.ts +23 -2
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/package.json +2 -2
- package/portal/PortalItem.js +1 -1
- package/rest/support/FixedBoundariesBinParameters.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/layers/graphics/webStyleUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/widgets/support/jsxFactory.js +1 -1
- package/assets/esri/core/workers/chunks/610d621a8296b77fb16c.js +0 -1
- package/assets/esri/core/workers/chunks/741d5dadfab2a7689054.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7339],{11006:(e,t,i)=>{function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+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(i,Math.floor(t-l*c/o+h)),Math.min(s,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=i,m=s;for(n(e,i,t),a(e[s],d)>0&&n(e,i,s);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[i],d)?n(e,i,m):n(e,++m,s),m<=t&&(i=m+1),t<=m&&(s=m-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.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=s.gh){return new a(e,t)}},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new r(e.getPointX(t),e.getPointY(t),i),n=e.hasZ(t),a=e.hasM(t);return n&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new n(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);n.zmin=i.vmin,n.zmax=i.vmax}if(r){const i=e.getMExtent(t);n.mmin=i.vmin,n.mmax=i.vmax}return n}};class r{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class n{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,r){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},19730:(e,t,i)=>{i.d(t,{do:()=>N,ux:()=>C});var s=i(4576),r=i(49186),n=(i(44208),i(25482)),a=i(4718),o=i(97768),l=i(74887),u=i(83047),c=i(57251),h=i(70328),d=i(19419),p=i(537),m=i(65864),f=i(21325),y=i(90708),g=i(95538),_=i(51441),x=i(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[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new E(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 E{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var S=i(99352),R=i(8384),F=i(58727),v=i(62798),w=i(62660),A=i(86420),b=i(95466),M=i(63076);class N{constructor(e){this._changeHandle=null,this.capabilities={query:S.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=n.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 i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},i);return await t.createQueryResponse()}catch(t){if(t!==F.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},i)).createQueryResponseForCount()}catch(e){if(e!==F.v8)throw e;return 0}}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t),s=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===F.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 i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),s=t.items,r=new Set;return await this.reschedule((()=>{for(const e of s)r.add(t.featureAdapter.getObjectId(e))}),i),r}catch(e){if(e===F.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const i=(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,{},i);return await this.reschedule((()=>this._filterLatest(t)),i),await t.createQueryResponse()}catch(t){if(t!==F.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);let s;e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,F.iJ)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,v.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i);s=await this.reschedule((()=>this._executeGeometryQuery(e,t,i)),i),await this.reschedule((()=>this._executeAggregateIdsQuery(s)),i),await this.reschedule((()=>this.executeObjectIdsQuery(s)),i),await this.reschedule((()=>this.executeTimeQuery(s)),i),await this.reschedule((()=>this.executeAttributesQuery(s)),i)}catch(t){if(t!==F.v8)throw t;s=new R.G([],e,this)}return s.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,A.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}async _getBounds(e,t,i){const s=(0,h.hZ)((0,h.vt)(),h.qv);await this.featureStore.forEachBounds(e,(e=>(0,h.RF)(s,e)));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,_.ag)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5],r.hasZ=!0);const n=(0,x.Cv)(r,t,i);if(n.spatialReference=(0,_.ag)(i),n.xmax-n.xmin==0){const e=(0,u.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,u.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,u.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_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 R.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,a.zI)(t.slice()):this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.o8)(e),e=await this.schedule((()=>(0,F.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,v.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i),e={...e,...t};const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,f.aI)(n,a.spatialReference)?a:(0,x.Cv)(a,n);if(!o)return null;const l=s||r,u=(0,f.fn)(i)&&!(0,f.aI)(this.spatialReference,i)&&l?async e=>this._project(e,i):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 i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=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),n=await this.runSpatialFilter(s,(e=>!i.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new R.G(n,e,this)}),t);return u(r)}if(!h.length)return new R.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new R.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 R.G(p,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new R.G(u,e,this);const c=(0,f.fn)(n)&&!(0,f.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),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))),i);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of g)s.add(y.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),i),n=await this.reschedule((async()=>{const t=await(0,w.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!s.has(y.getObjectId(e))||t(y.getGeometry(e))),i);return new R.G(n,e,this)}),i);return d(n)}if(null!=t){const e=new s.vW;g=g.filter((i=>(0,s.qh)(t.items,i,t.items.length,e)>=0))}if(!g.length){const t=new R.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new R.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))),i);return d(new R.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 i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)));const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(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,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const r=new Array,n=async a=>{for(;s<e.length;){const o=e[s++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),i)}};return this.reschedule((e=>n(e)),i).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,f.fn)(n)&&!(0,f.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,w.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,f.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(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,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=(0,a.zI)(r.map(((t,s)=>i.cloneWithGeometry(e.items[s],(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 i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,F.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,v.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}catch(t){if(t!==F.v8)throw t;return new R.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,i)=>{i.d(t,{F:()=>s});const s={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,i)=>{i.d(t,{G:()=>R});var s=i(4718),r=i(88930),n=i(12359),a=i(90634),o=i(62577),l=i(21325),u=i(95538),c=i(51441),h=i(30524),d=i(50201),p=i(1873),m=i(71386);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,u.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,u.j4)(s,i),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}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,i){const s=i?i.name:t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),i?this.featureAdapter.getAttribute(e,s):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,s,i,r)}return n}))}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,m.lw)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.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 i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var y=i(31464),g=i(58727);function _(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,r,n=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:r,draped:n}}var T=i(5834),I=i(59977),E=i(11440),S=i(60909);class R{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.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:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}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 i=this.featureAdapter,s=v(this.hasZ,this.hasM),{point:r,mode:n}=e,a="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(n,this.spatialReference,t),d=new w(null,0),p=new w(null,0),m={x:0,y:0,z:0};for(const t of this.items){const n=i.getGeometry(t);if(null==n)continue;const{coords:f}=n,y=n.isPoint?A:n.lengths;if(d.coords=f,p.coords=f,e.returnEdge){let e=0;for(let n=0;n<y.length;n++){const c=y[n],f=e;for(let n=0;n<c;n++,e+=s){if(!u&&n===c-1)continue;const y=d;y.coordsIndex=e;const g=p;g.coordsIndex=n===c-1?f:e+s;const _=m;if(!F(m,r,y,g))continue;const T=(r.x-_.x)/a,I=(r.y-_.y)/o,E=T*T+I*I;E<=1&&l.candidates.push(x(i.getObjectId(t),h(_),Math.sqrt(E),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let n=0;n<y.length;n++){const c=y[n],m=e,f=p;f.coordsIndex=m;for(let n=0;n<c;n++,e+=s){const s=d;if(s.coordsIndex=e,u&&n===c-1&&s.x===f.x&&s.y===f.y)continue;const p=(r.x-s.x)/a,m=(r.y-s.y)/o,y=p*p+m*m;y<=1&&l.candidates.push(_(i.getObjectId(t),h(s),Math.sqrt(y)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const n=[];for(let t=0;t<y.length;t++){n.push(e);const i=y[t];e+=i*s,!u&&i>1&&n.push(e-s)}for(const e of n){const s=d;s.coordsIndex=e;const n=(r.x-s.x)/a,u=(r.y-s.y)/o,c=n*n+u*u;c<=1&&l.candidates.push(_(i.getObjectId(t),h(s),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,i){const s=null==i||(0,l.aI)(t,i)?e=>e:e=>(0,y.Cv)(e,t,i),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,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:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:s,minValue:a,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:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:a}=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:i,hasM:s&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=s&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,s)=>i.getFieldValue(e,t,s))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of I){const r=this.featureAdapter.getGeometry(s),n={attributes:i.getAttributes(s),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:i.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:i.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=i.getAttributes(e);t&&(x[T++]={attributes:t})}const E=d||0;if(null!=p){const e=E+p;x=x.slice(E,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=v(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=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,E=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:h}=e[s],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[i]=t}else{let s=null;if(E)s=i;else{const e=this._getAttributeValues(l,f,t,r),i=h.map((t=>e[t]));s=T&&"statisticParameters"in m?this._getPercentileValue(m,i):this._getStatisticValue(m,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach(((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i])),o.set(p,e)}}}else if(I){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,f,t,r);i.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[i];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:s,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:s,union:r}=await Promise.all([i.e(9930),i.e(3656)]).then(i.bind(i,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=s(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.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,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:s}):(0,p.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map((i=>e.getFieldValue(i,t,r)));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin;switch(t.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(t),e);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(t),e);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(E.A.fromJSON(t),e);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(t),e)}}async _createAutoIntervalBinsResponse(e,t){const{field:i,normalizationField:s,numBins:r,normalizationType:n,normalizationTotal:a,start:o,end:l}=e,u=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},this.items),c=(0,p.sU)(u,{field:i,normalizationField:s,normalizationType:n,normalizationTotal:a,numBins:r,minValue:(0,g.dO)(o,!1),maxValue:(0,g.dO)(l,!1)}),h=await this._calculateHistogramBins(u,c,this.items);return this._createFeaturesFromHistogramBins(h,t)}async _createDateBinsResponse(e,t){const{field:i,interval:s,start:n,end:a}=e,o=s.unit,l="quarters"===o?3*r.vf.months:r.vf[o],u=s.value*l/r.vf.milliseconds,c=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},this.items),d=(0,h.OH)(this.fieldsIndex.get(i)),m=(0,p.sU)(c,{field:i,classificationMethod:"defined-interval",definedInterval:u,minValue:(0,g.dO)(n,d),maxValue:(0,g.dO)(a,d)},!0),f=await this._calculateHistogramBins(c,m,this.items);return this._createFeaturesFromHistogramBins(f,t)}async _createFixedBoundariesBinsResponse(e,t){const{field:i}=e,s=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},this.items),r=(0,h.OH)(this.fieldsIndex.get(i)),n=e.boundaries.map((e=>(0,g.dO)(e,r))).sort(((e,t)=>e-t)),a=[];for(let e=0;e<n.length-1;e++)a.push([n[e],n[e+1]]);const o={intervals:a,min:n.at(0),max:n.at(-1)},l=await this._calculateHistogramBins(s,o,this.items);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t){const{field:i,interval:s,start:r,end:n}=e,a=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},this.items),o=(0,h.OH)(this.fieldsIndex.get(i)),l=(0,p.sU)(a,{field:i,classificationMethod:"defined-interval",definedInterval:s,minValue:(0,g.dO)(r,o),maxValue:(0,g.dO)(n,o)},!0),u=await this._calculateHistogramBins(a,l,this.items);return this._createFeaturesFromHistogramBins(u,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[];for(const i of e){const{minValue:e,maxValue:s,items:l}=i,u={attributes:{}};u.attributes[r]=e,u.attributes[n]=s;const c=await this._createStatisticsQueryResponse(t,l,u);a.push(u),c.fields&&o.push(...c.fields)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function F(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function v(e,t){return e?t?4:3:t?3:2}class w{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 A=[1]},95538:(e,t,i)=>{i.d(t,{VW:()=>h,SY:()=>_,Wq:()=>g,j4:()=>y,vl:()=>c,MG:()=>x,eD:()=>f,SN:()=>m});var s=i(49186),r=i(66344),n=i(88368),a=i(98453);const o=new class{constructor(e,t){this._cache=new r.q(e),this._invalidCache=new r.q(t)}get(e,t){const i=`${t.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.default.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t.uid}:${e}`;return this._invalidCache.get(i)??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,i={}){const r=y(t,e);if(!r){const i=o.getError(t,e);throw new s.A(l,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(l,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(l,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function m(e,t,i,s){if(!i)return!0;const r="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function f(e,t,i,r,n){if(!i)return!0;const a="having clause",o=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,o,{expressionName:a,query:n});const u=y(i,e),c=u?.getExpressions().every((t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some((t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i}))}));if(!c)throw new s.A(l,"expressions in having clause should also exist in outStatistics",{having:i});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,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))T(e,t,i,s,r);else try{const n=p(t,g(r),{validateStandardized:!0});for(const r of n)T(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??d,i),n.size){const e=r.expressionName??"expression";throw new s.A(l,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function T(e,t,i,s,r){const n=t.get(r);n?i.has(n.name)?"all"!==s&&!1===s?.has(n.type)&&e.set(r,{type:"invalid-type",fieldName:n.name,fieldType:a.m.fromJSON(n.type),allowedFieldTypes:Array.from(s,(e=>a.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:n.name}):e.set(r,{type:"invalid-field",fieldName:r})}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var s=i(90708),r=i(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,r,n);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,r,u,c,h=t,d=i){const p=t&&h,m=i&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,s.kz)(a,f,t,i,e,u,h,d);return c&&(r=(0,s.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,s.Nl)(o,f,t,i,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,s.Q4)(n,f,t,i,h,d),l[e]?.(n,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,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var s=i(4576),r=i(74887),n=i(57251),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}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 i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?m(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,i,s){return g.push(e,t,i,s)}},58727:(e,t,i)=>{i.d(t,{GC:()=>m,T2:()=>f,VY:()=>h,dO:()=>g,iJ:()=>p,v8:()=>d});var s=i(66552),r=i(83047),n=i(57251),a=i(90634),o=i(65864),l=i(17136),u=i(21325),c=i(31464);const h=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),d=Object.freeze({});async function p(e,t,i){const s=e.bin,{onField:r,expression:n,splitBy:a,splitByField:o,splitByAlias:l,stackBy:u,stackByField:c,stackByAlias:h}=s;return r&&(s.onField=r.trim()),n&&(s.expression=n.trim()),a&&(s.splitBy=a.trim()),o&&(s.splitByField=o.trim()),l&&(s.splitByAlias=l.trim()),u&&(s.stackBy=u.trim()),c&&(s.stackByField=c.trim()),h&&(s.stackByAlias=h.trim()),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),m(e,t,i)}async function m(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),f(e,t,i)}async function f(e,t,s){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 p=await async function(e){const{distance:t,units:s}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const a=n.spatialReference,o=s?h.fromJSON(s):(0,r.Ij)(a),l=a&&((0,u.EA)(a)||(0,u.K8)(a))?n:await(0,c.Nk)(a,u.KK).then((()=>(0,c.Cv)(n,u.KK))),d=await i.e(6165).then(i.bind(i,86165));return await d.load(),d.execute(l,t,{unit:o})??void 0}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;p=(0,a.HA)(p),p.spatialReference=t}if(p){await(0,c.Nk)(p.spatialReference,s),p=function(e,t){const i=e.spatialReference;return y(e,t)&&(0,o.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(p,s);const t=(await(0,l.el)((0,o.rS)(p)))[0];if(null==t)throw d;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,r=i&&y(p,s)?{densificationStep:8*i}:void 0,n=t.toJSON(),a=(0,c.Cv)(n,n.spatialReference,s,r);if(!a)throw d;a.spatialReference=s,e.geometry=a}return e}function y(e,t){if(!e)return!1;const i=e.spatialReference;return((0,o.ZC)(e)||(0,o.Bi)(e)||(0,o.Rg)(e))&&!(0,u.aI)(i,t)&&!(0,n.canProjectWithoutEngine)(i,t)}function g(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,i)=>{i.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var s=i(49186),r=i(95538),n=i(31464),a=i(62660),o=i(71386);const l="unsupported-query";async function u(e,t){const i=e.bin;if(!i.onField&&!i.expression||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new s.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:i,spatialReference:o,availableFields:u}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=i,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new s.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,r.eD)(e,t,o,n,i)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:i}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:i});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:i});else{const{statisticParameters:e}=a;if(!e)throw new s.A(l,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,i,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,i){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=i,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const s=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:i})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(o)throw new s.A(l,"outFields should be specified for returnDistinctValues",{query:i});(0,r.SN)(e,t,i.where,i)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:i,geometryType:r,spatialReference:o,availableFields:u}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(l,"Unsupported query options",{query:e});return h(i,u,e),Promise.all([m(i,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,i,n){let a=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,o.lw)();a=e.extractFieldNames(i.valueExpression)}if(i.field&&a.push(i.field),i.field2&&a.push(i.field2),i.field3&&a.push(i.field3),i.normalizationField&&a.push(i.normalizationField),!a.length&&!i.valueExpression)throw new s.A(l,"field or valueExpression is required",{params:i});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},62660:(e,t,i)=>{i.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var s=i(49186),r=i(94078),n=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,r,n){const a=l(r,n),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,r=0;s<u.length;s++,r+=a)if(!c(e,t,i,o[r],o[r+1]))return!1;return!0}function c(e,t,i,s,r){if(!e)return!1;const n=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,s,r),c+=e*n;return u}function h(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=i(90708),p=i(92722),m=i(51441),f=i(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([i.e(6986),i.e(830),i.e(6950)]).then(i.bind(i,44050)),esriSpatialRelContains:()=>Promise.all([i.e(6986),i.e(830),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(6986),i.e(830),i.e(8682)]).then(i.bind(i,65398)),esriSpatialRelDisjoint:()=>Promise.all([i.e(6986),i.e(830),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(6986),i.e(830),i.e(367)]).then(i.bind(i,74067)),esriSpatialRelTouches:()=>Promise.all([i.e(6986),i.e(830),i.e(5664)]).then(i.bind(i,3188)),esriSpatialRelWithin:()=>Promise.all([i.e(6986),i.e(830),i.e(9728)]).then(i.bind(i,97828)),esriSpatialRelRelation:null};async function x(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(i,s,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)(i,s,o,e))}async function T(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.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,a.ZC)(e))return!0;if((0,a.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,i)=>{i.d(t,{I:()=>n,W:()=>r});var s=i(4718);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=i.getAttribute((0,s.zI)(e),r),l=i.getAttribute((0,s.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=i.getAttribute((0,s.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},5834:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275),c=i(41366);function h(e,t,i){(0,r.sM)(i,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,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},53275:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(90237),r=i(69540),n=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);let h=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.expression=null,this.field=null,this.responseType=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"responseType",void 0),h=(0,s._)([(0,u.$)("esri.rest.support.BinParametersAttributes")],h);const d=h;h.from=(0,c.dp)(h);const p=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitByAttributes=null,this.stackByAttributes=null,this.transformation=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"expression",void 0),(0,s._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,s._)([(0,o.MZ)({type:d,json:{write:{target:{splitBy:{type:String},splitByField:{type:String},splitByAlias:{type:String}},writer:(e,t)=>{null!=e.field&&(t.splitByField=e.field),null!=e.expression&&(t.splitBy=e.expression),null!=e.alias&&(t.splitByAlias=e.alias)}},read:{source:["splitBy","splitByField","splitByAlias"],reader:(e,t)=>new d({field:t.splitByField,expression:t.splitBy,alias:t.splitByAlias})}}})],m.prototype,"splitByAttributes",void 0),(0,s._)([(0,o.MZ)({type:d,json:{write:{target:{stackBy:{type:String},stackByField:{type:String},stackByAlias:{type:String},jsonStyle:{type:String}},writer:(e,t)=>{null!=e.field&&(t.stackByField=e.field),null!=e.expression&&(t.stackBy=e.expression),null!=e.alias&&(t.stackByAlias=e.alias),null!=e.responseType&&(t.jsonStyle=e.responseType)},overridePolicy(){return{enabled:null!=this.stackByAttributes?.field||null!=this.stackByAttributes?.expression}}},read:{source:["stackBy","stackByField","stackByAlias","jsonStyle"],reader:(e,t)=>new d({field:t.stackByField,expression:t.stackBy,alias:t.stackByAlias,responseType:t.jsonStyle})}}})],m.prototype,"stackByAttributes",void 0),(0,s._)([(0,l.e)(p)],m.prototype,"transformation",void 0),m=(0,s._)([(0,u.$)("esri.rest.support.BinParametersBase")],m);const f=m},59977:(e,t,i)=>{i.d(t,{A:()=>x});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275),c=i(69540),h=i(66552),d=i(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,s._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,s._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,s._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.start=null,this.type="date"}};(0,s._)([(0,n.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,s._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,s._)([(0,n.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,s._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,s._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,a.dp)(_)},11440:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275);let c=class extends u.A{constructor(e){super(e),this.boundaries=null,this.type="fixed-boundaries"}};(0,s._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,a.dp)(c)},60909:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275),c=i(41366);function h(e,t,i){(0,r.sM)(i,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,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},41366:(e,t,i)=>{i.d(t,{K:()=>d});var s=i(90237),r=i(66552),n=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(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,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.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,s._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},63076:(e,t,i)=>{i.d(t,{W6:()=>E,Bb:()=>P});var s=i(71511),r=(i(44208),i(53966)),n=i(97768),a=i(61604),o=i(3694),l=i(74887),u=i(36708),c=i(44794),h=i(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,i){return++this._runningTasks.value,new Promise(((s,r)=>this._tasks.push(new m(s,r,e,t,i)))).finally((()=>--this._runningTasks.value))}unshift(e,t,i){return++this._runningTasks.value,new Promise(((s,r)=>this._tasks.unshift(new m(s,r,e,t,i)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const i=(0,l.G4)(t.signal);if(i&&!t.abortCallback)t.reject((0,l.NK)());else{const s=i?t.abortCallback?.((0,l.NK)()):t.callback(e);(0,l.$X)(s)?s.then(t.resolve,t.reject):t.resolve(s)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)if(t.abortCallback){const i=t.abortCallback(e);t.resolve(i)}else t.reject(e);this._tasks.length=0}}class m{constructor(e,t,i,s=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=i,this.signal=s,this.abortCallback=r}}var f=i(90237),y=i(69622),g=i(10107),_=(i(87811),i(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,E,S;(S=I||(I={}))[S.ANIMATING=0]="ANIMATING",S[S.INTERACTING=1]="INTERACTING",S[S.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"}(E||(E={}));const R=new Map([[E.RESOURCE_CONTROLLER_IMMEDIATE,0],[E.RESOURCE_CONTROLLER,4],[E.SLIDE,0],[E.STREAM_DATA_LOADER,0],[E.ELEVATION_QUERY,0],[E.TERRAIN_SURFACE,1],[E.SURFACE_GEOMETRY_UPDATES,1],[E.LOD_RENDERER,2],[E.GRAPHICS_CORE,2],[E.I3S_CONTROLLER,2],[E.POINT_CLOUD_LAYER,2],[E.FEATURE_TILE_FETCHER,2],[E.CLOUDS_GENERATOR,2],[E.OVERLAY,4],[E.STAGE,4],[E.GRAPHICS_DECONFLICTOR,4],[E.FILTER_VISIBILITY,4],[E.SCALE_VISIBILITY,4],[E.FRUSTUM_VISIBILITY,4],[E.POINT_OF_INTEREST_FREQUENT,6],[E.POINT_OF_INTEREST_INFREQUENT,30],[E.LABELER,8],[E.FEATURE_QUERY_ENGINE,8],[E.FEATURE_TILE_TREE,16],[E.FEATURE_TILE_TREE_ACTIVE,0],[E.ELEVATION_ALIGNMENT,12],[E.ELEVATION_ALIGNMENT_SCENE,14],[E.TEXT_TEXTURE_ATLAS,12],[E.TEXTURE_UNLOAD,12],[E.LINE_OF_SIGHT_TOOL,16],[E.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[E.SNAPPING,0],[E.SHADOW_ACCUMULATOR,30],[E.MAPVIEW_FETCH_QUEUE,0],[E.MAPVIEW_LAYERVIEW_UPDATE,2],[E.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function F(e){return R.has(e)?R.get(e):"number"==typeof e?e:1}const v=(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 a.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,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(E))this.performanceInfo.tasks.set(E[e],new a.A(E[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.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,i){const s=new t(this,e,i);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new a.A(e)),s}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),this.state===I.IDLE&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),s._state===I.IDLE&&e()),i.idleBegin=e},set idleEnd(e){i.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=v,i=e.frameDuration,s=w;switch(this.state){case I.IDLE:t=(0,h.l5)(0),i=(0,h.l5)(Math.max(M,e.frameDuration)),s=A;break;case I.INTERACTING:i=(0,h.l5)(Math.max(b,e.frameDuration));case I.ANIMATING:}return i=(0,h.l5)(i-e.elapsedFrameTime-t),this.state!==I.IDLE&&i<w&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,h.l5)(Math.max(i,s)),this._budget.reset(i,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((i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t=C.READY:t!==C.READY&&(t=C.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((i=>{i.name===e&&(t+=i.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,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`})),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((i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.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,E.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const i=this._budget.now()-e;if(t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(E))this._frameTaskTimes.set(E[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,i){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new p,this._handles=new s.A,this._basePriority=F(t),this.schedulePriority=this._basePriority,this._task=(0,c.v)(null!=i?i: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=F(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,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}processQueue(e){return this._queue.runTask(e)}}class i{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=i}(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,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(P))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7339],{11006:(e,t,i)=>{function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+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(i,Math.floor(t-l*c/o+h)),Math.min(s,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=i,m=s;for(n(e,i,t),a(e[s],d)>0&&n(e,i,s);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[i],d)?n(e,i,m):n(e,++m,s),m<=t&&(i=m+1),t<=m&&(s=m-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),r=i(62788),n=i(95488);class a{constructor(e,t){this._observable=new n.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=s.gh){return new a(e,t)}},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new r(e.getPointX(t),e.getPointY(t),i),n=e.hasZ(t),a=e.hasM(t);return n&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new n(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);n.zmin=i.vmin,n.zmax=i.vmax}if(r){const i=e.getMExtent(t);n.mmin=i.vmin,n.mmax=i.vmax}return n}};class r{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class n{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,r){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},19730:(e,t,i)=>{i.d(t,{do:()=>N,ux:()=>C});var s=i(4576),r=i(49186),n=(i(44208),i(25482)),a=i(4718),o=i(97768),l=i(74887),u=i(83047),c=i(57251),h=i(70328),d=i(19419),p=i(537),m=i(65864),f=i(21325),y=i(90708),g=i(95538),_=i(51441),x=i(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[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new E(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 E{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var S=i(99352),R=i(8384),F=i(58727),v=i(62798),w=i(62660),A=i(86420),b=i(95466),M=i(63076);class N{constructor(e){this._changeHandle=null,this.capabilities={query:S.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=n.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 i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{},i);return await t.createQueryResponse()}catch(t){if(t!==F.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},i)).createQueryResponseForCount()}catch(e){if(e!==F.v8)throw e;return 0}}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t),s=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===F.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 i=(0,l.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},i),s=t.items,r=new Set;return await this.reschedule((()=>{for(const e of s)r.add(t.featureAdapter.getObjectId(e))}),i),r}catch(e){if(e===F.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const i=(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,{},i);return await this.reschedule((()=>this._filterLatest(t)),i),await t.createQueryResponse()}catch(t){if(t!==F.v8)throw t;return new R.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);let s;e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,F.iJ)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,v.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i);s=await this.reschedule((()=>this._executeGeometryQuery(e,t,i)),i),await this.reschedule((()=>this._executeAggregateIdsQuery(s)),i),await this.reschedule((()=>this.executeObjectIdsQuery(s)),i),await this.reschedule((()=>this.executeTimeQuery(s)),i),await this.reschedule((()=>this.executeAttributesQuery(s)),i)}catch(t){if(t!==F.v8)throw t;s=new R.G([],e,this)}return s.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,A.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}async _getBounds(e,t,i){const s=(0,h.hZ)((0,h.vt)(),h.qv);await this.featureStore.forEachBounds(e,(e=>(0,h.RF)(s,e)));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:(0,_.ag)(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5],r.hasZ=!0);const n=(0,x.Cv)(r,t,i);if(n.spatialReference=(0,_.ag)(i),n.xmax-n.xmin==0){const e=(0,u.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,u.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,u.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_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 R.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,a.zI)(t.slice()):this._getAllFeatures()}async _executeQuery(e,t,i){e=(0,a.o8)(e),e=await this.schedule((()=>(0,F.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,v.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i),e={...e,...t};const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,f.aI)(n,a.spatialReference)?a:(0,x.Cv)(a,n);if(!o)return null;const l=s||r,u=(0,f.fn)(i)&&!(0,f.aI)(this.spatialReference,i)&&l?async e=>this._project(e,i):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 i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=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),n=await this.runSpatialFilter(s,(e=>!i.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new R.G(n,e,this)}),t);return u(r)}if(!h.length)return new R.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new R.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 R.G(p,e,this))}async _executeGeometryQuery(e,t,i){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new R.G(u,e,this);const c=(0,f.fn)(n)&&!(0,f.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),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))),i);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const s=new Set;for(const e of g)s.add(y.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),i),n=await this.reschedule((async()=>{const t=await(0,w.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!s.has(y.getObjectId(e))||t(y.getGeometry(e))),i);return new R.G(n,e,this)}),i);return d(n)}if(null!=t){const e=new s.vW;g=g.filter((i=>(0,s.qh)(t.items,i,t.items.length,e)>=0))}if(!g.length){const t=new R.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new R.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))),i);return d(new R.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 i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)));const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(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,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const r=new Array,n=async a=>{for(;s<e.length;){const o=e[s++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),i)}};return this.reschedule((e=>n(e)),i).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,n=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,r),o=n.get(e);(!o||s>a(o,r))&&n.set(e,i)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||r;return(0,f.fn)(n)&&!(0,f.aI)(this.spatialReference,n)&&l?JSON.stringify([t,i,n]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,w.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,f.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(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,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=(0,a.zI)(r.map(((t,s)=>i.cloneWithGeometry(e.items[s],(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 i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=(0,a.o8)(e);try{e=await this.schedule((()=>(0,F.GC)(e,this.definitionExpression,this.spatialReference)),i),e=await this.reschedule((()=>(0,v.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const s=await this.reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this.reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this.reschedule((()=>this.executeObjectIdsQuery(r)),i),await this.reschedule((()=>this.executeTimeQuery(r)),i),await this.reschedule((()=>this.executeAttributesQuery(r)),i),r}catch(t){if(t!==F.v8)throw t;return new R.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,i)=>{i.d(t,{F:()=>s});const s={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,i)=>{i.d(t,{G:()=>R});var s=i(4718),r=i(88930),n=i(12359),a=i(90634),o=i(62577),l=i(21325),u=i(95538),c=i(51441),h=i(30524),d=i(50201),p=i(1873),m=i(71386);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,u.Wq)(t),r=this.fieldsIndex.get(s),n=r?null:(0,u.j4)(s,i),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}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,i){const s=i?i.name:t;let r=null;return this._fieldDataCache.has(s)?r=this._fieldDataCache.get(s)?.clause:i||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:r})),i?this.featureAdapter.getAttribute(e,s):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&i&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),s&&Number.isFinite(n)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,s,i,r)}return n}))}async getExpressionValues(e,t,i,s,r){const{arcadeUtils:n}=await(0,m.lw)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.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 i={};for(const s of t){const{alias:t,clause:r}=this._fieldDataCache.get(s);i[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let r=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++r),r>1?null:e}}var y=i(31464),g=i(58727);function _(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,r,n=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:r,draped:n}}var T=i(5834),I=i(59977),E=i(11440),S=i(60909);class R{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.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:i,outStatistics:s}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of s){const{statisticType:s}=r,l="exceedslimit"!==s?r.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,n);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:r}=u[t],n=s.join(",");i&&!e.validateItems(r,i)||o.add(n)}}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 i=this.featureAdapter,s=v(this.hasZ,this.hasM),{point:r,mode:n}=e,a="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(n,this.spatialReference,t),d=new w(null,0),p=new w(null,0),m={x:0,y:0,z:0};for(const t of this.items){const n=i.getGeometry(t);if(null==n)continue;const{coords:f}=n,y=n.isPoint?A:n.lengths;if(d.coords=f,p.coords=f,e.returnEdge){let e=0;for(let n=0;n<y.length;n++){const c=y[n],f=e;for(let n=0;n<c;n++,e+=s){if(!u&&n===c-1)continue;const y=d;y.coordsIndex=e;const g=p;g.coordsIndex=n===c-1?f:e+s;const _=m;if(!F(m,r,y,g))continue;const T=(r.x-_.x)/a,I=(r.y-_.y)/o,E=T*T+I*I;E<=1&&l.candidates.push(x(i.getObjectId(t),h(_),Math.sqrt(E),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let n=0;n<y.length;n++){const c=y[n],m=e,f=p;f.coordsIndex=m;for(let n=0;n<c;n++,e+=s){const s=d;if(s.coordsIndex=e,u&&n===c-1&&s.x===f.x&&s.y===f.y)continue;const p=(r.x-s.x)/a,m=(r.y-s.y)/o,y=p*p+m*m;y<=1&&l.candidates.push(_(i.getObjectId(t),h(s),Math.sqrt(y)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const n=[];for(let t=0;t<y.length;t++){n.push(e);const i=y[t];e+=i*s,!u&&i>1&&n.push(e-s)}for(const e of n){const s=d;s.coordsIndex=e;const n=(r.x-s.x)/a,u=(r.y-s.y)/o,c=n*n+u*u;c<=1&&l.candidates.push(_(i.getObjectId(t),h(s),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,i){const s=null==i||(0,l.aI)(t,i)?e=>e:e=>(0,y.Cv)(e,t,i),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:0}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,minValue:a,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:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:s,minValue:a,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:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,s,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:s,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const s=i(e,r,n),a=i(t,r,n);return o(s,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:r,objectIdField:n,spatialReference:a}=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:i,hasM:s&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=s&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,s)=>i.getFieldValue(e,t,s))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of I){const r=this.featureAdapter.getGeometry(s),n={attributes:i.getAttributes(s),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:i.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:i.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=i.getAttributes(e);t&&(x[T++]={attributes:t})}const E=d||0;if(null!=p){const e=E+p;x=x.slice(E,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=v(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],r=new Map,n=new Map,a=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,E=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,r);e.push(s)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:n,items:a,itemPositions:h}=e[s],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[i]=t}else{let s=null;if(E)s=i;else{const e=this._getAttributeValues(l,f,t,r),i=h.map((t=>e[t]));s=T&&"statisticParameters"in m?this._getPercentileValue(m,i):this._getStatisticValue(m,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;c.forEach(((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=n[i])),o.set(p,e)}}}else if(I){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,f,t,r);i.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[i];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:s,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:s,union:r}=await Promise.all([i.e(9930),i.e(3656)]).then(i.bind(i,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=s(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.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,i,s){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=i?.has(r)?i.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:s}):(0,p.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:r}=e,{value:n,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const r=this.fieldsIndex.get(t),n=i.map((i=>e.getFieldValue(i,t,r)));return s.set(t,n),n}_calculateUniqueValues(e,t,i){const s={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(i||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t,i=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,r=t.min??0,n=t.max??0,a=s.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin;switch(t.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(t),e);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(t),e);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(E.A.fromJSON(t),e);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(t),e)}}async _createAutoIntervalBinsResponse(e,t){const{field:i,normalizationField:s,numBins:r,normalizationType:n,normalizationTotal:a,start:o,end:l}=e,u=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},this.items),c=(0,p.sU)(u,{field:i,normalizationField:s,normalizationType:n,normalizationTotal:a,numBins:r,minValue:(0,g.dO)(o,!1),maxValue:(0,g.dO)(l,!1)}),h=await this._calculateHistogramBins(u,c,this.items);return this._createFeaturesFromHistogramBins(h,t)}async _createDateBinsResponse(e,t){const{field:i,interval:s,start:n,end:a}=e,o=s.unit,l="quarters"===o?3*r.vf.months:r.vf[o],u=s.value*l/r.vf.milliseconds,c=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},this.items),d=(0,h.OH)(this.fieldsIndex.get(i)),m=(0,p.sU)(c,{field:i,classificationMethod:"defined-interval",definedInterval:u,minValue:(0,g.dO)(n,d),maxValue:(0,g.dO)(a,d)},!0),f=await this._calculateHistogramBins(c,m,this.items);return this._createFeaturesFromHistogramBins(f,t)}async _createFixedBoundariesBinsResponse(e,t){const{field:i}=e,s=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},this.items),r=(0,h.OH)(this.fieldsIndex.get(i)),n=e.boundaries.map((e=>(0,g.dO)(e,r))).sort(((e,t)=>e-t)),a=[];for(let e=0;e<n.length-1;e++)a.push([n[e],n[e+1]]);const o={intervals:a,min:n.at(0),max:n.at(-1)},l=await this._calculateHistogramBins(s,o,this.items);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t){const{field:i,interval:s,start:r,end:n}=e,a=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},this.items),o=(0,h.OH)(this.fieldsIndex.get(i)),l=(0,p.sU)(a,{field:i,classificationMethod:"defined-interval",definedInterval:s,minValue:(0,g.dO)(r,o),maxValue:(0,g.dO)(n,o)},!0),u=await this._calculateHistogramBins(a,l,this.items);return this._createFeaturesFromHistogramBins(u,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,r=s||"lowerBoundary",n=i||"upperBoundary",a=[],o=[];for(const i of e){const{minValue:e,maxValue:s,items:l}=i,u={attributes:{}};u.attributes[r]=e,u.attributes[n]=s;const c=await this._createStatisticsQueryResponse(t,l,u);a.push(u),c.fields&&o.push(...c.fields)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function F(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+r*c,e.y=i.y+n*c,!0}function v(e,t){return e?t?4:3:t?3:2}class w{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 A=[1]},95538:(e,t,i)=>{i.d(t,{VW:()=>h,SY:()=>_,Wq:()=>g,j4:()=>y,vl:()=>c,MG:()=>x,eD:()=>f,SN:()=>m});var s=i(49186),r=i(66344),n=i(88368),a=i(98453);const o=new class{constructor(e,t){this._cache=new r.q(e),this._invalidCache=new r.q(t)}get(e,t){const i=`${t.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.default.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t.uid}:${e}`;return this._invalidCache.get(i)??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,i={}){const r=y(t,e);if(!r){const i=o.getError(t,e);throw new s.A(l,"invalid SQL expression",{expression:t,error:i})}const n=i.expressionName||"expression";if(i.validateStandardized&&!r.isStandardized)throw new s.A(l,`${n} is not standard`,{expression:t});if(i.validateAggregate&&!r.isAggregate)throw new s.A(l,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function m(e,t,i,s){if(!i)return!0;const r="where clause";return x(e,t,p(e,i,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:s}),!0}function f(e,t,i,r,n){if(!i)return!0;const a="having clause",o=p(e,i,{validateAggregate:!0,expressionName:a});x(e,t,o,{expressionName:a,query:n});const u=y(i,e),c=u?.getExpressions().every((t=>{const{aggregateType:i,field:s}=t,n=e.get(s)?.name;return r.some((t=>{const{onStatisticField:s,statisticType:r}=t,a=e.get(s)?.name;return a===n&&r.toLowerCase().trim()===i}))}));if(!c)throw new s.A(l,"expressions in having clause should also exist in outStatistics",{having:i});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,i,r={}){const n=new Map;if(function(e,t,i,s,r){const n=r.includes("*")?[...i,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))T(e,t,i,s,r);else try{const n=p(t,g(r),{validateStandardized:!0});for(const r of n)T(e,t,i,s,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??d,i),n.size){const e=r.expressionName??"expression";throw new s.A(l,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function T(e,t,i,s,r){const n=t.get(r);n?i.has(n.name)?"all"!==s&&!1===s?.has(n.type)&&e.set(r,{type:"invalid-type",fieldName:n.name,fieldType:a.m.fromJSON(n.type),allowedFieldTypes:Array.from(s,(e=>a.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:n.name}):e.set(r,{type:"invalid-field",fieldName:r})}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var s=i(90708),r=i(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,r,n);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,r,u,c,h=t,d=i){const p=t&&h,m=i&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,s.kz)(a,f,t,i,e,u,h,d);return c&&(r=(0,s.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,s.Nl)(o,f,t,i,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,s.Q4)(n,f,t,i,h,d),l[e]?.(n,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,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var s=i(4576),r=i(74887),n=i(57251),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}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 i=[];for(const s of e)i.push(d(s,t));return i}function d(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(s.Ru):[e];await(0,n.initializeProjection)(i.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?m(e):f(e);return t.spatialReference=i,t}return(0,n.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:r,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,i,s){return g.push(e,t,i,s)}},58727:(e,t,i)=>{i.d(t,{GC:()=>m,T2:()=>f,VY:()=>h,dO:()=>g,iJ:()=>p,v8:()=>d});var s=i(66552),r=i(83047),n=i(57251),a=i(90634),o=i(65864),l=i(17136),u=i(21325),c=i(31464);const h=new s.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),d=Object.freeze({});async function p(e,t,i){const s=e.bin,{onField:r,expression:n,splitBy:a,splitByField:o,splitByAlias:l,stackBy:u,stackByField:c,stackByAlias:h}=s;return r&&(s.onField=r.trim()),n&&(s.expression=n.trim()),a&&(s.splitBy=a.trim()),o&&(s.splitByField=o.trim()),l&&(s.splitByAlias=l.trim()),u&&(s.stackBy=u.trim()),c&&(s.stackByField=c.trim()),h&&(s.stackByAlias=h.trim()),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),m(e,t,i)}async function m(e,t,i){const{outFields:s,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),f(e,t,i)}async function f(e,t,s){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 p=await async function(e){const{distance:t,units:s}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const a=n.spatialReference,o=s?h.fromJSON(s):(0,r.Ij)(a),l=a&&((0,u.EA)(a)||(0,u.K8)(a))?n:await(0,c.Nk)(a,u.KK).then((()=>(0,c.Cv)(n,u.KK))),d=await i.e(6165).then(i.bind(i,86165));return await d.load(),d.execute(l,t,{unit:o})??void 0}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;p=(0,a.HA)(p),p.spatialReference=t}if(p){await(0,c.Nk)(p.spatialReference,s),p=function(e,t){const i=e.spatialReference;return y(e,t)&&(0,o.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(p,s);const t=(await(0,l.el)((0,o.rS)(p)))[0];if(null==t)throw d;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,r=i&&y(p,s)?{densificationStep:8*i}:void 0,n=t.toJSON(),a=(0,c.Cv)(n,n.spatialReference,s,r);if(!a)throw d;a.spatialReference=s,e.geometry=a}return e}function y(e,t){if(!e)return!1;const i=e.spatialReference;return((0,o.ZC)(e)||(0,o.Bi)(e)||(0,o.Rg)(e))&&!(0,u.aI)(i,t)&&!(0,n.canProjectWithoutEngine)(i,t)}function g(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,i)=>{i.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var s=i(49186),r=i(95538),n=i(31464),a=i(62660),o=i(71386);const l="unsupported-query";async function u(e,t){const i=e.bin;if(!i.onField&&!i.expression||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new s.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:i,spatialReference:o,availableFields:u}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,i){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=i,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new s.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,r.eD)(e,t,o,n,i)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:i}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:i});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:i});else{const{statisticParameters:e}=a;if(!e)throw new s.A(l,"statisticParameters should be set for percentile type",{definition:a,query:i})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,i,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,i){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=i,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const s=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:i})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(o)throw new s.A(l,"outFields should be specified for returnDistinctValues",{query:i});(0,r.SN)(e,t,i.where,i)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:i,geometryType:r,spatialReference:o,availableFields:u}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(l,"Unsupported query options",{query:e});return h(i,u,e),Promise.all([m(i,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,i,n){let a=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,o.lw)();a=e.extractFieldNames(i.valueExpression)}if(i.field&&a.push(i.field),i.field2&&a.push(i.field2),i.field3&&a.push(i.field3),i.normalizationField&&a.push(i.normalizationField),!a.length&&!i.valueExpression)throw new s.A(l,"field or valueExpression is required",{params:i});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},62660:(e,t,i)=>{i.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var s=i(49186),r=i(94078),n=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,r,n){const a=l(r,n),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,r=0;s<u.length;s++,r+=a)if(!c(e,t,i,o[r],o[r+1]))return!1;return!0}function c(e,t,i,s,r){if(!e)return!1;const n=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,s,r),c+=e*n;return u}function h(e,t,i,s,r,n,a){let o=e,l=s;for(let e=s,u=s+r*i;e<u;e+=i){l=e+i,l===u&&(l=s);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=i(90708),p=i(92722),m=i(51441),f=i(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([i.e(6986),i.e(830),i.e(6950)]).then(i.bind(i,44050)),esriSpatialRelContains:()=>Promise.all([i.e(6986),i.e(830),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(6986),i.e(830),i.e(8682)]).then(i.bind(i,65398)),esriSpatialRelDisjoint:()=>Promise.all([i.e(6986),i.e(830),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(6986),i.e(830),i.e(367)]).then(i.bind(i,74067)),esriSpatialRelTouches:()=>Promise.all([i.e(6986),i.e(830),i.e(5664)]).then(i.bind(i,3188)),esriSpatialRelWithin:()=>Promise.all([i.e(6986),i.e(830),i.e(9728)]).then(i.bind(i,97828)),esriSpatialRelRelation:null};async function x(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(i,s,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)(i,s,o,e))}async function T(e,t,i){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.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,a.ZC)(e))return!0;if((0,a.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,i)=>{i.d(t,{I:()=>n,W:()=>r});var s=i(4718);async function r(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=i.getAttribute((0,s.zI)(e),r),l=i.getAttribute((0,s.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=i.getAttribute((0,s.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:r}=e;if(!s&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&r?function(e,t,i,s,r){return null!=s&&null!=r?n=>{const a=e(n,t),o=e(n,i);return(null==a||a<=r)&&(null==o||o>=s)}:null!=s?t=>{const r=e(t,i);return null==r||r>=s}:null!=r?i=>{const s=e(i,t);return null==s||s<=r}:void 0}(o,s,r,n,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?r=>{const n=e(r,t);return null!=n&&n>=i&&n<=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r>=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r<=s}:void 0}(o,s||r,n,a)}},5834:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275),c=i(41366);function h(e,t,i){(0,r.sM)(i,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,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},53275:(e,t,i)=>{i.d(t,{A:()=>f});var s=i(90237),r=i(69540),n=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);let h=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.expression=null,this.field=null,this.responseType=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"responseType",void 0),h=(0,s._)([(0,u.$)("esri.rest.support.BinParametersAttributes")],h);const d=h;h.from=(0,c.dp)(h);const p=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitByAttributes=null,this.stackByAttributes=null,this.transformation=null}};(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"expression",void 0),(0,s._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,s._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,s._)([(0,o.MZ)({type:d,json:{write:{target:{splitBy:{type:String},splitByField:{type:String},splitByAlias:{type:String}},writer:(e,t)=>{null!=e.field&&(t.splitByField=e.field),null!=e.expression&&(t.splitBy=e.expression),null!=e.alias&&(t.splitByAlias=e.alias)}},read:{source:["splitBy","splitByField","splitByAlias"],reader:(e,t)=>new d({field:t.splitByField,expression:t.splitBy,alias:t.splitByAlias})}}})],m.prototype,"splitByAttributes",void 0),(0,s._)([(0,o.MZ)({type:d,json:{write:{target:{stackBy:{type:String},stackByField:{type:String},stackByAlias:{type:String},jsonStyle:{type:String}},writer:(e,t)=>{null!=e.field&&(t.stackByField=e.field),null!=e.expression&&(t.stackBy=e.expression),null!=e.alias&&(t.stackByAlias=e.alias),null!=e.responseType&&(t.jsonStyle=e.responseType)},overridePolicy(){return{enabled:null!=this.stackByAttributes?.field||null!=this.stackByAttributes?.expression}}},read:{source:["stackBy","stackByField","stackByAlias","jsonStyle"],reader:(e,t)=>new d({field:t.stackByField,expression:t.stackBy,alias:t.stackByAlias,responseType:t.jsonStyle})}}})],m.prototype,"stackByAttributes",void 0),(0,s._)([(0,l.e)(p)],m.prototype,"transformation",void 0),m=(0,s._)([(0,u.$)("esri.rest.support.BinParametersBase")],m);const f=m},59977:(e,t,i)=>{i.d(t,{A:()=>x});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275),c=i(69540),h=i(66552),d=i(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,s._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,s._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,s._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,i){(0,r.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.start=null,this.type="date"}};(0,s._)([(0,n.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,s._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,s._)([(0,n.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,s._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,s._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,a.dp)(_)},11440:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,r.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,a.dp)(c)},60909:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(90237),r=i(93637),n=i(10107),a=i(56507),o=(i(87811),i(44208),i(93223)),l=i(40608),u=i(53275),c=i(41366);function h(e,t,i){(0,r.sM)(i,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,s._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,s._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,s._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,s._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,s._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},41366:(e,t,i)=>{i.d(t,{K:()=>d});var s=i(90237),r=i(66552),n=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(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,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.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,s._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,s._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,s._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},63076:(e,t,i)=>{i.d(t,{W6:()=>E,Bb:()=>P});var s=i(71511),r=(i(44208),i(53966)),n=i(97768),a=i(61604),o=i(3694),l=i(74887),u=i(36708),c=i(44794),h=i(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,i){return++this._runningTasks.value,new Promise(((s,r)=>this._tasks.push(new m(s,r,e,t,i)))).finally((()=>--this._runningTasks.value))}unshift(e,t,i){return++this._runningTasks.value,new Promise(((s,r)=>this._tasks.unshift(new m(s,r,e,t,i)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const i=(0,l.G4)(t.signal);if(i&&!t.abortCallback)t.reject((0,l.NK)());else{const s=i?t.abortCallback?.((0,l.NK)()):t.callback(e);(0,l.$X)(s)?s.then(t.resolve,t.reject):t.resolve(s)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,l.NK)();for(const t of this._tasks)if(t.abortCallback){const i=t.abortCallback(e);t.resolve(i)}else t.reject(e);this._tasks.length=0}}class m{constructor(e,t,i,s=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=i,this.signal=s,this.abortCallback=r}}var f=i(90237),y=i(69622),g=i(10107),_=(i(87811),i(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,E,S;(S=I||(I={}))[S.ANIMATING=0]="ANIMATING",S[S.INTERACTING=1]="INTERACTING",S[S.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"}(E||(E={}));const R=new Map([[E.RESOURCE_CONTROLLER_IMMEDIATE,0],[E.RESOURCE_CONTROLLER,4],[E.SLIDE,0],[E.STREAM_DATA_LOADER,0],[E.ELEVATION_QUERY,0],[E.TERRAIN_SURFACE,1],[E.SURFACE_GEOMETRY_UPDATES,1],[E.LOD_RENDERER,2],[E.GRAPHICS_CORE,2],[E.I3S_CONTROLLER,2],[E.POINT_CLOUD_LAYER,2],[E.FEATURE_TILE_FETCHER,2],[E.CLOUDS_GENERATOR,2],[E.OVERLAY,4],[E.STAGE,4],[E.GRAPHICS_DECONFLICTOR,4],[E.FILTER_VISIBILITY,4],[E.SCALE_VISIBILITY,4],[E.FRUSTUM_VISIBILITY,4],[E.POINT_OF_INTEREST_FREQUENT,6],[E.POINT_OF_INTEREST_INFREQUENT,30],[E.LABELER,8],[E.FEATURE_QUERY_ENGINE,8],[E.FEATURE_TILE_TREE,16],[E.FEATURE_TILE_TREE_ACTIVE,0],[E.ELEVATION_ALIGNMENT,12],[E.ELEVATION_ALIGNMENT_SCENE,14],[E.TEXT_TEXTURE_ATLAS,12],[E.TEXTURE_UNLOAD,12],[E.LINE_OF_SIGHT_TOOL,16],[E.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[E.SNAPPING,0],[E.SHADOW_ACCUMULATOR,30],[E.MAPVIEW_FETCH_QUEUE,0],[E.MAPVIEW_LAYERVIEW_UPDATE,2],[E.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function F(e){return R.has(e)?R.get(e):"number"==typeof e?e:1}const v=(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 a.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new i,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(E))this.performanceInfo.tasks.set(E[e],new a.A(E[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.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,i){const s=new t(this,e,i);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new a.A(e)),s}registerIdleStateCallbacks(e,t){const i={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(i),this.state===I.IDLE&&this._idleUpdatesStartFired&&i.idleBegin();const s=this;return{remove:()=>this._removeIdleStateCallbacks(i),set idleBegin(e){s._idleUpdatesStartFired&&(i.idleEnd(),s._state===I.IDLE&&e()),i.idleBegin=e},set idleEnd(e){i.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=v,i=e.frameDuration,s=w;switch(this.state){case I.IDLE:t=(0,h.l5)(0),i=(0,h.l5)(Math.max(M,e.frameDuration)),s=A;break;case I.INTERACTING:i=(0,h.l5)(Math.max(b,e.frameDuration));case I.ANIMATING:}return i=(0,h.l5)(i-e.elapsedFrameTime-t),this.state!==I.IDLE&&i<w&&!this._forceTask?(this._forceTask=!0,!1):(i=(0,h.l5)(Math.max(i,s)),this._budget.reset(i,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((i=>{i.name===e&&i.needsUpdate&&(i.schedulePriority<=1?t=C.READY:t!==C.READY&&(t=C.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((i=>{i.name===e&&(t+=i.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,i)=>{t+=e>1?` ${e}x ${i}`:` ${i}`})),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((i=>{i.needsUpdate&&0!==i.schedulePriority&&0!==i.basePriority&&i.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,i.basePriority),1===i.schedulePriority?(i.schedulePriority=0,this._runQueue.push(i)):--i.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,E.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const i=this._budget.now()-e;if(t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(E))this._frameTaskTimes.set(E[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,i){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new p,this._handles=new s.A,this._basePriority=F(t),this.schedulePriority=this._basePriority,this._task=(0,c.v)(null!=i?i: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=F(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,i){return this._queue.push(e,t,i)}reschedule(e,t,i){return this._queue.unshift(e,t,i)}processQueue(e){return this._queue.runTask(e)}}class i{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=i}(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,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(P))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4575],{7320:(t,e,i)=>{i.d(e,{g:()=>n});const n={convertToGEGeometry:function(t,e){return null==e?null:t.convertJSONToGeometry(e)},exportPoint:function(t,e,i){const n=new r(t.getPointX(e),t.getPointY(e),i),s=t.hasZ(e),o=t.hasM(e);return s&&(n.z=t.getPointZ(e)),o&&(n.m=t.getPointM(e)),n},exportPolygon:function(t,e,i){return new s(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))},exportPolyline:function(t,e,i){return new o(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))},exportMultipoint:function(t,e,i){return new a(t.exportPoints(e),i,t.hasZ(e),t.hasM(e))},exportExtent:function(t,e,i){const n=t.hasZ(e),r=t.hasM(e),s=new l(t.getXMin(e),t.getYMin(e),t.getXMax(e),t.getYMax(e),i);if(n){const i=t.getZExtent(e);s.zmin=i.vmin,s.zmax=i.vmax}if(r){const i=t.getMExtent(e);s.mmin=i.vmin,s.mmax=i.vmax}return s}};class r{constructor(t,e,i){this.x=t,this.y=e,this.spatialReference=i,this.z=void 0,this.m=void 0}}class s{constructor(t,e,i,n){this.rings=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class o{constructor(t,e,i,n){this.paths=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class a{constructor(t,e,i,n){this.points=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class l{constructor(t,e,i,n,r){this.xmin=t,this.ymin=e,this.xmax=i,this.ymax=n,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},31464:(t,e,i)=>{i.d(e,{Cv:()=>f,Nk:()=>d,lK:()=>g});var n=i(4576),r=i(74887),s=i(57251),o=i(7320),a=i(21325),l=i(28735);const p=[0,0];function u(t,e){if(!e)return null;if("x"in e){const i={x:0,y:0};return[i.x,i.y]=t(e.x,e.y,p),null!=e.z&&(i.z=e.z),null!=e.m&&(i.m=e.m),i}if("xmin"in e){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=t(e.xmin,e.ymin,p),[i.xmax,i.ymax]=t(e.xmax,e.ymax,p),e.hasZ&&(i.zmin=e.zmin,i.zmax=e.zmax,i.hasZ=!0),e.hasM&&(i.mmin=e.mmin,i.mmax=e.mmax,i.hasM=!0),i}return"rings"in e?{rings:c(e.rings,t),hasM:e.hasM,hasZ:e.hasZ}:"paths"in e?{paths:c(e.paths,t),hasM:e.hasM,hasZ:e.hasZ}:"points"in e?{points:m(e.points,t),hasM:e.hasM,hasZ:e.hasZ}:null}function c(t,e){const i=[];for(const n of t)i.push(m(n,e));return i}function m(t,e){const i=[];for(const n of t){const t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function d(t,e){if(!t||!e)return;const i=Array.isArray(t)?t.map((t=>null!=t.geometry?t.geometry.spatialReference:null)).filter(n.Ru):[t];await(0,s.initializeProjection)(i.map((t=>({source:t,dest:e}))))}const y=u.bind(null,l.je),h=u.bind(null,l.tD);function f(t,e,i,n){if(!t)return null;if(i||(i=e,e=t.spatialReference),!(0,a.fn)(e)||!(0,a.fn)(i)||(0,a.aI)(e,i))return t;if((0,l.y7)(e,i)){const e=(0,a.K8)(i)?y(t):h(t);return e.spatialReference=i,e}return(0,s.projectMany)(o.g,[t],e,i,null,n)[0]}const v=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,a.aI)(e,i))return t;const s={geometries:t,inSpatialReference:e,outSpatialReference:i,geographicTransformation:n,resolve:(0,r.Tw)()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;const t=this._jobs.shift();if(!t)return;const{geometries:e,inSpatialReference:i,outSpatialReference:n,resolve:r,geographicTransformation:p}=t;(0,l.y7)(i,n)?(0,a.K8)(n)?r(e.map(y)):r(e.map(h)):r((0,s.projectMany)(o.g,e,i,n,p,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(t,e,i,n){return v.push(t,e,i,n)}},58727:(t,e,i)=>{i.d(e,{GC:()=>y,T2:()=>h,VY:()=>c,dO:()=>v,iJ:()=>d,v8:()=>m});var n=i(66552),r=i(83047),s=i(57251),o=i(90634),a=i(65864),l=i(17136),p=i(21325),u=i(31464);const c=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({});async function d(t,e,i){const n=t.bin,{onField:r,expression:s,splitBy:o,splitByField:a,splitByAlias:l,stackBy:p,stackByField:u,stackByAlias:c}=n;return r&&(n.onField=r.trim()),s&&(n.expression=s.trim()),o&&(n.splitBy=o.trim()),a&&(n.splitByField=a.trim()),l&&(n.splitByAlias=l.trim()),p&&(n.stackBy=p.trim()),u&&(n.stackByField=u.trim()),c&&(n.stackByAlias=c.trim()),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),y(t,e,i)}async function y(t,e,i){const{outFields:n,orderByFields:r,groupByFieldsForStatistics:s,outStatistics:o}=t;if(n)for(let t=0;t<n.length;t++)n[t]=n[t].trim();if(r)for(let t=0;t<r.length;t++)r[t]=r[t].trim();if(s)for(let t=0;t<s.length;t++)s[t]=s[t].trim();if(o)for(let t=0;t<o.length;t++)o[t].onStatisticField&&(o[t].onStatisticField=o[t].onStatisticField.trim());return t.geometry&&!t.outSR&&(t.outSR=t.geometry.spatialReference),h(t,e,i)}async function h(t,e,n){if(!t)return null;let{where:s}=t;if(t.where=s=s?.trim(),(!s||/^1 *= *1$/.test(s)||e&&e===s)&&(t.where=null),!t.geometry)return t;let d=await async function(t){const{distance:e,units:n}=t,s=t.geometry;if(null==e||"vertexAttributes"in s)return s;const o=s.spatialReference,a=n?c.fromJSON(n):(0,r.Ij)(o),l=o&&((0,p.EA)(o)||(0,p.K8)(o))?s:await(0,u.Nk)(o,p.KK).then((()=>(0,u.Cv)(s,p.KK))),m=await i.e(6165).then(i.bind(i,86165));return await m.load(),m.execute(l,e,{unit:a})??void 0}(t);if(t.distance=0,t.units=null,"esriSpatialRelEnvelopeIntersects"===t.spatialRel){const{spatialReference:e}=t.geometry;d=(0,o.HA)(d),d.spatialReference=e}if(d){await(0,u.Nk)(d.spatialReference,n),d=function(t,e){const i=t.spatialReference;return f(t,e)&&(0,a.ZC)(t)?{spatialReference:i,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:t}(d,n);const e=(await(0,l.el)((0,a.rS)(d)))[0];if(null==e)throw m;const i="quantizationParameters"in t&&t.quantizationParameters?.tolerance||"maxAllowableOffset"in t&&t.maxAllowableOffset||0,r=i&&f(d,n)?{densificationStep:8*i}:void 0,s=e.toJSON(),o=(0,u.Cv)(s,s.spatialReference,n,r);if(!o)throw m;o.spatialReference=n,t.geometry=o}return t}function f(t,e){if(!t)return!1;const i=t.spatialReference;return((0,a.ZC)(t)||(0,a.Bi)(t)||(0,a.Rg)(t))&&!(0,p.aI)(i,e)&&!(0,s.canProjectWithoutEngine)(i,e)}function v(t,e){return null==t?null:"string"==typeof t?e?new Date(`1970-01-01T${t}Z`).getTime():new Date(t).getTime():t instanceof Date?t.getTime():t}},14575:(t,e,i)=>{i.r(e),i.d(e,{default:()=>b});var n=i(90237),r=i(59456),s=i(69540),o=i(66552),a=i(25482),l=i(53966),p=i(10107),u=i(56507),c=(i(87811),i(44208),i(93223)),m=i(40608),d=i(65864),y=i(58727),h=i(5834),f=i(53275),v=i(59977),g=i(11440),x=i(60909),w=i(58174),M=i(7562),_=i(56400),B=i(16930);const Z=new o.J({asc:"ascending",desc:"descending"}),A={base:f.A,key:"type",typeMap:{"auto-interval":h.A,date:v.A,"fixed-boundaries":g.A,"fixed-interval":x.A}};let S=class extends(s.A.ClonableMixin(a.A)){constructor(t){super(t),this.binParameters=null,this.binOrder="ascending",this.cacheHint=void 0,this.datumTransformation=null,this.defaultSpatialReference=null,this.distance=void 0,this.geometry=null,this.lowerBoundaryAlias=null,this.outSpatialReference=null,this.outStatistics=null,this.returnDistinctValues=null,this.spatialRelationship="intersects",this.upperBoundaryAlias=null,this.units=null,this.where="1=1"}set outTimeZone(t){this._set("outTimeZone",t),t&&!(0,_.wr)(t)&&l.A.getLogger(this).warn("#outTimeZone",`the parsed value '${t}' may not be a valid IANA time zone`)}};(0,n._)([(0,p.MZ)({types:A,json:{name:"bin",write:!0}})],S.prototype,"binParameters",void 0),(0,n._)([(0,c.e)(Z)],S.prototype,"binOrder",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"cacheHint",void 0),(0,n._)([(0,p.MZ)({json:{write:!0}})],S.prototype,"datumTransformation",void 0),(0,n._)([(0,p.MZ)({type:B.A,json:{name:"defaultSR",write:!0}})],S.prototype,"defaultSpatialReference",void 0),(0,n._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],S.prototype,"distance",void 0),(0,n._)([(0,p.MZ)({types:r.yR,json:{read:d.rS,write:!0}})],S.prototype,"geometry",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],S.prototype,"lowerBoundaryAlias",void 0),(0,n._)([(0,p.MZ)({type:B.A,json:{name:"outSR",write:!0}})],S.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.MZ)({type:[M.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],S.prototype,"outStatistics",void 0),(0,n._)([(0,p.MZ)({value:null,json:{name:"outTimeReference",read:{reader:t=>t.ianaTimeZone},write:{writer:(t,e,i)=>{t&&(e[i]={ianaTimeZone:t})}}}})],S.prototype,"outTimeZone",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"returnDistinctValues",void 0),(0,n._)([(0,c.e)(w.x,{name:"spatialRel"})],S.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],S.prototype,"upperBoundaryAlias",void 0),(0,n._)([(0,p.MZ)({type:String,json:{read:y.VY.read,write:{writer:y.VY.write,overridePolicy(t){return{enabled:null!=t&&null!=this.distance&&this.distance>0}}}}})],S.prototype,"units",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=(0,n._)([(0,m.$)("esri.rest.support.AttributeBinsQuery")],S);const b=S;S.from=(0,u.dp)(S)},5834:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275),u=i(41366);function c(t,e,i){(0,r.sM)(i,t instanceof Date?t.getTime():t,e)}let m=class extends((0,u.K)(p.A)){constructor(t){super(t),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],m.prototype,"numBins",void 0),(0,n._)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:c}}})],m.prototype,"end",void 0),(0,n._)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:c}}})],m.prototype,"start",void 0),(0,n._)([(0,a.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],m.prototype,"type",void 0),m=(0,n._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],m);const d=m;m.from=(0,o.dp)(m)},53275:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(90237),r=i(69540),s=i(66552),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),p=i(40608),u=i(56507);let c=class extends(r.A.ClonableMixin(o.A)){constructor(t){super(t),this.alias=null,this.expression=null,this.field=null,this.responseType=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"responseType",void 0),c=(0,n._)([(0,p.$)("esri.rest.support.BinParametersAttributes")],c);const m=c;c.from=(0,u.dp)(c);const d=new s.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(o.A)){constructor(t){super(t),this.expression=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitByAttributes=null,this.stackByAttributes=null,this.transformation=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,n._)([(0,a.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,n._)([(0,a.MZ)({type:m,json:{write:{target:{splitBy:{type:String},splitByField:{type:String},splitByAlias:{type:String}},writer:(t,e)=>{null!=t.field&&(e.splitByField=t.field),null!=t.expression&&(e.splitBy=t.expression),null!=t.alias&&(e.splitByAlias=t.alias)}},read:{source:["splitBy","splitByField","splitByAlias"],reader:(t,e)=>new m({field:e.splitByField,expression:e.splitBy,alias:e.splitByAlias})}}})],y.prototype,"splitByAttributes",void 0),(0,n._)([(0,a.MZ)({type:m,json:{write:{target:{stackBy:{type:String},stackByField:{type:String},stackByAlias:{type:String},jsonStyle:{type:String}},writer:(t,e)=>{null!=t.field&&(e.stackByField=t.field),null!=t.expression&&(e.stackBy=t.expression),null!=t.alias&&(e.stackByAlias=t.alias),null!=t.responseType&&(e.jsonStyle=t.responseType)},overridePolicy(){return{enabled:null!=this.stackByAttributes?.field||null!=this.stackByAttributes?.expression}}},read:{source:["stackBy","stackByField","stackByAlias","jsonStyle"],reader:(t,e)=>new m({field:e.stackByField,expression:e.stackBy,alias:e.stackByAlias,responseType:e.jsonStyle})}}})],y.prototype,"stackByAttributes",void 0),(0,n._)([(0,l.e)(d)],y.prototype,"transformation",void 0),y=(0,n._)([(0,p.$)("esri.rest.support.BinParametersBase")],y);const h=y},59977:(t,e,i)=>{i.d(e,{A:()=>x});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275),u=i(69540),c=i(66552),m=i(25482);const d=(0,c.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let y=class extends(u.A.ClonableMixin(m.A)){constructor(t){super(t),this.value=null,this.unit=null}};(0,n._)([(0,s.MZ)({type:Number,json:{name:"number",write:!0}})],y.prototype,"value",void 0),(0,n._)([(0,a.e)(d)],y.prototype,"unit",void 0),y=(0,n._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],y);const h=y;function f(t,e,i){(0,r.sM)(i,"string"==typeof t?t:t?.getTime(),e)}function v(t,e){const i=t.parameters[e];return i?"string"==typeof i?i:new Date(i):null}y.from=(0,o.dp)(y);let g=class extends p.A{constructor(t){super(t),this.end=null,this.interval=null,this.offset=null,this.start=null,this.type="date"}};(0,n._)([(0,s.MZ)({cast:t=>t?"string"==typeof t?t:new Date(t):null,json:{name:"parameters.end",read:{reader:(t,e)=>v(e,"end")},write:{writer:f}}})],g.prototype,"end",void 0),(0,n._)([(0,s.MZ)({type:h,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,n._)([(0,s.MZ)({type:h,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,n._)([(0,s.MZ)({cast:t=>t?"string"==typeof t?t:new Date(t):null,json:{name:"parameters.start",read:{reader:(t,e)=>v(e,"start")},write:{writer:f}}})],g.prototype,"start",void 0),(0,n._)([(0,a.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,n._)([(0,l.$)("esri.rest.support.DateBinParameters")],g);const x=g;g.from=(0,o.dp)(g)},11440:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275);let u=class extends p.A{constructor(t){super(t),this.boundaries=null,this.type="fixed-boundaries"}};(0,n._)([(0,s.MZ)({json:{name:"parameters.boundaries",write:{writer:function(t,e,i){(0,r.sM)(i,t&&function(t){return t[0]instanceof Date}(t)?t.map((t=>t.getTime())):t,e)}}}})],u.prototype,"boundaries",void 0),(0,n._)([(0,a.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],u);const c=u;u.from=(0,o.dp)(u)},60909:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275),u=i(41366);function c(t,e,i){(0,r.sM)(i,t instanceof Date?t.getTime():t,e)}let m=class extends((0,u.K)(p.A)){constructor(t){super(t),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n._)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:c}}})],m.prototype,"end",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],m.prototype,"interval",void 0),(0,n._)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:c}}})],m.prototype,"start",void 0),(0,n._)([(0,a.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],m.prototype,"type",void 0),m=(0,n._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],m);const d=m;m.from=(0,o.dp)(m)},41366:(t,e,i)=>{i.d(e,{K:()=>m});var n=i(90237),r=i(66552),s=i(53966),o=i(10107),a=(i(44208),i(87811),i(93223)),l=i(40608);const p=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",m=t=>{let e=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let t=this._get("normalizationType");const e=!!this.normalizationField,i=null!=this.normalizationTotal;return e||i?(t=e&&c||i&&u||null,e&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):t!==c&&t!==u||(t=null),t}set normalizationType(t){this._set("normalizationType",t)}};return(0,n._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],e.prototype,"normalizationField",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],e.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],e.prototype,"normalizationMinValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],e.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(p,{name:"parameters.normalizationType"})],e.prototype,"normalizationType",null),e=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],e),e}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4575],{7320:(t,e,i)=>{i.d(e,{g:()=>n});const n={convertToGEGeometry:function(t,e){return null==e?null:t.convertJSONToGeometry(e)},exportPoint:function(t,e,i){const n=new r(t.getPointX(e),t.getPointY(e),i),s=t.hasZ(e),o=t.hasM(e);return s&&(n.z=t.getPointZ(e)),o&&(n.m=t.getPointM(e)),n},exportPolygon:function(t,e,i){return new s(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))},exportPolyline:function(t,e,i){return new o(t.exportPaths(e),i,t.hasZ(e),t.hasM(e))},exportMultipoint:function(t,e,i){return new a(t.exportPoints(e),i,t.hasZ(e),t.hasM(e))},exportExtent:function(t,e,i){const n=t.hasZ(e),r=t.hasM(e),s=new l(t.getXMin(e),t.getYMin(e),t.getXMax(e),t.getYMax(e),i);if(n){const i=t.getZExtent(e);s.zmin=i.vmin,s.zmax=i.vmax}if(r){const i=t.getMExtent(e);s.mmin=i.vmin,s.mmax=i.vmax}return s}};class r{constructor(t,e,i){this.x=t,this.y=e,this.spatialReference=i,this.z=void 0,this.m=void 0}}class s{constructor(t,e,i,n){this.rings=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class o{constructor(t,e,i,n){this.paths=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class a{constructor(t,e,i,n){this.points=t,this.spatialReference=e,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),n&&(this.hasM=n)}}class l{constructor(t,e,i,n,r){this.xmin=t,this.ymin=e,this.xmax=i,this.ymax=n,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},31464:(t,e,i)=>{i.d(e,{Cv:()=>f,Nk:()=>d,lK:()=>g});var n=i(4576),r=i(74887),s=i(57251),o=i(7320),a=i(21325),l=i(28735);const p=[0,0];function u(t,e){if(!e)return null;if("x"in e){const i={x:0,y:0};return[i.x,i.y]=t(e.x,e.y,p),null!=e.z&&(i.z=e.z),null!=e.m&&(i.m=e.m),i}if("xmin"in e){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=t(e.xmin,e.ymin,p),[i.xmax,i.ymax]=t(e.xmax,e.ymax,p),e.hasZ&&(i.zmin=e.zmin,i.zmax=e.zmax,i.hasZ=!0),e.hasM&&(i.mmin=e.mmin,i.mmax=e.mmax,i.hasM=!0),i}return"rings"in e?{rings:c(e.rings,t),hasM:e.hasM,hasZ:e.hasZ}:"paths"in e?{paths:c(e.paths,t),hasM:e.hasM,hasZ:e.hasZ}:"points"in e?{points:m(e.points,t),hasM:e.hasM,hasZ:e.hasZ}:null}function c(t,e){const i=[];for(const n of t)i.push(m(n,e));return i}function m(t,e){const i=[];for(const n of t){const t=e(n[0],n[1],[0,0]);i.push(t),n.length>2&&t.push(n[2]),n.length>3&&t.push(n[3])}return i}async function d(t,e){if(!t||!e)return;const i=Array.isArray(t)?t.map((t=>null!=t.geometry?t.geometry.spatialReference:null)).filter(n.Ru):[t];await(0,s.initializeProjection)(i.map((t=>({source:t,dest:e}))))}const y=u.bind(null,l.je),h=u.bind(null,l.tD);function f(t,e,i,n){if(!t)return null;if(i||(i=e,e=t.spatialReference),!(0,a.fn)(e)||!(0,a.fn)(i)||(0,a.aI)(e,i))return t;if((0,l.y7)(e,i)){const e=(0,a.K8)(i)?y(t):h(t);return e.spatialReference=i,e}return(0,s.projectMany)(o.g,[t],e,i,null,n)[0]}const v=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(t,e,i,n){if(!t?.length||!e||!i||(0,a.aI)(e,i))return t;const s={geometries:t,inSpatialReference:e,outSpatialReference:i,geographicTransformation:n,resolve:(0,r.Tw)()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;const t=this._jobs.shift();if(!t)return;const{geometries:e,inSpatialReference:i,outSpatialReference:n,resolve:r,geographicTransformation:p}=t;(0,l.y7)(i,n)?(0,a.K8)(n)?r(e.map(y)):r(e.map(h)):r((0,s.projectMany)(o.g,e,i,n,p,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function g(t,e,i,n){return v.push(t,e,i,n)}},58727:(t,e,i)=>{i.d(e,{GC:()=>y,T2:()=>h,VY:()=>c,dO:()=>v,iJ:()=>d,v8:()=>m});var n=i(66552),r=i(83047),s=i(57251),o=i(90634),a=i(65864),l=i(17136),p=i(21325),u=i(31464);const c=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({});async function d(t,e,i){const n=t.bin,{onField:r,expression:s,splitBy:o,splitByField:a,splitByAlias:l,stackBy:p,stackByField:u,stackByAlias:c}=n;return r&&(n.onField=r.trim()),s&&(n.expression=s.trim()),o&&(n.splitBy=o.trim()),a&&(n.splitByField=a.trim()),l&&(n.splitByAlias=l.trim()),p&&(n.stackBy=p.trim()),u&&(n.stackByField=u.trim()),c&&(n.stackByAlias=c.trim()),"normalizationField"in n.parameters&&n.parameters.normalizationField&&(n.parameters.normalizationField=n.parameters.normalizationField.trim()),y(t,e,i)}async function y(t,e,i){const{outFields:n,orderByFields:r,groupByFieldsForStatistics:s,outStatistics:o}=t;if(n)for(let t=0;t<n.length;t++)n[t]=n[t].trim();if(r)for(let t=0;t<r.length;t++)r[t]=r[t].trim();if(s)for(let t=0;t<s.length;t++)s[t]=s[t].trim();if(o)for(let t=0;t<o.length;t++)o[t].onStatisticField&&(o[t].onStatisticField=o[t].onStatisticField.trim());return t.geometry&&!t.outSR&&(t.outSR=t.geometry.spatialReference),h(t,e,i)}async function h(t,e,n){if(!t)return null;let{where:s}=t;if(t.where=s=s?.trim(),(!s||/^1 *= *1$/.test(s)||e&&e===s)&&(t.where=null),!t.geometry)return t;let d=await async function(t){const{distance:e,units:n}=t,s=t.geometry;if(null==e||"vertexAttributes"in s)return s;const o=s.spatialReference,a=n?c.fromJSON(n):(0,r.Ij)(o),l=o&&((0,p.EA)(o)||(0,p.K8)(o))?s:await(0,u.Nk)(o,p.KK).then((()=>(0,u.Cv)(s,p.KK))),m=await i.e(6165).then(i.bind(i,86165));return await m.load(),m.execute(l,e,{unit:a})??void 0}(t);if(t.distance=0,t.units=null,"esriSpatialRelEnvelopeIntersects"===t.spatialRel){const{spatialReference:e}=t.geometry;d=(0,o.HA)(d),d.spatialReference=e}if(d){await(0,u.Nk)(d.spatialReference,n),d=function(t,e){const i=t.spatialReference;return f(t,e)&&(0,a.ZC)(t)?{spatialReference:i,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:t}(d,n);const e=(await(0,l.el)((0,a.rS)(d)))[0];if(null==e)throw m;const i="quantizationParameters"in t&&t.quantizationParameters?.tolerance||"maxAllowableOffset"in t&&t.maxAllowableOffset||0,r=i&&f(d,n)?{densificationStep:8*i}:void 0,s=e.toJSON(),o=(0,u.Cv)(s,s.spatialReference,n,r);if(!o)throw m;o.spatialReference=n,t.geometry=o}return t}function f(t,e){if(!t)return!1;const i=t.spatialReference;return((0,a.ZC)(t)||(0,a.Bi)(t)||(0,a.Rg)(t))&&!(0,p.aI)(i,e)&&!(0,s.canProjectWithoutEngine)(i,e)}function v(t,e){return null==t?null:"string"==typeof t?e?new Date(`1970-01-01T${t}Z`).getTime():new Date(t).getTime():t instanceof Date?t.getTime():t}},14575:(t,e,i)=>{i.r(e),i.d(e,{default:()=>b});var n=i(90237),r=i(59456),s=i(69540),o=i(66552),a=i(25482),l=i(53966),p=i(10107),u=i(56507),c=(i(87811),i(44208),i(93223)),m=i(40608),d=i(65864),y=i(58727),h=i(5834),f=i(53275),v=i(59977),g=i(11440),x=i(60909),w=i(58174),M=i(7562),_=i(56400),B=i(16930);const Z=new o.J({asc:"ascending",desc:"descending"}),A={base:f.A,key:"type",typeMap:{"auto-interval":h.A,date:v.A,"fixed-boundaries":g.A,"fixed-interval":x.A}};let S=class extends(s.A.ClonableMixin(a.A)){constructor(t){super(t),this.binParameters=null,this.binOrder="ascending",this.cacheHint=void 0,this.datumTransformation=null,this.defaultSpatialReference=null,this.distance=void 0,this.geometry=null,this.lowerBoundaryAlias=null,this.outSpatialReference=null,this.outStatistics=null,this.returnDistinctValues=null,this.spatialRelationship="intersects",this.upperBoundaryAlias=null,this.units=null,this.where="1=1"}set outTimeZone(t){this._set("outTimeZone",t),t&&!(0,_.wr)(t)&&l.A.getLogger(this).warn("#outTimeZone",`the parsed value '${t}' may not be a valid IANA time zone`)}};(0,n._)([(0,p.MZ)({types:A,json:{name:"bin",write:!0}})],S.prototype,"binParameters",void 0),(0,n._)([(0,c.e)(Z)],S.prototype,"binOrder",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"cacheHint",void 0),(0,n._)([(0,p.MZ)({json:{write:!0}})],S.prototype,"datumTransformation",void 0),(0,n._)([(0,p.MZ)({type:B.A,json:{name:"defaultSR",write:!0}})],S.prototype,"defaultSpatialReference",void 0),(0,n._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],S.prototype,"distance",void 0),(0,n._)([(0,p.MZ)({types:r.yR,json:{read:d.rS,write:!0}})],S.prototype,"geometry",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],S.prototype,"lowerBoundaryAlias",void 0),(0,n._)([(0,p.MZ)({type:B.A,json:{name:"outSR",write:!0}})],S.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.MZ)({type:[M.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],S.prototype,"outStatistics",void 0),(0,n._)([(0,p.MZ)({value:null,json:{name:"outTimeReference",read:{reader:t=>t.ianaTimeZone},write:{writer:(t,e,i)=>{t&&(e[i]={ianaTimeZone:t})}}}})],S.prototype,"outTimeZone",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:!0}})],S.prototype,"returnDistinctValues",void 0),(0,n._)([(0,c.e)(w.x,{name:"spatialRel"})],S.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],S.prototype,"upperBoundaryAlias",void 0),(0,n._)([(0,p.MZ)({type:String,json:{read:y.VY.read,write:{writer:y.VY.write,overridePolicy(t){return{enabled:null!=t&&null!=this.distance&&this.distance>0}}}}})],S.prototype,"units",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],S.prototype,"where",void 0),S=(0,n._)([(0,m.$)("esri.rest.support.AttributeBinsQuery")],S);const b=S;S.from=(0,u.dp)(S)},5834:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275),u=i(41366);function c(t,e,i){(0,r.sM)(i,t instanceof Date?t.getTime():t,e)}let m=class extends((0,u.K)(p.A)){constructor(t){super(t),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],m.prototype,"numBins",void 0),(0,n._)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:c}}})],m.prototype,"end",void 0),(0,n._)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:c}}})],m.prototype,"start",void 0),(0,n._)([(0,a.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],m.prototype,"type",void 0),m=(0,n._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],m);const d=m;m.from=(0,o.dp)(m)},53275:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(90237),r=i(69540),s=i(66552),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),p=i(40608),u=i(56507);let c=class extends(r.A.ClonableMixin(o.A)){constructor(t){super(t),this.alias=null,this.expression=null,this.field=null,this.responseType=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"responseType",void 0),c=(0,n._)([(0,p.$)("esri.rest.support.BinParametersAttributes")],c);const m=c;c.from=(0,u.dp)(c);const d=new s.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(o.A)){constructor(t){super(t),this.expression=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitByAttributes=null,this.stackByAttributes=null,this.transformation=null}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"expression",void 0),(0,n._)([(0,a.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,n._)([(0,a.MZ)({type:m,json:{write:{target:{splitBy:{type:String},splitByField:{type:String},splitByAlias:{type:String}},writer:(t,e)=>{null!=t.field&&(e.splitByField=t.field),null!=t.expression&&(e.splitBy=t.expression),null!=t.alias&&(e.splitByAlias=t.alias)}},read:{source:["splitBy","splitByField","splitByAlias"],reader:(t,e)=>new m({field:e.splitByField,expression:e.splitBy,alias:e.splitByAlias})}}})],y.prototype,"splitByAttributes",void 0),(0,n._)([(0,a.MZ)({type:m,json:{write:{target:{stackBy:{type:String},stackByField:{type:String},stackByAlias:{type:String},jsonStyle:{type:String}},writer:(t,e)=>{null!=t.field&&(e.stackByField=t.field),null!=t.expression&&(e.stackBy=t.expression),null!=t.alias&&(e.stackByAlias=t.alias),null!=t.responseType&&(e.jsonStyle=t.responseType)},overridePolicy(){return{enabled:null!=this.stackByAttributes?.field||null!=this.stackByAttributes?.expression}}},read:{source:["stackBy","stackByField","stackByAlias","jsonStyle"],reader:(t,e)=>new m({field:e.stackByField,expression:e.stackBy,alias:e.stackByAlias,responseType:e.jsonStyle})}}})],y.prototype,"stackByAttributes",void 0),(0,n._)([(0,l.e)(d)],y.prototype,"transformation",void 0),y=(0,n._)([(0,p.$)("esri.rest.support.BinParametersBase")],y);const h=y},59977:(t,e,i)=>{i.d(e,{A:()=>x});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275),u=i(69540),c=i(66552),m=i(25482);const d=(0,c.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let y=class extends(u.A.ClonableMixin(m.A)){constructor(t){super(t),this.value=null,this.unit=null}};(0,n._)([(0,s.MZ)({type:Number,json:{name:"number",write:!0}})],y.prototype,"value",void 0),(0,n._)([(0,a.e)(d)],y.prototype,"unit",void 0),y=(0,n._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],y);const h=y;function f(t,e,i){(0,r.sM)(i,"string"==typeof t?t:t?.getTime(),e)}function v(t,e){const i=t.parameters[e];return i?"string"==typeof i?i:new Date(i):null}y.from=(0,o.dp)(y);let g=class extends p.A{constructor(t){super(t),this.end=null,this.interval=null,this.offset=null,this.start=null,this.type="date"}};(0,n._)([(0,s.MZ)({cast:t=>t?"string"==typeof t?t:new Date(t):null,json:{name:"parameters.end",read:{reader:(t,e)=>v(e,"end")},write:{writer:f}}})],g.prototype,"end",void 0),(0,n._)([(0,s.MZ)({type:h,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,n._)([(0,s.MZ)({type:h,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,n._)([(0,s.MZ)({cast:t=>t?"string"==typeof t?t:new Date(t):null,json:{name:"parameters.start",read:{reader:(t,e)=>v(e,"start")},write:{writer:f}}})],g.prototype,"start",void 0),(0,n._)([(0,a.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,n._)([(0,l.$)("esri.rest.support.DateBinParameters")],g);const x=g;g.from=(0,o.dp)(g)},11440:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275);let u=class extends p.A{constructor(t){super(t),this.boundaries=[],this.type="fixed-boundaries"}};(0,n._)([(0,s.MZ)({json:{name:"parameters.boundaries",write:{writer:function(t,e,i){(0,r.sM)(i,t&&function(t){return t[0]instanceof Date}(t)?t.map((t=>t.getTime())):t,e)}}}})],u.prototype,"boundaries",void 0),(0,n._)([(0,a.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,n._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],u);const c=u;u.from=(0,o.dp)(u)},60909:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(90237),r=i(93637),s=i(10107),o=i(56507),a=(i(87811),i(44208),i(93223)),l=i(40608),p=i(53275),u=i(41366);function c(t,e,i){(0,r.sM)(i,t instanceof Date?t.getTime():t,e)}let m=class extends((0,u.K)(p.A)){constructor(t){super(t),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,n._)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:c}}})],m.prototype,"end",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],m.prototype,"interval",void 0),(0,n._)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:c}}})],m.prototype,"start",void 0),(0,n._)([(0,a.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],m.prototype,"type",void 0),m=(0,n._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],m);const d=m;m.from=(0,o.dp)(m)},41366:(t,e,i)=>{i.d(e,{K:()=>m});var n=i(90237),r=i(66552),s=i(53966),o=i(10107),a=(i(44208),i(87811),i(93223)),l=i(40608);const p=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",m=t=>{let e=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let t=this._get("normalizationType");const e=!!this.normalizationField,i=null!=this.normalizationTotal;return e||i?(t=e&&c||i&&u||null,e&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):t!==c&&t!==u||(t=null),t}set normalizationType(t){this._set("normalizationType",t)}};return(0,n._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],e.prototype,"normalizationField",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],e.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],e.prototype,"normalizationMinValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],e.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(p,{name:"parameters.normalizationType"})],e.prototype,"normalizationType",null),e=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],e),e}}}]);
|