import { decode as o } from "html-entities";
const s = (r) => typeof r == "boolean" ? r : typeof r == "string" ? r === "true" : !1, f = (r) => typeof r == "number" ? r : typeof r == "string" && parseInt(r) || 0, c = (r) => {
  if (Array.isArray(r)) return r;
  if (typeof r == "string") {
    const t = decodeURIComponent(r);
    if (t && t !== "undefined")
      return JSON.parse(t);
  }
  return [];
}, d = (r) => r ? o(r) : "", u = (r) => r ? o(r) : "";
function p(r) {
  return r.replace(/^\[|\]$/g, "").split(",").map((t) => {
    const n = t.trim(), e = Number(n);
    return isNaN(e) ? n : e;
  });
}
export {
  u as decodeHtmlEntitiesToHtml,
  d as decodeHtmlEntitiesToText,
  p as stringToArray,
  s as toBoolean,
  f as toNumber,
  c as uriStringToArray
};
