'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('../../../hast-util-sanitize@4.1.0/node_modules/hast-util-sanitize/index.js');
var schema = require('../../../hast-util-sanitize@4.1.0/node_modules/hast-util-sanitize/lib/schema.js');
var index = require('../../../hast-util-sanitize@4.1.0/node_modules/hast-util-sanitize/lib/index.js');

/**
 * @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 = schema.defaultSchema) {
  // @ts-expect-error: assume input `root` matches output root.
  return (tree) => index.sanitize(tree, options)
}

exports.defaultSchema = schema.defaultSchema;
exports.default = rehypeSanitize;
//# sourceMappingURL=index.js.map
