/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../lang","../maybe","./utils"],(function(e,t,r,o){"use strict";let n=function(e){this.autoDestroy=!1,this.properties=e};function a(e){let o=e.constructor.__accessorMetadata__;const a=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(o){if(!a){const r=Object.create(o.properties),a=o.autoDestroy;for(const e in r)r[e]=t.clone(r[e]);o=new n(r),o.autoDestroy=a,Object.defineProperty(e.constructor,"__accessorMetadata__",{value:o,enumerable:!1,configurable:!0,writable:!0})}}else o=new n({}),Object.defineProperty(e.constructor,"__accessorMetadata__",{value:o,enumerable:!1,configurable:!0,writable:!0});return r.assumeNonNull(e.constructor.__accessorMetadata__)}function s(e){return a(e).properties}function c(e,t){const r=s(e);let o=r[t];return o||(o=r[t]={}),o}function u(e,t,r){s(e)[t]=r}function i(e,t){return o.merge(e,t,d)}function l(e,t){return o.merge(e,t,_)}const p=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function _(e){return p.test(e)?"replace":"merge"}const f=/^properties\./;function d(e){return f.test(e)?_(e.slice(11)):"merge"}e.ClassMetadata=n,e.getOwnClassMetadata=a,e.getOwnPropertiesMetadata=s,e.getOwnPropertyMetadata=c,e.merge=i,e.mergeProperty=l,e.setPropertyMetadata=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
