import { jsx as i } from "react/jsx-runtime";
import m from "dompurify";
import { useAsyncEffect as a } from "ahooks";
import f from "axios";
import { useState as c } from "react";
import p from "./svg-embedder/inline-svg.js";
function x({ src: t, onLoad: o = void 0 }) {
  const [e, n] = c("");
  return a(async () => {
    const r = await f.get(t), s = m.sanitize(r.data);
    n(s), o?.();
  }, []), /* @__PURE__ */ i(p, { svg: e });
}
export {
  x as default
};
