UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

3 lines (2 loc) • 26.8 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,throwIfAborted as u,isAbortError as y,throwIfNotAbortError as c}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as f}from"../core/accessorSupport/decorators.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as w}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import I from"./Layer.js";import{NoModelError as L,MultipleModelsError as j}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as F}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{CustomParametersMixin as T}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as O}from"./mixins/EditBusLayer.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as E}from"./mixins/ScaleRangeLayer.js";import{SceneService as P}from"./mixins/SceneService.js";import{useViewTimeProperty as A}from"./mixins/TemporalLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as D}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as R,labelsVisible as C,legendEnabled as N,popupEnabled as G,attributeTableTemplate as Q,screenSizePerspectiveEnabled as k}from"./support/commonProperties.js";import{getFieldDomain as V,computeEffectiveEditingEnabled as M,getGlobalIdToObjectIdMap as z}from"./support/featureLayerUtils.js";import K from"./support/FeatureReductionSelection.js";import{defineFieldProperties as $}from"./support/fieldProperties.js";import H from"./support/FieldsIndex.js";import{fixRendererFields as W,fixTimeInfoFields as B,unpackFieldNames as Z}from"./support/fieldUtils.js";import{I3SNodePageDefinition as J,I3SMaterialDefinition as X,I3STextureSetDefinition as Y,I3SGeometryDefinition as ee}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as te,isFileSupported as re}from"./support/infoFor3D.js";import ie from"./support/LabelClass.js";import{reader as se}from"./support/labelingInfo.js";import oe from"./support/LayerFloorInfo.js";import{layerLookupMap as ae}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as ne}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as le}from"./support/RangeInfo.js";import pe from"./support/SceneFilter.js";import{cacheIsOutOfSync as de}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as ye}from"./support/SceneServiceTimeInfo.js";import ce from"./support/TimeInfo.js";import{loadStyleRenderer as me}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ge,elevationModeUnsupportedMessage as ve,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import Le from"../time/TimeExtent.js";import je from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Fe}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Se,getFetchPopupTemplate as Te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";import{reader as xe}from"../core/accessorSupport/decorators/reader.js";const _e=new Set(["3DObject","Point"]),Ee=$();let Pe=class extends(O(P(S(x(_(E(p(T(F(i(I))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,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.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?V(this.associatedLayer,e,t,r):r}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 H(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.fromJSON(e,r)}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&&M(this.associatedLayer)}get geometryType(){return Ue[this.profile]||"mesh"}set renderer(e){W(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:q;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:y,supportsAdd:c,supportsUpdate:m,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&a,supportsUploadWithItemId:o},data:{supportsAttachment:u,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:y&&w,supportsAdd:b&&c&&w,supportsDelete:b&&h&&w,supportsUpdate:m&&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 r=t.store.profile;return null!=r&&Ae[r]?Ae[r]:(n.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(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)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),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 me(this,{origin:"service"},t),W(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){n.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 fe;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(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(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("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 o("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 r=Z(this.fieldsIndex,await Se(this,Te(this)));return Fe(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new o("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(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 o("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 o("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(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await z(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>te(this.infoFor3D,t)?e+1:e,0);0===s&&r(new L),s>1&&r(new j);const a=this.spatialReference,l=t.origin,p=await w(l??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:a}),a,t),d=a.isGeographic?"local":"georeferenced",{default:y}=await import("../geometry/Mesh.js");u(t);const c=y.createWithExternalSource(p,{type:"client",files:i},{vertexSpace:d,transform:ne(a),unitConversionDisabled:!0}),[m]=await this.uploadAssets([c],{...t,useAssetOrigin:!l});return m}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>re(t,e))}validateLayer(e){if(e.layerType&&!_e.has(e.layerType))throw new o("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 o("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 o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new o("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),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!de(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_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:r,portalItem:i}=await D(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ae.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await m(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void c(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ge(n.getLogger(this),ve("Mesh scene layers","relative-to-scene",e)),ge(n.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i)return;if(de({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let i=null;try{const r=await this.fetchStatistics(t,e);i=r?.stats}catch{}if(null==i)return null;const{minTimeStr:s,min:o,maxTimeStr:a,max:n}=i,l=t===r?s??o:a??n;return null!=l?new Date(l):null},[o,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==o||null!=i&&null==a)return;const n=new Le({start:o,end:a});this.setAtOrigin("timeInfo",new ce({endField:i,startField:r,fullTimeExtent:n}),"service")}};e([h({types:{key:"type",base:null,typeMap:{selection:K}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Pe.prototype,"featureReduction",void 0),e([h({type:[le],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Pe.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Pe.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Pe.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Pe.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Pe.prototype,"type",void 0),e([h({...Ee.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"fields",void 0),e([h()],Pe.prototype,"types",null),e([h()],Pe.prototype,"typeIdField",null),e([h()],Pe.prototype,"templates",null),e([h()],Pe.prototype,"formTemplate",null),e([h({readOnly:!0})],Pe.prototype,"graphicOrigin",void 0),e([h({readOnly:!0,clonable:!1})],Pe.prototype,"fieldsIndex",null),e([h({type:oe,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Pe.prototype,"floorInfo",void 0),e([h(Ee.outFields)],Pe.prototype,"outFields",void 0),e([h({type:J,readOnly:!0,json:{read:!1},clonable:!1})],Pe.prototype,"nodePages",void 0),e([xe("service","nodePages",["nodePages","pointNodePages"])],Pe.prototype,"readNodePages",null),e([h({type:[X],readOnly:!0,clonable:!1})],Pe.prototype,"materialDefinitions",void 0),e([h({type:[Y],readOnly:!0,clonable:!1})],Pe.prototype,"textureSetDefinitions",void 0),e([h({type:[ee],readOnly:!0,clonable:!1})],Pe.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Pe.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Pe.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Pe.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Pe.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Pe.prototype,"definitionExpression",void 0),e([h({type:pe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Pe.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Pe.prototype,"path",void 0),e([h(R)],Pe.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Pe.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Pe.prototype,"geometryType",null),e([h(C)],Pe.prototype,"labelsVisible",void 0),e([h({type:[ie],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:se},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:se},write:!0}})],Pe.prototype,"labelingInfo",void 0),e([h(N)],Pe.prototype,"legendEnabled",void 0),e([h({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 r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Pe.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Pe.prototype,"renderer",null),e([h({json:{read:!1}})],Pe.prototype,"cachedDrawingInfo",void 0),e([xe("service","cachedDrawingInfo")],Pe.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Pe.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Pe.prototype,"relationships",null),e([h(G)],Pe.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Pe.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Pe.prototype,"defaultPopupTemplate",null),e([h(Q)],Pe.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Pe.prototype,"objectIdField",void 0),e([xe("service","objectIdField",["objectIdField","fields"])],Pe.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Pe.prototype,"globalIdField",void 0),e([xe("service","globalIdField",["globalIdField","fields"])],Pe.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Pe.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Pe.prototype,"profile",void 0),e([xe("service","profile",["store.profile"])],Pe.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Pe.prototype,"normalReferenceFrame",void 0),e([h(k)],Pe.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Pe.prototype,"serviceItemId",void 0),e([h(A)],Pe.prototype,"useViewTime",null),e([h({type:ce,json:{read:!1,write:!1}})],Pe.prototype,"timeInfo",null),e([h({type:Le,json:{read:!1,write:!1}})],Pe.prototype,"timeExtent",null),e([h({type:je,json:{read:!1,write:!1}})],Pe.prototype,"timeOffset",null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Pe.prototype,"datesInUnknownTimezone",null),e([h({type:ye,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],Pe.prototype,"serviceTimeInfo",void 0),Pe=e([f("esri.layers.SceneLayer")],Pe);const Ae={"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"},Ue={"mesh-pyramids":"mesh",points:"point"},De=Pe;export{De as default};