UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 673 B
const e=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},t=e=>e.type===`lucid.copy`&&e.scope===`admin`&&typeof e.key==`string`,n=(r,i)=>{if(Array.isArray(r)){let e=!1,t=r.map(t=>{let r=n(t,i);return r!==t&&(e=!0),r});return e?t:r}if(!e(r))return r;if(t(r)){if(r.defaultMessage!==void 0||!Object.hasOwn(i,r.key))return r;let e=i[r.key];return e===void 0?r:{...r,defaultMessage:e}}let a=!1,o=Object.entries(r).map(([e,t])=>{let r=n(t,i);return r!==t&&(a=!0),[e,r]});return a?Object.fromEntries(o):r},r=(e,t)=>t?n(e,t):e;export{r as hydrateAdminCopyDefaults}; //# sourceMappingURL=hydrate-admin-copy-defaults.mjs.map