{"version":3,"sources":["jsdelivr-header.js","/npm/flesch@2.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,eAAiB,MACjB,WAAa,KACb,KAAO,eA+BJ,SAAS,OAAO,GACrB,OAAK,GAAW,EAAO,UAAa,EAAO,MAAS,EAAO,SAKzD,KACA,gBAAkB,EAAO,KAAO,EAAO,UACvC,YAAc,EAAO,SAAW,EAAO,MANhC,OAAO,GAQlB","file":"/npm/flesch@2.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/flesch@2.0.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var sentenceWeight = 1.015\nvar wordWeight = 84.6\nvar base = 206.835\n\n/**\n * @typedef {Object.<string, number>} FleschCounts\n * @property {number} sentence\n * @property {number} word\n * @property {number} syllable\n */\n\n/**\n * Given an object containing the number of words (`word`), the number of sentences (`sentence`), and the number of syllables  (`syllable`) in a document, returns the reading ease associated with the document.\n *\n * Returned values are 120 (every sentence consisting of only two one-syllable words), or lower (including negative values).\n *\n * The values have the following semantics:\n *\n * |     Score    | Semantics                                           |\n * | :----------: | :-------------------------------------------------- |\n * | 90.0 – 100.0 | Easily understood by an average 11-year-old student |\n * |  60.0 – 70.0 | Easily understood by 13- to 15-year-old students    |\n * |  0.0 – 30.0  | Best understood by university graduates             |\n *\n * Therefore we can use the following formula to approximate the average age a student would understand a document at, given score `score`:\n *\n * ```js\n * var age = 20 - Math.floor(score / 10)\n * ```\n *\n * @param {FleschCounts} counts\n * @returns {number}\n */\nexport function flesch(counts) {\n  if (!counts || !counts.sentence || !counts.word || !counts.syllable) {\n    return Number.NaN\n  }\n\n  return (\n    base -\n    sentenceWeight * (counts.word / counts.sentence) -\n    wordWeight * (counts.syllable / counts.word)\n  )\n}\n"]}