{“ast”:null,“code”:“"use strict";nnObject.defineProperty(exports, "__esModule", {n value: truen});nexports = stackHierarchy;nnfunction push(arr, val) {n arr.push(val);n return arr;n}nnfunction tail(arr) {n return arr[arr.length - 1];n}n/**n * Retireve the element's ancestors up to the configured level.n * This is an internal function and is not to be used from the outside (nor can it, it is private)n * @param element (Object) The elemen't whose ancestry we want to retrieven * @param depth (number) How deep to into the heirarchy to collect elementsn */nnnfunction stackHierarchy(element, depth) {n if (depth <= 0) {n throw new Error("Simmer: An invalid depth of " + depth + " has been specified");n }nn return Array(depth - 1).fill().reduce(function (acc, val) {n return tail(acc).parent() ? push(acc, tail(acc).parent()) : acc;n }, [element]);n}”,“map”:null,“metadata”:{},“sourceType”:“module”}