/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../chunks/_rollupPluginBabelHelpers","../chunks/tslib.es6","./Accessor","./ReadOnlyMultiOriginJSONSupport","./accessorSupport/PropertyOrigin","./accessorSupport/utils","./accessorSupport/write","./accessorSupport/decorators/subclass"],(function(t,i,e,r,n,o,s,u,c){"use strict";const l=t=>{let r=function(t){function e(...i){return t.call(this,...i)||this}i._inheritsLoose(e,t);var r=e.prototype;return r.clear=function(t,i="user"){return p(this).delete(t,o.nameToId(i))},r.write=function(t={},i){return t=t||{},u.write(this,t,i),t},r.setAtOrigin=function(t,i,e){s.getProperties(this).setAtOrigin(t,i,o.nameToId(e))},r.removeOrigin=function(t){const i=p(this),e=o.nameToId(t),r=i.keys(e);for(const n of r)i.originOf(n)===e&&i.set(n,i.get(n,e),o.OriginId.USER)},r.updateOrigin=function(t,i){const e=p(this),r=o.nameToId(i),n=this.get(t);for(let s=r+1;s<o.OriginIdNum;++s)e.delete(t,s);e.set(t,n,r)},r.toJSON=function(t){return this.write({},t)},e}(t);return r=e.__decorate([c.subclass("esri.core.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function p(t){return s.getProperties(t).store}const O=t=>{let r=function(t){function e(...i){return t.call(this,...i)||this}return i._inheritsLoose(e,t),e}(l(n.ReadOnlyMultiOriginJSONMixin(t)));return r=e.__decorate([c.subclass("esri.core.MultiOriginJSONSupport")],r),r};t.MultiOriginJSONSupport=function(t){function e(){return t.apply(this,arguments)||this}return i._inheritsLoose(e,t),e}(O(r)),t.MultiOriginJSONSupport=e.__decorate([c.subclass("esri.core.MultiOriginJSONSupport")],t.MultiOriginJSONSupport),t.MultiOriginJSONMixin=O,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
