/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.25/esri/copyright.txt for details. */ import{_ as r}from"./chunks/tslib.es6.js";import t from"./Camera.js";import{geometryTypes as e}from"./geometry.js";import{JSONSupport as o}from"./core/JSONSupport.js";import{isSome as s}from"./core/maybe.js";import{property as i}from"./core/accessorSupport/decorators/property.js";import"./core/arrayUtils.js";import{cast as a}from"./core/accessorSupport/decorators/cast.js";import{subclass as c}from"./core/accessorSupport/decorators/subclass.js";import{fromJSON as p}from"./geometry/support/jsonUtils.js";var m;let n=m=class extends o{constructor(r){super(r),this.rotation=0,this.scale=0,this.targetGeometry=null,this.camera=null}castRotation(r){return(r%=360)<0&&(r+=360),r}clone(){return new m({rotation:this.rotation,scale:this.scale,targetGeometry:s(this.targetGeometry)?this.targetGeometry.clone():null,camera:s(this.camera)?this.camera.clone():null})}};function l(){return{enabled:!this.camera}}r([i({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:l}}}}})],n.prototype,"rotation",void 0),r([a("rotation")],n.prototype,"castRotation",null),r([i({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:l}}}}})],n.prototype,"scale",void 0),r([i({types:e,json:{read:p,write:!0,origins:{"web-scene":{read:p,write:{overridePolicy:l}}}}})],n.prototype,"targetGeometry",void 0),r([i({type:t,json:{write:!0}})],n.prototype,"camera",void 0),n=m=r([c("esri.Viewpoint")],n);const u=n;export{u as default};