1import { 2 require_clone, 3 require_toPath 4} from "/admin/node_modules/.strapi/vite/deps/chunk-3FNDFHAQ.js?v=d15f9e09"; 5import { 6 __toESM 7} from "/admin/node_modules/.strapi/vite/deps/chunk-X6GFWOGJ.js?v=d15f9e09"; 8 9// node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@codemirror+langua_q7p5l5qq6toq5swdfaay2akjmi/node_modules/@strapi/admin/dist/admin/admin/src/utils/objects.mjs 10var import_clone = __toESM(require_clone(), 1); 11var import_toPath = __toESM(require_toPath(), 1); 12function getIn(obj, key, def, pathStartIndex = 0) { 13 const path = (0, import_toPath.default)(key); 14 while (obj && pathStartIndex < path.length) { 15 obj = obj[path[pathStartIndex++]]; 16 } 17 if (pathStartIndex !== path.length && !obj) { 18 return def; 19 } 20 return obj === void 0 ? def : obj; 21} 22var isObject = (obj) => obj !== null && typeof obj === "object" && !Array.isArray(obj); 23var isInteger = (obj) => String(Math.floor(Number(obj))) === obj; 24function setIn(obj, path, value) { 25 const res = (0, import_clone.default)(obj); 26 let resVal = res; 27 let i = 0; 28 const pathArray = (0, import_toPath.default)(path); 29 for (; i < pathArray.length - 1; i++) { 30 const currentPath = pathArray[i]; 31 const currentObj = getIn(obj, pathArray.slice(0, i + 1)); 32 if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) { 33 resVal = resVal[currentPath] = (0, import_clone.default)(currentObj); 34 } else { 35 const nextPath = pathArray[i + 1]; 36 resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {}; 37 } 38 } 39 if ((i === 0 ? obj : resVal)[pathArray[i]] === value) { 40 return obj; 41 } 42 if (value === void 0) { 43 delete resVal[pathArray[i]]; 44 } else { 45 resVal[pathArray[i]] = value; 46 } 47 if (i === 0 && value === void 0) { 48 delete res[pathArray[i]]; 49 } 50 return res; 51} 52 53export { 54 getIn, 55 isObject, 56 setIn 57}; 58//# sourceMappingURL=chunk-A5ZULJ5L.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.