You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
34 KiB
JavaScript
25 lines
34 KiB
JavaScript
|
9 months ago
|
"use strict";
|
||
|
|
/*
|
||
|
|
* ATTENTION: An "eval-source-map" devtool has been used.
|
||
|
|
* This devtool is neither made for production nor for readable output files.
|
||
|
|
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
|
||
|
|
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
||
|
|
* or disable the default devtool with "devtool: false".
|
||
|
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
||
|
|
*/
|
||
|
|
exports.id = "vendor-chunks/hast-util-from-parse5";
|
||
|
|
exports.ids = ["vendor-chunks/hast-util-from-parse5"];
|
||
|
|
exports.modules = {
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/hast-util-from-parse5/lib/index.js":
|
||
|
|
/*!*********************************************************!*\
|
||
|
|
!*** ./node_modules/hast-util-from-parse5/lib/index.js ***!
|
||
|
|
\*********************************************************/
|
||
|
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
|
|
||
|
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fromParse5: () => (/* binding */ fromParse5)\n/* harmony export */ });\n/* harmony import */ var hastscript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! hastscript */ \"(ssr)/./node_modules/hastscript/lib/svg.js\");\n/* harmony import */ var hastscript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! hastscript */ \"(ssr)/./node_modules/hastscript/lib/html.js\");\n/* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! property-information */ \"(ssr)/./node_modules/property-information/index.js\");\n/* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! property-information */ \"(ssr)/./node_modules/property-information/lib/find.js\");\n/* harmony import */ var vfile_location__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vfile-location */ \"(ssr)/./node_modules/vfile-location/lib/index.js\");\n/* harmony import */ var web_namespaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! web-namespaces */ \"(ssr)/./node_modules/web-namespaces/index.js\");\n/**\n * @typedef {import('vfile').VFile} VFile\n * @typedef {import('property-information').Schema} Schema\n * @typedef {import('unist').Position} Position\n * @typedef {import('unist').Point} Point\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Root} Root\n * @typedef {import('hast').Content} Content\n * @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap\n * @typedef {import('parse5').Token.ElementLocation} P5ElementLocation\n * @typedef {import('parse5').Token.Location} P5Location\n */ /**\n * @typedef {Content | Root} Node\n * @typedef {DefaultTreeAdapterMap['document']} P5Document\n * @typedef {DefaultTreeAdapterMap['documentFragment']} P5DocumentFragment\n * @typedef {DefaultTreeAdapterMap['documentType']} P5DocumentType\n * @typedef {DefaultTreeAdapterMap['commentNode']} P5Comment\n * @typedef {DefaultTreeAdapterMap['textNode']} P5Text\n * @typedef {DefaultTreeAdapterMap['element']} P5Element\n * @typedef {DefaultTreeAdapterMap['node']} P5Node\n * @typedef {DefaultTreeAdapterMap['template']} P5Template\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef Options\n * Configuration.\n * @property {Space | null | undefined} [space='html']\n * Which space the document is in.\n *\n * When an `<svg>` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it.\n * @property {VFile | null | undefined} [file]\n * File used to add positional info to nodes.\n *\n * If given, the file should represent the original HTML source.\n * @property {boolean} [verbose=false]\n * Whether to add extra positional info about starting tags, closing tags,\n * and attributes to elements.\n *\n * > 👉 **Note**: only used when `file` is given.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {Schema} schema\n * Current schema.\n * @property {VFile | undefined} file\n * Corresponding file.\n * @property {boolean | undefined} verbose\n * Add extra positional info.\n * @property {boolean} location\n * Whether location info was found.\n */ \n\n\n\nconst own = {}.hasOwnProperty;\n/** @type {unknown} */ // type-coverage:ignore-next-line\nconst proto = Object.prototype;\n/**\n * Transform a `parse5` AST to hast.\n *\n * @param {P5Node} tree\n * `parse5` tree to transform.\n * @param {Options | VFile | null | undefined} [options]\n * Configuration.\n * @returns {Node}\n * hast tree.\n */ function fromParse5(tree, options) {\n const options_ = options || {};\n /** @type {Options} */ let settings;\n /** @type {VFile | undefined} */ let file;\n if (isFile(options_)) {\n file = options_;\n settings = {};\n } else {\n file = options_.file || undefined;\n settings = options_;\n }\n
|
||
|
|
|
||
|
|
/***/ })
|
||
|
|
|
||
|
|
};
|
||
|
|
;
|