// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.7/esri/copyright.txt for details. //>>built define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang dojo/promise/all ../PopupTemplate ../request ../core/Error ../core/Logger ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../core/accessorSupport/PropertyOrigin ../core/accessorSupport/utils ./FeatureLayer ./Layer ./mixins/SceneService ./support/commonProperties ./support/commonProperties ./support/FeatureReduction ./support/FeatureReductionSelection ./support/Field ./support/fieldUtils ./support/LabelClass ./support/labelingInfo ./support/RangeInfo ../portal/PortalItem ../renderers/support/jsonUtils ../renderers/support/styleUtils ../renderers/support/typeUtils ../symbols/support/ElevationInfo ../tasks/support/Query".split(" "), function(n,U,y,e,z,p,A,l,f,B,g,C,c,h,D,q,E,F,r,G,H,I,J,m,K,t,L,M,N,O,P,Q,R){function u(c,b,a){c&&((c=N.read(c,b,a)||void 0)||k.error("Failed to create renderer",{rendererDefinition:c,layer:this,context:a}));return c}var S=["3DObject","Point"],k=B.getLogger("esri.layers.SceneLayer"),w={"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"}, T={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"};return function(v){function b(a,d){a=v.call(this)||this;a.featureReduction=null;a.rangeInfos=null;a.operationalLayerType="ArcGISSceneServiceLayer";a.type="scene";a.fields=[];a.definitionExpression=null;a.elevationInfo=null;a.labelsVisible=!1;a.labelingInfo=null;a.legendEnabled=!0;a.cachedDrawingInfo={color:!1};a.popupEnabled=!0;a.popupTemplate=null;a.objectIdField=null;a.objectIdFilter=null;a._fieldUsageInfo={};a.screenSizePerspectiveEnabled= !0;return a}y(b,v);b.prototype.normalizeCtorArgs=function(a,d){return"string"===typeof a?z.mixin({},{url:a},d):a};b.prototype.getField=function(a){return m.getField(a,this.fields)};Object.defineProperty(b.prototype,"geometryType",{get:function(){return T[this.profile]||"mesh"},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"renderer",{set:function(a){m.fixRendererFields(a,this.fields);this._set("renderer",a)},enumerable:!0,configurable:!0});b.prototype.readCachedDrawingInfo=function(a, d){if(null==a||"object"!==typeof a)a={};null==a.color&&(a.color=!1);return a};b.prototype.readObjectIdField=function(a,d){!a&&d.fields&&d.fields.some(function(d){"esriFieldTypeOID"===d.type&&(a=d.name);return!!a});return a||void 0};b.prototype.readProfile=function(a,d){a=d.store.profile;if(null!=a&&w[a])return w[a];k.error("Unknown or missing profile",{profile:a,layer:this});return"mesh-pyramids"};b.prototype.readNormalReferenceFrame=function(a,d){return d.store.normalReferenceFrame};b.prototype.load= function(){var a=this,d=this.loadFromPortal({supportedTypes:["Scene Service"]}).always(function(){return a._fetchService()}).then(function(){return p([a._verifyRootNodeAndUpdateExtent(),a._setCompanionFeatureLayer()])}).then(function(){return a._applyCompanionOverrides()}).then(function(){return a._populateFieldUsageInfo()}).then(function(){return O.loadStyleRenderer(a,{origin:"service"})}).then(function(){return m.fixRendererFields(a.renderer,a.fields)});this.addResolvingPromise(d);return this.when()}; b.prototype.createLayerView=function(a){var d=this;return(null==this.profile||"mesh-pyramids"===this.profile?g.create(function(a){return n(["../views/3d/layers/SceneLayerView3D"],a)}):g.create(function(a){return n(["../views/3d/layers/SceneLayerGraphicsView3D"],a)})).then(function(b){return new b({view:a,layer:d})})};b.prototype.createQuery=function(){var a=new R;"mesh"!==this.geometryType&&(a.returnGeometry=!0,a.returnZ=!0);a.where=this.definitionExpression||"1\x3d1";a.sqlFormat="standard";return a}; b.prototype.queryExtent=function(a){var d=this;return this._getAssociatedLayerForQuery().then(function(b){return b.queryExtent(a||d.createQuery())})};b.prototype.queryFeatureCount=function(a){var d=this;return this._getAssociatedLayerForQuery().then(function(b){return b.queryFeatureCount(a||d.createQuery())})};b.prototype.queryFeatures=function(a){var d=this;return this._getAssociatedLayerForQuery().then(function(b){return b.queryFeatures(a||d.createQuery())}).then(function(a){if(a&&a.features)for(var b= 0,c=a.features;b