/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../request","../../core/Collection","../../core/JSONSupport","../../core/maybe","../../core/urlUtils","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","./SceneModification"],(function(r,e,o,t,n,s,c,i,u,a,l,p,f){"use strict";var y;let S=y=function(e){function t(r){var o;return(o=e.call(this,r)||this).url=null,o}r._inheritsLoose(t,e);var n=t.prototype;return n.clone=function(){return new y({url:this.url,items:this.items.map((r=>r.clone()))})},n.toJSON=function(r){return this.toArray().map((e=>e.toJSON(r))).filter((r=>!!r.geometry))},t.fromJSON=function(r,e){const o=new y;for(const t of r)o.add(f.fromJSON(t,e));return o},t.fromUrl=function(){var e=r._asyncToGenerator((function*(r,e,t){const n={url:c.urlToObject(r),origin:"service"},i=yield o(r,{responseType:"json",signal:s.get(t,"signal")}),u=e.toJSON(),a=[];for(const o of i.data)a.push(f.fromJSON({...o,geometry:{...o.geometry,spatialReference:u}},n));return new y({url:r,items:a})}));function t(r,o,t){return e.apply(this,arguments)}return t}(),t}(n.JSONSupportMixin(t.ofType(f)));e.__decorate([i.property({type:String})],S.prototype,"url",void 0),S=y=e.__decorate([p.subclass("esri.layers.support.SceneModifications")],S);return S}));
