@arcgis/core 4.31.0-next.20240921 → 4.31.0-next.20240922
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/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/1810cb638ca1d52de7b2.js +1 -0
- package/assets/esri/core/workers/chunks/{69f6f35b04c722aba8cf.js → 238897e72fedd6754af7.js} +1 -1
- package/assets/esri/core/workers/chunks/2807eb7bfe4868fe840f.js +1 -0
- package/assets/esri/core/workers/chunks/{6c07116c8f7361780803.js → 2b04d2f8466d16a24a80.js} +1 -1
- package/assets/esri/core/workers/chunks/{83649583139b818d4dfa.js → 356f6cc122287412b888.js} +1 -1
- package/assets/esri/core/workers/chunks/36a1de3752ff13d77b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{f14cefc311a21116d21b.js → 4c0d37b799edae391ab2.js} +1 -1
- package/assets/esri/core/workers/chunks/{16eda85f728423c4ed02.js → 4ea08495271f6d291b05.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf147f34032a8d07f322.js → 53becb5fe10f7f38311f.js} +1 -1
- package/assets/esri/core/workers/chunks/{24d45530fe47b3114daf.js → 5652ff08dcc5afd3d739.js} +1 -1
- package/assets/esri/core/workers/chunks/5fe1f8881959df0e61ce.js +1 -0
- package/assets/esri/core/workers/chunks/62f4eda8a9f4de481dcb.js +1 -0
- package/assets/esri/core/workers/chunks/{3fa3e1e6595668ca0e18.js → 686613864dd54d1cae3c.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d0d36230a5b8309c9e4.js → 75bf6dff29056a5a1242.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7bd5bb21a7f3030ee13.js → 783d66397f16899dd0e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{2658205b1ab2502c0bc7.js → 856c82a20027435fd306.js} +1 -1
- package/assets/esri/core/workers/chunks/{99944b05d3142903511c.js → 93fb720bbfb3628f9c71.js} +1 -1
- package/assets/esri/core/workers/chunks/{14f77efbfba0ca9efb6c.js → 9dce33a9bcfb852a74d3.js} +1 -1
- package/assets/esri/core/workers/chunks/abdb6f02351250a776ff.js +1 -0
- package/assets/esri/core/workers/chunks/{de7e197223471c7b66a7.js → afb35deb035c9c9225c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{5f9beed2a9599b9ce649.js → bc37c0dc14ea54f1b9e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{35f92652df2561845d47.js → c9aa8df2f62e6d40b771.js} +1 -1
- package/assets/esri/core/workers/chunks/d8435cc010bd2260feec.js +1 -0
- package/assets/esri/core/workers/chunks/e5a8ab8d02a616469f1d.js +1 -0
- package/assets/esri/core/workers/chunks/f1446e56c35e59b904e1.js +1 -0
- package/assets/esri/core/workers/chunks/{6508ff21b0a5725629eb.js → fa3f9691a9bd1bbb25d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{008f290833724454160d.js → fab59ee41f96b2378768.js} +1 -1
- package/assets/esri/core/workers/chunks/{67ea066a903f5ad31155.js → fe709db8238127f91e59.js} +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0eb789af3c26fecdf3be.js +0 -1
- package/assets/esri/core/workers/chunks/41a3c7d286a050002d20.js +0 -1
- package/assets/esri/core/workers/chunks/59e4731d246203e94a96.js +0 -1
- package/assets/esri/core/workers/chunks/69c09478c899cd5e5013.js +0 -1
- package/assets/esri/core/workers/chunks/7088f771163fda53d196.js +0 -1
- package/assets/esri/core/workers/chunks/79ed119c70ce6ea02f71.js +0 -1
- package/assets/esri/core/workers/chunks/eeacd5fa9fb9b1dee5f7.js +0 -1
- package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +0 -1
- package/assets/esri/core/workers/chunks/f9e90a2fda559ca68848.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4591],{3330:(e,t,r)=>{r.d(t,{GB:()=>s,Qo:()=>i,Y4:()=>n});var o=r(96285);class s{}function n(e){return e instanceof o.bo?e===s.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return n(e)?s.instance:e}s.instance=new o.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>M,Ej:()=>f,Hq:()=>u,Ie:()=>F,Jt:()=>v,Ne:()=>m,RF:()=>l,_F:()=>h,aI:()=>I,fA:()=>n,gX:()=>y,hZ:()=>w,iT:()=>a,is:()=>_,qv:()=>T,vI:()=>g,v_:()=>b,vt:()=>s,w1:()=>i});var o=r(5443);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,o,n,i,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=o,l[4]=n,l[5]=i,l}function i(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new o.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,o=t.length/3){let s=e[0],n=e[1],i=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<o;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),i=Math.min(i,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=i,e[3]=l,e[4]=a,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function c(e){return e[1]>=e[4]?0:e[4]-e[1]}function d(e){return e[2]>=e[5]?0:e[5]-e[2]}function h(e){const t=p(e),r=d(e),o=c(e);return Math.sqrt(t*t+r*r+o*o)}function y(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+c(e)/2,t[2]=e[2]+d(e)/2,t}function f(e,t=[0,0,0]){return t[0]=p(e),t[1]=c(e),t[2]=d(e),t}function m(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function g(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function w(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function F(e){return e?w(e,T):s(T)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function M(e,t,r,o,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=o,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function I(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let o=0;o<e.length;o++)if(!r(e[o],t[o]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var o=r(90237),s=(r(59456),r(13874)),n=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),i=r(92071),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),c=r(49186),d=r(92474),h=r(799),y=r(75321),f=r(4071),m=r(22671),g=r(16930);let w=class extends d.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:o},layer:{apiKey:s,customParameters:n,effectiveMaxRecordCount:i}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:i,queryParameters:{apiKey:s,customParameters:n},spatialReference:r,supportedCrs:o}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>m.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,y.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,h.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:f.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??y.QE,r=(0,y.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",o=e.crs??[y.QE],s=o.includes(r)?o.filter((e=>e!==r)).concat(t.crs??[]):o,n=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return s.filter((e=>!n.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:o,collectionId:s,customParameters:n,fields:i,geometryType:l,hasZ:a,objectIdField:p,timeInfo:d,url:f}=e,m={fields:i?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(l),hasZ:a??!1,objectIdField:p,timeInfo:d?.toJSON()},g={apiKey:o,customParameters:n,signal:r},w=await(0,y.Ki)(f,g),[F,v]=await Promise.all([(0,y.Px)(w,g),(0,y.bV)(w,g)]);if(!this._conformsToType(F,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const M=v.collections.find((({id:e})=>e===s));if(!M)throw new c.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const _=this._conformsToType(F,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,y.GA)(w,g):null,I=await(0,y.GL)(M,m,g),T=this._getMaxRecordCount(_),b=this._getCapabilities(I.hasZ,T),x=this._getStorageSpatialReference(M).toJSON(),S=this._getSupportedSpatialReferences(M,v),P=new RegExp(`^${(0,h.Cj)(y.vJ)}`,"i"),A={};for(const e of S){const t=(0,y.J0)(e);null!=t&&(A[t]||(A[t]=e.replace(P,"")))}this.featureDefinition={capabilities:b,collection:M,layerDefinition:I,spatialReference:x,supportedCrs:A}}};(0,o._)([(0,l.M)()],w.prototype,"featureDefinition",void 0),(0,o._)([(0,l.M)({constructOnly:!0})],w.prototype,"layer",void 0),(0,o._)([(0,l.M)()],w.prototype,"type",void 0),w=(0,o._)([(0,a.$)("esri.layers.graphics.sources.OGCFeatureSource")],w);var F=r(52136),v=r(63074),M=r(69208),_=r(87718),I=r(76294),T=r(16131),b=r(32756),x=r(8303),S=r(54310),P=r(25036),A=r(82935),R=r(10873),N=r(33143),O=r(20437),E=r(17036),j=r(30524),G=r(81457),C=r(39383),D=r(61956),q=r(30291),Z=r(5443);const z=(0,E.p)();let B=class extends((0,F.p)((0,M.d)((0,I.J)((0,_.F)((0,v.dM)((0,b.f)((0,A.e)((0,P.j)((0,T.q)((0,x.A)((0,S.J)((0,i.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new w({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,j.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,q.tn)(this,e)}createQuery(){return new D.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,o=!1;const s=t?.feature?.attributes,n=this.typeIdField&&s?.[this.typeIdField];return null!=n&&this.types&&(o=this.types.some((t=>t.id==n&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),o||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(D.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,j.yp)(this.renderer,this.fieldsIndex),(0,j.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,o._)([(0,l.M)({readOnly:!0,json:{origins:{service:{read:!0}}}})],B.prototype,"capabilities",void 0),(0,o._)([(0,l.M)({type:String,json:{write:!0}})],B.prototype,"collectionId",void 0),(0,o._)([(0,l.M)({type:String})],B.prototype,"copyright",void 0),(0,o._)([(0,l.M)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,o._)([(0,l.M)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],B.prototype,"description",void 0),(0,o._)([(0,l.M)({type:String})],B.prototype,"displayField",void 0),(0,o._)([(0,l.M)({type:Number})],B.prototype,"effectiveMaxRecordCount",null),(0,o._)([(0,l.M)(R.Yj)],B.prototype,"elevationInfo",void 0),(0,o._)([(0,l.M)({type:[O.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],B.prototype,"fields",void 0),(0,o._)([(0,l.M)(z.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,o._)([(0,l.M)({readOnly:!0,type:Z.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],B.prototype,"fullExtent",void 0),(0,o._)([(0,l.M)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],B.prototype,"geometryType",void 0),(0,o._)([(0,l.M)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],B.prototype,"hasZ",void 0),(0,o._)([(0,l.M)({type:Boolean,readOnly:!0})],B.prototype,"isTable",null),(0,o._)([(0,l.M)({type:[G.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C.w},write:!0}}}})],B.prototype,"labelingInfo",void 0),(0,o._)([(0,l.M)(R.kF)],B.prototype,"labelsVisible",void 0),(0,o._)([(0,l.M)(R.fV)],B.prototype,"legendEnabled",void 0),(0,o._)([(0,l.M)({type:Number})],B.prototype,"maxRecordCount",void 0),(0,o._)([(0,l.M)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],B.prototype,"objectIdField",void 0),(0,o._)([(0,l.M)({type:["OGCFeatureLayer"]})],B.prototype,"operationalLayerType",void 0),(0,o._)([(0,l.M)(R.M6)],B.prototype,"popupEnabled",void 0),(0,o._)([(0,l.M)({type:s.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,o._)([(0,l.M)({types:n.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:n.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],B.prototype,"renderer",null),(0,o._)([(0,l.M)(R.PY)],B.prototype,"screenSizePerspectiveEnabled",void 0),(0,o._)([(0,l.M)({readOnly:!0})],B.prototype,"source",void 0),(0,o._)([(0,l.M)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],B.prototype,"spatialReference",void 0),(0,o._)([(0,l.M)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],B.prototype,"title",void 0),(0,o._)([(0,l.M)({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),(0,o._)([(0,l.M)({type:String,readOnly:!0})],B.prototype,"typeIdField",void 0),(0,o._)([(0,l.M)({type:[N.A]})],B.prototype,"types",void 0),(0,o._)([(0,l.M)(R.OZ)],B.prototype,"url",void 0),B=(0,o._)([(0,a.$)("esri.layers.OGCFeatureLayer")],B);const L=B},43334:(e,t,r)=>{r.d(t,{N3:()=>n,Om:()=>s});var o=r(92722);class s{constructor(e=null,t={},r,o){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=o,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?o.A.fromJSON(e.geometry):null,n=e.centroid?o.A.fromJSON(e.centroid):null,i=e.attributes[t];return new s(r,e.attributes,n,i)}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function n(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>o});class o{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new o;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>o});class o{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new o(e.lengths,e.coords)}static fromRect(e){const[t,r,s,n]=e,i=s-t,l=n-r;return new o([5],[t,r,i,0,0,l,-i,0,0,-l])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const o=this.lengths[r];for(let r=0;r<o;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=o}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let o=0;for(const e of r){for(let r=1;r<e;r++)t[2*(o+r)]+=t[2*(o+r)-2],t[2*(o+r)+1]+=t[2*(o+r)-1];o+=e}return e}clone(e){if(0===this.lengths.length)return new o([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new o(this.lengths,e)):new o(Array.from(this.lengths),Array.from(r))}}},99352:(e,t,r)=>{r.d(t,{F:()=>o});const o={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!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}},90708:(e,t,r)=>{r.d(t,{B2:()=>M,BW:()=>C,Ch:()=>oe,DF:()=>I,Di:()=>J,E2:()=>L,IE:()=>v,Nl:()=>X,Q4:()=>se,Rk:()=>ie,Ux:()=>U,Ye:()=>Z,ZF:()=>H,eY:()=>K,jH:()=>V,jQ:()=>re,kz:()=>W,oN:()=>Q,q3:()=>Y,qK:()=>j,qN:()=>E,z5:()=>q,zv:()=>$});var o=r(49186),s=r(53966),n=r(97768),i=r(70328),l=r(19419),a=r(65864),u=r(43334),p=r(58512),c=r(92722);function d(e,t){return e?t?4:3:t?3:2}const h=()=>s.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},f=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n},m=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n,e[r+2]=t[o+2]},g=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n,e[r+2]=t[o+3]},w=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n,e[r+2]=t[o+2],e[r+3]=t[o+3]};function F(e,t,r,o){if(e){if(r)return t&&o?w:m;if(t&&o)return g}else if(t&&o)return m;return f}function v({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function M({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function _({scale:e,translate:t},r,o){return r*e[o]+t[o]}function I(e,t,r){return e?t?r?R(e):x(e):r?P(e):T(e):null}function T(e){const t=e.coords;return{x:t[0],y:t[1]}}function b(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function x(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function S(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function P(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function R(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function O(e,t){return e&&t?N:e?S:t?A:b}function E(e,t,r=O(null!=t.z,null!=t.m)){return r(e,t)}function j(e,t,r){if(null==e)return null;const o=d(t,r),s=[];for(let t=0;t<e.coords.length;t+=o){const r=[];for(let s=0;s<o;s++)r.push(e.coords[t+s]);s.push(r)}return t?r?{points:s,hasZ:t,hasM:r}:{points:s,hasZ:t}:r?{points:s,hasM:r}:{points:s}}function G(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const o=e.coords;let s=0;for(const e of t.points)for(let t=0;t<r;t++)o[s++]=e[t];return e}function C(e,t,r){if(!e)return null;const o=d(t,r),{coords:s,lengths:n}=e,i=[];let l=0;for(const e of n){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<o;t++)e.push(s[l++]);t.push(e)}i.push(t)}return t?r?{paths:i,hasZ:t,hasM:r}:{paths:i,hasZ:t}:r?{paths:i,hasM:r}:{paths:i}}function D(e,t,r=d(t.hasZ,t.hasM)){const{lengths:o,coords:s}=e;let n=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)s[n++]=t[e];o.push(e.length)}return e}function q(e,t,r){if(!e)return null;const o=d(t,r),{coords:s,lengths:n}=e,i=[];let l=0;for(const e of n){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<o;t++)e.push(s[l++]);t.push(e)}i.push(t)}return t?r?{rings:i,hasZ:t,hasM:r}:{rings:i,hasZ:t}:r?{rings:i,hasM:r}:{rings:i}}function Z(e,t,r=t.hasZ,o=t.hasM){return function(e,t,r,o){const s=d(r,o),{lengths:n,coords:i}=e;let l=0;le(e);for(const e of t){for(const t of e)for(let e=0;e<s;e++)i[l++]=t[e];n.push(e.length)}return e}(e,t.rings,r,o)}const z=[],B=[];function L(e,t,r,o,s){z[0]=e;const[n]=J(B,z,t,r,o,s);return ae(z),ae(B),n}function J(e,t,r,s,n,i){if(ae(e),!r){for(const r of t){const t=i?r.attributes[i]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,o,s){const n=O(r,o);for(const{geometry:r,attributes:o}of t){const t=null!=r?n(new c.A,r):null;e.push(new u.Om(t,o,null,s?o[s]:void 0))}return e}(e,t,s,n,i);case"esriGeometryMultipoint":return function(e,t,r,o,s){const n=d(r,o);for(const{geometry:r,attributes:o}of t){const t=null!=r?G(new c.A,r,n):null;e.push(new u.Om(t,o,null,s?o[s]:void 0))}return e}(e,t,s,n,i);case"esriGeometryPolyline":return function(e,t,r,o,s){const n=d(r,o);for(const{geometry:r,attributes:o,centroid:i}of t){const t=null!=r?D(new c.A,r,n):null,l=null!=i?E(new c.A,i):null;e.push(new u.Om(t,o,l,s?o[s]:void 0))}return e}(e,t,s,n,i);case"esriGeometryPolygon":return function(e,t,r,o,s){for(const{geometry:n,centroid:i,attributes:l}of t){const t=null!=n?Z(new c.A,n,r,o):null,a=s?l[s]:void 0;null!=i?e.push(new u.Om(t,l,b(new c.A,i),a)):e.push(new u.Om(t,l,null,a))}return e}(e,t,s,n,i);default:h().error("convertToFeatureSet:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${r}'`)),ae(e)}return e}function Q(e,t,r,o){B[0]=e,k(z,B,t,r,o);const s=z[0];return ae(z),ae(B),s}function U(e,t,r){if(null==e)return null;const s=new c.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,a.fT)(e)?O(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(s,e):(0,a.Bi)(e)?Z(s,e,t,r):(0,a.Rg)(e)?D(s,e,d(t,r)):(0,a.U9)(e)?G(s,e,d(t,r)):void h().error("convertFromGeometry:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${e}'`))}function $(e,t,r,s){const n=e&&("coords"in e?e:e.geometry);if(null==n)return null;switch(t){case"esriGeometryPoint":{let e=T;return r&&s?e=R:r?e=x:s&&(e=P),e(n)}case"esriGeometryMultipoint":return j(n,r,s);case"esriGeometryPolyline":return C(n,r,s);case"esriGeometryPolygon":return q(n,r,s);default:return h().error("convertToGeometry:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,s,n){if(ae(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,o){let s=T;r&&o?s=R:r?s=x:o&&(s=P);for(const r of t){const{geometry:t,attributes:o}=r,n=null!=t?s(t):null;e.push({attributes:o,geometry:n})}return e}(e,t,s,n);case"esriGeometryMultipoint":return function(e,t,r,o){for(const{geometry:s,attributes:n}of t)e.push({attributes:n,geometry:null!=s?j(s,r,o):null});return e}(e,t,s,n);case"esriGeometryPolyline":return function(e,t,r,o){for(const{geometry:s,attributes:n}of t)e.push({attributes:n,geometry:null!=s?C(s,r,o):null});return e}(e,t,s,n);case"esriGeometryPolygon":return function(e,t,r,o){for(const{geometry:s,attributes:n,centroid:i}of t){const t=null!=s?q(s,r,o):null;if(null!=i){const r=T(i);e.push({attributes:n,centroid:r,geometry:t})}else e.push({attributes:n,geometry:t})}return e}(e,t,s,n);default:h().error("convertToFeatureSet:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${r}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:r,transform:o,fields:s,hasM:n,hasZ:i,features:l,geometryType:a,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,h={features:k([],l,a,i,n),fields:s,geometryType:a,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:$(c,d,!1,!1)};return o&&(h.transform=o),u&&(h.exceededTransferLimit=u),n&&(h.hasM=n),i&&(h.hasZ=i),h}function Y(e,t){const r=new p.A,{hasM:s,hasZ:n,features:i,objectIdFieldName:l,spatialReference:a,geometryType:u,exceededTransferLimit:c,transform:d,fields:y}=e;return y&&(r.fields=y),r.geometryType=u??null,r.objectIdFieldName=l??t??null,r.spatialReference=a??null,r.objectIdFieldName?(i&&J(r.features,i,u,n,s,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),s&&(r.hasM=s),n&&(r.hasZ=n),d&&(r.transform=d),r):(h().error(new o.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function K(e){const{transform:t,features:r,hasM:o,hasZ:s}=e;if(!t)return e;for(const e of r)null!=e.geometry&&oe(e.geometry,e.geometry,o,s,t),null!=e.centroid&&oe(e.centroid,e.centroid,o,s,t);return e.transform=null,e}function V(e,t){const{geometryType:r,features:o,hasM:s,hasZ:n}=t;if(!e)return t;for(let t=0;t<o.length;t++){const i=o[t],l=i.weakClone();l.geometry=new c.A,X(l.geometry,i.geometry,s,n,r,e),i.centroid&&(l.centroid=new c.A,X(l.centroid,i.centroid,s,n,"esriGeometryPoint",e)),o[t]=l}return t.transform=e,t}function X(e,t,r,o,s,n,i=r,l=o){if(le(e),!t?.coords.length)return null;const a=y[s],{coords:u,lengths:p}=t,c=d(r,o),h=d(r&&i,o&&l),f=F(r,o,i,l);if(!p.length)return f(e.coords,u,0,0,v(n,u[0]),M(n,u[1])),le(e,c,0),e;let m,g,w,_,I=0,T=0,b=T;for(const t of p){if(t<a)continue;let r=0;T=b,w=m=v(n,u[I]),_=g=M(n,u[I+1]),f(e.coords,u,T,I,w,_),r++,I+=c,T+=h;for(let o=1;o<t;o++,I+=c)w=v(n,u[I]),_=M(n,u[I+1]),w===m&&_===g||(f(e.coords,u,T,I,w-m,_-g),T+=h,r++,m=w,g=_);r>=a&&(e.lengths.push(r),b=T)}return ae(e.coords,b),e.coords.length?e:null}function W(e,t,r,o,s,n,i=r,l=o){if(le(e),!t?.coords.length)return null;const a=y[s],{coords:u,lengths:p}=t,c=d(r,o),h=d(r&&i,o&&l),f=F(r,o,i,l);if(!p.length)return f(e.coords,u,0,0,u[0],u[1]),le(e,c,0),e;let m=0;const g=n*n;for(const t of p){if(t<a){m+=t*c;continue}const r=e.coords.length/h,o=m,s=m+(t-1)*c;f(e.coords,u,e.coords.length,o,u[o],u[o+1]),te(e.coords,u,c,g,f,o,s),f(e.coords,u,e.coords.length,s,u[s],u[s+1]);const n=e.coords.length/h-r;n>=a?e.lengths.push(n):ae(e.coords,r*h),m+=t*c}return e.coords.length?e:null}function ee(e,t,r,o){const s=e[t],n=e[t+1],i=e[r],l=e[r+1],a=e[o],u=e[o+1];let p=i,c=l,d=a-p,h=u-c;if(0!==d||0!==h){const e=((s-p)*d+(n-c)*h)/(d*d+h*h);e>1?(p=a,c=u):e>0&&(p+=d*e,c+=h*e)}return d=s-p,h=n-c,d*d+h*h}function te(e,t,r,o,s,n,i){let l,a=o,u=0;for(let e=n+r;e<i;e+=r)l=ee(t,e,n,i),l>a&&(u=e,a=l);a>o&&(u-n>r&&te(e,t,r,o,s,n,u),s(e,t,e.length,u,t[u],t[u+1]),i-u>r&&te(e,t,r,o,s,u,i))}function re(e,t,r,o){if(!t?.coords?.length)return null;const s=d(r,o);let n=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=s){const r=e[t],o=e[t+1];n=Math.min(n,r),u=Math.max(u,r),a=Math.min(a,o),p=Math.max(p,o)}}return(0,i.is)(e)?(0,i.BI)(e,n,a,u,p):(0,l.fA)(n,a,u,p,e),e}function oe(e,t,r,o,s){const{coords:i,lengths:l}=t,a=d(r,o);if(!i.length)return e!==t&&le(e),e;(0,n.Lw)(s);const{originPosition:u,scale:p,translate:c}=s,h=ue;h.originPosition=u;const y=h.scale;y[0]=p[0]??1,y[1]=-(p[1]??1),y[2]=p[2]??1,y[3]=p[3]??1;const f=h.translate;if(f[0]=c[0]??0,f[1]=c[1]??0,f[2]=c[2]??0,f[3]=c[3]??0,!l.length){for(let t=0;t<a;++t)e.coords[t]=_(h,i[t],t);return e!==t&&le(e,a,0),e}let m=0;for(let t=0;t<l.length;t++){const r=l[t];e.lengths[t]=r;for(let t=0;t<a;++t)e.coords[m+t]=_(h,i[m+t],t);let o=e.coords[m],s=e.coords[m+1];m+=a;for(let t=1;t<r;t++,m+=a){o+=i[m]*y[0],s+=i[m+1]*y[1],e.coords[m]=o,e.coords[m+1]=s;for(let t=2;t<a;++t)e.coords[m+t]=_(h,i[m+t],t)}}return e!==t&&le(e,i.length,l.length),e}function se(e,t,r,o,s,n){if(le(e),e.lengths.push(...t.lengths),r===s&&o===n)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const i=d(r,o),l=F(r,o,s,n),a=t.coords;for(let t=0;t<a.length;t+=i)l(e.coords,a,e.coords.length,t,a[t],a[t+1])}return e}function ne(e,t,r,o){let s=0,n=e[o*t],i=e[o*(t+1)];for(let l=1;l<r;l++){const r=n+e[o*(t+l)],a=i+e[o*(t+l)+1],u=(r-n)*(a+i);n=r,i=a,s+=u}return.5*s}function ie(e,t){const{coords:r,lengths:o}=e;let s=0,n=0;for(let e=0;e<o.length;e++){const i=o[e];n+=ne(r,s,i,t),s+=i}return Math.abs(n)}function le(e,t=0,r=0){ae(e.lengths,r),ae(e.coords,t)}function ae(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>i});var o=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const i=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,o._)([(0,s.M)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>i});var o=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const i=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,o._)([(0,s.M)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,o._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>a});var o=r(90237),s=r(93637),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);const a={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const o=e.find((e=>!!e.field));if(!o)return null;const s=new l.A;return s.read(o,r),[s]}},write:{writer:function(e,t,r,o){const n=e.find((e=>!!e.field));n&&(0,s.sM)(r,[n.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,o._)([(0,n.M)(a)],t.prototype,"orderBy",void 0),t=(0,o._)([(0,i.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var o=r(90237),s=r(92602),n=r(70333),i=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),w=r(20655),F=r(80812),v=r(41318),M=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new F.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:o}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:o},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",o),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const o=e===r.id;if(o&&r.portal.user)return(0,M.It)(r);let s,i;if(o)s=r.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;i=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,a=!1,u=!1;if(!i)return{features:{edit:l,fullEdit:a},content:{updateItem:u}};try{if(o?await r.reload():(r=new F.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,M.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const o=`${r.owningSystemUrl}/sharing/rest`,s=w.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(o))return s.user;const a=`${o}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,i.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,o=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&o&&!(0,d.ut)(o.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,o._)([(0,h.M)({type:F.default})],t.prototype,"portalItem",null),(0,o._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,o._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,o._)([(0,h.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,o._)([(0,h.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,o._)([(0,h.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,o._)([(0,h.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,o._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},29005:(e,t,r)=>{r.d(t,{A:()=>c});var o=r(90237),s=r(69540),n=r(66552),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.O)(i.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"description",void 0),(0,o._)([(0,l.M)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,o._)([(0,a.$)("esri.layers.support.FeatureTemplate")],p);const c=p},33143:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(90237),s=r(69540),n=r(25482),i=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(72088),c=r(29005);let d=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,o._)([(0,i.M)({json:{write:!0}})],d.prototype,"id",void 0),(0,o._)([(0,i.M)({json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,i.M)({json:{write:!0}})],d.prototype,"domains",void 0),(0,o._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,o._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,o._)([(0,i.M)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,o._)([(0,a.$)("esri.layers.support.FeatureType")],d);const h=d},95466:(e,t,r)=>{r.d(t,{A:()=>d});var o=r(49186),s=r(25482),n=r(53966),i=r(91869),l=r(3330),a=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,o=y(t);if(t&&o){const s=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(o,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").error(new o.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?p.mQ.utcInstance:(0,i.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:o,editFieldsInfo:s}=e,n=(o?"startField"in o?o.startField:o.startTimeField:"")??"",i=(o?"endField"in o?o.endField:o.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):l??u.n$:null,p=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.timeReference?(0,u.ZS)(o.timeReference):l:null,c=new Map([[h(s?.creationDateField??""),a],[h(s?.editDateField??""),a],[h(n),p],[h(i),p]]);for(const{name:o,type:s}of e.fields)if(f.has(s))t.set(o,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(o,null);else if(r)t.set(o,u.L5);else{const e=c.get(h(o??""))??l;t.set(o,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var o,s=r(90237),n=r(66552),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let p=o=class extends i.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new o({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.M)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,l.M)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,l.M)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=o=(0,s._)([(0,a.$)("esri.layers.support.OrderByInfo")],p);const c=p},98453:(e,t,r)=>{r.d(t,{m:()=>o});const o=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},22671:(e,t,r)=>{r.d(t,{A:()=>F});var o,s=r(90237),n=r(59456),i=r(52106),l=r(66552),a=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937),y=r(16930),f=r(65864),m=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=o=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=i.A.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],o=a[e],s=o?.spatialReference;null==t||s||(t.spatialReference=r)}o.push(n)}return o}writeGeometryType(e,t,r,o){if(e)return void g.write(e,t,r,o);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=(0,f.rS)(e);return o&&!r&&t.spatialReference&&(o.spatialReference=y.A.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const o=t.features[r];if(o.geometry){const t=e?.[r];o.geometry=t?.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)i?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[n,i]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+o),(e=>s-e*i),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let o,s;const n=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=r(l[1]);e===o&&i===s||(n.push([e-o,i-s]),o=e,s=i)}else o=t(l[0]),s=r(l[1]),n.push([o,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],i=this._quantizePoints(n,t,r);i&&s.push(i)}return s.length>0?((0,f.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,o,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,o=n.length;e<o;e++){const o=n[e];for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(i+=s[0],l+=s[1]):(i=s[0],l=s[1]),s[0]=t(i),s[1]=r(l)}}if(o&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2]),r[3]=s(r[3])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let i,l;for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=r(l)}if(o&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2]),t[3]=s(t[3])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.M)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.M)({type:[i.A],json:{write:!0}})],w.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],w.prototype,"readFeatures",null),(0,s._)([(0,p.M)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,s._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,s._)([(0,h.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,s._)([(0,p.M)({types:n.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,s._)([(0,p.M)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,s._)([(0,h.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,s._)([(0,p.M)({json:{write:!0}})],w.prototype,"transform",void 0),w=o=(0,s._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const F=w}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4591],{3330:(e,t,r)=>{r.d(t,{GB:()=>s,Qo:()=>i,Y4:()=>n});var o=r(96285);class s{}function n(e){return e instanceof o.bo?e===s.instance:"unknown"===e?.toString().toLowerCase()}function i(e){return n(e)?s.instance:e}s.instance=new o.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>M,Ej:()=>f,Hq:()=>u,Ie:()=>F,Jt:()=>v,Ne:()=>m,RF:()=>l,_F:()=>h,aI:()=>I,fA:()=>n,gX:()=>y,hZ:()=>w,iT:()=>a,is:()=>_,qv:()=>T,vI:()=>g,v_:()=>b,vt:()=>s,w1:()=>i});var o=r(5443);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,o,n,i,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=o,l[4]=n,l[5]=i,l}function i(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new o.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,o=t.length/3){let s=e[0],n=e[1],i=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<o;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),i=Math.min(i,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=i,e[3]=l,e[4]=a,e[5]=u}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function c(e){return e[1]>=e[4]?0:e[4]-e[1]}function d(e){return e[2]>=e[5]?0:e[5]-e[2]}function h(e){const t=p(e),r=d(e),o=c(e);return Math.sqrt(t*t+r*r+o*o)}function y(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+c(e)/2,t[2]=e[2]+d(e)/2,t}function f(e,t=[0,0,0]){return t[0]=p(e),t[1]=c(e),t[2]=d(e),t}function m(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function g(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function w(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function F(e){return e?w(e,T):s(T)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function M(e,t,r,o,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=o,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function I(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let o=0;o<e.length;o++)if(!r(e[o],t[o]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>L});var o=r(90237),s=(r(59456),r(13874)),n=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),i=r(92071),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),c=r(49186),d=r(92474),h=r(799),y=r(75321),f=r(4071),m=r(22671),g=r(16930);let w=class extends d.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:o},layer:{apiKey:s,customParameters:n,effectiveMaxRecordCount:i}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:i,queryParameters:{apiKey:s,customParameters:n},spatialReference:r,supportedCrs:o}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>m.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,y.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,h.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:f.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??y.QE,r=(0,y.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",o=e.crs??[y.QE],s=o.includes(r)?o.filter((e=>e!==r)).concat(t.crs??[]):o,n=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return s.filter((e=>!n.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:o,collectionId:s,customParameters:n,fields:i,geometryType:l,hasZ:a,objectIdField:p,timeInfo:d,url:f}=e,m={fields:i?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(l),hasZ:a??!1,objectIdField:p,timeInfo:d?.toJSON()},g={apiKey:o,customParameters:n,signal:r},w=await(0,y.Ki)(f,g),[F,v]=await Promise.all([(0,y.Px)(w,g),(0,y.bV)(w,g)]);if(!this._conformsToType(F,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const M=v.collections.find((({id:e})=>e===s));if(!M)throw new c.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const _=this._conformsToType(F,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,y.GA)(w,g):null,I=await(0,y.GL)(M,m,g),T=this._getMaxRecordCount(_),b=this._getCapabilities(I.hasZ,T),x=this._getStorageSpatialReference(M).toJSON(),S=this._getSupportedSpatialReferences(M,v),P=new RegExp(`^${(0,h.Cj)(y.vJ)}`,"i"),A={};for(const e of S){const t=(0,y.J0)(e);null!=t&&(A[t]||(A[t]=e.replace(P,"")))}this.featureDefinition={capabilities:b,collection:M,layerDefinition:I,spatialReference:x,supportedCrs:A}}};(0,o._)([(0,l.M)()],w.prototype,"featureDefinition",void 0),(0,o._)([(0,l.M)({constructOnly:!0})],w.prototype,"layer",void 0),(0,o._)([(0,l.M)()],w.prototype,"type",void 0),w=(0,o._)([(0,a.$)("esri.layers.graphics.sources.OGCFeatureSource")],w);var F=r(52136),v=r(63074),M=r(69208),_=r(87718),I=r(76294),T=r(16131),b=r(32756),x=r(8303),S=r(54310),P=r(25036),A=r(82935),R=r(10873),N=r(33143),O=r(20437),E=r(17036),j=r(30524),G=r(81457),C=r(39383),D=r(61956),q=r(30291),Z=r(5443);const z=(0,E.p)();let B=class extends((0,F.p)((0,M.d)((0,I.J)((0,_.F)((0,v.dM)((0,b.f)((0,A.e)((0,P.j)((0,T.q)((0,x.A)((0,S.J)((0,i.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new w({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,j.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,q.tn)(this,e)}createQuery(){return new D.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,o=!1;const s=t?.feature?.attributes,n=this.typeIdField&&s?.[this.typeIdField];return null!=n&&this.types&&(o=this.types.some((t=>t.id==n&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),o||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(D.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,j.yp)(this.renderer,this.fieldsIndex),(0,j.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,o._)([(0,l.M)({readOnly:!0,json:{origins:{service:{read:!0}}}})],B.prototype,"capabilities",void 0),(0,o._)([(0,l.M)({type:String,json:{write:!0}})],B.prototype,"collectionId",void 0),(0,o._)([(0,l.M)({type:String})],B.prototype,"copyright",void 0),(0,o._)([(0,l.M)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,o._)([(0,l.M)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],B.prototype,"description",void 0),(0,o._)([(0,l.M)({type:String})],B.prototype,"displayField",void 0),(0,o._)([(0,l.M)({type:Number})],B.prototype,"effectiveMaxRecordCount",null),(0,o._)([(0,l.M)(R.Yj)],B.prototype,"elevationInfo",void 0),(0,o._)([(0,l.M)({type:[O.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],B.prototype,"fields",void 0),(0,o._)([(0,l.M)(z.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,o._)([(0,l.M)({readOnly:!0,type:Z.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],B.prototype,"fullExtent",void 0),(0,o._)([(0,l.M)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],B.prototype,"geometryType",void 0),(0,o._)([(0,l.M)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],B.prototype,"hasZ",void 0),(0,o._)([(0,l.M)({type:Boolean,readOnly:!0})],B.prototype,"isTable",null),(0,o._)([(0,l.M)({type:[G.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C.w},write:!0}}}})],B.prototype,"labelingInfo",void 0),(0,o._)([(0,l.M)(R.kF)],B.prototype,"labelsVisible",void 0),(0,o._)([(0,l.M)(R.fV)],B.prototype,"legendEnabled",void 0),(0,o._)([(0,l.M)({type:Number})],B.prototype,"maxRecordCount",void 0),(0,o._)([(0,l.M)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],B.prototype,"objectIdField",void 0),(0,o._)([(0,l.M)({type:["OGCFeatureLayer"]})],B.prototype,"operationalLayerType",void 0),(0,o._)([(0,l.M)(R.M6)],B.prototype,"popupEnabled",void 0),(0,o._)([(0,l.M)({type:s.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,o._)([(0,l.M)({types:n.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:n.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],B.prototype,"renderer",null),(0,o._)([(0,l.M)(R.PY)],B.prototype,"screenSizePerspectiveEnabled",void 0),(0,o._)([(0,l.M)({readOnly:!0})],B.prototype,"source",void 0),(0,o._)([(0,l.M)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],B.prototype,"spatialReference",void 0),(0,o._)([(0,l.M)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],B.prototype,"title",void 0),(0,o._)([(0,l.M)({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),(0,o._)([(0,l.M)({type:String,readOnly:!0})],B.prototype,"typeIdField",void 0),(0,o._)([(0,l.M)({type:[N.A]})],B.prototype,"types",void 0),(0,o._)([(0,l.M)(R.OZ)],B.prototype,"url",void 0),B=(0,o._)([(0,a.$)("esri.layers.OGCFeatureLayer")],B);const L=B},43334:(e,t,r)=>{r.d(t,{N3:()=>n,Om:()=>s});var o=r(92722);class s{constructor(e=null,t={},r,o){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=o,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?o.A.fromJSON(e.geometry):null,n=e.centroid?o.A.fromJSON(e.centroid):null,i=e.attributes[t];return new s(r,e.attributes,n,i)}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new s(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function n(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>o});class o{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new o;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>o});class o{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new o(e.lengths,e.coords)}static fromRect(e){const[t,r,s,n]=e,i=s-t,l=n-r;return new o([5],[t,r,i,0,0,l,-i,0,0,-l])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const o=this.lengths[r];for(let r=0;r<o;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=o}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let o=0;for(const e of r){for(let r=1;r<e;r++)t[2*(o+r)]+=t[2*(o+r)-2],t[2*(o+r)+1]+=t[2*(o+r)-1];o+=e}return e}clone(e){if(0===this.lengths.length)return new o([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new o(this.lengths,e)):new o(Array.from(this.lengths),Array.from(r))}}},99352:(e,t,r)=>{r.d(t,{F:()=>o});const o={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!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}},90708:(e,t,r)=>{r.d(t,{B2:()=>M,BW:()=>C,Ch:()=>oe,DF:()=>I,Di:()=>J,E2:()=>L,IE:()=>v,Nl:()=>X,Q4:()=>se,Rk:()=>ie,Ux:()=>U,Ye:()=>Z,ZF:()=>H,eY:()=>K,jH:()=>V,jQ:()=>re,kz:()=>W,oN:()=>Q,q3:()=>Y,qK:()=>j,qN:()=>E,z5:()=>q,zv:()=>$});var o=r(49186),s=r(53966),n=r(97768),i=r(70328),l=r(19419),a=r(65864),u=r(43334),p=r(58512),c=r(92722);function d(e,t){return e?t?4:3:t?3:2}const h=()=>s.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},f=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n},m=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n,e[r+2]=t[o+2]},g=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n,e[r+2]=t[o+3]},w=(e,t,r,o,s,n)=>{e[r]=s,e[r+1]=n,e[r+2]=t[o+2],e[r+3]=t[o+3]};function F(e,t,r,o){if(e){if(r)return t&&o?w:m;if(t&&o)return g}else if(t&&o)return m;return f}function v({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function M({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function _({scale:e,translate:t},r,o){return r*e[o]+t[o]}function I(e,t,r){return e?t?r?R(e):x(e):r?P(e):T(e):null}function T(e){const t=e.coords;return{x:t[0],y:t[1]}}function b(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function x(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function S(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function P(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function R(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function O(e,t){return e&&t?N:e?S:t?A:b}function E(e,t,r=O(null!=t.z,null!=t.m)){return r(e,t)}function j(e,t,r){if(null==e)return null;const o=d(t,r),s=[];for(let t=0;t<e.coords.length;t+=o){const r=[];for(let s=0;s<o;s++)r.push(e.coords[t+s]);s.push(r)}return t?r?{points:s,hasZ:t,hasM:r}:{points:s,hasZ:t}:r?{points:s,hasM:r}:{points:s}}function G(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const o=e.coords;let s=0;for(const e of t.points)for(let t=0;t<r;t++)o[s++]=e[t];return e}function C(e,t,r){if(!e)return null;const o=d(t,r),{coords:s,lengths:n}=e,i=[];let l=0;for(const e of n){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<o;t++)e.push(s[l++]);t.push(e)}i.push(t)}return t?r?{paths:i,hasZ:t,hasM:r}:{paths:i,hasZ:t}:r?{paths:i,hasM:r}:{paths:i}}function D(e,t,r=d(t.hasZ,t.hasM)){const{lengths:o,coords:s}=e;let n=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)s[n++]=t[e];o.push(e.length)}return e}function q(e,t,r){if(!e)return null;const o=d(t,r),{coords:s,lengths:n}=e,i=[];let l=0;for(const e of n){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<o;t++)e.push(s[l++]);t.push(e)}i.push(t)}return t?r?{rings:i,hasZ:t,hasM:r}:{rings:i,hasZ:t}:r?{rings:i,hasM:r}:{rings:i}}function Z(e,t,r=t.hasZ,o=t.hasM){return function(e,t,r,o){const s=d(r,o),{lengths:n,coords:i}=e;let l=0;le(e);for(const e of t){for(const t of e)for(let e=0;e<s;e++)i[l++]=t[e];n.push(e.length)}return e}(e,t.rings,r,o)}const z=[],B=[];function L(e,t,r,o,s){z[0]=e;const[n]=J(B,z,t,r,o,s);return ae(z),ae(B),n}function J(e,t,r,s,n,i){if(ae(e),!r){for(const r of t){const t=i?r.attributes[i]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,o,s){const n=O(r,o);for(const{geometry:r,attributes:o}of t){const t=null!=r?n(new c.A,r):null;e.push(new u.Om(t,o,null,s?o[s]:void 0))}return e}(e,t,s,n,i);case"esriGeometryMultipoint":return function(e,t,r,o,s){const n=d(r,o);for(const{geometry:r,attributes:o}of t){const t=null!=r?G(new c.A,r,n):null;e.push(new u.Om(t,o,null,s?o[s]:void 0))}return e}(e,t,s,n,i);case"esriGeometryPolyline":return function(e,t,r,o,s){const n=d(r,o);for(const{geometry:r,attributes:o,centroid:i}of t){const t=null!=r?D(new c.A,r,n):null,l=null!=i?E(new c.A,i):null;e.push(new u.Om(t,o,l,s?o[s]:void 0))}return e}(e,t,s,n,i);case"esriGeometryPolygon":return function(e,t,r,o,s){for(const{geometry:n,centroid:i,attributes:l}of t){const t=null!=n?Z(new c.A,n,r,o):null,a=s?l[s]:void 0;null!=i?e.push(new u.Om(t,l,b(new c.A,i),a)):e.push(new u.Om(t,l,null,a))}return e}(e,t,s,n,i);default:h().error("convertToFeatureSet:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${r}'`)),ae(e)}return e}function Q(e,t,r,o){B[0]=e,k(z,B,t,r,o);const s=z[0];return ae(z),ae(B),s}function U(e,t,r){if(null==e)return null;const s=new c.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,a.fT)(e)?O(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(s,e):(0,a.Bi)(e)?Z(s,e,t,r):(0,a.Rg)(e)?D(s,e,d(t,r)):(0,a.U9)(e)?G(s,e,d(t,r)):void h().error("convertFromGeometry:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${e}'`))}function $(e,t,r,s){const n=e&&("coords"in e?e:e.geometry);if(null==n)return null;switch(t){case"esriGeometryPoint":{let e=T;return r&&s?e=R:r?e=x:s&&(e=P),e(n)}case"esriGeometryMultipoint":return j(n,r,s);case"esriGeometryPolyline":return C(n,r,s);case"esriGeometryPolygon":return q(n,r,s);default:return h().error("convertToGeometry:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,s,n){if(ae(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,o){let s=T;r&&o?s=R:r?s=x:o&&(s=P);for(const r of t){const{geometry:t,attributes:o}=r,n=null!=t?s(t):null;e.push({attributes:o,geometry:n})}return e}(e,t,s,n);case"esriGeometryMultipoint":return function(e,t,r,o){for(const{geometry:s,attributes:n}of t)e.push({attributes:n,geometry:null!=s?j(s,r,o):null});return e}(e,t,s,n);case"esriGeometryPolyline":return function(e,t,r,o){for(const{geometry:s,attributes:n}of t)e.push({attributes:n,geometry:null!=s?C(s,r,o):null});return e}(e,t,s,n);case"esriGeometryPolygon":return function(e,t,r,o){for(const{geometry:s,attributes:n,centroid:i}of t){const t=null!=s?q(s,r,o):null;if(null!=i){const r=T(i);e.push({attributes:n,centroid:r,geometry:t})}else e.push({attributes:n,geometry:t})}return e}(e,t,s,n);default:h().error("convertToFeatureSet:unknown-geometry",new o.A(`Unable to parse unknown geometry type '${r}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:r,transform:o,fields:s,hasM:n,hasZ:i,features:l,geometryType:a,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,h={features:k([],l,a,i,n),fields:s,geometryType:a,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:$(c,d,!1,!1)};return o&&(h.transform=o),u&&(h.exceededTransferLimit=u),n&&(h.hasM=n),i&&(h.hasZ=i),h}function Y(e,t){const r=new p.A,{hasM:s,hasZ:n,features:i,objectIdFieldName:l,spatialReference:a,geometryType:u,exceededTransferLimit:c,transform:d,fields:y}=e;return y&&(r.fields=y),r.geometryType=u??null,r.objectIdFieldName=l??t??null,r.spatialReference=a??null,r.objectIdFieldName?(i&&J(r.features,i,u,n,s,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),s&&(r.hasM=s),n&&(r.hasZ=n),d&&(r.transform=d),r):(h().error(new o.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function K(e){const{transform:t,features:r,hasM:o,hasZ:s}=e;if(!t)return e;for(const e of r)null!=e.geometry&&oe(e.geometry,e.geometry,o,s,t),null!=e.centroid&&oe(e.centroid,e.centroid,o,s,t);return e.transform=null,e}function V(e,t){const{geometryType:r,features:o,hasM:s,hasZ:n}=t;if(!e)return t;for(let t=0;t<o.length;t++){const i=o[t],l=i.weakClone();l.geometry=new c.A,X(l.geometry,i.geometry,s,n,r,e),i.centroid&&(l.centroid=new c.A,X(l.centroid,i.centroid,s,n,"esriGeometryPoint",e)),o[t]=l}return t.transform=e,t}function X(e,t,r,o,s,n,i=r,l=o){if(le(e),!t?.coords.length)return null;const a=y[s],{coords:u,lengths:p}=t,c=d(r,o),h=d(r&&i,o&&l),f=F(r,o,i,l);if(!p.length)return f(e.coords,u,0,0,v(n,u[0]),M(n,u[1])),le(e,c,0),e;let m,g,w,_,I=0,T=0,b=T;for(const t of p){if(t<a)continue;let r=0;T=b,w=m=v(n,u[I]),_=g=M(n,u[I+1]),f(e.coords,u,T,I,w,_),r++,I+=c,T+=h;for(let o=1;o<t;o++,I+=c)w=v(n,u[I]),_=M(n,u[I+1]),w===m&&_===g||(f(e.coords,u,T,I,w-m,_-g),T+=h,r++,m=w,g=_);r>=a&&(e.lengths.push(r),b=T)}return ae(e.coords,b),e.coords.length?e:null}function W(e,t,r,o,s,n,i=r,l=o){if(le(e),!t?.coords.length)return null;const a=y[s],{coords:u,lengths:p}=t,c=d(r,o),h=d(r&&i,o&&l),f=F(r,o,i,l);if(!p.length)return f(e.coords,u,0,0,u[0],u[1]),le(e,c,0),e;let m=0;const g=n*n;for(const t of p){if(t<a){m+=t*c;continue}const r=e.coords.length/h,o=m,s=m+(t-1)*c;f(e.coords,u,e.coords.length,o,u[o],u[o+1]),te(e.coords,u,c,g,f,o,s),f(e.coords,u,e.coords.length,s,u[s],u[s+1]);const n=e.coords.length/h-r;n>=a?e.lengths.push(n):ae(e.coords,r*h),m+=t*c}return e.coords.length?e:null}function ee(e,t,r,o){const s=e[t],n=e[t+1],i=e[r],l=e[r+1],a=e[o],u=e[o+1];let p=i,c=l,d=a-p,h=u-c;if(0!==d||0!==h){const e=((s-p)*d+(n-c)*h)/(d*d+h*h);e>1?(p=a,c=u):e>0&&(p+=d*e,c+=h*e)}return d=s-p,h=n-c,d*d+h*h}function te(e,t,r,o,s,n,i){let l,a=o,u=0;for(let e=n+r;e<i;e+=r)l=ee(t,e,n,i),l>a&&(u=e,a=l);a>o&&(u-n>r&&te(e,t,r,o,s,n,u),s(e,t,e.length,u,t[u],t[u+1]),i-u>r&&te(e,t,r,o,s,u,i))}function re(e,t,r,o){if(!t?.coords?.length)return null;const s=d(r,o);let n=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=s){const r=e[t],o=e[t+1];n=Math.min(n,r),u=Math.max(u,r),a=Math.min(a,o),p=Math.max(p,o)}}return(0,i.is)(e)?(0,i.BI)(e,n,a,u,p):(0,l.fA)(n,a,u,p,e),e}function oe(e,t,r,o,s){const{coords:i,lengths:l}=t,a=d(r,o);if(!i.length)return e!==t&&le(e),e;(0,n.Lw)(s);const{originPosition:u,scale:p,translate:c}=s,h=ue;h.originPosition=u;const y=h.scale;y[0]=p[0]??1,y[1]=-(p[1]??1),y[2]=p[2]??1,y[3]=p[3]??1;const f=h.translate;if(f[0]=c[0]??0,f[1]=c[1]??0,f[2]=c[2]??0,f[3]=c[3]??0,!l.length){for(let t=0;t<a;++t)e.coords[t]=_(h,i[t],t);return e!==t&&le(e,a,0),e}let m=0;for(let t=0;t<l.length;t++){const r=l[t];e.lengths[t]=r;for(let t=0;t<a;++t)e.coords[m+t]=_(h,i[m+t],t);let o=e.coords[m],s=e.coords[m+1];m+=a;for(let t=1;t<r;t++,m+=a){o+=i[m]*y[0],s+=i[m+1]*y[1],e.coords[m]=o,e.coords[m+1]=s;for(let t=2;t<a;++t)e.coords[m+t]=_(h,i[m+t],t)}}return e!==t&&le(e,i.length,l.length),e}function se(e,t,r,o,s,n){if(le(e),e.lengths.push(...t.lengths),r===s&&o===n)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const i=d(r,o),l=F(r,o,s,n),a=t.coords;for(let t=0;t<a.length;t+=i)l(e.coords,a,e.coords.length,t,a[t],a[t+1])}return e}function ne(e,t,r,o){let s=0,n=e[o*t],i=e[o*(t+1)];for(let l=1;l<r;l++){const r=n+e[o*(t+l)],a=i+e[o*(t+l)+1],u=(r-n)*(a+i);n=r,i=a,s+=u}return.5*s}function ie(e,t){const{coords:r,lengths:o}=e;let s=0,n=0;for(let e=0;e<o.length;e++){const i=o[e];n+=ne(r,s,i,t),s+=i}return Math.abs(n)}function le(e,t=0,r=0){ae(e.lengths,r),ae(e.coords,t)}function ae(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>i});var o=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const i=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,o._)([(0,s.M)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>i});var o=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const i=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,o._)([(0,s.M)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,o._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>a});var o=r(90237),s=r(93637),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);const a={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const o=e.find((e=>!!e.field));if(!o)return null;const s=new l.A;return s.read(o,r),[s]}},write:{writer:function(e,t,r,o){const n=e.find((e=>!!e.field));n&&(0,s.sM)(r,[n.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,o._)([(0,n.M)(a)],t.prototype,"orderBy",void 0),t=(0,o._)([(0,i.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var o=r(90237),s=r(92602),n=r(70333),i=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(83531),w=r(20655),F=r(80812),v=r(41318),M=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new F.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:o}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:o},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",o),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const o=e===r.id;if(o&&r.portal.user)return(0,M.It)(r);let s,i;if(o)s=r.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;i=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,a=!1,u=!1;if(!i)return{features:{edit:l,fullEdit:a},content:{updateItem:u}};try{if(o?await r.reload():(r=new F.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,M.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:a},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const o=`${r.owningSystemUrl}/sharing/rest`,s=w.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(o))return s.user;const a=`${o}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,i.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,o=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&o&&!(0,d.ut)(o.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,o._)([(0,h.M)({type:F.default})],t.prototype,"portalItem",null),(0,o._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,o._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,o._)([(0,h.M)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,o._)([(0,h.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,o._)([(0,h.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,o._)([(0,h.M)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,o._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},29005:(e,t,r)=>{r.d(t,{A:()=>c});var o=r(90237),s=r(69540),n=r(66552),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.O)(i.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"description",void 0),(0,o._)([(0,l.M)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,o._)([(0,l.M)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,o._)([(0,a.$)("esri.layers.support.FeatureTemplate")],p);const c=p},33143:(e,t,r)=>{r.d(t,{A:()=>h});var o=r(90237),s=r(69540),n=r(25482),i=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(80451),c=r(29005);let d=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,o._)([(0,i.M)({json:{write:!0}})],d.prototype,"id",void 0),(0,o._)([(0,i.M)({json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,i.M)({json:{write:!0}})],d.prototype,"domains",void 0),(0,o._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,o._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,o._)([(0,i.M)({type:[c.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,o._)([(0,a.$)("esri.layers.support.FeatureType")],d);const h=d},95466:(e,t,r)=>{r.d(t,{A:()=>d});var o=r(49186),s=r(25482),n=r(53966),i=r(91869),l=r(3330),a=r(30524),u=r(56400),p=r(96285);const c=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,o=y(t);if(t&&o){const s=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(o,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").error(new o.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?p.mQ.utcInstance:(0,i.tE)(c,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:o,editFieldsInfo:s}=e,n=(o?"startField"in o?o.startField:o.startTimeField:"")??"",i=(o?"endField"in o?o.endField:o.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):l??u.n$:null,p=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.timeReference?(0,u.ZS)(o.timeReference):l:null,c=new Map([[h(s?.creationDateField??""),a],[h(s?.editDateField??""),a],[h(n),p],[h(i),p]]);for(const{name:o,type:s}of e.fields)if(f.has(s))t.set(o,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(o,null);else if(r)t.set(o,u.L5);else{const e=c.get(h(o??""))??l;t.set(o,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var o,s=r(90237),n=r(66552),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let p=o=class extends i.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new o({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.M)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,l.M)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,l.M)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=o=(0,s._)([(0,a.$)("esri.layers.support.OrderByInfo")],p);const c=p},98453:(e,t,r)=>{r.d(t,{m:()=>o});const o=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},22671:(e,t,r)=>{r.d(t,{A:()=>F});var o,s=r(90237),n=r(59456),i=r(52106),l=r(66552),a=r(25482),u=r(4718),p=r(10107),c=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937),y=r(16930),f=r(65864),m=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=o=class extends a.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=i.A.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],o=a[e],s=o?.spatialReference;null==t||s||(t.spatialReference=r)}o.push(n)}return o}writeGeometryType(e,t,r,o){if(e)return void g.write(e,t,r,o);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,o)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,o=(0,f.rS)(e);return o&&!r&&t.spatialReference&&(o.spatialReference=y.A.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const o=t.features[r];if(o.geometry){const t=e?.[r];o.geometry=t?.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,r],translate:[o,s]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-o)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)i?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[o,s],scale:[n,i]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+o),(e=>s-e*i),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let o,s;const n=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=r(l[1]);e===o&&i===s||(n.push([e-o,i-s]),o=e,s=i)}else o=t(l[0]),s=r(l[1]),n.push([o,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],i=this._quantizePoints(n,t,r);i&&s.push(i)}return s.length>0?((0,f.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,r);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,o,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,o=n.length;e<o;e++){const o=n[e];for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(i+=s[0],l+=s[1]):(i=s[0],l=s[1]),s[0]=t(i),s[1]=r(l)}}if(o&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2]),r[3]=s(r[3])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let i,l;for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=r(l)}if(o&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2]),t[3]=s(t[3])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.M)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.M)({type:[i.A],json:{write:!0}})],w.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],w.prototype,"readFeatures",null),(0,s._)([(0,p.M)({type:[m.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,s._)([(0,p.M)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,s._)([(0,h.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,s._)([(0,p.M)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,s._)([(0,p.M)({types:n.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,s._)([(0,p.M)({type:y.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,s._)([(0,h.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,s._)([(0,p.M)({json:{write:!0}})],w.prototype,"transform",void 0),w=o=(0,s._)([(0,d.$)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const F=w}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3089],{67482:(e,t,n)=>{function r(e){return null!=a(e)||null!=i(e)}function s(e){return u.test(e)}function o(e){return a(e)??i(e)}function i(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!l.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,s=+n.month-1,o=+n.day,i=+(n.hours??"0"),a=+(n.minutes??"0"),l=+(n.seconds??"0");if(i>23)return null;if(a>59)return null;if(l>59)return null;const p=n.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(r,s,o,i,a,l,c);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,s,o,i,a,l,c)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>s,Cq:()=>r,_U:()=>o});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},39516:(e,t,n)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return r.create(e,{fieldsIndex:t})}function s(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>s})},85113:(e,t,n)=>{n.d(t,{BM:()=>F,bd:()=>T,sO:()=>A,xD:()=>p});var r=n(67482),s=n(49186),o=n(21325),i=n(43334),a=n(92722),u=n(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function p(e){return l[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function y(e){for(const t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],s=e[(n+1)%e.length];t+=r[0]*s[1]-s[0]*r[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function g(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return x(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=m(t);!function(e){return!f(e)}(r)?b(e,r,n):v(e,r,n)}function w(e,t,n){const r=m(t);!function(e){return f(e)}(r)?b(e,r,n):v(e,r,n)}function b(e,t,n){for(const r of t)x(e,r,n);e.lengths.push(t.length)}function v(e,t,n){for(let r=t.length-1;r>=0;r--)x(e,t[r],n);e.lengths.push(t.length)}function x(e,t,n){const[r,s,o]=t;e.coords.push(r,s),n.hasZ&&e.coords.push(o||0)}function S(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function A(e,t=4326){if(!e)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,i=(0,o.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!i.test(r))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function F(e,t={}){const n=[],r=new Set,s=new Set;let o,i=!1,a=null,l=!1,{geometryType:f=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:m}=t;if((!e||(f||(f=p(e.type)),p(e.type)===f))&&(i||(i=y(d(e))),l||(l=null!=m,l&&(o=typeof m,c&&(a=Object.keys(c).filter((e=>c[e]===m))))),c&&a&&l&&null!=m&&(a.length>1?a=a.filter((e=>c[e]===m)):1===a.length&&(a=c[a[0]]===m?a:[])),c))for(const e in c){if(r.has(e))continue;const t=S(c[e]);if("unknown"===t){s.add(e);continue}s.delete(e),r.add(e);const o=(0,u.rS)(e);o&&n.push({name:o,alias:e,type:t})}}const m=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(m)for(const e of n)if(e.name===m&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:f,hasZ:i,objectIdFieldName:m,objectIdFieldType:o,unknownFields:Array.from(s)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const s of e){const{geometry:e,properties:o,id:u}=s;if(e&&p(e.type)!==n)continue;const l=o||{};let c;r&&(c=l[r],null==u||c||(l[r]=c=u));const d=new i.Om(e?g(new a.A,e,t):null,l,null,c??void 0);yield d}}(c(e),t))}},64714:(e,t,n)=>{n.d(t,{F0:()=>u,Vx:()=>c,e2:()=>y,f:()=>f});var r=n(44208),s=n(4718),o=n(99352),i=n(4071),a=n(93470);function u(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,r.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${d(t)} = null;`;for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function d(e){return l.test(e)?`.${e}`:`["${e}"]`}function y(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,n)=>{n.d(t,{$1:()=>g,CR:()=>m,MB:()=>d,Yx:()=>u,bP:()=>p});var r=n(67482),s=n(21325),o=n(30524);class i{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new i,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function p(e){return new l(e)}const c=new Set;function d(e,t,n,r=!1){c.clear();for(const s in n){const i=e.get(s);if(!i)continue;const a=y(i,n[s]);if(c.add(i.name),i&&(r||i.editable)){const e=(0,o.CJ)(i,a);if(e)return u((0,o.uo)(e,i,a));t[i.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return u(`missing required field "${t.name}"`);return null}function y(e,t){let n=t;return(0,o.WA)(e)&&"string"==typeof t?n=parseFloat(t):(0,o.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,o.vE)(e)&&"string"==typeof t&&(n=(0,r._U)(t)),(0,o.WX)(n)}let f;function m(e,t){if(!e||!(0,s.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function g(e,t){!(0,s.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([n.e(9930),n.e(1275)]).then(n.bind(n,47559))),f}()}},75321:(e,t,n)=>{n.d(t,{GA:()=>M,GL:()=>T,I:()=>N,J0:()=>$,Ki:()=>C,Px:()=>I,QE:()=>S,bV:()=>j,bW:()=>P,vJ:()=>x}),n(59456);var r=n(78888),s=n(49186),o=n(53966),i=n(84952),a=n(21325),u=n(28735),l=n(90708),p=n(58512),c=n(85113),d=n(64714),y=n(82832),f=n(95466),m=n(98453),g=n(56400),h=n(16930);const w=()=>o.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),b="startindex",v=new Set([b,"offset"]),x="http://www.opengis.net/def/crs/",S=`${x}OGC/1.3/CRS84`;var A,F;async function T(e,t,n={},o=5){const{links:a}=e,u=D(a,"items",A.geojson)||D(a,"http://www.opengis.net/def/rel/ogc/1.0/items",A.geojson);if(null==u)throw new s.A("ogc-feature-layer:missing-items-page","Missing items url");const{apiKey:l,customParameters:p,signal:y}=n,h=(0,i.s2)(u.href,e.landingPage.url),v={limit:o,...p,token:l},x=(0,i.a6)(h,v),S={accept:A.geojson},{data:F}=await(0,r.A)(x,{signal:y,headers:S}),T=V(x,o,F.links)??b;(0,c.sO)(F);const j=(0,c.BM)(F,{geometryType:t.geometryType}),I=t.fields||j.fields||[],C=null!=t.hasZ?t.hasZ:j.hasZ,M=j.geometryType,$=t.objectIdField||j.objectIdFieldName||"OBJECTID";let P=t.timeInfo;const N=I.find((({name:e})=>e===$));if(N)N.editable=!1,N.nullable=!1;else{if(!j.objectIdFieldType)throw new s.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");I.unshift({name:$,alias:$,type:"number"===j.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if($!==j.objectIdFieldName){const e=I.find((({name:e})=>e===j.objectIdFieldName));e&&(e.type="esriFieldTypeInteger")}I===j.fields&&j.unknownFields.length>0&&w().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:j.unknownFields}});for(const e of I){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new s.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!m.m.jsonValues.includes(e.type))throw new s.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(P){const e=new f.A(I);if(P.startTimeField){const t=e.get(P.startTimeField);t?(P.startTimeField=t.name,t.type="esriFieldTypeDate"):P.startTimeField=null}if(P.endTimeField){const t=e.get(P.endTimeField);t?(P.endTimeField=t.name,t.type="esriFieldTypeDate"):P.endTimeField=null}if(P.trackIdField){const t=e.get(P.trackIdField);t?P.trackIdField=t.name:(P.trackIdField=null,w().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:P}}))}P.timeReference||={timeZoneIANA:g.n$},P.startTimeField||P.endTimeField||(w().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:P}}),P=void 0)}return{drawingInfo:M?(0,d.F0)(M):null,extent:_(e),geometryType:M,fields:I,hasZ:!!C,objectIdField:$,paginationParameter:T,timeInfo:P}}async function j(e,t={}){const{links:n,url:o}=e,a=D(n,"data",A.json)||D(n,"http://www.opengis.net/def/rel/ogc/1.0/data",A.json);if(null==a)throw new s.A("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:u,customParameters:l,signal:p}=t,c=(0,i.s2)(a.href,o),{data:d}=await(0,r.A)(c,{signal:p,headers:{accept:A.json},query:{...l,token:u}});for(const t of d.collections)t.landingPage=e;return d}async function I(e,t={}){const{links:n,url:o}=e,a=D(n,"conformance",A.json)||D(n,"http://www.opengis.net/def/rel/ogc/1.0/conformance",A.json);if(null==a)throw new s.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:u,customParameters:l,signal:p}=t,c=(0,i.s2)(a.href,o),{data:d}=await(0,r.A)(c,{signal:p,headers:{accept:A.json},query:{...l,token:u}});return d}async function C(e,t={}){const{apiKey:n,customParameters:s,signal:o}=t,{data:i}=await(0,r.A)(e,{signal:o,headers:{accept:A.json},query:{...s,token:n}});return i.url=e,i}async function M(e,t={}){const{links:n,url:s}=e,o=D(n,"service-desc",A.openapi);if(null==o)return w().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:a,customParameters:u,signal:l}=t,p=(0,i.s2)(o.href,s),{data:c}=await(0,r.A)(p,{signal:l,headers:{accept:A.openapi},query:{...u,token:a}});return c}function $(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),n=t?.groups;if(!n)return null;const{authority:r,code:s}=n;switch(r.toLowerCase()){case"ogc":switch(s.toLowerCase()){case"crs27":return h.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return h.A.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(s,10);return Number.isNaN(e)?null:e}default:return null}}async function P(e,t,n){const r=await N(e,t,n);return(0,l.ZF)(r)}async function N(e,t,n){const{collection:{links:o,landingPage:{url:d}},layerDefinition:m,maxRecordCount:g,queryParameters:{apiKey:w,customParameters:b},spatialReference:v,supportedCrs:x}=e,S=D(o,"items",A.geojson)||D(o,"http://www.opengis.net/def/rel/ogc/1.0/items",A.geojson);if(null==S)throw new s.A("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:F,num:T,start:j,timeExtent:I,where:C}=t;if(t.objectIds)throw new s.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");const M=h.A.fromJSON(v),$=t.outSpatialReference??M,P=$.isWGS84?null:k($,x),N=R(F,x),O=function(e){if(null==e)return null;const{start:t,end:n}=e;return`${null!=t?t.toISOString():".."}/${null!=n?n.toISOString():".."}`}(I),_=null!=(L=C)&&L&&"1=1"!==L?L:null,V=T??(null==j?g:10),E=0===j?void 0:j,{fields:G,geometryType:B,hasZ:q,objectIdField:U,paginationParameter:W}=m,J=(0,i.s2)(S.href,d),{data:Q}=await(0,r.A)(J,{...n,query:{...b,...N,crs:P,datetime:O,query:_,limit:V,[W]:E,token:w},headers:{accept:A.geojson}}),z=(0,c.bd)(Q,{geometryType:B,hasZ:q,objectIdField:U}),Z=z.length===V&&!!D(Q.links??[],"next",A.geojson),H=new f.A(G);var L;for(const e of z){const t={};(0,y.MB)(H,t,e.attributes,!0),t[U]=e.attributes[U],e.attributes=t}if(!P&&$.isWebMercator)for(const e of z)if(null!=e.geometry&&null!=B){const t=(0,l.zv)(e.geometry,B,q,!1);t.spatialReference=h.A.WGS84,e.geometry=(0,l.Ux)((0,u.Cv)(t,$))}for(const e of z)e.objectId=e.attributes[U];const K=P||!P&&$.isWebMercator?$.toJSON():a.KK,Y=new p.A;return Y.exceededTransferLimit=Z,Y.features=z,Y.fields=G,Y.geometryType=B,Y.hasZ=q,Y.objectIdFieldName=U,Y.spatialReference=K,Y}function k(e,t){const{isWebMercator:n,wkid:r}=e;if(!r)return null;const s=n?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return s?`${x}${s}`:null}function O(e){if(null==e)return"";const{xmin:t,ymin:n,xmax:r,ymax:s}=e;return`${t},${n},${r},${s}`}function R(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:n}=e;if(!n||n.isWGS84)return{bbox:O(e)};const r=k(n,t);return null!=r?{bbox:O(e),"bbox-crs":r}:n.isWebMercator?{bbox:O((0,u.Cv)(e,h.A.WGS84))}:null}function _(e){const t=e.extent?.spatial;if(!t)return null;const n=t.bbox[0],r=4===n.length,[s,o]=n,i=r?void 0:n[2];return{xmin:s,ymin:o,xmax:r?n[2]:n[3],ymax:r?n[3]:n[4],zmin:i,zmax:r?void 0:n[5],spatialReference:h.A.WGS84.toJSON()}}function D(e,t,n){return e.find((({rel:e,type:r})=>e===t&&r===n))??e.find((({rel:e,type:n})=>e===t&&!n))}function V(e,t,n){if(!n)return;const r=D(n,"next",A.geojson),s=(0,i.An)(r?.href)?.query;if(!s)return;const o=(0,i.An)(e).query,a=Object.keys(o??{}),u=Object.entries(s).filter((([e])=>!a.includes(e))).find((([e,n])=>v.has(e.toLowerCase())&&Number.parseInt(n,10)===t)),l=u?.[0];return l}(F=A||(A={})).json="application/json",F.geojson="application/geo+json",F.openapi="application/vnd.oai.openapi+json;version=3.0"},20437:(e,t,n)=>{n.d(t,{A:()=>g});var r,s=n(90237),o=n(66552),i=n(25482),a=n(10107),u=n(56507),l=(n(87811),n(44208),n(93223)),p=n(36005),c=n(40608),d=n(72088),y=n(98453);const f=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends i.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.M)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,s._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,s._)([(0,a.M)()],m.prototype,"description",void 0),(0,s._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,s._)([(0,a.M)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,s._)([(0,a.M)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,s._)([(0,a.M)({type:u.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,s._)([(0,a.M)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,s._)([(0,a.M)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,s._)([(0,l.e)(y.m)],m.prototype,"type",void 0),(0,s._)([(0,a.M)()],m.prototype,"valueType",void 0),(0,s._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,s._)([(0,a.M)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,s._)([(0,c.$)("esri.layers.support.Field")],m);const g=m},4071:(e,t,n)=>{n.d(t,{$:()=>r,P:()=>s});const r={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},s={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:r,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},72088:(e,t,n)=>{n.d(t,{rS:()=>F,gK:()=>A}),n(44208);var r,s=n(90237),o=n(4718),i=n(10107),a=(n(53966),n(93223)),u=n(40608),l=n(25482);n(87811);let p=r=class extends l.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,i.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,i.M)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,s._)([(0,u.$)("esri.layers.support.CodedValue")],p);const c=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends l.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,i.M)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.e)(c)],d.prototype,"type",void 0),d=(0,s._)([(0,u.$)("esri.layers.support.Domain")],d);const y=d;var f;let m=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,s._)([(0,i.M)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,s._)([(0,a.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,s._)([(0,u.$)("esri.layers.support.CodedValueDomain")],m);const g=m;var h;n(49186);let w=h=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new h}};(0,s._)([(0,a.e)({inherited:"inherited"})],w.prototype,"type",void 0),w=h=(0,s._)([(0,u.$)("esri.layers.support.InheritedDomain")],w);const b=w;var v;let x=v=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,i.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,s._)([(0,i.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,s._)([(0,a.e)({range:"range"})],x.prototype,"type",void 0),x=v=(0,s._)([(0,u.$)("esri.layers.support.RangeDomain")],x);const S=x,A={key:"type",base:y,typeMap:{range:x,"coded-value":g,inherited:b}};function F(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>g,D3:()=>f,XJ:()=>m,lc:()=>y,mX:()=>w,rU:()=>h,tH:()=>A});var r=n(799);const s="__begin__",o="__end__",i=new RegExp(s,"ig"),a=new RegExp(o,"ig"),u=new RegExp("^"+s,"i"),l=new RegExp(o+"$","i"),p='"',c=p+" + ",d=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return A(t.expression)}return null}function w(e){let t;return e?(t=(0,r.HC)(e,(e=>s+'$feature["'+e+'"]'+o)),t=u.test(t)?t.replace(u,""):p+t,t=l.test(t)?t.replace(l,""):t+p,t=t.replaceAll(i,c).replaceAll(a,d)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function A(e){if(!e)return null;let t=v.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3089],{67482:(e,t,n)=>{function r(e){return null!=a(e)||null!=i(e)}function s(e){return u.test(e)}function o(e){return a(e)??i(e)}function i(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!l.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,s=+n.month-1,o=+n.day,i=+(n.hours??"0"),a=+(n.minutes??"0"),l=+(n.seconds??"0");if(i>23)return null;if(a>59)return null;if(l>59)return null;const p=n.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(r,s,o,i,a,l,c);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,s,o,i,a,l,c)}return Number.isNaN(d)?null:d}n.d(t,{Br:()=>s,Cq:()=>r,_U:()=>o});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},39516:(e,t,n)=>{async function r(e,t){const{WhereClause:r}=await Promise.all([n.e(835),n.e(4800)]).then(n.bind(n,50835));return r.create(e,{fieldsIndex:t})}function s(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}n.d(t,{G:()=>r,m:()=>s})},85113:(e,t,n)=>{n.d(t,{BM:()=>F,bd:()=>T,sO:()=>S,xD:()=>p});var r=n(67482),s=n(49186),o=n(21325),i=n(43334),a=n(92722),u=n(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function p(e){return l[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function y(e){for(const t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],s=e[(n+1)%e.length];t+=r[0]*s[1]-s[0]*r[1]}return t<=0}function m(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function g(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return A(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=m(t);!function(e){return!f(e)}(r)?b(e,r,n):v(e,r,n)}function w(e,t,n){const r=m(t);!function(e){return f(e)}(r)?b(e,r,n):v(e,r,n)}function b(e,t,n){for(const r of t)A(e,r,n);e.lengths.push(t.length)}function v(e,t,n){for(let r=t.length-1;r>=0;r--)A(e,t[r],n);e.lengths.push(t.length)}function A(e,t,n){const[r,s,o]=t;e.coords.push(r,s),n.hasZ&&e.coords.push(o||0)}function x(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e,t=4326){if(!e)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,i=(0,o.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!i.test(r))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function F(e,t={}){const n=[],r=new Set,s=new Set;let o,i=!1,a=null,l=!1,{geometryType:f=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:m}=t;if((!e||(f||(f=p(e.type)),p(e.type)===f))&&(i||(i=y(d(e))),l||(l=null!=m,l&&(o=typeof m,c&&(a=Object.keys(c).filter((e=>c[e]===m))))),c&&a&&l&&null!=m&&(a.length>1?a=a.filter((e=>c[e]===m)):1===a.length&&(a=c[a[0]]===m?a:[])),c))for(const e in c){if(r.has(e))continue;const t=x(c[e]);if("unknown"===t){s.add(e);continue}s.delete(e),r.add(e);const o=(0,u.rS)(e);o&&n.push({name:o,alias:e,type:t})}}const m=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(m)for(const e of n)if(e.name===m&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:f,hasZ:i,objectIdFieldName:m,objectIdFieldType:o,unknownFields:Array.from(s)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const s of e){const{geometry:e,properties:o,id:u}=s;if(e&&p(e.type)!==n)continue;const l=o||{};let c;r&&(c=l[r],null==u||c||(l[r]=c=u));const d=new i.Om(e?g(new a.A,e,t):null,l,null,c??void 0);yield d}}(c(e),t))}},64714:(e,t,n)=>{n.d(t,{F0:()=>u,Vx:()=>c,e2:()=>y,f:()=>f});var r=n(44208),s=n(4718),o=n(99352),i=n(4071),a=n(93470);function u(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,r.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${d(t)} = null;`;for(const t in e)n+=`this${d(t)} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function d(e){return l.test(e)?`.${e}`:`["${e}"]`}function y(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,n)=>{n.d(t,{$1:()=>g,CR:()=>m,MB:()=>d,Yx:()=>u,bP:()=>p});var r=n(67482),s=n(21325),o=n(30524);class i{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new i,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function p(e){return new l(e)}const c=new Set;function d(e,t,n,r=!1){c.clear();for(const s in n){const i=e.get(s);if(!i)continue;const a=y(i,n[s]);if(c.add(i.name),i&&(r||i.editable)){const e=(0,o.CJ)(i,a);if(e)return u((0,o.uo)(e,i,a));t[i.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return u(`missing required field "${t.name}"`);return null}function y(e,t){let n=t;return(0,o.WA)(e)&&"string"==typeof t?n=parseFloat(t):(0,o.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,o.vE)(e)&&"string"==typeof t&&(n=(0,r._U)(t)),(0,o.WX)(n)}let f;function m(e,t){if(!e||!(0,s.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function g(e,t){!(0,s.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([n.e(9930),n.e(1275)]).then(n.bind(n,47559))),f}()}},75321:(e,t,n)=>{n.d(t,{GA:()=>M,GL:()=>T,I:()=>N,J0:()=>$,Ki:()=>C,Px:()=>I,QE:()=>x,bV:()=>j,bW:()=>P,vJ:()=>A}),n(59456);var r=n(78888),s=n(49186),o=n(53966),i=n(84952),a=n(21325),u=n(28735),l=n(90708),p=n(58512),c=n(85113),d=n(64714),y=n(82832),f=n(95466),m=n(98453),g=n(56400),h=n(16930);const w=()=>o.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),b="startindex",v=new Set([b,"offset"]),A="http://www.opengis.net/def/crs/",x=`${A}OGC/1.3/CRS84`;var S,F;async function T(e,t,n={},o=5){const{links:a}=e,u=D(a,"items",S.geojson)||D(a,"http://www.opengis.net/def/rel/ogc/1.0/items",S.geojson);if(null==u)throw new s.A("ogc-feature-layer:missing-items-page","Missing items url");const{apiKey:l,customParameters:p,signal:y}=n,h=(0,i.s2)(u.href,e.landingPage.url),v={limit:o,...p,token:l},A=(0,i.a6)(h,v),x={accept:S.geojson},{data:F}=await(0,r.A)(A,{signal:y,headers:x}),T=V(A,o,F.links)??b;(0,c.sO)(F);const j=(0,c.BM)(F,{geometryType:t.geometryType}),I=t.fields||j.fields||[],C=null!=t.hasZ?t.hasZ:j.hasZ,M=j.geometryType,$=t.objectIdField||j.objectIdFieldName||"OBJECTID";let P=t.timeInfo;const N=I.find((({name:e})=>e===$));if(N)N.editable=!1,N.nullable=!1;else{if(!j.objectIdFieldType)throw new s.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");I.unshift({name:$,alias:$,type:"number"===j.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if($!==j.objectIdFieldName){const e=I.find((({name:e})=>e===j.objectIdFieldName));e&&(e.type="esriFieldTypeInteger")}I===j.fields&&j.unknownFields.length>0&&w().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:j.unknownFields}});for(const e of I){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new s.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!m.m.jsonValues.includes(e.type))throw new s.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(P){const e=new f.A(I);if(P.startTimeField){const t=e.get(P.startTimeField);t?(P.startTimeField=t.name,t.type="esriFieldTypeDate"):P.startTimeField=null}if(P.endTimeField){const t=e.get(P.endTimeField);t?(P.endTimeField=t.name,t.type="esriFieldTypeDate"):P.endTimeField=null}if(P.trackIdField){const t=e.get(P.trackIdField);t?P.trackIdField=t.name:(P.trackIdField=null,w().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:P}}))}P.timeReference||={timeZoneIANA:g.n$},P.startTimeField||P.endTimeField||(w().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:P}}),P=void 0)}return{drawingInfo:M?(0,d.F0)(M):null,extent:_(e),geometryType:M,fields:I,hasZ:!!C,objectIdField:$,paginationParameter:T,timeInfo:P}}async function j(e,t={}){const{links:n,url:o}=e,a=D(n,"data",S.json)||D(n,"http://www.opengis.net/def/rel/ogc/1.0/data",S.json);if(null==a)throw new s.A("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:u,customParameters:l,signal:p}=t,c=(0,i.s2)(a.href,o),{data:d}=await(0,r.A)(c,{signal:p,headers:{accept:S.json},query:{...l,token:u}});for(const t of d.collections)t.landingPage=e;return d}async function I(e,t={}){const{links:n,url:o}=e,a=D(n,"conformance",S.json)||D(n,"http://www.opengis.net/def/rel/ogc/1.0/conformance",S.json);if(null==a)throw new s.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:u,customParameters:l,signal:p}=t,c=(0,i.s2)(a.href,o),{data:d}=await(0,r.A)(c,{signal:p,headers:{accept:S.json},query:{...l,token:u}});return d}async function C(e,t={}){const{apiKey:n,customParameters:s,signal:o}=t,{data:i}=await(0,r.A)(e,{signal:o,headers:{accept:S.json},query:{...s,token:n}});return i.url=e,i}async function M(e,t={}){const{links:n,url:s}=e,o=D(n,"service-desc",S.openapi);if(null==o)return w().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:a,customParameters:u,signal:l}=t,p=(0,i.s2)(o.href,s),{data:c}=await(0,r.A)(p,{signal:l,headers:{accept:S.openapi},query:{...u,token:a}});return c}function $(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),n=t?.groups;if(!n)return null;const{authority:r,code:s}=n;switch(r.toLowerCase()){case"ogc":switch(s.toLowerCase()){case"crs27":return h.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return h.A.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(s,10);return Number.isNaN(e)?null:e}default:return null}}async function P(e,t,n){const r=await N(e,t,n);return(0,l.ZF)(r)}async function N(e,t,n){const{collection:{links:o,landingPage:{url:d}},layerDefinition:m,maxRecordCount:g,queryParameters:{apiKey:w,customParameters:b},spatialReference:v,supportedCrs:A}=e,x=D(o,"items",S.geojson)||D(o,"http://www.opengis.net/def/rel/ogc/1.0/items",S.geojson);if(null==x)throw new s.A("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:F,num:T,start:j,timeExtent:I,where:C}=t;if(t.objectIds)throw new s.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");const M=h.A.fromJSON(v),$=t.outSpatialReference??M,P=$.isWGS84?null:k($,A),N=R(F,A),O=function(e){if(null==e)return null;const{start:t,end:n}=e;return`${null!=t?t.toISOString():".."}/${null!=n?n.toISOString():".."}`}(I),_=null!=(L=C)&&L&&"1=1"!==L?L:null,V=T??(null==j?g:10),E=0===j?void 0:j,{fields:G,geometryType:B,hasZ:q,objectIdField:U,paginationParameter:W}=m,J=(0,i.s2)(x.href,d),{data:Q}=await(0,r.A)(J,{...n,query:{...b,...N,crs:P,datetime:O,query:_,limit:V,[W]:E,token:w},headers:{accept:S.geojson}}),H=(0,c.bd)(Q,{geometryType:B,hasZ:q,objectIdField:U}),z=H.length===V&&!!D(Q.links??[],"next",S.geojson),Z=new f.A(G);var L;for(const e of H){const t={};(0,y.MB)(Z,t,e.attributes,!0),t[U]=e.attributes[U],e.attributes=t}if(!P&&$.isWebMercator)for(const e of H)if(null!=e.geometry&&null!=B){const t=(0,l.zv)(e.geometry,B,q,!1);t.spatialReference=h.A.WGS84,e.geometry=(0,l.Ux)((0,u.Cv)(t,$))}for(const e of H)e.objectId=e.attributes[U];const K=P||!P&&$.isWebMercator?$.toJSON():a.KK,Y=new p.A;return Y.exceededTransferLimit=z,Y.features=H,Y.fields=G,Y.geometryType=B,Y.hasZ=q,Y.objectIdFieldName=U,Y.spatialReference=K,Y}function k(e,t){const{isWebMercator:n,wkid:r}=e;if(!r)return null;const s=n?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return s?`${A}${s}`:null}function O(e){if(null==e)return"";const{xmin:t,ymin:n,xmax:r,ymax:s}=e;return`${t},${n},${r},${s}`}function R(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:n}=e;if(!n||n.isWGS84)return{bbox:O(e)};const r=k(n,t);return null!=r?{bbox:O(e),"bbox-crs":r}:n.isWebMercator?{bbox:O((0,u.Cv)(e,h.A.WGS84))}:null}function _(e){const t=e.extent?.spatial;if(!t)return null;const n=t.bbox[0],r=4===n.length,[s,o]=n,i=r?void 0:n[2];return{xmin:s,ymin:o,xmax:r?n[2]:n[3],ymax:r?n[3]:n[4],zmin:i,zmax:r?void 0:n[5],spatialReference:h.A.WGS84.toJSON()}}function D(e,t,n){return e.find((({rel:e,type:r})=>e===t&&r===n))??e.find((({rel:e,type:n})=>e===t&&!n))}function V(e,t,n){if(!n)return;const r=D(n,"next",S.geojson),s=(0,i.An)(r?.href)?.query;if(!s)return;const o=(0,i.An)(e).query,a=Object.keys(o??{}),u=Object.entries(s).filter((([e])=>!a.includes(e))).find((([e,n])=>v.has(e.toLowerCase())&&Number.parseInt(n,10)===t)),l=u?.[0];return l}(F=S||(S={})).json="application/json",F.geojson="application/geo+json",F.openapi="application/vnd.oai.openapi+json;version=3.0"},39357:(e,t,n)=>{n.d(t,{H:()=>u});var r,s=n(90237),o=n(25482),i=n(10107),a=(n(44208),n(53966),n(87811),n(40608));let u=r=class extends o.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,s._)([(0,i.M)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,i.M)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=r=(0,s._)([(0,a.$)("esri.layers.support.CodedValue")],u)},53177:(e,t,n)=>{n.d(t,{A:()=>d});var r,s=n(90237),o=n(4718),i=n(10107),a=(n(44208),n(53966),n(93223)),u=n(40608),l=n(39357),p=n(76357);let c=r=class extends p.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new r({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,s._)([(0,i.M)({type:[l.H],json:{write:!0}})],c.prototype,"codedValues",void 0),(0,s._)([(0,a.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=r=(0,s._)([(0,u.$)("esri.layers.support.CodedValueDomain")],c);const d=c},76357:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(90237),s=n(66552),o=n(25482),i=n(10107),a=(n(44208),n(53966),n(87811),n(93223)),u=n(40608);const l=new s.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends o.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,i.M)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,r._)([(0,a.e)(l)],p.prototype,"type",void 0),p=(0,r._)([(0,u.$)("esri.layers.support.Domain")],p);const c=p},20437:(e,t,n)=>{n.d(t,{A:()=>g});var r,s=n(90237),o=n(66552),i=n(25482),a=n(10107),u=n(56507),l=(n(87811),n(44208),n(93223)),p=n(36005),c=n(40608),d=n(80451),y=n(98453);const f=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends i.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.M)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,s._)([(0,a.M)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,s._)([(0,a.M)()],m.prototype,"description",void 0),(0,s._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,s._)([(0,a.M)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],m.prototype,"domain",void 0),(0,s._)([(0,a.M)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,s._)([(0,a.M)({type:u.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,s._)([(0,a.M)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,s._)([(0,a.M)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,s._)([(0,l.e)(y.m)],m.prototype,"type",void 0),(0,s._)([(0,a.M)()],m.prototype,"valueType",void 0),(0,s._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,s._)([(0,a.M)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,s._)([(0,c.$)("esri.layers.support.Field")],m);const g=m},4071:(e,t,n)=>{n.d(t,{$:()=>r,P:()=>s});const r={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},s={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:r,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},80451:(e,t,n)=>{n.d(t,{rS:()=>g,gK:()=>m}),n(44208);var r,s=n(53177),o=n(76357),i=n(90237),a=(n(53966),n(87811),n(49186),n(93223)),u=n(40608);let l=r=class extends o.A{constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,i._)([(0,a.e)({inherited:"inherited"})],l.prototype,"type",void 0),l=r=(0,i._)([(0,u.$)("esri.layers.support.InheritedDomain")],l);const p=l;var c,d=n(10107);let y=c=class extends o.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,d.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],y.prototype,"maxValue",void 0),(0,i._)([(0,d.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],y.prototype,"minValue",void 0),(0,i._)([(0,a.e)({range:"range"})],y.prototype,"type",void 0),y=c=(0,i._)([(0,u.$)("esri.layers.support.RangeDomain")],y);const f=y,m={key:"type",base:o.A,typeMap:{range:f,"coded-value":s.A,inherited:p}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return f.fromJSON(e);case"codedValue":return s.A.fromJSON(e);case"inherited":return p.fromJSON(e)}return null}},32730:(e,t,n)=>{n.d(t,{BI:()=>g,D3:()=>f,XJ:()=>m,lc:()=>y,mX:()=>w,rU:()=>h,tH:()=>S});var r=n(799);const s="__begin__",o="__end__",i=new RegExp(s,"ig"),a=new RegExp(o,"ig"),u=new RegExp("^"+s,"i"),l=new RegExp(o+"$","i"),p='"',c=p+" + ",d=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function f(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function h(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function w(e){let t;return e?(t=(0,r.HC)(e,(e=>s+'$feature["'+e+'"]'+o)),t=u.test(t)?t.replace(u,""):p+t,t=l.test(t)?t.replace(l,""):t+p,t=t.replaceAll(i,c).replaceAll(a,d)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,A=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=v.exec(e)||A.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7e3,3069],{39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,{fieldsIndex:t})}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>_,Ej:()=>m,Hq:()=>u,Ie:()=>v,Jt:()=>w,Ne:()=>f,RF:()=>l,_F:()=>c,aI:()=>T,fA:()=>s,gX:()=>h,hZ:()=>b,iT:()=>a,is:()=>F,qv:()=>I,vI:()=>g,v_:()=>M,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}function d(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function y(e){return e[2]>=e[5]?0:e[5]-e[2]}function c(e){const t=d(e),r=y(e),i=p(e);return Math.sqrt(t*t+r*r+i*i)}function h(e,t=[0,0,0]){return t[0]=e[0]+d(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+y(e)/2,t}function m(e,t=[0,0,0]){return t[0]=d(e),t[1]=p(e),t[2]=y(e),t}function f(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function g(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function v(e){return e?b(e,I):n(I)}function w(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function F(e){return 6===e.length}function T(e,t,r){if(null==e||null==t)return e===t;if(!F(e)||!F(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const I=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];n()},70048:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ve});var i=r(90237),n=r(69540),s=r(5503),o=r(49186),l=r(81583),a=r(92071),u=r(74887),d=r(36708),p=r(39516),y=r(84952),c=r(10107),h=(r(44208),r(53966)),m=(r(87811),r(36005)),f=r(40608),g=r(4146),b=r(52136),v=r(18768),w=r(63074),_=r(69208),F=r(47685),T=r(87796),I=r(16131),M=r(8303),S=r(54310),A=r(25036),x=r(82935),O=r(60694),E=r(10873),j=r(15426),N=r(17036),V=r(30524),C=r(13874),$=r(86162),L=(r(94409),r(65345),r(42980),r(20917),r(92438)),D=r(96576),R=r(93618),q=(r(65494),r(4902)),P=r(4718),U=r(92474),G=r(93637),B=r(43937),k=r(90360),Z=r(9582),J=r(16930),H=r(29005),X=r(81457),z=r(39383),Y=r(61956),Q=r(30291),K=r(59868);const W={key:"type",base:L.A,errorContext:"renderer",typeMap:{simple:D.A,"unique-value":R.A,"class-breaks":$.A}},ee=(0,N.p)(),te=(0,k.C)({types:W});let re=0;function ie(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function ne(e){switch(e){case"point":case"multipoint":return K.UK.clone();case"polyline":return K.A7.clone();case"polygon":case"multipatch":return K.Cx.clone();default:return null}}function se(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function oe(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const i={},n=se(e,t);if(null!=n){const{defaultValues:e}=n;for(const t in e)i[t]=e[t]}return i[t.subtypeField]=e,new H.A({name:"New Feature",drawingTool:r,prototype:{attributes:i}})}let le=class extends((0,a.P)((0,n.O)((0,q.sA)(U.A)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${re++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,V.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}writeFieldOverrides(e,t,r){const{fields:i,parent:n}=this;let s;if(i){s=[];let e=0;i.forEach((({name:t,alias:r,editable:i,visible:o})=>{if(!o)return;const l=n?.fields?.find((e=>e.name===t));if(!l)return;const a={name:t};let u=!1;r!==l.alias&&(a.alias=r,u=!0),i!==l.editable&&(a.editable=i,u=!0),s.push(a),u&&e++})),0===e&&s.length===i.length&&(s=null)}else s=(0,P.o8)(e);s?.length&&(0,G.sM)(r,s,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,i=e?.fields;if(!e||!i?.length)return null;const{subtypes:n,subtypeField:s}=e,o=n?.find((e=>e.code===r)),l=o?.defaultValues,a=o?.domains,u=[];for(const e of i){const i=e.clone(),{name:n}=i,o=t?.find((e=>e.name===n));if(i.visible=!t||!!o,o){const{alias:e,editable:t}=o;e&&(i.alias=e),!1===t&&(i.editable=!1)}const d=l?.[n]??null;i.defaultValue=n===s?r:d;const p=a?.[n]??null;i.domain=n===s?null:p?"inherited"===p.type?i.domain:p.clone():null,u.push(i)}return u}get floorInfo(){return this.parent?.floorInfo}get geometryType(){return this.parent?.geometryType}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||h.A.getLogger(this).error(de("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,V.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new D.A({symbol:ne(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const i=t.drawingInfo?.renderer,n=te(i,t,r);let s;const{subtypeCode:o}=this;if(null!=o&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(n,t.subtypeField)){const e=n.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(o)));e&&(s=new D.A({symbol:e.symbol}))}else"simple"!==n?.type||n.visualVariables?.length||(s=n);return s}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer;if(!i)return;const n=i.visualVariables?.some((e=>"rotationInfo"!==e.type));return n?void 0:te(i,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??J.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[oe(this.subtypeCode,t)]}readTitleFromService(e,t){const r=se(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw de("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new o.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:i}=this;if(!i)throw de("updateAttachment");if(e.getAttribute(i.subtypeField)!==this.subtypeCode)throw new o.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return i.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw de("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new o.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw de("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:i,title:n}=this;if(r){const{displayField:e,editFieldsInfo:s,objectIdField:o}=r;t={displayField:e,editFieldsInfo:s,fields:i,objectIdField:o,title:n}}return(0,Q.tn)(t,e)}createQuery(){if(!this.parent)throw de("createQuery");const e=(0,j.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,p.m)(t,this.parent.definitionExpression),e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(t?.includeImpliedDomains&&this.parent){const t=(0,j.bw)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw de("queryAttachments");const i=e.clone();return i.where=ue(i.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw de("queryFeatureCount");return r.parent.queryFeatureCount(ae(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw de("queryFeatures");return r.parent.queryFeatures(ae(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw de("queryObjectIds");return r.parent.queryObjectIds(ae(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw de("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw de("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"capabilities",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"effectiveCapabilities",null),(0,i._)([(0,c.M)({json:{write:{ignoreOrigin:!0}}})],le.prototype,"charts",void 0),(0,i._)([(0,c.M)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],le.prototype,"editingEnabled",void 0),(0,i._)([(0,c.M)({type:Boolean,readOnly:!0})],le.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"elevationInfo",null),(0,i._)([(0,c.M)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],le.prototype,"fieldOverrides",void 0),(0,i._)([(0,B.K)("fieldOverrides")],le.prototype,"writeFieldOverrides",null),(0,i._)([(0,c.M)({...ee.fields,readOnly:!0,json:{read:!1}})],le.prototype,"fields",null),(0,i._)([(0,c.M)(ee.fieldsIndex)],le.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"floorInfo",null),(0,i._)([(0,c.M)({type:Z.A,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],le.prototype,"formTemplate",void 0),(0,i._)([(0,c.M)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],le.prototype,"id",void 0),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"geometryType",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"type",void 0),(0,i._)([(0,c.M)(ie((0,P.o8)(E.kF)))],le.prototype,"labelsVisible",void 0),(0,i._)([(0,c.M)({type:[X.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:z.w},write:{ignoreOrigin:!0}}})],le.prototype,"labelingInfo",void 0),(0,i._)([(0,c.M)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],le.prototype,"layerType",void 0),(0,i._)([(0,c.M)(ie((0,P.o8)(E.fV)))],le.prototype,"legendEnabled",void 0),(0,i._)([(0,c.M)({type:["show","hide"]})],le.prototype,"listMode",void 0),(0,i._)([(0,c.M)((()=>{const e=(0,P.o8)(E.hn);return e.json.origins.service.read=!1,ie(e)})())],le.prototype,"minScale",void 0),(0,i._)([(0,c.M)((()=>{const e=(0,P.o8)(E.hG);return e.json.origins.service.read=!1,ie(e)})())],le.prototype,"maxScale",void 0),(0,i._)([(0,c.M)({readOnly:!0})],le.prototype,"effectiveScaleRange",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"objectIdField",null),(0,i._)([(0,c.M)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],le.prototype,"opacity",void 0),(0,i._)([(0,c.M)({clonable:!1})],le.prototype,"parent",void 0),(0,i._)([(0,c.M)(ie((0,P.o8)(E.M6)))],le.prototype,"popupEnabled",void 0),(0,i._)([(0,c.M)({type:C.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],le.prototype,"popupTemplate",void 0),(0,i._)([(0,c.M)({readOnly:!0})],le.prototype,"defaultPopupTemplate",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"relationships",null),(0,i._)([(0,c.M)({types:W,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],le.prototype,"renderer",null),(0,i._)([(0,m.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],le.prototype,"readRendererFromService",null),(0,i._)([(0,m.w)("renderer",["layerDefinition.drawingInfo.renderer"])],le.prototype,"readRenderer",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"spatialReference",null),(0,i._)([(0,c.M)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],le.prototype,"subtypeCode",void 0),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"subtypeField",null),(0,i._)([(0,c.M)({type:[H.A],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],le.prototype,"templates",void 0),(0,i._)([(0,m.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],le.prototype,"readTemplatesFromService",null),(0,i._)([(0,c.M)({type:String,json:{write:{ignoreOrigin:!0}}})],le.prototype,"title",void 0),(0,i._)([(0,m.w)("service","title",["subtypes"])],le.prototype,"readTitleFromService",null),(0,i._)([(0,c.M)({readOnly:!0,json:{read:!1}})],le.prototype,"url",null),(0,i._)([(0,c.M)({readOnly:!0})],le.prototype,"userHasUpdateItemPrivileges",null),(0,i._)([(0,c.M)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],le.prototype,"visible",void 0),le=(0,i._)([(0,f.$)("esri.layers.support.SubtypeSublayer")],le);const ae=(e,t,r)=>{if(!r)return t.createQuery();const i=Y.A.from(r);return i.where=ue(i.where,e.subtypeField,t.subtypeCode),i},ue=(e,t,r)=>{const i=new RegExp(`${t}\\s*=\\s*\\d+`),n=`${t}=${r}`,s=e??"";return i.test(s)?s.replace(i,n):(0,p.m)(n,s)},de=e=>new o.A(`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`),pe=le;var ye=r(96184),ce=r(91908),he=r(92935);const me="SubtypeGroupLayer";function fe(e,t){return new o.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const ge=(0,N.p)();let be=class extends((0,T.j)((0,F.w6)((0,w.dM)((0,x.e)((0,A.j)((0,S.J)((0,v.b)((0,I.q)((0,M.A)((0,a.P)((0,_.d)((0,b.p)((0,n.O)(g.A)))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(s.A.ofType(pe)),this.supportedSourceTypes=new Set(["Feature Layer"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,u.sg)((async(e,t,i)=>{const{save:n,saveAs:s}=await r.e(5740).then(r.bind(r,33359));switch(e){case he.X.SAVE:return n(this,t);case he.X.SAVE_AS:return s(this,i,t)}})),this.addHandles((0,d.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),d.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.QP).then((async()=>{if(!this.url)throw new o.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new o.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,j.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,j.C$)(this)}get parsedUrl(){const e=(0,y.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.fj)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,O.yG)(this.url,t):t}async addAttachment(e,t){return(0,j.Xl)(this,e,t,me)}async updateAttachment(e,t,r){return(0,j.bt)(this,e,t,r,me)}async applyEdits(e,t){return(0,j.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.qr)(Promise.all([r.e(893),r.e(8132),r.e(2593),r.e(9062)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,j.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,p.m)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,j.mm)(this,e,t,me)}async fetchRecomputedExtents(e){return(0,j.WP)(this,e,me)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(t?.includeImpliedDomains){const t=(0,j.bw)(this,e);if(t)return t}const r=(0,j.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}loadAll(){return(0,l.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,j.lV)(this,e,t,me)}async queryFeatures(e,t){const r=await this.load(),i=Y.A.from(e)??r.createQuery(),n=i.outFields??[];n.includes(this.subtypeField)||(n.push(this.subtypeField),i.outFields=n);const s=await r.source.queryFeatures(i,t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return s}async queryObjectIds(e,t){return(0,j.sg)(this,e,t,me)}async queryFeatureCount(e,t){return(0,j.Ye)(this,e,t,me)}async queryExtent(e,t){return(0,j.B5)(this,e,t,me)}async queryRelatedFeatures(e,t){return(0,j.hM)(this,e,t,me)}async queryRelatedFeaturesCount(e,t){return(0,j.S2)(this,e,t,me)}async save(e){return this._debouncedSaveOperations(he.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(he.X.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:i,messages:n}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return n?.push(fe(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return n?.push(fe(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(n?.push(new o.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,ce.D)(this,e)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new o.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,V.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,j.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};(0,i._)([(0,c.M)({readOnly:!0})],be.prototype,"createQueryVersion",null),(0,i._)([(0,c.M)({readOnly:!0})],be.prototype,"editingEnabled",null),(0,i._)([(0,c.M)({readOnly:!0})],be.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,c.M)({...ge.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],be.prototype,"fields",void 0),(0,i._)([(0,c.M)(ge.fieldsIndex)],be.prototype,"fieldsIndex",void 0),(0,i._)([(0,c.M)(E.id)],be.prototype,"id",void 0),(0,i._)([(0,c.M)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],be.prototype,"listMode",void 0),(0,i._)([(0,c.M)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],be.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.M)(ge.outFields)],be.prototype,"outFields",void 0),(0,i._)([(0,c.M)({readOnly:!0})],be.prototype,"parsedUrl",null),(0,i._)([(0,c.M)({clonable:!1})],be.prototype,"source",null),(0,i._)([(0,c.M)({type:s.A.ofType(pe),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const i=e.map((({code:e})=>{const i=new pe({subtypeCode:e});return i.read(t,r),i}));return new(s.A.ofType(pe))(i)}}}},name:"layers",write:{ignoreOrigin:!0}}})],be.prototype,"sublayers",void 0),(0,i._)([(0,c.M)({type:ye.A})],be.prototype,"timeInfo",void 0),(0,i._)([(0,c.M)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],be.prototype,"title",void 0),(0,i._)([(0,m.w)("service","title",["name"])],be.prototype,"readTitleFromService",null),(0,i._)([(0,c.M)({json:{read:!1}})],be.prototype,"type",void 0),be=(0,i._)([(0,f.$)("esri.layers.SubtypeGroupLayer")],be);const ve=be},82935:(e,t,r)=>{r.d(t,{B:()=>c,e:()=>h});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),l=r(89317),a=r(30524),u=r(96184),d=r(73133),p=r(79677),y=r(10184);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=d.j.fromJSON(r.timeOffsetUnits);return i&&n?new y.A({value:i,unit:n}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.M)({type:p.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.M)({type:y.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.M)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.M)(c)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},39357:(e,t,r)=>{r.d(t,{H:()=>a});var i,n=r(90237),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(40608));let a=i=class extends s.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.M)({type:String,json:{write:!0}})],a.prototype,"name",void 0),(0,n._)([(0,o.M)({type:[String,Number],json:{write:!0}})],a.prototype,"code",void 0),a=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],a)},53177:(e,t,r)=>{r.d(t,{A:()=>y});var i,n=r(90237),s=r(4718),o=r(10107),l=(r(44208),r(53966),r(93223)),a=r(40608),u=r(39357),d=r(76357);let p=i=class extends d.A{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.M)({type:[u.H],json:{write:!0}})],p.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],p.prototype,"type",void 0),p=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],p);const y=p},76357:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),n=r(66552),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),a=r(40608);const u=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends s.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.M)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,l.e)(u)],d.prototype,"type",void 0),d=(0,i._)([(0,a.$)("esri.layers.support.Domain")],d);const p=d},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),s=r(66552),o=r(25482),l=r(10107),a=r(56507),u=(r(87811),r(44208),r(93223)),d=r(36005),p=r(40608),y=r(80451),c=r(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.M)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.M)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.M)()],m.prototype,"description",void 0),(0,n._)([(0,d.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.M)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.M)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.M)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.M)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.e)(c.m)],m.prototype,"type",void 0),(0,n._)([(0,l.M)()],m.prototype,"valueType",void 0),(0,n._)([(0,d.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.M)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.$)("esri.layers.support.Field")],m);const f=m},95466:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),l=r(3330),a=r(30524),u=r(56400),d=r(96285);const p=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],f(e))}static fromLayerJSON(e){return new y(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=c(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(c(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?l.GB.instance:t===u.n$?d.mQ.utcInstance:(0,o.tE)(p,t,(()=>d.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function c(e){return e.trim().toLowerCase()}function h(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):l??u.n$:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,u.ZS)(i.timeReference):l:null,p=new Map([[c(n?.creationDateField??""),a],[c(n?.editDateField??""),a],[c(s),d],[c(o),d]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=p.get(c(i??""))??l;t.set(i,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),d=r(79677),p=r(10184),y=r(56400);function c(e,t){return p.A.fromJSON({value:e,unit:t})}let h=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?d.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?c(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?c(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,o.M)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,o.M)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,o.M)({type:d.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,o.M)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,o.M)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,o.M)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,o.M)((0,y.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,o.M)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,o.M)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i._)([(0,o.M)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i._)([(0,a.$)("esri.layers.support.TimeInfo")],h);const m=h},80451:(e,t,r)=>{r.d(t,{rS:()=>f,gK:()=>m}),r(44208);var i,n=r(53177),s=r(76357),o=r(90237),l=(r(53966),r(87811),r(49186),r(93223)),a=r(40608);let u=i=class extends s.A{constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o._)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=i=(0,o._)([(0,a.$)("esri.layers.support.InheritedDomain")],u);const d=u;var p,y=r(10107);let c=p=class extends s.A{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new p({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,y.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],c.prototype,"maxValue",void 0),(0,o._)([(0,y.M)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],c.prototype,"minValue",void 0),(0,o._)([(0,l.e)({range:"range"})],c.prototype,"type",void 0),c=p=(0,o._)([(0,a.$)("esri.layers.support.RangeDomain")],c);const h=c,m={key:"type",base:s.A,typeMap:{range:h,"coded-value":n.A,inherited:d}};function f(e){if(!e?.type)return null;switch(e.type){case"range":return h.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return d.fromJSON(e)}return null}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>c,mX:()=>b,rU:()=>g,tH:()=>T});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),d='"',p=d+" + ",y=" + "+d;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t?.[1].trim()||null}(t.expression);case"arcade":return T(t.expression)}return null}function b(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=a.test(t)?t.replace(a,""):d+t,t=u.test(t)?t.replace(u,""):t+d,t=t.replaceAll(o,p).replaceAll(l,y)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function T(e){if(!e)return null;let t=w.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},10184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),d=r(73133);let p=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(d.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,l.M)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,u.$)("esri.time.TimeInterval")],p);const y=p},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);
|