{"version":3,"file":"polyfills.mjs","names":[],"sources":["../../../src/tools/utils/polyfills.ts"],"sourcesContent":["export function findLast<T, S extends T>(\n  array: readonly T[],\n  predicate: (item: T, index: number, array: readonly T[]) => item is S\n): S | undefined {\n  for (let i = array.length - 1; i >= 0; i -= 1) {\n    const item = array[i]\n    if (predicate(item, i, array)) {\n      return item\n    }\n  }\n  return undefined\n}\n\n// Keep the following wrapper functions as it can be mangled and will result in smaller bundle size that using\n// the native Object.values and Object.entries directly\n\nexport function objectValues<T = unknown>(object: { [key: string]: T }) {\n  return Object.values(object)\n}\n\nexport function objectEntries<T = unknown>(object: { [key: string]: T }): Array<[string, T]> {\n  return Object.entries(object)\n}\n"],"mappings":";AAAA,SAAgB,SACd,OACA,WACe;CACf,KAAK,IAAI,IAAI,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAC7C,MAAM,OAAO,MAAM;EACnB,IAAI,UAAU,MAAM,GAAG,KAAK,GAC1B,OAAO;CAEX;AAEF;AAKA,SAAgB,aAA0B,QAA8B;CACtE,OAAO,OAAO,OAAO,MAAM;AAC7B;AAEA,SAAgB,cAA2B,QAAkD;CAC3F,OAAO,OAAO,QAAQ,MAAM;AAC9B"}