@arcgis/core 4.30.0 → 4.30.2
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/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{c39237c00c1d588dc107.js → 25c41ceb1951d80f4798.js} +1 -1
- package/assets/esri/core/workers/chunks/{f13fb6b712e364bbf48c.js → 61e1f1564a8440f186e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{70ebc0e38eb1cfb79320.js → 85701ca4ebc2de529053.js} +1 -1
- package/assets/esri/core/workers/chunks/88e8547079b299572bfe.js +1 -0
- package/assets/esri/core/workers/chunks/{403f73017bf763f7471c.js → 91f8f99c6f64e85458f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{37dfb3ff86c4ef1b26c1.js → a9efe7abda35995d0dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/ad6468d67bf50aff85ea.js +1 -0
- package/assets/esri/core/workers/chunks/{4cf5414d67aa888f2322.js → d502a5fe47e77d63ae5e.js} +1 -1
- package/assets/esri/core/workers/chunks/d6c954272cc96d6b7987.js +1 -0
- package/assets/esri/core/workers/chunks/{aa198e898b46c6e89d0b.js → e2c927ef4d88a0a8104b.js} +1 -1
- package/assets/esri/core/workers/chunks/{880e8329e264b6156fbc.js → e3a049ebcb0b89f16228.js} +1 -1
- package/assets/esri/core/workers/chunks/{f927c28f2fa78ec68235.js → ed9c88afccc5041d899a.js} +1 -1
- package/assets/esri/core/workers/chunks/{31f7a3c8e1a5b4ca4a73.js → fb97d6cc841c67c09d5c.js} +1 -1
- package/assets/esri/themes/base/widgets/_Grid.scss +3 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +100 -50
- package/kernel.js +1 -1
- package/layers/CatalogLayer.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/package.json +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/loadUtils.js +1 -1
- package/portal/support/urlUtils.js +1 -1
- package/rest/imageService/fetchRasterInfo.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/assets/esri/core/workers/chunks/20d447aa01a66a464363.js +0 -1
- package/assets/esri/core/workers/chunks/2b39f50b92fe27c30497.js +0 -1
- package/assets/esri/core/workers/chunks/8865ca9cb8d867d48d2d.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1737],{70668:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69540),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),d=i(40608),u=i(73133);let p=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r._)([(0,d.$)("esri.TimeInterval")],p);const c=p},54239:(e,t,i)=>{i.d(t,{A:()=>w});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),d=i(67076),u=i(10107),p=(i(44208),i(53966),i(36005)),c=i(40608),h=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],g);const w=g},13899:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Oe});var r=i(90237),s=i(52106),n=i(13874),o=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494),i(15036)),a=i(69540),l=i(5503),d=i(49186),u=i(53966),p=i(92071),c=i(74887),h=i(36708),y=i(10107),f=(i(44208),i(87811),i(88620)),m=i(36005),g=i(40608),v=i(35666),w=i(1535),_=i(86738),I=i(4146),b=i(55726),F=i(52136),A=i(18768),S=i(69208),M=i(47685),L=i(16131),x=i(8303),T=i(25036),E=i(58947),O=i(82935),j=i(60945),Z=i(70668),P=i(25482),U=i(30524);function R({associatedLayer:e,serviceUpdateTimeStamp:t}){const i=e?.editingInfo?.lastEditDate,r=e?.serverGens,s=null!=i,n=null!=t,o=s&&n&&t.lastUpdate!==i.getTime();return s&&(o||!n&&r?.minServerGen!==r?.serverGen)}var $=i(96184);const D=e=>{let t=class extends e{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,U.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,U.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:i,endTimeField:r}=t;if(null==i&&null==r)return;if(R({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let r=null;try{const i=await(this.fetchStatistics?.(t,e));r=i?.stats}catch{}if(null==r)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=r,l=t===i?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(i),s(r)]);if(null!=i&&null==n||null!=r&&null==o)return;const a=new j.A({start:n,end:o});this.setAtOrigin("timeInfo",new $.A({endField:r,startField:i,fullTimeExtent:a}),"service")}};return(0,r._)([(0,y.MZ)({type:$.A,json:{read:!1,write:!1}})],t.prototype,"timeInfo",null),(0,r._)([(0,y.MZ)({type:j.A,json:{read:!1,write:!1}})],t.prototype,"timeExtent",null),(0,r._)([(0,y.MZ)({type:Z.A,json:{read:!1,write:!1}})],t.prototype,"timeOffset",null),(0,r._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],t.prototype,"datesInUnknownTimezone",null),(0,r._)([(0,y.MZ)({type:N,readOnly:!0,json:{read:{source:"timeInfo"}}})],t.prototype,"serviceTimeInfo",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer")],t),t};let N=class extends P.oY{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,r._)([(0,y.MZ)({type:String})],N.prototype,"endTimeField",void 0),(0,r._)([(0,y.MZ)({type:String})],N.prototype,"startTimeField",void 0),N=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],N);var C=i(60694),k=i(92009),H=i(4071),q=i(10873),V=i(15426),G=i(40530),K=i(67202),Q=i(17036),W=i(95466),J=i(50805),B=i(20557),Y=i(81457),z=i(39383),X=i(37352),ee=i(4513);let te=class extends P.oY{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"name",void 0),(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"field",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],te.prototype,"type",void 0),te=(0,r._)([(0,g.$)("esri.layers.support.RangeInfo")],te);var ie,re=i(78888),se=i(4718),ne=i(87024),oe=i(67076),ae=i(39829),le=i(57251);let de=ie=class extends((0,P.Te)(l.A.ofType(ae.A))){constructor(e){super(e)}clone(){return new ie(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((i=>{if(!t.equals(i.spatialReference)){if(!(0,le.canProjectWithoutEngine)(i.spatialReference,t))return e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const r=new ae.A;(0,le.projectPolygon)(i,r,t),i=r}const r=i.toJSON(e);return delete r.spatialReference,r})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const i=new ie;return e.forEach((e=>i.add(ae.A.fromJSON(e,t)))),i}};de=ie=(0,r._)([(0,g.$)("esri.layers.support.PolygonCollection")],de);const ue=de;var pe,ce=i(97159);let he=pe=class extends P.oY{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.OH))}readGeometries(e,t,i){Array.isArray(e)?this.geometries=ue.fromJSON(e,i):this._geometriesSource={url:(0,ce.f)(e,i),context:i}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:i,context:r}=this._geometriesSource,s=await(0,re.A)(i,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ue.fromJSON(o,r),this._geometriesSource=null}clone(){const e=new pe({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,r._)([(0,y.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],he.prototype,"spatialRelationship",void 0),(0,r._)([(0,y.MZ)({type:ue,nonNullable:!0,json:{write:!0}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,r._)([(0,m.w)(["web-scene","portal-item"],"geometries")],he.prototype,"readGeometries",null),he=pe=(0,r._)([(0,g.$)("esri.layers.support.SceneFilter")],he);const ye=he;var fe=i(84952),me=i(8947),ge=i(61956),ve=i(24212),we=i(57465),_e=i(30291);async function Ie(e){const t=[];for(const i of e)i.name.toLowerCase().endsWith(".zip")?t.push(be(i)):t.push(Promise.resolve(i));return(await Promise.all(t)).flat()}async function be(e){const{BlobReader:t,ZipReader:r,BlobWriter:s}=await Promise.all([i.e(8392),i.e(9588)]).then(i.bind(i,9588)),n=[],o=new r(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,i=e.getData?.(t).then((t=>new File([t],e.filename)));i&&n.push(i)})),Promise.all(n)}var Fe=i(28030),Ae=i(45671),Se=i(78553);const Me=new Set(["3DObject","Point"]),Le=(0,Q.p)();let xe=class extends(D((0,M.w6)((0,E.w6)((0,A.b)((0,L.q)((0,x.A)((0,T.j)((0,p.P)((0,S.d)((0,F.p)((0,a.O)(I.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new l.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const i=this.getFeatureType(t?.feature)?.domains?.[e];return i&&"inherited"!==i.type?i:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new W.A(this.fields)}readNodePages(e,t,i){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.W4.fromJSON(e,i)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,V.C$)(this.associatedLayer)}get geometryType(){return Ee[this.profile]||"mesh"}set renderer(e){(0,U.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:H.P;const{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,_=!!this.associatedLayer?.infoFor3D&&(0,we.Vo)();return{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:_&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:c&&w,supportsAdd:_&&h&&w,supportsDelete:_&&f&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const i=t.store.profile;return null!=i&&Te[i]?Te[i]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:i,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,me.L)(this,{origin:"service"},t),(0,U.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge.A;return"mesh"===this.geometryType?this.associatedLayer?.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const i=(0,U.hL)(this.fieldsIndex,await(0,Ae.TO)(this,(0,Ae.D8)(this)));return(0,Fe.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,i,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const i=await this.queryCachedAttributes(e,[t]);if(!i||0===i.length)throw new d.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const r=new s.A;return r.attributes=i[0],r.layer=this,r.sourceLayer=this,r}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,_e.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(E.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.Xh.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await i.e(6247).then(i.bind(i,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,C.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,V.GA)(n,e.deleteFeatures,o)}),r(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||i(new d.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const r=await this.extractAndFilterFiles(e),s=r.reduce(((e,t)=>(0,B.oF)(this.infoFor3D,t)?e+1:e),0);0===s&&i(new b.VP),s>1&&i(new b.XQ);const n=this.spatialReference,o=t?.location??new _.A({x:0,y:0,z:0,spatialReference:n}),a=o.spatialReference.isGeographic?"local":"georeferenced",l=w.A.createWithExternalSource(o,r,{vertexSpace:a}),[p]=await this.uploadAssets([l],t);return p}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Ie(e)).filter((e=>(0,B.fu)(t,e))):e}validateLayer(e){if(e.layerType&&!Me.has(e.layerType))throw new d.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let i=!1,r=!1;if(null==e)i=!0,r=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":i=!0,r=s;break;case"vertex-reference-frame":i=!0,r=!s;break;default:i=!1}}if(!i)throw new d.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!r)throw new d.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some((t=>t.name===e.name)),i=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||i,supportsLayerQuery:i};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const i=this.getField(t.name);i?(!i.domain&&t.domain&&(i.domain=t.domain.clone()),i.editable=t.editable,i.nullable=t.nullable,i.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,f.oY)(this);for(let i=0;i<e.length;i++){const r=e[i],s=this.originIdOf(r),n=this.associatedLayer.originIdOf(r);s<n&&(n===v.Gr.SERVICE||n===v.Gr.PORTAL_ITEM)&&t.setAtOrigin(r,this.associatedLayer[r],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,we.Vo)()&&null!=this.associatedLayer?.infoFor3D&&e&&(0,C.Wo)(this.associatedLayer?.url)&&R(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),v.Gr.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:i,portalItem:r}=await(0,k.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ee.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:i,portalItem:r}),await this.associatedLayer.load()}catch(e){(0,c.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.C_)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,ve.XF)(u.A.getLogger(this),(0,ve.$7)("Mesh scene layers","relative-to-scene",e)),(0,ve.XF)(u.A.getLogger(this),(0,ve.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:i,fieldsIndex:r,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics are not available for this layer");const l=r.get(e);if(null==l)throw new d.A(`${i}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find((e=>e.name===l.name));if(null==u)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,fe.fj)(s,u.href),{data:c}=await(0,re.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,r._)([(0,y.MZ)({types:{key:"type",base:G.c,typeMap:{selection:K.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],xe.prototype,"featureReduction",void 0),(0,r._)([(0,y.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],xe.prototype,"rangeInfos",void 0),(0,r._)([(0,y.MZ)({json:{read:!1}})],xe.prototype,"associatedLayer",void 0),(0,r._)([(0,y.MZ)({type:["show","hide"]})],xe.prototype,"listMode",void 0),(0,r._)([(0,y.MZ)({type:["ArcGISSceneServiceLayer"]})],xe.prototype,"operationalLayerType",void 0),(0,r._)([(0,y.MZ)({json:{read:!1},readOnly:!0})],xe.prototype,"type",void 0),(0,r._)([(0,y.MZ)({...Le.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"fields",void 0),(0,r._)([(0,y.MZ)()],xe.prototype,"types",null),(0,r._)([(0,y.MZ)()],xe.prototype,"typeIdField",null),(0,r._)([(0,y.MZ)()],xe.prototype,"templates",null),(0,r._)([(0,y.MZ)()],xe.prototype,"formTemplate",null),(0,r._)([(0,y.MZ)({readOnly:!0,clonable:!1})],xe.prototype,"fieldsIndex",null),(0,r._)([(0,y.MZ)({type:X.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],xe.prototype,"floorInfo",void 0),(0,r._)([(0,y.MZ)(Le.outFields)],xe.prototype,"outFields",void 0),(0,r._)([(0,y.MZ)({type:J.W4,readOnly:!0,json:{read:!1}})],xe.prototype,"nodePages",void 0),(0,r._)([(0,m.w)("service","nodePages",["nodePages","pointNodePages"])],xe.prototype,"readNodePages",null),(0,r._)([(0,y.MZ)({type:[J.uV],readOnly:!0})],xe.prototype,"materialDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.Ot],readOnly:!0})],xe.prototype,"textureSetDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.L0],readOnly:!0})],xe.prototype,"geometryDefinitions",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"serviceUpdateTimeStamp",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"attributeStorageInfo",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"statisticsInfo",void 0),(0,r._)([(0,y.MZ)({type:l.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],xe.prototype,"excludeObjectIds",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],xe.prototype,"definitionExpression",void 0),(0,r._)([(0,y.MZ)({type:ye,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],xe.prototype,"filter",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],xe.prototype,"path",void 0),(0,r._)([(0,y.MZ)(q.Yj)],xe.prototype,"elevationInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"effectiveCapabilities",null),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"effectiveEditingEnabled",null),(0,r._)([(0,y.MZ)({type:String})],xe.prototype,"geometryType",null),(0,r._)([(0,y.MZ)(q.kF)],xe.prototype,"labelsVisible",void 0),(0,r._)([(0,y.MZ)({type:[Y.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:z.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:z.w},write:!0}})],xe.prototype,"labelingInfo",void 0),(0,r._)([(0,y.MZ)(q.fV)],xe.prototype,"legendEnabled",void 0),(0,r._)([(0,y.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const i=t.layerDefinition?.drawingInfo?.transparency;return void 0!==i?(0,Se.D)(i):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],xe.prototype,"opacity",void 0),(0,r._)([(0,y.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"priority",void 0),(0,r._)([(0,y.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"semantic",void 0),(0,r._)([(0,y.MZ)({types:o.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],xe.prototype,"renderer",null),(0,r._)([(0,y.MZ)({json:{read:!1}})],xe.prototype,"cachedDrawingInfo",void 0),(0,r._)([(0,m.w)("service","cachedDrawingInfo")],xe.prototype,"readCachedDrawingInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"capabilities",null),(0,r._)([(0,y.MZ)({type:Boolean,json:{read:!1}})],xe.prototype,"editingEnabled",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],xe.prototype,"infoFor3D",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],xe.prototype,"relationships",null),(0,r._)([(0,y.MZ)(q.M6)],xe.prototype,"popupEnabled",void 0),(0,r._)([(0,y.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],xe.prototype,"popupTemplate",void 0),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"defaultPopupTemplate",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"objectIdField",void 0),(0,r._)([(0,m.w)("service","objectIdField",["objectIdField","fields"])],xe.prototype,"readObjectIdField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"globalIdField",void 0),(0,r._)([(0,m.w)("service","globalIdField",["globalIdField","fields"])],xe.prototype,"readGlobalIdField",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{read:!1}})],xe.prototype,"displayField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"profile",void 0),(0,r._)([(0,m.w)("service","profile",["store.profile"])],xe.prototype,"readProfile",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],xe.prototype,"normalReferenceFrame",void 0),(0,r._)([(0,y.MZ)(q.PY)],xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,y.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"serviceItemId",void 0),(0,r._)([(0,y.MZ)(O.B)],xe.prototype,"useViewTime",null),xe=(0,r._)([(0,g.$)("esri.layers.SceneLayer")],xe);const Te={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ee={"mesh-pyramids":"mesh",points:"point"},Oe=xe},55726:(e,t,i)=>{i.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>f,WF:()=>u,Wt:()=>o,XQ:()=>m,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var r=i(49186);const s="upload-assets",n=()=>new Error;class o extends r.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends r.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends r.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends r.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends r.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends r.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends r.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends r.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends r.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends r.A{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends r.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=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,r._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},47685:(e,t,i)=>{i.d(t,{Mk:()=>h,Zk:()=>p,w6:()=>m});var r=i(90237),s=i(65529),n=i(4718),o=i(74887),a=i(10107),l=(i(44208),i(53966),i(40608)),d=i(20816);const u=new s.A.EventEmitter;function p(e,t,i=null,r=!1){const s=(0,o.Tw)();return r=null==t||r,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:r,result:s.promise}),s}const c=Symbol();function h(e){return null!=e&&"object"==typeof e&&c in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,i){const r=new URL(e).host,s=d.Z3.get(r),n=e=>!e||e===s;return n(t)&&n(i)||t===i}const m=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:r,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=i&&null!=this.layerId&&i===this.layerId,d=y(this),u=y(this)&&f(t,r,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;this.lastEditsEventDate=new Date;const p=o.then((e=>{if(l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const i=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:t,updates:r,deletes:s}=i.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,s.historicMoment)&&this.emit("edits",s),s})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:r}=e,s=t===this.url,n=y(this),o=y(this)&&f(t,i,this.gdbVersion),a=y(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return u.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return u.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,i){return"historicMoment"in this&&this.historicMoment!==i&&(0,d.w5)(e,t)}};return t=c,(0,r._)([(0,a.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,r._)([(0,l.$)("esri.layers.mixins.EditBusLayer")],i),i}},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),h=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),g=i(83531),v=i(20655),w=i(80812),_=i(41318),I=i(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.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,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,I.It)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,c.b8)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,l=!1,d=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:d}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,I.It)(i)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.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 i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?_.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.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,r._)([(0,h.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},82935:(e,t,i)=>{i.d(t,{B:()=>h,e:()=>y});var r=i(90237),s=i(60945),n=i(70668),o=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),d=i(89317),u=i(30524),p=i(96184),c=i(73133);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:d.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,s=c.j.fromJSON(i.timeOffsetUnits);return r&&s?new n.A({value:r,unit:s}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,o.MZ)({type:s.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,o.MZ)({type:n.A})],t.prototype,"timeOffset",void 0),(0,r._)([(0,a.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,o.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,o.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},40530:(e,t,i)=>{i.d(t,{c:()=>a});var r=i(90237),s=i(25482),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let a=class extends s.oY{constructor(){super(...arguments),this.type=null}};(0,r._)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,r._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),a=i(40530);let l=r=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new r}};(0,s._)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=r=(0,s._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const d=l},37352:(e,t,i)=>{i.d(t,{A:()=>u});var r,s=i(90237),n=i(5503),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));let d=r=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"floorField",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=r=(0,s._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d);const u=d},96184:(e,t,i)=>{i.d(t,{A:()=>f});var r=i(90237),s=i(60945),n=i(70668),o=i(69540),a=i(25482),l=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(56400);function h(e,t){return n.A.fromJSON({value:e,unit:t})}let y=class extends((0,o.O)(a.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?s.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?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,r._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,r._)([(0,l.MZ)({type:s.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,r._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,r._)([(0,l.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,r._)([(0,d.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,r._)([(0,p.K)("interval")],y.prototype,"writeInterval",null),(0,r._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,r._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,r._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,r._)([(0,u.$)("esri.layers.support.TimeInfo")],y);const f=y},17036:(e,t,i)=>{i.d(t,{p:()=>l});var r=i(44208),s=i(53966),n=i(20437),o=i(95466),a=i(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,r.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return 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 i=this.fieldsIndex?.has(t);i||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557:(e,t,i)=>{i.d(t,{E1:()=>a,Fm:()=>l,JZ:()=>y,R_:()=>o,fu:()=>s,oF:()=>n,rq:()=>d});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=p(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const i=d(t,e.supportedFormats??[]);return null!=i&&e.editFormats.includes(i)}function o(e,t){return c(function(e,t){const i=e.toLowerCase();return u(t).find((e=>h(e)===i))}(e,t))}function a(e,t){return c(p(e,t))}function l(e,t){return h(function(e,t){return u(t).find((t=>c(t)===e))}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e){return[...r,...e]}function p(e,t){const i=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>i.endsWith(e)))))}function c(e){return e?.[0]}function h(e){return e?.[1].toLowerCase()}function y(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73133:(e,t,i)=>{i.d(t,{j:()=>r});const r=(0,i(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})},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),s=i(74887),n=i(67076);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,r.Ke)(o.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},20816:(e,t,i)=>{i.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var r=i(78888);const s=(0,i(13069).vD)(),n=new Map,o=new Map;async function a(e,t,i){if(!e||!i)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,r.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,r=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&r){const[{deleteForwardEdits:t},{default:r}]=await Promise.all([i.e(2186).then(i.bind(i,32186)),i.e(2558).then(i.bind(i,32558))]),a=await t(n,e,new r({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=o.get(i)?.entries();if(r)for(const[e,i]of r)if(i.name===t)return"edit"===i.lockType;return!1}new Map}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1737],{70668:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69540),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),d=i(40608),u=i(73133);let p=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r._)([(0,d.$)("esri.TimeInterval")],p);const c=p},54239:(e,t,i)=>{i.d(t,{A:()=>w});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),d=i(67076),u=i(10107),p=(i(44208),i(53966),i(36005)),c=i(40608),h=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],g);const w=g},13899:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Oe});var r=i(90237),s=i(52106),n=i(13874),o=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494),i(15036)),a=i(69540),l=i(5503),d=i(49186),u=i(53966),p=i(92071),c=i(74887),h=i(36708),y=i(10107),f=(i(44208),i(87811),i(88620)),m=i(36005),g=i(40608),v=i(35666),w=i(1535),_=i(86738),I=i(4146),b=i(55726),F=i(52136),A=i(18768),S=i(69208),M=i(47685),L=i(16131),x=i(8303),T=i(25036),E=i(58947),O=i(82935),j=i(60945),Z=i(70668),P=i(25482),U=i(30524);function R({associatedLayer:e,serviceUpdateTimeStamp:t}){const i=e?.editingInfo?.lastEditDate,r=e?.serverGens,s=null!=i,n=null!=t,o=s&&n&&t.lastUpdate!==i.getTime();return s&&(o||!n&&r?.minServerGen!==r?.serverGen)}var $=i(96184);const D=e=>{let t=class extends e{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,U.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,U.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:i,endTimeField:r}=t;if(null==i&&null==r)return;if(R({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let r=null;try{const i=await(this.fetchStatistics?.(t,e));r=i?.stats}catch{}if(null==r)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=r,l=t===i?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(i),s(r)]);if(null!=i&&null==n||null!=r&&null==o)return;const a=new j.A({start:n,end:o});this.setAtOrigin("timeInfo",new $.A({endField:r,startField:i,fullTimeExtent:a}),"service")}};return(0,r._)([(0,y.MZ)({type:$.A,json:{read:!1,write:!1}})],t.prototype,"timeInfo",null),(0,r._)([(0,y.MZ)({type:j.A,json:{read:!1,write:!1}})],t.prototype,"timeExtent",null),(0,r._)([(0,y.MZ)({type:Z.A,json:{read:!1,write:!1}})],t.prototype,"timeOffset",null),(0,r._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],t.prototype,"datesInUnknownTimezone",null),(0,r._)([(0,y.MZ)({type:N,readOnly:!0,json:{read:{source:"timeInfo"}}})],t.prototype,"serviceTimeInfo",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer")],t),t};let N=class extends P.oY{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,r._)([(0,y.MZ)({type:String})],N.prototype,"endTimeField",void 0),(0,r._)([(0,y.MZ)({type:String})],N.prototype,"startTimeField",void 0),N=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],N);var C=i(60694),k=i(92009),H=i(4071),q=i(10873),V=i(15426),G=i(40530),K=i(67202),Q=i(17036),W=i(95466),J=i(50805),B=i(20557),Y=i(81457),z=i(39383),X=i(37352),ee=i(4513);let te=class extends P.oY{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"name",void 0),(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"field",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],te.prototype,"type",void 0),te=(0,r._)([(0,g.$)("esri.layers.support.RangeInfo")],te);var ie,re=i(78888),se=i(4718),ne=i(87024),oe=i(67076),ae=i(39829),le=i(57251);let de=ie=class extends((0,P.Te)(l.A.ofType(ae.A))){constructor(e){super(e)}clone(){return new ie(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((i=>{if(!t.equals(i.spatialReference)){if(!(0,le.canProjectWithoutEngine)(i.spatialReference,t))return e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const r=new ae.A;(0,le.projectPolygon)(i,r,t),i=r}const r=i.toJSON(e);return delete r.spatialReference,r})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const i=new ie;return e.forEach((e=>i.add(ae.A.fromJSON(e,t)))),i}};de=ie=(0,r._)([(0,g.$)("esri.layers.support.PolygonCollection")],de);const ue=de;var pe,ce=i(97159);let he=pe=class extends P.oY{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.OH))}readGeometries(e,t,i){Array.isArray(e)?this.geometries=ue.fromJSON(e,i):this._geometriesSource={url:(0,ce.f)(e,i),context:i}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:i,context:r}=this._geometriesSource,s=await(0,re.A)(i,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ue.fromJSON(o,r),this._geometriesSource=null}clone(){const e=new pe({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,r._)([(0,y.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],he.prototype,"spatialRelationship",void 0),(0,r._)([(0,y.MZ)({type:ue,nonNullable:!0,json:{write:!0}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,r._)([(0,m.w)(["web-scene","portal-item"],"geometries")],he.prototype,"readGeometries",null),he=pe=(0,r._)([(0,g.$)("esri.layers.support.SceneFilter")],he);const ye=he;var fe=i(84952),me=i(8947),ge=i(61956),ve=i(24212),we=i(57465),_e=i(30291);async function Ie(e){const t=[];for(const i of e)i.name.toLowerCase().endsWith(".zip")?t.push(be(i)):t.push(Promise.resolve(i));return(await Promise.all(t)).flat()}async function be(e){const{BlobReader:t,ZipReader:r,BlobWriter:s}=await Promise.all([i.e(8392),i.e(9588)]).then(i.bind(i,9588)),n=[],o=new r(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,i=e.getData?.(t).then((t=>new File([t],e.filename)));i&&n.push(i)})),Promise.all(n)}var Fe=i(28030),Ae=i(45671),Se=i(78553);const Me=new Set(["3DObject","Point"]),Le=(0,Q.p)();let xe=class extends(D((0,M.w6)((0,E.w6)((0,A.b)((0,L.q)((0,x.A)((0,T.j)((0,p.P)((0,S.d)((0,F.p)((0,a.O)(I.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new l.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const i=this.getFeatureType(t?.feature)?.domains?.[e];return i&&"inherited"!==i.type?i:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new W.A(this.fields)}readNodePages(e,t,i){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.W4.fromJSON(e,i)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,V.C$)(this.associatedLayer)}get geometryType(){return Ee[this.profile]||"mesh"}set renderer(e){(0,U.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:H.P;const{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,_=!!this.associatedLayer?.infoFor3D&&(0,we.Vo)();return{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:_&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:c&&w,supportsAdd:_&&h&&w,supportsDelete:_&&f&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const i=t.store.profile;return null!=i&&Te[i]?Te[i]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:i,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,me.L)(this,{origin:"service"},t),(0,U.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge.A;return"mesh"===this.geometryType?this.associatedLayer?.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const i=(0,U.hL)(this.fieldsIndex,await(0,Ae.TO)(this,(0,Ae.D8)(this)));return(0,Fe.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,i,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const i=await this.queryCachedAttributes(e,[t]);if(!i||0===i.length)throw new d.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const r=new s.A;return r.attributes=i[0],r.layer=this,r.sourceLayer=this,r}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,_e.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(E.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.Xh.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await i.e(6247).then(i.bind(i,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,C.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,V.GA)(n,e.deleteFeatures,o)}),r(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||i(new d.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const r=await this.extractAndFilterFiles(e),s=r.reduce(((e,t)=>(0,B.oF)(this.infoFor3D,t)?e+1:e),0);0===s&&i(new b.VP),s>1&&i(new b.XQ);const n=this.spatialReference,o=t?.location??new _.A({x:0,y:0,z:0,spatialReference:n}),a=o.spatialReference.isGeographic?"local":"georeferenced",l=w.A.createWithExternalSource(o,r,{vertexSpace:a}),[p]=await this.uploadAssets([l],t);return p}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Ie(e)).filter((e=>(0,B.fu)(t,e))):e}validateLayer(e){if(e.layerType&&!Me.has(e.layerType))throw new d.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let i=!1,r=!1;if(null==e)i=!0,r=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":i=!0,r=s;break;case"vertex-reference-frame":i=!0,r=!s;break;default:i=!1}}if(!i)throw new d.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!r)throw new d.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some((t=>t.name===e.name)),i=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||i,supportsLayerQuery:i};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const i=this.getField(t.name);i?(!i.domain&&t.domain&&(i.domain=t.domain.clone()),i.editable=t.editable,i.nullable=t.nullable,i.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,f.oY)(this);for(let i=0;i<e.length;i++){const r=e[i],s=this.originIdOf(r),n=this.associatedLayer.originIdOf(r);s<n&&(n===v.Gr.SERVICE||n===v.Gr.PORTAL_ITEM)&&t.setAtOrigin(r,this.associatedLayer[r],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,we.Vo)()&&null!=this.associatedLayer?.infoFor3D&&e&&(0,C.Wo)(this.associatedLayer?.url)&&R(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),v.Gr.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:i,portalItem:r}=await(0,k.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ee.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:i,portalItem:r}),await this.associatedLayer.load()}catch(e){(0,c.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.C_)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,ve.XF)(u.A.getLogger(this),(0,ve.$7)("Mesh scene layers","relative-to-scene",e)),(0,ve.XF)(u.A.getLogger(this),(0,ve.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:i,fieldsIndex:r,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics are not available for this layer");const l=r.get(e);if(null==l)throw new d.A(`${i}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find((e=>e.name===l.name));if(null==u)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,fe.fj)(s,u.href),{data:c}=await(0,re.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,r._)([(0,y.MZ)({types:{key:"type",base:G.c,typeMap:{selection:K.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],xe.prototype,"featureReduction",void 0),(0,r._)([(0,y.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],xe.prototype,"rangeInfos",void 0),(0,r._)([(0,y.MZ)({json:{read:!1}})],xe.prototype,"associatedLayer",void 0),(0,r._)([(0,y.MZ)({type:["show","hide"]})],xe.prototype,"listMode",void 0),(0,r._)([(0,y.MZ)({type:["ArcGISSceneServiceLayer"]})],xe.prototype,"operationalLayerType",void 0),(0,r._)([(0,y.MZ)({json:{read:!1},readOnly:!0})],xe.prototype,"type",void 0),(0,r._)([(0,y.MZ)({...Le.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"fields",void 0),(0,r._)([(0,y.MZ)()],xe.prototype,"types",null),(0,r._)([(0,y.MZ)()],xe.prototype,"typeIdField",null),(0,r._)([(0,y.MZ)()],xe.prototype,"templates",null),(0,r._)([(0,y.MZ)()],xe.prototype,"formTemplate",null),(0,r._)([(0,y.MZ)({readOnly:!0,clonable:!1})],xe.prototype,"fieldsIndex",null),(0,r._)([(0,y.MZ)({type:X.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],xe.prototype,"floorInfo",void 0),(0,r._)([(0,y.MZ)(Le.outFields)],xe.prototype,"outFields",void 0),(0,r._)([(0,y.MZ)({type:J.W4,readOnly:!0,json:{read:!1}})],xe.prototype,"nodePages",void 0),(0,r._)([(0,m.w)("service","nodePages",["nodePages","pointNodePages"])],xe.prototype,"readNodePages",null),(0,r._)([(0,y.MZ)({type:[J.uV],readOnly:!0})],xe.prototype,"materialDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.Ot],readOnly:!0})],xe.prototype,"textureSetDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.L0],readOnly:!0})],xe.prototype,"geometryDefinitions",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"serviceUpdateTimeStamp",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"attributeStorageInfo",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"statisticsInfo",void 0),(0,r._)([(0,y.MZ)({type:l.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],xe.prototype,"excludeObjectIds",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],xe.prototype,"definitionExpression",void 0),(0,r._)([(0,y.MZ)({type:ye,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],xe.prototype,"filter",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],xe.prototype,"path",void 0),(0,r._)([(0,y.MZ)(q.Yj)],xe.prototype,"elevationInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"effectiveCapabilities",null),(0,r._)([(0,y.MZ)({readOnly:!0})],xe.prototype,"effectiveEditingEnabled",null),(0,r._)([(0,y.MZ)({type:String})],xe.prototype,"geometryType",null),(0,r._)([(0,y.MZ)(q.kF)],xe.prototype,"labelsVisible",void 0),(0,r._)([(0,y.MZ)({type:[Y.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:z.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:z.w},write:!0}})],xe.prototype,"labelingInfo",void 0),(0,r._)([(0,y.MZ)(q.fV)],xe.prototype,"legendEnabled",void 0),(0,r._)([(0,y.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const i=t.layerDefinition?.drawingInfo?.transparency;return void 0!==i?(0,Se.D)(i):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],xe.prototype,"opacity",void 0),(0,r._)([(0,y.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"priority",void 0),(0,r._)([(0,y.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"semantic",void 0),(0,r._)([(0,y.MZ)({types:o.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],xe.prototype,"renderer",null),(0,r._)([(0,y.MZ)({json:{read:!1}})],xe.prototype,"cachedDrawingInfo",void 0),(0,r._)([(0,m.w)("service","cachedDrawingInfo")],xe.prototype,"readCachedDrawingInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"capabilities",null),(0,r._)([(0,y.MZ)({type:Boolean,json:{read:!1}})],xe.prototype,"editingEnabled",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],xe.prototype,"infoFor3D",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],xe.prototype,"relationships",null),(0,r._)([(0,y.MZ)(q.M6)],xe.prototype,"popupEnabled",void 0),(0,r._)([(0,y.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],xe.prototype,"popupTemplate",void 0),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"defaultPopupTemplate",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"objectIdField",void 0),(0,r._)([(0,m.w)("service","objectIdField",["objectIdField","fields"])],xe.prototype,"readObjectIdField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"globalIdField",void 0),(0,r._)([(0,m.w)("service","globalIdField",["globalIdField","fields"])],xe.prototype,"readGlobalIdField",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{read:!1}})],xe.prototype,"displayField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],xe.prototype,"profile",void 0),(0,r._)([(0,m.w)("service","profile",["store.profile"])],xe.prototype,"readProfile",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],xe.prototype,"normalReferenceFrame",void 0),(0,r._)([(0,y.MZ)(q.PY)],xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,y.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],xe.prototype,"serviceItemId",void 0),(0,r._)([(0,y.MZ)(O.B)],xe.prototype,"useViewTime",null),xe=(0,r._)([(0,g.$)("esri.layers.SceneLayer")],xe);const Te={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Ee={"mesh-pyramids":"mesh",points:"point"},Oe=xe},55726:(e,t,i)=>{i.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>f,WF:()=>u,Wt:()=>o,XQ:()=>m,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var r=i(49186);const s="upload-assets",n=()=>new Error;class o extends r.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends r.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends r.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends r.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends r.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends r.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends r.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends r.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends r.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends r.A{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends r.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=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,r._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},47685:(e,t,i)=>{i.d(t,{Mk:()=>h,Zk:()=>p,w6:()=>m});var r=i(90237),s=i(65529),n=i(4718),o=i(74887),a=i(10107),l=(i(44208),i(53966),i(40608)),d=i(20816);const u=new s.A.EventEmitter;function p(e,t,i=null,r=!1){const s=(0,o.Tw)();return r=null==t||r,u.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:r,result:s.promise}),s}const c=Symbol();function h(e){return null!=e&&"object"==typeof e&&c in e}function y(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,i){const r=new URL(e).host,s=d.Z3.get(r),n=e=>!e||e===s;return n(t)&&n(i)||t===i}const m=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:r,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=i&&null!=this.layerId&&i===this.layerId,d=y(this),u=y(this)&&f(t,r,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then((e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const i=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:t,updates:r,deletes:s}=i.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,s.historicMoment)&&this.emit("edits",s),s})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:r}=e,s=t===this.url,n=y(this),o=y(this)&&f(t,i,this.gdbVersion),a=y(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return u.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return u.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,i){return"historicMoment"in this&&this.historicMoment!==i&&(0,d.w5)(e,t)}};return t=c,(0,r._)([(0,a.MZ)()],i.prototype,"lastEditsEventDate",void 0),i=(0,r._)([(0,l.$)("esri.layers.mixins.EditBusLayer")],i),i}},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),h=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),g=i(83531),v=i(20655),w=i(80812),_=i(41318),I=i(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.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,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,I.It)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,c.b8)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,l=!1,d=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:d}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,I.It)(i)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.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 i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?_.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.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,r._)([(0,h.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},82935:(e,t,i)=>{i.d(t,{B:()=>h,e:()=>y});var r=i(90237),s=i(60945),n=i(70668),o=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),d=i(89317),u=i(30524),p=i(96184),c=i(73133);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:d.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,s=c.j.fromJSON(i.timeOffsetUnits);return r&&s?new n.A({value:r,unit:s}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,o.MZ)({type:s.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,o.MZ)({type:n.A})],t.prototype,"timeOffset",void 0),(0,r._)([(0,a.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,o.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,o.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},40530:(e,t,i)=>{i.d(t,{c:()=>a});var r=i(90237),s=i(25482),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let a=class extends s.oY{constructor(){super(...arguments),this.type=null}};(0,r._)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,r._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),a=i(40530);let l=r=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new r}};(0,s._)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=r=(0,s._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const d=l},37352:(e,t,i)=>{i.d(t,{A:()=>u});var r,s=i(90237),n=i(5503),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));let d=r=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"floorField",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=r=(0,s._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d);const u=d},96184:(e,t,i)=>{i.d(t,{A:()=>f});var r=i(90237),s=i(60945),n=i(70668),o=i(69540),a=i(25482),l=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(56400);function h(e,t){return n.A.fromJSON({value:e,unit:t})}let y=class extends((0,o.O)(a.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?s.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?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,r._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,r._)([(0,l.MZ)({type:s.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,r._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,r._)([(0,l.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,r._)([(0,d.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,r._)([(0,p.K)("interval")],y.prototype,"writeInterval",null),(0,r._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,r._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,r._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,r._)([(0,u.$)("esri.layers.support.TimeInfo")],y);const f=y},17036:(e,t,i)=>{i.d(t,{p:()=>l});var r=i(44208),s=i(53966),n=i(20437),o=i(95466),a=i(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,r.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return 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 i=this.fieldsIndex?.has(t);i||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557:(e,t,i)=>{i.d(t,{E1:()=>a,Fm:()=>l,JZ:()=>y,R_:()=>o,fu:()=>s,oF:()=>n,rq:()=>d});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=p(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const i=d(t,e.supportedFormats??[]);return null!=i&&e.editFormats.includes(i)}function o(e,t){return c(function(e,t){const i=e.toLowerCase();return u(t).find((e=>h(e)===i))}(e,t))}function a(e,t){return c(p(e,t))}function l(e,t){return h(function(e,t){return u(t).find((t=>c(t)===e))}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e){return[...r,...e]}function p(e,t){const i=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>i.endsWith(e)))))}function c(e){return e?.[0]}function h(e){return e?.[1].toLowerCase()}function y(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73133:(e,t,i)=>{i.d(t,{j:()=>r});const r=(0,i(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})},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),s=i(74887),n=i(67076);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,r.Ke)(o.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},20816:(e,t,i)=>{i.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var r=i(78888);const s=(0,i(13069).vD)(),n=new Map,o=new Map;async function a(e,t,i){if(!e||!i)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,r.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,r=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&r){const[{deleteForwardEdits:t},{default:r}]=await Promise.all([i.e(2186).then(i.bind(i,32186)),i.e(2558).then(i.bind(i,32558))]),a=await t(n,e,new r({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=o.get(i)?.entries();if(r)for(const[e,i]of r)if(i.name===t)return"edit"===i.lockType;return!1}new Map}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6107,9377,3069,9062],{70668:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),o=r(25482),s=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.$)("esri.TimeInterval")],p);const y=p},32587:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(62788),n=r(95488);class o{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,i.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,i.gc)(this._observable),this._map.entries()}forEach(e,t){(0,i.gc)(this._observable),this._map.forEach(((r,i)=>e.call(t,r,i,this)),t)}get(e){return(0,i.gc)(this._observable),this._map.get(e)}has(e){return(0,i.gc)(this._observable),this._map.has(e)}keys(){return(0,i.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,i.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,i.gc)(this._observable),this._map[Symbol.iterator]()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(4718),n=r(62788),o=r(95488);class s{constructor(e,t){this._observable=new o.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function l(e,t=i.gh){return new s(e,t)}},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,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:()=>s,Y4:()=>o});var i=r(96285);class n{}function o(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},13069:(e,t,r)=>{r.d(t,{lk:()=>n,vD:()=>s,yS:()=>o});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 o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>u,Hq:()=>d,Ie:()=>h,Jt:()=>m,Ne:()=>p,RF:()=>l,aI:()=>_,fA:()=>o,hZ:()=>c,iT:()=>a,is:()=>g,qv:()=>v,vI:()=>y,v_:()=>w,vt:()=>n,w1:()=>s});var i=r(5443);function n(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,s,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=o,l[5]=s,l}function s(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 d(e,t,r=0,i=t.length/3){let n=e[0],o=e[1],s=e[2],l=e[3],a=e[4],d=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),d=Math.max(d,t[r+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=d}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?c(e,v):n(v)}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,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 g(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(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 v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];n()},79003:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ye});var i=r(90237),n=r(78888),o=r(5503),s=r(49186),l=r(91869),a=r(92071),d=r(74887),u=r(84952),p=r(10107),y=(r(44208),r(53966),r(87811),r(40608)),c=r(4146),h=r(36563),m=r(55359),f=r(32587),g=r(36708),_=r(44794),v=r(56507),w=r(63074),b=r(25036),M=r(10873),F=r(91880),x=r(1873);let Z=class extends((0,b.j)((0,w.dM)((0,a.P)(c.A)))){constructor(e){super(e),this._layerCache=new m.q(20,(e=>e.destroy())),this._oidToReference=new f.A,this._layerToReference=new Map,this.layers=new o.A,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",(({item:e})=>{e.parent=this})),this.layers.on("after-remove",(({item:e})=>{e.parent=null})),(0,g.wB)((()=>this._orderBy),(()=>{this._updateLayerSortValues(),this._sortAllLayers()}))])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){return this.parent?this.parent.orderBy?.find((e=>!e.valueExpression&&e.field))??new F.A({field:this.parent.objectIdField}):null}get _referenceComparator(){const e=this._orderBy;if(!this.parent||!e)return()=>0;const t=this.parent.fieldsIndex.get(e.field),r=(0,x.FM)(t?.toJSON().type,"descending"===e.order),i=(0,x.FM)("esriFieldTypeOID","descending"===e.order);return(e,t)=>r(t.sortValue,e.sortValue)||i(t.objectId,e.objectId)}get fullExtent(){return this.parent?.fullExtent??null}get updating(){return(0,l.Bs)(this._oidToReference,(e=>null!=e.pending))}acquireLayer(e){if(this.destroyed)return(0,h.hA)();const t=this._getLayerReference(e);return t.count++,(0,h.hA)((()=>{t.count--,t.count||this._destroyLayerReference(t)}))}_getLayerReference(e){const t=e.getObjectId();return(0,l.tE)(this._oidToReference,t,(()=>{const t=e.getObjectId(),r=`${t}`,i=e.getAttribute(this.parent.itemSourceField),n=new T(e,t,i),o=this._layerCache.pop(r);return o?(this._addLayer(n,o),n):(n.pending=this.parent.createLayerFromFootprint(e).then((e=>{n.count?this._addLayer(n,e):(this.destroyed||this._layerCache.get(r)||this._layerCache.put(r,e),n.layer=null)})).catch((()=>{})).finally((()=>{n.pending=null})),n)}))}_destroyLayerReference(e){e.layer&&(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),e.layer=null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(const e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort(((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t))))}};(0,i._)([(0,p.MZ)()],Z.prototype,"_orderBy",null),(0,i._)([(0,p.MZ)({readOnly:!0})],Z.prototype,"_referenceComparator",null),(0,i._)([(0,p.MZ)({type:["show","hide","hide-children"],json:{write:!0}})],Z.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],Z.prototype,"fullExtent",null),(0,i._)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Z.prototype,"id",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],Z.prototype,"layers",void 0),(0,i._)([(0,p.MZ)({type:v.jz,range:{min:0,max:50},json:{write:!0,default:10}})],Z.prototype,"maximumVisibleSublayers",void 0),(0,i._)([(0,p.MZ)(M.ke)],Z.prototype,"opacity",void 0),(0,i._)([(0,p.MZ)({clonable:!1})],Z.prototype,"parent",void 0),(0,i._)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],Z.prototype,"title",void 0),(0,i._)([(0,p.MZ)({json:{read:!1}})],Z.prototype,"type",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],Z.prototype,"updating",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],Z.prototype,"visible",void 0),Z=(0,i._)([(0,y.$)("esri.layers.catalog.CatalogDynamicGroupLayer")],Z);const I=Z;class T{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=(0,_.v)(null)}get pending(){return this._pending.value}set pending(e){this._pending.value=e}}var S=r(13874),O=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576)),j=(r(93618),r(65494),r(15036)),E=r(4718),A=r(35666),R=r(4206),N=r(87718),L=r(30524),V=r(81457),D=r(39383),P=r(30291),B=r(94985);let q=class extends((0,b.j)((0,N.F)((0,w.dM)((0,a.P)(c.A))))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,L.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",(e=>this.emit("apply-edits",e))),this.parent.on("edits",(e=>this.emit("edits",e))),this.parent.on("refresh",(e=>this.emit("refresh",e)))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get effectiveEditingEnabled(){return!1}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){(0,L.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){const e=new B.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new O.A({symbol:e})}()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return(0,P.tn)(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}};(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"apiKey",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"capabilities",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"customParameters",null),(0,i._)([(0,p.MZ)()],q.prototype,"dateFieldsTimeZone",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"datesInUnknownTimezone",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"definitionExpression",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"editingInfo",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"effectiveCapabilities",null),(0,i._)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],q.prototype,"charts",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"createQueryVersion",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"defaultPopupTemplate",null),(0,i._)([(0,p.MZ)()],q.prototype,"displayField",null),(0,i._)([(0,p.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"editingEnabled",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,p.MZ)((()=>{const e=(0,E.o8)(M.Yj);return e.json.origins["web-map"]={read:!1,write:!1},e})())],q.prototype,"elevationInfo",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"fields",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"fieldsIndex",null),(0,i._)([(0,p.MZ)({type:R.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"formTemplate",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"fullExtent",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"geometryFieldsInfo",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"geometryType",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"globalIdField",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"hasM",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"hasZ",null),(0,i._)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],q.prototype,"id",void 0),(0,i._)([(0,p.MZ)({type:[V.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:D.w,write:!0}})],q.prototype,"labelingInfo",void 0),(0,i._)([(0,p.MZ)(M.kF)],q.prototype,"labelsVisible",void 0),(0,i._)([(0,p.MZ)(M.fV)],q.prototype,"legendEnabled",void 0),(0,i._)([(0,p.MZ)({type:["show","hide"],json:{write:!0}})],q.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)((()=>{const e=(0,E.o8)(M.hG);return e.json.origins.service.read=!1,e})())],q.prototype,"maxScale",void 0),(0,i._)([(0,p.MZ)((()=>{const e=(0,E.o8)(M.hn);return e.json.origins.service.read=!1,e})())],q.prototype,"minScale",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"objectIdField",null),(0,i._)([(0,p.MZ)(M.ke)],q.prototype,"opacity",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"orderBy",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"outFields",null),(0,i._)([(0,p.MZ)({clonable:!1})],q.prototype,"parent",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"parsedUrl",null),(0,i._)([(0,p.MZ)(M.M6)],q.prototype,"popupEnabled",void 0),(0,i._)([(0,p.MZ)({type:S.A,json:{name:"popupInfo",write:!0}})],q.prototype,"popupTemplate",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"preferredTimeZone",null),(0,i._)([(0,p.MZ)({types:j.H,json:{origins:{"web-scene":{types:j.X}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<A.Gr.PORTAL_ITEM}}}}})],q.prototype,"renderer",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"returnM",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"returnZ",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"source",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"timeExtent",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"timeInfo",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"timeOffset",null),(0,i._)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],q.prototype,"title",void 0),(0,i._)([(0,p.MZ)({json:{read:!1}})],q.prototype,"type",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"typeIdField",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"types",null),(0,i._)([(0,p.MZ)({readOnly:!0})],q.prototype,"useViewTime",null),(0,i._)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],q.prototype,"visible",void 0),q=(0,i._)([(0,y.$)("esri.layers.catalog.CatalogFootprintLayer")],q);const $=q;var U=r(72593),C=r(52136),G=r(18768),J=r(69208),z=r(47685),k=r(87796),Q=r(16131),Y=r(32756),K=r(8303),H=r(54310),X=r(82935),W=r(15426),ee=r(33143),te=r(17036),re=r(4513),ie=r(91908),ne=r(20655),oe=r(80812),se=r(39131),le=r(61956);const ae=(0,te.p)();function de(e,t,r,i){const n=e.write({},i);(function(e){if(null==e)return!0;const t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let ue=class extends((0,k.j)((0,z.w6)((0,w.dM)((0,Y.f)((0,X.e)((0,b.j)((0,H.J)((0,G.b)((0,Q.q)((0,K.A)((0,a.P)((0,J.d)((0,C.p)(c.A)))))))))))))){constructor(e){super(e),this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new I({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new $({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new o.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new U.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d.QP).then((async()=>{const{url:e,source:r,portalItem:i}=this;if(!e)throw new s.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){const r=await this._fetchFirstValidLayerId(t);if(null==r)throw new s.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t});const{sourceJSON:n}=r;n&&(this.sourceJSON=n,this.read(n,{origin:"service",portalItem:i,portal:i?.portal,url:this.parsedUrl}))})).then((()=>{const e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter((e=>!this.fieldsIndex.has(e)));if(t.length)throw new s.A("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})})).then((()=>(0,W.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(const e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}get parsedUrl(){const e=(0,u.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,u.fj)(e.path,this.layerId.toString())),e}async applyEdits(e,t){return(0,W.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createLayerFromFootprint(e){const t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){const e=new le.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,W.xd)(this.types,this.typeIdField,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async hasDataChanged(){return(0,W.jp)(this)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(le.A.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r.footprintLayer;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(le.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(le.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(le.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,ie.D)(this,e)}read(e,t){if(super.read(e,t),e){const{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async _fetchFirstValidLayerId(e){const{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(Array.isArray(t?.layers))return t.layers.find((({type:e})=>this.supportedSourceTypes.has(e)))?.id}async _createLayer(e){const t=e.getAttribute(this.itemSourceField);if(!t)throw new s.A("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);const r=JSON.parse(t);if(function(e){return"object"==typeof e&&null!=e&&"itemId"in e&&"portalUrl"in e}(r)){const{itemId:e,portalUrl:t}=r,i=(0,se.qG)(t),n=this.portalItem?.portal,o=ne.A.getDefault();let s,a=!0;n&&(0,u.ut)(t,n.url)?s=n:(0,u.ut)(t,o.url)?s=o:(s=(0,l.tE)(this._portals,i,(()=>new ne.A({url:i}))),a=!1);const d=await c.A.fromPortalItem(new oe.default({id:e,portal:s}));return a||await pe(d),d}return function(e){return"object"==typeof e&&null!=e&&"url"in e}(r)?c.A.fromArcGISServerUrl({url:r.url}):new(await re.S.UnsupportedLayer())}_configureLayer(e,t){const r=t.getAttribute(this.itemNameField);r&&(e.title=r);const i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);const n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};async function pe(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,"group"===e.type&&await Promise.allSettled([...e.layers.map((e=>pe(e))),...e.tables.map((e=>pe(e)))])}}(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"createQueryVersion",null),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"drawOrderField",void 0),(0,i._)([(0,p.MZ)({type:I,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:de}}})],ue.prototype,"dynamicGroupLayer",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"editingEnabled",null),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],ue.prototype,"elevationInfo",void 0),(0,i._)([(0,p.MZ)({...ae.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ue.prototype,"fields",void 0),(0,i._)([(0,p.MZ)(ae.fieldsIndex)],ue.prototype,"fieldsIndex",void 0),(0,i._)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],ue.prototype,"floorInfo",void 0),(0,i._)([(0,p.MZ)({type:$,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:de}}})],ue.prototype,"footprintLayer",void 0),(0,i._)([(0,p.MZ)(M.id)],ue.prototype,"id",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"itemNameField",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"itemSourceField",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"itemTypeField",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"layers",void 0),(0,i._)([(0,p.MZ)({type:["show","hide","hide-children"]})],ue.prototype,"listMode",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"maxScaleField",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"minScaleField",void 0),(0,i._)([(0,p.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],ue.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],ue.prototype,"orderBy",void 0),(0,i._)([(0,p.MZ)(ae.outFields)],ue.prototype,"outFields",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"parsedUrl",null),(0,i._)([(0,p.MZ)({readOnly:!0})],ue.prototype,"source",void 0),(0,i._)([(0,p.MZ)({json:{read:!1}})],ue.prototype,"type",void 0),(0,i._)([(0,p.MZ)({type:String})],ue.prototype,"typeIdField",void 0),(0,i._)([(0,p.MZ)({type:[ee.A]})],ue.prototype,"types",void 0),ue=(0,i._)([(0,y.$)("esri.layers.CatalogLayer")],ue);const ye=ue},87718:(e,t,r)=>{r.d(t,{F:()=>T,Y:()=>I});var i,n=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),l=r(49186),a=r(25482),d=r(93637),u=r(76369),p=r(59456),y=r(60945),c=r(66552),h=r(4718),m=r(61956);const f=new c.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new c.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=i=class extends a.oY{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new m.A({geometry:(0,h.o8)(r),objectIds:(0,h.o8)(o),spatialRelationship:i,timeExtent:(0,h.o8)(n),where:t,units:s,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new i({geometry:(0,h.o8)(t),objectIds:(0,h.o8)(o),spatialRelationship:r,timeExtent:(0,h.o8)(n),where:e,units:s,distance:l})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],_.prototype,"where",void 0),(0,n._)([(0,o.MZ)({types:p.yR,json:{write:!0}})],_.prototype,"geometry",void 0),(0,n._)([(0,o.MZ)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],_.prototype,"spatialRelationship",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],_.prototype,"distance",void 0),(0,n._)([(0,o.MZ)({type:[Number],json:{write:!0}})],_.prototype,"objectIds",void 0),(0,n._)([(0,o.MZ)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],_.prototype,"units",void 0),(0,n._)([(0,o.MZ)({type:y.A,json:{write:!0}})],_.prototype,"timeExtent",void 0),_=i=(0,n._)([(0,s.$)("esri.layers.support.FeatureFilter")],_);const v=_;var w;const b={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},M={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},F={name:"showExcludedLabels",default:!0};let x=w=class extends a.oY{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new w({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,o.MZ)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,d.sM)(r,n,t):(0,d.sM)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n._)([(0,o.MZ)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":b,"portal-item":b}}})],x.prototype,"includedEffect",void 0),(0,n._)([(0,o.MZ)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":M,"portal-item":M}}})],x.prototype,"excludedEffect",void 0),(0,n._)([(0,o.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":F,"portal-item":F}}})],x.prototype,"excludedLabelsVisible",void 0),x=w=(0,n._)([(0,s.$)("esri.layers.support.FeatureEffect")],x);const Z={write:{allowNull:!0}},I={type:x,json:{origins:{"web-map":Z,"portal-item":Z}}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,o.MZ)(I)],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,s.$)("esri.layers.mixins.FeatureEffectLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>d,n:()=>a});var i=r(90237),n=r(93637),o=r(10107),s=(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 i=e.find((e=>!!e.field));if(!i)return null;const n=new l.A;return n.read(i,r),[n]}},write:{writer:function(e,t,r,i){const o=e.find((e=>!!e.field));o&&(0,n.sM)(r,[o.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.MZ)(a)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.OrderedLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{B:()=>c,e:()=>h});var i=r(90237),n=r(60945),o=r(70668),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),d=r(89317),u=r(30524),p=r(96184),y=r(73133);const c={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:d.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=y.j.fromJSON(r.timeOffsetUnits);return i&&n?new o.A({value:i,unit:n}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.MZ)({type:n.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:o.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.MZ)(c)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.$)("esri.layers.mixins.TemporalLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),d=r(43937),u=r(72088),p=r(29005);let y=class extends((0,n.O)(o.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,u.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,i._)([(0,l.w)("domains")],y.prototype,"readDomains",null),(0,i._)([(0,d.K)("domains")],y.prototype,"writeDomains",null),(0,i._)([(0,s.MZ)({type:[p.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,i._)([(0,a.$)("esri.layers.support.FeatureType")],y);const c=y},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),o=r(66552),s=r(25482),l=r(10107),a=r(56507),d=(r(87811),r(44208),r(93223)),u=r(36005),p=r(40608),y=r(72088),c=r(98453);const h=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=i=class extends s.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.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.MZ)()],m.prototype,"description",void 0),(0,n._)([(0,u.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.MZ)({types:y.gK,json:{read:{reader:y.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.MZ)({type:a.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,d.e)(c.m)],m.prototype,"type",void 0),(0,n._)([(0,l.MZ)()],m.prototype,"valueType",void 0),(0,n._)([(0,u.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.MZ)({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),o=r(53966),s=r(91869),l=r(3330),a=r(30524),d=r(56400),u=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?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):m.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?l.GB.instance:t===d.n$?u.mQ.utcInstance:(0,s.tE)(p,t,(()=>u.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,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,d.ZS)(n.dateFieldsTimeReference):l??d.n$:null,u=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,d.ZS)(i.timeReference):l:null,p=new Map([[c(n?.creationDateField??""),a],[c(n?.editDateField??""),a],[c(o),u],[c(s),u]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,d.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,d.L5);else{const e=p.get(c(i??""))??l;t.set(i,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(90237),o=r(66552),s=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const d=new o.J({asc:"ascending",desc:"descending"});let u=i=class extends s.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n._)([(0,l.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],u.prototype,"order",void 0),u=i=(0,n._)([(0,a.$)("esri.layers.support.OrderByInfo")],u);const p=u},96184:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),n=r(60945),o=r(70668),s=r(69540),l=r(25482),a=r(10107),d=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),y=r(56400);function c(e,t){return o.A.fromJSON({value:e,unit:t})}let h=class extends((0,s.O)(l.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?n.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,a.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,a.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,a.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,d.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,a.MZ)({type:o.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,d.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,p.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,a.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,a.MZ)((0,y.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i._)([(0,a.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i._)([(0,u.$)("esri.layers.support.TimeInfo")],h);const m=h},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>F}),r(44208);var i,n=r(90237),o=r(4718),s=r(10107),l=(r(53966),r(93223)),a=r(40608),d=r(25482);r(87811);let u=i=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,n._)([(0,a.$)("esri.layers.support.CodedValue")],u);const p=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let y=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,n._)([(0,l.e)(p)],y.prototype,"type",void 0),y=(0,n._)([(0,a.$)("esri.layers.support.Domain")],y);const c=y;var h;let m=h=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,s.MZ)({type:[u],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,n._)([(0,a.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(49186);let _=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,l.e)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,n._)([(0,a.$)("esri.layers.support.InheritedDomain")],_);const v=_;var w;let b=w=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.MZ)({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]}}}})],b.prototype,"maxValue",void 0),(0,n._)([(0,s.MZ)({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]}}}})],b.prototype,"minValue",void 0),(0,n._)([(0,l.e)({range:"range"})],b.prototype,"type",void 0),b=w=(0,n._)([(0,a.$)("esri.layers.support.RangeDomain")],b);const M=b,F={key:"type",base:c,typeMap:{range:b,"coded-value":f,inherited:v}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),n=r(53966),o=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");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 s.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:()=>_,rU:()=>g,tH:()=>F});var i=r(799);const n="__begin__",o="__end__",s=new RegExp(n,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+n,"i"),d=new RegExp(o+"$","i"),u='"',p=u+" + ",y=" + "+u;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 _(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 F(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+o)),t=a.test(t)?t.replace(a,""):u+t,t=d.test(t)?t.replace(d,""):t+u,t=t.replaceAll(s,p).replaceAll(l,y)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,M=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=w.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=M.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})},96520:(e,t,r)=>{r.d(t,{u:()=>s});var i=r(83047),n=r(21325);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function s(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);l(e,r,n),l(t,r,n)}function l(e,t,r){if(e)for(const i of e)a(i.geometry,t,r)}function a(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const s=(0,i.G9)(e.spatialReference)/r;if(1!==s)if("x"in e)null!=e.z&&(e.z*=s);else if("rings"in e)o(e,e.rings,s);else if("paths"in e)o(e,e.paths,s);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=s)}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),o=r(59456),s=r(52106),l=r(66552),a=r(25482),d=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),y=r(40608),c=r(43937),h=r(16930),m=r(65864),f=r(20437);const g=new l.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=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=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.A.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=n.aggregateGeometries,d=o.aggregateGeometries;if(a&&null!=d)for(const e in d){const t=d[e],i=a[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,d.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=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 d=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),l,a);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[s.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:o.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,y.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const v=_}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(9257)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(2944),t.e(8947),t.e(4850),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(893),t.e(3622),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(1874),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(7481)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(893),t.e(2876),t.e(8742),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(2876),t.e(8488),t.e(8742),t.e(9082)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(5494),t.e(2469)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6289),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6289),t.e(9519)]).then(t.bind(t,49519))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(8739)]).then(t.bind(t,35079))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3089),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7430),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(3740)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2944),t.e(8947),t.e(964),t.e(4850),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9976),t.e(8705),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7430),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7430)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>"FeatureLayer"===a?!e:e===a))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"FeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(24183);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){const t=this._serviceMetadatas.get(e);if(t)return t;const n=await(0,r.V)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){const{id:a}=e;if(!a)return null;const{_itemDatas:t}=this;if(t.has(a))return t.get(a);const r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){const t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009:(e,a,t)=>{t.d(a,{L:()=>o});var r=t(70333),n=t(78888),s=t(49186),i=t(74887),l=t(60694),c=t(20655),u=t(80812);async function o(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-url","Invalid scene service url");const o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const t=new u.default({id:a,apiKey:e.apiKey}),s=await async function(e){const a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,i.QP)(e)}return null}(e);null!=s&&(t.portal=new c.A({url:s}));try{return t.load({signal:e.signal})}catch(e){return(0,i.QP)(e),null}}(o),null==o.sceneLayerItem)return d(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!t)return null;const r=new u.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,i.QP)(e),null}}(o);if(!f?.url)throw new s.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=f;const m=await d(f.url,o);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,l.qg)(e);if(!t)throw new s.A("invalid-feature-service-url","Invalid feature service url");const r=t.url.path,i=a.layerId;if(null==i)return{serverUrl:r};const c=y(a),u=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(u?.layers?.[0]||u?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},f=d("anonymous").catch((()=>d("no-prompt"))),[m,w]=await Promise.all([f,c]),h=w?.layers,p=m.data&&m.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===i)return{serverUrl:r,layerId:p[e].id}}else if(null!=i&&i<p.length)return{serverUrl:r,layerId:p[i].id};throw new Error("could not find matching associated sublayer")}},23154:(e,a,t)=>{t.d(a,{K:()=>d,Q:()=>s});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:t,...n}=a||{},s=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);y(s),c(s);const i={serviceJSON:s};if((s.currentVersion??0)<10.5)return i;const l=`${e}/layers`,u=t?await t.fetchServiceMetadata(l,n):await(0,r.V)(l,n);return y(u),c(u),i.layersJSON={layers:u.layers,tables:u.tables},i}function i(e){const{type:a}=e;return!!a&&n.has(a)}function l(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function u(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(u),e.tables?.forEach(o)}function d(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(9257)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(2944),t.e(8947),t.e(4850),t.e(7110),t.e(2931)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(4174)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(893),t.e(3622),t.e(2593),t.e(6107)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(9377)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(1874),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(7481)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(893),t.e(2876),t.e(8742),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(2876),t.e(8488),t.e(8742),t.e(9082)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(5494),t.e(2469)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6289),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(3097),t.e(1932),t.e(6289),t.e(9519)]).then(t.bind(t,49519))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(591),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(8739)]).then(t.bind(t,35079))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3089),t.e(4591)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7430),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(3600),t.e(3740)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2944),t.e(8947),t.e(964),t.e(4850),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(893),t.e(3622),t.e(9186),t.e(591),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9976),t.e(8705),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(1874),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7430),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7430)]).then(t.bind(t,47314))).default}},66964:(e,a,t)=>{t.d(a,{Ju:()=>u,K8:()=>d,XH:()=>o,_r:()=>s,bO:()=>i,iK:()=>y,nu:()=>f,pJ:()=>l,rc:()=>c});var r=t(92009),n=t(23154);function s(e){const a={id:e.id,name:e.name},t=(0,n.K)(e.type);return"FeatureLayer"!==t&&(a.layerType=t),a}async function i(e,a,t){if(null==e?.layers||null==e?.tables){const r=await t.fetchServiceMetadata(a,{customParameters:l(e)?.customParameters});(e=e||{}).layers=e.layers||r?.layers?.map(s),e.tables=e.tables||r?.tables?.map(s)}return e}function l(e){if(!e)return null;const{layers:a,tables:t}=e;return a?.length?a[0]:t?.length?t[0]:null}function c(e,a){return null==a?null:[...e.layers||[],...e.tables||[]].find((e=>e.id===a))}function u(e,a){return[...e.layers||[],...e.tables||[]].filter((({layerType:e})=>e?e===a:"ArcGISFeatureLayer"===a))}function o(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function y(e){switch(e){case"catalog":return"CatalogLayer";case"feature":return"ArcGISFeatureLayer";case"oriented-imagery":return"OrientedImageryLayer";case"subtype-group":return"SubtypeGroupLayer"}return null}function d(e){switch(e){case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":return"SubtypeGroupLayer"}return"FeatureLayer"}async function f(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){const r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(s)}const{serverUrl:n,portalItem:i}=await(0,r.L)(e.url,{sceneLayerItem:e,customParameters:l(a)?.customParameters}).catch((()=>({serverUrl:null,portalItem:null})));if(null==n)return a.tables=[],a;if(!a.tables&&i){const e=await i.fetchData();if(e?.tables)a.tables=e.tables.map(s);else{const r=await t.fetchServiceMetadata(n,{customParameters:l(e)?.customParameters});a.tables=r?.tables?.map(s)}}if(a.tables)for(const e of a.tables)e.url=`${n}/${e.id}`;return a}},45613:(e,a,t)=>{t.d(a,{fromItem:()=>d,n:()=>f});var r=t(49186),n=t(92009),s=t(23154),i=t(22429),l=t(83531),c=t(4513),u=t(80812),o=t(66964),y=t(10407);async function d(e){let{portalItem:a}=e;!a||a instanceof u.default||(a=new u.default(a));const t=await async function(e){await e.load();const a=new i.v;return async function(e){const a=e.className,t=c.S[a];return{constructor:await t(),properties:e.properties}}(await f(e,a))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function f(e,a){switch(e.type){case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();const a=(0,y.Y)(e,"Map Notes"),t=(0,y.Y)(e,"Markup");if(a||t)return{className:"MapNotesLayer"};if((0,y.Y)(e,"Route Layer"))return{className:"RouteLayer"};const r=await e.fetchData();return 1===(0,o.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){const t=await m(e,a);if("object"==typeof t){const{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();const t=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};const r=await a.fetchItemData(e),n=r?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const s=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),i=s.cacheType?.toLowerCase(),l=s.capabilities?.toLowerCase().includes("tilesonly");return"map"===i||l?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){const{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Scene Service":return async function(e,a){const t=await m(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:t}=await(0,n.L)(e.url,{sceneLayerItem:e}),r=await a.fetchServiceMetadata(t);return r?.tables??[]}catch{return[]}}));if("object"==typeof t){const r={};let n;if(null!=t.id?(r.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.XX))if(e.typeKeywords.includes(a))return{className:l.XX[a]};const s=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{className:l.XX[s?.layerType]||"SceneLayer",properties:r}}if(!1===t){const t=await a.fetchServiceMetadata(e.url);if("Voxel"===t?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function m(e,a,t){const{url:r,type:n}=e,i="Feature Service"===n;if(!r)return{};if(/\/\d+$/.test(r)){if(i){const t=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,(e=>(0,o.pJ)(e)?.customParameters))});return{id:t.id,className:(0,s.K)(t.type),sourceJSON:t}}return{}}await e.load();let l=await a.fetchItemData(e);if(i){const e=await(0,o.bO)(l,r,a),t=w(e);if("object"==typeof t){const a=(0,o.rc)(e,t.id);t.className=(0,o.K8)(a?.layerType)}return t}if("Scene Service"===n&&(l=await(0,o.nu)(e,l,a)),(0,o.XH)(l)>0)return w(l);const c=await a.fetchServiceMetadata(r);return t&&(c.tables=await t()),w(c)}function w(e){return 1===(0,o.XH)(e)&&{id:(0,o.pJ)(e)?.id}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}}}]);
|