Recursively copies plain objects, arrays, Dates, RegExps, Maps and Sets.
Functions and class references are carried over unchanged, which is why
structuredClone cannot be used here: layout nodes hold Angular component
classes and the validation messages hold formatter functions.
// {any} value - the value to copy
// {any} - the copy
'cloneDeep' function
Recursively copies plain objects, arrays, Dates, RegExps, Maps and Sets. Functions and class references are carried over unchanged, which is why structuredClone cannot be used here: layout nodes hold Angular component classes and the validation messages hold formatter functions.
// {any} value - the value to copy // {any} - the copy