import '../../../hast-util-sanitize@4.1.0/node_modules/hast-util-sanitize/index.mjs';
import { defaultSchema } from '../../../hast-util-sanitize@4.1.0/node_modules/hast-util-sanitize/lib/schema.mjs';
import { sanitize } from '../../../hast-util-sanitize@4.1.0/node_modules/hast-util-sanitize/lib/index.mjs';

/**
 * @typedef {import('hast').Root} Root
 *
 * @typedef {import('hast-util-sanitize').Schema} Options
 *   The sanitation schema defines how and if nodes and properties should be cleaned.
 *   See `hast-util-sanitize`.
 *   The default schema is exported as `defaultSchema`.
 */


/**
 * Plugin to sanitize HTML.
 *
 * @type {import('unified').Plugin<[Options?] | Array<void>, Root, Root>}
 */
function rehypeSanitize(options = defaultSchema) {
  // @ts-expect-error: assume input `root` matches output root.
  return (tree) => sanitize(tree, options)
}

export { rehypeSanitize as default, defaultSchema };
//# sourceMappingURL=index.mjs.map
