// 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 dojo/_base/lang ./Dictionary ./ImmutableArray ./languageUtils ../geometry/Geometry ../geometry/Point ../geometry/support/jsonUtils".split(" "),function(r,t,q,k,l,g,m,p,n){return function(){function d(){this._layer=this.attributes=this._geometry=null;this.immutable=this.immutable=this._datesfixed=!0}d.createFromGraphic=function(a){var b=new d;b._geometry=a.geometry;b.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes;a._sourceLayer?(b._layer=a._sourceLayer, b._datesfixed=!1):a._layer?(b._layer=a._layer,b._datesfixed=!1):a.sourceLayer?(b._layer=a.sourceLayer,b._datesfixed=!1):a.layer&&(b._layer=a.layer,b._datesfixed=!1);return b};d.createFromArcadeFeature=function(a){var b=new d;b._datesfixed=a._datesfixed;b.attributes=a.attributes;b._geometry=a._geometry;a._layer&&(b._layer=a._layer);return b};d.createFromArcadeDictionary=function(a){var b=new d;b.attributes=a.field("attributes");null!==b.attributes?b.attributes instanceof k?(b.attributes=b.attributes.attributes, null===b.attributes&&(b.attributes={})):b.attributes={}:b.attributes={};b._geometry=a.field("geometry");null!==b._geometry&&(b._geometry instanceof k?b._geometry=d.parseGeometryFromDictionary(b._geometry):b._geometry instanceof m||(b._geometry=null));return b};d.createFromGraphicLikeObject=function(a,b,c){void 0===c&&(c=null);var e=new d;null===b&&(b={});e.attributes=b;e._geometry=a;e._layer=c;e._layer&&(e._datesfixed=!1);return e};d.prototype.repurposeFromGraphicLikeObject=function(a,b,c){void 0=== c&&(c=null);null===b&&(b={});this.attributes=b;this._geometry=a;this._datesfixed=(this._layer=c)?!1:!0};d.prototype.castToText=function(){var a="",b;for(b in this.attributes){""!==a&&(a+=",");var c=this.attributes[b];null==c?a+=JSON.stringify(b)+":null":g.isBoolean(c)||g.isNumber(c)||g.isString(c)?a+=JSON.stringify(b)+":"+JSON.stringify(c):c instanceof m?a+=JSON.stringify(b)+":"+g.toStringExplicit(c):c instanceof l?a+=JSON.stringify(b)+":"+g.toStringExplicit(c):c instanceof Array?a+=JSON.stringify(b)+ ":"+g.toStringExplicit(c):c instanceof Date?a+=JSON.stringify(b)+":"+JSON.stringify(c):null!==c&&"object"===typeof c&&void 0!==c.castToText&&(a+=JSON.stringify(b)+":"+c.castToText())}return'{"geometry":'+(null===this.geometry()?"null":g.toStringExplicit(this.geometry()))+',"attributes":{'+a+"}}"};d.prototype._fixDates=function(){for(var a=[],b=0;b