@forbespro/lead-agent
Version:
Lead Chat Agent React Component
15 lines (14 loc) • 493 B
JavaScript
import { normalizeUri as o } from "./index125.js";
import { revert as p } from "./index147.js";
function m(e, t) {
const l = String(t.identifier).toUpperCase(), i = e.definitionById.get(l);
if (!i)
return p(e, t);
const r = { src: o(i.url || ""), alt: t.alt };
i.title !== null && i.title !== void 0 && (r.title = i.title);
const n = { type: "element", tagName: "img", properties: r, children: [] };
return e.patch(t, n), e.applyData(t, n);
}
export {
m as imageReference
};