@arcgis/core 4.34.4 → 4.34.6

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.
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{createArcadeProfile as e,createArcadeExecutor as r}from"../../../../arcade.js";import o from"../../../../core/Accessor.js";import{debounce as s}from"../../../../core/promiseUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{fixFields as n}from"../../../../layers/support/fieldUtils.js";var u;const c=Symbol("FormExpressionArcadeExecutor");let p=class extends o{static{u=c}constructor(t){super(t),this[u]=!0,this._lastEvaluatedValue=null,this._abortController=new AbortController,this._initialExecutionComplete=!1,this._stale=!1,this._updatingTracking=new a,this._executeAsyncDebounced=s(async(t,e,r)=>{const o=await this.executor.executeAsync(t,{...e,abortSignal:r});return r.aborted?this._lastEvaluatedValue:(this._lastEvaluatedValue=o,this._stale=!1,o)})}get initialExecutionComplete(){return this._initialExecutionComplete}get isAsync(){return this.executor.isAsync}get fieldsUsed(){return this.executor.fieldsUsed}get syntaxTree(){return this.executor.syntaxTree}get updating(){return this._updatingTracking.updating}get stale(){return this._stale}get geometryUsed(){return this.executor.geometryUsed}get variablesUsed(){return this.executor.variablesUsed}get lastEvaluatedValue(){return this._lastEvaluatedValue}abort(){this._abortController.abort()}execute(t,e){this._abortController=new AbortController;const r=this.executor.execute(t,{...e,abortSignal:this._abortController.signal});return this._lastEvaluatedValue=r,this._initialExecutionComplete=!0,r}async executeAsync(t,e){return this._abortController=new AbortController,this._updatingTracking.addPromise(this._executeAsyncDebounced(t,e??{},this._abortController.signal).then(()=>{this._initialExecutionComplete=!0}))}markStale(){this._stale=!0}reset(){this.abort(),this._lastEvaluatedValue=null,this._stale=!1}};t([i()],p.prototype,"_lastEvaluatedValue",void 0),t([i()],p.prototype,"_initialExecutionComplete",void 0),t([i()],p.prototype,"_stale",void 0),t([i()],p.prototype,"_updatingTracking",void 0),t([i({constructOnly:!0})],p.prototype,"executor",void 0),t([i()],p.prototype,"initialExecutionComplete",null),t([i()],p.prototype,"isAsync",null),t([i()],p.prototype,"fieldsUsed",null),t([i()],p.prototype,"syntaxTree",null),t([i()],p.prototype,"updating",null),t([i()],p.prototype,"stale",null),t([i()],p.prototype,"geometryUsed",null),t([i()],p.prototype,"variablesUsed",null),t([i()],p.prototype,"lastEvaluatedValue",null),p=t([l("esri.widgets.support.forms.expressions.FormExpressionArcadeExecutor")],p);const d=async(t,o)=>{const s=e("form-calculation"),i=await r(t,s,{});return o?.fieldsIndex&&(i.fieldsUsed=n(o.fieldsIndex,i.fieldsUsed)),new p({executor:i})};export{p as FormExpressionArcadeExecutor,d as createFormExpressionArcadeExecutor};
5
+ import{__decorate as t}from"tslib";import{createArcadeProfile as e,createArcadeExecutor as r}from"../../../../arcade.js";import o from"../../../../core/Accessor.js";import{debounce as s}from"../../../../core/promiseUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{fixFields as n}from"../../../../layers/support/fieldUtils.js";var u;const c=Symbol("FormExpressionArcadeExecutor");let p=class extends o{static{u=c}constructor(t){super(t),this[u]=!0,this._lastEvaluatedValue=null,this._abortController=new AbortController,this._initialExecutionComplete=!1,this._stale=!1,this._updatingTracking=new a,this._executeAsyncDebounced=s(async(t,e,r)=>{const o=await this.executor.executeAsync(t,{...e,abortSignal:r});return r.aborted?this._lastEvaluatedValue:(this._lastEvaluatedValue=o,this._initialExecutionComplete=!0,this._stale=!1,o)})}get initialExecutionComplete(){return this._initialExecutionComplete}get isAsync(){return this.executor.isAsync}get fieldsUsed(){return this.executor.fieldsUsed}get syntaxTree(){return this.executor.syntaxTree}get updating(){return this._updatingTracking.updating}get stale(){return this._stale}get geometryUsed(){return this.executor.geometryUsed}get variablesUsed(){return this.executor.variablesUsed}get lastEvaluatedValue(){return this._lastEvaluatedValue}abort(){this._abortController.abort()}execute(t,e){this._abortController=new AbortController;const r=this.executor.execute(t,{...e,abortSignal:this._abortController.signal});return this._lastEvaluatedValue=r,this._initialExecutionComplete=!0,r}async executeAsync(t,e){return this._abortController=new AbortController,this._updatingTracking.addPromise(this._executeAsyncDebounced(t,e??{},this._abortController.signal))}markStale(){this._stale=!0}reset(){this.abort(),this._lastEvaluatedValue=null,this._stale=!1}};t([i()],p.prototype,"_lastEvaluatedValue",void 0),t([i()],p.prototype,"_initialExecutionComplete",void 0),t([i()],p.prototype,"_stale",void 0),t([i()],p.prototype,"_updatingTracking",void 0),t([i({constructOnly:!0})],p.prototype,"executor",void 0),t([i()],p.prototype,"initialExecutionComplete",null),t([i()],p.prototype,"isAsync",null),t([i()],p.prototype,"fieldsUsed",null),t([i()],p.prototype,"syntaxTree",null),t([i()],p.prototype,"updating",null),t([i()],p.prototype,"stale",null),t([i()],p.prototype,"geometryUsed",null),t([i()],p.prototype,"variablesUsed",null),t([i()],p.prototype,"lastEvaluatedValue",null),p=t([l("esri.widgets.support.forms.expressions.FormExpressionArcadeExecutor")],p);const d=async(t,o)=>{const s=e("form-calculation"),i=await r(t,s,{});return o?.fieldsIndex&&(i.fieldsUsed=n(o.fieldsIndex,i.fieldsUsed)),new p({executor:i})};export{p as FormExpressionArcadeExecutor,d as createFormExpressionArcadeExecutor};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8720],{54625:(e,t,s)=>{s.d(t,{i_:()=>r});var i=s(30524);function r(e,t,s){t=(0,i.rS)(t)?.toLowerCase(),s=(0,i.rS)(s)?.toLowerCase();const r=e.map(e=>e.toLowerCase()),a=t?e[r.indexOf(t)]:null,u=s?e[r.indexOf(s)]:null;return{longitudeFieldName:a||e[r.indexOf(n.find(e=>r.includes(e)))],latitudeFieldName:u||e[r.indexOf(o.find(e=>r.includes(e)))]}}const o=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],n=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,n){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const u=1+Math.max(n,-4)- -3;this._db.set(t,new o(s,r,u)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forEach(s=>{const{id:r,name:o}=s;if(i.startsWith(r)){const s=t[o]||0;t[o]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._users.get(e.split(n)[0])?.removeFunc,o=r?.(t,i,s);return"number"==typeof o?o:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[o,a]of this._db)if(0===a.lifetime&&(!i||o.startsWith(i))){const i=t??this._users.get(o.split(n)[0]);if(this._purgeItem(o,a,i),s.size<=.9*e)return;r||=this._db.has(o)}}for(const[r,o]of this._db)if(!i||r.startsWith(i)){const i=t??this._users.get(r.split(n)[0]);if(this._purgeItem(r,o,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class o{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const n=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68716:(e,t,s)=>{s.r(t),s.d(t,{default:()=>D});var i=s(31635),r=s(7762),o=s(21818),n=s(49186),a=s(44208),u=s(53966),l=s(563),c=s(16930),p=s(70328),d=s(56390),f=s(8384),h=s(64714),y=s(20437),m=s(95466),g=s(30524),_=s(25482),S=s(10107),w=(s(87811),s(64108));let z=class extends _.o{constructor(e){super(e),this.type="location",this.latitudeFieldName=null,this.longitudeFieldName=null}};(0,i.Cg)([(0,S.MZ)({type:["location"],readOnly:!0,json:{write:!0}})],z.prototype,"type",void 0),(0,i.Cg)([(0,S.MZ)({json:{write:!0}})],z.prototype,"latitudeFieldName",void 0),(0,i.Cg)([(0,S.MZ)({json:{write:!0}})],z.prototype,"longitudeFieldName",void 0),z=(0,i.Cg)([(0,w.$)("esri.layers.support.ParquetEncodingLocation")],z);let b=class extends _.o{constructor(e){super(e),this.type="wkb",this.primaryFieldName=null}};function x(e){switch(e.type){case"wkb":return b.fromJSON(e);case"location":return z.fromJSON(e)}}(0,i.Cg)([(0,S.MZ)({type:["wkb"],readOnly:!0,json:{write:!0}})],b.prototype,"type",void 0),(0,i.Cg)([(0,S.MZ)({json:{write:!0}})],b.prototype,"orientation",void 0),(0,i.Cg)([(0,S.MZ)({json:{write:!0}})],b.prototype,"primaryFieldName",void 0),b=(0,i.Cg)([(0,w.$)("esri.layers.support.ParquetEncodingWkb")],b);var R=s(66552),I=s(54625),v=s(70581);const F=new R.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function C(e){return F.toJSON(e)}function A(e){return F.fromJSON(e)}function O(e,t){if(null!=e){const t=e.primary_column,s=e.columns[t];return new b({primaryFieldName:t,orientation:s.orientation??null})}const s=(0,I.i_)(t.map(e=>e.name));return s.latitudeFieldName&&s.latitudeFieldName?new z({latitudeFieldName:s.latitudeFieldName,longitudeFieldName:s.longitudeFieldName}):null}function q(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}var M=s(30661),P=s(28923),k=s(44320),N=s(35258),E=s(16630);const T=new M.Z,G=8e3,Q="__OBJECTID";class D{constructor(){this._fileInfos=new Map,this._queue=new l.QueueProcessor({concurrency:4,process:(e,t)=>this._executeQuery(e,t)})}async load(e){const t=e.spatialReference?c.A.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");const s=await async function(e,t={}){if(e.geometryType&&e.spatialReference&&e.encoding&&e.fields)return e;if(e.urls.length<1)throw new n.A("parquet:bad-input","At least one url must be specified",e);const s=await(0,v.DV)(e.urls.getItemAt(0),{getCustomParameters:()=>t.customParameters}),i=(0,v.hD)(s),r={...e,file:s};null==r.fields&&(r.fields=s.fields().map(e=>y.A.fromJSON({name:e.name,type:e.type}))),null==r.encoding&&(r.encoding=O(i,r.fields));const o=(0,v.Hj)(s);if(o)switch(o.mode){case"z":r.displayOptimization={mode:"z"};break;case"xz":{const e=o.multiscale;if(!e)throw new n.A("bad-format","XZ display optimization requires multiscale geometries");r.displayOptimization={mode:"xz",multiscale:e};break}}if(!r.encoding)return r;switch(r.encoding.type){case"location":null==r.spatialReference&&(r.spatialReference=c.A.WGS84),null==r.geometryType&&(r.geometryType="point");break;case"wkb":{if(!i)return r;const e=i.primary_column,t=i.columns[e];if(r.geometryType||(r.geometryType=function(e){const{geometry_types:t}=e,s=new Set;for(const e of t){const t=q(e);t&&s.add(t)}if(s.size>1)throw new n.A("unsupported","Parquet mixed geometry types are not support",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(t)),r.spatialReference||(r.spatialReference=function(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new c.A({wkid:t}):void 0}(t)),r.fields)for(const e of Object.keys(i.columns))r.fields=r.fields.filter(t=>t.name!==e)}}return r}({urls:new r.A(e.urls),fields:e.fields?.map(e=>y.A.fromJSON(e)),encoding:e.encoding?x(e.encoding):e.encoding,geometryType:e.geometryType?A(e.geometryType):null,spatialReference:t},{customParameters:e.customParameters});let o;if(s.geometryType&&s.encoding){if(!s.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(u.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=c.A.WGS84),o={geometryType:C(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.encoding.toJSON(),displayOptimization:s.displayOptimization}}this.setCustomParameters(e.customParameters),this._geometryInfo=o;const a=e.urls;for(const e of a){const t=await(0,v.DV)(e,{geometryInfo:o,outSpatialReference:null,getCustomParameters:()=>this._customParameters});this._fileInfos.set(e,{index:this._fileInfos.size,file:t})}this._capabilities=W(await this.getFileStatistics());const l=this._fileInfos.values().next().value?.file;if(!l)return{layerDefinition:{},capabilities:W(null)};const{fields:d}=s;if(null==d)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",d);d.push(new y.A({name:Q,type:"oid",alias:Q}));const f={fields:d.map(e=>({...e.toJSON(),column:l.columnForFieldName(e.name)})),timeZoneByFieldName:null},g=m.A.fromJSON(f);this._fieldsIndex=g;const _=C(s.geometryType??"point");if(this._metadata=N.i.createFeature({fieldsIndex:f,geometryType:_,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:o?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:o?.spatialReference??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},s.spatialReference&&(this._fullExtent=function(e,t){const s=(0,p.hZ)((0,p.vt)(),p.qv);for(const t of e){const e=(0,v.hD)(t.file);if(!e)return null;const i=e.columns[e.primary_column];if(!i.bbox)return null;const r=L(i.bbox);(0,p.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:t}}(this._fileInfos.values(),s.spatialReference.toJSON())),null==this._fullExtent&&"location"===s.encoding?.type){const{latitudeFieldName:e,longitudeFieldName:t}=s.encoding,r=this._fieldsIndex.get(e)?.column,o=this._fieldsIndex.get(t)?.column,n=(0,p.hZ)((0,p.vt)(),p.qv);for(const e of this._fileInfos.values())for(const t of e.file.rowGroups()){const e={stack:[],error:void 0,hasError:!1};try{const s=(0,i.mS)(e,t.columnDescriptorForAttribute(r),!1),a=(0,i.mS)(e,t.columnDescriptorForAttribute(o),!1),u=[a.minValue(),s.minValue(),a.maxValue(),s.maxValue()];(0,p.DC)(n,u),t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}this._fullExtent={xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:s.spatialReference?.toJSON()}}return{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(e=>e.toJSON()),drawingInfo:(0,h.F0)(_),extent:this._fullExtent??void 0,geometryType:_,encoding:s.encoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){for(const e of this._fileInfos.values())e.file.free();this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(e){this._customParameters=e}getFileStatistics(){if(!this._fileInfos.size)return null;const e=Array.from(this._fileInfos.values()).reduce((e,t)=>e+t.file.byteLength(),0);return{featureCount:this._getFeatureCount(),byteLength:e}}async updateFiles(e){const t=new Set(e);for(const[e,s]of this._fileInfos.entries())t.has(e)?t.delete(e):(s.file.free(),this._fileInfos.delete(e));for(const e of t){const t=await(0,v.DV)(e,{geometryInfo:this._geometryInfo,outSpatialReference:null,getCustomParameters:()=>this._customParameters});this._fileInfos.set(e,{index:this._fileInfos.size,file:t})}}async queryFeatures(e,t){return this._validateQuery(e),function(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}(e)||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0),(e.outStatistics||e.returnDistinctValues)&&delete e.returnGeometry,(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){return this._validateQuery(e),j(e)?(delete e.outFields,delete e.returnGeometry,(await this._enqueueQuery(e,t)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(e,t){return this._validateQuery(e),j(e)?(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0,delete e.returnGeometry,delete e.outFields,(await this._enqueueQuery(e,t)).items.map(e=>e.getObjectId())):Array.from({length:this._getFeatureCount()},(e,t)=>t)}async queryExtent(e,t){if(this._validateQuery(e),this._fullExtent&&!j(e))return{count:this._getFeatureCount(),extent:this._fullExtent};const s=(0,o.zI)(this._metadata.spatialReference);e.returnGeometry=!0,delete e.outFields;const i=(0,p.hZ)((0,p.vt)(),p.qv),r=(0,p.vt)(),n=await this._enqueueQuery(e,t);let a=0;for(const e of n.items)e.getBounds(r)&&((0,p.RF)(i,r),a+=1);return{count:a,extent:(0,d.Wc)(i,s,e.outSR?(0,o.zI)(e.outSR):s,s,!1)}}_getFeatureCount(){return Array.from(this._fileInfos.values()).reduce((e,t)=>e+t.file.numRows(),0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new n.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async*_fetchChunks(e,t){for(const s of this._fileInfos.values()){const i=s.file.numRows(),r=Math.ceil(i/G);for(let i=0;i<r;i++){const r=i*G,o=await s.file.readChunk(r,G,e.fields,e.returnGeometry,t);for(const e of o){const t=new E.s(this._metadata,this._fieldsIndex,e,0,s.index),i=B([new P.j(t,null,0,!1)],this._queryEngineParams);yield i}}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const s=await this._getReadParams(e);if(e.objectIds?.length)for(const i of this._fileInfos.values()){const r=[],o=B((await i.file.readChunksByRowId(new Uint32Array(e.objectIds),s.fields,s.returnGeometry,t)).map((e,t)=>new E.s(this._metadata,this._fieldsIndex,e,t,i.index)).map((e,t)=>new P.j(e,null,t,!1)),this._queryEngineParams),n=await o.executeQueryForOpaqueFeatures(e,t);for(const e of n)r.push(e);return new f.G(r,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:T})}let i=e.resultRecordCount??this._getFeatureCount(),r=e.resultOffset??0;delete e.resultRecordCount,delete e.resultOffset;const o=[];for await(const n of this._fetchChunks(s,t)){const s=await n.executeQueryForOpaqueFeatures(e,t);if(s.length>r){const t=s.slice(r,Math.min(r+i,s.length));for(const e of t)o.push(e);if(r=0,i-=t.length,0===i)return new f.G(o,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:T})}else r-=s.length}return new f.G(o,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:T})}async _getReadParams(e){const t=new Set;if(e.where&&await(0,g.hz)(t,this._fieldsIndex,e.where),e.outStatistics)for(const s of e.outStatistics)null!=s.onStatisticField&&t.add(s.onStatisticField);if(e.outFields)for(const s of e.outFields)t.add(s);return{fields:this._getAttributeIds(Array.from(t)),returnGeometry:!!e.returnGeometry||!!e.geometry}}_getAttributeIds(e){if(null==e)return new Uint32Array;if(e.includes("*"))return new Uint32Array(this._fieldsIndex.fields.map(e=>e.column).filter(e=>null!=e));const t=[];for(const s of e){const e=this._fieldsIndex.get(s);if(null==e)throw new n.A("unknown-field",`Field ${s} does not exist`);null==e.column||t.push(e.column)}return new Uint32Array(t)}}function j(e){return Object.keys(e).some(e=>function(e){switch(e){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"where":case"objectIds":case"historicMoment":return!0;default:return!1}}(e))}function B(e,t){const s=new k.I;for(const t of e)s.insert(t);return new d.do({...t,featureStore:s})}function L(e){switch(e.length){case 4:return(0,p.Jt)((0,p.vt)(),e);case 6:return e;default:throw new n.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:e})}}function W(e){const t=e?.featureCount;let s=!1;return null!=t&&t<(0,a.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:s,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:s,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:s,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},69540:(e,t,s)=>{s.d(t,{OU:()=>c,Pw:()=>p});var i=s(31635),r=s(65008),o=(s(44208),s(4718)),n=(s(53966),s(97768)),a=s(88620),u=s(64108);const l=Symbol("ClonableMixin"),c=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=l}clone(e){const t=(0,a.oY)(this);(0,n.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},u=new Map;for(const t in s){const n=s[t],a=i?.originOf(t),l=n.clonable;if(n.readOnly||!1===l||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let p=null;if("function"==typeof l)p=l(c,e);else if("reference"===l)p=c;else if(p=(0,o.TU)(c,e),null!=c&&null==p)continue;0===a?u.set(t,p):r[t]=p}const l=new(0,Object.getPrototypeOf(this).constructor)(r);if(u.size){const e=(0,a.oY)(l)?.store;if(e)for(const[t,s]of u)e.set(t,s,0)}return l}};return r=(0,i.Cg)([(0,u.$)("esri.core.Clonable")],r),r},p=c(r.A)},93470:(e,t,s)=>{s.d(t,{Cb:()=>o,HW:()=>c,JR:()=>r,JZ:()=>u,WR:()=>a,b6:()=>p,fT:()=>i,nC:()=>l,yM:()=>n});const i=[252,146,31,255],r=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);