import { identity as o, fn as u } from "../common.js";
import { EMPTY_ARRAY as n } from "../value/constants.js";
import { isNullish as c, isUndefined as s, isFunction as m } from "../value/is.js";
const g = (r, t, e) => {
  let i = t.get(r);
  return s(i) && m(e) && (s(i = e(r, t)) || t.set(r, i)), i;
}, p = (r, t = n) => {
  const e = `${r || ""}`.trim(), i = e ? e.split(/(?:\s*,\s*)+/).filter(o) : n;
  return i.length ? i : t;
}, A = (r, t, e) => r.includes(t) ? t : c(t) ? r[0] : r.includes(e) ? e : r[0], F = u(Array.prototype.some);
export {
  g as getMappedValue,
  p as listFrom,
  A as pickFrom,
  F as some
};
