{"mappings":";AAMA,IAAMA,EAAK,eAaJ,SAASC,EAAWC,EAAO,CAChC,OAAO,OAAOA,GAAU,SACpBA,EAAM,OAAS,OACbC,EAAMD,EAAM,KAAK,EACjB,GACFC,EAAMD,CAAK,CACjB,CAMA,SAASC,EAAMC,EAAO,CACpB,OAAOA,EAAM,QAAQJ,EAAI,EAAE,IAAM,EACnC","names":["re","whitespace","thing","empty","value"],"sources":["../esm/npm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n// HTML whitespace expression.\n// See \u003chttps://infra.spec.whatwg.org/#ascii-whitespace\u003e.\nconst re = /[ \\t\\n\\f\\r]/g\n\n/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {Nodes | string} thing\n *   Thing to check (`Node` or `string`).\n * @returns {boolean}\n *   Whether the `value` is inter-element whitespace (`boolean`): consisting of\n *   zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n *   (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n *   whose `value` field is checked.\n */\nexport function whitespace(thing) {\n  return typeof thing === 'object'\n    ? thing.type === 'text'\n      ? empty(thing.value)\n      : false\n    : empty(thing)\n}\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction empty(value) {\n  return value.replace(re, '') === ''\n}\n"],"version":3}
