// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../chunks/tslib.es6 ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ./domains ./fieldType".split(" "),function(b,a,k,d,l,t,u,m,g,n,h,p){var f;const q=new a.JSONMap({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"});a=f=class extends k.JSONSupport{constructor(c){super(c);this.alias=null;this.defaultValue=void 0;this.domain=this.description=null;this.editable=!0;this.length=void 0;this.name=null;this.nullable= !0;this.valueType=this.type=null;this.visible=!0}readDescription(c,{description:e}){c=null;try{c=e?JSON.parse(e):null}catch(r){}return c?.value??null}readValueType(c,{description:e}){c=null;try{c=e?JSON.parse(e):null}catch(r){}return c?q.fromJSON(c.fieldValueType):null}clone(){return new f({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})}};b.__decorate([d.property({type:String,json:{write:!0}})],a.prototype,"alias",void 0);b.__decorate([d.property({type:[String,Number],json:{write:{allowNull:!0}}})],a.prototype,"defaultValue",void 0);b.__decorate([d.property()],a.prototype,"description",void 0);b.__decorate([g.reader("description")],a.prototype,"readDescription",null);b.__decorate([d.property({types:h.types,json:{read:{reader:h.fromJSON},write:!0}})],a.prototype,"domain",void 0);b.__decorate([d.property({type:Boolean, json:{write:!0}})],a.prototype,"editable",void 0);b.__decorate([d.property({type:l.Integer,json:{write:{overridePolicy(c){return{enabled:Number.isFinite(c)}}}}})],a.prototype,"length",void 0);b.__decorate([d.property({type:String,json:{write:!0}})],a.prototype,"name",void 0);b.__decorate([d.property({type:Boolean,json:{write:!0}})],a.prototype,"nullable",void 0);b.__decorate([m.enumeration(p.kebabDict)],a.prototype,"type",void 0);b.__decorate([d.property()],a.prototype,"valueType",void 0);b.__decorate([g.reader("valueType", ["description"])],a.prototype,"readValueType",null);b.__decorate([d.property({type:Boolean,json:{read:!1}})],a.prototype,"visible",void 0);return a=f=b.__decorate([n.subclass("esri.layers.support.Field")],a)});