const s = (p, c) => {
  if (p && typeof p == "object" && Object.keys(p).length > 0) {
    const t = Object.keys(p);
    c = `<span>${c}</span>`, t.forEach((n) => {
      c = c.replace(`<${n}>`, `</span><a>${n}</a><span>`);
    });
  }
  return c;
}, $ = (p, c) => {
  const t = {
    ...p
  };
  return t && c && typeof c == "string" && Object.keys(t).forEach((n) => {
    if (typeof c == "string") {
      const f = c == null ? void 0 : c.match(new RegExp(`<${n}>(.*?)</${n}>`));
      if (f !== null) {
        const e = f[1];
        t[n].text = e, c = c.replace(new RegExp(`<${n}>.*?</${n}>`), `<${n}>`);
      }
    }
  }), s(t, c);
};
export {
  $ as parseFullLinks
};
